From f70ce707e2d35a5ed8349d03b6aa8d493792e180 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 16 Jul 2019 19:02:51 -0400 Subject: [PATCH] update musl headers to musl v1.1.23 --- .../bits/endian.h | 0 .../bits/fcntl.h | 0 .../bits/fenv.h | 0 .../bits/float.h | 0 .../bits/hwcap.h | 6 +- .../bits/ipc.h | 0 .../bits/limits.h | 0 .../bits/posix.h | 0 .../bits/reg.h | 0 .../bits/sem.h | 0 .../bits/setjmp.h | 0 .../bits/signal.h | 0 .../bits/socket.h | 0 .../bits/stat.h | 0 .../bits/user.h | 0 .../aarch64-linux-musleabi/bfd_stdint.h | 47 - .../aarch64-linux-musleabi/bits/alltypes.h | 401 - .../aarch64-linux-musleabi/bits/hwcap.h | 28 - .../aarch64-linux-musleabi/bits/syscall.h | 555 -- .../aarch64_be-linux-musl/bfd_stdint.h | 47 - .../aarch64_be-linux-musl/bits/alltypes.h | 401 - .../aarch64_be-linux-musl/bits/endian.h | 5 - .../include/aarch64_be-linux-musl/bits/fenv.h | 19 - .../aarch64_be-linux-musl/bits/float.h | 16 - .../include/aarch64_be-linux-musl/bits/ipc.h | 14 - .../aarch64_be-linux-musl/bits/limits.h | 7 - .../aarch64_be-linux-musl/bits/posix.h | 2 - .../include/aarch64_be-linux-musl/bits/reg.h | 2 - .../include/aarch64_be-linux-musl/bits/sem.h | 14 - .../aarch64_be-linux-musl/bits/setjmp.h | 1 - .../aarch64_be-linux-musl/bits/signal.h | 153 - .../aarch64_be-linux-musl/bits/socket.h | 33 - .../include/aarch64_be-linux-musl/bits/stat.h | 18 - .../aarch64_be-linux-musl/bits/syscall.h | 555 -- .../include/aarch64_be-linux-musl/bits/user.h | 16 - .../bits/endian.h | 2 +- .../bits/fcntl.h | 0 .../bits/fenv.h | 0 .../bits/hwcap.h | 0 .../bits/ioctl_fix.h | 0 .../bits/msg.h | 0 .../bits/ptrace.h | 0 .../bits/setjmp.h | 0 .../bits/shm.h | 0 .../bits/signal.h | 0 .../bits/stdint.h | 0 .../bits/user.h | 0 lib/libc/include/arm-linux-musleabi/bfd.h | 8034 ----------------- .../include/arm-linux-musleabi/bfd_stdint.h | 47 - lib/libc/include/arm-linux-musleabihf/bfd.h | 8034 ----------------- .../include/arm-linux-musleabihf/bfd_stdint.h | 47 - .../include/arm-linux-musleabihf/bits/fcntl.h | 40 - .../include/arm-linux-musleabihf/bits/hwcap.h | 53 - .../arm-linux-musleabihf/bits/ioctl_fix.h | 2 - .../include/arm-linux-musleabihf/bits/msg.h | 15 - .../arm-linux-musleabihf/bits/ptrace.h | 25 - .../include/arm-linux-musleabihf/bits/shm.h | 27 - .../arm-linux-musleabihf/bits/stdint.h | 20 - lib/libc/include/armeb-linux-musleabi/bfd.h | 8034 ----------------- .../include/armeb-linux-musleabi/bfd_stdint.h | 47 - .../include/armeb-linux-musleabi/bits/fcntl.h | 40 - .../include/armeb-linux-musleabi/bits/hwcap.h | 53 - .../armeb-linux-musleabi/bits/ioctl_fix.h | 2 - .../include/armeb-linux-musleabi/bits/msg.h | 15 - .../armeb-linux-musleabi/bits/ptrace.h | 25 - .../include/armeb-linux-musleabi/bits/shm.h | 27 - .../armeb-linux-musleabi/bits/stdint.h | 20 - lib/libc/include/armeb-linux-musleabihf/bfd.h | 8034 ----------------- .../armeb-linux-musleabihf/bfd_stdint.h | 47 - .../armeb-linux-musleabihf/bits/fcntl.h | 40 - .../armeb-linux-musleabihf/bits/hwcap.h | 53 - .../armeb-linux-musleabihf/bits/ioctl_fix.h | 2 - .../include/armeb-linux-musleabihf/bits/msg.h | 15 - .../armeb-linux-musleabihf/bits/ptrace.h | 25 - .../include/armeb-linux-musleabihf/bits/shm.h | 27 - .../armeb-linux-musleabihf/bits/stdint.h | 20 - lib/libc/include/generic-musl/ansidecl.h | 402 - lib/libc/include/generic-musl/bfd.h | 8034 ----------------- lib/libc/include/generic-musl/bfdlink.h | 958 -- lib/libc/include/generic-musl/bits/alltypes.h | 41 +- lib/libc/include/generic-musl/bits/endian.h | 6 +- lib/libc/include/generic-musl/bits/ioctl.h | 100 +- lib/libc/include/generic-musl/bits/syscall.h | 1285 ++- lib/libc/include/generic-musl/diagnostics.h | 107 - lib/libc/include/generic-musl/dis-asm.h | 397 - .../include/generic-musl/drm/amdgpu_drm.h | 994 -- .../include/generic-musl/drm/armada_drm.h | 56 - lib/libc/include/generic-musl/drm/drm.h | 1004 -- .../include/generic-musl/drm/drm_fourcc.h | 588 -- lib/libc/include/generic-musl/drm/drm_mode.h | 894 -- lib/libc/include/generic-musl/drm/drm_sarea.h | 92 - .../include/generic-musl/drm/etnaviv_drm.h | 289 - .../include/generic-musl/drm/exynos_drm.h | 424 - lib/libc/include/generic-musl/drm/i810_drm.h | 292 - lib/libc/include/generic-musl/drm/i915_drm.h | 1724 ---- lib/libc/include/generic-musl/drm/mga_drm.h | 427 - lib/libc/include/generic-musl/drm/msm_drm.h | 308 - .../include/generic-musl/drm/nouveau_drm.h | 152 - lib/libc/include/generic-musl/drm/omap_drm.h | 126 - lib/libc/include/generic-musl/drm/qxl_drm.h | 158 - lib/libc/include/generic-musl/drm/r128_drm.h | 336 - .../include/generic-musl/drm/radeon_drm.h | 1078 --- .../include/generic-musl/drm/savage_drm.h | 220 - lib/libc/include/generic-musl/drm/sis_drm.h | 77 - lib/libc/include/generic-musl/drm/tegra_drm.h | 681 -- lib/libc/include/generic-musl/drm/v3d_drm.h | 194 - lib/libc/include/generic-musl/drm/vc4_drm.h | 442 - lib/libc/include/generic-musl/drm/vgem_drm.h | 62 - lib/libc/include/generic-musl/drm/via_drm.h | 282 - .../include/generic-musl/drm/virtgpu_drm.h | 175 - .../include/generic-musl/drm/vmwgfx_drm.h | 1218 --- lib/libc/include/generic-musl/elf.h | 120 +- lib/libc/include/generic-musl/fcntl.h | 8 +- lib/libc/include/generic-musl/math.h | 12 + lib/libc/include/generic-musl/misc/cxl.h | 156 - lib/libc/include/generic-musl/misc/ocxl.h | 80 - .../include/generic-musl/mtd/inftl-user.h | 90 - lib/libc/include/generic-musl/mtd/mtd-abi.h | 285 - lib/libc/include/generic-musl/mtd/mtd-user.h | 33 - lib/libc/include/generic-musl/mtd/nftl-user.h | 91 - lib/libc/include/generic-musl/mtd/ubi-user.h | 460 - lib/libc/include/generic-musl/netinet/in.h | 3 + lib/libc/include/generic-musl/netinet/tcp.h | 9 + lib/libc/include/generic-musl/netinet/udp.h | 2 + .../include/generic-musl/netpacket/packet.h | 1 + lib/libc/include/generic-musl/plugin-api.h | 483 - .../include/generic-musl/rdma/bnxt_re-abi.h | 106 - .../include/generic-musl/rdma/cxgb3-abi.h | 82 - .../include/generic-musl/rdma/cxgb4-abi.h | 115 - .../generic-musl/rdma/hfi/hfi1_ioctl.h | 174 - .../include/generic-musl/rdma/hfi/hfi1_user.h | 267 - lib/libc/include/generic-musl/rdma/hns-abi.h | 72 - .../include/generic-musl/rdma/i40iw-abi.h | 107 - .../include/generic-musl/rdma/ib_user_cm.h | 326 - .../generic-musl/rdma/ib_user_ioctl_cmds.h | 160 - .../generic-musl/rdma/ib_user_ioctl_verbs.h | 160 - .../include/generic-musl/rdma/ib_user_mad.h | 234 - .../include/generic-musl/rdma/ib_user_sa.h | 77 - .../include/generic-musl/rdma/ib_user_verbs.h | 1292 --- lib/libc/include/generic-musl/rdma/mlx4-abi.h | 191 - lib/libc/include/generic-musl/rdma/mlx5-abi.h | 474 - .../generic-musl/rdma/mlx5_user_ioctl_cmds.h | 169 - .../generic-musl/rdma/mlx5_user_ioctl_verbs.h | 42 - .../include/generic-musl/rdma/mthca-abi.h | 112 - lib/libc/include/generic-musl/rdma/nes-abi.h | 115 - .../include/generic-musl/rdma/ocrdma-abi.h | 152 - lib/libc/include/generic-musl/rdma/qedr-abi.h | 131 - .../include/generic-musl/rdma/rdma_netlink.h | 434 - .../include/generic-musl/rdma/rdma_user_cm.h | 324 - .../generic-musl/rdma/rdma_user_ioctl.h | 85 - .../generic-musl/rdma/rdma_user_ioctl_cmds.h | 104 - .../include/generic-musl/rdma/rdma_user_rxe.h | 179 - .../generic-musl/rdma/vmw_pvrdma-abi.h | 298 - .../generic-musl/scsi/cxlflash_ioctl.h | 276 - .../include/generic-musl/scsi/fc/fc_els.h | 832 -- lib/libc/include/generic-musl/scsi/fc/fc_fs.h | 351 - lib/libc/include/generic-musl/scsi/fc/fc_gs.h | 97 - lib/libc/include/generic-musl/scsi/fc/fc_ns.h | 209 - .../include/generic-musl/scsi/scsi_bsg_fc.h | 320 - .../include/generic-musl/scsi/scsi_netlink.h | 123 - .../generic-musl/scsi/scsi_netlink_fc.h | 71 - .../include/generic-musl/sound/asequencer.h | 612 -- lib/libc/include/generic-musl/sound/asoc.h | 633 -- lib/libc/include/generic-musl/sound/asound.h | 1035 --- .../include/generic-musl/sound/asound_fm.h | 135 - .../generic-musl/sound/compress_offload.h | 192 - .../generic-musl/sound/compress_params.h | 406 - lib/libc/include/generic-musl/sound/emu10k1.h | 379 - .../include/generic-musl/sound/firewire.h | 91 - lib/libc/include/generic-musl/sound/hdsp.h | 111 - lib/libc/include/generic-musl/sound/hdspm.h | 232 - .../include/generic-musl/sound/sb16_csp.h | 123 - .../include/generic-musl/sound/sfnt_info.h | 213 - .../generic-musl/sound/skl-tplg-interface.h | 239 - .../generic-musl/sound/snd_sst_tokens.h | 330 - lib/libc/include/generic-musl/sound/tlv.h | 117 - .../include/generic-musl/sound/usb_stream.h | 77 - lib/libc/include/generic-musl/stdio.h | 4 + lib/libc/include/generic-musl/symcat.h | 55 - lib/libc/include/generic-musl/sys/fanotify.h | 34 +- lib/libc/include/generic-musl/sys/inotify.h | 1 + lib/libc/include/generic-musl/sys/ioctl.h | 110 + .../include/generic-musl/sys/membarrier.h | 17 + lib/libc/include/generic-musl/sys/mman.h | 2 + lib/libc/include/generic-musl/sys/prctl.h | 9 + lib/libc/include/generic-musl/sys/shm.h | 2 + lib/libc/include/generic-musl/sys/socket.h | 3 + lib/libc/include/generic-musl/sys/types.h | 1 - lib/libc/include/generic-musl/tar.h | 4 - lib/libc/include/generic-musl/ucontext.h | 2 +- lib/libc/include/generic-musl/video/edid.h | 10 - lib/libc/include/generic-musl/video/sisfb.h | 210 - lib/libc/include/generic-musl/video/uvesafb.h | 61 - lib/libc/include/generic-musl/wchar.h | 4 + lib/libc/include/generic-musl/xen/evtchn.h | 104 - lib/libc/include/generic-musl/xen/gntalloc.h | 84 - lib/libc/include/generic-musl/xen/gntdev.h | 309 - lib/libc/include/generic-musl/xen/privcmd.h | 129 - lib/libc/include/i386-linux-musl/bfd.h | 8034 ----------------- lib/libc/include/i386-linux-musl/bfd_stdint.h | 47 - .../include/i386-linux-musl/bits/alltypes.h | 433 - .../include/i386-linux-musl/bits/endian.h | 1 - .../include/i386-linux-musl/bits/syscall.h | 771 -- lib/libc/include/mips-linux-musl/bfd.h | 8034 ----------------- lib/libc/include/mips-linux-musl/bfd_stdint.h | 47 - .../include/mips-linux-musl/bits/alltypes.h | 385 - lib/libc/include/mips-linux-musl/bits/ioctl.h | 100 +- .../include/mips-linux-musl/bits/syscall.h | 737 -- .../include/mips-linux-musl/bits/termios.h | 2 +- .../include/mips64-linux-musl/bfd_stdint.h | 47 - .../include/mips64-linux-musl/bits/alltypes.h | 391 - .../include/mips64-linux-musl/bits/ioctl.h | 100 +- .../include/mips64-linux-musl/bits/syscall.h | 657 -- .../include/mips64-linux-musl/bits/termios.h | 2 +- .../include/mips64el-linux-musl/bfd_stdint.h | 47 - .../mips64el-linux-musl/bits/alltypes.h | 391 - .../include/mips64el-linux-musl/bits/endian.h | 5 - .../include/mips64el-linux-musl/bits/errno.h | 134 - .../include/mips64el-linux-musl/bits/fcntl.h | 40 - .../include/mips64el-linux-musl/bits/fenv.h | 25 - .../include/mips64el-linux-musl/bits/float.h | 16 - .../include/mips64el-linux-musl/bits/hwcap.h | 3 - .../include/mips64el-linux-musl/bits/ioctl.h | 212 - .../include/mips64el-linux-musl/bits/ipc.h | 14 - .../include/mips64el-linux-musl/bits/limits.h | 7 - .../include/mips64el-linux-musl/bits/mman.h | 25 - .../include/mips64el-linux-musl/bits/poll.h | 2 - .../include/mips64el-linux-musl/bits/posix.h | 2 - .../include/mips64el-linux-musl/bits/ptrace.h | 9 - .../include/mips64el-linux-musl/bits/reg.h | 47 - .../mips64el-linux-musl/bits/resource.h | 5 - .../include/mips64el-linux-musl/bits/sem.h | 14 - .../include/mips64el-linux-musl/bits/setjmp.h | 1 - .../include/mips64el-linux-musl/bits/signal.h | 143 - .../include/mips64el-linux-musl/bits/socket.h | 69 - .../include/mips64el-linux-musl/bits/stat.h | 23 - .../include/mips64el-linux-musl/bits/statfs.h | 8 - .../mips64el-linux-musl/bits/syscall.h | 657 -- .../mips64el-linux-musl/bits/termios.h | 169 - .../include/mips64el-linux-musl/bits/user.h | 15 - lib/libc/include/mipsel-linux-musl/bfd.h | 8034 ----------------- .../include/mipsel-linux-musl/bfd_stdint.h | 47 - .../include/mipsel-linux-musl/bits/alltypes.h | 385 - .../include/mipsel-linux-musl/bits/endian.h | 5 - .../include/mipsel-linux-musl/bits/errno.h | 134 - .../include/mipsel-linux-musl/bits/fcntl.h | 40 - .../include/mipsel-linux-musl/bits/fenv.h | 25 - .../include/mipsel-linux-musl/bits/hwcap.h | 3 - .../include/mipsel-linux-musl/bits/ioctl.h | 212 - .../include/mipsel-linux-musl/bits/mman.h | 25 - lib/libc/include/mipsel-linux-musl/bits/msg.h | 24 - .../include/mipsel-linux-musl/bits/poll.h | 2 - .../include/mipsel-linux-musl/bits/ptrace.h | 9 - lib/libc/include/mipsel-linux-musl/bits/reg.h | 47 - .../include/mipsel-linux-musl/bits/resource.h | 5 - lib/libc/include/mipsel-linux-musl/bits/sem.h | 14 - .../include/mipsel-linux-musl/bits/setjmp.h | 1 - .../include/mipsel-linux-musl/bits/signal.h | 120 - .../include/mipsel-linux-musl/bits/socket.h | 53 - .../include/mipsel-linux-musl/bits/stat.h | 22 - .../include/mipsel-linux-musl/bits/statfs.h | 8 - .../include/mipsel-linux-musl/bits/stdint.h | 20 - .../include/mipsel-linux-musl/bits/syscall.h | 737 -- .../include/mipsel-linux-musl/bits/termios.h | 169 - .../include/mipsel-linux-musl/bits/user.h | 13 - lib/libc/include/powerpc-linux-musl/bfd.h | 8034 ----------------- .../include/powerpc-linux-musl/bfd_stdint.h | 47 - .../powerpc-linux-musl/bits/alltypes.h | 385 - .../include/powerpc-linux-musl/bits/ioctl.h | 99 +- .../include/powerpc-linux-musl/bits/ptrace.h | 2 + .../include/powerpc-linux-musl/bits/syscall.h | 751 -- .../include/powerpc-linux-musl/bits/termios.h | 2 +- .../include/powerpc64-linux-musl/bfd_stdint.h | 47 - .../powerpc64-linux-musl/bits/alltypes.h | 385 - .../include/powerpc64-linux-musl/bits/ioctl.h | 99 +- .../powerpc64-linux-musl/bits/ptrace.h | 2 + .../powerpc64-linux-musl/bits/signal.h | 17 +- .../powerpc64-linux-musl/bits/syscall.h | 733 -- .../powerpc64-linux-musl/bits/termios.h | 2 +- .../powerpc64le-linux-musl/bfd_stdint.h | 47 - .../powerpc64le-linux-musl/bits/alltypes.h | 385 - .../powerpc64le-linux-musl/bits/endian.h | 5 - .../powerpc64le-linux-musl/bits/errno.h | 134 - .../powerpc64le-linux-musl/bits/fenv.h | 31 - .../powerpc64le-linux-musl/bits/hwcap.h | 43 - .../powerpc64le-linux-musl/bits/ioctl.h | 217 - .../include/powerpc64le-linux-musl/bits/ipc.h | 14 - .../powerpc64le-linux-musl/bits/limits.h | 7 - .../powerpc64le-linux-musl/bits/mman.h | 14 - .../include/powerpc64le-linux-musl/bits/msg.h | 12 - .../powerpc64le-linux-musl/bits/posix.h | 2 - .../powerpc64le-linux-musl/bits/ptrace.h | 23 - .../include/powerpc64le-linux-musl/bits/reg.h | 3 - .../include/powerpc64le-linux-musl/bits/sem.h | 13 - .../powerpc64le-linux-musl/bits/setjmp.h | 1 - .../include/powerpc64le-linux-musl/bits/shm.h | 23 - .../powerpc64le-linux-musl/bits/signal.h | 107 - .../powerpc64le-linux-musl/bits/socket.h | 61 - .../powerpc64le-linux-musl/bits/stat.h | 16 - .../powerpc64le-linux-musl/bits/syscall.h | 733 -- .../powerpc64le-linux-musl/bits/termios.h | 171 - .../powerpc64le-linux-musl/bits/user.h | 25 - lib/libc/include/riscv32-linux-musl/bfd.h | 8034 ----------------- .../include/riscv32-linux-musl/bfd_stdint.h | 47 - .../riscv32-linux-musl/bits/alltypes.h | 385 - .../include/riscv32-linux-musl/bits/fenv.h | 18 - .../include/riscv32-linux-musl/bits/float.h | 16 - .../include/riscv32-linux-musl/bits/ipc.h | 14 - .../include/riscv32-linux-musl/bits/posix.h | 2 - .../include/riscv32-linux-musl/bits/reg.h | 8 - .../include/riscv32-linux-musl/bits/sem.h | 9 - .../include/riscv32-linux-musl/bits/setjmp.h | 1 - .../include/riscv32-linux-musl/bits/shm.h | 25 - .../include/riscv32-linux-musl/bits/signal.h | 113 - .../include/riscv32-linux-musl/bits/socket.h | 33 - .../include/riscv32-linux-musl/bits/stat.h | 18 - .../include/riscv32-linux-musl/bits/stdint.h | 20 - .../include/riscv32-linux-musl/bits/syscall.h | 555 -- .../include/riscv32-linux-musl/bits/user.h | 43 - lib/libc/include/riscv32-linux-musl/elf.h | 3228 ------- .../include/riscv32-linux-musl/netinet/tcp.h | 253 - .../include/riscv32-linux-musl/netinet/udp.h | 40 - lib/libc/include/riscv32-linux-musl/signal.h | 277 - .../include/riscv32-linux-musl/sys/signalfd.h | 45 - .../include/riscv32-linux-musl/sys/socket.h | 350 - .../include/riscv64-linux-musl/bfd_stdint.h | 47 - .../riscv64-linux-musl/bits/alltypes.h | 396 - .../include/riscv64-linux-musl/bits/endian.h | 5 - .../bits/fcntl.h | 12 +- .../include/riscv64-linux-musl/bits/mman.h | 1 - .../include/riscv64-linux-musl/bits/setjmp.h | 2 +- .../include/riscv64-linux-musl/bits/signal.h | 1 - .../include/riscv64-linux-musl/bits/socket.h | 14 - .../include/riscv64-linux-musl/bits/syscall.h | 555 -- lib/libc/include/riscv64-linux-musl/elf.h | 3228 ------- .../include/riscv64-linux-musl/netinet/tcp.h | 253 - .../include/riscv64-linux-musl/netinet/udp.h | 40 - lib/libc/include/riscv64-linux-musl/signal.h | 277 - .../include/riscv64-linux-musl/sys/signalfd.h | 45 - .../include/riscv64-linux-musl/sys/socket.h | 350 - .../include/s390x-linux-musl/bfd_stdint.h | 47 - .../include/s390x-linux-musl/bits/alltypes.h | 385 - .../include/s390x-linux-musl/bits/fcntl.h | 5 +- .../include/s390x-linux-musl/bits/socket.h | 29 +- .../include/s390x-linux-musl/bits/syscall.h | 657 -- .../wasm32-freestanding-musl/bits/alltypes.h | 385 - .../include/wasm32-freestanding-musl/errno.h | 24 - .../include/x86_64-linux-musl/bfd_stdint.h | 47 - .../include/x86_64-linux-musl/bits/alltypes.h | 398 - .../include/x86_64-linux-musl/bits/endian.h | 1 - .../include/x86_64-linux-musl/bits/syscall.h | 671 -- src/codegen.cpp | 35 +- tools/process_headers.zig | 362 +- 353 files changed, 1106 insertions(+), 140426 deletions(-) rename lib/libc/include/{aarch64-linux-musleabi => aarch64-linux-musl}/bits/endian.h (100%) rename lib/libc/include/{generic-musl => aarch64-linux-musl}/bits/fcntl.h (100%) rename lib/libc/include/{aarch64-linux-musleabi => aarch64-linux-musl}/bits/fenv.h (100%) rename lib/libc/include/{aarch64-linux-musleabi => aarch64-linux-musl}/bits/float.h (100%) rename lib/libc/include/{aarch64_be-linux-musl => aarch64-linux-musl}/bits/hwcap.h (84%) rename lib/libc/include/{aarch64-linux-musleabi => aarch64-linux-musl}/bits/ipc.h (100%) rename lib/libc/include/{aarch64-linux-musleabi => aarch64-linux-musl}/bits/limits.h (100%) rename lib/libc/include/{aarch64-linux-musleabi => aarch64-linux-musl}/bits/posix.h (100%) rename lib/libc/include/{aarch64-linux-musleabi => aarch64-linux-musl}/bits/reg.h (100%) rename lib/libc/include/{aarch64-linux-musleabi => aarch64-linux-musl}/bits/sem.h (100%) rename lib/libc/include/{aarch64-linux-musleabi => aarch64-linux-musl}/bits/setjmp.h (100%) rename lib/libc/include/{aarch64-linux-musleabi => aarch64-linux-musl}/bits/signal.h (100%) rename lib/libc/include/{aarch64-linux-musleabi => aarch64-linux-musl}/bits/socket.h (100%) rename lib/libc/include/{aarch64-linux-musleabi => aarch64-linux-musl}/bits/stat.h (100%) rename lib/libc/include/{aarch64-linux-musleabi => aarch64-linux-musl}/bits/user.h (100%) delete mode 100644 lib/libc/include/aarch64-linux-musleabi/bfd_stdint.h delete mode 100644 lib/libc/include/aarch64-linux-musleabi/bits/alltypes.h delete mode 100644 lib/libc/include/aarch64-linux-musleabi/bits/hwcap.h delete mode 100644 lib/libc/include/aarch64-linux-musleabi/bits/syscall.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bfd_stdint.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/alltypes.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/endian.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/fenv.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/float.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/ipc.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/limits.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/posix.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/reg.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/sem.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/setjmp.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/signal.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/socket.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/stat.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/syscall.h delete mode 100644 lib/libc/include/aarch64_be-linux-musl/bits/user.h rename lib/libc/include/{riscv32-linux-musl => arm-linux-musl}/bits/endian.h (83%) rename lib/libc/include/{arm-linux-musleabi => arm-linux-musl}/bits/fcntl.h (100%) rename lib/libc/include/{generic-musl => arm-linux-musl}/bits/fenv.h (100%) rename lib/libc/include/{arm-linux-musleabi => arm-linux-musl}/bits/hwcap.h (100%) rename lib/libc/include/{arm-linux-musleabi => arm-linux-musl}/bits/ioctl_fix.h (100%) rename lib/libc/include/{arm-linux-musleabi => arm-linux-musl}/bits/msg.h (100%) rename lib/libc/include/{arm-linux-musleabi => arm-linux-musl}/bits/ptrace.h (100%) rename lib/libc/include/{generic-musl => arm-linux-musl}/bits/setjmp.h (100%) rename lib/libc/include/{arm-linux-musleabi => arm-linux-musl}/bits/shm.h (100%) rename lib/libc/include/{generic-musl => arm-linux-musl}/bits/signal.h (100%) rename lib/libc/include/{arm-linux-musleabi => arm-linux-musl}/bits/stdint.h (100%) rename lib/libc/include/{generic-musl => arm-linux-musl}/bits/user.h (100%) delete mode 100644 lib/libc/include/arm-linux-musleabi/bfd.h delete mode 100644 lib/libc/include/arm-linux-musleabi/bfd_stdint.h delete mode 100644 lib/libc/include/arm-linux-musleabihf/bfd.h delete mode 100644 lib/libc/include/arm-linux-musleabihf/bfd_stdint.h delete mode 100644 lib/libc/include/arm-linux-musleabihf/bits/fcntl.h delete mode 100644 lib/libc/include/arm-linux-musleabihf/bits/hwcap.h delete mode 100644 lib/libc/include/arm-linux-musleabihf/bits/ioctl_fix.h delete mode 100644 lib/libc/include/arm-linux-musleabihf/bits/msg.h delete mode 100644 lib/libc/include/arm-linux-musleabihf/bits/ptrace.h delete mode 100644 lib/libc/include/arm-linux-musleabihf/bits/shm.h delete mode 100644 lib/libc/include/arm-linux-musleabihf/bits/stdint.h delete mode 100644 lib/libc/include/armeb-linux-musleabi/bfd.h delete mode 100644 lib/libc/include/armeb-linux-musleabi/bfd_stdint.h delete mode 100644 lib/libc/include/armeb-linux-musleabi/bits/fcntl.h delete mode 100644 lib/libc/include/armeb-linux-musleabi/bits/hwcap.h delete mode 100644 lib/libc/include/armeb-linux-musleabi/bits/ioctl_fix.h delete mode 100644 lib/libc/include/armeb-linux-musleabi/bits/msg.h delete mode 100644 lib/libc/include/armeb-linux-musleabi/bits/ptrace.h delete mode 100644 lib/libc/include/armeb-linux-musleabi/bits/shm.h delete mode 100644 lib/libc/include/armeb-linux-musleabi/bits/stdint.h delete mode 100644 lib/libc/include/armeb-linux-musleabihf/bfd.h delete mode 100644 lib/libc/include/armeb-linux-musleabihf/bfd_stdint.h delete mode 100644 lib/libc/include/armeb-linux-musleabihf/bits/fcntl.h delete mode 100644 lib/libc/include/armeb-linux-musleabihf/bits/hwcap.h delete mode 100644 lib/libc/include/armeb-linux-musleabihf/bits/ioctl_fix.h delete mode 100644 lib/libc/include/armeb-linux-musleabihf/bits/msg.h delete mode 100644 lib/libc/include/armeb-linux-musleabihf/bits/ptrace.h delete mode 100644 lib/libc/include/armeb-linux-musleabihf/bits/shm.h delete mode 100644 lib/libc/include/armeb-linux-musleabihf/bits/stdint.h delete mode 100644 lib/libc/include/generic-musl/ansidecl.h delete mode 100644 lib/libc/include/generic-musl/bfd.h delete mode 100644 lib/libc/include/generic-musl/bfdlink.h delete mode 100644 lib/libc/include/generic-musl/diagnostics.h delete mode 100644 lib/libc/include/generic-musl/dis-asm.h delete mode 100644 lib/libc/include/generic-musl/drm/amdgpu_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/armada_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/drm.h delete mode 100644 lib/libc/include/generic-musl/drm/drm_fourcc.h delete mode 100644 lib/libc/include/generic-musl/drm/drm_mode.h delete mode 100644 lib/libc/include/generic-musl/drm/drm_sarea.h delete mode 100644 lib/libc/include/generic-musl/drm/etnaviv_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/exynos_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/i810_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/i915_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/mga_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/msm_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/nouveau_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/omap_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/qxl_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/r128_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/radeon_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/savage_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/sis_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/tegra_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/v3d_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/vc4_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/vgem_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/via_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/virtgpu_drm.h delete mode 100644 lib/libc/include/generic-musl/drm/vmwgfx_drm.h delete mode 100644 lib/libc/include/generic-musl/misc/cxl.h delete mode 100644 lib/libc/include/generic-musl/misc/ocxl.h delete mode 100644 lib/libc/include/generic-musl/mtd/inftl-user.h delete mode 100644 lib/libc/include/generic-musl/mtd/mtd-abi.h delete mode 100644 lib/libc/include/generic-musl/mtd/mtd-user.h delete mode 100644 lib/libc/include/generic-musl/mtd/nftl-user.h delete mode 100644 lib/libc/include/generic-musl/mtd/ubi-user.h delete mode 100644 lib/libc/include/generic-musl/plugin-api.h delete mode 100644 lib/libc/include/generic-musl/rdma/bnxt_re-abi.h delete mode 100644 lib/libc/include/generic-musl/rdma/cxgb3-abi.h delete mode 100644 lib/libc/include/generic-musl/rdma/cxgb4-abi.h delete mode 100644 lib/libc/include/generic-musl/rdma/hfi/hfi1_ioctl.h delete mode 100644 lib/libc/include/generic-musl/rdma/hfi/hfi1_user.h delete mode 100644 lib/libc/include/generic-musl/rdma/hns-abi.h delete mode 100644 lib/libc/include/generic-musl/rdma/i40iw-abi.h delete mode 100644 lib/libc/include/generic-musl/rdma/ib_user_cm.h delete mode 100644 lib/libc/include/generic-musl/rdma/ib_user_ioctl_cmds.h delete mode 100644 lib/libc/include/generic-musl/rdma/ib_user_ioctl_verbs.h delete mode 100644 lib/libc/include/generic-musl/rdma/ib_user_mad.h delete mode 100644 lib/libc/include/generic-musl/rdma/ib_user_sa.h delete mode 100644 lib/libc/include/generic-musl/rdma/ib_user_verbs.h delete mode 100644 lib/libc/include/generic-musl/rdma/mlx4-abi.h delete mode 100644 lib/libc/include/generic-musl/rdma/mlx5-abi.h delete mode 100644 lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_cmds.h delete mode 100644 lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_verbs.h delete mode 100644 lib/libc/include/generic-musl/rdma/mthca-abi.h delete mode 100644 lib/libc/include/generic-musl/rdma/nes-abi.h delete mode 100644 lib/libc/include/generic-musl/rdma/ocrdma-abi.h delete mode 100644 lib/libc/include/generic-musl/rdma/qedr-abi.h delete mode 100644 lib/libc/include/generic-musl/rdma/rdma_netlink.h delete mode 100644 lib/libc/include/generic-musl/rdma/rdma_user_cm.h delete mode 100644 lib/libc/include/generic-musl/rdma/rdma_user_ioctl.h delete mode 100644 lib/libc/include/generic-musl/rdma/rdma_user_ioctl_cmds.h delete mode 100644 lib/libc/include/generic-musl/rdma/rdma_user_rxe.h delete mode 100644 lib/libc/include/generic-musl/rdma/vmw_pvrdma-abi.h delete mode 100644 lib/libc/include/generic-musl/scsi/cxlflash_ioctl.h delete mode 100644 lib/libc/include/generic-musl/scsi/fc/fc_els.h delete mode 100644 lib/libc/include/generic-musl/scsi/fc/fc_fs.h delete mode 100644 lib/libc/include/generic-musl/scsi/fc/fc_gs.h delete mode 100644 lib/libc/include/generic-musl/scsi/fc/fc_ns.h delete mode 100644 lib/libc/include/generic-musl/scsi/scsi_bsg_fc.h delete mode 100644 lib/libc/include/generic-musl/scsi/scsi_netlink.h delete mode 100644 lib/libc/include/generic-musl/scsi/scsi_netlink_fc.h delete mode 100644 lib/libc/include/generic-musl/sound/asequencer.h delete mode 100644 lib/libc/include/generic-musl/sound/asoc.h delete mode 100644 lib/libc/include/generic-musl/sound/asound.h delete mode 100644 lib/libc/include/generic-musl/sound/asound_fm.h delete mode 100644 lib/libc/include/generic-musl/sound/compress_offload.h delete mode 100644 lib/libc/include/generic-musl/sound/compress_params.h delete mode 100644 lib/libc/include/generic-musl/sound/emu10k1.h delete mode 100644 lib/libc/include/generic-musl/sound/firewire.h delete mode 100644 lib/libc/include/generic-musl/sound/hdsp.h delete mode 100644 lib/libc/include/generic-musl/sound/hdspm.h delete mode 100644 lib/libc/include/generic-musl/sound/sb16_csp.h delete mode 100644 lib/libc/include/generic-musl/sound/sfnt_info.h delete mode 100644 lib/libc/include/generic-musl/sound/skl-tplg-interface.h delete mode 100644 lib/libc/include/generic-musl/sound/snd_sst_tokens.h delete mode 100644 lib/libc/include/generic-musl/sound/tlv.h delete mode 100644 lib/libc/include/generic-musl/sound/usb_stream.h delete mode 100644 lib/libc/include/generic-musl/symcat.h create mode 100644 lib/libc/include/generic-musl/sys/membarrier.h delete mode 100644 lib/libc/include/generic-musl/video/edid.h delete mode 100644 lib/libc/include/generic-musl/video/sisfb.h delete mode 100644 lib/libc/include/generic-musl/video/uvesafb.h delete mode 100644 lib/libc/include/generic-musl/xen/evtchn.h delete mode 100644 lib/libc/include/generic-musl/xen/gntalloc.h delete mode 100644 lib/libc/include/generic-musl/xen/gntdev.h delete mode 100644 lib/libc/include/generic-musl/xen/privcmd.h delete mode 100644 lib/libc/include/i386-linux-musl/bfd.h delete mode 100644 lib/libc/include/i386-linux-musl/bfd_stdint.h delete mode 100644 lib/libc/include/i386-linux-musl/bits/alltypes.h delete mode 100644 lib/libc/include/i386-linux-musl/bits/endian.h delete mode 100644 lib/libc/include/i386-linux-musl/bits/syscall.h delete mode 100644 lib/libc/include/mips-linux-musl/bfd.h delete mode 100644 lib/libc/include/mips-linux-musl/bfd_stdint.h delete mode 100644 lib/libc/include/mips-linux-musl/bits/alltypes.h delete mode 100644 lib/libc/include/mips-linux-musl/bits/syscall.h delete mode 100644 lib/libc/include/mips64-linux-musl/bfd_stdint.h delete mode 100644 lib/libc/include/mips64-linux-musl/bits/alltypes.h delete mode 100644 lib/libc/include/mips64-linux-musl/bits/syscall.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bfd_stdint.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/alltypes.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/endian.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/errno.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/fcntl.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/fenv.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/float.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/hwcap.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/ioctl.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/ipc.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/limits.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/mman.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/poll.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/posix.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/ptrace.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/reg.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/resource.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/sem.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/setjmp.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/signal.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/socket.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/stat.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/statfs.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/syscall.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/termios.h delete mode 100644 lib/libc/include/mips64el-linux-musl/bits/user.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bfd.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bfd_stdint.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/alltypes.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/endian.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/errno.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/fcntl.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/fenv.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/hwcap.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/ioctl.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/mman.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/msg.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/poll.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/ptrace.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/reg.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/resource.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/sem.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/setjmp.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/signal.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/socket.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/stat.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/statfs.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/stdint.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/syscall.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/termios.h delete mode 100644 lib/libc/include/mipsel-linux-musl/bits/user.h delete mode 100644 lib/libc/include/powerpc-linux-musl/bfd.h delete mode 100644 lib/libc/include/powerpc-linux-musl/bfd_stdint.h delete mode 100644 lib/libc/include/powerpc-linux-musl/bits/alltypes.h delete mode 100644 lib/libc/include/powerpc-linux-musl/bits/syscall.h delete mode 100644 lib/libc/include/powerpc64-linux-musl/bfd_stdint.h delete mode 100644 lib/libc/include/powerpc64-linux-musl/bits/alltypes.h delete mode 100644 lib/libc/include/powerpc64-linux-musl/bits/syscall.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bfd_stdint.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/alltypes.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/endian.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/errno.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/fenv.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/hwcap.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/ioctl.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/ipc.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/limits.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/mman.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/msg.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/posix.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/ptrace.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/reg.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/sem.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/setjmp.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/shm.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/signal.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/socket.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/stat.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/syscall.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/termios.h delete mode 100644 lib/libc/include/powerpc64le-linux-musl/bits/user.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bfd.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bfd_stdint.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/alltypes.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/fenv.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/float.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/ipc.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/posix.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/reg.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/sem.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/setjmp.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/shm.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/signal.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/socket.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/stat.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/stdint.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/syscall.h delete mode 100644 lib/libc/include/riscv32-linux-musl/bits/user.h delete mode 100644 lib/libc/include/riscv32-linux-musl/elf.h delete mode 100644 lib/libc/include/riscv32-linux-musl/netinet/tcp.h delete mode 100644 lib/libc/include/riscv32-linux-musl/netinet/udp.h delete mode 100644 lib/libc/include/riscv32-linux-musl/signal.h delete mode 100644 lib/libc/include/riscv32-linux-musl/sys/signalfd.h delete mode 100644 lib/libc/include/riscv32-linux-musl/sys/socket.h delete mode 100644 lib/libc/include/riscv64-linux-musl/bfd_stdint.h delete mode 100644 lib/libc/include/riscv64-linux-musl/bits/alltypes.h delete mode 100644 lib/libc/include/riscv64-linux-musl/bits/endian.h rename lib/libc/include/{powerpc64le-linux-musl => riscv64-linux-musl}/bits/fcntl.h (83%) delete mode 100644 lib/libc/include/riscv64-linux-musl/bits/mman.h delete mode 100644 lib/libc/include/riscv64-linux-musl/bits/syscall.h delete mode 100644 lib/libc/include/riscv64-linux-musl/elf.h delete mode 100644 lib/libc/include/riscv64-linux-musl/netinet/tcp.h delete mode 100644 lib/libc/include/riscv64-linux-musl/netinet/udp.h delete mode 100644 lib/libc/include/riscv64-linux-musl/signal.h delete mode 100644 lib/libc/include/riscv64-linux-musl/sys/signalfd.h delete mode 100644 lib/libc/include/riscv64-linux-musl/sys/socket.h delete mode 100644 lib/libc/include/s390x-linux-musl/bfd_stdint.h delete mode 100644 lib/libc/include/s390x-linux-musl/bits/alltypes.h delete mode 100644 lib/libc/include/s390x-linux-musl/bits/syscall.h delete mode 100644 lib/libc/include/wasm32-freestanding-musl/bits/alltypes.h delete mode 100644 lib/libc/include/wasm32-freestanding-musl/errno.h delete mode 100644 lib/libc/include/x86_64-linux-musl/bfd_stdint.h delete mode 100644 lib/libc/include/x86_64-linux-musl/bits/alltypes.h delete mode 100644 lib/libc/include/x86_64-linux-musl/bits/endian.h delete mode 100644 lib/libc/include/x86_64-linux-musl/bits/syscall.h diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/endian.h b/lib/libc/include/aarch64-linux-musl/bits/endian.h similarity index 100% rename from lib/libc/include/aarch64-linux-musleabi/bits/endian.h rename to lib/libc/include/aarch64-linux-musl/bits/endian.h diff --git a/lib/libc/include/generic-musl/bits/fcntl.h b/lib/libc/include/aarch64-linux-musl/bits/fcntl.h similarity index 100% rename from lib/libc/include/generic-musl/bits/fcntl.h rename to lib/libc/include/aarch64-linux-musl/bits/fcntl.h diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/fenv.h b/lib/libc/include/aarch64-linux-musl/bits/fenv.h similarity index 100% rename from lib/libc/include/aarch64-linux-musleabi/bits/fenv.h rename to lib/libc/include/aarch64-linux-musl/bits/fenv.h diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/float.h b/lib/libc/include/aarch64-linux-musl/bits/float.h similarity index 100% rename from lib/libc/include/aarch64-linux-musleabi/bits/float.h rename to lib/libc/include/aarch64-linux-musl/bits/float.h diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/hwcap.h b/lib/libc/include/aarch64-linux-musl/bits/hwcap.h similarity index 84% rename from lib/libc/include/aarch64_be-linux-musl/bits/hwcap.h rename to lib/libc/include/aarch64-linux-musl/bits/hwcap.h index be613dab59..3f1b9de3b7 100644 --- a/lib/libc/include/aarch64_be-linux-musl/bits/hwcap.h +++ b/lib/libc/include/aarch64-linux-musl/bits/hwcap.h @@ -25,4 +25,8 @@ #define HWCAP_DIT (1 << 24) #define HWCAP_USCAT (1 << 25) #define HWCAP_ILRCPC (1 << 26) -#define HWCAP_FLAGM (1 << 27) \ No newline at end of file +#define HWCAP_FLAGM (1 << 27) +#define HWCAP_SSBS (1 << 28) +#define HWCAP_SB (1 << 29) +#define HWCAP_PACA (1 << 30) +#define HWCAP_PACG (1UL << 31) \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/ipc.h b/lib/libc/include/aarch64-linux-musl/bits/ipc.h similarity index 100% rename from lib/libc/include/aarch64-linux-musleabi/bits/ipc.h rename to lib/libc/include/aarch64-linux-musl/bits/ipc.h diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/limits.h b/lib/libc/include/aarch64-linux-musl/bits/limits.h similarity index 100% rename from lib/libc/include/aarch64-linux-musleabi/bits/limits.h rename to lib/libc/include/aarch64-linux-musl/bits/limits.h diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/posix.h b/lib/libc/include/aarch64-linux-musl/bits/posix.h similarity index 100% rename from lib/libc/include/aarch64-linux-musleabi/bits/posix.h rename to lib/libc/include/aarch64-linux-musl/bits/posix.h diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/reg.h b/lib/libc/include/aarch64-linux-musl/bits/reg.h similarity index 100% rename from lib/libc/include/aarch64-linux-musleabi/bits/reg.h rename to lib/libc/include/aarch64-linux-musl/bits/reg.h diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/sem.h b/lib/libc/include/aarch64-linux-musl/bits/sem.h similarity index 100% rename from lib/libc/include/aarch64-linux-musleabi/bits/sem.h rename to lib/libc/include/aarch64-linux-musl/bits/sem.h diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/setjmp.h b/lib/libc/include/aarch64-linux-musl/bits/setjmp.h similarity index 100% rename from lib/libc/include/aarch64-linux-musleabi/bits/setjmp.h rename to lib/libc/include/aarch64-linux-musl/bits/setjmp.h diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/signal.h b/lib/libc/include/aarch64-linux-musl/bits/signal.h similarity index 100% rename from lib/libc/include/aarch64-linux-musleabi/bits/signal.h rename to lib/libc/include/aarch64-linux-musl/bits/signal.h diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/socket.h b/lib/libc/include/aarch64-linux-musl/bits/socket.h similarity index 100% rename from lib/libc/include/aarch64-linux-musleabi/bits/socket.h rename to lib/libc/include/aarch64-linux-musl/bits/socket.h diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/stat.h b/lib/libc/include/aarch64-linux-musl/bits/stat.h similarity index 100% rename from lib/libc/include/aarch64-linux-musleabi/bits/stat.h rename to lib/libc/include/aarch64-linux-musl/bits/stat.h diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/user.h b/lib/libc/include/aarch64-linux-musl/bits/user.h similarity index 100% rename from lib/libc/include/aarch64-linux-musleabi/bits/user.h rename to lib/libc/include/aarch64-linux-musl/bits/user.h diff --git a/lib/libc/include/aarch64-linux-musleabi/bfd_stdint.h b/lib/libc/include/aarch64-linux-musleabi/bfd_stdint.h deleted file mode 100644 index 65de6d24a2..0000000000 --- a/lib/libc/include/aarch64-linux-musleabi/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for aarch64-linux-musleabi-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/alltypes.h b/lib/libc/include/aarch64-linux-musleabi/bits/alltypes.h deleted file mode 100644 index d4e904acb7..0000000000 --- a/lib/libc/include/aarch64-linux-musleabi/bits/alltypes.h +++ /dev/null @@ -1,401 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef unsigned wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef int blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned int nlink_t; -#define __DEFINED_nlink_t -#endif - - -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/hwcap.h b/lib/libc/include/aarch64-linux-musleabi/bits/hwcap.h deleted file mode 100644 index be613dab59..0000000000 --- a/lib/libc/include/aarch64-linux-musleabi/bits/hwcap.h +++ /dev/null @@ -1,28 +0,0 @@ -#define HWCAP_FP (1 << 0) -#define HWCAP_ASIMD (1 << 1) -#define HWCAP_EVTSTRM (1 << 2) -#define HWCAP_AES (1 << 3) -#define HWCAP_PMULL (1 << 4) -#define HWCAP_SHA1 (1 << 5) -#define HWCAP_SHA2 (1 << 6) -#define HWCAP_CRC32 (1 << 7) -#define HWCAP_ATOMICS (1 << 8) -#define HWCAP_FPHP (1 << 9) -#define HWCAP_ASIMDHP (1 << 10) -#define HWCAP_CPUID (1 << 11) -#define HWCAP_ASIMDRDM (1 << 12) -#define HWCAP_JSCVT (1 << 13) -#define HWCAP_FCMA (1 << 14) -#define HWCAP_LRCPC (1 << 15) -#define HWCAP_DCPOP (1 << 16) -#define HWCAP_SHA3 (1 << 17) -#define HWCAP_SM3 (1 << 18) -#define HWCAP_SM4 (1 << 19) -#define HWCAP_ASIMDDP (1 << 20) -#define HWCAP_SHA512 (1 << 21) -#define HWCAP_SVE (1 << 22) -#define HWCAP_ASIMDFHM (1 << 23) -#define HWCAP_DIT (1 << 24) -#define HWCAP_USCAT (1 << 25) -#define HWCAP_ILRCPC (1 << 26) -#define HWCAP_FLAGM (1 << 27) \ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-musleabi/bits/syscall.h b/lib/libc/include/aarch64-linux-musleabi/bits/syscall.h deleted file mode 100644 index 917239ba98..0000000000 --- a/lib/libc/include/aarch64-linux-musleabi/bits/syscall.h +++ /dev/null @@ -1,555 +0,0 @@ -#define __NR_io_setup 0 -#define __NR_io_destroy 1 -#define __NR_io_submit 2 -#define __NR_io_cancel 3 -#define __NR_io_getevents 4 -#define __NR_setxattr 5 -#define __NR_lsetxattr 6 -#define __NR_fsetxattr 7 -#define __NR_getxattr 8 -#define __NR_lgetxattr 9 -#define __NR_fgetxattr 10 -#define __NR_listxattr 11 -#define __NR_llistxattr 12 -#define __NR_flistxattr 13 -#define __NR_removexattr 14 -#define __NR_lremovexattr 15 -#define __NR_fremovexattr 16 -#define __NR_getcwd 17 -#define __NR_lookup_dcookie 18 -#define __NR_eventfd2 19 -#define __NR_epoll_create1 20 -#define __NR_epoll_ctl 21 -#define __NR_epoll_pwait 22 -#define __NR_dup 23 -#define __NR_dup3 24 -#define __NR_fcntl 25 -#define __NR_inotify_init1 26 -#define __NR_inotify_add_watch 27 -#define __NR_inotify_rm_watch 28 -#define __NR_ioctl 29 -#define __NR_ioprio_set 30 -#define __NR_ioprio_get 31 -#define __NR_flock 32 -#define __NR_mknodat 33 -#define __NR_mkdirat 34 -#define __NR_unlinkat 35 -#define __NR_symlinkat 36 -#define __NR_linkat 37 -#define __NR_renameat 38 -#define __NR_umount2 39 -#define __NR_mount 40 -#define __NR_pivot_root 41 -#define __NR_nfsservctl 42 -#define __NR_statfs 43 -#define __NR_fstatfs 44 -#define __NR_truncate 45 -#define __NR_ftruncate 46 -#define __NR_fallocate 47 -#define __NR_faccessat 48 -#define __NR_chdir 49 -#define __NR_fchdir 50 -#define __NR_chroot 51 -#define __NR_fchmod 52 -#define __NR_fchmodat 53 -#define __NR_fchownat 54 -#define __NR_fchown 55 -#define __NR_openat 56 -#define __NR_close 57 -#define __NR_vhangup 58 -#define __NR_pipe2 59 -#define __NR_quotactl 60 -#define __NR_getdents64 61 -#define __NR_lseek 62 -#define __NR_read 63 -#define __NR_write 64 -#define __NR_readv 65 -#define __NR_writev 66 -#define __NR_pread64 67 -#define __NR_pwrite64 68 -#define __NR_preadv 69 -#define __NR_pwritev 70 -#define __NR_sendfile 71 -#define __NR_pselect6 72 -#define __NR_ppoll 73 -#define __NR_signalfd4 74 -#define __NR_vmsplice 75 -#define __NR_splice 76 -#define __NR_tee 77 -#define __NR_readlinkat 78 -#define __NR_newfstatat 79 -#define __NR_fstat 80 -#define __NR_sync 81 -#define __NR_fsync 82 -#define __NR_fdatasync 83 -#define __NR_sync_file_range 84 -#define __NR_timerfd_create 85 -#define __NR_timerfd_settime 86 -#define __NR_timerfd_gettime 87 -#define __NR_utimensat 88 -#define __NR_acct 89 -#define __NR_capget 90 -#define __NR_capset 91 -#define __NR_personality 92 -#define __NR_exit 93 -#define __NR_exit_group 94 -#define __NR_waitid 95 -#define __NR_set_tid_address 96 -#define __NR_unshare 97 -#define __NR_futex 98 -#define __NR_set_robust_list 99 -#define __NR_get_robust_list 100 -#define __NR_nanosleep 101 -#define __NR_getitimer 102 -#define __NR_setitimer 103 -#define __NR_kexec_load 104 -#define __NR_init_module 105 -#define __NR_delete_module 106 -#define __NR_timer_create 107 -#define __NR_timer_gettime 108 -#define __NR_timer_getoverrun 109 -#define __NR_timer_settime 110 -#define __NR_timer_delete 111 -#define __NR_clock_settime 112 -#define __NR_clock_gettime 113 -#define __NR_clock_getres 114 -#define __NR_clock_nanosleep 115 -#define __NR_syslog 116 -#define __NR_ptrace 117 -#define __NR_sched_setparam 118 -#define __NR_sched_setscheduler 119 -#define __NR_sched_getscheduler 120 -#define __NR_sched_getparam 121 -#define __NR_sched_setaffinity 122 -#define __NR_sched_getaffinity 123 -#define __NR_sched_yield 124 -#define __NR_sched_get_priority_max 125 -#define __NR_sched_get_priority_min 126 -#define __NR_sched_rr_get_interval 127 -#define __NR_restart_syscall 128 -#define __NR_kill 129 -#define __NR_tkill 130 -#define __NR_tgkill 131 -#define __NR_sigaltstack 132 -#define __NR_rt_sigsuspend 133 -#define __NR_rt_sigaction 134 -#define __NR_rt_sigprocmask 135 -#define __NR_rt_sigpending 136 -#define __NR_rt_sigtimedwait 137 -#define __NR_rt_sigqueueinfo 138 -#define __NR_rt_sigreturn 139 -#define __NR_setpriority 140 -#define __NR_getpriority 141 -#define __NR_reboot 142 -#define __NR_setregid 143 -#define __NR_setgid 144 -#define __NR_setreuid 145 -#define __NR_setuid 146 -#define __NR_setresuid 147 -#define __NR_getresuid 148 -#define __NR_setresgid 149 -#define __NR_getresgid 150 -#define __NR_setfsuid 151 -#define __NR_setfsgid 152 -#define __NR_times 153 -#define __NR_setpgid 154 -#define __NR_getpgid 155 -#define __NR_getsid 156 -#define __NR_setsid 157 -#define __NR_getgroups 158 -#define __NR_setgroups 159 -#define __NR_uname 160 -#define __NR_sethostname 161 -#define __NR_setdomainname 162 -#define __NR_getrlimit 163 -#define __NR_setrlimit 164 -#define __NR_getrusage 165 -#define __NR_umask 166 -#define __NR_prctl 167 -#define __NR_getcpu 168 -#define __NR_gettimeofday 169 -#define __NR_settimeofday 170 -#define __NR_adjtimex 171 -#define __NR_getpid 172 -#define __NR_getppid 173 -#define __NR_getuid 174 -#define __NR_geteuid 175 -#define __NR_getgid 176 -#define __NR_getegid 177 -#define __NR_gettid 178 -#define __NR_sysinfo 179 -#define __NR_mq_open 180 -#define __NR_mq_unlink 181 -#define __NR_mq_timedsend 182 -#define __NR_mq_timedreceive 183 -#define __NR_mq_notify 184 -#define __NR_mq_getsetattr 185 -#define __NR_msgget 186 -#define __NR_msgctl 187 -#define __NR_msgrcv 188 -#define __NR_msgsnd 189 -#define __NR_semget 190 -#define __NR_semctl 191 -#define __NR_semtimedop 192 -#define __NR_semop 193 -#define __NR_shmget 194 -#define __NR_shmctl 195 -#define __NR_shmat 196 -#define __NR_shmdt 197 -#define __NR_socket 198 -#define __NR_socketpair 199 -#define __NR_bind 200 -#define __NR_listen 201 -#define __NR_accept 202 -#define __NR_connect 203 -#define __NR_getsockname 204 -#define __NR_getpeername 205 -#define __NR_sendto 206 -#define __NR_recvfrom 207 -#define __NR_setsockopt 208 -#define __NR_getsockopt 209 -#define __NR_shutdown 210 -#define __NR_sendmsg 211 -#define __NR_recvmsg 212 -#define __NR_readahead 213 -#define __NR_brk 214 -#define __NR_munmap 215 -#define __NR_mremap 216 -#define __NR_add_key 217 -#define __NR_request_key 218 -#define __NR_keyctl 219 -#define __NR_clone 220 -#define __NR_execve 221 -#define __NR_mmap 222 -#define __NR_fadvise64 223 -#define __NR_swapon 224 -#define __NR_swapoff 225 -#define __NR_mprotect 226 -#define __NR_msync 227 -#define __NR_mlock 228 -#define __NR_munlock 229 -#define __NR_mlockall 230 -#define __NR_munlockall 231 -#define __NR_mincore 232 -#define __NR_madvise 233 -#define __NR_remap_file_pages 234 -#define __NR_mbind 235 -#define __NR_get_mempolicy 236 -#define __NR_set_mempolicy 237 -#define __NR_migrate_pages 238 -#define __NR_move_pages 239 -#define __NR_rt_tgsigqueueinfo 240 -#define __NR_perf_event_open 241 -#define __NR_accept4 242 -#define __NR_recvmmsg 243 -#define __NR_wait4 260 -#define __NR_prlimit64 261 -#define __NR_fanotify_init 262 -#define __NR_fanotify_mark 263 -#define __NR_name_to_handle_at 264 -#define __NR_open_by_handle_at 265 -#define __NR_clock_adjtime 266 -#define __NR_syncfs 267 -#define __NR_setns 268 -#define __NR_sendmmsg 269 -#define __NR_process_vm_readv 270 -#define __NR_process_vm_writev 271 -#define __NR_kcmp 272 -#define __NR_finit_module 273 -#define __NR_sched_setattr 274 -#define __NR_sched_getattr 275 -#define __NR_renameat2 276 -#define __NR_seccomp 277 -#define __NR_getrandom 278 -#define __NR_memfd_create 279 -#define __NR_bpf 280 -#define __NR_execveat 281 -#define __NR_userfaultfd 282 -#define __NR_membarrier 283 -#define __NR_mlock2 284 -#define __NR_copy_file_range 285 -#define __NR_preadv2 286 -#define __NR_pwritev2 287 -#define __NR_pkey_mprotect 288 -#define __NR_pkey_alloc 289 -#define __NR_pkey_free 290 -#define __NR_statx 291 -#define __NR_io_pgetevents 292 - -#define SYS_io_setup 0 -#define SYS_io_destroy 1 -#define SYS_io_submit 2 -#define SYS_io_cancel 3 -#define SYS_io_getevents 4 -#define SYS_setxattr 5 -#define SYS_lsetxattr 6 -#define SYS_fsetxattr 7 -#define SYS_getxattr 8 -#define SYS_lgetxattr 9 -#define SYS_fgetxattr 10 -#define SYS_listxattr 11 -#define SYS_llistxattr 12 -#define SYS_flistxattr 13 -#define SYS_removexattr 14 -#define SYS_lremovexattr 15 -#define SYS_fremovexattr 16 -#define SYS_getcwd 17 -#define SYS_lookup_dcookie 18 -#define SYS_eventfd2 19 -#define SYS_epoll_create1 20 -#define SYS_epoll_ctl 21 -#define SYS_epoll_pwait 22 -#define SYS_dup 23 -#define SYS_dup3 24 -#define SYS_fcntl 25 -#define SYS_inotify_init1 26 -#define SYS_inotify_add_watch 27 -#define SYS_inotify_rm_watch 28 -#define SYS_ioctl 29 -#define SYS_ioprio_set 30 -#define SYS_ioprio_get 31 -#define SYS_flock 32 -#define SYS_mknodat 33 -#define SYS_mkdirat 34 -#define SYS_unlinkat 35 -#define SYS_symlinkat 36 -#define SYS_linkat 37 -#define SYS_renameat 38 -#define SYS_umount2 39 -#define SYS_mount 40 -#define SYS_pivot_root 41 -#define SYS_nfsservctl 42 -#define SYS_statfs 43 -#define SYS_fstatfs 44 -#define SYS_truncate 45 -#define SYS_ftruncate 46 -#define SYS_fallocate 47 -#define SYS_faccessat 48 -#define SYS_chdir 49 -#define SYS_fchdir 50 -#define SYS_chroot 51 -#define SYS_fchmod 52 -#define SYS_fchmodat 53 -#define SYS_fchownat 54 -#define SYS_fchown 55 -#define SYS_openat 56 -#define SYS_close 57 -#define SYS_vhangup 58 -#define SYS_pipe2 59 -#define SYS_quotactl 60 -#define SYS_getdents64 61 -#define SYS_lseek 62 -#define SYS_read 63 -#define SYS_write 64 -#define SYS_readv 65 -#define SYS_writev 66 -#define SYS_pread64 67 -#define SYS_pwrite64 68 -#define SYS_preadv 69 -#define SYS_pwritev 70 -#define SYS_sendfile 71 -#define SYS_pselect6 72 -#define SYS_ppoll 73 -#define SYS_signalfd4 74 -#define SYS_vmsplice 75 -#define SYS_splice 76 -#define SYS_tee 77 -#define SYS_readlinkat 78 -#define SYS_newfstatat 79 -#define SYS_fstat 80 -#define SYS_sync 81 -#define SYS_fsync 82 -#define SYS_fdatasync 83 -#define SYS_sync_file_range 84 -#define SYS_timerfd_create 85 -#define SYS_timerfd_settime 86 -#define SYS_timerfd_gettime 87 -#define SYS_utimensat 88 -#define SYS_acct 89 -#define SYS_capget 90 -#define SYS_capset 91 -#define SYS_personality 92 -#define SYS_exit 93 -#define SYS_exit_group 94 -#define SYS_waitid 95 -#define SYS_set_tid_address 96 -#define SYS_unshare 97 -#define SYS_futex 98 -#define SYS_set_robust_list 99 -#define SYS_get_robust_list 100 -#define SYS_nanosleep 101 -#define SYS_getitimer 102 -#define SYS_setitimer 103 -#define SYS_kexec_load 104 -#define SYS_init_module 105 -#define SYS_delete_module 106 -#define SYS_timer_create 107 -#define SYS_timer_gettime 108 -#define SYS_timer_getoverrun 109 -#define SYS_timer_settime 110 -#define SYS_timer_delete 111 -#define SYS_clock_settime 112 -#define SYS_clock_gettime 113 -#define SYS_clock_getres 114 -#define SYS_clock_nanosleep 115 -#define SYS_syslog 116 -#define SYS_ptrace 117 -#define SYS_sched_setparam 118 -#define SYS_sched_setscheduler 119 -#define SYS_sched_getscheduler 120 -#define SYS_sched_getparam 121 -#define SYS_sched_setaffinity 122 -#define SYS_sched_getaffinity 123 -#define SYS_sched_yield 124 -#define SYS_sched_get_priority_max 125 -#define SYS_sched_get_priority_min 126 -#define SYS_sched_rr_get_interval 127 -#define SYS_restart_syscall 128 -#define SYS_kill 129 -#define SYS_tkill 130 -#define SYS_tgkill 131 -#define SYS_sigaltstack 132 -#define SYS_rt_sigsuspend 133 -#define SYS_rt_sigaction 134 -#define SYS_rt_sigprocmask 135 -#define SYS_rt_sigpending 136 -#define SYS_rt_sigtimedwait 137 -#define SYS_rt_sigqueueinfo 138 -#define SYS_rt_sigreturn 139 -#define SYS_setpriority 140 -#define SYS_getpriority 141 -#define SYS_reboot 142 -#define SYS_setregid 143 -#define SYS_setgid 144 -#define SYS_setreuid 145 -#define SYS_setuid 146 -#define SYS_setresuid 147 -#define SYS_getresuid 148 -#define SYS_setresgid 149 -#define SYS_getresgid 150 -#define SYS_setfsuid 151 -#define SYS_setfsgid 152 -#define SYS_times 153 -#define SYS_setpgid 154 -#define SYS_getpgid 155 -#define SYS_getsid 156 -#define SYS_setsid 157 -#define SYS_getgroups 158 -#define SYS_setgroups 159 -#define SYS_uname 160 -#define SYS_sethostname 161 -#define SYS_setdomainname 162 -#define SYS_getrlimit 163 -#define SYS_setrlimit 164 -#define SYS_getrusage 165 -#define SYS_umask 166 -#define SYS_prctl 167 -#define SYS_getcpu 168 -#define SYS_gettimeofday 169 -#define SYS_settimeofday 170 -#define SYS_adjtimex 171 -#define SYS_getpid 172 -#define SYS_getppid 173 -#define SYS_getuid 174 -#define SYS_geteuid 175 -#define SYS_getgid 176 -#define SYS_getegid 177 -#define SYS_gettid 178 -#define SYS_sysinfo 179 -#define SYS_mq_open 180 -#define SYS_mq_unlink 181 -#define SYS_mq_timedsend 182 -#define SYS_mq_timedreceive 183 -#define SYS_mq_notify 184 -#define SYS_mq_getsetattr 185 -#define SYS_msgget 186 -#define SYS_msgctl 187 -#define SYS_msgrcv 188 -#define SYS_msgsnd 189 -#define SYS_semget 190 -#define SYS_semctl 191 -#define SYS_semtimedop 192 -#define SYS_semop 193 -#define SYS_shmget 194 -#define SYS_shmctl 195 -#define SYS_shmat 196 -#define SYS_shmdt 197 -#define SYS_socket 198 -#define SYS_socketpair 199 -#define SYS_bind 200 -#define SYS_listen 201 -#define SYS_accept 202 -#define SYS_connect 203 -#define SYS_getsockname 204 -#define SYS_getpeername 205 -#define SYS_sendto 206 -#define SYS_recvfrom 207 -#define SYS_setsockopt 208 -#define SYS_getsockopt 209 -#define SYS_shutdown 210 -#define SYS_sendmsg 211 -#define SYS_recvmsg 212 -#define SYS_readahead 213 -#define SYS_brk 214 -#define SYS_munmap 215 -#define SYS_mremap 216 -#define SYS_add_key 217 -#define SYS_request_key 218 -#define SYS_keyctl 219 -#define SYS_clone 220 -#define SYS_execve 221 -#define SYS_mmap 222 -#define SYS_fadvise64 223 -#define SYS_swapon 224 -#define SYS_swapoff 225 -#define SYS_mprotect 226 -#define SYS_msync 227 -#define SYS_mlock 228 -#define SYS_munlock 229 -#define SYS_mlockall 230 -#define SYS_munlockall 231 -#define SYS_mincore 232 -#define SYS_madvise 233 -#define SYS_remap_file_pages 234 -#define SYS_mbind 235 -#define SYS_get_mempolicy 236 -#define SYS_set_mempolicy 237 -#define SYS_migrate_pages 238 -#define SYS_move_pages 239 -#define SYS_rt_tgsigqueueinfo 240 -#define SYS_perf_event_open 241 -#define SYS_accept4 242 -#define SYS_recvmmsg 243 -#define SYS_wait4 260 -#define SYS_prlimit64 261 -#define SYS_fanotify_init 262 -#define SYS_fanotify_mark 263 -#define SYS_name_to_handle_at 264 -#define SYS_open_by_handle_at 265 -#define SYS_clock_adjtime 266 -#define SYS_syncfs 267 -#define SYS_setns 268 -#define SYS_sendmmsg 269 -#define SYS_process_vm_readv 270 -#define SYS_process_vm_writev 271 -#define SYS_kcmp 272 -#define SYS_finit_module 273 -#define SYS_sched_setattr 274 -#define SYS_sched_getattr 275 -#define SYS_renameat2 276 -#define SYS_seccomp 277 -#define SYS_getrandom 278 -#define SYS_memfd_create 279 -#define SYS_bpf 280 -#define SYS_execveat 281 -#define SYS_userfaultfd 282 -#define SYS_membarrier 283 -#define SYS_mlock2 284 -#define SYS_copy_file_range 285 -#define SYS_preadv2 286 -#define SYS_pwritev2 287 -#define SYS_pkey_mprotect 288 -#define SYS_pkey_alloc 289 -#define SYS_pkey_free 290 -#define SYS_statx 291 -#define SYS_io_pgetevents 292 \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bfd_stdint.h b/lib/libc/include/aarch64_be-linux-musl/bfd_stdint.h deleted file mode 100644 index b90c512fee..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for aarch64_be-linux-musl-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/alltypes.h b/lib/libc/include/aarch64_be-linux-musl/bits/alltypes.h deleted file mode 100644 index d4e904acb7..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/alltypes.h +++ /dev/null @@ -1,401 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef unsigned wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef int blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned int nlink_t; -#define __DEFINED_nlink_t -#endif - - -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/endian.h b/lib/libc/include/aarch64_be-linux-musl/bits/endian.h deleted file mode 100644 index 3ab24cc932..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/endian.h +++ /dev/null @@ -1,5 +0,0 @@ -#if __AARCH64EB__ -#define __BYTE_ORDER __BIG_ENDIAN -#else -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/fenv.h b/lib/libc/include/aarch64_be-linux-musl/bits/fenv.h deleted file mode 100644 index f2de6e6a17..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/fenv.h +++ /dev/null @@ -1,19 +0,0 @@ -#define FE_INVALID 1 -#define FE_DIVBYZERO 2 -#define FE_OVERFLOW 4 -#define FE_UNDERFLOW 8 -#define FE_INEXACT 16 -#define FE_ALL_EXCEPT 31 -#define FE_TONEAREST 0 -#define FE_DOWNWARD 0x800000 -#define FE_UPWARD 0x400000 -#define FE_TOWARDZERO 0xc00000 - -typedef unsigned int fexcept_t; - -typedef struct { - unsigned int __fpcr; - unsigned int __fpsr; -} fenv_t; - -#define FE_DFL_ENV ((const fenv_t *) -1) \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/float.h b/lib/libc/include/aarch64_be-linux-musl/bits/float.h deleted file mode 100644 index f8cb54bb3f..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/float.h +++ /dev/null @@ -1,16 +0,0 @@ -#define FLT_EVAL_METHOD 0 - -#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L -#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L -#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L -#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L - -#define LDBL_MANT_DIG 113 -#define LDBL_MIN_EXP (-16381) -#define LDBL_MAX_EXP 16384 - -#define LDBL_DIG 33 -#define LDBL_MIN_10_EXP (-4931) -#define LDBL_MAX_10_EXP 4932 - -#define DECIMAL_DIG 36 \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/ipc.h b/lib/libc/include/aarch64_be-linux-musl/bits/ipc.h deleted file mode 100644 index 37561db60d..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/ipc.h +++ /dev/null @@ -1,14 +0,0 @@ -struct ipc_perm { - key_t __ipc_perm_key; - uid_t uid; - gid_t gid; - uid_t cuid; - gid_t cgid; - mode_t mode; - unsigned short __ipc_perm_seq; - - unsigned long __pad1; - unsigned long __pad2; -}; - -#define IPC_64 0 \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/limits.h b/lib/libc/include/aarch64_be-linux-musl/bits/limits.h deleted file mode 100644 index 1be0deba7a..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/limits.h +++ /dev/null @@ -1,7 +0,0 @@ -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define LONG_BIT 64 -#endif - -#define LONG_MAX 0x7fffffffffffffffL -#define LLONG_MAX 0x7fffffffffffffffLL \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/posix.h b/lib/libc/include/aarch64_be-linux-musl/bits/posix.h deleted file mode 100644 index 9fcc205cc1..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/posix.h +++ /dev/null @@ -1,2 +0,0 @@ -#define _POSIX_V6_LP64_OFF64 1 -#define _POSIX_V7_LP64_OFF64 1 \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/reg.h b/lib/libc/include/aarch64_be-linux-musl/bits/reg.h deleted file mode 100644 index 0afb6bd06c..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/reg.h +++ /dev/null @@ -1,2 +0,0 @@ -#undef __WORDSIZE -#define __WORDSIZE 64 \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/sem.h b/lib/libc/include/aarch64_be-linux-musl/bits/sem.h deleted file mode 100644 index bf8e59f52e..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/sem.h +++ /dev/null @@ -1,14 +0,0 @@ -struct semid_ds { - struct ipc_perm sem_perm; - time_t sem_otime; - time_t sem_ctime; -#if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned short sem_nsems; - char __sem_nsems_pad[sizeof(time_t)-sizeof(short)]; -#else - char __sem_nsems_pad[sizeof(time_t)-sizeof(short)]; - unsigned short sem_nsems; -#endif - time_t __unused3; - time_t __unused4; -}; \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/setjmp.h b/lib/libc/include/aarch64_be-linux-musl/bits/setjmp.h deleted file mode 100644 index d97fd2d084..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/setjmp.h +++ /dev/null @@ -1 +0,0 @@ -typedef unsigned long __jmp_buf[22]; \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/signal.h b/lib/libc/include/aarch64_be-linux-musl/bits/signal.h deleted file mode 100644 index cd13558bad..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/signal.h +++ /dev/null @@ -1,153 +0,0 @@ -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) - -#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define MINSIGSTKSZ 6144 -#define SIGSTKSZ 12288 -#endif - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -typedef unsigned long greg_t; -typedef unsigned long gregset_t[34]; - -typedef struct { - long double vregs[32]; - unsigned int fpsr; - unsigned int fpcr; -} fpregset_t; -typedef struct sigcontext { - unsigned long fault_address; - unsigned long regs[31]; - unsigned long sp, pc, pstate; - long double __reserved[256]; -} mcontext_t; - -#define FPSIMD_MAGIC 0x46508001 -#define ESR_MAGIC 0x45535201 -#define EXTRA_MAGIC 0x45585401 -#define SVE_MAGIC 0x53564501 -struct _aarch64_ctx { - unsigned int magic; - unsigned int size; -}; -struct fpsimd_context { - struct _aarch64_ctx head; - unsigned int fpsr; - unsigned int fpcr; - long double vregs[32]; -}; -struct esr_context { - struct _aarch64_ctx head; - unsigned long esr; -}; -struct extra_context { - struct _aarch64_ctx head; - unsigned long datap; - unsigned int size; - unsigned int __reserved[3]; -}; -struct sve_context { - struct _aarch64_ctx head; - unsigned short vl; - unsigned short __reserved[3]; -}; -#define SVE_VQ_BYTES 16 -#define SVE_VQ_MIN 1 -#define SVE_VQ_MAX 512 -#define SVE_VL_MIN (SVE_VQ_MIN * SVE_VQ_BYTES) -#define SVE_VL_MAX (SVE_VQ_MAX * SVE_VQ_BYTES) -#define SVE_NUM_ZREGS 32 -#define SVE_NUM_PREGS 16 -#define sve_vl_valid(vl) \ - ((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX) -#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES) -#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES) -#define SVE_SIG_ZREG_SIZE(vq) ((unsigned)(vq) * SVE_VQ_BYTES) -#define SVE_SIG_PREG_SIZE(vq) ((unsigned)(vq) * (SVE_VQ_BYTES / 8)) -#define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq) -#define SVE_SIG_REGS_OFFSET \ - ((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \ - / SVE_VQ_BYTES * SVE_VQ_BYTES) -#define SVE_SIG_ZREGS_OFFSET SVE_SIG_REGS_OFFSET -#define SVE_SIG_ZREG_OFFSET(vq, n) \ - (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n)) -#define SVE_SIG_ZREGS_SIZE(vq) \ - (SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET) -#define SVE_SIG_PREGS_OFFSET(vq) \ - (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq)) -#define SVE_SIG_PREG_OFFSET(vq, n) \ - (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n)) -#define SVE_SIG_PREGS_SIZE(vq) \ - (SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq)) -#define SVE_SIG_FFR_OFFSET(vq) \ - (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq)) -#define SVE_SIG_REGS_SIZE(vq) \ - (SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET) -#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq)) -#else -typedef struct { - long double __regs[18+256]; -} mcontext_t; -#endif - -struct sigaltstack { - void *ss_sp; - int ss_flags; - size_t ss_size; -}; - -typedef struct __ucontext { - unsigned long uc_flags; - struct __ucontext *uc_link; - stack_t uc_stack; - sigset_t uc_sigmask; - mcontext_t uc_mcontext; -} ucontext_t; - -#define SA_NOCLDSTOP 1 -#define SA_NOCLDWAIT 2 -#define SA_SIGINFO 4 -#define SA_ONSTACK 0x08000000 -#define SA_RESTART 0x10000000 -#define SA_NODEFER 0x40000000 -#define SA_RESETHAND 0x80000000 -#define SA_RESTORER 0x04000000 - -#endif - -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGIOT SIGABRT -#define SIGBUS 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGUSR1 10 -#define SIGSEGV 11 -#define SIGUSR2 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGSTKFLT 16 -#define SIGCHLD 17 -#define SIGCONT 18 -#define SIGSTOP 19 -#define SIGTSTP 20 -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGURG 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGIO 29 -#define SIGPOLL 29 -#define SIGPWR 30 -#define SIGSYS 31 -#define SIGUNUSED SIGSYS - -#define _NSIG 65 \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/socket.h b/lib/libc/include/aarch64_be-linux-musl/bits/socket.h deleted file mode 100644 index b4e9fb6a1c..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/socket.h +++ /dev/null @@ -1,33 +0,0 @@ -#include - -struct msghdr { - void *msg_name; - socklen_t msg_namelen; - struct iovec *msg_iov; -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad1, msg_iovlen; -#else - int msg_iovlen, __pad1; -#endif - void *msg_control; -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad2; - socklen_t msg_controllen; -#else - socklen_t msg_controllen; - int __pad2; -#endif - int msg_flags; -}; - -struct cmsghdr { -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad1; - socklen_t cmsg_len; -#else - socklen_t cmsg_len; - int __pad1; -#endif - int cmsg_level; - int cmsg_type; -}; \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/stat.h b/lib/libc/include/aarch64_be-linux-musl/bits/stat.h deleted file mode 100644 index 6ce9af119f..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/stat.h +++ /dev/null @@ -1,18 +0,0 @@ -struct stat { - dev_t st_dev; - ino_t st_ino; - mode_t st_mode; - nlink_t st_nlink; - uid_t st_uid; - gid_t st_gid; - dev_t st_rdev; - unsigned long __pad; - off_t st_size; - blksize_t st_blksize; - int __pad2; - blkcnt_t st_blocks; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; - unsigned __unused[2]; -}; \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/syscall.h b/lib/libc/include/aarch64_be-linux-musl/bits/syscall.h deleted file mode 100644 index 917239ba98..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/syscall.h +++ /dev/null @@ -1,555 +0,0 @@ -#define __NR_io_setup 0 -#define __NR_io_destroy 1 -#define __NR_io_submit 2 -#define __NR_io_cancel 3 -#define __NR_io_getevents 4 -#define __NR_setxattr 5 -#define __NR_lsetxattr 6 -#define __NR_fsetxattr 7 -#define __NR_getxattr 8 -#define __NR_lgetxattr 9 -#define __NR_fgetxattr 10 -#define __NR_listxattr 11 -#define __NR_llistxattr 12 -#define __NR_flistxattr 13 -#define __NR_removexattr 14 -#define __NR_lremovexattr 15 -#define __NR_fremovexattr 16 -#define __NR_getcwd 17 -#define __NR_lookup_dcookie 18 -#define __NR_eventfd2 19 -#define __NR_epoll_create1 20 -#define __NR_epoll_ctl 21 -#define __NR_epoll_pwait 22 -#define __NR_dup 23 -#define __NR_dup3 24 -#define __NR_fcntl 25 -#define __NR_inotify_init1 26 -#define __NR_inotify_add_watch 27 -#define __NR_inotify_rm_watch 28 -#define __NR_ioctl 29 -#define __NR_ioprio_set 30 -#define __NR_ioprio_get 31 -#define __NR_flock 32 -#define __NR_mknodat 33 -#define __NR_mkdirat 34 -#define __NR_unlinkat 35 -#define __NR_symlinkat 36 -#define __NR_linkat 37 -#define __NR_renameat 38 -#define __NR_umount2 39 -#define __NR_mount 40 -#define __NR_pivot_root 41 -#define __NR_nfsservctl 42 -#define __NR_statfs 43 -#define __NR_fstatfs 44 -#define __NR_truncate 45 -#define __NR_ftruncate 46 -#define __NR_fallocate 47 -#define __NR_faccessat 48 -#define __NR_chdir 49 -#define __NR_fchdir 50 -#define __NR_chroot 51 -#define __NR_fchmod 52 -#define __NR_fchmodat 53 -#define __NR_fchownat 54 -#define __NR_fchown 55 -#define __NR_openat 56 -#define __NR_close 57 -#define __NR_vhangup 58 -#define __NR_pipe2 59 -#define __NR_quotactl 60 -#define __NR_getdents64 61 -#define __NR_lseek 62 -#define __NR_read 63 -#define __NR_write 64 -#define __NR_readv 65 -#define __NR_writev 66 -#define __NR_pread64 67 -#define __NR_pwrite64 68 -#define __NR_preadv 69 -#define __NR_pwritev 70 -#define __NR_sendfile 71 -#define __NR_pselect6 72 -#define __NR_ppoll 73 -#define __NR_signalfd4 74 -#define __NR_vmsplice 75 -#define __NR_splice 76 -#define __NR_tee 77 -#define __NR_readlinkat 78 -#define __NR_newfstatat 79 -#define __NR_fstat 80 -#define __NR_sync 81 -#define __NR_fsync 82 -#define __NR_fdatasync 83 -#define __NR_sync_file_range 84 -#define __NR_timerfd_create 85 -#define __NR_timerfd_settime 86 -#define __NR_timerfd_gettime 87 -#define __NR_utimensat 88 -#define __NR_acct 89 -#define __NR_capget 90 -#define __NR_capset 91 -#define __NR_personality 92 -#define __NR_exit 93 -#define __NR_exit_group 94 -#define __NR_waitid 95 -#define __NR_set_tid_address 96 -#define __NR_unshare 97 -#define __NR_futex 98 -#define __NR_set_robust_list 99 -#define __NR_get_robust_list 100 -#define __NR_nanosleep 101 -#define __NR_getitimer 102 -#define __NR_setitimer 103 -#define __NR_kexec_load 104 -#define __NR_init_module 105 -#define __NR_delete_module 106 -#define __NR_timer_create 107 -#define __NR_timer_gettime 108 -#define __NR_timer_getoverrun 109 -#define __NR_timer_settime 110 -#define __NR_timer_delete 111 -#define __NR_clock_settime 112 -#define __NR_clock_gettime 113 -#define __NR_clock_getres 114 -#define __NR_clock_nanosleep 115 -#define __NR_syslog 116 -#define __NR_ptrace 117 -#define __NR_sched_setparam 118 -#define __NR_sched_setscheduler 119 -#define __NR_sched_getscheduler 120 -#define __NR_sched_getparam 121 -#define __NR_sched_setaffinity 122 -#define __NR_sched_getaffinity 123 -#define __NR_sched_yield 124 -#define __NR_sched_get_priority_max 125 -#define __NR_sched_get_priority_min 126 -#define __NR_sched_rr_get_interval 127 -#define __NR_restart_syscall 128 -#define __NR_kill 129 -#define __NR_tkill 130 -#define __NR_tgkill 131 -#define __NR_sigaltstack 132 -#define __NR_rt_sigsuspend 133 -#define __NR_rt_sigaction 134 -#define __NR_rt_sigprocmask 135 -#define __NR_rt_sigpending 136 -#define __NR_rt_sigtimedwait 137 -#define __NR_rt_sigqueueinfo 138 -#define __NR_rt_sigreturn 139 -#define __NR_setpriority 140 -#define __NR_getpriority 141 -#define __NR_reboot 142 -#define __NR_setregid 143 -#define __NR_setgid 144 -#define __NR_setreuid 145 -#define __NR_setuid 146 -#define __NR_setresuid 147 -#define __NR_getresuid 148 -#define __NR_setresgid 149 -#define __NR_getresgid 150 -#define __NR_setfsuid 151 -#define __NR_setfsgid 152 -#define __NR_times 153 -#define __NR_setpgid 154 -#define __NR_getpgid 155 -#define __NR_getsid 156 -#define __NR_setsid 157 -#define __NR_getgroups 158 -#define __NR_setgroups 159 -#define __NR_uname 160 -#define __NR_sethostname 161 -#define __NR_setdomainname 162 -#define __NR_getrlimit 163 -#define __NR_setrlimit 164 -#define __NR_getrusage 165 -#define __NR_umask 166 -#define __NR_prctl 167 -#define __NR_getcpu 168 -#define __NR_gettimeofday 169 -#define __NR_settimeofday 170 -#define __NR_adjtimex 171 -#define __NR_getpid 172 -#define __NR_getppid 173 -#define __NR_getuid 174 -#define __NR_geteuid 175 -#define __NR_getgid 176 -#define __NR_getegid 177 -#define __NR_gettid 178 -#define __NR_sysinfo 179 -#define __NR_mq_open 180 -#define __NR_mq_unlink 181 -#define __NR_mq_timedsend 182 -#define __NR_mq_timedreceive 183 -#define __NR_mq_notify 184 -#define __NR_mq_getsetattr 185 -#define __NR_msgget 186 -#define __NR_msgctl 187 -#define __NR_msgrcv 188 -#define __NR_msgsnd 189 -#define __NR_semget 190 -#define __NR_semctl 191 -#define __NR_semtimedop 192 -#define __NR_semop 193 -#define __NR_shmget 194 -#define __NR_shmctl 195 -#define __NR_shmat 196 -#define __NR_shmdt 197 -#define __NR_socket 198 -#define __NR_socketpair 199 -#define __NR_bind 200 -#define __NR_listen 201 -#define __NR_accept 202 -#define __NR_connect 203 -#define __NR_getsockname 204 -#define __NR_getpeername 205 -#define __NR_sendto 206 -#define __NR_recvfrom 207 -#define __NR_setsockopt 208 -#define __NR_getsockopt 209 -#define __NR_shutdown 210 -#define __NR_sendmsg 211 -#define __NR_recvmsg 212 -#define __NR_readahead 213 -#define __NR_brk 214 -#define __NR_munmap 215 -#define __NR_mremap 216 -#define __NR_add_key 217 -#define __NR_request_key 218 -#define __NR_keyctl 219 -#define __NR_clone 220 -#define __NR_execve 221 -#define __NR_mmap 222 -#define __NR_fadvise64 223 -#define __NR_swapon 224 -#define __NR_swapoff 225 -#define __NR_mprotect 226 -#define __NR_msync 227 -#define __NR_mlock 228 -#define __NR_munlock 229 -#define __NR_mlockall 230 -#define __NR_munlockall 231 -#define __NR_mincore 232 -#define __NR_madvise 233 -#define __NR_remap_file_pages 234 -#define __NR_mbind 235 -#define __NR_get_mempolicy 236 -#define __NR_set_mempolicy 237 -#define __NR_migrate_pages 238 -#define __NR_move_pages 239 -#define __NR_rt_tgsigqueueinfo 240 -#define __NR_perf_event_open 241 -#define __NR_accept4 242 -#define __NR_recvmmsg 243 -#define __NR_wait4 260 -#define __NR_prlimit64 261 -#define __NR_fanotify_init 262 -#define __NR_fanotify_mark 263 -#define __NR_name_to_handle_at 264 -#define __NR_open_by_handle_at 265 -#define __NR_clock_adjtime 266 -#define __NR_syncfs 267 -#define __NR_setns 268 -#define __NR_sendmmsg 269 -#define __NR_process_vm_readv 270 -#define __NR_process_vm_writev 271 -#define __NR_kcmp 272 -#define __NR_finit_module 273 -#define __NR_sched_setattr 274 -#define __NR_sched_getattr 275 -#define __NR_renameat2 276 -#define __NR_seccomp 277 -#define __NR_getrandom 278 -#define __NR_memfd_create 279 -#define __NR_bpf 280 -#define __NR_execveat 281 -#define __NR_userfaultfd 282 -#define __NR_membarrier 283 -#define __NR_mlock2 284 -#define __NR_copy_file_range 285 -#define __NR_preadv2 286 -#define __NR_pwritev2 287 -#define __NR_pkey_mprotect 288 -#define __NR_pkey_alloc 289 -#define __NR_pkey_free 290 -#define __NR_statx 291 -#define __NR_io_pgetevents 292 - -#define SYS_io_setup 0 -#define SYS_io_destroy 1 -#define SYS_io_submit 2 -#define SYS_io_cancel 3 -#define SYS_io_getevents 4 -#define SYS_setxattr 5 -#define SYS_lsetxattr 6 -#define SYS_fsetxattr 7 -#define SYS_getxattr 8 -#define SYS_lgetxattr 9 -#define SYS_fgetxattr 10 -#define SYS_listxattr 11 -#define SYS_llistxattr 12 -#define SYS_flistxattr 13 -#define SYS_removexattr 14 -#define SYS_lremovexattr 15 -#define SYS_fremovexattr 16 -#define SYS_getcwd 17 -#define SYS_lookup_dcookie 18 -#define SYS_eventfd2 19 -#define SYS_epoll_create1 20 -#define SYS_epoll_ctl 21 -#define SYS_epoll_pwait 22 -#define SYS_dup 23 -#define SYS_dup3 24 -#define SYS_fcntl 25 -#define SYS_inotify_init1 26 -#define SYS_inotify_add_watch 27 -#define SYS_inotify_rm_watch 28 -#define SYS_ioctl 29 -#define SYS_ioprio_set 30 -#define SYS_ioprio_get 31 -#define SYS_flock 32 -#define SYS_mknodat 33 -#define SYS_mkdirat 34 -#define SYS_unlinkat 35 -#define SYS_symlinkat 36 -#define SYS_linkat 37 -#define SYS_renameat 38 -#define SYS_umount2 39 -#define SYS_mount 40 -#define SYS_pivot_root 41 -#define SYS_nfsservctl 42 -#define SYS_statfs 43 -#define SYS_fstatfs 44 -#define SYS_truncate 45 -#define SYS_ftruncate 46 -#define SYS_fallocate 47 -#define SYS_faccessat 48 -#define SYS_chdir 49 -#define SYS_fchdir 50 -#define SYS_chroot 51 -#define SYS_fchmod 52 -#define SYS_fchmodat 53 -#define SYS_fchownat 54 -#define SYS_fchown 55 -#define SYS_openat 56 -#define SYS_close 57 -#define SYS_vhangup 58 -#define SYS_pipe2 59 -#define SYS_quotactl 60 -#define SYS_getdents64 61 -#define SYS_lseek 62 -#define SYS_read 63 -#define SYS_write 64 -#define SYS_readv 65 -#define SYS_writev 66 -#define SYS_pread64 67 -#define SYS_pwrite64 68 -#define SYS_preadv 69 -#define SYS_pwritev 70 -#define SYS_sendfile 71 -#define SYS_pselect6 72 -#define SYS_ppoll 73 -#define SYS_signalfd4 74 -#define SYS_vmsplice 75 -#define SYS_splice 76 -#define SYS_tee 77 -#define SYS_readlinkat 78 -#define SYS_newfstatat 79 -#define SYS_fstat 80 -#define SYS_sync 81 -#define SYS_fsync 82 -#define SYS_fdatasync 83 -#define SYS_sync_file_range 84 -#define SYS_timerfd_create 85 -#define SYS_timerfd_settime 86 -#define SYS_timerfd_gettime 87 -#define SYS_utimensat 88 -#define SYS_acct 89 -#define SYS_capget 90 -#define SYS_capset 91 -#define SYS_personality 92 -#define SYS_exit 93 -#define SYS_exit_group 94 -#define SYS_waitid 95 -#define SYS_set_tid_address 96 -#define SYS_unshare 97 -#define SYS_futex 98 -#define SYS_set_robust_list 99 -#define SYS_get_robust_list 100 -#define SYS_nanosleep 101 -#define SYS_getitimer 102 -#define SYS_setitimer 103 -#define SYS_kexec_load 104 -#define SYS_init_module 105 -#define SYS_delete_module 106 -#define SYS_timer_create 107 -#define SYS_timer_gettime 108 -#define SYS_timer_getoverrun 109 -#define SYS_timer_settime 110 -#define SYS_timer_delete 111 -#define SYS_clock_settime 112 -#define SYS_clock_gettime 113 -#define SYS_clock_getres 114 -#define SYS_clock_nanosleep 115 -#define SYS_syslog 116 -#define SYS_ptrace 117 -#define SYS_sched_setparam 118 -#define SYS_sched_setscheduler 119 -#define SYS_sched_getscheduler 120 -#define SYS_sched_getparam 121 -#define SYS_sched_setaffinity 122 -#define SYS_sched_getaffinity 123 -#define SYS_sched_yield 124 -#define SYS_sched_get_priority_max 125 -#define SYS_sched_get_priority_min 126 -#define SYS_sched_rr_get_interval 127 -#define SYS_restart_syscall 128 -#define SYS_kill 129 -#define SYS_tkill 130 -#define SYS_tgkill 131 -#define SYS_sigaltstack 132 -#define SYS_rt_sigsuspend 133 -#define SYS_rt_sigaction 134 -#define SYS_rt_sigprocmask 135 -#define SYS_rt_sigpending 136 -#define SYS_rt_sigtimedwait 137 -#define SYS_rt_sigqueueinfo 138 -#define SYS_rt_sigreturn 139 -#define SYS_setpriority 140 -#define SYS_getpriority 141 -#define SYS_reboot 142 -#define SYS_setregid 143 -#define SYS_setgid 144 -#define SYS_setreuid 145 -#define SYS_setuid 146 -#define SYS_setresuid 147 -#define SYS_getresuid 148 -#define SYS_setresgid 149 -#define SYS_getresgid 150 -#define SYS_setfsuid 151 -#define SYS_setfsgid 152 -#define SYS_times 153 -#define SYS_setpgid 154 -#define SYS_getpgid 155 -#define SYS_getsid 156 -#define SYS_setsid 157 -#define SYS_getgroups 158 -#define SYS_setgroups 159 -#define SYS_uname 160 -#define SYS_sethostname 161 -#define SYS_setdomainname 162 -#define SYS_getrlimit 163 -#define SYS_setrlimit 164 -#define SYS_getrusage 165 -#define SYS_umask 166 -#define SYS_prctl 167 -#define SYS_getcpu 168 -#define SYS_gettimeofday 169 -#define SYS_settimeofday 170 -#define SYS_adjtimex 171 -#define SYS_getpid 172 -#define SYS_getppid 173 -#define SYS_getuid 174 -#define SYS_geteuid 175 -#define SYS_getgid 176 -#define SYS_getegid 177 -#define SYS_gettid 178 -#define SYS_sysinfo 179 -#define SYS_mq_open 180 -#define SYS_mq_unlink 181 -#define SYS_mq_timedsend 182 -#define SYS_mq_timedreceive 183 -#define SYS_mq_notify 184 -#define SYS_mq_getsetattr 185 -#define SYS_msgget 186 -#define SYS_msgctl 187 -#define SYS_msgrcv 188 -#define SYS_msgsnd 189 -#define SYS_semget 190 -#define SYS_semctl 191 -#define SYS_semtimedop 192 -#define SYS_semop 193 -#define SYS_shmget 194 -#define SYS_shmctl 195 -#define SYS_shmat 196 -#define SYS_shmdt 197 -#define SYS_socket 198 -#define SYS_socketpair 199 -#define SYS_bind 200 -#define SYS_listen 201 -#define SYS_accept 202 -#define SYS_connect 203 -#define SYS_getsockname 204 -#define SYS_getpeername 205 -#define SYS_sendto 206 -#define SYS_recvfrom 207 -#define SYS_setsockopt 208 -#define SYS_getsockopt 209 -#define SYS_shutdown 210 -#define SYS_sendmsg 211 -#define SYS_recvmsg 212 -#define SYS_readahead 213 -#define SYS_brk 214 -#define SYS_munmap 215 -#define SYS_mremap 216 -#define SYS_add_key 217 -#define SYS_request_key 218 -#define SYS_keyctl 219 -#define SYS_clone 220 -#define SYS_execve 221 -#define SYS_mmap 222 -#define SYS_fadvise64 223 -#define SYS_swapon 224 -#define SYS_swapoff 225 -#define SYS_mprotect 226 -#define SYS_msync 227 -#define SYS_mlock 228 -#define SYS_munlock 229 -#define SYS_mlockall 230 -#define SYS_munlockall 231 -#define SYS_mincore 232 -#define SYS_madvise 233 -#define SYS_remap_file_pages 234 -#define SYS_mbind 235 -#define SYS_get_mempolicy 236 -#define SYS_set_mempolicy 237 -#define SYS_migrate_pages 238 -#define SYS_move_pages 239 -#define SYS_rt_tgsigqueueinfo 240 -#define SYS_perf_event_open 241 -#define SYS_accept4 242 -#define SYS_recvmmsg 243 -#define SYS_wait4 260 -#define SYS_prlimit64 261 -#define SYS_fanotify_init 262 -#define SYS_fanotify_mark 263 -#define SYS_name_to_handle_at 264 -#define SYS_open_by_handle_at 265 -#define SYS_clock_adjtime 266 -#define SYS_syncfs 267 -#define SYS_setns 268 -#define SYS_sendmmsg 269 -#define SYS_process_vm_readv 270 -#define SYS_process_vm_writev 271 -#define SYS_kcmp 272 -#define SYS_finit_module 273 -#define SYS_sched_setattr 274 -#define SYS_sched_getattr 275 -#define SYS_renameat2 276 -#define SYS_seccomp 277 -#define SYS_getrandom 278 -#define SYS_memfd_create 279 -#define SYS_bpf 280 -#define SYS_execveat 281 -#define SYS_userfaultfd 282 -#define SYS_membarrier 283 -#define SYS_mlock2 284 -#define SYS_copy_file_range 285 -#define SYS_preadv2 286 -#define SYS_pwritev2 287 -#define SYS_pkey_mprotect 288 -#define SYS_pkey_alloc 289 -#define SYS_pkey_free 290 -#define SYS_statx 291 -#define SYS_io_pgetevents 292 \ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-musl/bits/user.h b/lib/libc/include/aarch64_be-linux-musl/bits/user.h deleted file mode 100644 index 2bd9dd5863..0000000000 --- a/lib/libc/include/aarch64_be-linux-musl/bits/user.h +++ /dev/null @@ -1,16 +0,0 @@ -struct user_regs_struct { - unsigned long long regs[31]; - unsigned long long sp; - unsigned long long pc; - unsigned long long pstate; -}; - -struct user_fpsimd_struct { - long double vregs[32]; - unsigned int fpsr; - unsigned int fpcr; -}; - -#define ELF_NREG 34 -typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NREG]; -typedef struct user_fpsimd_struct elf_fpregset_t; \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/endian.h b/lib/libc/include/arm-linux-musl/bits/endian.h similarity index 83% rename from lib/libc/include/riscv32-linux-musl/bits/endian.h rename to lib/libc/include/arm-linux-musl/bits/endian.h index e58b42d6d3..e4d86deb11 100644 --- a/lib/libc/include/riscv32-linux-musl/bits/endian.h +++ b/lib/libc/include/arm-linux-musl/bits/endian.h @@ -1,4 +1,4 @@ -#if __RISCVEB__ +#if __ARMEB__ #define __BYTE_ORDER __BIG_ENDIAN #else #define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/lib/libc/include/arm-linux-musleabi/bits/fcntl.h b/lib/libc/include/arm-linux-musl/bits/fcntl.h similarity index 100% rename from lib/libc/include/arm-linux-musleabi/bits/fcntl.h rename to lib/libc/include/arm-linux-musl/bits/fcntl.h diff --git a/lib/libc/include/generic-musl/bits/fenv.h b/lib/libc/include/arm-linux-musl/bits/fenv.h similarity index 100% rename from lib/libc/include/generic-musl/bits/fenv.h rename to lib/libc/include/arm-linux-musl/bits/fenv.h diff --git a/lib/libc/include/arm-linux-musleabi/bits/hwcap.h b/lib/libc/include/arm-linux-musl/bits/hwcap.h similarity index 100% rename from lib/libc/include/arm-linux-musleabi/bits/hwcap.h rename to lib/libc/include/arm-linux-musl/bits/hwcap.h diff --git a/lib/libc/include/arm-linux-musleabi/bits/ioctl_fix.h b/lib/libc/include/arm-linux-musl/bits/ioctl_fix.h similarity index 100% rename from lib/libc/include/arm-linux-musleabi/bits/ioctl_fix.h rename to lib/libc/include/arm-linux-musl/bits/ioctl_fix.h diff --git a/lib/libc/include/arm-linux-musleabi/bits/msg.h b/lib/libc/include/arm-linux-musl/bits/msg.h similarity index 100% rename from lib/libc/include/arm-linux-musleabi/bits/msg.h rename to lib/libc/include/arm-linux-musl/bits/msg.h diff --git a/lib/libc/include/arm-linux-musleabi/bits/ptrace.h b/lib/libc/include/arm-linux-musl/bits/ptrace.h similarity index 100% rename from lib/libc/include/arm-linux-musleabi/bits/ptrace.h rename to lib/libc/include/arm-linux-musl/bits/ptrace.h diff --git a/lib/libc/include/generic-musl/bits/setjmp.h b/lib/libc/include/arm-linux-musl/bits/setjmp.h similarity index 100% rename from lib/libc/include/generic-musl/bits/setjmp.h rename to lib/libc/include/arm-linux-musl/bits/setjmp.h diff --git a/lib/libc/include/arm-linux-musleabi/bits/shm.h b/lib/libc/include/arm-linux-musl/bits/shm.h similarity index 100% rename from lib/libc/include/arm-linux-musleabi/bits/shm.h rename to lib/libc/include/arm-linux-musl/bits/shm.h diff --git a/lib/libc/include/generic-musl/bits/signal.h b/lib/libc/include/arm-linux-musl/bits/signal.h similarity index 100% rename from lib/libc/include/generic-musl/bits/signal.h rename to lib/libc/include/arm-linux-musl/bits/signal.h diff --git a/lib/libc/include/arm-linux-musleabi/bits/stdint.h b/lib/libc/include/arm-linux-musl/bits/stdint.h similarity index 100% rename from lib/libc/include/arm-linux-musleabi/bits/stdint.h rename to lib/libc/include/arm-linux-musl/bits/stdint.h diff --git a/lib/libc/include/generic-musl/bits/user.h b/lib/libc/include/arm-linux-musl/bits/user.h similarity index 100% rename from lib/libc/include/generic-musl/bits/user.h rename to lib/libc/include/arm-linux-musl/bits/user.h diff --git a/lib/libc/include/arm-linux-musleabi/bfd.h b/lib/libc/include/arm-linux-musleabi/bfd.h deleted file mode 100644 index 73d2dccfe2..0000000000 --- a/lib/libc/include/arm-linux-musleabi/bfd.h +++ /dev/null @@ -1,8034 +0,0 @@ -/* 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-2019 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 32 - -/* The word size of the default bfd target. */ -#define BFD_DEFAULT_TARGET_SIZE 32 - -#define BFD_HOST_64BIT_LONG 0 -#define BFD_HOST_64BIT_LONG_LONG 1 -#if 1 -#define BFD_HOST_64_BIT long long -#define BFD_HOST_U_64_BIT unsigned long 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) - -/* 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; - 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) - -#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 bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#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_get_section_limit_octets(bfd, sec) / 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) - -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 *); - -/* 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_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) - -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); - -#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_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_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 **); -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 int 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 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)); - -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_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -/* 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); - -/* XCOFF support routines for the linker. */ - -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_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -/* 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 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 *); - -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 *); - -struct elf32_arm_params { - char *thumb_entry_symbol; - int byteswap_code; - int target1_is_rel; - char * target2_type; - int fix_v4bx; - int use_blx; - bfd_arm_vfp11_fix vfp11_denorm_fix; - bfd_arm_stm32l4xx_fix stm32l4xx_fix; - int no_enum_size_warning; - int no_wchar_size_warning; - int pic_veneer; - int fix_cortex_a8; - int fix_arm1176; - int merge_exidx_entries; - int cmse_implib; - bfd *in_implib_bfd; -}; - -void bfd_elf32_arm_set_target_params - (bfd *, struct bfd_link_info *, struct elf32_arm_params *); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_keep_private_stub_output_sections - (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 *, 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 - (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 *, - struct bfd_section *, unsigned int), - 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); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -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, int); - -extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, 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 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 - (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 *); -/* 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); - -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); - -/* 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); - -/* MIPS ABI flags data access. For the disassembler. */ -struct elf_internal_abiflags_v0; -extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); - -/* C-SKY functions. */ -extern bfd_boolean elf32_csky_build_stubs - (struct bfd_link_info *); -extern bfd_boolean elf32_csky_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section *(*) (const char*, struct bfd_section*), - void (*) (void)); -extern void elf32_csky_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern int elf32_csky_setup_section_lists - (bfd *, struct bfd_link_info *); -/* 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); - -/* 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) \ - (*(const unsigned char *) (ptr) & 0xff) -#define bfd_get_signed_8(abfd, ptr) \ - (((*(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_vma) 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 - - /* 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; -}; - -/* 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 _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]) - -#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) - -#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)) - -/* 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)) - -#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 - (bfd *abfd, asection *sec, flagword flags); - -void bfd_rename_section - (bfd *abfd, 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 - (bfd *abfd, 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); - -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 - 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_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_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_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. */ -#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_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_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; -} -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 (bfd *abfd); - -unsigned long bfd_get_mach (bfd *abfd); - -unsigned int bfd_arch_bits_per_byte (bfd *abfd); - -unsigned int bfd_arch_bits_per_address (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 (bfd *abfd); - -unsigned int bfd_arch_mach_octets_per_byte - (enum bfd_architecture arch, unsigned long machine); - -/* Extracted from reloc.c. */ - -typedef enum bfd_reloc_status -{ - /* No errors detected. Note - the value 2 is used so that it - will not be mistaken for the boolean TRUE or FALSE values. */ - bfd_reloc_ok = 2, - - /* The relocation was performed, but there was an overflow. */ - bfd_reloc_overflow, - - /* The address to relocate was not within the section supplied. */ - bfd_reloc_outofrange, - - /* Used by special functions. */ - bfd_reloc_continue, - - /* Unsupported relocation size requested. */ - bfd_reloc_notsupported, - - /* 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. */ - 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, - -/* 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_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_HIGHER, - 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, - -/* 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, - -/* 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_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 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, - -/* 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, - -/* 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, - -/* 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 : 20; - - /* 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 - - /* 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 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 - 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; -}; - -/* 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, - 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_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_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. */ - 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_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 *); - - /* 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; - -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 \ No newline at end of file diff --git a/lib/libc/include/arm-linux-musleabi/bfd_stdint.h b/lib/libc/include/arm-linux-musleabi/bfd_stdint.h deleted file mode 100644 index 104977cc26..0000000000 --- a/lib/libc/include/arm-linux-musleabi/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for arm-linux-musleabi-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/arm-linux-musleabihf/bfd.h b/lib/libc/include/arm-linux-musleabihf/bfd.h deleted file mode 100644 index 73d2dccfe2..0000000000 --- a/lib/libc/include/arm-linux-musleabihf/bfd.h +++ /dev/null @@ -1,8034 +0,0 @@ -/* 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-2019 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 32 - -/* The word size of the default bfd target. */ -#define BFD_DEFAULT_TARGET_SIZE 32 - -#define BFD_HOST_64BIT_LONG 0 -#define BFD_HOST_64BIT_LONG_LONG 1 -#if 1 -#define BFD_HOST_64_BIT long long -#define BFD_HOST_U_64_BIT unsigned long 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) - -/* 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; - 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) - -#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 bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#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_get_section_limit_octets(bfd, sec) / 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) - -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 *); - -/* 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_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) - -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); - -#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_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_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 **); -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 int 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 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)); - -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_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -/* 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); - -/* XCOFF support routines for the linker. */ - -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_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -/* 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 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 *); - -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 *); - -struct elf32_arm_params { - char *thumb_entry_symbol; - int byteswap_code; - int target1_is_rel; - char * target2_type; - int fix_v4bx; - int use_blx; - bfd_arm_vfp11_fix vfp11_denorm_fix; - bfd_arm_stm32l4xx_fix stm32l4xx_fix; - int no_enum_size_warning; - int no_wchar_size_warning; - int pic_veneer; - int fix_cortex_a8; - int fix_arm1176; - int merge_exidx_entries; - int cmse_implib; - bfd *in_implib_bfd; -}; - -void bfd_elf32_arm_set_target_params - (bfd *, struct bfd_link_info *, struct elf32_arm_params *); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_keep_private_stub_output_sections - (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 *, 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 - (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 *, - struct bfd_section *, unsigned int), - 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); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -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, int); - -extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, 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 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 - (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 *); -/* 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); - -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); - -/* 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); - -/* MIPS ABI flags data access. For the disassembler. */ -struct elf_internal_abiflags_v0; -extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); - -/* C-SKY functions. */ -extern bfd_boolean elf32_csky_build_stubs - (struct bfd_link_info *); -extern bfd_boolean elf32_csky_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section *(*) (const char*, struct bfd_section*), - void (*) (void)); -extern void elf32_csky_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern int elf32_csky_setup_section_lists - (bfd *, struct bfd_link_info *); -/* 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); - -/* 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) \ - (*(const unsigned char *) (ptr) & 0xff) -#define bfd_get_signed_8(abfd, ptr) \ - (((*(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_vma) 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 - - /* 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; -}; - -/* 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 _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]) - -#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) - -#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)) - -/* 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)) - -#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 - (bfd *abfd, asection *sec, flagword flags); - -void bfd_rename_section - (bfd *abfd, 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 - (bfd *abfd, 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); - -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 - 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_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_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_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. */ -#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_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_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; -} -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 (bfd *abfd); - -unsigned long bfd_get_mach (bfd *abfd); - -unsigned int bfd_arch_bits_per_byte (bfd *abfd); - -unsigned int bfd_arch_bits_per_address (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 (bfd *abfd); - -unsigned int bfd_arch_mach_octets_per_byte - (enum bfd_architecture arch, unsigned long machine); - -/* Extracted from reloc.c. */ - -typedef enum bfd_reloc_status -{ - /* No errors detected. Note - the value 2 is used so that it - will not be mistaken for the boolean TRUE or FALSE values. */ - bfd_reloc_ok = 2, - - /* The relocation was performed, but there was an overflow. */ - bfd_reloc_overflow, - - /* The address to relocate was not within the section supplied. */ - bfd_reloc_outofrange, - - /* Used by special functions. */ - bfd_reloc_continue, - - /* Unsupported relocation size requested. */ - bfd_reloc_notsupported, - - /* 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. */ - 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, - -/* 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_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_HIGHER, - 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, - -/* 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, - -/* 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_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 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, - -/* 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, - -/* 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, - -/* 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 : 20; - - /* 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 - - /* 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 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 - 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; -}; - -/* 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, - 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_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_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. */ - 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_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 *); - - /* 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; - -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 \ No newline at end of file diff --git a/lib/libc/include/arm-linux-musleabihf/bfd_stdint.h b/lib/libc/include/arm-linux-musleabihf/bfd_stdint.h deleted file mode 100644 index 9961d1607c..0000000000 --- a/lib/libc/include/arm-linux-musleabihf/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for arm-linux-musleabihf-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/arm-linux-musleabihf/bits/fcntl.h b/lib/libc/include/arm-linux-musleabihf/bits/fcntl.h deleted file mode 100644 index 2408640910..0000000000 --- a/lib/libc/include/arm-linux-musleabihf/bits/fcntl.h +++ /dev/null @@ -1,40 +0,0 @@ -#define O_CREAT 0100 -#define O_EXCL 0200 -#define O_NOCTTY 0400 -#define O_TRUNC 01000 -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_DSYNC 010000 -#define O_SYNC 04010000 -#define O_RSYNC 04010000 -#define O_DIRECTORY 040000 -#define O_NOFOLLOW 0100000 -#define O_CLOEXEC 02000000 - -#define O_ASYNC 020000 -#define O_DIRECT 0200000 -#define O_LARGEFILE 0400000 -#define O_NOATIME 01000000 -#define O_PATH 010000000 -#define O_TMPFILE 020040000 -#define O_NDELAY O_NONBLOCK - -#define F_DUPFD 0 -#define F_GETFD 1 -#define F_SETFD 2 -#define F_GETFL 3 -#define F_SETFL 4 - -#define F_SETOWN 8 -#define F_GETOWN 9 -#define F_SETSIG 10 -#define F_GETSIG 11 - -#define F_GETLK 12 -#define F_SETLK 13 -#define F_SETLKW 14 - -#define F_SETOWN_EX 15 -#define F_GETOWN_EX 16 - -#define F_GETOWNER_UIDS 17 \ No newline at end of file diff --git a/lib/libc/include/arm-linux-musleabihf/bits/hwcap.h b/lib/libc/include/arm-linux-musleabihf/bits/hwcap.h deleted file mode 100644 index c1c1fb1683..0000000000 --- a/lib/libc/include/arm-linux-musleabihf/bits/hwcap.h +++ /dev/null @@ -1,53 +0,0 @@ -#define HWCAP_SWP (1 << 0) -#define HWCAP_HALF (1 << 1) -#define HWCAP_THUMB (1 << 2) -#define HWCAP_26BIT (1 << 3) -#define HWCAP_FAST_MULT (1 << 4) -#define HWCAP_FPA (1 << 5) -#define HWCAP_VFP (1 << 6) -#define HWCAP_EDSP (1 << 7) -#define HWCAP_JAVA (1 << 8) -#define HWCAP_IWMMXT (1 << 9) -#define HWCAP_CRUNCH (1 << 10) -#define HWCAP_THUMBEE (1 << 11) -#define HWCAP_NEON (1 << 12) -#define HWCAP_VFPv3 (1 << 13) -#define HWCAP_VFPv3D16 (1 << 14) -#define HWCAP_TLS (1 << 15) -#define HWCAP_VFPv4 (1 << 16) -#define HWCAP_IDIVA (1 << 17) -#define HWCAP_IDIVT (1 << 18) -#define HWCAP_VFPD32 (1 << 19) -#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) -#define HWCAP_LPAE (1 << 20) -#define HWCAP_EVTSTRM (1 << 21) - -#define HWCAP2_AES (1 << 0) -#define HWCAP2_PMULL (1 << 1) -#define HWCAP2_SHA1 (1 << 2) -#define HWCAP2_SHA2 (1 << 3) -#define HWCAP2_CRC32 (1 << 4) - -#define HWCAP_ARM_SWP (1 << 0) -#define HWCAP_ARM_HALF (1 << 1) -#define HWCAP_ARM_THUMB (1 << 2) -#define HWCAP_ARM_26BIT (1 << 3) -#define HWCAP_ARM_FAST_MULT (1 << 4) -#define HWCAP_ARM_FPA (1 << 5) -#define HWCAP_ARM_VFP (1 << 6) -#define HWCAP_ARM_EDSP (1 << 7) -#define HWCAP_ARM_JAVA (1 << 8) -#define HWCAP_ARM_IWMMXT (1 << 9) -#define HWCAP_ARM_CRUNCH (1 << 10) -#define HWCAP_ARM_THUMBEE (1 << 11) -#define HWCAP_ARM_NEON (1 << 12) -#define HWCAP_ARM_VFPv3 (1 << 13) -#define HWCAP_ARM_VFPv3D16 (1 << 14) -#define HWCAP_ARM_TLS (1 << 15) -#define HWCAP_ARM_VFPv4 (1 << 16) -#define HWCAP_ARM_IDIVA (1 << 17) -#define HWCAP_ARM_IDIVT (1 << 18) -#define HWCAP_ARM_VFPD32 (1 << 19) -#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT) -#define HWCAP_ARM_LPAE (1 << 20) -#define HWCAP_ARM_EVTSTRM (1 << 21) \ No newline at end of file diff --git a/lib/libc/include/arm-linux-musleabihf/bits/ioctl_fix.h b/lib/libc/include/arm-linux-musleabihf/bits/ioctl_fix.h deleted file mode 100644 index 9c177f7679..0000000000 --- a/lib/libc/include/arm-linux-musleabihf/bits/ioctl_fix.h +++ /dev/null @@ -1,2 +0,0 @@ -#undef FIOQSIZE -#define FIOQSIZE 0x545e \ No newline at end of file diff --git a/lib/libc/include/arm-linux-musleabihf/bits/msg.h b/lib/libc/include/arm-linux-musleabihf/bits/msg.h deleted file mode 100644 index e5c8ba7520..0000000000 --- a/lib/libc/include/arm-linux-musleabihf/bits/msg.h +++ /dev/null @@ -1,15 +0,0 @@ -struct msqid_ds { - struct ipc_perm msg_perm; - time_t msg_stime; - int __unused1; - time_t msg_rtime; - int __unused2; - time_t msg_ctime; - int __unused3; - unsigned long msg_cbytes; - msgqnum_t msg_qnum; - msglen_t msg_qbytes; - pid_t msg_lspid; - pid_t msg_lrpid; - unsigned long __unused[2]; -}; \ No newline at end of file diff --git a/lib/libc/include/arm-linux-musleabihf/bits/ptrace.h b/lib/libc/include/arm-linux-musleabihf/bits/ptrace.h deleted file mode 100644 index cd96d836f1..0000000000 --- a/lib/libc/include/arm-linux-musleabihf/bits/ptrace.h +++ /dev/null @@ -1,25 +0,0 @@ -#define PTRACE_GETWMMXREGS 18 -#define PTRACE_SETWMMXREGS 19 -#define PTRACE_GET_THREAD_AREA 22 -#define PTRACE_SET_SYSCALL 23 -#define PTRACE_GETCRUNCHREGS 25 -#define PTRACE_SETCRUNCHREGS 26 -#define PTRACE_GETVFPREGS 27 -#define PTRACE_SETVFPREGS 28 -#define PTRACE_GETHBPREGS 29 -#define PTRACE_SETHBPREGS 30 -#define PTRACE_GETFDPIC 31 -#define PTRACE_GETFDPIC_EXEC 0 -#define PTRACE_GETFDPIC_INTERP 1 - -#define PT_GETWMMXREGS PTRACE_GETWMMXREGS -#define PT_SETWMMXREGS PTRACE_SETWMMXREGS -#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA -#define PT_SET_SYSCALL PTRACE_SET_SYSCALL -#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS -#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS -#define PT_GETVFPREGS PTRACE_GETVFPREGS -#define PT_SETVFPREGS PTRACE_SETVFPREGS -#define PT_GETHBPREGS PTRACE_GETHBPREGS -#define PT_SETHBPREGS PTRACE_SETHBPREGS -#define PT_GETFDPIC PTRACE_GETFDPIC \ No newline at end of file diff --git a/lib/libc/include/arm-linux-musleabihf/bits/shm.h b/lib/libc/include/arm-linux-musleabihf/bits/shm.h deleted file mode 100644 index aa5587127a..0000000000 --- a/lib/libc/include/arm-linux-musleabihf/bits/shm.h +++ /dev/null @@ -1,27 +0,0 @@ -#define SHMLBA 4096 - -struct shmid_ds { - struct ipc_perm shm_perm; - size_t shm_segsz; - time_t shm_atime; - int __unused1; - time_t shm_dtime; - int __unused2; - time_t shm_ctime; - int __unused3; - pid_t shm_cpid; - pid_t shm_lpid; - unsigned long shm_nattch; - unsigned long __pad1; - unsigned long __pad2; -}; - -struct shminfo { - unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; -}; - -struct shm_info { - int __used_ids; - unsigned long shm_tot, shm_rss, shm_swp; - unsigned long __swap_attempts, __swap_successes; -}; \ No newline at end of file diff --git a/lib/libc/include/arm-linux-musleabihf/bits/stdint.h b/lib/libc/include/arm-linux-musleabihf/bits/stdint.h deleted file mode 100644 index b70a87dc9d..0000000000 --- a/lib/libc/include/arm-linux-musleabihf/bits/stdint.h +++ /dev/null @@ -1,20 +0,0 @@ -typedef int32_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef uint32_t uint_fast16_t; -typedef uint32_t uint_fast32_t; - -#define INT_FAST16_MIN INT32_MIN -#define INT_FAST32_MIN INT32_MIN - -#define INT_FAST16_MAX INT32_MAX -#define INT_FAST32_MAX INT32_MAX - -#define UINT_FAST16_MAX UINT32_MAX -#define UINT_FAST32_MAX UINT32_MAX - -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX -#define PTRDIFF_MIN INT32_MIN -#define PTRDIFF_MAX INT32_MAX -#define SIZE_MAX UINT32_MAX \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabi/bfd.h b/lib/libc/include/armeb-linux-musleabi/bfd.h deleted file mode 100644 index 73d2dccfe2..0000000000 --- a/lib/libc/include/armeb-linux-musleabi/bfd.h +++ /dev/null @@ -1,8034 +0,0 @@ -/* 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-2019 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 32 - -/* The word size of the default bfd target. */ -#define BFD_DEFAULT_TARGET_SIZE 32 - -#define BFD_HOST_64BIT_LONG 0 -#define BFD_HOST_64BIT_LONG_LONG 1 -#if 1 -#define BFD_HOST_64_BIT long long -#define BFD_HOST_U_64_BIT unsigned long 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) - -/* 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; - 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) - -#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 bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#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_get_section_limit_octets(bfd, sec) / 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) - -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 *); - -/* 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_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) - -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); - -#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_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_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 **); -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 int 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 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)); - -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_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -/* 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); - -/* XCOFF support routines for the linker. */ - -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_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -/* 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 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 *); - -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 *); - -struct elf32_arm_params { - char *thumb_entry_symbol; - int byteswap_code; - int target1_is_rel; - char * target2_type; - int fix_v4bx; - int use_blx; - bfd_arm_vfp11_fix vfp11_denorm_fix; - bfd_arm_stm32l4xx_fix stm32l4xx_fix; - int no_enum_size_warning; - int no_wchar_size_warning; - int pic_veneer; - int fix_cortex_a8; - int fix_arm1176; - int merge_exidx_entries; - int cmse_implib; - bfd *in_implib_bfd; -}; - -void bfd_elf32_arm_set_target_params - (bfd *, struct bfd_link_info *, struct elf32_arm_params *); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_keep_private_stub_output_sections - (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 *, 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 - (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 *, - struct bfd_section *, unsigned int), - 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); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -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, int); - -extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, 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 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 - (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 *); -/* 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); - -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); - -/* 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); - -/* MIPS ABI flags data access. For the disassembler. */ -struct elf_internal_abiflags_v0; -extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); - -/* C-SKY functions. */ -extern bfd_boolean elf32_csky_build_stubs - (struct bfd_link_info *); -extern bfd_boolean elf32_csky_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section *(*) (const char*, struct bfd_section*), - void (*) (void)); -extern void elf32_csky_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern int elf32_csky_setup_section_lists - (bfd *, struct bfd_link_info *); -/* 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); - -/* 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) \ - (*(const unsigned char *) (ptr) & 0xff) -#define bfd_get_signed_8(abfd, ptr) \ - (((*(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_vma) 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 - - /* 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; -}; - -/* 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 _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]) - -#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) - -#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)) - -/* 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)) - -#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 - (bfd *abfd, asection *sec, flagword flags); - -void bfd_rename_section - (bfd *abfd, 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 - (bfd *abfd, 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); - -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 - 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_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_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_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. */ -#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_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_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; -} -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 (bfd *abfd); - -unsigned long bfd_get_mach (bfd *abfd); - -unsigned int bfd_arch_bits_per_byte (bfd *abfd); - -unsigned int bfd_arch_bits_per_address (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 (bfd *abfd); - -unsigned int bfd_arch_mach_octets_per_byte - (enum bfd_architecture arch, unsigned long machine); - -/* Extracted from reloc.c. */ - -typedef enum bfd_reloc_status -{ - /* No errors detected. Note - the value 2 is used so that it - will not be mistaken for the boolean TRUE or FALSE values. */ - bfd_reloc_ok = 2, - - /* The relocation was performed, but there was an overflow. */ - bfd_reloc_overflow, - - /* The address to relocate was not within the section supplied. */ - bfd_reloc_outofrange, - - /* Used by special functions. */ - bfd_reloc_continue, - - /* Unsupported relocation size requested. */ - bfd_reloc_notsupported, - - /* 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. */ - 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, - -/* 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_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_HIGHER, - 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, - -/* 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, - -/* 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_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 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, - -/* 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, - -/* 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, - -/* 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 : 20; - - /* 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 - - /* 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 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 - 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; -}; - -/* 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, - 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_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_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. */ - 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_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 *); - - /* 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; - -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 \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabi/bfd_stdint.h b/lib/libc/include/armeb-linux-musleabi/bfd_stdint.h deleted file mode 100644 index 2d3c802d27..0000000000 --- a/lib/libc/include/armeb-linux-musleabi/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for armeb-linux-musleabi-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabi/bits/fcntl.h b/lib/libc/include/armeb-linux-musleabi/bits/fcntl.h deleted file mode 100644 index 2408640910..0000000000 --- a/lib/libc/include/armeb-linux-musleabi/bits/fcntl.h +++ /dev/null @@ -1,40 +0,0 @@ -#define O_CREAT 0100 -#define O_EXCL 0200 -#define O_NOCTTY 0400 -#define O_TRUNC 01000 -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_DSYNC 010000 -#define O_SYNC 04010000 -#define O_RSYNC 04010000 -#define O_DIRECTORY 040000 -#define O_NOFOLLOW 0100000 -#define O_CLOEXEC 02000000 - -#define O_ASYNC 020000 -#define O_DIRECT 0200000 -#define O_LARGEFILE 0400000 -#define O_NOATIME 01000000 -#define O_PATH 010000000 -#define O_TMPFILE 020040000 -#define O_NDELAY O_NONBLOCK - -#define F_DUPFD 0 -#define F_GETFD 1 -#define F_SETFD 2 -#define F_GETFL 3 -#define F_SETFL 4 - -#define F_SETOWN 8 -#define F_GETOWN 9 -#define F_SETSIG 10 -#define F_GETSIG 11 - -#define F_GETLK 12 -#define F_SETLK 13 -#define F_SETLKW 14 - -#define F_SETOWN_EX 15 -#define F_GETOWN_EX 16 - -#define F_GETOWNER_UIDS 17 \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabi/bits/hwcap.h b/lib/libc/include/armeb-linux-musleabi/bits/hwcap.h deleted file mode 100644 index c1c1fb1683..0000000000 --- a/lib/libc/include/armeb-linux-musleabi/bits/hwcap.h +++ /dev/null @@ -1,53 +0,0 @@ -#define HWCAP_SWP (1 << 0) -#define HWCAP_HALF (1 << 1) -#define HWCAP_THUMB (1 << 2) -#define HWCAP_26BIT (1 << 3) -#define HWCAP_FAST_MULT (1 << 4) -#define HWCAP_FPA (1 << 5) -#define HWCAP_VFP (1 << 6) -#define HWCAP_EDSP (1 << 7) -#define HWCAP_JAVA (1 << 8) -#define HWCAP_IWMMXT (1 << 9) -#define HWCAP_CRUNCH (1 << 10) -#define HWCAP_THUMBEE (1 << 11) -#define HWCAP_NEON (1 << 12) -#define HWCAP_VFPv3 (1 << 13) -#define HWCAP_VFPv3D16 (1 << 14) -#define HWCAP_TLS (1 << 15) -#define HWCAP_VFPv4 (1 << 16) -#define HWCAP_IDIVA (1 << 17) -#define HWCAP_IDIVT (1 << 18) -#define HWCAP_VFPD32 (1 << 19) -#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) -#define HWCAP_LPAE (1 << 20) -#define HWCAP_EVTSTRM (1 << 21) - -#define HWCAP2_AES (1 << 0) -#define HWCAP2_PMULL (1 << 1) -#define HWCAP2_SHA1 (1 << 2) -#define HWCAP2_SHA2 (1 << 3) -#define HWCAP2_CRC32 (1 << 4) - -#define HWCAP_ARM_SWP (1 << 0) -#define HWCAP_ARM_HALF (1 << 1) -#define HWCAP_ARM_THUMB (1 << 2) -#define HWCAP_ARM_26BIT (1 << 3) -#define HWCAP_ARM_FAST_MULT (1 << 4) -#define HWCAP_ARM_FPA (1 << 5) -#define HWCAP_ARM_VFP (1 << 6) -#define HWCAP_ARM_EDSP (1 << 7) -#define HWCAP_ARM_JAVA (1 << 8) -#define HWCAP_ARM_IWMMXT (1 << 9) -#define HWCAP_ARM_CRUNCH (1 << 10) -#define HWCAP_ARM_THUMBEE (1 << 11) -#define HWCAP_ARM_NEON (1 << 12) -#define HWCAP_ARM_VFPv3 (1 << 13) -#define HWCAP_ARM_VFPv3D16 (1 << 14) -#define HWCAP_ARM_TLS (1 << 15) -#define HWCAP_ARM_VFPv4 (1 << 16) -#define HWCAP_ARM_IDIVA (1 << 17) -#define HWCAP_ARM_IDIVT (1 << 18) -#define HWCAP_ARM_VFPD32 (1 << 19) -#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT) -#define HWCAP_ARM_LPAE (1 << 20) -#define HWCAP_ARM_EVTSTRM (1 << 21) \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabi/bits/ioctl_fix.h b/lib/libc/include/armeb-linux-musleabi/bits/ioctl_fix.h deleted file mode 100644 index 9c177f7679..0000000000 --- a/lib/libc/include/armeb-linux-musleabi/bits/ioctl_fix.h +++ /dev/null @@ -1,2 +0,0 @@ -#undef FIOQSIZE -#define FIOQSIZE 0x545e \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabi/bits/msg.h b/lib/libc/include/armeb-linux-musleabi/bits/msg.h deleted file mode 100644 index e5c8ba7520..0000000000 --- a/lib/libc/include/armeb-linux-musleabi/bits/msg.h +++ /dev/null @@ -1,15 +0,0 @@ -struct msqid_ds { - struct ipc_perm msg_perm; - time_t msg_stime; - int __unused1; - time_t msg_rtime; - int __unused2; - time_t msg_ctime; - int __unused3; - unsigned long msg_cbytes; - msgqnum_t msg_qnum; - msglen_t msg_qbytes; - pid_t msg_lspid; - pid_t msg_lrpid; - unsigned long __unused[2]; -}; \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabi/bits/ptrace.h b/lib/libc/include/armeb-linux-musleabi/bits/ptrace.h deleted file mode 100644 index cd96d836f1..0000000000 --- a/lib/libc/include/armeb-linux-musleabi/bits/ptrace.h +++ /dev/null @@ -1,25 +0,0 @@ -#define PTRACE_GETWMMXREGS 18 -#define PTRACE_SETWMMXREGS 19 -#define PTRACE_GET_THREAD_AREA 22 -#define PTRACE_SET_SYSCALL 23 -#define PTRACE_GETCRUNCHREGS 25 -#define PTRACE_SETCRUNCHREGS 26 -#define PTRACE_GETVFPREGS 27 -#define PTRACE_SETVFPREGS 28 -#define PTRACE_GETHBPREGS 29 -#define PTRACE_SETHBPREGS 30 -#define PTRACE_GETFDPIC 31 -#define PTRACE_GETFDPIC_EXEC 0 -#define PTRACE_GETFDPIC_INTERP 1 - -#define PT_GETWMMXREGS PTRACE_GETWMMXREGS -#define PT_SETWMMXREGS PTRACE_SETWMMXREGS -#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA -#define PT_SET_SYSCALL PTRACE_SET_SYSCALL -#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS -#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS -#define PT_GETVFPREGS PTRACE_GETVFPREGS -#define PT_SETVFPREGS PTRACE_SETVFPREGS -#define PT_GETHBPREGS PTRACE_GETHBPREGS -#define PT_SETHBPREGS PTRACE_SETHBPREGS -#define PT_GETFDPIC PTRACE_GETFDPIC \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabi/bits/shm.h b/lib/libc/include/armeb-linux-musleabi/bits/shm.h deleted file mode 100644 index aa5587127a..0000000000 --- a/lib/libc/include/armeb-linux-musleabi/bits/shm.h +++ /dev/null @@ -1,27 +0,0 @@ -#define SHMLBA 4096 - -struct shmid_ds { - struct ipc_perm shm_perm; - size_t shm_segsz; - time_t shm_atime; - int __unused1; - time_t shm_dtime; - int __unused2; - time_t shm_ctime; - int __unused3; - pid_t shm_cpid; - pid_t shm_lpid; - unsigned long shm_nattch; - unsigned long __pad1; - unsigned long __pad2; -}; - -struct shminfo { - unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; -}; - -struct shm_info { - int __used_ids; - unsigned long shm_tot, shm_rss, shm_swp; - unsigned long __swap_attempts, __swap_successes; -}; \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabi/bits/stdint.h b/lib/libc/include/armeb-linux-musleabi/bits/stdint.h deleted file mode 100644 index b70a87dc9d..0000000000 --- a/lib/libc/include/armeb-linux-musleabi/bits/stdint.h +++ /dev/null @@ -1,20 +0,0 @@ -typedef int32_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef uint32_t uint_fast16_t; -typedef uint32_t uint_fast32_t; - -#define INT_FAST16_MIN INT32_MIN -#define INT_FAST32_MIN INT32_MIN - -#define INT_FAST16_MAX INT32_MAX -#define INT_FAST32_MAX INT32_MAX - -#define UINT_FAST16_MAX UINT32_MAX -#define UINT_FAST32_MAX UINT32_MAX - -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX -#define PTRDIFF_MIN INT32_MIN -#define PTRDIFF_MAX INT32_MAX -#define SIZE_MAX UINT32_MAX \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabihf/bfd.h b/lib/libc/include/armeb-linux-musleabihf/bfd.h deleted file mode 100644 index 73d2dccfe2..0000000000 --- a/lib/libc/include/armeb-linux-musleabihf/bfd.h +++ /dev/null @@ -1,8034 +0,0 @@ -/* 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-2019 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 32 - -/* The word size of the default bfd target. */ -#define BFD_DEFAULT_TARGET_SIZE 32 - -#define BFD_HOST_64BIT_LONG 0 -#define BFD_HOST_64BIT_LONG_LONG 1 -#if 1 -#define BFD_HOST_64_BIT long long -#define BFD_HOST_U_64_BIT unsigned long 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) - -/* 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; - 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) - -#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 bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#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_get_section_limit_octets(bfd, sec) / 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) - -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 *); - -/* 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_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) - -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); - -#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_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_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 **); -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 int 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 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)); - -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_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -/* 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); - -/* XCOFF support routines for the linker. */ - -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_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -/* 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 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 *); - -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 *); - -struct elf32_arm_params { - char *thumb_entry_symbol; - int byteswap_code; - int target1_is_rel; - char * target2_type; - int fix_v4bx; - int use_blx; - bfd_arm_vfp11_fix vfp11_denorm_fix; - bfd_arm_stm32l4xx_fix stm32l4xx_fix; - int no_enum_size_warning; - int no_wchar_size_warning; - int pic_veneer; - int fix_cortex_a8; - int fix_arm1176; - int merge_exidx_entries; - int cmse_implib; - bfd *in_implib_bfd; -}; - -void bfd_elf32_arm_set_target_params - (bfd *, struct bfd_link_info *, struct elf32_arm_params *); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_keep_private_stub_output_sections - (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 *, 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 - (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 *, - struct bfd_section *, unsigned int), - 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); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -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, int); - -extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, 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 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 - (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 *); -/* 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); - -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); - -/* 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); - -/* MIPS ABI flags data access. For the disassembler. */ -struct elf_internal_abiflags_v0; -extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); - -/* C-SKY functions. */ -extern bfd_boolean elf32_csky_build_stubs - (struct bfd_link_info *); -extern bfd_boolean elf32_csky_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section *(*) (const char*, struct bfd_section*), - void (*) (void)); -extern void elf32_csky_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern int elf32_csky_setup_section_lists - (bfd *, struct bfd_link_info *); -/* 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); - -/* 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) \ - (*(const unsigned char *) (ptr) & 0xff) -#define bfd_get_signed_8(abfd, ptr) \ - (((*(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_vma) 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 - - /* 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; -}; - -/* 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 _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]) - -#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) - -#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)) - -/* 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)) - -#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 - (bfd *abfd, asection *sec, flagword flags); - -void bfd_rename_section - (bfd *abfd, 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 - (bfd *abfd, 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); - -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 - 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_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_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_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. */ -#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_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_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; -} -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 (bfd *abfd); - -unsigned long bfd_get_mach (bfd *abfd); - -unsigned int bfd_arch_bits_per_byte (bfd *abfd); - -unsigned int bfd_arch_bits_per_address (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 (bfd *abfd); - -unsigned int bfd_arch_mach_octets_per_byte - (enum bfd_architecture arch, unsigned long machine); - -/* Extracted from reloc.c. */ - -typedef enum bfd_reloc_status -{ - /* No errors detected. Note - the value 2 is used so that it - will not be mistaken for the boolean TRUE or FALSE values. */ - bfd_reloc_ok = 2, - - /* The relocation was performed, but there was an overflow. */ - bfd_reloc_overflow, - - /* The address to relocate was not within the section supplied. */ - bfd_reloc_outofrange, - - /* Used by special functions. */ - bfd_reloc_continue, - - /* Unsupported relocation size requested. */ - bfd_reloc_notsupported, - - /* 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. */ - 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, - -/* 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_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_HIGHER, - 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, - -/* 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, - -/* 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_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 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, - -/* 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, - -/* 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, - -/* 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 : 20; - - /* 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 - - /* 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 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 - 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; -}; - -/* 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, - 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_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_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. */ - 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_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 *); - - /* 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; - -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 \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabihf/bfd_stdint.h b/lib/libc/include/armeb-linux-musleabihf/bfd_stdint.h deleted file mode 100644 index 938024f654..0000000000 --- a/lib/libc/include/armeb-linux-musleabihf/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for armeb-linux-musleabihf-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/fcntl.h b/lib/libc/include/armeb-linux-musleabihf/bits/fcntl.h deleted file mode 100644 index 2408640910..0000000000 --- a/lib/libc/include/armeb-linux-musleabihf/bits/fcntl.h +++ /dev/null @@ -1,40 +0,0 @@ -#define O_CREAT 0100 -#define O_EXCL 0200 -#define O_NOCTTY 0400 -#define O_TRUNC 01000 -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_DSYNC 010000 -#define O_SYNC 04010000 -#define O_RSYNC 04010000 -#define O_DIRECTORY 040000 -#define O_NOFOLLOW 0100000 -#define O_CLOEXEC 02000000 - -#define O_ASYNC 020000 -#define O_DIRECT 0200000 -#define O_LARGEFILE 0400000 -#define O_NOATIME 01000000 -#define O_PATH 010000000 -#define O_TMPFILE 020040000 -#define O_NDELAY O_NONBLOCK - -#define F_DUPFD 0 -#define F_GETFD 1 -#define F_SETFD 2 -#define F_GETFL 3 -#define F_SETFL 4 - -#define F_SETOWN 8 -#define F_GETOWN 9 -#define F_SETSIG 10 -#define F_GETSIG 11 - -#define F_GETLK 12 -#define F_SETLK 13 -#define F_SETLKW 14 - -#define F_SETOWN_EX 15 -#define F_GETOWN_EX 16 - -#define F_GETOWNER_UIDS 17 \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/hwcap.h b/lib/libc/include/armeb-linux-musleabihf/bits/hwcap.h deleted file mode 100644 index c1c1fb1683..0000000000 --- a/lib/libc/include/armeb-linux-musleabihf/bits/hwcap.h +++ /dev/null @@ -1,53 +0,0 @@ -#define HWCAP_SWP (1 << 0) -#define HWCAP_HALF (1 << 1) -#define HWCAP_THUMB (1 << 2) -#define HWCAP_26BIT (1 << 3) -#define HWCAP_FAST_MULT (1 << 4) -#define HWCAP_FPA (1 << 5) -#define HWCAP_VFP (1 << 6) -#define HWCAP_EDSP (1 << 7) -#define HWCAP_JAVA (1 << 8) -#define HWCAP_IWMMXT (1 << 9) -#define HWCAP_CRUNCH (1 << 10) -#define HWCAP_THUMBEE (1 << 11) -#define HWCAP_NEON (1 << 12) -#define HWCAP_VFPv3 (1 << 13) -#define HWCAP_VFPv3D16 (1 << 14) -#define HWCAP_TLS (1 << 15) -#define HWCAP_VFPv4 (1 << 16) -#define HWCAP_IDIVA (1 << 17) -#define HWCAP_IDIVT (1 << 18) -#define HWCAP_VFPD32 (1 << 19) -#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) -#define HWCAP_LPAE (1 << 20) -#define HWCAP_EVTSTRM (1 << 21) - -#define HWCAP2_AES (1 << 0) -#define HWCAP2_PMULL (1 << 1) -#define HWCAP2_SHA1 (1 << 2) -#define HWCAP2_SHA2 (1 << 3) -#define HWCAP2_CRC32 (1 << 4) - -#define HWCAP_ARM_SWP (1 << 0) -#define HWCAP_ARM_HALF (1 << 1) -#define HWCAP_ARM_THUMB (1 << 2) -#define HWCAP_ARM_26BIT (1 << 3) -#define HWCAP_ARM_FAST_MULT (1 << 4) -#define HWCAP_ARM_FPA (1 << 5) -#define HWCAP_ARM_VFP (1 << 6) -#define HWCAP_ARM_EDSP (1 << 7) -#define HWCAP_ARM_JAVA (1 << 8) -#define HWCAP_ARM_IWMMXT (1 << 9) -#define HWCAP_ARM_CRUNCH (1 << 10) -#define HWCAP_ARM_THUMBEE (1 << 11) -#define HWCAP_ARM_NEON (1 << 12) -#define HWCAP_ARM_VFPv3 (1 << 13) -#define HWCAP_ARM_VFPv3D16 (1 << 14) -#define HWCAP_ARM_TLS (1 << 15) -#define HWCAP_ARM_VFPv4 (1 << 16) -#define HWCAP_ARM_IDIVA (1 << 17) -#define HWCAP_ARM_IDIVT (1 << 18) -#define HWCAP_ARM_VFPD32 (1 << 19) -#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT) -#define HWCAP_ARM_LPAE (1 << 20) -#define HWCAP_ARM_EVTSTRM (1 << 21) \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/ioctl_fix.h b/lib/libc/include/armeb-linux-musleabihf/bits/ioctl_fix.h deleted file mode 100644 index 9c177f7679..0000000000 --- a/lib/libc/include/armeb-linux-musleabihf/bits/ioctl_fix.h +++ /dev/null @@ -1,2 +0,0 @@ -#undef FIOQSIZE -#define FIOQSIZE 0x545e \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/msg.h b/lib/libc/include/armeb-linux-musleabihf/bits/msg.h deleted file mode 100644 index e5c8ba7520..0000000000 --- a/lib/libc/include/armeb-linux-musleabihf/bits/msg.h +++ /dev/null @@ -1,15 +0,0 @@ -struct msqid_ds { - struct ipc_perm msg_perm; - time_t msg_stime; - int __unused1; - time_t msg_rtime; - int __unused2; - time_t msg_ctime; - int __unused3; - unsigned long msg_cbytes; - msgqnum_t msg_qnum; - msglen_t msg_qbytes; - pid_t msg_lspid; - pid_t msg_lrpid; - unsigned long __unused[2]; -}; \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/ptrace.h b/lib/libc/include/armeb-linux-musleabihf/bits/ptrace.h deleted file mode 100644 index cd96d836f1..0000000000 --- a/lib/libc/include/armeb-linux-musleabihf/bits/ptrace.h +++ /dev/null @@ -1,25 +0,0 @@ -#define PTRACE_GETWMMXREGS 18 -#define PTRACE_SETWMMXREGS 19 -#define PTRACE_GET_THREAD_AREA 22 -#define PTRACE_SET_SYSCALL 23 -#define PTRACE_GETCRUNCHREGS 25 -#define PTRACE_SETCRUNCHREGS 26 -#define PTRACE_GETVFPREGS 27 -#define PTRACE_SETVFPREGS 28 -#define PTRACE_GETHBPREGS 29 -#define PTRACE_SETHBPREGS 30 -#define PTRACE_GETFDPIC 31 -#define PTRACE_GETFDPIC_EXEC 0 -#define PTRACE_GETFDPIC_INTERP 1 - -#define PT_GETWMMXREGS PTRACE_GETWMMXREGS -#define PT_SETWMMXREGS PTRACE_SETWMMXREGS -#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA -#define PT_SET_SYSCALL PTRACE_SET_SYSCALL -#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS -#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS -#define PT_GETVFPREGS PTRACE_GETVFPREGS -#define PT_SETVFPREGS PTRACE_SETVFPREGS -#define PT_GETHBPREGS PTRACE_GETHBPREGS -#define PT_SETHBPREGS PTRACE_SETHBPREGS -#define PT_GETFDPIC PTRACE_GETFDPIC \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/shm.h b/lib/libc/include/armeb-linux-musleabihf/bits/shm.h deleted file mode 100644 index aa5587127a..0000000000 --- a/lib/libc/include/armeb-linux-musleabihf/bits/shm.h +++ /dev/null @@ -1,27 +0,0 @@ -#define SHMLBA 4096 - -struct shmid_ds { - struct ipc_perm shm_perm; - size_t shm_segsz; - time_t shm_atime; - int __unused1; - time_t shm_dtime; - int __unused2; - time_t shm_ctime; - int __unused3; - pid_t shm_cpid; - pid_t shm_lpid; - unsigned long shm_nattch; - unsigned long __pad1; - unsigned long __pad2; -}; - -struct shminfo { - unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; -}; - -struct shm_info { - int __used_ids; - unsigned long shm_tot, shm_rss, shm_swp; - unsigned long __swap_attempts, __swap_successes; -}; \ No newline at end of file diff --git a/lib/libc/include/armeb-linux-musleabihf/bits/stdint.h b/lib/libc/include/armeb-linux-musleabihf/bits/stdint.h deleted file mode 100644 index b70a87dc9d..0000000000 --- a/lib/libc/include/armeb-linux-musleabihf/bits/stdint.h +++ /dev/null @@ -1,20 +0,0 @@ -typedef int32_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef uint32_t uint_fast16_t; -typedef uint32_t uint_fast32_t; - -#define INT_FAST16_MIN INT32_MIN -#define INT_FAST32_MIN INT32_MIN - -#define INT_FAST16_MAX INT32_MAX -#define INT_FAST32_MAX INT32_MAX - -#define UINT_FAST16_MAX UINT32_MAX -#define UINT_FAST32_MAX UINT32_MAX - -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX -#define PTRDIFF_MIN INT32_MIN -#define PTRDIFF_MAX INT32_MAX -#define SIZE_MAX UINT32_MAX \ No newline at end of file diff --git a/lib/libc/include/generic-musl/ansidecl.h b/lib/libc/include/generic-musl/ansidecl.h deleted file mode 100644 index 43d053bb8b..0000000000 --- a/lib/libc/include/generic-musl/ansidecl.h +++ /dev/null @@ -1,402 +0,0 @@ -/* ANSI and traditional C compatability macros - Copyright (C) 1991-2019 Free Software Foundation, Inc. - This file is part of the GNU C 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 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. */ - -/* ANSI and traditional C compatibility macros - - ANSI C is assumed if __STDC__ is #defined. - - Macro ANSI C definition Traditional C definition - ----- ---- - ---------- ----------- - ---------- - PTR `void *' `char *' - const not defined `' - volatile not defined `' - signed not defined `' - - For ease of writing code which uses GCC extensions but needs to be - portable to other compilers, we provide the GCC_VERSION macro that - simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various - wrappers around __attribute__. Also, __extension__ will be #defined - to nothing if it doesn't work. See below. */ - -#ifndef _ANSIDECL_H -#define _ANSIDECL_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* Every source file includes this file, - so they will all get the switch for lint. */ -/* LINTLIBRARY */ - -/* Using MACRO(x,y) in cpp #if conditionals does not work with some - older preprocessors. Thus we can't define something like this: - -#define HAVE_GCC_VERSION(MAJOR, MINOR) \ - (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR))) - -and then test "#if HAVE_GCC_VERSION(2,7)". - -So instead we use the macro below and test it against specific values. */ - -/* This macro simplifies testing whether we are using gcc, and if it - is of a particular minimum version. (Both major & minor numbers are - significant.) This macro will evaluate to 0 if we are not using - gcc at all. */ -#ifndef GCC_VERSION -#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) -#endif /* GCC_VERSION */ - -#if defined (__STDC__) || defined(__cplusplus) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) -/* All known AIX compilers implement these things (but don't always - define __STDC__). The RISC/OS MIPS compiler defines these things - in SVR4 mode, but does not define __STDC__. */ -/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other - C++ compilers, does not define __STDC__, though it acts as if this - was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */ - -#define PTR void * - -#undef const -#undef volatile -#undef signed - -/* inline requires special treatment; it's in C99, and GCC >=2.7 supports - it too, but it's not in C89. */ -#undef inline -#if __STDC_VERSION__ >= 199901L || defined(__cplusplus) || (defined(__SUNPRO_C) && defined(__C99FEATURES__)) -/* it's a keyword */ -#else -# if GCC_VERSION >= 2007 -# define inline __inline__ /* __inline__ prevents -pedantic warnings */ -# else -# define inline /* nothing */ -# endif -#endif - -#else /* Not ANSI C. */ - -#define PTR char * - -/* some systems define these in header files for non-ansi mode */ -#undef const -#undef volatile -#undef signed -#undef inline -#define const -#define volatile -#define signed -#define inline - -#endif /* ANSI C. */ - -/* Define macros for some gcc attributes. This permits us to use the - macros freely, and know that they will come into play for the - version of gcc in which they are supported. */ - -#if (GCC_VERSION < 2007) -# define __attribute__(x) -#endif - -/* Attribute __malloc__ on functions was valid as of gcc 2.96. */ -#ifndef ATTRIBUTE_MALLOC -# if (GCC_VERSION >= 2096) -# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -# else -# define ATTRIBUTE_MALLOC -# endif /* GNUC >= 2.96 */ -#endif /* ATTRIBUTE_MALLOC */ - -/* Attributes on labels were valid as of gcc 2.93 and g++ 4.5. For - g++ an attribute on a label must be followed by a semicolon. */ -#ifndef ATTRIBUTE_UNUSED_LABEL -# ifndef __cplusplus -# if GCC_VERSION >= 2093 -# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED -# else -# define ATTRIBUTE_UNUSED_LABEL -# endif -# else -# if GCC_VERSION >= 4005 -# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED ; -# else -# define ATTRIBUTE_UNUSED_LABEL -# endif -# endif -#endif - -/* Similarly to ARG_UNUSED below. Prior to GCC 3.4, the C++ frontend - couldn't parse attributes placed after the identifier name, and now - the entire compiler is built with C++. */ -#ifndef ATTRIBUTE_UNUSED -#if GCC_VERSION >= 3004 -# define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -#else -#define ATTRIBUTE_UNUSED -#endif -#endif /* ATTRIBUTE_UNUSED */ - -/* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the - identifier name. */ -#if ! defined(__cplusplus) || (GCC_VERSION >= 3004) -# define ARG_UNUSED(NAME) NAME ATTRIBUTE_UNUSED -#else /* !__cplusplus || GNUC >= 3.4 */ -# define ARG_UNUSED(NAME) NAME -#endif /* !__cplusplus || GNUC >= 3.4 */ - -#ifndef ATTRIBUTE_NORETURN -#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -#endif /* ATTRIBUTE_NORETURN */ - -/* Attribute `nonnull' was valid as of gcc 3.3. */ -#ifndef ATTRIBUTE_NONNULL -# if (GCC_VERSION >= 3003) -# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m))) -# else -# define ATTRIBUTE_NONNULL(m) -# endif /* GNUC >= 3.3 */ -#endif /* ATTRIBUTE_NONNULL */ - -/* Attribute `returns_nonnull' was valid as of gcc 4.9. */ -#ifndef ATTRIBUTE_RETURNS_NONNULL -# if (GCC_VERSION >= 4009) -# define ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -# else -# define ATTRIBUTE_RETURNS_NONNULL -# endif /* GNUC >= 4.9 */ -#endif /* ATTRIBUTE_RETURNS_NONNULL */ - -/* Attribute `pure' was valid as of gcc 3.0. */ -#ifndef ATTRIBUTE_PURE -# if (GCC_VERSION >= 3000) -# define ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define ATTRIBUTE_PURE -# endif /* GNUC >= 3.0 */ -#endif /* ATTRIBUTE_PURE */ - -/* Use ATTRIBUTE_PRINTF when the format specifier must not be NULL. - This was the case for the `printf' format attribute by itself - before GCC 3.3, but as of 3.3 we need to add the `nonnull' - attribute to retain this behavior. */ -#ifndef ATTRIBUTE_PRINTF -#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m) -#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2) -#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3) -#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4) -#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5) -#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6) -#endif /* ATTRIBUTE_PRINTF */ - -/* Use ATTRIBUTE_FPTR_PRINTF when the format attribute is to be set on - a function pointer. Format attributes were allowed on function - pointers as of gcc 3.1. */ -#ifndef ATTRIBUTE_FPTR_PRINTF -# if (GCC_VERSION >= 3001) -# define ATTRIBUTE_FPTR_PRINTF(m, n) ATTRIBUTE_PRINTF(m, n) -# else -# define ATTRIBUTE_FPTR_PRINTF(m, n) -# endif /* GNUC >= 3.1 */ -# define ATTRIBUTE_FPTR_PRINTF_1 ATTRIBUTE_FPTR_PRINTF(1, 2) -# define ATTRIBUTE_FPTR_PRINTF_2 ATTRIBUTE_FPTR_PRINTF(2, 3) -# define ATTRIBUTE_FPTR_PRINTF_3 ATTRIBUTE_FPTR_PRINTF(3, 4) -# define ATTRIBUTE_FPTR_PRINTF_4 ATTRIBUTE_FPTR_PRINTF(4, 5) -# define ATTRIBUTE_FPTR_PRINTF_5 ATTRIBUTE_FPTR_PRINTF(5, 6) -#endif /* ATTRIBUTE_FPTR_PRINTF */ - -/* Use ATTRIBUTE_NULL_PRINTF when the format specifier may be NULL. A - NULL format specifier was allowed as of gcc 3.3. */ -#ifndef ATTRIBUTE_NULL_PRINTF -# if (GCC_VERSION >= 3003) -# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) -# else -# define ATTRIBUTE_NULL_PRINTF(m, n) -# endif /* GNUC >= 3.3 */ -# define ATTRIBUTE_NULL_PRINTF_1 ATTRIBUTE_NULL_PRINTF(1, 2) -# define ATTRIBUTE_NULL_PRINTF_2 ATTRIBUTE_NULL_PRINTF(2, 3) -# define ATTRIBUTE_NULL_PRINTF_3 ATTRIBUTE_NULL_PRINTF(3, 4) -# define ATTRIBUTE_NULL_PRINTF_4 ATTRIBUTE_NULL_PRINTF(4, 5) -# define ATTRIBUTE_NULL_PRINTF_5 ATTRIBUTE_NULL_PRINTF(5, 6) -#endif /* ATTRIBUTE_NULL_PRINTF */ - -/* Attribute `sentinel' was valid as of gcc 3.5. */ -#ifndef ATTRIBUTE_SENTINEL -# if (GCC_VERSION >= 3005) -# define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__)) -# else -# define ATTRIBUTE_SENTINEL -# endif /* GNUC >= 3.5 */ -#endif /* ATTRIBUTE_SENTINEL */ - - -#ifndef ATTRIBUTE_ALIGNED_ALIGNOF -# if (GCC_VERSION >= 3000) -# define ATTRIBUTE_ALIGNED_ALIGNOF(m) __attribute__ ((__aligned__ (__alignof__ (m)))) -# else -# define ATTRIBUTE_ALIGNED_ALIGNOF(m) -# endif /* GNUC >= 3.0 */ -#endif /* ATTRIBUTE_ALIGNED_ALIGNOF */ - -/* Useful for structures whose layout must match some binary specification - regardless of the alignment and padding qualities of the compiler. */ -#ifndef ATTRIBUTE_PACKED -# define ATTRIBUTE_PACKED __attribute__ ((packed)) -#endif - -/* Attribute `hot' and `cold' was valid as of gcc 4.3. */ -#ifndef ATTRIBUTE_COLD -# if (GCC_VERSION >= 4003) -# define ATTRIBUTE_COLD __attribute__ ((__cold__)) -# else -# define ATTRIBUTE_COLD -# endif /* GNUC >= 4.3 */ -#endif /* ATTRIBUTE_COLD */ -#ifndef ATTRIBUTE_HOT -# if (GCC_VERSION >= 4003) -# define ATTRIBUTE_HOT __attribute__ ((__hot__)) -# else -# define ATTRIBUTE_HOT -# endif /* GNUC >= 4.3 */ -#endif /* ATTRIBUTE_HOT */ - -/* Attribute 'no_sanitize_undefined' was valid as of gcc 4.9. */ -#ifndef ATTRIBUTE_NO_SANITIZE_UNDEFINED -# if (GCC_VERSION >= 4009) -# define ATTRIBUTE_NO_SANITIZE_UNDEFINED __attribute__ ((no_sanitize_undefined)) -# else -# define ATTRIBUTE_NO_SANITIZE_UNDEFINED -# endif /* GNUC >= 4.9 */ -#endif /* ATTRIBUTE_NO_SANITIZE_UNDEFINED */ - -/* Attribute 'nonstring' was valid as of gcc 8. */ -#ifndef ATTRIBUTE_NONSTRING -# if GCC_VERSION >= 8000 -# define ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -# else -# define ATTRIBUTE_NONSTRING -# endif -#endif - -/* We use __extension__ in some places to suppress -pedantic warnings - about GCC extensions. This feature didn't work properly before - gcc 2.8. */ -#if GCC_VERSION < 2008 -#define __extension__ -#endif - -/* This is used to declare a const variable which should be visible - outside of the current compilation unit. Use it as - EXPORTED_CONST int i = 1; - This is because the semantics of const are different in C and C++. - "extern const" is permitted in C but it looks strange, and gcc - warns about it when -Wc++-compat is not used. */ -#ifdef __cplusplus -#define EXPORTED_CONST extern const -#else -#define EXPORTED_CONST const -#endif - -/* Be conservative and only use enum bitfields with C++ or GCC. - FIXME: provide a complete autoconf test for buggy enum bitfields. */ - -#ifdef __cplusplus -#define ENUM_BITFIELD(TYPE) enum TYPE -#elif (GCC_VERSION > 2000) -#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE -#else -#define ENUM_BITFIELD(TYPE) unsigned int -#endif - -#if __cpp_constexpr >= 200704 -#define CONSTEXPR constexpr -#else -#define CONSTEXPR -#endif - -/* C++11 adds the ability to add "override" after an implementation of a - virtual function in a subclass, to: - (A) document that this is an override of a virtual function - (B) allow the compiler to issue a warning if it isn't (e.g. a mismatch - of the type signature). - - Similarly, it allows us to add a "final" to indicate that no subclass - may subsequently override the vfunc. - - Provide OVERRIDE and FINAL as macros, allowing us to get these benefits - when compiling with C++11 support, but without requiring C++11. - - For gcc, use "-std=c++11" to enable C++11 support; gcc 6 onwards enables - this by default (actually GNU++14). */ - -#if defined __cplusplus -# if __cplusplus >= 201103 - /* C++11 claims to be available: use it. Final/override were only - implemented in 4.7, though. */ -# if GCC_VERSION < 4007 -# define OVERRIDE -# define FINAL -# else -# define OVERRIDE override -# define FINAL final -# endif -# elif GCC_VERSION >= 4007 - /* G++ 4.7 supports __final in C++98. */ -# define OVERRIDE -# define FINAL __final -# else - /* No C++11 support; leave the macros empty. */ -# define OVERRIDE -# define FINAL -# endif -#else - /* No C++11 support; leave the macros empty. */ -# define OVERRIDE -# define FINAL -#endif - -/* A macro to disable the copy constructor and assignment operator. - When building with C++11 and above, the methods are explicitly - deleted, causing a compile-time error if something tries to copy. - For C++03, this just declares the methods, causing a link-time - error if the methods end up called (assuming you don't - define them). For C++03, for best results, place the macro - under the private: access specifier, like this, - - class name_lookup - { - private: - DISABLE_COPY_AND_ASSIGN (name_lookup); - }; - - so that most attempts at copy are caught at compile-time. */ - -#if __cplusplus >= 201103 -#define DISABLE_COPY_AND_ASSIGN(TYPE) \ - TYPE (const TYPE&) = delete; \ - void operator= (const TYPE &) = delete - #else -#define DISABLE_COPY_AND_ASSIGN(TYPE) \ - TYPE (const TYPE&); \ - void operator= (const TYPE &) -#endif /* __cplusplus >= 201103 */ - -#ifdef __cplusplus -} -#endif - -#endif /* ansidecl.h */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/bfd.h b/lib/libc/include/generic-musl/bfd.h deleted file mode 100644 index 1f57e84b88..0000000000 --- a/lib/libc/include/generic-musl/bfd.h +++ /dev/null @@ -1,8034 +0,0 @@ -/* 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-2019 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) - -/* 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; - 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) - -#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 bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#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_get_section_limit_octets(bfd, sec) / 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) - -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 *); - -/* 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_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) - -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); - -#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_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_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 **); -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 int 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 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)); - -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_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -/* 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); - -/* XCOFF support routines for the linker. */ - -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_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -/* 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 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 *); - -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 *); - -struct elf32_arm_params { - char *thumb_entry_symbol; - int byteswap_code; - int target1_is_rel; - char * target2_type; - int fix_v4bx; - int use_blx; - bfd_arm_vfp11_fix vfp11_denorm_fix; - bfd_arm_stm32l4xx_fix stm32l4xx_fix; - int no_enum_size_warning; - int no_wchar_size_warning; - int pic_veneer; - int fix_cortex_a8; - int fix_arm1176; - int merge_exidx_entries; - int cmse_implib; - bfd *in_implib_bfd; -}; - -void bfd_elf32_arm_set_target_params - (bfd *, struct bfd_link_info *, struct elf32_arm_params *); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_keep_private_stub_output_sections - (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 *, 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 - (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 *, - struct bfd_section *, unsigned int), - 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); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -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, int); - -extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, 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 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 - (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 *); -/* 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); - -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); - -/* 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); - -/* MIPS ABI flags data access. For the disassembler. */ -struct elf_internal_abiflags_v0; -extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); - -/* C-SKY functions. */ -extern bfd_boolean elf32_csky_build_stubs - (struct bfd_link_info *); -extern bfd_boolean elf32_csky_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section *(*) (const char*, struct bfd_section*), - void (*) (void)); -extern void elf32_csky_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern int elf32_csky_setup_section_lists - (bfd *, struct bfd_link_info *); -/* 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); - -/* 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) \ - (*(const unsigned char *) (ptr) & 0xff) -#define bfd_get_signed_8(abfd, ptr) \ - (((*(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_vma) 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 - - /* 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; -}; - -/* 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 _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]) - -#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) - -#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)) - -/* 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)) - -#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 - (bfd *abfd, asection *sec, flagword flags); - -void bfd_rename_section - (bfd *abfd, 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 - (bfd *abfd, 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); - -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 - 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_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_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_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. */ -#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_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_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; -} -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 (bfd *abfd); - -unsigned long bfd_get_mach (bfd *abfd); - -unsigned int bfd_arch_bits_per_byte (bfd *abfd); - -unsigned int bfd_arch_bits_per_address (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 (bfd *abfd); - -unsigned int bfd_arch_mach_octets_per_byte - (enum bfd_architecture arch, unsigned long machine); - -/* Extracted from reloc.c. */ - -typedef enum bfd_reloc_status -{ - /* No errors detected. Note - the value 2 is used so that it - will not be mistaken for the boolean TRUE or FALSE values. */ - bfd_reloc_ok = 2, - - /* The relocation was performed, but there was an overflow. */ - bfd_reloc_overflow, - - /* The address to relocate was not within the section supplied. */ - bfd_reloc_outofrange, - - /* Used by special functions. */ - bfd_reloc_continue, - - /* Unsupported relocation size requested. */ - bfd_reloc_notsupported, - - /* 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. */ - 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, - -/* 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_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_HIGHER, - 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, - -/* 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, - -/* 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_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 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, - -/* 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, - -/* 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, - -/* 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 : 20; - - /* 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 - - /* 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 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 - 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; -}; - -/* 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, - 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_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_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. */ - 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_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 *); - - /* 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; - -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 \ No newline at end of file diff --git a/lib/libc/include/generic-musl/bfdlink.h b/lib/libc/include/generic-musl/bfdlink.h deleted file mode 100644 index d85544ba3a..0000000000 --- a/lib/libc/include/generic-musl/bfdlink.h +++ /dev/null @@ -1,958 +0,0 @@ -/* bfdlink.h -- header file for BFD link routines - Copyright (C) 1993-2019 Free Software Foundation, Inc. - Written by Steve Chamberlain and Ian Lance Taylor, 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 BFDLINK_H -#define BFDLINK_H - -/* Which symbols to strip during a link. */ -enum bfd_link_strip -{ - strip_none, /* Don't strip any symbols. */ - strip_debugger, /* Strip debugging symbols. */ - strip_some, /* keep_hash is the list of symbols to keep. */ - strip_all /* Strip all symbols. */ -}; - -/* Which local symbols to discard during a link. This is irrelevant - if strip_all is used. */ -enum bfd_link_discard -{ - discard_sec_merge, /* Discard local temporary symbols in SEC_MERGE - sections. */ - discard_none, /* Don't discard any locals. */ - discard_l, /* Discard local temporary symbols. */ - discard_all /* Discard all locals. */ -}; - -/* Whether to generate ELF common symbols with the STT_COMMON type - during a relocatable link. */ -enum bfd_link_elf_stt_common -{ - unchanged, - elf_stt_common, - no_elf_stt_common -}; - -/* Describes the type of hash table entry structure being used. - Different hash table structure have different fields and so - support different linking features. */ -enum bfd_link_hash_table_type - { - bfd_link_generic_hash_table, - bfd_link_elf_hash_table - }; - -/* These are the possible types of an entry in the BFD link hash - table. */ - -enum bfd_link_hash_type -{ - bfd_link_hash_new, /* Symbol is new. */ - bfd_link_hash_undefined, /* Symbol seen before, but undefined. */ - bfd_link_hash_undefweak, /* Symbol is weak and undefined. */ - bfd_link_hash_defined, /* Symbol is defined. */ - bfd_link_hash_defweak, /* Symbol is weak and defined. */ - bfd_link_hash_common, /* Symbol is common. */ - bfd_link_hash_indirect, /* Symbol is an indirect link. */ - bfd_link_hash_warning /* Like indirect, but warn if referenced. */ -}; - -enum bfd_link_common_skip_ar_symbols -{ - bfd_link_common_skip_none, - bfd_link_common_skip_text, - bfd_link_common_skip_data, - bfd_link_common_skip_all -}; - -struct bfd_link_hash_common_entry - { - unsigned int alignment_power; /* Alignment. */ - asection *section; /* Symbol section. */ - }; - -/* The linking routines use a hash table which uses this structure for - its elements. */ - -struct bfd_link_hash_entry -{ - /* Base hash table entry structure. */ - struct bfd_hash_entry root; - - /* Type of this entry. */ - ENUM_BITFIELD (bfd_link_hash_type) type : 8; - - /* Symbol is referenced in a normal regular object file, - as distinct from a LTO IR object file. */ - unsigned int non_ir_ref_regular : 1; - - /* Symbol is referenced in a normal dynamic object file, - as distinct from a LTO IR object file. */ - unsigned int non_ir_ref_dynamic : 1; - - /* Symbol is a built-in define. These will be overridden by PROVIDE - in a linker script. */ - unsigned int linker_def : 1; - - /* Symbol defined in a linker script. */ - unsigned int ldscript_def : 1; - - /* Symbol will be converted from absolute to section-relative. Set for - symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN) - outside of an output section statement. */ - unsigned int rel_from_abs : 1; - - /* A union of information depending upon the type. */ - union - { - /* Nothing is kept for bfd_hash_new. */ - /* bfd_link_hash_undefined, bfd_link_hash_undefweak. */ - struct - { - /* Undefined and common symbols are kept in a linked list through - this field. This field is present in all of the union element - so that we don't need to remove entries from the list when we - change their type. Removing entries would either require the - list to be doubly linked, which would waste more memory, or - require a traversal. When an undefined or common symbol is - created, it should be added to this list, the head of which is in - the link hash table itself. As symbols are defined, they need - not be removed from the list; anything which reads the list must - doublecheck the symbol type. - - Weak symbols are not kept on this list. - - Defined and defweak symbols use this field as a reference marker. - If the field is not NULL, or this structure is the tail of the - undefined symbol list, the symbol has been referenced. If the - symbol is undefined and becomes defined, this field will - automatically be non-NULL since the symbol will have been on the - undefined symbol list. */ - struct bfd_link_hash_entry *next; - /* BFD symbol was found in. */ - bfd *abfd; - } undef; - /* bfd_link_hash_defined, bfd_link_hash_defweak. */ - struct - { - struct bfd_link_hash_entry *next; - /* Symbol section. */ - asection *section; - /* Symbol value. */ - bfd_vma value; - } def; - /* bfd_link_hash_indirect, bfd_link_hash_warning. */ - struct - { - struct bfd_link_hash_entry *next; - /* Real symbol. */ - struct bfd_link_hash_entry *link; - /* Warning message (bfd_link_hash_warning only). */ - const char *warning; - } i; - /* bfd_link_hash_common. */ - struct - { - struct bfd_link_hash_entry *next; - /* The linker needs to know three things about common - symbols: the size, the alignment, and the section in - which the symbol should be placed. We store the size - here, and we allocate a small structure to hold the - section and the alignment. The alignment is stored as a - power of two. We don't store all the information - directly because we don't want to increase the size of - the union; this structure is a major space user in the - linker. */ - struct bfd_link_hash_common_entry *p; - /* Common symbol size. */ - bfd_size_type size; - } c; - } u; -}; - -/* This is the link hash table. It is a derived class of - bfd_hash_table. */ - -struct bfd_link_hash_table -{ - /* The hash table itself. */ - struct bfd_hash_table table; - /* A linked list of undefined and common symbols, linked through the - next field in the bfd_link_hash_entry structure. */ - struct bfd_link_hash_entry *undefs; - /* Entries are added to the tail of the undefs list. */ - struct bfd_link_hash_entry *undefs_tail; - /* Function to free the hash table on closing BFD. */ - void (*hash_table_free) (bfd *); - /* The type of the link hash table. */ - enum bfd_link_hash_table_type type; -}; - -/* Look up an entry in a link hash table. If FOLLOW is TRUE, this - follows bfd_link_hash_indirect and bfd_link_hash_warning links to - the real symbol. */ -extern struct bfd_link_hash_entry *bfd_link_hash_lookup - (struct bfd_link_hash_table *, const char *, bfd_boolean create, - bfd_boolean copy, bfd_boolean follow); - -/* Look up an entry in the main linker hash table if the symbol might - be wrapped. This should only be used for references to an - undefined symbol, not for definitions of a symbol. */ - -extern struct bfd_link_hash_entry *bfd_wrapped_link_hash_lookup - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean, bfd_boolean); - -/* If H is a wrapped symbol, ie. the symbol name starts with "__wrap_" - and the remainder is found in wrap_hash, return the real symbol. */ - -extern struct bfd_link_hash_entry *unwrap_hash_lookup - (struct bfd_link_info *, bfd *, struct bfd_link_hash_entry *); - -/* Traverse a link hash table. */ -extern void bfd_link_hash_traverse - (struct bfd_link_hash_table *, - bfd_boolean (*) (struct bfd_link_hash_entry *, void *), - void *); - -/* Add an entry to the undefs list. */ -extern void bfd_link_add_undef - (struct bfd_link_hash_table *, struct bfd_link_hash_entry *); - -/* Remove symbols from the undefs list that don't belong there. */ -extern void bfd_link_repair_undef_list - (struct bfd_link_hash_table *table); - -/* Read symbols and cache symbol pointer array in outsymbols. */ -extern bfd_boolean bfd_generic_link_read_symbols (bfd *); - -/* Check the relocs in the BFD. Called after all the input - files have been loaded, and garbage collection has tagged - any unneeded sections. */ -extern bfd_boolean bfd_link_check_relocs (bfd *,struct bfd_link_info *); - -struct bfd_sym_chain -{ - struct bfd_sym_chain *next; - const char *name; -}; - -/* How to handle unresolved symbols. - There are four possibilities which are enumerated below: */ -enum report_method -{ - /* This is the initial value when then link_info structure is created. - It allows the various stages of the linker to determine whether they - allowed to set the value. */ - RM_NOT_YET_SET = 0, - RM_IGNORE, - RM_GENERATE_WARNING, - RM_GENERATE_ERROR -}; - -typedef enum {with_flags, without_flags} flag_type; - -/* A section flag list. */ -struct flag_info_list -{ - flag_type with; - const char *name; - bfd_boolean valid; - struct flag_info_list *next; -}; - -/* Section flag info. */ -struct flag_info -{ - flagword only_with_flags; - flagword not_with_flags; - struct flag_info_list *flag_list; - bfd_boolean flags_initialized; -}; - -struct bfd_elf_dynamic_list; -struct bfd_elf_version_tree; - -/* Types of output. */ - -enum output_type -{ - type_pde, - type_pie, - type_relocatable, - type_dll, -}; - -#define bfd_link_pde(info) ((info)->type == type_pde) -#define bfd_link_dll(info) ((info)->type == type_dll) -#define bfd_link_relocatable(info) ((info)->type == type_relocatable) -#define bfd_link_pie(info) ((info)->type == type_pie) -#define bfd_link_executable(info) (bfd_link_pde (info) || bfd_link_pie (info)) -#define bfd_link_pic(info) (bfd_link_dll (info) || bfd_link_pie (info)) - -/* This structure holds all the information needed to communicate - between BFD and the linker when doing a link. */ - -struct bfd_link_info -{ - /* Output type. */ - ENUM_BITFIELD (output_type) type : 2; - - /* TRUE if BFD should pre-bind symbols in a shared object. */ - unsigned int symbolic: 1; - - /* TRUE if executable should not contain copy relocs. - Setting this true may result in a non-sharable text segment. */ - unsigned int nocopyreloc: 1; - - /* TRUE if BFD should export all symbols in the dynamic symbol table - of an executable, rather than only those used. */ - unsigned int export_dynamic: 1; - - /* TRUE if a default symbol version should be created and used for - exported symbols. */ - unsigned int create_default_symver: 1; - - /* TRUE if unreferenced sections should be removed. */ - unsigned int gc_sections: 1; - - /* TRUE if exported symbols should be kept during section gc. */ - unsigned int gc_keep_exported: 1; - - /* TRUE if every symbol should be reported back via the notice - callback. */ - unsigned int notice_all: 1; - - /* TRUE if the LTO plugin is active. */ - unsigned int lto_plugin_active: 1; - - /* TRUE if global symbols in discarded sections should be stripped. */ - unsigned int strip_discarded: 1; - - /* TRUE if all data symbols should be dynamic. */ - unsigned int dynamic_data: 1; - - /* TRUE if section groups should be resolved. */ - unsigned int resolve_section_groups: 1; - - /* Which symbols to strip. */ - ENUM_BITFIELD (bfd_link_strip) strip : 2; - - /* Which local symbols to discard. */ - ENUM_BITFIELD (bfd_link_discard) discard : 2; - - /* Whether to generate ELF common symbols with the STT_COMMON type. */ - ENUM_BITFIELD (bfd_link_elf_stt_common) elf_stt_common : 2; - - /* Criteria for skipping symbols when determining - whether to include an object from an archive. */ - ENUM_BITFIELD (bfd_link_common_skip_ar_symbols) common_skip_ar_symbols : 2; - - /* What to do with unresolved symbols in an object file. - When producing executables the default is GENERATE_ERROR. - When producing shared libraries the default is IGNORE. The - assumption with shared libraries is that the reference will be - resolved at load/execution time. */ - ENUM_BITFIELD (report_method) unresolved_syms_in_objects : 2; - - /* What to do with unresolved symbols in a shared library. - The same defaults apply. */ - ENUM_BITFIELD (report_method) unresolved_syms_in_shared_libs : 2; - - /* TRUE if shared objects should be linked directly, not shared. */ - unsigned int static_link: 1; - - /* TRUE if symbols should be retained in memory, FALSE if they - should be freed and reread. */ - unsigned int keep_memory: 1; - - /* TRUE if BFD should generate relocation information in the final - executable. */ - unsigned int emitrelocations: 1; - - /* TRUE if PT_GNU_RELRO segment should be created. */ - unsigned int relro: 1; - - /* TRUE if separate code segment should be created. */ - unsigned int separate_code: 1; - - /* Nonzero if .eh_frame_hdr section and PT_GNU_EH_FRAME ELF segment - should be created. 1 for DWARF2 tables, 2 for compact tables. */ - unsigned int eh_frame_hdr_type: 2; - - /* TRUE if we should warn when adding a DT_TEXTREL to a shared object. */ - unsigned int warn_shared_textrel: 1; - - /* TRUE if we should error when adding a DT_TEXTREL. */ - unsigned int error_textrel: 1; - - /* TRUE if .hash section should be created. */ - unsigned int emit_hash: 1; - - /* TRUE if .gnu.hash section should be created. */ - unsigned int emit_gnu_hash: 1; - - /* If TRUE reduce memory overheads, at the expense of speed. This will - cause map file generation to use an O(N^2) algorithm and disable - caching ELF symbol buffer. */ - unsigned int reduce_memory_overheads: 1; - - /* TRUE if the output file should be in a traditional format. This - is equivalent to the setting of the BFD_TRADITIONAL_FORMAT flag - on the output file, but may be checked when reading the input - files. */ - unsigned int traditional_format: 1; - - /* TRUE if non-PLT relocs should be merged into one reloc section - and sorted so that relocs against the same symbol come together. */ - unsigned int combreloc: 1; - - /* TRUE if a default symbol version should be created and used for - imported symbols. */ - unsigned int default_imported_symver: 1; - - /* TRUE if the new ELF dynamic tags are enabled. */ - unsigned int new_dtags: 1; - - /* FALSE if .eh_frame unwind info should be generated for PLT and other - linker created sections, TRUE if it should be omitted. */ - unsigned int no_ld_generated_unwind_info: 1; - - /* TRUE if BFD should generate a "task linked" object file, - similar to relocatable but also with globals converted to - statics. */ - unsigned int task_link: 1; - - /* TRUE if ok to have multiple definition. */ - unsigned int allow_multiple_definition: 1; - - /* TRUE if ok to have prohibit multiple definition of absolute symbols. */ - unsigned int prohibit_multiple_definition_absolute: 1; - - /* TRUE if ok to have version with no definition. */ - unsigned int allow_undefined_version: 1; - - /* TRUE if some symbols have to be dynamic, controlled by - --dynamic-list command line options. */ - unsigned int dynamic: 1; - - /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W|PF_X - flags. */ - unsigned int execstack: 1; - - /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W - flags. */ - unsigned int noexecstack: 1; - - /* TRUE if we want to produced optimized output files. This might - need much more time and therefore must be explicitly selected. */ - unsigned int optimize: 1; - - /* TRUE if user should be informed of removed unreferenced sections. */ - unsigned int print_gc_sections: 1; - - /* TRUE if we should warn alternate ELF machine code. */ - unsigned int warn_alternate_em: 1; - - /* TRUE if the linker script contained an explicit PHDRS command. */ - unsigned int user_phdrs: 1; - - /* TRUE if program headers ought to be loaded. */ - unsigned int load_phdrs: 1; - - /* TRUE if we should check relocations after all input files have - been opened. */ - unsigned int check_relocs_after_open_input: 1; - - /* TRUE if BND prefix in PLT entries is always generated. */ - unsigned int bndplt: 1; - - /* TRUE if IBT-enabled PLT entries should be generated. */ - unsigned int ibtplt: 1; - - /* TRUE if GNU_PROPERTY_X86_FEATURE_1_IBT should be generated. */ - unsigned int ibt: 1; - - /* TRUE if GNU_PROPERTY_X86_FEATURE_1_SHSTK should be generated. */ - unsigned int shstk: 1; - - /* TRUE if generation of .interp/PT_INTERP should be suppressed. */ - unsigned int nointerp: 1; - - /* TRUE if we shouldn't check relocation overflow. */ - unsigned int no_reloc_overflow_check: 1; - - /* TRUE if generate a 1-byte NOP as suffix for x86 call instruction. */ - unsigned int call_nop_as_suffix : 1; - - /* TRUE if common symbols should be treated as undefined. */ - unsigned int inhibit_common_definition : 1; - - /* TRUE if "-Map map" is passed to linker. */ - unsigned int has_map_file : 1; - - /* The 1-byte NOP for x86 call instruction. */ - char call_nop_byte; - - /* Char that may appear as the first char of a symbol, but should be - skipped (like symbol_leading_char) when looking up symbols in - wrap_hash. Used by PowerPC Linux for 'dot' symbols. */ - char wrap_char; - - /* Separator between archive and filename in linker script filespecs. */ - char path_separator; - - /* Compress DWARF debug sections. */ - enum compressed_debug_section_type compress_debug; - - /* Default stack size. Zero means default (often zero itself), -1 - means explicitly zero-sized. */ - bfd_signed_vma stacksize; - - /* Enable or disable target specific optimizations. - - Not all targets have optimizations to enable. - - Normally these optimizations are disabled by default but some targets - prefer to enable them by default. So this field is a tri-state variable. - The values are: - - zero: Enable the optimizations (either from --relax being specified on - the command line or the backend's before_allocation emulation function. - - positive: The user has requested that these optimizations be disabled. - (Via the --no-relax command line option). - - negative: The optimizations are disabled. (Set when initializing the - args_type structure in ldmain.c:main. */ - signed int disable_target_specific_optimizations; - - /* Function callbacks. */ - const struct bfd_link_callbacks *callbacks; - - /* Hash table handled by BFD. */ - struct bfd_link_hash_table *hash; - - /* Hash table of symbols to keep. This is NULL unless strip is - strip_some. */ - struct bfd_hash_table *keep_hash; - - /* Hash table of symbols to report back via the notice callback. If - this is NULL, and notice_all is FALSE, then no symbols are - reported back. */ - struct bfd_hash_table *notice_hash; - - /* Hash table of symbols which are being wrapped (the --wrap linker - 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; - - /* The import library generated. */ - bfd *out_implib_bfd; - - /* The list of input BFD's involved in the link. These are chained - together via the link.next field. */ - bfd *input_bfds; - bfd **input_bfds_tail; - - /* If a symbol should be created for each input BFD, this is section - where those symbols should be placed. It must be a section in - the output BFD. It may be NULL, in which case no such symbols - will be created. This is to support CREATE_OBJECT_SYMBOLS in the - linker command language. */ - asection *create_object_symbols_section; - - /* List of global symbol names that are starting points for marking - sections against garbage collection. */ - struct bfd_sym_chain *gc_sym_list; - - /* If a base output file is wanted, then this points to it */ - void *base_file; - - /* The function to call when the executable or shared object is - loaded. */ - const char *init_function; - - /* The function to call when the executable or shared object is - unloaded. */ - const char *fini_function; - - /* Number of relaxation passes. Usually only one relaxation pass - is needed. But a backend can have as many relaxation passes as - necessary. During bfd_relax_section call, it is set to the - current pass, starting from 0. */ - int relax_pass; - - /* Number of relaxation trips. This number is incremented every - time the relaxation pass is restarted due to a previous - relaxation returning true in *AGAIN. */ - int relax_trip; - - /* > 0 to treat protected data defined in the shared library as - reference external. 0 to treat it as internal. -1 to let - backend to decide. */ - int extern_protected_data; - - /* 1 to make undefined weak symbols dynamic when building a dynamic - object. 0 to resolve undefined weak symbols to zero. -1 to let - the backend decide. */ - int dynamic_undefined_weak; - - /* Non-zero if auto-import thunks for DATA items in pei386 DLLs - should be generated/linked against. Set to 1 if this feature - is explicitly requested by the user, -1 if enabled by default. */ - int pei386_auto_import; - - /* Non-zero if runtime relocs for DATA items with non-zero addends - in pei386 DLLs should be generated. Set to 1 if this feature - is explicitly requested by the user, -1 if enabled by default. */ - int pei386_runtime_pseudo_reloc; - - /* How many spare .dynamic DT_NULL entries should be added? */ - unsigned int spare_dynamic_tags; - - /* May be used to set DT_FLAGS for ELF. */ - bfd_vma flags; - - /* May be used to set DT_FLAGS_1 for ELF. */ - bfd_vma flags_1; - - /* Start and end of RELRO region. */ - bfd_vma relro_start, relro_end; - - /* List of symbols should be dynamic. */ - struct bfd_elf_dynamic_list *dynamic_list; - - /* The version information. */ - struct bfd_elf_version_tree *version_info; -}; - -/* This structures holds a set of callback functions. These are called - by the BFD linker routines. */ - -struct bfd_link_callbacks -{ - /* A function which is called when an object is added from an - archive. ABFD is the archive element being added. NAME is the - name of the symbol which caused the archive element to be pulled - in. This function may set *SUBSBFD to point to an alternative - BFD from which symbols should in fact be added in place of the - original BFD's symbols. Returns TRUE if the object should be - added, FALSE if it should be skipped. */ - bfd_boolean (*add_archive_element) - (struct bfd_link_info *, bfd *abfd, const char *name, bfd **subsbfd); - /* A function which is called when a symbol is found with multiple - definitions. H is the symbol which is defined multiple times. - NBFD is the new BFD, NSEC is the new section, and NVAL is the new - value. NSEC may be bfd_com_section or bfd_ind_section. */ - void (*multiple_definition) - (struct bfd_link_info *, struct bfd_link_hash_entry *h, - bfd *nbfd, asection *nsec, bfd_vma nval); - /* A function which is called when a common symbol is defined - multiple times. H is the symbol appearing multiple times. - NBFD is the BFD of the new symbol. NTYPE is the type of the new - symbol, one of bfd_link_hash_defined, bfd_link_hash_common, or - bfd_link_hash_indirect. If NTYPE is bfd_link_hash_common, NSIZE - is the size of the new symbol. */ - void (*multiple_common) - (struct bfd_link_info *, struct bfd_link_hash_entry *h, - bfd *nbfd, enum bfd_link_hash_type ntype, bfd_vma nsize); - /* A function which is called to add a symbol to a set. ENTRY is - the link hash table entry for the set itself (e.g., - __CTOR_LIST__). RELOC is the relocation to use for an entry in - the set when generating a relocatable file, and is also used to - get the size of the entry when generating an executable file. - ABFD, SEC and VALUE identify the value to add to the set. */ - void (*add_to_set) - (struct bfd_link_info *, struct bfd_link_hash_entry *entry, - bfd_reloc_code_real_type reloc, bfd *abfd, asection *sec, bfd_vma value); - /* A function which is called when the name of a g++ constructor or - destructor is found. This is only called by some object file - formats. CONSTRUCTOR is TRUE for a constructor, FALSE for a - destructor. This will use BFD_RELOC_CTOR when generating a - relocatable file. NAME is the name of the symbol found. ABFD, - SECTION and VALUE are the value of the symbol. */ - void (*constructor) - (struct bfd_link_info *, bfd_boolean constructor, const char *name, - bfd *abfd, asection *sec, bfd_vma value); - /* A function which is called to issue a linker warning. For - example, this is called when there is a reference to a warning - symbol. WARNING is the warning to be issued. SYMBOL is the name - of the symbol which triggered the warning; it may be NULL if - there is none. ABFD, SECTION and ADDRESS identify the location - which trigerred the warning; either ABFD or SECTION or both may - be NULL if the location is not known. */ - void (*warning) - (struct bfd_link_info *, const char *warning, const char *symbol, - bfd *abfd, asection *section, bfd_vma address); - /* A function which is called when a relocation is attempted against - an undefined symbol. NAME is the symbol which is undefined. - ABFD, SECTION and ADDRESS identify the location from which the - reference is made. IS_FATAL indicates whether an undefined symbol is - a fatal error or not. In some cases SECTION may be NULL. */ - void (*undefined_symbol) - (struct bfd_link_info *, const char *name, bfd *abfd, - asection *section, bfd_vma address, bfd_boolean is_fatal); - /* A function which is called when a reloc overflow occurs. ENTRY is - the link hash table entry for the symbol the reloc is against. - NAME is the name of the local symbol or section the reloc is - against, RELOC_NAME is the name of the relocation, and ADDEND is - any addend that is used. ABFD, SECTION and ADDRESS identify the - location at which the overflow occurs; if this is the result of a - bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then - ABFD will be NULL. */ - void (*reloc_overflow) - (struct bfd_link_info *, struct bfd_link_hash_entry *entry, - const char *name, const char *reloc_name, bfd_vma addend, - bfd *abfd, asection *section, bfd_vma address); - /* A function which is called when a dangerous reloc is performed. - MESSAGE is an appropriate message. - ABFD, SECTION and ADDRESS identify the location at which the - problem occurred; if this is the result of a - bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then - ABFD will be NULL. */ - void (*reloc_dangerous) - (struct bfd_link_info *, const char *message, - bfd *abfd, asection *section, bfd_vma address); - /* A function which is called when a reloc is found to be attached - to a symbol which is not being written out. NAME is the name of - the symbol. ABFD, SECTION and ADDRESS identify the location of - the reloc; if this is the result of a - bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then - ABFD will be NULL. */ - void (*unattached_reloc) - (struct bfd_link_info *, const char *name, - bfd *abfd, asection *section, bfd_vma address); - /* A function which is called when a symbol in notice_hash is - defined or referenced. H is the symbol, INH the indirect symbol - if applicable. ABFD, SECTION and ADDRESS are the (new) value of - the symbol. If SECTION is bfd_und_section, this is a reference. - FLAGS are the symbol BSF_* flags. */ - bfd_boolean (*notice) - (struct bfd_link_info *, struct bfd_link_hash_entry *h, - struct bfd_link_hash_entry *inh, - bfd *abfd, asection *section, bfd_vma address, flagword flags); - /* Error or warning link info message. */ - void (*einfo) - (const char *fmt, ...); - /* General link info message. */ - void (*info) - (const char *fmt, ...); - /* Message to be printed in linker map file. */ - void (*minfo) - (const char *fmt, ...); - /* This callback provides a chance for users of the BFD library to - override its decision about whether to place two adjacent sections - into the same segment. */ - bfd_boolean (*override_segment_assignment) - (struct bfd_link_info *, bfd * abfd, - asection * current_section, asection * previous_section, - bfd_boolean new_segment); -}; - -/* The linker builds link_order structures which tell the code how to - include input data in the output file. */ - -/* These are the types of link_order structures. */ - -enum bfd_link_order_type -{ - bfd_undefined_link_order, /* Undefined. */ - bfd_indirect_link_order, /* Built from a section. */ - bfd_data_link_order, /* Set to explicit data. */ - bfd_section_reloc_link_order, /* Relocate against a section. */ - bfd_symbol_reloc_link_order /* Relocate against a symbol. */ -}; - -/* This is the link_order structure itself. These form a chain - attached to the output section whose contents they are describing. */ - -struct bfd_link_order -{ - /* Next link_order in chain. */ - struct bfd_link_order *next; - /* Type of link_order. */ - enum bfd_link_order_type type; - /* Offset within output section. */ - bfd_vma offset; - /* Size within output section. */ - bfd_size_type size; - /* Type specific information. */ - union - { - struct - { - /* Section to include. If this is used, then - section->output_section must be the section the - link_order is attached to, section->output_offset must - equal the link_order offset field, and section->size - must equal the link_order size field. Maybe these - restrictions should be relaxed someday. */ - asection *section; - } indirect; - struct - { - /* Size of contents, or zero when contents should be filled by - the architecture-dependent fill function. - A non-zero value allows filling of the output section - with an arbitrary repeated pattern. */ - unsigned int size; - /* Data to put into file. */ - bfd_byte *contents; - } data; - struct - { - /* Description of reloc to generate. Used for - bfd_section_reloc_link_order and - bfd_symbol_reloc_link_order. */ - struct bfd_link_order_reloc *p; - } reloc; - } u; -}; - -/* A linker order of type bfd_section_reloc_link_order or - bfd_symbol_reloc_link_order means to create a reloc against a - section or symbol, respectively. This is used to implement -Ur to - generate relocs for the constructor tables. The - bfd_link_order_reloc structure describes the reloc that BFD should - create. It is similar to a arelent, but I didn't use arelent - because the linker does not know anything about most symbols, and - any asymbol structure it creates will be partially meaningless. - This information could logically be in the bfd_link_order struct, - but I didn't want to waste the space since these types of relocs - are relatively rare. */ - -struct bfd_link_order_reloc -{ - /* Reloc type. */ - bfd_reloc_code_real_type reloc; - - union - { - /* For type bfd_section_reloc_link_order, this is the section - the reloc should be against. This must be a section in the - output BFD, not any of the input BFDs. */ - asection *section; - /* For type bfd_symbol_reloc_link_order, this is the name of the - symbol the reloc should be against. */ - const char *name; - } u; - - /* Addend to use. The object file should contain zero. The BFD - backend is responsible for filling in the contents of the object - file correctly. For some object file formats (e.g., COFF) the - addend must be stored into in the object file, and for some - (e.g., SPARC a.out) it is kept in the reloc. */ - bfd_vma addend; -}; - -/* Allocate a new link_order for a section. */ -extern struct bfd_link_order *bfd_new_link_order (bfd *, asection *); - -/* These structures are used to describe version information for the - ELF linker. These structures could be manipulated entirely inside - BFD, but it would be a pain. Instead, the regular linker sets up - these structures, and then passes them into BFD. */ - -/* Glob pattern for a version. */ - -struct bfd_elf_version_expr -{ - /* Next glob pattern for this version. */ - struct bfd_elf_version_expr *next; - /* Glob pattern. */ - const char *pattern; - /* Set if pattern is not a glob. */ - unsigned int literal : 1; - /* Defined by ".symver". */ - unsigned int symver : 1; - /* Defined by version script. */ - unsigned int script : 1; - /* Pattern type. */ -#define BFD_ELF_VERSION_C_TYPE 1 -#define BFD_ELF_VERSION_CXX_TYPE 2 -#define BFD_ELF_VERSION_JAVA_TYPE 4 - unsigned int mask : 3; -}; - -struct bfd_elf_version_expr_head -{ - /* List of all patterns, both wildcards and non-wildcards. */ - struct bfd_elf_version_expr *list; - /* Hash table for non-wildcards. */ - void *htab; - /* Remaining patterns. */ - struct bfd_elf_version_expr *remaining; - /* What kind of pattern types are present in list (bitmask). */ - unsigned int mask; -}; - -/* Version dependencies. */ - -struct bfd_elf_version_deps -{ - /* Next dependency for this version. */ - struct bfd_elf_version_deps *next; - /* The version which this version depends upon. */ - struct bfd_elf_version_tree *version_needed; -}; - -/* A node in the version tree. */ - -struct bfd_elf_version_tree -{ - /* Next version. */ - struct bfd_elf_version_tree *next; - /* Name of this version. */ - const char *name; - /* Version number. */ - unsigned int vernum; - /* Regular expressions for global symbols in this version. */ - struct bfd_elf_version_expr_head globals; - /* Regular expressions for local symbols in this version. */ - struct bfd_elf_version_expr_head locals; - /* List of versions which this version depends upon. */ - struct bfd_elf_version_deps *deps; - /* Index of the version name. This is used within BFD. */ - unsigned int name_indx; - /* Whether this version tree was used. This is used within BFD. */ - int used; - /* Matching hook. */ - struct bfd_elf_version_expr *(*match) - (struct bfd_elf_version_expr_head *head, - struct bfd_elf_version_expr *prev, const char *sym); -}; - -struct bfd_elf_dynamic_list -{ - struct bfd_elf_version_expr_head head; - struct bfd_elf_version_expr *(*match) - (struct bfd_elf_version_expr_head *head, - struct bfd_elf_version_expr *prev, const char *sym); -}; - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/bits/alltypes.h b/lib/libc/include/generic-musl/bits/alltypes.h index 67fea001a3..0ee3cb4646 100644 --- a/lib/libc/include/generic-musl/bits/alltypes.h +++ b/lib/libc/include/generic-musl/bits/alltypes.h @@ -1,6 +1,6 @@ -#define _Addr int -#define _Int64 long long -#define _Reg int +#define _Addr long +#define _Int64 long +#define _Reg long #if defined(__NEED_va_list) && !defined(__DEFINED_va_list) typedef __builtin_va_list va_list; @@ -20,6 +20,22 @@ typedef unsigned wchar_t; #endif #endif +#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) +typedef unsigned wint_t; +#define __DEFINED_wint_t +#endif + + +#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) +typedef int blksize_t; +#define __DEFINED_blksize_t +#endif + +#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) +typedef unsigned int nlink_t; +#define __DEFINED_nlink_t +#endif + #if defined(__NEED_float_t) && !defined(__DEFINED_float_t) typedef float float_t; @@ -50,37 +66,37 @@ typedef long suseconds_t; #if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t; +typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t; #define __DEFINED_pthread_attr_t #endif #if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t; +typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t; #define __DEFINED_pthread_mutex_t #endif #if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t; +typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t; #define __DEFINED_mtx_t #endif #if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t; +typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t; #define __DEFINED_pthread_cond_t #endif #if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t; +typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t; #define __DEFINED_cnd_t #endif #if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t; +typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t; #define __DEFINED_pthread_rwlock_t #endif #if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t; +typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t; #define __DEFINED_pthread_barrier_t #endif @@ -339,6 +355,11 @@ typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; #endif +#if defined(__NEED_struct__IO_FILE) && !defined(__DEFINED_struct__IO_FILE) +struct _IO_FILE { char __x; }; +#define __DEFINED_struct__IO_FILE +#endif + #if defined(__NEED_FILE) && !defined(__DEFINED_FILE) typedef struct _IO_FILE FILE; #define __DEFINED_FILE diff --git a/lib/libc/include/generic-musl/bits/endian.h b/lib/libc/include/generic-musl/bits/endian.h index e4d86deb11..b1a7affbbb 100644 --- a/lib/libc/include/generic-musl/bits/endian.h +++ b/lib/libc/include/generic-musl/bits/endian.h @@ -1,5 +1 @@ -#if __ARMEB__ -#define __BYTE_ORDER __BIG_ENDIAN -#else -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif \ No newline at end of file +#define __BYTE_ORDER __LITTLE_ENDIAN \ No newline at end of file diff --git a/lib/libc/include/generic-musl/bits/ioctl.h b/lib/libc/include/generic-musl/bits/ioctl.h index 03c7cc1c64..3af94ce07a 100644 --- a/lib/libc/include/generic-musl/bits/ioctl.h +++ b/lib/libc/include/generic-musl/bits/ioctl.h @@ -64,6 +64,8 @@ #define TIOCGPTLCK 0x80045439 #define TIOCGEXCL 0x80045440 #define TIOCGPTPEER 0x5441 +#define TIOCGISO7816 0x80285442 +#define TIOCSISO7816 0xc0285443 #define FIONCLEX 0x5450 #define FIOCLEX 0x5451 @@ -82,24 +84,6 @@ #define TIOCGICOUNT 0x545D #define FIOQSIZE 0x5460 -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01 - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - #define TIOCM_LE 0x001 #define TIOCM_DTR 0x002 #define TIOCM_RTS 0x004 @@ -115,23 +99,6 @@ struct winsize { #define TIOCM_OUT2 0x4000 #define TIOCM_LOOP 0x8000 -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 -#define N_6PACK 7 -#define N_MASC 8 -#define N_R3964 9 -#define N_PROFIBUS_FDL 10 -#define N_IRDA 11 -#define N_SMSBLOCK 12 -#define N_HDLC 13 -#define N_SYNC_PPP 14 -#define N_HCI 15 - #define FIOSETOWN 0x8901 #define SIOCSPGRP 0x8902 #define FIOGETOWN 0x8903 @@ -140,67 +107,4 @@ struct winsize { #define SIOCGSTAMP 0x8906 #define SIOCGSTAMPNS 0x8907 -#define SIOCADDRT 0x890B -#define SIOCDELRT 0x890C -#define SIOCRTMSG 0x890D - -#define SIOCGIFNAME 0x8910 -#define SIOCSIFLINK 0x8911 -#define SIOCGIFCONF 0x8912 -#define SIOCGIFFLAGS 0x8913 -#define SIOCSIFFLAGS 0x8914 -#define SIOCGIFADDR 0x8915 -#define SIOCSIFADDR 0x8916 -#define SIOCGIFDSTADDR 0x8917 -#define SIOCSIFDSTADDR 0x8918 -#define SIOCGIFBRDADDR 0x8919 -#define SIOCSIFBRDADDR 0x891a -#define SIOCGIFNETMASK 0x891b -#define SIOCSIFNETMASK 0x891c -#define SIOCGIFMETRIC 0x891d -#define SIOCSIFMETRIC 0x891e -#define SIOCGIFMEM 0x891f -#define SIOCSIFMEM 0x8920 -#define SIOCGIFMTU 0x8921 -#define SIOCSIFMTU 0x8922 -#define SIOCSIFNAME 0x8923 -#define SIOCSIFHWADDR 0x8924 -#define SIOCGIFENCAP 0x8925 -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 -#define SIOCGIFSLAVE 0x8929 -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 -#define SIOGIFINDEX SIOCGIFINDEX -#define SIOCSIFPFLAGS 0x8934 -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 -#define SIOCSIFHWBROADCAST 0x8937 -#define SIOCGIFCOUNT 0x8938 - -#define SIOCGIFBR 0x8940 -#define SIOCSIFBR 0x8941 - -#define SIOCGIFTXQLEN 0x8942 -#define SIOCSIFTXQLEN 0x8943 - -#define SIOCDARP 0x8953 -#define SIOCGARP 0x8954 -#define SIOCSARP 0x8955 - -#define SIOCDRARP 0x8960 -#define SIOCGRARP 0x8961 -#define SIOCSRARP 0x8962 - -#define SIOCGIFMAP 0x8970 -#define SIOCSIFMAP 0x8971 - -#define SIOCADDDLCI 0x8980 -#define SIOCDELDLCI 0x8981 - -#define SIOCDEVPRIVATE 0x89F0 -#define SIOCPROTOPRIVATE 0x89E0 - #include \ No newline at end of file diff --git a/lib/libc/include/generic-musl/bits/syscall.h b/lib/libc/include/generic-musl/bits/syscall.h index 9f246110c2..f1df93f0b6 100644 --- a/lib/libc/include/generic-musl/bits/syscall.h +++ b/lib/libc/include/generic-musl/bits/syscall.h @@ -1,720 +1,567 @@ -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_ptrace 26 -#define __NR_pause 29 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_setpgid 57 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_symlink 83 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_vhangup 111 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_setresgid 170 -#define __NR_getresgid 171 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 -#define __NR_chown 182 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_vfork 190 -#define __NR_ugetrlimit 191 -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 -#define __NR_lchown32 198 -#define __NR_getuid32 199 -#define __NR_getgid32 200 -#define __NR_geteuid32 201 -#define __NR_getegid32 202 -#define __NR_setreuid32 203 -#define __NR_setregid32 204 -#define __NR_getgroups32 205 -#define __NR_setgroups32 206 -#define __NR_fchown32 207 -#define __NR_setresuid32 208 -#define __NR_getresuid32 209 -#define __NR_setresgid32 210 -#define __NR_getresgid32 211 -#define __NR_chown32 212 -#define __NR_setuid32 213 -#define __NR_setgid32 214 -#define __NR_setfsuid32 215 -#define __NR_setfsgid32 216 -#define __NR_getdents64 217 -#define __NR_pivot_root 218 -#define __NR_mincore 219 -#define __NR_madvise 220 -#define __NR_fcntl64 221 -#define __NR_gettid 224 -#define __NR_readahead 225 -#define __NR_setxattr 226 -#define __NR_lsetxattr 227 -#define __NR_fsetxattr 228 -#define __NR_getxattr 229 -#define __NR_lgetxattr 230 -#define __NR_fgetxattr 231 -#define __NR_listxattr 232 -#define __NR_llistxattr 233 -#define __NR_flistxattr 234 -#define __NR_removexattr 235 -#define __NR_lremovexattr 236 -#define __NR_fremovexattr 237 -#define __NR_tkill 238 -#define __NR_sendfile64 239 -#define __NR_futex 240 -#define __NR_sched_setaffinity 241 -#define __NR_sched_getaffinity 242 -#define __NR_io_setup 243 -#define __NR_io_destroy 244 -#define __NR_io_getevents 245 -#define __NR_io_submit 246 -#define __NR_io_cancel 247 -#define __NR_exit_group 248 -#define __NR_lookup_dcookie 249 -#define __NR_epoll_create 250 -#define __NR_epoll_ctl 251 -#define __NR_epoll_wait 252 -#define __NR_remap_file_pages 253 -#define __NR_set_tid_address 256 -#define __NR_timer_create 257 -#define __NR_timer_settime 258 -#define __NR_timer_gettime 259 -#define __NR_timer_getoverrun 260 -#define __NR_timer_delete 261 -#define __NR_clock_settime 262 -#define __NR_clock_gettime 263 -#define __NR_clock_getres 264 -#define __NR_clock_nanosleep 265 -#define __NR_statfs64 266 -#define __NR_fstatfs64 267 -#define __NR_tgkill 268 -#define __NR_utimes 269 -#define __NR_fadvise64_64 270 -#define __NR_arm_fadvise64_64 270 -#define __NR_pciconfig_iobase 271 -#define __NR_pciconfig_read 272 -#define __NR_pciconfig_write 273 -#define __NR_mq_open 274 -#define __NR_mq_unlink 275 -#define __NR_mq_timedsend 276 -#define __NR_mq_timedreceive 277 -#define __NR_mq_notify 278 -#define __NR_mq_getsetattr 279 -#define __NR_waitid 280 -#define __NR_socket 281 -#define __NR_bind 282 -#define __NR_connect 283 -#define __NR_listen 284 -#define __NR_accept 285 -#define __NR_getsockname 286 -#define __NR_getpeername 287 -#define __NR_socketpair 288 -#define __NR_send 289 -#define __NR_sendto 290 -#define __NR_recv 291 -#define __NR_recvfrom 292 -#define __NR_shutdown 293 -#define __NR_setsockopt 294 -#define __NR_getsockopt 295 -#define __NR_sendmsg 296 -#define __NR_recvmsg 297 -#define __NR_semop 298 -#define __NR_semget 299 -#define __NR_semctl 300 -#define __NR_msgsnd 301 -#define __NR_msgrcv 302 -#define __NR_msgget 303 -#define __NR_msgctl 304 -#define __NR_shmat 305 -#define __NR_shmdt 306 -#define __NR_shmget 307 -#define __NR_shmctl 308 -#define __NR_add_key 309 -#define __NR_request_key 310 -#define __NR_keyctl 311 -#define __NR_semtimedop 312 -#define __NR_vserver 313 -#define __NR_ioprio_set 314 -#define __NR_ioprio_get 315 -#define __NR_inotify_init 316 -#define __NR_inotify_add_watch 317 -#define __NR_inotify_rm_watch 318 -#define __NR_mbind 319 -#define __NR_get_mempolicy 320 -#define __NR_set_mempolicy 321 -#define __NR_openat 322 -#define __NR_mkdirat 323 -#define __NR_mknodat 324 -#define __NR_fchownat 325 -#define __NR_futimesat 326 -#define __NR_fstatat64 327 -#define __NR_unlinkat 328 -#define __NR_renameat 329 -#define __NR_linkat 330 -#define __NR_symlinkat 331 -#define __NR_readlinkat 332 -#define __NR_fchmodat 333 -#define __NR_faccessat 334 -#define __NR_pselect6 335 -#define __NR_ppoll 336 -#define __NR_unshare 337 -#define __NR_set_robust_list 338 -#define __NR_get_robust_list 339 -#define __NR_splice 340 -#define __NR_sync_file_range2 341 -#define __NR_arm_sync_file_range 341 -#define __NR_tee 342 -#define __NR_vmsplice 343 -#define __NR_move_pages 344 -#define __NR_getcpu 345 -#define __NR_epoll_pwait 346 -#define __NR_kexec_load 347 -#define __NR_utimensat 348 -#define __NR_signalfd 349 -#define __NR_timerfd_create 350 -#define __NR_eventfd 351 -#define __NR_fallocate 352 -#define __NR_timerfd_settime 353 -#define __NR_timerfd_gettime 354 -#define __NR_signalfd4 355 -#define __NR_eventfd2 356 -#define __NR_epoll_create1 357 -#define __NR_dup3 358 -#define __NR_pipe2 359 -#define __NR_inotify_init1 360 -#define __NR_preadv 361 -#define __NR_pwritev 362 -#define __NR_rt_tgsigqueueinfo 363 -#define __NR_perf_event_open 364 -#define __NR_recvmmsg 365 -#define __NR_accept4 366 -#define __NR_fanotify_init 367 -#define __NR_fanotify_mark 368 -#define __NR_prlimit64 369 -#define __NR_name_to_handle_at 370 -#define __NR_open_by_handle_at 371 -#define __NR_clock_adjtime 372 -#define __NR_syncfs 373 -#define __NR_sendmmsg 374 -#define __NR_setns 375 -#define __NR_process_vm_readv 376 -#define __NR_process_vm_writev 377 -#define __NR_kcmp 378 -#define __NR_finit_module 379 -#define __NR_sched_setattr 380 -#define __NR_sched_getattr 381 -#define __NR_renameat2 382 -#define __NR_seccomp 383 -#define __NR_getrandom 384 -#define __NR_memfd_create 385 -#define __NR_bpf 386 -#define __NR_execveat 387 -#define __NR_userfaultfd 388 -#define __NR_membarrier 389 -#define __NR_mlock2 390 -#define __NR_copy_file_range 391 -#define __NR_preadv2 392 -#define __NR_pwritev2 393 -#define __NR_pkey_mprotect 394 -#define __NR_pkey_alloc 395 -#define __NR_pkey_free 396 -#define __NR_statx 397 -#define __NR_rseq 398 +#define __NR_io_setup 0 +#define __NR_io_destroy 1 +#define __NR_io_submit 2 +#define __NR_io_cancel 3 +#define __NR_io_getevents 4 +#define __NR_setxattr 5 +#define __NR_lsetxattr 6 +#define __NR_fsetxattr 7 +#define __NR_getxattr 8 +#define __NR_lgetxattr 9 +#define __NR_fgetxattr 10 +#define __NR_listxattr 11 +#define __NR_llistxattr 12 +#define __NR_flistxattr 13 +#define __NR_removexattr 14 +#define __NR_lremovexattr 15 +#define __NR_fremovexattr 16 +#define __NR_getcwd 17 +#define __NR_lookup_dcookie 18 +#define __NR_eventfd2 19 +#define __NR_epoll_create1 20 +#define __NR_epoll_ctl 21 +#define __NR_epoll_pwait 22 +#define __NR_dup 23 +#define __NR_dup3 24 +#define __NR_fcntl 25 +#define __NR_inotify_init1 26 +#define __NR_inotify_add_watch 27 +#define __NR_inotify_rm_watch 28 +#define __NR_ioctl 29 +#define __NR_ioprio_set 30 +#define __NR_ioprio_get 31 +#define __NR_flock 32 +#define __NR_mknodat 33 +#define __NR_mkdirat 34 +#define __NR_unlinkat 35 +#define __NR_symlinkat 36 +#define __NR_linkat 37 +#define __NR_renameat 38 +#define __NR_umount2 39 +#define __NR_mount 40 +#define __NR_pivot_root 41 +#define __NR_nfsservctl 42 +#define __NR_statfs 43 +#define __NR_fstatfs 44 +#define __NR_truncate 45 +#define __NR_ftruncate 46 +#define __NR_fallocate 47 +#define __NR_faccessat 48 +#define __NR_chdir 49 +#define __NR_fchdir 50 +#define __NR_chroot 51 +#define __NR_fchmod 52 +#define __NR_fchmodat 53 +#define __NR_fchownat 54 +#define __NR_fchown 55 +#define __NR_openat 56 +#define __NR_close 57 +#define __NR_vhangup 58 +#define __NR_pipe2 59 +#define __NR_quotactl 60 +#define __NR_getdents64 61 +#define __NR_lseek 62 +#define __NR_read 63 +#define __NR_write 64 +#define __NR_readv 65 +#define __NR_writev 66 +#define __NR_pread64 67 +#define __NR_pwrite64 68 +#define __NR_preadv 69 +#define __NR_pwritev 70 +#define __NR_sendfile 71 +#define __NR_pselect6 72 +#define __NR_ppoll 73 +#define __NR_signalfd4 74 +#define __NR_vmsplice 75 +#define __NR_splice 76 +#define __NR_tee 77 +#define __NR_readlinkat 78 +#define __NR_newfstatat 79 +#define __NR_fstat 80 +#define __NR_sync 81 +#define __NR_fsync 82 +#define __NR_fdatasync 83 +#define __NR_sync_file_range 84 +#define __NR_timerfd_create 85 +#define __NR_timerfd_settime 86 +#define __NR_timerfd_gettime 87 +#define __NR_utimensat 88 +#define __NR_acct 89 +#define __NR_capget 90 +#define __NR_capset 91 +#define __NR_personality 92 +#define __NR_exit 93 +#define __NR_exit_group 94 +#define __NR_waitid 95 +#define __NR_set_tid_address 96 +#define __NR_unshare 97 +#define __NR_futex 98 +#define __NR_set_robust_list 99 +#define __NR_get_robust_list 100 +#define __NR_nanosleep 101 +#define __NR_getitimer 102 +#define __NR_setitimer 103 +#define __NR_kexec_load 104 +#define __NR_init_module 105 +#define __NR_delete_module 106 +#define __NR_timer_create 107 +#define __NR_timer_gettime 108 +#define __NR_timer_getoverrun 109 +#define __NR_timer_settime 110 +#define __NR_timer_delete 111 +#define __NR_clock_settime 112 +#define __NR_clock_gettime 113 +#define __NR_clock_getres 114 +#define __NR_clock_nanosleep 115 +#define __NR_syslog 116 +#define __NR_ptrace 117 +#define __NR_sched_setparam 118 +#define __NR_sched_setscheduler 119 +#define __NR_sched_getscheduler 120 +#define __NR_sched_getparam 121 +#define __NR_sched_setaffinity 122 +#define __NR_sched_getaffinity 123 +#define __NR_sched_yield 124 +#define __NR_sched_get_priority_max 125 +#define __NR_sched_get_priority_min 126 +#define __NR_sched_rr_get_interval 127 +#define __NR_restart_syscall 128 +#define __NR_kill 129 +#define __NR_tkill 130 +#define __NR_tgkill 131 +#define __NR_sigaltstack 132 +#define __NR_rt_sigsuspend 133 +#define __NR_rt_sigaction 134 +#define __NR_rt_sigprocmask 135 +#define __NR_rt_sigpending 136 +#define __NR_rt_sigtimedwait 137 +#define __NR_rt_sigqueueinfo 138 +#define __NR_rt_sigreturn 139 +#define __NR_setpriority 140 +#define __NR_getpriority 141 +#define __NR_reboot 142 +#define __NR_setregid 143 +#define __NR_setgid 144 +#define __NR_setreuid 145 +#define __NR_setuid 146 +#define __NR_setresuid 147 +#define __NR_getresuid 148 +#define __NR_setresgid 149 +#define __NR_getresgid 150 +#define __NR_setfsuid 151 +#define __NR_setfsgid 152 +#define __NR_times 153 +#define __NR_setpgid 154 +#define __NR_getpgid 155 +#define __NR_getsid 156 +#define __NR_setsid 157 +#define __NR_getgroups 158 +#define __NR_setgroups 159 +#define __NR_uname 160 +#define __NR_sethostname 161 +#define __NR_setdomainname 162 +#define __NR_getrlimit 163 +#define __NR_setrlimit 164 +#define __NR_getrusage 165 +#define __NR_umask 166 +#define __NR_prctl 167 +#define __NR_getcpu 168 +#define __NR_gettimeofday 169 +#define __NR_settimeofday 170 +#define __NR_adjtimex 171 +#define __NR_getpid 172 +#define __NR_getppid 173 +#define __NR_getuid 174 +#define __NR_geteuid 175 +#define __NR_getgid 176 +#define __NR_getegid 177 +#define __NR_gettid 178 +#define __NR_sysinfo 179 +#define __NR_mq_open 180 +#define __NR_mq_unlink 181 +#define __NR_mq_timedsend 182 +#define __NR_mq_timedreceive 183 +#define __NR_mq_notify 184 +#define __NR_mq_getsetattr 185 +#define __NR_msgget 186 +#define __NR_msgctl 187 +#define __NR_msgrcv 188 +#define __NR_msgsnd 189 +#define __NR_semget 190 +#define __NR_semctl 191 +#define __NR_semtimedop 192 +#define __NR_semop 193 +#define __NR_shmget 194 +#define __NR_shmctl 195 +#define __NR_shmat 196 +#define __NR_shmdt 197 +#define __NR_socket 198 +#define __NR_socketpair 199 +#define __NR_bind 200 +#define __NR_listen 201 +#define __NR_accept 202 +#define __NR_connect 203 +#define __NR_getsockname 204 +#define __NR_getpeername 205 +#define __NR_sendto 206 +#define __NR_recvfrom 207 +#define __NR_setsockopt 208 +#define __NR_getsockopt 209 +#define __NR_shutdown 210 +#define __NR_sendmsg 211 +#define __NR_recvmsg 212 +#define __NR_readahead 213 +#define __NR_brk 214 +#define __NR_munmap 215 +#define __NR_mremap 216 +#define __NR_add_key 217 +#define __NR_request_key 218 +#define __NR_keyctl 219 +#define __NR_clone 220 +#define __NR_execve 221 +#define __NR_mmap 222 +#define __NR_fadvise64 223 +#define __NR_swapon 224 +#define __NR_swapoff 225 +#define __NR_mprotect 226 +#define __NR_msync 227 +#define __NR_mlock 228 +#define __NR_munlock 229 +#define __NR_mlockall 230 +#define __NR_munlockall 231 +#define __NR_mincore 232 +#define __NR_madvise 233 +#define __NR_remap_file_pages 234 +#define __NR_mbind 235 +#define __NR_get_mempolicy 236 +#define __NR_set_mempolicy 237 +#define __NR_migrate_pages 238 +#define __NR_move_pages 239 +#define __NR_rt_tgsigqueueinfo 240 +#define __NR_perf_event_open 241 +#define __NR_accept4 242 +#define __NR_recvmmsg 243 +#define __NR_wait4 260 +#define __NR_prlimit64 261 +#define __NR_fanotify_init 262 +#define __NR_fanotify_mark 263 +#define __NR_name_to_handle_at 264 +#define __NR_open_by_handle_at 265 +#define __NR_clock_adjtime 266 +#define __NR_syncfs 267 +#define __NR_setns 268 +#define __NR_sendmmsg 269 +#define __NR_process_vm_readv 270 +#define __NR_process_vm_writev 271 +#define __NR_kcmp 272 +#define __NR_finit_module 273 +#define __NR_sched_setattr 274 +#define __NR_sched_getattr 275 +#define __NR_renameat2 276 +#define __NR_seccomp 277 +#define __NR_getrandom 278 +#define __NR_memfd_create 279 +#define __NR_bpf 280 +#define __NR_execveat 281 +#define __NR_userfaultfd 282 +#define __NR_membarrier 283 +#define __NR_mlock2 284 +#define __NR_copy_file_range 285 +#define __NR_preadv2 286 +#define __NR_pwritev2 287 +#define __NR_pkey_mprotect 288 +#define __NR_pkey_alloc 289 +#define __NR_pkey_free 290 +#define __NR_statx 291 +#define __NR_io_pgetevents 292 +#define __NR_rseq 293 +#define __NR_kexec_file_load 294 +#define __NR_pidfd_send_signal 424 +#define __NR_io_uring_setup 425 +#define __NR_io_uring_enter 426 +#define __NR_io_uring_register 427 -#define __ARM_NR_breakpoint 0x0f0001 -#define __ARM_NR_cacheflush 0x0f0002 -#define __ARM_NR_usr26 0x0f0003 -#define __ARM_NR_usr32 0x0f0004 -#define __ARM_NR_set_tls 0x0f0005 -#define __ARM_NR_get_tls 0x0f0006 - -#define SYS_restart_syscall 0 -#define SYS_exit 1 -#define SYS_fork 2 -#define SYS_read 3 -#define SYS_write 4 -#define SYS_open 5 -#define SYS_close 6 -#define SYS_creat 8 -#define SYS_link 9 -#define SYS_unlink 10 -#define SYS_execve 11 -#define SYS_chdir 12 -#define SYS_mknod 14 -#define SYS_chmod 15 -#define SYS_lchown 16 -#define SYS_lseek 19 -#define SYS_getpid 20 -#define SYS_mount 21 -#define SYS_setuid 23 -#define SYS_getuid 24 -#define SYS_ptrace 26 -#define SYS_pause 29 -#define SYS_access 33 -#define SYS_nice 34 -#define SYS_sync 36 -#define SYS_kill 37 -#define SYS_rename 38 -#define SYS_mkdir 39 -#define SYS_rmdir 40 -#define SYS_dup 41 -#define SYS_pipe 42 -#define SYS_times 43 -#define SYS_brk 45 -#define SYS_setgid 46 -#define SYS_getgid 47 -#define SYS_geteuid 49 -#define SYS_getegid 50 -#define SYS_acct 51 -#define SYS_umount2 52 -#define SYS_ioctl 54 -#define SYS_fcntl 55 -#define SYS_setpgid 57 -#define SYS_umask 60 -#define SYS_chroot 61 -#define SYS_ustat 62 -#define SYS_dup2 63 -#define SYS_getppid 64 -#define SYS_getpgrp 65 -#define SYS_setsid 66 -#define SYS_sigaction 67 -#define SYS_setreuid 70 -#define SYS_setregid 71 -#define SYS_sigsuspend 72 -#define SYS_sigpending 73 -#define SYS_sethostname 74 -#define SYS_setrlimit 75 -#define SYS_getrusage 77 -#define SYS_gettimeofday 78 -#define SYS_settimeofday 79 -#define SYS_getgroups 80 -#define SYS_setgroups 81 -#define SYS_symlink 83 -#define SYS_readlink 85 -#define SYS_uselib 86 -#define SYS_swapon 87 -#define SYS_reboot 88 -#define SYS_munmap 91 -#define SYS_truncate 92 -#define SYS_ftruncate 93 -#define SYS_fchmod 94 -#define SYS_fchown 95 -#define SYS_getpriority 96 -#define SYS_setpriority 97 -#define SYS_statfs 99 -#define SYS_fstatfs 100 -#define SYS_syslog 103 -#define SYS_setitimer 104 -#define SYS_getitimer 105 -#define SYS_stat 106 -#define SYS_lstat 107 -#define SYS_fstat 108 -#define SYS_vhangup 111 -#define SYS_wait4 114 -#define SYS_swapoff 115 -#define SYS_sysinfo 116 -#define SYS_fsync 118 -#define SYS_sigreturn 119 -#define SYS_clone 120 -#define SYS_setdomainname 121 -#define SYS_uname 122 -#define SYS_adjtimex 124 -#define SYS_mprotect 125 -#define SYS_sigprocmask 126 -#define SYS_init_module 128 -#define SYS_delete_module 129 -#define SYS_quotactl 131 -#define SYS_getpgid 132 -#define SYS_fchdir 133 -#define SYS_bdflush 134 -#define SYS_sysfs 135 -#define SYS_personality 136 -#define SYS_setfsuid 138 -#define SYS_setfsgid 139 -#define SYS__llseek 140 -#define SYS_getdents 141 -#define SYS__newselect 142 -#define SYS_flock 143 -#define SYS_msync 144 -#define SYS_readv 145 -#define SYS_writev 146 -#define SYS_getsid 147 -#define SYS_fdatasync 148 -#define SYS__sysctl 149 -#define SYS_mlock 150 -#define SYS_munlock 151 -#define SYS_mlockall 152 -#define SYS_munlockall 153 -#define SYS_sched_setparam 154 -#define SYS_sched_getparam 155 -#define SYS_sched_setscheduler 156 -#define SYS_sched_getscheduler 157 -#define SYS_sched_yield 158 -#define SYS_sched_get_priority_max 159 -#define SYS_sched_get_priority_min 160 -#define SYS_sched_rr_get_interval 161 -#define SYS_nanosleep 162 -#define SYS_mremap 163 -#define SYS_setresuid 164 -#define SYS_getresuid 165 -#define SYS_poll 168 -#define SYS_nfsservctl 169 -#define SYS_setresgid 170 -#define SYS_getresgid 171 -#define SYS_prctl 172 -#define SYS_rt_sigreturn 173 -#define SYS_rt_sigaction 174 -#define SYS_rt_sigprocmask 175 -#define SYS_rt_sigpending 176 -#define SYS_rt_sigtimedwait 177 -#define SYS_rt_sigqueueinfo 178 -#define SYS_rt_sigsuspend 179 -#define SYS_pread64 180 -#define SYS_pwrite64 181 -#define SYS_chown 182 -#define SYS_getcwd 183 -#define SYS_capget 184 -#define SYS_capset 185 -#define SYS_sigaltstack 186 -#define SYS_sendfile 187 -#define SYS_vfork 190 -#define SYS_ugetrlimit 191 -#define SYS_mmap2 192 -#define SYS_truncate64 193 -#define SYS_ftruncate64 194 -#define SYS_stat64 195 -#define SYS_lstat64 196 -#define SYS_fstat64 197 -#define SYS_lchown32 198 -#define SYS_getuid32 199 -#define SYS_getgid32 200 -#define SYS_geteuid32 201 -#define SYS_getegid32 202 -#define SYS_setreuid32 203 -#define SYS_setregid32 204 -#define SYS_getgroups32 205 -#define SYS_setgroups32 206 -#define SYS_fchown32 207 -#define SYS_setresuid32 208 -#define SYS_getresuid32 209 -#define SYS_setresgid32 210 -#define SYS_getresgid32 211 -#define SYS_chown32 212 -#define SYS_setuid32 213 -#define SYS_setgid32 214 -#define SYS_setfsuid32 215 -#define SYS_setfsgid32 216 -#define SYS_getdents64 217 -#define SYS_pivot_root 218 -#define SYS_mincore 219 -#define SYS_madvise 220 -#define SYS_fcntl64 221 -#define SYS_gettid 224 -#define SYS_readahead 225 -#define SYS_setxattr 226 -#define SYS_lsetxattr 227 -#define SYS_fsetxattr 228 -#define SYS_getxattr 229 -#define SYS_lgetxattr 230 -#define SYS_fgetxattr 231 -#define SYS_listxattr 232 -#define SYS_llistxattr 233 -#define SYS_flistxattr 234 -#define SYS_removexattr 235 -#define SYS_lremovexattr 236 -#define SYS_fremovexattr 237 -#define SYS_tkill 238 -#define SYS_sendfile64 239 -#define SYS_futex 240 -#define SYS_sched_setaffinity 241 -#define SYS_sched_getaffinity 242 -#define SYS_io_setup 243 -#define SYS_io_destroy 244 -#define SYS_io_getevents 245 -#define SYS_io_submit 246 -#define SYS_io_cancel 247 -#define SYS_exit_group 248 -#define SYS_lookup_dcookie 249 -#define SYS_epoll_create 250 -#define SYS_epoll_ctl 251 -#define SYS_epoll_wait 252 -#define SYS_remap_file_pages 253 -#define SYS_set_tid_address 256 -#define SYS_timer_create 257 -#define SYS_timer_settime 258 -#define SYS_timer_gettime 259 -#define SYS_timer_getoverrun 260 -#define SYS_timer_delete 261 -#define SYS_clock_settime 262 -#define SYS_clock_gettime 263 -#define SYS_clock_getres 264 -#define SYS_clock_nanosleep 265 -#define SYS_statfs64 266 -#define SYS_fstatfs64 267 -#define SYS_tgkill 268 -#define SYS_utimes 269 -#define SYS_fadvise64_64 270 -#define SYS_arm_fadvise64_64 270 -#define SYS_pciconfig_iobase 271 -#define SYS_pciconfig_read 272 -#define SYS_pciconfig_write 273 -#define SYS_mq_open 274 -#define SYS_mq_unlink 275 -#define SYS_mq_timedsend 276 -#define SYS_mq_timedreceive 277 -#define SYS_mq_notify 278 -#define SYS_mq_getsetattr 279 -#define SYS_waitid 280 -#define SYS_socket 281 -#define SYS_bind 282 -#define SYS_connect 283 -#define SYS_listen 284 -#define SYS_accept 285 -#define SYS_getsockname 286 -#define SYS_getpeername 287 -#define SYS_socketpair 288 -#define SYS_send 289 -#define SYS_sendto 290 -#define SYS_recv 291 -#define SYS_recvfrom 292 -#define SYS_shutdown 293 -#define SYS_setsockopt 294 -#define SYS_getsockopt 295 -#define SYS_sendmsg 296 -#define SYS_recvmsg 297 -#define SYS_semop 298 -#define SYS_semget 299 -#define SYS_semctl 300 -#define SYS_msgsnd 301 -#define SYS_msgrcv 302 -#define SYS_msgget 303 -#define SYS_msgctl 304 -#define SYS_shmat 305 -#define SYS_shmdt 306 -#define SYS_shmget 307 -#define SYS_shmctl 308 -#define SYS_add_key 309 -#define SYS_request_key 310 -#define SYS_keyctl 311 -#define SYS_semtimedop 312 -#define SYS_vserver 313 -#define SYS_ioprio_set 314 -#define SYS_ioprio_get 315 -#define SYS_inotify_init 316 -#define SYS_inotify_add_watch 317 -#define SYS_inotify_rm_watch 318 -#define SYS_mbind 319 -#define SYS_get_mempolicy 320 -#define SYS_set_mempolicy 321 -#define SYS_openat 322 -#define SYS_mkdirat 323 -#define SYS_mknodat 324 -#define SYS_fchownat 325 -#define SYS_futimesat 326 -#define SYS_fstatat64 327 -#define SYS_unlinkat 328 -#define SYS_renameat 329 -#define SYS_linkat 330 -#define SYS_symlinkat 331 -#define SYS_readlinkat 332 -#define SYS_fchmodat 333 -#define SYS_faccessat 334 -#define SYS_pselect6 335 -#define SYS_ppoll 336 -#define SYS_unshare 337 -#define SYS_set_robust_list 338 -#define SYS_get_robust_list 339 -#define SYS_splice 340 -#define SYS_sync_file_range2 341 -#define SYS_arm_sync_file_range 341 -#define SYS_tee 342 -#define SYS_vmsplice 343 -#define SYS_move_pages 344 -#define SYS_getcpu 345 -#define SYS_epoll_pwait 346 -#define SYS_kexec_load 347 -#define SYS_utimensat 348 -#define SYS_signalfd 349 -#define SYS_timerfd_create 350 -#define SYS_eventfd 351 -#define SYS_fallocate 352 -#define SYS_timerfd_settime 353 -#define SYS_timerfd_gettime 354 -#define SYS_signalfd4 355 -#define SYS_eventfd2 356 -#define SYS_epoll_create1 357 -#define SYS_dup3 358 -#define SYS_pipe2 359 -#define SYS_inotify_init1 360 -#define SYS_preadv 361 -#define SYS_pwritev 362 -#define SYS_rt_tgsigqueueinfo 363 -#define SYS_perf_event_open 364 -#define SYS_recvmmsg 365 -#define SYS_accept4 366 -#define SYS_fanotify_init 367 -#define SYS_fanotify_mark 368 -#define SYS_prlimit64 369 -#define SYS_name_to_handle_at 370 -#define SYS_open_by_handle_at 371 -#define SYS_clock_adjtime 372 -#define SYS_syncfs 373 -#define SYS_sendmmsg 374 -#define SYS_setns 375 -#define SYS_process_vm_readv 376 -#define SYS_process_vm_writev 377 -#define SYS_kcmp 378 -#define SYS_finit_module 379 -#define SYS_sched_setattr 380 -#define SYS_sched_getattr 381 -#define SYS_renameat2 382 -#define SYS_seccomp 383 -#define SYS_getrandom 384 -#define SYS_memfd_create 385 -#define SYS_bpf 386 -#define SYS_execveat 387 -#define SYS_userfaultfd 388 -#define SYS_membarrier 389 -#define SYS_mlock2 390 -#define SYS_copy_file_range 391 -#define SYS_preadv2 392 -#define SYS_pwritev2 393 -#define SYS_pkey_mprotect 394 -#define SYS_pkey_alloc 395 -#define SYS_pkey_free 396 -#define SYS_statx 397 -#define SYS_rseq 398 \ No newline at end of file +#define SYS_io_setup 0 +#define SYS_io_destroy 1 +#define SYS_io_submit 2 +#define SYS_io_cancel 3 +#define SYS_io_getevents 4 +#define SYS_setxattr 5 +#define SYS_lsetxattr 6 +#define SYS_fsetxattr 7 +#define SYS_getxattr 8 +#define SYS_lgetxattr 9 +#define SYS_fgetxattr 10 +#define SYS_listxattr 11 +#define SYS_llistxattr 12 +#define SYS_flistxattr 13 +#define SYS_removexattr 14 +#define SYS_lremovexattr 15 +#define SYS_fremovexattr 16 +#define SYS_getcwd 17 +#define SYS_lookup_dcookie 18 +#define SYS_eventfd2 19 +#define SYS_epoll_create1 20 +#define SYS_epoll_ctl 21 +#define SYS_epoll_pwait 22 +#define SYS_dup 23 +#define SYS_dup3 24 +#define SYS_fcntl 25 +#define SYS_inotify_init1 26 +#define SYS_inotify_add_watch 27 +#define SYS_inotify_rm_watch 28 +#define SYS_ioctl 29 +#define SYS_ioprio_set 30 +#define SYS_ioprio_get 31 +#define SYS_flock 32 +#define SYS_mknodat 33 +#define SYS_mkdirat 34 +#define SYS_unlinkat 35 +#define SYS_symlinkat 36 +#define SYS_linkat 37 +#define SYS_renameat 38 +#define SYS_umount2 39 +#define SYS_mount 40 +#define SYS_pivot_root 41 +#define SYS_nfsservctl 42 +#define SYS_statfs 43 +#define SYS_fstatfs 44 +#define SYS_truncate 45 +#define SYS_ftruncate 46 +#define SYS_fallocate 47 +#define SYS_faccessat 48 +#define SYS_chdir 49 +#define SYS_fchdir 50 +#define SYS_chroot 51 +#define SYS_fchmod 52 +#define SYS_fchmodat 53 +#define SYS_fchownat 54 +#define SYS_fchown 55 +#define SYS_openat 56 +#define SYS_close 57 +#define SYS_vhangup 58 +#define SYS_pipe2 59 +#define SYS_quotactl 60 +#define SYS_getdents64 61 +#define SYS_lseek 62 +#define SYS_read 63 +#define SYS_write 64 +#define SYS_readv 65 +#define SYS_writev 66 +#define SYS_pread64 67 +#define SYS_pwrite64 68 +#define SYS_preadv 69 +#define SYS_pwritev 70 +#define SYS_sendfile 71 +#define SYS_pselect6 72 +#define SYS_ppoll 73 +#define SYS_signalfd4 74 +#define SYS_vmsplice 75 +#define SYS_splice 76 +#define SYS_tee 77 +#define SYS_readlinkat 78 +#define SYS_newfstatat 79 +#define SYS_fstat 80 +#define SYS_sync 81 +#define SYS_fsync 82 +#define SYS_fdatasync 83 +#define SYS_sync_file_range 84 +#define SYS_timerfd_create 85 +#define SYS_timerfd_settime 86 +#define SYS_timerfd_gettime 87 +#define SYS_utimensat 88 +#define SYS_acct 89 +#define SYS_capget 90 +#define SYS_capset 91 +#define SYS_personality 92 +#define SYS_exit 93 +#define SYS_exit_group 94 +#define SYS_waitid 95 +#define SYS_set_tid_address 96 +#define SYS_unshare 97 +#define SYS_futex 98 +#define SYS_set_robust_list 99 +#define SYS_get_robust_list 100 +#define SYS_nanosleep 101 +#define SYS_getitimer 102 +#define SYS_setitimer 103 +#define SYS_kexec_load 104 +#define SYS_init_module 105 +#define SYS_delete_module 106 +#define SYS_timer_create 107 +#define SYS_timer_gettime 108 +#define SYS_timer_getoverrun 109 +#define SYS_timer_settime 110 +#define SYS_timer_delete 111 +#define SYS_clock_settime 112 +#define SYS_clock_gettime 113 +#define SYS_clock_getres 114 +#define SYS_clock_nanosleep 115 +#define SYS_syslog 116 +#define SYS_ptrace 117 +#define SYS_sched_setparam 118 +#define SYS_sched_setscheduler 119 +#define SYS_sched_getscheduler 120 +#define SYS_sched_getparam 121 +#define SYS_sched_setaffinity 122 +#define SYS_sched_getaffinity 123 +#define SYS_sched_yield 124 +#define SYS_sched_get_priority_max 125 +#define SYS_sched_get_priority_min 126 +#define SYS_sched_rr_get_interval 127 +#define SYS_restart_syscall 128 +#define SYS_kill 129 +#define SYS_tkill 130 +#define SYS_tgkill 131 +#define SYS_sigaltstack 132 +#define SYS_rt_sigsuspend 133 +#define SYS_rt_sigaction 134 +#define SYS_rt_sigprocmask 135 +#define SYS_rt_sigpending 136 +#define SYS_rt_sigtimedwait 137 +#define SYS_rt_sigqueueinfo 138 +#define SYS_rt_sigreturn 139 +#define SYS_setpriority 140 +#define SYS_getpriority 141 +#define SYS_reboot 142 +#define SYS_setregid 143 +#define SYS_setgid 144 +#define SYS_setreuid 145 +#define SYS_setuid 146 +#define SYS_setresuid 147 +#define SYS_getresuid 148 +#define SYS_setresgid 149 +#define SYS_getresgid 150 +#define SYS_setfsuid 151 +#define SYS_setfsgid 152 +#define SYS_times 153 +#define SYS_setpgid 154 +#define SYS_getpgid 155 +#define SYS_getsid 156 +#define SYS_setsid 157 +#define SYS_getgroups 158 +#define SYS_setgroups 159 +#define SYS_uname 160 +#define SYS_sethostname 161 +#define SYS_setdomainname 162 +#define SYS_getrlimit 163 +#define SYS_setrlimit 164 +#define SYS_getrusage 165 +#define SYS_umask 166 +#define SYS_prctl 167 +#define SYS_getcpu 168 +#define SYS_gettimeofday 169 +#define SYS_settimeofday 170 +#define SYS_adjtimex 171 +#define SYS_getpid 172 +#define SYS_getppid 173 +#define SYS_getuid 174 +#define SYS_geteuid 175 +#define SYS_getgid 176 +#define SYS_getegid 177 +#define SYS_gettid 178 +#define SYS_sysinfo 179 +#define SYS_mq_open 180 +#define SYS_mq_unlink 181 +#define SYS_mq_timedsend 182 +#define SYS_mq_timedreceive 183 +#define SYS_mq_notify 184 +#define SYS_mq_getsetattr 185 +#define SYS_msgget 186 +#define SYS_msgctl 187 +#define SYS_msgrcv 188 +#define SYS_msgsnd 189 +#define SYS_semget 190 +#define SYS_semctl 191 +#define SYS_semtimedop 192 +#define SYS_semop 193 +#define SYS_shmget 194 +#define SYS_shmctl 195 +#define SYS_shmat 196 +#define SYS_shmdt 197 +#define SYS_socket 198 +#define SYS_socketpair 199 +#define SYS_bind 200 +#define SYS_listen 201 +#define SYS_accept 202 +#define SYS_connect 203 +#define SYS_getsockname 204 +#define SYS_getpeername 205 +#define SYS_sendto 206 +#define SYS_recvfrom 207 +#define SYS_setsockopt 208 +#define SYS_getsockopt 209 +#define SYS_shutdown 210 +#define SYS_sendmsg 211 +#define SYS_recvmsg 212 +#define SYS_readahead 213 +#define SYS_brk 214 +#define SYS_munmap 215 +#define SYS_mremap 216 +#define SYS_add_key 217 +#define SYS_request_key 218 +#define SYS_keyctl 219 +#define SYS_clone 220 +#define SYS_execve 221 +#define SYS_mmap 222 +#define SYS_fadvise64 223 +#define SYS_swapon 224 +#define SYS_swapoff 225 +#define SYS_mprotect 226 +#define SYS_msync 227 +#define SYS_mlock 228 +#define SYS_munlock 229 +#define SYS_mlockall 230 +#define SYS_munlockall 231 +#define SYS_mincore 232 +#define SYS_madvise 233 +#define SYS_remap_file_pages 234 +#define SYS_mbind 235 +#define SYS_get_mempolicy 236 +#define SYS_set_mempolicy 237 +#define SYS_migrate_pages 238 +#define SYS_move_pages 239 +#define SYS_rt_tgsigqueueinfo 240 +#define SYS_perf_event_open 241 +#define SYS_accept4 242 +#define SYS_recvmmsg 243 +#define SYS_wait4 260 +#define SYS_prlimit64 261 +#define SYS_fanotify_init 262 +#define SYS_fanotify_mark 263 +#define SYS_name_to_handle_at 264 +#define SYS_open_by_handle_at 265 +#define SYS_clock_adjtime 266 +#define SYS_syncfs 267 +#define SYS_setns 268 +#define SYS_sendmmsg 269 +#define SYS_process_vm_readv 270 +#define SYS_process_vm_writev 271 +#define SYS_kcmp 272 +#define SYS_finit_module 273 +#define SYS_sched_setattr 274 +#define SYS_sched_getattr 275 +#define SYS_renameat2 276 +#define SYS_seccomp 277 +#define SYS_getrandom 278 +#define SYS_memfd_create 279 +#define SYS_bpf 280 +#define SYS_execveat 281 +#define SYS_userfaultfd 282 +#define SYS_membarrier 283 +#define SYS_mlock2 284 +#define SYS_copy_file_range 285 +#define SYS_preadv2 286 +#define SYS_pwritev2 287 +#define SYS_pkey_mprotect 288 +#define SYS_pkey_alloc 289 +#define SYS_pkey_free 290 +#define SYS_statx 291 +#define SYS_io_pgetevents 292 +#define SYS_rseq 293 +#define SYS_kexec_file_load 294 +#define SYS_pidfd_send_signal 424 +#define SYS_io_uring_setup 425 +#define SYS_io_uring_enter 426 +#define SYS_io_uring_register 427 \ No newline at end of file diff --git a/lib/libc/include/generic-musl/diagnostics.h b/lib/libc/include/generic-musl/diagnostics.h deleted file mode 100644 index 4e50621c53..0000000000 --- a/lib/libc/include/generic-musl/diagnostics.h +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright (C) 2017-2019 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 . */ - -#ifndef DIAGNOSTICS_H -#define DIAGNOSTICS_H - -/* If at all possible, fix the source rather than using these macros - to silence warnings. If you do use these macros be aware that - you'll need to condition their use on particular compiler versions, - which can be done for gcc using ansidecl.h's GCC_VERSION macro. - - gcc versions between 4.2 and 4.6 do not allow pragma control of - diagnostics inside functions, giving a hard error if you try to use - the finer control available with later versions. - gcc prior to 4.2 warns about diagnostic push and pop. - - The other macros have restrictions too, for example gcc-5, gcc-6 - and gcc-7 warn that -Wstringop-truncation is unknown, unless you - also add DIAGNOSTIC_IGNORE ("-Wpragma"). */ - -#ifdef __GNUC__ -# define DIAGNOSTIC_PUSH _Pragma ("GCC diagnostic push") -# define DIAGNOSTIC_POP _Pragma ("GCC diagnostic pop") - -/* Stringification. */ -# define DIAGNOSTIC_STRINGIFY_1(x) #x -# define DIAGNOSTIC_STRINGIFY(x) DIAGNOSTIC_STRINGIFY_1 (x) - -# define DIAGNOSTIC_IGNORE(option) \ - _Pragma (DIAGNOSTIC_STRINGIFY (GCC diagnostic ignored option)) -#else -# define DIAGNOSTIC_PUSH -# define DIAGNOSTIC_POP -# define DIAGNOSTIC_IGNORE(option) -#endif - -#if defined (__clang__) /* clang */ - -# define DIAGNOSTIC_IGNORE_SELF_MOVE DIAGNOSTIC_IGNORE ("-Wself-move") -# define DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS \ - DIAGNOSTIC_IGNORE ("-Wdeprecated-declarations") -# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER \ - DIAGNOSTIC_IGNORE ("-Wdeprecated-register") -# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \ - DIAGNOSTIC_IGNORE ("-Wunused-function") -# if __has_warning ("-Wenum-compare-switch") -# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES \ - DIAGNOSTIC_IGNORE ("-Wenum-compare-switch") -# endif - -# define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL \ - DIAGNOSTIC_IGNORE ("-Wformat-nonliteral") - -#elif defined (__GNUC__) /* GCC */ - -# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \ - DIAGNOSTIC_IGNORE ("-Wunused-function") - -# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \ - DIAGNOSTIC_IGNORE ("-Wstringop-truncation") - -# define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL \ - DIAGNOSTIC_IGNORE ("-Wformat-nonliteral") - -#endif - -#ifndef DIAGNOSTIC_IGNORE_SELF_MOVE -# define DIAGNOSTIC_IGNORE_SELF_MOVE -#endif - -#ifndef DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS -# define DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS -#endif - -#ifndef DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER -# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER -#endif - -#ifndef DIAGNOSTIC_IGNORE_UNUSED_FUNCTION -# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION -#endif - -#ifndef DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES -# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES -#endif - -#ifndef DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION -# define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION -#endif - -#ifndef DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL -# define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL -#endif - -#endif /* DIAGNOSTICS_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/dis-asm.h b/lib/libc/include/generic-musl/dis-asm.h deleted file mode 100644 index cff4b8cd5b..0000000000 --- a/lib/libc/include/generic-musl/dis-asm.h +++ /dev/null @@ -1,397 +0,0 @@ -/* Interface between the opcode library and its callers. - - Copyright (C) 1999-2019 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, 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. - - Written by Cygnus Support, 1993. - - The opcode library (libopcodes.a) provides instruction decoders for - a large variety of instruction sets, callable with an identical - interface, for making instruction-processing programs more independent - of the instruction set being processed. */ - -#ifndef DIS_ASM_H -#define DIS_ASM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include "bfd.h" - - typedef int (*fprintf_ftype) (void *, const char*, ...) ATTRIBUTE_FPTR_PRINTF_2; - -enum dis_insn_type -{ - dis_noninsn, /* Not a valid instruction. */ - dis_nonbranch, /* Not a branch instruction. */ - dis_branch, /* Unconditional branch. */ - dis_condbranch, /* Conditional branch. */ - dis_jsr, /* Jump to subroutine. */ - dis_condjsr, /* Conditional jump to subroutine. */ - dis_dref, /* Data reference instruction. */ - dis_dref2 /* Two data references in instruction. */ -}; - -/* This struct is passed into the instruction decoding routine, - and is passed back out into each callback. The various fields are used - for conveying information from your main routine into your callbacks, - for passing information into the instruction decoders (such as the - addresses of the callback functions), or for passing information - back from the instruction decoders to their callers. - - It must be initialized before it is first passed; this can be done - by hand, or using one of the initialization macros below. */ - -typedef struct disassemble_info -{ - fprintf_ftype fprintf_func; - void *stream; - void *application_data; - - /* Target description. We could replace this with a pointer to the bfd, - but that would require one. There currently isn't any such requirement - so to avoid introducing one we record these explicitly. */ - /* The bfd_flavour. This can be bfd_target_unknown_flavour. */ - enum bfd_flavour flavour; - /* The bfd_arch value. */ - enum bfd_architecture arch; - /* The bfd_mach value. */ - unsigned long mach; - /* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */ - enum bfd_endian endian; - /* Endianness of code, for mixed-endian situations such as ARM BE8. */ - enum bfd_endian endian_code; - /* An arch/mach-specific bitmask of selected instruction subsets, mainly - for processors with run-time-switchable instruction sets. The default, - zero, means that there is no constraint. CGEN-based opcodes ports - may use ISA_foo masks. */ - void *insn_sets; - - /* Some targets need information about the current section to accurately - display insns. If this is NULL, the target disassembler function - will have to make its best guess. */ - asection *section; - - /* An array of pointers to symbols either at the location being disassembled - or at the start of the function being disassembled. The array is sorted - so that the first symbol is intended to be the one used. The others are - present for any misc. purposes. This is not set reliably, but if it is - not NULL, it is correct. */ - asymbol **symbols; - /* Number of symbols in array. */ - int num_symbols; - - /* Symbol table provided for targets that want to look at it. This is - used on Arm to find mapping symbols and determine Arm/Thumb code. */ - asymbol **symtab; - int symtab_pos; - int symtab_size; - - /* For use by the disassembler. - The top 16 bits are reserved for public use (and are documented here). - The bottom 16 bits are for the internal use of the disassembler. */ - unsigned long flags; - /* Set if the disassembler has determined that there are one or more - relocations associated with the instruction being disassembled. */ -#define INSN_HAS_RELOC (1 << 31) - /* Set if the user has requested the disassembly of data as well as code. */ -#define DISASSEMBLE_DATA (1 << 30) - /* Set if the user has specifically set the machine type encoded in the - mach field of this structure. */ -#define USER_SPECIFIED_MACHINE_TYPE (1 << 29) - - /* Use internally by the target specific disassembly code. */ - void *private_data; - - /* Function used to get bytes to disassemble. MEMADDR is the - address of the stuff to be disassembled, MYADDR is the address to - put the bytes in, and LENGTH is the number of bytes to read. - INFO is a pointer to this struct. - Returns an errno value or 0 for success. */ - int (*read_memory_func) - (bfd_vma memaddr, bfd_byte *myaddr, unsigned int length, - struct disassemble_info *dinfo); - - /* Function which should be called if we get an error that we can't - recover from. STATUS is the errno value from read_memory_func and - MEMADDR is the address that we were trying to read. INFO is a - pointer to this struct. */ - void (*memory_error_func) - (int status, bfd_vma memaddr, struct disassemble_info *dinfo); - - /* Function called to print ADDR. */ - void (*print_address_func) - (bfd_vma addr, struct disassemble_info *dinfo); - - /* Function called to determine if there is a symbol at the given ADDR. - If there is, the function returns 1, otherwise it returns 0. - This is used by ports which support an overlay manager where - the overlay number is held in the top part of an address. In - some circumstances we want to include the overlay number in the - address, (normally because there is a symbol associated with - that address), but sometimes we want to mask out the overlay bits. */ - int (* symbol_at_address_func) - (bfd_vma addr, struct disassemble_info *dinfo); - - /* Function called to check if a SYMBOL is can be displayed to the user. - This is used by some ports that want to hide special symbols when - displaying debugging outout. */ - bfd_boolean (* symbol_is_valid) - (asymbol *, struct disassemble_info *dinfo); - - /* These are for buffer_read_memory. */ - bfd_byte *buffer; - bfd_vma buffer_vma; - size_t buffer_length; - - /* This variable may be set by the instruction decoder. It suggests - the number of bytes objdump should display on a single line. If - the instruction decoder sets this, it should always set it to - the same value in order to get reasonable looking output. */ - int bytes_per_line; - - /* The next two variables control the way objdump displays the raw data. */ - /* For example, if bytes_per_line is 8 and bytes_per_chunk is 4, the */ - /* output will look like this: - 00: 00000000 00000000 - with the chunks displayed according to "display_endian". */ - int bytes_per_chunk; - enum bfd_endian display_endian; - - /* Number of octets per incremented target address - Normally one, but some DSPs have byte sizes of 16 or 32 bits. */ - unsigned int octets_per_byte; - - /* The number of zeroes we want to see at the end of a section before we - start skipping them. */ - unsigned int skip_zeroes; - - /* The number of zeroes to skip at the end of a section. If the number - of zeroes at the end is between SKIP_ZEROES_AT_END and SKIP_ZEROES, - they will be disassembled. If there are fewer than - SKIP_ZEROES_AT_END, they will be skipped. This is a heuristic - attempt to avoid disassembling zeroes inserted by section - alignment. */ - unsigned int skip_zeroes_at_end; - - /* Whether the disassembler always needs the relocations. */ - bfd_boolean disassembler_needs_relocs; - - /* Results from instruction decoders. Not all decoders yet support - this information. This info is set each time an instruction is - decoded, and is only valid for the last such instruction. - - To determine whether this decoder supports this information, set - insn_info_valid to 0, decode an instruction, then check it. */ - - char insn_info_valid; /* Branch info has been set. */ - char branch_delay_insns; /* How many sequential insn's will run before - a branch takes effect. (0 = normal) */ - char data_size; /* Size of data reference in insn, in bytes */ - enum dis_insn_type insn_type; /* Type of instruction */ - bfd_vma target; /* Target address of branch or dref, if known; - zero if unknown. */ - bfd_vma target2; /* Second target address for dref2 */ - - /* Command line options specific to the target disassembler. */ - const char *disassembler_options; - - /* If non-zero then try not disassemble beyond this address, even if - there are values left in the buffer. This address is the address - of the nearest symbol forwards from the start of the disassembly, - and it is assumed that it lies on the boundary between instructions. - If an instruction spans this address then this is an error in the - file being disassembled. */ - bfd_vma stop_vma; - -} disassemble_info; - -/* This struct is used to pass information about valid disassembler - option arguments from the target to the generic GDB functions - that set and display them. */ - -typedef struct -{ - /* Option argument name to use in descriptions. */ - const char *name; - - /* Vector of acceptable option argument values, NULL-terminated. */ - const char **values; -} disasm_option_arg_t; - -/* This struct is used to pass information about valid disassembler - options, their descriptions and arguments from the target to the - generic GDB functions that set and display them. Options are - defined by tuples of vector entries at each index. */ - -typedef struct -{ - /* Vector of option names, NULL-terminated. */ - const char **name; - - /* Vector of option descriptions or NULL if none to be shown. */ - const char **description; - - /* Vector of option argument information pointers or NULL if no - option accepts an argument. NULL entries denote individual - options that accept no argument. */ - const disasm_option_arg_t **arg; -} disasm_options_t; - -/* This struct is used to pass information about valid disassembler - options and arguments from the target to the generic GDB functions - that set and display them. */ - -typedef struct -{ - /* Valid disassembler options. Individual options that support - an argument will refer to entries in the ARGS vector. */ - disasm_options_t options; - - /* Vector of acceptable option arguments, NULL-terminated. This - collects all possible option argument choices, some of which - may be shared by different options from the OPTIONS member. */ - disasm_option_arg_t *args; -} disasm_options_and_args_t; - -/* Standard disassemblers. Disassemble one instruction at the given - target address. Return number of octets processed. */ -typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *); - -/* Disassemblers used out side of opcodes library. */ -extern int print_insn_m32c (bfd_vma, disassemble_info *); -extern int print_insn_mep (bfd_vma, disassemble_info *); -extern int print_insn_s12z (bfd_vma, disassemble_info *); -extern int print_insn_sh (bfd_vma, disassemble_info *); -extern int print_insn_sparc (bfd_vma, disassemble_info *); -extern int print_insn_rx (bfd_vma, disassemble_info *); -extern int print_insn_rl78 (bfd_vma, disassemble_info *); -extern int print_insn_rl78_g10 (bfd_vma, disassemble_info *); -extern int print_insn_rl78_g13 (bfd_vma, disassemble_info *); -extern int print_insn_rl78_g14 (bfd_vma, disassemble_info *); - -extern disassembler_ftype arc_get_disassembler (bfd *); -extern disassembler_ftype cris_get_disassembler (bfd *); - -extern void print_aarch64_disassembler_options (FILE *); -extern void print_i386_disassembler_options (FILE *); -extern void print_mips_disassembler_options (FILE *); -extern void print_nfp_disassembler_options (FILE *); -extern void print_ppc_disassembler_options (FILE *); -extern void print_riscv_disassembler_options (FILE *); -extern void print_arm_disassembler_options (FILE *); -extern void print_arc_disassembler_options (FILE *); -extern void print_s390_disassembler_options (FILE *); -extern void print_wasm32_disassembler_options (FILE *); -extern bfd_boolean aarch64_symbol_is_valid (asymbol *, struct disassemble_info *); -extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *); -extern bfd_boolean csky_symbol_is_valid (asymbol *, struct disassemble_info *); -extern bfd_boolean riscv_symbol_is_valid (asymbol *, struct disassemble_info *); -extern void disassemble_init_powerpc (struct disassemble_info *); -extern void disassemble_init_s390 (struct disassemble_info *); -extern void disassemble_init_wasm32 (struct disassemble_info *); -extern void disassemble_init_nds32 (struct disassemble_info *); -extern const disasm_options_and_args_t *disassembler_options_arm (void); -extern const disasm_options_and_args_t *disassembler_options_mips (void); -extern const disasm_options_and_args_t *disassembler_options_powerpc (void); -extern const disasm_options_and_args_t *disassembler_options_s390 (void); - -/* Fetch the disassembler for a given architecture ARC, endianess (big - endian if BIG is true), bfd_mach value MACH, and ABFD, if that support - is available. ABFD may be NULL. */ -extern disassembler_ftype disassembler (enum bfd_architecture arc, - bfd_boolean big, unsigned long mach, - bfd *abfd); - -/* Amend the disassemble_info structure as necessary for the target architecture. - Should only be called after initialising the info->arch field. */ -extern void disassemble_init_for_target (struct disassemble_info * dinfo); - -/* Document any target specific options available from the disassembler. */ -extern void disassembler_usage (FILE *); - -/* Remove whitespace and consecutive commas. */ -extern char *remove_whitespace_and_extra_commas (char *); - -/* Like STRCMP, but treat ',' the same as '\0' so that we match - strings like "foobar" against "foobar,xxyyzz,...". */ -extern int disassembler_options_cmp (const char *, const char *); - -/* A helper function for FOR_EACH_DISASSEMBLER_OPTION. */ -static inline const char * -next_disassembler_option (const char *options) -{ - const char *opt = strchr (options, ','); - if (opt != NULL) - opt++; - return opt; -} - -/* A macro for iterating over each comma separated option in OPTIONS. */ -#define FOR_EACH_DISASSEMBLER_OPTION(OPT, OPTIONS) \ - for ((OPT) = (OPTIONS); \ - (OPT) != NULL; \ - (OPT) = next_disassembler_option (OPT)) - - -/* This block of definitions is for particular callers who read instructions - into a buffer before calling the instruction decoder. */ - -/* Here is a function which callers may wish to use for read_memory_func. - It gets bytes from a buffer. */ -extern int buffer_read_memory - (bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *); - -/* This function goes with buffer_read_memory. - It prints a message using info->fprintf_func and info->stream. */ -extern void perror_memory (int, bfd_vma, struct disassemble_info *); - - -/* Just print the address in hex. This is included for completeness even - though both GDB and objdump provide their own (to print symbolic - addresses). */ -extern void generic_print_address - (bfd_vma, struct disassemble_info *); - -/* Always true. */ -extern int generic_symbol_at_address - (bfd_vma, struct disassemble_info *); - -/* Also always true. */ -extern bfd_boolean generic_symbol_is_valid - (asymbol *, struct disassemble_info *); - -/* Method to initialize a disassemble_info struct. This should be - called by all applications creating such a struct. */ -extern void init_disassemble_info (struct disassemble_info *dinfo, void *stream, - fprintf_ftype fprintf_func); - -/* For compatibility with existing code. */ -#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \ - init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC)) -#define INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) \ - init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC)) - - -#ifdef __cplusplus -} -#endif - -#endif /* ! defined (DIS_ASM_H) */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/amdgpu_drm.h b/lib/libc/include/generic-musl/drm/amdgpu_drm.h deleted file mode 100644 index af63e431b1..0000000000 --- a/lib/libc/include/generic-musl/drm/amdgpu_drm.h +++ /dev/null @@ -1,994 +0,0 @@ -/* amdgpu_drm.h -- Public header for the amdgpu driver -*- linux-c -*- - * - * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. - * Copyright 2000 VA Linux Systems, Inc., Fremont, California. - * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas. - * Copyright 2014 Advanced Micro Devices, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Kevin E. Martin - * Gareth Hughes - * Keith Whitwell - */ - -#ifndef __AMDGPU_DRM_H__ -#define __AMDGPU_DRM_H__ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#define DRM_AMDGPU_GEM_CREATE 0x00 -#define DRM_AMDGPU_GEM_MMAP 0x01 -#define DRM_AMDGPU_CTX 0x02 -#define DRM_AMDGPU_BO_LIST 0x03 -#define DRM_AMDGPU_CS 0x04 -#define DRM_AMDGPU_INFO 0x05 -#define DRM_AMDGPU_GEM_METADATA 0x06 -#define DRM_AMDGPU_GEM_WAIT_IDLE 0x07 -#define DRM_AMDGPU_GEM_VA 0x08 -#define DRM_AMDGPU_WAIT_CS 0x09 -#define DRM_AMDGPU_GEM_OP 0x10 -#define DRM_AMDGPU_GEM_USERPTR 0x11 -#define DRM_AMDGPU_WAIT_FENCES 0x12 -#define DRM_AMDGPU_VM 0x13 -#define DRM_AMDGPU_FENCE_TO_HANDLE 0x14 -#define DRM_AMDGPU_SCHED 0x15 - -#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) -#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap) -#define DRM_IOCTL_AMDGPU_CTX DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CTX, union drm_amdgpu_ctx) -#define DRM_IOCTL_AMDGPU_BO_LIST DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_BO_LIST, union drm_amdgpu_bo_list) -#define DRM_IOCTL_AMDGPU_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CS, union drm_amdgpu_cs) -#define DRM_IOCTL_AMDGPU_INFO DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_INFO, struct drm_amdgpu_info) -#define DRM_IOCTL_AMDGPU_GEM_METADATA DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_METADATA, struct drm_amdgpu_gem_metadata) -#define DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_WAIT_IDLE, union drm_amdgpu_gem_wait_idle) -#define DRM_IOCTL_AMDGPU_GEM_VA DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_VA, struct drm_amdgpu_gem_va) -#define DRM_IOCTL_AMDGPU_WAIT_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_CS, union drm_amdgpu_wait_cs) -#define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op) -#define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr) -#define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences) -#define DRM_IOCTL_AMDGPU_VM DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_VM, union drm_amdgpu_vm) -#define DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_FENCE_TO_HANDLE, union drm_amdgpu_fence_to_handle) -#define DRM_IOCTL_AMDGPU_SCHED DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_SCHED, union drm_amdgpu_sched) - -/** - * DOC: memory domains - * - * %AMDGPU_GEM_DOMAIN_CPU System memory that is not GPU accessible. - * Memory in this pool could be swapped out to disk if there is pressure. - * - * %AMDGPU_GEM_DOMAIN_GTT GPU accessible system memory, mapped into the - * GPU's virtual address space via gart. Gart memory linearizes non-contiguous - * pages of system memory, allows GPU access system memory in a linezrized - * fashion. - * - * %AMDGPU_GEM_DOMAIN_VRAM Local video memory. For APUs, it is memory - * carved out by the BIOS. - * - * %AMDGPU_GEM_DOMAIN_GDS Global on-chip data storage used to share data - * across shader threads. - * - * %AMDGPU_GEM_DOMAIN_GWS Global wave sync, used to synchronize the - * execution of all the waves on a device. - * - * %AMDGPU_GEM_DOMAIN_OA Ordered append, used by 3D or Compute engines - * for appending data. - */ -#define AMDGPU_GEM_DOMAIN_CPU 0x1 -#define AMDGPU_GEM_DOMAIN_GTT 0x2 -#define AMDGPU_GEM_DOMAIN_VRAM 0x4 -#define AMDGPU_GEM_DOMAIN_GDS 0x8 -#define AMDGPU_GEM_DOMAIN_GWS 0x10 -#define AMDGPU_GEM_DOMAIN_OA 0x20 -#define AMDGPU_GEM_DOMAIN_MASK (AMDGPU_GEM_DOMAIN_CPU | \ - AMDGPU_GEM_DOMAIN_GTT | \ - AMDGPU_GEM_DOMAIN_VRAM | \ - AMDGPU_GEM_DOMAIN_GDS | \ - AMDGPU_GEM_DOMAIN_GWS | \ - AMDGPU_GEM_DOMAIN_OA) - -/* Flag that CPU access will be required for the case of VRAM domain */ -#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0) -/* Flag that CPU access will not work, this VRAM domain is invisible */ -#define AMDGPU_GEM_CREATE_NO_CPU_ACCESS (1 << 1) -/* Flag that USWC attributes should be used for GTT */ -#define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2) -/* Flag that the memory should be in VRAM and cleared */ -#define AMDGPU_GEM_CREATE_VRAM_CLEARED (1 << 3) -/* Flag that create shadow bo(GTT) while allocating vram bo */ -#define AMDGPU_GEM_CREATE_SHADOW (1 << 4) -/* Flag that allocating the BO should use linear VRAM */ -#define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5) -/* Flag that BO is always valid in this VM */ -#define AMDGPU_GEM_CREATE_VM_ALWAYS_VALID (1 << 6) -/* Flag that BO sharing will be explicitly synchronized */ -#define AMDGPU_GEM_CREATE_EXPLICIT_SYNC (1 << 7) -/* Flag that indicates allocating MQD gart on GFX9, where the mtype - * for the second page onward should be set to NC. - */ -#define AMDGPU_GEM_CREATE_MQD_GFX9 (1 << 8) - -struct drm_amdgpu_gem_create_in { - /** the requested memory size */ - __u64 bo_size; - /** physical start_addr alignment in bytes for some HW requirements */ - __u64 alignment; - /** the requested memory domains */ - __u64 domains; - /** allocation flags */ - __u64 domain_flags; -}; - -struct drm_amdgpu_gem_create_out { - /** returned GEM object handle */ - __u32 handle; - __u32 _pad; -}; - -union drm_amdgpu_gem_create { - struct drm_amdgpu_gem_create_in in; - struct drm_amdgpu_gem_create_out out; -}; - -/** Opcode to create new residency list. */ -#define AMDGPU_BO_LIST_OP_CREATE 0 -/** Opcode to destroy previously created residency list */ -#define AMDGPU_BO_LIST_OP_DESTROY 1 -/** Opcode to update resource information in the list */ -#define AMDGPU_BO_LIST_OP_UPDATE 2 - -struct drm_amdgpu_bo_list_in { - /** Type of operation */ - __u32 operation; - /** Handle of list or 0 if we want to create one */ - __u32 list_handle; - /** Number of BOs in list */ - __u32 bo_number; - /** Size of each element describing BO */ - __u32 bo_info_size; - /** Pointer to array describing BOs */ - __u64 bo_info_ptr; -}; - -struct drm_amdgpu_bo_list_entry { - /** Handle of BO */ - __u32 bo_handle; - /** New (if specified) BO priority to be used during migration */ - __u32 bo_priority; -}; - -struct drm_amdgpu_bo_list_out { - /** Handle of resource list */ - __u32 list_handle; - __u32 _pad; -}; - -union drm_amdgpu_bo_list { - struct drm_amdgpu_bo_list_in in; - struct drm_amdgpu_bo_list_out out; -}; - -/* context related */ -#define AMDGPU_CTX_OP_ALLOC_CTX 1 -#define AMDGPU_CTX_OP_FREE_CTX 2 -#define AMDGPU_CTX_OP_QUERY_STATE 3 -#define AMDGPU_CTX_OP_QUERY_STATE2 4 - -/* GPU reset status */ -#define AMDGPU_CTX_NO_RESET 0 -/* this the context caused it */ -#define AMDGPU_CTX_GUILTY_RESET 1 -/* some other context caused it */ -#define AMDGPU_CTX_INNOCENT_RESET 2 -/* unknown cause */ -#define AMDGPU_CTX_UNKNOWN_RESET 3 - -/* indicate gpu reset occured after ctx created */ -#define AMDGPU_CTX_QUERY2_FLAGS_RESET (1<<0) -/* indicate vram lost occured after ctx created */ -#define AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST (1<<1) -/* indicate some job from this context once cause gpu hang */ -#define AMDGPU_CTX_QUERY2_FLAGS_GUILTY (1<<2) - -/* Context priority level */ -#define AMDGPU_CTX_PRIORITY_UNSET -2048 -#define AMDGPU_CTX_PRIORITY_VERY_LOW -1023 -#define AMDGPU_CTX_PRIORITY_LOW -512 -#define AMDGPU_CTX_PRIORITY_NORMAL 0 -/* Selecting a priority above NORMAL requires CAP_SYS_NICE or DRM_MASTER */ -#define AMDGPU_CTX_PRIORITY_HIGH 512 -#define AMDGPU_CTX_PRIORITY_VERY_HIGH 1023 - -struct drm_amdgpu_ctx_in { - /** AMDGPU_CTX_OP_* */ - __u32 op; - /** For future use, no flags defined so far */ - __u32 flags; - __u32 ctx_id; - __s32 priority; -}; - -union drm_amdgpu_ctx_out { - struct { - __u32 ctx_id; - __u32 _pad; - } alloc; - - struct { - /** For future use, no flags defined so far */ - __u64 flags; - /** Number of resets caused by this context so far. */ - __u32 hangs; - /** Reset status since the last call of the ioctl. */ - __u32 reset_status; - } state; -}; - -union drm_amdgpu_ctx { - struct drm_amdgpu_ctx_in in; - union drm_amdgpu_ctx_out out; -}; - -/* vm ioctl */ -#define AMDGPU_VM_OP_RESERVE_VMID 1 -#define AMDGPU_VM_OP_UNRESERVE_VMID 2 - -struct drm_amdgpu_vm_in { - /** AMDGPU_VM_OP_* */ - __u32 op; - __u32 flags; -}; - -struct drm_amdgpu_vm_out { - /** For future use, no flags defined so far */ - __u64 flags; -}; - -union drm_amdgpu_vm { - struct drm_amdgpu_vm_in in; - struct drm_amdgpu_vm_out out; -}; - -/* sched ioctl */ -#define AMDGPU_SCHED_OP_PROCESS_PRIORITY_OVERRIDE 1 - -struct drm_amdgpu_sched_in { - /* AMDGPU_SCHED_OP_* */ - __u32 op; - __u32 fd; - __s32 priority; - __u32 flags; -}; - -union drm_amdgpu_sched { - struct drm_amdgpu_sched_in in; -}; - -/* - * This is not a reliable API and you should expect it to fail for any - * number of reasons and have fallback path that do not use userptr to - * perform any operation. - */ -#define AMDGPU_GEM_USERPTR_READONLY (1 << 0) -#define AMDGPU_GEM_USERPTR_ANONONLY (1 << 1) -#define AMDGPU_GEM_USERPTR_VALIDATE (1 << 2) -#define AMDGPU_GEM_USERPTR_REGISTER (1 << 3) - -struct drm_amdgpu_gem_userptr { - __u64 addr; - __u64 size; - /* AMDGPU_GEM_USERPTR_* */ - __u32 flags; - /* Resulting GEM handle */ - __u32 handle; -}; - -/* SI-CI-VI: */ -/* same meaning as the GB_TILE_MODE and GL_MACRO_TILE_MODE fields */ -#define AMDGPU_TILING_ARRAY_MODE_SHIFT 0 -#define AMDGPU_TILING_ARRAY_MODE_MASK 0xf -#define AMDGPU_TILING_PIPE_CONFIG_SHIFT 4 -#define AMDGPU_TILING_PIPE_CONFIG_MASK 0x1f -#define AMDGPU_TILING_TILE_SPLIT_SHIFT 9 -#define AMDGPU_TILING_TILE_SPLIT_MASK 0x7 -#define AMDGPU_TILING_MICRO_TILE_MODE_SHIFT 12 -#define AMDGPU_TILING_MICRO_TILE_MODE_MASK 0x7 -#define AMDGPU_TILING_BANK_WIDTH_SHIFT 15 -#define AMDGPU_TILING_BANK_WIDTH_MASK 0x3 -#define AMDGPU_TILING_BANK_HEIGHT_SHIFT 17 -#define AMDGPU_TILING_BANK_HEIGHT_MASK 0x3 -#define AMDGPU_TILING_MACRO_TILE_ASPECT_SHIFT 19 -#define AMDGPU_TILING_MACRO_TILE_ASPECT_MASK 0x3 -#define AMDGPU_TILING_NUM_BANKS_SHIFT 21 -#define AMDGPU_TILING_NUM_BANKS_MASK 0x3 - -/* GFX9 and later: */ -#define AMDGPU_TILING_SWIZZLE_MODE_SHIFT 0 -#define AMDGPU_TILING_SWIZZLE_MODE_MASK 0x1f - -/* Set/Get helpers for tiling flags. */ -#define AMDGPU_TILING_SET(field, value) \ - (((__u64)(value) & AMDGPU_TILING_##field##_MASK) << AMDGPU_TILING_##field##_SHIFT) -#define AMDGPU_TILING_GET(value, field) \ - (((__u64)(value) >> AMDGPU_TILING_##field##_SHIFT) & AMDGPU_TILING_##field##_MASK) - -#define AMDGPU_GEM_METADATA_OP_SET_METADATA 1 -#define AMDGPU_GEM_METADATA_OP_GET_METADATA 2 - -/** The same structure is shared for input/output */ -struct drm_amdgpu_gem_metadata { - /** GEM Object handle */ - __u32 handle; - /** Do we want get or set metadata */ - __u32 op; - struct { - /** For future use, no flags defined so far */ - __u64 flags; - /** family specific tiling info */ - __u64 tiling_info; - __u32 data_size_bytes; - __u32 data[64]; - } data; -}; - -struct drm_amdgpu_gem_mmap_in { - /** the GEM object handle */ - __u32 handle; - __u32 _pad; -}; - -struct drm_amdgpu_gem_mmap_out { - /** mmap offset from the vma offset manager */ - __u64 addr_ptr; -}; - -union drm_amdgpu_gem_mmap { - struct drm_amdgpu_gem_mmap_in in; - struct drm_amdgpu_gem_mmap_out out; -}; - -struct drm_amdgpu_gem_wait_idle_in { - /** GEM object handle */ - __u32 handle; - /** For future use, no flags defined so far */ - __u32 flags; - /** Absolute timeout to wait */ - __u64 timeout; -}; - -struct drm_amdgpu_gem_wait_idle_out { - /** BO status: 0 - BO is idle, 1 - BO is busy */ - __u32 status; - /** Returned current memory domain */ - __u32 domain; -}; - -union drm_amdgpu_gem_wait_idle { - struct drm_amdgpu_gem_wait_idle_in in; - struct drm_amdgpu_gem_wait_idle_out out; -}; - -struct drm_amdgpu_wait_cs_in { - /* Command submission handle - * handle equals 0 means none to wait for - * handle equals ~0ull means wait for the latest sequence number - */ - __u64 handle; - /** Absolute timeout to wait */ - __u64 timeout; - __u32 ip_type; - __u32 ip_instance; - __u32 ring; - __u32 ctx_id; -}; - -struct drm_amdgpu_wait_cs_out { - /** CS status: 0 - CS completed, 1 - CS still busy */ - __u64 status; -}; - -union drm_amdgpu_wait_cs { - struct drm_amdgpu_wait_cs_in in; - struct drm_amdgpu_wait_cs_out out; -}; - -struct drm_amdgpu_fence { - __u32 ctx_id; - __u32 ip_type; - __u32 ip_instance; - __u32 ring; - __u64 seq_no; -}; - -struct drm_amdgpu_wait_fences_in { - /** This points to uint64_t * which points to fences */ - __u64 fences; - __u32 fence_count; - __u32 wait_all; - __u64 timeout_ns; -}; - -struct drm_amdgpu_wait_fences_out { - __u32 status; - __u32 first_signaled; -}; - -union drm_amdgpu_wait_fences { - struct drm_amdgpu_wait_fences_in in; - struct drm_amdgpu_wait_fences_out out; -}; - -#define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0 -#define AMDGPU_GEM_OP_SET_PLACEMENT 1 - -/* Sets or returns a value associated with a buffer. */ -struct drm_amdgpu_gem_op { - /** GEM object handle */ - __u32 handle; - /** AMDGPU_GEM_OP_* */ - __u32 op; - /** Input or return value */ - __u64 value; -}; - -#define AMDGPU_VA_OP_MAP 1 -#define AMDGPU_VA_OP_UNMAP 2 -#define AMDGPU_VA_OP_CLEAR 3 -#define AMDGPU_VA_OP_REPLACE 4 - -/* Delay the page table update till the next CS */ -#define AMDGPU_VM_DELAY_UPDATE (1 << 0) - -/* Mapping flags */ -/* readable mapping */ -#define AMDGPU_VM_PAGE_READABLE (1 << 1) -/* writable mapping */ -#define AMDGPU_VM_PAGE_WRITEABLE (1 << 2) -/* executable mapping, new for VI */ -#define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3) -/* partially resident texture */ -#define AMDGPU_VM_PAGE_PRT (1 << 4) -/* MTYPE flags use bit 5 to 8 */ -#define AMDGPU_VM_MTYPE_MASK (0xf << 5) -/* Default MTYPE. Pre-AI must use this. Recommended for newer ASICs. */ -#define AMDGPU_VM_MTYPE_DEFAULT (0 << 5) -/* Use NC MTYPE instead of default MTYPE */ -#define AMDGPU_VM_MTYPE_NC (1 << 5) -/* Use WC MTYPE instead of default MTYPE */ -#define AMDGPU_VM_MTYPE_WC (2 << 5) -/* Use CC MTYPE instead of default MTYPE */ -#define AMDGPU_VM_MTYPE_CC (3 << 5) -/* Use UC MTYPE instead of default MTYPE */ -#define AMDGPU_VM_MTYPE_UC (4 << 5) - -struct drm_amdgpu_gem_va { - /** GEM object handle */ - __u32 handle; - __u32 _pad; - /** AMDGPU_VA_OP_* */ - __u32 operation; - /** AMDGPU_VM_PAGE_* */ - __u32 flags; - /** va address to assign . Must be correctly aligned.*/ - __u64 va_address; - /** Specify offset inside of BO to assign. Must be correctly aligned.*/ - __u64 offset_in_bo; - /** Specify mapping size. Must be correctly aligned. */ - __u64 map_size; -}; - -#define AMDGPU_HW_IP_GFX 0 -#define AMDGPU_HW_IP_COMPUTE 1 -#define AMDGPU_HW_IP_DMA 2 -#define AMDGPU_HW_IP_UVD 3 -#define AMDGPU_HW_IP_VCE 4 -#define AMDGPU_HW_IP_UVD_ENC 5 -#define AMDGPU_HW_IP_VCN_DEC 6 -#define AMDGPU_HW_IP_VCN_ENC 7 -#define AMDGPU_HW_IP_VCN_JPEG 8 -#define AMDGPU_HW_IP_NUM 9 - -#define AMDGPU_HW_IP_INSTANCE_MAX_COUNT 1 - -#define AMDGPU_CHUNK_ID_IB 0x01 -#define AMDGPU_CHUNK_ID_FENCE 0x02 -#define AMDGPU_CHUNK_ID_DEPENDENCIES 0x03 -#define AMDGPU_CHUNK_ID_SYNCOBJ_IN 0x04 -#define AMDGPU_CHUNK_ID_SYNCOBJ_OUT 0x05 -#define AMDGPU_CHUNK_ID_BO_HANDLES 0x06 - -struct drm_amdgpu_cs_chunk { - __u32 chunk_id; - __u32 length_dw; - __u64 chunk_data; -}; - -struct drm_amdgpu_cs_in { - /** Rendering context id */ - __u32 ctx_id; - /** Handle of resource list associated with CS */ - __u32 bo_list_handle; - __u32 num_chunks; - __u32 _pad; - /** this points to __u64 * which point to cs chunks */ - __u64 chunks; -}; - -struct drm_amdgpu_cs_out { - __u64 handle; -}; - -union drm_amdgpu_cs { - struct drm_amdgpu_cs_in in; - struct drm_amdgpu_cs_out out; -}; - -/* Specify flags to be used for IB */ - -/* This IB should be submitted to CE */ -#define AMDGPU_IB_FLAG_CE (1<<0) - -/* Preamble flag, which means the IB could be dropped if no context switch */ -#define AMDGPU_IB_FLAG_PREAMBLE (1<<1) - -/* Preempt flag, IB should set Pre_enb bit if PREEMPT flag detected */ -#define AMDGPU_IB_FLAG_PREEMPT (1<<2) - -/* The IB fence should do the L2 writeback but not invalidate any shader - * caches (L2/vL1/sL1/I$). */ -#define AMDGPU_IB_FLAG_TC_WB_NOT_INVALIDATE (1 << 3) - -struct drm_amdgpu_cs_chunk_ib { - __u32 _pad; - /** AMDGPU_IB_FLAG_* */ - __u32 flags; - /** Virtual address to begin IB execution */ - __u64 va_start; - /** Size of submission */ - __u32 ib_bytes; - /** HW IP to submit to */ - __u32 ip_type; - /** HW IP index of the same type to submit to */ - __u32 ip_instance; - /** Ring index to submit to */ - __u32 ring; -}; - -struct drm_amdgpu_cs_chunk_dep { - __u32 ip_type; - __u32 ip_instance; - __u32 ring; - __u32 ctx_id; - __u64 handle; -}; - -struct drm_amdgpu_cs_chunk_fence { - __u32 handle; - __u32 offset; -}; - -struct drm_amdgpu_cs_chunk_sem { - __u32 handle; -}; - -#define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ 0 -#define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ_FD 1 -#define AMDGPU_FENCE_TO_HANDLE_GET_SYNC_FILE_FD 2 - -union drm_amdgpu_fence_to_handle { - struct { - struct drm_amdgpu_fence fence; - __u32 what; - __u32 pad; - } in; - struct { - __u32 handle; - } out; -}; - -struct drm_amdgpu_cs_chunk_data { - union { - struct drm_amdgpu_cs_chunk_ib ib_data; - struct drm_amdgpu_cs_chunk_fence fence_data; - }; -}; - -/** - * Query h/w info: Flag that this is integrated (a.h.a. fusion) GPU - * - */ -#define AMDGPU_IDS_FLAGS_FUSION 0x1 -#define AMDGPU_IDS_FLAGS_PREEMPTION 0x2 - -/* indicate if acceleration can be working */ -#define AMDGPU_INFO_ACCEL_WORKING 0x00 -/* get the crtc_id from the mode object id? */ -#define AMDGPU_INFO_CRTC_FROM_ID 0x01 -/* query hw IP info */ -#define AMDGPU_INFO_HW_IP_INFO 0x02 -/* query hw IP instance count for the specified type */ -#define AMDGPU_INFO_HW_IP_COUNT 0x03 -/* timestamp for GL_ARB_timer_query */ -#define AMDGPU_INFO_TIMESTAMP 0x05 -/* Query the firmware version */ -#define AMDGPU_INFO_FW_VERSION 0x0e - /* Subquery id: Query VCE firmware version */ - #define AMDGPU_INFO_FW_VCE 0x1 - /* Subquery id: Query UVD firmware version */ - #define AMDGPU_INFO_FW_UVD 0x2 - /* Subquery id: Query GMC firmware version */ - #define AMDGPU_INFO_FW_GMC 0x03 - /* Subquery id: Query GFX ME firmware version */ - #define AMDGPU_INFO_FW_GFX_ME 0x04 - /* Subquery id: Query GFX PFP firmware version */ - #define AMDGPU_INFO_FW_GFX_PFP 0x05 - /* Subquery id: Query GFX CE firmware version */ - #define AMDGPU_INFO_FW_GFX_CE 0x06 - /* Subquery id: Query GFX RLC firmware version */ - #define AMDGPU_INFO_FW_GFX_RLC 0x07 - /* Subquery id: Query GFX MEC firmware version */ - #define AMDGPU_INFO_FW_GFX_MEC 0x08 - /* Subquery id: Query SMC firmware version */ - #define AMDGPU_INFO_FW_SMC 0x0a - /* Subquery id: Query SDMA firmware version */ - #define AMDGPU_INFO_FW_SDMA 0x0b - /* Subquery id: Query PSP SOS firmware version */ - #define AMDGPU_INFO_FW_SOS 0x0c - /* Subquery id: Query PSP ASD firmware version */ - #define AMDGPU_INFO_FW_ASD 0x0d - /* Subquery id: Query VCN firmware version */ - #define AMDGPU_INFO_FW_VCN 0x0e - /* Subquery id: Query GFX RLC SRLC firmware version */ - #define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_CNTL 0x0f - /* Subquery id: Query GFX RLC SRLG firmware version */ - #define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_GPM_MEM 0x10 - /* Subquery id: Query GFX RLC SRLS firmware version */ - #define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_SRM_MEM 0x11 -/* number of bytes moved for TTM migration */ -#define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f -/* the used VRAM size */ -#define AMDGPU_INFO_VRAM_USAGE 0x10 -/* the used GTT size */ -#define AMDGPU_INFO_GTT_USAGE 0x11 -/* Information about GDS, etc. resource configuration */ -#define AMDGPU_INFO_GDS_CONFIG 0x13 -/* Query information about VRAM and GTT domains */ -#define AMDGPU_INFO_VRAM_GTT 0x14 -/* Query information about register in MMR address space*/ -#define AMDGPU_INFO_READ_MMR_REG 0x15 -/* Query information about device: rev id, family, etc. */ -#define AMDGPU_INFO_DEV_INFO 0x16 -/* visible vram usage */ -#define AMDGPU_INFO_VIS_VRAM_USAGE 0x17 -/* number of TTM buffer evictions */ -#define AMDGPU_INFO_NUM_EVICTIONS 0x18 -/* Query memory about VRAM and GTT domains */ -#define AMDGPU_INFO_MEMORY 0x19 -/* Query vce clock table */ -#define AMDGPU_INFO_VCE_CLOCK_TABLE 0x1A -/* Query vbios related information */ -#define AMDGPU_INFO_VBIOS 0x1B - /* Subquery id: Query vbios size */ - #define AMDGPU_INFO_VBIOS_SIZE 0x1 - /* Subquery id: Query vbios image */ - #define AMDGPU_INFO_VBIOS_IMAGE 0x2 -/* Query UVD handles */ -#define AMDGPU_INFO_NUM_HANDLES 0x1C -/* Query sensor related information */ -#define AMDGPU_INFO_SENSOR 0x1D - /* Subquery id: Query GPU shader clock */ - #define AMDGPU_INFO_SENSOR_GFX_SCLK 0x1 - /* Subquery id: Query GPU memory clock */ - #define AMDGPU_INFO_SENSOR_GFX_MCLK 0x2 - /* Subquery id: Query GPU temperature */ - #define AMDGPU_INFO_SENSOR_GPU_TEMP 0x3 - /* Subquery id: Query GPU load */ - #define AMDGPU_INFO_SENSOR_GPU_LOAD 0x4 - /* Subquery id: Query average GPU power */ - #define AMDGPU_INFO_SENSOR_GPU_AVG_POWER 0x5 - /* Subquery id: Query northbridge voltage */ - #define AMDGPU_INFO_SENSOR_VDDNB 0x6 - /* Subquery id: Query graphics voltage */ - #define AMDGPU_INFO_SENSOR_VDDGFX 0x7 - /* Subquery id: Query GPU stable pstate shader clock */ - #define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_SCLK 0x8 - /* Subquery id: Query GPU stable pstate memory clock */ - #define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_MCLK 0x9 -/* Number of VRAM page faults on CPU access. */ -#define AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS 0x1E -#define AMDGPU_INFO_VRAM_LOST_COUNTER 0x1F - -#define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0 -#define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff -#define AMDGPU_INFO_MMR_SH_INDEX_SHIFT 8 -#define AMDGPU_INFO_MMR_SH_INDEX_MASK 0xff - -struct drm_amdgpu_query_fw { - /** AMDGPU_INFO_FW_* */ - __u32 fw_type; - /** - * Index of the IP if there are more IPs of - * the same type. - */ - __u32 ip_instance; - /** - * Index of the engine. Whether this is used depends - * on the firmware type. (e.g. MEC, SDMA) - */ - __u32 index; - __u32 _pad; -}; - -/* Input structure for the INFO ioctl */ -struct drm_amdgpu_info { - /* Where the return value will be stored */ - __u64 return_pointer; - /* The size of the return value. Just like "size" in "snprintf", - * it limits how many bytes the kernel can write. */ - __u32 return_size; - /* The query request id. */ - __u32 query; - - union { - struct { - __u32 id; - __u32 _pad; - } mode_crtc; - - struct { - /** AMDGPU_HW_IP_* */ - __u32 type; - /** - * Index of the IP if there are more IPs of the same - * type. Ignored by AMDGPU_INFO_HW_IP_COUNT. - */ - __u32 ip_instance; - } query_hw_ip; - - struct { - __u32 dword_offset; - /** number of registers to read */ - __u32 count; - __u32 instance; - /** For future use, no flags defined so far */ - __u32 flags; - } read_mmr_reg; - - struct drm_amdgpu_query_fw query_fw; - - struct { - __u32 type; - __u32 offset; - } vbios_info; - - struct { - __u32 type; - } sensor_info; - }; -}; - -struct drm_amdgpu_info_gds { - /** GDS GFX partition size */ - __u32 gds_gfx_partition_size; - /** GDS compute partition size */ - __u32 compute_partition_size; - /** total GDS memory size */ - __u32 gds_total_size; - /** GWS size per GFX partition */ - __u32 gws_per_gfx_partition; - /** GSW size per compute partition */ - __u32 gws_per_compute_partition; - /** OA size per GFX partition */ - __u32 oa_per_gfx_partition; - /** OA size per compute partition */ - __u32 oa_per_compute_partition; - __u32 _pad; -}; - -struct drm_amdgpu_info_vram_gtt { - __u64 vram_size; - __u64 vram_cpu_accessible_size; - __u64 gtt_size; -}; - -struct drm_amdgpu_heap_info { - /** max. physical memory */ - __u64 total_heap_size; - - /** Theoretical max. available memory in the given heap */ - __u64 usable_heap_size; - - /** - * Number of bytes allocated in the heap. This includes all processes - * and private allocations in the kernel. It changes when new buffers - * are allocated, freed, and moved. It cannot be larger than - * heap_size. - */ - __u64 heap_usage; - - /** - * Theoretical possible max. size of buffer which - * could be allocated in the given heap - */ - __u64 max_allocation; -}; - -struct drm_amdgpu_memory_info { - struct drm_amdgpu_heap_info vram; - struct drm_amdgpu_heap_info cpu_accessible_vram; - struct drm_amdgpu_heap_info gtt; -}; - -struct drm_amdgpu_info_firmware { - __u32 ver; - __u32 feature; -}; - -#define AMDGPU_VRAM_TYPE_UNKNOWN 0 -#define AMDGPU_VRAM_TYPE_GDDR1 1 -#define AMDGPU_VRAM_TYPE_DDR2 2 -#define AMDGPU_VRAM_TYPE_GDDR3 3 -#define AMDGPU_VRAM_TYPE_GDDR4 4 -#define AMDGPU_VRAM_TYPE_GDDR5 5 -#define AMDGPU_VRAM_TYPE_HBM 6 -#define AMDGPU_VRAM_TYPE_DDR3 7 -#define AMDGPU_VRAM_TYPE_DDR4 8 - -struct drm_amdgpu_info_device { - /** PCI Device ID */ - __u32 device_id; - /** Internal chip revision: A0, A1, etc.) */ - __u32 chip_rev; - __u32 external_rev; - /** Revision id in PCI Config space */ - __u32 pci_rev; - __u32 family; - __u32 num_shader_engines; - __u32 num_shader_arrays_per_engine; - /* in KHz */ - __u32 gpu_counter_freq; - __u64 max_engine_clock; - __u64 max_memory_clock; - /* cu information */ - __u32 cu_active_number; - /* NOTE: cu_ao_mask is INVALID, DON'T use it */ - __u32 cu_ao_mask; - __u32 cu_bitmap[4][4]; - /** Render backend pipe mask. One render backend is CB+DB. */ - __u32 enabled_rb_pipes_mask; - __u32 num_rb_pipes; - __u32 num_hw_gfx_contexts; - __u32 _pad; - __u64 ids_flags; - /** Starting virtual address for UMDs. */ - __u64 virtual_address_offset; - /** The maximum virtual address */ - __u64 virtual_address_max; - /** Required alignment of virtual addresses. */ - __u32 virtual_address_alignment; - /** Page table entry - fragment size */ - __u32 pte_fragment_size; - __u32 gart_page_size; - /** constant engine ram size*/ - __u32 ce_ram_size; - /** video memory type info*/ - __u32 vram_type; - /** video memory bit width*/ - __u32 vram_bit_width; - /* vce harvesting instance */ - __u32 vce_harvest_config; - /* gfx double offchip LDS buffers */ - __u32 gc_double_offchip_lds_buf; - /* NGG Primitive Buffer */ - __u64 prim_buf_gpu_addr; - /* NGG Position Buffer */ - __u64 pos_buf_gpu_addr; - /* NGG Control Sideband */ - __u64 cntl_sb_buf_gpu_addr; - /* NGG Parameter Cache */ - __u64 param_buf_gpu_addr; - __u32 prim_buf_size; - __u32 pos_buf_size; - __u32 cntl_sb_buf_size; - __u32 param_buf_size; - /* wavefront size*/ - __u32 wave_front_size; - /* shader visible vgprs*/ - __u32 num_shader_visible_vgprs; - /* CU per shader array*/ - __u32 num_cu_per_sh; - /* number of tcc blocks*/ - __u32 num_tcc_blocks; - /* gs vgt table depth*/ - __u32 gs_vgt_table_depth; - /* gs primitive buffer depth*/ - __u32 gs_prim_buffer_depth; - /* max gs wavefront per vgt*/ - __u32 max_gs_waves_per_vgt; - __u32 _pad1; - /* always on cu bitmap */ - __u32 cu_ao_bitmap[4][4]; - /** Starting high virtual address for UMDs. */ - __u64 high_va_offset; - /** The maximum high virtual address */ - __u64 high_va_max; -}; - -struct drm_amdgpu_info_hw_ip { - /** Version of h/w IP */ - __u32 hw_ip_version_major; - __u32 hw_ip_version_minor; - /** Capabilities */ - __u64 capabilities_flags; - /** command buffer address start alignment*/ - __u32 ib_start_alignment; - /** command buffer size alignment*/ - __u32 ib_size_alignment; - /** Bitmask of available rings. Bit 0 means ring 0, etc. */ - __u32 available_rings; - __u32 _pad; -}; - -struct drm_amdgpu_info_num_handles { - /** Max handles as supported by firmware for UVD */ - __u32 uvd_max_handles; - /** Handles currently in use for UVD */ - __u32 uvd_used_handles; -}; - -#define AMDGPU_VCE_CLOCK_TABLE_ENTRIES 6 - -struct drm_amdgpu_info_vce_clock_table_entry { - /** System clock */ - __u32 sclk; - /** Memory clock */ - __u32 mclk; - /** VCE clock */ - __u32 eclk; - __u32 pad; -}; - -struct drm_amdgpu_info_vce_clock_table { - struct drm_amdgpu_info_vce_clock_table_entry entries[AMDGPU_VCE_CLOCK_TABLE_ENTRIES]; - __u32 num_valid_entries; - __u32 pad; -}; - -/* - * Supported GPU families - */ -#define AMDGPU_FAMILY_UNKNOWN 0 -#define AMDGPU_FAMILY_SI 110 /* Hainan, Oland, Verde, Pitcairn, Tahiti */ -#define AMDGPU_FAMILY_CI 120 /* Bonaire, Hawaii */ -#define AMDGPU_FAMILY_KV 125 /* Kaveri, Kabini, Mullins */ -#define AMDGPU_FAMILY_VI 130 /* Iceland, Tonga */ -#define AMDGPU_FAMILY_CZ 135 /* Carrizo, Stoney */ -#define AMDGPU_FAMILY_AI 141 /* Vega10 */ -#define AMDGPU_FAMILY_RV 142 /* Raven */ - -#if defined(__cplusplus) -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/armada_drm.h b/lib/libc/include/generic-musl/drm/armada_drm.h deleted file mode 100644 index e669f2e8d5..0000000000 --- a/lib/libc/include/generic-musl/drm/armada_drm.h +++ /dev/null @@ -1,56 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 Russell King - * With inspiration from the i915 driver - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#ifndef DRM_ARMADA_IOCTL_H -#define DRM_ARMADA_IOCTL_H - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#define DRM_ARMADA_GEM_CREATE 0x00 -#define DRM_ARMADA_GEM_MMAP 0x02 -#define DRM_ARMADA_GEM_PWRITE 0x03 - -#define ARMADA_IOCTL(dir, name, str) \ - DRM_##dir(DRM_COMMAND_BASE + DRM_ARMADA_##name, struct drm_armada_##str) - -struct drm_armada_gem_create { - __u32 handle; - __u32 size; -}; -#define DRM_IOCTL_ARMADA_GEM_CREATE \ - ARMADA_IOCTL(IOWR, GEM_CREATE, gem_create) - -struct drm_armada_gem_mmap { - __u32 handle; - __u32 pad; - __u64 offset; - __u64 size; - __u64 addr; -}; -#define DRM_IOCTL_ARMADA_GEM_MMAP \ - ARMADA_IOCTL(IOWR, GEM_MMAP, gem_mmap) - -struct drm_armada_gem_pwrite { - __u64 ptr; - __u32 handle; - __u32 offset; - __u32 size; -}; -#define DRM_IOCTL_ARMADA_GEM_PWRITE \ - ARMADA_IOCTL(IOW, GEM_PWRITE, gem_pwrite) - -#if defined(__cplusplus) -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/drm.h b/lib/libc/include/generic-musl/drm/drm.h deleted file mode 100644 index 573572bdd9..0000000000 --- a/lib/libc/include/generic-musl/drm/drm.h +++ /dev/null @@ -1,1004 +0,0 @@ -/** - * \file drm.h - * Header for the Direct Rendering Manager - * - * \author Rickard E. (Rik) Faith - * - * \par Acknowledgments: - * Dec 1999, Richard Henderson , move to generic \c cmpxchg. - */ - -/* - * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. - * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _DRM_H_ -#define _DRM_H_ - -#if defined(__linux__) - -#include -#include -typedef unsigned int drm_handle_t; - -#else /* One of the BSDs */ - -#include -#include -typedef int8_t __s8; -typedef uint8_t __u8; -typedef int16_t __s16; -typedef uint16_t __u16; -typedef int32_t __s32; -typedef uint32_t __u32; -typedef int64_t __s64; -typedef uint64_t __u64; -typedef size_t __kernel_size_t; -typedef unsigned long drm_handle_t; - -#endif - -#if defined(__cplusplus) -extern "C" { -#endif - -#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ -#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ -#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */ -#define DRM_RAM_PERCENT 10 /**< How much system ram can we lock? */ - -#define _DRM_LOCK_HELD 0x80000000U /**< Hardware lock is held */ -#define _DRM_LOCK_CONT 0x40000000U /**< Hardware lock is contended */ -#define _DRM_LOCK_IS_HELD(lock) ((lock) & _DRM_LOCK_HELD) -#define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT) -#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT)) - -typedef unsigned int drm_context_t; -typedef unsigned int drm_drawable_t; -typedef unsigned int drm_magic_t; - -/** - * Cliprect. - * - * \warning: If you change this structure, make sure you change - * XF86DRIClipRectRec in the server as well - * - * \note KW: Actually it's illegal to change either for - * backwards-compatibility reasons. - */ -struct drm_clip_rect { - unsigned short x1; - unsigned short y1; - unsigned short x2; - unsigned short y2; -}; - -/** - * Drawable information. - */ -struct drm_drawable_info { - unsigned int num_rects; - struct drm_clip_rect *rects; -}; - -/** - * Texture region, - */ -struct drm_tex_region { - unsigned char next; - unsigned char prev; - unsigned char in_use; - unsigned char padding; - unsigned int age; -}; - -/** - * Hardware lock. - * - * The lock structure is a simple cache-line aligned integer. To avoid - * processor bus contention on a multiprocessor system, there should not be any - * other data stored in the same cache line. - */ -struct drm_hw_lock { - __volatile__ unsigned int lock; /**< lock variable */ - char padding[60]; /**< Pad to cache line */ -}; - -/** - * DRM_IOCTL_VERSION ioctl argument type. - * - * \sa drmGetVersion(). - */ -struct drm_version { - int version_major; /**< Major version */ - int version_minor; /**< Minor version */ - int version_patchlevel; /**< Patch level */ - __kernel_size_t name_len; /**< Length of name buffer */ - char *name; /**< Name of driver */ - __kernel_size_t date_len; /**< Length of date buffer */ - char *date; /**< User-space buffer to hold date */ - __kernel_size_t desc_len; /**< Length of desc buffer */ - char *desc; /**< User-space buffer to hold desc */ -}; - -/** - * DRM_IOCTL_GET_UNIQUE ioctl argument type. - * - * \sa drmGetBusid() and drmSetBusId(). - */ -struct drm_unique { - __kernel_size_t unique_len; /**< Length of unique */ - char *unique; /**< Unique name for driver instantiation */ -}; - -struct drm_list { - int count; /**< Length of user-space structures */ - struct drm_version *version; -}; - -struct drm_block { - int unused; -}; - -/** - * DRM_IOCTL_CONTROL ioctl argument type. - * - * \sa drmCtlInstHandler() and drmCtlUninstHandler(). - */ -struct drm_control { - enum { - DRM_ADD_COMMAND, - DRM_RM_COMMAND, - DRM_INST_HANDLER, - DRM_UNINST_HANDLER - } func; - int irq; -}; - -/** - * Type of memory to map. - */ -enum drm_map_type { - _DRM_FRAME_BUFFER = 0, /**< WC (no caching), no core dump */ - _DRM_REGISTERS = 1, /**< no caching, no core dump */ - _DRM_SHM = 2, /**< shared, cached */ - _DRM_AGP = 3, /**< AGP/GART */ - _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */ - _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */ -}; - -/** - * Memory mapping flags. - */ -enum drm_map_flags { - _DRM_RESTRICTED = 0x01, /**< Cannot be mapped to user-virtual */ - _DRM_READ_ONLY = 0x02, - _DRM_LOCKED = 0x04, /**< shared, cached, locked */ - _DRM_KERNEL = 0x08, /**< kernel requires access */ - _DRM_WRITE_COMBINING = 0x10, /**< use write-combining if available */ - _DRM_CONTAINS_LOCK = 0x20, /**< SHM page that contains lock */ - _DRM_REMOVABLE = 0x40, /**< Removable mapping */ - _DRM_DRIVER = 0x80 /**< Managed by driver */ -}; - -struct drm_ctx_priv_map { - unsigned int ctx_id; /**< Context requesting private mapping */ - void *handle; /**< Handle of map */ -}; - -/** - * DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls - * argument type. - * - * \sa drmAddMap(). - */ -struct drm_map { - unsigned long offset; /**< Requested physical address (0 for SAREA)*/ - unsigned long size; /**< Requested physical size (bytes) */ - enum drm_map_type type; /**< Type of memory to map */ - enum drm_map_flags flags; /**< Flags */ - void *handle; /**< User-space: "Handle" to pass to mmap() */ - /**< Kernel-space: kernel-virtual address */ - int mtrr; /**< MTRR slot used */ - /* Private data */ -}; - -/** - * DRM_IOCTL_GET_CLIENT ioctl argument type. - */ -struct drm_client { - int idx; /**< Which client desired? */ - int auth; /**< Is client authenticated? */ - unsigned long pid; /**< Process ID */ - unsigned long uid; /**< User ID */ - unsigned long magic; /**< Magic */ - unsigned long iocs; /**< Ioctl count */ -}; - -enum drm_stat_type { - _DRM_STAT_LOCK, - _DRM_STAT_OPENS, - _DRM_STAT_CLOSES, - _DRM_STAT_IOCTLS, - _DRM_STAT_LOCKS, - _DRM_STAT_UNLOCKS, - _DRM_STAT_VALUE, /**< Generic value */ - _DRM_STAT_BYTE, /**< Generic byte counter (1024bytes/K) */ - _DRM_STAT_COUNT, /**< Generic non-byte counter (1000/k) */ - - _DRM_STAT_IRQ, /**< IRQ */ - _DRM_STAT_PRIMARY, /**< Primary DMA bytes */ - _DRM_STAT_SECONDARY, /**< Secondary DMA bytes */ - _DRM_STAT_DMA, /**< DMA */ - _DRM_STAT_SPECIAL, /**< Special DMA (e.g., priority or polled) */ - _DRM_STAT_MISSED /**< Missed DMA opportunity */ - /* Add to the *END* of the list */ -}; - -/** - * DRM_IOCTL_GET_STATS ioctl argument type. - */ -struct drm_stats { - unsigned long count; - struct { - unsigned long value; - enum drm_stat_type type; - } data[15]; -}; - -/** - * Hardware locking flags. - */ -enum drm_lock_flags { - _DRM_LOCK_READY = 0x01, /**< Wait until hardware is ready for DMA */ - _DRM_LOCK_QUIESCENT = 0x02, /**< Wait until hardware quiescent */ - _DRM_LOCK_FLUSH = 0x04, /**< Flush this context's DMA queue first */ - _DRM_LOCK_FLUSH_ALL = 0x08, /**< Flush all DMA queues first */ - /* These *HALT* flags aren't supported yet - -- they will be used to support the - full-screen DGA-like mode. */ - _DRM_HALT_ALL_QUEUES = 0x10, /**< Halt all current and future queues */ - _DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */ -}; - -/** - * DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type. - * - * \sa drmGetLock() and drmUnlock(). - */ -struct drm_lock { - int context; - enum drm_lock_flags flags; -}; - -/** - * DMA flags - * - * \warning - * These values \e must match xf86drm.h. - * - * \sa drm_dma. - */ -enum drm_dma_flags { - /* Flags for DMA buffer dispatch */ - _DRM_DMA_BLOCK = 0x01, /**< - * Block until buffer dispatched. - * - * \note The buffer may not yet have - * been processed by the hardware -- - * getting a hardware lock with the - * hardware quiescent will ensure - * that the buffer has been - * processed. - */ - _DRM_DMA_WHILE_LOCKED = 0x02, /**< Dispatch while lock held */ - _DRM_DMA_PRIORITY = 0x04, /**< High priority dispatch */ - - /* Flags for DMA buffer request */ - _DRM_DMA_WAIT = 0x10, /**< Wait for free buffers */ - _DRM_DMA_SMALLER_OK = 0x20, /**< Smaller-than-requested buffers OK */ - _DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */ -}; - -/** - * DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type. - * - * \sa drmAddBufs(). - */ -struct drm_buf_desc { - int count; /**< Number of buffers of this size */ - int size; /**< Size in bytes */ - int low_mark; /**< Low water mark */ - int high_mark; /**< High water mark */ - enum { - _DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */ - _DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */ - _DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */ - _DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */ - _DRM_PCI_BUFFER_RO = 0x10 /**< Map PCI DMA buffer read-only */ - } flags; - unsigned long agp_start; /**< - * Start address of where the AGP buffers are - * in the AGP aperture - */ -}; - -/** - * DRM_IOCTL_INFO_BUFS ioctl argument type. - */ -struct drm_buf_info { - int count; /**< Entries in list */ - struct drm_buf_desc *list; -}; - -/** - * DRM_IOCTL_FREE_BUFS ioctl argument type. - */ -struct drm_buf_free { - int count; - int *list; -}; - -/** - * Buffer information - * - * \sa drm_buf_map. - */ -struct drm_buf_pub { - int idx; /**< Index into the master buffer list */ - int total; /**< Buffer size */ - int used; /**< Amount of buffer in use (for DMA) */ - void *address; /**< Address of buffer */ -}; - -/** - * DRM_IOCTL_MAP_BUFS ioctl argument type. - */ -struct drm_buf_map { - int count; /**< Length of the buffer list */ -#ifdef __cplusplus - void *virt; -#else - void *virtual; /**< Mmap'd area in user-virtual */ -#endif - struct drm_buf_pub *list; /**< Buffer information */ -}; - -/** - * DRM_IOCTL_DMA ioctl argument type. - * - * Indices here refer to the offset into the buffer list in drm_buf_get. - * - * \sa drmDMA(). - */ -struct drm_dma { - int context; /**< Context handle */ - int send_count; /**< Number of buffers to send */ - int *send_indices; /**< List of handles to buffers */ - int *send_sizes; /**< Lengths of data to send */ - enum drm_dma_flags flags; /**< Flags */ - int request_count; /**< Number of buffers requested */ - int request_size; /**< Desired size for buffers */ - int *request_indices; /**< Buffer information */ - int *request_sizes; - int granted_count; /**< Number of buffers granted */ -}; - -enum drm_ctx_flags { - _DRM_CONTEXT_PRESERVED = 0x01, - _DRM_CONTEXT_2DONLY = 0x02 -}; - -/** - * DRM_IOCTL_ADD_CTX ioctl argument type. - * - * \sa drmCreateContext() and drmDestroyContext(). - */ -struct drm_ctx { - drm_context_t handle; - enum drm_ctx_flags flags; -}; - -/** - * DRM_IOCTL_RES_CTX ioctl argument type. - */ -struct drm_ctx_res { - int count; - struct drm_ctx *contexts; -}; - -/** - * DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type. - */ -struct drm_draw { - drm_drawable_t handle; -}; - -/** - * DRM_IOCTL_UPDATE_DRAW ioctl argument type. - */ -typedef enum { - DRM_DRAWABLE_CLIPRECTS -} drm_drawable_info_type_t; - -struct drm_update_draw { - drm_drawable_t handle; - unsigned int type; - unsigned int num; - unsigned long long data; -}; - -/** - * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type. - */ -struct drm_auth { - drm_magic_t magic; -}; - -/** - * DRM_IOCTL_IRQ_BUSID ioctl argument type. - * - * \sa drmGetInterruptFromBusID(). - */ -struct drm_irq_busid { - int irq; /**< IRQ number */ - int busnum; /**< bus number */ - int devnum; /**< device number */ - int funcnum; /**< function number */ -}; - -enum drm_vblank_seq_type { - _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ - _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ - /* bits 1-6 are reserved for high crtcs */ - _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e, - _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */ - _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ - _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ - _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ - _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */ -}; -#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1 - -#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) -#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \ - _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS) - -struct drm_wait_vblank_request { - enum drm_vblank_seq_type type; - unsigned int sequence; - unsigned long signal; -}; - -struct drm_wait_vblank_reply { - enum drm_vblank_seq_type type; - unsigned int sequence; - long tval_sec; - long tval_usec; -}; - -/** - * DRM_IOCTL_WAIT_VBLANK ioctl argument type. - * - * \sa drmWaitVBlank(). - */ -union drm_wait_vblank { - struct drm_wait_vblank_request request; - struct drm_wait_vblank_reply reply; -}; - -#define _DRM_PRE_MODESET 1 -#define _DRM_POST_MODESET 2 - -/** - * DRM_IOCTL_MODESET_CTL ioctl argument type - * - * \sa drmModesetCtl(). - */ -struct drm_modeset_ctl { - __u32 crtc; - __u32 cmd; -}; - -/** - * DRM_IOCTL_AGP_ENABLE ioctl argument type. - * - * \sa drmAgpEnable(). - */ -struct drm_agp_mode { - unsigned long mode; /**< AGP mode */ -}; - -/** - * DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type. - * - * \sa drmAgpAlloc() and drmAgpFree(). - */ -struct drm_agp_buffer { - unsigned long size; /**< In bytes -- will round to page boundary */ - unsigned long handle; /**< Used for binding / unbinding */ - unsigned long type; /**< Type of memory to allocate */ - unsigned long physical; /**< Physical used by i810 */ -}; - -/** - * DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type. - * - * \sa drmAgpBind() and drmAgpUnbind(). - */ -struct drm_agp_binding { - unsigned long handle; /**< From drm_agp_buffer */ - unsigned long offset; /**< In bytes -- will round to page boundary */ -}; - -/** - * DRM_IOCTL_AGP_INFO ioctl argument type. - * - * \sa drmAgpVersionMajor(), drmAgpVersionMinor(), drmAgpGetMode(), - * drmAgpBase(), drmAgpSize(), drmAgpMemoryUsed(), drmAgpMemoryAvail(), - * drmAgpVendorId() and drmAgpDeviceId(). - */ -struct drm_agp_info { - int agp_version_major; - int agp_version_minor; - unsigned long mode; - unsigned long aperture_base; /* physical address */ - unsigned long aperture_size; /* bytes */ - unsigned long memory_allowed; /* bytes */ - unsigned long memory_used; - - /* PCI information */ - unsigned short id_vendor; - unsigned short id_device; -}; - -/** - * DRM_IOCTL_SG_ALLOC ioctl argument type. - */ -struct drm_scatter_gather { - unsigned long size; /**< In bytes -- will round to page boundary */ - unsigned long handle; /**< Used for mapping / unmapping */ -}; - -/** - * DRM_IOCTL_SET_VERSION ioctl argument type. - */ -struct drm_set_version { - int drm_di_major; - int drm_di_minor; - int drm_dd_major; - int drm_dd_minor; -}; - -/** DRM_IOCTL_GEM_CLOSE ioctl argument type */ -struct drm_gem_close { - /** Handle of the object to be closed. */ - __u32 handle; - __u32 pad; -}; - -/** DRM_IOCTL_GEM_FLINK ioctl argument type */ -struct drm_gem_flink { - /** Handle for the object being named */ - __u32 handle; - - /** Returned global name */ - __u32 name; -}; - -/** DRM_IOCTL_GEM_OPEN ioctl argument type */ -struct drm_gem_open { - /** Name of object being opened */ - __u32 name; - - /** Returned handle for the object */ - __u32 handle; - - /** Returned size of the object */ - __u64 size; -}; - -#define DRM_CAP_DUMB_BUFFER 0x1 -#define DRM_CAP_VBLANK_HIGH_CRTC 0x2 -#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 -#define DRM_CAP_DUMB_PREFER_SHADOW 0x4 -#define DRM_CAP_PRIME 0x5 -#define DRM_PRIME_CAP_IMPORT 0x1 -#define DRM_PRIME_CAP_EXPORT 0x2 -#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 -#define DRM_CAP_ASYNC_PAGE_FLIP 0x7 -/* - * The CURSOR_WIDTH and CURSOR_HEIGHT capabilities return a valid widthxheight - * combination for the hardware cursor. The intention is that a hardware - * agnostic userspace can query a cursor plane size to use. - * - * Note that the cross-driver contract is to merely return a valid size; - * drivers are free to attach another meaning on top, eg. i915 returns the - * maximum plane size. - */ -#define DRM_CAP_CURSOR_WIDTH 0x8 -#define DRM_CAP_CURSOR_HEIGHT 0x9 -#define DRM_CAP_ADDFB2_MODIFIERS 0x10 -#define DRM_CAP_PAGE_FLIP_TARGET 0x11 -#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12 -#define DRM_CAP_SYNCOBJ 0x13 - -/** DRM_IOCTL_GET_CAP ioctl argument type */ -struct drm_get_cap { - __u64 capability; - __u64 value; -}; - -/** - * DRM_CLIENT_CAP_STEREO_3D - * - * if set to 1, the DRM core will expose the stereo 3D capabilities of the - * monitor by advertising the supported 3D layouts in the flags of struct - * drm_mode_modeinfo. - */ -#define DRM_CLIENT_CAP_STEREO_3D 1 - -/** - * DRM_CLIENT_CAP_UNIVERSAL_PLANES - * - * If set to 1, the DRM core will expose all planes (overlay, primary, and - * cursor) to userspace. - */ -#define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2 - -/** - * DRM_CLIENT_CAP_ATOMIC - * - * If set to 1, the DRM core will expose atomic properties to userspace - */ -#define DRM_CLIENT_CAP_ATOMIC 3 - -/** - * DRM_CLIENT_CAP_ASPECT_RATIO - * - * If set to 1, the DRM core will provide aspect ratio information in modes. - */ -#define DRM_CLIENT_CAP_ASPECT_RATIO 4 - -/** - * DRM_CLIENT_CAP_WRITEBACK_CONNECTORS - * - * If set to 1, the DRM core will expose special connectors to be used for - * writing back to memory the scene setup in the commit. Depends on client - * also supporting DRM_CLIENT_CAP_ATOMIC - */ -#define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5 - -/** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ -struct drm_set_client_cap { - __u64 capability; - __u64 value; -}; - -#define DRM_RDWR O_RDWR -#define DRM_CLOEXEC O_CLOEXEC -struct drm_prime_handle { - __u32 handle; - - /** Flags.. only applicable for handle->fd */ - __u32 flags; - - /** Returned dmabuf file descriptor */ - __s32 fd; -}; - -struct drm_syncobj_create { - __u32 handle; -#define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0) - __u32 flags; -}; - -struct drm_syncobj_destroy { - __u32 handle; - __u32 pad; -}; - -#define DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE (1 << 0) -#define DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_EXPORT_SYNC_FILE (1 << 0) -struct drm_syncobj_handle { - __u32 handle; - __u32 flags; - - __s32 fd; - __u32 pad; -}; - -#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) -#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) -struct drm_syncobj_wait { - __u64 handles; - /* absolute timeout */ - __s64 timeout_nsec; - __u32 count_handles; - __u32 flags; - __u32 first_signaled; /* only valid when not waiting all */ - __u32 pad; -}; - -struct drm_syncobj_array { - __u64 handles; - __u32 count_handles; - __u32 pad; -}; - -/* Query current scanout sequence number */ -struct drm_crtc_get_sequence { - __u32 crtc_id; /* requested crtc_id */ - __u32 active; /* return: crtc output is active */ - __u64 sequence; /* return: most recent vblank sequence */ - __s64 sequence_ns; /* return: most recent time of first pixel out */ -}; - -/* Queue event to be delivered at specified sequence. Time stamp marks - * when the first pixel of the refresh cycle leaves the display engine - * for the display - */ -#define DRM_CRTC_SEQUENCE_RELATIVE 0x00000001 /* sequence is relative to current */ -#define DRM_CRTC_SEQUENCE_NEXT_ON_MISS 0x00000002 /* Use next sequence if we've missed */ - -struct drm_crtc_queue_sequence { - __u32 crtc_id; - __u32 flags; - __u64 sequence; /* on input, target sequence. on output, actual sequence */ - __u64 user_data; /* user data passed to event */ -}; - -#if defined(__cplusplus) -} -#endif - -#include "drm_mode.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#define DRM_IOCTL_BASE 'd' -#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) -#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type) -#define DRM_IOW(nr,type) _IOW(DRM_IOCTL_BASE,nr,type) -#define DRM_IOWR(nr,type) _IOWR(DRM_IOCTL_BASE,nr,type) - -#define DRM_IOCTL_VERSION DRM_IOWR(0x00, struct drm_version) -#define DRM_IOCTL_GET_UNIQUE DRM_IOWR(0x01, struct drm_unique) -#define DRM_IOCTL_GET_MAGIC DRM_IOR( 0x02, struct drm_auth) -#define DRM_IOCTL_IRQ_BUSID DRM_IOWR(0x03, struct drm_irq_busid) -#define DRM_IOCTL_GET_MAP DRM_IOWR(0x04, struct drm_map) -#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) -#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) -#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) -#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl) -#define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close) -#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) -#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) -#define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) -#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW( 0x0d, struct drm_set_client_cap) - -#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) -#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) -#define DRM_IOCTL_BLOCK DRM_IOWR(0x12, struct drm_block) -#define DRM_IOCTL_UNBLOCK DRM_IOWR(0x13, struct drm_block) -#define DRM_IOCTL_CONTROL DRM_IOW( 0x14, struct drm_control) -#define DRM_IOCTL_ADD_MAP DRM_IOWR(0x15, struct drm_map) -#define DRM_IOCTL_ADD_BUFS DRM_IOWR(0x16, struct drm_buf_desc) -#define DRM_IOCTL_MARK_BUFS DRM_IOW( 0x17, struct drm_buf_desc) -#define DRM_IOCTL_INFO_BUFS DRM_IOWR(0x18, struct drm_buf_info) -#define DRM_IOCTL_MAP_BUFS DRM_IOWR(0x19, struct drm_buf_map) -#define DRM_IOCTL_FREE_BUFS DRM_IOW( 0x1a, struct drm_buf_free) - -#define DRM_IOCTL_RM_MAP DRM_IOW( 0x1b, struct drm_map) - -#define DRM_IOCTL_SET_SAREA_CTX DRM_IOW( 0x1c, struct drm_ctx_priv_map) -#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map) - -#define DRM_IOCTL_SET_MASTER DRM_IO(0x1e) -#define DRM_IOCTL_DROP_MASTER DRM_IO(0x1f) - -#define DRM_IOCTL_ADD_CTX DRM_IOWR(0x20, struct drm_ctx) -#define DRM_IOCTL_RM_CTX DRM_IOWR(0x21, struct drm_ctx) -#define DRM_IOCTL_MOD_CTX DRM_IOW( 0x22, struct drm_ctx) -#define DRM_IOCTL_GET_CTX DRM_IOWR(0x23, struct drm_ctx) -#define DRM_IOCTL_SWITCH_CTX DRM_IOW( 0x24, struct drm_ctx) -#define DRM_IOCTL_NEW_CTX DRM_IOW( 0x25, struct drm_ctx) -#define DRM_IOCTL_RES_CTX DRM_IOWR(0x26, struct drm_ctx_res) -#define DRM_IOCTL_ADD_DRAW DRM_IOWR(0x27, struct drm_draw) -#define DRM_IOCTL_RM_DRAW DRM_IOWR(0x28, struct drm_draw) -#define DRM_IOCTL_DMA DRM_IOWR(0x29, struct drm_dma) -#define DRM_IOCTL_LOCK DRM_IOW( 0x2a, struct drm_lock) -#define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock) -#define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock) - -#define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle) -#define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle) - -#define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30) -#define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31) -#define DRM_IOCTL_AGP_ENABLE DRM_IOW( 0x32, struct drm_agp_mode) -#define DRM_IOCTL_AGP_INFO DRM_IOR( 0x33, struct drm_agp_info) -#define DRM_IOCTL_AGP_ALLOC DRM_IOWR(0x34, struct drm_agp_buffer) -#define DRM_IOCTL_AGP_FREE DRM_IOW( 0x35, struct drm_agp_buffer) -#define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, struct drm_agp_binding) -#define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, struct drm_agp_binding) - -#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, struct drm_scatter_gather) -#define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, struct drm_scatter_gather) - -#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank) - -#define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence) -#define DRM_IOCTL_CRTC_QUEUE_SEQUENCE DRM_IOWR(0x3c, struct drm_crtc_queue_sequence) - -#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) - -#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res) -#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc) -#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA2, struct drm_mode_crtc) -#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xA3, struct drm_mode_cursor) -#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut) -#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut) -#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder) -#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector) -#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd) /* deprecated (never worked) */ -#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd) /* deprecated (never worked) */ - -#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property) -#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property) -#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob) -#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd) -#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd) -#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int) -#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip) -#define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd) - -#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) -#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) -#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) -#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res) -#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane) -#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane) -#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2) -#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties) -#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property) -#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2) -#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic) -#define DRM_IOCTL_MODE_CREATEPROPBLOB DRM_IOWR(0xBD, struct drm_mode_create_blob) -#define DRM_IOCTL_MODE_DESTROYPROPBLOB DRM_IOWR(0xBE, struct drm_mode_destroy_blob) - -#define DRM_IOCTL_SYNCOBJ_CREATE DRM_IOWR(0xBF, struct drm_syncobj_create) -#define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy) -#define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle) -#define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle) -#define DRM_IOCTL_SYNCOBJ_WAIT DRM_IOWR(0xC3, struct drm_syncobj_wait) -#define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array) -#define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array) - -#define DRM_IOCTL_MODE_CREATE_LEASE DRM_IOWR(0xC6, struct drm_mode_create_lease) -#define DRM_IOCTL_MODE_LIST_LESSEES DRM_IOWR(0xC7, struct drm_mode_list_lessees) -#define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease) -#define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) - -/** - * Device specific ioctls should only be in their respective headers - * The device specific ioctl range is from 0x40 to 0x9f. - * Generic IOCTLS restart at 0xA0. - * - * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and - * drmCommandReadWrite(). - */ -#define DRM_COMMAND_BASE 0x40 -#define DRM_COMMAND_END 0xA0 - -/** - * Header for events written back to userspace on the drm fd. The - * type defines the type of event, the length specifies the total - * length of the event (including the header), and user_data is - * typically a 64 bit value passed with the ioctl that triggered the - * event. A read on the drm fd will always only return complete - * events, that is, if for example the read buffer is 100 bytes, and - * there are two 64 byte events pending, only one will be returned. - * - * Event types 0 - 0x7fffffff are generic drm events, 0x80000000 and - * up are chipset specific. - */ -struct drm_event { - __u32 type; - __u32 length; -}; - -#define DRM_EVENT_VBLANK 0x01 -#define DRM_EVENT_FLIP_COMPLETE 0x02 -#define DRM_EVENT_CRTC_SEQUENCE 0x03 - -struct drm_event_vblank { - struct drm_event base; - __u64 user_data; - __u32 tv_sec; - __u32 tv_usec; - __u32 sequence; - __u32 crtc_id; /* 0 on older kernels that do not support this */ -}; - -/* Event delivered at sequence. Time stamp marks when the first pixel - * of the refresh cycle leaves the display engine for the display - */ -struct drm_event_crtc_sequence { - struct drm_event base; - __u64 user_data; - __s64 time_ns; - __u64 sequence; -}; - -/* typedef area */ -typedef struct drm_clip_rect drm_clip_rect_t; -typedef struct drm_drawable_info drm_drawable_info_t; -typedef struct drm_tex_region drm_tex_region_t; -typedef struct drm_hw_lock drm_hw_lock_t; -typedef struct drm_version drm_version_t; -typedef struct drm_unique drm_unique_t; -typedef struct drm_list drm_list_t; -typedef struct drm_block drm_block_t; -typedef struct drm_control drm_control_t; -typedef enum drm_map_type drm_map_type_t; -typedef enum drm_map_flags drm_map_flags_t; -typedef struct drm_ctx_priv_map drm_ctx_priv_map_t; -typedef struct drm_map drm_map_t; -typedef struct drm_client drm_client_t; -typedef enum drm_stat_type drm_stat_type_t; -typedef struct drm_stats drm_stats_t; -typedef enum drm_lock_flags drm_lock_flags_t; -typedef struct drm_lock drm_lock_t; -typedef enum drm_dma_flags drm_dma_flags_t; -typedef struct drm_buf_desc drm_buf_desc_t; -typedef struct drm_buf_info drm_buf_info_t; -typedef struct drm_buf_free drm_buf_free_t; -typedef struct drm_buf_pub drm_buf_pub_t; -typedef struct drm_buf_map drm_buf_map_t; -typedef struct drm_dma drm_dma_t; -typedef union drm_wait_vblank drm_wait_vblank_t; -typedef struct drm_agp_mode drm_agp_mode_t; -typedef enum drm_ctx_flags drm_ctx_flags_t; -typedef struct drm_ctx drm_ctx_t; -typedef struct drm_ctx_res drm_ctx_res_t; -typedef struct drm_draw drm_draw_t; -typedef struct drm_update_draw drm_update_draw_t; -typedef struct drm_auth drm_auth_t; -typedef struct drm_irq_busid drm_irq_busid_t; -typedef enum drm_vblank_seq_type drm_vblank_seq_type_t; - -typedef struct drm_agp_buffer drm_agp_buffer_t; -typedef struct drm_agp_binding drm_agp_binding_t; -typedef struct drm_agp_info drm_agp_info_t; -typedef struct drm_scatter_gather drm_scatter_gather_t; -typedef struct drm_set_version drm_set_version_t; - -#if defined(__cplusplus) -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/drm_fourcc.h b/lib/libc/include/generic-musl/drm/drm_fourcc.h deleted file mode 100644 index 73091a3746..0000000000 --- a/lib/libc/include/generic-musl/drm/drm_fourcc.h +++ /dev/null @@ -1,588 +0,0 @@ -/* - * Copyright 2011 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef DRM_FOURCC_H -#define DRM_FOURCC_H - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \ - ((__u32)(c) << 16) | ((__u32)(d) << 24)) - -#define DRM_FORMAT_BIG_ENDIAN (1<<31) /* format is big endian instead of little endian */ - -/* color index */ -#define DRM_FORMAT_C8 fourcc_code('C', '8', ' ', ' ') /* [7:0] C */ - -/* 8 bpp Red */ -#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ') /* [7:0] R */ - -/* 16 bpp Red */ -#define DRM_FORMAT_R16 fourcc_code('R', '1', '6', ' ') /* [15:0] R little endian */ - -/* 16 bpp RG */ -#define DRM_FORMAT_RG88 fourcc_code('R', 'G', '8', '8') /* [15:0] R:G 8:8 little endian */ -#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8') /* [15:0] G:R 8:8 little endian */ - -/* 32 bpp RG */ -#define DRM_FORMAT_RG1616 fourcc_code('R', 'G', '3', '2') /* [31:0] R:G 16:16 little endian */ -#define DRM_FORMAT_GR1616 fourcc_code('G', 'R', '3', '2') /* [31:0] G:R 16:16 little endian */ - -/* 8 bpp RGB */ -#define DRM_FORMAT_RGB332 fourcc_code('R', 'G', 'B', '8') /* [7:0] R:G:B 3:3:2 */ -#define DRM_FORMAT_BGR233 fourcc_code('B', 'G', 'R', '8') /* [7:0] B:G:R 2:3:3 */ - -/* 16 bpp RGB */ -#define DRM_FORMAT_XRGB4444 fourcc_code('X', 'R', '1', '2') /* [15:0] x:R:G:B 4:4:4:4 little endian */ -#define DRM_FORMAT_XBGR4444 fourcc_code('X', 'B', '1', '2') /* [15:0] x:B:G:R 4:4:4:4 little endian */ -#define DRM_FORMAT_RGBX4444 fourcc_code('R', 'X', '1', '2') /* [15:0] R:G:B:x 4:4:4:4 little endian */ -#define DRM_FORMAT_BGRX4444 fourcc_code('B', 'X', '1', '2') /* [15:0] B:G:R:x 4:4:4:4 little endian */ - -#define DRM_FORMAT_ARGB4444 fourcc_code('A', 'R', '1', '2') /* [15:0] A:R:G:B 4:4:4:4 little endian */ -#define DRM_FORMAT_ABGR4444 fourcc_code('A', 'B', '1', '2') /* [15:0] A:B:G:R 4:4:4:4 little endian */ -#define DRM_FORMAT_RGBA4444 fourcc_code('R', 'A', '1', '2') /* [15:0] R:G:B:A 4:4:4:4 little endian */ -#define DRM_FORMAT_BGRA4444 fourcc_code('B', 'A', '1', '2') /* [15:0] B:G:R:A 4:4:4:4 little endian */ - -#define DRM_FORMAT_XRGB1555 fourcc_code('X', 'R', '1', '5') /* [15:0] x:R:G:B 1:5:5:5 little endian */ -#define DRM_FORMAT_XBGR1555 fourcc_code('X', 'B', '1', '5') /* [15:0] x:B:G:R 1:5:5:5 little endian */ -#define DRM_FORMAT_RGBX5551 fourcc_code('R', 'X', '1', '5') /* [15:0] R:G:B:x 5:5:5:1 little endian */ -#define DRM_FORMAT_BGRX5551 fourcc_code('B', 'X', '1', '5') /* [15:0] B:G:R:x 5:5:5:1 little endian */ - -#define DRM_FORMAT_ARGB1555 fourcc_code('A', 'R', '1', '5') /* [15:0] A:R:G:B 1:5:5:5 little endian */ -#define DRM_FORMAT_ABGR1555 fourcc_code('A', 'B', '1', '5') /* [15:0] A:B:G:R 1:5:5:5 little endian */ -#define DRM_FORMAT_RGBA5551 fourcc_code('R', 'A', '1', '5') /* [15:0] R:G:B:A 5:5:5:1 little endian */ -#define DRM_FORMAT_BGRA5551 fourcc_code('B', 'A', '1', '5') /* [15:0] B:G:R:A 5:5:5:1 little endian */ - -#define DRM_FORMAT_RGB565 fourcc_code('R', 'G', '1', '6') /* [15:0] R:G:B 5:6:5 little endian */ -#define DRM_FORMAT_BGR565 fourcc_code('B', 'G', '1', '6') /* [15:0] B:G:R 5:6:5 little endian */ - -/* 24 bpp RGB */ -#define DRM_FORMAT_RGB888 fourcc_code('R', 'G', '2', '4') /* [23:0] R:G:B little endian */ -#define DRM_FORMAT_BGR888 fourcc_code('B', 'G', '2', '4') /* [23:0] B:G:R little endian */ - -/* 32 bpp RGB */ -#define DRM_FORMAT_XRGB8888 fourcc_code('X', 'R', '2', '4') /* [31:0] x:R:G:B 8:8:8:8 little endian */ -#define DRM_FORMAT_XBGR8888 fourcc_code('X', 'B', '2', '4') /* [31:0] x:B:G:R 8:8:8:8 little endian */ -#define DRM_FORMAT_RGBX8888 fourcc_code('R', 'X', '2', '4') /* [31:0] R:G:B:x 8:8:8:8 little endian */ -#define DRM_FORMAT_BGRX8888 fourcc_code('B', 'X', '2', '4') /* [31:0] B:G:R:x 8:8:8:8 little endian */ - -#define DRM_FORMAT_ARGB8888 fourcc_code('A', 'R', '2', '4') /* [31:0] A:R:G:B 8:8:8:8 little endian */ -#define DRM_FORMAT_ABGR8888 fourcc_code('A', 'B', '2', '4') /* [31:0] A:B:G:R 8:8:8:8 little endian */ -#define DRM_FORMAT_RGBA8888 fourcc_code('R', 'A', '2', '4') /* [31:0] R:G:B:A 8:8:8:8 little endian */ -#define DRM_FORMAT_BGRA8888 fourcc_code('B', 'A', '2', '4') /* [31:0] B:G:R:A 8:8:8:8 little endian */ - -#define DRM_FORMAT_XRGB2101010 fourcc_code('X', 'R', '3', '0') /* [31:0] x:R:G:B 2:10:10:10 little endian */ -#define DRM_FORMAT_XBGR2101010 fourcc_code('X', 'B', '3', '0') /* [31:0] x:B:G:R 2:10:10:10 little endian */ -#define DRM_FORMAT_RGBX1010102 fourcc_code('R', 'X', '3', '0') /* [31:0] R:G:B:x 10:10:10:2 little endian */ -#define DRM_FORMAT_BGRX1010102 fourcc_code('B', 'X', '3', '0') /* [31:0] B:G:R:x 10:10:10:2 little endian */ - -#define DRM_FORMAT_ARGB2101010 fourcc_code('A', 'R', '3', '0') /* [31:0] A:R:G:B 2:10:10:10 little endian */ -#define DRM_FORMAT_ABGR2101010 fourcc_code('A', 'B', '3', '0') /* [31:0] A:B:G:R 2:10:10:10 little endian */ -#define DRM_FORMAT_RGBA1010102 fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */ -#define DRM_FORMAT_BGRA1010102 fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */ - -/* packed YCbCr */ -#define DRM_FORMAT_YUYV fourcc_code('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */ -#define DRM_FORMAT_YVYU fourcc_code('Y', 'V', 'Y', 'U') /* [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian */ -#define DRM_FORMAT_UYVY fourcc_code('U', 'Y', 'V', 'Y') /* [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian */ -#define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ - -#define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ - -/* - * 2 plane RGB + A - * index 0 = RGB plane, same format as the corresponding non _A8 format has - * index 1 = A plane, [7:0] A - */ -#define DRM_FORMAT_XRGB8888_A8 fourcc_code('X', 'R', 'A', '8') -#define DRM_FORMAT_XBGR8888_A8 fourcc_code('X', 'B', 'A', '8') -#define DRM_FORMAT_RGBX8888_A8 fourcc_code('R', 'X', 'A', '8') -#define DRM_FORMAT_BGRX8888_A8 fourcc_code('B', 'X', 'A', '8') -#define DRM_FORMAT_RGB888_A8 fourcc_code('R', '8', 'A', '8') -#define DRM_FORMAT_BGR888_A8 fourcc_code('B', '8', 'A', '8') -#define DRM_FORMAT_RGB565_A8 fourcc_code('R', '5', 'A', '8') -#define DRM_FORMAT_BGR565_A8 fourcc_code('B', '5', 'A', '8') - -/* - * 2 plane YCbCr - * index 0 = Y plane, [7:0] Y - * index 1 = Cr:Cb plane, [15:0] Cr:Cb little endian - * or - * index 1 = Cb:Cr plane, [15:0] Cb:Cr little endian - */ -#define DRM_FORMAT_NV12 fourcc_code('N', 'V', '1', '2') /* 2x2 subsampled Cr:Cb plane */ -#define DRM_FORMAT_NV21 fourcc_code('N', 'V', '2', '1') /* 2x2 subsampled Cb:Cr plane */ -#define DRM_FORMAT_NV16 fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */ -#define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */ -#define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */ -#define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ - -/* - * 3 plane YCbCr - * index 0: Y plane, [7:0] Y - * index 1: Cb plane, [7:0] Cb - * index 2: Cr plane, [7:0] Cr - * or - * index 1: Cr plane, [7:0] Cr - * index 2: Cb plane, [7:0] Cb - */ -#define DRM_FORMAT_YUV410 fourcc_code('Y', 'U', 'V', '9') /* 4x4 subsampled Cb (1) and Cr (2) planes */ -#define DRM_FORMAT_YVU410 fourcc_code('Y', 'V', 'U', '9') /* 4x4 subsampled Cr (1) and Cb (2) planes */ -#define DRM_FORMAT_YUV411 fourcc_code('Y', 'U', '1', '1') /* 4x1 subsampled Cb (1) and Cr (2) planes */ -#define DRM_FORMAT_YVU411 fourcc_code('Y', 'V', '1', '1') /* 4x1 subsampled Cr (1) and Cb (2) planes */ -#define DRM_FORMAT_YUV420 fourcc_code('Y', 'U', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes */ -#define DRM_FORMAT_YVU420 fourcc_code('Y', 'V', '1', '2') /* 2x2 subsampled Cr (1) and Cb (2) planes */ -#define DRM_FORMAT_YUV422 fourcc_code('Y', 'U', '1', '6') /* 2x1 subsampled Cb (1) and Cr (2) planes */ -#define DRM_FORMAT_YVU422 fourcc_code('Y', 'V', '1', '6') /* 2x1 subsampled Cr (1) and Cb (2) planes */ -#define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */ -#define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */ - - -/* - * Format Modifiers: - * - * Format modifiers describe, typically, a re-ordering or modification - * of the data in a plane of an FB. This can be used to express tiled/ - * swizzled formats, or compression, or a combination of the two. - * - * The upper 8 bits of the format modifier are a vendor-id as assigned - * below. The lower 56 bits are assigned as vendor sees fit. - */ - -/* Vendor Ids: */ -#define DRM_FORMAT_MOD_NONE 0 -#define DRM_FORMAT_MOD_VENDOR_NONE 0 -#define DRM_FORMAT_MOD_VENDOR_INTEL 0x01 -#define DRM_FORMAT_MOD_VENDOR_AMD 0x02 -#define DRM_FORMAT_MOD_VENDOR_NVIDIA 0x03 -#define DRM_FORMAT_MOD_VENDOR_SAMSUNG 0x04 -#define DRM_FORMAT_MOD_VENDOR_QCOM 0x05 -#define DRM_FORMAT_MOD_VENDOR_VIVANTE 0x06 -#define DRM_FORMAT_MOD_VENDOR_BROADCOM 0x07 -#define DRM_FORMAT_MOD_VENDOR_ARM 0x08 -/* add more to the end as needed */ - -#define DRM_FORMAT_RESERVED ((1ULL << 56) - 1) - -#define fourcc_mod_code(vendor, val) \ - ((((__u64)DRM_FORMAT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL)) - -/* - * Format Modifier tokens: - * - * When adding a new token please document the layout with a code comment, - * similar to the fourcc codes above. drm_fourcc.h is considered the - * authoritative source for all of these. - */ - -/* - * Invalid Modifier - * - * This modifier can be used as a sentinel to terminate the format modifiers - * list, or to initialize a variable with an invalid modifier. It might also be - * used to report an error back to userspace for certain APIs. - */ -#define DRM_FORMAT_MOD_INVALID fourcc_mod_code(NONE, DRM_FORMAT_RESERVED) - -/* - * Linear Layout - * - * Just plain linear layout. Note that this is different from no specifying any - * modifier (e.g. not setting DRM_MODE_FB_MODIFIERS in the DRM_ADDFB2 ioctl), - * which tells the driver to also take driver-internal information into account - * and so might actually result in a tiled framebuffer. - */ -#define DRM_FORMAT_MOD_LINEAR fourcc_mod_code(NONE, 0) - -/* Intel framebuffer modifiers */ - -/* - * Intel X-tiling layout - * - * This is a tiled layout using 4Kb tiles (except on gen2 where the tiles 2Kb) - * in row-major layout. Within the tile bytes are laid out row-major, with - * a platform-dependent stride. On top of that the memory can apply - * platform-depending swizzling of some higher address bits into bit6. - * - * This format is highly platforms specific and not useful for cross-driver - * sharing. It exists since on a given platform it does uniquely identify the - * layout in a simple way for i915-specific userspace. - */ -#define I915_FORMAT_MOD_X_TILED fourcc_mod_code(INTEL, 1) - -/* - * Intel Y-tiling layout - * - * This is a tiled layout using 4Kb tiles (except on gen2 where the tiles 2Kb) - * in row-major layout. Within the tile bytes are laid out in OWORD (16 bytes) - * chunks column-major, with a platform-dependent height. On top of that the - * memory can apply platform-depending swizzling of some higher address bits - * into bit6. - * - * This format is highly platforms specific and not useful for cross-driver - * sharing. It exists since on a given platform it does uniquely identify the - * layout in a simple way for i915-specific userspace. - */ -#define I915_FORMAT_MOD_Y_TILED fourcc_mod_code(INTEL, 2) - -/* - * Intel Yf-tiling layout - * - * This is a tiled layout using 4Kb tiles in row-major layout. - * Within the tile pixels are laid out in 16 256 byte units / sub-tiles which - * are arranged in four groups (two wide, two high) with column-major layout. - * Each group therefore consits out of four 256 byte units, which are also laid - * out as 2x2 column-major. - * 256 byte units are made out of four 64 byte blocks of pixels, producing - * either a square block or a 2:1 unit. - * 64 byte blocks of pixels contain four pixel rows of 16 bytes, where the width - * in pixel depends on the pixel depth. - */ -#define I915_FORMAT_MOD_Yf_TILED fourcc_mod_code(INTEL, 3) - -/* - * Intel color control surface (CCS) for render compression - * - * The framebuffer format must be one of the 8:8:8:8 RGB formats. - * The main surface will be plane index 0 and must be Y/Yf-tiled, - * the CCS will be plane index 1. - * - * Each CCS tile matches a 1024x512 pixel area of the main surface. - * To match certain aspects of the 3D hardware the CCS is - * considered to be made up of normal 128Bx32 Y tiles, Thus - * the CCS pitch must be specified in multiples of 128 bytes. - * - * In reality the CCS tile appears to be a 64Bx64 Y tile, composed - * of QWORD (8 bytes) chunks instead of OWORD (16 bytes) chunks. - * But that fact is not relevant unless the memory is accessed - * directly. - */ -#define I915_FORMAT_MOD_Y_TILED_CCS fourcc_mod_code(INTEL, 4) -#define I915_FORMAT_MOD_Yf_TILED_CCS fourcc_mod_code(INTEL, 5) - -/* - * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks - * - * Macroblocks are laid in a Z-shape, and each pixel data is following the - * standard NV12 style. - * As for NV12, an image is the result of two frame buffers: one for Y, - * one for the interleaved Cb/Cr components (1/2 the height of the Y buffer). - * Alignment requirements are (for each buffer): - * - multiple of 128 pixels for the width - * - multiple of 32 pixels for the height - * - * For more information: see https://linuxtv.org/downloads/v4l-dvb-apis/re32.html - */ -#define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1) - -/* - * Qualcomm Compressed Format - * - * Refers to a compressed variant of the base format that is compressed. - * Implementation may be platform and base-format specific. - * - * Each macrotile consists of m x n (mostly 4 x 4) tiles. - * Pixel data pitch/stride is aligned with macrotile width. - * Pixel data height is aligned with macrotile height. - * Entire pixel data buffer is aligned with 4k(bytes). - */ -#define DRM_FORMAT_MOD_QCOM_COMPRESSED fourcc_mod_code(QCOM, 1) - -/* Vivante framebuffer modifiers */ - -/* - * Vivante 4x4 tiling layout - * - * This is a simple tiled layout using tiles of 4x4 pixels in a row-major - * layout. - */ -#define DRM_FORMAT_MOD_VIVANTE_TILED fourcc_mod_code(VIVANTE, 1) - -/* - * Vivante 64x64 super-tiling layout - * - * This is a tiled layout using 64x64 pixel super-tiles, where each super-tile - * contains 8x4 groups of 2x4 tiles of 4x4 pixels (like above) each, all in row- - * major layout. - * - * For more information: see - * https://github.com/etnaviv/etna_viv/blob/master/doc/hardware.md#texture-tiling - */ -#define DRM_FORMAT_MOD_VIVANTE_SUPER_TILED fourcc_mod_code(VIVANTE, 2) - -/* - * Vivante 4x4 tiling layout for dual-pipe - * - * Same as the 4x4 tiling layout, except every second 4x4 pixel tile starts at a - * different base address. Offsets from the base addresses are therefore halved - * compared to the non-split tiled layout. - */ -#define DRM_FORMAT_MOD_VIVANTE_SPLIT_TILED fourcc_mod_code(VIVANTE, 3) - -/* - * Vivante 64x64 super-tiling layout for dual-pipe - * - * Same as the 64x64 super-tiling layout, except every second 4x4 pixel tile - * starts at a different base address. Offsets from the base addresses are - * therefore halved compared to the non-split super-tiled layout. - */ -#define DRM_FORMAT_MOD_VIVANTE_SPLIT_SUPER_TILED fourcc_mod_code(VIVANTE, 4) - -/* NVIDIA frame buffer modifiers */ - -/* - * Tegra Tiled Layout, used by Tegra 2, 3 and 4. - * - * Pixels are arranged in simple tiles of 16 x 16 bytes. - */ -#define DRM_FORMAT_MOD_NVIDIA_TEGRA_TILED fourcc_mod_code(NVIDIA, 1) - -/* - * 16Bx2 Block Linear layout, used by desktop GPUs, and Tegra K1 and later - * - * Pixels are arranged in 64x8 Groups Of Bytes (GOBs). GOBs are then stacked - * vertically by a power of 2 (1 to 32 GOBs) to form a block. - * - * Within a GOB, data is ordered as 16B x 2 lines sectors laid in Z-shape. - * - * Parameter 'v' is the log2 encoding of the number of GOBs stacked vertically. - * Valid values are: - * - * 0 == ONE_GOB - * 1 == TWO_GOBS - * 2 == FOUR_GOBS - * 3 == EIGHT_GOBS - * 4 == SIXTEEN_GOBS - * 5 == THIRTYTWO_GOBS - * - * Chapter 20 "Pixel Memory Formats" of the Tegra X1 TRM describes this format - * in full detail. - */ -#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(v) \ - fourcc_mod_code(NVIDIA, 0x10 | ((v) & 0xf)) - -#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_ONE_GOB \ - fourcc_mod_code(NVIDIA, 0x10) -#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_TWO_GOB \ - fourcc_mod_code(NVIDIA, 0x11) -#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_FOUR_GOB \ - fourcc_mod_code(NVIDIA, 0x12) -#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_EIGHT_GOB \ - fourcc_mod_code(NVIDIA, 0x13) -#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_SIXTEEN_GOB \ - fourcc_mod_code(NVIDIA, 0x14) -#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_THIRTYTWO_GOB \ - fourcc_mod_code(NVIDIA, 0x15) - -/* - * Some Broadcom modifiers take parameters, for example the number of - * vertical lines in the image. Reserve the lower 32 bits for modifier - * type, and the next 24 bits for parameters. Top 8 bits are the - * vendor code. - */ -#define __fourcc_mod_broadcom_param_shift 8 -#define __fourcc_mod_broadcom_param_bits 48 -#define fourcc_mod_broadcom_code(val, params) \ - fourcc_mod_code(BROADCOM, ((((__u64)params) << __fourcc_mod_broadcom_param_shift) | val)) -#define fourcc_mod_broadcom_param(m) \ - ((int)(((m) >> __fourcc_mod_broadcom_param_shift) & \ - ((1ULL << __fourcc_mod_broadcom_param_bits) - 1))) -#define fourcc_mod_broadcom_mod(m) \ - ((m) & ~(((1ULL << __fourcc_mod_broadcom_param_bits) - 1) << \ - __fourcc_mod_broadcom_param_shift)) - -/* - * Broadcom VC4 "T" format - * - * This is the primary layout that the V3D GPU can texture from (it - * can't do linear). The T format has: - * - * - 64b utiles of pixels in a raster-order grid according to cpp. It's 4x4 - * pixels at 32 bit depth. - * - * - 1k subtiles made of a 4x4 raster-order grid of 64b utiles (so usually - * 16x16 pixels). - * - * - 4k tiles made of a 2x2 grid of 1k subtiles (so usually 32x32 pixels). On - * even 4k tile rows, they're arranged as (BL, TL, TR, BR), and on odd rows - * they're (TR, BR, BL, TL), where bottom left is start of memory. - * - * - an image made of 4k tiles in rows either left-to-right (even rows of 4k - * tiles) or right-to-left (odd rows of 4k tiles). - */ -#define DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED fourcc_mod_code(BROADCOM, 1) - -/* - * Broadcom SAND format - * - * This is the native format that the H.264 codec block uses. For VC4 - * HVS, it is only valid for H.264 (NV12/21) and RGBA modes. - * - * The image can be considered to be split into columns, and the - * columns are placed consecutively into memory. The width of those - * columns can be either 32, 64, 128, or 256 pixels, but in practice - * only 128 pixel columns are used. - * - * The pitch between the start of each column is set to optimally - * switch between SDRAM banks. This is passed as the number of lines - * of column width in the modifier (we can't use the stride value due - * to various core checks that look at it , so you should set the - * stride to width*cpp). - * - * Note that the column height for this format modifier is the same - * for all of the planes, assuming that each column contains both Y - * and UV. Some SAND-using hardware stores UV in a separate tiled - * image from Y to reduce the column height, which is not supported - * with these modifiers. - */ - -#define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) \ - fourcc_mod_broadcom_code(2, v) -#define DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(v) \ - fourcc_mod_broadcom_code(3, v) -#define DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(v) \ - fourcc_mod_broadcom_code(4, v) -#define DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(v) \ - fourcc_mod_broadcom_code(5, v) - -#define DRM_FORMAT_MOD_BROADCOM_SAND32 \ - DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(0) -#define DRM_FORMAT_MOD_BROADCOM_SAND64 \ - DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(0) -#define DRM_FORMAT_MOD_BROADCOM_SAND128 \ - DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(0) -#define DRM_FORMAT_MOD_BROADCOM_SAND256 \ - DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(0) - -/* Broadcom UIF format - * - * This is the common format for the current Broadcom multimedia - * blocks, including V3D 3.x and newer, newer video codecs, and - * displays. - * - * The image consists of utiles (64b blocks), UIF blocks (2x2 utiles), - * and macroblocks (4x4 UIF blocks). Those 4x4 UIF block groups are - * stored in columns, with padding between the columns to ensure that - * moving from one column to the next doesn't hit the same SDRAM page - * bank. - * - * To calculate the padding, it is assumed that each hardware block - * and the software driving it knows the platform's SDRAM page size, - * number of banks, and XOR address, and that it's identical between - * all blocks using the format. This tiling modifier will use XOR as - * necessary to reduce the padding. If a hardware block can't do XOR, - * the assumption is that a no-XOR tiling modifier will be created. - */ -#define DRM_FORMAT_MOD_BROADCOM_UIF fourcc_mod_code(BROADCOM, 6) - -/* - * Arm Framebuffer Compression (AFBC) modifiers - * - * AFBC is a proprietary lossless image compression protocol and format. - * It provides fine-grained random access and minimizes the amount of data - * transferred between IP blocks. - * - * AFBC has several features which may be supported and/or used, which are - * represented using bits in the modifier. Not all combinations are valid, - * and different devices or use-cases may support different combinations. - */ -#define DRM_FORMAT_MOD_ARM_AFBC(__afbc_mode) fourcc_mod_code(ARM, __afbc_mode) - -/* - * AFBC superblock size - * - * Indicates the superblock size(s) used for the AFBC buffer. The buffer - * size (in pixels) must be aligned to a multiple of the superblock size. - * Four lowest significant bits(LSBs) are reserved for block size. - */ -#define AFBC_FORMAT_MOD_BLOCK_SIZE_MASK 0xf -#define AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 (1ULL) -#define AFBC_FORMAT_MOD_BLOCK_SIZE_32x8 (2ULL) - -/* - * AFBC lossless colorspace transform - * - * Indicates that the buffer makes use of the AFBC lossless colorspace - * transform. - */ -#define AFBC_FORMAT_MOD_YTR (1ULL << 4) - -/* - * AFBC block-split - * - * Indicates that the payload of each superblock is split. The second - * half of the payload is positioned at a predefined offset from the start - * of the superblock payload. - */ -#define AFBC_FORMAT_MOD_SPLIT (1ULL << 5) - -/* - * AFBC sparse layout - * - * This flag indicates that the payload of each superblock must be stored at a - * predefined position relative to the other superblocks in the same AFBC - * buffer. This order is the same order used by the header buffer. In this mode - * each superblock is given the same amount of space as an uncompressed - * superblock of the particular format would require, rounding up to the next - * multiple of 128 bytes in size. - */ -#define AFBC_FORMAT_MOD_SPARSE (1ULL << 6) - -/* - * AFBC copy-block restrict - * - * Buffers with this flag must obey the copy-block restriction. The restriction - * is such that there are no copy-blocks referring across the border of 8x8 - * blocks. For the subsampled data the 8x8 limitation is also subsampled. - */ -#define AFBC_FORMAT_MOD_CBR (1ULL << 7) - -/* - * AFBC tiled layout - * - * The tiled layout groups superblocks in 8x8 or 4x4 tiles, where all - * superblocks inside a tile are stored together in memory. 8x8 tiles are used - * for pixel formats up to and including 32 bpp while 4x4 tiles are used for - * larger bpp formats. The order between the tiles is scan line. - * When the tiled layout is used, the buffer size (in pixels) must be aligned - * to the tile size. - */ -#define AFBC_FORMAT_MOD_TILED (1ULL << 8) - -/* - * AFBC solid color blocks - * - * Indicates that the buffer makes use of solid-color blocks, whereby bandwidth - * can be reduced if a whole superblock is a single color. - */ -#define AFBC_FORMAT_MOD_SC (1ULL << 9) - -#if defined(__cplusplus) -} -#endif - -#endif /* DRM_FOURCC_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/drm_mode.h b/lib/libc/include/generic-musl/drm/drm_mode.h deleted file mode 100644 index 6ed4a8546f..0000000000 --- a/lib/libc/include/generic-musl/drm/drm_mode.h +++ /dev/null @@ -1,894 +0,0 @@ -/* - * Copyright (c) 2007 Dave Airlie - * Copyright (c) 2007 Jakob Bornecrantz - * Copyright (c) 2008 Red Hat Inc. - * Copyright (c) 2007-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA - * Copyright (c) 2007-2008 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef _DRM_MODE_H -#define _DRM_MODE_H - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#define DRM_DISPLAY_INFO_LEN 32 -#define DRM_CONNECTOR_NAME_LEN 32 -#define DRM_DISPLAY_MODE_LEN 32 -#define DRM_PROP_NAME_LEN 32 - -#define DRM_MODE_TYPE_BUILTIN (1<<0) /* deprecated */ -#define DRM_MODE_TYPE_CLOCK_C ((1<<1) | DRM_MODE_TYPE_BUILTIN) /* deprecated */ -#define DRM_MODE_TYPE_CRTC_C ((1<<2) | DRM_MODE_TYPE_BUILTIN) /* deprecated */ -#define DRM_MODE_TYPE_PREFERRED (1<<3) -#define DRM_MODE_TYPE_DEFAULT (1<<4) /* deprecated */ -#define DRM_MODE_TYPE_USERDEF (1<<5) -#define DRM_MODE_TYPE_DRIVER (1<<6) - -#define DRM_MODE_TYPE_ALL (DRM_MODE_TYPE_PREFERRED | \ - DRM_MODE_TYPE_USERDEF | \ - DRM_MODE_TYPE_DRIVER) - -/* Video mode flags */ -/* bit compatible with the xrandr RR_ definitions (bits 0-13) - * - * ABI warning: Existing userspace really expects - * the mode flags to match the xrandr definitions. Any - * changes that don't match the xrandr definitions will - * likely need a new client cap or some other mechanism - * to avoid breaking existing userspace. This includes - * allocating new flags in the previously unused bits! - */ -#define DRM_MODE_FLAG_PHSYNC (1<<0) -#define DRM_MODE_FLAG_NHSYNC (1<<1) -#define DRM_MODE_FLAG_PVSYNC (1<<2) -#define DRM_MODE_FLAG_NVSYNC (1<<3) -#define DRM_MODE_FLAG_INTERLACE (1<<4) -#define DRM_MODE_FLAG_DBLSCAN (1<<5) -#define DRM_MODE_FLAG_CSYNC (1<<6) -#define DRM_MODE_FLAG_PCSYNC (1<<7) -#define DRM_MODE_FLAG_NCSYNC (1<<8) -#define DRM_MODE_FLAG_HSKEW (1<<9) /* hskew provided */ -#define DRM_MODE_FLAG_BCAST (1<<10) /* deprecated */ -#define DRM_MODE_FLAG_PIXMUX (1<<11) /* deprecated */ -#define DRM_MODE_FLAG_DBLCLK (1<<12) -#define DRM_MODE_FLAG_CLKDIV2 (1<<13) - /* - * When adding a new stereo mode don't forget to adjust DRM_MODE_FLAGS_3D_MAX - * (define not exposed to user space). - */ -#define DRM_MODE_FLAG_3D_MASK (0x1f<<14) -#define DRM_MODE_FLAG_3D_NONE (0<<14) -#define DRM_MODE_FLAG_3D_FRAME_PACKING (1<<14) -#define DRM_MODE_FLAG_3D_FIELD_ALTERNATIVE (2<<14) -#define DRM_MODE_FLAG_3D_LINE_ALTERNATIVE (3<<14) -#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_FULL (4<<14) -#define DRM_MODE_FLAG_3D_L_DEPTH (5<<14) -#define DRM_MODE_FLAG_3D_L_DEPTH_GFX_GFX_DEPTH (6<<14) -#define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (7<<14) -#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (8<<14) - -/* Picture aspect ratio options */ -#define DRM_MODE_PICTURE_ASPECT_NONE 0 -#define DRM_MODE_PICTURE_ASPECT_4_3 1 -#define DRM_MODE_PICTURE_ASPECT_16_9 2 -#define DRM_MODE_PICTURE_ASPECT_64_27 3 -#define DRM_MODE_PICTURE_ASPECT_256_135 4 - -/* Content type options */ -#define DRM_MODE_CONTENT_TYPE_NO_DATA 0 -#define DRM_MODE_CONTENT_TYPE_GRAPHICS 1 -#define DRM_MODE_CONTENT_TYPE_PHOTO 2 -#define DRM_MODE_CONTENT_TYPE_CINEMA 3 -#define DRM_MODE_CONTENT_TYPE_GAME 4 - -/* Aspect ratio flag bitmask (4 bits 22:19) */ -#define DRM_MODE_FLAG_PIC_AR_MASK (0x0F<<19) -#define DRM_MODE_FLAG_PIC_AR_NONE \ - (DRM_MODE_PICTURE_ASPECT_NONE<<19) -#define DRM_MODE_FLAG_PIC_AR_4_3 \ - (DRM_MODE_PICTURE_ASPECT_4_3<<19) -#define DRM_MODE_FLAG_PIC_AR_16_9 \ - (DRM_MODE_PICTURE_ASPECT_16_9<<19) -#define DRM_MODE_FLAG_PIC_AR_64_27 \ - (DRM_MODE_PICTURE_ASPECT_64_27<<19) -#define DRM_MODE_FLAG_PIC_AR_256_135 \ - (DRM_MODE_PICTURE_ASPECT_256_135<<19) - -#define DRM_MODE_FLAG_ALL (DRM_MODE_FLAG_PHSYNC | \ - DRM_MODE_FLAG_NHSYNC | \ - DRM_MODE_FLAG_PVSYNC | \ - DRM_MODE_FLAG_NVSYNC | \ - DRM_MODE_FLAG_INTERLACE | \ - DRM_MODE_FLAG_DBLSCAN | \ - DRM_MODE_FLAG_CSYNC | \ - DRM_MODE_FLAG_PCSYNC | \ - DRM_MODE_FLAG_NCSYNC | \ - DRM_MODE_FLAG_HSKEW | \ - DRM_MODE_FLAG_DBLCLK | \ - DRM_MODE_FLAG_CLKDIV2 | \ - DRM_MODE_FLAG_3D_MASK) - -/* DPMS flags */ -/* bit compatible with the xorg definitions. */ -#define DRM_MODE_DPMS_ON 0 -#define DRM_MODE_DPMS_STANDBY 1 -#define DRM_MODE_DPMS_SUSPEND 2 -#define DRM_MODE_DPMS_OFF 3 - -/* Scaling mode options */ -#define DRM_MODE_SCALE_NONE 0 /* Unmodified timing (display or - software can still scale) */ -#define DRM_MODE_SCALE_FULLSCREEN 1 /* Full screen, ignore aspect */ -#define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */ -#define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */ - -/* Dithering mode options */ -#define DRM_MODE_DITHERING_OFF 0 -#define DRM_MODE_DITHERING_ON 1 -#define DRM_MODE_DITHERING_AUTO 2 - -/* Dirty info options */ -#define DRM_MODE_DIRTY_OFF 0 -#define DRM_MODE_DIRTY_ON 1 -#define DRM_MODE_DIRTY_ANNOTATE 2 - -/* Link Status options */ -#define DRM_MODE_LINK_STATUS_GOOD 0 -#define DRM_MODE_LINK_STATUS_BAD 1 - -/* - * DRM_MODE_ROTATE_ - * - * Signals that a drm plane is been rotated degrees in counter - * clockwise direction. - * - * This define is provided as a convenience, looking up the property id - * using the name->prop id lookup is the preferred method. - */ -#define DRM_MODE_ROTATE_0 (1<<0) -#define DRM_MODE_ROTATE_90 (1<<1) -#define DRM_MODE_ROTATE_180 (1<<2) -#define DRM_MODE_ROTATE_270 (1<<3) - -/* - * DRM_MODE_ROTATE_MASK - * - * Bitmask used to look for drm plane rotations. - */ -#define DRM_MODE_ROTATE_MASK (\ - DRM_MODE_ROTATE_0 | \ - DRM_MODE_ROTATE_90 | \ - DRM_MODE_ROTATE_180 | \ - DRM_MODE_ROTATE_270) - -/* - * DRM_MODE_REFLECT_ - * - * Signals that the contents of a drm plane is reflected in the axis, - * in the same way as mirroring. - * - * This define is provided as a convenience, looking up the property id - * using the name->prop id lookup is the preferred method. - */ -#define DRM_MODE_REFLECT_X (1<<4) -#define DRM_MODE_REFLECT_Y (1<<5) - -/* - * DRM_MODE_REFLECT_MASK - * - * Bitmask used to look for drm plane reflections. - */ -#define DRM_MODE_REFLECT_MASK (\ - DRM_MODE_REFLECT_X | \ - DRM_MODE_REFLECT_Y) - -/* Content Protection Flags */ -#define DRM_MODE_CONTENT_PROTECTION_UNDESIRED 0 -#define DRM_MODE_CONTENT_PROTECTION_DESIRED 1 -#define DRM_MODE_CONTENT_PROTECTION_ENABLED 2 - -struct drm_mode_modeinfo { - __u32 clock; - __u16 hdisplay; - __u16 hsync_start; - __u16 hsync_end; - __u16 htotal; - __u16 hskew; - __u16 vdisplay; - __u16 vsync_start; - __u16 vsync_end; - __u16 vtotal; - __u16 vscan; - - __u32 vrefresh; - - __u32 flags; - __u32 type; - char name[DRM_DISPLAY_MODE_LEN]; -}; - -struct drm_mode_card_res { - __u64 fb_id_ptr; - __u64 crtc_id_ptr; - __u64 connector_id_ptr; - __u64 encoder_id_ptr; - __u32 count_fbs; - __u32 count_crtcs; - __u32 count_connectors; - __u32 count_encoders; - __u32 min_width; - __u32 max_width; - __u32 min_height; - __u32 max_height; -}; - -struct drm_mode_crtc { - __u64 set_connectors_ptr; - __u32 count_connectors; - - __u32 crtc_id; /**< Id */ - __u32 fb_id; /**< Id of framebuffer */ - - __u32 x; /**< x Position on the framebuffer */ - __u32 y; /**< y Position on the framebuffer */ - - __u32 gamma_size; - __u32 mode_valid; - struct drm_mode_modeinfo mode; -}; - -#define DRM_MODE_PRESENT_TOP_FIELD (1<<0) -#define DRM_MODE_PRESENT_BOTTOM_FIELD (1<<1) - -/* Planes blend with or override other bits on the CRTC */ -struct drm_mode_set_plane { - __u32 plane_id; - __u32 crtc_id; - __u32 fb_id; /* fb object contains surface format type */ - __u32 flags; /* see above flags */ - - /* Signed dest location allows it to be partially off screen */ - __s32 crtc_x; - __s32 crtc_y; - __u32 crtc_w; - __u32 crtc_h; - - /* Source values are 16.16 fixed point */ - __u32 src_x; - __u32 src_y; - __u32 src_h; - __u32 src_w; -}; - -struct drm_mode_get_plane { - __u32 plane_id; - - __u32 crtc_id; - __u32 fb_id; - - __u32 possible_crtcs; - __u32 gamma_size; - - __u32 count_format_types; - __u64 format_type_ptr; -}; - -struct drm_mode_get_plane_res { - __u64 plane_id_ptr; - __u32 count_planes; -}; - -#define DRM_MODE_ENCODER_NONE 0 -#define DRM_MODE_ENCODER_DAC 1 -#define DRM_MODE_ENCODER_TMDS 2 -#define DRM_MODE_ENCODER_LVDS 3 -#define DRM_MODE_ENCODER_TVDAC 4 -#define DRM_MODE_ENCODER_VIRTUAL 5 -#define DRM_MODE_ENCODER_DSI 6 -#define DRM_MODE_ENCODER_DPMST 7 -#define DRM_MODE_ENCODER_DPI 8 - -struct drm_mode_get_encoder { - __u32 encoder_id; - __u32 encoder_type; - - __u32 crtc_id; /**< Id of crtc */ - - __u32 possible_crtcs; - __u32 possible_clones; -}; - -/* This is for connectors with multiple signal types. */ -/* Try to match DRM_MODE_CONNECTOR_X as closely as possible. */ -enum drm_mode_subconnector { - DRM_MODE_SUBCONNECTOR_Automatic = 0, - DRM_MODE_SUBCONNECTOR_Unknown = 0, - DRM_MODE_SUBCONNECTOR_DVID = 3, - DRM_MODE_SUBCONNECTOR_DVIA = 4, - DRM_MODE_SUBCONNECTOR_Composite = 5, - DRM_MODE_SUBCONNECTOR_SVIDEO = 6, - DRM_MODE_SUBCONNECTOR_Component = 8, - DRM_MODE_SUBCONNECTOR_SCART = 9, -}; - -#define DRM_MODE_CONNECTOR_Unknown 0 -#define DRM_MODE_CONNECTOR_VGA 1 -#define DRM_MODE_CONNECTOR_DVII 2 -#define DRM_MODE_CONNECTOR_DVID 3 -#define DRM_MODE_CONNECTOR_DVIA 4 -#define DRM_MODE_CONNECTOR_Composite 5 -#define DRM_MODE_CONNECTOR_SVIDEO 6 -#define DRM_MODE_CONNECTOR_LVDS 7 -#define DRM_MODE_CONNECTOR_Component 8 -#define DRM_MODE_CONNECTOR_9PinDIN 9 -#define DRM_MODE_CONNECTOR_DisplayPort 10 -#define DRM_MODE_CONNECTOR_HDMIA 11 -#define DRM_MODE_CONNECTOR_HDMIB 12 -#define DRM_MODE_CONNECTOR_TV 13 -#define DRM_MODE_CONNECTOR_eDP 14 -#define DRM_MODE_CONNECTOR_VIRTUAL 15 -#define DRM_MODE_CONNECTOR_DSI 16 -#define DRM_MODE_CONNECTOR_DPI 17 -#define DRM_MODE_CONNECTOR_WRITEBACK 18 - -struct drm_mode_get_connector { - - __u64 encoders_ptr; - __u64 modes_ptr; - __u64 props_ptr; - __u64 prop_values_ptr; - - __u32 count_modes; - __u32 count_props; - __u32 count_encoders; - - __u32 encoder_id; /**< Current Encoder */ - __u32 connector_id; /**< Id */ - __u32 connector_type; - __u32 connector_type_id; - - __u32 connection; - __u32 mm_width; /**< width in millimeters */ - __u32 mm_height; /**< height in millimeters */ - __u32 subpixel; - - __u32 pad; -}; - -#define DRM_MODE_PROP_PENDING (1<<0) /* deprecated, do not use */ -#define DRM_MODE_PROP_RANGE (1<<1) -#define DRM_MODE_PROP_IMMUTABLE (1<<2) -#define DRM_MODE_PROP_ENUM (1<<3) /* enumerated type with text strings */ -#define DRM_MODE_PROP_BLOB (1<<4) -#define DRM_MODE_PROP_BITMASK (1<<5) /* bitmask of enumerated types */ - -/* non-extended types: legacy bitmask, one bit per type: */ -#define DRM_MODE_PROP_LEGACY_TYPE ( \ - DRM_MODE_PROP_RANGE | \ - DRM_MODE_PROP_ENUM | \ - DRM_MODE_PROP_BLOB | \ - DRM_MODE_PROP_BITMASK) - -/* extended-types: rather than continue to consume a bit per type, - * grab a chunk of the bits to use as integer type id. - */ -#define DRM_MODE_PROP_EXTENDED_TYPE 0x0000ffc0 -#define DRM_MODE_PROP_TYPE(n) ((n) << 6) -#define DRM_MODE_PROP_OBJECT DRM_MODE_PROP_TYPE(1) -#define DRM_MODE_PROP_SIGNED_RANGE DRM_MODE_PROP_TYPE(2) - -/* the PROP_ATOMIC flag is used to hide properties from userspace that - * is not aware of atomic properties. This is mostly to work around - * older userspace (DDX drivers) that read/write each prop they find, - * witout being aware that this could be triggering a lengthy modeset. - */ -#define DRM_MODE_PROP_ATOMIC 0x80000000 - -struct drm_mode_property_enum { - __u64 value; - char name[DRM_PROP_NAME_LEN]; -}; - -struct drm_mode_get_property { - __u64 values_ptr; /* values and blob lengths */ - __u64 enum_blob_ptr; /* enum and blob id ptrs */ - - __u32 prop_id; - __u32 flags; - char name[DRM_PROP_NAME_LEN]; - - __u32 count_values; - /* This is only used to count enum values, not blobs. The _blobs is - * simply because of a historical reason, i.e. backwards compat. */ - __u32 count_enum_blobs; -}; - -struct drm_mode_connector_set_property { - __u64 value; - __u32 prop_id; - __u32 connector_id; -}; - -#define DRM_MODE_OBJECT_CRTC 0xcccccccc -#define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0 -#define DRM_MODE_OBJECT_ENCODER 0xe0e0e0e0 -#define DRM_MODE_OBJECT_MODE 0xdededede -#define DRM_MODE_OBJECT_PROPERTY 0xb0b0b0b0 -#define DRM_MODE_OBJECT_FB 0xfbfbfbfb -#define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb -#define DRM_MODE_OBJECT_PLANE 0xeeeeeeee -#define DRM_MODE_OBJECT_ANY 0 - -struct drm_mode_obj_get_properties { - __u64 props_ptr; - __u64 prop_values_ptr; - __u32 count_props; - __u32 obj_id; - __u32 obj_type; -}; - -struct drm_mode_obj_set_property { - __u64 value; - __u32 prop_id; - __u32 obj_id; - __u32 obj_type; -}; - -struct drm_mode_get_blob { - __u32 blob_id; - __u32 length; - __u64 data; -}; - -struct drm_mode_fb_cmd { - __u32 fb_id; - __u32 width; - __u32 height; - __u32 pitch; - __u32 bpp; - __u32 depth; - /* driver specific handle */ - __u32 handle; -}; - -#define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */ -#define DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifer[] */ - -struct drm_mode_fb_cmd2 { - __u32 fb_id; - __u32 width; - __u32 height; - __u32 pixel_format; /* fourcc code from drm_fourcc.h */ - __u32 flags; /* see above flags */ - - /* - * In case of planar formats, this ioctl allows up to 4 - * buffer objects with offsets and pitches per plane. - * The pitch and offset order is dictated by the fourcc, - * e.g. NV12 (http://fourcc.org/yuv.php#NV12) is described as: - * - * YUV 4:2:0 image with a plane of 8 bit Y samples - * followed by an interleaved U/V plane containing - * 8 bit 2x2 subsampled colour difference samples. - * - * So it would consist of Y as offsets[0] and UV as - * offsets[1]. Note that offsets[0] will generally - * be 0 (but this is not required). - * - * To accommodate tiled, compressed, etc formats, a - * modifier can be specified. The default value of zero - * indicates "native" format as specified by the fourcc. - * Vendor specific modifier token. Note that even though - * it looks like we have a modifier per-plane, we in fact - * do not. The modifier for each plane must be identical. - * Thus all combinations of different data layouts for - * multi plane formats must be enumerated as separate - * modifiers. - */ - __u32 handles[4]; - __u32 pitches[4]; /* pitch for each plane */ - __u32 offsets[4]; /* offset of each plane */ - __u64 modifier[4]; /* ie, tiling, compress */ -}; - -#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01 -#define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02 -#define DRM_MODE_FB_DIRTY_FLAGS 0x03 - -#define DRM_MODE_FB_DIRTY_MAX_CLIPS 256 - -/* - * Mark a region of a framebuffer as dirty. - * - * Some hardware does not automatically update display contents - * as a hardware or software draw to a framebuffer. This ioctl - * allows userspace to tell the kernel and the hardware what - * regions of the framebuffer have changed. - * - * The kernel or hardware is free to update more then just the - * region specified by the clip rects. The kernel or hardware - * may also delay and/or coalesce several calls to dirty into a - * single update. - * - * Userspace may annotate the updates, the annotates are a - * promise made by the caller that the change is either a copy - * of pixels or a fill of a single color in the region specified. - * - * If the DRM_MODE_FB_DIRTY_ANNOTATE_COPY flag is given then - * the number of updated regions are half of num_clips given, - * where the clip rects are paired in src and dst. The width and - * height of each one of the pairs must match. - * - * If the DRM_MODE_FB_DIRTY_ANNOTATE_FILL flag is given the caller - * promises that the region specified of the clip rects is filled - * completely with a single color as given in the color argument. - */ - -struct drm_mode_fb_dirty_cmd { - __u32 fb_id; - __u32 flags; - __u32 color; - __u32 num_clips; - __u64 clips_ptr; -}; - -struct drm_mode_mode_cmd { - __u32 connector_id; - struct drm_mode_modeinfo mode; -}; - -#define DRM_MODE_CURSOR_BO 0x01 -#define DRM_MODE_CURSOR_MOVE 0x02 -#define DRM_MODE_CURSOR_FLAGS 0x03 - -/* - * depending on the value in flags different members are used. - * - * CURSOR_BO uses - * crtc_id - * width - * height - * handle - if 0 turns the cursor off - * - * CURSOR_MOVE uses - * crtc_id - * x - * y - */ -struct drm_mode_cursor { - __u32 flags; - __u32 crtc_id; - __s32 x; - __s32 y; - __u32 width; - __u32 height; - /* driver specific handle */ - __u32 handle; -}; - -struct drm_mode_cursor2 { - __u32 flags; - __u32 crtc_id; - __s32 x; - __s32 y; - __u32 width; - __u32 height; - /* driver specific handle */ - __u32 handle; - __s32 hot_x; - __s32 hot_y; -}; - -struct drm_mode_crtc_lut { - __u32 crtc_id; - __u32 gamma_size; - - /* pointers to arrays */ - __u64 red; - __u64 green; - __u64 blue; -}; - -struct drm_color_ctm { - /* - * Conversion matrix in S31.32 sign-magnitude - * (not two's complement!) format. - */ - __u64 matrix[9]; -}; - -struct drm_color_lut { - /* - * Data is U0.16 fixed point format. - */ - __u16 red; - __u16 green; - __u16 blue; - __u16 reserved; -}; - -#define DRM_MODE_PAGE_FLIP_EVENT 0x01 -#define DRM_MODE_PAGE_FLIP_ASYNC 0x02 -#define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4 -#define DRM_MODE_PAGE_FLIP_TARGET_RELATIVE 0x8 -#define DRM_MODE_PAGE_FLIP_TARGET (DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE | \ - DRM_MODE_PAGE_FLIP_TARGET_RELATIVE) -#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT | \ - DRM_MODE_PAGE_FLIP_ASYNC | \ - DRM_MODE_PAGE_FLIP_TARGET) - -/* - * Request a page flip on the specified crtc. - * - * This ioctl will ask KMS to schedule a page flip for the specified - * crtc. Once any pending rendering targeting the specified fb (as of - * ioctl time) has completed, the crtc will be reprogrammed to display - * that fb after the next vertical refresh. The ioctl returns - * immediately, but subsequent rendering to the current fb will block - * in the execbuffer ioctl until the page flip happens. If a page - * flip is already pending as the ioctl is called, EBUSY will be - * returned. - * - * Flag DRM_MODE_PAGE_FLIP_EVENT requests that drm sends back a vblank - * event (see drm.h: struct drm_event_vblank) when the page flip is - * done. The user_data field passed in with this ioctl will be - * returned as the user_data field in the vblank event struct. - * - * Flag DRM_MODE_PAGE_FLIP_ASYNC requests that the flip happen - * 'as soon as possible', meaning that it not delay waiting for vblank. - * This may cause tearing on the screen. - * - * The reserved field must be zero. - */ - -struct drm_mode_crtc_page_flip { - __u32 crtc_id; - __u32 fb_id; - __u32 flags; - __u32 reserved; - __u64 user_data; -}; - -/* - * Request a page flip on the specified crtc. - * - * Same as struct drm_mode_crtc_page_flip, but supports new flags and - * re-purposes the reserved field: - * - * The sequence field must be zero unless either of the - * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is specified. When - * the ABSOLUTE flag is specified, the sequence field denotes the absolute - * vblank sequence when the flip should take effect. When the RELATIVE - * flag is specified, the sequence field denotes the relative (to the - * current one when the ioctl is called) vblank sequence when the flip - * should take effect. NOTE: DRM_IOCTL_WAIT_VBLANK must still be used to - * make sure the vblank sequence before the target one has passed before - * calling this ioctl. The purpose of the - * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is merely to clarify - * the target for when code dealing with a page flip runs during a - * vertical blank period. - */ - -struct drm_mode_crtc_page_flip_target { - __u32 crtc_id; - __u32 fb_id; - __u32 flags; - __u32 sequence; - __u64 user_data; -}; - -/* create a dumb scanout buffer */ -struct drm_mode_create_dumb { - __u32 height; - __u32 width; - __u32 bpp; - __u32 flags; - /* handle, pitch, size will be returned */ - __u32 handle; - __u32 pitch; - __u64 size; -}; - -/* set up for mmap of a dumb scanout buffer */ -struct drm_mode_map_dumb { - /** Handle for the object being mapped. */ - __u32 handle; - __u32 pad; - /** - * Fake offset to use for subsequent mmap call - * - * This is a fixed-size type for 32/64 compatibility. - */ - __u64 offset; -}; - -struct drm_mode_destroy_dumb { - __u32 handle; -}; - -/* page-flip flags are valid, plus: */ -#define DRM_MODE_ATOMIC_TEST_ONLY 0x0100 -#define DRM_MODE_ATOMIC_NONBLOCK 0x0200 -#define DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400 - -#define DRM_MODE_ATOMIC_FLAGS (\ - DRM_MODE_PAGE_FLIP_EVENT |\ - DRM_MODE_PAGE_FLIP_ASYNC |\ - DRM_MODE_ATOMIC_TEST_ONLY |\ - DRM_MODE_ATOMIC_NONBLOCK |\ - DRM_MODE_ATOMIC_ALLOW_MODESET) - -struct drm_mode_atomic { - __u32 flags; - __u32 count_objs; - __u64 objs_ptr; - __u64 count_props_ptr; - __u64 props_ptr; - __u64 prop_values_ptr; - __u64 reserved; - __u64 user_data; -}; - -struct drm_format_modifier_blob { -#define FORMAT_BLOB_CURRENT 1 - /* Version of this blob format */ - __u32 version; - - /* Flags */ - __u32 flags; - - /* Number of fourcc formats supported */ - __u32 count_formats; - - /* Where in this blob the formats exist (in bytes) */ - __u32 formats_offset; - - /* Number of drm_format_modifiers */ - __u32 count_modifiers; - - /* Where in this blob the modifiers exist (in bytes) */ - __u32 modifiers_offset; - - /* __u32 formats[] */ - /* struct drm_format_modifier modifiers[] */ -}; - -struct drm_format_modifier { - /* Bitmask of formats in get_plane format list this info applies to. The - * offset allows a sliding window of which 64 formats (bits). - * - * Some examples: - * In today's world with < 65 formats, and formats 0, and 2 are - * supported - * 0x0000000000000005 - * ^-offset = 0, formats = 5 - * - * If the number formats grew to 128, and formats 98-102 are - * supported with the modifier: - * - * 0x0000007c00000000 0000000000000000 - * ^ - * |__offset = 64, formats = 0x7c00000000 - * - */ - __u64 formats; - __u32 offset; - __u32 pad; - - /* The modifier that applies to the >get_plane format list bitmask. */ - __u64 modifier; -}; - -/** - * Create a new 'blob' data property, copying length bytes from data pointer, - * and returning new blob ID. - */ -struct drm_mode_create_blob { - /** Pointer to data to copy. */ - __u64 data; - /** Length of data to copy. */ - __u32 length; - /** Return: new property ID. */ - __u32 blob_id; -}; - -/** - * Destroy a user-created blob property. - */ -struct drm_mode_destroy_blob { - __u32 blob_id; -}; - -/** - * Lease mode resources, creating another drm_master. - */ -struct drm_mode_create_lease { - /** Pointer to array of object ids (__u32) */ - __u64 object_ids; - /** Number of object ids */ - __u32 object_count; - /** flags for new FD (O_CLOEXEC, etc) */ - __u32 flags; - - /** Return: unique identifier for lessee. */ - __u32 lessee_id; - /** Return: file descriptor to new drm_master file */ - __u32 fd; -}; - -/** - * List lesses from a drm_master - */ -struct drm_mode_list_lessees { - /** Number of lessees. - * On input, provides length of the array. - * On output, provides total number. No - * more than the input number will be written - * back, so two calls can be used to get - * the size and then the data. - */ - __u32 count_lessees; - __u32 pad; - - /** Pointer to lessees. - * pointer to __u64 array of lessee ids - */ - __u64 lessees_ptr; -}; - -/** - * Get leased objects - */ -struct drm_mode_get_lease { - /** Number of leased objects. - * On input, provides length of the array. - * On output, provides total number. No - * more than the input number will be written - * back, so two calls can be used to get - * the size and then the data. - */ - __u32 count_objects; - __u32 pad; - - /** Pointer to objects. - * pointer to __u32 array of object ids - */ - __u64 objects_ptr; -}; - -/** - * Revoke lease - */ -struct drm_mode_revoke_lease { - /** Unique ID of lessee - */ - __u32 lessee_id; -}; - -#if defined(__cplusplus) -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/drm_sarea.h b/lib/libc/include/generic-musl/drm/drm_sarea.h deleted file mode 100644 index 911f2935df..0000000000 --- a/lib/libc/include/generic-musl/drm/drm_sarea.h +++ /dev/null @@ -1,92 +0,0 @@ -/** - * \file drm_sarea.h - * \brief SAREA definitions - * - * \author Michel Dänzer - */ - -/* - * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _DRM_SAREA_H_ -#define _DRM_SAREA_H_ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* SAREA area needs to be at least a page */ -#if defined(__alpha__) -#define SAREA_MAX 0x2000U -#elif defined(__mips__) -#define SAREA_MAX 0x4000U -#elif defined(__ia64__) -#define SAREA_MAX 0x10000U /* 64kB */ -#else -/* Intel 830M driver needs at least 8k SAREA */ -#define SAREA_MAX 0x2000U -#endif - -/** Maximum number of drawables in the SAREA */ -#define SAREA_MAX_DRAWABLES 256 - -#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000 - -/** SAREA drawable */ -struct drm_sarea_drawable { - unsigned int stamp; - unsigned int flags; -}; - -/** SAREA frame */ -struct drm_sarea_frame { - unsigned int x; - unsigned int y; - unsigned int width; - unsigned int height; - unsigned int fullscreen; -}; - -/** SAREA */ -struct drm_sarea { - /** first thing is always the DRM locking structure */ - struct drm_hw_lock lock; - /** \todo Use readers/writer lock for drm_sarea::drawable_lock */ - struct drm_hw_lock drawable_lock; - struct drm_sarea_drawable drawableTable[SAREA_MAX_DRAWABLES]; /**< drawables */ - struct drm_sarea_frame frame; /**< frame */ - drm_context_t dummy_context; -}; - -typedef struct drm_sarea_drawable drm_sarea_drawable_t; -typedef struct drm_sarea_frame drm_sarea_frame_t; -typedef struct drm_sarea drm_sarea_t; - -#if defined(__cplusplus) -} -#endif - -#endif /* _DRM_SAREA_H_ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/etnaviv_drm.h b/lib/libc/include/generic-musl/drm/etnaviv_drm.h deleted file mode 100644 index 2202410f60..0000000000 --- a/lib/libc/include/generic-musl/drm/etnaviv_drm.h +++ /dev/null @@ -1,289 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2015 Etnaviv Project - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 as published by - * the Free Software Foundation. - * - * 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 __ETNAVIV_DRM_H__ -#define __ETNAVIV_DRM_H__ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Please note that modifications to all structs defined here are - * subject to backwards-compatibility constraints: - * 1) Do not use pointers, use __u64 instead for 32 bit / 64 bit - * user/kernel compatibility - * 2) Keep fields aligned to their size - * 3) Because of how drm_ioctl() works, we can add new fields at - * the end of an ioctl if some care is taken: drm_ioctl() will - * zero out the new fields at the tail of the ioctl, so a zero - * value should have a backwards compatible meaning. And for - * output params, userspace won't see the newly added output - * fields.. so that has to be somehow ok. - */ - -/* timeouts are specified in clock-monotonic absolute times (to simplify - * restarting interrupted ioctls). The following struct is logically the - * same as 'struct timespec' but 32/64b ABI safe. - */ -struct drm_etnaviv_timespec { - __s64 tv_sec; /* seconds */ - __s64 tv_nsec; /* nanoseconds */ -}; - -#define ETNAVIV_PARAM_GPU_MODEL 0x01 -#define ETNAVIV_PARAM_GPU_REVISION 0x02 -#define ETNAVIV_PARAM_GPU_FEATURES_0 0x03 -#define ETNAVIV_PARAM_GPU_FEATURES_1 0x04 -#define ETNAVIV_PARAM_GPU_FEATURES_2 0x05 -#define ETNAVIV_PARAM_GPU_FEATURES_3 0x06 -#define ETNAVIV_PARAM_GPU_FEATURES_4 0x07 -#define ETNAVIV_PARAM_GPU_FEATURES_5 0x08 -#define ETNAVIV_PARAM_GPU_FEATURES_6 0x09 -#define ETNAVIV_PARAM_GPU_FEATURES_7 0x0a -#define ETNAVIV_PARAM_GPU_FEATURES_8 0x0b -#define ETNAVIV_PARAM_GPU_FEATURES_9 0x0c -#define ETNAVIV_PARAM_GPU_FEATURES_10 0x0d -#define ETNAVIV_PARAM_GPU_FEATURES_11 0x0e -#define ETNAVIV_PARAM_GPU_FEATURES_12 0x0f - -#define ETNAVIV_PARAM_GPU_STREAM_COUNT 0x10 -#define ETNAVIV_PARAM_GPU_REGISTER_MAX 0x11 -#define ETNAVIV_PARAM_GPU_THREAD_COUNT 0x12 -#define ETNAVIV_PARAM_GPU_VERTEX_CACHE_SIZE 0x13 -#define ETNAVIV_PARAM_GPU_SHADER_CORE_COUNT 0x14 -#define ETNAVIV_PARAM_GPU_PIXEL_PIPES 0x15 -#define ETNAVIV_PARAM_GPU_VERTEX_OUTPUT_BUFFER_SIZE 0x16 -#define ETNAVIV_PARAM_GPU_BUFFER_SIZE 0x17 -#define ETNAVIV_PARAM_GPU_INSTRUCTION_COUNT 0x18 -#define ETNAVIV_PARAM_GPU_NUM_CONSTANTS 0x19 -#define ETNAVIV_PARAM_GPU_NUM_VARYINGS 0x1a - -#define ETNA_MAX_PIPES 4 - -struct drm_etnaviv_param { - __u32 pipe; /* in */ - __u32 param; /* in, ETNAVIV_PARAM_x */ - __u64 value; /* out (get_param) or in (set_param) */ -}; - -/* - * GEM buffers: - */ - -#define ETNA_BO_CACHE_MASK 0x000f0000 -/* cache modes */ -#define ETNA_BO_CACHED 0x00010000 -#define ETNA_BO_WC 0x00020000 -#define ETNA_BO_UNCACHED 0x00040000 -/* map flags */ -#define ETNA_BO_FORCE_MMU 0x00100000 - -struct drm_etnaviv_gem_new { - __u64 size; /* in */ - __u32 flags; /* in, mask of ETNA_BO_x */ - __u32 handle; /* out */ -}; - -struct drm_etnaviv_gem_info { - __u32 handle; /* in */ - __u32 pad; - __u64 offset; /* out, offset to pass to mmap() */ -}; - -#define ETNA_PREP_READ 0x01 -#define ETNA_PREP_WRITE 0x02 -#define ETNA_PREP_NOSYNC 0x04 - -struct drm_etnaviv_gem_cpu_prep { - __u32 handle; /* in */ - __u32 op; /* in, mask of ETNA_PREP_x */ - struct drm_etnaviv_timespec timeout; /* in */ -}; - -struct drm_etnaviv_gem_cpu_fini { - __u32 handle; /* in */ - __u32 flags; /* in, placeholder for now, no defined values */ -}; - -/* - * Cmdstream Submission: - */ - -/* The value written into the cmdstream is logically: - * relocbuf->gpuaddr + reloc_offset - * - * NOTE that reloc's must be sorted by order of increasing submit_offset, - * otherwise EINVAL. - */ -struct drm_etnaviv_gem_submit_reloc { - __u32 submit_offset; /* in, offset from submit_bo */ - __u32 reloc_idx; /* in, index of reloc_bo buffer */ - __u64 reloc_offset; /* in, offset from start of reloc_bo */ - __u32 flags; /* in, placeholder for now, no defined values */ -}; - -/* Each buffer referenced elsewhere in the cmdstream submit (ie. the - * cmdstream buffer(s) themselves or reloc entries) has one (and only - * one) entry in the submit->bos[] table. - * - * As a optimization, the current buffer (gpu virtual address) can be - * passed back through the 'presumed' field. If on a subsequent reloc, - * userspace passes back a 'presumed' address that is still valid, - * then patching the cmdstream for this entry is skipped. This can - * avoid kernel needing to map/access the cmdstream bo in the common - * case. - */ -#define ETNA_SUBMIT_BO_READ 0x0001 -#define ETNA_SUBMIT_BO_WRITE 0x0002 -struct drm_etnaviv_gem_submit_bo { - __u32 flags; /* in, mask of ETNA_SUBMIT_BO_x */ - __u32 handle; /* in, GEM handle */ - __u64 presumed; /* in/out, presumed buffer address */ -}; - -/* performance monitor request (pmr) */ -#define ETNA_PM_PROCESS_PRE 0x0001 -#define ETNA_PM_PROCESS_POST 0x0002 -struct drm_etnaviv_gem_submit_pmr { - __u32 flags; /* in, when to process request (ETNA_PM_PROCESS_x) */ - __u8 domain; /* in, pm domain */ - __u8 pad; - __u16 signal; /* in, pm signal */ - __u32 sequence; /* in, sequence number */ - __u32 read_offset; /* in, offset from read_bo */ - __u32 read_idx; /* in, index of read_bo buffer */ -}; - -/* Each cmdstream submit consists of a table of buffers involved, and - * one or more cmdstream buffers. This allows for conditional execution - * (context-restore), and IB buffers needed for per tile/bin draw cmds. - */ -#define ETNA_SUBMIT_NO_IMPLICIT 0x0001 -#define ETNA_SUBMIT_FENCE_FD_IN 0x0002 -#define ETNA_SUBMIT_FENCE_FD_OUT 0x0004 -#define ETNA_SUBMIT_FLAGS (ETNA_SUBMIT_NO_IMPLICIT | \ - ETNA_SUBMIT_FENCE_FD_IN | \ - ETNA_SUBMIT_FENCE_FD_OUT) -#define ETNA_PIPE_3D 0x00 -#define ETNA_PIPE_2D 0x01 -#define ETNA_PIPE_VG 0x02 -struct drm_etnaviv_gem_submit { - __u32 fence; /* out */ - __u32 pipe; /* in */ - __u32 exec_state; /* in, initial execution state (ETNA_PIPE_x) */ - __u32 nr_bos; /* in, number of submit_bo's */ - __u32 nr_relocs; /* in, number of submit_reloc's */ - __u32 stream_size; /* in, cmdstream size */ - __u64 bos; /* in, ptr to array of submit_bo's */ - __u64 relocs; /* in, ptr to array of submit_reloc's */ - __u64 stream; /* in, ptr to cmdstream */ - __u32 flags; /* in, mask of ETNA_SUBMIT_x */ - __s32 fence_fd; /* in/out, fence fd (see ETNA_SUBMIT_FENCE_FD_x) */ - __u64 pmrs; /* in, ptr to array of submit_pmr's */ - __u32 nr_pmrs; /* in, number of submit_pmr's */ - __u32 pad; -}; - -/* The normal way to synchronize with the GPU is just to CPU_PREP on - * a buffer if you need to access it from the CPU (other cmdstream - * submission from same or other contexts, PAGE_FLIP ioctl, etc, all - * handle the required synchronization under the hood). This ioctl - * mainly just exists as a way to implement the gallium pipe_fence - * APIs without requiring a dummy bo to synchronize on. - */ -#define ETNA_WAIT_NONBLOCK 0x01 -struct drm_etnaviv_wait_fence { - __u32 pipe; /* in */ - __u32 fence; /* in */ - __u32 flags; /* in, mask of ETNA_WAIT_x */ - __u32 pad; - struct drm_etnaviv_timespec timeout; /* in */ -}; - -#define ETNA_USERPTR_READ 0x01 -#define ETNA_USERPTR_WRITE 0x02 -struct drm_etnaviv_gem_userptr { - __u64 user_ptr; /* in, page aligned user pointer */ - __u64 user_size; /* in, page aligned user size */ - __u32 flags; /* in, flags */ - __u32 handle; /* out, non-zero handle */ -}; - -struct drm_etnaviv_gem_wait { - __u32 pipe; /* in */ - __u32 handle; /* in, bo to be waited for */ - __u32 flags; /* in, mask of ETNA_WAIT_x */ - __u32 pad; - struct drm_etnaviv_timespec timeout; /* in */ -}; - -/* - * Performance Monitor (PM): - */ - -struct drm_etnaviv_pm_domain { - __u32 pipe; /* in */ - __u8 iter; /* in/out, select pm domain at index iter */ - __u8 id; /* out, id of domain */ - __u16 nr_signals; /* out, how many signals does this domain provide */ - char name[64]; /* out, name of domain */ -}; - -struct drm_etnaviv_pm_signal { - __u32 pipe; /* in */ - __u8 domain; /* in, pm domain index */ - __u8 pad; - __u16 iter; /* in/out, select pm source at index iter */ - __u16 id; /* out, id of signal */ - char name[64]; /* out, name of domain */ -}; - -#define DRM_ETNAVIV_GET_PARAM 0x00 -/* placeholder: -#define DRM_ETNAVIV_SET_PARAM 0x01 - */ -#define DRM_ETNAVIV_GEM_NEW 0x02 -#define DRM_ETNAVIV_GEM_INFO 0x03 -#define DRM_ETNAVIV_GEM_CPU_PREP 0x04 -#define DRM_ETNAVIV_GEM_CPU_FINI 0x05 -#define DRM_ETNAVIV_GEM_SUBMIT 0x06 -#define DRM_ETNAVIV_WAIT_FENCE 0x07 -#define DRM_ETNAVIV_GEM_USERPTR 0x08 -#define DRM_ETNAVIV_GEM_WAIT 0x09 -#define DRM_ETNAVIV_PM_QUERY_DOM 0x0a -#define DRM_ETNAVIV_PM_QUERY_SIG 0x0b -#define DRM_ETNAVIV_NUM_IOCTLS 0x0c - -#define DRM_IOCTL_ETNAVIV_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GET_PARAM, struct drm_etnaviv_param) -#define DRM_IOCTL_ETNAVIV_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_NEW, struct drm_etnaviv_gem_new) -#define DRM_IOCTL_ETNAVIV_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_INFO, struct drm_etnaviv_gem_info) -#define DRM_IOCTL_ETNAVIV_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_PREP, struct drm_etnaviv_gem_cpu_prep) -#define DRM_IOCTL_ETNAVIV_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_FINI, struct drm_etnaviv_gem_cpu_fini) -#define DRM_IOCTL_ETNAVIV_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_SUBMIT, struct drm_etnaviv_gem_submit) -#define DRM_IOCTL_ETNAVIV_WAIT_FENCE DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_WAIT_FENCE, struct drm_etnaviv_wait_fence) -#define DRM_IOCTL_ETNAVIV_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_USERPTR, struct drm_etnaviv_gem_userptr) -#define DRM_IOCTL_ETNAVIV_GEM_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_WAIT, struct drm_etnaviv_gem_wait) -#define DRM_IOCTL_ETNAVIV_PM_QUERY_DOM DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_DOM, struct drm_etnaviv_pm_domain) -#define DRM_IOCTL_ETNAVIV_PM_QUERY_SIG DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_SIG, struct drm_etnaviv_pm_signal) - -#if defined(__cplusplus) -} -#endif - -#endif /* __ETNAVIV_DRM_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/exynos_drm.h b/lib/libc/include/generic-musl/drm/exynos_drm.h deleted file mode 100644 index d25aae2efb..0000000000 --- a/lib/libc/include/generic-musl/drm/exynos_drm.h +++ /dev/null @@ -1,424 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* exynos_drm.h - * - * Copyright (c) 2011 Samsung Electronics Co., Ltd. - * Authors: - * Inki Dae - * Joonyoung Shim - * Seung-Woo Kim - * - * 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. - */ - -#ifndef _EXYNOS_DRM_H_ -#define _EXYNOS_DRM_H_ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/** - * User-desired buffer creation information structure. - * - * @size: user-desired memory allocation size. - * - this size value would be page-aligned internally. - * @flags: user request for setting memory type or cache attributes. - * @handle: returned a handle to created gem object. - * - this handle will be set by gem module of kernel side. - */ -struct drm_exynos_gem_create { - __u64 size; - __u32 flags; - __u32 handle; -}; - -/** - * A structure for getting a fake-offset that can be used with mmap. - * - * @handle: handle of gem object. - * @reserved: just padding to be 64-bit aligned. - * @offset: a fake-offset of gem object. - */ -struct drm_exynos_gem_map { - __u32 handle; - __u32 reserved; - __u64 offset; -}; - -/** - * A structure to gem information. - * - * @handle: a handle to gem object created. - * @flags: flag value including memory type and cache attribute and - * this value would be set by driver. - * @size: size to memory region allocated by gem and this size would - * be set by driver. - */ -struct drm_exynos_gem_info { - __u32 handle; - __u32 flags; - __u64 size; -}; - -/** - * A structure for user connection request of virtual display. - * - * @connection: indicate whether doing connetion or not by user. - * @extensions: if this value is 1 then the vidi driver would need additional - * 128bytes edid data. - * @edid: the edid data pointer from user side. - */ -struct drm_exynos_vidi_connection { - __u32 connection; - __u32 extensions; - __u64 edid; -}; - -/* memory type definitions. */ -enum e_drm_exynos_gem_mem_type { - /* Physically Continuous memory and used as default. */ - EXYNOS_BO_CONTIG = 0 << 0, - /* Physically Non-Continuous memory. */ - EXYNOS_BO_NONCONTIG = 1 << 0, - /* non-cachable mapping and used as default. */ - EXYNOS_BO_NONCACHABLE = 0 << 1, - /* cachable mapping. */ - EXYNOS_BO_CACHABLE = 1 << 1, - /* write-combine mapping. */ - EXYNOS_BO_WC = 1 << 2, - EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG | EXYNOS_BO_CACHABLE | - EXYNOS_BO_WC -}; - -struct drm_exynos_g2d_get_ver { - __u32 major; - __u32 minor; -}; - -struct drm_exynos_g2d_cmd { - __u32 offset; - __u32 data; -}; - -enum drm_exynos_g2d_buf_type { - G2D_BUF_USERPTR = 1 << 31, -}; - -enum drm_exynos_g2d_event_type { - G2D_EVENT_NOT, - G2D_EVENT_NONSTOP, - G2D_EVENT_STOP, /* not yet */ -}; - -struct drm_exynos_g2d_userptr { - unsigned long userptr; - unsigned long size; -}; - -struct drm_exynos_g2d_set_cmdlist { - __u64 cmd; - __u64 cmd_buf; - __u32 cmd_nr; - __u32 cmd_buf_nr; - - /* for g2d event */ - __u64 event_type; - __u64 user_data; -}; - -struct drm_exynos_g2d_exec { - __u64 async; -}; - -/* Exynos DRM IPP v2 API */ - -/** - * Enumerate available IPP hardware modules. - * - * @count_ipps: size of ipp_id array / number of ipp modules (set by driver) - * @reserved: padding - * @ipp_id_ptr: pointer to ipp_id array or NULL - */ -struct drm_exynos_ioctl_ipp_get_res { - __u32 count_ipps; - __u32 reserved; - __u64 ipp_id_ptr; -}; - -enum drm_exynos_ipp_format_type { - DRM_EXYNOS_IPP_FORMAT_SOURCE = 0x01, - DRM_EXYNOS_IPP_FORMAT_DESTINATION = 0x02, -}; - -struct drm_exynos_ipp_format { - __u32 fourcc; - __u32 type; - __u64 modifier; -}; - -enum drm_exynos_ipp_capability { - DRM_EXYNOS_IPP_CAP_CROP = 0x01, - DRM_EXYNOS_IPP_CAP_ROTATE = 0x02, - DRM_EXYNOS_IPP_CAP_SCALE = 0x04, - DRM_EXYNOS_IPP_CAP_CONVERT = 0x08, -}; - -/** - * Get IPP hardware capabilities and supported image formats. - * - * @ipp_id: id of IPP module to query - * @capabilities: bitmask of drm_exynos_ipp_capability (set by driver) - * @reserved: padding - * @formats_count: size of formats array (in entries) / number of filled - * formats (set by driver) - * @formats_ptr: pointer to formats array or NULL - */ -struct drm_exynos_ioctl_ipp_get_caps { - __u32 ipp_id; - __u32 capabilities; - __u32 reserved; - __u32 formats_count; - __u64 formats_ptr; -}; - -enum drm_exynos_ipp_limit_type { - /* size (horizontal/vertial) limits, in pixels (min, max, alignment) */ - DRM_EXYNOS_IPP_LIMIT_TYPE_SIZE = 0x0001, - /* scale ratio (horizonta/vertial), 16.16 fixed point (min, max) */ - DRM_EXYNOS_IPP_LIMIT_TYPE_SCALE = 0x0002, - - /* image buffer area */ - DRM_EXYNOS_IPP_LIMIT_SIZE_BUFFER = 0x0001 << 16, - /* src/dst rectangle area */ - DRM_EXYNOS_IPP_LIMIT_SIZE_AREA = 0x0002 << 16, - /* src/dst rectangle area when rotation enabled */ - DRM_EXYNOS_IPP_LIMIT_SIZE_ROTATED = 0x0003 << 16, - - DRM_EXYNOS_IPP_LIMIT_TYPE_MASK = 0x000f, - DRM_EXYNOS_IPP_LIMIT_SIZE_MASK = 0x000f << 16, -}; - -struct drm_exynos_ipp_limit_val { - __u32 min; - __u32 max; - __u32 align; - __u32 reserved; -}; - -/** - * IPP module limitation. - * - * @type: limit type (see drm_exynos_ipp_limit_type enum) - * @reserved: padding - * @h: horizontal limits - * @v: vertical limits - */ -struct drm_exynos_ipp_limit { - __u32 type; - __u32 reserved; - struct drm_exynos_ipp_limit_val h; - struct drm_exynos_ipp_limit_val v; -}; - -/** - * Get IPP limits for given image format. - * - * @ipp_id: id of IPP module to query - * @fourcc: image format code (see DRM_FORMAT_* in drm_fourcc.h) - * @modifier: image format modifier (see DRM_FORMAT_MOD_* in drm_fourcc.h) - * @type: source/destination identifier (drm_exynos_ipp_format_flag enum) - * @limits_count: size of limits array (in entries) / number of filled entries - * (set by driver) - * @limits_ptr: pointer to limits array or NULL - */ -struct drm_exynos_ioctl_ipp_get_limits { - __u32 ipp_id; - __u32 fourcc; - __u64 modifier; - __u32 type; - __u32 limits_count; - __u64 limits_ptr; -}; - -enum drm_exynos_ipp_task_id { - /* buffer described by struct drm_exynos_ipp_task_buffer */ - DRM_EXYNOS_IPP_TASK_BUFFER = 0x0001, - /* rectangle described by struct drm_exynos_ipp_task_rect */ - DRM_EXYNOS_IPP_TASK_RECTANGLE = 0x0002, - /* transformation described by struct drm_exynos_ipp_task_transform */ - DRM_EXYNOS_IPP_TASK_TRANSFORM = 0x0003, - /* alpha configuration described by struct drm_exynos_ipp_task_alpha */ - DRM_EXYNOS_IPP_TASK_ALPHA = 0x0004, - - /* source image data (for buffer and rectangle chunks) */ - DRM_EXYNOS_IPP_TASK_TYPE_SOURCE = 0x0001 << 16, - /* destination image data (for buffer and rectangle chunks) */ - DRM_EXYNOS_IPP_TASK_TYPE_DESTINATION = 0x0002 << 16, -}; - -/** - * Memory buffer with image data. - * - * @id: must be DRM_EXYNOS_IPP_TASK_BUFFER - * other parameters are same as for AddFB2 generic DRM ioctl - */ -struct drm_exynos_ipp_task_buffer { - __u32 id; - __u32 fourcc; - __u32 width, height; - __u32 gem_id[4]; - __u32 offset[4]; - __u32 pitch[4]; - __u64 modifier; -}; - -/** - * Rectangle for processing. - * - * @id: must be DRM_EXYNOS_IPP_TASK_RECTANGLE - * @reserved: padding - * @x,@y: left corner in pixels - * @w,@h: width/height in pixels - */ -struct drm_exynos_ipp_task_rect { - __u32 id; - __u32 reserved; - __u32 x; - __u32 y; - __u32 w; - __u32 h; -}; - -/** - * Image tranformation description. - * - * @id: must be DRM_EXYNOS_IPP_TASK_TRANSFORM - * @rotation: DRM_MODE_ROTATE_* and DRM_MODE_REFLECT_* values - */ -struct drm_exynos_ipp_task_transform { - __u32 id; - __u32 rotation; -}; - -/** - * Image global alpha configuration for formats without alpha values. - * - * @id: must be DRM_EXYNOS_IPP_TASK_ALPHA - * @value: global alpha value (0-255) - */ -struct drm_exynos_ipp_task_alpha { - __u32 id; - __u32 value; -}; - -enum drm_exynos_ipp_flag { - /* generate DRM event after processing */ - DRM_EXYNOS_IPP_FLAG_EVENT = 0x01, - /* dry run, only check task parameters */ - DRM_EXYNOS_IPP_FLAG_TEST_ONLY = 0x02, - /* non-blocking processing */ - DRM_EXYNOS_IPP_FLAG_NONBLOCK = 0x04, -}; - -#define DRM_EXYNOS_IPP_FLAGS (DRM_EXYNOS_IPP_FLAG_EVENT |\ - DRM_EXYNOS_IPP_FLAG_TEST_ONLY | DRM_EXYNOS_IPP_FLAG_NONBLOCK) - -/** - * Perform image processing described by array of drm_exynos_ipp_task_* - * structures (parameters array). - * - * @ipp_id: id of IPP module to run the task - * @flags: bitmask of drm_exynos_ipp_flag values - * @reserved: padding - * @params_size: size of parameters array (in bytes) - * @params_ptr: pointer to parameters array or NULL - * @user_data: (optional) data for drm event - */ -struct drm_exynos_ioctl_ipp_commit { - __u32 ipp_id; - __u32 flags; - __u32 reserved; - __u32 params_size; - __u64 params_ptr; - __u64 user_data; -}; - -#define DRM_EXYNOS_GEM_CREATE 0x00 -#define DRM_EXYNOS_GEM_MAP 0x01 -/* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */ -#define DRM_EXYNOS_GEM_GET 0x04 -#define DRM_EXYNOS_VIDI_CONNECTION 0x07 - -/* G2D */ -#define DRM_EXYNOS_G2D_GET_VER 0x20 -#define DRM_EXYNOS_G2D_SET_CMDLIST 0x21 -#define DRM_EXYNOS_G2D_EXEC 0x22 - -/* Reserved 0x30 ~ 0x33 for obsolete Exynos IPP ioctls */ -/* IPP - Image Post Processing */ -#define DRM_EXYNOS_IPP_GET_RESOURCES 0x40 -#define DRM_EXYNOS_IPP_GET_CAPS 0x41 -#define DRM_EXYNOS_IPP_GET_LIMITS 0x42 -#define DRM_EXYNOS_IPP_COMMIT 0x43 - -#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \ - DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create) -#define DRM_IOCTL_EXYNOS_GEM_MAP DRM_IOWR(DRM_COMMAND_BASE + \ - DRM_EXYNOS_GEM_MAP, struct drm_exynos_gem_map) -#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \ - DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info) - -#define DRM_IOCTL_EXYNOS_VIDI_CONNECTION DRM_IOWR(DRM_COMMAND_BASE + \ - DRM_EXYNOS_VIDI_CONNECTION, struct drm_exynos_vidi_connection) - -#define DRM_IOCTL_EXYNOS_G2D_GET_VER DRM_IOWR(DRM_COMMAND_BASE + \ - DRM_EXYNOS_G2D_GET_VER, struct drm_exynos_g2d_get_ver) -#define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST DRM_IOWR(DRM_COMMAND_BASE + \ - DRM_EXYNOS_G2D_SET_CMDLIST, struct drm_exynos_g2d_set_cmdlist) -#define DRM_IOCTL_EXYNOS_G2D_EXEC DRM_IOWR(DRM_COMMAND_BASE + \ - DRM_EXYNOS_G2D_EXEC, struct drm_exynos_g2d_exec) - -#define DRM_IOCTL_EXYNOS_IPP_GET_RESOURCES DRM_IOWR(DRM_COMMAND_BASE + \ - DRM_EXYNOS_IPP_GET_RESOURCES, \ - struct drm_exynos_ioctl_ipp_get_res) -#define DRM_IOCTL_EXYNOS_IPP_GET_CAPS DRM_IOWR(DRM_COMMAND_BASE + \ - DRM_EXYNOS_IPP_GET_CAPS, struct drm_exynos_ioctl_ipp_get_caps) -#define DRM_IOCTL_EXYNOS_IPP_GET_LIMITS DRM_IOWR(DRM_COMMAND_BASE + \ - DRM_EXYNOS_IPP_GET_LIMITS, \ - struct drm_exynos_ioctl_ipp_get_limits) -#define DRM_IOCTL_EXYNOS_IPP_COMMIT DRM_IOWR(DRM_COMMAND_BASE + \ - DRM_EXYNOS_IPP_COMMIT, struct drm_exynos_ioctl_ipp_commit) - -/* EXYNOS specific events */ -#define DRM_EXYNOS_G2D_EVENT 0x80000000 -#define DRM_EXYNOS_IPP_EVENT 0x80000002 - -struct drm_exynos_g2d_event { - struct drm_event base; - __u64 user_data; - __u32 tv_sec; - __u32 tv_usec; - __u32 cmdlist_no; - __u32 reserved; -}; - -struct drm_exynos_ipp_event { - struct drm_event base; - __u64 user_data; - __u32 tv_sec; - __u32 tv_usec; - __u32 ipp_id; - __u32 sequence; - __u64 reserved; -}; - -#if defined(__cplusplus) -} -#endif - -#endif /* _EXYNOS_DRM_H_ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/i810_drm.h b/lib/libc/include/generic-musl/drm/i810_drm.h deleted file mode 100644 index a4d0486684..0000000000 --- a/lib/libc/include/generic-musl/drm/i810_drm.h +++ /dev/null @@ -1,292 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _I810_DRM_H_ -#define _I810_DRM_H_ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* WARNING: These defines must be the same as what the Xserver uses. - * if you change them, you must change the defines in the Xserver. - */ - -#ifndef _I810_DEFINES_ -#define _I810_DEFINES_ - -#define I810_DMA_BUF_ORDER 12 -#define I810_DMA_BUF_SZ (1<> (X % 8)) & 1 - * - * - the subslice mask for each slice with one bit per subslice telling - * whether a subslice is available. The availability of subslice Y in slice - * X can be queried with the following formula : - * - * (data[subslice_offset + - * X * subslice_stride + - * Y / 8] >> (Y % 8)) & 1 - * - * - the EU mask for each subslice in each slice with one bit per EU telling - * whether an EU is available. The availability of EU Z in subslice Y in - * slice X can be queried with the following formula : - * - * (data[eu_offset + - * (X * max_subslices + Y) * eu_stride + - * Z / 8] >> (Z % 8)) & 1 - */ -struct drm_i915_query_topology_info { - /* - * Unused for now. Must be cleared to zero. - */ - __u16 flags; - - __u16 max_slices; - __u16 max_subslices; - __u16 max_eus_per_subslice; - - /* - * Offset in data[] at which the subslice masks are stored. - */ - __u16 subslice_offset; - - /* - * Stride at which each of the subslice masks for each slice are - * stored. - */ - __u16 subslice_stride; - - /* - * Offset in data[] at which the EU masks are stored. - */ - __u16 eu_offset; - - /* - * Stride at which each of the EU masks for each subslice are stored. - */ - __u16 eu_stride; - - __u8 data[]; -}; - -#if defined(__cplusplus) -} -#endif - -#endif /* _I915_DRM_H_ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/mga_drm.h b/lib/libc/include/generic-musl/drm/mga_drm.h deleted file mode 100644 index cc9853ba43..0000000000 --- a/lib/libc/include/generic-musl/drm/mga_drm.h +++ /dev/null @@ -1,427 +0,0 @@ -/* mga_drm.h -- Public header for the Matrox g200/g400 driver -*- linux-c -*- - * Created: Tue Jan 25 01:50:01 1999 by jhartmann@precisioninsight.com - * - * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. - * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Jeff Hartmann - * Keith Whitwell - * - * Rewritten by: - * Gareth Hughes - */ - -#ifndef __MGA_DRM_H__ -#define __MGA_DRM_H__ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* WARNING: If you change any of these defines, make sure to change the - * defines in the Xserver file (mga_sarea.h) - */ - -#ifndef __MGA_SAREA_DEFINES__ -#define __MGA_SAREA_DEFINES__ - -/* WARP pipe flags - */ -#define MGA_F 0x1 /* fog */ -#define MGA_A 0x2 /* alpha */ -#define MGA_S 0x4 /* specular */ -#define MGA_T2 0x8 /* multitexture */ - -#define MGA_WARP_TGZ 0 -#define MGA_WARP_TGZF (MGA_F) -#define MGA_WARP_TGZA (MGA_A) -#define MGA_WARP_TGZAF (MGA_F|MGA_A) -#define MGA_WARP_TGZS (MGA_S) -#define MGA_WARP_TGZSF (MGA_S|MGA_F) -#define MGA_WARP_TGZSA (MGA_S|MGA_A) -#define MGA_WARP_TGZSAF (MGA_S|MGA_F|MGA_A) -#define MGA_WARP_T2GZ (MGA_T2) -#define MGA_WARP_T2GZF (MGA_T2|MGA_F) -#define MGA_WARP_T2GZA (MGA_T2|MGA_A) -#define MGA_WARP_T2GZAF (MGA_T2|MGA_A|MGA_F) -#define MGA_WARP_T2GZS (MGA_T2|MGA_S) -#define MGA_WARP_T2GZSF (MGA_T2|MGA_S|MGA_F) -#define MGA_WARP_T2GZSA (MGA_T2|MGA_S|MGA_A) -#define MGA_WARP_T2GZSAF (MGA_T2|MGA_S|MGA_F|MGA_A) - -#define MGA_MAX_G200_PIPES 8 /* no multitex */ -#define MGA_MAX_G400_PIPES 16 -#define MGA_MAX_WARP_PIPES MGA_MAX_G400_PIPES -#define MGA_WARP_UCODE_SIZE 32768 /* in bytes */ - -#define MGA_CARD_TYPE_G200 1 -#define MGA_CARD_TYPE_G400 2 -#define MGA_CARD_TYPE_G450 3 /* not currently used */ -#define MGA_CARD_TYPE_G550 4 - -#define MGA_FRONT 0x1 -#define MGA_BACK 0x2 -#define MGA_DEPTH 0x4 - -/* What needs to be changed for the current vertex dma buffer? - */ -#define MGA_UPLOAD_CONTEXT 0x1 -#define MGA_UPLOAD_TEX0 0x2 -#define MGA_UPLOAD_TEX1 0x4 -#define MGA_UPLOAD_PIPE 0x8 -#define MGA_UPLOAD_TEX0IMAGE 0x10 /* handled client-side */ -#define MGA_UPLOAD_TEX1IMAGE 0x20 /* handled client-side */ -#define MGA_UPLOAD_2D 0x40 -#define MGA_WAIT_AGE 0x80 /* handled client-side */ -#define MGA_UPLOAD_CLIPRECTS 0x100 /* handled client-side */ -#if 0 -#define MGA_DMA_FLUSH 0x200 /* set when someone gets the lock - quiescent */ -#endif - -/* 32 buffers of 64k each, total 2 meg. - */ -#define MGA_BUFFER_SIZE (1 << 16) -#define MGA_NUM_BUFFERS 128 - -/* Keep these small for testing. - */ -#define MGA_NR_SAREA_CLIPRECTS 8 - -/* 2 heaps (1 for card, 1 for agp), each divided into up to 128 - * regions, subject to a minimum region size of (1<<16) == 64k. - * - * Clients may subdivide regions internally, but when sharing between - * clients, the region size is the minimum granularity. - */ - -#define MGA_CARD_HEAP 0 -#define MGA_AGP_HEAP 1 -#define MGA_NR_TEX_HEAPS 2 -#define MGA_NR_TEX_REGIONS 16 -#define MGA_LOG_MIN_TEX_REGION_SIZE 16 - -#define DRM_MGA_IDLE_RETRY 2048 - -#endif /* __MGA_SAREA_DEFINES__ */ - -/* Setup registers for 3D context - */ -typedef struct { - unsigned int dstorg; - unsigned int maccess; - unsigned int plnwt; - unsigned int dwgctl; - unsigned int alphactrl; - unsigned int fogcolor; - unsigned int wflag; - unsigned int tdualstage0; - unsigned int tdualstage1; - unsigned int fcol; - unsigned int stencil; - unsigned int stencilctl; -} drm_mga_context_regs_t; - -/* Setup registers for 2D, X server - */ -typedef struct { - unsigned int pitch; -} drm_mga_server_regs_t; - -/* Setup registers for each texture unit - */ -typedef struct { - unsigned int texctl; - unsigned int texctl2; - unsigned int texfilter; - unsigned int texbordercol; - unsigned int texorg; - unsigned int texwidth; - unsigned int texheight; - unsigned int texorg1; - unsigned int texorg2; - unsigned int texorg3; - unsigned int texorg4; -} drm_mga_texture_regs_t; - -/* General aging mechanism - */ -typedef struct { - unsigned int head; /* Position of head pointer */ - unsigned int wrap; /* Primary DMA wrap count */ -} drm_mga_age_t; - -typedef struct _drm_mga_sarea { - /* The channel for communication of state information to the kernel - * on firing a vertex dma buffer. - */ - drm_mga_context_regs_t context_state; - drm_mga_server_regs_t server_state; - drm_mga_texture_regs_t tex_state[2]; - unsigned int warp_pipe; - unsigned int dirty; - unsigned int vertsize; - - /* The current cliprects, or a subset thereof. - */ - struct drm_clip_rect boxes[MGA_NR_SAREA_CLIPRECTS]; - unsigned int nbox; - - /* Information about the most recently used 3d drawable. The - * client fills in the req_* fields, the server fills in the - * exported_ fields and puts the cliprects into boxes, above. - * - * The client clears the exported_drawable field before - * clobbering the boxes data. - */ - unsigned int req_drawable; /* the X drawable id */ - unsigned int req_draw_buffer; /* MGA_FRONT or MGA_BACK */ - - unsigned int exported_drawable; - unsigned int exported_index; - unsigned int exported_stamp; - unsigned int exported_buffers; - unsigned int exported_nfront; - unsigned int exported_nback; - int exported_back_x, exported_front_x, exported_w; - int exported_back_y, exported_front_y, exported_h; - struct drm_clip_rect exported_boxes[MGA_NR_SAREA_CLIPRECTS]; - - /* Counters for aging textures and for client-side throttling. - */ - unsigned int status[4]; - unsigned int last_wrap; - - drm_mga_age_t last_frame; - unsigned int last_enqueue; /* last time a buffer was enqueued */ - unsigned int last_dispatch; /* age of the most recently dispatched buffer */ - unsigned int last_quiescent; /* */ - - /* LRU lists for texture memory in agp space and on the card. - */ - struct drm_tex_region texList[MGA_NR_TEX_HEAPS][MGA_NR_TEX_REGIONS + 1]; - unsigned int texAge[MGA_NR_TEX_HEAPS]; - - /* Mechanism to validate card state. - */ - int ctxOwner; -} drm_mga_sarea_t; - -/* MGA specific ioctls - * The device specific ioctl range is 0x40 to 0x79. - */ -#define DRM_MGA_INIT 0x00 -#define DRM_MGA_FLUSH 0x01 -#define DRM_MGA_RESET 0x02 -#define DRM_MGA_SWAP 0x03 -#define DRM_MGA_CLEAR 0x04 -#define DRM_MGA_VERTEX 0x05 -#define DRM_MGA_INDICES 0x06 -#define DRM_MGA_ILOAD 0x07 -#define DRM_MGA_BLIT 0x08 -#define DRM_MGA_GETPARAM 0x09 - -/* 3.2: - * ioctls for operating on fences. - */ -#define DRM_MGA_SET_FENCE 0x0a -#define DRM_MGA_WAIT_FENCE 0x0b -#define DRM_MGA_DMA_BOOTSTRAP 0x0c - -#define DRM_IOCTL_MGA_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_INIT, drm_mga_init_t) -#define DRM_IOCTL_MGA_FLUSH DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_FLUSH, struct drm_lock) -#define DRM_IOCTL_MGA_RESET DRM_IO( DRM_COMMAND_BASE + DRM_MGA_RESET) -#define DRM_IOCTL_MGA_SWAP DRM_IO( DRM_COMMAND_BASE + DRM_MGA_SWAP) -#define DRM_IOCTL_MGA_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_CLEAR, drm_mga_clear_t) -#define DRM_IOCTL_MGA_VERTEX DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_VERTEX, drm_mga_vertex_t) -#define DRM_IOCTL_MGA_INDICES DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_INDICES, drm_mga_indices_t) -#define DRM_IOCTL_MGA_ILOAD DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_ILOAD, drm_mga_iload_t) -#define DRM_IOCTL_MGA_BLIT DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_BLIT, drm_mga_blit_t) -#define DRM_IOCTL_MGA_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_GETPARAM, drm_mga_getparam_t) -#define DRM_IOCTL_MGA_SET_FENCE DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_SET_FENCE, __u32) -#define DRM_IOCTL_MGA_WAIT_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_WAIT_FENCE, __u32) -#define DRM_IOCTL_MGA_DMA_BOOTSTRAP DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_DMA_BOOTSTRAP, drm_mga_dma_bootstrap_t) - -typedef struct _drm_mga_warp_index { - int installed; - unsigned long phys_addr; - int size; -} drm_mga_warp_index_t; - -typedef struct drm_mga_init { - enum { - MGA_INIT_DMA = 0x01, - MGA_CLEANUP_DMA = 0x02 - } func; - - unsigned long sarea_priv_offset; - - int chipset; - int sgram; - - unsigned int maccess; - - unsigned int fb_cpp; - unsigned int front_offset, front_pitch; - unsigned int back_offset, back_pitch; - - unsigned int depth_cpp; - unsigned int depth_offset, depth_pitch; - - unsigned int texture_offset[MGA_NR_TEX_HEAPS]; - unsigned int texture_size[MGA_NR_TEX_HEAPS]; - - unsigned long fb_offset; - unsigned long mmio_offset; - unsigned long status_offset; - unsigned long warp_offset; - unsigned long primary_offset; - unsigned long buffers_offset; -} drm_mga_init_t; - -typedef struct drm_mga_dma_bootstrap { - /** - * \name AGP texture region - * - * On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, these fields will - * be filled in with the actual AGP texture settings. - * - * \warning - * If these fields are non-zero, but dma_mga_dma_bootstrap::agp_mode - * is zero, it means that PCI memory (most likely through the use of - * an IOMMU) is being used for "AGP" textures. - */ - /*@{ */ - unsigned long texture_handle; /**< Handle used to map AGP textures. */ - __u32 texture_size; /**< Size of the AGP texture region. */ - /*@} */ - - /** - * Requested size of the primary DMA region. - * - * On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, this field will be - * filled in with the actual AGP mode. If AGP was not available - */ - __u32 primary_size; - - /** - * Requested number of secondary DMA buffers. - * - * On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, this field will be - * filled in with the actual number of secondary DMA buffers - * allocated. Particularly when PCI DMA is used, this may be - * (subtantially) less than the number requested. - */ - __u32 secondary_bin_count; - - /** - * Requested size of each secondary DMA buffer. - * - * While the kernel \b is free to reduce - * dma_mga_dma_bootstrap::secondary_bin_count, it is \b not allowed - * to reduce dma_mga_dma_bootstrap::secondary_bin_size. - */ - __u32 secondary_bin_size; - - /** - * Bit-wise mask of AGPSTAT2_* values. Currently only \c AGPSTAT2_1X, - * \c AGPSTAT2_2X, and \c AGPSTAT2_4X are supported. If this value is - * zero, it means that PCI DMA should be used, even if AGP is - * possible. - * - * On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, this field will be - * filled in with the actual AGP mode. If AGP was not available - * (i.e., PCI DMA was used), this value will be zero. - */ - __u32 agp_mode; - - /** - * Desired AGP GART size, measured in megabytes. - */ - __u8 agp_size; -} drm_mga_dma_bootstrap_t; - -typedef struct drm_mga_clear { - unsigned int flags; - unsigned int clear_color; - unsigned int clear_depth; - unsigned int color_mask; - unsigned int depth_mask; -} drm_mga_clear_t; - -typedef struct drm_mga_vertex { - int idx; /* buffer to queue */ - int used; /* bytes in use */ - int discard; /* client finished with buffer? */ -} drm_mga_vertex_t; - -typedef struct drm_mga_indices { - int idx; /* buffer to queue */ - unsigned int start; - unsigned int end; - int discard; /* client finished with buffer? */ -} drm_mga_indices_t; - -typedef struct drm_mga_iload { - int idx; - unsigned int dstorg; - unsigned int length; -} drm_mga_iload_t; - -typedef struct _drm_mga_blit { - unsigned int planemask; - unsigned int srcorg; - unsigned int dstorg; - int src_pitch, dst_pitch; - int delta_sx, delta_sy; - int delta_dx, delta_dy; - int height, ydir; /* flip image vertically */ - int source_pitch, dest_pitch; -} drm_mga_blit_t; - -/* 3.1: An ioctl to get parameters that aren't available to the 3d - * client any other way. - */ -#define MGA_PARAM_IRQ_NR 1 - -/* 3.2: Query the actual card type. The DDX only distinguishes between - * G200 chips and non-G200 chips, which it calls G400. It turns out that - * there are some very sublte differences between the G4x0 chips and the G550 - * chips. Using this parameter query, a client-side driver can detect the - * difference between a G4x0 and a G550. - */ -#define MGA_PARAM_CARD_TYPE 2 - -typedef struct drm_mga_getparam { - int param; - void *value; -} drm_mga_getparam_t; - -#if defined(__cplusplus) -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/msm_drm.h b/lib/libc/include/generic-musl/drm/msm_drm.h deleted file mode 100644 index 0f57bc65e1..0000000000 --- a/lib/libc/include/generic-musl/drm/msm_drm.h +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Copyright (C) 2013 Red Hat - * Author: Rob Clark - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef __MSM_DRM_H__ -#define __MSM_DRM_H__ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Please note that modifications to all structs defined here are - * subject to backwards-compatibility constraints: - * 1) Do not use pointers, use __u64 instead for 32 bit / 64 bit - * user/kernel compatibility - * 2) Keep fields aligned to their size - * 3) Because of how drm_ioctl() works, we can add new fields at - * the end of an ioctl if some care is taken: drm_ioctl() will - * zero out the new fields at the tail of the ioctl, so a zero - * value should have a backwards compatible meaning. And for - * output params, userspace won't see the newly added output - * fields.. so that has to be somehow ok. - */ - -#define MSM_PIPE_NONE 0x00 -#define MSM_PIPE_2D0 0x01 -#define MSM_PIPE_2D1 0x02 -#define MSM_PIPE_3D0 0x10 - -/* The pipe-id just uses the lower bits, so can be OR'd with flags in - * the upper 16 bits (which could be extended further, if needed, maybe - * we extend/overload the pipe-id some day to deal with multiple rings, - * but even then I don't think we need the full lower 16 bits). - */ -#define MSM_PIPE_ID_MASK 0xffff -#define MSM_PIPE_ID(x) ((x) & MSM_PIPE_ID_MASK) -#define MSM_PIPE_FLAGS(x) ((x) & ~MSM_PIPE_ID_MASK) - -/* timeouts are specified in clock-monotonic absolute times (to simplify - * restarting interrupted ioctls). The following struct is logically the - * same as 'struct timespec' but 32/64b ABI safe. - */ -struct drm_msm_timespec { - __s64 tv_sec; /* seconds */ - __s64 tv_nsec; /* nanoseconds */ -}; - -#define MSM_PARAM_GPU_ID 0x01 -#define MSM_PARAM_GMEM_SIZE 0x02 -#define MSM_PARAM_CHIP_ID 0x03 -#define MSM_PARAM_MAX_FREQ 0x04 -#define MSM_PARAM_TIMESTAMP 0x05 -#define MSM_PARAM_GMEM_BASE 0x06 -#define MSM_PARAM_NR_RINGS 0x07 - -struct drm_msm_param { - __u32 pipe; /* in, MSM_PIPE_x */ - __u32 param; /* in, MSM_PARAM_x */ - __u64 value; /* out (get_param) or in (set_param) */ -}; - -/* - * GEM buffers: - */ - -#define MSM_BO_SCANOUT 0x00000001 /* scanout capable */ -#define MSM_BO_GPU_READONLY 0x00000002 -#define MSM_BO_CACHE_MASK 0x000f0000 -/* cache modes */ -#define MSM_BO_CACHED 0x00010000 -#define MSM_BO_WC 0x00020000 -#define MSM_BO_UNCACHED 0x00040000 - -#define MSM_BO_FLAGS (MSM_BO_SCANOUT | \ - MSM_BO_GPU_READONLY | \ - MSM_BO_CACHED | \ - MSM_BO_WC | \ - MSM_BO_UNCACHED) - -struct drm_msm_gem_new { - __u64 size; /* in */ - __u32 flags; /* in, mask of MSM_BO_x */ - __u32 handle; /* out */ -}; - -#define MSM_INFO_IOVA 0x01 - -#define MSM_INFO_FLAGS (MSM_INFO_IOVA) - -struct drm_msm_gem_info { - __u32 handle; /* in */ - __u32 flags; /* in - combination of MSM_INFO_* flags */ - __u64 offset; /* out, mmap() offset or iova */ -}; - -#define MSM_PREP_READ 0x01 -#define MSM_PREP_WRITE 0x02 -#define MSM_PREP_NOSYNC 0x04 - -#define MSM_PREP_FLAGS (MSM_PREP_READ | MSM_PREP_WRITE | MSM_PREP_NOSYNC) - -struct drm_msm_gem_cpu_prep { - __u32 handle; /* in */ - __u32 op; /* in, mask of MSM_PREP_x */ - struct drm_msm_timespec timeout; /* in */ -}; - -struct drm_msm_gem_cpu_fini { - __u32 handle; /* in */ -}; - -/* - * Cmdstream Submission: - */ - -/* The value written into the cmdstream is logically: - * - * ((relocbuf->gpuaddr + reloc_offset) << shift) | or - * - * When we have GPU's w/ >32bit ptrs, it should be possible to deal - * with this by emit'ing two reloc entries with appropriate shift - * values. Or a new MSM_SUBMIT_CMD_x type would also be an option. - * - * NOTE that reloc's must be sorted by order of increasing submit_offset, - * otherwise EINVAL. - */ -struct drm_msm_gem_submit_reloc { - __u32 submit_offset; /* in, offset from submit_bo */ - __u32 or; /* in, value OR'd with result */ - __s32 shift; /* in, amount of left shift (can be negative) */ - __u32 reloc_idx; /* in, index of reloc_bo buffer */ - __u64 reloc_offset; /* in, offset from start of reloc_bo */ -}; - -/* submit-types: - * BUF - this cmd buffer is executed normally. - * IB_TARGET_BUF - this cmd buffer is an IB target. Reloc's are - * processed normally, but the kernel does not setup an IB to - * this buffer in the first-level ringbuffer - * CTX_RESTORE_BUF - only executed if there has been a GPU context - * switch since the last SUBMIT ioctl - */ -#define MSM_SUBMIT_CMD_BUF 0x0001 -#define MSM_SUBMIT_CMD_IB_TARGET_BUF 0x0002 -#define MSM_SUBMIT_CMD_CTX_RESTORE_BUF 0x0003 -struct drm_msm_gem_submit_cmd { - __u32 type; /* in, one of MSM_SUBMIT_CMD_x */ - __u32 submit_idx; /* in, index of submit_bo cmdstream buffer */ - __u32 submit_offset; /* in, offset into submit_bo */ - __u32 size; /* in, cmdstream size */ - __u32 pad; - __u32 nr_relocs; /* in, number of submit_reloc's */ - __u64 relocs; /* in, ptr to array of submit_reloc's */ -}; - -/* Each buffer referenced elsewhere in the cmdstream submit (ie. the - * cmdstream buffer(s) themselves or reloc entries) has one (and only - * one) entry in the submit->bos[] table. - * - * As a optimization, the current buffer (gpu virtual address) can be - * passed back through the 'presumed' field. If on a subsequent reloc, - * userspace passes back a 'presumed' address that is still valid, - * then patching the cmdstream for this entry is skipped. This can - * avoid kernel needing to map/access the cmdstream bo in the common - * case. - */ -#define MSM_SUBMIT_BO_READ 0x0001 -#define MSM_SUBMIT_BO_WRITE 0x0002 - -#define MSM_SUBMIT_BO_FLAGS (MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_WRITE) - -struct drm_msm_gem_submit_bo { - __u32 flags; /* in, mask of MSM_SUBMIT_BO_x */ - __u32 handle; /* in, GEM handle */ - __u64 presumed; /* in/out, presumed buffer address */ -}; - -/* Valid submit ioctl flags: */ -#define MSM_SUBMIT_NO_IMPLICIT 0x80000000 /* disable implicit sync */ -#define MSM_SUBMIT_FENCE_FD_IN 0x40000000 /* enable input fence_fd */ -#define MSM_SUBMIT_FENCE_FD_OUT 0x20000000 /* enable output fence_fd */ -#define MSM_SUBMIT_SUDO 0x10000000 /* run submitted cmds from RB */ -#define MSM_SUBMIT_FLAGS ( \ - MSM_SUBMIT_NO_IMPLICIT | \ - MSM_SUBMIT_FENCE_FD_IN | \ - MSM_SUBMIT_FENCE_FD_OUT | \ - MSM_SUBMIT_SUDO | \ - 0) - -/* Each cmdstream submit consists of a table of buffers involved, and - * one or more cmdstream buffers. This allows for conditional execution - * (context-restore), and IB buffers needed for per tile/bin draw cmds. - */ -struct drm_msm_gem_submit { - __u32 flags; /* MSM_PIPE_x | MSM_SUBMIT_x */ - __u32 fence; /* out */ - __u32 nr_bos; /* in, number of submit_bo's */ - __u32 nr_cmds; /* in, number of submit_cmd's */ - __u64 bos; /* in, ptr to array of submit_bo's */ - __u64 cmds; /* in, ptr to array of submit_cmd's */ - __s32 fence_fd; /* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN/OUT) */ - __u32 queueid; /* in, submitqueue id */ -}; - -/* The normal way to synchronize with the GPU is just to CPU_PREP on - * a buffer if you need to access it from the CPU (other cmdstream - * submission from same or other contexts, PAGE_FLIP ioctl, etc, all - * handle the required synchronization under the hood). This ioctl - * mainly just exists as a way to implement the gallium pipe_fence - * APIs without requiring a dummy bo to synchronize on. - */ -struct drm_msm_wait_fence { - __u32 fence; /* in */ - __u32 pad; - struct drm_msm_timespec timeout; /* in */ - __u32 queueid; /* in, submitqueue id */ -}; - -/* madvise provides a way to tell the kernel in case a buffers contents - * can be discarded under memory pressure, which is useful for userspace - * bo cache where we want to optimistically hold on to buffer allocate - * and potential mmap, but allow the pages to be discarded under memory - * pressure. - * - * Typical usage would involve madvise(DONTNEED) when buffer enters BO - * cache, and madvise(WILLNEED) if trying to recycle buffer from BO cache. - * In the WILLNEED case, 'retained' indicates to userspace whether the - * backing pages still exist. - */ -#define MSM_MADV_WILLNEED 0 /* backing pages are needed, status returned in 'retained' */ -#define MSM_MADV_DONTNEED 1 /* backing pages not needed */ -#define __MSM_MADV_PURGED 2 /* internal state */ - -struct drm_msm_gem_madvise { - __u32 handle; /* in, GEM handle */ - __u32 madv; /* in, MSM_MADV_x */ - __u32 retained; /* out, whether backing store still exists */ -}; - -/* - * Draw queues allow the user to set specific submission parameter. Command - * submissions specify a specific submitqueue to use. ID 0 is reserved for - * backwards compatibility as a "default" submitqueue - */ - -#define MSM_SUBMITQUEUE_FLAGS (0) - -struct drm_msm_submitqueue { - __u32 flags; /* in, MSM_SUBMITQUEUE_x */ - __u32 prio; /* in, Priority level */ - __u32 id; /* out, identifier */ -}; - -#define DRM_MSM_GET_PARAM 0x00 -/* placeholder: -#define DRM_MSM_SET_PARAM 0x01 - */ -#define DRM_MSM_GEM_NEW 0x02 -#define DRM_MSM_GEM_INFO 0x03 -#define DRM_MSM_GEM_CPU_PREP 0x04 -#define DRM_MSM_GEM_CPU_FINI 0x05 -#define DRM_MSM_GEM_SUBMIT 0x06 -#define DRM_MSM_WAIT_FENCE 0x07 -#define DRM_MSM_GEM_MADVISE 0x08 -/* placeholder: -#define DRM_MSM_GEM_SVM_NEW 0x09 - */ -#define DRM_MSM_SUBMITQUEUE_NEW 0x0A -#define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B - -#define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param) -#define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new) -#define DRM_IOCTL_MSM_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_INFO, struct drm_msm_gem_info) -#define DRM_IOCTL_MSM_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_PREP, struct drm_msm_gem_cpu_prep) -#define DRM_IOCTL_MSM_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_FINI, struct drm_msm_gem_cpu_fini) -#define DRM_IOCTL_MSM_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SUBMIT, struct drm_msm_gem_submit) -#define DRM_IOCTL_MSM_WAIT_FENCE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_WAIT_FENCE, struct drm_msm_wait_fence) -#define DRM_IOCTL_MSM_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_MADVISE, struct drm_msm_gem_madvise) -#define DRM_IOCTL_MSM_SUBMITQUEUE_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_NEW, struct drm_msm_submitqueue) -#define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32) - -#if defined(__cplusplus) -} -#endif - -#endif /* __MSM_DRM_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/nouveau_drm.h b/lib/libc/include/generic-musl/drm/nouveau_drm.h deleted file mode 100644 index 14d11a1c69..0000000000 --- a/lib/libc/include/generic-musl/drm/nouveau_drm.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright 2005 Stephane Marchesin. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef __NOUVEAU_DRM_H__ -#define __NOUVEAU_DRM_H__ - -#define DRM_NOUVEAU_EVENT_NVIF 0x80000000 - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#define NOUVEAU_GEM_DOMAIN_CPU (1 << 0) -#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1) -#define NOUVEAU_GEM_DOMAIN_GART (1 << 2) -#define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3) -#define NOUVEAU_GEM_DOMAIN_COHERENT (1 << 4) - -#define NOUVEAU_GEM_TILE_COMP 0x00030000 /* nv50-only */ -#define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00 -#define NOUVEAU_GEM_TILE_16BPP 0x00000001 -#define NOUVEAU_GEM_TILE_32BPP 0x00000002 -#define NOUVEAU_GEM_TILE_ZETA 0x00000004 -#define NOUVEAU_GEM_TILE_NONCONTIG 0x00000008 - -struct drm_nouveau_gem_info { - __u32 handle; - __u32 domain; - __u64 size; - __u64 offset; - __u64 map_handle; - __u32 tile_mode; - __u32 tile_flags; -}; - -struct drm_nouveau_gem_new { - struct drm_nouveau_gem_info info; - __u32 channel_hint; - __u32 align; -}; - -#define NOUVEAU_GEM_MAX_BUFFERS 1024 -struct drm_nouveau_gem_pushbuf_bo_presumed { - __u32 valid; - __u32 domain; - __u64 offset; -}; - -struct drm_nouveau_gem_pushbuf_bo { - __u64 user_priv; - __u32 handle; - __u32 read_domains; - __u32 write_domains; - __u32 valid_domains; - struct drm_nouveau_gem_pushbuf_bo_presumed presumed; -}; - -#define NOUVEAU_GEM_RELOC_LOW (1 << 0) -#define NOUVEAU_GEM_RELOC_HIGH (1 << 1) -#define NOUVEAU_GEM_RELOC_OR (1 << 2) -#define NOUVEAU_GEM_MAX_RELOCS 1024 -struct drm_nouveau_gem_pushbuf_reloc { - __u32 reloc_bo_index; - __u32 reloc_bo_offset; - __u32 bo_index; - __u32 flags; - __u32 data; - __u32 vor; - __u32 tor; -}; - -#define NOUVEAU_GEM_MAX_PUSH 512 -struct drm_nouveau_gem_pushbuf_push { - __u32 bo_index; - __u32 pad; - __u64 offset; - __u64 length; -}; - -struct drm_nouveau_gem_pushbuf { - __u32 channel; - __u32 nr_buffers; - __u64 buffers; - __u32 nr_relocs; - __u32 nr_push; - __u64 relocs; - __u64 push; - __u32 suffix0; - __u32 suffix1; - __u64 vram_available; - __u64 gart_available; -}; - -#define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001 -#define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004 -struct drm_nouveau_gem_cpu_prep { - __u32 handle; - __u32 flags; -}; - -struct drm_nouveau_gem_cpu_fini { - __u32 handle; -}; - -#define DRM_NOUVEAU_GETPARAM 0x00 /* deprecated */ -#define DRM_NOUVEAU_SETPARAM 0x01 /* deprecated */ -#define DRM_NOUVEAU_CHANNEL_ALLOC 0x02 /* deprecated */ -#define DRM_NOUVEAU_CHANNEL_FREE 0x03 /* deprecated */ -#define DRM_NOUVEAU_GROBJ_ALLOC 0x04 /* deprecated */ -#define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 /* deprecated */ -#define DRM_NOUVEAU_GPUOBJ_FREE 0x06 /* deprecated */ -#define DRM_NOUVEAU_NVIF 0x07 -#define DRM_NOUVEAU_GEM_NEW 0x40 -#define DRM_NOUVEAU_GEM_PUSHBUF 0x41 -#define DRM_NOUVEAU_GEM_CPU_PREP 0x42 -#define DRM_NOUVEAU_GEM_CPU_FINI 0x43 -#define DRM_NOUVEAU_GEM_INFO 0x44 - -#define DRM_IOCTL_NOUVEAU_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_NEW, struct drm_nouveau_gem_new) -#define DRM_IOCTL_NOUVEAU_GEM_PUSHBUF DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_PUSHBUF, struct drm_nouveau_gem_pushbuf) -#define DRM_IOCTL_NOUVEAU_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_PREP, struct drm_nouveau_gem_cpu_prep) -#define DRM_IOCTL_NOUVEAU_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_FINI, struct drm_nouveau_gem_cpu_fini) -#define DRM_IOCTL_NOUVEAU_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_INFO, struct drm_nouveau_gem_info) - -#if defined(__cplusplus) -} -#endif - -#endif /* __NOUVEAU_DRM_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/omap_drm.h b/lib/libc/include/generic-musl/drm/omap_drm.h deleted file mode 100644 index 98cc08bd4c..0000000000 --- a/lib/libc/include/generic-musl/drm/omap_drm.h +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * include/uapi/drm/omap_drm.h - * - * Copyright (C) 2011 Texas Instruments - * Author: Rob Clark - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 as published by - * the Free Software Foundation. - * - * 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 __OMAP_DRM_H__ -#define __OMAP_DRM_H__ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Please note that modifications to all structs defined here are - * subject to backwards-compatibility constraints. - */ - -#define OMAP_PARAM_CHIPSET_ID 1 /* ie. 0x3430, 0x4430, etc */ - -struct drm_omap_param { - __u64 param; /* in */ - __u64 value; /* in (set_param), out (get_param) */ -}; - -#define OMAP_BO_SCANOUT 0x00000001 /* scanout capable (phys contiguous) */ -#define OMAP_BO_CACHE_MASK 0x00000006 /* cache type mask, see cache modes */ -#define OMAP_BO_TILED_MASK 0x00000f00 /* tiled mapping mask, see tiled modes */ - -/* cache modes */ -#define OMAP_BO_CACHED 0x00000000 /* default */ -#define OMAP_BO_WC 0x00000002 /* write-combine */ -#define OMAP_BO_UNCACHED 0x00000004 /* strongly-ordered (uncached) */ - -/* tiled modes */ -#define OMAP_BO_TILED_8 0x00000100 -#define OMAP_BO_TILED_16 0x00000200 -#define OMAP_BO_TILED_32 0x00000300 -#define OMAP_BO_TILED (OMAP_BO_TILED_8 | OMAP_BO_TILED_16 | OMAP_BO_TILED_32) - -union omap_gem_size { - __u32 bytes; /* (for non-tiled formats) */ - struct { - __u16 width; - __u16 height; - } tiled; /* (for tiled formats) */ -}; - -struct drm_omap_gem_new { - union omap_gem_size size; /* in */ - __u32 flags; /* in */ - __u32 handle; /* out */ - __u32 __pad; -}; - -/* mask of operations: */ -enum omap_gem_op { - OMAP_GEM_READ = 0x01, - OMAP_GEM_WRITE = 0x02, -}; - -struct drm_omap_gem_cpu_prep { - __u32 handle; /* buffer handle (in) */ - __u32 op; /* mask of omap_gem_op (in) */ -}; - -struct drm_omap_gem_cpu_fini { - __u32 handle; /* buffer handle (in) */ - __u32 op; /* mask of omap_gem_op (in) */ - /* TODO maybe here we pass down info about what regions are touched - * by sw so we can be clever about cache ops? For now a placeholder, - * set to zero and we just do full buffer flush.. - */ - __u32 nregions; - __u32 __pad; -}; - -struct drm_omap_gem_info { - __u32 handle; /* buffer handle (in) */ - __u32 pad; - __u64 offset; /* mmap offset (out) */ - /* note: in case of tiled buffers, the user virtual size can be - * different from the physical size (ie. how many pages are needed - * to back the object) which is returned in DRM_IOCTL_GEM_OPEN.. - * This size here is the one that should be used if you want to - * mmap() the buffer: - */ - __u32 size; /* virtual size for mmap'ing (out) */ - __u32 __pad; -}; - -#define DRM_OMAP_GET_PARAM 0x00 -#define DRM_OMAP_SET_PARAM 0x01 -#define DRM_OMAP_GEM_NEW 0x03 -#define DRM_OMAP_GEM_CPU_PREP 0x04 /* Deprecated, to be removed */ -#define DRM_OMAP_GEM_CPU_FINI 0x05 /* Deprecated, to be removed */ -#define DRM_OMAP_GEM_INFO 0x06 -#define DRM_OMAP_NUM_IOCTLS 0x07 - -#define DRM_IOCTL_OMAP_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param) -#define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param) -#define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new) -#define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep) -#define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini) -#define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info) - -#if defined(__cplusplus) -} -#endif - -#endif /* __OMAP_DRM_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/qxl_drm.h b/lib/libc/include/generic-musl/drm/qxl_drm.h deleted file mode 100644 index a7abf690cd..0000000000 --- a/lib/libc/include/generic-musl/drm/qxl_drm.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright 2013 Red Hat - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ -#ifndef QXL_DRM_H -#define QXL_DRM_H - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Please note that modifications to all structs defined here are - * subject to backwards-compatibility constraints. - * - * Do not use pointers, use __u64 instead for 32 bit / 64 bit user/kernel - * compatibility Keep fields aligned to their size - */ - -#define QXL_GEM_DOMAIN_CPU 0 -#define QXL_GEM_DOMAIN_VRAM 1 -#define QXL_GEM_DOMAIN_SURFACE 2 - -#define DRM_QXL_ALLOC 0x00 -#define DRM_QXL_MAP 0x01 -#define DRM_QXL_EXECBUFFER 0x02 -#define DRM_QXL_UPDATE_AREA 0x03 -#define DRM_QXL_GETPARAM 0x04 -#define DRM_QXL_CLIENTCAP 0x05 - -#define DRM_QXL_ALLOC_SURF 0x06 - -struct drm_qxl_alloc { - __u32 size; - __u32 handle; /* 0 is an invalid handle */ -}; - -struct drm_qxl_map { - __u64 offset; /* use for mmap system call */ - __u32 handle; - __u32 pad; -}; - -/* - * dest is the bo we are writing the relocation into - * src is bo we are relocating. - * *(dest_handle.base_addr + dest_offset) = physical_address(src_handle.addr + - * src_offset) - */ -#define QXL_RELOC_TYPE_BO 1 -#define QXL_RELOC_TYPE_SURF 2 - -struct drm_qxl_reloc { - __u64 src_offset; /* offset into src_handle or src buffer */ - __u64 dst_offset; /* offset in dest handle */ - __u32 src_handle; /* dest handle to compute address from */ - __u32 dst_handle; /* 0 if to command buffer */ - __u32 reloc_type; - __u32 pad; -}; - -struct drm_qxl_command { - __u64 command; /* void* */ - __u64 relocs; /* struct drm_qxl_reloc* */ - __u32 type; - __u32 command_size; - __u32 relocs_num; - __u32 pad; -}; - -struct drm_qxl_execbuffer { - __u32 flags; /* for future use */ - __u32 commands_num; - __u64 commands; /* struct drm_qxl_command* */ -}; - -struct drm_qxl_update_area { - __u32 handle; - __u32 top; - __u32 left; - __u32 bottom; - __u32 right; - __u32 pad; -}; - -#define QXL_PARAM_NUM_SURFACES 1 /* rom->n_surfaces */ -#define QXL_PARAM_MAX_RELOCS 2 -struct drm_qxl_getparam { - __u64 param; - __u64 value; -}; - -/* these are one bit values */ -struct drm_qxl_clientcap { - __u32 index; - __u32 pad; -}; - -struct drm_qxl_alloc_surf { - __u32 format; - __u32 width; - __u32 height; - __s32 stride; - __u32 handle; - __u32 pad; -}; - -#define DRM_IOCTL_QXL_ALLOC \ - DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC, struct drm_qxl_alloc) - -#define DRM_IOCTL_QXL_MAP \ - DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_MAP, struct drm_qxl_map) - -#define DRM_IOCTL_QXL_EXECBUFFER \ - DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_EXECBUFFER,\ - struct drm_qxl_execbuffer) - -#define DRM_IOCTL_QXL_UPDATE_AREA \ - DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_UPDATE_AREA,\ - struct drm_qxl_update_area) - -#define DRM_IOCTL_QXL_GETPARAM \ - DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_GETPARAM,\ - struct drm_qxl_getparam) - -#define DRM_IOCTL_QXL_CLIENTCAP \ - DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_CLIENTCAP,\ - struct drm_qxl_clientcap) - -#define DRM_IOCTL_QXL_ALLOC_SURF \ - DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF,\ - struct drm_qxl_alloc_surf) - -#if defined(__cplusplus) -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/r128_drm.h b/lib/libc/include/generic-musl/drm/r128_drm.h deleted file mode 100644 index 6bd4ed1676..0000000000 --- a/lib/libc/include/generic-musl/drm/r128_drm.h +++ /dev/null @@ -1,336 +0,0 @@ -/* r128_drm.h -- Public header for the r128 driver -*- linux-c -*- - * Created: Wed Apr 5 19:24:19 2000 by kevin@precisioninsight.com - */ -/* - * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. - * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Gareth Hughes - * Kevin E. Martin - */ - -#ifndef __R128_DRM_H__ -#define __R128_DRM_H__ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* WARNING: If you change any of these defines, make sure to change the - * defines in the X server file (r128_sarea.h) - */ -#ifndef __R128_SAREA_DEFINES__ -#define __R128_SAREA_DEFINES__ - -/* What needs to be changed for the current vertex buffer? - */ -#define R128_UPLOAD_CONTEXT 0x001 -#define R128_UPLOAD_SETUP 0x002 -#define R128_UPLOAD_TEX0 0x004 -#define R128_UPLOAD_TEX1 0x008 -#define R128_UPLOAD_TEX0IMAGES 0x010 -#define R128_UPLOAD_TEX1IMAGES 0x020 -#define R128_UPLOAD_CORE 0x040 -#define R128_UPLOAD_MASKS 0x080 -#define R128_UPLOAD_WINDOW 0x100 -#define R128_UPLOAD_CLIPRECTS 0x200 /* handled client-side */ -#define R128_REQUIRE_QUIESCENCE 0x400 -#define R128_UPLOAD_ALL 0x7ff - -#define R128_FRONT 0x1 -#define R128_BACK 0x2 -#define R128_DEPTH 0x4 - -/* Primitive types - */ -#define R128_POINTS 0x1 -#define R128_LINES 0x2 -#define R128_LINE_STRIP 0x3 -#define R128_TRIANGLES 0x4 -#define R128_TRIANGLE_FAN 0x5 -#define R128_TRIANGLE_STRIP 0x6 - -/* Vertex/indirect buffer size - */ -#define R128_BUFFER_SIZE 16384 - -/* Byte offsets for indirect buffer data - */ -#define R128_INDEX_PRIM_OFFSET 20 -#define R128_HOSTDATA_BLIT_OFFSET 32 - -/* Keep these small for testing. - */ -#define R128_NR_SAREA_CLIPRECTS 12 - -/* There are 2 heaps (local/AGP). Each region within a heap is a - * minimum of 64k, and there are at most 64 of them per heap. - */ -#define R128_LOCAL_TEX_HEAP 0 -#define R128_AGP_TEX_HEAP 1 -#define R128_NR_TEX_HEAPS 2 -#define R128_NR_TEX_REGIONS 64 -#define R128_LOG_TEX_GRANULARITY 16 - -#define R128_NR_CONTEXT_REGS 12 - -#define R128_MAX_TEXTURE_LEVELS 11 -#define R128_MAX_TEXTURE_UNITS 2 - -#endif /* __R128_SAREA_DEFINES__ */ - -typedef struct { - /* Context state - can be written in one large chunk */ - unsigned int dst_pitch_offset_c; - unsigned int dp_gui_master_cntl_c; - unsigned int sc_top_left_c; - unsigned int sc_bottom_right_c; - unsigned int z_offset_c; - unsigned int z_pitch_c; - unsigned int z_sten_cntl_c; - unsigned int tex_cntl_c; - unsigned int misc_3d_state_cntl_reg; - unsigned int texture_clr_cmp_clr_c; - unsigned int texture_clr_cmp_msk_c; - unsigned int fog_color_c; - - /* Texture state */ - unsigned int tex_size_pitch_c; - unsigned int constant_color_c; - - /* Setup state */ - unsigned int pm4_vc_fpu_setup; - unsigned int setup_cntl; - - /* Mask state */ - unsigned int dp_write_mask; - unsigned int sten_ref_mask_c; - unsigned int plane_3d_mask_c; - - /* Window state */ - unsigned int window_xy_offset; - - /* Core state */ - unsigned int scale_3d_cntl; -} drm_r128_context_regs_t; - -/* Setup registers for each texture unit - */ -typedef struct { - unsigned int tex_cntl; - unsigned int tex_combine_cntl; - unsigned int tex_size_pitch; - unsigned int tex_offset[R128_MAX_TEXTURE_LEVELS]; - unsigned int tex_border_color; -} drm_r128_texture_regs_t; - -typedef struct drm_r128_sarea { - /* The channel for communication of state information to the kernel - * on firing a vertex buffer. - */ - drm_r128_context_regs_t context_state; - drm_r128_texture_regs_t tex_state[R128_MAX_TEXTURE_UNITS]; - unsigned int dirty; - unsigned int vertsize; - unsigned int vc_format; - - /* The current cliprects, or a subset thereof. - */ - struct drm_clip_rect boxes[R128_NR_SAREA_CLIPRECTS]; - unsigned int nbox; - - /* Counters for client-side throttling of rendering clients. - */ - unsigned int last_frame; - unsigned int last_dispatch; - - struct drm_tex_region tex_list[R128_NR_TEX_HEAPS][R128_NR_TEX_REGIONS + 1]; - unsigned int tex_age[R128_NR_TEX_HEAPS]; - int ctx_owner; - int pfAllowPageFlip; /* number of 3d windows (0,1,2 or more) */ - int pfCurrentPage; /* which buffer is being displayed? */ -} drm_r128_sarea_t; - -/* WARNING: If you change any of these defines, make sure to change the - * defines in the Xserver file (xf86drmR128.h) - */ - -/* Rage 128 specific ioctls - * The device specific ioctl range is 0x40 to 0x79. - */ -#define DRM_R128_INIT 0x00 -#define DRM_R128_CCE_START 0x01 -#define DRM_R128_CCE_STOP 0x02 -#define DRM_R128_CCE_RESET 0x03 -#define DRM_R128_CCE_IDLE 0x04 -/* 0x05 not used */ -#define DRM_R128_RESET 0x06 -#define DRM_R128_SWAP 0x07 -#define DRM_R128_CLEAR 0x08 -#define DRM_R128_VERTEX 0x09 -#define DRM_R128_INDICES 0x0a -#define DRM_R128_BLIT 0x0b -#define DRM_R128_DEPTH 0x0c -#define DRM_R128_STIPPLE 0x0d -/* 0x0e not used */ -#define DRM_R128_INDIRECT 0x0f -#define DRM_R128_FULLSCREEN 0x10 -#define DRM_R128_CLEAR2 0x11 -#define DRM_R128_GETPARAM 0x12 -#define DRM_R128_FLIP 0x13 - -#define DRM_IOCTL_R128_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_R128_INIT, drm_r128_init_t) -#define DRM_IOCTL_R128_CCE_START DRM_IO( DRM_COMMAND_BASE + DRM_R128_CCE_START) -#define DRM_IOCTL_R128_CCE_STOP DRM_IOW( DRM_COMMAND_BASE + DRM_R128_CCE_STOP, drm_r128_cce_stop_t) -#define DRM_IOCTL_R128_CCE_RESET DRM_IO( DRM_COMMAND_BASE + DRM_R128_CCE_RESET) -#define DRM_IOCTL_R128_CCE_IDLE DRM_IO( DRM_COMMAND_BASE + DRM_R128_CCE_IDLE) -/* 0x05 not used */ -#define DRM_IOCTL_R128_RESET DRM_IO( DRM_COMMAND_BASE + DRM_R128_RESET) -#define DRM_IOCTL_R128_SWAP DRM_IO( DRM_COMMAND_BASE + DRM_R128_SWAP) -#define DRM_IOCTL_R128_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_R128_CLEAR, drm_r128_clear_t) -#define DRM_IOCTL_R128_VERTEX DRM_IOW( DRM_COMMAND_BASE + DRM_R128_VERTEX, drm_r128_vertex_t) -#define DRM_IOCTL_R128_INDICES DRM_IOW( DRM_COMMAND_BASE + DRM_R128_INDICES, drm_r128_indices_t) -#define DRM_IOCTL_R128_BLIT DRM_IOW( DRM_COMMAND_BASE + DRM_R128_BLIT, drm_r128_blit_t) -#define DRM_IOCTL_R128_DEPTH DRM_IOW( DRM_COMMAND_BASE + DRM_R128_DEPTH, drm_r128_depth_t) -#define DRM_IOCTL_R128_STIPPLE DRM_IOW( DRM_COMMAND_BASE + DRM_R128_STIPPLE, drm_r128_stipple_t) -/* 0x0e not used */ -#define DRM_IOCTL_R128_INDIRECT DRM_IOWR(DRM_COMMAND_BASE + DRM_R128_INDIRECT, drm_r128_indirect_t) -#define DRM_IOCTL_R128_FULLSCREEN DRM_IOW( DRM_COMMAND_BASE + DRM_R128_FULLSCREEN, drm_r128_fullscreen_t) -#define DRM_IOCTL_R128_CLEAR2 DRM_IOW( DRM_COMMAND_BASE + DRM_R128_CLEAR2, drm_r128_clear2_t) -#define DRM_IOCTL_R128_GETPARAM DRM_IOWR( DRM_COMMAND_BASE + DRM_R128_GETPARAM, drm_r128_getparam_t) -#define DRM_IOCTL_R128_FLIP DRM_IO( DRM_COMMAND_BASE + DRM_R128_FLIP) - -typedef struct drm_r128_init { - enum { - R128_INIT_CCE = 0x01, - R128_CLEANUP_CCE = 0x02 - } func; - unsigned long sarea_priv_offset; - int is_pci; - int cce_mode; - int cce_secure; - int ring_size; - int usec_timeout; - - unsigned int fb_bpp; - unsigned int front_offset, front_pitch; - unsigned int back_offset, back_pitch; - unsigned int depth_bpp; - unsigned int depth_offset, depth_pitch; - unsigned int span_offset; - - unsigned long fb_offset; - unsigned long mmio_offset; - unsigned long ring_offset; - unsigned long ring_rptr_offset; - unsigned long buffers_offset; - unsigned long agp_textures_offset; -} drm_r128_init_t; - -typedef struct drm_r128_cce_stop { - int flush; - int idle; -} drm_r128_cce_stop_t; - -typedef struct drm_r128_clear { - unsigned int flags; - unsigned int clear_color; - unsigned int clear_depth; - unsigned int color_mask; - unsigned int depth_mask; -} drm_r128_clear_t; - -typedef struct drm_r128_vertex { - int prim; - int idx; /* Index of vertex buffer */ - int count; /* Number of vertices in buffer */ - int discard; /* Client finished with buffer? */ -} drm_r128_vertex_t; - -typedef struct drm_r128_indices { - int prim; - int idx; - int start; - int end; - int discard; /* Client finished with buffer? */ -} drm_r128_indices_t; - -typedef struct drm_r128_blit { - int idx; - int pitch; - int offset; - int format; - unsigned short x, y; - unsigned short width, height; -} drm_r128_blit_t; - -typedef struct drm_r128_depth { - enum { - R128_WRITE_SPAN = 0x01, - R128_WRITE_PIXELS = 0x02, - R128_READ_SPAN = 0x03, - R128_READ_PIXELS = 0x04 - } func; - int n; - int *x; - int *y; - unsigned int *buffer; - unsigned char *mask; -} drm_r128_depth_t; - -typedef struct drm_r128_stipple { - unsigned int *mask; -} drm_r128_stipple_t; - -typedef struct drm_r128_indirect { - int idx; - int start; - int end; - int discard; -} drm_r128_indirect_t; - -typedef struct drm_r128_fullscreen { - enum { - R128_INIT_FULLSCREEN = 0x01, - R128_CLEANUP_FULLSCREEN = 0x02 - } func; -} drm_r128_fullscreen_t; - -/* 2.3: An ioctl to get parameters that aren't available to the 3d - * client any other way. - */ -#define R128_PARAM_IRQ_NR 1 - -typedef struct drm_r128_getparam { - int param; - void *value; -} drm_r128_getparam_t; - -#if defined(__cplusplus) -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/radeon_drm.h b/lib/libc/include/generic-musl/drm/radeon_drm.h deleted file mode 100644 index c8db8c5440..0000000000 --- a/lib/libc/include/generic-musl/drm/radeon_drm.h +++ /dev/null @@ -1,1078 +0,0 @@ -/* radeon_drm.h -- Public header for the radeon driver -*- linux-c -*- - * - * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. - * Copyright 2000 VA Linux Systems, Inc., Fremont, California. - * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas. - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Kevin E. Martin - * Gareth Hughes - * Keith Whitwell - */ - -#ifndef __RADEON_DRM_H__ -#define __RADEON_DRM_H__ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* WARNING: If you change any of these defines, make sure to change the - * defines in the X server file (radeon_sarea.h) - */ -#ifndef __RADEON_SAREA_DEFINES__ -#define __RADEON_SAREA_DEFINES__ - -/* Old style state flags, required for sarea interface (1.1 and 1.2 - * clears) and 1.2 drm_vertex2 ioctl. - */ -#define RADEON_UPLOAD_CONTEXT 0x00000001 -#define RADEON_UPLOAD_VERTFMT 0x00000002 -#define RADEON_UPLOAD_LINE 0x00000004 -#define RADEON_UPLOAD_BUMPMAP 0x00000008 -#define RADEON_UPLOAD_MASKS 0x00000010 -#define RADEON_UPLOAD_VIEWPORT 0x00000020 -#define RADEON_UPLOAD_SETUP 0x00000040 -#define RADEON_UPLOAD_TCL 0x00000080 -#define RADEON_UPLOAD_MISC 0x00000100 -#define RADEON_UPLOAD_TEX0 0x00000200 -#define RADEON_UPLOAD_TEX1 0x00000400 -#define RADEON_UPLOAD_TEX2 0x00000800 -#define RADEON_UPLOAD_TEX0IMAGES 0x00001000 -#define RADEON_UPLOAD_TEX1IMAGES 0x00002000 -#define RADEON_UPLOAD_TEX2IMAGES 0x00004000 -#define RADEON_UPLOAD_CLIPRECTS 0x00008000 /* handled client-side */ -#define RADEON_REQUIRE_QUIESCENCE 0x00010000 -#define RADEON_UPLOAD_ZBIAS 0x00020000 /* version 1.2 and newer */ -#define RADEON_UPLOAD_ALL 0x003effff -#define RADEON_UPLOAD_CONTEXT_ALL 0x003e01ff - -/* New style per-packet identifiers for use in cmd_buffer ioctl with - * the RADEON_EMIT_PACKET command. Comments relate new packets to old - * state bits and the packet size: - */ -#define RADEON_EMIT_PP_MISC 0 /* context/7 */ -#define RADEON_EMIT_PP_CNTL 1 /* context/3 */ -#define RADEON_EMIT_RB3D_COLORPITCH 2 /* context/1 */ -#define RADEON_EMIT_RE_LINE_PATTERN 3 /* line/2 */ -#define RADEON_EMIT_SE_LINE_WIDTH 4 /* line/1 */ -#define RADEON_EMIT_PP_LUM_MATRIX 5 /* bumpmap/1 */ -#define RADEON_EMIT_PP_ROT_MATRIX_0 6 /* bumpmap/2 */ -#define RADEON_EMIT_RB3D_STENCILREFMASK 7 /* masks/3 */ -#define RADEON_EMIT_SE_VPORT_XSCALE 8 /* viewport/6 */ -#define RADEON_EMIT_SE_CNTL 9 /* setup/2 */ -#define RADEON_EMIT_SE_CNTL_STATUS 10 /* setup/1 */ -#define RADEON_EMIT_RE_MISC 11 /* misc/1 */ -#define RADEON_EMIT_PP_TXFILTER_0 12 /* tex0/6 */ -#define RADEON_EMIT_PP_BORDER_COLOR_0 13 /* tex0/1 */ -#define RADEON_EMIT_PP_TXFILTER_1 14 /* tex1/6 */ -#define RADEON_EMIT_PP_BORDER_COLOR_1 15 /* tex1/1 */ -#define RADEON_EMIT_PP_TXFILTER_2 16 /* tex2/6 */ -#define RADEON_EMIT_PP_BORDER_COLOR_2 17 /* tex2/1 */ -#define RADEON_EMIT_SE_ZBIAS_FACTOR 18 /* zbias/2 */ -#define RADEON_EMIT_SE_TCL_OUTPUT_VTX_FMT 19 /* tcl/11 */ -#define RADEON_EMIT_SE_TCL_MATERIAL_EMMISSIVE_RED 20 /* material/17 */ -#define R200_EMIT_PP_TXCBLEND_0 21 /* tex0/4 */ -#define R200_EMIT_PP_TXCBLEND_1 22 /* tex1/4 */ -#define R200_EMIT_PP_TXCBLEND_2 23 /* tex2/4 */ -#define R200_EMIT_PP_TXCBLEND_3 24 /* tex3/4 */ -#define R200_EMIT_PP_TXCBLEND_4 25 /* tex4/4 */ -#define R200_EMIT_PP_TXCBLEND_5 26 /* tex5/4 */ -#define R200_EMIT_PP_TXCBLEND_6 27 /* /4 */ -#define R200_EMIT_PP_TXCBLEND_7 28 /* /4 */ -#define R200_EMIT_TCL_LIGHT_MODEL_CTL_0 29 /* tcl/7 */ -#define R200_EMIT_TFACTOR_0 30 /* tf/7 */ -#define R200_EMIT_VTX_FMT_0 31 /* vtx/5 */ -#define R200_EMIT_VAP_CTL 32 /* vap/1 */ -#define R200_EMIT_MATRIX_SELECT_0 33 /* msl/5 */ -#define R200_EMIT_TEX_PROC_CTL_2 34 /* tcg/5 */ -#define R200_EMIT_TCL_UCP_VERT_BLEND_CTL 35 /* tcl/1 */ -#define R200_EMIT_PP_TXFILTER_0 36 /* tex0/6 */ -#define R200_EMIT_PP_TXFILTER_1 37 /* tex1/6 */ -#define R200_EMIT_PP_TXFILTER_2 38 /* tex2/6 */ -#define R200_EMIT_PP_TXFILTER_3 39 /* tex3/6 */ -#define R200_EMIT_PP_TXFILTER_4 40 /* tex4/6 */ -#define R200_EMIT_PP_TXFILTER_5 41 /* tex5/6 */ -#define R200_EMIT_PP_TXOFFSET_0 42 /* tex0/1 */ -#define R200_EMIT_PP_TXOFFSET_1 43 /* tex1/1 */ -#define R200_EMIT_PP_TXOFFSET_2 44 /* tex2/1 */ -#define R200_EMIT_PP_TXOFFSET_3 45 /* tex3/1 */ -#define R200_EMIT_PP_TXOFFSET_4 46 /* tex4/1 */ -#define R200_EMIT_PP_TXOFFSET_5 47 /* tex5/1 */ -#define R200_EMIT_VTE_CNTL 48 /* vte/1 */ -#define R200_EMIT_OUTPUT_VTX_COMP_SEL 49 /* vtx/1 */ -#define R200_EMIT_PP_TAM_DEBUG3 50 /* tam/1 */ -#define R200_EMIT_PP_CNTL_X 51 /* cst/1 */ -#define R200_EMIT_RB3D_DEPTHXY_OFFSET 52 /* cst/1 */ -#define R200_EMIT_RE_AUX_SCISSOR_CNTL 53 /* cst/1 */ -#define R200_EMIT_RE_SCISSOR_TL_0 54 /* cst/2 */ -#define R200_EMIT_RE_SCISSOR_TL_1 55 /* cst/2 */ -#define R200_EMIT_RE_SCISSOR_TL_2 56 /* cst/2 */ -#define R200_EMIT_SE_VAP_CNTL_STATUS 57 /* cst/1 */ -#define R200_EMIT_SE_VTX_STATE_CNTL 58 /* cst/1 */ -#define R200_EMIT_RE_POINTSIZE 59 /* cst/1 */ -#define R200_EMIT_TCL_INPUT_VTX_VECTOR_ADDR_0 60 /* cst/4 */ -#define R200_EMIT_PP_CUBIC_FACES_0 61 -#define R200_EMIT_PP_CUBIC_OFFSETS_0 62 -#define R200_EMIT_PP_CUBIC_FACES_1 63 -#define R200_EMIT_PP_CUBIC_OFFSETS_1 64 -#define R200_EMIT_PP_CUBIC_FACES_2 65 -#define R200_EMIT_PP_CUBIC_OFFSETS_2 66 -#define R200_EMIT_PP_CUBIC_FACES_3 67 -#define R200_EMIT_PP_CUBIC_OFFSETS_3 68 -#define R200_EMIT_PP_CUBIC_FACES_4 69 -#define R200_EMIT_PP_CUBIC_OFFSETS_4 70 -#define R200_EMIT_PP_CUBIC_FACES_5 71 -#define R200_EMIT_PP_CUBIC_OFFSETS_5 72 -#define RADEON_EMIT_PP_TEX_SIZE_0 73 -#define RADEON_EMIT_PP_TEX_SIZE_1 74 -#define RADEON_EMIT_PP_TEX_SIZE_2 75 -#define R200_EMIT_RB3D_BLENDCOLOR 76 -#define R200_EMIT_TCL_POINT_SPRITE_CNTL 77 -#define RADEON_EMIT_PP_CUBIC_FACES_0 78 -#define RADEON_EMIT_PP_CUBIC_OFFSETS_T0 79 -#define RADEON_EMIT_PP_CUBIC_FACES_1 80 -#define RADEON_EMIT_PP_CUBIC_OFFSETS_T1 81 -#define RADEON_EMIT_PP_CUBIC_FACES_2 82 -#define RADEON_EMIT_PP_CUBIC_OFFSETS_T2 83 -#define R200_EMIT_PP_TRI_PERF_CNTL 84 -#define R200_EMIT_PP_AFS_0 85 -#define R200_EMIT_PP_AFS_1 86 -#define R200_EMIT_ATF_TFACTOR 87 -#define R200_EMIT_PP_TXCTLALL_0 88 -#define R200_EMIT_PP_TXCTLALL_1 89 -#define R200_EMIT_PP_TXCTLALL_2 90 -#define R200_EMIT_PP_TXCTLALL_3 91 -#define R200_EMIT_PP_TXCTLALL_4 92 -#define R200_EMIT_PP_TXCTLALL_5 93 -#define R200_EMIT_VAP_PVS_CNTL 94 -#define RADEON_MAX_STATE_PACKETS 95 - -/* Commands understood by cmd_buffer ioctl. More can be added but - * obviously these can't be removed or changed: - */ -#define RADEON_CMD_PACKET 1 /* emit one of the register packets above */ -#define RADEON_CMD_SCALARS 2 /* emit scalar data */ -#define RADEON_CMD_VECTORS 3 /* emit vector data */ -#define RADEON_CMD_DMA_DISCARD 4 /* discard current dma buf */ -#define RADEON_CMD_PACKET3 5 /* emit hw packet */ -#define RADEON_CMD_PACKET3_CLIP 6 /* emit hw packet wrapped in cliprects */ -#define RADEON_CMD_SCALARS2 7 /* r200 stopgap */ -#define RADEON_CMD_WAIT 8 /* emit hw wait commands -- note: - * doesn't make the cpu wait, just - * the graphics hardware */ -#define RADEON_CMD_VECLINEAR 9 /* another r200 stopgap */ - -typedef union { - int i; - struct { - unsigned char cmd_type, pad0, pad1, pad2; - } header; - struct { - unsigned char cmd_type, packet_id, pad0, pad1; - } packet; - struct { - unsigned char cmd_type, offset, stride, count; - } scalars; - struct { - unsigned char cmd_type, offset, stride, count; - } vectors; - struct { - unsigned char cmd_type, addr_lo, addr_hi, count; - } veclinear; - struct { - unsigned char cmd_type, buf_idx, pad0, pad1; - } dma; - struct { - unsigned char cmd_type, flags, pad0, pad1; - } wait; -} drm_radeon_cmd_header_t; - -#define RADEON_WAIT_2D 0x1 -#define RADEON_WAIT_3D 0x2 - -/* Allowed parameters for R300_CMD_PACKET3 - */ -#define R300_CMD_PACKET3_CLEAR 0 -#define R300_CMD_PACKET3_RAW 1 - -/* Commands understood by cmd_buffer ioctl for R300. - * The interface has not been stabilized, so some of these may be removed - * and eventually reordered before stabilization. - */ -#define R300_CMD_PACKET0 1 -#define R300_CMD_VPU 2 /* emit vertex program upload */ -#define R300_CMD_PACKET3 3 /* emit a packet3 */ -#define R300_CMD_END3D 4 /* emit sequence ending 3d rendering */ -#define R300_CMD_CP_DELAY 5 -#define R300_CMD_DMA_DISCARD 6 -#define R300_CMD_WAIT 7 -# define R300_WAIT_2D 0x1 -# define R300_WAIT_3D 0x2 -/* these two defines are DOING IT WRONG - however - * we have userspace which relies on using these. - * The wait interface is backwards compat new - * code should use the NEW_WAIT defines below - * THESE ARE NOT BIT FIELDS - */ -# define R300_WAIT_2D_CLEAN 0x3 -# define R300_WAIT_3D_CLEAN 0x4 - -# define R300_NEW_WAIT_2D_3D 0x3 -# define R300_NEW_WAIT_2D_2D_CLEAN 0x4 -# define R300_NEW_WAIT_3D_3D_CLEAN 0x6 -# define R300_NEW_WAIT_2D_2D_CLEAN_3D_3D_CLEAN 0x8 - -#define R300_CMD_SCRATCH 8 -#define R300_CMD_R500FP 9 - -typedef union { - unsigned int u; - struct { - unsigned char cmd_type, pad0, pad1, pad2; - } header; - struct { - unsigned char cmd_type, count, reglo, reghi; - } packet0; - struct { - unsigned char cmd_type, count, adrlo, adrhi; - } vpu; - struct { - unsigned char cmd_type, packet, pad0, pad1; - } packet3; - struct { - unsigned char cmd_type, packet; - unsigned short count; /* amount of packet2 to emit */ - } delay; - struct { - unsigned char cmd_type, buf_idx, pad0, pad1; - } dma; - struct { - unsigned char cmd_type, flags, pad0, pad1; - } wait; - struct { - unsigned char cmd_type, reg, n_bufs, flags; - } scratch; - struct { - unsigned char cmd_type, count, adrlo, adrhi_flags; - } r500fp; -} drm_r300_cmd_header_t; - -#define RADEON_FRONT 0x1 -#define RADEON_BACK 0x2 -#define RADEON_DEPTH 0x4 -#define RADEON_STENCIL 0x8 -#define RADEON_CLEAR_FASTZ 0x80000000 -#define RADEON_USE_HIERZ 0x40000000 -#define RADEON_USE_COMP_ZBUF 0x20000000 - -#define R500FP_CONSTANT_TYPE (1 << 1) -#define R500FP_CONSTANT_CLAMP (1 << 2) - -/* Primitive types - */ -#define RADEON_POINTS 0x1 -#define RADEON_LINES 0x2 -#define RADEON_LINE_STRIP 0x3 -#define RADEON_TRIANGLES 0x4 -#define RADEON_TRIANGLE_FAN 0x5 -#define RADEON_TRIANGLE_STRIP 0x6 - -/* Vertex/indirect buffer size - */ -#define RADEON_BUFFER_SIZE 65536 - -/* Byte offsets for indirect buffer data - */ -#define RADEON_INDEX_PRIM_OFFSET 20 - -#define RADEON_SCRATCH_REG_OFFSET 32 - -#define R600_SCRATCH_REG_OFFSET 256 - -#define RADEON_NR_SAREA_CLIPRECTS 12 - -/* There are 2 heaps (local/GART). Each region within a heap is a - * minimum of 64k, and there are at most 64 of them per heap. - */ -#define RADEON_LOCAL_TEX_HEAP 0 -#define RADEON_GART_TEX_HEAP 1 -#define RADEON_NR_TEX_HEAPS 2 -#define RADEON_NR_TEX_REGIONS 64 -#define RADEON_LOG_TEX_GRANULARITY 16 - -#define RADEON_MAX_TEXTURE_LEVELS 12 -#define RADEON_MAX_TEXTURE_UNITS 3 - -#define RADEON_MAX_SURFACES 8 - -/* Blits have strict offset rules. All blit offset must be aligned on - * a 1K-byte boundary. - */ -#define RADEON_OFFSET_SHIFT 10 -#define RADEON_OFFSET_ALIGN (1 << RADEON_OFFSET_SHIFT) -#define RADEON_OFFSET_MASK (RADEON_OFFSET_ALIGN - 1) - -#endif /* __RADEON_SAREA_DEFINES__ */ - -typedef struct { - unsigned int red; - unsigned int green; - unsigned int blue; - unsigned int alpha; -} radeon_color_regs_t; - -typedef struct { - /* Context state */ - unsigned int pp_misc; /* 0x1c14 */ - unsigned int pp_fog_color; - unsigned int re_solid_color; - unsigned int rb3d_blendcntl; - unsigned int rb3d_depthoffset; - unsigned int rb3d_depthpitch; - unsigned int rb3d_zstencilcntl; - - unsigned int pp_cntl; /* 0x1c38 */ - unsigned int rb3d_cntl; - unsigned int rb3d_coloroffset; - unsigned int re_width_height; - unsigned int rb3d_colorpitch; - unsigned int se_cntl; - - /* Vertex format state */ - unsigned int se_coord_fmt; /* 0x1c50 */ - - /* Line state */ - unsigned int re_line_pattern; /* 0x1cd0 */ - unsigned int re_line_state; - - unsigned int se_line_width; /* 0x1db8 */ - - /* Bumpmap state */ - unsigned int pp_lum_matrix; /* 0x1d00 */ - - unsigned int pp_rot_matrix_0; /* 0x1d58 */ - unsigned int pp_rot_matrix_1; - - /* Mask state */ - unsigned int rb3d_stencilrefmask; /* 0x1d7c */ - unsigned int rb3d_ropcntl; - unsigned int rb3d_planemask; - - /* Viewport state */ - unsigned int se_vport_xscale; /* 0x1d98 */ - unsigned int se_vport_xoffset; - unsigned int se_vport_yscale; - unsigned int se_vport_yoffset; - unsigned int se_vport_zscale; - unsigned int se_vport_zoffset; - - /* Setup state */ - unsigned int se_cntl_status; /* 0x2140 */ - - /* Misc state */ - unsigned int re_top_left; /* 0x26c0 */ - unsigned int re_misc; -} drm_radeon_context_regs_t; - -typedef struct { - /* Zbias state */ - unsigned int se_zbias_factor; /* 0x1dac */ - unsigned int se_zbias_constant; -} drm_radeon_context2_regs_t; - -/* Setup registers for each texture unit - */ -typedef struct { - unsigned int pp_txfilter; - unsigned int pp_txformat; - unsigned int pp_txoffset; - unsigned int pp_txcblend; - unsigned int pp_txablend; - unsigned int pp_tfactor; - unsigned int pp_border_color; -} drm_radeon_texture_regs_t; - -typedef struct { - unsigned int start; - unsigned int finish; - unsigned int prim:8; - unsigned int stateidx:8; - unsigned int numverts:16; /* overloaded as offset/64 for elt prims */ - unsigned int vc_format; /* vertex format */ -} drm_radeon_prim_t; - -typedef struct { - drm_radeon_context_regs_t context; - drm_radeon_texture_regs_t tex[RADEON_MAX_TEXTURE_UNITS]; - drm_radeon_context2_regs_t context2; - unsigned int dirty; -} drm_radeon_state_t; - -typedef struct { - /* The channel for communication of state information to the - * kernel on firing a vertex buffer with either of the - * obsoleted vertex/index ioctls. - */ - drm_radeon_context_regs_t context_state; - drm_radeon_texture_regs_t tex_state[RADEON_MAX_TEXTURE_UNITS]; - unsigned int dirty; - unsigned int vertsize; - unsigned int vc_format; - - /* The current cliprects, or a subset thereof. - */ - struct drm_clip_rect boxes[RADEON_NR_SAREA_CLIPRECTS]; - unsigned int nbox; - - /* Counters for client-side throttling of rendering clients. - */ - unsigned int last_frame; - unsigned int last_dispatch; - unsigned int last_clear; - - struct drm_tex_region tex_list[RADEON_NR_TEX_HEAPS][RADEON_NR_TEX_REGIONS + - 1]; - unsigned int tex_age[RADEON_NR_TEX_HEAPS]; - int ctx_owner; - int pfState; /* number of 3d windows (0,1,2ormore) */ - int pfCurrentPage; /* which buffer is being displayed? */ - int crtc2_base; /* CRTC2 frame offset */ - int tiling_enabled; /* set by drm, read by 2d + 3d clients */ -} drm_radeon_sarea_t; - -/* WARNING: If you change any of these defines, make sure to change the - * defines in the Xserver file (xf86drmRadeon.h) - * - * KW: actually it's illegal to change any of this (backwards compatibility). - */ - -/* Radeon specific ioctls - * The device specific ioctl range is 0x40 to 0x79. - */ -#define DRM_RADEON_CP_INIT 0x00 -#define DRM_RADEON_CP_START 0x01 -#define DRM_RADEON_CP_STOP 0x02 -#define DRM_RADEON_CP_RESET 0x03 -#define DRM_RADEON_CP_IDLE 0x04 -#define DRM_RADEON_RESET 0x05 -#define DRM_RADEON_FULLSCREEN 0x06 -#define DRM_RADEON_SWAP 0x07 -#define DRM_RADEON_CLEAR 0x08 -#define DRM_RADEON_VERTEX 0x09 -#define DRM_RADEON_INDICES 0x0A -#define DRM_RADEON_NOT_USED -#define DRM_RADEON_STIPPLE 0x0C -#define DRM_RADEON_INDIRECT 0x0D -#define DRM_RADEON_TEXTURE 0x0E -#define DRM_RADEON_VERTEX2 0x0F -#define DRM_RADEON_CMDBUF 0x10 -#define DRM_RADEON_GETPARAM 0x11 -#define DRM_RADEON_FLIP 0x12 -#define DRM_RADEON_ALLOC 0x13 -#define DRM_RADEON_FREE 0x14 -#define DRM_RADEON_INIT_HEAP 0x15 -#define DRM_RADEON_IRQ_EMIT 0x16 -#define DRM_RADEON_IRQ_WAIT 0x17 -#define DRM_RADEON_CP_RESUME 0x18 -#define DRM_RADEON_SETPARAM 0x19 -#define DRM_RADEON_SURF_ALLOC 0x1a -#define DRM_RADEON_SURF_FREE 0x1b -/* KMS ioctl */ -#define DRM_RADEON_GEM_INFO 0x1c -#define DRM_RADEON_GEM_CREATE 0x1d -#define DRM_RADEON_GEM_MMAP 0x1e -#define DRM_RADEON_GEM_PREAD 0x21 -#define DRM_RADEON_GEM_PWRITE 0x22 -#define DRM_RADEON_GEM_SET_DOMAIN 0x23 -#define DRM_RADEON_GEM_WAIT_IDLE 0x24 -#define DRM_RADEON_CS 0x26 -#define DRM_RADEON_INFO 0x27 -#define DRM_RADEON_GEM_SET_TILING 0x28 -#define DRM_RADEON_GEM_GET_TILING 0x29 -#define DRM_RADEON_GEM_BUSY 0x2a -#define DRM_RADEON_GEM_VA 0x2b -#define DRM_RADEON_GEM_OP 0x2c -#define DRM_RADEON_GEM_USERPTR 0x2d - -#define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) -#define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START) -#define DRM_IOCTL_RADEON_CP_STOP DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_STOP, drm_radeon_cp_stop_t) -#define DRM_IOCTL_RADEON_CP_RESET DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_RESET) -#define DRM_IOCTL_RADEON_CP_IDLE DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_IDLE) -#define DRM_IOCTL_RADEON_RESET DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_RESET) -#define DRM_IOCTL_RADEON_FULLSCREEN DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_FULLSCREEN, drm_radeon_fullscreen_t) -#define DRM_IOCTL_RADEON_SWAP DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_SWAP) -#define DRM_IOCTL_RADEON_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CLEAR, drm_radeon_clear_t) -#define DRM_IOCTL_RADEON_VERTEX DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_VERTEX, drm_radeon_vertex_t) -#define DRM_IOCTL_RADEON_INDICES DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_INDICES, drm_radeon_indices_t) -#define DRM_IOCTL_RADEON_STIPPLE DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_STIPPLE, drm_radeon_stipple_t) -#define DRM_IOCTL_RADEON_INDIRECT DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INDIRECT, drm_radeon_indirect_t) -#define DRM_IOCTL_RADEON_TEXTURE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_TEXTURE, drm_radeon_texture_t) -#define DRM_IOCTL_RADEON_VERTEX2 DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_VERTEX2, drm_radeon_vertex2_t) -#define DRM_IOCTL_RADEON_CMDBUF DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CMDBUF, drm_radeon_cmd_buffer_t) -#define DRM_IOCTL_RADEON_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GETPARAM, drm_radeon_getparam_t) -#define DRM_IOCTL_RADEON_FLIP DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_FLIP) -#define DRM_IOCTL_RADEON_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_ALLOC, drm_radeon_mem_alloc_t) -#define DRM_IOCTL_RADEON_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_FREE, drm_radeon_mem_free_t) -#define DRM_IOCTL_RADEON_INIT_HEAP DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_INIT_HEAP, drm_radeon_mem_init_heap_t) -#define DRM_IOCTL_RADEON_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_IRQ_EMIT, drm_radeon_irq_emit_t) -#define DRM_IOCTL_RADEON_IRQ_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_IRQ_WAIT, drm_radeon_irq_wait_t) -#define DRM_IOCTL_RADEON_CP_RESUME DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_RESUME) -#define DRM_IOCTL_RADEON_SETPARAM DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_SETPARAM, drm_radeon_setparam_t) -#define DRM_IOCTL_RADEON_SURF_ALLOC DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_SURF_ALLOC, drm_radeon_surface_alloc_t) -#define DRM_IOCTL_RADEON_SURF_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_SURF_FREE, drm_radeon_surface_free_t) -/* KMS */ -#define DRM_IOCTL_RADEON_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_INFO, struct drm_radeon_gem_info) -#define DRM_IOCTL_RADEON_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_CREATE, struct drm_radeon_gem_create) -#define DRM_IOCTL_RADEON_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_MMAP, struct drm_radeon_gem_mmap) -#define DRM_IOCTL_RADEON_GEM_PREAD DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PREAD, struct drm_radeon_gem_pread) -#define DRM_IOCTL_RADEON_GEM_PWRITE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PWRITE, struct drm_radeon_gem_pwrite) -#define DRM_IOCTL_RADEON_GEM_SET_DOMAIN DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_DOMAIN, struct drm_radeon_gem_set_domain) -#define DRM_IOCTL_RADEON_GEM_WAIT_IDLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle) -#define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs) -#define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info) -#define DRM_IOCTL_RADEON_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling) -#define DRM_IOCTL_RADEON_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling) -#define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy) -#define DRM_IOCTL_RADEON_GEM_VA DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_VA, struct drm_radeon_gem_va) -#define DRM_IOCTL_RADEON_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_OP, struct drm_radeon_gem_op) -#define DRM_IOCTL_RADEON_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_USERPTR, struct drm_radeon_gem_userptr) - -typedef struct drm_radeon_init { - enum { - RADEON_INIT_CP = 0x01, - RADEON_CLEANUP_CP = 0x02, - RADEON_INIT_R200_CP = 0x03, - RADEON_INIT_R300_CP = 0x04, - RADEON_INIT_R600_CP = 0x05 - } func; - unsigned long sarea_priv_offset; - int is_pci; - int cp_mode; - int gart_size; - int ring_size; - int usec_timeout; - - unsigned int fb_bpp; - unsigned int front_offset, front_pitch; - unsigned int back_offset, back_pitch; - unsigned int depth_bpp; - unsigned int depth_offset, depth_pitch; - - unsigned long fb_offset; - unsigned long mmio_offset; - unsigned long ring_offset; - unsigned long ring_rptr_offset; - unsigned long buffers_offset; - unsigned long gart_textures_offset; -} drm_radeon_init_t; - -typedef struct drm_radeon_cp_stop { - int flush; - int idle; -} drm_radeon_cp_stop_t; - -typedef struct drm_radeon_fullscreen { - enum { - RADEON_INIT_FULLSCREEN = 0x01, - RADEON_CLEANUP_FULLSCREEN = 0x02 - } func; -} drm_radeon_fullscreen_t; - -#define CLEAR_X1 0 -#define CLEAR_Y1 1 -#define CLEAR_X2 2 -#define CLEAR_Y2 3 -#define CLEAR_DEPTH 4 - -typedef union drm_radeon_clear_rect { - float f[5]; - unsigned int ui[5]; -} drm_radeon_clear_rect_t; - -typedef struct drm_radeon_clear { - unsigned int flags; - unsigned int clear_color; - unsigned int clear_depth; - unsigned int color_mask; - unsigned int depth_mask; /* misnamed field: should be stencil */ - drm_radeon_clear_rect_t *depth_boxes; -} drm_radeon_clear_t; - -typedef struct drm_radeon_vertex { - int prim; - int idx; /* Index of vertex buffer */ - int count; /* Number of vertices in buffer */ - int discard; /* Client finished with buffer? */ -} drm_radeon_vertex_t; - -typedef struct drm_radeon_indices { - int prim; - int idx; - int start; - int end; - int discard; /* Client finished with buffer? */ -} drm_radeon_indices_t; - -/* v1.2 - obsoletes drm_radeon_vertex and drm_radeon_indices - * - allows multiple primitives and state changes in a single ioctl - * - supports driver change to emit native primitives - */ -typedef struct drm_radeon_vertex2 { - int idx; /* Index of vertex buffer */ - int discard; /* Client finished with buffer? */ - int nr_states; - drm_radeon_state_t *state; - int nr_prims; - drm_radeon_prim_t *prim; -} drm_radeon_vertex2_t; - -/* v1.3 - obsoletes drm_radeon_vertex2 - * - allows arbitrarily large cliprect list - * - allows updating of tcl packet, vector and scalar state - * - allows memory-efficient description of state updates - * - allows state to be emitted without a primitive - * (for clears, ctx switches) - * - allows more than one dma buffer to be referenced per ioctl - * - supports tcl driver - * - may be extended in future versions with new cmd types, packets - */ -typedef struct drm_radeon_cmd_buffer { - int bufsz; - char *buf; - int nbox; - struct drm_clip_rect *boxes; -} drm_radeon_cmd_buffer_t; - -typedef struct drm_radeon_tex_image { - unsigned int x, y; /* Blit coordinates */ - unsigned int width, height; - const void *data; -} drm_radeon_tex_image_t; - -typedef struct drm_radeon_texture { - unsigned int offset; - int pitch; - int format; - int width; /* Texture image coordinates */ - int height; - drm_radeon_tex_image_t *image; -} drm_radeon_texture_t; - -typedef struct drm_radeon_stipple { - unsigned int *mask; -} drm_radeon_stipple_t; - -typedef struct drm_radeon_indirect { - int idx; - int start; - int end; - int discard; -} drm_radeon_indirect_t; - -/* enum for card type parameters */ -#define RADEON_CARD_PCI 0 -#define RADEON_CARD_AGP 1 -#define RADEON_CARD_PCIE 2 - -/* 1.3: An ioctl to get parameters that aren't available to the 3d - * client any other way. - */ -#define RADEON_PARAM_GART_BUFFER_OFFSET 1 /* card offset of 1st GART buffer */ -#define RADEON_PARAM_LAST_FRAME 2 -#define RADEON_PARAM_LAST_DISPATCH 3 -#define RADEON_PARAM_LAST_CLEAR 4 -/* Added with DRM version 1.6. */ -#define RADEON_PARAM_IRQ_NR 5 -#define RADEON_PARAM_GART_BASE 6 /* card offset of GART base */ -/* Added with DRM version 1.8. */ -#define RADEON_PARAM_REGISTER_HANDLE 7 /* for drmMap() */ -#define RADEON_PARAM_STATUS_HANDLE 8 -#define RADEON_PARAM_SAREA_HANDLE 9 -#define RADEON_PARAM_GART_TEX_HANDLE 10 -#define RADEON_PARAM_SCRATCH_OFFSET 11 -#define RADEON_PARAM_CARD_TYPE 12 -#define RADEON_PARAM_VBLANK_CRTC 13 /* VBLANK CRTC */ -#define RADEON_PARAM_FB_LOCATION 14 /* FB location */ -#define RADEON_PARAM_NUM_GB_PIPES 15 /* num GB pipes */ -#define RADEON_PARAM_DEVICE_ID 16 -#define RADEON_PARAM_NUM_Z_PIPES 17 /* num Z pipes */ - -typedef struct drm_radeon_getparam { - int param; - void *value; -} drm_radeon_getparam_t; - -/* 1.6: Set up a memory manager for regions of shared memory: - */ -#define RADEON_MEM_REGION_GART 1 -#define RADEON_MEM_REGION_FB 2 - -typedef struct drm_radeon_mem_alloc { - int region; - int alignment; - int size; - int *region_offset; /* offset from start of fb or GART */ -} drm_radeon_mem_alloc_t; - -typedef struct drm_radeon_mem_free { - int region; - int region_offset; -} drm_radeon_mem_free_t; - -typedef struct drm_radeon_mem_init_heap { - int region; - int size; - int start; -} drm_radeon_mem_init_heap_t; - -/* 1.6: Userspace can request & wait on irq's: - */ -typedef struct drm_radeon_irq_emit { - int *irq_seq; -} drm_radeon_irq_emit_t; - -typedef struct drm_radeon_irq_wait { - int irq_seq; -} drm_radeon_irq_wait_t; - -/* 1.10: Clients tell the DRM where they think the framebuffer is located in - * the card's address space, via a new generic ioctl to set parameters - */ - -typedef struct drm_radeon_setparam { - unsigned int param; - __s64 value; -} drm_radeon_setparam_t; - -#define RADEON_SETPARAM_FB_LOCATION 1 /* determined framebuffer location */ -#define RADEON_SETPARAM_SWITCH_TILING 2 /* enable/disable color tiling */ -#define RADEON_SETPARAM_PCIGART_LOCATION 3 /* PCI Gart Location */ -#define RADEON_SETPARAM_NEW_MEMMAP 4 /* Use new memory map */ -#define RADEON_SETPARAM_PCIGART_TABLE_SIZE 5 /* PCI GART Table Size */ -#define RADEON_SETPARAM_VBLANK_CRTC 6 /* VBLANK CRTC */ -/* 1.14: Clients can allocate/free a surface - */ -typedef struct drm_radeon_surface_alloc { - unsigned int address; - unsigned int size; - unsigned int flags; -} drm_radeon_surface_alloc_t; - -typedef struct drm_radeon_surface_free { - unsigned int address; -} drm_radeon_surface_free_t; - -#define DRM_RADEON_VBLANK_CRTC1 1 -#define DRM_RADEON_VBLANK_CRTC2 2 - -/* - * Kernel modesetting world below. - */ -#define RADEON_GEM_DOMAIN_CPU 0x1 -#define RADEON_GEM_DOMAIN_GTT 0x2 -#define RADEON_GEM_DOMAIN_VRAM 0x4 - -struct drm_radeon_gem_info { - __u64 gart_size; - __u64 vram_size; - __u64 vram_visible; -}; - -#define RADEON_GEM_NO_BACKING_STORE (1 << 0) -#define RADEON_GEM_GTT_UC (1 << 1) -#define RADEON_GEM_GTT_WC (1 << 2) -/* BO is expected to be accessed by the CPU */ -#define RADEON_GEM_CPU_ACCESS (1 << 3) -/* CPU access is not expected to work for this BO */ -#define RADEON_GEM_NO_CPU_ACCESS (1 << 4) - -struct drm_radeon_gem_create { - __u64 size; - __u64 alignment; - __u32 handle; - __u32 initial_domain; - __u32 flags; -}; - -/* - * This is not a reliable API and you should expect it to fail for any - * number of reasons and have fallback path that do not use userptr to - * perform any operation. - */ -#define RADEON_GEM_USERPTR_READONLY (1 << 0) -#define RADEON_GEM_USERPTR_ANONONLY (1 << 1) -#define RADEON_GEM_USERPTR_VALIDATE (1 << 2) -#define RADEON_GEM_USERPTR_REGISTER (1 << 3) - -struct drm_radeon_gem_userptr { - __u64 addr; - __u64 size; - __u32 flags; - __u32 handle; -}; - -#define RADEON_TILING_MACRO 0x1 -#define RADEON_TILING_MICRO 0x2 -#define RADEON_TILING_SWAP_16BIT 0x4 -#define RADEON_TILING_SWAP_32BIT 0x8 -/* this object requires a surface when mapped - i.e. front buffer */ -#define RADEON_TILING_SURFACE 0x10 -#define RADEON_TILING_MICRO_SQUARE 0x20 -#define RADEON_TILING_EG_BANKW_SHIFT 8 -#define RADEON_TILING_EG_BANKW_MASK 0xf -#define RADEON_TILING_EG_BANKH_SHIFT 12 -#define RADEON_TILING_EG_BANKH_MASK 0xf -#define RADEON_TILING_EG_MACRO_TILE_ASPECT_SHIFT 16 -#define RADEON_TILING_EG_MACRO_TILE_ASPECT_MASK 0xf -#define RADEON_TILING_EG_TILE_SPLIT_SHIFT 24 -#define RADEON_TILING_EG_TILE_SPLIT_MASK 0xf -#define RADEON_TILING_EG_STENCIL_TILE_SPLIT_SHIFT 28 -#define RADEON_TILING_EG_STENCIL_TILE_SPLIT_MASK 0xf - -struct drm_radeon_gem_set_tiling { - __u32 handle; - __u32 tiling_flags; - __u32 pitch; -}; - -struct drm_radeon_gem_get_tiling { - __u32 handle; - __u32 tiling_flags; - __u32 pitch; -}; - -struct drm_radeon_gem_mmap { - __u32 handle; - __u32 pad; - __u64 offset; - __u64 size; - __u64 addr_ptr; -}; - -struct drm_radeon_gem_set_domain { - __u32 handle; - __u32 read_domains; - __u32 write_domain; -}; - -struct drm_radeon_gem_wait_idle { - __u32 handle; - __u32 pad; -}; - -struct drm_radeon_gem_busy { - __u32 handle; - __u32 domain; -}; - -struct drm_radeon_gem_pread { - /** Handle for the object being read. */ - __u32 handle; - __u32 pad; - /** Offset into the object to read from */ - __u64 offset; - /** Length of data to read */ - __u64 size; - /** Pointer to write the data into. */ - /* void *, but pointers are not 32/64 compatible */ - __u64 data_ptr; -}; - -struct drm_radeon_gem_pwrite { - /** Handle for the object being written to. */ - __u32 handle; - __u32 pad; - /** Offset into the object to write to */ - __u64 offset; - /** Length of data to write */ - __u64 size; - /** Pointer to read the data from. */ - /* void *, but pointers are not 32/64 compatible */ - __u64 data_ptr; -}; - -/* Sets or returns a value associated with a buffer. */ -struct drm_radeon_gem_op { - __u32 handle; /* buffer */ - __u32 op; /* RADEON_GEM_OP_* */ - __u64 value; /* input or return value */ -}; - -#define RADEON_GEM_OP_GET_INITIAL_DOMAIN 0 -#define RADEON_GEM_OP_SET_INITIAL_DOMAIN 1 - -#define RADEON_VA_MAP 1 -#define RADEON_VA_UNMAP 2 - -#define RADEON_VA_RESULT_OK 0 -#define RADEON_VA_RESULT_ERROR 1 -#define RADEON_VA_RESULT_VA_EXIST 2 - -#define RADEON_VM_PAGE_VALID (1 << 0) -#define RADEON_VM_PAGE_READABLE (1 << 1) -#define RADEON_VM_PAGE_WRITEABLE (1 << 2) -#define RADEON_VM_PAGE_SYSTEM (1 << 3) -#define RADEON_VM_PAGE_SNOOPED (1 << 4) - -struct drm_radeon_gem_va { - __u32 handle; - __u32 operation; - __u32 vm_id; - __u32 flags; - __u64 offset; -}; - -#define RADEON_CHUNK_ID_RELOCS 0x01 -#define RADEON_CHUNK_ID_IB 0x02 -#define RADEON_CHUNK_ID_FLAGS 0x03 -#define RADEON_CHUNK_ID_CONST_IB 0x04 - -/* The first dword of RADEON_CHUNK_ID_FLAGS is a uint32 of these flags: */ -#define RADEON_CS_KEEP_TILING_FLAGS 0x01 -#define RADEON_CS_USE_VM 0x02 -#define RADEON_CS_END_OF_FRAME 0x04 /* a hint from userspace which CS is the last one */ -/* The second dword of RADEON_CHUNK_ID_FLAGS is a uint32 that sets the ring type */ -#define RADEON_CS_RING_GFX 0 -#define RADEON_CS_RING_COMPUTE 1 -#define RADEON_CS_RING_DMA 2 -#define RADEON_CS_RING_UVD 3 -#define RADEON_CS_RING_VCE 4 -/* The third dword of RADEON_CHUNK_ID_FLAGS is a sint32 that sets the priority */ -/* 0 = normal, + = higher priority, - = lower priority */ - -struct drm_radeon_cs_chunk { - __u32 chunk_id; - __u32 length_dw; - __u64 chunk_data; -}; - -/* drm_radeon_cs_reloc.flags */ -#define RADEON_RELOC_PRIO_MASK (0xf << 0) - -struct drm_radeon_cs_reloc { - __u32 handle; - __u32 read_domains; - __u32 write_domain; - __u32 flags; -}; - -struct drm_radeon_cs { - __u32 num_chunks; - __u32 cs_id; - /* this points to __u64 * which point to cs chunks */ - __u64 chunks; - /* updates to the limits after this CS ioctl */ - __u64 gart_limit; - __u64 vram_limit; -}; - -#define RADEON_INFO_DEVICE_ID 0x00 -#define RADEON_INFO_NUM_GB_PIPES 0x01 -#define RADEON_INFO_NUM_Z_PIPES 0x02 -#define RADEON_INFO_ACCEL_WORKING 0x03 -#define RADEON_INFO_CRTC_FROM_ID 0x04 -#define RADEON_INFO_ACCEL_WORKING2 0x05 -#define RADEON_INFO_TILING_CONFIG 0x06 -#define RADEON_INFO_WANT_HYPERZ 0x07 -#define RADEON_INFO_WANT_CMASK 0x08 /* get access to CMASK on r300 */ -#define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09 /* clock crystal frequency */ -#define RADEON_INFO_NUM_BACKENDS 0x0a /* DB/backends for r600+ - need for OQ */ -#define RADEON_INFO_NUM_TILE_PIPES 0x0b /* tile pipes for r600+ */ -#define RADEON_INFO_FUSION_GART_WORKING 0x0c /* fusion writes to GTT were broken before this */ -#define RADEON_INFO_BACKEND_MAP 0x0d /* pipe to backend map, needed by mesa */ -/* virtual address start, va < start are reserved by the kernel */ -#define RADEON_INFO_VA_START 0x0e -/* maximum size of ib using the virtual memory cs */ -#define RADEON_INFO_IB_VM_MAX_SIZE 0x0f -/* max pipes - needed for compute shaders */ -#define RADEON_INFO_MAX_PIPES 0x10 -/* timestamp for GL_ARB_timer_query (OpenGL), returns the current GPU clock */ -#define RADEON_INFO_TIMESTAMP 0x11 -/* max shader engines (SE) - needed for geometry shaders, etc. */ -#define RADEON_INFO_MAX_SE 0x12 -/* max SH per SE */ -#define RADEON_INFO_MAX_SH_PER_SE 0x13 -/* fast fb access is enabled */ -#define RADEON_INFO_FASTFB_WORKING 0x14 -/* query if a RADEON_CS_RING_* submission is supported */ -#define RADEON_INFO_RING_WORKING 0x15 -/* SI tile mode array */ -#define RADEON_INFO_SI_TILE_MODE_ARRAY 0x16 -/* query if CP DMA is supported on the compute ring */ -#define RADEON_INFO_SI_CP_DMA_COMPUTE 0x17 -/* CIK macrotile mode array */ -#define RADEON_INFO_CIK_MACROTILE_MODE_ARRAY 0x18 -/* query the number of render backends */ -#define RADEON_INFO_SI_BACKEND_ENABLED_MASK 0x19 -/* max engine clock - needed for OpenCL */ -#define RADEON_INFO_MAX_SCLK 0x1a -/* version of VCE firmware */ -#define RADEON_INFO_VCE_FW_VERSION 0x1b -/* version of VCE feedback */ -#define RADEON_INFO_VCE_FB_VERSION 0x1c -#define RADEON_INFO_NUM_BYTES_MOVED 0x1d -#define RADEON_INFO_VRAM_USAGE 0x1e -#define RADEON_INFO_GTT_USAGE 0x1f -#define RADEON_INFO_ACTIVE_CU_COUNT 0x20 -#define RADEON_INFO_CURRENT_GPU_TEMP 0x21 -#define RADEON_INFO_CURRENT_GPU_SCLK 0x22 -#define RADEON_INFO_CURRENT_GPU_MCLK 0x23 -#define RADEON_INFO_READ_REG 0x24 -#define RADEON_INFO_VA_UNMAP_WORKING 0x25 -#define RADEON_INFO_GPU_RESET_COUNTER 0x26 - -struct drm_radeon_info { - __u32 request; - __u32 pad; - __u64 value; -}; - -/* Those correspond to the tile index to use, this is to explicitly state - * the API that is implicitly defined by the tile mode array. - */ -#define SI_TILE_MODE_COLOR_LINEAR_ALIGNED 8 -#define SI_TILE_MODE_COLOR_1D 13 -#define SI_TILE_MODE_COLOR_1D_SCANOUT 9 -#define SI_TILE_MODE_COLOR_2D_8BPP 14 -#define SI_TILE_MODE_COLOR_2D_16BPP 15 -#define SI_TILE_MODE_COLOR_2D_32BPP 16 -#define SI_TILE_MODE_COLOR_2D_64BPP 17 -#define SI_TILE_MODE_COLOR_2D_SCANOUT_16BPP 11 -#define SI_TILE_MODE_COLOR_2D_SCANOUT_32BPP 12 -#define SI_TILE_MODE_DEPTH_STENCIL_1D 4 -#define SI_TILE_MODE_DEPTH_STENCIL_2D 0 -#define SI_TILE_MODE_DEPTH_STENCIL_2D_2AA 3 -#define SI_TILE_MODE_DEPTH_STENCIL_2D_4AA 3 -#define SI_TILE_MODE_DEPTH_STENCIL_2D_8AA 2 - -#define CIK_TILE_MODE_DEPTH_STENCIL_1D 5 - -#if defined(__cplusplus) -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/savage_drm.h b/lib/libc/include/generic-musl/drm/savage_drm.h deleted file mode 100644 index 15c3b679d5..0000000000 --- a/lib/libc/include/generic-musl/drm/savage_drm.h +++ /dev/null @@ -1,220 +0,0 @@ -/* savage_drm.h -- Public header for the savage driver - * - * Copyright 2004 Felix Kuehling - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NON-INFRINGEMENT. IN NO EVENT SHALL FELIX KUEHLING BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef __SAVAGE_DRM_H__ -#define __SAVAGE_DRM_H__ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#ifndef __SAVAGE_SAREA_DEFINES__ -#define __SAVAGE_SAREA_DEFINES__ - -/* 2 heaps (1 for card, 1 for agp), each divided into up to 128 - * regions, subject to a minimum region size of (1<<16) == 64k. - * - * Clients may subdivide regions internally, but when sharing between - * clients, the region size is the minimum granularity. - */ - -#define SAVAGE_CARD_HEAP 0 -#define SAVAGE_AGP_HEAP 1 -#define SAVAGE_NR_TEX_HEAPS 2 -#define SAVAGE_NR_TEX_REGIONS 16 -#define SAVAGE_LOG_MIN_TEX_REGION_SIZE 16 - -#endif /* __SAVAGE_SAREA_DEFINES__ */ - -typedef struct _drm_savage_sarea { - /* LRU lists for texture memory in agp space and on the card. - */ - struct drm_tex_region texList[SAVAGE_NR_TEX_HEAPS][SAVAGE_NR_TEX_REGIONS + - 1]; - unsigned int texAge[SAVAGE_NR_TEX_HEAPS]; - - /* Mechanism to validate card state. - */ - int ctxOwner; -} drm_savage_sarea_t, *drm_savage_sarea_ptr; - -/* Savage-specific ioctls - */ -#define DRM_SAVAGE_BCI_INIT 0x00 -#define DRM_SAVAGE_BCI_CMDBUF 0x01 -#define DRM_SAVAGE_BCI_EVENT_EMIT 0x02 -#define DRM_SAVAGE_BCI_EVENT_WAIT 0x03 - -#define DRM_IOCTL_SAVAGE_BCI_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_SAVAGE_BCI_INIT, drm_savage_init_t) -#define DRM_IOCTL_SAVAGE_BCI_CMDBUF DRM_IOW( DRM_COMMAND_BASE + DRM_SAVAGE_BCI_CMDBUF, drm_savage_cmdbuf_t) -#define DRM_IOCTL_SAVAGE_BCI_EVENT_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_EMIT, drm_savage_event_emit_t) -#define DRM_IOCTL_SAVAGE_BCI_EVENT_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_WAIT, drm_savage_event_wait_t) - -#define SAVAGE_DMA_PCI 1 -#define SAVAGE_DMA_AGP 3 -typedef struct drm_savage_init { - enum { - SAVAGE_INIT_BCI = 1, - SAVAGE_CLEANUP_BCI = 2 - } func; - unsigned int sarea_priv_offset; - - /* some parameters */ - unsigned int cob_size; - unsigned int bci_threshold_lo, bci_threshold_hi; - unsigned int dma_type; - - /* frame buffer layout */ - unsigned int fb_bpp; - unsigned int front_offset, front_pitch; - unsigned int back_offset, back_pitch; - unsigned int depth_bpp; - unsigned int depth_offset, depth_pitch; - - /* local textures */ - unsigned int texture_offset; - unsigned int texture_size; - - /* physical locations of non-permanent maps */ - unsigned long status_offset; - unsigned long buffers_offset; - unsigned long agp_textures_offset; - unsigned long cmd_dma_offset; -} drm_savage_init_t; - -typedef union drm_savage_cmd_header drm_savage_cmd_header_t; -typedef struct drm_savage_cmdbuf { - /* command buffer in client's address space */ - drm_savage_cmd_header_t *cmd_addr; - unsigned int size; /* size of the command buffer in 64bit units */ - - unsigned int dma_idx; /* DMA buffer index to use */ - int discard; /* discard DMA buffer when done */ - /* vertex buffer in client's address space */ - unsigned int *vb_addr; - unsigned int vb_size; /* size of client vertex buffer in bytes */ - unsigned int vb_stride; /* stride of vertices in 32bit words */ - /* boxes in client's address space */ - struct drm_clip_rect *box_addr; - unsigned int nbox; /* number of clipping boxes */ -} drm_savage_cmdbuf_t; - -#define SAVAGE_WAIT_2D 0x1 /* wait for 2D idle before updating event tag */ -#define SAVAGE_WAIT_3D 0x2 /* wait for 3D idle before updating event tag */ -#define SAVAGE_WAIT_IRQ 0x4 /* emit or wait for IRQ, not implemented yet */ -typedef struct drm_savage_event { - unsigned int count; - unsigned int flags; -} drm_savage_event_emit_t, drm_savage_event_wait_t; - -/* Commands for the cmdbuf ioctl - */ -#define SAVAGE_CMD_STATE 0 /* a range of state registers */ -#define SAVAGE_CMD_DMA_PRIM 1 /* vertices from DMA buffer */ -#define SAVAGE_CMD_VB_PRIM 2 /* vertices from client vertex buffer */ -#define SAVAGE_CMD_DMA_IDX 3 /* indexed vertices from DMA buffer */ -#define SAVAGE_CMD_VB_IDX 4 /* indexed vertices client vertex buffer */ -#define SAVAGE_CMD_CLEAR 5 /* clear buffers */ -#define SAVAGE_CMD_SWAP 6 /* swap buffers */ - -/* Primitive types -*/ -#define SAVAGE_PRIM_TRILIST 0 /* triangle list */ -#define SAVAGE_PRIM_TRISTRIP 1 /* triangle strip */ -#define SAVAGE_PRIM_TRIFAN 2 /* triangle fan */ -#define SAVAGE_PRIM_TRILIST_201 3 /* reorder verts for correct flat - * shading on s3d */ - -/* Skip flags (vertex format) - */ -#define SAVAGE_SKIP_Z 0x01 -#define SAVAGE_SKIP_W 0x02 -#define SAVAGE_SKIP_C0 0x04 -#define SAVAGE_SKIP_C1 0x08 -#define SAVAGE_SKIP_S0 0x10 -#define SAVAGE_SKIP_T0 0x20 -#define SAVAGE_SKIP_ST0 0x30 -#define SAVAGE_SKIP_S1 0x40 -#define SAVAGE_SKIP_T1 0x80 -#define SAVAGE_SKIP_ST1 0xc0 -#define SAVAGE_SKIP_ALL_S3D 0x3f -#define SAVAGE_SKIP_ALL_S4 0xff - -/* Buffer names for clear command - */ -#define SAVAGE_FRONT 0x1 -#define SAVAGE_BACK 0x2 -#define SAVAGE_DEPTH 0x4 - -/* 64-bit command header - */ -union drm_savage_cmd_header { - struct { - unsigned char cmd; /* command */ - unsigned char pad0; - unsigned short pad1; - unsigned short pad2; - unsigned short pad3; - } cmd; /* generic */ - struct { - unsigned char cmd; - unsigned char global; /* need idle engine? */ - unsigned short count; /* number of consecutive registers */ - unsigned short start; /* first register */ - unsigned short pad3; - } state; /* SAVAGE_CMD_STATE */ - struct { - unsigned char cmd; - unsigned char prim; /* primitive type */ - unsigned short skip; /* vertex format (skip flags) */ - unsigned short count; /* number of vertices */ - unsigned short start; /* first vertex in DMA/vertex buffer */ - } prim; /* SAVAGE_CMD_DMA_PRIM, SAVAGE_CMD_VB_PRIM */ - struct { - unsigned char cmd; - unsigned char prim; - unsigned short skip; - unsigned short count; /* number of indices that follow */ - unsigned short pad3; - } idx; /* SAVAGE_CMD_DMA_IDX, SAVAGE_CMD_VB_IDX */ - struct { - unsigned char cmd; - unsigned char pad0; - unsigned short pad1; - unsigned int flags; - } clear0; /* SAVAGE_CMD_CLEAR */ - struct { - unsigned int mask; - unsigned int value; - } clear1; /* SAVAGE_CMD_CLEAR data */ -}; - -#if defined(__cplusplus) -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/sis_drm.h b/lib/libc/include/generic-musl/drm/sis_drm.h deleted file mode 100644 index 7c62b0672d..0000000000 --- a/lib/libc/include/generic-musl/drm/sis_drm.h +++ /dev/null @@ -1,77 +0,0 @@ -/* sis_drv.h -- Private header for sis driver -*- linux-c -*- */ -/* - * Copyright 2005 Eric Anholt - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - */ - -#ifndef __SIS_DRM_H__ -#define __SIS_DRM_H__ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* SiS specific ioctls */ -#define NOT_USED_0_3 -#define DRM_SIS_FB_ALLOC 0x04 -#define DRM_SIS_FB_FREE 0x05 -#define NOT_USED_6_12 -#define DRM_SIS_AGP_INIT 0x13 -#define DRM_SIS_AGP_ALLOC 0x14 -#define DRM_SIS_AGP_FREE 0x15 -#define DRM_SIS_FB_INIT 0x16 - -#define DRM_IOCTL_SIS_FB_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_FB_ALLOC, drm_sis_mem_t) -#define DRM_IOCTL_SIS_FB_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_FB_FREE, drm_sis_mem_t) -#define DRM_IOCTL_SIS_AGP_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_INIT, drm_sis_agp_t) -#define DRM_IOCTL_SIS_AGP_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_ALLOC, drm_sis_mem_t) -#define DRM_IOCTL_SIS_AGP_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_AGP_FREE, drm_sis_mem_t) -#define DRM_IOCTL_SIS_FB_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_FB_INIT, drm_sis_fb_t) -/* -#define DRM_IOCTL_SIS_FLIP DRM_IOW( 0x48, drm_sis_flip_t) -#define DRM_IOCTL_SIS_FLIP_INIT DRM_IO( 0x49) -#define DRM_IOCTL_SIS_FLIP_FINAL DRM_IO( 0x50) -*/ - -typedef struct { - int context; - unsigned long offset; - unsigned long size; - unsigned long free; -} drm_sis_mem_t; - -typedef struct { - unsigned long offset, size; -} drm_sis_agp_t; - -typedef struct { - unsigned long offset, size; -} drm_sis_fb_t; - -#if defined(__cplusplus) -} -#endif - -#endif /* __SIS_DRM_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/tegra_drm.h b/lib/libc/include/generic-musl/drm/tegra_drm.h deleted file mode 100644 index a89eef948b..0000000000 --- a/lib/libc/include/generic-musl/drm/tegra_drm.h +++ /dev/null @@ -1,681 +0,0 @@ -/* - * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _TEGRA_DRM_H_ -#define _TEGRA_DRM_H_ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#define DRM_TEGRA_GEM_CREATE_TILED (1 << 0) -#define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1) - -/** - * struct drm_tegra_gem_create - parameters for the GEM object creation IOCTL - */ -struct drm_tegra_gem_create { - /** - * @size: - * - * The size, in bytes, of the buffer object to be created. - */ - __u64 size; - - /** - * @flags: - * - * A bitmask of flags that influence the creation of GEM objects: - * - * DRM_TEGRA_GEM_CREATE_TILED - * Use the 16x16 tiling format for this buffer. - * - * DRM_TEGRA_GEM_CREATE_BOTTOM_UP - * The buffer has a bottom-up layout. - */ - __u32 flags; - - /** - * @handle: - * - * The handle of the created GEM object. Set by the kernel upon - * successful completion of the IOCTL. - */ - __u32 handle; -}; - -/** - * struct drm_tegra_gem_mmap - parameters for the GEM mmap IOCTL - */ -struct drm_tegra_gem_mmap { - /** - * @handle: - * - * Handle of the GEM object to obtain an mmap offset for. - */ - __u32 handle; - - /** - * @pad: - * - * Structure padding that may be used in the future. Must be 0. - */ - __u32 pad; - - /** - * @offset: - * - * The mmap offset for the given GEM object. Set by the kernel upon - * successful completion of the IOCTL. - */ - __u64 offset; -}; - -/** - * struct drm_tegra_syncpt_read - parameters for the read syncpoint IOCTL - */ -struct drm_tegra_syncpt_read { - /** - * @id: - * - * ID of the syncpoint to read the current value from. - */ - __u32 id; - - /** - * @value: - * - * The current syncpoint value. Set by the kernel upon successful - * completion of the IOCTL. - */ - __u32 value; -}; - -/** - * struct drm_tegra_syncpt_incr - parameters for the increment syncpoint IOCTL - */ -struct drm_tegra_syncpt_incr { - /** - * @id: - * - * ID of the syncpoint to increment. - */ - __u32 id; - - /** - * @pad: - * - * Structure padding that may be used in the future. Must be 0. - */ - __u32 pad; -}; - -/** - * struct drm_tegra_syncpt_wait - parameters for the wait syncpoint IOCTL - */ -struct drm_tegra_syncpt_wait { - /** - * @id: - * - * ID of the syncpoint to wait on. - */ - __u32 id; - - /** - * @thresh: - * - * Threshold value for which to wait. - */ - __u32 thresh; - - /** - * @timeout: - * - * Timeout, in milliseconds, to wait. - */ - __u32 timeout; - - /** - * @value: - * - * The new syncpoint value after the wait. Set by the kernel upon - * successful completion of the IOCTL. - */ - __u32 value; -}; - -#define DRM_TEGRA_NO_TIMEOUT (0xffffffff) - -/** - * struct drm_tegra_open_channel - parameters for the open channel IOCTL - */ -struct drm_tegra_open_channel { - /** - * @client: - * - * The client ID for this channel. - */ - __u32 client; - - /** - * @pad: - * - * Structure padding that may be used in the future. Must be 0. - */ - __u32 pad; - - /** - * @context: - * - * The application context of this channel. Set by the kernel upon - * successful completion of the IOCTL. This context needs to be passed - * to the DRM_TEGRA_CHANNEL_CLOSE or the DRM_TEGRA_SUBMIT IOCTLs. - */ - __u64 context; -}; - -/** - * struct drm_tegra_close_channel - parameters for the close channel IOCTL - */ -struct drm_tegra_close_channel { - /** - * @context: - * - * The application context of this channel. This is obtained from the - * DRM_TEGRA_OPEN_CHANNEL IOCTL. - */ - __u64 context; -}; - -/** - * struct drm_tegra_get_syncpt - parameters for the get syncpoint IOCTL - */ -struct drm_tegra_get_syncpt { - /** - * @context: - * - * The application context identifying the channel for which to obtain - * the syncpoint ID. - */ - __u64 context; - - /** - * @index: - * - * Index of the client syncpoint for which to obtain the ID. - */ - __u32 index; - - /** - * @id: - * - * The ID of the given syncpoint. Set by the kernel upon successful - * completion of the IOCTL. - */ - __u32 id; -}; - -/** - * struct drm_tegra_get_syncpt_base - parameters for the get wait base IOCTL - */ -struct drm_tegra_get_syncpt_base { - /** - * @context: - * - * The application context identifying for which channel to obtain the - * wait base. - */ - __u64 context; - - /** - * @syncpt: - * - * ID of the syncpoint for which to obtain the wait base. - */ - __u32 syncpt; - - /** - * @id: - * - * The ID of the wait base corresponding to the client syncpoint. Set - * by the kernel upon successful completion of the IOCTL. - */ - __u32 id; -}; - -/** - * struct drm_tegra_syncpt - syncpoint increment operation - */ -struct drm_tegra_syncpt { - /** - * @id: - * - * ID of the syncpoint to operate on. - */ - __u32 id; - - /** - * @incrs: - * - * Number of increments to perform for the syncpoint. - */ - __u32 incrs; -}; - -/** - * struct drm_tegra_cmdbuf - structure describing a command buffer - */ -struct drm_tegra_cmdbuf { - /** - * @handle: - * - * Handle to a GEM object containing the command buffer. - */ - __u32 handle; - - /** - * @offset: - * - * Offset, in bytes, into the GEM object identified by @handle at - * which the command buffer starts. - */ - __u32 offset; - - /** - * @words: - * - * Number of 32-bit words in this command buffer. - */ - __u32 words; - - /** - * @pad: - * - * Structure padding that may be used in the future. Must be 0. - */ - __u32 pad; -}; - -/** - * struct drm_tegra_reloc - GEM object relocation structure - */ -struct drm_tegra_reloc { - struct { - /** - * @cmdbuf.handle: - * - * Handle to the GEM object containing the command buffer for - * which to perform this GEM object relocation. - */ - __u32 handle; - - /** - * @cmdbuf.offset: - * - * Offset, in bytes, into the command buffer at which to - * insert the relocated address. - */ - __u32 offset; - } cmdbuf; - struct { - /** - * @target.handle: - * - * Handle to the GEM object to be relocated. - */ - __u32 handle; - - /** - * @target.offset: - * - * Offset, in bytes, into the target GEM object at which the - * relocated data starts. - */ - __u32 offset; - } target; - - /** - * @shift: - * - * The number of bits by which to shift relocated addresses. - */ - __u32 shift; - - /** - * @pad: - * - * Structure padding that may be used in the future. Must be 0. - */ - __u32 pad; -}; - -/** - * struct drm_tegra_waitchk - wait check structure - */ -struct drm_tegra_waitchk { - /** - * @handle: - * - * Handle to the GEM object containing a command stream on which to - * perform the wait check. - */ - __u32 handle; - - /** - * @offset: - * - * Offset, in bytes, of the location in the command stream to perform - * the wait check on. - */ - __u32 offset; - - /** - * @syncpt: - * - * ID of the syncpoint to wait check. - */ - __u32 syncpt; - - /** - * @thresh: - * - * Threshold value for which to check. - */ - __u32 thresh; -}; - -/** - * struct drm_tegra_submit - job submission structure - */ -struct drm_tegra_submit { - /** - * @context: - * - * The application context identifying the channel to use for the - * execution of this job. - */ - __u64 context; - - /** - * @num_syncpts: - * - * The number of syncpoints operated on by this job. This defines the - * length of the array pointed to by @syncpts. - */ - __u32 num_syncpts; - - /** - * @num_cmdbufs: - * - * The number of command buffers to execute as part of this job. This - * defines the length of the array pointed to by @cmdbufs. - */ - __u32 num_cmdbufs; - - /** - * @num_relocs: - * - * The number of relocations to perform before executing this job. - * This defines the length of the array pointed to by @relocs. - */ - __u32 num_relocs; - - /** - * @num_waitchks: - * - * The number of wait checks to perform as part of this job. This - * defines the length of the array pointed to by @waitchks. - */ - __u32 num_waitchks; - - /** - * @waitchk_mask: - * - * Bitmask of valid wait checks. - */ - __u32 waitchk_mask; - - /** - * @timeout: - * - * Timeout, in milliseconds, before this job is cancelled. - */ - __u32 timeout; - - /** - * @syncpts: - * - * A pointer to an array of &struct drm_tegra_syncpt structures that - * specify the syncpoint operations performed as part of this job. - * The number of elements in the array must be equal to the value - * given by @num_syncpts. - */ - __u64 syncpts; - - /** - * @cmdbufs: - * - * A pointer to an array of &struct drm_tegra_cmdbuf structures that - * define the command buffers to execute as part of this job. The - * number of elements in the array must be equal to the value given - * by @num_syncpts. - */ - __u64 cmdbufs; - - /** - * @relocs: - * - * A pointer to an array of &struct drm_tegra_reloc structures that - * specify the relocations that need to be performed before executing - * this job. The number of elements in the array must be equal to the - * value given by @num_relocs. - */ - __u64 relocs; - - /** - * @waitchks: - * - * A pointer to an array of &struct drm_tegra_waitchk structures that - * specify the wait checks to be performed while executing this job. - * The number of elements in the array must be equal to the value - * given by @num_waitchks. - */ - __u64 waitchks; - - /** - * @fence: - * - * The threshold of the syncpoint associated with this job after it - * has been completed. Set by the kernel upon successful completion of - * the IOCTL. This can be used with the DRM_TEGRA_SYNCPT_WAIT IOCTL to - * wait for this job to be finished. - */ - __u32 fence; - - /** - * @reserved: - * - * This field is reserved for future use. Must be 0. - */ - __u32 reserved[5]; -}; - -#define DRM_TEGRA_GEM_TILING_MODE_PITCH 0 -#define DRM_TEGRA_GEM_TILING_MODE_TILED 1 -#define DRM_TEGRA_GEM_TILING_MODE_BLOCK 2 - -/** - * struct drm_tegra_gem_set_tiling - parameters for the set tiling IOCTL - */ -struct drm_tegra_gem_set_tiling { - /** - * @handle: - * - * Handle to the GEM object for which to set the tiling parameters. - */ - __u32 handle; - - /** - * @mode: - * - * The tiling mode to set. Must be one of: - * - * DRM_TEGRA_GEM_TILING_MODE_PITCH - * pitch linear format - * - * DRM_TEGRA_GEM_TILING_MODE_TILED - * 16x16 tiling format - * - * DRM_TEGRA_GEM_TILING_MODE_BLOCK - * 16Bx2 tiling format - */ - __u32 mode; - - /** - * @value: - * - * The value to set for the tiling mode parameter. - */ - __u32 value; - - /** - * @pad: - * - * Structure padding that may be used in the future. Must be 0. - */ - __u32 pad; -}; - -/** - * struct drm_tegra_gem_get_tiling - parameters for the get tiling IOCTL - */ -struct drm_tegra_gem_get_tiling { - /** - * @handle: - * - * Handle to the GEM object for which to query the tiling parameters. - */ - __u32 handle; - - /** - * @mode: - * - * The tiling mode currently associated with the GEM object. Set by - * the kernel upon successful completion of the IOCTL. - */ - __u32 mode; - - /** - * @value: - * - * The tiling mode parameter currently associated with the GEM object. - * Set by the kernel upon successful completion of the IOCTL. - */ - __u32 value; - - /** - * @pad: - * - * Structure padding that may be used in the future. Must be 0. - */ - __u32 pad; -}; - -#define DRM_TEGRA_GEM_BOTTOM_UP (1 << 0) -#define DRM_TEGRA_GEM_FLAGS (DRM_TEGRA_GEM_BOTTOM_UP) - -/** - * struct drm_tegra_gem_set_flags - parameters for the set flags IOCTL - */ -struct drm_tegra_gem_set_flags { - /** - * @handle: - * - * Handle to the GEM object for which to set the flags. - */ - __u32 handle; - - /** - * @flags: - * - * The flags to set for the GEM object. - */ - __u32 flags; -}; - -/** - * struct drm_tegra_gem_get_flags - parameters for the get flags IOCTL - */ -struct drm_tegra_gem_get_flags { - /** - * @handle: - * - * Handle to the GEM object for which to query the flags. - */ - __u32 handle; - - /** - * @flags: - * - * The flags currently associated with the GEM object. Set by the - * kernel upon successful completion of the IOCTL. - */ - __u32 flags; -}; - -#define DRM_TEGRA_GEM_CREATE 0x00 -#define DRM_TEGRA_GEM_MMAP 0x01 -#define DRM_TEGRA_SYNCPT_READ 0x02 -#define DRM_TEGRA_SYNCPT_INCR 0x03 -#define DRM_TEGRA_SYNCPT_WAIT 0x04 -#define DRM_TEGRA_OPEN_CHANNEL 0x05 -#define DRM_TEGRA_CLOSE_CHANNEL 0x06 -#define DRM_TEGRA_GET_SYNCPT 0x07 -#define DRM_TEGRA_SUBMIT 0x08 -#define DRM_TEGRA_GET_SYNCPT_BASE 0x09 -#define DRM_TEGRA_GEM_SET_TILING 0x0a -#define DRM_TEGRA_GEM_GET_TILING 0x0b -#define DRM_TEGRA_GEM_SET_FLAGS 0x0c -#define DRM_TEGRA_GEM_GET_FLAGS 0x0d - -#define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create) -#define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap) -#define DRM_IOCTL_TEGRA_SYNCPT_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_READ, struct drm_tegra_syncpt_read) -#define DRM_IOCTL_TEGRA_SYNCPT_INCR DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, struct drm_tegra_syncpt_incr) -#define DRM_IOCTL_TEGRA_SYNCPT_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, struct drm_tegra_syncpt_wait) -#define DRM_IOCTL_TEGRA_OPEN_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, struct drm_tegra_open_channel) -#define DRM_IOCTL_TEGRA_CLOSE_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_close_channel) -#define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt) -#define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit) -#define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base) -#define DRM_IOCTL_TEGRA_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, struct drm_tegra_gem_set_tiling) -#define DRM_IOCTL_TEGRA_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, struct drm_tegra_gem_get_tiling) -#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags) -#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags) - -#if defined(__cplusplus) -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/v3d_drm.h b/lib/libc/include/generic-musl/drm/v3d_drm.h deleted file mode 100644 index f222ddc346..0000000000 --- a/lib/libc/include/generic-musl/drm/v3d_drm.h +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright © 2014-2018 Broadcom - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef _V3D_DRM_H_ -#define _V3D_DRM_H_ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#define DRM_V3D_SUBMIT_CL 0x00 -#define DRM_V3D_WAIT_BO 0x01 -#define DRM_V3D_CREATE_BO 0x02 -#define DRM_V3D_MMAP_BO 0x03 -#define DRM_V3D_GET_PARAM 0x04 -#define DRM_V3D_GET_BO_OFFSET 0x05 - -#define DRM_IOCTL_V3D_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl) -#define DRM_IOCTL_V3D_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo) -#define DRM_IOCTL_V3D_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_CREATE_BO, struct drm_v3d_create_bo) -#define DRM_IOCTL_V3D_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_MMAP_BO, struct drm_v3d_mmap_bo) -#define DRM_IOCTL_V3D_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_PARAM, struct drm_v3d_get_param) -#define DRM_IOCTL_V3D_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_BO_OFFSET, struct drm_v3d_get_bo_offset) - -/** - * struct drm_v3d_submit_cl - ioctl argument for submitting commands to the 3D - * engine. - * - * This asks the kernel to have the GPU execute an optional binner - * command list, and a render command list. - */ -struct drm_v3d_submit_cl { - /* Pointer to the binner command list. - * - * This is the first set of commands executed, which runs the - * coordinate shader to determine where primitives land on the screen, - * then writes out the state updates and draw calls necessary per tile - * to the tile allocation BO. - */ - __u32 bcl_start; - - /** End address of the BCL (first byte after the BCL) */ - __u32 bcl_end; - - /* Offset of the render command list. - * - * This is the second set of commands executed, which will either - * execute the tiles that have been set up by the BCL, or a fixed set - * of tiles (in the case of RCL-only blits). - */ - __u32 rcl_start; - - /** End address of the RCL (first byte after the RCL) */ - __u32 rcl_end; - - /** An optional sync object to wait on before starting the BCL. */ - __u32 in_sync_bcl; - /** An optional sync object to wait on before starting the RCL. */ - __u32 in_sync_rcl; - /** An optional sync object to place the completion fence in. */ - __u32 out_sync; - - /* Offset of the tile alloc memory - * - * This is optional on V3D 3.3 (where the CL can set the value) but - * required on V3D 4.1. - */ - __u32 qma; - - /** Size of the tile alloc memory. */ - __u32 qms; - - /** Offset of the tile state data array. */ - __u32 qts; - - /* Pointer to a u32 array of the BOs that are referenced by the job. - */ - __u64 bo_handles; - - /* Number of BO handles passed in (size is that times 4). */ - __u32 bo_handle_count; - - /* Pad, must be zero-filled. */ - __u32 pad; -}; - -/** - * struct drm_v3d_wait_bo - ioctl argument for waiting for - * completion of the last DRM_V3D_SUBMIT_CL on a BO. - * - * This is useful for cases where multiple processes might be - * rendering to a BO and you want to wait for all rendering to be - * completed. - */ -struct drm_v3d_wait_bo { - __u32 handle; - __u32 pad; - __u64 timeout_ns; -}; - -/** - * struct drm_v3d_create_bo - ioctl argument for creating V3D BOs. - * - * There are currently no values for the flags argument, but it may be - * used in a future extension. - */ -struct drm_v3d_create_bo { - __u32 size; - __u32 flags; - /** Returned GEM handle for the BO. */ - __u32 handle; - /** - * Returned offset for the BO in the V3D address space. This offset - * is private to the DRM fd and is valid for the lifetime of the GEM - * handle. - * - * This offset value will always be nonzero, since various HW - * units treat 0 specially. - */ - __u32 offset; -}; - -/** - * struct drm_v3d_mmap_bo - ioctl argument for mapping V3D BOs. - * - * This doesn't actually perform an mmap. Instead, it returns the - * offset you need to use in an mmap on the DRM device node. This - * means that tools like valgrind end up knowing about the mapped - * memory. - * - * There are currently no values for the flags argument, but it may be - * used in a future extension. - */ -struct drm_v3d_mmap_bo { - /** Handle for the object being mapped. */ - __u32 handle; - __u32 flags; - /** offset into the drm node to use for subsequent mmap call. */ - __u64 offset; -}; - -enum drm_v3d_param { - DRM_V3D_PARAM_V3D_UIFCFG, - DRM_V3D_PARAM_V3D_HUB_IDENT1, - DRM_V3D_PARAM_V3D_HUB_IDENT2, - DRM_V3D_PARAM_V3D_HUB_IDENT3, - DRM_V3D_PARAM_V3D_CORE0_IDENT0, - DRM_V3D_PARAM_V3D_CORE0_IDENT1, - DRM_V3D_PARAM_V3D_CORE0_IDENT2, -}; - -struct drm_v3d_get_param { - __u32 param; - __u32 pad; - __u64 value; -}; - -/** - * Returns the offset for the BO in the V3D address space for this DRM fd. - * This is the same value returned by drm_v3d_create_bo, if that was called - * from this DRM fd. - */ -struct drm_v3d_get_bo_offset { - __u32 handle; - __u32 offset; -}; - -#if defined(__cplusplus) -} -#endif - -#endif /* _V3D_DRM_H_ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/vc4_drm.h b/lib/libc/include/generic-musl/drm/vc4_drm.h deleted file mode 100644 index 8db36b7c55..0000000000 --- a/lib/libc/include/generic-musl/drm/vc4_drm.h +++ /dev/null @@ -1,442 +0,0 @@ -/* - * Copyright © 2014-2015 Broadcom - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef _VC4_DRM_H_ -#define _VC4_DRM_H_ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#define DRM_VC4_SUBMIT_CL 0x00 -#define DRM_VC4_WAIT_SEQNO 0x01 -#define DRM_VC4_WAIT_BO 0x02 -#define DRM_VC4_CREATE_BO 0x03 -#define DRM_VC4_MMAP_BO 0x04 -#define DRM_VC4_CREATE_SHADER_BO 0x05 -#define DRM_VC4_GET_HANG_STATE 0x06 -#define DRM_VC4_GET_PARAM 0x07 -#define DRM_VC4_SET_TILING 0x08 -#define DRM_VC4_GET_TILING 0x09 -#define DRM_VC4_LABEL_BO 0x0a -#define DRM_VC4_GEM_MADVISE 0x0b -#define DRM_VC4_PERFMON_CREATE 0x0c -#define DRM_VC4_PERFMON_DESTROY 0x0d -#define DRM_VC4_PERFMON_GET_VALUES 0x0e - -#define DRM_IOCTL_VC4_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_SUBMIT_CL, struct drm_vc4_submit_cl) -#define DRM_IOCTL_VC4_WAIT_SEQNO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_WAIT_SEQNO, struct drm_vc4_wait_seqno) -#define DRM_IOCTL_VC4_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_WAIT_BO, struct drm_vc4_wait_bo) -#define DRM_IOCTL_VC4_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_BO, struct drm_vc4_create_bo) -#define DRM_IOCTL_VC4_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_MMAP_BO, struct drm_vc4_mmap_bo) -#define DRM_IOCTL_VC4_CREATE_SHADER_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_SHADER_BO, struct drm_vc4_create_shader_bo) -#define DRM_IOCTL_VC4_GET_HANG_STATE DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_HANG_STATE, struct drm_vc4_get_hang_state) -#define DRM_IOCTL_VC4_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_PARAM, struct drm_vc4_get_param) -#define DRM_IOCTL_VC4_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_SET_TILING, struct drm_vc4_set_tiling) -#define DRM_IOCTL_VC4_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_TILING, struct drm_vc4_get_tiling) -#define DRM_IOCTL_VC4_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_LABEL_BO, struct drm_vc4_label_bo) -#define DRM_IOCTL_VC4_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GEM_MADVISE, struct drm_vc4_gem_madvise) -#define DRM_IOCTL_VC4_PERFMON_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_CREATE, struct drm_vc4_perfmon_create) -#define DRM_IOCTL_VC4_PERFMON_DESTROY DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_DESTROY, struct drm_vc4_perfmon_destroy) -#define DRM_IOCTL_VC4_PERFMON_GET_VALUES DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_GET_VALUES, struct drm_vc4_perfmon_get_values) - -struct drm_vc4_submit_rcl_surface { - __u32 hindex; /* Handle index, or ~0 if not present. */ - __u32 offset; /* Offset to start of buffer. */ - /* - * Bits for either render config (color_write) or load/store packet. - * Bits should all be 0 for MSAA load/stores. - */ - __u16 bits; - -#define VC4_SUBMIT_RCL_SURFACE_READ_IS_FULL_RES (1 << 0) - __u16 flags; -}; - -/** - * struct drm_vc4_submit_cl - ioctl argument for submitting commands to the 3D - * engine. - * - * Drivers typically use GPU BOs to store batchbuffers / command lists and - * their associated state. However, because the VC4 lacks an MMU, we have to - * do validation of memory accesses by the GPU commands. If we were to store - * our commands in BOs, we'd need to do uncached readback from them to do the - * validation process, which is too expensive. Instead, userspace accumulates - * commands and associated state in plain memory, then the kernel copies the - * data to its own address space, and then validates and stores it in a GPU - * BO. - */ -struct drm_vc4_submit_cl { - /* Pointer to the binner command list. - * - * This is the first set of commands executed, which runs the - * coordinate shader to determine where primitives land on the screen, - * then writes out the state updates and draw calls necessary per tile - * to the tile allocation BO. - */ - __u64 bin_cl; - - /* Pointer to the shader records. - * - * Shader records are the structures read by the hardware that contain - * pointers to uniforms, shaders, and vertex attributes. The - * reference to the shader record has enough information to determine - * how many pointers are necessary (fixed number for shaders/uniforms, - * and an attribute count), so those BO indices into bo_handles are - * just stored as __u32s before each shader record passed in. - */ - __u64 shader_rec; - - /* Pointer to uniform data and texture handles for the textures - * referenced by the shader. - * - * For each shader state record, there is a set of uniform data in the - * order referenced by the record (FS, VS, then CS). Each set of - * uniform data has a __u32 index into bo_handles per texture - * sample operation, in the order the QPU_W_TMUn_S writes appear in - * the program. Following the texture BO handle indices is the actual - * uniform data. - * - * The individual uniform state blocks don't have sizes passed in, - * because the kernel has to determine the sizes anyway during shader - * code validation. - */ - __u64 uniforms; - __u64 bo_handles; - - /* Size in bytes of the binner command list. */ - __u32 bin_cl_size; - /* Size in bytes of the set of shader records. */ - __u32 shader_rec_size; - /* Number of shader records. - * - * This could just be computed from the contents of shader_records and - * the address bits of references to them from the bin CL, but it - * keeps the kernel from having to resize some allocations it makes. - */ - __u32 shader_rec_count; - /* Size in bytes of the uniform state. */ - __u32 uniforms_size; - - /* Number of BO handles passed in (size is that times 4). */ - __u32 bo_handle_count; - - /* RCL setup: */ - __u16 width; - __u16 height; - __u8 min_x_tile; - __u8 min_y_tile; - __u8 max_x_tile; - __u8 max_y_tile; - struct drm_vc4_submit_rcl_surface color_read; - struct drm_vc4_submit_rcl_surface color_write; - struct drm_vc4_submit_rcl_surface zs_read; - struct drm_vc4_submit_rcl_surface zs_write; - struct drm_vc4_submit_rcl_surface msaa_color_write; - struct drm_vc4_submit_rcl_surface msaa_zs_write; - __u32 clear_color[2]; - __u32 clear_z; - __u8 clear_s; - - __u32 pad:24; - -#define VC4_SUBMIT_CL_USE_CLEAR_COLOR (1 << 0) -/* By default, the kernel gets to choose the order that the tiles are - * rendered in. If this is set, then the tiles will be rendered in a - * raster order, with the right-to-left vs left-to-right and - * top-to-bottom vs bottom-to-top dictated by - * VC4_SUBMIT_CL_RCL_ORDER_INCREASING_*. This allows overlapping - * blits to be implemented using the 3D engine. - */ -#define VC4_SUBMIT_CL_FIXED_RCL_ORDER (1 << 1) -#define VC4_SUBMIT_CL_RCL_ORDER_INCREASING_X (1 << 2) -#define VC4_SUBMIT_CL_RCL_ORDER_INCREASING_Y (1 << 3) - __u32 flags; - - /* Returned value of the seqno of this render job (for the - * wait ioctl). - */ - __u64 seqno; - - /* ID of the perfmon to attach to this job. 0 means no perfmon. */ - __u32 perfmonid; - - /* Syncobj handle to wait on. If set, processing of this render job - * will not start until the syncobj is signaled. 0 means ignore. - */ - __u32 in_sync; - - /* Syncobj handle to export fence to. If set, the fence in the syncobj - * will be replaced with a fence that signals upon completion of this - * render job. 0 means ignore. - */ - __u32 out_sync; - - __u32 pad2; -}; - -/** - * struct drm_vc4_wait_seqno - ioctl argument for waiting for - * DRM_VC4_SUBMIT_CL completion using its returned seqno. - * - * timeout_ns is the timeout in nanoseconds, where "0" means "don't - * block, just return the status." - */ -struct drm_vc4_wait_seqno { - __u64 seqno; - __u64 timeout_ns; -}; - -/** - * struct drm_vc4_wait_bo - ioctl argument for waiting for - * completion of the last DRM_VC4_SUBMIT_CL on a BO. - * - * This is useful for cases where multiple processes might be - * rendering to a BO and you want to wait for all rendering to be - * completed. - */ -struct drm_vc4_wait_bo { - __u32 handle; - __u32 pad; - __u64 timeout_ns; -}; - -/** - * struct drm_vc4_create_bo - ioctl argument for creating VC4 BOs. - * - * There are currently no values for the flags argument, but it may be - * used in a future extension. - */ -struct drm_vc4_create_bo { - __u32 size; - __u32 flags; - /** Returned GEM handle for the BO. */ - __u32 handle; - __u32 pad; -}; - -/** - * struct drm_vc4_mmap_bo - ioctl argument for mapping VC4 BOs. - * - * This doesn't actually perform an mmap. Instead, it returns the - * offset you need to use in an mmap on the DRM device node. This - * means that tools like valgrind end up knowing about the mapped - * memory. - * - * There are currently no values for the flags argument, but it may be - * used in a future extension. - */ -struct drm_vc4_mmap_bo { - /** Handle for the object being mapped. */ - __u32 handle; - __u32 flags; - /** offset into the drm node to use for subsequent mmap call. */ - __u64 offset; -}; - -/** - * struct drm_vc4_create_shader_bo - ioctl argument for creating VC4 - * shader BOs. - * - * Since allowing a shader to be overwritten while it's also being - * executed from would allow privlege escalation, shaders must be - * created using this ioctl, and they can't be mmapped later. - */ -struct drm_vc4_create_shader_bo { - /* Size of the data argument. */ - __u32 size; - /* Flags, currently must be 0. */ - __u32 flags; - - /* Pointer to the data. */ - __u64 data; - - /** Returned GEM handle for the BO. */ - __u32 handle; - /* Pad, must be 0. */ - __u32 pad; -}; - -struct drm_vc4_get_hang_state_bo { - __u32 handle; - __u32 paddr; - __u32 size; - __u32 pad; -}; - -/** - * struct drm_vc4_hang_state - ioctl argument for collecting state - * from a GPU hang for analysis. -*/ -struct drm_vc4_get_hang_state { - /** Pointer to array of struct drm_vc4_get_hang_state_bo. */ - __u64 bo; - /** - * On input, the size of the bo array. Output is the number - * of bos to be returned. - */ - __u32 bo_count; - - __u32 start_bin, start_render; - - __u32 ct0ca, ct0ea; - __u32 ct1ca, ct1ea; - __u32 ct0cs, ct1cs; - __u32 ct0ra0, ct1ra0; - - __u32 bpca, bpcs; - __u32 bpoa, bpos; - - __u32 vpmbase; - - __u32 dbge; - __u32 fdbgo; - __u32 fdbgb; - __u32 fdbgr; - __u32 fdbgs; - __u32 errstat; - - /* Pad that we may save more registers into in the future. */ - __u32 pad[16]; -}; - -#define DRM_VC4_PARAM_V3D_IDENT0 0 -#define DRM_VC4_PARAM_V3D_IDENT1 1 -#define DRM_VC4_PARAM_V3D_IDENT2 2 -#define DRM_VC4_PARAM_SUPPORTS_BRANCHES 3 -#define DRM_VC4_PARAM_SUPPORTS_ETC1 4 -#define DRM_VC4_PARAM_SUPPORTS_THREADED_FS 5 -#define DRM_VC4_PARAM_SUPPORTS_FIXED_RCL_ORDER 6 -#define DRM_VC4_PARAM_SUPPORTS_MADVISE 7 -#define DRM_VC4_PARAM_SUPPORTS_PERFMON 8 - -struct drm_vc4_get_param { - __u32 param; - __u32 pad; - __u64 value; -}; - -struct drm_vc4_get_tiling { - __u32 handle; - __u32 flags; - __u64 modifier; -}; - -struct drm_vc4_set_tiling { - __u32 handle; - __u32 flags; - __u64 modifier; -}; - -/** - * struct drm_vc4_label_bo - Attach a name to a BO for debug purposes. - */ -struct drm_vc4_label_bo { - __u32 handle; - __u32 len; - __u64 name; -}; - -/* - * States prefixed with '__' are internal states and cannot be passed to the - * DRM_IOCTL_VC4_GEM_MADVISE ioctl. - */ -#define VC4_MADV_WILLNEED 0 -#define VC4_MADV_DONTNEED 1 -#define __VC4_MADV_PURGED 2 -#define __VC4_MADV_NOTSUPP 3 - -struct drm_vc4_gem_madvise { - __u32 handle; - __u32 madv; - __u32 retained; - __u32 pad; -}; - -enum { - VC4_PERFCNT_FEP_VALID_PRIMS_NO_RENDER, - VC4_PERFCNT_FEP_VALID_PRIMS_RENDER, - VC4_PERFCNT_FEP_CLIPPED_QUADS, - VC4_PERFCNT_FEP_VALID_QUADS, - VC4_PERFCNT_TLB_QUADS_NOT_PASSING_STENCIL, - VC4_PERFCNT_TLB_QUADS_NOT_PASSING_Z_AND_STENCIL, - VC4_PERFCNT_TLB_QUADS_PASSING_Z_AND_STENCIL, - VC4_PERFCNT_TLB_QUADS_ZERO_COVERAGE, - VC4_PERFCNT_TLB_QUADS_NON_ZERO_COVERAGE, - VC4_PERFCNT_TLB_QUADS_WRITTEN_TO_COLOR_BUF, - VC4_PERFCNT_PLB_PRIMS_OUTSIDE_VIEWPORT, - VC4_PERFCNT_PLB_PRIMS_NEED_CLIPPING, - VC4_PERFCNT_PSE_PRIMS_REVERSED, - VC4_PERFCNT_QPU_TOTAL_IDLE_CYCLES, - VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_VERTEX_COORD_SHADING, - VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_FRAGMENT_SHADING, - VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_EXEC_VALID_INST, - VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_WAITING_TMUS, - VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_WAITING_SCOREBOARD, - VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_WAITING_VARYINGS, - VC4_PERFCNT_QPU_TOTAL_INST_CACHE_HIT, - VC4_PERFCNT_QPU_TOTAL_INST_CACHE_MISS, - VC4_PERFCNT_QPU_TOTAL_UNIFORM_CACHE_HIT, - VC4_PERFCNT_QPU_TOTAL_UNIFORM_CACHE_MISS, - VC4_PERFCNT_TMU_TOTAL_TEXT_QUADS_PROCESSED, - VC4_PERFCNT_TMU_TOTAL_TEXT_CACHE_MISS, - VC4_PERFCNT_VPM_TOTAL_CLK_CYCLES_VDW_STALLED, - VC4_PERFCNT_VPM_TOTAL_CLK_CYCLES_VCD_STALLED, - VC4_PERFCNT_L2C_TOTAL_L2_CACHE_HIT, - VC4_PERFCNT_L2C_TOTAL_L2_CACHE_MISS, - VC4_PERFCNT_NUM_EVENTS, -}; - -#define DRM_VC4_MAX_PERF_COUNTERS 16 - -struct drm_vc4_perfmon_create { - __u32 id; - __u32 ncounters; - __u8 events[DRM_VC4_MAX_PERF_COUNTERS]; -}; - -struct drm_vc4_perfmon_destroy { - __u32 id; -}; - -/* - * Returns the values of the performance counters tracked by this - * perfmon (as an array of ncounters u64 values). - * - * No implicit synchronization is performed, so the user has to - * guarantee that any jobs using this perfmon have already been - * completed (probably by blocking on the seqno returned by the - * last exec that used the perfmon). - */ -struct drm_vc4_perfmon_get_values { - __u32 id; - __u64 values_ptr; -}; - -#if defined(__cplusplus) -} -#endif - -#endif /* _VC4_DRM_H_ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/vgem_drm.h b/lib/libc/include/generic-musl/drm/vgem_drm.h deleted file mode 100644 index f874b1b4eb..0000000000 --- a/lib/libc/include/generic-musl/drm/vgem_drm.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2016 Intel Corporation - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -#ifndef _VGEM_DRM_H_ -#define _VGEM_DRM_H_ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Please note that modifications to all structs defined here are - * subject to backwards-compatibility constraints. - */ -#define DRM_VGEM_FENCE_ATTACH 0x1 -#define DRM_VGEM_FENCE_SIGNAL 0x2 - -#define DRM_IOCTL_VGEM_FENCE_ATTACH DRM_IOWR( DRM_COMMAND_BASE + DRM_VGEM_FENCE_ATTACH, struct drm_vgem_fence_attach) -#define DRM_IOCTL_VGEM_FENCE_SIGNAL DRM_IOW( DRM_COMMAND_BASE + DRM_VGEM_FENCE_SIGNAL, struct drm_vgem_fence_signal) - -struct drm_vgem_fence_attach { - __u32 handle; - __u32 flags; -#define VGEM_FENCE_WRITE 0x1 - __u32 out_fence; - __u32 pad; -}; - -struct drm_vgem_fence_signal { - __u32 fence; - __u32 flags; -}; - -#if defined(__cplusplus) -} -#endif - -#endif /* _VGEM_DRM_H_ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/via_drm.h b/lib/libc/include/generic-musl/drm/via_drm.h deleted file mode 100644 index 8cfda08dd8..0000000000 --- a/lib/libc/include/generic-musl/drm/via_drm.h +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. - * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#ifndef _VIA_DRM_H_ -#define _VIA_DRM_H_ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* WARNING: These defines must be the same as what the Xserver uses. - * if you change them, you must change the defines in the Xserver. - */ - -#ifndef _VIA_DEFINES_ -#define _VIA_DEFINES_ - - -#define VIA_NR_SAREA_CLIPRECTS 8 -#define VIA_NR_XVMC_PORTS 10 -#define VIA_NR_XVMC_LOCKS 5 -#define VIA_MAX_CACHELINE_SIZE 64 -#define XVMCLOCKPTR(saPriv,lockNo) \ - ((__volatile__ struct drm_hw_lock *)(((((unsigned long) (saPriv)->XvMCLockArea) + \ - (VIA_MAX_CACHELINE_SIZE - 1)) & \ - ~(VIA_MAX_CACHELINE_SIZE - 1)) + \ - VIA_MAX_CACHELINE_SIZE*(lockNo))) - -/* Each region is a minimum of 64k, and there are at most 64 of them. - */ -#define VIA_NR_TEX_REGIONS 64 -#define VIA_LOG_MIN_TEX_REGION_SIZE 16 -#endif - -#define VIA_UPLOAD_TEX0IMAGE 0x1 /* handled clientside */ -#define VIA_UPLOAD_TEX1IMAGE 0x2 /* handled clientside */ -#define VIA_UPLOAD_CTX 0x4 -#define VIA_UPLOAD_BUFFERS 0x8 -#define VIA_UPLOAD_TEX0 0x10 -#define VIA_UPLOAD_TEX1 0x20 -#define VIA_UPLOAD_CLIPRECTS 0x40 -#define VIA_UPLOAD_ALL 0xff - -/* VIA specific ioctls */ -#define DRM_VIA_ALLOCMEM 0x00 -#define DRM_VIA_FREEMEM 0x01 -#define DRM_VIA_AGP_INIT 0x02 -#define DRM_VIA_FB_INIT 0x03 -#define DRM_VIA_MAP_INIT 0x04 -#define DRM_VIA_DEC_FUTEX 0x05 -#define NOT_USED -#define DRM_VIA_DMA_INIT 0x07 -#define DRM_VIA_CMDBUFFER 0x08 -#define DRM_VIA_FLUSH 0x09 -#define DRM_VIA_PCICMD 0x0a -#define DRM_VIA_CMDBUF_SIZE 0x0b -#define NOT_USED -#define DRM_VIA_WAIT_IRQ 0x0d -#define DRM_VIA_DMA_BLIT 0x0e -#define DRM_VIA_BLIT_SYNC 0x0f - -#define DRM_IOCTL_VIA_ALLOCMEM DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_ALLOCMEM, drm_via_mem_t) -#define DRM_IOCTL_VIA_FREEMEM DRM_IOW( DRM_COMMAND_BASE + DRM_VIA_FREEMEM, drm_via_mem_t) -#define DRM_IOCTL_VIA_AGP_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_AGP_INIT, drm_via_agp_t) -#define DRM_IOCTL_VIA_FB_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_FB_INIT, drm_via_fb_t) -#define DRM_IOCTL_VIA_MAP_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_MAP_INIT, drm_via_init_t) -#define DRM_IOCTL_VIA_DEC_FUTEX DRM_IOW( DRM_COMMAND_BASE + DRM_VIA_DEC_FUTEX, drm_via_futex_t) -#define DRM_IOCTL_VIA_DMA_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_DMA_INIT, drm_via_dma_init_t) -#define DRM_IOCTL_VIA_CMDBUFFER DRM_IOW( DRM_COMMAND_BASE + DRM_VIA_CMDBUFFER, drm_via_cmdbuffer_t) -#define DRM_IOCTL_VIA_FLUSH DRM_IO( DRM_COMMAND_BASE + DRM_VIA_FLUSH) -#define DRM_IOCTL_VIA_PCICMD DRM_IOW( DRM_COMMAND_BASE + DRM_VIA_PCICMD, drm_via_cmdbuffer_t) -#define DRM_IOCTL_VIA_CMDBUF_SIZE DRM_IOWR( DRM_COMMAND_BASE + DRM_VIA_CMDBUF_SIZE, \ - drm_via_cmdbuf_size_t) -#define DRM_IOCTL_VIA_WAIT_IRQ DRM_IOWR( DRM_COMMAND_BASE + DRM_VIA_WAIT_IRQ, drm_via_irqwait_t) -#define DRM_IOCTL_VIA_DMA_BLIT DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_DMA_BLIT, drm_via_dmablit_t) -#define DRM_IOCTL_VIA_BLIT_SYNC DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_BLIT_SYNC, drm_via_blitsync_t) - -/* Indices into buf.Setup where various bits of state are mirrored per - * context and per buffer. These can be fired at the card as a unit, - * or in a piecewise fashion as required. - */ - -#define VIA_TEX_SETUP_SIZE 8 - -/* Flags for clear ioctl - */ -#define VIA_FRONT 0x1 -#define VIA_BACK 0x2 -#define VIA_DEPTH 0x4 -#define VIA_STENCIL 0x8 -#define VIA_MEM_VIDEO 0 /* matches drm constant */ -#define VIA_MEM_AGP 1 /* matches drm constant */ -#define VIA_MEM_SYSTEM 2 -#define VIA_MEM_MIXED 3 -#define VIA_MEM_UNKNOWN 4 - -typedef struct { - __u32 offset; - __u32 size; -} drm_via_agp_t; - -typedef struct { - __u32 offset; - __u32 size; -} drm_via_fb_t; - -typedef struct { - __u32 context; - __u32 type; - __u32 size; - unsigned long index; - unsigned long offset; -} drm_via_mem_t; - -typedef struct _drm_via_init { - enum { - VIA_INIT_MAP = 0x01, - VIA_CLEANUP_MAP = 0x02 - } func; - - unsigned long sarea_priv_offset; - unsigned long fb_offset; - unsigned long mmio_offset; - unsigned long agpAddr; -} drm_via_init_t; - -typedef struct _drm_via_futex { - enum { - VIA_FUTEX_WAIT = 0x00, - VIA_FUTEX_WAKE = 0X01 - } func; - __u32 ms; - __u32 lock; - __u32 val; -} drm_via_futex_t; - -typedef struct _drm_via_dma_init { - enum { - VIA_INIT_DMA = 0x01, - VIA_CLEANUP_DMA = 0x02, - VIA_DMA_INITIALIZED = 0x03 - } func; - - unsigned long offset; - unsigned long size; - unsigned long reg_pause_addr; -} drm_via_dma_init_t; - -typedef struct _drm_via_cmdbuffer { - char *buf; - unsigned long size; -} drm_via_cmdbuffer_t; - -/* Warning: If you change the SAREA structure you must change the Xserver - * structure as well */ - -typedef struct _drm_via_tex_region { - unsigned char next, prev; /* indices to form a circular LRU */ - unsigned char inUse; /* owned by a client, or free? */ - int age; /* tracked by clients to update local LRU's */ -} drm_via_tex_region_t; - -typedef struct _drm_via_sarea { - unsigned int dirty; - unsigned int nbox; - struct drm_clip_rect boxes[VIA_NR_SAREA_CLIPRECTS]; - drm_via_tex_region_t texList[VIA_NR_TEX_REGIONS + 1]; - int texAge; /* last time texture was uploaded */ - int ctxOwner; /* last context to upload state */ - int vertexPrim; - - /* - * Below is for XvMC. - * We want the lock integers alone on, and aligned to, a cache line. - * Therefore this somewhat strange construct. - */ - - char XvMCLockArea[VIA_MAX_CACHELINE_SIZE * (VIA_NR_XVMC_LOCKS + 1)]; - - unsigned int XvMCDisplaying[VIA_NR_XVMC_PORTS]; - unsigned int XvMCSubPicOn[VIA_NR_XVMC_PORTS]; - unsigned int XvMCCtxNoGrabbed; /* Last context to hold decoder */ - - /* Used by the 3d driver only at this point, for pageflipping: - */ - unsigned int pfCurrentOffset; -} drm_via_sarea_t; - -typedef struct _drm_via_cmdbuf_size { - enum { - VIA_CMDBUF_SPACE = 0x01, - VIA_CMDBUF_LAG = 0x02 - } func; - int wait; - __u32 size; -} drm_via_cmdbuf_size_t; - -typedef enum { - VIA_IRQ_ABSOLUTE = 0x0, - VIA_IRQ_RELATIVE = 0x1, - VIA_IRQ_SIGNAL = 0x10000000, - VIA_IRQ_FORCE_SEQUENCE = 0x20000000 -} via_irq_seq_type_t; - -#define VIA_IRQ_FLAGS_MASK 0xF0000000 - -enum drm_via_irqs { - drm_via_irq_hqv0 = 0, - drm_via_irq_hqv1, - drm_via_irq_dma0_dd, - drm_via_irq_dma0_td, - drm_via_irq_dma1_dd, - drm_via_irq_dma1_td, - drm_via_irq_num -}; - -struct drm_via_wait_irq_request { - unsigned irq; - via_irq_seq_type_t type; - __u32 sequence; - __u32 signal; -}; - -typedef union drm_via_irqwait { - struct drm_via_wait_irq_request request; - struct drm_wait_vblank_reply reply; -} drm_via_irqwait_t; - -typedef struct drm_via_blitsync { - __u32 sync_handle; - unsigned engine; -} drm_via_blitsync_t; - -/* - * Below,"flags" is currently unused but will be used for possible future - * extensions like kernel space bounce buffers for bad alignments and - * blit engine busy-wait polling for better latency in the absence of - * interrupts. - */ - -typedef struct drm_via_dmablit { - __u32 num_lines; - __u32 line_length; - - __u32 fb_addr; - __u32 fb_stride; - - unsigned char *mem_addr; - __u32 mem_stride; - - __u32 flags; - int to_fb; - - drm_via_blitsync_t sync; -} drm_via_dmablit_t; - -#if defined(__cplusplus) -} -#endif - -#endif /* _VIA_DRM_H_ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/virtgpu_drm.h b/lib/libc/include/generic-musl/drm/virtgpu_drm.h deleted file mode 100644 index 0c2073bca9..0000000000 --- a/lib/libc/include/generic-musl/drm/virtgpu_drm.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright 2013 Red Hat - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ -#ifndef VIRTGPU_DRM_H -#define VIRTGPU_DRM_H - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Please note that modifications to all structs defined here are - * subject to backwards-compatibility constraints. - * - * Do not use pointers, use __u64 instead for 32 bit / 64 bit user/kernel - * compatibility Keep fields aligned to their size - */ - -#define DRM_VIRTGPU_MAP 0x01 -#define DRM_VIRTGPU_EXECBUFFER 0x02 -#define DRM_VIRTGPU_GETPARAM 0x03 -#define DRM_VIRTGPU_RESOURCE_CREATE 0x04 -#define DRM_VIRTGPU_RESOURCE_INFO 0x05 -#define DRM_VIRTGPU_TRANSFER_FROM_HOST 0x06 -#define DRM_VIRTGPU_TRANSFER_TO_HOST 0x07 -#define DRM_VIRTGPU_WAIT 0x08 -#define DRM_VIRTGPU_GET_CAPS 0x09 - -struct drm_virtgpu_map { - __u64 offset; /* use for mmap system call */ - __u32 handle; - __u32 pad; -}; - -struct drm_virtgpu_execbuffer { - __u32 flags; /* for future use */ - __u32 size; - __u64 command; /* void* */ - __u64 bo_handles; - __u32 num_bo_handles; - __u32 pad; -}; - -#define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */ -#define VIRTGPU_PARAM_CAPSET_QUERY_FIX 2 /* do we have the capset fix */ - -struct drm_virtgpu_getparam { - __u64 param; - __u64 value; -}; - -/* NO_BO flags? NO resource flag? */ -/* resource flag for y_0_top */ -struct drm_virtgpu_resource_create { - __u32 target; - __u32 format; - __u32 bind; - __u32 width; - __u32 height; - __u32 depth; - __u32 array_size; - __u32 last_level; - __u32 nr_samples; - __u32 flags; - __u32 bo_handle; /* if this is set - recreate a new resource attached to this bo ? */ - __u32 res_handle; /* returned by kernel */ - __u32 size; /* validate transfer in the host */ - __u32 stride; /* validate transfer in the host */ -}; - -struct drm_virtgpu_resource_info { - __u32 bo_handle; - __u32 res_handle; - __u32 size; - __u32 stride; -}; - -struct drm_virtgpu_3d_box { - __u32 x; - __u32 y; - __u32 z; - __u32 w; - __u32 h; - __u32 d; -}; - -struct drm_virtgpu_3d_transfer_to_host { - __u32 bo_handle; - struct drm_virtgpu_3d_box box; - __u32 level; - __u32 offset; -}; - -struct drm_virtgpu_3d_transfer_from_host { - __u32 bo_handle; - struct drm_virtgpu_3d_box box; - __u32 level; - __u32 offset; -}; - -#define VIRTGPU_WAIT_NOWAIT 1 /* like it */ -struct drm_virtgpu_3d_wait { - __u32 handle; /* 0 is an invalid handle */ - __u32 flags; -}; - -struct drm_virtgpu_get_caps { - __u32 cap_set_id; - __u32 cap_set_ver; - __u64 addr; - __u32 size; - __u32 pad; -}; - -#define DRM_IOCTL_VIRTGPU_MAP \ - DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map) - -#define DRM_IOCTL_VIRTGPU_EXECBUFFER \ - DRM_IOW(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\ - struct drm_virtgpu_execbuffer) - -#define DRM_IOCTL_VIRTGPU_GETPARAM \ - DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GETPARAM,\ - struct drm_virtgpu_getparam) - -#define DRM_IOCTL_VIRTGPU_RESOURCE_CREATE \ - DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_CREATE, \ - struct drm_virtgpu_resource_create) - -#define DRM_IOCTL_VIRTGPU_RESOURCE_INFO \ - DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_INFO, \ - struct drm_virtgpu_resource_info) - -#define DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST \ - DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_FROM_HOST, \ - struct drm_virtgpu_3d_transfer_from_host) - -#define DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST \ - DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_TO_HOST, \ - struct drm_virtgpu_3d_transfer_to_host) - -#define DRM_IOCTL_VIRTGPU_WAIT \ - DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_WAIT, \ - struct drm_virtgpu_3d_wait) - -#define DRM_IOCTL_VIRTGPU_GET_CAPS \ - DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GET_CAPS, \ - struct drm_virtgpu_get_caps) - -#if defined(__cplusplus) -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/drm/vmwgfx_drm.h b/lib/libc/include/generic-musl/drm/vmwgfx_drm.h deleted file mode 100644 index 92eea6af39..0000000000 --- a/lib/libc/include/generic-musl/drm/vmwgfx_drm.h +++ /dev/null @@ -1,1218 +0,0 @@ -/************************************************************************** - * - * Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef __VMWGFX_DRM_H__ -#define __VMWGFX_DRM_H__ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#define DRM_VMW_MAX_SURFACE_FACES 6 -#define DRM_VMW_MAX_MIP_LEVELS 24 - - -#define DRM_VMW_GET_PARAM 0 -#define DRM_VMW_ALLOC_DMABUF 1 -#define DRM_VMW_ALLOC_BO 1 -#define DRM_VMW_UNREF_DMABUF 2 -#define DRM_VMW_HANDLE_CLOSE 2 -#define DRM_VMW_CURSOR_BYPASS 3 -/* guarded by DRM_VMW_PARAM_NUM_STREAMS != 0*/ -#define DRM_VMW_CONTROL_STREAM 4 -#define DRM_VMW_CLAIM_STREAM 5 -#define DRM_VMW_UNREF_STREAM 6 -/* guarded by DRM_VMW_PARAM_3D == 1 */ -#define DRM_VMW_CREATE_CONTEXT 7 -#define DRM_VMW_UNREF_CONTEXT 8 -#define DRM_VMW_CREATE_SURFACE 9 -#define DRM_VMW_UNREF_SURFACE 10 -#define DRM_VMW_REF_SURFACE 11 -#define DRM_VMW_EXECBUF 12 -#define DRM_VMW_GET_3D_CAP 13 -#define DRM_VMW_FENCE_WAIT 14 -#define DRM_VMW_FENCE_SIGNALED 15 -#define DRM_VMW_FENCE_UNREF 16 -#define DRM_VMW_FENCE_EVENT 17 -#define DRM_VMW_PRESENT 18 -#define DRM_VMW_PRESENT_READBACK 19 -#define DRM_VMW_UPDATE_LAYOUT 20 -#define DRM_VMW_CREATE_SHADER 21 -#define DRM_VMW_UNREF_SHADER 22 -#define DRM_VMW_GB_SURFACE_CREATE 23 -#define DRM_VMW_GB_SURFACE_REF 24 -#define DRM_VMW_SYNCCPU 25 -#define DRM_VMW_CREATE_EXTENDED_CONTEXT 26 -#define DRM_VMW_GB_SURFACE_CREATE_EXT 27 -#define DRM_VMW_GB_SURFACE_REF_EXT 28 - -/*************************************************************************/ -/** - * DRM_VMW_GET_PARAM - get device information. - * - * DRM_VMW_PARAM_FIFO_OFFSET: - * Offset to use to map the first page of the FIFO read-only. - * The fifo is mapped using the mmap() system call on the drm device. - * - * DRM_VMW_PARAM_OVERLAY_IOCTL: - * Does the driver support the overlay ioctl. - * - * DRM_VMW_PARAM_SM4_1 - * SM4_1 support is enabled. - */ - -#define DRM_VMW_PARAM_NUM_STREAMS 0 -#define DRM_VMW_PARAM_NUM_FREE_STREAMS 1 -#define DRM_VMW_PARAM_3D 2 -#define DRM_VMW_PARAM_HW_CAPS 3 -#define DRM_VMW_PARAM_FIFO_CAPS 4 -#define DRM_VMW_PARAM_MAX_FB_SIZE 5 -#define DRM_VMW_PARAM_FIFO_HW_VERSION 6 -#define DRM_VMW_PARAM_MAX_SURF_MEMORY 7 -#define DRM_VMW_PARAM_3D_CAPS_SIZE 8 -#define DRM_VMW_PARAM_MAX_MOB_MEMORY 9 -#define DRM_VMW_PARAM_MAX_MOB_SIZE 10 -#define DRM_VMW_PARAM_SCREEN_TARGET 11 -#define DRM_VMW_PARAM_DX 12 -#define DRM_VMW_PARAM_HW_CAPS2 13 -#define DRM_VMW_PARAM_SM4_1 14 - -/** - * enum drm_vmw_handle_type - handle type for ref ioctls - * - */ -enum drm_vmw_handle_type { - DRM_VMW_HANDLE_LEGACY = 0, - DRM_VMW_HANDLE_PRIME = 1 -}; - -/** - * struct drm_vmw_getparam_arg - * - * @value: Returned value. //Out - * @param: Parameter to query. //In. - * - * Argument to the DRM_VMW_GET_PARAM Ioctl. - */ - -struct drm_vmw_getparam_arg { - __u64 value; - __u32 param; - __u32 pad64; -}; - -/*************************************************************************/ -/** - * DRM_VMW_CREATE_CONTEXT - Create a host context. - * - * Allocates a device unique context id, and queues a create context command - * for the host. Does not wait for host completion. - */ - -/** - * struct drm_vmw_context_arg - * - * @cid: Device unique context ID. - * - * Output argument to the DRM_VMW_CREATE_CONTEXT Ioctl. - * Input argument to the DRM_VMW_UNREF_CONTEXT Ioctl. - */ - -struct drm_vmw_context_arg { - __s32 cid; - __u32 pad64; -}; - -/*************************************************************************/ -/** - * DRM_VMW_UNREF_CONTEXT - Create a host context. - * - * Frees a global context id, and queues a destroy host command for the host. - * Does not wait for host completion. The context ID can be used directly - * in the command stream and shows up as the same context ID on the host. - */ - -/*************************************************************************/ -/** - * DRM_VMW_CREATE_SURFACE - Create a host suface. - * - * Allocates a device unique surface id, and queues a create surface command - * for the host. Does not wait for host completion. The surface ID can be - * used directly in the command stream and shows up as the same surface - * ID on the host. - */ - -/** - * struct drm_wmv_surface_create_req - * - * @flags: Surface flags as understood by the host. - * @format: Surface format as understood by the host. - * @mip_levels: Number of mip levels for each face. - * An unused face should have 0 encoded. - * @size_addr: Address of a user-space array of sruct drm_vmw_size - * cast to an __u64 for 32-64 bit compatibility. - * The size of the array should equal the total number of mipmap levels. - * @shareable: Boolean whether other clients (as identified by file descriptors) - * may reference this surface. - * @scanout: Boolean whether the surface is intended to be used as a - * scanout. - * - * Input data to the DRM_VMW_CREATE_SURFACE Ioctl. - * Output data from the DRM_VMW_REF_SURFACE Ioctl. - */ - -struct drm_vmw_surface_create_req { - __u32 flags; - __u32 format; - __u32 mip_levels[DRM_VMW_MAX_SURFACE_FACES]; - __u64 size_addr; - __s32 shareable; - __s32 scanout; -}; - -/** - * struct drm_wmv_surface_arg - * - * @sid: Surface id of created surface or surface to destroy or reference. - * @handle_type: Handle type for DRM_VMW_REF_SURFACE Ioctl. - * - * Output data from the DRM_VMW_CREATE_SURFACE Ioctl. - * Input argument to the DRM_VMW_UNREF_SURFACE Ioctl. - * Input argument to the DRM_VMW_REF_SURFACE Ioctl. - */ - -struct drm_vmw_surface_arg { - __s32 sid; - enum drm_vmw_handle_type handle_type; -}; - -/** - * struct drm_vmw_size ioctl. - * - * @width - mip level width - * @height - mip level height - * @depth - mip level depth - * - * Description of a mip level. - * Input data to the DRM_WMW_CREATE_SURFACE Ioctl. - */ - -struct drm_vmw_size { - __u32 width; - __u32 height; - __u32 depth; - __u32 pad64; -}; - -/** - * union drm_vmw_surface_create_arg - * - * @rep: Output data as described above. - * @req: Input data as described above. - * - * Argument to the DRM_VMW_CREATE_SURFACE Ioctl. - */ - -union drm_vmw_surface_create_arg { - struct drm_vmw_surface_arg rep; - struct drm_vmw_surface_create_req req; -}; - -/*************************************************************************/ -/** - * DRM_VMW_REF_SURFACE - Reference a host surface. - * - * Puts a reference on a host surface with a give sid, as previously - * returned by the DRM_VMW_CREATE_SURFACE ioctl. - * A reference will make sure the surface isn't destroyed while we hold - * it and will allow the calling client to use the surface ID in the command - * stream. - * - * On successful return, the Ioctl returns the surface information given - * in the DRM_VMW_CREATE_SURFACE ioctl. - */ - -/** - * union drm_vmw_surface_reference_arg - * - * @rep: Output data as described above. - * @req: Input data as described above. - * - * Argument to the DRM_VMW_REF_SURFACE Ioctl. - */ - -union drm_vmw_surface_reference_arg { - struct drm_vmw_surface_create_req rep; - struct drm_vmw_surface_arg req; -}; - -/*************************************************************************/ -/** - * DRM_VMW_UNREF_SURFACE - Unreference a host surface. - * - * Clear a reference previously put on a host surface. - * When all references are gone, including the one implicitly placed - * on creation, - * a destroy surface command will be queued for the host. - * Does not wait for completion. - */ - -/*************************************************************************/ -/** - * DRM_VMW_EXECBUF - * - * Submit a command buffer for execution on the host, and return a - * fence seqno that when signaled, indicates that the command buffer has - * executed. - */ - -/** - * struct drm_vmw_execbuf_arg - * - * @commands: User-space address of a command buffer cast to an __u64. - * @command-size: Size in bytes of the command buffer. - * @throttle-us: Sleep until software is less than @throttle_us - * microseconds ahead of hardware. The driver may round this value - * to the nearest kernel tick. - * @fence_rep: User-space address of a struct drm_vmw_fence_rep cast to an - * __u64. - * @version: Allows expanding the execbuf ioctl parameters without breaking - * backwards compatibility, since user-space will always tell the kernel - * which version it uses. - * @flags: Execbuf flags. - * @imported_fence_fd: FD for a fence imported from another device - * - * Argument to the DRM_VMW_EXECBUF Ioctl. - */ - -#define DRM_VMW_EXECBUF_VERSION 2 - -#define DRM_VMW_EXECBUF_FLAG_IMPORT_FENCE_FD (1 << 0) -#define DRM_VMW_EXECBUF_FLAG_EXPORT_FENCE_FD (1 << 1) - -struct drm_vmw_execbuf_arg { - __u64 commands; - __u32 command_size; - __u32 throttle_us; - __u64 fence_rep; - __u32 version; - __u32 flags; - __u32 context_handle; - __s32 imported_fence_fd; -}; - -/** - * struct drm_vmw_fence_rep - * - * @handle: Fence object handle for fence associated with a command submission. - * @mask: Fence flags relevant for this fence object. - * @seqno: Fence sequence number in fifo. A fence object with a lower - * seqno will signal the EXEC flag before a fence object with a higher - * seqno. This can be used by user-space to avoid kernel calls to determine - * whether a fence has signaled the EXEC flag. Note that @seqno will - * wrap at 32-bit. - * @passed_seqno: The highest seqno number processed by the hardware - * so far. This can be used to mark user-space fence objects as signaled, and - * to determine whether a fence seqno might be stale. - * @fd: FD associated with the fence, -1 if not exported - * @error: This member should've been set to -EFAULT on submission. - * The following actions should be take on completion: - * error == -EFAULT: Fence communication failed. The host is synchronized. - * Use the last fence id read from the FIFO fence register. - * error != 0 && error != -EFAULT: - * Fence submission failed. The host is synchronized. Use the fence_seq member. - * error == 0: All is OK, The host may not be synchronized. - * Use the fence_seq member. - * - * Input / Output data to the DRM_VMW_EXECBUF Ioctl. - */ - -struct drm_vmw_fence_rep { - __u32 handle; - __u32 mask; - __u32 seqno; - __u32 passed_seqno; - __s32 fd; - __s32 error; -}; - -/*************************************************************************/ -/** - * DRM_VMW_ALLOC_BO - * - * Allocate a buffer object that is visible also to the host. - * NOTE: The buffer is - * identified by a handle and an offset, which are private to the guest, but - * useable in the command stream. The guest kernel may translate these - * and patch up the command stream accordingly. In the future, the offset may - * be zero at all times, or it may disappear from the interface before it is - * fixed. - * - * The buffer object may stay user-space mapped in the guest at all times, - * and is thus suitable for sub-allocation. - * - * Buffer objects are mapped using the mmap() syscall on the drm device. - */ - -/** - * struct drm_vmw_alloc_bo_req - * - * @size: Required minimum size of the buffer. - * - * Input data to the DRM_VMW_ALLOC_BO Ioctl. - */ - -struct drm_vmw_alloc_bo_req { - __u32 size; - __u32 pad64; -}; -#define drm_vmw_alloc_dmabuf_req drm_vmw_alloc_bo_req - -/** - * struct drm_vmw_bo_rep - * - * @map_handle: Offset to use in the mmap() call used to map the buffer. - * @handle: Handle unique to this buffer. Used for unreferencing. - * @cur_gmr_id: GMR id to use in the command stream when this buffer is - * referenced. See not above. - * @cur_gmr_offset: Offset to use in the command stream when this buffer is - * referenced. See note above. - * - * Output data from the DRM_VMW_ALLOC_BO Ioctl. - */ - -struct drm_vmw_bo_rep { - __u64 map_handle; - __u32 handle; - __u32 cur_gmr_id; - __u32 cur_gmr_offset; - __u32 pad64; -}; -#define drm_vmw_dmabuf_rep drm_vmw_bo_rep - -/** - * union drm_vmw_alloc_bo_arg - * - * @req: Input data as described above. - * @rep: Output data as described above. - * - * Argument to the DRM_VMW_ALLOC_BO Ioctl. - */ - -union drm_vmw_alloc_bo_arg { - struct drm_vmw_alloc_bo_req req; - struct drm_vmw_bo_rep rep; -}; -#define drm_vmw_alloc_dmabuf_arg drm_vmw_alloc_bo_arg - -/*************************************************************************/ -/** - * DRM_VMW_CONTROL_STREAM - Control overlays, aka streams. - * - * This IOCTL controls the overlay units of the svga device. - * The SVGA overlay units does not work like regular hardware units in - * that they do not automaticaly read back the contents of the given dma - * buffer. But instead only read back for each call to this ioctl, and - * at any point between this call being made and a following call that - * either changes the buffer or disables the stream. - */ - -/** - * struct drm_vmw_rect - * - * Defines a rectangle. Used in the overlay ioctl to define - * source and destination rectangle. - */ - -struct drm_vmw_rect { - __s32 x; - __s32 y; - __u32 w; - __u32 h; -}; - -/** - * struct drm_vmw_control_stream_arg - * - * @stream_id: Stearm to control - * @enabled: If false all following arguments are ignored. - * @handle: Handle to buffer for getting data from. - * @format: Format of the overlay as understood by the host. - * @width: Width of the overlay. - * @height: Height of the overlay. - * @size: Size of the overlay in bytes. - * @pitch: Array of pitches, the two last are only used for YUV12 formats. - * @offset: Offset from start of dma buffer to overlay. - * @src: Source rect, must be within the defined area above. - * @dst: Destination rect, x and y may be negative. - * - * Argument to the DRM_VMW_CONTROL_STREAM Ioctl. - */ - -struct drm_vmw_control_stream_arg { - __u32 stream_id; - __u32 enabled; - - __u32 flags; - __u32 color_key; - - __u32 handle; - __u32 offset; - __s32 format; - __u32 size; - __u32 width; - __u32 height; - __u32 pitch[3]; - - __u32 pad64; - struct drm_vmw_rect src; - struct drm_vmw_rect dst; -}; - -/*************************************************************************/ -/** - * DRM_VMW_CURSOR_BYPASS - Give extra information about cursor bypass. - * - */ - -#define DRM_VMW_CURSOR_BYPASS_ALL (1 << 0) -#define DRM_VMW_CURSOR_BYPASS_FLAGS (1) - -/** - * struct drm_vmw_cursor_bypass_arg - * - * @flags: Flags. - * @crtc_id: Crtc id, only used if DMR_CURSOR_BYPASS_ALL isn't passed. - * @xpos: X position of cursor. - * @ypos: Y position of cursor. - * @xhot: X hotspot. - * @yhot: Y hotspot. - * - * Argument to the DRM_VMW_CURSOR_BYPASS Ioctl. - */ - -struct drm_vmw_cursor_bypass_arg { - __u32 flags; - __u32 crtc_id; - __s32 xpos; - __s32 ypos; - __s32 xhot; - __s32 yhot; -}; - -/*************************************************************************/ -/** - * DRM_VMW_CLAIM_STREAM - Claim a single stream. - */ - -/** - * struct drm_vmw_context_arg - * - * @stream_id: Device unique context ID. - * - * Output argument to the DRM_VMW_CREATE_CONTEXT Ioctl. - * Input argument to the DRM_VMW_UNREF_CONTEXT Ioctl. - */ - -struct drm_vmw_stream_arg { - __u32 stream_id; - __u32 pad64; -}; - -/*************************************************************************/ -/** - * DRM_VMW_UNREF_STREAM - Unclaim a stream. - * - * Return a single stream that was claimed by this process. Also makes - * sure that the stream has been stopped. - */ - -/*************************************************************************/ -/** - * DRM_VMW_GET_3D_CAP - * - * Read 3D capabilities from the FIFO - * - */ - -/** - * struct drm_vmw_get_3d_cap_arg - * - * @buffer: Pointer to a buffer for capability data, cast to an __u64 - * @size: Max size to copy - * - * Input argument to the DRM_VMW_GET_3D_CAP_IOCTL - * ioctls. - */ - -struct drm_vmw_get_3d_cap_arg { - __u64 buffer; - __u32 max_size; - __u32 pad64; -}; - -/*************************************************************************/ -/** - * DRM_VMW_FENCE_WAIT - * - * Waits for a fence object to signal. The wait is interruptible, so that - * signals may be delivered during the interrupt. The wait may timeout, - * in which case the calls returns -EBUSY. If the wait is restarted, - * that is restarting without resetting @cookie_valid to zero, - * the timeout is computed from the first call. - * - * The flags argument to the DRM_VMW_FENCE_WAIT ioctl indicates what to wait - * on: - * DRM_VMW_FENCE_FLAG_EXEC: All commands ahead of the fence in the command - * stream - * have executed. - * DRM_VMW_FENCE_FLAG_QUERY: All query results resulting from query finish - * commands - * in the buffer given to the EXECBUF ioctl returning the fence object handle - * are available to user-space. - * - * DRM_VMW_WAIT_OPTION_UNREF: If this wait option is given, and the - * fenc wait ioctl returns 0, the fence object has been unreferenced after - * the wait. - */ - -#define DRM_VMW_FENCE_FLAG_EXEC (1 << 0) -#define DRM_VMW_FENCE_FLAG_QUERY (1 << 1) - -#define DRM_VMW_WAIT_OPTION_UNREF (1 << 0) - -/** - * struct drm_vmw_fence_wait_arg - * - * @handle: Fence object handle as returned by the DRM_VMW_EXECBUF ioctl. - * @cookie_valid: Must be reset to 0 on first call. Left alone on restart. - * @kernel_cookie: Set to 0 on first call. Left alone on restart. - * @timeout_us: Wait timeout in microseconds. 0 for indefinite timeout. - * @lazy: Set to 1 if timing is not critical. Allow more than a kernel tick - * before returning. - * @flags: Fence flags to wait on. - * @wait_options: Options that control the behaviour of the wait ioctl. - * - * Input argument to the DRM_VMW_FENCE_WAIT ioctl. - */ - -struct drm_vmw_fence_wait_arg { - __u32 handle; - __s32 cookie_valid; - __u64 kernel_cookie; - __u64 timeout_us; - __s32 lazy; - __s32 flags; - __s32 wait_options; - __s32 pad64; -}; - -/*************************************************************************/ -/** - * DRM_VMW_FENCE_SIGNALED - * - * Checks if a fence object is signaled.. - */ - -/** - * struct drm_vmw_fence_signaled_arg - * - * @handle: Fence object handle as returned by the DRM_VMW_EXECBUF ioctl. - * @flags: Fence object flags input to DRM_VMW_FENCE_SIGNALED ioctl - * @signaled: Out: Flags signaled. - * @sequence: Out: Highest sequence passed so far. Can be used to signal the - * EXEC flag of user-space fence objects. - * - * Input/Output argument to the DRM_VMW_FENCE_SIGNALED and DRM_VMW_FENCE_UNREF - * ioctls. - */ - -struct drm_vmw_fence_signaled_arg { - __u32 handle; - __u32 flags; - __s32 signaled; - __u32 passed_seqno; - __u32 signaled_flags; - __u32 pad64; -}; - -/*************************************************************************/ -/** - * DRM_VMW_FENCE_UNREF - * - * Unreferences a fence object, and causes it to be destroyed if there are no - * other references to it. - * - */ - -/** - * struct drm_vmw_fence_arg - * - * @handle: Fence object handle as returned by the DRM_VMW_EXECBUF ioctl. - * - * Input/Output argument to the DRM_VMW_FENCE_UNREF ioctl.. - */ - -struct drm_vmw_fence_arg { - __u32 handle; - __u32 pad64; -}; - - -/*************************************************************************/ -/** - * DRM_VMW_FENCE_EVENT - * - * Queues an event on a fence to be delivered on the drm character device - * when the fence has signaled the DRM_VMW_FENCE_FLAG_EXEC flag. - * Optionally the approximate time when the fence signaled is - * given by the event. - */ - -/* - * The event type - */ -#define DRM_VMW_EVENT_FENCE_SIGNALED 0x80000000 - -struct drm_vmw_event_fence { - struct drm_event base; - __u64 user_data; - __u32 tv_sec; - __u32 tv_usec; -}; - -/* - * Flags that may be given to the command. - */ -/* Request fence signaled time on the event. */ -#define DRM_VMW_FE_FLAG_REQ_TIME (1 << 0) - -/** - * struct drm_vmw_fence_event_arg - * - * @fence_rep: Pointer to fence_rep structure cast to __u64 or 0 if - * the fence is not supposed to be referenced by user-space. - * @user_info: Info to be delivered with the event. - * @handle: Attach the event to this fence only. - * @flags: A set of flags as defined above. - */ -struct drm_vmw_fence_event_arg { - __u64 fence_rep; - __u64 user_data; - __u32 handle; - __u32 flags; -}; - - -/*************************************************************************/ -/** - * DRM_VMW_PRESENT - * - * Executes an SVGA present on a given fb for a given surface. The surface - * is placed on the framebuffer. Cliprects are given relative to the given - * point (the point disignated by dest_{x|y}). - * - */ - -/** - * struct drm_vmw_present_arg - * @fb_id: framebuffer id to present / read back from. - * @sid: Surface id to present from. - * @dest_x: X placement coordinate for surface. - * @dest_y: Y placement coordinate for surface. - * @clips_ptr: Pointer to an array of clip rects cast to an __u64. - * @num_clips: Number of cliprects given relative to the framebuffer origin, - * in the same coordinate space as the frame buffer. - * @pad64: Unused 64-bit padding. - * - * Input argument to the DRM_VMW_PRESENT ioctl. - */ - -struct drm_vmw_present_arg { - __u32 fb_id; - __u32 sid; - __s32 dest_x; - __s32 dest_y; - __u64 clips_ptr; - __u32 num_clips; - __u32 pad64; -}; - - -/*************************************************************************/ -/** - * DRM_VMW_PRESENT_READBACK - * - * Executes an SVGA present readback from a given fb to the dma buffer - * currently bound as the fb. If there is no dma buffer bound to the fb, - * an error will be returned. - * - */ - -/** - * struct drm_vmw_present_arg - * @fb_id: fb_id to present / read back from. - * @num_clips: Number of cliprects. - * @clips_ptr: Pointer to an array of clip rects cast to an __u64. - * @fence_rep: Pointer to a struct drm_vmw_fence_rep, cast to an __u64. - * If this member is NULL, then the ioctl should not return a fence. - */ - -struct drm_vmw_present_readback_arg { - __u32 fb_id; - __u32 num_clips; - __u64 clips_ptr; - __u64 fence_rep; -}; - -/*************************************************************************/ -/** - * DRM_VMW_UPDATE_LAYOUT - Update layout - * - * Updates the preferred modes and connection status for connectors. The - * command consists of one drm_vmw_update_layout_arg pointing to an array - * of num_outputs drm_vmw_rect's. - */ - -/** - * struct drm_vmw_update_layout_arg - * - * @num_outputs: number of active connectors - * @rects: pointer to array of drm_vmw_rect cast to an __u64 - * - * Input argument to the DRM_VMW_UPDATE_LAYOUT Ioctl. - */ -struct drm_vmw_update_layout_arg { - __u32 num_outputs; - __u32 pad64; - __u64 rects; -}; - - -/*************************************************************************/ -/** - * DRM_VMW_CREATE_SHADER - Create shader - * - * Creates a shader and optionally binds it to a dma buffer containing - * the shader byte-code. - */ - -/** - * enum drm_vmw_shader_type - Shader types - */ -enum drm_vmw_shader_type { - drm_vmw_shader_type_vs = 0, - drm_vmw_shader_type_ps, -}; - - -/** - * struct drm_vmw_shader_create_arg - * - * @shader_type: Shader type of the shader to create. - * @size: Size of the byte-code in bytes. - * where the shader byte-code starts - * @buffer_handle: Buffer handle identifying the buffer containing the - * shader byte-code - * @shader_handle: On successful completion contains a handle that - * can be used to subsequently identify the shader. - * @offset: Offset in bytes into the buffer given by @buffer_handle, - * - * Input / Output argument to the DRM_VMW_CREATE_SHADER Ioctl. - */ -struct drm_vmw_shader_create_arg { - enum drm_vmw_shader_type shader_type; - __u32 size; - __u32 buffer_handle; - __u32 shader_handle; - __u64 offset; -}; - -/*************************************************************************/ -/** - * DRM_VMW_UNREF_SHADER - Unreferences a shader - * - * Destroys a user-space reference to a shader, optionally destroying - * it. - */ - -/** - * struct drm_vmw_shader_arg - * - * @handle: Handle identifying the shader to destroy. - * - * Input argument to the DRM_VMW_UNREF_SHADER ioctl. - */ -struct drm_vmw_shader_arg { - __u32 handle; - __u32 pad64; -}; - -/*************************************************************************/ -/** - * DRM_VMW_GB_SURFACE_CREATE - Create a host guest-backed surface. - * - * Allocates a surface handle and queues a create surface command - * for the host on the first use of the surface. The surface ID can - * be used as the surface ID in commands referencing the surface. - */ - -/** - * enum drm_vmw_surface_flags - * - * @drm_vmw_surface_flag_shareable: Whether the surface is shareable - * @drm_vmw_surface_flag_scanout: Whether the surface is a scanout - * surface. - * @drm_vmw_surface_flag_create_buffer: Create a backup buffer if none is - * given. - */ -enum drm_vmw_surface_flags { - drm_vmw_surface_flag_shareable = (1 << 0), - drm_vmw_surface_flag_scanout = (1 << 1), - drm_vmw_surface_flag_create_buffer = (1 << 2) -}; - -/** - * struct drm_vmw_gb_surface_create_req - * - * @svga3d_flags: SVGA3d surface flags for the device. - * @format: SVGA3d format. - * @mip_level: Number of mip levels for all faces. - * @drm_surface_flags Flags as described above. - * @multisample_count Future use. Set to 0. - * @autogen_filter Future use. Set to 0. - * @buffer_handle Buffer handle of backup buffer. SVGA3D_INVALID_ID - * if none. - * @base_size Size of the base mip level for all faces. - * @array_size Must be zero for non-DX hardware, and if non-zero - * svga3d_flags must have proper bind flags setup. - * - * Input argument to the DRM_VMW_GB_SURFACE_CREATE Ioctl. - * Part of output argument for the DRM_VMW_GB_SURFACE_REF Ioctl. - */ -struct drm_vmw_gb_surface_create_req { - __u32 svga3d_flags; - __u32 format; - __u32 mip_levels; - enum drm_vmw_surface_flags drm_surface_flags; - __u32 multisample_count; - __u32 autogen_filter; - __u32 buffer_handle; - __u32 array_size; - struct drm_vmw_size base_size; -}; - -/** - * struct drm_vmw_gb_surface_create_rep - * - * @handle: Surface handle. - * @backup_size: Size of backup buffers for this surface. - * @buffer_handle: Handle of backup buffer. SVGA3D_INVALID_ID if none. - * @buffer_size: Actual size of the buffer identified by - * @buffer_handle - * @buffer_map_handle: Offset into device address space for the buffer - * identified by @buffer_handle. - * - * Part of output argument for the DRM_VMW_GB_SURFACE_REF ioctl. - * Output argument for the DRM_VMW_GB_SURFACE_CREATE ioctl. - */ -struct drm_vmw_gb_surface_create_rep { - __u32 handle; - __u32 backup_size; - __u32 buffer_handle; - __u32 buffer_size; - __u64 buffer_map_handle; -}; - -/** - * union drm_vmw_gb_surface_create_arg - * - * @req: Input argument as described above. - * @rep: Output argument as described above. - * - * Argument to the DRM_VMW_GB_SURFACE_CREATE ioctl. - */ -union drm_vmw_gb_surface_create_arg { - struct drm_vmw_gb_surface_create_rep rep; - struct drm_vmw_gb_surface_create_req req; -}; - -/*************************************************************************/ -/** - * DRM_VMW_GB_SURFACE_REF - Reference a host surface. - * - * Puts a reference on a host surface with a given handle, as previously - * returned by the DRM_VMW_GB_SURFACE_CREATE ioctl. - * A reference will make sure the surface isn't destroyed while we hold - * it and will allow the calling client to use the surface handle in - * the command stream. - * - * On successful return, the Ioctl returns the surface information given - * to and returned from the DRM_VMW_GB_SURFACE_CREATE ioctl. - */ - -/** - * struct drm_vmw_gb_surface_reference_arg - * - * @creq: The data used as input when the surface was created, as described - * above at "struct drm_vmw_gb_surface_create_req" - * @crep: Additional data output when the surface was created, as described - * above at "struct drm_vmw_gb_surface_create_rep" - * - * Output Argument to the DRM_VMW_GB_SURFACE_REF ioctl. - */ -struct drm_vmw_gb_surface_ref_rep { - struct drm_vmw_gb_surface_create_req creq; - struct drm_vmw_gb_surface_create_rep crep; -}; - -/** - * union drm_vmw_gb_surface_reference_arg - * - * @req: Input data as described above at "struct drm_vmw_surface_arg" - * @rep: Output data as described above at "struct drm_vmw_gb_surface_ref_rep" - * - * Argument to the DRM_VMW_GB_SURFACE_REF Ioctl. - */ -union drm_vmw_gb_surface_reference_arg { - struct drm_vmw_gb_surface_ref_rep rep; - struct drm_vmw_surface_arg req; -}; - - -/*************************************************************************/ -/** - * DRM_VMW_SYNCCPU - Sync a DMA buffer / MOB for CPU access. - * - * Idles any previously submitted GPU operations on the buffer and - * by default blocks command submissions that reference the buffer. - * If the file descriptor used to grab a blocking CPU sync is closed, the - * cpu sync is released. - * The flags argument indicates how the grab / release operation should be - * performed: - */ - -/** - * enum drm_vmw_synccpu_flags - Synccpu flags: - * - * @drm_vmw_synccpu_read: Sync for read. If sync is done for read only, it's a - * hint to the kernel to allow command submissions that references the buffer - * for read-only. - * @drm_vmw_synccpu_write: Sync for write. Block all command submissions - * referencing this buffer. - * @drm_vmw_synccpu_dontblock: Dont wait for GPU idle, but rather return - * -EBUSY should the buffer be busy. - * @drm_vmw_synccpu_allow_cs: Allow command submission that touches the buffer - * while the buffer is synced for CPU. This is similar to the GEM bo idle - * behavior. - */ -enum drm_vmw_synccpu_flags { - drm_vmw_synccpu_read = (1 << 0), - drm_vmw_synccpu_write = (1 << 1), - drm_vmw_synccpu_dontblock = (1 << 2), - drm_vmw_synccpu_allow_cs = (1 << 3) -}; - -/** - * enum drm_vmw_synccpu_op - Synccpu operations: - * - * @drm_vmw_synccpu_grab: Grab the buffer for CPU operations - * @drm_vmw_synccpu_release: Release a previous grab. - */ -enum drm_vmw_synccpu_op { - drm_vmw_synccpu_grab, - drm_vmw_synccpu_release -}; - -/** - * struct drm_vmw_synccpu_arg - * - * @op: The synccpu operation as described above. - * @handle: Handle identifying the buffer object. - * @flags: Flags as described above. - */ -struct drm_vmw_synccpu_arg { - enum drm_vmw_synccpu_op op; - enum drm_vmw_synccpu_flags flags; - __u32 handle; - __u32 pad64; -}; - -/*************************************************************************/ -/** - * DRM_VMW_CREATE_EXTENDED_CONTEXT - Create a host context. - * - * Allocates a device unique context id, and queues a create context command - * for the host. Does not wait for host completion. - */ -enum drm_vmw_extended_context { - drm_vmw_context_legacy, - drm_vmw_context_dx -}; - -/** - * union drm_vmw_extended_context_arg - * - * @req: Context type. - * @rep: Context identifier. - * - * Argument to the DRM_VMW_CREATE_EXTENDED_CONTEXT Ioctl. - */ -union drm_vmw_extended_context_arg { - enum drm_vmw_extended_context req; - struct drm_vmw_context_arg rep; -}; - -/*************************************************************************/ -/* - * DRM_VMW_HANDLE_CLOSE - Close a user-space handle and release its - * underlying resource. - * - * Note that this ioctl is overlaid on the deprecated DRM_VMW_UNREF_DMABUF - * Ioctl. - */ - -/** - * struct drm_vmw_handle_close_arg - * - * @handle: Handle to close. - * - * Argument to the DRM_VMW_HANDLE_CLOSE Ioctl. - */ -struct drm_vmw_handle_close_arg { - __u32 handle; - __u32 pad64; -}; -#define drm_vmw_unref_dmabuf_arg drm_vmw_handle_close_arg - -/*************************************************************************/ -/** - * DRM_VMW_GB_SURFACE_CREATE_EXT - Create a host guest-backed surface. - * - * Allocates a surface handle and queues a create surface command - * for the host on the first use of the surface. The surface ID can - * be used as the surface ID in commands referencing the surface. - * - * This new command extends DRM_VMW_GB_SURFACE_CREATE by adding version - * parameter and 64 bit svga flag. - */ - -/** - * enum drm_vmw_surface_version - * - * @drm_vmw_surface_gb_v1: Corresponds to current gb surface format with - * svga3d surface flags split into 2, upper half and lower half. - */ -enum drm_vmw_surface_version { - drm_vmw_gb_surface_v1 -}; - -/** - * struct drm_vmw_gb_surface_create_ext_req - * - * @base: Surface create parameters. - * @version: Version of surface create ioctl. - * @svga3d_flags_upper_32_bits: Upper 32 bits of svga3d flags. - * @multisample_pattern: Multisampling pattern when msaa is supported. - * @quality_level: Precision settings for each sample. - * @must_be_zero: Reserved for future usage. - * - * Input argument to the DRM_VMW_GB_SURFACE_CREATE_EXT Ioctl. - * Part of output argument for the DRM_VMW_GB_SURFACE_REF_EXT Ioctl. - */ -struct drm_vmw_gb_surface_create_ext_req { - struct drm_vmw_gb_surface_create_req base; - enum drm_vmw_surface_version version; - uint32_t svga3d_flags_upper_32_bits; - SVGA3dMSPattern multisample_pattern; - SVGA3dMSQualityLevel quality_level; - uint64_t must_be_zero; -}; - -/** - * union drm_vmw_gb_surface_create_ext_arg - * - * @req: Input argument as described above. - * @rep: Output argument as described above. - * - * Argument to the DRM_VMW_GB_SURFACE_CREATE_EXT ioctl. - */ -union drm_vmw_gb_surface_create_ext_arg { - struct drm_vmw_gb_surface_create_rep rep; - struct drm_vmw_gb_surface_create_ext_req req; -}; - -/*************************************************************************/ -/** - * DRM_VMW_GB_SURFACE_REF_EXT - Reference a host surface. - * - * Puts a reference on a host surface with a given handle, as previously - * returned by the DRM_VMW_GB_SURFACE_CREATE_EXT ioctl. - * A reference will make sure the surface isn't destroyed while we hold - * it and will allow the calling client to use the surface handle in - * the command stream. - * - * On successful return, the Ioctl returns the surface information given - * to and returned from the DRM_VMW_GB_SURFACE_CREATE_EXT ioctl. - */ - -/** - * struct drm_vmw_gb_surface_ref_ext_rep - * - * @creq: The data used as input when the surface was created, as described - * above at "struct drm_vmw_gb_surface_create_ext_req" - * @crep: Additional data output when the surface was created, as described - * above at "struct drm_vmw_gb_surface_create_rep" - * - * Output Argument to the DRM_VMW_GB_SURFACE_REF_EXT ioctl. - */ -struct drm_vmw_gb_surface_ref_ext_rep { - struct drm_vmw_gb_surface_create_ext_req creq; - struct drm_vmw_gb_surface_create_rep crep; -}; - -/** - * union drm_vmw_gb_surface_reference_ext_arg - * - * @req: Input data as described above at "struct drm_vmw_surface_arg" - * @rep: Output data as described above at - * "struct drm_vmw_gb_surface_ref_ext_rep" - * - * Argument to the DRM_VMW_GB_SURFACE_REF Ioctl. - */ -union drm_vmw_gb_surface_reference_ext_arg { - struct drm_vmw_gb_surface_ref_ext_rep rep; - struct drm_vmw_surface_arg req; -}; - -#if defined(__cplusplus) -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/elf.h b/lib/libc/include/generic-musl/elf.h index 33da3f9578..7ab2c85fe2 100644 --- a/lib/libc/include/generic-musl/elf.h +++ b/lib/libc/include/generic-musl/elf.h @@ -314,7 +314,8 @@ typedef struct { #define EM_AMDGPU 224 #define EM_RISCV 243 #define EM_BPF 247 -#define EM_NUM 248 +#define EM_CSKY 252 +#define EM_NUM 253 #define EM_ALPHA 0x9026 @@ -681,11 +682,17 @@ typedef struct { #define NT_ARM_HW_WATCH 0x403 #define NT_ARM_SYSTEM_CALL 0x404 #define NT_ARM_SVE 0x405 +#define NT_ARM_PAC_MASK 0x406 +#define NT_ARM_PACA_KEYS 0x407 +#define NT_ARM_PACG_KEYS 0x408 #define NT_METAG_CBUF 0x500 #define NT_METAG_RPIPE 0x501 #define NT_METAG_TLS 0x502 #define NT_ARC_V2 0x600 #define NT_VMCOREDD 0x700 +#define NT_MIPS_DSP 0x800 +#define NT_MIPS_FP_MODE 0x801 +#define NT_MIPS_MSA 0x802 #define NT_VERSION 1 @@ -2619,6 +2626,61 @@ enum #define R_ARM_NUM 256 +#define R_CKCORE_NONE 0 +#define R_CKCORE_ADDR32 1 +#define R_CKCORE_PCRELIMM8BY4 2 +#define R_CKCORE_PCRELIMM11BY2 3 +#define R_CKCORE_PCREL32 5 +#define R_CKCORE_PCRELJSR_IMM11BY2 6 +#define R_CKCORE_RELATIVE 9 +#define R_CKCORE_COPY 10 +#define R_CKCORE_GLOB_DAT 11 +#define R_CKCORE_JUMP_SLOT 12 +#define R_CKCORE_GOTOFF 13 +#define R_CKCORE_GOTPC 14 +#define R_CKCORE_GOT32 15 +#define R_CKCORE_PLT32 16 +#define R_CKCORE_ADDRGOT 17 +#define R_CKCORE_ADDRPLT 18 +#define R_CKCORE_PCREL_IMM26BY2 19 +#define R_CKCORE_PCREL_IMM16BY2 20 +#define R_CKCORE_PCREL_IMM16BY4 21 +#define R_CKCORE_PCREL_IMM10BY2 22 +#define R_CKCORE_PCREL_IMM10BY4 23 +#define R_CKCORE_ADDR_HI16 24 +#define R_CKCORE_ADDR_LO16 25 +#define R_CKCORE_GOTPC_HI16 26 +#define R_CKCORE_GOTPC_LO16 27 +#define R_CKCORE_GOTOFF_HI16 28 +#define R_CKCORE_GOTOFF_LO16 29 +#define R_CKCORE_GOT12 30 +#define R_CKCORE_GOT_HI16 31 +#define R_CKCORE_GOT_LO16 32 +#define R_CKCORE_PLT12 33 +#define R_CKCORE_PLT_HI16 34 +#define R_CKCORE_PLT_LO16 35 +#define R_CKCORE_ADDRGOT_HI16 36 +#define R_CKCORE_ADDRGOT_LO16 37 +#define R_CKCORE_ADDRPLT_HI16 38 +#define R_CKCORE_ADDRPLT_LO16 39 +#define R_CKCORE_PCREL_JSR_IMM26BY2 40 +#define R_CKCORE_TOFFSET_LO16 41 +#define R_CKCORE_DOFFSET_LO16 42 +#define R_CKCORE_PCREL_IMM18BY2 43 +#define R_CKCORE_DOFFSET_IMM18 44 +#define R_CKCORE_DOFFSET_IMM18BY2 45 +#define R_CKCORE_DOFFSET_IMM18BY4 46 +#define R_CKCORE_GOT_IMM18BY4 48 +#define R_CKCORE_PLT_IMM18BY4 49 +#define R_CKCORE_PCREL_IMM7BY4 50 +#define R_CKCORE_TLS_LE32 51 +#define R_CKCORE_TLS_IE32 52 +#define R_CKCORE_TLS_GD32 53 +#define R_CKCORE_TLS_LDM32 54 +#define R_CKCORE_TLS_LDO32 55 +#define R_CKCORE_TLS_DTPMOD32 56 +#define R_CKCORE_TLS_DTPOFF32 57 +#define R_CKCORE_TLS_TPOFF32 58 #define EF_IA_64_MASKOS 0x0000000f @@ -3166,6 +3228,62 @@ enum #define R_BPF_NONE 0 #define R_BPF_MAP_FD 1 +#define R_RISCV_NONE 0 +#define R_RISCV_32 1 +#define R_RISCV_64 2 +#define R_RISCV_RELATIVE 3 +#define R_RISCV_COPY 4 +#define R_RISCV_JUMP_SLOT 5 +#define R_RISCV_TLS_DTPMOD32 6 +#define R_RISCV_TLS_DTPMOD64 7 +#define R_RISCV_TLS_DTPREL32 8 +#define R_RISCV_TLS_DTPREL64 9 +#define R_RISCV_TLS_TPREL32 10 +#define R_RISCV_TLS_TPREL64 11 + +#define R_RISCV_BRANCH 16 +#define R_RISCV_JAL 17 +#define R_RISCV_CALL 18 +#define R_RISCV_CALL_PLT 19 +#define R_RISCV_GOT_HI20 20 +#define R_RISCV_TLS_GOT_HI20 21 +#define R_RISCV_TLS_GD_HI20 22 +#define R_RISCV_PCREL_HI20 23 +#define R_RISCV_PCREL_LO12_I 24 +#define R_RISCV_PCREL_LO12_S 25 +#define R_RISCV_HI20 26 +#define R_RISCV_LO12_I 27 +#define R_RISCV_LO12_S 28 +#define R_RISCV_TPREL_HI20 29 +#define R_RISCV_TPREL_LO12_I 30 +#define R_RISCV_TPREL_LO12_S 31 +#define R_RISCV_TPREL_ADD 32 +#define R_RISCV_ADD8 33 +#define R_RISCV_ADD16 34 +#define R_RISCV_ADD32 35 +#define R_RISCV_ADD64 36 +#define R_RISCV_SUB8 37 +#define R_RISCV_SUB16 38 +#define R_RISCV_SUB32 39 +#define R_RISCV_SUB64 40 +#define R_RISCV_GNU_VTINHERIT 41 +#define R_RISCV_GNU_VTENTRY 42 +#define R_RISCV_ALIGN 43 +#define R_RISCV_RVC_BRANCH 44 +#define R_RISCV_RVC_JUMP 45 +#define R_RISCV_RVC_LUI 46 +#define R_RISCV_GPREL_I 47 +#define R_RISCV_GPREL_S 48 +#define R_RISCV_TPREL_I 49 +#define R_RISCV_TPREL_S 50 +#define R_RISCV_RELAX 51 +#define R_RISCV_SUB6 52 +#define R_RISCV_SET6 53 +#define R_RISCV_SET8 54 +#define R_RISCV_SET16 55 +#define R_RISCV_SET32 56 +#define R_RISCV_32_PCREL 57 + #ifdef __cplusplus } #endif diff --git a/lib/libc/include/generic-musl/fcntl.h b/lib/libc/include/generic-musl/fcntl.h index c27871ccce..2723d0cf0a 100644 --- a/lib/libc/include/generic-musl/fcntl.h +++ b/lib/libc/include/generic-musl/fcntl.h @@ -36,8 +36,9 @@ int openat(int, const char *, int, ...); int posix_fadvise(int, off_t, off_t, int); int posix_fallocate(int, off_t, off_t); -#define O_SEARCH O_PATH -#define O_EXEC O_PATH +#define O_SEARCH O_PATH +#define O_EXEC O_PATH +#define O_TTY_INIT 0 #define O_ACCMODE (03|O_SEARCH) #define O_RDONLY 00 @@ -66,8 +67,10 @@ int posix_fallocate(int, off_t, off_t); #define POSIX_FADV_RANDOM 1 #define POSIX_FADV_SEQUENTIAL 2 #define POSIX_FADV_WILLNEED 3 +#ifndef POSIX_FADV_DONTNEED #define POSIX_FADV_DONTNEED 4 #define POSIX_FADV_NOREUSE 5 +#endif #undef SEEK_SET #undef SEEK_CUR @@ -126,6 +129,7 @@ int posix_fallocate(int, off_t, off_t); #define F_SEAL_SHRINK 0x0002 #define F_SEAL_GROW 0x0004 #define F_SEAL_WRITE 0x0008 +#define F_SEAL_FUTURE_WRITE 0x0010 #define F_GET_RW_HINT 1035 #define F_SET_RW_HINT 1036 diff --git a/lib/libc/include/generic-musl/math.h b/lib/libc/include/generic-musl/math.h index 20fb2704ac..f7e8058639 100644 --- a/lib/libc/include/generic-musl/math.h +++ b/lib/libc/include/generic-musl/math.h @@ -36,6 +36,18 @@ extern "C" { #define FP_SUBNORMAL 3 #define FP_NORMAL 4 +#ifdef __FP_FAST_FMA +#define FP_FAST_FMA 1 +#endif + +#ifdef __FP_FAST_FMAF +#define FP_FAST_FMAF 1 +#endif + +#ifdef __FP_FAST_FMAL +#define FP_FAST_FMAL 1 +#endif + int __fpclassify(double); int __fpclassifyf(float); int __fpclassifyl(long double); diff --git a/lib/libc/include/generic-musl/misc/cxl.h b/lib/libc/include/generic-musl/misc/cxl.h deleted file mode 100644 index dc3542e62b..0000000000 --- a/lib/libc/include/generic-musl/misc/cxl.h +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * Copyright 2014 IBM Corp. - * - * 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. - */ - -#ifndef _MISC_CXL_H -#define _MISC_CXL_H - -#include -#include - - -struct cxl_ioctl_start_work { - __u64 flags; - __u64 work_element_descriptor; - __u64 amr; - __s16 num_interrupts; - __u16 tid; - __s32 reserved1; - __u64 reserved2; - __u64 reserved3; - __u64 reserved4; - __u64 reserved5; -}; - -#define CXL_START_WORK_AMR 0x0000000000000001ULL -#define CXL_START_WORK_NUM_IRQS 0x0000000000000002ULL -#define CXL_START_WORK_ERR_FF 0x0000000000000004ULL -#define CXL_START_WORK_TID 0x0000000000000008ULL -#define CXL_START_WORK_ALL (CXL_START_WORK_AMR |\ - CXL_START_WORK_NUM_IRQS |\ - CXL_START_WORK_ERR_FF |\ - CXL_START_WORK_TID) - - -/* Possible modes that an afu can be in */ -#define CXL_MODE_DEDICATED 0x1 -#define CXL_MODE_DIRECTED 0x2 - -/* possible flags for the cxl_afu_id flags field */ -#define CXL_AFUID_FLAG_SLAVE 0x1 /* In directed-mode afu is in slave mode */ - -struct cxl_afu_id { - __u64 flags; /* One of CXL_AFUID_FLAG_X */ - __u32 card_id; - __u32 afu_offset; - __u32 afu_mode; /* one of the CXL_MODE_X */ - __u32 reserved1; - __u64 reserved2; - __u64 reserved3; - __u64 reserved4; - __u64 reserved5; - __u64 reserved6; -}; - -/* base adapter image header is included in the image */ -#define CXL_AI_NEED_HEADER 0x0000000000000001ULL -#define CXL_AI_ALL CXL_AI_NEED_HEADER - -#define CXL_AI_HEADER_SIZE 128 -#define CXL_AI_BUFFER_SIZE 4096 -#define CXL_AI_MAX_ENTRIES 256 -#define CXL_AI_MAX_CHUNK_SIZE (CXL_AI_BUFFER_SIZE * CXL_AI_MAX_ENTRIES) - -struct cxl_adapter_image { - __u64 flags; - __u64 data; - __u64 len_data; - __u64 len_image; - __u64 reserved1; - __u64 reserved2; - __u64 reserved3; - __u64 reserved4; -}; - -/* ioctl numbers */ -#define CXL_MAGIC 0xCA -/* AFU devices */ -#define CXL_IOCTL_START_WORK _IOW(CXL_MAGIC, 0x00, struct cxl_ioctl_start_work) -#define CXL_IOCTL_GET_PROCESS_ELEMENT _IOR(CXL_MAGIC, 0x01, __u32) -#define CXL_IOCTL_GET_AFU_ID _IOR(CXL_MAGIC, 0x02, struct cxl_afu_id) -/* adapter devices */ -#define CXL_IOCTL_DOWNLOAD_IMAGE _IOW(CXL_MAGIC, 0x0A, struct cxl_adapter_image) -#define CXL_IOCTL_VALIDATE_IMAGE _IOW(CXL_MAGIC, 0x0B, struct cxl_adapter_image) - -#define CXL_READ_MIN_SIZE 0x1000 /* 4K */ - -/* Events from read() */ -enum cxl_event_type { - CXL_EVENT_RESERVED = 0, - CXL_EVENT_AFU_INTERRUPT = 1, - CXL_EVENT_DATA_STORAGE = 2, - CXL_EVENT_AFU_ERROR = 3, - CXL_EVENT_AFU_DRIVER = 4, -}; - -struct cxl_event_header { - __u16 type; - __u16 size; - __u16 process_element; - __u16 reserved1; -}; - -struct cxl_event_afu_interrupt { - __u16 flags; - __u16 irq; /* Raised AFU interrupt number */ - __u32 reserved1; -}; - -struct cxl_event_data_storage { - __u16 flags; - __u16 reserved1; - __u32 reserved2; - __u64 addr; - __u64 dsisr; - __u64 reserved3; -}; - -struct cxl_event_afu_error { - __u16 flags; - __u16 reserved1; - __u32 reserved2; - __u64 error; -}; - -struct cxl_event_afu_driver_reserved { - /* - * Defines the buffer passed to the cxl driver by the AFU driver. - * - * This is not ABI since the event header.size passed to the user for - * existing events is set in the read call to sizeof(cxl_event_header) - * + sizeof(whatever event is being dispatched) and the user is already - * required to use a 4K buffer on the read call. - * - * Of course the contents will be ABI, but that's up the AFU driver. - */ - __u32 data_size; - __u8 data[]; -}; - -struct cxl_event { - struct cxl_event_header header; - union { - struct cxl_event_afu_interrupt irq; - struct cxl_event_data_storage fault; - struct cxl_event_afu_error afu_error; - struct cxl_event_afu_driver_reserved afu_driver_event; - }; -}; - -#endif /* _MISC_CXL_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/misc/ocxl.h b/lib/libc/include/generic-musl/misc/ocxl.h deleted file mode 100644 index dbf9e21208..0000000000 --- a/lib/libc/include/generic-musl/misc/ocxl.h +++ /dev/null @@ -1,80 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* Copyright 2017 IBM Corp. */ -#ifndef _MISC_OCXL_H -#define _MISC_OCXL_H - -#include -#include - -enum ocxl_event_type { - OCXL_AFU_EVENT_XSL_FAULT_ERROR = 0, -}; - -#define OCXL_KERNEL_EVENT_FLAG_LAST 0x0001 /* This is the last event pending */ - -struct ocxl_kernel_event_header { - __u16 type; - __u16 flags; - __u32 reserved; -}; - -struct ocxl_kernel_event_xsl_fault_error { - __u64 addr; - __u64 dsisr; - __u64 count; - __u64 reserved; -}; - -struct ocxl_ioctl_attach { - __u64 amr; - __u64 reserved1; - __u64 reserved2; - __u64 reserved3; -}; - -struct ocxl_ioctl_metadata { - __u16 version; // struct version, always backwards compatible - - // Version 0 fields - __u8 afu_version_major; - __u8 afu_version_minor; - __u32 pasid; // PASID assigned to the current context - - __u64 pp_mmio_size; // Per PASID MMIO size - __u64 global_mmio_size; - - // End version 0 fields - - __u64 reserved[13]; // Total of 16*u64 -}; - -struct ocxl_ioctl_p9_wait { - __u16 thread_id; // The thread ID required to wake this thread - __u16 reserved1; - __u32 reserved2; - __u64 reserved3[3]; -}; - -#define OCXL_IOCTL_FEATURES_FLAGS0_P9_WAIT 0x01 -struct ocxl_ioctl_features { - __u64 flags[4]; -}; - -struct ocxl_ioctl_irq_fd { - __u64 irq_offset; - __s32 eventfd; - __u32 reserved; -}; - -/* ioctl numbers */ -#define OCXL_MAGIC 0xCA -/* AFU devices */ -#define OCXL_IOCTL_ATTACH _IOW(OCXL_MAGIC, 0x10, struct ocxl_ioctl_attach) -#define OCXL_IOCTL_IRQ_ALLOC _IOR(OCXL_MAGIC, 0x11, __u64) -#define OCXL_IOCTL_IRQ_FREE _IOW(OCXL_MAGIC, 0x12, __u64) -#define OCXL_IOCTL_IRQ_SET_FD _IOW(OCXL_MAGIC, 0x13, struct ocxl_ioctl_irq_fd) -#define OCXL_IOCTL_GET_METADATA _IOR(OCXL_MAGIC, 0x14, struct ocxl_ioctl_metadata) -#define OCXL_IOCTL_ENABLE_P9_WAIT _IOR(OCXL_MAGIC, 0x15, struct ocxl_ioctl_p9_wait) -#define OCXL_IOCTL_GET_FEATURES _IOR(OCXL_MAGIC, 0x16, struct ocxl_ioctl_features) - -#endif /* _MISC_OCXL_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/mtd/inftl-user.h b/lib/libc/include/generic-musl/mtd/inftl-user.h deleted file mode 100644 index 3f602e1674..0000000000 --- a/lib/libc/include/generic-musl/mtd/inftl-user.h +++ /dev/null @@ -1,90 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Parts of INFTL headers shared with userspace - * - */ - -#ifndef __MTD_INFTL_USER_H__ -#define __MTD_INFTL_USER_H__ - -#include - -#define OSAK_VERSION 0x5120 -#define PERCENTUSED 98 - -#define SECTORSIZE 512 - -/* Block Control Information */ - -struct inftl_bci { - __u8 ECCsig[6]; - __u8 Status; - __u8 Status1; -} __attribute__((packed)); - -struct inftl_unithead1 { - __u16 virtualUnitNo; - __u16 prevUnitNo; - __u8 ANAC; - __u8 NACs; - __u8 parityPerField; - __u8 discarded; -} __attribute__((packed)); - -struct inftl_unithead2 { - __u8 parityPerField; - __u8 ANAC; - __u16 prevUnitNo; - __u16 virtualUnitNo; - __u8 NACs; - __u8 discarded; -} __attribute__((packed)); - -struct inftl_unittail { - __u8 Reserved[4]; - __u16 EraseMark; - __u16 EraseMark1; -} __attribute__((packed)); - -union inftl_uci { - struct inftl_unithead1 a; - struct inftl_unithead2 b; - struct inftl_unittail c; -}; - -struct inftl_oob { - struct inftl_bci b; - union inftl_uci u; -}; - - -/* INFTL Media Header */ - -struct INFTLPartition { - __u32 virtualUnits; - __u32 firstUnit; - __u32 lastUnit; - __u32 flags; - __u32 spareUnits; - __u32 Reserved0; - __u32 Reserved1; -} __attribute__((packed)); - -struct INFTLMediaHeader { - char bootRecordID[8]; - __u32 NoOfBootImageBlocks; - __u32 NoOfBinaryPartitions; - __u32 NoOfBDTLPartitions; - __u32 BlockMultiplierBits; - __u32 FormatFlags; - __u32 OsakVersion; - __u32 PercentUsed; - struct INFTLPartition Partitions[4]; -} __attribute__((packed)); - -/* Partition flag types */ -#define INFTL_BINARY 0x20000000 -#define INFTL_BDTL 0x40000000 -#define INFTL_LAST 0x80000000 - -#endif /* __MTD_INFTL_USER_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/mtd/mtd-abi.h b/lib/libc/include/generic-musl/mtd/mtd-abi.h deleted file mode 100644 index f7d07da15b..0000000000 --- a/lib/libc/include/generic-musl/mtd/mtd-abi.h +++ /dev/null @@ -1,285 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * Copyright © 1999-2010 David Woodhouse et al. - * - * 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 St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef __MTD_ABI_H__ -#define __MTD_ABI_H__ - -#include - -struct erase_info_user { - __u32 start; - __u32 length; -}; - -struct erase_info_user64 { - __u64 start; - __u64 length; -}; - -struct mtd_oob_buf { - __u32 start; - __u32 length; - unsigned char *ptr; -}; - -struct mtd_oob_buf64 { - __u64 start; - __u32 pad; - __u32 length; - __u64 usr_ptr; -}; - -/** - * MTD operation modes - * - * @MTD_OPS_PLACE_OOB: OOB data are placed at the given offset (default) - * @MTD_OPS_AUTO_OOB: OOB data are automatically placed at the free areas - * which are defined by the internal ecclayout - * @MTD_OPS_RAW: data are transferred as-is, with no error correction; - * this mode implies %MTD_OPS_PLACE_OOB - * - * These modes can be passed to ioctl(MEMWRITE) and are also used internally. - * See notes on "MTD file modes" for discussion on %MTD_OPS_RAW vs. - * %MTD_FILE_MODE_RAW. - */ -enum { - MTD_OPS_PLACE_OOB = 0, - MTD_OPS_AUTO_OOB = 1, - MTD_OPS_RAW = 2, -}; - -/** - * struct mtd_write_req - data structure for requesting a write operation - * - * @start: start address - * @len: length of data buffer - * @ooblen: length of OOB buffer - * @usr_data: user-provided data buffer - * @usr_oob: user-provided OOB buffer - * @mode: MTD mode (see "MTD operation modes") - * @padding: reserved, must be set to 0 - * - * This structure supports ioctl(MEMWRITE) operations, allowing data and/or OOB - * writes in various modes. To write to OOB-only, set @usr_data == NULL, and to - * write data-only, set @usr_oob == NULL. However, setting both @usr_data and - * @usr_oob to NULL is not allowed. - */ -struct mtd_write_req { - __u64 start; - __u64 len; - __u64 ooblen; - __u64 usr_data; - __u64 usr_oob; - __u8 mode; - __u8 padding[7]; -}; - -#define MTD_ABSENT 0 -#define MTD_RAM 1 -#define MTD_ROM 2 -#define MTD_NORFLASH 3 -#define MTD_NANDFLASH 4 /* SLC NAND */ -#define MTD_DATAFLASH 6 -#define MTD_UBIVOLUME 7 -#define MTD_MLCNANDFLASH 8 /* MLC NAND (including TLC) */ - -#define MTD_WRITEABLE 0x400 /* Device is writeable */ -#define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */ -#define MTD_NO_ERASE 0x1000 /* No erase necessary */ -#define MTD_POWERUP_LOCK 0x2000 /* Always locked after reset */ - -/* Some common devices / combinations of capabilities */ -#define MTD_CAP_ROM 0 -#define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE) -#define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE) -#define MTD_CAP_NANDFLASH (MTD_WRITEABLE) -#define MTD_CAP_NVRAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE) - -/* Obsolete ECC byte placement modes (used with obsolete MEMGETOOBSEL) */ -#define MTD_NANDECC_OFF 0 // Switch off ECC (Not recommended) -#define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode) -#define MTD_NANDECC_AUTOPLACE 2 // Use the default placement scheme -#define MTD_NANDECC_PLACEONLY 3 // Use the given placement in the structure (Do not store ecc result on read) -#define MTD_NANDECC_AUTOPL_USR 4 // Use the given autoplacement scheme rather than using the default - -/* OTP mode selection */ -#define MTD_OTP_OFF 0 -#define MTD_OTP_FACTORY 1 -#define MTD_OTP_USER 2 - -struct mtd_info_user { - __u8 type; - __u32 flags; - __u32 size; /* Total size of the MTD */ - __u32 erasesize; - __u32 writesize; - __u32 oobsize; /* Amount of OOB data per block (e.g. 16) */ - __u64 padding; /* Old obsolete field; do not use */ -}; - -struct region_info_user { - __u32 offset; /* At which this region starts, - * from the beginning of the MTD */ - __u32 erasesize; /* For this region */ - __u32 numblocks; /* Number of blocks in this region */ - __u32 regionindex; -}; - -struct otp_info { - __u32 start; - __u32 length; - __u32 locked; -}; - -/* - * Note, the following ioctl existed in the past and was removed: - * #define MEMSETOOBSEL _IOW('M', 9, struct nand_oobinfo) - * Try to avoid adding a new ioctl with the same ioctl number. - */ - -/* Get basic MTD characteristics info (better to use sysfs) */ -#define MEMGETINFO _IOR('M', 1, struct mtd_info_user) -/* Erase segment of MTD */ -#define MEMERASE _IOW('M', 2, struct erase_info_user) -/* Write out-of-band data from MTD */ -#define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf) -/* Read out-of-band data from MTD */ -#define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf) -/* Lock a chip (for MTD that supports it) */ -#define MEMLOCK _IOW('M', 5, struct erase_info_user) -/* Unlock a chip (for MTD that supports it) */ -#define MEMUNLOCK _IOW('M', 6, struct erase_info_user) -/* Get the number of different erase regions */ -#define MEMGETREGIONCOUNT _IOR('M', 7, int) -/* Get information about the erase region for a specific index */ -#define MEMGETREGIONINFO _IOWR('M', 8, struct region_info_user) -/* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */ -#define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo) -/* Check if an eraseblock is bad */ -#define MEMGETBADBLOCK _IOW('M', 11, __kernel_loff_t) -/* Mark an eraseblock as bad */ -#define MEMSETBADBLOCK _IOW('M', 12, __kernel_loff_t) -/* Set OTP (One-Time Programmable) mode (factory vs. user) */ -#define OTPSELECT _IOR('M', 13, int) -/* Get number of OTP (One-Time Programmable) regions */ -#define OTPGETREGIONCOUNT _IOW('M', 14, int) -/* Get all OTP (One-Time Programmable) info about MTD */ -#define OTPGETREGIONINFO _IOW('M', 15, struct otp_info) -/* Lock a given range of user data (must be in mode %MTD_FILE_MODE_OTP_USER) */ -#define OTPLOCK _IOR('M', 16, struct otp_info) -/* Get ECC layout (deprecated) */ -#define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout_user) -/* Get statistics about corrected/uncorrected errors */ -#define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats) -/* Set MTD mode on a per-file-descriptor basis (see "MTD file modes") */ -#define MTDFILEMODE _IO('M', 19) -/* Erase segment of MTD (supports 64-bit address) */ -#define MEMERASE64 _IOW('M', 20, struct erase_info_user64) -/* Write data to OOB (64-bit version) */ -#define MEMWRITEOOB64 _IOWR('M', 21, struct mtd_oob_buf64) -/* Read data from OOB (64-bit version) */ -#define MEMREADOOB64 _IOWR('M', 22, struct mtd_oob_buf64) -/* Check if chip is locked (for MTD that supports it) */ -#define MEMISLOCKED _IOR('M', 23, struct erase_info_user) -/* - * Most generic write interface; can write in-band and/or out-of-band in various - * modes (see "struct mtd_write_req"). This ioctl is not supported for flashes - * without OOB, e.g., NOR flash. - */ -#define MEMWRITE _IOWR('M', 24, struct mtd_write_req) - -/* - * Obsolete legacy interface. Keep it in order not to break userspace - * interfaces - */ -struct nand_oobinfo { - __u32 useecc; - __u32 eccbytes; - __u32 oobfree[8][2]; - __u32 eccpos[32]; -}; - -struct nand_oobfree { - __u32 offset; - __u32 length; -}; - -#define MTD_MAX_OOBFREE_ENTRIES 8 -#define MTD_MAX_ECCPOS_ENTRIES 64 -/* - * OBSOLETE: ECC layout control structure. Exported to user-space via ioctl - * ECCGETLAYOUT for backwards compatbility and should not be mistaken as a - * complete set of ECC information. The ioctl truncates the larger internal - * structure to retain binary compatibility with the static declaration of the - * ioctl. Note that the "MTD_MAX_..._ENTRIES" macros represent the max size of - * the user struct, not the MAX size of the internal OOB layout representation. - */ -struct nand_ecclayout_user { - __u32 eccbytes; - __u32 eccpos[MTD_MAX_ECCPOS_ENTRIES]; - __u32 oobavail; - struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES]; -}; - -/** - * struct mtd_ecc_stats - error correction stats - * - * @corrected: number of corrected bits - * @failed: number of uncorrectable errors - * @badblocks: number of bad blocks in this partition - * @bbtblocks: number of blocks reserved for bad block tables - */ -struct mtd_ecc_stats { - __u32 corrected; - __u32 failed; - __u32 badblocks; - __u32 bbtblocks; -}; - -/* - * MTD file modes - for read/write access to MTD - * - * @MTD_FILE_MODE_NORMAL: OTP disabled, ECC enabled - * @MTD_FILE_MODE_OTP_FACTORY: OTP enabled in factory mode - * @MTD_FILE_MODE_OTP_USER: OTP enabled in user mode - * @MTD_FILE_MODE_RAW: OTP disabled, ECC disabled - * - * These modes can be set via ioctl(MTDFILEMODE). The mode mode will be retained - * separately for each open file descriptor. - * - * Note: %MTD_FILE_MODE_RAW provides the same functionality as %MTD_OPS_RAW - - * raw access to the flash, without error correction or autoplacement schemes. - * Wherever possible, the MTD_OPS_* mode will override the MTD_FILE_MODE_* mode - * (e.g., when using ioctl(MEMWRITE)), but in some cases, the MTD_FILE_MODE is - * used out of necessity (e.g., `write()', ioctl(MEMWRITEOOB64)). - */ -enum mtd_file_modes { - MTD_FILE_MODE_NORMAL = MTD_OTP_OFF, - MTD_FILE_MODE_OTP_FACTORY = MTD_OTP_FACTORY, - MTD_FILE_MODE_OTP_USER = MTD_OTP_USER, - MTD_FILE_MODE_RAW, -}; - -static __inline__ int mtd_type_is_nand_user(const struct mtd_info_user *mtd) -{ - return mtd->type == MTD_NANDFLASH || mtd->type == MTD_MLCNANDFLASH; -} - -#endif /* __MTD_ABI_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/mtd/mtd-user.h b/lib/libc/include/generic-musl/mtd/mtd-user.h deleted file mode 100644 index db96110792..0000000000 --- a/lib/libc/include/generic-musl/mtd/mtd-user.h +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * Copyright © 1999-2010 David Woodhouse - * - * 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 St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef __MTD_USER_H__ -#define __MTD_USER_H__ - -/* This file is blessed for inclusion by userspace */ -#include - -typedef struct mtd_info_user mtd_info_t; -typedef struct erase_info_user erase_info_t; -typedef struct region_info_user region_info_t; -typedef struct nand_oobinfo nand_oobinfo_t; -typedef struct nand_ecclayout_user nand_ecclayout_t; - -#endif /* __MTD_USER_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/mtd/nftl-user.h b/lib/libc/include/generic-musl/mtd/nftl-user.h deleted file mode 100644 index 55dd08388c..0000000000 --- a/lib/libc/include/generic-musl/mtd/nftl-user.h +++ /dev/null @@ -1,91 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * Copyright © 1999-2010 David Woodhouse - * - * 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 St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef __MTD_NFTL_USER_H__ -#define __MTD_NFTL_USER_H__ - -#include - -/* Block Control Information */ - -struct nftl_bci { - unsigned char ECCSig[6]; - __u8 Status; - __u8 Status1; -}__attribute__((packed)); - -/* Unit Control Information */ - -struct nftl_uci0 { - __u16 VirtUnitNum; - __u16 ReplUnitNum; - __u16 SpareVirtUnitNum; - __u16 SpareReplUnitNum; -} __attribute__((packed)); - -struct nftl_uci1 { - __u32 WearInfo; - __u16 EraseMark; - __u16 EraseMark1; -} __attribute__((packed)); - -struct nftl_uci2 { - __u16 FoldMark; - __u16 FoldMark1; - __u32 unused; -} __attribute__((packed)); - -union nftl_uci { - struct nftl_uci0 a; - struct nftl_uci1 b; - struct nftl_uci2 c; -}; - -struct nftl_oob { - struct nftl_bci b; - union nftl_uci u; -}; - -/* NFTL Media Header */ - -struct NFTLMediaHeader { - char DataOrgID[6]; - __u16 NumEraseUnits; - __u16 FirstPhysicalEUN; - __u32 FormattedSize; - unsigned char UnitSizeFactor; -} __attribute__((packed)); - -#define MAX_ERASE_ZONES (8192 - 512) - -#define ERASE_MARK 0x3c69 -#define SECTOR_FREE 0xff -#define SECTOR_USED 0x55 -#define SECTOR_IGNORE 0x11 -#define SECTOR_DELETED 0x00 - -#define FOLD_MARK_IN_PROGRESS 0x5555 - -#define ZONE_GOOD 0xff -#define ZONE_BAD_ORIGINAL 0 -#define ZONE_BAD_MARKED 7 - - -#endif /* __MTD_NFTL_USER_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/mtd/ubi-user.h b/lib/libc/include/generic-musl/mtd/ubi-user.h deleted file mode 100644 index 4fa0aaaba4..0000000000 --- a/lib/libc/include/generic-musl/mtd/ubi-user.h +++ /dev/null @@ -1,460 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * Copyright © International Business Machines Corp., 2006 - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Author: Artem Bityutskiy (Битюцкий Артём) - */ - -#ifndef __UBI_USER_H__ -#define __UBI_USER_H__ - -#include - -/* - * UBI device creation (the same as MTD device attachment) - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * MTD devices may be attached using %UBI_IOCATT ioctl command of the UBI - * control device. The caller has to properly fill and pass - * &struct ubi_attach_req object - UBI will attach the MTD device specified in - * the request and return the newly created UBI device number as the ioctl - * return value. - * - * UBI device deletion (the same as MTD device detachment) - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * An UBI device maybe deleted with %UBI_IOCDET ioctl command of the UBI - * control device. - * - * UBI volume creation - * ~~~~~~~~~~~~~~~~~~~ - * - * UBI volumes are created via the %UBI_IOCMKVOL ioctl command of UBI character - * device. A &struct ubi_mkvol_req object has to be properly filled and a - * pointer to it has to be passed to the ioctl. - * - * UBI volume deletion - * ~~~~~~~~~~~~~~~~~~~ - * - * To delete a volume, the %UBI_IOCRMVOL ioctl command of the UBI character - * device should be used. A pointer to the 32-bit volume ID hast to be passed - * to the ioctl. - * - * UBI volume re-size - * ~~~~~~~~~~~~~~~~~~ - * - * To re-size a volume, the %UBI_IOCRSVOL ioctl command of the UBI character - * device should be used. A &struct ubi_rsvol_req object has to be properly - * filled and a pointer to it has to be passed to the ioctl. - * - * UBI volumes re-name - * ~~~~~~~~~~~~~~~~~~~ - * - * To re-name several volumes atomically at one go, the %UBI_IOCRNVOL command - * of the UBI character device should be used. A &struct ubi_rnvol_req object - * has to be properly filled and a pointer to it has to be passed to the ioctl. - * - * UBI volume update - * ~~~~~~~~~~~~~~~~~ - * - * Volume update should be done via the %UBI_IOCVOLUP ioctl command of the - * corresponding UBI volume character device. A pointer to a 64-bit update - * size should be passed to the ioctl. After this, UBI expects user to write - * this number of bytes to the volume character device. The update is finished - * when the claimed number of bytes is passed. So, the volume update sequence - * is something like: - * - * fd = open("/dev/my_volume"); - * ioctl(fd, UBI_IOCVOLUP, &image_size); - * write(fd, buf, image_size); - * close(fd); - * - * Logical eraseblock erase - * ~~~~~~~~~~~~~~~~~~~~~~~~ - * - * To erase a logical eraseblock, the %UBI_IOCEBER ioctl command of the - * corresponding UBI volume character device should be used. This command - * unmaps the requested logical eraseblock, makes sure the corresponding - * physical eraseblock is successfully erased, and returns. - * - * Atomic logical eraseblock change - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * Atomic logical eraseblock change operation is called using the %UBI_IOCEBCH - * ioctl command of the corresponding UBI volume character device. A pointer to - * a &struct ubi_leb_change_req object has to be passed to the ioctl. Then the - * user is expected to write the requested amount of bytes (similarly to what - * should be done in case of the "volume update" ioctl). - * - * Logical eraseblock map - * ~~~~~~~~~~~~~~~~~~~~~ - * - * To map a logical eraseblock to a physical eraseblock, the %UBI_IOCEBMAP - * ioctl command should be used. A pointer to a &struct ubi_map_req object is - * expected to be passed. The ioctl maps the requested logical eraseblock to - * a physical eraseblock and returns. Only non-mapped logical eraseblocks can - * be mapped. If the logical eraseblock specified in the request is already - * mapped to a physical eraseblock, the ioctl fails and returns error. - * - * Logical eraseblock unmap - * ~~~~~~~~~~~~~~~~~~~~~~~~ - * - * To unmap a logical eraseblock to a physical eraseblock, the %UBI_IOCEBUNMAP - * ioctl command should be used. The ioctl unmaps the logical eraseblocks, - * schedules corresponding physical eraseblock for erasure, and returns. Unlike - * the "LEB erase" command, it does not wait for the physical eraseblock being - * erased. Note, the side effect of this is that if an unclean reboot happens - * after the unmap ioctl returns, you may find the LEB mapped again to the same - * physical eraseblock after the UBI is run again. - * - * Check if logical eraseblock is mapped - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * To check if a logical eraseblock is mapped to a physical eraseblock, the - * %UBI_IOCEBISMAP ioctl command should be used. It returns %0 if the LEB is - * not mapped, and %1 if it is mapped. - * - * Set an UBI volume property - * ~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * To set an UBI volume property the %UBI_IOCSETPROP ioctl command should be - * used. A pointer to a &struct ubi_set_vol_prop_req object is expected to be - * passed. The object describes which property should be set, and to which value - * it should be set. - * - * Block devices on UBI volumes - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * To create a R/O block device on top of an UBI volume the %UBI_IOCVOLCRBLK - * should be used. A pointer to a &struct ubi_blkcreate_req object is expected - * to be passed, which is not used and reserved for future usage. - * - * Conversely, to remove a block device the %UBI_IOCVOLRMBLK should be used, - * which takes no arguments. - */ - -/* - * When a new UBI volume or UBI device is created, users may either specify the - * volume/device number they want to create or to let UBI automatically assign - * the number using these constants. - */ -#define UBI_VOL_NUM_AUTO (-1) -#define UBI_DEV_NUM_AUTO (-1) - -/* Maximum volume name length */ -#define UBI_MAX_VOLUME_NAME 127 - -/* ioctl commands of UBI character devices */ - -#define UBI_IOC_MAGIC 'o' - -/* Create an UBI volume */ -#define UBI_IOCMKVOL _IOW(UBI_IOC_MAGIC, 0, struct ubi_mkvol_req) -/* Remove an UBI volume */ -#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, __s32) -/* Re-size an UBI volume */ -#define UBI_IOCRSVOL _IOW(UBI_IOC_MAGIC, 2, struct ubi_rsvol_req) -/* Re-name volumes */ -#define UBI_IOCRNVOL _IOW(UBI_IOC_MAGIC, 3, struct ubi_rnvol_req) - -/* ioctl commands of the UBI control character device */ - -#define UBI_CTRL_IOC_MAGIC 'o' - -/* Attach an MTD device */ -#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req) -/* Detach an MTD device */ -#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, __s32) - -/* ioctl commands of UBI volume character devices */ - -#define UBI_VOL_IOC_MAGIC 'O' - -/* Start UBI volume update - * Note: This actually takes a pointer (__s64*), but we can't change - * that without breaking the ABI on 32bit systems - */ -#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, __s64) -/* LEB erasure command, used for debugging, disabled by default */ -#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, __s32) -/* Atomic LEB change command */ -#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, __s32) -/* Map LEB command */ -#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req) -/* Unmap LEB command */ -#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, __s32) -/* Check if LEB is mapped command */ -#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32) -/* Set an UBI volume property */ -#define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \ - struct ubi_set_vol_prop_req) -/* Create a R/O block device on top of an UBI volume */ -#define UBI_IOCVOLCRBLK _IOW(UBI_VOL_IOC_MAGIC, 7, struct ubi_blkcreate_req) -/* Remove the R/O block device */ -#define UBI_IOCVOLRMBLK _IO(UBI_VOL_IOC_MAGIC, 8) - -/* Maximum MTD device name length supported by UBI */ -#define MAX_UBI_MTD_NAME_LEN 127 - -/* Maximum amount of UBI volumes that can be re-named at one go */ -#define UBI_MAX_RNVOL 32 - -/* - * UBI volume type constants. - * - * @UBI_DYNAMIC_VOLUME: dynamic volume - * @UBI_STATIC_VOLUME: static volume - */ -enum { - UBI_DYNAMIC_VOLUME = 3, - UBI_STATIC_VOLUME = 4, -}; - -/* - * UBI set volume property ioctl constants. - * - * @UBI_VOL_PROP_DIRECT_WRITE: allow (any non-zero value) or disallow (value 0) - * user to directly write and erase individual - * eraseblocks on dynamic volumes - */ -enum { - UBI_VOL_PROP_DIRECT_WRITE = 1, -}; - -/** - * struct ubi_attach_req - attach MTD device request. - * @ubi_num: UBI device number to create - * @mtd_num: MTD device number to attach - * @vid_hdr_offset: VID header offset (use defaults if %0) - * @max_beb_per1024: maximum expected number of bad PEB per 1024 PEBs - * @padding: reserved for future, not used, has to be zeroed - * - * This data structure is used to specify MTD device UBI has to attach and the - * parameters it has to use. The number which should be assigned to the new UBI - * device is passed in @ubi_num. UBI may automatically assign the number if - * @UBI_DEV_NUM_AUTO is passed. In this case, the device number is returned in - * @ubi_num. - * - * Most applications should pass %0 in @vid_hdr_offset to make UBI use default - * offset of the VID header within physical eraseblocks. The default offset is - * the next min. I/O unit after the EC header. For example, it will be offset - * 512 in case of a 512 bytes page NAND flash with no sub-page support. Or - * it will be 512 in case of a 2KiB page NAND flash with 4 512-byte sub-pages. - * - * But in rare cases, if this optimizes things, the VID header may be placed to - * a different offset. For example, the boot-loader might do things faster if - * the VID header sits at the end of the first 2KiB NAND page with 4 sub-pages. - * As the boot-loader would not normally need to read EC headers (unless it - * needs UBI in RW mode), it might be faster to calculate ECC. This is weird - * example, but it real-life example. So, in this example, @vid_hdr_offer would - * be 2KiB-64 bytes = 1984. Note, that this position is not even 512-bytes - * aligned, which is OK, as UBI is clever enough to realize this is 4th - * sub-page of the first page and add needed padding. - * - * The @max_beb_per1024 is the maximum amount of bad PEBs UBI expects on the - * UBI device per 1024 eraseblocks. This value is often given in an other form - * in the NAND datasheet (min NVB i.e. minimal number of valid blocks). The - * maximum expected bad eraseblocks per 1024 is then: - * 1024 * (1 - MinNVB / MaxNVB) - * Which gives 20 for most NAND devices. This limit is used in order to derive - * amount of eraseblock UBI reserves for handling new bad blocks. If the device - * has more bad eraseblocks than this limit, UBI does not reserve any physical - * eraseblocks for new bad eraseblocks, but attempts to use available - * eraseblocks (if any). The accepted range is 0-768. If 0 is given, the - * default kernel value of %CONFIG_MTD_UBI_BEB_LIMIT will be used. - */ -struct ubi_attach_req { - __s32 ubi_num; - __s32 mtd_num; - __s32 vid_hdr_offset; - __s16 max_beb_per1024; - __s8 padding[10]; -}; - -/* - * UBI volume flags. - * - * @UBI_VOL_SKIP_CRC_CHECK_FLG: skip the CRC check done on a static volume at - * open time. Only valid for static volumes and - * should only be used if the volume user has a - * way to verify data integrity - */ -enum { - UBI_VOL_SKIP_CRC_CHECK_FLG = 0x1, -}; - -#define UBI_VOL_VALID_FLGS (UBI_VOL_SKIP_CRC_CHECK_FLG) - -/** - * struct ubi_mkvol_req - volume description data structure used in - * volume creation requests. - * @vol_id: volume number - * @alignment: volume alignment - * @bytes: volume size in bytes - * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME) - * @flags: volume flags (%UBI_VOL_SKIP_CRC_CHECK_FLG) - * @name_len: volume name length - * @padding2: reserved for future, not used, has to be zeroed - * @name: volume name - * - * This structure is used by user-space programs when creating new volumes. The - * @used_bytes field is only necessary when creating static volumes. - * - * The @alignment field specifies the required alignment of the volume logical - * eraseblock. This means, that the size of logical eraseblocks will be aligned - * to this number, i.e., - * (UBI device logical eraseblock size) mod (@alignment) = 0. - * - * To put it differently, the logical eraseblock of this volume may be slightly - * shortened in order to make it properly aligned. The alignment has to be - * multiple of the flash minimal input/output unit, or %1 to utilize the entire - * available space of logical eraseblocks. - * - * The @alignment field may be useful, for example, when one wants to maintain - * a block device on top of an UBI volume. In this case, it is desirable to fit - * an integer number of blocks in logical eraseblocks of this UBI volume. With - * alignment it is possible to update this volume using plane UBI volume image - * BLOBs, without caring about how to properly align them. - */ -struct ubi_mkvol_req { - __s32 vol_id; - __s32 alignment; - __s64 bytes; - __s8 vol_type; - __u8 flags; - __s16 name_len; - __s8 padding2[4]; - char name[UBI_MAX_VOLUME_NAME + 1]; -} __attribute__((packed)); - -/** - * struct ubi_rsvol_req - a data structure used in volume re-size requests. - * @vol_id: ID of the volume to re-size - * @bytes: new size of the volume in bytes - * - * Re-sizing is possible for both dynamic and static volumes. But while dynamic - * volumes may be re-sized arbitrarily, static volumes cannot be made to be - * smaller than the number of bytes they bear. To arbitrarily shrink a static - * volume, it must be wiped out first (by means of volume update operation with - * zero number of bytes). - */ -struct ubi_rsvol_req { - __s64 bytes; - __s32 vol_id; -} __attribute__((packed)); - -/** - * struct ubi_rnvol_req - volumes re-name request. - * @count: count of volumes to re-name - * @padding1: reserved for future, not used, has to be zeroed - * @vol_id: ID of the volume to re-name - * @name_len: name length - * @padding2: reserved for future, not used, has to be zeroed - * @name: new volume name - * - * UBI allows to re-name up to %32 volumes at one go. The count of volumes to - * re-name is specified in the @count field. The ID of the volumes to re-name - * and the new names are specified in the @vol_id and @name fields. - * - * The UBI volume re-name operation is atomic, which means that should power cut - * happen, the volumes will have either old name or new name. So the possible - * use-cases of this command is atomic upgrade. Indeed, to upgrade, say, volumes - * A and B one may create temporary volumes %A1 and %B1 with the new contents, - * then atomically re-name A1->A and B1->B, in which case old %A and %B will - * be removed. - * - * If it is not desirable to remove old A and B, the re-name request has to - * contain 4 entries: A1->A, A->A1, B1->B, B->B1, in which case old A1 and B1 - * become A and B, and old A and B will become A1 and B1. - * - * It is also OK to request: A1->A, A1->X, B1->B, B->Y, in which case old A1 - * and B1 become A and B, and old A and B become X and Y. - * - * In other words, in case of re-naming into an existing volume name, the - * existing volume is removed, unless it is re-named as well at the same - * re-name request. - */ -struct ubi_rnvol_req { - __s32 count; - __s8 padding1[12]; - struct { - __s32 vol_id; - __s16 name_len; - __s8 padding2[2]; - char name[UBI_MAX_VOLUME_NAME + 1]; - } ents[UBI_MAX_RNVOL]; -} __attribute__((packed)); - -/** - * struct ubi_leb_change_req - a data structure used in atomic LEB change - * requests. - * @lnum: logical eraseblock number to change - * @bytes: how many bytes will be written to the logical eraseblock - * @dtype: pass "3" for better compatibility with old kernels - * @padding: reserved for future, not used, has to be zeroed - * - * The @dtype field used to inform UBI about what kind of data will be written - * to the LEB: long term (value 1), short term (value 2), unknown (value 3). - * UBI tried to pick a PEB with lower erase counter for short term data and a - * PEB with higher erase counter for long term data. But this was not really - * used because users usually do not know this and could easily mislead UBI. We - * removed this feature in May 2012. UBI currently just ignores the @dtype - * field. But for better compatibility with older kernels it is recommended to - * set @dtype to 3 (unknown). - */ -struct ubi_leb_change_req { - __s32 lnum; - __s32 bytes; - __s8 dtype; /* obsolete, do not use! */ - __s8 padding[7]; -} __attribute__((packed)); - -/** - * struct ubi_map_req - a data structure used in map LEB requests. - * @dtype: pass "3" for better compatibility with old kernels - * @lnum: logical eraseblock number to unmap - * @padding: reserved for future, not used, has to be zeroed - */ -struct ubi_map_req { - __s32 lnum; - __s8 dtype; /* obsolete, do not use! */ - __s8 padding[3]; -} __attribute__((packed)); - - -/** - * struct ubi_set_vol_prop_req - a data structure used to set an UBI volume - * property. - * @property: property to set (%UBI_VOL_PROP_DIRECT_WRITE) - * @padding: reserved for future, not used, has to be zeroed - * @value: value to set - */ -struct ubi_set_vol_prop_req { - __u8 property; - __u8 padding[7]; - __u64 value; -} __attribute__((packed)); - -/** - * struct ubi_blkcreate_req - a data structure used in block creation requests. - * @padding: reserved for future, not used, has to be zeroed - */ -struct ubi_blkcreate_req { - __s8 padding[128]; -} __attribute__((packed)); - -#endif /* __UBI_USER_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/netinet/in.h b/lib/libc/include/generic-musl/netinet/in.h index fc3036ea73..87076c5c0e 100644 --- a/lib/libc/include/generic-musl/netinet/in.h +++ b/lib/libc/include/generic-musl/netinet/in.h @@ -52,6 +52,7 @@ struct ipv6_mreq { #define INADDR_UNSPEC_GROUP ((in_addr_t) 0xe0000000) #define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001) #define INADDR_ALLRTRS_GROUP ((in_addr_t) 0xe0000002) +#define INADDR_ALLSNOOPERS_GROUP ((in_addr_t) 0xe000006a) #define INADDR_MAX_LOCAL_GROUP ((in_addr_t) 0xe00000ff) #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } @@ -335,6 +336,8 @@ struct ip6_mtuinfo { #define IPV6_V6ONLY 26 #define IPV6_JOIN_ANYCAST 27 #define IPV6_LEAVE_ANYCAST 28 +#define IPV6_MULTICAST_ALL 29 +#define IPV6_ROUTER_ALERT_ISOLATE 30 #define IPV6_IPSEC_POLICY 34 #define IPV6_XFRM_POLICY 35 #define IPV6_HDRINCL 36 diff --git a/lib/libc/include/generic-musl/netinet/tcp.h b/lib/libc/include/generic-musl/netinet/tcp.h index 05e262b520..949f701493 100644 --- a/lib/libc/include/generic-musl/netinet/tcp.h +++ b/lib/libc/include/generic-musl/netinet/tcp.h @@ -72,6 +72,11 @@ enum { TCP_NLA_SND_SSTHRESH, TCP_NLA_DELIVERED, TCP_NLA_DELIVERED_CE, + TCP_NLA_BYTES_SENT, + TCP_NLA_BYTES_RETRANS, + TCP_NLA_DSACK_DUPS, + TCP_NLA_REORD_SEEN, + TCP_NLA_SRTT, }; #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) @@ -225,6 +230,10 @@ struct tcp_info { uint64_t tcpi_sndbuf_limited; uint32_t tcpi_delivered; uint32_t tcpi_delivered_ce; + uint64_t tcpi_bytes_sent; + uint64_t tcpi_bytes_retrans; + uint32_t tcpi_dsack_dups; + uint32_t tcpi_reord_seen; }; #define TCP_MD5SIG_MAXKEYLEN 80 diff --git a/lib/libc/include/generic-musl/netinet/udp.h b/lib/libc/include/generic-musl/netinet/udp.h index 16d716160a..40ca6df985 100644 --- a/lib/libc/include/generic-musl/netinet/udp.h +++ b/lib/libc/include/generic-musl/netinet/udp.h @@ -27,12 +27,14 @@ struct udphdr { #define UDP_NO_CHECK6_TX 101 #define UDP_NO_CHECK6_RX 102 #define UDP_SEGMENT 103 +#define UDP_GRO 104 #define UDP_ENCAP_ESPINUDP_NON_IKE 1 #define UDP_ENCAP_ESPINUDP 2 #define UDP_ENCAP_L2TPINUDP 3 #define UDP_ENCAP_GTP0 4 #define UDP_ENCAP_GTP1U 5 +#define UDP_ENCAP_RXRPC 6 #define SOL_UDP 17 diff --git a/lib/libc/include/generic-musl/netpacket/packet.h b/lib/libc/include/generic-musl/netpacket/packet.h index 0a69a7e05c..65a6d2ae1c 100644 --- a/lib/libc/include/generic-musl/netpacket/packet.h +++ b/lib/libc/include/generic-musl/netpacket/packet.h @@ -48,6 +48,7 @@ struct packet_mreq { #define PACKET_QDISC_BYPASS 20 #define PACKET_ROLLOVER_STATS 21 #define PACKET_FANOUT_DATA 22 +#define PACKET_IGNORE_OUTGOING 23 #define PACKET_MR_MULTICAST 0 #define PACKET_MR_PROMISC 1 diff --git a/lib/libc/include/generic-musl/plugin-api.h b/lib/libc/include/generic-musl/plugin-api.h deleted file mode 100644 index ffd562fc10..0000000000 --- a/lib/libc/include/generic-musl/plugin-api.h +++ /dev/null @@ -1,483 +0,0 @@ -/* plugin-api.h -- External linker plugin API. */ - -/* Copyright (C) 2009-2019 Free Software Foundation, Inc. - Written by Cary Coutant . - - This file is part of 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 defines the interface for writing a linker plugin, which is - described at < http://gcc.gnu.org/wiki/whopr/driver >. */ - -#ifndef PLUGIN_API_H -#define PLUGIN_API_H - -#ifdef HAVE_STDINT_H -#include -#elif defined(HAVE_INTTYPES_H) -#include -#endif -#include -#if !defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H) && \ - !defined(UINT64_MAX) && !defined(uint64_t) -#error cannot find uint64_t type -#endif - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Status code returned by most API routines. */ - -enum ld_plugin_status -{ - LDPS_OK = 0, - LDPS_NO_SYMS, /* Attempt to get symbols that haven't been added. */ - LDPS_BAD_HANDLE, /* No claimed object associated with given handle. */ - LDPS_ERR - /* Additional Error codes TBD. */ -}; - -/* The version of the API specification. */ - -enum ld_plugin_api_version -{ - LD_PLUGIN_API_VERSION = 1 -}; - -/* The type of output file being generated by the linker. */ - -enum ld_plugin_output_file_type -{ - LDPO_REL, - LDPO_EXEC, - LDPO_DYN, - LDPO_PIE -}; - -/* An input file managed by the plugin library. */ - -struct ld_plugin_input_file -{ - const char *name; - int fd; - off_t offset; - off_t filesize; - void *handle; -}; - -/* A symbol belonging to an input file managed by the plugin library. */ - -struct ld_plugin_symbol -{ - char *name; - char *version; - int def; - int visibility; - uint64_t size; - char *comdat_key; - int resolution; -}; - -/* An object's section. */ - -struct ld_plugin_section -{ - const void* handle; - unsigned int shndx; -}; - -/* Whether the symbol is a definition, reference, or common, weak or not. */ - -enum ld_plugin_symbol_kind -{ - LDPK_DEF, - LDPK_WEAKDEF, - LDPK_UNDEF, - LDPK_WEAKUNDEF, - LDPK_COMMON -}; - -/* The visibility of the symbol. */ - -enum ld_plugin_symbol_visibility -{ - LDPV_DEFAULT, - LDPV_PROTECTED, - LDPV_INTERNAL, - LDPV_HIDDEN -}; - -/* How a symbol is resolved. */ - -enum ld_plugin_symbol_resolution -{ - LDPR_UNKNOWN = 0, - - /* Symbol is still undefined at this point. */ - LDPR_UNDEF, - - /* This is the prevailing definition of the symbol, with references from - regular object code. */ - LDPR_PREVAILING_DEF, - - /* This is the prevailing definition of the symbol, with no - references from regular objects. It is only referenced from IR - code. */ - LDPR_PREVAILING_DEF_IRONLY, - - /* This definition was pre-empted by a definition in a regular - object file. */ - LDPR_PREEMPTED_REG, - - /* This definition was pre-empted by a definition in another IR file. */ - LDPR_PREEMPTED_IR, - - /* This symbol was resolved by a definition in another IR file. */ - LDPR_RESOLVED_IR, - - /* This symbol was resolved by a definition in a regular object - linked into the main executable. */ - LDPR_RESOLVED_EXEC, - - /* This symbol was resolved by a definition in a shared object. */ - LDPR_RESOLVED_DYN, - - /* This is the prevailing definition of the symbol, with no - references from regular objects. It is only referenced from IR - code, but the symbol is exported and may be referenced from - a dynamic object (not seen at link time). */ - LDPR_PREVAILING_DEF_IRONLY_EXP -}; - -/* The plugin library's "claim file" handler. */ - -typedef -enum ld_plugin_status -(*ld_plugin_claim_file_handler) ( - const struct ld_plugin_input_file *file, int *claimed); - -/* The plugin library's "all symbols read" handler. */ - -typedef -enum ld_plugin_status -(*ld_plugin_all_symbols_read_handler) (void); - -/* The plugin library's cleanup handler. */ - -typedef -enum ld_plugin_status -(*ld_plugin_cleanup_handler) (void); - -/* The linker's interface for registering the "claim file" handler. */ - -typedef -enum ld_plugin_status -(*ld_plugin_register_claim_file) (ld_plugin_claim_file_handler handler); - -/* The linker's interface for registering the "all symbols read" handler. */ - -typedef -enum ld_plugin_status -(*ld_plugin_register_all_symbols_read) ( - ld_plugin_all_symbols_read_handler handler); - -/* The linker's interface for registering the cleanup handler. */ - -typedef -enum ld_plugin_status -(*ld_plugin_register_cleanup) (ld_plugin_cleanup_handler handler); - -/* The linker's interface for adding symbols from a claimed input file. */ - -typedef -enum ld_plugin_status -(*ld_plugin_add_symbols) (void *handle, int nsyms, - const struct ld_plugin_symbol *syms); - -/* The linker's interface for getting the input file information with - an open (possibly re-opened) file descriptor. */ - -typedef -enum ld_plugin_status -(*ld_plugin_get_input_file) (const void *handle, - struct ld_plugin_input_file *file); - -typedef -enum ld_plugin_status -(*ld_plugin_get_view) (const void *handle, const void **viewp); - -/* The linker's interface for releasing the input file. */ - -typedef -enum ld_plugin_status -(*ld_plugin_release_input_file) (const void *handle); - -/* The linker's interface for retrieving symbol resolution information. */ - -typedef -enum ld_plugin_status -(*ld_plugin_get_symbols) (const void *handle, int nsyms, - struct ld_plugin_symbol *syms); - -/* The linker's interface for adding a compiled input file. */ - -typedef -enum ld_plugin_status -(*ld_plugin_add_input_file) (const char *pathname); - -/* The linker's interface for adding a library that should be searched. */ - -typedef -enum ld_plugin_status -(*ld_plugin_add_input_library) (const char *libname); - -/* The linker's interface for adding a library path that should be searched. */ - -typedef -enum ld_plugin_status -(*ld_plugin_set_extra_library_path) (const char *path); - -/* The linker's interface for issuing a warning or error message. */ - -typedef -enum ld_plugin_status -(*ld_plugin_message) (int level, const char *format, ...); - -/* The linker's interface for retrieving the number of sections in an object. - The handle is obtained in the claim_file handler. This interface should - only be invoked in the claim_file handler. This function sets *COUNT to - the number of sections in the object. */ - -typedef -enum ld_plugin_status -(*ld_plugin_get_input_section_count) (const void* handle, unsigned int *count); - -/* The linker's interface for retrieving the section type of a specific - section in an object. This interface should only be invoked in the - claim_file handler. This function sets *TYPE to an ELF SHT_xxx value. */ - -typedef -enum ld_plugin_status -(*ld_plugin_get_input_section_type) (const struct ld_plugin_section section, - unsigned int *type); - -/* The linker's interface for retrieving the name of a specific section in - an object. This interface should only be invoked in the claim_file handler. - This function sets *SECTION_NAME_PTR to a null-terminated buffer allocated - by malloc. The plugin must free *SECTION_NAME_PTR. */ - -typedef -enum ld_plugin_status -(*ld_plugin_get_input_section_name) (const struct ld_plugin_section section, - char **section_name_ptr); - -/* The linker's interface for retrieving the contents of a specific section - in an object. This interface should only be invoked in the claim_file - handler. This function sets *SECTION_CONTENTS to point to a buffer that is - valid until clam_file handler returns. It sets *LEN to the size of the - buffer. */ - -typedef -enum ld_plugin_status -(*ld_plugin_get_input_section_contents) (const struct ld_plugin_section section, - const unsigned char **section_contents, - size_t* len); - -/* The linker's interface for specifying the desired order of sections. - The sections should be specifed using the array SECTION_LIST in the - order in which they should appear in the final layout. NUM_SECTIONS - specifies the number of entries in each array. This should be invoked - in the all_symbols_read handler. */ - -typedef -enum ld_plugin_status -(*ld_plugin_update_section_order) (const struct ld_plugin_section *section_list, - unsigned int num_sections); - -/* The linker's interface for specifying that reordering of sections is - desired so that the linker can prepare for it. This should be invoked - before update_section_order, preferably in the claim_file handler. */ - -typedef -enum ld_plugin_status -(*ld_plugin_allow_section_ordering) (void); - -/* The linker's interface for specifying that a subset of sections is - to be mapped to a unique segment. If the plugin wants to call - unique_segment_for_sections, it must call this function from a - claim_file_handler or when it is first loaded. */ - -typedef -enum ld_plugin_status -(*ld_plugin_allow_unique_segment_for_sections) (void); - -/* The linker's interface for specifying that a specific set of sections - must be mapped to a unique segment. ELF segments do not have names - and the NAME is used as the name of the newly created output section - that is then placed in the unique PT_LOAD segment. FLAGS is used to - specify if any additional segment flags need to be set. For instance, - a specific segment flag can be set to identify this segment. Unsetting - segment flags that would be set by default is not possible. The - parameter SEGMENT_ALIGNMENT when non-zero will override the default. */ - -typedef -enum ld_plugin_status -(*ld_plugin_unique_segment_for_sections) ( - const char* segment_name, - uint64_t segment_flags, - uint64_t segment_alignment, - const struct ld_plugin_section * section_list, - unsigned int num_sections); - -/* The linker's interface for retrieving the section alignment requirement - of a specific section in an object. This interface should only be invoked in the - claim_file handler. This function sets *ADDRALIGN to the ELF sh_addralign - value of the input section. */ - -typedef -enum ld_plugin_status -(*ld_plugin_get_input_section_alignment) (const struct ld_plugin_section section, - unsigned int *addralign); - -/* The linker's interface for retrieving the section size of a specific section - in an object. This interface should only be invoked in the claim_file handler. - This function sets *SECSIZE to the ELF sh_size - value of the input section. */ - -typedef -enum ld_plugin_status -(*ld_plugin_get_input_section_size) (const struct ld_plugin_section section, - uint64_t *secsize); - -typedef -enum ld_plugin_status -(*ld_plugin_new_input_handler) (const struct ld_plugin_input_file *file); - -/* The linker's interface for registering the "new_input" handler. This handler - will be notified when a new input file has been added after the - all_symbols_read event, allowing the plugin to, for example, set a unique - segment for sections in plugin-generated input files. */ - -typedef -enum ld_plugin_status -(*ld_plugin_register_new_input) (ld_plugin_new_input_handler handler); - -/* The linker's interface for getting the list of wrapped symbols using the - --wrap option. This sets *NUM_SYMBOLS to number of wrapped symbols and - *WRAP_SYMBOL_LIST to the list of wrapped symbols. */ - -typedef -enum ld_plugin_status -(*ld_plugin_get_wrap_symbols) (uint64_t *num_symbols, - const char ***wrap_symbol_list); - -enum ld_plugin_level -{ - LDPL_INFO, - LDPL_WARNING, - LDPL_ERROR, - LDPL_FATAL -}; - -/* Values for the tv_tag field of the transfer vector. */ - -enum ld_plugin_tag -{ - LDPT_NULL = 0, - LDPT_API_VERSION = 1, - LDPT_GOLD_VERSION = 2, - LDPT_LINKER_OUTPUT = 3, - LDPT_OPTION = 4, - LDPT_REGISTER_CLAIM_FILE_HOOK = 5, - LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK = 6, - LDPT_REGISTER_CLEANUP_HOOK = 7, - LDPT_ADD_SYMBOLS = 8, - LDPT_GET_SYMBOLS = 9, - LDPT_ADD_INPUT_FILE = 10, - LDPT_MESSAGE = 11, - LDPT_GET_INPUT_FILE = 12, - LDPT_RELEASE_INPUT_FILE = 13, - LDPT_ADD_INPUT_LIBRARY = 14, - LDPT_OUTPUT_NAME = 15, - LDPT_SET_EXTRA_LIBRARY_PATH = 16, - LDPT_GNU_LD_VERSION = 17, - LDPT_GET_VIEW = 18, - LDPT_GET_INPUT_SECTION_COUNT = 19, - LDPT_GET_INPUT_SECTION_TYPE = 20, - LDPT_GET_INPUT_SECTION_NAME = 21, - LDPT_GET_INPUT_SECTION_CONTENTS = 22, - LDPT_UPDATE_SECTION_ORDER = 23, - LDPT_ALLOW_SECTION_ORDERING = 24, - LDPT_GET_SYMBOLS_V2 = 25, - LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS = 26, - LDPT_UNIQUE_SEGMENT_FOR_SECTIONS = 27, - LDPT_GET_SYMBOLS_V3 = 28, - LDPT_GET_INPUT_SECTION_ALIGNMENT = 29, - LDPT_GET_INPUT_SECTION_SIZE = 30, - LDPT_REGISTER_NEW_INPUT_HOOK = 31, - LDPT_GET_WRAP_SYMBOLS = 32 -}; - -/* The plugin transfer vector. */ - -struct ld_plugin_tv -{ - enum ld_plugin_tag tv_tag; - union - { - int tv_val; - const char *tv_string; - ld_plugin_register_claim_file tv_register_claim_file; - ld_plugin_register_all_symbols_read tv_register_all_symbols_read; - ld_plugin_register_cleanup tv_register_cleanup; - ld_plugin_add_symbols tv_add_symbols; - ld_plugin_get_symbols tv_get_symbols; - ld_plugin_add_input_file tv_add_input_file; - ld_plugin_message tv_message; - ld_plugin_get_input_file tv_get_input_file; - ld_plugin_get_view tv_get_view; - ld_plugin_release_input_file tv_release_input_file; - ld_plugin_add_input_library tv_add_input_library; - ld_plugin_set_extra_library_path tv_set_extra_library_path; - ld_plugin_get_input_section_count tv_get_input_section_count; - ld_plugin_get_input_section_type tv_get_input_section_type; - ld_plugin_get_input_section_name tv_get_input_section_name; - ld_plugin_get_input_section_contents tv_get_input_section_contents; - ld_plugin_update_section_order tv_update_section_order; - ld_plugin_allow_section_ordering tv_allow_section_ordering; - ld_plugin_allow_unique_segment_for_sections tv_allow_unique_segment_for_sections; - ld_plugin_unique_segment_for_sections tv_unique_segment_for_sections; - ld_plugin_get_input_section_alignment tv_get_input_section_alignment; - ld_plugin_get_input_section_size tv_get_input_section_size; - ld_plugin_register_new_input tv_register_new_input; - ld_plugin_get_wrap_symbols tv_get_wrap_symbols; - } tv_u; -}; - -/* The plugin library's "onload" entry point. */ - -typedef -enum ld_plugin_status -(*ld_plugin_onload) (struct ld_plugin_tv *tv); - -#ifdef __cplusplus -} -#endif - -#endif /* !defined(PLUGIN_API_H) */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/bnxt_re-abi.h b/lib/libc/include/generic-musl/rdma/bnxt_re-abi.h deleted file mode 100644 index 9eab2b0aec..0000000000 --- a/lib/libc/include/generic-musl/rdma/bnxt_re-abi.h +++ /dev/null @@ -1,106 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ -/* - * Broadcom NetXtreme-E RoCE driver. - * - * Copyright (c) 2016 - 2017, Broadcom. All rights reserved. The term - * Broadcom refers to Broadcom Limited and/or its subsidiaries. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * BSD license below: - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 OR CONTRIBUTORS - * 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. - * - * Description: Uverbs ABI header file - */ - -#ifndef __BNXT_RE_UVERBS_ABI_H__ -#define __BNXT_RE_UVERBS_ABI_H__ - -#include - -#define BNXT_RE_ABI_VERSION 1 - -struct bnxt_re_uctx_resp { - __u32 dev_id; - __u32 max_qp; - __u32 pg_size; - __u32 cqe_sz; - __u32 max_cqd; - __u32 rsvd; -}; - -/* - * This struct is placed after the ib_uverbs_alloc_pd_resp struct, which is - * not 8 byted aligned. To avoid undesired padding in various cases we have to - * set this struct to packed. - */ -struct bnxt_re_pd_resp { - __u32 pdid; - __u32 dpi; - __u64 dbr; -} __attribute__((packed, aligned(4))); - -struct bnxt_re_cq_req { - __aligned_u64 cq_va; - __aligned_u64 cq_handle; -}; - -struct bnxt_re_cq_resp { - __u32 cqid; - __u32 tail; - __u32 phase; - __u32 rsvd; -}; - -struct bnxt_re_qp_req { - __aligned_u64 qpsva; - __aligned_u64 qprva; - __aligned_u64 qp_handle; -}; - -struct bnxt_re_qp_resp { - __u32 qpid; - __u32 rsvd; -}; - -struct bnxt_re_srq_req { - __aligned_u64 srqva; - __aligned_u64 srq_handle; -}; - -struct bnxt_re_srq_resp { - __u32 srqid; -}; - -enum bnxt_re_shpg_offt { - BNXT_RE_BEG_RESV_OFFT = 0x00, - BNXT_RE_AVID_OFFT = 0x10, - BNXT_RE_AVID_SIZE = 0x04, - BNXT_RE_END_RESV_OFFT = 0xFF0 -}; - -#endif /* __BNXT_RE_UVERBS_ABI_H__*/ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/cxgb3-abi.h b/lib/libc/include/generic-musl/rdma/cxgb3-abi.h deleted file mode 100644 index 6e1b36da46..0000000000 --- a/lib/libc/include/generic-musl/rdma/cxgb3-abi.h +++ /dev/null @@ -1,82 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2006 Chelsio, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef CXGB3_ABI_USER_H -#define CXGB3_ABI_USER_H - -#include - -#define IWCH_UVERBS_ABI_VERSION 1 - -/* - * Make sure that all structs defined in this file remain laid out so - * that they pack the same way on 32-bit and 64-bit architectures (to - * avoid incompatibility between 32-bit userspace and 64-bit kernels). - * In particular do not use pointer types -- pass pointers in __aligned_u64 - * instead. - */ -struct iwch_create_cq_req { - __aligned_u64 user_rptr_addr; -}; - -struct iwch_create_cq_resp_v0 { - __aligned_u64 key; - __u32 cqid; - __u32 size_log2; -}; - -struct iwch_create_cq_resp { - __aligned_u64 key; - __u32 cqid; - __u32 size_log2; - __u32 memsize; - __u32 reserved; -}; - -struct iwch_create_qp_resp { - __aligned_u64 key; - __aligned_u64 db_key; - __u32 qpid; - __u32 size_log2; - __u32 sq_size_log2; - __u32 rq_size_log2; -}; - -struct iwch_reg_user_mr_resp { - __u32 pbl_addr; -}; - -struct iwch_alloc_pd_resp { - __u32 pdid; -}; - -#endif /* CXGB3_ABI_USER_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/cxgb4-abi.h b/lib/libc/include/generic-musl/rdma/cxgb4-abi.h deleted file mode 100644 index 8ab7cb26ea..0000000000 --- a/lib/libc/include/generic-musl/rdma/cxgb4-abi.h +++ /dev/null @@ -1,115 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2009-2010 Chelsio, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef CXGB4_ABI_USER_H -#define CXGB4_ABI_USER_H - -#include - -#define C4IW_UVERBS_ABI_VERSION 3 - -/* - * Make sure that all structs defined in this file remain laid out so - * that they pack the same way on 32-bit and 64-bit architectures (to - * avoid incompatibility between 32-bit userspace and 64-bit kernels). - * In particular do not use pointer types -- pass pointers in __aligned_u64 - * instead. - */ - -enum { - C4IW_64B_CQE = (1 << 0) -}; - -struct c4iw_create_cq { - __u32 flags; - __u32 reserved; -}; - -struct c4iw_create_cq_resp { - __aligned_u64 key; - __aligned_u64 gts_key; - __aligned_u64 memsize; - __u32 cqid; - __u32 size; - __u32 qid_mask; - __u32 flags; -}; - -enum { - C4IW_QPF_ONCHIP = (1 << 0), - C4IW_QPF_WRITE_W_IMM = (1 << 1) -}; - -struct c4iw_create_qp_resp { - __aligned_u64 ma_sync_key; - __aligned_u64 sq_key; - __aligned_u64 rq_key; - __aligned_u64 sq_db_gts_key; - __aligned_u64 rq_db_gts_key; - __aligned_u64 sq_memsize; - __aligned_u64 rq_memsize; - __u32 sqid; - __u32 rqid; - __u32 sq_size; - __u32 rq_size; - __u32 qid_mask; - __u32 flags; -}; - -struct c4iw_create_srq_resp { - __aligned_u64 srq_key; - __aligned_u64 srq_db_gts_key; - __aligned_u64 srq_memsize; - __u32 srqid; - __u32 srq_size; - __u32 rqt_abs_idx; - __u32 qid_mask; - __u32 flags; - __u32 reserved; /* explicit padding */ -}; - -enum { - /* HW supports SRQ_LIMIT_REACHED event */ - T4_SRQ_LIMIT_SUPPORT = 1 << 0, -}; - -struct c4iw_alloc_ucontext_resp { - __aligned_u64 status_page_key; - __u32 status_page_size; - __u32 reserved; /* explicit padding (optional for i386) */ -}; - -struct c4iw_alloc_pd_resp { - __u32 pdid; -}; - -#endif /* CXGB4_ABI_USER_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/hfi/hfi1_ioctl.h b/lib/libc/include/generic-musl/rdma/hfi/hfi1_ioctl.h deleted file mode 100644 index 07d9c8abc4..0000000000 --- a/lib/libc/include/generic-musl/rdma/hfi/hfi1_ioctl.h +++ /dev/null @@ -1,174 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ -/* - * - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2015 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * 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. - * - * BSD LICENSE - * - * Copyright(c) 2015 Intel Corporation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - 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. - * - Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "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 COPYRIGHT - * OWNER OR CONTRIBUTORS 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. - * - */ - -#ifndef _LINUX__HFI1_IOCTL_H -#define _LINUX__HFI1_IOCTL_H -#include - -/* - * This structure is passed to the driver to tell it where - * user code buffers are, sizes, etc. The offsets and sizes of the - * fields must remain unchanged, for binary compatibility. It can - * be extended, if userversion is changed so user code can tell, if needed - */ -struct hfi1_user_info { - /* - * version of user software, to detect compatibility issues. - * Should be set to HFI1_USER_SWVERSION. - */ - __u32 userversion; - __u32 pad; - /* - * If two or more processes wish to share a context, each process - * must set the subcontext_cnt and subcontext_id to the same - * values. The only restriction on the subcontext_id is that - * it be unique for a given node. - */ - __u16 subctxt_cnt; - __u16 subctxt_id; - /* 128bit UUID passed in by PSM. */ - __u8 uuid[16]; -}; - -struct hfi1_ctxt_info { - __aligned_u64 runtime_flags; /* chip/drv runtime flags (HFI1_CAP_*) */ - __u32 rcvegr_size; /* size of each eager buffer */ - __u16 num_active; /* number of active units */ - __u16 unit; /* unit (chip) assigned to caller */ - __u16 ctxt; /* ctxt on unit assigned to caller */ - __u16 subctxt; /* subctxt on unit assigned to caller */ - __u16 rcvtids; /* number of Rcv TIDs for this context */ - __u16 credits; /* number of PIO credits for this context */ - __u16 numa_node; /* NUMA node of the assigned device */ - __u16 rec_cpu; /* cpu # for affinity (0xffff if none) */ - __u16 send_ctxt; /* send context in use by this user context */ - __u16 egrtids; /* number of RcvArray entries for Eager Rcvs */ - __u16 rcvhdrq_cnt; /* number of RcvHdrQ entries */ - __u16 rcvhdrq_entsize; /* size (in bytes) for each RcvHdrQ entry */ - __u16 sdma_ring_size; /* number of entries in SDMA request ring */ -}; - -struct hfi1_tid_info { - /* virtual address of first page in transfer */ - __aligned_u64 vaddr; - /* pointer to tid array. this array is big enough */ - __aligned_u64 tidlist; - /* number of tids programmed by this request */ - __u32 tidcnt; - /* length of transfer buffer programmed by this request */ - __u32 length; -}; - -/* - * This structure is returned by the driver immediately after - * open to get implementation-specific info, and info specific to this - * instance. - * - * This struct must have explicit pad fields where type sizes - * may result in different alignments between 32 and 64 bit - * programs, since the 64 bit * bit kernel requires the user code - * to have matching offsets - */ -struct hfi1_base_info { - /* version of hardware, for feature checking. */ - __u32 hw_version; - /* version of software, for feature checking. */ - __u32 sw_version; - /* Job key */ - __u16 jkey; - __u16 padding1; - /* - * The special QP (queue pair) value that identifies PSM - * protocol packet from standard IB packets. - */ - __u32 bthqp; - /* PIO credit return address, */ - __aligned_u64 sc_credits_addr; - /* - * Base address of write-only pio buffers for this process. - * Each buffer has sendpio_credits*64 bytes. - */ - __aligned_u64 pio_bufbase_sop; - /* - * Base address of write-only pio buffers for this process. - * Each buffer has sendpio_credits*64 bytes. - */ - __aligned_u64 pio_bufbase; - /* address where receive buffer queue is mapped into */ - __aligned_u64 rcvhdr_bufbase; - /* base address of Eager receive buffers. */ - __aligned_u64 rcvegr_bufbase; - /* base address of SDMA completion ring */ - __aligned_u64 sdma_comp_bufbase; - /* - * User register base for init code, not to be used directly by - * protocol or applications. Always maps real chip register space. - * the register addresses are: - * ur_rcvhdrhead, ur_rcvhdrtail, ur_rcvegrhead, ur_rcvegrtail, - * ur_rcvtidflow - */ - __aligned_u64 user_regbase; - /* notification events */ - __aligned_u64 events_bufbase; - /* status page */ - __aligned_u64 status_bufbase; - /* rcvhdrtail update */ - __aligned_u64 rcvhdrtail_base; - /* - * shared memory pages for subctxts if ctxt is shared; these cover - * all the processes in the group sharing a single context. - * all have enough space for the num_subcontexts value on this job. - */ - __aligned_u64 subctxt_uregbase; - __aligned_u64 subctxt_rcvegrbuf; - __aligned_u64 subctxt_rcvhdrbuf; -}; -#endif /* _LINIUX__HFI1_IOCTL_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/hfi/hfi1_user.h b/lib/libc/include/generic-musl/rdma/hfi/hfi1_user.h deleted file mode 100644 index f15f5c52ac..0000000000 --- a/lib/libc/include/generic-musl/rdma/hfi/hfi1_user.h +++ /dev/null @@ -1,267 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ -/* - * - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2015 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * 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. - * - * BSD LICENSE - * - * Copyright(c) 2015 Intel Corporation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - 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. - * - Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "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 COPYRIGHT - * OWNER OR CONTRIBUTORS 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. - * - */ - -/* - * This file contains defines, structures, etc. that are used - * to communicate between kernel and user code. - */ - -#ifndef _LINUX__HFI1_USER_H -#define _LINUX__HFI1_USER_H - -#include -#include - -/* - * This version number is given to the driver by the user code during - * initialization in the spu_userversion field of hfi1_user_info, so - * the driver can check for compatibility with user code. - * - * The major version changes when data structures change in an incompatible - * way. The driver must be the same for initialization to succeed. - */ -#define HFI1_USER_SWMAJOR 6 - -/* - * Minor version differences are always compatible - * a within a major version, however if user software is larger - * than driver software, some new features and/or structure fields - * may not be implemented; the user code must deal with this if it - * cares, or it must abort after initialization reports the difference. - */ -#define HFI1_USER_SWMINOR 3 - -/* - * We will encode the major/minor inside a single 32bit version number. - */ -#define HFI1_SWMAJOR_SHIFT 16 - -/* - * Set of HW and driver capability/feature bits. - * These bit values are used to configure enabled/disabled HW and - * driver features. The same set of bits are communicated to user - * space. - */ -#define HFI1_CAP_DMA_RTAIL (1UL << 0) /* Use DMA'ed RTail value */ -#define HFI1_CAP_SDMA (1UL << 1) /* Enable SDMA support */ -#define HFI1_CAP_SDMA_AHG (1UL << 2) /* Enable SDMA AHG support */ -#define HFI1_CAP_EXTENDED_PSN (1UL << 3) /* Enable Extended PSN support */ -#define HFI1_CAP_HDRSUPP (1UL << 4) /* Enable Header Suppression */ -/* 1UL << 5 unused */ -#define HFI1_CAP_USE_SDMA_HEAD (1UL << 6) /* DMA Hdr Q tail vs. use CSR */ -#define HFI1_CAP_MULTI_PKT_EGR (1UL << 7) /* Enable multi-packet Egr buffs*/ -#define HFI1_CAP_NODROP_RHQ_FULL (1UL << 8) /* Don't drop on Hdr Q full */ -#define HFI1_CAP_NODROP_EGR_FULL (1UL << 9) /* Don't drop on EGR buffs full */ -#define HFI1_CAP_TID_UNMAP (1UL << 10) /* Disable Expected TID caching */ -#define HFI1_CAP_PRINT_UNIMPL (1UL << 11) /* Show for unimplemented feats */ -#define HFI1_CAP_ALLOW_PERM_JKEY (1UL << 12) /* Allow use of permissive JKEY */ -#define HFI1_CAP_NO_INTEGRITY (1UL << 13) /* Enable ctxt integrity checks */ -#define HFI1_CAP_PKEY_CHECK (1UL << 14) /* Enable ctxt PKey checking */ -#define HFI1_CAP_STATIC_RATE_CTRL (1UL << 15) /* Allow PBC.StaticRateControl */ -/* 1UL << 16 unused */ -#define HFI1_CAP_SDMA_HEAD_CHECK (1UL << 17) /* SDMA head checking */ -#define HFI1_CAP_EARLY_CREDIT_RETURN (1UL << 18) /* early credit return */ - -#define HFI1_RCVHDR_ENTSIZE_2 (1UL << 0) -#define HFI1_RCVHDR_ENTSIZE_16 (1UL << 1) -#define HFI1_RCVDHR_ENTSIZE_32 (1UL << 2) - -#define _HFI1_EVENT_FROZEN_BIT 0 -#define _HFI1_EVENT_LINKDOWN_BIT 1 -#define _HFI1_EVENT_LID_CHANGE_BIT 2 -#define _HFI1_EVENT_LMC_CHANGE_BIT 3 -#define _HFI1_EVENT_SL2VL_CHANGE_BIT 4 -#define _HFI1_EVENT_TID_MMU_NOTIFY_BIT 5 -#define _HFI1_MAX_EVENT_BIT _HFI1_EVENT_TID_MMU_NOTIFY_BIT - -#define HFI1_EVENT_FROZEN (1UL << _HFI1_EVENT_FROZEN_BIT) -#define HFI1_EVENT_LINKDOWN (1UL << _HFI1_EVENT_LINKDOWN_BIT) -#define HFI1_EVENT_LID_CHANGE (1UL << _HFI1_EVENT_LID_CHANGE_BIT) -#define HFI1_EVENT_LMC_CHANGE (1UL << _HFI1_EVENT_LMC_CHANGE_BIT) -#define HFI1_EVENT_SL2VL_CHANGE (1UL << _HFI1_EVENT_SL2VL_CHANGE_BIT) -#define HFI1_EVENT_TID_MMU_NOTIFY (1UL << _HFI1_EVENT_TID_MMU_NOTIFY_BIT) - -/* - * These are the status bits readable (in ASCII form, 64bit value) - * from the "status" sysfs file. For binary compatibility, values - * must remain as is; removed states can be reused for different - * purposes. - */ -#define HFI1_STATUS_INITTED 0x1 /* basic initialization done */ -/* Chip has been found and initialized */ -#define HFI1_STATUS_CHIP_PRESENT 0x20 -/* IB link is at ACTIVE, usable for data traffic */ -#define HFI1_STATUS_IB_READY 0x40 -/* link is configured, LID, MTU, etc. have been set */ -#define HFI1_STATUS_IB_CONF 0x80 -/* A Fatal hardware error has occurred. */ -#define HFI1_STATUS_HWERROR 0x200 - -/* - * Number of supported shared contexts. - * This is the maximum number of software contexts that can share - * a hardware send/receive context. - */ -#define HFI1_MAX_SHARED_CTXTS 8 - -/* - * Poll types - */ -#define HFI1_POLL_TYPE_ANYRCV 0x0 -#define HFI1_POLL_TYPE_URGENT 0x1 - -enum hfi1_sdma_comp_state { - FREE = 0, - QUEUED, - COMPLETE, - ERROR -}; - -/* - * SDMA completion ring entry - */ -struct hfi1_sdma_comp_entry { - __u32 status; - __u32 errcode; -}; - -/* - * Device status and notifications from driver to user-space. - */ -struct hfi1_status { - __aligned_u64 dev; /* device/hw status bits */ - __aligned_u64 port; /* port state and status bits */ - char freezemsg[0]; -}; - -enum sdma_req_opcode { - EXPECTED = 0, - EAGER -}; - -#define HFI1_SDMA_REQ_VERSION_MASK 0xF -#define HFI1_SDMA_REQ_VERSION_SHIFT 0x0 -#define HFI1_SDMA_REQ_OPCODE_MASK 0xF -#define HFI1_SDMA_REQ_OPCODE_SHIFT 0x4 -#define HFI1_SDMA_REQ_IOVCNT_MASK 0xFF -#define HFI1_SDMA_REQ_IOVCNT_SHIFT 0x8 - -struct sdma_req_info { - /* - * bits 0-3 - version (currently unused) - * bits 4-7 - opcode (enum sdma_req_opcode) - * bits 8-15 - io vector count - */ - __u16 ctrl; - /* - * Number of fragments contained in this request. - * User-space has already computed how many - * fragment-sized packet the user buffer will be - * split into. - */ - __u16 npkts; - /* - * Size of each fragment the user buffer will be - * split into. - */ - __u16 fragsize; - /* - * Index of the slot in the SDMA completion ring - * this request should be using. User-space is - * in charge of managing its own ring. - */ - __u16 comp_idx; -} __attribute__((__packed__)); - -/* - * SW KDETH header. - * swdata is SW defined portion. - */ -struct hfi1_kdeth_header { - __le32 ver_tid_offset; - __le16 jkey; - __le16 hcrc; - __le32 swdata[7]; -} __attribute__((__packed__)); - -/* - * Structure describing the headers that User space uses. The - * structure above is a subset of this one. - */ -struct hfi1_pkt_header { - __le16 pbc[4]; - __be16 lrh[4]; - __be32 bth[3]; - struct hfi1_kdeth_header kdeth; -} __attribute__((__packed__)); - - -/* - * The list of usermode accessible registers. - */ -enum hfi1_ureg { - /* (RO) DMA RcvHdr to be used next. */ - ur_rcvhdrtail = 0, - /* (RW) RcvHdr entry to be processed next by host. */ - ur_rcvhdrhead = 1, - /* (RO) Index of next Eager index to use. */ - ur_rcvegrindextail = 2, - /* (RW) Eager TID to be processed next */ - ur_rcvegrindexhead = 3, - /* (RO) Receive Eager Offset Tail */ - ur_rcvegroffsettail = 4, - /* For internal use only; max register number. */ - ur_maxreg, - /* (RW) Receive TID flow table */ - ur_rcvtidflowtable = 256 -}; - -#endif /* _LINIUX__HFI1_USER_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/hns-abi.h b/lib/libc/include/generic-musl/rdma/hns-abi.h deleted file mode 100644 index 1e1f7e8da8..0000000000 --- a/lib/libc/include/generic-musl/rdma/hns-abi.h +++ /dev/null @@ -1,72 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2016 Hisilicon Limited. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef HNS_ABI_USER_H -#define HNS_ABI_USER_H - -#include - -struct hns_roce_ib_create_cq { - __aligned_u64 buf_addr; - __aligned_u64 db_addr; -}; - -struct hns_roce_ib_create_cq_resp { - __aligned_u64 cqn; /* Only 32 bits used, 64 for compat */ - __aligned_u64 cap_flags; -}; - -struct hns_roce_ib_create_qp { - __aligned_u64 buf_addr; - __aligned_u64 db_addr; - __u8 log_sq_bb_count; - __u8 log_sq_stride; - __u8 sq_no_prefetch; - __u8 reserved[5]; - __aligned_u64 sdb_addr; -}; - -struct hns_roce_ib_create_qp_resp { - __aligned_u64 cap_flags; -}; - -struct hns_roce_ib_alloc_ucontext_resp { - __u32 qp_tab_size; - __u32 reserved; -}; - -struct hns_roce_ib_alloc_pd_resp { - __u32 pdn; -}; - -#endif /* HNS_ABI_USER_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/i40iw-abi.h b/lib/libc/include/generic-musl/rdma/i40iw-abi.h deleted file mode 100644 index cef8c4624d..0000000000 --- a/lib/libc/include/generic-musl/rdma/i40iw-abi.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2006 - 2016 Intel Corporation. All rights reserved. - * Copyright (c) 2005 Topspin Communications. All rights reserved. - * Copyright (c) 2005 Cisco Systems. All rights reserved. - * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - */ - -#ifndef I40IW_ABI_H -#define I40IW_ABI_H - -#include - -#define I40IW_ABI_VER 5 - -struct i40iw_alloc_ucontext_req { - __u32 reserved32; - __u8 userspace_ver; - __u8 reserved8[3]; -}; - -struct i40iw_alloc_ucontext_resp { - __u32 max_pds; /* maximum pds allowed for this user process */ - __u32 max_qps; /* maximum qps allowed for this user process */ - __u32 wq_size; /* size of the WQs (sq+rq) allocated to the mmaped area */ - __u8 kernel_ver; - __u8 reserved[3]; -}; - -struct i40iw_alloc_pd_resp { - __u32 pd_id; - __u8 reserved[4]; -}; - -struct i40iw_create_cq_req { - __aligned_u64 user_cq_buffer; - __aligned_u64 user_shadow_area; -}; - -struct i40iw_create_qp_req { - __aligned_u64 user_wqe_buffers; - __aligned_u64 user_compl_ctx; - - /* UDA QP PHB */ - __aligned_u64 user_sq_phb; /* place for VA of the sq phb buff */ - __aligned_u64 user_rq_phb; /* place for VA of the rq phb buff */ -}; - -enum i40iw_memreg_type { - IW_MEMREG_TYPE_MEM = 0x0000, - IW_MEMREG_TYPE_QP = 0x0001, - IW_MEMREG_TYPE_CQ = 0x0002, -}; - -struct i40iw_mem_reg_req { - __u16 reg_type; /* Memory, QP or CQ */ - __u16 cq_pages; - __u16 rq_pages; - __u16 sq_pages; -}; - -struct i40iw_create_cq_resp { - __u32 cq_id; - __u32 cq_size; - __u32 mmap_db_index; - __u32 reserved; -}; - -struct i40iw_create_qp_resp { - __u32 qp_id; - __u32 actual_sq_size; - __u32 actual_rq_size; - __u32 i40iw_drv_opt; - __u16 push_idx; - __u8 lsmm; - __u8 rsvd2; -}; - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/ib_user_cm.h b/lib/libc/include/generic-musl/rdma/ib_user_cm.h deleted file mode 100644 index 9637f729ad..0000000000 --- a/lib/libc/include/generic-musl/rdma/ib_user_cm.h +++ /dev/null @@ -1,326 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2005 Topspin Communications. All rights reserved. - * Copyright (c) 2005 Intel Corporation. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef IB_USER_CM_H -#define IB_USER_CM_H - -#include -#include - -#define IB_USER_CM_ABI_VERSION 5 - -enum { - IB_USER_CM_CMD_CREATE_ID, - IB_USER_CM_CMD_DESTROY_ID, - IB_USER_CM_CMD_ATTR_ID, - - IB_USER_CM_CMD_LISTEN, - IB_USER_CM_CMD_NOTIFY, - - IB_USER_CM_CMD_SEND_REQ, - IB_USER_CM_CMD_SEND_REP, - IB_USER_CM_CMD_SEND_RTU, - IB_USER_CM_CMD_SEND_DREQ, - IB_USER_CM_CMD_SEND_DREP, - IB_USER_CM_CMD_SEND_REJ, - IB_USER_CM_CMD_SEND_MRA, - IB_USER_CM_CMD_SEND_LAP, - IB_USER_CM_CMD_SEND_APR, - IB_USER_CM_CMD_SEND_SIDR_REQ, - IB_USER_CM_CMD_SEND_SIDR_REP, - - IB_USER_CM_CMD_EVENT, - IB_USER_CM_CMD_INIT_QP_ATTR, -}; -/* - * command ABI structures. - */ -struct ib_ucm_cmd_hdr { - __u32 cmd; - __u16 in; - __u16 out; -}; - -struct ib_ucm_create_id { - __aligned_u64 uid; - __aligned_u64 response; -}; - -struct ib_ucm_create_id_resp { - __u32 id; -}; - -struct ib_ucm_destroy_id { - __aligned_u64 response; - __u32 id; - __u32 reserved; -}; - -struct ib_ucm_destroy_id_resp { - __u32 events_reported; -}; - -struct ib_ucm_attr_id { - __aligned_u64 response; - __u32 id; - __u32 reserved; -}; - -struct ib_ucm_attr_id_resp { - __be64 service_id; - __be64 service_mask; - __be32 local_id; - __be32 remote_id; -}; - -struct ib_ucm_init_qp_attr { - __aligned_u64 response; - __u32 id; - __u32 qp_state; -}; - -struct ib_ucm_listen { - __be64 service_id; - __be64 service_mask; - __u32 id; - __u32 reserved; -}; - -struct ib_ucm_notify { - __u32 id; - __u32 event; -}; - -struct ib_ucm_private_data { - __aligned_u64 data; - __u32 id; - __u8 len; - __u8 reserved[3]; -}; - -struct ib_ucm_req { - __u32 id; - __u32 qpn; - __u32 qp_type; - __u32 psn; - __be64 sid; - __aligned_u64 data; - __aligned_u64 primary_path; - __aligned_u64 alternate_path; - __u8 len; - __u8 peer_to_peer; - __u8 responder_resources; - __u8 initiator_depth; - __u8 remote_cm_response_timeout; - __u8 flow_control; - __u8 local_cm_response_timeout; - __u8 retry_count; - __u8 rnr_retry_count; - __u8 max_cm_retries; - __u8 srq; - __u8 reserved[5]; -}; - -struct ib_ucm_rep { - __aligned_u64 uid; - __aligned_u64 data; - __u32 id; - __u32 qpn; - __u32 psn; - __u8 len; - __u8 responder_resources; - __u8 initiator_depth; - __u8 target_ack_delay; - __u8 failover_accepted; - __u8 flow_control; - __u8 rnr_retry_count; - __u8 srq; - __u8 reserved[4]; -}; - -struct ib_ucm_info { - __u32 id; - __u32 status; - __aligned_u64 info; - __aligned_u64 data; - __u8 info_len; - __u8 data_len; - __u8 reserved[6]; -}; - -struct ib_ucm_mra { - __aligned_u64 data; - __u32 id; - __u8 len; - __u8 timeout; - __u8 reserved[2]; -}; - -struct ib_ucm_lap { - __aligned_u64 path; - __aligned_u64 data; - __u32 id; - __u8 len; - __u8 reserved[3]; -}; - -struct ib_ucm_sidr_req { - __u32 id; - __u32 timeout; - __be64 sid; - __aligned_u64 data; - __aligned_u64 path; - __u16 reserved_pkey; - __u8 len; - __u8 max_cm_retries; - __u8 reserved[4]; -}; - -struct ib_ucm_sidr_rep { - __u32 id; - __u32 qpn; - __u32 qkey; - __u32 status; - __aligned_u64 info; - __aligned_u64 data; - __u8 info_len; - __u8 data_len; - __u8 reserved[6]; -}; -/* - * event notification ABI structures. - */ -struct ib_ucm_event_get { - __aligned_u64 response; - __aligned_u64 data; - __aligned_u64 info; - __u8 data_len; - __u8 info_len; - __u8 reserved[6]; -}; - -struct ib_ucm_req_event_resp { - struct ib_user_path_rec primary_path; - struct ib_user_path_rec alternate_path; - __be64 remote_ca_guid; - __u32 remote_qkey; - __u32 remote_qpn; - __u32 qp_type; - __u32 starting_psn; - __u8 responder_resources; - __u8 initiator_depth; - __u8 local_cm_response_timeout; - __u8 flow_control; - __u8 remote_cm_response_timeout; - __u8 retry_count; - __u8 rnr_retry_count; - __u8 srq; - __u8 port; - __u8 reserved[7]; -}; - -struct ib_ucm_rep_event_resp { - __be64 remote_ca_guid; - __u32 remote_qkey; - __u32 remote_qpn; - __u32 starting_psn; - __u8 responder_resources; - __u8 initiator_depth; - __u8 target_ack_delay; - __u8 failover_accepted; - __u8 flow_control; - __u8 rnr_retry_count; - __u8 srq; - __u8 reserved[5]; -}; - -struct ib_ucm_rej_event_resp { - __u32 reason; - /* ari in ib_ucm_event_get info field. */ -}; - -struct ib_ucm_mra_event_resp { - __u8 timeout; - __u8 reserved[3]; -}; - -struct ib_ucm_lap_event_resp { - struct ib_user_path_rec path; -}; - -struct ib_ucm_apr_event_resp { - __u32 status; - /* apr info in ib_ucm_event_get info field. */ -}; - -struct ib_ucm_sidr_req_event_resp { - __u16 pkey; - __u8 port; - __u8 reserved; -}; - -struct ib_ucm_sidr_rep_event_resp { - __u32 status; - __u32 qkey; - __u32 qpn; - /* info in ib_ucm_event_get info field. */ -}; - -#define IB_UCM_PRES_DATA 0x01 -#define IB_UCM_PRES_INFO 0x02 -#define IB_UCM_PRES_PRIMARY 0x04 -#define IB_UCM_PRES_ALTERNATE 0x08 - -struct ib_ucm_event_resp { - __aligned_u64 uid; - __u32 id; - __u32 event; - __u32 present; - __u32 reserved; - union { - struct ib_ucm_req_event_resp req_resp; - struct ib_ucm_rep_event_resp rep_resp; - struct ib_ucm_rej_event_resp rej_resp; - struct ib_ucm_mra_event_resp mra_resp; - struct ib_ucm_lap_event_resp lap_resp; - struct ib_ucm_apr_event_resp apr_resp; - - struct ib_ucm_sidr_req_event_resp sidr_req_resp; - struct ib_ucm_sidr_rep_event_resp sidr_rep_resp; - - __u32 send_status; - } u; -}; - -#endif /* IB_USER_CM_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/ib_user_ioctl_cmds.h b/lib/libc/include/generic-musl/rdma/ib_user_ioctl_cmds.h deleted file mode 100644 index 5d756e099b..0000000000 --- a/lib/libc/include/generic-musl/rdma/ib_user_ioctl_cmds.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef IB_USER_IOCTL_CMDS_H -#define IB_USER_IOCTL_CMDS_H - -#define UVERBS_ID_NS_MASK 0xF000 -#define UVERBS_ID_NS_SHIFT 12 - -#define UVERBS_UDATA_DRIVER_DATA_NS 1 -#define UVERBS_UDATA_DRIVER_DATA_FLAG (1UL << UVERBS_ID_NS_SHIFT) - -enum uverbs_default_objects { - UVERBS_OBJECT_DEVICE, /* No instances of DEVICE are allowed */ - UVERBS_OBJECT_PD, - UVERBS_OBJECT_COMP_CHANNEL, - UVERBS_OBJECT_CQ, - UVERBS_OBJECT_QP, - UVERBS_OBJECT_SRQ, - UVERBS_OBJECT_AH, - UVERBS_OBJECT_MR, - UVERBS_OBJECT_MW, - UVERBS_OBJECT_FLOW, - UVERBS_OBJECT_XRCD, - UVERBS_OBJECT_RWQ_IND_TBL, - UVERBS_OBJECT_WQ, - UVERBS_OBJECT_FLOW_ACTION, - UVERBS_OBJECT_DM, - UVERBS_OBJECT_COUNTERS, -}; - -enum { - UVERBS_ATTR_UHW_IN = UVERBS_UDATA_DRIVER_DATA_FLAG, - UVERBS_ATTR_UHW_OUT, -}; - -enum uverbs_attrs_create_cq_cmd_attr_ids { - UVERBS_ATTR_CREATE_CQ_HANDLE, - UVERBS_ATTR_CREATE_CQ_CQE, - UVERBS_ATTR_CREATE_CQ_USER_HANDLE, - UVERBS_ATTR_CREATE_CQ_COMP_CHANNEL, - UVERBS_ATTR_CREATE_CQ_COMP_VECTOR, - UVERBS_ATTR_CREATE_CQ_FLAGS, - UVERBS_ATTR_CREATE_CQ_RESP_CQE, -}; - -enum uverbs_attrs_destroy_cq_cmd_attr_ids { - UVERBS_ATTR_DESTROY_CQ_HANDLE, - UVERBS_ATTR_DESTROY_CQ_RESP, -}; - -enum uverbs_attrs_create_flow_action_esp { - UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE, - UVERBS_ATTR_FLOW_ACTION_ESP_ATTRS, - UVERBS_ATTR_FLOW_ACTION_ESP_ESN, - UVERBS_ATTR_FLOW_ACTION_ESP_KEYMAT, - UVERBS_ATTR_FLOW_ACTION_ESP_REPLAY, - UVERBS_ATTR_FLOW_ACTION_ESP_ENCAP, -}; - -enum uverbs_attrs_modify_flow_action_esp { - UVERBS_ATTR_MODIFY_FLOW_ACTION_ESP_HANDLE = - UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE, -}; - -enum uverbs_attrs_destroy_flow_action_esp { - UVERBS_ATTR_DESTROY_FLOW_ACTION_HANDLE, -}; - -enum uverbs_methods_cq { - UVERBS_METHOD_CQ_CREATE, - UVERBS_METHOD_CQ_DESTROY, -}; - -enum uverbs_methods_actions_flow_action_ops { - UVERBS_METHOD_FLOW_ACTION_ESP_CREATE, - UVERBS_METHOD_FLOW_ACTION_DESTROY, - UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY, -}; - -enum uverbs_attrs_alloc_dm_cmd_attr_ids { - UVERBS_ATTR_ALLOC_DM_HANDLE, - UVERBS_ATTR_ALLOC_DM_LENGTH, - UVERBS_ATTR_ALLOC_DM_ALIGNMENT, -}; - -enum uverbs_attrs_free_dm_cmd_attr_ids { - UVERBS_ATTR_FREE_DM_HANDLE, -}; - -enum uverbs_methods_dm { - UVERBS_METHOD_DM_ALLOC, - UVERBS_METHOD_DM_FREE, -}; - -enum uverbs_attrs_reg_dm_mr_cmd_attr_ids { - UVERBS_ATTR_REG_DM_MR_HANDLE, - UVERBS_ATTR_REG_DM_MR_OFFSET, - UVERBS_ATTR_REG_DM_MR_LENGTH, - UVERBS_ATTR_REG_DM_MR_PD_HANDLE, - UVERBS_ATTR_REG_DM_MR_ACCESS_FLAGS, - UVERBS_ATTR_REG_DM_MR_DM_HANDLE, - UVERBS_ATTR_REG_DM_MR_RESP_LKEY, - UVERBS_ATTR_REG_DM_MR_RESP_RKEY, -}; - -enum uverbs_methods_mr { - UVERBS_METHOD_DM_MR_REG, -}; - -enum uverbs_attrs_create_counters_cmd_attr_ids { - UVERBS_ATTR_CREATE_COUNTERS_HANDLE, -}; - -enum uverbs_attrs_destroy_counters_cmd_attr_ids { - UVERBS_ATTR_DESTROY_COUNTERS_HANDLE, -}; - -enum uverbs_attrs_read_counters_cmd_attr_ids { - UVERBS_ATTR_READ_COUNTERS_HANDLE, - UVERBS_ATTR_READ_COUNTERS_BUFF, - UVERBS_ATTR_READ_COUNTERS_FLAGS, -}; - -enum uverbs_methods_actions_counters_ops { - UVERBS_METHOD_COUNTERS_CREATE, - UVERBS_METHOD_COUNTERS_DESTROY, - UVERBS_METHOD_COUNTERS_READ, -}; - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/ib_user_ioctl_verbs.h b/lib/libc/include/generic-musl/rdma/ib_user_ioctl_verbs.h deleted file mode 100644 index c541d1a163..0000000000 --- a/lib/libc/include/generic-musl/rdma/ib_user_ioctl_verbs.h +++ /dev/null @@ -1,160 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2017-2018, Mellanox Technologies inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef IB_USER_IOCTL_VERBS_H -#define IB_USER_IOCTL_VERBS_H - -#include - -#ifndef RDMA_UAPI_PTR -#define RDMA_UAPI_PTR(_type, _name) __aligned_u64 _name -#endif - -enum ib_uverbs_access_flags { - IB_UVERBS_ACCESS_LOCAL_WRITE = 1 << 0, - IB_UVERBS_ACCESS_REMOTE_WRITE = 1 << 1, - IB_UVERBS_ACCESS_REMOTE_READ = 1 << 2, - IB_UVERBS_ACCESS_REMOTE_ATOMIC = 1 << 3, - IB_UVERBS_ACCESS_MW_BIND = 1 << 4, - IB_UVERBS_ACCESS_ZERO_BASED = 1 << 5, - IB_UVERBS_ACCESS_ON_DEMAND = 1 << 6, - IB_UVERBS_ACCESS_HUGETLB = 1 << 7, -}; - -enum ib_uverbs_query_port_cap_flags { - IB_UVERBS_PCF_SM = 1 << 1, - IB_UVERBS_PCF_NOTICE_SUP = 1 << 2, - IB_UVERBS_PCF_TRAP_SUP = 1 << 3, - IB_UVERBS_PCF_OPT_IPD_SUP = 1 << 4, - IB_UVERBS_PCF_AUTO_MIGR_SUP = 1 << 5, - IB_UVERBS_PCF_SL_MAP_SUP = 1 << 6, - IB_UVERBS_PCF_MKEY_NVRAM = 1 << 7, - IB_UVERBS_PCF_PKEY_NVRAM = 1 << 8, - IB_UVERBS_PCF_LED_INFO_SUP = 1 << 9, - IB_UVERBS_PCF_SM_DISABLED = 1 << 10, - IB_UVERBS_PCF_SYS_IMAGE_GUID_SUP = 1 << 11, - IB_UVERBS_PCF_PKEY_SW_EXT_PORT_TRAP_SUP = 1 << 12, - IB_UVERBS_PCF_EXTENDED_SPEEDS_SUP = 1 << 14, - IB_UVERBS_PCF_CM_SUP = 1 << 16, - IB_UVERBS_PCF_SNMP_TUNNEL_SUP = 1 << 17, - IB_UVERBS_PCF_REINIT_SUP = 1 << 18, - IB_UVERBS_PCF_DEVICE_MGMT_SUP = 1 << 19, - IB_UVERBS_PCF_VENDOR_CLASS_SUP = 1 << 20, - IB_UVERBS_PCF_DR_NOTICE_SUP = 1 << 21, - IB_UVERBS_PCF_CAP_MASK_NOTICE_SUP = 1 << 22, - IB_UVERBS_PCF_BOOT_MGMT_SUP = 1 << 23, - IB_UVERBS_PCF_LINK_LATENCY_SUP = 1 << 24, - IB_UVERBS_PCF_CLIENT_REG_SUP = 1 << 25, - /* - * IsOtherLocalChangesNoticeSupported is aliased by IP_BASED_GIDS and - * is inaccessible - */ - IB_UVERBS_PCF_LINK_SPEED_WIDTH_TABLE_SUP = 1 << 27, - IB_UVERBS_PCF_VENDOR_SPECIFIC_MADS_TABLE_SUP = 1 << 28, - IB_UVERBS_PCF_MCAST_PKEY_TRAP_SUPPRESSION_SUP = 1 << 29, - IB_UVERBS_PCF_MCAST_FDB_TOP_SUP = 1 << 30, - IB_UVERBS_PCF_HIERARCHY_INFO_SUP = 1ULL << 31, - - /* NOTE this is an internal flag, not an IBA flag */ - IB_UVERBS_PCF_IP_BASED_GIDS = 1 << 26, -}; - -enum ib_uverbs_query_port_flags { - IB_UVERBS_QPF_GRH_REQUIRED = 1 << 0, -}; - -enum ib_uverbs_flow_action_esp_keymat { - IB_UVERBS_FLOW_ACTION_ESP_KEYMAT_AES_GCM, -}; - -enum ib_uverbs_flow_action_esp_keymat_aes_gcm_iv_algo { - IB_UVERBS_FLOW_ACTION_IV_ALGO_SEQ, -}; - -struct ib_uverbs_flow_action_esp_keymat_aes_gcm { - __aligned_u64 iv; - __u32 iv_algo; /* Use enum ib_uverbs_flow_action_esp_keymat_aes_gcm_iv_algo */ - - __u32 salt; - __u32 icv_len; - - __u32 key_len; - __u32 aes_key[256 / 32]; -}; - -enum ib_uverbs_flow_action_esp_replay { - IB_UVERBS_FLOW_ACTION_ESP_REPLAY_NONE, - IB_UVERBS_FLOW_ACTION_ESP_REPLAY_BMP, -}; - -struct ib_uverbs_flow_action_esp_replay_bmp { - __u32 size; -}; - -enum ib_uverbs_flow_action_esp_flags { - IB_UVERBS_FLOW_ACTION_ESP_FLAGS_INLINE_CRYPTO = 0UL << 0, /* Default */ - IB_UVERBS_FLOW_ACTION_ESP_FLAGS_FULL_OFFLOAD = 1UL << 0, - - IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TUNNEL = 0UL << 1, /* Default */ - IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TRANSPORT = 1UL << 1, - - IB_UVERBS_FLOW_ACTION_ESP_FLAGS_DECRYPT = 0UL << 2, /* Default */ - IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ENCRYPT = 1UL << 2, - - IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ESN_NEW_WINDOW = 1UL << 3, -}; - -struct ib_uverbs_flow_action_esp_encap { - /* This struct represents a list of pointers to flow_xxxx_filter that - * encapsulates the payload in ESP tunnel mode. - */ - RDMA_UAPI_PTR(void *, val_ptr); /* pointer to a flow_xxxx_filter */ - RDMA_UAPI_PTR(struct ib_uverbs_flow_action_esp_encap *, next_ptr); - __u16 len; /* Len of the filter struct val_ptr points to */ - __u16 type; /* Use flow_spec_type enum */ -}; - -struct ib_uverbs_flow_action_esp { - __u32 spi; - __u32 seq; - __u32 tfc_pad; - __u32 flags; - __aligned_u64 hard_limit_pkts; -}; - -enum ib_uverbs_read_counters_flags { - /* prefer read values from driver cache */ - IB_UVERBS_READ_COUNTERS_PREFER_CACHED = 1 << 0, -}; - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/ib_user_mad.h b/lib/libc/include/generic-musl/rdma/ib_user_mad.h deleted file mode 100644 index b2313375d1..0000000000 --- a/lib/libc/include/generic-musl/rdma/ib_user_mad.h +++ /dev/null @@ -1,234 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2004 Topspin Communications. All rights reserved. - * Copyright (c) 2005 Voltaire, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef IB_USER_MAD_H -#define IB_USER_MAD_H - -#include -#include - -/* - * Increment this value if any changes that break userspace ABI - * compatibility are made. - */ -#define IB_USER_MAD_ABI_VERSION 5 - -/* - * Make sure that all structs defined in this file remain laid out so - * that they pack the same way on 32-bit and 64-bit architectures (to - * avoid incompatibility between 32-bit userspace and 64-bit kernels). - */ - -/** - * ib_user_mad_hdr_old - Old version of MAD packet header without pkey_index - * @id - ID of agent MAD received with/to be sent with - * @status - 0 on successful receive, ETIMEDOUT if no response - * received (transaction ID in data[] will be set to TID of original - * request) (ignored on send) - * @timeout_ms - Milliseconds to wait for response (unset on receive) - * @retries - Number of automatic retries to attempt - * @qpn - Remote QP number received from/to be sent to - * @qkey - Remote Q_Key to be sent with (unset on receive) - * @lid - Remote lid received from/to be sent to - * @sl - Service level received with/to be sent with - * @path_bits - Local path bits received with/to be sent with - * @grh_present - If set, GRH was received/should be sent - * @gid_index - Local GID index to send with (unset on receive) - * @hop_limit - Hop limit in GRH - * @traffic_class - Traffic class in GRH - * @gid - Remote GID in GRH - * @flow_label - Flow label in GRH - */ -struct ib_user_mad_hdr_old { - __u32 id; - __u32 status; - __u32 timeout_ms; - __u32 retries; - __u32 length; - __be32 qpn; - __be32 qkey; - __be16 lid; - __u8 sl; - __u8 path_bits; - __u8 grh_present; - __u8 gid_index; - __u8 hop_limit; - __u8 traffic_class; - __u8 gid[16]; - __be32 flow_label; -}; - -/** - * ib_user_mad_hdr - MAD packet header - * This layout allows specifying/receiving the P_Key index. To use - * this capability, an application must call the - * IB_USER_MAD_ENABLE_PKEY ioctl on the user MAD file handle before - * any other actions with the file handle. - * @id - ID of agent MAD received with/to be sent with - * @status - 0 on successful receive, ETIMEDOUT if no response - * received (transaction ID in data[] will be set to TID of original - * request) (ignored on send) - * @timeout_ms - Milliseconds to wait for response (unset on receive) - * @retries - Number of automatic retries to attempt - * @qpn - Remote QP number received from/to be sent to - * @qkey - Remote Q_Key to be sent with (unset on receive) - * @lid - Remote lid received from/to be sent to - * @sl - Service level received with/to be sent with - * @path_bits - Local path bits received with/to be sent with - * @grh_present - If set, GRH was received/should be sent - * @gid_index - Local GID index to send with (unset on receive) - * @hop_limit - Hop limit in GRH - * @traffic_class - Traffic class in GRH - * @gid - Remote GID in GRH - * @flow_label - Flow label in GRH - * @pkey_index - P_Key index - */ -struct ib_user_mad_hdr { - __u32 id; - __u32 status; - __u32 timeout_ms; - __u32 retries; - __u32 length; - __be32 qpn; - __be32 qkey; - __be16 lid; - __u8 sl; - __u8 path_bits; - __u8 grh_present; - __u8 gid_index; - __u8 hop_limit; - __u8 traffic_class; - __u8 gid[16]; - __be32 flow_label; - __u16 pkey_index; - __u8 reserved[6]; -}; - -/** - * ib_user_mad - MAD packet - * @hdr - MAD packet header - * @data - Contents of MAD - * - */ -struct ib_user_mad { - struct ib_user_mad_hdr hdr; - __aligned_u64 data[0]; -}; - -/* - * Earlier versions of this interface definition declared the - * method_mask[] member as an array of __u32 but treated it as a - * bitmap made up of longs in the kernel. This ambiguity meant that - * 32-bit big-endian applications that can run on both 32-bit and - * 64-bit kernels had no consistent ABI to rely on, and 64-bit - * big-endian applications that treated method_mask as being made up - * of 32-bit words would have their bitmap misinterpreted. - * - * To clear up this confusion, we change the declaration of - * method_mask[] to use unsigned long and handle the conversion from - * 32-bit userspace to 64-bit kernel for big-endian systems in the - * compat_ioctl method. Unfortunately, to keep the structure layout - * the same, we need the method_mask[] array to be aligned only to 4 - * bytes even when long is 64 bits, which forces us into this ugly - * typedef. - */ -typedef unsigned long __attribute__((aligned(4))) packed_ulong; -#define IB_USER_MAD_LONGS_PER_METHOD_MASK (128 / (8 * sizeof (long))) - -/** - * ib_user_mad_reg_req - MAD registration request - * @id - Set by the kernel; used to identify agent in future requests. - * @qpn - Queue pair number; must be 0 or 1. - * @method_mask - The caller will receive unsolicited MADs for any method - * where @method_mask = 1. - * @mgmt_class - Indicates which management class of MADs should be receive - * by the caller. This field is only required if the user wishes to - * receive unsolicited MADs, otherwise it should be 0. - * @mgmt_class_version - Indicates which version of MADs for the given - * management class to receive. - * @oui: Indicates IEEE OUI when mgmt_class is a vendor class - * in the range from 0x30 to 0x4f. Otherwise not used. - * @rmpp_version: If set, indicates the RMPP version used. - * - */ -struct ib_user_mad_reg_req { - __u32 id; - packed_ulong method_mask[IB_USER_MAD_LONGS_PER_METHOD_MASK]; - __u8 qpn; - __u8 mgmt_class; - __u8 mgmt_class_version; - __u8 oui[3]; - __u8 rmpp_version; -}; - -/** - * ib_user_mad_reg_req2 - MAD registration request - * - * @id - Set by the _kernel_; used by userspace to identify the - * registered agent in future requests. - * @qpn - Queue pair number; must be 0 or 1. - * @mgmt_class - Indicates which management class of MADs should be - * receive by the caller. This field is only required if - * the user wishes to receive unsolicited MADs, otherwise - * it should be 0. - * @mgmt_class_version - Indicates which version of MADs for the given - * management class to receive. - * @res - Ignored. - * @flags - additional registration flags; Must be in the set of - * flags defined in IB_USER_MAD_REG_FLAGS_CAP - * @method_mask - The caller wishes to receive unsolicited MADs for the - * methods whose bit(s) is(are) set. - * @oui - Indicates IEEE OUI to use when mgmt_class is a vendor - * class in the range from 0x30 to 0x4f. Otherwise not - * used. - * @rmpp_version - If set, indicates the RMPP version to use. - */ -enum { - IB_USER_MAD_USER_RMPP = (1 << 0), -}; -#define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP) -struct ib_user_mad_reg_req2 { - __u32 id; - __u32 qpn; - __u8 mgmt_class; - __u8 mgmt_class_version; - __u16 res; - __u32 flags; - __aligned_u64 method_mask[2]; - __u32 oui; - __u8 rmpp_version; - __u8 reserved[3]; -}; - -#endif /* IB_USER_MAD_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/ib_user_sa.h b/lib/libc/include/generic-musl/rdma/ib_user_sa.h deleted file mode 100644 index 1017cb10f7..0000000000 --- a/lib/libc/include/generic-musl/rdma/ib_user_sa.h +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2005 Intel Corporation. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef IB_USER_SA_H -#define IB_USER_SA_H - -#include - -enum { - IB_PATH_GMP = 1, - IB_PATH_PRIMARY = (1<<1), - IB_PATH_ALTERNATE = (1<<2), - IB_PATH_OUTBOUND = (1<<3), - IB_PATH_INBOUND = (1<<4), - IB_PATH_INBOUND_REVERSE = (1<<5), - IB_PATH_BIDIRECTIONAL = IB_PATH_OUTBOUND | IB_PATH_INBOUND_REVERSE -}; - -struct ib_path_rec_data { - __u32 flags; - __u32 reserved; - __u32 path_rec[16]; -}; - -struct ib_user_path_rec { - __u8 dgid[16]; - __u8 sgid[16]; - __be16 dlid; - __be16 slid; - __u32 raw_traffic; - __be32 flow_label; - __u32 reversible; - __u32 mtu; - __be16 pkey; - __u8 hop_limit; - __u8 traffic_class; - __u8 numb_path; - __u8 sl; - __u8 mtu_selector; - __u8 rate_selector; - __u8 rate; - __u8 packet_life_time_selector; - __u8 packet_life_time; - __u8 preference; -}; - -#endif /* IB_USER_SA_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/ib_user_verbs.h b/lib/libc/include/generic-musl/rdma/ib_user_verbs.h deleted file mode 100644 index 67ea45e27b..0000000000 --- a/lib/libc/include/generic-musl/rdma/ib_user_verbs.h +++ /dev/null @@ -1,1292 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2005 Topspin Communications. All rights reserved. - * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. - * Copyright (c) 2005 PathScale, Inc. All rights reserved. - * Copyright (c) 2006 Mellanox Technologies. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef IB_USER_VERBS_H -#define IB_USER_VERBS_H - -#include - -/* - * Increment this value if any changes that break userspace ABI - * compatibility are made. - */ -#define IB_USER_VERBS_ABI_VERSION 6 -#define IB_USER_VERBS_CMD_THRESHOLD 50 - -enum { - IB_USER_VERBS_CMD_GET_CONTEXT, - IB_USER_VERBS_CMD_QUERY_DEVICE, - IB_USER_VERBS_CMD_QUERY_PORT, - IB_USER_VERBS_CMD_ALLOC_PD, - IB_USER_VERBS_CMD_DEALLOC_PD, - IB_USER_VERBS_CMD_CREATE_AH, - IB_USER_VERBS_CMD_MODIFY_AH, - IB_USER_VERBS_CMD_QUERY_AH, - IB_USER_VERBS_CMD_DESTROY_AH, - IB_USER_VERBS_CMD_REG_MR, - IB_USER_VERBS_CMD_REG_SMR, - IB_USER_VERBS_CMD_REREG_MR, - IB_USER_VERBS_CMD_QUERY_MR, - IB_USER_VERBS_CMD_DEREG_MR, - IB_USER_VERBS_CMD_ALLOC_MW, - IB_USER_VERBS_CMD_BIND_MW, - IB_USER_VERBS_CMD_DEALLOC_MW, - IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL, - IB_USER_VERBS_CMD_CREATE_CQ, - IB_USER_VERBS_CMD_RESIZE_CQ, - IB_USER_VERBS_CMD_DESTROY_CQ, - IB_USER_VERBS_CMD_POLL_CQ, - IB_USER_VERBS_CMD_PEEK_CQ, - IB_USER_VERBS_CMD_REQ_NOTIFY_CQ, - IB_USER_VERBS_CMD_CREATE_QP, - IB_USER_VERBS_CMD_QUERY_QP, - IB_USER_VERBS_CMD_MODIFY_QP, - IB_USER_VERBS_CMD_DESTROY_QP, - IB_USER_VERBS_CMD_POST_SEND, - IB_USER_VERBS_CMD_POST_RECV, - IB_USER_VERBS_CMD_ATTACH_MCAST, - IB_USER_VERBS_CMD_DETACH_MCAST, - IB_USER_VERBS_CMD_CREATE_SRQ, - IB_USER_VERBS_CMD_MODIFY_SRQ, - IB_USER_VERBS_CMD_QUERY_SRQ, - IB_USER_VERBS_CMD_DESTROY_SRQ, - IB_USER_VERBS_CMD_POST_SRQ_RECV, - IB_USER_VERBS_CMD_OPEN_XRCD, - IB_USER_VERBS_CMD_CLOSE_XRCD, - IB_USER_VERBS_CMD_CREATE_XSRQ, - IB_USER_VERBS_CMD_OPEN_QP, -}; - -enum { - IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE, - IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ, - IB_USER_VERBS_EX_CMD_CREATE_QP = IB_USER_VERBS_CMD_CREATE_QP, - IB_USER_VERBS_EX_CMD_MODIFY_QP = IB_USER_VERBS_CMD_MODIFY_QP, - IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD, - IB_USER_VERBS_EX_CMD_DESTROY_FLOW, - IB_USER_VERBS_EX_CMD_CREATE_WQ, - IB_USER_VERBS_EX_CMD_MODIFY_WQ, - IB_USER_VERBS_EX_CMD_DESTROY_WQ, - IB_USER_VERBS_EX_CMD_CREATE_RWQ_IND_TBL, - IB_USER_VERBS_EX_CMD_DESTROY_RWQ_IND_TBL, - IB_USER_VERBS_EX_CMD_MODIFY_CQ -}; - -/* - * Make sure that all structs defined in this file remain laid out so - * that they pack the same way on 32-bit and 64-bit architectures (to - * avoid incompatibility between 32-bit userspace and 64-bit kernels). - * Specifically: - * - Do not use pointer types -- pass pointers in __u64 instead. - * - Make sure that any structure larger than 4 bytes is padded to a - * multiple of 8 bytes. Otherwise the structure size will be - * different between 32-bit and 64-bit architectures. - */ - -struct ib_uverbs_async_event_desc { - __aligned_u64 element; - __u32 event_type; /* enum ib_event_type */ - __u32 reserved; -}; - -struct ib_uverbs_comp_event_desc { - __aligned_u64 cq_handle; -}; - -struct ib_uverbs_cq_moderation_caps { - __u16 max_cq_moderation_count; - __u16 max_cq_moderation_period; - __u32 reserved; -}; - -/* - * All commands from userspace should start with a __u32 command field - * followed by __u16 in_words and out_words fields (which give the - * length of the command block and response buffer if any in 32-bit - * words). The kernel driver will read these fields first and read - * the rest of the command struct based on these value. - */ - -#define IB_USER_VERBS_CMD_COMMAND_MASK 0xff -#define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80000000u - -struct ib_uverbs_cmd_hdr { - __u32 command; - __u16 in_words; - __u16 out_words; -}; - -struct ib_uverbs_ex_cmd_hdr { - __aligned_u64 response; - __u16 provider_in_words; - __u16 provider_out_words; - __u32 cmd_hdr_reserved; -}; - -struct ib_uverbs_get_context { - __aligned_u64 response; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_get_context_resp { - __u32 async_fd; - __u32 num_comp_vectors; -}; - -struct ib_uverbs_query_device { - __aligned_u64 response; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_query_device_resp { - __aligned_u64 fw_ver; - __be64 node_guid; - __be64 sys_image_guid; - __aligned_u64 max_mr_size; - __aligned_u64 page_size_cap; - __u32 vendor_id; - __u32 vendor_part_id; - __u32 hw_ver; - __u32 max_qp; - __u32 max_qp_wr; - __u32 device_cap_flags; - __u32 max_sge; - __u32 max_sge_rd; - __u32 max_cq; - __u32 max_cqe; - __u32 max_mr; - __u32 max_pd; - __u32 max_qp_rd_atom; - __u32 max_ee_rd_atom; - __u32 max_res_rd_atom; - __u32 max_qp_init_rd_atom; - __u32 max_ee_init_rd_atom; - __u32 atomic_cap; - __u32 max_ee; - __u32 max_rdd; - __u32 max_mw; - __u32 max_raw_ipv6_qp; - __u32 max_raw_ethy_qp; - __u32 max_mcast_grp; - __u32 max_mcast_qp_attach; - __u32 max_total_mcast_qp_attach; - __u32 max_ah; - __u32 max_fmr; - __u32 max_map_per_fmr; - __u32 max_srq; - __u32 max_srq_wr; - __u32 max_srq_sge; - __u16 max_pkeys; - __u8 local_ca_ack_delay; - __u8 phys_port_cnt; - __u8 reserved[4]; -}; - -struct ib_uverbs_ex_query_device { - __u32 comp_mask; - __u32 reserved; -}; - -struct ib_uverbs_odp_caps { - __aligned_u64 general_caps; - struct { - __u32 rc_odp_caps; - __u32 uc_odp_caps; - __u32 ud_odp_caps; - } per_transport_caps; - __u32 reserved; -}; - -struct ib_uverbs_rss_caps { - /* Corresponding bit will be set if qp type from - * 'enum ib_qp_type' is supported, e.g. - * supported_qpts |= 1 << IB_QPT_UD - */ - __u32 supported_qpts; - __u32 max_rwq_indirection_tables; - __u32 max_rwq_indirection_table_size; - __u32 reserved; -}; - -struct ib_uverbs_tm_caps { - /* Max size of rendezvous request message */ - __u32 max_rndv_hdr_size; - /* Max number of entries in tag matching list */ - __u32 max_num_tags; - /* TM flags */ - __u32 flags; - /* Max number of outstanding list operations */ - __u32 max_ops; - /* Max number of SGE in tag matching entry */ - __u32 max_sge; - __u32 reserved; -}; - -struct ib_uverbs_ex_query_device_resp { - struct ib_uverbs_query_device_resp base; - __u32 comp_mask; - __u32 response_length; - struct ib_uverbs_odp_caps odp_caps; - __aligned_u64 timestamp_mask; - __aligned_u64 hca_core_clock; /* in KHZ */ - __aligned_u64 device_cap_flags_ex; - struct ib_uverbs_rss_caps rss_caps; - __u32 max_wq_type_rq; - __u32 raw_packet_caps; - struct ib_uverbs_tm_caps tm_caps; - struct ib_uverbs_cq_moderation_caps cq_moderation_caps; - __aligned_u64 max_dm_size; -}; - -struct ib_uverbs_query_port { - __aligned_u64 response; - __u8 port_num; - __u8 reserved[7]; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_query_port_resp { - __u32 port_cap_flags; /* see ib_uverbs_query_port_cap_flags */ - __u32 max_msg_sz; - __u32 bad_pkey_cntr; - __u32 qkey_viol_cntr; - __u32 gid_tbl_len; - __u16 pkey_tbl_len; - __u16 lid; - __u16 sm_lid; - __u8 state; - __u8 max_mtu; - __u8 active_mtu; - __u8 lmc; - __u8 max_vl_num; - __u8 sm_sl; - __u8 subnet_timeout; - __u8 init_type_reply; - __u8 active_width; - __u8 active_speed; - __u8 phys_state; - __u8 link_layer; - __u8 flags; /* see ib_uverbs_query_port_flags */ - __u8 reserved; -}; - -struct ib_uverbs_alloc_pd { - __aligned_u64 response; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_alloc_pd_resp { - __u32 pd_handle; -}; - -struct ib_uverbs_dealloc_pd { - __u32 pd_handle; -}; - -struct ib_uverbs_open_xrcd { - __aligned_u64 response; - __u32 fd; - __u32 oflags; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_open_xrcd_resp { - __u32 xrcd_handle; -}; - -struct ib_uverbs_close_xrcd { - __u32 xrcd_handle; -}; - -struct ib_uverbs_reg_mr { - __aligned_u64 response; - __aligned_u64 start; - __aligned_u64 length; - __aligned_u64 hca_va; - __u32 pd_handle; - __u32 access_flags; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_reg_mr_resp { - __u32 mr_handle; - __u32 lkey; - __u32 rkey; -}; - -struct ib_uverbs_rereg_mr { - __aligned_u64 response; - __u32 mr_handle; - __u32 flags; - __aligned_u64 start; - __aligned_u64 length; - __aligned_u64 hca_va; - __u32 pd_handle; - __u32 access_flags; -}; - -struct ib_uverbs_rereg_mr_resp { - __u32 lkey; - __u32 rkey; -}; - -struct ib_uverbs_dereg_mr { - __u32 mr_handle; -}; - -struct ib_uverbs_alloc_mw { - __aligned_u64 response; - __u32 pd_handle; - __u8 mw_type; - __u8 reserved[3]; -}; - -struct ib_uverbs_alloc_mw_resp { - __u32 mw_handle; - __u32 rkey; -}; - -struct ib_uverbs_dealloc_mw { - __u32 mw_handle; -}; - -struct ib_uverbs_create_comp_channel { - __aligned_u64 response; -}; - -struct ib_uverbs_create_comp_channel_resp { - __u32 fd; -}; - -struct ib_uverbs_create_cq { - __aligned_u64 response; - __aligned_u64 user_handle; - __u32 cqe; - __u32 comp_vector; - __s32 comp_channel; - __u32 reserved; - __aligned_u64 driver_data[0]; -}; - -enum ib_uverbs_ex_create_cq_flags { - IB_UVERBS_CQ_FLAGS_TIMESTAMP_COMPLETION = 1 << 0, - IB_UVERBS_CQ_FLAGS_IGNORE_OVERRUN = 1 << 1, -}; - -struct ib_uverbs_ex_create_cq { - __aligned_u64 user_handle; - __u32 cqe; - __u32 comp_vector; - __s32 comp_channel; - __u32 comp_mask; - __u32 flags; /* bitmask of ib_uverbs_ex_create_cq_flags */ - __u32 reserved; -}; - -struct ib_uverbs_create_cq_resp { - __u32 cq_handle; - __u32 cqe; -}; - -struct ib_uverbs_ex_create_cq_resp { - struct ib_uverbs_create_cq_resp base; - __u32 comp_mask; - __u32 response_length; -}; - -struct ib_uverbs_resize_cq { - __aligned_u64 response; - __u32 cq_handle; - __u32 cqe; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_resize_cq_resp { - __u32 cqe; - __u32 reserved; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_poll_cq { - __aligned_u64 response; - __u32 cq_handle; - __u32 ne; -}; - -struct ib_uverbs_wc { - __aligned_u64 wr_id; - __u32 status; - __u32 opcode; - __u32 vendor_err; - __u32 byte_len; - union { - __be32 imm_data; - __u32 invalidate_rkey; - } ex; - __u32 qp_num; - __u32 src_qp; - __u32 wc_flags; - __u16 pkey_index; - __u16 slid; - __u8 sl; - __u8 dlid_path_bits; - __u8 port_num; - __u8 reserved; -}; - -struct ib_uverbs_poll_cq_resp { - __u32 count; - __u32 reserved; - struct ib_uverbs_wc wc[0]; -}; - -struct ib_uverbs_req_notify_cq { - __u32 cq_handle; - __u32 solicited_only; -}; - -struct ib_uverbs_destroy_cq { - __aligned_u64 response; - __u32 cq_handle; - __u32 reserved; -}; - -struct ib_uverbs_destroy_cq_resp { - __u32 comp_events_reported; - __u32 async_events_reported; -}; - -struct ib_uverbs_global_route { - __u8 dgid[16]; - __u32 flow_label; - __u8 sgid_index; - __u8 hop_limit; - __u8 traffic_class; - __u8 reserved; -}; - -struct ib_uverbs_ah_attr { - struct ib_uverbs_global_route grh; - __u16 dlid; - __u8 sl; - __u8 src_path_bits; - __u8 static_rate; - __u8 is_global; - __u8 port_num; - __u8 reserved; -}; - -struct ib_uverbs_qp_attr { - __u32 qp_attr_mask; - __u32 qp_state; - __u32 cur_qp_state; - __u32 path_mtu; - __u32 path_mig_state; - __u32 qkey; - __u32 rq_psn; - __u32 sq_psn; - __u32 dest_qp_num; - __u32 qp_access_flags; - - struct ib_uverbs_ah_attr ah_attr; - struct ib_uverbs_ah_attr alt_ah_attr; - - /* ib_qp_cap */ - __u32 max_send_wr; - __u32 max_recv_wr; - __u32 max_send_sge; - __u32 max_recv_sge; - __u32 max_inline_data; - - __u16 pkey_index; - __u16 alt_pkey_index; - __u8 en_sqd_async_notify; - __u8 sq_draining; - __u8 max_rd_atomic; - __u8 max_dest_rd_atomic; - __u8 min_rnr_timer; - __u8 port_num; - __u8 timeout; - __u8 retry_cnt; - __u8 rnr_retry; - __u8 alt_port_num; - __u8 alt_timeout; - __u8 reserved[5]; -}; - -struct ib_uverbs_create_qp { - __aligned_u64 response; - __aligned_u64 user_handle; - __u32 pd_handle; - __u32 send_cq_handle; - __u32 recv_cq_handle; - __u32 srq_handle; - __u32 max_send_wr; - __u32 max_recv_wr; - __u32 max_send_sge; - __u32 max_recv_sge; - __u32 max_inline_data; - __u8 sq_sig_all; - __u8 qp_type; - __u8 is_srq; - __u8 reserved; - __aligned_u64 driver_data[0]; -}; - -enum ib_uverbs_create_qp_mask { - IB_UVERBS_CREATE_QP_MASK_IND_TABLE = 1UL << 0, -}; - -enum { - IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE, -}; - -enum { - /* - * This value is equal to IB_QP_DEST_QPN. - */ - IB_USER_LEGACY_LAST_QP_ATTR_MASK = 1ULL << 20, -}; - -enum { - /* - * This value is equal to IB_QP_RATE_LIMIT. - */ - IB_USER_LAST_QP_ATTR_MASK = 1ULL << 25, -}; - -struct ib_uverbs_ex_create_qp { - __aligned_u64 user_handle; - __u32 pd_handle; - __u32 send_cq_handle; - __u32 recv_cq_handle; - __u32 srq_handle; - __u32 max_send_wr; - __u32 max_recv_wr; - __u32 max_send_sge; - __u32 max_recv_sge; - __u32 max_inline_data; - __u8 sq_sig_all; - __u8 qp_type; - __u8 is_srq; - __u8 reserved; - __u32 comp_mask; - __u32 create_flags; - __u32 rwq_ind_tbl_handle; - __u32 source_qpn; -}; - -struct ib_uverbs_open_qp { - __aligned_u64 response; - __aligned_u64 user_handle; - __u32 pd_handle; - __u32 qpn; - __u8 qp_type; - __u8 reserved[7]; - __aligned_u64 driver_data[0]; -}; - -/* also used for open response */ -struct ib_uverbs_create_qp_resp { - __u32 qp_handle; - __u32 qpn; - __u32 max_send_wr; - __u32 max_recv_wr; - __u32 max_send_sge; - __u32 max_recv_sge; - __u32 max_inline_data; - __u32 reserved; -}; - -struct ib_uverbs_ex_create_qp_resp { - struct ib_uverbs_create_qp_resp base; - __u32 comp_mask; - __u32 response_length; -}; - -/* - * This struct needs to remain a multiple of 8 bytes to keep the - * alignment of the modify QP parameters. - */ -struct ib_uverbs_qp_dest { - __u8 dgid[16]; - __u32 flow_label; - __u16 dlid; - __u16 reserved; - __u8 sgid_index; - __u8 hop_limit; - __u8 traffic_class; - __u8 sl; - __u8 src_path_bits; - __u8 static_rate; - __u8 is_global; - __u8 port_num; -}; - -struct ib_uverbs_query_qp { - __aligned_u64 response; - __u32 qp_handle; - __u32 attr_mask; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_query_qp_resp { - struct ib_uverbs_qp_dest dest; - struct ib_uverbs_qp_dest alt_dest; - __u32 max_send_wr; - __u32 max_recv_wr; - __u32 max_send_sge; - __u32 max_recv_sge; - __u32 max_inline_data; - __u32 qkey; - __u32 rq_psn; - __u32 sq_psn; - __u32 dest_qp_num; - __u32 qp_access_flags; - __u16 pkey_index; - __u16 alt_pkey_index; - __u8 qp_state; - __u8 cur_qp_state; - __u8 path_mtu; - __u8 path_mig_state; - __u8 sq_draining; - __u8 max_rd_atomic; - __u8 max_dest_rd_atomic; - __u8 min_rnr_timer; - __u8 port_num; - __u8 timeout; - __u8 retry_cnt; - __u8 rnr_retry; - __u8 alt_port_num; - __u8 alt_timeout; - __u8 sq_sig_all; - __u8 reserved[5]; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_modify_qp { - struct ib_uverbs_qp_dest dest; - struct ib_uverbs_qp_dest alt_dest; - __u32 qp_handle; - __u32 attr_mask; - __u32 qkey; - __u32 rq_psn; - __u32 sq_psn; - __u32 dest_qp_num; - __u32 qp_access_flags; - __u16 pkey_index; - __u16 alt_pkey_index; - __u8 qp_state; - __u8 cur_qp_state; - __u8 path_mtu; - __u8 path_mig_state; - __u8 en_sqd_async_notify; - __u8 max_rd_atomic; - __u8 max_dest_rd_atomic; - __u8 min_rnr_timer; - __u8 port_num; - __u8 timeout; - __u8 retry_cnt; - __u8 rnr_retry; - __u8 alt_port_num; - __u8 alt_timeout; - __u8 reserved[2]; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_ex_modify_qp { - struct ib_uverbs_modify_qp base; - __u32 rate_limit; - __u32 reserved; -}; - -struct ib_uverbs_modify_qp_resp { -}; - -struct ib_uverbs_ex_modify_qp_resp { - __u32 comp_mask; - __u32 response_length; -}; - -struct ib_uverbs_destroy_qp { - __aligned_u64 response; - __u32 qp_handle; - __u32 reserved; -}; - -struct ib_uverbs_destroy_qp_resp { - __u32 events_reported; -}; - -/* - * The ib_uverbs_sge structure isn't used anywhere, since we assume - * the ib_sge structure is packed the same way on 32-bit and 64-bit - * architectures in both kernel and user space. It's just here to - * document the ABI. - */ -struct ib_uverbs_sge { - __aligned_u64 addr; - __u32 length; - __u32 lkey; -}; - -enum ib_uverbs_wr_opcode { - IB_UVERBS_WR_RDMA_WRITE = 0, - IB_UVERBS_WR_RDMA_WRITE_WITH_IMM = 1, - IB_UVERBS_WR_SEND = 2, - IB_UVERBS_WR_SEND_WITH_IMM = 3, - IB_UVERBS_WR_RDMA_READ = 4, - IB_UVERBS_WR_ATOMIC_CMP_AND_SWP = 5, - IB_UVERBS_WR_ATOMIC_FETCH_AND_ADD = 6, - IB_UVERBS_WR_LOCAL_INV = 7, - IB_UVERBS_WR_BIND_MW = 8, - IB_UVERBS_WR_SEND_WITH_INV = 9, - IB_UVERBS_WR_TSO = 10, - IB_UVERBS_WR_RDMA_READ_WITH_INV = 11, - IB_UVERBS_WR_MASKED_ATOMIC_CMP_AND_SWP = 12, - IB_UVERBS_WR_MASKED_ATOMIC_FETCH_AND_ADD = 13, - /* Review enum ib_wr_opcode before modifying this */ -}; - -struct ib_uverbs_send_wr { - __aligned_u64 wr_id; - __u32 num_sge; - __u32 opcode; /* see enum ib_uverbs_wr_opcode */ - __u32 send_flags; - union { - __be32 imm_data; - __u32 invalidate_rkey; - } ex; - union { - struct { - __aligned_u64 remote_addr; - __u32 rkey; - __u32 reserved; - } rdma; - struct { - __aligned_u64 remote_addr; - __aligned_u64 compare_add; - __aligned_u64 swap; - __u32 rkey; - __u32 reserved; - } atomic; - struct { - __u32 ah; - __u32 remote_qpn; - __u32 remote_qkey; - __u32 reserved; - } ud; - } wr; -}; - -struct ib_uverbs_post_send { - __aligned_u64 response; - __u32 qp_handle; - __u32 wr_count; - __u32 sge_count; - __u32 wqe_size; - struct ib_uverbs_send_wr send_wr[0]; -}; - -struct ib_uverbs_post_send_resp { - __u32 bad_wr; -}; - -struct ib_uverbs_recv_wr { - __aligned_u64 wr_id; - __u32 num_sge; - __u32 reserved; -}; - -struct ib_uverbs_post_recv { - __aligned_u64 response; - __u32 qp_handle; - __u32 wr_count; - __u32 sge_count; - __u32 wqe_size; - struct ib_uverbs_recv_wr recv_wr[0]; -}; - -struct ib_uverbs_post_recv_resp { - __u32 bad_wr; -}; - -struct ib_uverbs_post_srq_recv { - __aligned_u64 response; - __u32 srq_handle; - __u32 wr_count; - __u32 sge_count; - __u32 wqe_size; - struct ib_uverbs_recv_wr recv[0]; -}; - -struct ib_uverbs_post_srq_recv_resp { - __u32 bad_wr; -}; - -struct ib_uverbs_create_ah { - __aligned_u64 response; - __aligned_u64 user_handle; - __u32 pd_handle; - __u32 reserved; - struct ib_uverbs_ah_attr attr; -}; - -struct ib_uverbs_create_ah_resp { - __u32 ah_handle; -}; - -struct ib_uverbs_destroy_ah { - __u32 ah_handle; -}; - -struct ib_uverbs_attach_mcast { - __u8 gid[16]; - __u32 qp_handle; - __u16 mlid; - __u16 reserved; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_detach_mcast { - __u8 gid[16]; - __u32 qp_handle; - __u16 mlid; - __u16 reserved; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_flow_spec_hdr { - __u32 type; - __u16 size; - __u16 reserved; - /* followed by flow_spec */ - __aligned_u64 flow_spec_data[0]; -}; - -struct ib_uverbs_flow_eth_filter { - __u8 dst_mac[6]; - __u8 src_mac[6]; - __be16 ether_type; - __be16 vlan_tag; -}; - -struct ib_uverbs_flow_spec_eth { - union { - struct ib_uverbs_flow_spec_hdr hdr; - struct { - __u32 type; - __u16 size; - __u16 reserved; - }; - }; - struct ib_uverbs_flow_eth_filter val; - struct ib_uverbs_flow_eth_filter mask; -}; - -struct ib_uverbs_flow_ipv4_filter { - __be32 src_ip; - __be32 dst_ip; - __u8 proto; - __u8 tos; - __u8 ttl; - __u8 flags; -}; - -struct ib_uverbs_flow_spec_ipv4 { - union { - struct ib_uverbs_flow_spec_hdr hdr; - struct { - __u32 type; - __u16 size; - __u16 reserved; - }; - }; - struct ib_uverbs_flow_ipv4_filter val; - struct ib_uverbs_flow_ipv4_filter mask; -}; - -struct ib_uverbs_flow_tcp_udp_filter { - __be16 dst_port; - __be16 src_port; -}; - -struct ib_uverbs_flow_spec_tcp_udp { - union { - struct ib_uverbs_flow_spec_hdr hdr; - struct { - __u32 type; - __u16 size; - __u16 reserved; - }; - }; - struct ib_uverbs_flow_tcp_udp_filter val; - struct ib_uverbs_flow_tcp_udp_filter mask; -}; - -struct ib_uverbs_flow_ipv6_filter { - __u8 src_ip[16]; - __u8 dst_ip[16]; - __be32 flow_label; - __u8 next_hdr; - __u8 traffic_class; - __u8 hop_limit; - __u8 reserved; -}; - -struct ib_uverbs_flow_spec_ipv6 { - union { - struct ib_uverbs_flow_spec_hdr hdr; - struct { - __u32 type; - __u16 size; - __u16 reserved; - }; - }; - struct ib_uverbs_flow_ipv6_filter val; - struct ib_uverbs_flow_ipv6_filter mask; -}; - -struct ib_uverbs_flow_spec_action_tag { - union { - struct ib_uverbs_flow_spec_hdr hdr; - struct { - __u32 type; - __u16 size; - __u16 reserved; - }; - }; - __u32 tag_id; - __u32 reserved1; -}; - -struct ib_uverbs_flow_spec_action_drop { - union { - struct ib_uverbs_flow_spec_hdr hdr; - struct { - __u32 type; - __u16 size; - __u16 reserved; - }; - }; -}; - -struct ib_uverbs_flow_spec_action_handle { - union { - struct ib_uverbs_flow_spec_hdr hdr; - struct { - __u32 type; - __u16 size; - __u16 reserved; - }; - }; - __u32 handle; - __u32 reserved1; -}; - -struct ib_uverbs_flow_spec_action_count { - union { - struct ib_uverbs_flow_spec_hdr hdr; - struct { - __u32 type; - __u16 size; - __u16 reserved; - }; - }; - __u32 handle; - __u32 reserved1; -}; - -struct ib_uverbs_flow_tunnel_filter { - __be32 tunnel_id; -}; - -struct ib_uverbs_flow_spec_tunnel { - union { - struct ib_uverbs_flow_spec_hdr hdr; - struct { - __u32 type; - __u16 size; - __u16 reserved; - }; - }; - struct ib_uverbs_flow_tunnel_filter val; - struct ib_uverbs_flow_tunnel_filter mask; -}; - -struct ib_uverbs_flow_spec_esp_filter { - __u32 spi; - __u32 seq; -}; - -struct ib_uverbs_flow_spec_esp { - union { - struct ib_uverbs_flow_spec_hdr hdr; - struct { - __u32 type; - __u16 size; - __u16 reserved; - }; - }; - struct ib_uverbs_flow_spec_esp_filter val; - struct ib_uverbs_flow_spec_esp_filter mask; -}; - -struct ib_uverbs_flow_gre_filter { - /* c_ks_res0_ver field is bits 0-15 in offset 0 of a standard GRE header: - * bit 0 - C - checksum bit. - * bit 1 - reserved. set to 0. - * bit 2 - key bit. - * bit 3 - sequence number bit. - * bits 4:12 - reserved. set to 0. - * bits 13:15 - GRE version. - */ - __be16 c_ks_res0_ver; - __be16 protocol; - __be32 key; -}; - -struct ib_uverbs_flow_spec_gre { - union { - struct ib_uverbs_flow_spec_hdr hdr; - struct { - __u32 type; - __u16 size; - __u16 reserved; - }; - }; - struct ib_uverbs_flow_gre_filter val; - struct ib_uverbs_flow_gre_filter mask; -}; - -struct ib_uverbs_flow_mpls_filter { - /* The field includes the entire MPLS label: - * bits 0:19 - label field. - * bits 20:22 - traffic class field. - * bits 23 - bottom of stack bit. - * bits 24:31 - ttl field. - */ - __be32 label; -}; - -struct ib_uverbs_flow_spec_mpls { - union { - struct ib_uverbs_flow_spec_hdr hdr; - struct { - __u32 type; - __u16 size; - __u16 reserved; - }; - }; - struct ib_uverbs_flow_mpls_filter val; - struct ib_uverbs_flow_mpls_filter mask; -}; - -struct ib_uverbs_flow_attr { - __u32 type; - __u16 size; - __u16 priority; - __u8 num_of_specs; - __u8 reserved[2]; - __u8 port; - __u32 flags; - /* Following are the optional layers according to user request - * struct ib_flow_spec_xxx - * struct ib_flow_spec_yyy - */ - struct ib_uverbs_flow_spec_hdr flow_specs[0]; -}; - -struct ib_uverbs_create_flow { - __u32 comp_mask; - __u32 qp_handle; - struct ib_uverbs_flow_attr flow_attr; -}; - -struct ib_uverbs_create_flow_resp { - __u32 comp_mask; - __u32 flow_handle; -}; - -struct ib_uverbs_destroy_flow { - __u32 comp_mask; - __u32 flow_handle; -}; - -struct ib_uverbs_create_srq { - __aligned_u64 response; - __aligned_u64 user_handle; - __u32 pd_handle; - __u32 max_wr; - __u32 max_sge; - __u32 srq_limit; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_create_xsrq { - __aligned_u64 response; - __aligned_u64 user_handle; - __u32 srq_type; - __u32 pd_handle; - __u32 max_wr; - __u32 max_sge; - __u32 srq_limit; - __u32 max_num_tags; - __u32 xrcd_handle; - __u32 cq_handle; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_create_srq_resp { - __u32 srq_handle; - __u32 max_wr; - __u32 max_sge; - __u32 srqn; -}; - -struct ib_uverbs_modify_srq { - __u32 srq_handle; - __u32 attr_mask; - __u32 max_wr; - __u32 srq_limit; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_query_srq { - __aligned_u64 response; - __u32 srq_handle; - __u32 reserved; - __aligned_u64 driver_data[0]; -}; - -struct ib_uverbs_query_srq_resp { - __u32 max_wr; - __u32 max_sge; - __u32 srq_limit; - __u32 reserved; -}; - -struct ib_uverbs_destroy_srq { - __aligned_u64 response; - __u32 srq_handle; - __u32 reserved; -}; - -struct ib_uverbs_destroy_srq_resp { - __u32 events_reported; -}; - -struct ib_uverbs_ex_create_wq { - __u32 comp_mask; - __u32 wq_type; - __aligned_u64 user_handle; - __u32 pd_handle; - __u32 cq_handle; - __u32 max_wr; - __u32 max_sge; - __u32 create_flags; /* Use enum ib_wq_flags */ - __u32 reserved; -}; - -struct ib_uverbs_ex_create_wq_resp { - __u32 comp_mask; - __u32 response_length; - __u32 wq_handle; - __u32 max_wr; - __u32 max_sge; - __u32 wqn; -}; - -struct ib_uverbs_ex_destroy_wq { - __u32 comp_mask; - __u32 wq_handle; -}; - -struct ib_uverbs_ex_destroy_wq_resp { - __u32 comp_mask; - __u32 response_length; - __u32 events_reported; - __u32 reserved; -}; - -struct ib_uverbs_ex_modify_wq { - __u32 attr_mask; - __u32 wq_handle; - __u32 wq_state; - __u32 curr_wq_state; - __u32 flags; /* Use enum ib_wq_flags */ - __u32 flags_mask; /* Use enum ib_wq_flags */ -}; - -/* Prevent memory allocation rather than max expected size */ -#define IB_USER_VERBS_MAX_LOG_IND_TBL_SIZE 0x0d -struct ib_uverbs_ex_create_rwq_ind_table { - __u32 comp_mask; - __u32 log_ind_tbl_size; - /* Following are the wq handles according to log_ind_tbl_size - * wq_handle1 - * wq_handle2 - */ - __u32 wq_handles[0]; -}; - -struct ib_uverbs_ex_create_rwq_ind_table_resp { - __u32 comp_mask; - __u32 response_length; - __u32 ind_tbl_handle; - __u32 ind_tbl_num; -}; - -struct ib_uverbs_ex_destroy_rwq_ind_table { - __u32 comp_mask; - __u32 ind_tbl_handle; -}; - -struct ib_uverbs_cq_moderation { - __u16 cq_count; - __u16 cq_period; -}; - -struct ib_uverbs_ex_modify_cq { - __u32 cq_handle; - __u32 attr_mask; - struct ib_uverbs_cq_moderation attr; - __u32 reserved; -}; - -#define IB_DEVICE_NAME_MAX 64 - -#endif /* IB_USER_VERBS_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/mlx4-abi.h b/lib/libc/include/generic-musl/rdma/mlx4-abi.h deleted file mode 100644 index daa8fb007f..0000000000 --- a/lib/libc/include/generic-musl/rdma/mlx4-abi.h +++ /dev/null @@ -1,191 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef MLX4_ABI_USER_H -#define MLX4_ABI_USER_H - -#include - -/* - * Increment this value if any changes that break userspace ABI - * compatibility are made. - */ - -#define MLX4_IB_UVERBS_NO_DEV_CAPS_ABI_VERSION 3 -#define MLX4_IB_UVERBS_ABI_VERSION 4 - -/* - * Make sure that all structs defined in this file remain laid out so - * that they pack the same way on 32-bit and 64-bit architectures (to - * avoid incompatibility between 32-bit userspace and 64-bit kernels). - * In particular do not use pointer types -- pass pointers in __u64 - * instead. - */ - -struct mlx4_ib_alloc_ucontext_resp_v3 { - __u32 qp_tab_size; - __u16 bf_reg_size; - __u16 bf_regs_per_page; -}; - -enum { - MLX4_USER_DEV_CAP_LARGE_CQE = 1L << 0, -}; - -struct mlx4_ib_alloc_ucontext_resp { - __u32 dev_caps; - __u32 qp_tab_size; - __u16 bf_reg_size; - __u16 bf_regs_per_page; - __u32 cqe_size; -}; - -struct mlx4_ib_alloc_pd_resp { - __u32 pdn; - __u32 reserved; -}; - -struct mlx4_ib_create_cq { - __aligned_u64 buf_addr; - __aligned_u64 db_addr; -}; - -struct mlx4_ib_create_cq_resp { - __u32 cqn; - __u32 reserved; -}; - -struct mlx4_ib_resize_cq { - __aligned_u64 buf_addr; -}; - -struct mlx4_ib_create_srq { - __aligned_u64 buf_addr; - __aligned_u64 db_addr; -}; - -struct mlx4_ib_create_srq_resp { - __u32 srqn; - __u32 reserved; -}; - -struct mlx4_ib_create_qp_rss { - __aligned_u64 rx_hash_fields_mask; /* Use enum mlx4_ib_rx_hash_fields */ - __u8 rx_hash_function; /* Use enum mlx4_ib_rx_hash_function_flags */ - __u8 reserved[7]; - __u8 rx_hash_key[40]; - __u32 comp_mask; - __u32 reserved1; -}; - -struct mlx4_ib_create_qp { - __aligned_u64 buf_addr; - __aligned_u64 db_addr; - __u8 log_sq_bb_count; - __u8 log_sq_stride; - __u8 sq_no_prefetch; - __u8 reserved; - __u32 inl_recv_sz; -}; - -struct mlx4_ib_create_wq { - __aligned_u64 buf_addr; - __aligned_u64 db_addr; - __u8 log_range_size; - __u8 reserved[3]; - __u32 comp_mask; -}; - -struct mlx4_ib_modify_wq { - __u32 comp_mask; - __u32 reserved; -}; - -struct mlx4_ib_create_rwq_ind_tbl_resp { - __u32 response_length; - __u32 reserved; -}; - -/* RX Hash function flags */ -enum mlx4_ib_rx_hash_function_flags { - MLX4_IB_RX_HASH_FUNC_TOEPLITZ = 1 << 0, -}; - -/* - * RX Hash flags, these flags allows to set which incoming packet's field should - * participates in RX Hash. Each flag represent certain packet's field, - * when the flag is set the field that is represented by the flag will - * participate in RX Hash calculation. - */ -enum mlx4_ib_rx_hash_fields { - MLX4_IB_RX_HASH_SRC_IPV4 = 1 << 0, - MLX4_IB_RX_HASH_DST_IPV4 = 1 << 1, - MLX4_IB_RX_HASH_SRC_IPV6 = 1 << 2, - MLX4_IB_RX_HASH_DST_IPV6 = 1 << 3, - MLX4_IB_RX_HASH_SRC_PORT_TCP = 1 << 4, - MLX4_IB_RX_HASH_DST_PORT_TCP = 1 << 5, - MLX4_IB_RX_HASH_SRC_PORT_UDP = 1 << 6, - MLX4_IB_RX_HASH_DST_PORT_UDP = 1 << 7, - MLX4_IB_RX_HASH_INNER = 1ULL << 31, -}; - -struct mlx4_ib_rss_caps { - __aligned_u64 rx_hash_fields_mask; /* enum mlx4_ib_rx_hash_fields */ - __u8 rx_hash_function; /* enum mlx4_ib_rx_hash_function_flags */ - __u8 reserved[7]; -}; - -enum query_device_resp_mask { - MLX4_IB_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET = 1UL << 0, -}; - -struct mlx4_ib_tso_caps { - __u32 max_tso; /* Maximum tso payload size in bytes */ - /* Corresponding bit will be set if qp type from - * 'enum ib_qp_type' is supported. - */ - __u32 supported_qpts; -}; - -struct mlx4_uverbs_ex_query_device_resp { - __u32 comp_mask; - __u32 response_length; - __aligned_u64 hca_core_clock_offset; - __u32 max_inl_recv_sz; - __u32 reserved; - struct mlx4_ib_rss_caps rss_caps; - struct mlx4_ib_tso_caps tso_caps; -}; - -#endif /* MLX4_ABI_USER_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/mlx5-abi.h b/lib/libc/include/generic-musl/rdma/mlx5-abi.h deleted file mode 100644 index 5f226502d8..0000000000 --- a/lib/libc/include/generic-musl/rdma/mlx5-abi.h +++ /dev/null @@ -1,474 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef MLX5_ABI_USER_H -#define MLX5_ABI_USER_H - -#include -#include /* For ETH_ALEN. */ -#include - -enum { - MLX5_QP_FLAG_SIGNATURE = 1 << 0, - MLX5_QP_FLAG_SCATTER_CQE = 1 << 1, - MLX5_QP_FLAG_TUNNEL_OFFLOADS = 1 << 2, - MLX5_QP_FLAG_BFREG_INDEX = 1 << 3, - MLX5_QP_FLAG_TYPE_DCT = 1 << 4, - MLX5_QP_FLAG_TYPE_DCI = 1 << 5, -}; - -enum { - MLX5_SRQ_FLAG_SIGNATURE = 1 << 0, -}; - -enum { - MLX5_WQ_FLAG_SIGNATURE = 1 << 0, -}; - -/* Increment this value if any changes that break userspace ABI - * compatibility are made. - */ -#define MLX5_IB_UVERBS_ABI_VERSION 1 - -/* Make sure that all structs defined in this file remain laid out so - * that they pack the same way on 32-bit and 64-bit architectures (to - * avoid incompatibility between 32-bit userspace and 64-bit kernels). - * In particular do not use pointer types -- pass pointers in __u64 - * instead. - */ - -struct mlx5_ib_alloc_ucontext_req { - __u32 total_num_bfregs; - __u32 num_low_latency_bfregs; -}; - -enum mlx5_lib_caps { - MLX5_LIB_CAP_4K_UAR = (__u64)1 << 0, -}; - -enum mlx5_ib_alloc_uctx_v2_flags { - MLX5_IB_ALLOC_UCTX_DEVX = 1 << 0, -}; -struct mlx5_ib_alloc_ucontext_req_v2 { - __u32 total_num_bfregs; - __u32 num_low_latency_bfregs; - __u32 flags; - __u32 comp_mask; - __u8 max_cqe_version; - __u8 reserved0; - __u16 reserved1; - __u32 reserved2; - __aligned_u64 lib_caps; -}; - -enum mlx5_ib_alloc_ucontext_resp_mask { - MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_CORE_CLOCK_OFFSET = 1UL << 0, - MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_DUMP_FILL_MKEY = 1UL << 1, -}; - -enum mlx5_user_cmds_supp_uhw { - MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE = 1 << 0, - MLX5_USER_CMDS_SUPP_UHW_CREATE_AH = 1 << 1, -}; - -/* The eth_min_inline response value is set to off-by-one vs the FW - * returned value to allow user-space to deal with older kernels. - */ -enum mlx5_user_inline_mode { - MLX5_USER_INLINE_MODE_NA, - MLX5_USER_INLINE_MODE_NONE, - MLX5_USER_INLINE_MODE_L2, - MLX5_USER_INLINE_MODE_IP, - MLX5_USER_INLINE_MODE_TCP_UDP, -}; - -enum { - MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM = 1 << 0, - MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_REQ_METADATA = 1 << 1, - MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_SPI_STEERING = 1 << 2, - MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_FULL_OFFLOAD = 1 << 3, - MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_TX_IV_IS_ESN = 1 << 4, -}; - -struct mlx5_ib_alloc_ucontext_resp { - __u32 qp_tab_size; - __u32 bf_reg_size; - __u32 tot_bfregs; - __u32 cache_line_size; - __u16 max_sq_desc_sz; - __u16 max_rq_desc_sz; - __u32 max_send_wqebb; - __u32 max_recv_wr; - __u32 max_srq_recv_wr; - __u16 num_ports; - __u16 flow_action_flags; - __u32 comp_mask; - __u32 response_length; - __u8 cqe_version; - __u8 cmds_supp_uhw; - __u8 eth_min_inline; - __u8 clock_info_versions; - __aligned_u64 hca_core_clock_offset; - __u32 log_uar_size; - __u32 num_uars_per_page; - __u32 num_dyn_bfregs; - __u32 dump_fill_mkey; -}; - -struct mlx5_ib_alloc_pd_resp { - __u32 pdn; -}; - -struct mlx5_ib_tso_caps { - __u32 max_tso; /* Maximum tso payload size in bytes */ - - /* Corresponding bit will be set if qp type from - * 'enum ib_qp_type' is supported, e.g. - * supported_qpts |= 1 << IB_QPT_UD - */ - __u32 supported_qpts; -}; - -struct mlx5_ib_rss_caps { - __aligned_u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */ - __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */ - __u8 reserved[7]; -}; - -enum mlx5_ib_cqe_comp_res_format { - MLX5_IB_CQE_RES_FORMAT_HASH = 1 << 0, - MLX5_IB_CQE_RES_FORMAT_CSUM = 1 << 1, - MLX5_IB_CQE_RES_FORMAT_CSUM_STRIDX = 1 << 2, -}; - -struct mlx5_ib_cqe_comp_caps { - __u32 max_num; - __u32 supported_format; /* enum mlx5_ib_cqe_comp_res_format */ -}; - -enum mlx5_ib_packet_pacing_cap_flags { - MLX5_IB_PP_SUPPORT_BURST = 1 << 0, -}; - -struct mlx5_packet_pacing_caps { - __u32 qp_rate_limit_min; - __u32 qp_rate_limit_max; /* In kpbs */ - - /* Corresponding bit will be set if qp type from - * 'enum ib_qp_type' is supported, e.g. - * supported_qpts |= 1 << IB_QPT_RAW_PACKET - */ - __u32 supported_qpts; - __u8 cap_flags; /* enum mlx5_ib_packet_pacing_cap_flags */ - __u8 reserved[3]; -}; - -enum mlx5_ib_mpw_caps { - MPW_RESERVED = 1 << 0, - MLX5_IB_ALLOW_MPW = 1 << 1, - MLX5_IB_SUPPORT_EMPW = 1 << 2, -}; - -enum mlx5_ib_sw_parsing_offloads { - MLX5_IB_SW_PARSING = 1 << 0, - MLX5_IB_SW_PARSING_CSUM = 1 << 1, - MLX5_IB_SW_PARSING_LSO = 1 << 2, -}; - -struct mlx5_ib_sw_parsing_caps { - __u32 sw_parsing_offloads; /* enum mlx5_ib_sw_parsing_offloads */ - - /* Corresponding bit will be set if qp type from - * 'enum ib_qp_type' is supported, e.g. - * supported_qpts |= 1 << IB_QPT_RAW_PACKET - */ - __u32 supported_qpts; -}; - -struct mlx5_ib_striding_rq_caps { - __u32 min_single_stride_log_num_of_bytes; - __u32 max_single_stride_log_num_of_bytes; - __u32 min_single_wqe_log_num_of_strides; - __u32 max_single_wqe_log_num_of_strides; - - /* Corresponding bit will be set if qp type from - * 'enum ib_qp_type' is supported, e.g. - * supported_qpts |= 1 << IB_QPT_RAW_PACKET - */ - __u32 supported_qpts; - __u32 reserved; -}; - -enum mlx5_ib_query_dev_resp_flags { - /* Support 128B CQE compression */ - MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_COMP = 1 << 0, - MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_PAD = 1 << 1, -}; - -enum mlx5_ib_tunnel_offloads { - MLX5_IB_TUNNELED_OFFLOADS_VXLAN = 1 << 0, - MLX5_IB_TUNNELED_OFFLOADS_GRE = 1 << 1, - MLX5_IB_TUNNELED_OFFLOADS_GENEVE = 1 << 2, - MLX5_IB_TUNNELED_OFFLOADS_MPLS_GRE = 1 << 3, - MLX5_IB_TUNNELED_OFFLOADS_MPLS_UDP = 1 << 4, -}; - -struct mlx5_ib_query_device_resp { - __u32 comp_mask; - __u32 response_length; - struct mlx5_ib_tso_caps tso_caps; - struct mlx5_ib_rss_caps rss_caps; - struct mlx5_ib_cqe_comp_caps cqe_comp_caps; - struct mlx5_packet_pacing_caps packet_pacing_caps; - __u32 mlx5_ib_support_multi_pkt_send_wqes; - __u32 flags; /* Use enum mlx5_ib_query_dev_resp_flags */ - struct mlx5_ib_sw_parsing_caps sw_parsing_caps; - struct mlx5_ib_striding_rq_caps striding_rq_caps; - __u32 tunnel_offloads_caps; /* enum mlx5_ib_tunnel_offloads */ - __u32 reserved; -}; - -enum mlx5_ib_create_cq_flags { - MLX5_IB_CREATE_CQ_FLAGS_CQE_128B_PAD = 1 << 0, -}; - -struct mlx5_ib_create_cq { - __aligned_u64 buf_addr; - __aligned_u64 db_addr; - __u32 cqe_size; - __u8 cqe_comp_en; - __u8 cqe_comp_res_format; - __u16 flags; -}; - -struct mlx5_ib_create_cq_resp { - __u32 cqn; - __u32 reserved; -}; - -struct mlx5_ib_resize_cq { - __aligned_u64 buf_addr; - __u16 cqe_size; - __u16 reserved0; - __u32 reserved1; -}; - -struct mlx5_ib_create_srq { - __aligned_u64 buf_addr; - __aligned_u64 db_addr; - __u32 flags; - __u32 reserved0; /* explicit padding (optional on i386) */ - __u32 uidx; - __u32 reserved1; -}; - -struct mlx5_ib_create_srq_resp { - __u32 srqn; - __u32 reserved; -}; - -struct mlx5_ib_create_qp { - __aligned_u64 buf_addr; - __aligned_u64 db_addr; - __u32 sq_wqe_count; - __u32 rq_wqe_count; - __u32 rq_wqe_shift; - __u32 flags; - __u32 uidx; - __u32 bfreg_index; - union { - __aligned_u64 sq_buf_addr; - __aligned_u64 access_key; - }; -}; - -/* RX Hash function flags */ -enum mlx5_rx_hash_function_flags { - MLX5_RX_HASH_FUNC_TOEPLITZ = 1 << 0, -}; - -/* - * RX Hash flags, these flags allows to set which incoming packet's field should - * participates in RX Hash. Each flag represent certain packet's field, - * when the flag is set the field that is represented by the flag will - * participate in RX Hash calculation. - * Note: *IPV4 and *IPV6 flags can't be enabled together on the same QP - * and *TCP and *UDP flags can't be enabled together on the same QP. -*/ -enum mlx5_rx_hash_fields { - MLX5_RX_HASH_SRC_IPV4 = 1 << 0, - MLX5_RX_HASH_DST_IPV4 = 1 << 1, - MLX5_RX_HASH_SRC_IPV6 = 1 << 2, - MLX5_RX_HASH_DST_IPV6 = 1 << 3, - MLX5_RX_HASH_SRC_PORT_TCP = 1 << 4, - MLX5_RX_HASH_DST_PORT_TCP = 1 << 5, - MLX5_RX_HASH_SRC_PORT_UDP = 1 << 6, - MLX5_RX_HASH_DST_PORT_UDP = 1 << 7, - MLX5_RX_HASH_IPSEC_SPI = 1 << 8, - /* Save bits for future fields */ - MLX5_RX_HASH_INNER = (1UL << 31), -}; - -struct mlx5_ib_create_qp_rss { - __aligned_u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */ - __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */ - __u8 rx_key_len; /* valid only for Toeplitz */ - __u8 reserved[6]; - __u8 rx_hash_key[128]; /* valid only for Toeplitz */ - __u32 comp_mask; - __u32 flags; -}; - -struct mlx5_ib_create_qp_resp { - __u32 bfreg_index; - __u32 reserved; -}; - -struct mlx5_ib_alloc_mw { - __u32 comp_mask; - __u8 num_klms; - __u8 reserved1; - __u16 reserved2; -}; - -enum mlx5_ib_create_wq_mask { - MLX5_IB_CREATE_WQ_STRIDING_RQ = (1 << 0), -}; - -struct mlx5_ib_create_wq { - __aligned_u64 buf_addr; - __aligned_u64 db_addr; - __u32 rq_wqe_count; - __u32 rq_wqe_shift; - __u32 user_index; - __u32 flags; - __u32 comp_mask; - __u32 single_stride_log_num_of_bytes; - __u32 single_wqe_log_num_of_strides; - __u32 two_byte_shift_en; -}; - -struct mlx5_ib_create_ah_resp { - __u32 response_length; - __u8 dmac[ETH_ALEN]; - __u8 reserved[6]; -}; - -struct mlx5_ib_burst_info { - __u32 max_burst_sz; - __u16 typical_pkt_sz; - __u16 reserved; -}; - -struct mlx5_ib_modify_qp { - __u32 comp_mask; - struct mlx5_ib_burst_info burst_info; - __u32 reserved; -}; - -struct mlx5_ib_modify_qp_resp { - __u32 response_length; - __u32 dctn; -}; - -struct mlx5_ib_create_wq_resp { - __u32 response_length; - __u32 reserved; -}; - -struct mlx5_ib_create_rwq_ind_tbl_resp { - __u32 response_length; - __u32 reserved; -}; - -struct mlx5_ib_modify_wq { - __u32 comp_mask; - __u32 reserved; -}; - -struct mlx5_ib_clock_info { - __u32 sign; - __u32 resv; - __aligned_u64 nsec; - __aligned_u64 cycles; - __aligned_u64 frac; - __u32 mult; - __u32 shift; - __aligned_u64 mask; - __aligned_u64 overflow_period; -}; - -enum mlx5_ib_mmap_cmd { - MLX5_IB_MMAP_REGULAR_PAGE = 0, - MLX5_IB_MMAP_GET_CONTIGUOUS_PAGES = 1, - MLX5_IB_MMAP_WC_PAGE = 2, - MLX5_IB_MMAP_NC_PAGE = 3, - /* 5 is chosen in order to be compatible with old versions of libmlx5 */ - MLX5_IB_MMAP_CORE_CLOCK = 5, - MLX5_IB_MMAP_ALLOC_WC = 6, - MLX5_IB_MMAP_CLOCK_INFO = 7, - MLX5_IB_MMAP_DEVICE_MEM = 8, -}; - -enum { - MLX5_IB_CLOCK_INFO_KERNEL_UPDATING = 1, -}; - -/* Bit indexes for the mlx5_alloc_ucontext_resp.clock_info_versions bitmap */ -enum { - MLX5_IB_CLOCK_INFO_V1 = 0, -}; - -struct mlx5_ib_flow_counters_desc { - __u32 description; - __u32 index; -}; - -struct mlx5_ib_flow_counters_data { - RDMA_UAPI_PTR(struct mlx5_ib_flow_counters_desc *, counters_data); - __u32 ncounters; - __u32 reserved; -}; - -struct mlx5_ib_create_flow { - __u32 ncounters_data; - __u32 reserved; - /* - * Following are counters data based on ncounters_data, each - * entry in the data[] should match a corresponding counter object - * that was pointed by a counters spec upon the flow creation - */ - struct mlx5_ib_flow_counters_data data[]; -}; - -#endif /* MLX5_ABI_USER_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_cmds.h b/lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_cmds.h deleted file mode 100644 index fd3213441e..0000000000 --- a/lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_cmds.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef MLX5_USER_IOCTL_CMDS_H -#define MLX5_USER_IOCTL_CMDS_H - -#include -#include - -enum mlx5_ib_create_flow_action_attrs { - /* This attribute belong to the driver namespace */ - MLX5_IB_ATTR_CREATE_FLOW_ACTION_FLAGS = (1U << UVERBS_ID_NS_SHIFT), -}; - -enum mlx5_ib_alloc_dm_attrs { - MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX, -}; - -enum mlx5_ib_devx_methods { - MLX5_IB_METHOD_DEVX_OTHER = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_METHOD_DEVX_QUERY_UAR, - MLX5_IB_METHOD_DEVX_QUERY_EQN, -}; - -enum mlx5_ib_devx_other_attrs { - MLX5_IB_ATTR_DEVX_OTHER_CMD_IN = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_ATTR_DEVX_OTHER_CMD_OUT, -}; - -enum mlx5_ib_devx_obj_create_attrs { - MLX5_IB_ATTR_DEVX_OBJ_CREATE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_IN, - MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_OUT, -}; - -enum mlx5_ib_devx_query_uar_attrs { - MLX5_IB_ATTR_DEVX_QUERY_UAR_USER_IDX = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_ATTR_DEVX_QUERY_UAR_DEV_IDX, -}; - -enum mlx5_ib_devx_obj_destroy_attrs { - MLX5_IB_ATTR_DEVX_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), -}; - -enum mlx5_ib_devx_obj_modify_attrs { - MLX5_IB_ATTR_DEVX_OBJ_MODIFY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_IN, - MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_OUT, -}; - -enum mlx5_ib_devx_obj_query_attrs { - MLX5_IB_ATTR_DEVX_OBJ_QUERY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_IN, - MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_OUT, -}; - -enum mlx5_ib_devx_query_eqn_attrs { - MLX5_IB_ATTR_DEVX_QUERY_EQN_USER_VEC = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_ATTR_DEVX_QUERY_EQN_DEV_EQN, -}; - -enum mlx5_ib_devx_obj_methods { - MLX5_IB_METHOD_DEVX_OBJ_CREATE = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_METHOD_DEVX_OBJ_DESTROY, - MLX5_IB_METHOD_DEVX_OBJ_MODIFY, - MLX5_IB_METHOD_DEVX_OBJ_QUERY, -}; - -enum mlx5_ib_devx_umem_reg_attrs { - MLX5_IB_ATTR_DEVX_UMEM_REG_HANDLE = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_ATTR_DEVX_UMEM_REG_ADDR, - MLX5_IB_ATTR_DEVX_UMEM_REG_LEN, - MLX5_IB_ATTR_DEVX_UMEM_REG_ACCESS, - MLX5_IB_ATTR_DEVX_UMEM_REG_OUT_ID, -}; - -enum mlx5_ib_devx_umem_dereg_attrs { - MLX5_IB_ATTR_DEVX_UMEM_DEREG_HANDLE = (1U << UVERBS_ID_NS_SHIFT), -}; - -enum mlx5_ib_devx_umem_methods { - MLX5_IB_METHOD_DEVX_UMEM_REG = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_METHOD_DEVX_UMEM_DEREG, -}; - -enum mlx5_ib_objects { - MLX5_IB_OBJECT_DEVX = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_OBJECT_DEVX_OBJ, - MLX5_IB_OBJECT_DEVX_UMEM, - MLX5_IB_OBJECT_FLOW_MATCHER, -}; - -enum mlx5_ib_flow_matcher_create_attrs { - MLX5_IB_ATTR_FLOW_MATCHER_CREATE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_ATTR_FLOW_MATCHER_MATCH_MASK, - MLX5_IB_ATTR_FLOW_MATCHER_FLOW_TYPE, - MLX5_IB_ATTR_FLOW_MATCHER_MATCH_CRITERIA, -}; - -enum mlx5_ib_flow_matcher_destroy_attrs { - MLX5_IB_ATTR_FLOW_MATCHER_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), -}; - -enum mlx5_ib_flow_matcher_methods { - MLX5_IB_METHOD_FLOW_MATCHER_CREATE = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_METHOD_FLOW_MATCHER_DESTROY, -}; - -#define MLX5_IB_DW_MATCH_PARAM 0x80 - -struct mlx5_ib_match_params { - __u32 match_params[MLX5_IB_DW_MATCH_PARAM]; -}; - -enum mlx5_ib_flow_type { - MLX5_IB_FLOW_TYPE_NORMAL, - MLX5_IB_FLOW_TYPE_SNIFFER, - MLX5_IB_FLOW_TYPE_ALL_DEFAULT, - MLX5_IB_FLOW_TYPE_MC_DEFAULT, -}; - -enum mlx5_ib_create_flow_attrs { - MLX5_IB_ATTR_CREATE_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_ATTR_CREATE_FLOW_MATCH_VALUE, - MLX5_IB_ATTR_CREATE_FLOW_DEST_QP, - MLX5_IB_ATTR_CREATE_FLOW_DEST_DEVX, - MLX5_IB_ATTR_CREATE_FLOW_MATCHER, -}; - -enum mlx5_ib_destoy_flow_attrs { - MLX5_IB_ATTR_DESTROY_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT), -}; - -enum mlx5_ib_flow_methods { - MLX5_IB_METHOD_CREATE_FLOW = (1U << UVERBS_ID_NS_SHIFT), - MLX5_IB_METHOD_DESTROY_FLOW, -}; - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_verbs.h b/lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_verbs.h deleted file mode 100644 index e707316ff3..0000000000 --- a/lib/libc/include/generic-musl/rdma/mlx5_user_ioctl_verbs.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef MLX5_USER_IOCTL_VERBS_H -#define MLX5_USER_IOCTL_VERBS_H - -#include - -enum mlx5_ib_uapi_flow_action_flags { - MLX5_IB_UAPI_FLOW_ACTION_FLAGS_REQUIRE_METADATA = 1 << 0, -}; - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/mthca-abi.h b/lib/libc/include/generic-musl/rdma/mthca-abi.h deleted file mode 100644 index 2384b124b7..0000000000 --- a/lib/libc/include/generic-musl/rdma/mthca-abi.h +++ /dev/null @@ -1,112 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2005 Topspin Communications. All rights reserved. - * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef MTHCA_ABI_USER_H -#define MTHCA_ABI_USER_H - -#include - -/* - * Increment this value if any changes that break userspace ABI - * compatibility are made. - */ -#define MTHCA_UVERBS_ABI_VERSION 1 - -/* - * Make sure that all structs defined in this file remain laid out so - * that they pack the same way on 32-bit and 64-bit architectures (to - * avoid incompatibility between 32-bit userspace and 64-bit kernels). - * In particular do not use pointer types -- pass pointers in __u64 - * instead. - */ -struct mthca_alloc_ucontext_resp { - __u32 qp_tab_size; - __u32 uarc_size; -}; - -struct mthca_alloc_pd_resp { - __u32 pdn; - __u32 reserved; -}; - -/* - * Mark the memory region with a DMA attribute that causes - * in-flight DMA to be flushed when the region is written to: - */ -#define MTHCA_MR_DMASYNC 0x1 - -struct mthca_reg_mr { - __u32 mr_attrs; - __u32 reserved; -}; - -struct mthca_create_cq { - __u32 lkey; - __u32 pdn; - __aligned_u64 arm_db_page; - __aligned_u64 set_db_page; - __u32 arm_db_index; - __u32 set_db_index; -}; - -struct mthca_create_cq_resp { - __u32 cqn; - __u32 reserved; -}; - -struct mthca_resize_cq { - __u32 lkey; - __u32 reserved; -}; - -struct mthca_create_srq { - __u32 lkey; - __u32 db_index; - __aligned_u64 db_page; -}; - -struct mthca_create_srq_resp { - __u32 srqn; - __u32 reserved; -}; - -struct mthca_create_qp { - __u32 lkey; - __u32 reserved; - __aligned_u64 sq_db_page; - __aligned_u64 rq_db_page; - __u32 sq_db_index; - __u32 rq_db_index; -}; -#endif /* MTHCA_ABI_USER_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/nes-abi.h b/lib/libc/include/generic-musl/rdma/nes-abi.h deleted file mode 100644 index d9f90786ab..0000000000 --- a/lib/libc/include/generic-musl/rdma/nes-abi.h +++ /dev/null @@ -1,115 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved. - * Copyright (c) 2005 Topspin Communications. All rights reserved. - * Copyright (c) 2005 Cisco Systems. All rights reserved. - * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - */ - -#ifndef NES_ABI_USER_H -#define NES_ABI_USER_H - -#include - -#define NES_ABI_USERSPACE_VER 2 -#define NES_ABI_KERNEL_VER 2 - -/* - * Make sure that all structs defined in this file remain laid out so - * that they pack the same way on 32-bit and 64-bit architectures (to - * avoid incompatibility between 32-bit userspace and 64-bit kernels). - * In particular do not use pointer types -- pass pointers in __u64 - * instead. - */ - -struct nes_alloc_ucontext_req { - __u32 reserved32; - __u8 userspace_ver; - __u8 reserved8[3]; -}; - -struct nes_alloc_ucontext_resp { - __u32 max_pds; /* maximum pds allowed for this user process */ - __u32 max_qps; /* maximum qps allowed for this user process */ - __u32 wq_size; /* size of the WQs (sq+rq) allocated to the mmaped area */ - __u8 virtwq; /* flag to indicate if virtual WQ are to be used or not */ - __u8 kernel_ver; - __u8 reserved[2]; -}; - -struct nes_alloc_pd_resp { - __u32 pd_id; - __u32 mmap_db_index; -}; - -struct nes_create_cq_req { - __aligned_u64 user_cq_buffer; - __u32 mcrqf; - __u8 reserved[4]; -}; - -struct nes_create_qp_req { - __aligned_u64 user_wqe_buffers; - __aligned_u64 user_qp_buffer; -}; - -enum iwnes_memreg_type { - IWNES_MEMREG_TYPE_MEM = 0x0000, - IWNES_MEMREG_TYPE_QP = 0x0001, - IWNES_MEMREG_TYPE_CQ = 0x0002, - IWNES_MEMREG_TYPE_MW = 0x0003, - IWNES_MEMREG_TYPE_FMR = 0x0004, - IWNES_MEMREG_TYPE_FMEM = 0x0005, -}; - -struct nes_mem_reg_req { - __u32 reg_type; /* indicates if id is memory, QP or CQ */ - __u32 reserved; -}; - -struct nes_create_cq_resp { - __u32 cq_id; - __u32 cq_size; - __u32 mmap_db_index; - __u32 reserved; -}; - -struct nes_create_qp_resp { - __u32 qp_id; - __u32 actual_sq_size; - __u32 actual_rq_size; - __u32 mmap_sq_db_index; - __u32 mmap_rq_db_index; - __u32 nes_drv_opt; -}; - -#endif /* NES_ABI_USER_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/ocrdma-abi.h b/lib/libc/include/generic-musl/rdma/ocrdma-abi.h deleted file mode 100644 index 518cff8d8c..0000000000 --- a/lib/libc/include/generic-musl/rdma/ocrdma-abi.h +++ /dev/null @@ -1,152 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ -/* This file is part of the Emulex RoCE Device Driver for - * RoCE (RDMA over Converged Ethernet) adapters. - * Copyright (C) 2012-2015 Emulex. All rights reserved. - * EMULEX and SLI are trademarks of Emulex. - * www.emulex.com - * - * This software is available to you under a choice of one of two licenses. - * You may choose to be licensed under the terms of the GNU General Public - * License (GPL) Version 2, available from the file COPYING in the main - * directory of this source tree, or the BSD license below: - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT HOLDER OR CONTRIBUTORS 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. - * - * Contact Information: - * linux-drivers@emulex.com - * - * Emulex - * 3333 Susan Street - * Costa Mesa, CA 92626 - */ - -#ifndef OCRDMA_ABI_USER_H -#define OCRDMA_ABI_USER_H - -#include - -#define OCRDMA_ABI_VERSION 2 -#define OCRDMA_BE_ROCE_ABI_VERSION 1 -/* user kernel communication data structures. */ - -struct ocrdma_alloc_ucontext_resp { - __u32 dev_id; - __u32 wqe_size; - __u32 max_inline_data; - __u32 dpp_wqe_size; - __aligned_u64 ah_tbl_page; - __u32 ah_tbl_len; - __u32 rqe_size; - __u8 fw_ver[32]; - /* for future use/new features in progress */ - __aligned_u64 rsvd1; - __aligned_u64 rsvd2; -}; - -struct ocrdma_alloc_pd_ureq { - __u32 rsvd[2]; -}; - -struct ocrdma_alloc_pd_uresp { - __u32 id; - __u32 dpp_enabled; - __u32 dpp_page_addr_hi; - __u32 dpp_page_addr_lo; - __u32 rsvd[2]; -}; - -struct ocrdma_create_cq_ureq { - __u32 dpp_cq; - __u32 rsvd; /* pad */ -}; - -#define MAX_CQ_PAGES 8 -struct ocrdma_create_cq_uresp { - __u32 cq_id; - __u32 page_size; - __u32 num_pages; - __u32 max_hw_cqe; - __aligned_u64 page_addr[MAX_CQ_PAGES]; - __aligned_u64 db_page_addr; - __u32 db_page_size; - __u32 phase_change; - /* for future use/new features in progress */ - __aligned_u64 rsvd1; - __aligned_u64 rsvd2; -}; - -#define MAX_QP_PAGES 8 -#define MAX_UD_AV_PAGES 8 - -struct ocrdma_create_qp_ureq { - __u8 enable_dpp_cq; - __u8 rsvd; - __u16 dpp_cq_id; - __u32 rsvd1; /* pad */ -}; - -struct ocrdma_create_qp_uresp { - __u16 qp_id; - __u16 sq_dbid; - __u16 rq_dbid; - __u16 resv0; /* pad */ - __u32 sq_page_size; - __u32 rq_page_size; - __u32 num_sq_pages; - __u32 num_rq_pages; - __aligned_u64 sq_page_addr[MAX_QP_PAGES]; - __aligned_u64 rq_page_addr[MAX_QP_PAGES]; - __aligned_u64 db_page_addr; - __u32 db_page_size; - __u32 dpp_credit; - __u32 dpp_offset; - __u32 num_wqe_allocated; - __u32 num_rqe_allocated; - __u32 db_sq_offset; - __u32 db_rq_offset; - __u32 db_shift; - __aligned_u64 rsvd[11]; -}; - -struct ocrdma_create_srq_uresp { - __u16 rq_dbid; - __u16 resv0; /* pad */ - __u32 resv1; - - __u32 rq_page_size; - __u32 num_rq_pages; - - __aligned_u64 rq_page_addr[MAX_QP_PAGES]; - __aligned_u64 db_page_addr; - - __u32 db_page_size; - __u32 num_rqe_allocated; - __u32 db_rq_offset; - __u32 db_shift; - - __aligned_u64 rsvd2; - __aligned_u64 rsvd3; -}; - -#endif /* OCRDMA_ABI_USER_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/qedr-abi.h b/lib/libc/include/generic-musl/rdma/qedr-abi.h deleted file mode 100644 index 6dd9316062..0000000000 --- a/lib/libc/include/generic-musl/rdma/qedr-abi.h +++ /dev/null @@ -1,131 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* QLogic qedr NIC Driver - * Copyright (c) 2015-2016 QLogic Corporation - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef __QEDR_USER_H__ -#define __QEDR_USER_H__ - -#include - -#define QEDR_ABI_VERSION (8) - -/* user kernel communication data structures. */ - -struct qedr_alloc_ucontext_resp { - __aligned_u64 db_pa; - __u32 db_size; - - __u32 max_send_wr; - __u32 max_recv_wr; - __u32 max_srq_wr; - __u32 sges_per_send_wr; - __u32 sges_per_recv_wr; - __u32 sges_per_srq_wr; - __u32 max_cqes; - __u8 dpm_enabled; - __u8 wids_enabled; - __u16 wid_count; - __u32 reserved; -}; - -struct qedr_alloc_pd_ureq { - __aligned_u64 rsvd1; -}; - -struct qedr_alloc_pd_uresp { - __u32 pd_id; - __u32 reserved; -}; - -struct qedr_create_cq_ureq { - __aligned_u64 addr; - __aligned_u64 len; -}; - -struct qedr_create_cq_uresp { - __u32 db_offset; - __u16 icid; - __u16 reserved; -}; - -struct qedr_create_qp_ureq { - __u32 qp_handle_hi; - __u32 qp_handle_lo; - - /* SQ */ - /* user space virtual address of SQ buffer */ - __aligned_u64 sq_addr; - - /* length of SQ buffer */ - __aligned_u64 sq_len; - - /* RQ */ - /* user space virtual address of RQ buffer */ - __aligned_u64 rq_addr; - - /* length of RQ buffer */ - __aligned_u64 rq_len; -}; - -struct qedr_create_qp_uresp { - __u32 qp_id; - __u32 atomic_supported; - - /* SQ */ - __u32 sq_db_offset; - __u16 sq_icid; - - /* RQ */ - __u32 rq_db_offset; - __u16 rq_icid; - - __u32 rq_db2_offset; - __u32 reserved; -}; - -struct qedr_create_srq_ureq { - /* user space virtual address of producer pair */ - __aligned_u64 prod_pair_addr; - - /* user space virtual address of SRQ buffer */ - __aligned_u64 srq_addr; - - /* length of SRQ buffer */ - __aligned_u64 srq_len; -}; - -struct qedr_create_srq_uresp { - __u16 srq_id; - __u16 reserved0; - __u32 reserved1; -}; - -#endif /* __QEDR_USER_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/rdma_netlink.h b/lib/libc/include/generic-musl/rdma/rdma_netlink.h deleted file mode 100644 index bca37b12bd..0000000000 --- a/lib/libc/include/generic-musl/rdma/rdma_netlink.h +++ /dev/null @@ -1,434 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _RDMA_NETLINK_H -#define _RDMA_NETLINK_H - -#include - -enum { - RDMA_NL_RDMA_CM = 1, - RDMA_NL_IWCM, - RDMA_NL_RSVD, - RDMA_NL_LS, /* RDMA Local Services */ - RDMA_NL_NLDEV, /* RDMA device interface */ - RDMA_NL_NUM_CLIENTS -}; - -enum { - RDMA_NL_GROUP_CM = 1, - RDMA_NL_GROUP_IWPM, - RDMA_NL_GROUP_LS, - RDMA_NL_NUM_GROUPS -}; - -#define RDMA_NL_GET_CLIENT(type) ((type & (((1 << 6) - 1) << 10)) >> 10) -#define RDMA_NL_GET_OP(type) (type & ((1 << 10) - 1)) -#define RDMA_NL_GET_TYPE(client, op) ((client << 10) + op) - -enum { - RDMA_NL_RDMA_CM_ID_STATS = 0, - RDMA_NL_RDMA_CM_NUM_OPS -}; - -enum { - RDMA_NL_RDMA_CM_ATTR_SRC_ADDR = 1, - RDMA_NL_RDMA_CM_ATTR_DST_ADDR, - RDMA_NL_RDMA_CM_NUM_ATTR, -}; - -/* iwarp port mapper op-codes */ -enum { - RDMA_NL_IWPM_REG_PID = 0, - RDMA_NL_IWPM_ADD_MAPPING, - RDMA_NL_IWPM_QUERY_MAPPING, - RDMA_NL_IWPM_REMOVE_MAPPING, - RDMA_NL_IWPM_REMOTE_INFO, - RDMA_NL_IWPM_HANDLE_ERR, - RDMA_NL_IWPM_MAPINFO, - RDMA_NL_IWPM_MAPINFO_NUM, - RDMA_NL_IWPM_NUM_OPS -}; - -struct rdma_cm_id_stats { - __u32 qp_num; - __u32 bound_dev_if; - __u32 port_space; - __s32 pid; - __u8 cm_state; - __u8 node_type; - __u8 port_num; - __u8 qp_type; -}; - -enum { - IWPM_NLA_REG_PID_UNSPEC = 0, - IWPM_NLA_REG_PID_SEQ, - IWPM_NLA_REG_IF_NAME, - IWPM_NLA_REG_IBDEV_NAME, - IWPM_NLA_REG_ULIB_NAME, - IWPM_NLA_REG_PID_MAX -}; - -enum { - IWPM_NLA_RREG_PID_UNSPEC = 0, - IWPM_NLA_RREG_PID_SEQ, - IWPM_NLA_RREG_IBDEV_NAME, - IWPM_NLA_RREG_ULIB_NAME, - IWPM_NLA_RREG_ULIB_VER, - IWPM_NLA_RREG_PID_ERR, - IWPM_NLA_RREG_PID_MAX - -}; - -enum { - IWPM_NLA_MANAGE_MAPPING_UNSPEC = 0, - IWPM_NLA_MANAGE_MAPPING_SEQ, - IWPM_NLA_MANAGE_ADDR, - IWPM_NLA_MANAGE_MAPPED_LOC_ADDR, - IWPM_NLA_RMANAGE_MAPPING_ERR, - IWPM_NLA_RMANAGE_MAPPING_MAX -}; - -#define IWPM_NLA_MANAGE_MAPPING_MAX 3 -#define IWPM_NLA_QUERY_MAPPING_MAX 4 -#define IWPM_NLA_MAPINFO_SEND_MAX 3 - -enum { - IWPM_NLA_QUERY_MAPPING_UNSPEC = 0, - IWPM_NLA_QUERY_MAPPING_SEQ, - IWPM_NLA_QUERY_LOCAL_ADDR, - IWPM_NLA_QUERY_REMOTE_ADDR, - IWPM_NLA_RQUERY_MAPPED_LOC_ADDR, - IWPM_NLA_RQUERY_MAPPED_REM_ADDR, - IWPM_NLA_RQUERY_MAPPING_ERR, - IWPM_NLA_RQUERY_MAPPING_MAX -}; - -enum { - IWPM_NLA_MAPINFO_REQ_UNSPEC = 0, - IWPM_NLA_MAPINFO_ULIB_NAME, - IWPM_NLA_MAPINFO_ULIB_VER, - IWPM_NLA_MAPINFO_REQ_MAX -}; - -enum { - IWPM_NLA_MAPINFO_UNSPEC = 0, - IWPM_NLA_MAPINFO_LOCAL_ADDR, - IWPM_NLA_MAPINFO_MAPPED_ADDR, - IWPM_NLA_MAPINFO_MAX -}; - -enum { - IWPM_NLA_MAPINFO_NUM_UNSPEC = 0, - IWPM_NLA_MAPINFO_SEQ, - IWPM_NLA_MAPINFO_SEND_NUM, - IWPM_NLA_MAPINFO_ACK_NUM, - IWPM_NLA_MAPINFO_NUM_MAX -}; - -enum { - IWPM_NLA_ERR_UNSPEC = 0, - IWPM_NLA_ERR_SEQ, - IWPM_NLA_ERR_CODE, - IWPM_NLA_ERR_MAX -}; - -/* - * Local service operations: - * RESOLVE - The client requests the local service to resolve a path. - * SET_TIMEOUT - The local service requests the client to set the timeout. - * IP_RESOLVE - The client requests the local service to resolve an IP to GID. - */ -enum { - RDMA_NL_LS_OP_RESOLVE = 0, - RDMA_NL_LS_OP_SET_TIMEOUT, - RDMA_NL_LS_OP_IP_RESOLVE, - RDMA_NL_LS_NUM_OPS -}; - -/* Local service netlink message flags */ -#define RDMA_NL_LS_F_ERR 0x0100 /* Failed response */ - -/* - * Local service resolve operation family header. - * The layout for the resolve operation: - * nlmsg header - * family header - * attributes - */ - -/* - * Local service path use: - * Specify how the path(s) will be used. - * ALL - For connected CM operation (6 pathrecords) - * UNIDIRECTIONAL - For unidirectional UD (1 pathrecord) - * GMP - For miscellaneous GMP like operation (at least 1 reversible - * pathrecord) - */ -enum { - LS_RESOLVE_PATH_USE_ALL = 0, - LS_RESOLVE_PATH_USE_UNIDIRECTIONAL, - LS_RESOLVE_PATH_USE_GMP, - LS_RESOLVE_PATH_USE_MAX -}; - -#define LS_DEVICE_NAME_MAX 64 - -struct rdma_ls_resolve_header { - __u8 device_name[LS_DEVICE_NAME_MAX]; - __u8 port_num; - __u8 path_use; -}; - -struct rdma_ls_ip_resolve_header { - __u32 ifindex; -}; - -/* Local service attribute type */ -#define RDMA_NLA_F_MANDATORY (1 << 13) -#define RDMA_NLA_TYPE_MASK (~(NLA_F_NESTED | NLA_F_NET_BYTEORDER | \ - RDMA_NLA_F_MANDATORY)) - -/* - * Local service attributes: - * Attr Name Size Byte order - * ----------------------------------------------------- - * PATH_RECORD struct ib_path_rec_data - * TIMEOUT u32 cpu - * SERVICE_ID u64 cpu - * DGID u8[16] BE - * SGID u8[16] BE - * TCLASS u8 - * PKEY u16 cpu - * QOS_CLASS u16 cpu - * IPV4 u32 BE - * IPV6 u8[16] BE - */ -enum { - LS_NLA_TYPE_UNSPEC = 0, - LS_NLA_TYPE_PATH_RECORD, - LS_NLA_TYPE_TIMEOUT, - LS_NLA_TYPE_SERVICE_ID, - LS_NLA_TYPE_DGID, - LS_NLA_TYPE_SGID, - LS_NLA_TYPE_TCLASS, - LS_NLA_TYPE_PKEY, - LS_NLA_TYPE_QOS_CLASS, - LS_NLA_TYPE_IPV4, - LS_NLA_TYPE_IPV6, - LS_NLA_TYPE_MAX -}; - -/* Local service DGID/SGID attribute: big endian */ -struct rdma_nla_ls_gid { - __u8 gid[16]; -}; - -enum rdma_nldev_command { - RDMA_NLDEV_CMD_UNSPEC, - - RDMA_NLDEV_CMD_GET, /* can dump */ - - /* 2 - 4 are free to use */ - - RDMA_NLDEV_CMD_PORT_GET = 5, /* can dump */ - - /* 6 - 8 are free to use */ - - RDMA_NLDEV_CMD_RES_GET = 9, /* can dump */ - - RDMA_NLDEV_CMD_RES_QP_GET, /* can dump */ - - RDMA_NLDEV_CMD_RES_CM_ID_GET, /* can dump */ - - RDMA_NLDEV_CMD_RES_CQ_GET, /* can dump */ - - RDMA_NLDEV_CMD_RES_MR_GET, /* can dump */ - - RDMA_NLDEV_CMD_RES_PD_GET, /* can dump */ - - RDMA_NLDEV_NUM_OPS -}; - -enum { - RDMA_NLDEV_ATTR_ENTRY_STRLEN = 16, -}; - -enum rdma_nldev_print_type { - RDMA_NLDEV_PRINT_TYPE_UNSPEC, - RDMA_NLDEV_PRINT_TYPE_HEX, -}; - -enum rdma_nldev_attr { - /* don't change the order or add anything between, this is ABI! */ - RDMA_NLDEV_ATTR_UNSPEC, - - /* Pad attribute for 64b alignment */ - RDMA_NLDEV_ATTR_PAD = RDMA_NLDEV_ATTR_UNSPEC, - - /* Identifier for ib_device */ - RDMA_NLDEV_ATTR_DEV_INDEX, /* u32 */ - - RDMA_NLDEV_ATTR_DEV_NAME, /* string */ - /* - * Device index together with port index are identifiers - * for port/link properties. - * - * For RDMA_NLDEV_CMD_GET commamnd, port index will return number - * of available ports in ib_device, while for port specific operations, - * it will be real port index as it appears in sysfs. Port index follows - * sysfs notation and starts from 1 for the first port. - */ - RDMA_NLDEV_ATTR_PORT_INDEX, /* u32 */ - - /* - * Device and port capabilities - */ - RDMA_NLDEV_ATTR_CAP_FLAGS, /* u64 */ - - /* - * FW version - */ - RDMA_NLDEV_ATTR_FW_VERSION, /* string */ - - /* - * Node GUID (in host byte order) associated with the RDMA device. - */ - RDMA_NLDEV_ATTR_NODE_GUID, /* u64 */ - - /* - * System image GUID (in host byte order) associated with - * this RDMA device and other devices which are part of a - * single system. - */ - RDMA_NLDEV_ATTR_SYS_IMAGE_GUID, /* u64 */ - - /* - * Subnet prefix (in host byte order) - */ - RDMA_NLDEV_ATTR_SUBNET_PREFIX, /* u64 */ - - /* - * Local Identifier (LID), - * According to IB specification, It is 16-bit address assigned - * by the Subnet Manager. Extended to be 32-bit for OmniPath users. - */ - RDMA_NLDEV_ATTR_LID, /* u32 */ - RDMA_NLDEV_ATTR_SM_LID, /* u32 */ - - /* - * LID mask control (LMC) - */ - RDMA_NLDEV_ATTR_LMC, /* u8 */ - - RDMA_NLDEV_ATTR_PORT_STATE, /* u8 */ - RDMA_NLDEV_ATTR_PORT_PHYS_STATE, /* u8 */ - - RDMA_NLDEV_ATTR_DEV_NODE_TYPE, /* u8 */ - - RDMA_NLDEV_ATTR_RES_SUMMARY, /* nested table */ - RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY, /* nested table */ - RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_NAME, /* string */ - RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_CURR, /* u64 */ - - RDMA_NLDEV_ATTR_RES_QP, /* nested table */ - RDMA_NLDEV_ATTR_RES_QP_ENTRY, /* nested table */ - /* - * Local QPN - */ - RDMA_NLDEV_ATTR_RES_LQPN, /* u32 */ - /* - * Remote QPN, - * Applicable for RC and UC only IBTA 11.2.5.3 QUERY QUEUE PAIR - */ - RDMA_NLDEV_ATTR_RES_RQPN, /* u32 */ - /* - * Receive Queue PSN, - * Applicable for RC and UC only 11.2.5.3 QUERY QUEUE PAIR - */ - RDMA_NLDEV_ATTR_RES_RQ_PSN, /* u32 */ - /* - * Send Queue PSN - */ - RDMA_NLDEV_ATTR_RES_SQ_PSN, /* u32 */ - RDMA_NLDEV_ATTR_RES_PATH_MIG_STATE, /* u8 */ - /* - * QP types as visible to RDMA/core, the reserved QPT - * are not exported through this interface. - */ - RDMA_NLDEV_ATTR_RES_TYPE, /* u8 */ - RDMA_NLDEV_ATTR_RES_STATE, /* u8 */ - /* - * Process ID which created object, - * in case of kernel origin, PID won't exist. - */ - RDMA_NLDEV_ATTR_RES_PID, /* u32 */ - /* - * The name of process created following resource. - * It will exist only for kernel objects. - * For user created objects, the user is supposed - * to read /proc/PID/comm file. - */ - RDMA_NLDEV_ATTR_RES_KERN_NAME, /* string */ - - RDMA_NLDEV_ATTR_RES_CM_ID, /* nested table */ - RDMA_NLDEV_ATTR_RES_CM_ID_ENTRY, /* nested table */ - /* - * rdma_cm_id port space. - */ - RDMA_NLDEV_ATTR_RES_PS, /* u32 */ - /* - * Source and destination socket addresses - */ - RDMA_NLDEV_ATTR_RES_SRC_ADDR, /* __kernel_sockaddr_storage */ - RDMA_NLDEV_ATTR_RES_DST_ADDR, /* __kernel_sockaddr_storage */ - - RDMA_NLDEV_ATTR_RES_CQ, /* nested table */ - RDMA_NLDEV_ATTR_RES_CQ_ENTRY, /* nested table */ - RDMA_NLDEV_ATTR_RES_CQE, /* u32 */ - RDMA_NLDEV_ATTR_RES_USECNT, /* u64 */ - RDMA_NLDEV_ATTR_RES_POLL_CTX, /* u8 */ - - RDMA_NLDEV_ATTR_RES_MR, /* nested table */ - RDMA_NLDEV_ATTR_RES_MR_ENTRY, /* nested table */ - RDMA_NLDEV_ATTR_RES_RKEY, /* u32 */ - RDMA_NLDEV_ATTR_RES_LKEY, /* u32 */ - RDMA_NLDEV_ATTR_RES_IOVA, /* u64 */ - RDMA_NLDEV_ATTR_RES_MRLEN, /* u64 */ - - RDMA_NLDEV_ATTR_RES_PD, /* nested table */ - RDMA_NLDEV_ATTR_RES_PD_ENTRY, /* nested table */ - RDMA_NLDEV_ATTR_RES_LOCAL_DMA_LKEY, /* u32 */ - RDMA_NLDEV_ATTR_RES_UNSAFE_GLOBAL_RKEY, /* u32 */ - /* - * Provides logical name and index of netdevice which is - * connected to physical port. This information is relevant - * for RoCE and iWARP. - * - * The netdevices which are associated with containers are - * supposed to be exported together with GID table once it - * will be exposed through the netlink. Because the - * associated netdevices are properties of GIDs. - */ - RDMA_NLDEV_ATTR_NDEV_INDEX, /* u32 */ - RDMA_NLDEV_ATTR_NDEV_NAME, /* string */ - /* - * driver-specific attributes. - */ - RDMA_NLDEV_ATTR_DRIVER, /* nested table */ - RDMA_NLDEV_ATTR_DRIVER_ENTRY, /* nested table */ - RDMA_NLDEV_ATTR_DRIVER_STRING, /* string */ - /* - * u8 values from enum rdma_nldev_print_type - */ - RDMA_NLDEV_ATTR_DRIVER_PRINT_TYPE, /* u8 */ - RDMA_NLDEV_ATTR_DRIVER_S32, /* s32 */ - RDMA_NLDEV_ATTR_DRIVER_U32, /* u32 */ - RDMA_NLDEV_ATTR_DRIVER_S64, /* s64 */ - RDMA_NLDEV_ATTR_DRIVER_U64, /* u64 */ - - /* - * Always the end - */ - RDMA_NLDEV_ATTR_MAX -}; -#endif /* _RDMA_NETLINK_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/rdma_user_cm.h b/lib/libc/include/generic-musl/rdma/rdma_user_cm.h deleted file mode 100644 index 22fb801b6a..0000000000 --- a/lib/libc/include/generic-musl/rdma/rdma_user_cm.h +++ /dev/null @@ -1,324 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef RDMA_USER_CM_H -#define RDMA_USER_CM_H - -#include -#include -#include -#include -#include - -#define RDMA_USER_CM_ABI_VERSION 4 - -#define RDMA_MAX_PRIVATE_DATA 256 - -enum { - RDMA_USER_CM_CMD_CREATE_ID, - RDMA_USER_CM_CMD_DESTROY_ID, - RDMA_USER_CM_CMD_BIND_IP, - RDMA_USER_CM_CMD_RESOLVE_IP, - RDMA_USER_CM_CMD_RESOLVE_ROUTE, - RDMA_USER_CM_CMD_QUERY_ROUTE, - RDMA_USER_CM_CMD_CONNECT, - RDMA_USER_CM_CMD_LISTEN, - RDMA_USER_CM_CMD_ACCEPT, - RDMA_USER_CM_CMD_REJECT, - RDMA_USER_CM_CMD_DISCONNECT, - RDMA_USER_CM_CMD_INIT_QP_ATTR, - RDMA_USER_CM_CMD_GET_EVENT, - RDMA_USER_CM_CMD_GET_OPTION, - RDMA_USER_CM_CMD_SET_OPTION, - RDMA_USER_CM_CMD_NOTIFY, - RDMA_USER_CM_CMD_JOIN_IP_MCAST, - RDMA_USER_CM_CMD_LEAVE_MCAST, - RDMA_USER_CM_CMD_MIGRATE_ID, - RDMA_USER_CM_CMD_QUERY, - RDMA_USER_CM_CMD_BIND, - RDMA_USER_CM_CMD_RESOLVE_ADDR, - RDMA_USER_CM_CMD_JOIN_MCAST -}; - -/* See IBTA Annex A11, servies ID bytes 4 & 5 */ -enum rdma_ucm_port_space { - RDMA_PS_IPOIB = 0x0002, - RDMA_PS_IB = 0x013F, - RDMA_PS_TCP = 0x0106, - RDMA_PS_UDP = 0x0111, -}; - -/* - * command ABI structures. - */ -struct rdma_ucm_cmd_hdr { - __u32 cmd; - __u16 in; - __u16 out; -}; - -struct rdma_ucm_create_id { - __aligned_u64 uid; - __aligned_u64 response; - __u16 ps; /* use enum rdma_ucm_port_space */ - __u8 qp_type; - __u8 reserved[5]; -}; - -struct rdma_ucm_create_id_resp { - __u32 id; -}; - -struct rdma_ucm_destroy_id { - __aligned_u64 response; - __u32 id; - __u32 reserved; -}; - -struct rdma_ucm_destroy_id_resp { - __u32 events_reported; -}; - -struct rdma_ucm_bind_ip { - __aligned_u64 response; - struct sockaddr_in6 addr; - __u32 id; -}; - -struct rdma_ucm_bind { - __u32 id; - __u16 addr_size; - __u16 reserved; - struct __kernel_sockaddr_storage addr; -}; - -struct rdma_ucm_resolve_ip { - struct sockaddr_in6 src_addr; - struct sockaddr_in6 dst_addr; - __u32 id; - __u32 timeout_ms; -}; - -struct rdma_ucm_resolve_addr { - __u32 id; - __u32 timeout_ms; - __u16 src_size; - __u16 dst_size; - __u32 reserved; - struct __kernel_sockaddr_storage src_addr; - struct __kernel_sockaddr_storage dst_addr; -}; - -struct rdma_ucm_resolve_route { - __u32 id; - __u32 timeout_ms; -}; - -enum { - RDMA_USER_CM_QUERY_ADDR, - RDMA_USER_CM_QUERY_PATH, - RDMA_USER_CM_QUERY_GID -}; - -struct rdma_ucm_query { - __aligned_u64 response; - __u32 id; - __u32 option; -}; - -struct rdma_ucm_query_route_resp { - __aligned_u64 node_guid; - struct ib_user_path_rec ib_route[2]; - struct sockaddr_in6 src_addr; - struct sockaddr_in6 dst_addr; - __u32 num_paths; - __u8 port_num; - __u8 reserved[3]; -}; - -struct rdma_ucm_query_addr_resp { - __aligned_u64 node_guid; - __u8 port_num; - __u8 reserved; - __u16 pkey; - __u16 src_size; - __u16 dst_size; - struct __kernel_sockaddr_storage src_addr; - struct __kernel_sockaddr_storage dst_addr; -}; - -struct rdma_ucm_query_path_resp { - __u32 num_paths; - __u32 reserved; - struct ib_path_rec_data path_data[0]; -}; - -struct rdma_ucm_conn_param { - __u32 qp_num; - __u32 qkey; - __u8 private_data[RDMA_MAX_PRIVATE_DATA]; - __u8 private_data_len; - __u8 srq; - __u8 responder_resources; - __u8 initiator_depth; - __u8 flow_control; - __u8 retry_count; - __u8 rnr_retry_count; - __u8 valid; -}; - -struct rdma_ucm_ud_param { - __u32 qp_num; - __u32 qkey; - struct ib_uverbs_ah_attr ah_attr; - __u8 private_data[RDMA_MAX_PRIVATE_DATA]; - __u8 private_data_len; - __u8 reserved[7]; -}; - -struct rdma_ucm_connect { - struct rdma_ucm_conn_param conn_param; - __u32 id; - __u32 reserved; -}; - -struct rdma_ucm_listen { - __u32 id; - __u32 backlog; -}; - -struct rdma_ucm_accept { - __aligned_u64 uid; - struct rdma_ucm_conn_param conn_param; - __u32 id; - __u32 reserved; -}; - -struct rdma_ucm_reject { - __u32 id; - __u8 private_data_len; - __u8 reserved[3]; - __u8 private_data[RDMA_MAX_PRIVATE_DATA]; -}; - -struct rdma_ucm_disconnect { - __u32 id; -}; - -struct rdma_ucm_init_qp_attr { - __aligned_u64 response; - __u32 id; - __u32 qp_state; -}; - -struct rdma_ucm_notify { - __u32 id; - __u32 event; -}; - -struct rdma_ucm_join_ip_mcast { - __aligned_u64 response; /* rdma_ucm_create_id_resp */ - __aligned_u64 uid; - struct sockaddr_in6 addr; - __u32 id; -}; - -/* Multicast join flags */ -enum { - RDMA_MC_JOIN_FLAG_FULLMEMBER, - RDMA_MC_JOIN_FLAG_SENDONLY_FULLMEMBER, - RDMA_MC_JOIN_FLAG_RESERVED, -}; - -struct rdma_ucm_join_mcast { - __aligned_u64 response; /* rdma_ucma_create_id_resp */ - __aligned_u64 uid; - __u32 id; - __u16 addr_size; - __u16 join_flags; - struct __kernel_sockaddr_storage addr; -}; - -struct rdma_ucm_get_event { - __aligned_u64 response; -}; - -struct rdma_ucm_event_resp { - __aligned_u64 uid; - __u32 id; - __u32 event; - __u32 status; - /* - * NOTE: This union is not aligned to 8 bytes so none of the union - * members may contain a u64 or anything with higher alignment than 4. - */ - union { - struct rdma_ucm_conn_param conn; - struct rdma_ucm_ud_param ud; - } param; - __u32 reserved; -}; - -/* Option levels */ -enum { - RDMA_OPTION_ID = 0, - RDMA_OPTION_IB = 1 -}; - -/* Option details */ -enum { - RDMA_OPTION_ID_TOS = 0, - RDMA_OPTION_ID_REUSEADDR = 1, - RDMA_OPTION_ID_AFONLY = 2, - RDMA_OPTION_IB_PATH = 1 -}; - -struct rdma_ucm_set_option { - __aligned_u64 optval; - __u32 id; - __u32 level; - __u32 optname; - __u32 optlen; -}; - -struct rdma_ucm_migrate_id { - __aligned_u64 response; - __u32 id; - __u32 fd; -}; - -struct rdma_ucm_migrate_resp { - __u32 events_reported; -}; - -#endif /* RDMA_USER_CM_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/rdma_user_ioctl.h b/lib/libc/include/generic-musl/rdma/rdma_user_ioctl.h deleted file mode 100644 index bba55acc1b..0000000000 --- a/lib/libc/include/generic-musl/rdma/rdma_user_ioctl.h +++ /dev/null @@ -1,85 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2016 Mellanox Technologies, LTD. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef RDMA_USER_IOCTL_H -#define RDMA_USER_IOCTL_H - -#include -#include -#include - -/* Legacy name, for user space application which already use it */ -#define IB_IOCTL_MAGIC RDMA_IOCTL_MAGIC - -/* - * General blocks assignments - * It is closed on purpose do not expose it it user space - * #define MAD_CMD_BASE 0x00 - * #define HFI1_CMD_BAS 0xE0 - */ - -/* MAD specific section */ -#define IB_USER_MAD_REGISTER_AGENT _IOWR(RDMA_IOCTL_MAGIC, 0x01, struct ib_user_mad_reg_req) -#define IB_USER_MAD_UNREGISTER_AGENT _IOW(RDMA_IOCTL_MAGIC, 0x02, __u32) -#define IB_USER_MAD_ENABLE_PKEY _IO(RDMA_IOCTL_MAGIC, 0x03) -#define IB_USER_MAD_REGISTER_AGENT2 _IOWR(RDMA_IOCTL_MAGIC, 0x04, struct ib_user_mad_reg_req2) - -/* HFI specific section */ -/* allocate HFI and context */ -#define HFI1_IOCTL_ASSIGN_CTXT _IOWR(RDMA_IOCTL_MAGIC, 0xE1, struct hfi1_user_info) -/* find out what resources we got */ -#define HFI1_IOCTL_CTXT_INFO _IOW(RDMA_IOCTL_MAGIC, 0xE2, struct hfi1_ctxt_info) -/* set up userspace */ -#define HFI1_IOCTL_USER_INFO _IOW(RDMA_IOCTL_MAGIC, 0xE3, struct hfi1_base_info) -/* update expected TID entries */ -#define HFI1_IOCTL_TID_UPDATE _IOWR(RDMA_IOCTL_MAGIC, 0xE4, struct hfi1_tid_info) -/* free expected TID entries */ -#define HFI1_IOCTL_TID_FREE _IOWR(RDMA_IOCTL_MAGIC, 0xE5, struct hfi1_tid_info) -/* force an update of PIO credit */ -#define HFI1_IOCTL_CREDIT_UPD _IO(RDMA_IOCTL_MAGIC, 0xE6) -/* control receipt of packets */ -#define HFI1_IOCTL_RECV_CTRL _IOW(RDMA_IOCTL_MAGIC, 0xE8, int) -/* set the kind of polling we want */ -#define HFI1_IOCTL_POLL_TYPE _IOW(RDMA_IOCTL_MAGIC, 0xE9, int) -/* ack & clear user status bits */ -#define HFI1_IOCTL_ACK_EVENT _IOW(RDMA_IOCTL_MAGIC, 0xEA, unsigned long) -/* set context's pkey */ -#define HFI1_IOCTL_SET_PKEY _IOW(RDMA_IOCTL_MAGIC, 0xEB, __u16) -/* reset context's HW send context */ -#define HFI1_IOCTL_CTXT_RESET _IO(RDMA_IOCTL_MAGIC, 0xEC) -/* read TID cache invalidations */ -#define HFI1_IOCTL_TID_INVAL_READ _IOWR(RDMA_IOCTL_MAGIC, 0xED, struct hfi1_tid_info) -/* get the version of the user cdev */ -#define HFI1_IOCTL_GET_VERS _IOR(RDMA_IOCTL_MAGIC, 0xEE, int) - -#endif /* RDMA_USER_IOCTL_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/rdma_user_ioctl_cmds.h b/lib/libc/include/generic-musl/rdma/rdma_user_ioctl_cmds.h deleted file mode 100644 index b71128f170..0000000000 --- a/lib/libc/include/generic-musl/rdma/rdma_user_ioctl_cmds.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef RDMA_USER_IOCTL_CMDS_H -#define RDMA_USER_IOCTL_CMDS_H - -#include -#include - -/* Documentation/ioctl/ioctl-number.txt */ -#define RDMA_IOCTL_MAGIC 0x1b -#define RDMA_VERBS_IOCTL \ - _IOWR(RDMA_IOCTL_MAGIC, 1, struct ib_uverbs_ioctl_hdr) - -enum { - /* User input */ - UVERBS_ATTR_F_MANDATORY = 1U << 0, - /* - * Valid output bit should be ignored and considered set in - * mandatory fields. This bit is kernel output. - */ - UVERBS_ATTR_F_VALID_OUTPUT = 1U << 1, -}; - -struct ib_uverbs_attr { - __u16 attr_id; /* command specific type attribute */ - __u16 len; /* only for pointers */ - __u16 flags; /* combination of UVERBS_ATTR_F_XXXX */ - union { - struct { - __u8 elem_id; - __u8 reserved; - } enum_data; - __u16 reserved; - } attr_data; - union { - /* Used by PTR_IN/OUT, ENUM_IN and IDR */ - __aligned_u64 data; - /* Used by FD_IN and FD_OUT */ - __s64 data_s64; - }; -}; - -struct ib_uverbs_ioctl_hdr { - __u16 length; - __u16 object_id; - __u16 method_id; - __u16 num_attrs; - __aligned_u64 reserved1; - __u32 driver_id; - __u32 reserved2; - struct ib_uverbs_attr attrs[0]; -}; - -enum rdma_driver_id { - RDMA_DRIVER_UNKNOWN, - RDMA_DRIVER_MLX5, - RDMA_DRIVER_MLX4, - RDMA_DRIVER_CXGB3, - RDMA_DRIVER_CXGB4, - RDMA_DRIVER_MTHCA, - RDMA_DRIVER_BNXT_RE, - RDMA_DRIVER_OCRDMA, - RDMA_DRIVER_NES, - RDMA_DRIVER_I40IW, - RDMA_DRIVER_VMW_PVRDMA, - RDMA_DRIVER_QEDR, - RDMA_DRIVER_HNS, - RDMA_DRIVER_USNIC, - RDMA_DRIVER_RXE, - RDMA_DRIVER_HFI1, - RDMA_DRIVER_QIB, -}; - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/rdma_user_rxe.h b/lib/libc/include/generic-musl/rdma/rdma_user_rxe.h deleted file mode 100644 index 3664e1a1b3..0000000000 --- a/lib/libc/include/generic-musl/rdma/rdma_user_rxe.h +++ /dev/null @@ -1,179 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2016 Mellanox Technologies Ltd. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef RDMA_USER_RXE_H -#define RDMA_USER_RXE_H - -#include -#include -#include -#include - -union rxe_gid { - __u8 raw[16]; - struct { - __be64 subnet_prefix; - __be64 interface_id; - } global; -}; - -struct rxe_global_route { - union rxe_gid dgid; - __u32 flow_label; - __u8 sgid_index; - __u8 hop_limit; - __u8 traffic_class; -}; - -struct rxe_av { - __u8 port_num; - __u8 network_type; - __u16 reserved1; - __u32 reserved2; - struct rxe_global_route grh; - union { - struct sockaddr_in _sockaddr_in; - struct sockaddr_in6 _sockaddr_in6; - } sgid_addr, dgid_addr; -}; - -struct rxe_send_wr { - __aligned_u64 wr_id; - __u32 num_sge; - __u32 opcode; - __u32 send_flags; - union { - __be32 imm_data; - __u32 invalidate_rkey; - } ex; - union { - struct { - __aligned_u64 remote_addr; - __u32 rkey; - __u32 reserved; - } rdma; - struct { - __aligned_u64 remote_addr; - __aligned_u64 compare_add; - __aligned_u64 swap; - __u32 rkey; - __u32 reserved; - } atomic; - struct { - __u32 remote_qpn; - __u32 remote_qkey; - __u16 pkey_index; - } ud; - /* reg is only used by the kernel and is not part of the uapi */ - struct { - union { - struct ib_mr *mr; - __aligned_u64 reserved; - }; - __u32 key; - __u32 access; - } reg; - } wr; -}; - -struct rxe_sge { - __aligned_u64 addr; - __u32 length; - __u32 lkey; -}; - -struct mminfo { - __aligned_u64 offset; - __u32 size; - __u32 pad; -}; - -struct rxe_dma_info { - __u32 length; - __u32 resid; - __u32 cur_sge; - __u32 num_sge; - __u32 sge_offset; - __u32 reserved; - union { - __u8 inline_data[0]; - struct rxe_sge sge[0]; - }; -}; - -struct rxe_send_wqe { - struct rxe_send_wr wr; - struct rxe_av av; - __u32 status; - __u32 state; - __aligned_u64 iova; - __u32 mask; - __u32 first_psn; - __u32 last_psn; - __u32 ack_length; - __u32 ssn; - __u32 has_rd_atomic; - struct rxe_dma_info dma; -}; - -struct rxe_recv_wqe { - __aligned_u64 wr_id; - __u32 num_sge; - __u32 padding; - struct rxe_dma_info dma; -}; - -struct rxe_create_cq_resp { - struct mminfo mi; -}; - -struct rxe_resize_cq_resp { - struct mminfo mi; -}; - -struct rxe_create_qp_resp { - struct mminfo rq_mi; - struct mminfo sq_mi; -}; - -struct rxe_create_srq_resp { - struct mminfo mi; - __u32 srq_num; - __u32 reserved; -}; - -struct rxe_modify_srq_cmd { - __aligned_u64 mmap_info_addr; -}; - -#endif /* RDMA_USER_RXE_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/rdma/vmw_pvrdma-abi.h b/lib/libc/include/generic-musl/rdma/vmw_pvrdma-abi.h deleted file mode 100644 index a95c225956..0000000000 --- a/lib/libc/include/generic-musl/rdma/vmw_pvrdma-abi.h +++ /dev/null @@ -1,298 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ -/* - * Copyright (c) 2012-2016 VMware, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of EITHER the GNU General Public License - * version 2 as published by the Free Software Foundation or the BSD - * 2-Clause License. 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 version 2 for more details at - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html. - * - * You should have received a copy of the GNU General Public License - * along with this program available in the file COPYING in the main - * directory of this source tree. - * - * The BSD 2-Clause License - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "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 - * COPYRIGHT HOLDER OR CONTRIBUTORS 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. - */ - -#ifndef __VMW_PVRDMA_ABI_H__ -#define __VMW_PVRDMA_ABI_H__ - -#include - -#define PVRDMA_UVERBS_ABI_VERSION 3 /* ABI Version. */ -#define PVRDMA_UAR_HANDLE_MASK 0x00FFFFFF /* Bottom 24 bits. */ -#define PVRDMA_UAR_QP_OFFSET 0 /* QP doorbell. */ -#define PVRDMA_UAR_QP_SEND (1 << 30) /* Send bit. */ -#define PVRDMA_UAR_QP_RECV (1 << 31) /* Recv bit. */ -#define PVRDMA_UAR_CQ_OFFSET 4 /* CQ doorbell. */ -#define PVRDMA_UAR_CQ_ARM_SOL (1 << 29) /* Arm solicited bit. */ -#define PVRDMA_UAR_CQ_ARM (1 << 30) /* Arm bit. */ -#define PVRDMA_UAR_CQ_POLL (1 << 31) /* Poll bit. */ -#define PVRDMA_UAR_SRQ_OFFSET 8 /* SRQ doorbell. */ -#define PVRDMA_UAR_SRQ_RECV (1 << 30) /* Recv bit. */ - -enum pvrdma_wr_opcode { - PVRDMA_WR_RDMA_WRITE, - PVRDMA_WR_RDMA_WRITE_WITH_IMM, - PVRDMA_WR_SEND, - PVRDMA_WR_SEND_WITH_IMM, - PVRDMA_WR_RDMA_READ, - PVRDMA_WR_ATOMIC_CMP_AND_SWP, - PVRDMA_WR_ATOMIC_FETCH_AND_ADD, - PVRDMA_WR_LSO, - PVRDMA_WR_SEND_WITH_INV, - PVRDMA_WR_RDMA_READ_WITH_INV, - PVRDMA_WR_LOCAL_INV, - PVRDMA_WR_FAST_REG_MR, - PVRDMA_WR_MASKED_ATOMIC_CMP_AND_SWP, - PVRDMA_WR_MASKED_ATOMIC_FETCH_AND_ADD, - PVRDMA_WR_BIND_MW, - PVRDMA_WR_REG_SIG_MR, - PVRDMA_WR_ERROR, -}; - -enum pvrdma_wc_status { - PVRDMA_WC_SUCCESS, - PVRDMA_WC_LOC_LEN_ERR, - PVRDMA_WC_LOC_QP_OP_ERR, - PVRDMA_WC_LOC_EEC_OP_ERR, - PVRDMA_WC_LOC_PROT_ERR, - PVRDMA_WC_WR_FLUSH_ERR, - PVRDMA_WC_MW_BIND_ERR, - PVRDMA_WC_BAD_RESP_ERR, - PVRDMA_WC_LOC_ACCESS_ERR, - PVRDMA_WC_REM_INV_REQ_ERR, - PVRDMA_WC_REM_ACCESS_ERR, - PVRDMA_WC_REM_OP_ERR, - PVRDMA_WC_RETRY_EXC_ERR, - PVRDMA_WC_RNR_RETRY_EXC_ERR, - PVRDMA_WC_LOC_RDD_VIOL_ERR, - PVRDMA_WC_REM_INV_RD_REQ_ERR, - PVRDMA_WC_REM_ABORT_ERR, - PVRDMA_WC_INV_EECN_ERR, - PVRDMA_WC_INV_EEC_STATE_ERR, - PVRDMA_WC_FATAL_ERR, - PVRDMA_WC_RESP_TIMEOUT_ERR, - PVRDMA_WC_GENERAL_ERR, -}; - -enum pvrdma_wc_opcode { - PVRDMA_WC_SEND, - PVRDMA_WC_RDMA_WRITE, - PVRDMA_WC_RDMA_READ, - PVRDMA_WC_COMP_SWAP, - PVRDMA_WC_FETCH_ADD, - PVRDMA_WC_BIND_MW, - PVRDMA_WC_LSO, - PVRDMA_WC_LOCAL_INV, - PVRDMA_WC_FAST_REG_MR, - PVRDMA_WC_MASKED_COMP_SWAP, - PVRDMA_WC_MASKED_FETCH_ADD, - PVRDMA_WC_RECV = 1 << 7, - PVRDMA_WC_RECV_RDMA_WITH_IMM, -}; - -enum pvrdma_wc_flags { - PVRDMA_WC_GRH = 1 << 0, - PVRDMA_WC_WITH_IMM = 1 << 1, - PVRDMA_WC_WITH_INVALIDATE = 1 << 2, - PVRDMA_WC_IP_CSUM_OK = 1 << 3, - PVRDMA_WC_WITH_SMAC = 1 << 4, - PVRDMA_WC_WITH_VLAN = 1 << 5, - PVRDMA_WC_WITH_NETWORK_HDR_TYPE = 1 << 6, - PVRDMA_WC_FLAGS_MAX = PVRDMA_WC_WITH_NETWORK_HDR_TYPE, -}; - -struct pvrdma_alloc_ucontext_resp { - __u32 qp_tab_size; - __u32 reserved; -}; - -struct pvrdma_alloc_pd_resp { - __u32 pdn; - __u32 reserved; -}; - -struct pvrdma_create_cq { - __aligned_u64 buf_addr; - __u32 buf_size; - __u32 reserved; -}; - -struct pvrdma_create_cq_resp { - __u32 cqn; - __u32 reserved; -}; - -struct pvrdma_resize_cq { - __aligned_u64 buf_addr; - __u32 buf_size; - __u32 reserved; -}; - -struct pvrdma_create_srq { - __aligned_u64 buf_addr; - __u32 buf_size; - __u32 reserved; -}; - -struct pvrdma_create_srq_resp { - __u32 srqn; - __u32 reserved; -}; - -struct pvrdma_create_qp { - __aligned_u64 rbuf_addr; - __aligned_u64 sbuf_addr; - __u32 rbuf_size; - __u32 sbuf_size; - __aligned_u64 qp_addr; -}; - -/* PVRDMA masked atomic compare and swap */ -struct pvrdma_ex_cmp_swap { - __aligned_u64 swap_val; - __aligned_u64 compare_val; - __aligned_u64 swap_mask; - __aligned_u64 compare_mask; -}; - -/* PVRDMA masked atomic fetch and add */ -struct pvrdma_ex_fetch_add { - __aligned_u64 add_val; - __aligned_u64 field_boundary; -}; - -/* PVRDMA address vector. */ -struct pvrdma_av { - __u32 port_pd; - __u32 sl_tclass_flowlabel; - __u8 dgid[16]; - __u8 src_path_bits; - __u8 gid_index; - __u8 stat_rate; - __u8 hop_limit; - __u8 dmac[6]; - __u8 reserved[6]; -}; - -/* PVRDMA scatter/gather entry */ -struct pvrdma_sge { - __aligned_u64 addr; - __u32 length; - __u32 lkey; -}; - -/* PVRDMA receive queue work request */ -struct pvrdma_rq_wqe_hdr { - __aligned_u64 wr_id; /* wr id */ - __u32 num_sge; /* size of s/g array */ - __u32 total_len; /* reserved */ -}; -/* Use pvrdma_sge (ib_sge) for receive queue s/g array elements. */ - -/* PVRDMA send queue work request */ -struct pvrdma_sq_wqe_hdr { - __aligned_u64 wr_id; /* wr id */ - __u32 num_sge; /* size of s/g array */ - __u32 total_len; /* reserved */ - __u32 opcode; /* operation type */ - __u32 send_flags; /* wr flags */ - union { - __be32 imm_data; - __u32 invalidate_rkey; - } ex; - __u32 reserved; - union { - struct { - __aligned_u64 remote_addr; - __u32 rkey; - __u8 reserved[4]; - } rdma; - struct { - __aligned_u64 remote_addr; - __aligned_u64 compare_add; - __aligned_u64 swap; - __u32 rkey; - __u32 reserved; - } atomic; - struct { - __aligned_u64 remote_addr; - __u32 log_arg_sz; - __u32 rkey; - union { - struct pvrdma_ex_cmp_swap cmp_swap; - struct pvrdma_ex_fetch_add fetch_add; - } wr_data; - } masked_atomics; - struct { - __aligned_u64 iova_start; - __aligned_u64 pl_pdir_dma; - __u32 page_shift; - __u32 page_list_len; - __u32 length; - __u32 access_flags; - __u32 rkey; - __u32 reserved; - } fast_reg; - struct { - __u32 remote_qpn; - __u32 remote_qkey; - struct pvrdma_av av; - } ud; - } wr; -}; -/* Use pvrdma_sge (ib_sge) for send queue s/g array elements. */ - -/* Completion queue element. */ -struct pvrdma_cqe { - __aligned_u64 wr_id; - __aligned_u64 qp; - __u32 opcode; - __u32 status; - __u32 byte_len; - __be32 imm_data; - __u32 src_qp; - __u32 wc_flags; - __u32 vendor_err; - __u16 pkey_index; - __u16 slid; - __u8 sl; - __u8 dlid_path_bits; - __u8 port_num; - __u8 smac[6]; - __u8 network_hdr_type; - __u8 reserved2[6]; /* Pad to next power of 2 (64). */ -}; - -#endif /* __VMW_PVRDMA_ABI_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/scsi/cxlflash_ioctl.h b/lib/libc/include/generic-musl/scsi/cxlflash_ioctl.h deleted file mode 100644 index e3331cc76a..0000000000 --- a/lib/libc/include/generic-musl/scsi/cxlflash_ioctl.h +++ /dev/null @@ -1,276 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * CXL Flash Device Driver - * - * Written by: Manoj N. Kumar , IBM Corporation - * Matthew R. Ochs , IBM Corporation - * - * Copyright (C) 2015 IBM Corporation - * - * 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. - */ - -#ifndef _CXLFLASH_IOCTL_H -#define _CXLFLASH_IOCTL_H - -#include - -/* - * Structure and definitions for all CXL Flash ioctls - */ -#define CXLFLASH_WWID_LEN 16 - -/* - * Structure and flag definitions CXL Flash superpipe ioctls - */ - -#define DK_CXLFLASH_VERSION_0 0 - -struct dk_cxlflash_hdr { - __u16 version; /* Version data */ - __u16 rsvd[3]; /* Reserved for future use */ - __u64 flags; /* Input flags */ - __u64 return_flags; /* Returned flags */ -}; - -/* - * Return flag definitions available to all superpipe ioctls - * - * Similar to the input flags, these are grown from the bottom-up with the - * intention that ioctl-specific return flag definitions would grow from the - * top-down, allowing the two sets to co-exist. While not required/enforced - * at this time, this provides future flexibility. - */ -#define DK_CXLFLASH_ALL_PORTS_ACTIVE 0x0000000000000001ULL -#define DK_CXLFLASH_APP_CLOSE_ADAP_FD 0x0000000000000002ULL -#define DK_CXLFLASH_CONTEXT_SQ_CMD_MODE 0x0000000000000004ULL - -/* - * General Notes: - * ------------- - * The 'context_id' field of all ioctl structures contains the context - * identifier for a context in the lower 32-bits (upper 32-bits are not - * to be used when identifying a context to the AFU). That said, the value - * in its entirety (all 64-bits) is to be treated as an opaque cookie and - * should be presented as such when issuing ioctls. - */ - -/* - * DK_CXLFLASH_ATTACH Notes: - * ------------------------ - * Read/write access permissions are specified via the O_RDONLY, O_WRONLY, - * and O_RDWR flags defined in the fcntl.h header file. - * - * A valid adapter file descriptor (fd >= 0) is only returned on the initial - * attach (successful) of a context. When a context is shared(reused), the user - * is expected to already 'know' the adapter file descriptor associated with the - * context. - */ -#define DK_CXLFLASH_ATTACH_REUSE_CONTEXT 0x8000000000000000ULL - -struct dk_cxlflash_attach { - struct dk_cxlflash_hdr hdr; /* Common fields */ - __u64 num_interrupts; /* Requested number of interrupts */ - __u64 context_id; /* Returned context */ - __u64 mmio_size; /* Returned size of MMIO area */ - __u64 block_size; /* Returned block size, in bytes */ - __u64 adap_fd; /* Returned adapter file descriptor */ - __u64 last_lba; /* Returned last LBA on the device */ - __u64 max_xfer; /* Returned max transfer size, blocks */ - __u64 reserved[8]; /* Reserved for future use */ -}; - -struct dk_cxlflash_detach { - struct dk_cxlflash_hdr hdr; /* Common fields */ - __u64 context_id; /* Context to detach */ - __u64 reserved[8]; /* Reserved for future use */ -}; - -struct dk_cxlflash_udirect { - struct dk_cxlflash_hdr hdr; /* Common fields */ - __u64 context_id; /* Context to own physical resources */ - __u64 rsrc_handle; /* Returned resource handle */ - __u64 last_lba; /* Returned last LBA on the device */ - __u64 reserved[8]; /* Reserved for future use */ -}; - -#define DK_CXLFLASH_UVIRTUAL_NEED_WRITE_SAME 0x8000000000000000ULL - -struct dk_cxlflash_uvirtual { - struct dk_cxlflash_hdr hdr; /* Common fields */ - __u64 context_id; /* Context to own virtual resources */ - __u64 lun_size; /* Requested size, in 4K blocks */ - __u64 rsrc_handle; /* Returned resource handle */ - __u64 last_lba; /* Returned last LBA of LUN */ - __u64 reserved[8]; /* Reserved for future use */ -}; - -struct dk_cxlflash_release { - struct dk_cxlflash_hdr hdr; /* Common fields */ - __u64 context_id; /* Context owning resources */ - __u64 rsrc_handle; /* Resource handle to release */ - __u64 reserved[8]; /* Reserved for future use */ -}; - -struct dk_cxlflash_resize { - struct dk_cxlflash_hdr hdr; /* Common fields */ - __u64 context_id; /* Context owning resources */ - __u64 rsrc_handle; /* Resource handle of LUN to resize */ - __u64 req_size; /* New requested size, in 4K blocks */ - __u64 last_lba; /* Returned last LBA of LUN */ - __u64 reserved[8]; /* Reserved for future use */ -}; - -struct dk_cxlflash_clone { - struct dk_cxlflash_hdr hdr; /* Common fields */ - __u64 context_id_src; /* Context to clone from */ - __u64 context_id_dst; /* Context to clone to */ - __u64 adap_fd_src; /* Source context adapter fd */ - __u64 reserved[8]; /* Reserved for future use */ -}; - -#define DK_CXLFLASH_VERIFY_SENSE_LEN 18 -#define DK_CXLFLASH_VERIFY_HINT_SENSE 0x8000000000000000ULL - -struct dk_cxlflash_verify { - struct dk_cxlflash_hdr hdr; /* Common fields */ - __u64 context_id; /* Context owning resources to verify */ - __u64 rsrc_handle; /* Resource handle of LUN */ - __u64 hint; /* Reasons for verify */ - __u64 last_lba; /* Returned last LBA of device */ - __u8 sense_data[DK_CXLFLASH_VERIFY_SENSE_LEN]; /* SCSI sense data */ - __u8 pad[6]; /* Pad to next 8-byte boundary */ - __u64 reserved[8]; /* Reserved for future use */ -}; - -#define DK_CXLFLASH_RECOVER_AFU_CONTEXT_RESET 0x8000000000000000ULL - -struct dk_cxlflash_recover_afu { - struct dk_cxlflash_hdr hdr; /* Common fields */ - __u64 reason; /* Reason for recovery request */ - __u64 context_id; /* Context to recover / updated ID */ - __u64 mmio_size; /* Returned size of MMIO area */ - __u64 adap_fd; /* Returned adapter file descriptor */ - __u64 reserved[8]; /* Reserved for future use */ -}; - -#define DK_CXLFLASH_MANAGE_LUN_WWID_LEN CXLFLASH_WWID_LEN -#define DK_CXLFLASH_MANAGE_LUN_ENABLE_SUPERPIPE 0x8000000000000000ULL -#define DK_CXLFLASH_MANAGE_LUN_DISABLE_SUPERPIPE 0x4000000000000000ULL -#define DK_CXLFLASH_MANAGE_LUN_ALL_PORTS_ACCESSIBLE 0x2000000000000000ULL - -struct dk_cxlflash_manage_lun { - struct dk_cxlflash_hdr hdr; /* Common fields */ - __u8 wwid[DK_CXLFLASH_MANAGE_LUN_WWID_LEN]; /* Page83 WWID, NAA-6 */ - __u64 reserved[8]; /* Rsvd, future use */ -}; - -union cxlflash_ioctls { - struct dk_cxlflash_attach attach; - struct dk_cxlflash_detach detach; - struct dk_cxlflash_udirect udirect; - struct dk_cxlflash_uvirtual uvirtual; - struct dk_cxlflash_release release; - struct dk_cxlflash_resize resize; - struct dk_cxlflash_clone clone; - struct dk_cxlflash_verify verify; - struct dk_cxlflash_recover_afu recover_afu; - struct dk_cxlflash_manage_lun manage_lun; -}; - -#define MAX_CXLFLASH_IOCTL_SZ (sizeof(union cxlflash_ioctls)) - -#define CXL_MAGIC 0xCA -#define CXL_IOWR(_n, _s) _IOWR(CXL_MAGIC, _n, struct _s) - -/* - * CXL Flash superpipe ioctls start at base of the reserved CXL_MAGIC - * region (0x80) and grow upwards. - */ -#define DK_CXLFLASH_ATTACH CXL_IOWR(0x80, dk_cxlflash_attach) -#define DK_CXLFLASH_USER_DIRECT CXL_IOWR(0x81, dk_cxlflash_udirect) -#define DK_CXLFLASH_RELEASE CXL_IOWR(0x82, dk_cxlflash_release) -#define DK_CXLFLASH_DETACH CXL_IOWR(0x83, dk_cxlflash_detach) -#define DK_CXLFLASH_VERIFY CXL_IOWR(0x84, dk_cxlflash_verify) -#define DK_CXLFLASH_RECOVER_AFU CXL_IOWR(0x85, dk_cxlflash_recover_afu) -#define DK_CXLFLASH_MANAGE_LUN CXL_IOWR(0x86, dk_cxlflash_manage_lun) -#define DK_CXLFLASH_USER_VIRTUAL CXL_IOWR(0x87, dk_cxlflash_uvirtual) -#define DK_CXLFLASH_VLUN_RESIZE CXL_IOWR(0x88, dk_cxlflash_resize) -#define DK_CXLFLASH_VLUN_CLONE CXL_IOWR(0x89, dk_cxlflash_clone) - -/* - * Structure and flag definitions CXL Flash host ioctls - */ - -#define HT_CXLFLASH_VERSION_0 0 - -struct ht_cxlflash_hdr { - __u16 version; /* Version data */ - __u16 subcmd; /* Sub-command */ - __u16 rsvd[2]; /* Reserved for future use */ - __u64 flags; /* Input flags */ - __u64 return_flags; /* Returned flags */ -}; - -/* - * Input flag definitions available to all host ioctls - * - * These are grown from the bottom-up with the intention that ioctl-specific - * input flag definitions would grow from the top-down, allowing the two sets - * to co-exist. While not required/enforced at this time, this provides future - * flexibility. - */ -#define HT_CXLFLASH_HOST_READ 0x0000000000000000ULL -#define HT_CXLFLASH_HOST_WRITE 0x0000000000000001ULL - -#define HT_CXLFLASH_LUN_PROVISION_SUBCMD_CREATE_LUN 0x0001 -#define HT_CXLFLASH_LUN_PROVISION_SUBCMD_DELETE_LUN 0x0002 -#define HT_CXLFLASH_LUN_PROVISION_SUBCMD_QUERY_PORT 0x0003 - -struct ht_cxlflash_lun_provision { - struct ht_cxlflash_hdr hdr; /* Common fields */ - __u16 port; /* Target port for provision request */ - __u16 reserved16[3]; /* Reserved for future use */ - __u64 size; /* Size of LUN (4K blocks) */ - __u64 lun_id; /* SCSI LUN ID */ - __u8 wwid[CXLFLASH_WWID_LEN];/* Page83 WWID, NAA-6 */ - __u64 max_num_luns; /* Maximum number of LUNs provisioned */ - __u64 cur_num_luns; /* Current number of LUNs provisioned */ - __u64 max_cap_port; /* Total capacity for port (4K blocks) */ - __u64 cur_cap_port; /* Current capacity for port (4K blocks) */ - __u64 reserved[8]; /* Reserved for future use */ -}; - -#define HT_CXLFLASH_AFU_DEBUG_MAX_DATA_LEN 262144 /* 256K */ -#define HT_CXLFLASH_AFU_DEBUG_SUBCMD_LEN 12 -struct ht_cxlflash_afu_debug { - struct ht_cxlflash_hdr hdr; /* Common fields */ - __u8 reserved8[4]; /* Reserved for future use */ - __u8 afu_subcmd[HT_CXLFLASH_AFU_DEBUG_SUBCMD_LEN]; /* AFU subcommand, - * (pass through) - */ - __u64 data_ea; /* Data buffer effective address */ - __u32 data_len; /* Data buffer length */ - __u32 reserved32; /* Reserved for future use */ - __u64 reserved[8]; /* Reserved for future use */ -}; - -union cxlflash_ht_ioctls { - struct ht_cxlflash_lun_provision lun_provision; - struct ht_cxlflash_afu_debug afu_debug; -}; - -#define MAX_HT_CXLFLASH_IOCTL_SZ (sizeof(union cxlflash_ht_ioctls)) - -/* - * CXL Flash host ioctls start at the top of the reserved CXL_MAGIC - * region (0xBF) and grow downwards. - */ -#define HT_CXLFLASH_LUN_PROVISION CXL_IOWR(0xBF, ht_cxlflash_lun_provision) -#define HT_CXLFLASH_AFU_DEBUG CXL_IOWR(0xBE, ht_cxlflash_afu_debug) - - -#endif /* ifndef _CXLFLASH_IOCTL_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/scsi/fc/fc_els.h b/lib/libc/include/generic-musl/scsi/fc/fc_els.h deleted file mode 100644 index 166eeb9d81..0000000000 --- a/lib/libc/include/generic-musl/scsi/fc/fc_els.h +++ /dev/null @@ -1,832 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright(c) 2007 Intel Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope 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 St - Fifth Floor, Boston, MA 02110-1301 USA. - * - * Maintained at www.Open-FCoE.org - */ - -#ifndef _FC_ELS_H_ -#define _FC_ELS_H_ - -#include - -/* - * Fibre Channel Switch - Enhanced Link Services definitions. - * From T11 FC-LS Rev 1.2 June 7, 2005. - */ - -/* - * ELS Command codes - byte 0 of the frame payload - */ -enum fc_els_cmd { - ELS_LS_RJT = 0x01, /* ESL reject */ - ELS_LS_ACC = 0x02, /* ESL Accept */ - ELS_PLOGI = 0x03, /* N_Port login */ - ELS_FLOGI = 0x04, /* F_Port login */ - ELS_LOGO = 0x05, /* Logout */ - ELS_ABTX = 0x06, /* Abort exchange - obsolete */ - ELS_RCS = 0x07, /* read connection status */ - ELS_RES = 0x08, /* read exchange status block */ - ELS_RSS = 0x09, /* read sequence status block */ - ELS_RSI = 0x0a, /* read sequence initiative */ - ELS_ESTS = 0x0b, /* establish streaming */ - ELS_ESTC = 0x0c, /* estimate credit */ - ELS_ADVC = 0x0d, /* advise credit */ - ELS_RTV = 0x0e, /* read timeout value */ - ELS_RLS = 0x0f, /* read link error status block */ - ELS_ECHO = 0x10, /* echo */ - ELS_TEST = 0x11, /* test */ - ELS_RRQ = 0x12, /* reinstate recovery qualifier */ - ELS_REC = 0x13, /* read exchange concise */ - ELS_SRR = 0x14, /* sequence retransmission request */ - ELS_PRLI = 0x20, /* process login */ - ELS_PRLO = 0x21, /* process logout */ - ELS_SCN = 0x22, /* state change notification */ - ELS_TPLS = 0x23, /* test process login state */ - ELS_TPRLO = 0x24, /* third party process logout */ - ELS_LCLM = 0x25, /* login control list mgmt (obs) */ - ELS_GAID = 0x30, /* get alias_ID */ - ELS_FACT = 0x31, /* fabric activate alias_id */ - ELS_FDACDT = 0x32, /* fabric deactivate alias_id */ - ELS_NACT = 0x33, /* N-port activate alias_id */ - ELS_NDACT = 0x34, /* N-port deactivate alias_id */ - ELS_QOSR = 0x40, /* quality of service request */ - ELS_RVCS = 0x41, /* read virtual circuit status */ - ELS_PDISC = 0x50, /* discover N_port service params */ - ELS_FDISC = 0x51, /* discover F_port service params */ - ELS_ADISC = 0x52, /* discover address */ - ELS_RNC = 0x53, /* report node cap (obs) */ - ELS_FARP_REQ = 0x54, /* FC ARP request */ - ELS_FARP_REPL = 0x55, /* FC ARP reply */ - ELS_RPS = 0x56, /* read port status block */ - ELS_RPL = 0x57, /* read port list */ - ELS_RPBC = 0x58, /* read port buffer condition */ - ELS_FAN = 0x60, /* fabric address notification */ - ELS_RSCN = 0x61, /* registered state change notification */ - ELS_SCR = 0x62, /* state change registration */ - ELS_RNFT = 0x63, /* report node FC-4 types */ - ELS_CSR = 0x68, /* clock synch. request */ - ELS_CSU = 0x69, /* clock synch. update */ - ELS_LINIT = 0x70, /* loop initialize */ - ELS_LSTS = 0x72, /* loop status */ - ELS_RNID = 0x78, /* request node ID data */ - ELS_RLIR = 0x79, /* registered link incident report */ - ELS_LIRR = 0x7a, /* link incident record registration */ - ELS_SRL = 0x7b, /* scan remote loop */ - ELS_SBRP = 0x7c, /* set bit-error reporting params */ - ELS_RPSC = 0x7d, /* report speed capabilities */ - ELS_QSA = 0x7e, /* query security attributes */ - ELS_EVFP = 0x7f, /* exchange virt. fabrics params */ - ELS_LKA = 0x80, /* link keep-alive */ - ELS_AUTH_ELS = 0x90, /* authentication ELS */ -}; - -/* - * Initializer useful for decoding table. - * Please keep this in sync with the above definitions. - */ -#define FC_ELS_CMDS_INIT { \ - [ELS_LS_RJT] = "LS_RJT", \ - [ELS_LS_ACC] = "LS_ACC", \ - [ELS_PLOGI] = "PLOGI", \ - [ELS_FLOGI] = "FLOGI", \ - [ELS_LOGO] = "LOGO", \ - [ELS_ABTX] = "ABTX", \ - [ELS_RCS] = "RCS", \ - [ELS_RES] = "RES", \ - [ELS_RSS] = "RSS", \ - [ELS_RSI] = "RSI", \ - [ELS_ESTS] = "ESTS", \ - [ELS_ESTC] = "ESTC", \ - [ELS_ADVC] = "ADVC", \ - [ELS_RTV] = "RTV", \ - [ELS_RLS] = "RLS", \ - [ELS_ECHO] = "ECHO", \ - [ELS_TEST] = "TEST", \ - [ELS_RRQ] = "RRQ", \ - [ELS_REC] = "REC", \ - [ELS_SRR] = "SRR", \ - [ELS_PRLI] = "PRLI", \ - [ELS_PRLO] = "PRLO", \ - [ELS_SCN] = "SCN", \ - [ELS_TPLS] = "TPLS", \ - [ELS_TPRLO] = "TPRLO", \ - [ELS_LCLM] = "LCLM", \ - [ELS_GAID] = "GAID", \ - [ELS_FACT] = "FACT", \ - [ELS_FDACDT] = "FDACDT", \ - [ELS_NACT] = "NACT", \ - [ELS_NDACT] = "NDACT", \ - [ELS_QOSR] = "QOSR", \ - [ELS_RVCS] = "RVCS", \ - [ELS_PDISC] = "PDISC", \ - [ELS_FDISC] = "FDISC", \ - [ELS_ADISC] = "ADISC", \ - [ELS_RNC] = "RNC", \ - [ELS_FARP_REQ] = "FARP_REQ", \ - [ELS_FARP_REPL] = "FARP_REPL", \ - [ELS_RPS] = "RPS", \ - [ELS_RPL] = "RPL", \ - [ELS_RPBC] = "RPBC", \ - [ELS_FAN] = "FAN", \ - [ELS_RSCN] = "RSCN", \ - [ELS_SCR] = "SCR", \ - [ELS_RNFT] = "RNFT", \ - [ELS_CSR] = "CSR", \ - [ELS_CSU] = "CSU", \ - [ELS_LINIT] = "LINIT", \ - [ELS_LSTS] = "LSTS", \ - [ELS_RNID] = "RNID", \ - [ELS_RLIR] = "RLIR", \ - [ELS_LIRR] = "LIRR", \ - [ELS_SRL] = "SRL", \ - [ELS_SBRP] = "SBRP", \ - [ELS_RPSC] = "RPSC", \ - [ELS_QSA] = "QSA", \ - [ELS_EVFP] = "EVFP", \ - [ELS_LKA] = "LKA", \ - [ELS_AUTH_ELS] = "AUTH_ELS", \ -} - -/* - * LS_ACC payload. - */ -struct fc_els_ls_acc { - __u8 la_cmd; /* command code ELS_LS_ACC */ - __u8 la_resv[3]; /* reserved */ -}; - -/* - * ELS reject payload. - */ -struct fc_els_ls_rjt { - __u8 er_cmd; /* command code ELS_LS_RJT */ - __u8 er_resv[4]; /* reserved must be zero */ - __u8 er_reason; /* reason (enum fc_els_rjt_reason below) */ - __u8 er_explan; /* explanation (enum fc_els_rjt_explan below) */ - __u8 er_vendor; /* vendor specific code */ -}; - -/* - * ELS reject reason codes (er_reason). - */ -enum fc_els_rjt_reason { - ELS_RJT_NONE = 0, /* no reject - not to be sent */ - ELS_RJT_INVAL = 0x01, /* invalid ELS command code */ - ELS_RJT_LOGIC = 0x03, /* logical error */ - ELS_RJT_BUSY = 0x05, /* logical busy */ - ELS_RJT_PROT = 0x07, /* protocol error */ - ELS_RJT_UNAB = 0x09, /* unable to perform command request */ - ELS_RJT_UNSUP = 0x0b, /* command not supported */ - ELS_RJT_INPROG = 0x0e, /* command already in progress */ - ELS_RJT_FIP = 0x20, /* FIP error */ - ELS_RJT_VENDOR = 0xff, /* vendor specific error */ -}; - - -/* - * reason code explanation (er_explan). - */ -enum fc_els_rjt_explan { - ELS_EXPL_NONE = 0x00, /* No additional explanation */ - ELS_EXPL_SPP_OPT_ERR = 0x01, /* service parameter error - options */ - ELS_EXPL_SPP_ICTL_ERR = 0x03, /* service parm error - initiator ctl */ - ELS_EXPL_AH = 0x11, /* invalid association header */ - ELS_EXPL_AH_REQ = 0x13, /* association_header required */ - ELS_EXPL_SID = 0x15, /* invalid originator S_ID */ - ELS_EXPL_OXID_RXID = 0x17, /* invalid OX_ID-RX_ID combination */ - ELS_EXPL_INPROG = 0x19, /* Request already in progress */ - ELS_EXPL_PLOGI_REQD = 0x1e, /* N_Port login required */ - ELS_EXPL_INSUF_RES = 0x29, /* insufficient resources */ - ELS_EXPL_UNAB_DATA = 0x2a, /* unable to supply requested data */ - ELS_EXPL_UNSUPR = 0x2c, /* Request not supported */ - ELS_EXPL_INV_LEN = 0x2d, /* Invalid payload length */ - ELS_EXPL_NOT_NEIGHBOR = 0x62, /* VN2VN_Port not in neighbor set */ - /* TBD - above definitions incomplete */ -}; - -/* - * Common service parameters (N ports). - */ -struct fc_els_csp { - __u8 sp_hi_ver; /* highest version supported (obs.) */ - __u8 sp_lo_ver; /* highest version supported (obs.) */ - __be16 sp_bb_cred; /* buffer-to-buffer credits */ - __be16 sp_features; /* common feature flags */ - __be16 sp_bb_data; /* b-b state number and data field sz */ - union { - struct { - __be16 _sp_tot_seq; /* total concurrent sequences */ - __be16 _sp_rel_off; /* rel. offset by info cat */ - } sp_plogi; - struct { - __be32 _sp_r_a_tov; /* resource alloc. timeout msec */ - } sp_flogi_acc; - } sp_u; - __be32 sp_e_d_tov; /* error detect timeout value */ -}; -#define sp_tot_seq sp_u.sp_plogi._sp_tot_seq -#define sp_rel_off sp_u.sp_plogi._sp_rel_off -#define sp_r_a_tov sp_u.sp_flogi_acc._sp_r_a_tov - -#define FC_SP_BB_DATA_MASK 0xfff /* mask for data field size in sp_bb_data */ - -/* - * Minimum and maximum values for max data field size in service parameters. - */ -#define FC_SP_MIN_MAX_PAYLOAD FC_MIN_MAX_PAYLOAD -#define FC_SP_MAX_MAX_PAYLOAD FC_MAX_PAYLOAD - -/* - * sp_features - */ -#define FC_SP_FT_NPIV 0x8000 /* multiple N_Port_ID support (FLOGI) */ -#define FC_SP_FT_CIRO 0x8000 /* continuously increasing rel off (PLOGI) */ -#define FC_SP_FT_CLAD 0x8000 /* clean address (in FLOGI LS_ACC) */ -#define FC_SP_FT_RAND 0x4000 /* random relative offset */ -#define FC_SP_FT_VAL 0x2000 /* valid vendor version level */ -#define FC_SP_FT_NPIV_ACC 0x2000 /* NPIV assignment (FLOGI LS_ACC) */ -#define FC_SP_FT_FPORT 0x1000 /* F port (1) vs. N port (0) */ -#define FC_SP_FT_ABB 0x0800 /* alternate BB_credit management */ -#define FC_SP_FT_EDTR 0x0400 /* E_D_TOV Resolution is nanoseconds */ -#define FC_SP_FT_MCAST 0x0200 /* multicast */ -#define FC_SP_FT_BCAST 0x0100 /* broadcast */ -#define FC_SP_FT_HUNT 0x0080 /* hunt group */ -#define FC_SP_FT_SIMP 0x0040 /* dedicated simplex */ -#define FC_SP_FT_SEC 0x0020 /* reserved for security */ -#define FC_SP_FT_CSYN 0x0010 /* clock synch. supported */ -#define FC_SP_FT_RTTOV 0x0008 /* R_T_TOV value 100 uS, else 100 mS */ -#define FC_SP_FT_HALF 0x0004 /* dynamic half duplex */ -#define FC_SP_FT_SEQC 0x0002 /* SEQ_CNT */ -#define FC_SP_FT_PAYL 0x0001 /* FLOGI payload length 256, else 116 */ - -/* - * Class-specific service parameters. - */ -struct fc_els_cssp { - __be16 cp_class; /* class flags */ - __be16 cp_init; /* initiator flags */ - __be16 cp_recip; /* recipient flags */ - __be16 cp_rdfs; /* receive data field size */ - __be16 cp_con_seq; /* concurrent sequences */ - __be16 cp_ee_cred; /* N-port end-to-end credit */ - __u8 cp_resv1; /* reserved */ - __u8 cp_open_seq; /* open sequences per exchange */ - __u8 _cp_resv2[2]; /* reserved */ -}; - -/* - * cp_class flags. - */ -#define FC_CPC_VALID 0x8000 /* class valid */ -#define FC_CPC_IMIX 0x4000 /* intermix mode */ -#define FC_CPC_SEQ 0x0800 /* sequential delivery */ -#define FC_CPC_CAMP 0x0200 /* camp-on */ -#define FC_CPC_PRI 0x0080 /* priority */ - -/* - * cp_init flags. - * (TBD: not all flags defined here). - */ -#define FC_CPI_CSYN 0x0010 /* clock synch. capable */ - -/* - * cp_recip flags. - */ -#define FC_CPR_CSYN 0x0008 /* clock synch. capable */ - -/* - * NFC_ELS_FLOGI: Fabric login request. - * NFC_ELS_PLOGI: Port login request (same format). - */ -struct fc_els_flogi { - __u8 fl_cmd; /* command */ - __u8 _fl_resvd[3]; /* must be zero */ - struct fc_els_csp fl_csp; /* common service parameters */ - __be64 fl_wwpn; /* port name */ - __be64 fl_wwnn; /* node name */ - struct fc_els_cssp fl_cssp[4]; /* class 1-4 service parameters */ - __u8 fl_vend[16]; /* vendor version level */ -} __attribute__((__packed__)); - -/* - * Process login service parameter page. - */ -struct fc_els_spp { - __u8 spp_type; /* type code or common service params */ - __u8 spp_type_ext; /* type code extension */ - __u8 spp_flags; - __u8 _spp_resvd; - __be32 spp_orig_pa; /* originator process associator */ - __be32 spp_resp_pa; /* responder process associator */ - __be32 spp_params; /* service parameters */ -}; - -/* - * spp_flags. - */ -#define FC_SPP_OPA_VAL 0x80 /* originator proc. assoc. valid */ -#define FC_SPP_RPA_VAL 0x40 /* responder proc. assoc. valid */ -#define FC_SPP_EST_IMG_PAIR 0x20 /* establish image pair */ -#define FC_SPP_RESP_MASK 0x0f /* mask for response code (below) */ - -/* - * SPP response code in spp_flags - lower 4 bits. - */ -enum fc_els_spp_resp { - FC_SPP_RESP_ACK = 1, /* request executed */ - FC_SPP_RESP_RES = 2, /* unable due to lack of resources */ - FC_SPP_RESP_INIT = 3, /* initialization not complete */ - FC_SPP_RESP_NO_PA = 4, /* unknown process associator */ - FC_SPP_RESP_CONF = 5, /* configuration precludes image pair */ - FC_SPP_RESP_COND = 6, /* request completed conditionally */ - FC_SPP_RESP_MULT = 7, /* unable to handle multiple SPPs */ - FC_SPP_RESP_INVL = 8, /* SPP is invalid */ -}; - -/* - * ELS_RRQ - Reinstate Recovery Qualifier - */ -struct fc_els_rrq { - __u8 rrq_cmd; /* command (0x12) */ - __u8 rrq_zero[3]; /* specified as zero - part of cmd */ - __u8 rrq_resvd; /* reserved */ - __u8 rrq_s_id[3]; /* originator FID */ - __be16 rrq_ox_id; /* originator exchange ID */ - __be16 rrq_rx_id; /* responders exchange ID */ -}; - -/* - * ELS_REC - Read exchange concise. - */ -struct fc_els_rec { - __u8 rec_cmd; /* command (0x13) */ - __u8 rec_zero[3]; /* specified as zero - part of cmd */ - __u8 rec_resvd; /* reserved */ - __u8 rec_s_id[3]; /* originator FID */ - __be16 rec_ox_id; /* originator exchange ID */ - __be16 rec_rx_id; /* responders exchange ID */ -}; - -/* - * ELS_REC LS_ACC payload. - */ -struct fc_els_rec_acc { - __u8 reca_cmd; /* accept (0x02) */ - __u8 reca_zero[3]; /* specified as zero - part of cmd */ - __be16 reca_ox_id; /* originator exchange ID */ - __be16 reca_rx_id; /* responders exchange ID */ - __u8 reca_resvd1; /* reserved */ - __u8 reca_ofid[3]; /* originator FID */ - __u8 reca_resvd2; /* reserved */ - __u8 reca_rfid[3]; /* responder FID */ - __be32 reca_fc4value; /* FC4 value */ - __be32 reca_e_stat; /* ESB (exchange status block) status */ -}; - -/* - * ELS_PRLI - Process login request and response. - */ -struct fc_els_prli { - __u8 prli_cmd; /* command */ - __u8 prli_spp_len; /* length of each serv. parm. page */ - __be16 prli_len; /* length of entire payload */ - /* service parameter pages follow */ -}; - -/* - * ELS_PRLO - Process logout request and response. - */ -struct fc_els_prlo { - __u8 prlo_cmd; /* command */ - __u8 prlo_obs; /* obsolete, but shall be set to 10h */ - __be16 prlo_len; /* payload length */ -}; - -/* - * ELS_ADISC payload - */ -struct fc_els_adisc { - __u8 adisc_cmd; - __u8 adisc_resv[3]; - __u8 adisc_resv1; - __u8 adisc_hard_addr[3]; - __be64 adisc_wwpn; - __be64 adisc_wwnn; - __u8 adisc_resv2; - __u8 adisc_port_id[3]; -} __attribute__((__packed__)); - -/* - * ELS_LOGO - process or fabric logout. - */ -struct fc_els_logo { - __u8 fl_cmd; /* command code */ - __u8 fl_zero[3]; /* specified as zero - part of cmd */ - __u8 fl_resvd; /* reserved */ - __u8 fl_n_port_id[3];/* N port ID */ - __be64 fl_n_port_wwn; /* port name */ -}; - -/* - * ELS_RTV - read timeout value. - */ -struct fc_els_rtv { - __u8 rtv_cmd; /* command code 0x0e */ - __u8 rtv_zero[3]; /* specified as zero - part of cmd */ -}; - -/* - * LS_ACC for ELS_RTV - read timeout value. - */ -struct fc_els_rtv_acc { - __u8 rtv_cmd; /* command code 0x02 */ - __u8 rtv_zero[3]; /* specified as zero - part of cmd */ - __be32 rtv_r_a_tov; /* resource allocation timeout value */ - __be32 rtv_e_d_tov; /* error detection timeout value */ - __be32 rtv_toq; /* timeout qualifier (see below) */ -}; - -/* - * rtv_toq bits. - */ -#define FC_ELS_RTV_EDRES (1 << 26) /* E_D_TOV resolution is nS else mS */ -#define FC_ELS_RTV_RTTOV (1 << 19) /* R_T_TOV is 100 uS else 100 mS */ - -/* - * ELS_SCR - state change registration payload. - */ -struct fc_els_scr { - __u8 scr_cmd; /* command code */ - __u8 scr_resv[6]; /* reserved */ - __u8 scr_reg_func; /* registration function (see below) */ -}; - -enum fc_els_scr_func { - ELS_SCRF_FAB = 1, /* fabric-detected registration */ - ELS_SCRF_NPORT = 2, /* Nx_Port-detected registration */ - ELS_SCRF_FULL = 3, /* full registration */ - ELS_SCRF_CLEAR = 255, /* remove any current registrations */ -}; - -/* - * ELS_RSCN - registered state change notification payload. - */ -struct fc_els_rscn { - __u8 rscn_cmd; /* RSCN opcode (0x61) */ - __u8 rscn_page_len; /* page length (4) */ - __be16 rscn_plen; /* payload length including this word */ - - /* followed by 4-byte generic affected Port_ID pages */ -}; - -struct fc_els_rscn_page { - __u8 rscn_page_flags; /* event and address format */ - __u8 rscn_fid[3]; /* fabric ID */ -}; - -#define ELS_RSCN_EV_QUAL_BIT 2 /* shift count for event qualifier */ -#define ELS_RSCN_EV_QUAL_MASK 0xf /* mask for event qualifier */ -#define ELS_RSCN_ADDR_FMT_BIT 0 /* shift count for address format */ -#define ELS_RSCN_ADDR_FMT_MASK 0x3 /* mask for address format */ - -enum fc_els_rscn_ev_qual { - ELS_EV_QUAL_NONE = 0, /* unspecified */ - ELS_EV_QUAL_NS_OBJ = 1, /* changed name server object */ - ELS_EV_QUAL_PORT_ATTR = 2, /* changed port attribute */ - ELS_EV_QUAL_SERV_OBJ = 3, /* changed service object */ - ELS_EV_QUAL_SW_CONFIG = 4, /* changed switch configuration */ - ELS_EV_QUAL_REM_OBJ = 5, /* removed object */ -}; - -enum fc_els_rscn_addr_fmt { - ELS_ADDR_FMT_PORT = 0, /* rscn_fid is a port address */ - ELS_ADDR_FMT_AREA = 1, /* rscn_fid is a area address */ - ELS_ADDR_FMT_DOM = 2, /* rscn_fid is a domain address */ - ELS_ADDR_FMT_FAB = 3, /* anything on fabric may have changed */ -}; - -/* - * ELS_RNID - request Node ID. - */ -struct fc_els_rnid { - __u8 rnid_cmd; /* RNID opcode (0x78) */ - __u8 rnid_resv[3]; /* reserved */ - __u8 rnid_fmt; /* data format */ - __u8 rnid_resv2[3]; /* reserved */ -}; - -/* - * Node Identification Data formats (rnid_fmt) - */ -enum fc_els_rnid_fmt { - ELS_RNIDF_NONE = 0, /* no specific identification data */ - ELS_RNIDF_GEN = 0xdf, /* general topology discovery format */ -}; - -/* - * ELS_RNID response. - */ -struct fc_els_rnid_resp { - __u8 rnid_cmd; /* response code (LS_ACC) */ - __u8 rnid_resv[3]; /* reserved */ - __u8 rnid_fmt; /* data format */ - __u8 rnid_cid_len; /* common ID data length */ - __u8 rnid_resv2; /* reserved */ - __u8 rnid_sid_len; /* specific ID data length */ -}; - -struct fc_els_rnid_cid { - __be64 rnid_wwpn; /* N port name */ - __be64 rnid_wwnn; /* node name */ -}; - -struct fc_els_rnid_gen { - __u8 rnid_vend_id[16]; /* vendor-unique ID */ - __be32 rnid_atype; /* associated type (see below) */ - __be32 rnid_phys_port; /* physical port number */ - __be32 rnid_att_nodes; /* number of attached nodes */ - __u8 rnid_node_mgmt; /* node management (see below) */ - __u8 rnid_ip_ver; /* IP version (see below) */ - __be16 rnid_prot_port; /* UDP / TCP port number */ - __be32 rnid_ip_addr[4]; /* IP address */ - __u8 rnid_resvd[2]; /* reserved */ - __be16 rnid_vend_spec; /* vendor-specific field */ -}; - -enum fc_els_rnid_atype { - ELS_RNIDA_UNK = 0x01, /* unknown */ - ELS_RNIDA_OTHER = 0x02, /* none of the following */ - ELS_RNIDA_HUB = 0x03, - ELS_RNIDA_SWITCH = 0x04, - ELS_RNIDA_GATEWAY = 0x05, - ELS_RNIDA_CONV = 0x06, /* Obsolete, do not use this value */ - ELS_RNIDA_HBA = 0x07, /* Obsolete, do not use this value */ - ELS_RNIDA_PROXY = 0x08, /* Obsolete, do not use this value */ - ELS_RNIDA_STORAGE = 0x09, - ELS_RNIDA_HOST = 0x0a, - ELS_RNIDA_SUBSYS = 0x0b, /* storage subsystem (e.g., RAID) */ - ELS_RNIDA_ACCESS = 0x0e, /* access device (e.g. media changer) */ - ELS_RNIDA_NAS = 0x11, /* NAS server */ - ELS_RNIDA_BRIDGE = 0x12, /* bridge */ - ELS_RNIDA_VIRT = 0x13, /* virtualization device */ - ELS_RNIDA_MF = 0xff, /* multifunction device (bits below) */ - ELS_RNIDA_MF_HUB = 1UL << 31, /* hub */ - ELS_RNIDA_MF_SW = 1UL << 30, /* switch */ - ELS_RNIDA_MF_GW = 1UL << 29, /* gateway */ - ELS_RNIDA_MF_ST = 1UL << 28, /* storage */ - ELS_RNIDA_MF_HOST = 1UL << 27, /* host */ - ELS_RNIDA_MF_SUB = 1UL << 26, /* storage subsystem */ - ELS_RNIDA_MF_ACC = 1UL << 25, /* storage access dev */ - ELS_RNIDA_MF_WDM = 1UL << 24, /* wavelength division mux */ - ELS_RNIDA_MF_NAS = 1UL << 23, /* NAS server */ - ELS_RNIDA_MF_BR = 1UL << 22, /* bridge */ - ELS_RNIDA_MF_VIRT = 1UL << 21, /* virtualization device */ -}; - -enum fc_els_rnid_mgmt { - ELS_RNIDM_SNMP = 0, - ELS_RNIDM_TELNET = 1, - ELS_RNIDM_HTTP = 2, - ELS_RNIDM_HTTPS = 3, - ELS_RNIDM_XML = 4, /* HTTP + XML */ -}; - -enum fc_els_rnid_ipver { - ELS_RNIDIP_NONE = 0, /* no IP support or node mgmt. */ - ELS_RNIDIP_V4 = 1, /* IPv4 */ - ELS_RNIDIP_V6 = 2, /* IPv6 */ -}; - -/* - * ELS RPL - Read Port List. - */ -struct fc_els_rpl { - __u8 rpl_cmd; /* command */ - __u8 rpl_resv[5]; /* reserved - must be zero */ - __be16 rpl_max_size; /* maximum response size or zero */ - __u8 rpl_resv1; /* reserved - must be zero */ - __u8 rpl_index[3]; /* starting index */ -}; - -/* - * Port number block in RPL response. - */ -struct fc_els_pnb { - __be32 pnb_phys_pn; /* physical port number */ - __u8 pnb_resv; /* reserved */ - __u8 pnb_port_id[3]; /* port ID */ - __be64 pnb_wwpn; /* port name */ -}; - -/* - * RPL LS_ACC response. - */ -struct fc_els_rpl_resp { - __u8 rpl_cmd; /* ELS_LS_ACC */ - __u8 rpl_resv1; /* reserved - must be zero */ - __be16 rpl_plen; /* payload length */ - __u8 rpl_resv2; /* reserved - must be zero */ - __u8 rpl_llen[3]; /* list length */ - __u8 rpl_resv3; /* reserved - must be zero */ - __u8 rpl_index[3]; /* starting index */ - struct fc_els_pnb rpl_pnb[1]; /* variable number of PNBs */ -}; - -/* - * Link Error Status Block. - */ -struct fc_els_lesb { - __be32 lesb_link_fail; /* link failure count */ - __be32 lesb_sync_loss; /* loss of synchronization count */ - __be32 lesb_sig_loss; /* loss of signal count */ - __be32 lesb_prim_err; /* primitive sequence error count */ - __be32 lesb_inv_word; /* invalid transmission word count */ - __be32 lesb_inv_crc; /* invalid CRC count */ -}; - -/* - * ELS RPS - Read Port Status Block request. - */ -struct fc_els_rps { - __u8 rps_cmd; /* command */ - __u8 rps_resv[2]; /* reserved - must be zero */ - __u8 rps_flag; /* flag - see below */ - __be64 rps_port_spec; /* port selection */ -}; - -enum fc_els_rps_flag { - FC_ELS_RPS_DID = 0x00, /* port identified by D_ID of req. */ - FC_ELS_RPS_PPN = 0x01, /* port_spec is physical port number */ - FC_ELS_RPS_WWPN = 0x02, /* port_spec is port WWN */ -}; - -/* - * ELS RPS LS_ACC response. - */ -struct fc_els_rps_resp { - __u8 rps_cmd; /* command - LS_ACC */ - __u8 rps_resv[2]; /* reserved - must be zero */ - __u8 rps_flag; /* flag - see below */ - __u8 rps_resv2[2]; /* reserved */ - __be16 rps_status; /* port status - see below */ - struct fc_els_lesb rps_lesb; /* link error status block */ -}; - -enum fc_els_rps_resp_flag { - FC_ELS_RPS_LPEV = 0x01, /* L_port extension valid */ -}; - -enum fc_els_rps_resp_status { - FC_ELS_RPS_PTP = 1 << 5, /* point-to-point connection */ - FC_ELS_RPS_LOOP = 1 << 4, /* loop mode */ - FC_ELS_RPS_FAB = 1 << 3, /* fabric present */ - FC_ELS_RPS_NO_SIG = 1 << 2, /* loss of signal */ - FC_ELS_RPS_NO_SYNC = 1 << 1, /* loss of synchronization */ - FC_ELS_RPS_RESET = 1 << 0, /* in link reset protocol */ -}; - -/* - * ELS LIRR - Link Incident Record Registration request. - */ -struct fc_els_lirr { - __u8 lirr_cmd; /* command */ - __u8 lirr_resv[3]; /* reserved - must be zero */ - __u8 lirr_func; /* registration function */ - __u8 lirr_fmt; /* FC-4 type of RLIR requested */ - __u8 lirr_resv2[2]; /* reserved - must be zero */ -}; - -enum fc_els_lirr_func { - ELS_LIRR_SET_COND = 0x01, /* set - conditionally receive */ - ELS_LIRR_SET_UNCOND = 0x02, /* set - unconditionally receive */ - ELS_LIRR_CLEAR = 0xff /* clear registration */ -}; - -/* - * ELS SRL - Scan Remote Loop request. - */ -struct fc_els_srl { - __u8 srl_cmd; /* command */ - __u8 srl_resv[3]; /* reserved - must be zero */ - __u8 srl_flag; /* flag - see below */ - __u8 srl_flag_param[3]; /* flag parameter */ -}; - -enum fc_els_srl_flag { - FC_ELS_SRL_ALL = 0x00, /* scan all FL ports */ - FC_ELS_SRL_ONE = 0x01, /* scan specified loop */ - FC_ELS_SRL_EN_PER = 0x02, /* enable periodic scanning (param) */ - FC_ELS_SRL_DIS_PER = 0x03, /* disable periodic scanning */ -}; - -/* - * ELS RLS - Read Link Error Status Block request. - */ -struct fc_els_rls { - __u8 rls_cmd; /* command */ - __u8 rls_resv[4]; /* reserved - must be zero */ - __u8 rls_port_id[3]; /* port ID */ -}; - -/* - * ELS RLS LS_ACC Response. - */ -struct fc_els_rls_resp { - __u8 rls_cmd; /* ELS_LS_ACC */ - __u8 rls_resv[3]; /* reserved - must be zero */ - struct fc_els_lesb rls_lesb; /* link error status block */ -}; - -/* - * ELS RLIR - Registered Link Incident Report. - * This is followed by the CLIR and the CLID, described below. - */ -struct fc_els_rlir { - __u8 rlir_cmd; /* command */ - __u8 rlir_resv[3]; /* reserved - must be zero */ - __u8 rlir_fmt; /* format (FC4-type if type specific) */ - __u8 rlir_clr_len; /* common link incident record length */ - __u8 rlir_cld_len; /* common link incident desc. length */ - __u8 rlir_slr_len; /* spec. link incident record length */ -}; - -/* - * CLIR - Common Link Incident Record Data. - Sent via RLIR. - */ -struct fc_els_clir { - __be64 clir_wwpn; /* incident port name */ - __be64 clir_wwnn; /* incident port node name */ - __u8 clir_port_type; /* incident port type */ - __u8 clir_port_id[3]; /* incident port ID */ - - __be64 clir_conn_wwpn; /* connected port name */ - __be64 clir_conn_wwnn; /* connected node name */ - __be64 clir_fab_name; /* fabric name */ - __be32 clir_phys_port; /* physical port number */ - __be32 clir_trans_id; /* transaction ID */ - __u8 clir_resv[3]; /* reserved */ - __u8 clir_ts_fmt; /* time stamp format */ - __be64 clir_timestamp; /* time stamp */ -}; - -/* - * CLIR clir_ts_fmt - time stamp format values. - */ -enum fc_els_clir_ts_fmt { - ELS_CLIR_TS_UNKNOWN = 0, /* time stamp field unknown */ - ELS_CLIR_TS_SEC_FRAC = 1, /* time in seconds and fractions */ - ELS_CLIR_TS_CSU = 2, /* time in clock synch update format */ -}; - -/* - * Common Link Incident Descriptor - sent via RLIR. - */ -struct fc_els_clid { - __u8 clid_iq; /* incident qualifier flags */ - __u8 clid_ic; /* incident code */ - __be16 clid_epai; /* domain/area of ISL */ -}; - -/* - * CLID incident qualifier flags. - */ -enum fc_els_clid_iq { - ELS_CLID_SWITCH = 0x20, /* incident port is a switch node */ - ELS_CLID_E_PORT = 0x10, /* incident is an ISL (E) port */ - ELS_CLID_SEV_MASK = 0x0c, /* severity 2-bit field mask */ - ELS_CLID_SEV_INFO = 0x00, /* report is informational */ - ELS_CLID_SEV_INOP = 0x08, /* link not operational */ - ELS_CLID_SEV_DEG = 0x04, /* link degraded but operational */ - ELS_CLID_LASER = 0x02, /* subassembly is a laser */ - ELS_CLID_FRU = 0x01, /* format can identify a FRU */ -}; - -/* - * CLID incident code. - */ -enum fc_els_clid_ic { - ELS_CLID_IC_IMPL = 1, /* implicit incident */ - ELS_CLID_IC_BER = 2, /* bit-error-rate threshold exceeded */ - ELS_CLID_IC_LOS = 3, /* loss of synch or signal */ - ELS_CLID_IC_NOS = 4, /* non-operational primitive sequence */ - ELS_CLID_IC_PST = 5, /* primitive sequence timeout */ - ELS_CLID_IC_INVAL = 6, /* invalid primitive sequence */ - ELS_CLID_IC_LOOP_TO = 7, /* loop initialization time out */ - ELS_CLID_IC_LIP = 8, /* receiving LIP */ -}; - -#endif /* _FC_ELS_H_ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/scsi/fc/fc_fs.h b/lib/libc/include/generic-musl/scsi/fc/fc_fs.h deleted file mode 100644 index c526c2be2c..0000000000 --- a/lib/libc/include/generic-musl/scsi/fc/fc_fs.h +++ /dev/null @@ -1,351 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright(c) 2007 Intel Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope 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 St - Fifth Floor, Boston, MA 02110-1301 USA. - * - * Maintained at www.Open-FCoE.org - */ - -#ifndef _FC_FS_H_ -#define _FC_FS_H_ - -#include - -/* - * Fibre Channel Framing and Signalling definitions. - * From T11 FC-FS-2 Rev 0.90 - 9 August 2005. - */ - -/* - * Frame header - */ -struct fc_frame_header { - __u8 fh_r_ctl; /* routing control */ - __u8 fh_d_id[3]; /* Destination ID */ - - __u8 fh_cs_ctl; /* class of service control / pri */ - __u8 fh_s_id[3]; /* Source ID */ - - __u8 fh_type; /* see enum fc_fh_type below */ - __u8 fh_f_ctl[3]; /* frame control */ - - __u8 fh_seq_id; /* sequence ID */ - __u8 fh_df_ctl; /* data field control */ - __be16 fh_seq_cnt; /* sequence count */ - - __be16 fh_ox_id; /* originator exchange ID */ - __be16 fh_rx_id; /* responder exchange ID */ - __be32 fh_parm_offset; /* parameter or relative offset */ -}; - -#define FC_FRAME_HEADER_LEN 24 /* expected length of structure */ - -#define FC_MAX_PAYLOAD 2112U /* max payload length in bytes */ -#define FC_MIN_MAX_PAYLOAD 256U /* lower limit on max payload */ - -#define FC_MAX_FRAME (FC_MAX_PAYLOAD + FC_FRAME_HEADER_LEN) -#define FC_MIN_MAX_FRAME (FC_MIN_MAX_PAYLOAD + FC_FRAME_HEADER_LEN) - -/* - * fh_r_ctl - Routing control definitions. - */ - /* - * FC-4 device_data. - */ -enum fc_rctl { - FC_RCTL_DD_UNCAT = 0x00, /* uncategorized information */ - FC_RCTL_DD_SOL_DATA = 0x01, /* solicited data */ - FC_RCTL_DD_UNSOL_CTL = 0x02, /* unsolicited control */ - FC_RCTL_DD_SOL_CTL = 0x03, /* solicited control or reply */ - FC_RCTL_DD_UNSOL_DATA = 0x04, /* unsolicited data */ - FC_RCTL_DD_DATA_DESC = 0x05, /* data descriptor */ - FC_RCTL_DD_UNSOL_CMD = 0x06, /* unsolicited command */ - FC_RCTL_DD_CMD_STATUS = 0x07, /* command status */ - -#define FC_RCTL_ILS_REQ FC_RCTL_DD_UNSOL_CTL /* ILS request */ -#define FC_RCTL_ILS_REP FC_RCTL_DD_SOL_CTL /* ILS reply */ - - /* - * Extended Link_Data - */ - FC_RCTL_ELS_REQ = 0x22, /* extended link services request */ - FC_RCTL_ELS_REP = 0x23, /* extended link services reply */ - FC_RCTL_ELS4_REQ = 0x32, /* FC-4 ELS request */ - FC_RCTL_ELS4_REP = 0x33, /* FC-4 ELS reply */ - /* - * Optional Extended Headers - */ - FC_RCTL_VFTH = 0x50, /* virtual fabric tagging header */ - FC_RCTL_IFRH = 0x51, /* inter-fabric routing header */ - FC_RCTL_ENCH = 0x52, /* encapsulation header */ - /* - * Basic Link Services fh_r_ctl values. - */ - FC_RCTL_BA_NOP = 0x80, /* basic link service NOP */ - FC_RCTL_BA_ABTS = 0x81, /* basic link service abort */ - FC_RCTL_BA_RMC = 0x82, /* remove connection */ - FC_RCTL_BA_ACC = 0x84, /* basic accept */ - FC_RCTL_BA_RJT = 0x85, /* basic reject */ - FC_RCTL_BA_PRMT = 0x86, /* dedicated connection preempted */ - /* - * Link Control Information. - */ - FC_RCTL_ACK_1 = 0xc0, /* acknowledge_1 */ - FC_RCTL_ACK_0 = 0xc1, /* acknowledge_0 */ - FC_RCTL_P_RJT = 0xc2, /* port reject */ - FC_RCTL_F_RJT = 0xc3, /* fabric reject */ - FC_RCTL_P_BSY = 0xc4, /* port busy */ - FC_RCTL_F_BSY = 0xc5, /* fabric busy to data frame */ - FC_RCTL_F_BSYL = 0xc6, /* fabric busy to link control frame */ - FC_RCTL_LCR = 0xc7, /* link credit reset */ - FC_RCTL_END = 0xc9, /* end */ -}; - /* incomplete list of definitions */ - -/* - * R_CTL names initializer. - * Please keep this matching the above definitions. - */ -#define FC_RCTL_NAMES_INIT { \ - [FC_RCTL_DD_UNCAT] = "uncat", \ - [FC_RCTL_DD_SOL_DATA] = "sol data", \ - [FC_RCTL_DD_UNSOL_CTL] = "unsol ctl", \ - [FC_RCTL_DD_SOL_CTL] = "sol ctl/reply", \ - [FC_RCTL_DD_UNSOL_DATA] = "unsol data", \ - [FC_RCTL_DD_DATA_DESC] = "data desc", \ - [FC_RCTL_DD_UNSOL_CMD] = "unsol cmd", \ - [FC_RCTL_DD_CMD_STATUS] = "cmd status", \ - [FC_RCTL_ELS_REQ] = "ELS req", \ - [FC_RCTL_ELS_REP] = "ELS rep", \ - [FC_RCTL_ELS4_REQ] = "FC-4 ELS req", \ - [FC_RCTL_ELS4_REP] = "FC-4 ELS rep", \ - [FC_RCTL_BA_NOP] = "BLS NOP", \ - [FC_RCTL_BA_ABTS] = "BLS abort", \ - [FC_RCTL_BA_RMC] = "BLS remove connection", \ - [FC_RCTL_BA_ACC] = "BLS accept", \ - [FC_RCTL_BA_RJT] = "BLS reject", \ - [FC_RCTL_BA_PRMT] = "BLS dedicated connection preempted", \ - [FC_RCTL_ACK_1] = "LC ACK_1", \ - [FC_RCTL_ACK_0] = "LC ACK_0", \ - [FC_RCTL_P_RJT] = "LC port reject", \ - [FC_RCTL_F_RJT] = "LC fabric reject", \ - [FC_RCTL_P_BSY] = "LC port busy", \ - [FC_RCTL_F_BSY] = "LC fabric busy to data frame", \ - [FC_RCTL_F_BSYL] = "LC fabric busy to link control frame",\ - [FC_RCTL_LCR] = "LC link credit reset", \ - [FC_RCTL_END] = "LC end", \ -} - -/* - * Well-known fabric addresses. - */ -enum fc_well_known_fid { - FC_FID_NONE = 0x000000, /* No destination */ - FC_FID_BCAST = 0xffffff, /* broadcast */ - FC_FID_FLOGI = 0xfffffe, /* fabric login */ - FC_FID_FCTRL = 0xfffffd, /* fabric controller */ - FC_FID_DIR_SERV = 0xfffffc, /* directory server */ - FC_FID_TIME_SERV = 0xfffffb, /* time server */ - FC_FID_MGMT_SERV = 0xfffffa, /* management server */ - FC_FID_QOS = 0xfffff9, /* QoS Facilitator */ - FC_FID_ALIASES = 0xfffff8, /* alias server (FC-PH2) */ - FC_FID_SEC_KEY = 0xfffff7, /* Security key dist. server */ - FC_FID_CLOCK = 0xfffff6, /* clock synch server */ - FC_FID_MCAST_SERV = 0xfffff5, /* multicast server */ -}; - -#define FC_FID_WELL_KNOWN_MAX 0xffffff /* highest well-known fabric ID */ -#define FC_FID_WELL_KNOWN_BASE 0xfffff5 /* start of well-known fabric ID */ - -/* - * Other well-known addresses, outside the above contiguous range. - */ -#define FC_FID_DOM_MGR 0xfffc00 /* domain manager base */ - -/* - * Fabric ID bytes. - */ -#define FC_FID_DOMAIN 0 -#define FC_FID_PORT 1 -#define FC_FID_LINK 2 - -/* - * fh_type codes - */ -enum fc_fh_type { - FC_TYPE_BLS = 0x00, /* basic link service */ - FC_TYPE_ELS = 0x01, /* extended link service */ - FC_TYPE_IP = 0x05, /* IP over FC, RFC 4338 */ - FC_TYPE_FCP = 0x08, /* SCSI FCP */ - FC_TYPE_CT = 0x20, /* Fibre Channel Services (FC-CT) */ - FC_TYPE_ILS = 0x22, /* internal link service */ - FC_TYPE_NVME = 0x28, /* FC-NVME */ -}; - -/* - * FC_TYPE names initializer. - * Please keep this matching the above definitions. - */ -#define FC_TYPE_NAMES_INIT { \ - [FC_TYPE_BLS] = "BLS", \ - [FC_TYPE_ELS] = "ELS", \ - [FC_TYPE_IP] = "IP", \ - [FC_TYPE_FCP] = "FCP", \ - [FC_TYPE_CT] = "CT", \ - [FC_TYPE_ILS] = "ILS", \ - [FC_TYPE_NVME] = "NVME", \ -} - -/* - * Exchange IDs. - */ -#define FC_XID_UNKNOWN 0xffff /* unknown exchange ID */ -#define FC_XID_MIN 0x0 /* supported min exchange ID */ -#define FC_XID_MAX 0xfffe /* supported max exchange ID */ - -/* - * fh_f_ctl - Frame control flags. - */ -#define FC_FC_EX_CTX (1 << 23) /* sent by responder to exchange */ -#define FC_FC_SEQ_CTX (1 << 22) /* sent by responder to sequence */ -#define FC_FC_FIRST_SEQ (1 << 21) /* first sequence of this exchange */ -#define FC_FC_LAST_SEQ (1 << 20) /* last sequence of this exchange */ -#define FC_FC_END_SEQ (1 << 19) /* last frame of sequence */ -#define FC_FC_END_CONN (1 << 18) /* end of class 1 connection pending */ -#define FC_FC_RES_B17 (1 << 17) /* reserved */ -#define FC_FC_SEQ_INIT (1 << 16) /* transfer of sequence initiative */ -#define FC_FC_X_ID_REASS (1 << 15) /* exchange ID has been changed */ -#define FC_FC_X_ID_INVAL (1 << 14) /* exchange ID invalidated */ - -#define FC_FC_ACK_1 (1 << 12) /* 13:12 = 1: ACK_1 expected */ -#define FC_FC_ACK_N (2 << 12) /* 13:12 = 2: ACK_N expected */ -#define FC_FC_ACK_0 (3 << 12) /* 13:12 = 3: ACK_0 expected */ - -#define FC_FC_RES_B11 (1 << 11) /* reserved */ -#define FC_FC_RES_B10 (1 << 10) /* reserved */ -#define FC_FC_RETX_SEQ (1 << 9) /* retransmitted sequence */ -#define FC_FC_UNI_TX (1 << 8) /* unidirectional transmit (class 1) */ -#define FC_FC_CONT_SEQ(i) ((i) << 6) -#define FC_FC_ABT_SEQ(i) ((i) << 4) -#define FC_FC_REL_OFF (1 << 3) /* parameter is relative offset */ -#define FC_FC_RES2 (1 << 2) /* reserved */ -#define FC_FC_FILL(i) ((i) & 3) /* 1:0: bytes of trailing fill */ - -/* - * BA_ACC payload. - */ -struct fc_ba_acc { - __u8 ba_seq_id_val; /* SEQ_ID validity */ -#define FC_BA_SEQ_ID_VAL 0x80 - __u8 ba_seq_id; /* SEQ_ID of seq last deliverable */ - __u8 ba_resvd[2]; /* reserved */ - __be16 ba_ox_id; /* OX_ID for aborted seq or exch */ - __be16 ba_rx_id; /* RX_ID for aborted seq or exch */ - __be16 ba_low_seq_cnt; /* low SEQ_CNT of aborted seq */ - __be16 ba_high_seq_cnt; /* high SEQ_CNT of aborted seq */ -}; - -/* - * BA_RJT: Basic Reject payload. - */ -struct fc_ba_rjt { - __u8 br_resvd; /* reserved */ - __u8 br_reason; /* reason code */ - __u8 br_explan; /* reason explanation */ - __u8 br_vendor; /* vendor unique code */ -}; - -/* - * BA_RJT reason codes. - * From FS-2. - */ -enum fc_ba_rjt_reason { - FC_BA_RJT_NONE = 0, /* in software this means no reject */ - FC_BA_RJT_INVL_CMD = 0x01, /* invalid command code */ - FC_BA_RJT_LOG_ERR = 0x03, /* logical error */ - FC_BA_RJT_LOG_BUSY = 0x05, /* logical busy */ - FC_BA_RJT_PROTO_ERR = 0x07, /* protocol error */ - FC_BA_RJT_UNABLE = 0x09, /* unable to perform request */ - FC_BA_RJT_VENDOR = 0xff, /* vendor-specific (see br_vendor) */ -}; - -/* - * BA_RJT reason code explanations. - */ -enum fc_ba_rjt_explan { - FC_BA_RJT_EXP_NONE = 0x00, /* no additional expanation */ - FC_BA_RJT_INV_XID = 0x03, /* invalid OX_ID-RX_ID combination */ - FC_BA_RJT_ABT = 0x05, /* sequence aborted, no seq info */ -}; - -/* - * P_RJT or F_RJT: Port Reject or Fabric Reject parameter field. - */ -struct fc_pf_rjt { - __u8 rj_action; /* reserved */ - __u8 rj_reason; /* reason code */ - __u8 rj_resvd; /* reserved */ - __u8 rj_vendor; /* vendor unique code */ -}; - -/* - * P_RJT and F_RJT reject reason codes. - */ -enum fc_pf_rjt_reason { - FC_RJT_NONE = 0, /* non-reject (reserved by standard) */ - FC_RJT_INVL_DID = 0x01, /* invalid destination ID */ - FC_RJT_INVL_SID = 0x02, /* invalid source ID */ - FC_RJT_P_UNAV_T = 0x03, /* port unavailable, temporary */ - FC_RJT_P_UNAV = 0x04, /* port unavailable, permanent */ - FC_RJT_CLS_UNSUP = 0x05, /* class not supported */ - FC_RJT_DEL_USAGE = 0x06, /* delimiter usage error */ - FC_RJT_TYPE_UNSUP = 0x07, /* type not supported */ - FC_RJT_LINK_CTL = 0x08, /* invalid link control */ - FC_RJT_R_CTL = 0x09, /* invalid R_CTL field */ - FC_RJT_F_CTL = 0x0a, /* invalid F_CTL field */ - FC_RJT_OX_ID = 0x0b, /* invalid originator exchange ID */ - FC_RJT_RX_ID = 0x0c, /* invalid responder exchange ID */ - FC_RJT_SEQ_ID = 0x0d, /* invalid sequence ID */ - FC_RJT_DF_CTL = 0x0e, /* invalid DF_CTL field */ - FC_RJT_SEQ_CNT = 0x0f, /* invalid SEQ_CNT field */ - FC_RJT_PARAM = 0x10, /* invalid parameter field */ - FC_RJT_EXCH_ERR = 0x11, /* exchange error */ - FC_RJT_PROTO = 0x12, /* protocol error */ - FC_RJT_LEN = 0x13, /* incorrect length */ - FC_RJT_UNEXP_ACK = 0x14, /* unexpected ACK */ - FC_RJT_FAB_CLASS = 0x15, /* class unsupported by fabric entity */ - FC_RJT_LOGI_REQ = 0x16, /* login required */ - FC_RJT_SEQ_XS = 0x17, /* excessive sequences attempted */ - FC_RJT_EXCH_EST = 0x18, /* unable to establish exchange */ - FC_RJT_FAB_UNAV = 0x1a, /* fabric unavailable */ - FC_RJT_VC_ID = 0x1b, /* invalid VC_ID (class 4) */ - FC_RJT_CS_CTL = 0x1c, /* invalid CS_CTL field */ - FC_RJT_INSUF_RES = 0x1d, /* insuff. resources for VC (Class 4) */ - FC_RJT_INVL_CLS = 0x1f, /* invalid class of service */ - FC_RJT_PREEMT_RJT = 0x20, /* preemption request rejected */ - FC_RJT_PREEMT_DIS = 0x21, /* preemption not enabled */ - FC_RJT_MCAST_ERR = 0x22, /* multicast error */ - FC_RJT_MCAST_ET = 0x23, /* multicast error terminate */ - FC_RJT_PRLI_REQ = 0x24, /* process login required */ - FC_RJT_INVL_ATT = 0x25, /* invalid attachment */ - FC_RJT_VENDOR = 0xff, /* vendor specific reject */ -}; - -/* default timeout values */ - -#define FC_DEF_E_D_TOV 2000UL -#define FC_DEF_R_A_TOV 10000UL - -#endif /* _FC_FS_H_ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/scsi/fc/fc_gs.h b/lib/libc/include/generic-musl/scsi/fc/fc_gs.h deleted file mode 100644 index e940586b4c..0000000000 --- a/lib/libc/include/generic-musl/scsi/fc/fc_gs.h +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright(c) 2007 Intel Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope 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 St - Fifth Floor, Boston, MA 02110-1301 USA. - * - * Maintained at www.Open-FCoE.org - */ - -#ifndef _FC_GS_H_ -#define _FC_GS_H_ - -#include - -/* - * Fibre Channel Services - Common Transport. - * From T11.org FC-GS-2 Rev 5.3 November 1998. - */ - -struct fc_ct_hdr { - __u8 ct_rev; /* revision */ - __u8 ct_in_id[3]; /* N_Port ID of original requestor */ - __u8 ct_fs_type; /* type of fibre channel service */ - __u8 ct_fs_subtype; /* subtype */ - __u8 ct_options; - __u8 _ct_resvd1; - __be16 ct_cmd; /* command / response code */ - __be16 ct_mr_size; /* maximum / residual size */ - __u8 _ct_resvd2; - __u8 ct_reason; /* reject reason */ - __u8 ct_explan; /* reason code explanation */ - __u8 ct_vendor; /* vendor unique data */ -}; - -#define FC_CT_HDR_LEN 16 /* expected sizeof (struct fc_ct_hdr) */ - -enum fc_ct_rev { - FC_CT_REV = 1 /* common transport revision */ -}; - -/* - * ct_fs_type values. - */ -enum fc_ct_fs_type { - FC_FST_ALIAS = 0xf8, /* alias service */ - FC_FST_MGMT = 0xfa, /* management service */ - FC_FST_TIME = 0xfb, /* time service */ - FC_FST_DIR = 0xfc, /* directory service */ -}; - -/* - * ct_cmd: Command / response codes - */ -enum fc_ct_cmd { - FC_FS_RJT = 0x8001, /* reject */ - FC_FS_ACC = 0x8002, /* accept */ -}; - -/* - * FS_RJT reason codes. - */ -enum fc_ct_reason { - FC_FS_RJT_CMD = 0x01, /* invalid command code */ - FC_FS_RJT_VER = 0x02, /* invalid version level */ - FC_FS_RJT_LOG = 0x03, /* logical error */ - FC_FS_RJT_IUSIZ = 0x04, /* invalid IU size */ - FC_FS_RJT_BSY = 0x05, /* logical busy */ - FC_FS_RJT_PROTO = 0x07, /* protocol error */ - FC_FS_RJT_UNABL = 0x09, /* unable to perform command request */ - FC_FS_RJT_UNSUP = 0x0b, /* command not supported */ -}; - -/* - * FS_RJT reason code explanations. - */ -enum fc_ct_explan { - FC_FS_EXP_NONE = 0x00, /* no additional explanation */ - FC_FS_EXP_PID = 0x01, /* port ID not registered */ - FC_FS_EXP_PNAM = 0x02, /* port name not registered */ - FC_FS_EXP_NNAM = 0x03, /* node name not registered */ - FC_FS_EXP_COS = 0x04, /* class of service not registered */ - FC_FS_EXP_FTNR = 0x07, /* FC-4 types not registered */ - /* definitions not complete */ -}; - -#endif /* _FC_GS_H_ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/scsi/fc/fc_ns.h b/lib/libc/include/generic-musl/scsi/fc/fc_ns.h deleted file mode 100644 index fa1e3fa06e..0000000000 --- a/lib/libc/include/generic-musl/scsi/fc/fc_ns.h +++ /dev/null @@ -1,209 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright(c) 2007 Intel Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope 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 St - Fifth Floor, Boston, MA 02110-1301 USA. - * - * Maintained at www.Open-FCoE.org - */ - -#ifndef _FC_NS_H_ -#define _FC_NS_H_ - -#include - -/* - * Fibre Channel Services - Name Service (dNS) - * From T11.org FC-GS-2 Rev 5.3 November 1998. - */ - -/* - * Common-transport sub-type for Name Server. - */ -#define FC_NS_SUBTYPE 2 /* fs_ct_hdr.ct_fs_subtype */ - -/* - * Name server Requests. - * Note: this is an incomplete list, some unused requests are omitted. - */ -enum fc_ns_req { - FC_NS_GA_NXT = 0x0100, /* get all next */ - FC_NS_GI_A = 0x0101, /* get identifiers - scope */ - FC_NS_GPN_ID = 0x0112, /* get port name by ID */ - FC_NS_GNN_ID = 0x0113, /* get node name by ID */ - FC_NS_GSPN_ID = 0x0118, /* get symbolic port name */ - FC_NS_GID_PN = 0x0121, /* get ID for port name */ - FC_NS_GID_NN = 0x0131, /* get IDs for node name */ - FC_NS_GID_FT = 0x0171, /* get IDs by FC4 type */ - FC_NS_GPN_FT = 0x0172, /* get port names by FC4 type */ - FC_NS_GID_PT = 0x01a1, /* get IDs by port type */ - FC_NS_RPN_ID = 0x0212, /* reg port name for ID */ - FC_NS_RNN_ID = 0x0213, /* reg node name for ID */ - FC_NS_RFT_ID = 0x0217, /* reg FC4 type for ID */ - FC_NS_RSPN_ID = 0x0218, /* reg symbolic port name */ - FC_NS_RFF_ID = 0x021f, /* reg FC4 Features for ID */ - FC_NS_RSNN_NN = 0x0239, /* reg symbolic node name */ -}; - -/* - * Port type values. - */ -enum fc_ns_pt { - FC_NS_UNID_PORT = 0x00, /* unidentified */ - FC_NS_N_PORT = 0x01, /* N port */ - FC_NS_NL_PORT = 0x02, /* NL port */ - FC_NS_FNL_PORT = 0x03, /* F/NL port */ - FC_NS_NX_PORT = 0x7f, /* Nx port */ - FC_NS_F_PORT = 0x81, /* F port */ - FC_NS_FL_PORT = 0x82, /* FL port */ - FC_NS_E_PORT = 0x84, /* E port */ - FC_NS_B_PORT = 0x85, /* B port */ -}; - -/* - * Port type object. - */ -struct fc_ns_pt_obj { - __u8 pt_type; -}; - -/* - * Port ID object - */ -struct fc_ns_fid { - __u8 fp_flags; /* flags for responses only */ - __u8 fp_fid[3]; -}; - -/* - * fp_flags in port ID object, for responses only. - */ -#define FC_NS_FID_LAST 0x80 /* last object */ - -/* - * FC4-types object. - */ -#define FC_NS_TYPES 256 /* number of possible FC-4 types */ -#define FC_NS_BPW 32 /* bits per word in bitmap */ - -struct fc_ns_fts { - __be32 ff_type_map[FC_NS_TYPES / FC_NS_BPW]; /* bitmap of FC-4 types */ -}; - -/* - * FC4-features object. - */ -struct fc_ns_ff { - __be32 fd_feat[FC_NS_TYPES * 4 / FC_NS_BPW]; /* 4-bits per FC-type */ -}; - -/* - * GID_PT request. - */ -struct fc_ns_gid_pt { - __u8 fn_pt_type; - __u8 fn_domain_id_scope; - __u8 fn_area_id_scope; - __u8 fn_resvd; -}; - -/* - * GID_FT or GPN_FT request. - */ -struct fc_ns_gid_ft { - __u8 fn_resvd; - __u8 fn_domain_id_scope; - __u8 fn_area_id_scope; - __u8 fn_fc4_type; -}; - -/* - * GPN_FT response. - */ -struct fc_gpn_ft_resp { - __u8 fp_flags; /* see fp_flags definitions above */ - __u8 fp_fid[3]; /* port ID */ - __be32 fp_resvd; - __be64 fp_wwpn; /* port name */ -}; - -/* - * GID_PN request - */ -struct fc_ns_gid_pn { - __be64 fn_wwpn; /* port name */ -}; - -/* - * GID_PN response or GSPN_ID request - */ -struct fc_gid_pn_resp { - __u8 fp_resvd; - __u8 fp_fid[3]; /* port ID */ -}; - -/* - * GSPN_ID response - */ -struct fc_gspn_resp { - __u8 fp_name_len; - char fp_name[]; -}; - -/* - * RFT_ID request - register FC-4 types for ID. - */ -struct fc_ns_rft_id { - struct fc_ns_fid fr_fid; /* port ID object */ - struct fc_ns_fts fr_fts; /* FC-4 types object */ -}; - -/* - * RPN_ID request - register port name for ID. - * RNN_ID request - register node name for ID. - */ -struct fc_ns_rn_id { - struct fc_ns_fid fr_fid; /* port ID object */ - __be64 fr_wwn; /* node name or port name */ -} __attribute__((__packed__)); - -/* - * RSNN_NN request - register symbolic node name - */ -struct fc_ns_rsnn { - __be64 fr_wwn; /* node name */ - __u8 fr_name_len; - char fr_name[]; -} __attribute__((__packed__)); - -/* - * RSPN_ID request - register symbolic port name - */ -struct fc_ns_rspn { - struct fc_ns_fid fr_fid; /* port ID object */ - __u8 fr_name_len; - char fr_name[]; -} __attribute__((__packed__)); - -/* - * RFF_ID request - register FC-4 Features for ID. - */ -struct fc_ns_rff_id { - struct fc_ns_fid fr_fid; /* port ID object */ - __u8 fr_resvd[2]; - __u8 fr_feat; /* FC-4 Feature bits */ - __u8 fr_type; /* FC-4 type */ -} __attribute__((__packed__)); - -#endif /* _FC_NS_H_ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/scsi/scsi_bsg_fc.h b/lib/libc/include/generic-musl/scsi/scsi_bsg_fc.h deleted file mode 100644 index a426c7ad29..0000000000 --- a/lib/libc/include/generic-musl/scsi/scsi_bsg_fc.h +++ /dev/null @@ -1,320 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * FC Transport BSG Interface - * - * Copyright (C) 2008 James Smart, Emulex Corporation - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef SCSI_BSG_FC_H -#define SCSI_BSG_FC_H - -/* - * This file intended to be included by both kernel and user space - */ - -/* - * FC Transport SGIO v4 BSG Message Support - */ - -/* Default BSG request timeout (in seconds) */ -#define FC_DEFAULT_BSG_TIMEOUT (10 * HZ) - - -/* - * Request Message Codes supported by the FC Transport - */ - -/* define the class masks for the message codes */ -#define FC_BSG_CLS_MASK 0xF0000000 /* find object class */ -#define FC_BSG_HST_MASK 0x80000000 /* fc host class */ -#define FC_BSG_RPT_MASK 0x40000000 /* fc rport class */ - - /* fc_host Message Codes */ -#define FC_BSG_HST_ADD_RPORT (FC_BSG_HST_MASK | 0x00000001) -#define FC_BSG_HST_DEL_RPORT (FC_BSG_HST_MASK | 0x00000002) -#define FC_BSG_HST_ELS_NOLOGIN (FC_BSG_HST_MASK | 0x00000003) -#define FC_BSG_HST_CT (FC_BSG_HST_MASK | 0x00000004) -#define FC_BSG_HST_VENDOR (FC_BSG_HST_MASK | 0x000000FF) - - /* fc_rport Message Codes */ -#define FC_BSG_RPT_ELS (FC_BSG_RPT_MASK | 0x00000001) -#define FC_BSG_RPT_CT (FC_BSG_RPT_MASK | 0x00000002) - - - -/* - * FC Address Identifiers in Message Structures : - * - * Whenever a command payload contains a FC Address Identifier - * (aka port_id), the value is effectively in big-endian - * order, thus the array elements are decoded as follows: - * element [0] is bits 23:16 of the FC Address Identifier - * element [1] is bits 15:8 of the FC Address Identifier - * element [2] is bits 7:0 of the FC Address Identifier - */ - - -/* - * FC Host Messages - */ - -/* FC_BSG_HST_ADDR_PORT : */ - -/* Request: - * This message requests the FC host to login to the remote port - * at the specified N_Port_Id. The remote port is to be enumerated - * with the transport upon completion of the login. - */ -struct fc_bsg_host_add_rport { - uint8_t reserved; - - /* FC Address Identier of the remote port to login to */ - uint8_t port_id[3]; -}; - -/* Response: - * There is no additional response data - fc_bsg_reply->result is sufficient - */ - - -/* FC_BSG_HST_DEL_RPORT : */ - -/* Request: - * This message requests the FC host to remove an enumerated - * remote port and to terminate the login to it. - * - * Note: The driver is free to reject this request if it desires to - * remain logged in with the remote port. - */ -struct fc_bsg_host_del_rport { - uint8_t reserved; - - /* FC Address Identier of the remote port to logout of */ - uint8_t port_id[3]; -}; - -/* Response: - * There is no additional response data - fc_bsg_reply->result is sufficient - */ - - -/* FC_BSG_HST_ELS_NOLOGIN : */ - -/* Request: - * This message requests the FC_Host to send an ELS to a specific - * N_Port_ID. The host does not need to log into the remote port, - * nor does it need to enumerate the rport for further traffic - * (although, the FC host is free to do so if it desires). - */ -struct fc_bsg_host_els { - /* - * ELS Command Code being sent (must be the same as byte 0 - * of the payload) - */ - uint8_t command_code; - - /* FC Address Identier of the remote port to send the ELS to */ - uint8_t port_id[3]; -}; - -/* Response: - */ -/* fc_bsg_ctels_reply->status values */ -#define FC_CTELS_STATUS_OK 0x00000000 -#define FC_CTELS_STATUS_REJECT 0x00000001 -#define FC_CTELS_STATUS_P_RJT 0x00000002 -#define FC_CTELS_STATUS_F_RJT 0x00000003 -#define FC_CTELS_STATUS_P_BSY 0x00000004 -#define FC_CTELS_STATUS_F_BSY 0x00000006 -struct fc_bsg_ctels_reply { - /* - * Note: An ELS LS_RJT may be reported in 2 ways: - * a) A status of FC_CTELS_STATUS_OK is returned. The caller - * is to look into the ELS receive payload to determine - * LS_ACC or LS_RJT (by contents of word 0). The reject - * data will be in word 1. - * b) A status of FC_CTELS_STATUS_REJECT is returned, The - * rjt_data field will contain valid data. - * - * Note: ELS LS_ACC is determined by an FC_CTELS_STATUS_OK, and - * the receive payload word 0 indicates LS_ACC - * (e.g. value is 0x02xxxxxx). - * - * Note: Similarly, a CT Reject may be reported in 2 ways: - * a) A status of FC_CTELS_STATUS_OK is returned. The caller - * is to look into the CT receive payload to determine - * Accept or Reject (by contents of word 2). The reject - * data will be in word 3. - * b) A status of FC_CTELS_STATUS_REJECT is returned, The - * rjt_data field will contain valid data. - * - * Note: x_RJT/BSY status will indicae that the rjt_data field - * is valid and contains the reason/explanation values. - */ - uint32_t status; /* See FC_CTELS_STATUS_xxx */ - - /* valid if status is not FC_CTELS_STATUS_OK */ - struct { - uint8_t action; /* fragment_id for CT REJECT */ - uint8_t reason_code; - uint8_t reason_explanation; - uint8_t vendor_unique; - } rjt_data; -}; - - -/* FC_BSG_HST_CT : */ - -/* Request: - * This message requests that a CT Request be performed with the - * indicated N_Port_ID. The driver is responsible for logging in with - * the fabric and/or N_Port_ID, etc as per FC rules. This request does - * not mandate that the driver must enumerate the destination in the - * transport. The driver is allowed to decide whether to enumerate it, - * and whether to tear it down after the request. - */ -struct fc_bsg_host_ct { - uint8_t reserved; - - /* FC Address Identier of the remote port to send the ELS to */ - uint8_t port_id[3]; - - /* - * We need words 0-2 of the generic preamble for the LLD's - */ - uint32_t preamble_word0; /* revision & IN_ID */ - uint32_t preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */ - uint32_t preamble_word2; /* Cmd Code, Max Size */ - -}; -/* Response: - * - * The reply structure is an fc_bsg_ctels_reply structure - */ - - -/* FC_BSG_HST_VENDOR : */ - -/* Request: - * Note: When specifying vendor_id, be sure to read the Vendor Type and ID - * formatting requirements specified in scsi_netlink.h - */ -struct fc_bsg_host_vendor { - /* - * Identifies the vendor that the message is formatted for. This - * should be the recipient of the message. - */ - uint64_t vendor_id; - - /* start of vendor command area */ - uint32_t vendor_cmd[0]; -}; - -/* Response: - */ -struct fc_bsg_host_vendor_reply { - /* start of vendor response area */ - uint32_t vendor_rsp[0]; -}; - - - -/* - * FC Remote Port Messages - */ - -/* FC_BSG_RPT_ELS : */ - -/* Request: - * This message requests that an ELS be performed with the rport. - */ -struct fc_bsg_rport_els { - /* - * ELS Command Code being sent (must be the same as - * byte 0 of the payload) - */ - uint8_t els_code; -}; - -/* Response: - * - * The reply structure is an fc_bsg_ctels_reply structure - */ - - -/* FC_BSG_RPT_CT : */ - -/* Request: - * This message requests that a CT Request be performed with the rport. - */ -struct fc_bsg_rport_ct { - /* - * We need words 0-2 of the generic preamble for the LLD's - */ - uint32_t preamble_word0; /* revision & IN_ID */ - uint32_t preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */ - uint32_t preamble_word2; /* Cmd Code, Max Size */ -}; -/* Response: - * - * The reply structure is an fc_bsg_ctels_reply structure - */ - - - - -/* request (CDB) structure of the sg_io_v4 */ -struct fc_bsg_request { - uint32_t msgcode; - union { - struct fc_bsg_host_add_rport h_addrport; - struct fc_bsg_host_del_rport h_delrport; - struct fc_bsg_host_els h_els; - struct fc_bsg_host_ct h_ct; - struct fc_bsg_host_vendor h_vendor; - - struct fc_bsg_rport_els r_els; - struct fc_bsg_rport_ct r_ct; - } rqst_data; -} __attribute__((packed)); - - -/* response (request sense data) structure of the sg_io_v4 */ -struct fc_bsg_reply { - /* - * The completion result. Result exists in two forms: - * if negative, it is an -Exxx system errno value. There will - * be no further reply information supplied. - * else, it's the 4-byte scsi error result, with driver, host, - * msg and status fields. The per-msgcode reply structure - * will contain valid data. - */ - uint32_t result; - - /* If there was reply_payload, how much was recevied ? */ - uint32_t reply_payload_rcv_len; - - union { - struct fc_bsg_host_vendor_reply vendor_reply; - - struct fc_bsg_ctels_reply ctels_reply; - } reply_data; -}; - - -#endif /* SCSI_BSG_FC_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/scsi/scsi_netlink.h b/lib/libc/include/generic-musl/scsi/scsi_netlink.h deleted file mode 100644 index bb277e748f..0000000000 --- a/lib/libc/include/generic-musl/scsi/scsi_netlink.h +++ /dev/null @@ -1,123 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * SCSI Transport Netlink Interface - * Used for the posting of outbound SCSI transport events - * - * Copyright (C) 2006 James Smart, Emulex Corporation - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ -#ifndef SCSI_NETLINK_H -#define SCSI_NETLINK_H - -#include -#include - -/* - * This file intended to be included by both kernel and user space - */ - -/* Single Netlink Message type to send all SCSI Transport messages */ -#define SCSI_TRANSPORT_MSG NLMSG_MIN_TYPE + 1 - -/* SCSI Transport Broadcast Groups */ - /* leaving groups 0 and 1 unassigned */ -#define SCSI_NL_GRP_FC_EVENTS (1<<2) /* Group 2 */ -#define SCSI_NL_GRP_CNT 3 - - -/* SCSI_TRANSPORT_MSG event message header */ -struct scsi_nl_hdr { - uint8_t version; - uint8_t transport; - uint16_t magic; - uint16_t msgtype; - uint16_t msglen; -} __attribute__((aligned(sizeof(uint64_t)))); - -/* scsi_nl_hdr->version value */ -#define SCSI_NL_VERSION 1 - -/* scsi_nl_hdr->magic value */ -#define SCSI_NL_MAGIC 0xA1B2 - -/* scsi_nl_hdr->transport value */ -#define SCSI_NL_TRANSPORT 0 -#define SCSI_NL_TRANSPORT_FC 1 -#define SCSI_NL_MAX_TRANSPORTS 2 - -/* Transport-based scsi_nl_hdr->msgtype values are defined in each transport */ - -/* - * GENERIC SCSI scsi_nl_hdr->msgtype Values - */ - /* kernel -> user */ -#define SCSI_NL_SHOST_VENDOR 0x0001 - /* user -> kernel */ -/* SCSI_NL_SHOST_VENDOR msgtype is kernel->user and user->kernel */ - - -/* - * Message Structures : - */ - -/* macro to round up message lengths to 8byte boundary */ -#define SCSI_NL_MSGALIGN(len) (((len) + 7) & ~7) - - -/* - * SCSI HOST Vendor Unique messages : - * SCSI_NL_SHOST_VENDOR - * - * Note: The Vendor Unique message payload will begin directly after - * this structure, with the length of the payload per vmsg_datalen. - * - * Note: When specifying vendor_id, be sure to read the Vendor Type and ID - * formatting requirements specified below - */ -struct scsi_nl_host_vendor_msg { - struct scsi_nl_hdr snlh; /* must be 1st element ! */ - uint64_t vendor_id; - uint16_t host_no; - uint16_t vmsg_datalen; -} __attribute__((aligned(sizeof(uint64_t)))); - - -/* - * Vendor ID: - * If transports post vendor-unique events, they must pass a well-known - * 32-bit vendor identifier. This identifier consists of 8 bits indicating - * the "type" of identifier contained, and 24 bits of id data. - * - * Identifiers for each type: - * PCI : ID data is the 16 bit PCI Registered Vendor ID - */ -#define SCSI_NL_VID_TYPE_SHIFT 56 -#define SCSI_NL_VID_TYPE_MASK ((__u64)0xFF << SCSI_NL_VID_TYPE_SHIFT) -#define SCSI_NL_VID_TYPE_PCI ((__u64)0x01 << SCSI_NL_VID_TYPE_SHIFT) -#define SCSI_NL_VID_ID_MASK (~ SCSI_NL_VID_TYPE_MASK) - - -#define INIT_SCSI_NL_HDR(hdr, t, mtype, mlen) \ - { \ - (hdr)->version = SCSI_NL_VERSION; \ - (hdr)->transport = t; \ - (hdr)->magic = SCSI_NL_MAGIC; \ - (hdr)->msgtype = mtype; \ - (hdr)->msglen = mlen; \ - } - -#endif /* SCSI_NETLINK_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/scsi/scsi_netlink_fc.h b/lib/libc/include/generic-musl/scsi/scsi_netlink_fc.h deleted file mode 100644 index 2ccef41f15..0000000000 --- a/lib/libc/include/generic-musl/scsi/scsi_netlink_fc.h +++ /dev/null @@ -1,71 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * FC Transport Netlink Interface - * - * Copyright (C) 2006 James Smart, Emulex Corporation - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ -#ifndef SCSI_NETLINK_FC_H -#define SCSI_NETLINK_FC_H - -#include - -/* - * This file intended to be included by both kernel and user space - */ - -/* - * FC Transport Message Types - */ - /* kernel -> user */ -#define FC_NL_ASYNC_EVENT 0x0100 - /* user -> kernel */ -/* none */ - - -/* - * Message Structures : - */ - -/* macro to round up message lengths to 8byte boundary */ -#define FC_NL_MSGALIGN(len) (((len) + 7) & ~7) - - -/* - * FC Transport Broadcast Event Message : - * FC_NL_ASYNC_EVENT - * - * Note: if Vendor Unique message, &event_data will be start of - * vendor unique payload, and the length of the payload is - * per event_datalen - * - * Note: When specifying vendor_id, be sure to read the Vendor Type and ID - * formatting requirements specified in scsi_netlink.h - */ -struct fc_nl_event { - struct scsi_nl_hdr snlh; /* must be 1st element ! */ - uint64_t seconds; - uint64_t vendor_id; - uint16_t host_no; - uint16_t event_datalen; - uint32_t event_num; - uint32_t event_code; - uint32_t event_data; -} __attribute__((aligned(sizeof(uint64_t)))); - - -#endif /* SCSI_NETLINK_FC_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/asequencer.h b/lib/libc/include/generic-musl/sound/asequencer.h deleted file mode 100644 index 3c5554f5c6..0000000000 --- a/lib/libc/include/generic-musl/sound/asequencer.h +++ /dev/null @@ -1,612 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * Main header file for the ALSA sequencer - * Copyright (c) 1998-1999 by Frank van de Pol - * (c) 1998-1999 by Jaroslav Kysela - * - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ -#ifndef __SOUND_ASEQUENCER_H -#define __SOUND_ASEQUENCER_H - -#include - -/** version of the sequencer */ -#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 2) - -/** - * definition of sequencer event types - */ - -/** system messages - * event data type = #snd_seq_result - */ -#define SNDRV_SEQ_EVENT_SYSTEM 0 -#define SNDRV_SEQ_EVENT_RESULT 1 - -/** note messages (channel specific) - * event data type = #snd_seq_ev_note - */ -#define SNDRV_SEQ_EVENT_NOTE 5 -#define SNDRV_SEQ_EVENT_NOTEON 6 -#define SNDRV_SEQ_EVENT_NOTEOFF 7 -#define SNDRV_SEQ_EVENT_KEYPRESS 8 - -/** control messages (channel specific) - * event data type = #snd_seq_ev_ctrl - */ -#define SNDRV_SEQ_EVENT_CONTROLLER 10 -#define SNDRV_SEQ_EVENT_PGMCHANGE 11 -#define SNDRV_SEQ_EVENT_CHANPRESS 12 -#define SNDRV_SEQ_EVENT_PITCHBEND 13 /**< from -8192 to 8191 */ -#define SNDRV_SEQ_EVENT_CONTROL14 14 /**< 14 bit controller value */ -#define SNDRV_SEQ_EVENT_NONREGPARAM 15 /**< 14 bit NRPN address + 14 bit unsigned value */ -#define SNDRV_SEQ_EVENT_REGPARAM 16 /**< 14 bit RPN address + 14 bit unsigned value */ - -/** synchronisation messages - * event data type = #snd_seq_ev_ctrl - */ -#define SNDRV_SEQ_EVENT_SONGPOS 20 /* Song Position Pointer with LSB and MSB values */ -#define SNDRV_SEQ_EVENT_SONGSEL 21 /* Song Select with song ID number */ -#define SNDRV_SEQ_EVENT_QFRAME 22 /* midi time code quarter frame */ -#define SNDRV_SEQ_EVENT_TIMESIGN 23 /* SMF Time Signature event */ -#define SNDRV_SEQ_EVENT_KEYSIGN 24 /* SMF Key Signature event */ - -/** timer messages - * event data type = snd_seq_ev_queue_control - */ -#define SNDRV_SEQ_EVENT_START 30 /* midi Real Time Start message */ -#define SNDRV_SEQ_EVENT_CONTINUE 31 /* midi Real Time Continue message */ -#define SNDRV_SEQ_EVENT_STOP 32 /* midi Real Time Stop message */ -#define SNDRV_SEQ_EVENT_SETPOS_TICK 33 /* set tick queue position */ -#define SNDRV_SEQ_EVENT_SETPOS_TIME 34 /* set realtime queue position */ -#define SNDRV_SEQ_EVENT_TEMPO 35 /* (SMF) Tempo event */ -#define SNDRV_SEQ_EVENT_CLOCK 36 /* midi Real Time Clock message */ -#define SNDRV_SEQ_EVENT_TICK 37 /* midi Real Time Tick message */ -#define SNDRV_SEQ_EVENT_QUEUE_SKEW 38 /* skew queue tempo */ - -/** others - * event data type = none - */ -#define SNDRV_SEQ_EVENT_TUNE_REQUEST 40 /* tune request */ -#define SNDRV_SEQ_EVENT_RESET 41 /* reset to power-on state */ -#define SNDRV_SEQ_EVENT_SENSING 42 /* "active sensing" event */ - -/** echo back, kernel private messages - * event data type = any type - */ -#define SNDRV_SEQ_EVENT_ECHO 50 /* echo event */ -#define SNDRV_SEQ_EVENT_OSS 51 /* OSS raw event */ - -/** system status messages (broadcast for subscribers) - * event data type = snd_seq_addr - */ -#define SNDRV_SEQ_EVENT_CLIENT_START 60 /* new client has connected */ -#define SNDRV_SEQ_EVENT_CLIENT_EXIT 61 /* client has left the system */ -#define SNDRV_SEQ_EVENT_CLIENT_CHANGE 62 /* client status/info has changed */ -#define SNDRV_SEQ_EVENT_PORT_START 63 /* new port was created */ -#define SNDRV_SEQ_EVENT_PORT_EXIT 64 /* port was deleted from system */ -#define SNDRV_SEQ_EVENT_PORT_CHANGE 65 /* port status/info has changed */ - -/** port connection changes - * event data type = snd_seq_connect - */ -#define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED 66 /* ports connected */ -#define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67 /* ports disconnected */ - -/* 70-89: synthesizer events - obsoleted */ - -/** user-defined events with fixed length - * event data type = any - */ -#define SNDRV_SEQ_EVENT_USR0 90 -#define SNDRV_SEQ_EVENT_USR1 91 -#define SNDRV_SEQ_EVENT_USR2 92 -#define SNDRV_SEQ_EVENT_USR3 93 -#define SNDRV_SEQ_EVENT_USR4 94 -#define SNDRV_SEQ_EVENT_USR5 95 -#define SNDRV_SEQ_EVENT_USR6 96 -#define SNDRV_SEQ_EVENT_USR7 97 -#define SNDRV_SEQ_EVENT_USR8 98 -#define SNDRV_SEQ_EVENT_USR9 99 - -/* 100-118: instrument layer - obsoleted */ -/* 119-129: reserved */ - -/* 130-139: variable length events - * event data type = snd_seq_ev_ext - * (SNDRV_SEQ_EVENT_LENGTH_VARIABLE must be set) - */ -#define SNDRV_SEQ_EVENT_SYSEX 130 /* system exclusive data (variable length) */ -#define SNDRV_SEQ_EVENT_BOUNCE 131 /* error event */ -/* 132-134: reserved */ -#define SNDRV_SEQ_EVENT_USR_VAR0 135 -#define SNDRV_SEQ_EVENT_USR_VAR1 136 -#define SNDRV_SEQ_EVENT_USR_VAR2 137 -#define SNDRV_SEQ_EVENT_USR_VAR3 138 -#define SNDRV_SEQ_EVENT_USR_VAR4 139 - -/* 150-151: kernel events with quote - DO NOT use in user clients */ -#define SNDRV_SEQ_EVENT_KERNEL_ERROR 150 -#define SNDRV_SEQ_EVENT_KERNEL_QUOTE 151 /* obsolete */ - -/* 152-191: reserved */ - -/* 192-254: hardware specific events */ - -/* 255: special event */ -#define SNDRV_SEQ_EVENT_NONE 255 - - -typedef unsigned char snd_seq_event_type_t; - -/** event address */ -struct snd_seq_addr { - unsigned char client; /**< Client number: 0..255, 255 = broadcast to all clients */ - unsigned char port; /**< Port within client: 0..255, 255 = broadcast to all ports */ -}; - -/** port connection */ -struct snd_seq_connect { - struct snd_seq_addr sender; - struct snd_seq_addr dest; -}; - - -#define SNDRV_SEQ_ADDRESS_UNKNOWN 253 /* unknown source */ -#define SNDRV_SEQ_ADDRESS_SUBSCRIBERS 254 /* send event to all subscribed ports */ -#define SNDRV_SEQ_ADDRESS_BROADCAST 255 /* send event to all queues/clients/ports/channels */ -#define SNDRV_SEQ_QUEUE_DIRECT 253 /* direct dispatch */ - - /* event mode flag - NOTE: only 8 bits available! */ -#define SNDRV_SEQ_TIME_STAMP_TICK (0<<0) /* timestamp in clock ticks */ -#define SNDRV_SEQ_TIME_STAMP_REAL (1<<0) /* timestamp in real time */ -#define SNDRV_SEQ_TIME_STAMP_MASK (1<<0) - -#define SNDRV_SEQ_TIME_MODE_ABS (0<<1) /* absolute timestamp */ -#define SNDRV_SEQ_TIME_MODE_REL (1<<1) /* relative to current time */ -#define SNDRV_SEQ_TIME_MODE_MASK (1<<1) - -#define SNDRV_SEQ_EVENT_LENGTH_FIXED (0<<2) /* fixed event size */ -#define SNDRV_SEQ_EVENT_LENGTH_VARIABLE (1<<2) /* variable event size */ -#define SNDRV_SEQ_EVENT_LENGTH_VARUSR (2<<2) /* variable event size - user memory space */ -#define SNDRV_SEQ_EVENT_LENGTH_MASK (3<<2) - -#define SNDRV_SEQ_PRIORITY_NORMAL (0<<4) /* normal priority */ -#define SNDRV_SEQ_PRIORITY_HIGH (1<<4) /* event should be processed before others */ -#define SNDRV_SEQ_PRIORITY_MASK (1<<4) - - - /* note event */ -struct snd_seq_ev_note { - unsigned char channel; - unsigned char note; - unsigned char velocity; - unsigned char off_velocity; /* only for SNDRV_SEQ_EVENT_NOTE */ - unsigned int duration; /* only for SNDRV_SEQ_EVENT_NOTE */ -}; - - /* controller event */ -struct snd_seq_ev_ctrl { - unsigned char channel; - unsigned char unused1, unused2, unused3; /* pad */ - unsigned int param; - signed int value; -}; - - /* generic set of bytes (12x8 bit) */ -struct snd_seq_ev_raw8 { - unsigned char d[12]; /* 8 bit value */ -}; - - /* generic set of integers (3x32 bit) */ -struct snd_seq_ev_raw32 { - unsigned int d[3]; /* 32 bit value */ -}; - - /* external stored data */ -struct snd_seq_ev_ext { - unsigned int len; /* length of data */ - void *ptr; /* pointer to data (note: maybe 64-bit) */ -} __attribute__((packed)); - -struct snd_seq_result { - int event; /* processed event type */ - int result; -}; - - -struct snd_seq_real_time { - unsigned int tv_sec; /* seconds */ - unsigned int tv_nsec; /* nanoseconds */ -}; - -typedef unsigned int snd_seq_tick_time_t; /* midi ticks */ - -union snd_seq_timestamp { - snd_seq_tick_time_t tick; - struct snd_seq_real_time time; -}; - -struct snd_seq_queue_skew { - unsigned int value; - unsigned int base; -}; - - /* queue timer control */ -struct snd_seq_ev_queue_control { - unsigned char queue; /* affected queue */ - unsigned char pad[3]; /* reserved */ - union { - signed int value; /* affected value (e.g. tempo) */ - union snd_seq_timestamp time; /* time */ - unsigned int position; /* sync position */ - struct snd_seq_queue_skew skew; - unsigned int d32[2]; - unsigned char d8[8]; - } param; -}; - - /* quoted event - inside the kernel only */ -struct snd_seq_ev_quote { - struct snd_seq_addr origin; /* original sender */ - unsigned short value; /* optional data */ - struct snd_seq_event *event; /* quoted event */ -} __attribute__((packed)); - - - /* sequencer event */ -struct snd_seq_event { - snd_seq_event_type_t type; /* event type */ - unsigned char flags; /* event flags */ - char tag; - - unsigned char queue; /* schedule queue */ - union snd_seq_timestamp time; /* schedule time */ - - - struct snd_seq_addr source; /* source address */ - struct snd_seq_addr dest; /* destination address */ - - union { /* event data... */ - struct snd_seq_ev_note note; - struct snd_seq_ev_ctrl control; - struct snd_seq_ev_raw8 raw8; - struct snd_seq_ev_raw32 raw32; - struct snd_seq_ev_ext ext; - struct snd_seq_ev_queue_control queue; - union snd_seq_timestamp time; - struct snd_seq_addr addr; - struct snd_seq_connect connect; - struct snd_seq_result result; - struct snd_seq_ev_quote quote; - } data; -}; - - -/* - * bounce event - stored as variable size data - */ -struct snd_seq_event_bounce { - int err; - struct snd_seq_event event; - /* external data follows here. */ -}; - - - /* system information */ -struct snd_seq_system_info { - int queues; /* maximum queues count */ - int clients; /* maximum clients count */ - int ports; /* maximum ports per client */ - int channels; /* maximum channels per port */ - int cur_clients; /* current clients */ - int cur_queues; /* current queues */ - char reserved[24]; -}; - - - /* system running information */ -struct snd_seq_running_info { - unsigned char client; /* client id */ - unsigned char big_endian; /* 1 = big-endian */ - unsigned char cpu_mode; /* 4 = 32bit, 8 = 64bit */ - unsigned char pad; /* reserved */ - unsigned char reserved[12]; -}; - - - /* known client numbers */ -#define SNDRV_SEQ_CLIENT_SYSTEM 0 - /* internal client numbers */ -#define SNDRV_SEQ_CLIENT_DUMMY 14 /* midi through */ -#define SNDRV_SEQ_CLIENT_OSS 15 /* oss sequencer emulator */ - - - /* client types */ -typedef int __bitwise snd_seq_client_type_t; -#define NO_CLIENT ((snd_seq_client_type_t) 0) -#define USER_CLIENT ((snd_seq_client_type_t) 1) -#define KERNEL_CLIENT ((snd_seq_client_type_t) 2) - - /* event filter flags */ -#define SNDRV_SEQ_FILTER_BROADCAST (1<<0) /* accept broadcast messages */ -#define SNDRV_SEQ_FILTER_MULTICAST (1<<1) /* accept multicast messages */ -#define SNDRV_SEQ_FILTER_BOUNCE (1<<2) /* accept bounce event in error */ -#define SNDRV_SEQ_FILTER_USE_EVENT (1<<31) /* use event filter */ - -struct snd_seq_client_info { - int client; /* client number to inquire */ - snd_seq_client_type_t type; /* client type */ - char name[64]; /* client name */ - unsigned int filter; /* filter flags */ - unsigned char multicast_filter[8]; /* multicast filter bitmap */ - unsigned char event_filter[32]; /* event filter bitmap */ - int num_ports; /* RO: number of ports */ - int event_lost; /* number of lost events */ - int card; /* RO: card number[kernel] */ - int pid; /* RO: pid[user] */ - char reserved[56]; /* for future use */ -}; - - -/* client pool size */ -struct snd_seq_client_pool { - int client; /* client number to inquire */ - int output_pool; /* outgoing (write) pool size */ - int input_pool; /* incoming (read) pool size */ - int output_room; /* minimum free pool size for select/blocking mode */ - int output_free; /* unused size */ - int input_free; /* unused size */ - char reserved[64]; -}; - - -/* Remove events by specified criteria */ - -#define SNDRV_SEQ_REMOVE_INPUT (1<<0) /* Flush input queues */ -#define SNDRV_SEQ_REMOVE_OUTPUT (1<<1) /* Flush output queues */ -#define SNDRV_SEQ_REMOVE_DEST (1<<2) /* Restrict by destination q:client:port */ -#define SNDRV_SEQ_REMOVE_DEST_CHANNEL (1<<3) /* Restrict by channel */ -#define SNDRV_SEQ_REMOVE_TIME_BEFORE (1<<4) /* Restrict to before time */ -#define SNDRV_SEQ_REMOVE_TIME_AFTER (1<<5) /* Restrict to time or after */ -#define SNDRV_SEQ_REMOVE_TIME_TICK (1<<6) /* Time is in ticks */ -#define SNDRV_SEQ_REMOVE_EVENT_TYPE (1<<7) /* Restrict to event type */ -#define SNDRV_SEQ_REMOVE_IGNORE_OFF (1<<8) /* Do not flush off events */ -#define SNDRV_SEQ_REMOVE_TAG_MATCH (1<<9) /* Restrict to events with given tag */ - -struct snd_seq_remove_events { - unsigned int remove_mode; /* Flags that determine what gets removed */ - - union snd_seq_timestamp time; - - unsigned char queue; /* Queue for REMOVE_DEST */ - struct snd_seq_addr dest; /* Address for REMOVE_DEST */ - unsigned char channel; /* Channel for REMOVE_DEST */ - - int type; /* For REMOVE_EVENT_TYPE */ - char tag; /* Tag for REMOVE_TAG */ - - int reserved[10]; /* To allow for future binary compatibility */ - -}; - - - /* known port numbers */ -#define SNDRV_SEQ_PORT_SYSTEM_TIMER 0 -#define SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE 1 - - /* port capabilities (32 bits) */ -#define SNDRV_SEQ_PORT_CAP_READ (1<<0) /* readable from this port */ -#define SNDRV_SEQ_PORT_CAP_WRITE (1<<1) /* writable to this port */ - -#define SNDRV_SEQ_PORT_CAP_SYNC_READ (1<<2) -#define SNDRV_SEQ_PORT_CAP_SYNC_WRITE (1<<3) - -#define SNDRV_SEQ_PORT_CAP_DUPLEX (1<<4) - -#define SNDRV_SEQ_PORT_CAP_SUBS_READ (1<<5) /* allow read subscription */ -#define SNDRV_SEQ_PORT_CAP_SUBS_WRITE (1<<6) /* allow write subscription */ -#define SNDRV_SEQ_PORT_CAP_NO_EXPORT (1<<7) /* routing not allowed */ - - /* port type */ -#define SNDRV_SEQ_PORT_TYPE_SPECIFIC (1<<0) /* hardware specific */ -#define SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC (1<<1) /* generic MIDI device */ -#define SNDRV_SEQ_PORT_TYPE_MIDI_GM (1<<2) /* General MIDI compatible device */ -#define SNDRV_SEQ_PORT_TYPE_MIDI_GS (1<<3) /* GS compatible device */ -#define SNDRV_SEQ_PORT_TYPE_MIDI_XG (1<<4) /* XG compatible device */ -#define SNDRV_SEQ_PORT_TYPE_MIDI_MT32 (1<<5) /* MT-32 compatible device */ -#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2 (1<<6) /* General MIDI 2 compatible device */ - -/* other standards...*/ -#define SNDRV_SEQ_PORT_TYPE_SYNTH (1<<10) /* Synth device (no MIDI compatible - direct wavetable) */ -#define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11) /* Sampling device (support sample download) */ -#define SNDRV_SEQ_PORT_TYPE_SAMPLE (1<<12) /* Sampling device (sample can be downloaded at any time) */ -/*...*/ -#define SNDRV_SEQ_PORT_TYPE_HARDWARE (1<<16) /* driver for a hardware device */ -#define SNDRV_SEQ_PORT_TYPE_SOFTWARE (1<<17) /* implemented in software */ -#define SNDRV_SEQ_PORT_TYPE_SYNTHESIZER (1<<18) /* generates sound */ -#define SNDRV_SEQ_PORT_TYPE_PORT (1<<19) /* connects to other device(s) */ -#define SNDRV_SEQ_PORT_TYPE_APPLICATION (1<<20) /* application (sequencer/editor) */ - -/* misc. conditioning flags */ -#define SNDRV_SEQ_PORT_FLG_GIVEN_PORT (1<<0) -#define SNDRV_SEQ_PORT_FLG_TIMESTAMP (1<<1) -#define SNDRV_SEQ_PORT_FLG_TIME_REAL (1<<2) - -struct snd_seq_port_info { - struct snd_seq_addr addr; /* client/port numbers */ - char name[64]; /* port name */ - - unsigned int capability; /* port capability bits */ - unsigned int type; /* port type bits */ - int midi_channels; /* channels per MIDI port */ - int midi_voices; /* voices per MIDI port */ - int synth_voices; /* voices per SYNTH port */ - - int read_use; /* R/O: subscribers for output (from this port) */ - int write_use; /* R/O: subscribers for input (to this port) */ - - void *kernel; /* reserved for kernel use (must be NULL) */ - unsigned int flags; /* misc. conditioning */ - unsigned char time_queue; /* queue # for timestamping */ - char reserved[59]; /* for future use */ -}; - - -/* queue flags */ -#define SNDRV_SEQ_QUEUE_FLG_SYNC (1<<0) /* sync enabled */ - -/* queue information */ -struct snd_seq_queue_info { - int queue; /* queue id */ - - /* - * security settings, only owner of this queue can start/stop timer - * etc. if the queue is locked for other clients - */ - int owner; /* client id for owner of the queue */ - unsigned locked:1; /* timing queue locked for other queues */ - char name[64]; /* name of this queue */ - unsigned int flags; /* flags */ - char reserved[60]; /* for future use */ - -}; - -/* queue info/status */ -struct snd_seq_queue_status { - int queue; /* queue id */ - int events; /* read-only - queue size */ - snd_seq_tick_time_t tick; /* current tick */ - struct snd_seq_real_time time; /* current time */ - int running; /* running state of queue */ - int flags; /* various flags */ - char reserved[64]; /* for the future */ -}; - - -/* queue tempo */ -struct snd_seq_queue_tempo { - int queue; /* sequencer queue */ - unsigned int tempo; /* current tempo, us/tick */ - int ppq; /* time resolution, ticks/quarter */ - unsigned int skew_value; /* queue skew */ - unsigned int skew_base; /* queue skew base */ - char reserved[24]; /* for the future */ -}; - - -/* sequencer timer sources */ -#define SNDRV_SEQ_TIMER_ALSA 0 /* ALSA timer */ -#define SNDRV_SEQ_TIMER_MIDI_CLOCK 1 /* Midi Clock (CLOCK event) */ -#define SNDRV_SEQ_TIMER_MIDI_TICK 2 /* Midi Timer Tick (TICK event) */ - -/* queue timer info */ -struct snd_seq_queue_timer { - int queue; /* sequencer queue */ - int type; /* source timer type */ - union { - struct { - struct snd_timer_id id; /* ALSA's timer ID */ - unsigned int resolution; /* resolution in Hz */ - } alsa; - } u; - char reserved[64]; /* for the future use */ -}; - - -struct snd_seq_queue_client { - int queue; /* sequencer queue */ - int client; /* sequencer client */ - int used; /* queue is used with this client - (must be set for accepting events) */ - /* per client watermarks */ - char reserved[64]; /* for future use */ -}; - - -#define SNDRV_SEQ_PORT_SUBS_EXCLUSIVE (1<<0) /* exclusive connection */ -#define SNDRV_SEQ_PORT_SUBS_TIMESTAMP (1<<1) -#define SNDRV_SEQ_PORT_SUBS_TIME_REAL (1<<2) - -struct snd_seq_port_subscribe { - struct snd_seq_addr sender; /* sender address */ - struct snd_seq_addr dest; /* destination address */ - unsigned int voices; /* number of voices to be allocated (0 = don't care) */ - unsigned int flags; /* modes */ - unsigned char queue; /* input time-stamp queue (optional) */ - unsigned char pad[3]; /* reserved */ - char reserved[64]; -}; - -/* type of query subscription */ -#define SNDRV_SEQ_QUERY_SUBS_READ 0 -#define SNDRV_SEQ_QUERY_SUBS_WRITE 1 - -struct snd_seq_query_subs { - struct snd_seq_addr root; /* client/port id to be searched */ - int type; /* READ or WRITE */ - int index; /* 0..N-1 */ - int num_subs; /* R/O: number of subscriptions on this port */ - struct snd_seq_addr addr; /* R/O: result */ - unsigned char queue; /* R/O: result */ - unsigned int flags; /* R/O: result */ - char reserved[64]; /* for future use */ -}; - - -/* - * IOCTL commands - */ - -#define SNDRV_SEQ_IOCTL_PVERSION _IOR ('S', 0x00, int) -#define SNDRV_SEQ_IOCTL_CLIENT_ID _IOR ('S', 0x01, int) -#define SNDRV_SEQ_IOCTL_SYSTEM_INFO _IOWR('S', 0x02, struct snd_seq_system_info) -#define SNDRV_SEQ_IOCTL_RUNNING_MODE _IOWR('S', 0x03, struct snd_seq_running_info) - -#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO _IOWR('S', 0x10, struct snd_seq_client_info) -#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO _IOW ('S', 0x11, struct snd_seq_client_info) - -#define SNDRV_SEQ_IOCTL_CREATE_PORT _IOWR('S', 0x20, struct snd_seq_port_info) -#define SNDRV_SEQ_IOCTL_DELETE_PORT _IOW ('S', 0x21, struct snd_seq_port_info) -#define SNDRV_SEQ_IOCTL_GET_PORT_INFO _IOWR('S', 0x22, struct snd_seq_port_info) -#define SNDRV_SEQ_IOCTL_SET_PORT_INFO _IOW ('S', 0x23, struct snd_seq_port_info) - -#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT _IOW ('S', 0x30, struct snd_seq_port_subscribe) -#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct snd_seq_port_subscribe) - -#define SNDRV_SEQ_IOCTL_CREATE_QUEUE _IOWR('S', 0x32, struct snd_seq_queue_info) -#define SNDRV_SEQ_IOCTL_DELETE_QUEUE _IOW ('S', 0x33, struct snd_seq_queue_info) -#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO _IOWR('S', 0x34, struct snd_seq_queue_info) -#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO _IOWR('S', 0x35, struct snd_seq_queue_info) -#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE _IOWR('S', 0x36, struct snd_seq_queue_info) -#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status) -#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct snd_seq_queue_tempo) -#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW ('S', 0x42, struct snd_seq_queue_tempo) -#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct snd_seq_queue_timer) -#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW ('S', 0x46, struct snd_seq_queue_timer) -#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct snd_seq_queue_client) -#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW ('S', 0x4a, struct snd_seq_queue_client) -#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct snd_seq_client_pool) -#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL _IOW ('S', 0x4c, struct snd_seq_client_pool) -#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS _IOW ('S', 0x4e, struct snd_seq_remove_events) -#define SNDRV_SEQ_IOCTL_QUERY_SUBS _IOWR('S', 0x4f, struct snd_seq_query_subs) -#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION _IOWR('S', 0x50, struct snd_seq_port_subscribe) -#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT _IOWR('S', 0x51, struct snd_seq_client_info) -#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT _IOWR('S', 0x52, struct snd_seq_port_info) - -#endif /* __SOUND_ASEQUENCER_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/asoc.h b/lib/libc/include/generic-musl/sound/asoc.h deleted file mode 100644 index 0bc26dbb4d..0000000000 --- a/lib/libc/include/generic-musl/sound/asoc.h +++ /dev/null @@ -1,633 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * uapi/sound/asoc.h -- ALSA SoC Firmware Controls and DAPM - * - * Copyright (C) 2012 Texas Instruments Inc. - * Copyright (C) 2015 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Simple file API to load FW that includes mixers, coefficients, DAPM graphs, - * algorithms, equalisers, DAIs, widgets etc. -*/ - -#ifndef __LINUX_UAPI_SND_ASOC_H -#define __LINUX_UAPI_SND_ASOC_H - -#include -#include - -/* - * Maximum number of channels topology kcontrol can represent. - */ -#define SND_SOC_TPLG_MAX_CHAN 8 - -/* - * Maximum number of PCM formats capability - */ -#define SND_SOC_TPLG_MAX_FORMATS 16 - -/* - * Maximum number of PCM stream configs - */ -#define SND_SOC_TPLG_STREAM_CONFIG_MAX 8 - -/* - * Maximum number of physical link's hardware configs - */ -#define SND_SOC_TPLG_HW_CONFIG_MAX 8 - -/* individual kcontrol info types - can be mixed with other types */ -#define SND_SOC_TPLG_CTL_VOLSW 1 -#define SND_SOC_TPLG_CTL_VOLSW_SX 2 -#define SND_SOC_TPLG_CTL_VOLSW_XR_SX 3 -#define SND_SOC_TPLG_CTL_ENUM 4 -#define SND_SOC_TPLG_CTL_BYTES 5 -#define SND_SOC_TPLG_CTL_ENUM_VALUE 6 -#define SND_SOC_TPLG_CTL_RANGE 7 -#define SND_SOC_TPLG_CTL_STROBE 8 - - -/* individual widget kcontrol info types - can be mixed with other types */ -#define SND_SOC_TPLG_DAPM_CTL_VOLSW 64 -#define SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE 65 -#define SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT 66 -#define SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE 67 -#define SND_SOC_TPLG_DAPM_CTL_PIN 68 - -/* DAPM widget types - add new items to the end */ -#define SND_SOC_TPLG_DAPM_INPUT 0 -#define SND_SOC_TPLG_DAPM_OUTPUT 1 -#define SND_SOC_TPLG_DAPM_MUX 2 -#define SND_SOC_TPLG_DAPM_MIXER 3 -#define SND_SOC_TPLG_DAPM_PGA 4 -#define SND_SOC_TPLG_DAPM_OUT_DRV 5 -#define SND_SOC_TPLG_DAPM_ADC 6 -#define SND_SOC_TPLG_DAPM_DAC 7 -#define SND_SOC_TPLG_DAPM_SWITCH 8 -#define SND_SOC_TPLG_DAPM_PRE 9 -#define SND_SOC_TPLG_DAPM_POST 10 -#define SND_SOC_TPLG_DAPM_AIF_IN 11 -#define SND_SOC_TPLG_DAPM_AIF_OUT 12 -#define SND_SOC_TPLG_DAPM_DAI_IN 13 -#define SND_SOC_TPLG_DAPM_DAI_OUT 14 -#define SND_SOC_TPLG_DAPM_DAI_LINK 15 -#define SND_SOC_TPLG_DAPM_BUFFER 16 -#define SND_SOC_TPLG_DAPM_SCHEDULER 17 -#define SND_SOC_TPLG_DAPM_EFFECT 18 -#define SND_SOC_TPLG_DAPM_SIGGEN 19 -#define SND_SOC_TPLG_DAPM_SRC 20 -#define SND_SOC_TPLG_DAPM_ASRC 21 -#define SND_SOC_TPLG_DAPM_ENCODER 22 -#define SND_SOC_TPLG_DAPM_DECODER 23 -#define SND_SOC_TPLG_DAPM_LAST SND_SOC_TPLG_DAPM_DECODER - -/* Header magic number and string sizes */ -#define SND_SOC_TPLG_MAGIC 0x41536F43 /* ASoC */ - -/* string sizes */ -#define SND_SOC_TPLG_NUM_TEXTS 16 - -/* ABI version */ -#define SND_SOC_TPLG_ABI_VERSION 0x5 /* current version */ -#define SND_SOC_TPLG_ABI_VERSION_MIN 0x4 /* oldest version supported */ - -/* Max size of TLV data */ -#define SND_SOC_TPLG_TLV_SIZE 32 - -/* - * File and Block header data types. - * Add new generic and vendor types to end of list. - * Generic types are handled by the core whilst vendors types are passed - * to the component drivers for handling. - */ -#define SND_SOC_TPLG_TYPE_MIXER 1 -#define SND_SOC_TPLG_TYPE_BYTES 2 -#define SND_SOC_TPLG_TYPE_ENUM 3 -#define SND_SOC_TPLG_TYPE_DAPM_GRAPH 4 -#define SND_SOC_TPLG_TYPE_DAPM_WIDGET 5 -#define SND_SOC_TPLG_TYPE_DAI_LINK 6 -#define SND_SOC_TPLG_TYPE_PCM 7 -#define SND_SOC_TPLG_TYPE_MANIFEST 8 -#define SND_SOC_TPLG_TYPE_CODEC_LINK 9 -#define SND_SOC_TPLG_TYPE_BACKEND_LINK 10 -#define SND_SOC_TPLG_TYPE_PDATA 11 -#define SND_SOC_TPLG_TYPE_DAI 12 -#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_DAI - -/* vendor block IDs - please add new vendor types to end */ -#define SND_SOC_TPLG_TYPE_VENDOR_FW 1000 -#define SND_SOC_TPLG_TYPE_VENDOR_CONFIG 1001 -#define SND_SOC_TPLG_TYPE_VENDOR_COEFF 1002 -#define SND_SOC_TPLG_TYPEVENDOR_CODEC 1003 - -#define SND_SOC_TPLG_STREAM_PLAYBACK 0 -#define SND_SOC_TPLG_STREAM_CAPTURE 1 - -/* vendor tuple types */ -#define SND_SOC_TPLG_TUPLE_TYPE_UUID 0 -#define SND_SOC_TPLG_TUPLE_TYPE_STRING 1 -#define SND_SOC_TPLG_TUPLE_TYPE_BOOL 2 -#define SND_SOC_TPLG_TUPLE_TYPE_BYTE 3 -#define SND_SOC_TPLG_TUPLE_TYPE_WORD 4 -#define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5 - -/* DAI flags */ -#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES (1 << 0) -#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS (1 << 1) -#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2) - -/* DAI clock gating */ -#define SND_SOC_TPLG_DAI_CLK_GATE_UNDEFINED 0 -#define SND_SOC_TPLG_DAI_CLK_GATE_GATED 1 -#define SND_SOC_TPLG_DAI_CLK_GATE_CONT 2 - -/* DAI mclk_direction */ -#define SND_SOC_TPLG_MCLK_CO 0 /* for codec, mclk is output */ -#define SND_SOC_TPLG_MCLK_CI 1 /* for codec, mclk is input */ - -/* DAI physical PCM data formats. - * Add new formats to the end of the list. - */ -#define SND_SOC_DAI_FORMAT_I2S 1 /* I2S mode */ -#define SND_SOC_DAI_FORMAT_RIGHT_J 2 /* Right Justified mode */ -#define SND_SOC_DAI_FORMAT_LEFT_J 3 /* Left Justified mode */ -#define SND_SOC_DAI_FORMAT_DSP_A 4 /* L data MSB after FRM LRC */ -#define SND_SOC_DAI_FORMAT_DSP_B 5 /* L data MSB during FRM LRC */ -#define SND_SOC_DAI_FORMAT_AC97 6 /* AC97 */ -#define SND_SOC_DAI_FORMAT_PDM 7 /* Pulse density modulation */ - -/* left and right justified also known as MSB and LSB respectively */ -#define SND_SOC_DAI_FORMAT_MSB SND_SOC_DAI_FORMAT_LEFT_J -#define SND_SOC_DAI_FORMAT_LSB SND_SOC_DAI_FORMAT_RIGHT_J - -/* DAI link flags */ -#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES (1 << 0) -#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS (1 << 1) -#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2) -#define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP (1 << 3) - -/* DAI topology BCLK parameter - * For the backwards capability, by default codec is bclk master - */ -#define SND_SOC_TPLG_BCLK_CM 0 /* codec is bclk master */ -#define SND_SOC_TPLG_BCLK_CS 1 /* codec is bclk slave */ - -/* DAI topology FSYNC parameter - * For the backwards capability, by default codec is fsync master - */ -#define SND_SOC_TPLG_FSYNC_CM 0 /* codec is fsync master */ -#define SND_SOC_TPLG_FSYNC_CS 1 /* codec is fsync slave */ - -/* - * Block Header. - * This header precedes all object and object arrays below. - */ -struct snd_soc_tplg_hdr { - __le32 magic; /* magic number */ - __le32 abi; /* ABI version */ - __le32 version; /* optional vendor specific version details */ - __le32 type; /* SND_SOC_TPLG_TYPE_ */ - __le32 size; /* size of this structure */ - __le32 vendor_type; /* optional vendor specific type info */ - __le32 payload_size; /* data bytes, excluding this header */ - __le32 index; /* identifier for block */ - __le32 count; /* number of elements in block */ -} __attribute__((packed)); - -/* vendor tuple for uuid */ -struct snd_soc_tplg_vendor_uuid_elem { - __le32 token; - char uuid[16]; -} __attribute__((packed)); - -/* vendor tuple for a bool/byte/short/word value */ -struct snd_soc_tplg_vendor_value_elem { - __le32 token; - __le32 value; -} __attribute__((packed)); - -/* vendor tuple for string */ -struct snd_soc_tplg_vendor_string_elem { - __le32 token; - char string[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; -} __attribute__((packed)); - -struct snd_soc_tplg_vendor_array { - __le32 size; /* size in bytes of the array, including all elements */ - __le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */ - __le32 num_elems; /* number of elements in array */ - union { - struct snd_soc_tplg_vendor_uuid_elem uuid[0]; - struct snd_soc_tplg_vendor_value_elem value[0]; - struct snd_soc_tplg_vendor_string_elem string[0]; - }; -} __attribute__((packed)); - -/* - * Private data. - * All topology objects may have private data that can be used by the driver or - * firmware. Core will ignore this data. - */ -struct snd_soc_tplg_private { - __le32 size; /* in bytes of private data */ - union { - char data[0]; - struct snd_soc_tplg_vendor_array array[0]; - }; -} __attribute__((packed)); - -/* - * Kcontrol TLV data. - */ -struct snd_soc_tplg_tlv_dbscale { - __le32 min; - __le32 step; - __le32 mute; -} __attribute__((packed)); - -struct snd_soc_tplg_ctl_tlv { - __le32 size; /* in bytes of this structure */ - __le32 type; /* SNDRV_CTL_TLVT_*, type of TLV */ - union { - __le32 data[SND_SOC_TPLG_TLV_SIZE]; - struct snd_soc_tplg_tlv_dbscale scale; - }; -} __attribute__((packed)); - -/* - * Kcontrol channel data - */ -struct snd_soc_tplg_channel { - __le32 size; /* in bytes of this structure */ - __le32 reg; - __le32 shift; - __le32 id; /* ID maps to Left, Right, LFE etc */ -} __attribute__((packed)); - -/* - * Genericl Operations IDs, for binding Kcontrol or Bytes ext ops - * Kcontrol ops need get/put/info. - * Bytes ext ops need get/put. - */ -struct snd_soc_tplg_io_ops { - __le32 get; - __le32 put; - __le32 info; -} __attribute__((packed)); - -/* - * kcontrol header - */ -struct snd_soc_tplg_ctl_hdr { - __le32 size; /* in bytes of this structure */ - __le32 type; - char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - __le32 access; - struct snd_soc_tplg_io_ops ops; - struct snd_soc_tplg_ctl_tlv tlv; -} __attribute__((packed)); - -/* - * Stream Capabilities - */ -struct snd_soc_tplg_stream_caps { - __le32 size; /* in bytes of this structure */ - char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */ - __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ - __le32 rate_min; /* min rate */ - __le32 rate_max; /* max rate */ - __le32 channels_min; /* min channels */ - __le32 channels_max; /* max channels */ - __le32 periods_min; /* min number of periods */ - __le32 periods_max; /* max number of periods */ - __le32 period_size_min; /* min period size bytes */ - __le32 period_size_max; /* max period size bytes */ - __le32 buffer_size_min; /* min buffer size bytes */ - __le32 buffer_size_max; /* max buffer size bytes */ - __le32 sig_bits; /* number of bits of content */ -} __attribute__((packed)); - -/* - * FE or BE Stream configuration supported by SW/FW - */ -struct snd_soc_tplg_stream { - __le32 size; /* in bytes of this structure */ - char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* Name of the stream */ - __le64 format; /* SNDRV_PCM_FMTBIT_* */ - __le32 rate; /* SNDRV_PCM_RATE_* */ - __le32 period_bytes; /* size of period in bytes */ - __le32 buffer_bytes; /* size of buffer in bytes */ - __le32 channels; /* channels */ -} __attribute__((packed)); - - -/* - * Describes a physical link's runtime supported hardware config, - * i.e. hardware audio formats. - */ -struct snd_soc_tplg_hw_config { - __le32 size; /* in bytes of this structure */ - __le32 id; /* unique ID - - used to match */ - __le32 fmt; /* SND_SOC_DAI_FORMAT_ format value */ - __u8 clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */ - __u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */ - __u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */ - __u8 bclk_master; /* SND_SOC_TPLG_BCLK_ value */ - __u8 fsync_master; /* SND_SOC_TPLG_FSYNC_ value */ - __u8 mclk_direction; /* SND_SOC_TPLG_MCLK_ value */ - __le16 reserved; /* for 32bit alignment */ - __le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */ - __le32 bclk_rate; /* BCLK freqency in Hz */ - __le32 fsync_rate; /* frame clock in Hz */ - __le32 tdm_slots; /* number of TDM slots in use */ - __le32 tdm_slot_width; /* width in bits for each slot */ - __le32 tx_slots; /* bit mask for active Tx slots */ - __le32 rx_slots; /* bit mask for active Rx slots */ - __le32 tx_channels; /* number of Tx channels */ - __le32 tx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */ - __le32 rx_channels; /* number of Rx channels */ - __le32 rx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */ -} __attribute__((packed)); - -/* - * Manifest. List totals for each payload type. Not used in parsing, but will - * be passed to the component driver before any other objects in order for any - * global component resource allocations. - * - * File block representation for manifest :- - * +-----------------------------------+----+ - * | struct snd_soc_tplg_hdr | 1 | - * +-----------------------------------+----+ - * | struct snd_soc_tplg_manifest | 1 | - * +-----------------------------------+----+ - */ -struct snd_soc_tplg_manifest { - __le32 size; /* in bytes of this structure */ - __le32 control_elems; /* number of control elements */ - __le32 widget_elems; /* number of widget elements */ - __le32 graph_elems; /* number of graph elements */ - __le32 pcm_elems; /* number of PCM elements */ - __le32 dai_link_elems; /* number of DAI link elements */ - __le32 dai_elems; /* number of physical DAI elements */ - __le32 reserved[20]; /* reserved for new ABI element types */ - struct snd_soc_tplg_private priv; -} __attribute__((packed)); - -/* - * Mixer kcontrol. - * - * File block representation for mixer kcontrol :- - * +-----------------------------------+----+ - * | struct snd_soc_tplg_hdr | 1 | - * +-----------------------------------+----+ - * | struct snd_soc_tplg_mixer_control | N | - * +-----------------------------------+----+ - */ -struct snd_soc_tplg_mixer_control { - struct snd_soc_tplg_ctl_hdr hdr; - __le32 size; /* in bytes of this structure */ - __le32 min; - __le32 max; - __le32 platform_max; - __le32 invert; - __le32 num_channels; - struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN]; - struct snd_soc_tplg_private priv; -} __attribute__((packed)); - -/* - * Enumerated kcontrol - * - * File block representation for enum kcontrol :- - * +-----------------------------------+----+ - * | struct snd_soc_tplg_hdr | 1 | - * +-----------------------------------+----+ - * | struct snd_soc_tplg_enum_control | N | - * +-----------------------------------+----+ - */ -struct snd_soc_tplg_enum_control { - struct snd_soc_tplg_ctl_hdr hdr; - __le32 size; /* in bytes of this structure */ - __le32 num_channels; - struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN]; - __le32 items; - __le32 mask; - __le32 count; - char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / 4]; - struct snd_soc_tplg_private priv; -} __attribute__((packed)); - -/* - * Bytes kcontrol - * - * File block representation for bytes kcontrol :- - * +-----------------------------------+----+ - * | struct snd_soc_tplg_hdr | 1 | - * +-----------------------------------+----+ - * | struct snd_soc_tplg_bytes_control | N | - * +-----------------------------------+----+ - */ -struct snd_soc_tplg_bytes_control { - struct snd_soc_tplg_ctl_hdr hdr; - __le32 size; /* in bytes of this structure */ - __le32 max; - __le32 mask; - __le32 base; - __le32 num_regs; - struct snd_soc_tplg_io_ops ext_ops; - struct snd_soc_tplg_private priv; -} __attribute__((packed)); - -/* - * DAPM Graph Element - * - * File block representation for DAPM graph elements :- - * +-------------------------------------+----+ - * | struct snd_soc_tplg_hdr | 1 | - * +-------------------------------------+----+ - * | struct snd_soc_tplg_dapm_graph_elem | N | - * +-------------------------------------+----+ - */ -struct snd_soc_tplg_dapm_graph_elem { - char sink[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - char control[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - char source[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; -} __attribute__((packed)); - -/* - * DAPM Widget. - * - * File block representation for DAPM widget :- - * +-------------------------------------+-----+ - * | struct snd_soc_tplg_hdr | 1 | - * +-------------------------------------+-----+ - * | struct snd_soc_tplg_dapm_widget | N | - * +-------------------------------------+-----+ - * | struct snd_soc_tplg_enum_control | 0|1 | - * | struct snd_soc_tplg_mixer_control | 0|N | - * +-------------------------------------+-----+ - * - * Optional enum or mixer control can be appended to the end of each widget - * in the block. - */ -struct snd_soc_tplg_dapm_widget { - __le32 size; /* in bytes of this structure */ - __le32 id; /* SND_SOC_DAPM_CTL */ - char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - char sname[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - - __le32 reg; /* negative reg = no direct dapm */ - __le32 shift; /* bits to shift */ - __le32 mask; /* non-shifted mask */ - __le32 subseq; /* sort within widget type */ - __le32 invert; /* invert the power bit */ - __le32 ignore_suspend; /* kept enabled over suspend */ - __le16 event_flags; - __le16 event_type; - __le32 num_kcontrols; - struct snd_soc_tplg_private priv; - /* - * kcontrols that relate to this widget - * follow here after widget private data - */ -} __attribute__((packed)); - - -/* - * Describes SW/FW specific features of PCM (FE DAI & DAI link). - * - * File block representation for PCM :- - * +-----------------------------------+-----+ - * | struct snd_soc_tplg_hdr | 1 | - * +-----------------------------------+-----+ - * | struct snd_soc_tplg_pcm | N | - * +-----------------------------------+-----+ - */ -struct snd_soc_tplg_pcm { - __le32 size; /* in bytes of this structure */ - char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - __le32 pcm_id; /* unique ID - used to match with DAI link */ - __le32 dai_id; /* unique ID - used to match */ - __le32 playback; /* supports playback mode */ - __le32 capture; /* supports capture mode */ - __le32 compress; /* 1 = compressed; 0 = PCM */ - struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ - __le32 num_streams; /* number of streams */ - struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */ - __le32 flag_mask; /* bitmask of flags to configure */ - __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ - struct snd_soc_tplg_private priv; -} __attribute__((packed)); - - -/* - * Describes the physical link runtime supported configs or params - * - * File block representation for physical link config :- - * +-----------------------------------+-----+ - * | struct snd_soc_tplg_hdr | 1 | - * +-----------------------------------+-----+ - * | struct snd_soc_tplg_link_config | N | - * +-----------------------------------+-----+ - */ -struct snd_soc_tplg_link_config { - __le32 size; /* in bytes of this structure */ - __le32 id; /* unique ID - used to match */ - char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */ - char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* stream name - used to match */ - struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ - __le32 num_streams; /* number of streams */ - struct snd_soc_tplg_hw_config hw_config[SND_SOC_TPLG_HW_CONFIG_MAX]; /* hw configs */ - __le32 num_hw_configs; /* number of hw configs */ - __le32 default_hw_config_id; /* default hw config ID for init */ - __le32 flag_mask; /* bitmask of flags to configure */ - __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ - struct snd_soc_tplg_private priv; -} __attribute__((packed)); - -/* - * Describes SW/FW specific features of physical DAI. - * It can be used to configure backend DAIs for DPCM. - * - * File block representation for physical DAI :- - * +-----------------------------------+-----+ - * | struct snd_soc_tplg_hdr | 1 | - * +-----------------------------------+-----+ - * | struct snd_soc_tplg_dai | N | - * +-----------------------------------+-----+ - */ -struct snd_soc_tplg_dai { - __le32 size; /* in bytes of this structure */ - char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */ - __le32 dai_id; /* unique ID - used to match */ - __le32 playback; /* supports playback mode */ - __le32 capture; /* supports capture mode */ - struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */ - __le32 flag_mask; /* bitmask of flags to configure */ - __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */ - struct snd_soc_tplg_private priv; -} __attribute__((packed)); - -/* - * Old version of ABI structs, supported for backward compatibility. - */ - -/* Manifest v4 */ -struct snd_soc_tplg_manifest_v4 { - __le32 size; /* in bytes of this structure */ - __le32 control_elems; /* number of control elements */ - __le32 widget_elems; /* number of widget elements */ - __le32 graph_elems; /* number of graph elements */ - __le32 pcm_elems; /* number of PCM elements */ - __le32 dai_link_elems; /* number of DAI link elements */ - struct snd_soc_tplg_private priv; -} __attribute__((packed)); - -/* Stream Capabilities v4 */ -struct snd_soc_tplg_stream_caps_v4 { - __le32 size; /* in bytes of this structure */ - char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */ - __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ - __le32 rate_min; /* min rate */ - __le32 rate_max; /* max rate */ - __le32 channels_min; /* min channels */ - __le32 channels_max; /* max channels */ - __le32 periods_min; /* min number of periods */ - __le32 periods_max; /* max number of periods */ - __le32 period_size_min; /* min period size bytes */ - __le32 period_size_max; /* max period size bytes */ - __le32 buffer_size_min; /* min buffer size bytes */ - __le32 buffer_size_max; /* max buffer size bytes */ -} __attribute__((packed)); - -/* PCM v4 */ -struct snd_soc_tplg_pcm_v4 { - __le32 size; /* in bytes of this structure */ - char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - __le32 pcm_id; /* unique ID - used to match with DAI link */ - __le32 dai_id; /* unique ID - used to match */ - __le32 playback; /* supports playback mode */ - __le32 capture; /* supports capture mode */ - __le32 compress; /* 1 = compressed; 0 = PCM */ - struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ - __le32 num_streams; /* number of streams */ - struct snd_soc_tplg_stream_caps_v4 caps[2]; /* playback and capture for DAI */ -} __attribute__((packed)); - -/* Physical link config v4 */ -struct snd_soc_tplg_link_config_v4 { - __le32 size; /* in bytes of this structure */ - __le32 id; /* unique ID - used to match */ - struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ - __le32 num_streams; /* number of streams */ -} __attribute__((packed)); - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/asound.h b/lib/libc/include/generic-musl/sound/asound.h deleted file mode 100644 index 156a3853dc..0000000000 --- a/lib/libc/include/generic-musl/sound/asound.h +++ /dev/null @@ -1,1035 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * Advanced Linux Sound Architecture - ALSA - Driver - * Copyright (c) 1994-2003 by Jaroslav Kysela , - * Abramo Bagnara - * - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef __SOUND_ASOUND_H -#define __SOUND_ASOUND_H - -#if defined(__KERNEL__) || defined(__linux__) -#include -#else -#include -#endif - -#include - -/* - * protocol version - */ - -#define SNDRV_PROTOCOL_VERSION(major, minor, subminor) (((major)<<16)|((minor)<<8)|(subminor)) -#define SNDRV_PROTOCOL_MAJOR(version) (((version)>>16)&0xffff) -#define SNDRV_PROTOCOL_MINOR(version) (((version)>>8)&0xff) -#define SNDRV_PROTOCOL_MICRO(version) ((version)&0xff) -#define SNDRV_PROTOCOL_INCOMPATIBLE(kversion, uversion) \ - (SNDRV_PROTOCOL_MAJOR(kversion) != SNDRV_PROTOCOL_MAJOR(uversion) || \ - (SNDRV_PROTOCOL_MAJOR(kversion) == SNDRV_PROTOCOL_MAJOR(uversion) && \ - SNDRV_PROTOCOL_MINOR(kversion) != SNDRV_PROTOCOL_MINOR(uversion))) - -/**************************************************************************** - * * - * Digital audio interface * - * * - ****************************************************************************/ - -struct snd_aes_iec958 { - unsigned char status[24]; /* AES/IEC958 channel status bits */ - unsigned char subcode[147]; /* AES/IEC958 subcode bits */ - unsigned char pad; /* nothing */ - unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */ -}; - -/**************************************************************************** - * * - * CEA-861 Audio InfoFrame. Used in HDMI and DisplayPort * - * * - ****************************************************************************/ - -struct snd_cea_861_aud_if { - unsigned char db1_ct_cc; /* coding type and channel count */ - unsigned char db2_sf_ss; /* sample frequency and size */ - unsigned char db3; /* not used, all zeros */ - unsigned char db4_ca; /* channel allocation code */ - unsigned char db5_dminh_lsv; /* downmix inhibit & level-shit values */ -}; - -/**************************************************************************** - * * - * Section for driver hardware dependent interface - /dev/snd/hw? * - * * - ****************************************************************************/ - -#define SNDRV_HWDEP_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1) - -enum { - SNDRV_HWDEP_IFACE_OPL2 = 0, - SNDRV_HWDEP_IFACE_OPL3, - SNDRV_HWDEP_IFACE_OPL4, - SNDRV_HWDEP_IFACE_SB16CSP, /* Creative Signal Processor */ - SNDRV_HWDEP_IFACE_EMU10K1, /* FX8010 processor in EMU10K1 chip */ - SNDRV_HWDEP_IFACE_YSS225, /* Yamaha FX processor */ - SNDRV_HWDEP_IFACE_ICS2115, /* Wavetable synth */ - SNDRV_HWDEP_IFACE_SSCAPE, /* Ensoniq SoundScape ISA card (MC68EC000) */ - SNDRV_HWDEP_IFACE_VX, /* Digigram VX cards */ - SNDRV_HWDEP_IFACE_MIXART, /* Digigram miXart cards */ - SNDRV_HWDEP_IFACE_USX2Y, /* Tascam US122, US224 & US428 usb */ - SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, /* EmuX wavetable */ - SNDRV_HWDEP_IFACE_BLUETOOTH, /* Bluetooth audio */ - SNDRV_HWDEP_IFACE_USX2Y_PCM, /* Tascam US122, US224 & US428 rawusb pcm */ - SNDRV_HWDEP_IFACE_PCXHR, /* Digigram PCXHR */ - SNDRV_HWDEP_IFACE_SB_RC, /* SB Extigy/Audigy2NX remote control */ - SNDRV_HWDEP_IFACE_HDA, /* HD-audio */ - SNDRV_HWDEP_IFACE_USB_STREAM, /* direct access to usb stream */ - SNDRV_HWDEP_IFACE_FW_DICE, /* TC DICE FireWire device */ - SNDRV_HWDEP_IFACE_FW_FIREWORKS, /* Echo Audio Fireworks based device */ - SNDRV_HWDEP_IFACE_FW_BEBOB, /* BridgeCo BeBoB based device */ - SNDRV_HWDEP_IFACE_FW_OXFW, /* Oxford OXFW970/971 based device */ - SNDRV_HWDEP_IFACE_FW_DIGI00X, /* Digidesign Digi 002/003 family */ - SNDRV_HWDEP_IFACE_FW_TASCAM, /* TASCAM FireWire series */ - SNDRV_HWDEP_IFACE_LINE6, /* Line6 USB processors */ - SNDRV_HWDEP_IFACE_FW_MOTU, /* MOTU FireWire series */ - SNDRV_HWDEP_IFACE_FW_FIREFACE, /* RME Fireface series */ - - /* Don't forget to change the following: */ - SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_FIREFACE -}; - -struct snd_hwdep_info { - unsigned int device; /* WR: device number */ - int card; /* R: card number */ - unsigned char id[64]; /* ID (user selectable) */ - unsigned char name[80]; /* hwdep name */ - int iface; /* hwdep interface */ - unsigned char reserved[64]; /* reserved for future */ -}; - -/* generic DSP loader */ -struct snd_hwdep_dsp_status { - unsigned int version; /* R: driver-specific version */ - unsigned char id[32]; /* R: driver-specific ID string */ - unsigned int num_dsps; /* R: number of DSP images to transfer */ - unsigned int dsp_loaded; /* R: bit flags indicating the loaded DSPs */ - unsigned int chip_ready; /* R: 1 = initialization finished */ - unsigned char reserved[16]; /* reserved for future use */ -}; - -struct snd_hwdep_dsp_image { - unsigned int index; /* W: DSP index */ - unsigned char name[64]; /* W: ID (e.g. file name) */ - unsigned char *image; /* W: binary image */ - size_t length; /* W: size of image in bytes */ - unsigned long driver_data; /* W: driver-specific data */ -}; - -#define SNDRV_HWDEP_IOCTL_PVERSION _IOR ('H', 0x00, int) -#define SNDRV_HWDEP_IOCTL_INFO _IOR ('H', 0x01, struct snd_hwdep_info) -#define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status) -#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image) - -/***************************************************************************** - * * - * Digital Audio (PCM) interface - /dev/snd/pcm?? * - * * - *****************************************************************************/ - -#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 14) - -typedef unsigned long snd_pcm_uframes_t; -typedef signed long snd_pcm_sframes_t; - -enum { - SNDRV_PCM_CLASS_GENERIC = 0, /* standard mono or stereo device */ - SNDRV_PCM_CLASS_MULTI, /* multichannel device */ - SNDRV_PCM_CLASS_MODEM, /* software modem class */ - SNDRV_PCM_CLASS_DIGITIZER, /* digitizer class */ - /* Don't forget to change the following: */ - SNDRV_PCM_CLASS_LAST = SNDRV_PCM_CLASS_DIGITIZER, -}; - -enum { - SNDRV_PCM_SUBCLASS_GENERIC_MIX = 0, /* mono or stereo subdevices are mixed together */ - SNDRV_PCM_SUBCLASS_MULTI_MIX, /* multichannel subdevices are mixed together */ - /* Don't forget to change the following: */ - SNDRV_PCM_SUBCLASS_LAST = SNDRV_PCM_SUBCLASS_MULTI_MIX, -}; - -enum { - SNDRV_PCM_STREAM_PLAYBACK = 0, - SNDRV_PCM_STREAM_CAPTURE, - SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE, -}; - -typedef int __bitwise snd_pcm_access_t; -#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((snd_pcm_access_t) 0) /* interleaved mmap */ -#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((snd_pcm_access_t) 1) /* noninterleaved mmap */ -#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((snd_pcm_access_t) 2) /* complex mmap */ -#define SNDRV_PCM_ACCESS_RW_INTERLEAVED ((snd_pcm_access_t) 3) /* readi/writei */ -#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((snd_pcm_access_t) 4) /* readn/writen */ -#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED - -typedef int __bitwise snd_pcm_format_t; -#define SNDRV_PCM_FORMAT_S8 ((snd_pcm_format_t) 0) -#define SNDRV_PCM_FORMAT_U8 ((snd_pcm_format_t) 1) -#define SNDRV_PCM_FORMAT_S16_LE ((snd_pcm_format_t) 2) -#define SNDRV_PCM_FORMAT_S16_BE ((snd_pcm_format_t) 3) -#define SNDRV_PCM_FORMAT_U16_LE ((snd_pcm_format_t) 4) -#define SNDRV_PCM_FORMAT_U16_BE ((snd_pcm_format_t) 5) -#define SNDRV_PCM_FORMAT_S24_LE ((snd_pcm_format_t) 6) /* low three bytes */ -#define SNDRV_PCM_FORMAT_S24_BE ((snd_pcm_format_t) 7) /* low three bytes */ -#define SNDRV_PCM_FORMAT_U24_LE ((snd_pcm_format_t) 8) /* low three bytes */ -#define SNDRV_PCM_FORMAT_U24_BE ((snd_pcm_format_t) 9) /* low three bytes */ -#define SNDRV_PCM_FORMAT_S32_LE ((snd_pcm_format_t) 10) -#define SNDRV_PCM_FORMAT_S32_BE ((snd_pcm_format_t) 11) -#define SNDRV_PCM_FORMAT_U32_LE ((snd_pcm_format_t) 12) -#define SNDRV_PCM_FORMAT_U32_BE ((snd_pcm_format_t) 13) -#define SNDRV_PCM_FORMAT_FLOAT_LE ((snd_pcm_format_t) 14) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */ -#define SNDRV_PCM_FORMAT_FLOAT_BE ((snd_pcm_format_t) 15) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */ -#define SNDRV_PCM_FORMAT_FLOAT64_LE ((snd_pcm_format_t) 16) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */ -#define SNDRV_PCM_FORMAT_FLOAT64_BE ((snd_pcm_format_t) 17) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */ -#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((snd_pcm_format_t) 18) /* IEC-958 subframe, Little Endian */ -#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((snd_pcm_format_t) 19) /* IEC-958 subframe, Big Endian */ -#define SNDRV_PCM_FORMAT_MU_LAW ((snd_pcm_format_t) 20) -#define SNDRV_PCM_FORMAT_A_LAW ((snd_pcm_format_t) 21) -#define SNDRV_PCM_FORMAT_IMA_ADPCM ((snd_pcm_format_t) 22) -#define SNDRV_PCM_FORMAT_MPEG ((snd_pcm_format_t) 23) -#define SNDRV_PCM_FORMAT_GSM ((snd_pcm_format_t) 24) -#define SNDRV_PCM_FORMAT_S20_LE ((snd_pcm_format_t) 25) /* in four bytes, LSB justified */ -#define SNDRV_PCM_FORMAT_S20_BE ((snd_pcm_format_t) 26) /* in four bytes, LSB justified */ -#define SNDRV_PCM_FORMAT_U20_LE ((snd_pcm_format_t) 27) /* in four bytes, LSB justified */ -#define SNDRV_PCM_FORMAT_U20_BE ((snd_pcm_format_t) 28) /* in four bytes, LSB justified */ -/* gap in the numbering for a future standard linear format */ -#define SNDRV_PCM_FORMAT_SPECIAL ((snd_pcm_format_t) 31) -#define SNDRV_PCM_FORMAT_S24_3LE ((snd_pcm_format_t) 32) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S24_3BE ((snd_pcm_format_t) 33) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U24_3LE ((snd_pcm_format_t) 34) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U24_3BE ((snd_pcm_format_t) 35) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S20_3LE ((snd_pcm_format_t) 36) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S20_3BE ((snd_pcm_format_t) 37) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U20_3LE ((snd_pcm_format_t) 38) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U20_3BE ((snd_pcm_format_t) 39) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S18_3LE ((snd_pcm_format_t) 40) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S18_3BE ((snd_pcm_format_t) 41) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U18_3LE ((snd_pcm_format_t) 42) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U18_3BE ((snd_pcm_format_t) 43) /* in three bytes */ -#define SNDRV_PCM_FORMAT_G723_24 ((snd_pcm_format_t) 44) /* 8 samples in 3 bytes */ -#define SNDRV_PCM_FORMAT_G723_24_1B ((snd_pcm_format_t) 45) /* 1 sample in 1 byte */ -#define SNDRV_PCM_FORMAT_G723_40 ((snd_pcm_format_t) 46) /* 8 Samples in 5 bytes */ -#define SNDRV_PCM_FORMAT_G723_40_1B ((snd_pcm_format_t) 47) /* 1 sample in 1 byte */ -#define SNDRV_PCM_FORMAT_DSD_U8 ((snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */ -#define SNDRV_PCM_FORMAT_DSD_U16_LE ((snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */ -#define SNDRV_PCM_FORMAT_DSD_U32_LE ((snd_pcm_format_t) 50) /* DSD, 4-byte samples DSD (x32), little endian */ -#define SNDRV_PCM_FORMAT_DSD_U16_BE ((snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */ -#define SNDRV_PCM_FORMAT_DSD_U32_BE ((snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */ -#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE -#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8 - -#ifdef SNDRV_LITTLE_ENDIAN -#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE -#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_LE -#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_LE -#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_LE -#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_LE -#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_LE -#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_LE -#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_LE -#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE -#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_LE -#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_LE -#endif -#ifdef SNDRV_BIG_ENDIAN -#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_BE -#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_BE -#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_BE -#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_BE -#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_BE -#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_BE -#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_BE -#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_BE -#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE -#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_BE -#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_BE -#endif - -typedef int __bitwise snd_pcm_subformat_t; -#define SNDRV_PCM_SUBFORMAT_STD ((snd_pcm_subformat_t) 0) -#define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_STD - -#define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */ -#define SNDRV_PCM_INFO_MMAP_VALID 0x00000002 /* period data are valid during transfer */ -#define SNDRV_PCM_INFO_DOUBLE 0x00000004 /* Double buffering needed for PCM start/stop */ -#define SNDRV_PCM_INFO_BATCH 0x00000010 /* double buffering */ -#define SNDRV_PCM_INFO_SYNC_APPLPTR 0x00000020 /* need the explicit sync of appl_ptr update */ -#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 /* channels are interleaved */ -#define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200 /* channels are not interleaved */ -#define SNDRV_PCM_INFO_COMPLEX 0x00000400 /* complex frame organization (mmap only) */ -#define SNDRV_PCM_INFO_BLOCK_TRANSFER 0x00010000 /* hardware transfer block of samples */ -#define SNDRV_PCM_INFO_OVERRANGE 0x00020000 /* hardware supports ADC (capture) overrange detection */ -#define SNDRV_PCM_INFO_RESUME 0x00040000 /* hardware supports stream resume after suspend */ -#define SNDRV_PCM_INFO_PAUSE 0x00080000 /* pause ioctl is supported */ -#define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 /* only half duplex */ -#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */ -#define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */ -#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000 /* period wakeup can be disabled */ -#define SNDRV_PCM_INFO_HAS_WALL_CLOCK 0x01000000 /* (Deprecated)has audio wall clock for audio/system time sync */ -#define SNDRV_PCM_INFO_HAS_LINK_ATIME 0x01000000 /* report hardware link audio time, reset on startup */ -#define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME 0x02000000 /* report absolute hardware link audio time, not reset on startup */ -#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME 0x04000000 /* report estimated link audio time */ -#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000 /* report synchronized audio/system time */ - -#define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000 /* internal kernel flag - trigger in drain */ -#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */ - - - -typedef int __bitwise snd_pcm_state_t; -#define SNDRV_PCM_STATE_OPEN ((snd_pcm_state_t) 0) /* stream is open */ -#define SNDRV_PCM_STATE_SETUP ((snd_pcm_state_t) 1) /* stream has a setup */ -#define SNDRV_PCM_STATE_PREPARED ((snd_pcm_state_t) 2) /* stream is ready to start */ -#define SNDRV_PCM_STATE_RUNNING ((snd_pcm_state_t) 3) /* stream is running */ -#define SNDRV_PCM_STATE_XRUN ((snd_pcm_state_t) 4) /* stream reached an xrun */ -#define SNDRV_PCM_STATE_DRAINING ((snd_pcm_state_t) 5) /* stream is draining */ -#define SNDRV_PCM_STATE_PAUSED ((snd_pcm_state_t) 6) /* stream is paused */ -#define SNDRV_PCM_STATE_SUSPENDED ((snd_pcm_state_t) 7) /* hardware is suspended */ -#define SNDRV_PCM_STATE_DISCONNECTED ((snd_pcm_state_t) 8) /* hardware is disconnected */ -#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED - -enum { - SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000, - SNDRV_PCM_MMAP_OFFSET_STATUS = 0x80000000, - SNDRV_PCM_MMAP_OFFSET_CONTROL = 0x81000000, -}; - -union snd_pcm_sync_id { - unsigned char id[16]; - unsigned short id16[8]; - unsigned int id32[4]; -}; - -struct snd_pcm_info { - unsigned int device; /* RO/WR (control): device number */ - unsigned int subdevice; /* RO/WR (control): subdevice number */ - int stream; /* RO/WR (control): stream direction */ - int card; /* R: card number */ - unsigned char id[64]; /* ID (user selectable) */ - unsigned char name[80]; /* name of this device */ - unsigned char subname[32]; /* subdevice name */ - int dev_class; /* SNDRV_PCM_CLASS_* */ - int dev_subclass; /* SNDRV_PCM_SUBCLASS_* */ - unsigned int subdevices_count; - unsigned int subdevices_avail; - union snd_pcm_sync_id sync; /* hardware synchronization ID */ - unsigned char reserved[64]; /* reserved for future... */ -}; - -typedef int snd_pcm_hw_param_t; -#define SNDRV_PCM_HW_PARAM_ACCESS 0 /* Access type */ -#define SNDRV_PCM_HW_PARAM_FORMAT 1 /* Format */ -#define SNDRV_PCM_HW_PARAM_SUBFORMAT 2 /* Subformat */ -#define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS -#define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT - -#define SNDRV_PCM_HW_PARAM_SAMPLE_BITS 8 /* Bits per sample */ -#define SNDRV_PCM_HW_PARAM_FRAME_BITS 9 /* Bits per frame */ -#define SNDRV_PCM_HW_PARAM_CHANNELS 10 /* Channels */ -#define SNDRV_PCM_HW_PARAM_RATE 11 /* Approx rate */ -#define SNDRV_PCM_HW_PARAM_PERIOD_TIME 12 /* Approx distance between - * interrupts in us - */ -#define SNDRV_PCM_HW_PARAM_PERIOD_SIZE 13 /* Approx frames between - * interrupts - */ -#define SNDRV_PCM_HW_PARAM_PERIOD_BYTES 14 /* Approx bytes between - * interrupts - */ -#define SNDRV_PCM_HW_PARAM_PERIODS 15 /* Approx interrupts per - * buffer - */ -#define SNDRV_PCM_HW_PARAM_BUFFER_TIME 16 /* Approx duration of buffer - * in us - */ -#define SNDRV_PCM_HW_PARAM_BUFFER_SIZE 17 /* Size of buffer in frames */ -#define SNDRV_PCM_HW_PARAM_BUFFER_BYTES 18 /* Size of buffer in bytes */ -#define SNDRV_PCM_HW_PARAM_TICK_TIME 19 /* Approx tick duration in us */ -#define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS -#define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME - -#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1<<0) /* avoid rate resampling */ -#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1<<1) /* export buffer */ -#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1<<2) /* disable period wakeups */ - -struct snd_interval { - unsigned int min, max; - unsigned int openmin:1, - openmax:1, - integer:1, - empty:1; -}; - -#define SNDRV_MASK_MAX 256 - -struct snd_mask { - __u32 bits[(SNDRV_MASK_MAX+31)/32]; -}; - -struct snd_pcm_hw_params { - unsigned int flags; - struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; - struct snd_mask mres[5]; /* reserved masks */ - struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1]; - struct snd_interval ires[9]; /* reserved intervals */ - unsigned int rmask; /* W: requested masks */ - unsigned int cmask; /* R: changed masks */ - unsigned int info; /* R: Info flags for returned setup */ - unsigned int msbits; /* R: used most significant bits */ - unsigned int rate_num; /* R: rate numerator */ - unsigned int rate_den; /* R: rate denominator */ - snd_pcm_uframes_t fifo_size; /* R: chip FIFO size in frames */ - unsigned char reserved[64]; /* reserved for future */ -}; - -enum { - SNDRV_PCM_TSTAMP_NONE = 0, - SNDRV_PCM_TSTAMP_ENABLE, - SNDRV_PCM_TSTAMP_LAST = SNDRV_PCM_TSTAMP_ENABLE, -}; - -struct snd_pcm_sw_params { - int tstamp_mode; /* timestamp mode */ - unsigned int period_step; - unsigned int sleep_min; /* min ticks to sleep */ - snd_pcm_uframes_t avail_min; /* min avail frames for wakeup */ - snd_pcm_uframes_t xfer_align; /* obsolete: xfer size need to be a multiple */ - snd_pcm_uframes_t start_threshold; /* min hw_avail frames for automatic start */ - snd_pcm_uframes_t stop_threshold; /* min avail frames for automatic stop */ - snd_pcm_uframes_t silence_threshold; /* min distance from noise for silence filling */ - snd_pcm_uframes_t silence_size; /* silence block size */ - snd_pcm_uframes_t boundary; /* pointers wrap point */ - unsigned int proto; /* protocol version */ - unsigned int tstamp_type; /* timestamp type (req. proto >= 2.0.12) */ - unsigned char reserved[56]; /* reserved for future */ -}; - -struct snd_pcm_channel_info { - unsigned int channel; - __kernel_off_t offset; /* mmap offset */ - unsigned int first; /* offset to first sample in bits */ - unsigned int step; /* samples distance in bits */ -}; - -enum { - /* - * first definition for backwards compatibility only, - * maps to wallclock/link time for HDAudio playback and DEFAULT/DMA time for everything else - */ - SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0, - - /* timestamp definitions */ - SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, /* DMA time, reported as per hw_ptr */ - SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, /* link time reported by sample or wallclock counter, reset on startup */ - SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, /* link time reported by sample or wallclock counter, not reset on startup */ - SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, /* link time estimated indirectly */ - SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5, /* link time synchronized with system time */ - SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED -}; - -struct snd_pcm_status { - snd_pcm_state_t state; /* stream state */ - struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */ - struct timespec tstamp; /* reference timestamp */ - snd_pcm_uframes_t appl_ptr; /* appl ptr */ - snd_pcm_uframes_t hw_ptr; /* hw ptr */ - snd_pcm_sframes_t delay; /* current delay in frames */ - snd_pcm_uframes_t avail; /* number of frames available */ - snd_pcm_uframes_t avail_max; /* max frames available on hw since last status */ - snd_pcm_uframes_t overrange; /* count of ADC (capture) overrange detections from last status */ - snd_pcm_state_t suspended_state; /* suspended stream state */ - __u32 audio_tstamp_data; /* needed for 64-bit alignment, used for configs/report to/from userspace */ - struct timespec audio_tstamp; /* sample counter, wall clock, PHC or on-demand sync'ed */ - struct timespec driver_tstamp; /* useful in case reference system tstamp is reported with delay */ - __u32 audio_tstamp_accuracy; /* in ns units, only valid if indicated in audio_tstamp_data */ - unsigned char reserved[52-2*sizeof(struct timespec)]; /* must be filled with zero */ -}; - -struct snd_pcm_mmap_status { - snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */ - int pad1; /* Needed for 64 bit alignment */ - snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */ - struct timespec tstamp; /* Timestamp */ - snd_pcm_state_t suspended_state; /* RO: suspended stream state */ - struct timespec audio_tstamp; /* from sample counter or wall clock */ -}; - -struct snd_pcm_mmap_control { - snd_pcm_uframes_t appl_ptr; /* RW: appl ptr (0...boundary-1) */ - snd_pcm_uframes_t avail_min; /* RW: min available frames for wakeup */ -}; - -#define SNDRV_PCM_SYNC_PTR_HWSYNC (1<<0) /* execute hwsync */ -#define SNDRV_PCM_SYNC_PTR_APPL (1<<1) /* get appl_ptr from driver (r/w op) */ -#define SNDRV_PCM_SYNC_PTR_AVAIL_MIN (1<<2) /* get avail_min from driver */ - -struct snd_pcm_sync_ptr { - unsigned int flags; - union { - struct snd_pcm_mmap_status status; - unsigned char reserved[64]; - } s; - union { - struct snd_pcm_mmap_control control; - unsigned char reserved[64]; - } c; -}; - -struct snd_xferi { - snd_pcm_sframes_t result; - void *buf; - snd_pcm_uframes_t frames; -}; - -struct snd_xfern { - snd_pcm_sframes_t result; - void * *bufs; - snd_pcm_uframes_t frames; -}; - -enum { - SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0, /* gettimeofday equivalent */ - SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, /* posix_clock_monotonic equivalent */ - SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, /* monotonic_raw (no NTP) */ - SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, -}; - -/* channel positions */ -enum { - SNDRV_CHMAP_UNKNOWN = 0, - SNDRV_CHMAP_NA, /* N/A, silent */ - SNDRV_CHMAP_MONO, /* mono stream */ - /* this follows the alsa-lib mixer channel value + 3 */ - SNDRV_CHMAP_FL, /* front left */ - SNDRV_CHMAP_FR, /* front right */ - SNDRV_CHMAP_RL, /* rear left */ - SNDRV_CHMAP_RR, /* rear right */ - SNDRV_CHMAP_FC, /* front center */ - SNDRV_CHMAP_LFE, /* LFE */ - SNDRV_CHMAP_SL, /* side left */ - SNDRV_CHMAP_SR, /* side right */ - SNDRV_CHMAP_RC, /* rear center */ - /* new definitions */ - SNDRV_CHMAP_FLC, /* front left center */ - SNDRV_CHMAP_FRC, /* front right center */ - SNDRV_CHMAP_RLC, /* rear left center */ - SNDRV_CHMAP_RRC, /* rear right center */ - SNDRV_CHMAP_FLW, /* front left wide */ - SNDRV_CHMAP_FRW, /* front right wide */ - SNDRV_CHMAP_FLH, /* front left high */ - SNDRV_CHMAP_FCH, /* front center high */ - SNDRV_CHMAP_FRH, /* front right high */ - SNDRV_CHMAP_TC, /* top center */ - SNDRV_CHMAP_TFL, /* top front left */ - SNDRV_CHMAP_TFR, /* top front right */ - SNDRV_CHMAP_TFC, /* top front center */ - SNDRV_CHMAP_TRL, /* top rear left */ - SNDRV_CHMAP_TRR, /* top rear right */ - SNDRV_CHMAP_TRC, /* top rear center */ - /* new definitions for UAC2 */ - SNDRV_CHMAP_TFLC, /* top front left center */ - SNDRV_CHMAP_TFRC, /* top front right center */ - SNDRV_CHMAP_TSL, /* top side left */ - SNDRV_CHMAP_TSR, /* top side right */ - SNDRV_CHMAP_LLFE, /* left LFE */ - SNDRV_CHMAP_RLFE, /* right LFE */ - SNDRV_CHMAP_BC, /* bottom center */ - SNDRV_CHMAP_BLC, /* bottom left center */ - SNDRV_CHMAP_BRC, /* bottom right center */ - SNDRV_CHMAP_LAST = SNDRV_CHMAP_BRC, -}; - -#define SNDRV_CHMAP_POSITION_MASK 0xffff -#define SNDRV_CHMAP_PHASE_INVERSE (0x01 << 16) -#define SNDRV_CHMAP_DRIVER_SPEC (0x02 << 16) - -#define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int) -#define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info) -#define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int) -#define SNDRV_PCM_IOCTL_TTSTAMP _IOW('A', 0x03, int) -#define SNDRV_PCM_IOCTL_USER_PVERSION _IOW('A', 0x04, int) -#define SNDRV_PCM_IOCTL_HW_REFINE _IOWR('A', 0x10, struct snd_pcm_hw_params) -#define SNDRV_PCM_IOCTL_HW_PARAMS _IOWR('A', 0x11, struct snd_pcm_hw_params) -#define SNDRV_PCM_IOCTL_HW_FREE _IO('A', 0x12) -#define SNDRV_PCM_IOCTL_SW_PARAMS _IOWR('A', 0x13, struct snd_pcm_sw_params) -#define SNDRV_PCM_IOCTL_STATUS _IOR('A', 0x20, struct snd_pcm_status) -#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t) -#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22) -#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr) -#define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status) -#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info) -#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40) -#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41) -#define SNDRV_PCM_IOCTL_START _IO('A', 0x42) -#define SNDRV_PCM_IOCTL_DROP _IO('A', 0x43) -#define SNDRV_PCM_IOCTL_DRAIN _IO('A', 0x44) -#define SNDRV_PCM_IOCTL_PAUSE _IOW('A', 0x45, int) -#define SNDRV_PCM_IOCTL_REWIND _IOW('A', 0x46, snd_pcm_uframes_t) -#define SNDRV_PCM_IOCTL_RESUME _IO('A', 0x47) -#define SNDRV_PCM_IOCTL_XRUN _IO('A', 0x48) -#define SNDRV_PCM_IOCTL_FORWARD _IOW('A', 0x49, snd_pcm_uframes_t) -#define SNDRV_PCM_IOCTL_WRITEI_FRAMES _IOW('A', 0x50, struct snd_xferi) -#define SNDRV_PCM_IOCTL_READI_FRAMES _IOR('A', 0x51, struct snd_xferi) -#define SNDRV_PCM_IOCTL_WRITEN_FRAMES _IOW('A', 0x52, struct snd_xfern) -#define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern) -#define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int) -#define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61) - -/***************************************************************************** - * * - * MIDI v1.0 interface * - * * - *****************************************************************************/ - -/* - * Raw MIDI section - /dev/snd/midi?? - */ - -#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 0) - -enum { - SNDRV_RAWMIDI_STREAM_OUTPUT = 0, - SNDRV_RAWMIDI_STREAM_INPUT, - SNDRV_RAWMIDI_STREAM_LAST = SNDRV_RAWMIDI_STREAM_INPUT, -}; - -#define SNDRV_RAWMIDI_INFO_OUTPUT 0x00000001 -#define SNDRV_RAWMIDI_INFO_INPUT 0x00000002 -#define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004 - -struct snd_rawmidi_info { - unsigned int device; /* RO/WR (control): device number */ - unsigned int subdevice; /* RO/WR (control): subdevice number */ - int stream; /* WR: stream */ - int card; /* R: card number */ - unsigned int flags; /* SNDRV_RAWMIDI_INFO_XXXX */ - unsigned char id[64]; /* ID (user selectable) */ - unsigned char name[80]; /* name of device */ - unsigned char subname[32]; /* name of active or selected subdevice */ - unsigned int subdevices_count; - unsigned int subdevices_avail; - unsigned char reserved[64]; /* reserved for future use */ -}; - -struct snd_rawmidi_params { - int stream; - size_t buffer_size; /* queue size in bytes */ - size_t avail_min; /* minimum avail bytes for wakeup */ - unsigned int no_active_sensing: 1; /* do not send active sensing byte in close() */ - unsigned char reserved[16]; /* reserved for future use */ -}; - -struct snd_rawmidi_status { - int stream; - struct timespec tstamp; /* Timestamp */ - size_t avail; /* available bytes */ - size_t xruns; /* count of overruns since last status (in bytes) */ - unsigned char reserved[16]; /* reserved for future use */ -}; - -#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int) -#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info) -#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params) -#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status) -#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int) -#define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int) - -/* - * Timer section - /dev/snd/timer - */ - -#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6) - -enum { - SNDRV_TIMER_CLASS_NONE = -1, - SNDRV_TIMER_CLASS_SLAVE = 0, - SNDRV_TIMER_CLASS_GLOBAL, - SNDRV_TIMER_CLASS_CARD, - SNDRV_TIMER_CLASS_PCM, - SNDRV_TIMER_CLASS_LAST = SNDRV_TIMER_CLASS_PCM, -}; - -/* slave timer classes */ -enum { - SNDRV_TIMER_SCLASS_NONE = 0, - SNDRV_TIMER_SCLASS_APPLICATION, - SNDRV_TIMER_SCLASS_SEQUENCER, /* alias */ - SNDRV_TIMER_SCLASS_OSS_SEQUENCER, /* alias */ - SNDRV_TIMER_SCLASS_LAST = SNDRV_TIMER_SCLASS_OSS_SEQUENCER, -}; - -/* global timers (device member) */ -#define SNDRV_TIMER_GLOBAL_SYSTEM 0 -#define SNDRV_TIMER_GLOBAL_RTC 1 /* unused */ -#define SNDRV_TIMER_GLOBAL_HPET 2 -#define SNDRV_TIMER_GLOBAL_HRTIMER 3 - -/* info flags */ -#define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */ - -struct snd_timer_id { - int dev_class; - int dev_sclass; - int card; - int device; - int subdevice; -}; - -struct snd_timer_ginfo { - struct snd_timer_id tid; /* requested timer ID */ - unsigned int flags; /* timer flags - SNDRV_TIMER_FLG_* */ - int card; /* card number */ - unsigned char id[64]; /* timer identification */ - unsigned char name[80]; /* timer name */ - unsigned long reserved0; /* reserved for future use */ - unsigned long resolution; /* average period resolution in ns */ - unsigned long resolution_min; /* minimal period resolution in ns */ - unsigned long resolution_max; /* maximal period resolution in ns */ - unsigned int clients; /* active timer clients */ - unsigned char reserved[32]; -}; - -struct snd_timer_gparams { - struct snd_timer_id tid; /* requested timer ID */ - unsigned long period_num; /* requested precise period duration (in seconds) - numerator */ - unsigned long period_den; /* requested precise period duration (in seconds) - denominator */ - unsigned char reserved[32]; -}; - -struct snd_timer_gstatus { - struct snd_timer_id tid; /* requested timer ID */ - unsigned long resolution; /* current period resolution in ns */ - unsigned long resolution_num; /* precise current period resolution (in seconds) - numerator */ - unsigned long resolution_den; /* precise current period resolution (in seconds) - denominator */ - unsigned char reserved[32]; -}; - -struct snd_timer_select { - struct snd_timer_id id; /* bind to timer ID */ - unsigned char reserved[32]; /* reserved */ -}; - -struct snd_timer_info { - unsigned int flags; /* timer flags - SNDRV_TIMER_FLG_* */ - int card; /* card number */ - unsigned char id[64]; /* timer identificator */ - unsigned char name[80]; /* timer name */ - unsigned long reserved0; /* reserved for future use */ - unsigned long resolution; /* average period resolution in ns */ - unsigned char reserved[64]; /* reserved */ -}; - -#define SNDRV_TIMER_PSFLG_AUTO (1<<0) /* auto start, otherwise one-shot */ -#define SNDRV_TIMER_PSFLG_EXCLUSIVE (1<<1) /* exclusive use, precise start/stop/pause/continue */ -#define SNDRV_TIMER_PSFLG_EARLY_EVENT (1<<2) /* write early event to the poll queue */ - -struct snd_timer_params { - unsigned int flags; /* flags - SNDRV_MIXER_PSFLG_* */ - unsigned int ticks; /* requested resolution in ticks */ - unsigned int queue_size; /* total size of queue (32-1024) */ - unsigned int reserved0; /* reserved, was: failure locations */ - unsigned int filter; /* event filter (bitmask of SNDRV_TIMER_EVENT_*) */ - unsigned char reserved[60]; /* reserved */ -}; - -struct snd_timer_status { - struct timespec tstamp; /* Timestamp - last update */ - unsigned int resolution; /* current period resolution in ns */ - unsigned int lost; /* counter of master tick lost */ - unsigned int overrun; /* count of read queue overruns */ - unsigned int queue; /* used queue size */ - unsigned char reserved[64]; /* reserved */ -}; - -#define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int) -#define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id) -#define SNDRV_TIMER_IOCTL_TREAD _IOW('T', 0x02, int) -#define SNDRV_TIMER_IOCTL_GINFO _IOWR('T', 0x03, struct snd_timer_ginfo) -#define SNDRV_TIMER_IOCTL_GPARAMS _IOW('T', 0x04, struct snd_timer_gparams) -#define SNDRV_TIMER_IOCTL_GSTATUS _IOWR('T', 0x05, struct snd_timer_gstatus) -#define SNDRV_TIMER_IOCTL_SELECT _IOW('T', 0x10, struct snd_timer_select) -#define SNDRV_TIMER_IOCTL_INFO _IOR('T', 0x11, struct snd_timer_info) -#define SNDRV_TIMER_IOCTL_PARAMS _IOW('T', 0x12, struct snd_timer_params) -#define SNDRV_TIMER_IOCTL_STATUS _IOR('T', 0x14, struct snd_timer_status) -/* The following four ioctls are changed since 1.0.9 due to confliction */ -#define SNDRV_TIMER_IOCTL_START _IO('T', 0xa0) -#define SNDRV_TIMER_IOCTL_STOP _IO('T', 0xa1) -#define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2) -#define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3) - -struct snd_timer_read { - unsigned int resolution; - unsigned int ticks; -}; - -enum { - SNDRV_TIMER_EVENT_RESOLUTION = 0, /* val = resolution in ns */ - SNDRV_TIMER_EVENT_TICK, /* val = ticks */ - SNDRV_TIMER_EVENT_START, /* val = resolution in ns */ - SNDRV_TIMER_EVENT_STOP, /* val = 0 */ - SNDRV_TIMER_EVENT_CONTINUE, /* val = resolution in ns */ - SNDRV_TIMER_EVENT_PAUSE, /* val = 0 */ - SNDRV_TIMER_EVENT_EARLY, /* val = 0, early event */ - SNDRV_TIMER_EVENT_SUSPEND, /* val = 0 */ - SNDRV_TIMER_EVENT_RESUME, /* val = resolution in ns */ - /* master timer events for slave timer instances */ - SNDRV_TIMER_EVENT_MSTART = SNDRV_TIMER_EVENT_START + 10, - SNDRV_TIMER_EVENT_MSTOP = SNDRV_TIMER_EVENT_STOP + 10, - SNDRV_TIMER_EVENT_MCONTINUE = SNDRV_TIMER_EVENT_CONTINUE + 10, - SNDRV_TIMER_EVENT_MPAUSE = SNDRV_TIMER_EVENT_PAUSE + 10, - SNDRV_TIMER_EVENT_MSUSPEND = SNDRV_TIMER_EVENT_SUSPEND + 10, - SNDRV_TIMER_EVENT_MRESUME = SNDRV_TIMER_EVENT_RESUME + 10, -}; - -struct snd_timer_tread { - int event; - struct timespec tstamp; - unsigned int val; -}; - -/**************************************************************************** - * * - * Section for driver control interface - /dev/snd/control? * - * * - ****************************************************************************/ - -#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7) - -struct snd_ctl_card_info { - int card; /* card number */ - int pad; /* reserved for future (was type) */ - unsigned char id[16]; /* ID of card (user selectable) */ - unsigned char driver[16]; /* Driver name */ - unsigned char name[32]; /* Short name of soundcard */ - unsigned char longname[80]; /* name + info text about soundcard */ - unsigned char reserved_[16]; /* reserved for future (was ID of mixer) */ - unsigned char mixername[80]; /* visual mixer identification */ - unsigned char components[128]; /* card components / fine identification, delimited with one space (AC97 etc..) */ -}; - -typedef int __bitwise snd_ctl_elem_type_t; -#define SNDRV_CTL_ELEM_TYPE_NONE ((snd_ctl_elem_type_t) 0) /* invalid */ -#define SNDRV_CTL_ELEM_TYPE_BOOLEAN ((snd_ctl_elem_type_t) 1) /* boolean type */ -#define SNDRV_CTL_ELEM_TYPE_INTEGER ((snd_ctl_elem_type_t) 2) /* integer type */ -#define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((snd_ctl_elem_type_t) 3) /* enumerated type */ -#define SNDRV_CTL_ELEM_TYPE_BYTES ((snd_ctl_elem_type_t) 4) /* byte array */ -#define SNDRV_CTL_ELEM_TYPE_IEC958 ((snd_ctl_elem_type_t) 5) /* IEC958 (S/PDIF) setup */ -#define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((snd_ctl_elem_type_t) 6) /* 64-bit integer type */ -#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64 - -typedef int __bitwise snd_ctl_elem_iface_t; -#define SNDRV_CTL_ELEM_IFACE_CARD ((snd_ctl_elem_iface_t) 0) /* global control */ -#define SNDRV_CTL_ELEM_IFACE_HWDEP ((snd_ctl_elem_iface_t) 1) /* hardware dependent device */ -#define SNDRV_CTL_ELEM_IFACE_MIXER ((snd_ctl_elem_iface_t) 2) /* virtual mixer device */ -#define SNDRV_CTL_ELEM_IFACE_PCM ((snd_ctl_elem_iface_t) 3) /* PCM device */ -#define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((snd_ctl_elem_iface_t) 4) /* RawMidi device */ -#define SNDRV_CTL_ELEM_IFACE_TIMER ((snd_ctl_elem_iface_t) 5) /* timer device */ -#define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((snd_ctl_elem_iface_t) 6) /* sequencer client */ -#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER - -#define SNDRV_CTL_ELEM_ACCESS_READ (1<<0) -#define SNDRV_CTL_ELEM_ACCESS_WRITE (1<<1) -#define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE) -#define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1<<2) /* control value may be changed without a notification */ -#define SNDRV_CTL_ELEM_ACCESS_TIMESTAMP (1<<3) /* when was control changed */ -#define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1<<4) /* TLV read is possible */ -#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1<<5) /* TLV write is possible */ -#define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE (SNDRV_CTL_ELEM_ACCESS_TLV_READ|SNDRV_CTL_ELEM_ACCESS_TLV_WRITE) -#define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND (1<<6) /* TLV command is possible */ -#define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1<<8) /* control does actually nothing, but may be updated */ -#define SNDRV_CTL_ELEM_ACCESS_LOCK (1<<9) /* write lock */ -#define SNDRV_CTL_ELEM_ACCESS_OWNER (1<<10) /* write lock owner */ -#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1<<28) /* kernel use a TLV callback */ -#define SNDRV_CTL_ELEM_ACCESS_USER (1<<29) /* user space element */ -/* bits 30 and 31 are obsoleted (for indirect access) */ - -/* for further details see the ACPI and PCI power management specification */ -#define SNDRV_CTL_POWER_D0 0x0000 /* full On */ -#define SNDRV_CTL_POWER_D1 0x0100 /* partial On */ -#define SNDRV_CTL_POWER_D2 0x0200 /* partial On */ -#define SNDRV_CTL_POWER_D3 0x0300 /* Off */ -#define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3|0x0000) /* Off, with power */ -#define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3|0x0001) /* Off, without power */ - -#define SNDRV_CTL_ELEM_ID_NAME_MAXLEN 44 - -struct snd_ctl_elem_id { - unsigned int numid; /* numeric identifier, zero = invalid */ - snd_ctl_elem_iface_t iface; /* interface identifier */ - unsigned int device; /* device/client number */ - unsigned int subdevice; /* subdevice (substream) number */ - unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* ASCII name of item */ - unsigned int index; /* index of item */ -}; - -struct snd_ctl_elem_list { - unsigned int offset; /* W: first element ID to get */ - unsigned int space; /* W: count of element IDs to get */ - unsigned int used; /* R: count of element IDs set */ - unsigned int count; /* R: count of all elements */ - struct snd_ctl_elem_id *pids; /* R: IDs */ - unsigned char reserved[50]; -}; - -struct snd_ctl_elem_info { - struct snd_ctl_elem_id id; /* W: element ID */ - snd_ctl_elem_type_t type; /* R: value type - SNDRV_CTL_ELEM_TYPE_* */ - unsigned int access; /* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */ - unsigned int count; /* count of values */ - __kernel_pid_t owner; /* owner's PID of this control */ - union { - struct { - long min; /* R: minimum value */ - long max; /* R: maximum value */ - long step; /* R: step (0 variable) */ - } integer; - struct { - long long min; /* R: minimum value */ - long long max; /* R: maximum value */ - long long step; /* R: step (0 variable) */ - } integer64; - struct { - unsigned int items; /* R: number of items */ - unsigned int item; /* W: item number */ - char name[64]; /* R: value name */ - __u64 names_ptr; /* W: names list (ELEM_ADD only) */ - unsigned int names_length; - } enumerated; - unsigned char reserved[128]; - } value; - union { - unsigned short d[4]; /* dimensions */ - unsigned short *d_ptr; /* indirect - obsoleted */ - } dimen; - unsigned char reserved[64-4*sizeof(unsigned short)]; -}; - -struct snd_ctl_elem_value { - struct snd_ctl_elem_id id; /* W: element ID */ - unsigned int indirect: 1; /* W: indirect access - obsoleted */ - union { - union { - long value[128]; - long *value_ptr; /* obsoleted */ - } integer; - union { - long long value[64]; - long long *value_ptr; /* obsoleted */ - } integer64; - union { - unsigned int item[128]; - unsigned int *item_ptr; /* obsoleted */ - } enumerated; - union { - unsigned char data[512]; - unsigned char *data_ptr; /* obsoleted */ - } bytes; - struct snd_aes_iec958 iec958; - } value; /* RO */ - struct timespec tstamp; - unsigned char reserved[128-sizeof(struct timespec)]; -}; - -struct snd_ctl_tlv { - unsigned int numid; /* control element numeric identification */ - unsigned int length; /* in bytes aligned to 4 */ - unsigned int tlv[0]; /* first TLV */ -}; - -#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int) -#define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info) -#define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list) -#define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info) -#define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value) -#define SNDRV_CTL_IOCTL_ELEM_WRITE _IOWR('U', 0x13, struct snd_ctl_elem_value) -#define SNDRV_CTL_IOCTL_ELEM_LOCK _IOW('U', 0x14, struct snd_ctl_elem_id) -#define SNDRV_CTL_IOCTL_ELEM_UNLOCK _IOW('U', 0x15, struct snd_ctl_elem_id) -#define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int) -#define SNDRV_CTL_IOCTL_ELEM_ADD _IOWR('U', 0x17, struct snd_ctl_elem_info) -#define SNDRV_CTL_IOCTL_ELEM_REPLACE _IOWR('U', 0x18, struct snd_ctl_elem_info) -#define SNDRV_CTL_IOCTL_ELEM_REMOVE _IOWR('U', 0x19, struct snd_ctl_elem_id) -#define SNDRV_CTL_IOCTL_TLV_READ _IOWR('U', 0x1a, struct snd_ctl_tlv) -#define SNDRV_CTL_IOCTL_TLV_WRITE _IOWR('U', 0x1b, struct snd_ctl_tlv) -#define SNDRV_CTL_IOCTL_TLV_COMMAND _IOWR('U', 0x1c, struct snd_ctl_tlv) -#define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int) -#define SNDRV_CTL_IOCTL_HWDEP_INFO _IOR('U', 0x21, struct snd_hwdep_info) -#define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int) -#define SNDRV_CTL_IOCTL_PCM_INFO _IOWR('U', 0x31, struct snd_pcm_info) -#define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int) -#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int) -#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info) -#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int) -#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int) -#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int) - -/* - * Read interface. - */ - -enum sndrv_ctl_event_type { - SNDRV_CTL_EVENT_ELEM = 0, - SNDRV_CTL_EVENT_LAST = SNDRV_CTL_EVENT_ELEM, -}; - -#define SNDRV_CTL_EVENT_MASK_VALUE (1<<0) /* element value was changed */ -#define SNDRV_CTL_EVENT_MASK_INFO (1<<1) /* element info was changed */ -#define SNDRV_CTL_EVENT_MASK_ADD (1<<2) /* element was added */ -#define SNDRV_CTL_EVENT_MASK_TLV (1<<3) /* element TLV tree was changed */ -#define SNDRV_CTL_EVENT_MASK_REMOVE (~0U) /* element was removed */ - -struct snd_ctl_event { - int type; /* event type - SNDRV_CTL_EVENT_* */ - union { - struct { - unsigned int mask; - struct snd_ctl_elem_id id; - } elem; - unsigned char data8[60]; - } data; -}; - -/* - * Control names - */ - -#define SNDRV_CTL_NAME_NONE "" -#define SNDRV_CTL_NAME_PLAYBACK "Playback " -#define SNDRV_CTL_NAME_CAPTURE "Capture " - -#define SNDRV_CTL_NAME_IEC958_NONE "" -#define SNDRV_CTL_NAME_IEC958_SWITCH "Switch" -#define SNDRV_CTL_NAME_IEC958_VOLUME "Volume" -#define SNDRV_CTL_NAME_IEC958_DEFAULT "Default" -#define SNDRV_CTL_NAME_IEC958_MASK "Mask" -#define SNDRV_CTL_NAME_IEC958_CON_MASK "Con Mask" -#define SNDRV_CTL_NAME_IEC958_PRO_MASK "Pro Mask" -#define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream" -#define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_##direction SNDRV_CTL_NAME_IEC958_##what - -#endif /* __SOUND_ASOUND_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/asound_fm.h b/lib/libc/include/generic-musl/sound/asound_fm.h deleted file mode 100644 index ae674964f4..0000000000 --- a/lib/libc/include/generic-musl/sound/asound_fm.h +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -#ifndef __SOUND_ASOUND_FM_H -#define __SOUND_ASOUND_FM_H - -/* - * Advanced Linux Sound Architecture - ALSA - * - * Interface file between ALSA driver & user space - * Copyright (c) 1994-98 by Jaroslav Kysela , - * 4Front Technologies - * - * Direct FM control - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#define SNDRV_DM_FM_MODE_OPL2 0x00 -#define SNDRV_DM_FM_MODE_OPL3 0x01 - -struct snd_dm_fm_info { - unsigned char fm_mode; /* OPL mode, see SNDRV_DM_FM_MODE_XXX */ - unsigned char rhythm; /* percussion mode flag */ -}; - -/* - * Data structure composing an FM "note" or sound event. - */ - -struct snd_dm_fm_voice { - unsigned char op; /* operator cell (0 or 1) */ - unsigned char voice; /* FM voice (0 to 17) */ - - unsigned char am; /* amplitude modulation */ - unsigned char vibrato; /* vibrato effect */ - unsigned char do_sustain; /* sustain phase */ - unsigned char kbd_scale; /* keyboard scaling */ - unsigned char harmonic; /* 4 bits: harmonic and multiplier */ - unsigned char scale_level; /* 2 bits: decrease output freq rises */ - unsigned char volume; /* 6 bits: volume */ - - unsigned char attack; /* 4 bits: attack rate */ - unsigned char decay; /* 4 bits: decay rate */ - unsigned char sustain; /* 4 bits: sustain level */ - unsigned char release; /* 4 bits: release rate */ - - unsigned char feedback; /* 3 bits: feedback for op0 */ - unsigned char connection; /* 0 for serial, 1 for parallel */ - unsigned char left; /* stereo left */ - unsigned char right; /* stereo right */ - unsigned char waveform; /* 3 bits: waveform shape */ -}; - -/* - * This describes an FM note by its voice, octave, frequency number (10bit) - * and key on/off. - */ - -struct snd_dm_fm_note { - unsigned char voice; /* 0-17 voice channel */ - unsigned char octave; /* 3 bits: what octave to play */ - unsigned int fnum; /* 10 bits: frequency number */ - unsigned char key_on; /* set for active, clear for silent */ -}; - -/* - * FM parameters that apply globally to all voices, and thus are not "notes" - */ - -struct snd_dm_fm_params { - unsigned char am_depth; /* amplitude modulation depth (1=hi) */ - unsigned char vib_depth; /* vibrato depth (1=hi) */ - unsigned char kbd_split; /* keyboard split */ - unsigned char rhythm; /* percussion mode select */ - - /* This block is the percussion instrument data */ - unsigned char bass; - unsigned char snare; - unsigned char tomtom; - unsigned char cymbal; - unsigned char hihat; -}; - -/* - * FM mode ioctl settings - */ - -#define SNDRV_DM_FM_IOCTL_INFO _IOR('H', 0x20, struct snd_dm_fm_info) -#define SNDRV_DM_FM_IOCTL_RESET _IO ('H', 0x21) -#define SNDRV_DM_FM_IOCTL_PLAY_NOTE _IOW('H', 0x22, struct snd_dm_fm_note) -#define SNDRV_DM_FM_IOCTL_SET_VOICE _IOW('H', 0x23, struct snd_dm_fm_voice) -#define SNDRV_DM_FM_IOCTL_SET_PARAMS _IOW('H', 0x24, struct snd_dm_fm_params) -#define SNDRV_DM_FM_IOCTL_SET_MODE _IOW('H', 0x25, int) -/* for OPL3 only */ -#define SNDRV_DM_FM_IOCTL_SET_CONNECTION _IOW('H', 0x26, int) -/* SBI patch management */ -#define SNDRV_DM_FM_IOCTL_CLEAR_PATCHES _IO ('H', 0x40) - -#define SNDRV_DM_FM_OSS_IOCTL_RESET 0x20 -#define SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE 0x21 -#define SNDRV_DM_FM_OSS_IOCTL_SET_VOICE 0x22 -#define SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS 0x23 -#define SNDRV_DM_FM_OSS_IOCTL_SET_MODE 0x24 -#define SNDRV_DM_FM_OSS_IOCTL_SET_OPL 0x25 - -/* - * Patch Record - fixed size for write - */ - -#define FM_KEY_SBI "SBI\032" -#define FM_KEY_2OP "2OP\032" -#define FM_KEY_4OP "4OP\032" - -struct sbi_patch { - unsigned char prog; - unsigned char bank; - char key[4]; - char name[25]; - char extension[7]; - unsigned char data[32]; -}; - -#endif /* __SOUND_ASOUND_FM_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/compress_offload.h b/lib/libc/include/generic-musl/sound/compress_offload.h deleted file mode 100644 index 3631ade83d..0000000000 --- a/lib/libc/include/generic-musl/sound/compress_offload.h +++ /dev/null @@ -1,192 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * compress_offload.h - compress offload header definations - * - * Copyright (C) 2011 Intel Corporation - * Authors: Vinod Koul - * Pierre-Louis Bossart - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * 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; version 2 of the License. - * - * 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., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - */ -#ifndef __COMPRESS_OFFLOAD_H -#define __COMPRESS_OFFLOAD_H - -#include -#include -#include - - -#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 2) -/** - * struct snd_compressed_buffer - compressed buffer - * @fragment_size: size of buffer fragment in bytes - * @fragments: number of such fragments - */ -struct snd_compressed_buffer { - __u32 fragment_size; - __u32 fragments; -} __attribute__((packed, aligned(4))); - -/** - * struct snd_compr_params - compressed stream params - * @buffer: buffer description - * @codec: codec parameters - * @no_wake_mode: dont wake on fragment elapsed - */ -struct snd_compr_params { - struct snd_compressed_buffer buffer; - struct snd_codec codec; - __u8 no_wake_mode; -} __attribute__((packed, aligned(4))); - -/** - * struct snd_compr_tstamp - timestamp descriptor - * @byte_offset: Byte offset in ring buffer to DSP - * @copied_total: Total number of bytes copied from/to ring buffer to/by DSP - * @pcm_frames: Frames decoded or encoded by DSP. This field will evolve by - * large steps and should only be used to monitor encoding/decoding - * progress. It shall not be used for timing estimates. - * @pcm_io_frames: Frames rendered or received by DSP into a mixer or an audio - * output/input. This field should be used for A/V sync or time estimates. - * @sampling_rate: sampling rate of audio - */ -struct snd_compr_tstamp { - __u32 byte_offset; - __u32 copied_total; - __u32 pcm_frames; - __u32 pcm_io_frames; - __u32 sampling_rate; -} __attribute__((packed, aligned(4))); - -/** - * struct snd_compr_avail - avail descriptor - * @avail: Number of bytes available in ring buffer for writing/reading - * @tstamp: timestamp information - */ -struct snd_compr_avail { - __u64 avail; - struct snd_compr_tstamp tstamp; -} __attribute__((packed, aligned(4))); - -enum snd_compr_direction { - SND_COMPRESS_PLAYBACK = 0, - SND_COMPRESS_CAPTURE -}; - -/** - * struct snd_compr_caps - caps descriptor - * @codecs: pointer to array of codecs - * @direction: direction supported. Of type snd_compr_direction - * @min_fragment_size: minimum fragment supported by DSP - * @max_fragment_size: maximum fragment supported by DSP - * @min_fragments: min fragments supported by DSP - * @max_fragments: max fragments supported by DSP - * @num_codecs: number of codecs supported - * @reserved: reserved field - */ -struct snd_compr_caps { - __u32 num_codecs; - __u32 direction; - __u32 min_fragment_size; - __u32 max_fragment_size; - __u32 min_fragments; - __u32 max_fragments; - __u32 codecs[MAX_NUM_CODECS]; - __u32 reserved[11]; -} __attribute__((packed, aligned(4))); - -/** - * struct snd_compr_codec_caps - query capability of codec - * @codec: codec for which capability is queried - * @num_descriptors: number of codec descriptors - * @descriptor: array of codec capability descriptor - */ -struct snd_compr_codec_caps { - __u32 codec; - __u32 num_descriptors; - struct snd_codec_desc descriptor[MAX_NUM_CODEC_DESCRIPTORS]; -} __attribute__((packed, aligned(4))); - -/** - * enum sndrv_compress_encoder - * @SNDRV_COMPRESS_ENCODER_PADDING: no of samples appended by the encoder at the - * end of the track - * @SNDRV_COMPRESS_ENCODER_DELAY: no of samples inserted by the encoder at the - * beginning of the track - */ -enum sndrv_compress_encoder { - SNDRV_COMPRESS_ENCODER_PADDING = 1, - SNDRV_COMPRESS_ENCODER_DELAY = 2, -}; - -/** - * struct snd_compr_metadata - compressed stream metadata - * @key: key id - * @value: key value - */ -struct snd_compr_metadata { - __u32 key; - __u32 value[8]; -} __attribute__((packed, aligned(4))); - -/** - * compress path ioctl definitions - * SNDRV_COMPRESS_GET_CAPS: Query capability of DSP - * SNDRV_COMPRESS_GET_CODEC_CAPS: Query capability of a codec - * SNDRV_COMPRESS_SET_PARAMS: Set codec and stream parameters - * Note: only codec params can be changed runtime and stream params cant be - * SNDRV_COMPRESS_GET_PARAMS: Query codec params - * SNDRV_COMPRESS_TSTAMP: get the current timestamp value - * SNDRV_COMPRESS_AVAIL: get the current buffer avail value. - * This also queries the tstamp properties - * SNDRV_COMPRESS_PAUSE: Pause the running stream - * SNDRV_COMPRESS_RESUME: resume a paused stream - * SNDRV_COMPRESS_START: Start a stream - * SNDRV_COMPRESS_STOP: stop a running stream, discarding ring buffer content - * and the buffers currently with DSP - * SNDRV_COMPRESS_DRAIN: Play till end of buffers and stop after that - * SNDRV_COMPRESS_IOCTL_VERSION: Query the API version - */ -#define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int) -#define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps) -#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11,\ - struct snd_compr_codec_caps) -#define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params) -#define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec) -#define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14,\ - struct snd_compr_metadata) -#define SNDRV_COMPRESS_GET_METADATA _IOWR('C', 0x15,\ - struct snd_compr_metadata) -#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp) -#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail) -#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30) -#define SNDRV_COMPRESS_RESUME _IO('C', 0x31) -#define SNDRV_COMPRESS_START _IO('C', 0x32) -#define SNDRV_COMPRESS_STOP _IO('C', 0x33) -#define SNDRV_COMPRESS_DRAIN _IO('C', 0x34) -#define SNDRV_COMPRESS_NEXT_TRACK _IO('C', 0x35) -#define SNDRV_COMPRESS_PARTIAL_DRAIN _IO('C', 0x36) -/* - * TODO - * 1. add mmap support - * - */ -#define SND_COMPR_TRIGGER_DRAIN 7 /*FIXME move this to pcm.h */ -#define SND_COMPR_TRIGGER_NEXT_TRACK 8 -#define SND_COMPR_TRIGGER_PARTIAL_DRAIN 9 -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/compress_params.h b/lib/libc/include/generic-musl/sound/compress_params.h deleted file mode 100644 index 674d27af02..0000000000 --- a/lib/libc/include/generic-musl/sound/compress_params.h +++ /dev/null @@ -1,406 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) AND MIT) */ -/* - * compress_params.h - codec types and parameters for compressed data - * streaming interface - * - * Copyright (C) 2011 Intel Corporation - * Authors: Pierre-Louis Bossart - * Vinod Koul - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * 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; version 2 of the License. - * - * 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., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * The definitions in this file are derived from the OpenMAX AL version 1.1 - * and OpenMAX IL v 1.1.2 header files which contain the copyright notice below. - * - * Copyright (c) 2007-2010 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and/or associated documentation files (the - * "Materials "), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. - * - */ -#ifndef __SND_COMPRESS_PARAMS_H -#define __SND_COMPRESS_PARAMS_H - -#include - -/* AUDIO CODECS SUPPORTED */ -#define MAX_NUM_CODECS 32 -#define MAX_NUM_CODEC_DESCRIPTORS 32 -#define MAX_NUM_BITRATES 32 -#define MAX_NUM_SAMPLE_RATES 32 - -/* Codecs are listed linearly to allow for extensibility */ -#define SND_AUDIOCODEC_PCM ((__u32) 0x00000001) -#define SND_AUDIOCODEC_MP3 ((__u32) 0x00000002) -#define SND_AUDIOCODEC_AMR ((__u32) 0x00000003) -#define SND_AUDIOCODEC_AMRWB ((__u32) 0x00000004) -#define SND_AUDIOCODEC_AMRWBPLUS ((__u32) 0x00000005) -#define SND_AUDIOCODEC_AAC ((__u32) 0x00000006) -#define SND_AUDIOCODEC_WMA ((__u32) 0x00000007) -#define SND_AUDIOCODEC_REAL ((__u32) 0x00000008) -#define SND_AUDIOCODEC_VORBIS ((__u32) 0x00000009) -#define SND_AUDIOCODEC_FLAC ((__u32) 0x0000000A) -#define SND_AUDIOCODEC_IEC61937 ((__u32) 0x0000000B) -#define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C) -#define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D) -#define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E) -#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_BESPOKE - -/* - * Profile and modes are listed with bit masks. This allows for a - * more compact representation of fields that will not evolve - * (in contrast to the list of codecs) - */ - -#define SND_AUDIOPROFILE_PCM ((__u32) 0x00000001) - -/* MP3 modes are only useful for encoders */ -#define SND_AUDIOCHANMODE_MP3_MONO ((__u32) 0x00000001) -#define SND_AUDIOCHANMODE_MP3_STEREO ((__u32) 0x00000002) -#define SND_AUDIOCHANMODE_MP3_JOINTSTEREO ((__u32) 0x00000004) -#define SND_AUDIOCHANMODE_MP3_DUAL ((__u32) 0x00000008) - -#define SND_AUDIOPROFILE_AMR ((__u32) 0x00000001) - -/* AMR modes are only useful for encoders */ -#define SND_AUDIOMODE_AMR_DTX_OFF ((__u32) 0x00000001) -#define SND_AUDIOMODE_AMR_VAD1 ((__u32) 0x00000002) -#define SND_AUDIOMODE_AMR_VAD2 ((__u32) 0x00000004) - -#define SND_AUDIOSTREAMFORMAT_UNDEFINED ((__u32) 0x00000000) -#define SND_AUDIOSTREAMFORMAT_CONFORMANCE ((__u32) 0x00000001) -#define SND_AUDIOSTREAMFORMAT_IF1 ((__u32) 0x00000002) -#define SND_AUDIOSTREAMFORMAT_IF2 ((__u32) 0x00000004) -#define SND_AUDIOSTREAMFORMAT_FSF ((__u32) 0x00000008) -#define SND_AUDIOSTREAMFORMAT_RTPPAYLOAD ((__u32) 0x00000010) -#define SND_AUDIOSTREAMFORMAT_ITU ((__u32) 0x00000020) - -#define SND_AUDIOPROFILE_AMRWB ((__u32) 0x00000001) - -/* AMRWB modes are only useful for encoders */ -#define SND_AUDIOMODE_AMRWB_DTX_OFF ((__u32) 0x00000001) -#define SND_AUDIOMODE_AMRWB_VAD1 ((__u32) 0x00000002) -#define SND_AUDIOMODE_AMRWB_VAD2 ((__u32) 0x00000004) - -#define SND_AUDIOPROFILE_AMRWBPLUS ((__u32) 0x00000001) - -#define SND_AUDIOPROFILE_AAC ((__u32) 0x00000001) - -/* AAC modes are required for encoders and decoders */ -#define SND_AUDIOMODE_AAC_MAIN ((__u32) 0x00000001) -#define SND_AUDIOMODE_AAC_LC ((__u32) 0x00000002) -#define SND_AUDIOMODE_AAC_SSR ((__u32) 0x00000004) -#define SND_AUDIOMODE_AAC_LTP ((__u32) 0x00000008) -#define SND_AUDIOMODE_AAC_HE ((__u32) 0x00000010) -#define SND_AUDIOMODE_AAC_SCALABLE ((__u32) 0x00000020) -#define SND_AUDIOMODE_AAC_ERLC ((__u32) 0x00000040) -#define SND_AUDIOMODE_AAC_LD ((__u32) 0x00000080) -#define SND_AUDIOMODE_AAC_HE_PS ((__u32) 0x00000100) -#define SND_AUDIOMODE_AAC_HE_MPS ((__u32) 0x00000200) - -/* AAC formats are required for encoders and decoders */ -#define SND_AUDIOSTREAMFORMAT_MP2ADTS ((__u32) 0x00000001) -#define SND_AUDIOSTREAMFORMAT_MP4ADTS ((__u32) 0x00000002) -#define SND_AUDIOSTREAMFORMAT_MP4LOAS ((__u32) 0x00000004) -#define SND_AUDIOSTREAMFORMAT_MP4LATM ((__u32) 0x00000008) -#define SND_AUDIOSTREAMFORMAT_ADIF ((__u32) 0x00000010) -#define SND_AUDIOSTREAMFORMAT_MP4FF ((__u32) 0x00000020) -#define SND_AUDIOSTREAMFORMAT_RAW ((__u32) 0x00000040) - -#define SND_AUDIOPROFILE_WMA7 ((__u32) 0x00000001) -#define SND_AUDIOPROFILE_WMA8 ((__u32) 0x00000002) -#define SND_AUDIOPROFILE_WMA9 ((__u32) 0x00000004) -#define SND_AUDIOPROFILE_WMA10 ((__u32) 0x00000008) - -#define SND_AUDIOMODE_WMA_LEVEL1 ((__u32) 0x00000001) -#define SND_AUDIOMODE_WMA_LEVEL2 ((__u32) 0x00000002) -#define SND_AUDIOMODE_WMA_LEVEL3 ((__u32) 0x00000004) -#define SND_AUDIOMODE_WMA_LEVEL4 ((__u32) 0x00000008) -#define SND_AUDIOMODE_WMAPRO_LEVELM0 ((__u32) 0x00000010) -#define SND_AUDIOMODE_WMAPRO_LEVELM1 ((__u32) 0x00000020) -#define SND_AUDIOMODE_WMAPRO_LEVELM2 ((__u32) 0x00000040) -#define SND_AUDIOMODE_WMAPRO_LEVELM3 ((__u32) 0x00000080) - -#define SND_AUDIOSTREAMFORMAT_WMA_ASF ((__u32) 0x00000001) -/* - * Some implementations strip the ASF header and only send ASF packets - * to the DSP - */ -#define SND_AUDIOSTREAMFORMAT_WMA_NOASF_HDR ((__u32) 0x00000002) - -#define SND_AUDIOPROFILE_REALAUDIO ((__u32) 0x00000001) - -#define SND_AUDIOMODE_REALAUDIO_G2 ((__u32) 0x00000001) -#define SND_AUDIOMODE_REALAUDIO_8 ((__u32) 0x00000002) -#define SND_AUDIOMODE_REALAUDIO_10 ((__u32) 0x00000004) -#define SND_AUDIOMODE_REALAUDIO_SURROUND ((__u32) 0x00000008) - -#define SND_AUDIOPROFILE_VORBIS ((__u32) 0x00000001) - -#define SND_AUDIOMODE_VORBIS ((__u32) 0x00000001) - -#define SND_AUDIOPROFILE_FLAC ((__u32) 0x00000001) - -/* - * Define quality levels for FLAC encoders, from LEVEL0 (fast) - * to LEVEL8 (best) - */ -#define SND_AUDIOMODE_FLAC_LEVEL0 ((__u32) 0x00000001) -#define SND_AUDIOMODE_FLAC_LEVEL1 ((__u32) 0x00000002) -#define SND_AUDIOMODE_FLAC_LEVEL2 ((__u32) 0x00000004) -#define SND_AUDIOMODE_FLAC_LEVEL3 ((__u32) 0x00000008) -#define SND_AUDIOMODE_FLAC_LEVEL4 ((__u32) 0x00000010) -#define SND_AUDIOMODE_FLAC_LEVEL5 ((__u32) 0x00000020) -#define SND_AUDIOMODE_FLAC_LEVEL6 ((__u32) 0x00000040) -#define SND_AUDIOMODE_FLAC_LEVEL7 ((__u32) 0x00000080) -#define SND_AUDIOMODE_FLAC_LEVEL8 ((__u32) 0x00000100) - -#define SND_AUDIOSTREAMFORMAT_FLAC ((__u32) 0x00000001) -#define SND_AUDIOSTREAMFORMAT_FLAC_OGG ((__u32) 0x00000002) - -/* IEC61937 payloads without CUVP and preambles */ -#define SND_AUDIOPROFILE_IEC61937 ((__u32) 0x00000001) -/* IEC61937 with S/PDIF preambles+CUVP bits in 32-bit containers */ -#define SND_AUDIOPROFILE_IEC61937_SPDIF ((__u32) 0x00000002) - -/* - * IEC modes are mandatory for decoders. Format autodetection - * will only happen on the DSP side with mode 0. The PCM mode should - * not be used, the PCM codec should be used instead. - */ -#define SND_AUDIOMODE_IEC_REF_STREAM_HEADER ((__u32) 0x00000000) -#define SND_AUDIOMODE_IEC_LPCM ((__u32) 0x00000001) -#define SND_AUDIOMODE_IEC_AC3 ((__u32) 0x00000002) -#define SND_AUDIOMODE_IEC_MPEG1 ((__u32) 0x00000004) -#define SND_AUDIOMODE_IEC_MP3 ((__u32) 0x00000008) -#define SND_AUDIOMODE_IEC_MPEG2 ((__u32) 0x00000010) -#define SND_AUDIOMODE_IEC_AACLC ((__u32) 0x00000020) -#define SND_AUDIOMODE_IEC_DTS ((__u32) 0x00000040) -#define SND_AUDIOMODE_IEC_ATRAC ((__u32) 0x00000080) -#define SND_AUDIOMODE_IEC_SACD ((__u32) 0x00000100) -#define SND_AUDIOMODE_IEC_EAC3 ((__u32) 0x00000200) -#define SND_AUDIOMODE_IEC_DTS_HD ((__u32) 0x00000400) -#define SND_AUDIOMODE_IEC_MLP ((__u32) 0x00000800) -#define SND_AUDIOMODE_IEC_DST ((__u32) 0x00001000) -#define SND_AUDIOMODE_IEC_WMAPRO ((__u32) 0x00002000) -#define SND_AUDIOMODE_IEC_REF_CXT ((__u32) 0x00004000) -#define SND_AUDIOMODE_IEC_HE_AAC ((__u32) 0x00008000) -#define SND_AUDIOMODE_IEC_HE_AAC2 ((__u32) 0x00010000) -#define SND_AUDIOMODE_IEC_MPEG_SURROUND ((__u32) 0x00020000) - -#define SND_AUDIOPROFILE_G723_1 ((__u32) 0x00000001) - -#define SND_AUDIOMODE_G723_1_ANNEX_A ((__u32) 0x00000001) -#define SND_AUDIOMODE_G723_1_ANNEX_B ((__u32) 0x00000002) -#define SND_AUDIOMODE_G723_1_ANNEX_C ((__u32) 0x00000004) - -#define SND_AUDIOPROFILE_G729 ((__u32) 0x00000001) - -#define SND_AUDIOMODE_G729_ANNEX_A ((__u32) 0x00000001) -#define SND_AUDIOMODE_G729_ANNEX_B ((__u32) 0x00000002) - -/* */ - -/* VBR/CBR definitions */ -#define SND_RATECONTROLMODE_CONSTANTBITRATE ((__u32) 0x00000001) -#define SND_RATECONTROLMODE_VARIABLEBITRATE ((__u32) 0x00000002) - -/* Encoder options */ - -struct snd_enc_wma { - __u32 super_block_align; /* WMA Type-specific data */ -}; - - -/** - * struct snd_enc_vorbis - * @quality: Sets encoding quality to n, between -1 (low) and 10 (high). - * In the default mode of operation, the quality level is 3. - * Normal quality range is 0 - 10. - * @managed: Boolean. Set bitrate management mode. This turns off the - * normal VBR encoding, but allows hard or soft bitrate constraints to be - * enforced by the encoder. This mode can be slower, and may also be - * lower quality. It is primarily useful for streaming. - * @max_bit_rate: Enabled only if managed is TRUE - * @min_bit_rate: Enabled only if managed is TRUE - * @downmix: Boolean. Downmix input from stereo to mono (has no effect on - * non-stereo streams). Useful for lower-bitrate encoding. - * - * These options were extracted from the OpenMAX IL spec and Gstreamer vorbisenc - * properties - * - * For best quality users should specify VBR mode and set quality levels. - */ - -struct snd_enc_vorbis { - __s32 quality; - __u32 managed; - __u32 max_bit_rate; - __u32 min_bit_rate; - __u32 downmix; -} __attribute__((packed, aligned(4))); - - -/** - * struct snd_enc_real - * @quant_bits: number of coupling quantization bits in the stream - * @start_region: coupling start region in the stream - * @num_regions: number of regions value - * - * These options were extracted from the OpenMAX IL spec - */ - -struct snd_enc_real { - __u32 quant_bits; - __u32 start_region; - __u32 num_regions; -} __attribute__((packed, aligned(4))); - -/** - * struct snd_enc_flac - * @num: serial number, valid only for OGG formats - * needs to be set by application - * @gain: Add replay gain tags - * - * These options were extracted from the FLAC online documentation - * at http://flac.sourceforge.net/documentation_tools_flac.html - * - * To make the API simpler, it is assumed that the user will select quality - * profiles. Additional options that affect encoding quality and speed can - * be added at a later stage if needed. - * - * By default the Subset format is used by encoders. - * - * TAGS such as pictures, etc, cannot be handled by an offloaded encoder and are - * not supported in this API. - */ - -struct snd_enc_flac { - __u32 num; - __u32 gain; -} __attribute__((packed, aligned(4))); - -struct snd_enc_generic { - __u32 bw; /* encoder bandwidth */ - __s32 reserved[15]; /* Can be used for SND_AUDIOCODEC_BESPOKE */ -} __attribute__((packed, aligned(4))); - -union snd_codec_options { - struct snd_enc_wma wma; - struct snd_enc_vorbis vorbis; - struct snd_enc_real real; - struct snd_enc_flac flac; - struct snd_enc_generic generic; -} __attribute__((packed, aligned(4))); - -/** struct snd_codec_desc - description of codec capabilities - * @max_ch: Maximum number of audio channels - * @sample_rates: Sampling rates in Hz, use values like 48000 for this - * @num_sample_rates: Number of valid values in sample_rates array - * @bit_rate: Indexed array containing supported bit rates - * @num_bitrates: Number of valid values in bit_rate array - * @rate_control: value is specified by SND_RATECONTROLMODE defines. - * @profiles: Supported profiles. See SND_AUDIOPROFILE defines. - * @modes: Supported modes. See SND_AUDIOMODE defines - * @formats: Supported formats. See SND_AUDIOSTREAMFORMAT defines - * @min_buffer: Minimum buffer size handled by codec implementation - * @reserved: reserved for future use - * - * This structure provides a scalar value for profiles, modes and stream - * format fields. - * If an implementation supports multiple combinations, they will be listed as - * codecs with different descriptors, for example there would be 2 descriptors - * for AAC-RAW and AAC-ADTS. - * This entails some redundancy but makes it easier to avoid invalid - * configurations. - * - */ - -struct snd_codec_desc { - __u32 max_ch; - __u32 sample_rates[MAX_NUM_SAMPLE_RATES]; - __u32 num_sample_rates; - __u32 bit_rate[MAX_NUM_BITRATES]; - __u32 num_bitrates; - __u32 rate_control; - __u32 profiles; - __u32 modes; - __u32 formats; - __u32 min_buffer; - __u32 reserved[15]; -} __attribute__((packed, aligned(4))); - -/** struct snd_codec - * @id: Identifies the supported audio encoder/decoder. - * See SND_AUDIOCODEC macros. - * @ch_in: Number of input audio channels - * @ch_out: Number of output channels. In case of contradiction between - * this field and the channelMode field, the channelMode field - * overrides. - * @sample_rate: Audio sample rate of input data in Hz, use values like 48000 - * for this. - * @bit_rate: Bitrate of encoded data. May be ignored by decoders - * @rate_control: Encoding rate control. See SND_RATECONTROLMODE defines. - * Encoders may rely on profiles for quality levels. - * May be ignored by decoders. - * @profile: Mandatory for encoders, can be mandatory for specific - * decoders as well. See SND_AUDIOPROFILE defines. - * @level: Supported level (Only used by WMA at the moment) - * @ch_mode: Channel mode for encoder. See SND_AUDIOCHANMODE defines - * @format: Format of encoded bistream. Mandatory when defined. - * See SND_AUDIOSTREAMFORMAT defines. - * @align: Block alignment in bytes of an audio sample. - * Only required for PCM or IEC formats. - * @options: encoder-specific settings - * @reserved: reserved for future use - */ - -struct snd_codec { - __u32 id; - __u32 ch_in; - __u32 ch_out; - __u32 sample_rate; - __u32 bit_rate; - __u32 rate_control; - __u32 profile; - __u32 level; - __u32 ch_mode; - __u32 format; - __u32 align; - union snd_codec_options options; - __u32 reserved[3]; -} __attribute__((packed, aligned(4))); - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/emu10k1.h b/lib/libc/include/generic-musl/sound/emu10k1.h deleted file mode 100644 index 36e0931af5..0000000000 --- a/lib/libc/include/generic-musl/sound/emu10k1.h +++ /dev/null @@ -1,379 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * Copyright (c) by Jaroslav Kysela , - * Creative Labs, Inc. - * Definitions for EMU10K1 (SB Live!) chips - * - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ -#ifndef __SOUND_EMU10K1_H -#define __SOUND_EMU10K1_H - -#include -#include - -/* - * ---- FX8010 ---- - */ - -#define EMU10K1_CARD_CREATIVE 0x00000000 -#define EMU10K1_CARD_EMUAPS 0x00000001 - -#define EMU10K1_FX8010_PCM_COUNT 8 - -/* - * Following definition is copied from linux/types.h to support compiling - * this header file in userspace since they are not generally available for - * uapi headers. - */ -#define __EMU10K1_DECLARE_BITMAP(name,bits) \ - unsigned long name[(bits) / (sizeof(unsigned long) * 8)] - -/* instruction set */ -#define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */ -#define iMAC1 0x01 /* R = A + (-X * Y >> 31) ; saturation */ -#define iMAC2 0x02 /* R = A + (X * Y >> 31) ; wraparound */ -#define iMAC3 0x03 /* R = A + (-X * Y >> 31) ; wraparound */ -#define iMACINT0 0x04 /* R = A + X * Y ; saturation */ -#define iMACINT1 0x05 /* R = A + X * Y ; wraparound (31-bit) */ -#define iACC3 0x06 /* R = A + X + Y ; saturation */ -#define iMACMV 0x07 /* R = A, acc += X * Y >> 31 */ -#define iANDXOR 0x08 /* R = (A & X) ^ Y */ -#define iTSTNEG 0x09 /* R = (A >= Y) ? X : ~X */ -#define iLIMITGE 0x0a /* R = (A >= Y) ? X : Y */ -#define iLIMITLT 0x0b /* R = (A < Y) ? X : Y */ -#define iLOG 0x0c /* R = linear_data, A (log_data), X (max_exp), Y (format_word) */ -#define iEXP 0x0d /* R = log_data, A (linear_data), X (max_exp), Y (format_word) */ -#define iINTERP 0x0e /* R = A + (X * (Y - A) >> 31) ; saturation */ -#define iSKIP 0x0f /* R = A (cc_reg), X (count), Y (cc_test) */ - -/* GPRs */ -#define FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x0f */ -#define EXTIN(x) (0x10 + (x)) /* x = 0x00 - 0x0f */ -#define EXTOUT(x) (0x20 + (x)) /* x = 0x00 - 0x0f physical outs -> FXWC low 16 bits */ -#define FXBUS2(x) (0x30 + (x)) /* x = 0x00 - 0x0f copies of fx buses for capture -> FXWC high 16 bits */ - /* NB: 0x31 and 0x32 are shared with Center/LFE on SB live 5.1 */ - -#define C_00000000 0x40 -#define C_00000001 0x41 -#define C_00000002 0x42 -#define C_00000003 0x43 -#define C_00000004 0x44 -#define C_00000008 0x45 -#define C_00000010 0x46 -#define C_00000020 0x47 -#define C_00000100 0x48 -#define C_00010000 0x49 -#define C_00080000 0x4a -#define C_10000000 0x4b -#define C_20000000 0x4c -#define C_40000000 0x4d -#define C_80000000 0x4e -#define C_7fffffff 0x4f -#define C_ffffffff 0x50 -#define C_fffffffe 0x51 -#define C_c0000000 0x52 -#define C_4f1bbcdc 0x53 -#define C_5a7ef9db 0x54 -#define C_00100000 0x55 /* ?? */ -#define GPR_ACCU 0x56 /* ACCUM, accumulator */ -#define GPR_COND 0x57 /* CCR, condition register */ -#define GPR_NOISE0 0x58 /* noise source */ -#define GPR_NOISE1 0x59 /* noise source */ -#define GPR_IRQ 0x5a /* IRQ register */ -#define GPR_DBAC 0x5b /* TRAM Delay Base Address Counter */ -#define GPR(x) (FXGPREGBASE + (x)) /* free GPRs: x = 0x00 - 0xff */ -#define ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */ -#define ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */ -#define ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */ -#define ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */ - -#define A_ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ -#define A_ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */ -#define A_ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ -#define A_ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */ -#define A_ITRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ -#define A_ETRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */ - -#define A_FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x3f FX buses */ -#define A_EXTIN(x) (0x40 + (x)) /* x = 0x00 - 0x0f physical ins */ -#define A_P16VIN(x) (0x50 + (x)) /* x = 0x00 - 0x0f p16v ins (A2 only) "EMU32 inputs" */ -#define A_EXTOUT(x) (0x60 + (x)) /* x = 0x00 - 0x1f physical outs -> A_FXWC1 0x79-7f unknown */ -#define A_FXBUS2(x) (0x80 + (x)) /* x = 0x00 - 0x1f extra outs used for EFX capture -> A_FXWC2 */ -#define A_EMU32OUTH(x) (0xa0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_10 - _1F" - ??? */ -#define A_EMU32OUTL(x) (0xb0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_1 - _F" - ??? */ -#define A3_EMU32IN(x) (0x160 + (x)) /* x = 0x00 - 0x3f "EMU32_IN_00 - _3F" - Only when .device = 0x0008 */ -#define A3_EMU32OUT(x) (0x1E0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_00 - _3F" - Only when .device = 0x0008 */ -#define A_GPR(x) (A_FXGPREGBASE + (x)) - -/* cc_reg constants */ -#define CC_REG_NORMALIZED C_00000001 -#define CC_REG_BORROW C_00000002 -#define CC_REG_MINUS C_00000004 -#define CC_REG_ZERO C_00000008 -#define CC_REG_SATURATE C_00000010 -#define CC_REG_NONZERO C_00000100 - -/* FX buses */ -#define FXBUS_PCM_LEFT 0x00 -#define FXBUS_PCM_RIGHT 0x01 -#define FXBUS_PCM_LEFT_REAR 0x02 -#define FXBUS_PCM_RIGHT_REAR 0x03 -#define FXBUS_MIDI_LEFT 0x04 -#define FXBUS_MIDI_RIGHT 0x05 -#define FXBUS_PCM_CENTER 0x06 -#define FXBUS_PCM_LFE 0x07 -#define FXBUS_PCM_LEFT_FRONT 0x08 -#define FXBUS_PCM_RIGHT_FRONT 0x09 -#define FXBUS_MIDI_REVERB 0x0c -#define FXBUS_MIDI_CHORUS 0x0d -#define FXBUS_PCM_LEFT_SIDE 0x0e -#define FXBUS_PCM_RIGHT_SIDE 0x0f -#define FXBUS_PT_LEFT 0x14 -#define FXBUS_PT_RIGHT 0x15 - -/* Inputs */ -#define EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */ -#define EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */ -#define EXTIN_SPDIF_CD_L 0x02 /* internal S/PDIF CD - onboard - left */ -#define EXTIN_SPDIF_CD_R 0x03 /* internal S/PDIF CD - onboard - right */ -#define EXTIN_ZOOM_L 0x04 /* Zoom Video I2S - left */ -#define EXTIN_ZOOM_R 0x05 /* Zoom Video I2S - right */ -#define EXTIN_TOSLINK_L 0x06 /* LiveDrive - TOSLink Optical - left */ -#define EXTIN_TOSLINK_R 0x07 /* LiveDrive - TOSLink Optical - right */ -#define EXTIN_LINE1_L 0x08 /* LiveDrive - Line/Mic 1 - left */ -#define EXTIN_LINE1_R 0x09 /* LiveDrive - Line/Mic 1 - right */ -#define EXTIN_COAX_SPDIF_L 0x0a /* LiveDrive - Coaxial S/PDIF - left */ -#define EXTIN_COAX_SPDIF_R 0x0b /* LiveDrive - Coaxial S/PDIF - right */ -#define EXTIN_LINE2_L 0x0c /* LiveDrive - Line/Mic 2 - left */ -#define EXTIN_LINE2_R 0x0d /* LiveDrive - Line/Mic 2 - right */ - -/* Outputs */ -#define EXTOUT_AC97_L 0x00 /* AC'97 playback channel - left */ -#define EXTOUT_AC97_R 0x01 /* AC'97 playback channel - right */ -#define EXTOUT_TOSLINK_L 0x02 /* LiveDrive - TOSLink Optical - left */ -#define EXTOUT_TOSLINK_R 0x03 /* LiveDrive - TOSLink Optical - right */ -#define EXTOUT_AC97_CENTER 0x04 /* SB Live 5.1 - center */ -#define EXTOUT_AC97_LFE 0x05 /* SB Live 5.1 - LFE */ -#define EXTOUT_HEADPHONE_L 0x06 /* LiveDrive - Headphone - left */ -#define EXTOUT_HEADPHONE_R 0x07 /* LiveDrive - Headphone - right */ -#define EXTOUT_REAR_L 0x08 /* Rear channel - left */ -#define EXTOUT_REAR_R 0x09 /* Rear channel - right */ -#define EXTOUT_ADC_CAP_L 0x0a /* ADC Capture buffer - left */ -#define EXTOUT_ADC_CAP_R 0x0b /* ADC Capture buffer - right */ -#define EXTOUT_MIC_CAP 0x0c /* MIC Capture buffer */ -#define EXTOUT_AC97_REAR_L 0x0d /* SB Live 5.1 (c) 2003 - Rear Left */ -#define EXTOUT_AC97_REAR_R 0x0e /* SB Live 5.1 (c) 2003 - Rear Right */ -#define EXTOUT_ACENTER 0x11 /* Analog Center */ -#define EXTOUT_ALFE 0x12 /* Analog LFE */ - -/* Audigy Inputs */ -#define A_EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */ -#define A_EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */ -#define A_EXTIN_SPDIF_CD_L 0x02 /* digital CD left */ -#define A_EXTIN_SPDIF_CD_R 0x03 /* digital CD left */ -#define A_EXTIN_OPT_SPDIF_L 0x04 /* audigy drive Optical SPDIF - left */ -#define A_EXTIN_OPT_SPDIF_R 0x05 /* right */ -#define A_EXTIN_LINE2_L 0x08 /* audigy drive line2/mic2 - left */ -#define A_EXTIN_LINE2_R 0x09 /* right */ -#define A_EXTIN_ADC_L 0x0a /* Philips ADC - left */ -#define A_EXTIN_ADC_R 0x0b /* right */ -#define A_EXTIN_AUX2_L 0x0c /* audigy drive aux2 - left */ -#define A_EXTIN_AUX2_R 0x0d /* - right */ - -/* Audigiy Outputs */ -#define A_EXTOUT_FRONT_L 0x00 /* digital front left */ -#define A_EXTOUT_FRONT_R 0x01 /* right */ -#define A_EXTOUT_CENTER 0x02 /* digital front center */ -#define A_EXTOUT_LFE 0x03 /* digital front lfe */ -#define A_EXTOUT_HEADPHONE_L 0x04 /* headphone audigy drive left */ -#define A_EXTOUT_HEADPHONE_R 0x05 /* right */ -#define A_EXTOUT_REAR_L 0x06 /* digital rear left */ -#define A_EXTOUT_REAR_R 0x07 /* right */ -#define A_EXTOUT_AFRONT_L 0x08 /* analog front left */ -#define A_EXTOUT_AFRONT_R 0x09 /* right */ -#define A_EXTOUT_ACENTER 0x0a /* analog center */ -#define A_EXTOUT_ALFE 0x0b /* analog LFE */ -#define A_EXTOUT_ASIDE_L 0x0c /* analog side left - Audigy 2 ZS */ -#define A_EXTOUT_ASIDE_R 0x0d /* right - Audigy 2 ZS */ -#define A_EXTOUT_AREAR_L 0x0e /* analog rear left */ -#define A_EXTOUT_AREAR_R 0x0f /* right */ -#define A_EXTOUT_AC97_L 0x10 /* AC97 left (front) */ -#define A_EXTOUT_AC97_R 0x11 /* right */ -#define A_EXTOUT_ADC_CAP_L 0x16 /* ADC capture buffer left */ -#define A_EXTOUT_ADC_CAP_R 0x17 /* right */ -#define A_EXTOUT_MIC_CAP 0x18 /* Mic capture buffer */ - -/* Audigy constants */ -#define A_C_00000000 0xc0 -#define A_C_00000001 0xc1 -#define A_C_00000002 0xc2 -#define A_C_00000003 0xc3 -#define A_C_00000004 0xc4 -#define A_C_00000008 0xc5 -#define A_C_00000010 0xc6 -#define A_C_00000020 0xc7 -#define A_C_00000100 0xc8 -#define A_C_00010000 0xc9 -#define A_C_00000800 0xca -#define A_C_10000000 0xcb -#define A_C_20000000 0xcc -#define A_C_40000000 0xcd -#define A_C_80000000 0xce -#define A_C_7fffffff 0xcf -#define A_C_ffffffff 0xd0 -#define A_C_fffffffe 0xd1 -#define A_C_c0000000 0xd2 -#define A_C_4f1bbcdc 0xd3 -#define A_C_5a7ef9db 0xd4 -#define A_C_00100000 0xd5 -#define A_GPR_ACCU 0xd6 /* ACCUM, accumulator */ -#define A_GPR_COND 0xd7 /* CCR, condition register */ -#define A_GPR_NOISE0 0xd8 /* noise source */ -#define A_GPR_NOISE1 0xd9 /* noise source */ -#define A_GPR_IRQ 0xda /* IRQ register */ -#define A_GPR_DBAC 0xdb /* TRAM Delay Base Address Counter - internal */ -#define A_GPR_DBACE 0xde /* TRAM Delay Base Address Counter - external */ - -/* definitions for debug register */ -#define EMU10K1_DBG_ZC 0x80000000 /* zero tram counter */ -#define EMU10K1_DBG_SATURATION_OCCURED 0x02000000 /* saturation control */ -#define EMU10K1_DBG_SATURATION_ADDR 0x01ff0000 /* saturation address */ -#define EMU10K1_DBG_SINGLE_STEP 0x00008000 /* single step mode */ -#define EMU10K1_DBG_STEP 0x00004000 /* start single step */ -#define EMU10K1_DBG_CONDITION_CODE 0x00003e00 /* condition code */ -#define EMU10K1_DBG_SINGLE_STEP_ADDR 0x000001ff /* single step address */ - -/* tank memory address line */ -#define TANKMEMADDRREG_ADDR_MASK 0x000fffff /* 20 bit tank address field */ -#define TANKMEMADDRREG_CLEAR 0x00800000 /* Clear tank memory */ -#define TANKMEMADDRREG_ALIGN 0x00400000 /* Align read or write relative to tank access */ -#define TANKMEMADDRREG_WRITE 0x00200000 /* Write to tank memory */ -#define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */ - -struct snd_emu10k1_fx8010_info { - unsigned int internal_tram_size; /* in samples */ - unsigned int external_tram_size; /* in samples */ - char fxbus_names[16][32]; /* names of FXBUSes */ - char extin_names[16][32]; /* names of external inputs */ - char extout_names[32][32]; /* names of external outputs */ - unsigned int gpr_controls; /* count of GPR controls */ -}; - -#define EMU10K1_GPR_TRANSLATION_NONE 0 -#define EMU10K1_GPR_TRANSLATION_TABLE100 1 -#define EMU10K1_GPR_TRANSLATION_BASS 2 -#define EMU10K1_GPR_TRANSLATION_TREBLE 3 -#define EMU10K1_GPR_TRANSLATION_ONOFF 4 - -struct snd_emu10k1_fx8010_control_gpr { - struct snd_ctl_elem_id id; /* full control ID definition */ - unsigned int vcount; /* visible count */ - unsigned int count; /* count of GPR (1..16) */ - unsigned short gpr[32]; /* GPR number(s) */ - unsigned int value[32]; /* initial values */ - unsigned int min; /* minimum range */ - unsigned int max; /* maximum range */ - unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */ - const unsigned int *tlv; -}; - -/* old ABI without TLV support */ -struct snd_emu10k1_fx8010_control_old_gpr { - struct snd_ctl_elem_id id; - unsigned int vcount; - unsigned int count; - unsigned short gpr[32]; - unsigned int value[32]; - unsigned int min; - unsigned int max; - unsigned int translation; -}; - -struct snd_emu10k1_fx8010_code { - char name[128]; - - __EMU10K1_DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ - __u32 *gpr_map; /* initializers */ - - unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */ - struct snd_emu10k1_fx8010_control_gpr *gpr_add_controls; /* GPR controls to add/replace */ - - unsigned int gpr_del_control_count; /* count of GPR controls to remove */ - struct snd_ctl_elem_id *gpr_del_controls; /* IDs of GPR controls to remove */ - - unsigned int gpr_list_control_count; /* count of GPR controls to list */ - unsigned int gpr_list_control_total; /* total count of GPR controls */ - struct snd_emu10k1_fx8010_control_gpr *gpr_list_controls; /* listed GPR controls */ - - __EMU10K1_DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */ - __u32 *tram_data_map; /* data initializers */ - __u32 *tram_addr_map; /* map initializers */ - - __EMU10K1_DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */ - __u32 *code; /* one instruction - 64 bits */ -}; - -struct snd_emu10k1_fx8010_tram { - unsigned int address; /* 31.bit == 1 -> external TRAM */ - unsigned int size; /* size in samples (4 bytes) */ - unsigned int *samples; /* pointer to samples (20-bit) */ - /* NULL->clear memory */ -}; - -struct snd_emu10k1_fx8010_pcm_rec { - unsigned int substream; /* substream number */ - unsigned int res1; /* reserved */ - unsigned int channels; /* 16-bit channels count, zero = remove this substream */ - unsigned int tram_start; /* ring buffer position in TRAM (in samples) */ - unsigned int buffer_size; /* count of buffered samples */ - unsigned short gpr_size; /* GPR containing size of ringbuffer in samples (host) */ - unsigned short gpr_ptr; /* GPR containing current pointer in the ring buffer (host = reset, FX8010) */ - unsigned short gpr_count; /* GPR containing count of samples between two interrupts (host) */ - unsigned short gpr_tmpcount; /* GPR containing current count of samples to interrupt (host = set, FX8010) */ - unsigned short gpr_trigger; /* GPR containing trigger (activate) information (host) */ - unsigned short gpr_running; /* GPR containing info if PCM is running (FX8010) */ - unsigned char pad; /* reserved */ - unsigned char etram[32]; /* external TRAM address & data (one per channel) */ - unsigned int res2; /* reserved */ -}; - -#define SNDRV_EMU10K1_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1) - -#define SNDRV_EMU10K1_IOCTL_INFO _IOR ('H', 0x10, struct snd_emu10k1_fx8010_info) -#define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW ('H', 0x11, struct snd_emu10k1_fx8010_code) -#define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code) -#define SNDRV_EMU10K1_IOCTL_TRAM_SETUP _IOW ('H', 0x20, int) -#define SNDRV_EMU10K1_IOCTL_TRAM_POKE _IOW ('H', 0x21, struct snd_emu10k1_fx8010_tram) -#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram) -#define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW ('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec) -#define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec) -#define SNDRV_EMU10K1_IOCTL_PVERSION _IOR ('H', 0x40, int) -#define SNDRV_EMU10K1_IOCTL_STOP _IO ('H', 0x80) -#define SNDRV_EMU10K1_IOCTL_CONTINUE _IO ('H', 0x81) -#define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82) -#define SNDRV_EMU10K1_IOCTL_SINGLE_STEP _IOW ('H', 0x83, int) -#define SNDRV_EMU10K1_IOCTL_DBG_READ _IOR ('H', 0x84, int) - -/* typedefs for compatibility to user-space */ -typedef struct snd_emu10k1_fx8010_info emu10k1_fx8010_info_t; -typedef struct snd_emu10k1_fx8010_control_gpr emu10k1_fx8010_control_gpr_t; -typedef struct snd_emu10k1_fx8010_code emu10k1_fx8010_code_t; -typedef struct snd_emu10k1_fx8010_tram emu10k1_fx8010_tram_t; -typedef struct snd_emu10k1_fx8010_pcm_rec emu10k1_fx8010_pcm_t; - -#endif /* __SOUND_EMU10K1_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/firewire.h b/lib/libc/include/generic-musl/sound/firewire.h deleted file mode 100644 index f5ca0e2a74..0000000000 --- a/lib/libc/include/generic-musl/sound/firewire.h +++ /dev/null @@ -1,91 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _SOUND_FIREWIRE_H_INCLUDED -#define _SOUND_FIREWIRE_H_INCLUDED - -#include -#include - -/* events can be read() from the hwdep device */ - -#define SNDRV_FIREWIRE_EVENT_LOCK_STATUS 0x000010cc -#define SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION 0xd1ce004e -#define SNDRV_FIREWIRE_EVENT_EFW_RESPONSE 0x4e617475 -#define SNDRV_FIREWIRE_EVENT_DIGI00X_MESSAGE 0x746e736c -#define SNDRV_FIREWIRE_EVENT_MOTU_NOTIFICATION 0x64776479 - -struct snd_firewire_event_common { - unsigned int type; /* SNDRV_FIREWIRE_EVENT_xxx */ -}; - -struct snd_firewire_event_lock_status { - unsigned int type; - unsigned int status; /* 0/1 = unlocked/locked */ -}; - -struct snd_firewire_event_dice_notification { - unsigned int type; - unsigned int notification; /* DICE-specific bits */ -}; - -#define SND_EFW_TRANSACTION_USER_SEQNUM_MAX ((__u32)((__u16)~0) - 1) -/* each field should be in big endian */ -struct snd_efw_transaction { - __be32 length; - __be32 version; - __be32 seqnum; - __be32 category; - __be32 command; - __be32 status; - __be32 params[0]; -}; -struct snd_firewire_event_efw_response { - unsigned int type; - __be32 response[0]; /* some responses */ -}; - -struct snd_firewire_event_digi00x_message { - unsigned int type; - __u32 message; /* Digi00x-specific message */ -}; - -struct snd_firewire_event_motu_notification { - unsigned int type; - __u32 message; /* MOTU-specific bits. */ -}; - -union snd_firewire_event { - struct snd_firewire_event_common common; - struct snd_firewire_event_lock_status lock_status; - struct snd_firewire_event_dice_notification dice_notification; - struct snd_firewire_event_efw_response efw_response; - struct snd_firewire_event_digi00x_message digi00x_message; - struct snd_firewire_event_motu_notification motu_notification; -}; - - -#define SNDRV_FIREWIRE_IOCTL_GET_INFO _IOR('H', 0xf8, struct snd_firewire_get_info) -#define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9) -#define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa) - -#define SNDRV_FIREWIRE_TYPE_DICE 1 -#define SNDRV_FIREWIRE_TYPE_FIREWORKS 2 -#define SNDRV_FIREWIRE_TYPE_BEBOB 3 -#define SNDRV_FIREWIRE_TYPE_OXFW 4 -#define SNDRV_FIREWIRE_TYPE_DIGI00X 5 -#define SNDRV_FIREWIRE_TYPE_TASCAM 6 -#define SNDRV_FIREWIRE_TYPE_MOTU 7 -#define SNDRV_FIREWIRE_TYPE_FIREFACE 8 - -struct snd_firewire_get_info { - unsigned int type; /* SNDRV_FIREWIRE_TYPE_xxx */ - unsigned int card; /* same as fw_cdev_get_info.card */ - unsigned char guid[8]; - char device_name[16]; /* device node in /dev */ -}; - -/* - * SNDRV_FIREWIRE_IOCTL_LOCK prevents the driver from streaming. - * Returns -EBUSY if the driver is already streaming. - */ - -#endif /* _SOUND_FIREWIRE_H_INCLUDED */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/hdsp.h b/lib/libc/include/generic-musl/sound/hdsp.h deleted file mode 100644 index 561276cae8..0000000000 --- a/lib/libc/include/generic-musl/sound/hdsp.h +++ /dev/null @@ -1,111 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -#ifndef __SOUND_HDSP_H -#define __SOUND_HDSP_H - -/* - * Copyright (C) 2003 Thomas Charbonnel (thomas@undata.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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -#define HDSP_MATRIX_MIXER_SIZE 2048 - -enum HDSP_IO_Type { - Digiface, - Multiface, - H9652, - H9632, - RPM, - Undefined, -}; - -struct hdsp_peak_rms { - __u32 input_peaks[26]; - __u32 playback_peaks[26]; - __u32 output_peaks[28]; - __u64 input_rms[26]; - __u64 playback_rms[26]; - /* These are only used for H96xx cards */ - __u64 output_rms[26]; -}; - -#define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms) - -struct hdsp_config_info { - unsigned char pref_sync_ref; - unsigned char wordclock_sync_check; - unsigned char spdif_sync_check; - unsigned char adatsync_sync_check; - unsigned char adat_sync_check[3]; - unsigned char spdif_in; - unsigned char spdif_out; - unsigned char spdif_professional; - unsigned char spdif_emphasis; - unsigned char spdif_nonaudio; - unsigned int spdif_sample_rate; - unsigned int system_sample_rate; - unsigned int autosync_sample_rate; - unsigned char system_clock_mode; - unsigned char clock_source; - unsigned char autosync_ref; - unsigned char line_out; - unsigned char passthru; - unsigned char da_gain; - unsigned char ad_gain; - unsigned char phone_gain; - unsigned char xlr_breakout_cable; - unsigned char analog_extension_board; -}; - -#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info) - -struct hdsp_firmware { - void *firmware_data; /* 24413 x 4 bytes */ -}; - -#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware) - -struct hdsp_version { - enum HDSP_IO_Type io_type; - unsigned short firmware_rev; -}; - -#define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version) - -struct hdsp_mixer { - unsigned short matrix[HDSP_MATRIX_MIXER_SIZE]; -}; - -#define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer) - -struct hdsp_9632_aeb { - int aebi; - int aebo; -}; - -#define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb) - -/* typedefs for compatibility to user-space */ -typedef enum HDSP_IO_Type HDSP_IO_Type; -typedef struct hdsp_peak_rms hdsp_peak_rms_t; -typedef struct hdsp_config_info hdsp_config_info_t; -typedef struct hdsp_firmware hdsp_firmware_t; -typedef struct hdsp_version hdsp_version_t; -typedef struct hdsp_mixer hdsp_mixer_t; -typedef struct hdsp_9632_aeb hdsp_9632_aeb_t; - -#endif /* __SOUND_HDSP_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/hdspm.h b/lib/libc/include/generic-musl/sound/hdspm.h deleted file mode 100644 index 76964b0d1b..0000000000 --- a/lib/libc/include/generic-musl/sound/hdspm.h +++ /dev/null @@ -1,232 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -#ifndef __SOUND_HDSPM_H -#define __SOUND_HDSPM_H -/* - * Copyright (C) 2003 Winfried Ritsch (IEM) - * based on hdsp.h from Thomas Charbonnel (thomas@undata.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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -/* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */ -#define HDSPM_MAX_CHANNELS 64 - -enum hdspm_io_type { - MADI, - MADIface, - AIO, - AES32, - RayDAT -}; - -enum hdspm_speed { - ss, - ds, - qs -}; - -/* -------------------- IOCTL Peak/RMS Meters -------------------- */ - -struct hdspm_peak_rms { - __u32 input_peaks[64]; - __u32 playback_peaks[64]; - __u32 output_peaks[64]; - - __u64 input_rms[64]; - __u64 playback_rms[64]; - __u64 output_rms[64]; - - __u8 speed; /* enum {ss, ds, qs} */ - int status2; -}; - -#define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \ - _IOR('H', 0x42, struct hdspm_peak_rms) - -/* ------------ CONFIG block IOCTL ---------------------- */ - -struct hdspm_config { - unsigned char pref_sync_ref; - unsigned char wordclock_sync_check; - unsigned char madi_sync_check; - unsigned int system_sample_rate; - unsigned int autosync_sample_rate; - unsigned char system_clock_mode; - unsigned char clock_source; - unsigned char autosync_ref; - unsigned char line_out; - unsigned int passthru; - unsigned int analog_out; -}; - -#define SNDRV_HDSPM_IOCTL_GET_CONFIG \ - _IOR('H', 0x41, struct hdspm_config) - -/* - * If there's a TCO (TimeCode Option) board installed, - * there are further options and status data available. - * The hdspm_ltc structure contains the current SMPTE - * timecode and some status information and can be - * obtained via SNDRV_HDSPM_IOCTL_GET_LTC or in the - * hdspm_status struct. - */ - -enum hdspm_ltc_format { - format_invalid, - fps_24, - fps_25, - fps_2997, - fps_30 -}; - -enum hdspm_ltc_frame { - frame_invalid, - drop_frame, - full_frame -}; - -enum hdspm_ltc_input_format { - ntsc, - pal, - no_video -}; - -struct hdspm_ltc { - unsigned int ltc; - - enum hdspm_ltc_format format; - enum hdspm_ltc_frame frame; - enum hdspm_ltc_input_format input_format; -}; - -#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc) - -/* - * The status data reflects the device's current state - * as determined by the card's configuration and - * connection status. - */ - -enum hdspm_sync { - hdspm_sync_no_lock = 0, - hdspm_sync_lock = 1, - hdspm_sync_sync = 2 -}; - -enum hdspm_madi_input { - hdspm_input_optical = 0, - hdspm_input_coax = 1 -}; - -enum hdspm_madi_channel_format { - hdspm_format_ch_64 = 0, - hdspm_format_ch_56 = 1 -}; - -enum hdspm_madi_frame_format { - hdspm_frame_48 = 0, - hdspm_frame_96 = 1 -}; - -enum hdspm_syncsource { - syncsource_wc = 0, - syncsource_madi = 1, - syncsource_tco = 2, - syncsource_sync = 3, - syncsource_none = 4 -}; - -struct hdspm_status { - __u8 card_type; /* enum hdspm_io_type */ - enum hdspm_syncsource autosync_source; - - __u64 card_clock; - __u32 master_period; - - union { - struct { - __u8 sync_wc; /* enum hdspm_sync */ - __u8 sync_madi; /* enum hdspm_sync */ - __u8 sync_tco; /* enum hdspm_sync */ - __u8 sync_in; /* enum hdspm_sync */ - __u8 madi_input; /* enum hdspm_madi_input */ - __u8 channel_format; /* enum hdspm_madi_channel_format */ - __u8 frame_format; /* enum hdspm_madi_frame_format */ - } madi; - } card_specific; -}; - -#define SNDRV_HDSPM_IOCTL_GET_STATUS \ - _IOR('H', 0x47, struct hdspm_status) - -/* - * Get information about the card and its add-ons. - */ - -#define HDSPM_ADDON_TCO 1 - -struct hdspm_version { - __u8 card_type; /* enum hdspm_io_type */ - char cardname[20]; - unsigned int serial; - unsigned short firmware_rev; - int addons; -}; - -#define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version) - -/* ------------- get Matrix Mixer IOCTL --------------- */ - -/* MADI mixer: 64inputs+64playback in 64outputs = 8192 => *4Byte = - * 32768 Bytes - */ - -/* organisation is 64 channelfader in a continuous memory block */ -/* equivalent to hardware definition, maybe for future feature of mmap of - * them - */ -/* each of 64 outputs has 64 infader and 64 outfader: - Ins to Outs mixer[out].in[in], Outstreams to Outs mixer[out].pb[pb] */ - -#define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS - -struct hdspm_channelfader { - unsigned int in[HDSPM_MIXER_CHANNELS]; - unsigned int pb[HDSPM_MIXER_CHANNELS]; -}; - -struct hdspm_mixer { - struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS]; -}; - -struct hdspm_mixer_ioctl { - struct hdspm_mixer *mixer; -}; - -/* use indirect access due to the limit of ioctl bit size */ -#define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl) - -/* typedefs for compatibility to user-space */ -typedef struct hdspm_peak_rms hdspm_peak_rms_t; -typedef struct hdspm_config_info hdspm_config_info_t; -typedef struct hdspm_version hdspm_version_t; -typedef struct hdspm_channelfader snd_hdspm_channelfader_t; -typedef struct hdspm_mixer hdspm_mixer_t; - - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/sb16_csp.h b/lib/libc/include/generic-musl/sound/sb16_csp.h deleted file mode 100644 index decb60dc30..0000000000 --- a/lib/libc/include/generic-musl/sound/sb16_csp.h +++ /dev/null @@ -1,123 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * Copyright (c) 1999 by Uros Bizjak - * Takashi Iwai - * - * SB16ASP/AWE32 CSP control - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ -#ifndef __SOUND_SB16_CSP_H -#define __SOUND_SB16_CSP_H - - -/* CSP modes */ -#define SNDRV_SB_CSP_MODE_NONE 0x00 -#define SNDRV_SB_CSP_MODE_DSP_READ 0x01 /* Record from DSP */ -#define SNDRV_SB_CSP_MODE_DSP_WRITE 0x02 /* Play to DSP */ -#define SNDRV_SB_CSP_MODE_QSOUND 0x04 /* QSound */ - -/* CSP load flags */ -#define SNDRV_SB_CSP_LOAD_FROMUSER 0x01 -#define SNDRV_SB_CSP_LOAD_INITBLOCK 0x02 - -/* CSP sample width */ -#define SNDRV_SB_CSP_SAMPLE_8BIT 0x01 -#define SNDRV_SB_CSP_SAMPLE_16BIT 0x02 - -/* CSP channels */ -#define SNDRV_SB_CSP_MONO 0x01 -#define SNDRV_SB_CSP_STEREO 0x02 - -/* CSP rates */ -#define SNDRV_SB_CSP_RATE_8000 0x01 -#define SNDRV_SB_CSP_RATE_11025 0x02 -#define SNDRV_SB_CSP_RATE_22050 0x04 -#define SNDRV_SB_CSP_RATE_44100 0x08 -#define SNDRV_SB_CSP_RATE_ALL 0x0f - -/* CSP running state */ -#define SNDRV_SB_CSP_ST_IDLE 0x00 -#define SNDRV_SB_CSP_ST_LOADED 0x01 -#define SNDRV_SB_CSP_ST_RUNNING 0x02 -#define SNDRV_SB_CSP_ST_PAUSED 0x04 -#define SNDRV_SB_CSP_ST_AUTO 0x08 -#define SNDRV_SB_CSP_ST_QSOUND 0x10 - -/* maximum QSound value (180 degrees right) */ -#define SNDRV_SB_CSP_QSOUND_MAX_RIGHT 0x20 - -/* maximum microcode RIFF file size */ -#define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000 - -/* microcode header */ -struct snd_sb_csp_mc_header { - char codec_name[16]; /* id name of codec */ - unsigned short func_req; /* requested function */ -}; - -/* microcode to be loaded */ -struct snd_sb_csp_microcode { - struct snd_sb_csp_mc_header info; - unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE]; -}; - -/* start CSP with sample_width in mono/stereo */ -struct snd_sb_csp_start { - int sample_width; /* sample width, look above */ - int channels; /* channels, look above */ -}; - -/* CSP information */ -struct snd_sb_csp_info { - char codec_name[16]; /* id name of codec */ - unsigned short func_nr; /* function number */ - unsigned int acc_format; /* accepted PCM formats */ - unsigned short acc_channels; /* accepted channels */ - unsigned short acc_width; /* accepted sample width */ - unsigned short acc_rates; /* accepted sample rates */ - unsigned short csp_mode; /* CSP mode, see above */ - unsigned short run_channels; /* current channels */ - unsigned short run_width; /* current sample width */ - unsigned short version; /* version id: 0x10 - 0x1f */ - unsigned short state; /* state bits */ -}; - -/* HWDEP controls */ -/* get CSP information */ -#define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info) -/* load microcode to CSP */ -/* NOTE: struct snd_sb_csp_microcode overflows the max size (13 bits) - * defined for some architectures like MIPS, and it leads to build errors. - * (x86 and co have 14-bit size, thus it's valid, though.) - * As a workaround for skipping the size-limit check, here we don't use the - * normal _IOW() macro but _IOC() with the manual argument. - */ -#define SNDRV_SB_CSP_IOCTL_LOAD_CODE \ - _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode)) -/* unload microcode from CSP */ -#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12) -/* start CSP */ -#define SNDRV_SB_CSP_IOCTL_START _IOW('H', 0x13, struct snd_sb_csp_start) -/* stop CSP */ -#define SNDRV_SB_CSP_IOCTL_STOP _IO('H', 0x14) -/* pause CSP and DMA transfer */ -#define SNDRV_SB_CSP_IOCTL_PAUSE _IO('H', 0x15) -/* restart CSP and DMA transfer */ -#define SNDRV_SB_CSP_IOCTL_RESTART _IO('H', 0x16) - - -#endif /* __SOUND_SB16_CSP_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/sfnt_info.h b/lib/libc/include/generic-musl/sound/sfnt_info.h deleted file mode 100644 index f2b26ceb83..0000000000 --- a/lib/libc/include/generic-musl/sound/sfnt_info.h +++ /dev/null @@ -1,213 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -#ifndef __SOUND_SFNT_INFO_H -#define __SOUND_SFNT_INFO_H - -/* - * Patch record compatible with AWE driver on OSS - * - * Copyright (C) 1999-2000 Takashi Iwai - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include - -/* - * patch information record - */ - -#ifdef SNDRV_BIG_ENDIAN -#define SNDRV_OSS_PATCHKEY(id) (0xfd00|id) -#else -#define SNDRV_OSS_PATCHKEY(id) ((id<<8)|0xfd) -#endif - -/* patch interface header: 16 bytes */ -struct soundfont_patch_info { - unsigned short key; /* use the key below */ -#define SNDRV_OSS_SOUNDFONT_PATCH SNDRV_OSS_PATCHKEY(0x07) - - short device_no; /* synthesizer number */ - unsigned short sf_id; /* file id (should be zero) */ - short optarg; /* optional argument */ - int len; /* data length (without this header) */ - - short type; /* patch operation type */ -#define SNDRV_SFNT_LOAD_INFO 0 /* awe_voice_rec */ -#define SNDRV_SFNT_LOAD_DATA 1 /* awe_sample_info */ -#define SNDRV_SFNT_OPEN_PATCH 2 /* awe_open_parm */ -#define SNDRV_SFNT_CLOSE_PATCH 3 /* none */ - /* 4 is obsolete */ -#define SNDRV_SFNT_REPLACE_DATA 5 /* awe_sample_info (optarg=#channels)*/ -#define SNDRV_SFNT_MAP_PRESET 6 /* awe_voice_map */ - /* 7 is not used */ -#define SNDRV_SFNT_PROBE_DATA 8 /* optarg=sample */ -#define SNDRV_SFNT_REMOVE_INFO 9 /* optarg=(bank<<8)|instr */ - - short reserved; /* word alignment data */ - - /* the actual patch data begins after this */ -}; - - -/* - * open patch - */ - -#define SNDRV_SFNT_PATCH_NAME_LEN 32 - -struct soundfont_open_parm { - unsigned short type; /* sample type */ -#define SNDRV_SFNT_PAT_TYPE_MISC 0 -#define SNDRV_SFNT_PAT_TYPE_GUS 6 -#define SNDRV_SFNT_PAT_TYPE_MAP 7 -#define SNDRV_SFNT_PAT_LOCKED 0x100 /* lock the samples */ -#define SNDRV_SFNT_PAT_SHARED 0x200 /* sample is shared */ - - short reserved; - char name[SNDRV_SFNT_PATCH_NAME_LEN]; -}; - - -/* - * raw voice information record - */ - -/* wave table envelope & effect parameters to control EMU8000 */ -struct soundfont_voice_parm { - unsigned short moddelay; /* modulation delay (0x8000) */ - unsigned short modatkhld; /* modulation attack & hold time (0x7f7f) */ - unsigned short moddcysus; /* modulation decay & sustain (0x7f7f) */ - unsigned short modrelease; /* modulation release time (0x807f) */ - short modkeyhold, modkeydecay; /* envelope change per key (not used) */ - unsigned short voldelay; /* volume delay (0x8000) */ - unsigned short volatkhld; /* volume attack & hold time (0x7f7f) */ - unsigned short voldcysus; /* volume decay & sustain (0x7f7f) */ - unsigned short volrelease; /* volume release time (0x807f) */ - short volkeyhold, volkeydecay; /* envelope change per key (not used) */ - unsigned short lfo1delay; /* LFO1 delay (0x8000) */ - unsigned short lfo2delay; /* LFO2 delay (0x8000) */ - unsigned short pefe; /* modulation pitch & cutoff (0x0000) */ - unsigned short fmmod; /* LFO1 pitch & cutoff (0x0000) */ - unsigned short tremfrq; /* LFO1 volume & freq (0x0000) */ - unsigned short fm2frq2; /* LFO2 pitch & freq (0x0000) */ - unsigned char cutoff; /* initial cutoff (0xff) */ - unsigned char filterQ; /* initial filter Q [0-15] (0x0) */ - unsigned char chorus; /* chorus send (0x00) */ - unsigned char reverb; /* reverb send (0x00) */ - unsigned short reserved[4]; /* not used */ -}; - - -/* wave table parameters: 92 bytes */ -struct soundfont_voice_info { - unsigned short sf_id; /* file id (should be zero) */ - unsigned short sample; /* sample id */ - int start, end; /* sample offset correction */ - int loopstart, loopend; /* loop offset correction */ - short rate_offset; /* sample rate pitch offset */ - unsigned short mode; /* sample mode */ -#define SNDRV_SFNT_MODE_ROMSOUND 0x8000 -#define SNDRV_SFNT_MODE_STEREO 1 -#define SNDRV_SFNT_MODE_LOOPING 2 -#define SNDRV_SFNT_MODE_NORELEASE 4 /* obsolete */ -#define SNDRV_SFNT_MODE_INIT_PARM 8 - - short root; /* midi root key */ - short tune; /* pitch tuning (in cents) */ - unsigned char low, high; /* key note range */ - unsigned char vellow, velhigh; /* velocity range */ - signed char fixkey, fixvel; /* fixed key, velocity */ - signed char pan, fixpan; /* panning, fixed panning */ - short exclusiveClass; /* exclusive class (0 = none) */ - unsigned char amplitude; /* sample volume (127 max) */ - unsigned char attenuation; /* attenuation (0.375dB) */ - short scaleTuning; /* pitch scale tuning(%), normally 100 */ - struct soundfont_voice_parm parm; /* voice envelope parameters */ - unsigned short sample_mode; /* sample mode_flag (set by driver) */ -}; - - -/* instrument info header: 4 bytes */ -struct soundfont_voice_rec_hdr { - unsigned char bank; /* midi bank number */ - unsigned char instr; /* midi preset number */ - char nvoices; /* number of voices */ - char write_mode; /* write mode; normally 0 */ -#define SNDRV_SFNT_WR_APPEND 0 /* append anyway */ -#define SNDRV_SFNT_WR_EXCLUSIVE 1 /* skip if already exists */ -#define SNDRV_SFNT_WR_REPLACE 2 /* replace if already exists */ -}; - - -/* - * sample wave information - */ - -/* wave table sample header: 32 bytes */ -struct soundfont_sample_info { - unsigned short sf_id; /* file id (should be zero) */ - unsigned short sample; /* sample id */ - int start, end; /* start & end offset */ - int loopstart, loopend; /* loop start & end offset */ - int size; /* size (0 = ROM) */ - short dummy; /* not used */ - unsigned short mode_flags; /* mode flags */ -#define SNDRV_SFNT_SAMPLE_8BITS 1 /* wave data is 8bits */ -#define SNDRV_SFNT_SAMPLE_UNSIGNED 2 /* wave data is unsigned */ -#define SNDRV_SFNT_SAMPLE_NO_BLANK 4 /* no blank loop is attached */ -#define SNDRV_SFNT_SAMPLE_SINGLESHOT 8 /* single-shot w/o loop */ -#define SNDRV_SFNT_SAMPLE_BIDIR_LOOP 16 /* bidirectional looping */ -#define SNDRV_SFNT_SAMPLE_STEREO_LEFT 32 /* stereo left sound */ -#define SNDRV_SFNT_SAMPLE_STEREO_RIGHT 64 /* stereo right sound */ -#define SNDRV_SFNT_SAMPLE_REVERSE_LOOP 128 /* reverse looping */ - unsigned int truesize; /* used memory size (set by driver) */ -}; - - -/* - * voice preset mapping (aliasing) - */ - -struct soundfont_voice_map { - int map_bank, map_instr, map_key; /* key = -1 means all keys */ - int src_bank, src_instr, src_key; -}; - - -/* - * ioctls for hwdep - */ - -#define SNDRV_EMUX_HWDEP_NAME "Emux WaveTable" - -#define SNDRV_EMUX_VERSION ((1 << 16) | (0 << 8) | 0) /* 1.0.0 */ - -struct snd_emux_misc_mode { - int port; /* -1 = all */ - int mode; - int value; - int value2; /* reserved */ -}; - -#define SNDRV_EMUX_IOCTL_VERSION _IOR('H', 0x80, unsigned int) -#define SNDRV_EMUX_IOCTL_LOAD_PATCH _IOWR('H', 0x81, struct soundfont_patch_info) -#define SNDRV_EMUX_IOCTL_RESET_SAMPLES _IO('H', 0x82) -#define SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES _IO('H', 0x83) -#define SNDRV_EMUX_IOCTL_MEM_AVAIL _IOW('H', 0x84, int) -#define SNDRV_EMUX_IOCTL_MISC_MODE _IOWR('H', 0x84, struct snd_emux_misc_mode) - -#endif /* __SOUND_SFNT_INFO_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/skl-tplg-interface.h b/lib/libc/include/generic-musl/sound/skl-tplg-interface.h deleted file mode 100644 index ba92bb6070..0000000000 --- a/lib/libc/include/generic-musl/sound/skl-tplg-interface.h +++ /dev/null @@ -1,239 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * skl-tplg-interface.h - Intel DSP FW private data interface - * - * Copyright (C) 2015 Intel Corp - * Author: Jeeja KP - * Nilofer, Samreen - */ - -#ifndef __HDA_TPLG_INTERFACE_H__ -#define __HDA_TPLG_INTERFACE_H__ - -#include - -/* - * Default types range from 0~12. type can range from 0 to 0xff - * SST types start at higher to avoid any overlapping in future - */ -#define SKL_CONTROL_TYPE_BYTE_TLV 0x100 -#define SKL_CONTROL_TYPE_MIC_SELECT 0x102 - -#define HDA_SST_CFG_MAX 900 /* size of copier cfg*/ -#define MAX_IN_QUEUE 8 -#define MAX_OUT_QUEUE 8 - -#define SKL_UUID_STR_SZ 40 -/* Event types goes here */ -/* Reserve event type 0 for no event handlers */ -enum skl_event_types { - SKL_EVENT_NONE = 0, - SKL_MIXER_EVENT, - SKL_MUX_EVENT, - SKL_VMIXER_EVENT, - SKL_PGA_EVENT -}; - -/** - * enum skl_ch_cfg - channel configuration - * - * @SKL_CH_CFG_MONO: One channel only - * @SKL_CH_CFG_STEREO: L & R - * @SKL_CH_CFG_2_1: L, R & LFE - * @SKL_CH_CFG_3_0: L, C & R - * @SKL_CH_CFG_3_1: L, C, R & LFE - * @SKL_CH_CFG_QUATRO: L, R, Ls & Rs - * @SKL_CH_CFG_4_0: L, C, R & Cs - * @SKL_CH_CFG_5_0: L, C, R, Ls & Rs - * @SKL_CH_CFG_5_1: L, C, R, Ls, Rs & LFE - * @SKL_CH_CFG_DUAL_MONO: One channel replicated in two - * @SKL_CH_CFG_I2S_DUAL_STEREO_0: Stereo(L,R) in 4 slots, 1st stream:[ L, R, -, - ] - * @SKL_CH_CFG_I2S_DUAL_STEREO_1: Stereo(L,R) in 4 slots, 2nd stream:[ -, -, L, R ] - * @SKL_CH_CFG_INVALID: Invalid - */ -enum skl_ch_cfg { - SKL_CH_CFG_MONO = 0, - SKL_CH_CFG_STEREO = 1, - SKL_CH_CFG_2_1 = 2, - SKL_CH_CFG_3_0 = 3, - SKL_CH_CFG_3_1 = 4, - SKL_CH_CFG_QUATRO = 5, - SKL_CH_CFG_4_0 = 6, - SKL_CH_CFG_5_0 = 7, - SKL_CH_CFG_5_1 = 8, - SKL_CH_CFG_DUAL_MONO = 9, - SKL_CH_CFG_I2S_DUAL_STEREO_0 = 10, - SKL_CH_CFG_I2S_DUAL_STEREO_1 = 11, - SKL_CH_CFG_4_CHANNEL = 12, - SKL_CH_CFG_INVALID -}; - -enum skl_module_type { - SKL_MODULE_TYPE_MIXER = 0, - SKL_MODULE_TYPE_COPIER, - SKL_MODULE_TYPE_UPDWMIX, - SKL_MODULE_TYPE_SRCINT, - SKL_MODULE_TYPE_ALGO, - SKL_MODULE_TYPE_BASE_OUTFMT, - SKL_MODULE_TYPE_KPB, - SKL_MODULE_TYPE_MIC_SELECT, -}; - -enum skl_core_affinity { - SKL_AFFINITY_CORE_0 = 0, - SKL_AFFINITY_CORE_1, - SKL_AFFINITY_CORE_MAX -}; - -enum skl_pipe_conn_type { - SKL_PIPE_CONN_TYPE_NONE = 0, - SKL_PIPE_CONN_TYPE_FE, - SKL_PIPE_CONN_TYPE_BE -}; - -enum skl_hw_conn_type { - SKL_CONN_NONE = 0, - SKL_CONN_SOURCE = 1, - SKL_CONN_SINK = 2 -}; - -enum skl_dev_type { - SKL_DEVICE_BT = 0x0, - SKL_DEVICE_DMIC = 0x1, - SKL_DEVICE_I2S = 0x2, - SKL_DEVICE_SLIMBUS = 0x3, - SKL_DEVICE_HDALINK = 0x4, - SKL_DEVICE_HDAHOST = 0x5, - SKL_DEVICE_NONE -}; - -/** - * enum skl_interleaving - interleaving style - * - * @SKL_INTERLEAVING_PER_CHANNEL: [s1_ch1...s1_chN,...,sM_ch1...sM_chN] - * @SKL_INTERLEAVING_PER_SAMPLE: [s1_ch1...sM_ch1,...,s1_chN...sM_chN] - */ -enum skl_interleaving { - SKL_INTERLEAVING_PER_CHANNEL = 0, - SKL_INTERLEAVING_PER_SAMPLE = 1, -}; - -enum skl_sample_type { - SKL_SAMPLE_TYPE_INT_MSB = 0, - SKL_SAMPLE_TYPE_INT_LSB = 1, - SKL_SAMPLE_TYPE_INT_SIGNED = 2, - SKL_SAMPLE_TYPE_INT_UNSIGNED = 3, - SKL_SAMPLE_TYPE_FLOAT = 4 -}; - -enum module_pin_type { - /* All pins of the module takes same PCM inputs or outputs - * e.g. mixout - */ - SKL_PIN_TYPE_HOMOGENEOUS, - /* All pins of the module takes different PCM inputs or outputs - * e.g mux - */ - SKL_PIN_TYPE_HETEROGENEOUS, -}; - -enum skl_module_param_type { - SKL_PARAM_DEFAULT = 0, - SKL_PARAM_INIT, - SKL_PARAM_SET, - SKL_PARAM_BIND -}; - -struct skl_dfw_algo_data { - __u32 set_params:2; - __u32 rsvd:30; - __u32 param_id; - __u32 max; - char params[0]; -} __attribute__((packed)); - -enum skl_tkn_dir { - SKL_DIR_IN, - SKL_DIR_OUT -}; - -enum skl_tuple_type { - SKL_TYPE_TUPLE, - SKL_TYPE_DATA -}; - -/* v4 configuration data */ - -struct skl_dfw_v4_module_pin { - __u16 module_id; - __u16 instance_id; -} __attribute__((packed)); - -struct skl_dfw_v4_module_fmt { - __u32 channels; - __u32 freq; - __u32 bit_depth; - __u32 valid_bit_depth; - __u32 ch_cfg; - __u32 interleaving_style; - __u32 sample_type; - __u32 ch_map; -} __attribute__((packed)); - -struct skl_dfw_v4_module_caps { - __u32 set_params:2; - __u32 rsvd:30; - __u32 param_id; - __u32 caps_size; - __u32 caps[HDA_SST_CFG_MAX]; -} __attribute__((packed)); - -struct skl_dfw_v4_pipe { - __u8 pipe_id; - __u8 pipe_priority; - __u16 conn_type:4; - __u16 rsvd:4; - __u16 memory_pages:8; -} __attribute__((packed)); - -struct skl_dfw_v4_module { - char uuid[SKL_UUID_STR_SZ]; - - __u16 module_id; - __u16 instance_id; - __u32 max_mcps; - __u32 mem_pages; - __u32 obs; - __u32 ibs; - __u32 vbus_id; - - __u32 max_in_queue:8; - __u32 max_out_queue:8; - __u32 time_slot:8; - __u32 core_id:4; - __u32 rsvd1:4; - - __u32 module_type:8; - __u32 conn_type:4; - __u32 dev_type:4; - __u32 hw_conn_type:4; - __u32 rsvd2:12; - - __u32 params_fixup:8; - __u32 converter:8; - __u32 input_pin_type:1; - __u32 output_pin_type:1; - __u32 is_dynamic_in_pin:1; - __u32 is_dynamic_out_pin:1; - __u32 is_loadable:1; - __u32 rsvd3:11; - - struct skl_dfw_v4_pipe pipe; - struct skl_dfw_v4_module_fmt in_fmt[MAX_IN_QUEUE]; - struct skl_dfw_v4_module_fmt out_fmt[MAX_OUT_QUEUE]; - struct skl_dfw_v4_module_pin in_pin[MAX_IN_QUEUE]; - struct skl_dfw_v4_module_pin out_pin[MAX_OUT_QUEUE]; - struct skl_dfw_v4_module_caps caps; -} __attribute__((packed)); - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/snd_sst_tokens.h b/lib/libc/include/generic-musl/sound/snd_sst_tokens.h deleted file mode 100644 index 898bac537a..0000000000 --- a/lib/libc/include/generic-musl/sound/snd_sst_tokens.h +++ /dev/null @@ -1,330 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * snd_sst_tokens.h - Intel SST tokens definition - * - * Copyright (C) 2016 Intel Corp - * Author: Shreyas NC - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as version 2, as - * published by the Free Software Foundation. - * - * 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. - */ -#ifndef __SND_SST_TOKENS_H__ -#define __SND_SST_TOKENS_H__ - -/** - * %SKL_TKN_UUID: Module UUID - * - * %SKL_TKN_U8_BLOCK_TYPE: Type of the private data block.Can be: - * tuples, bytes, short and words - * - * %SKL_TKN_U8_IN_PIN_TYPE: Input pin type, - * homogenous=0, heterogenous=1 - * - * %SKL_TKN_U8_OUT_PIN_TYPE: Output pin type, - * homogenous=0, heterogenous=1 - * %SKL_TKN_U8_DYN_IN_PIN: Configure Input pin dynamically - * if true - * - * %SKL_TKN_U8_DYN_OUT_PIN: Configure Output pin dynamically - * if true - * - * %SKL_TKN_U8_IN_QUEUE_COUNT: Store the number of Input pins - * - * %SKL_TKN_U8_OUT_QUEUE_COUNT: Store the number of Output pins - * - * %SKL_TKN_U8_TIME_SLOT: TDM slot number - * - * %SKL_TKN_U8_CORE_ID: Stores module affinity value.Can take - * the values: - * SKL_AFFINITY_CORE_0 = 0, - * SKL_AFFINITY_CORE_1, - * SKL_AFFINITY_CORE_MAX - * - * %SKL_TKN_U8_MOD_TYPE: Module type value. - * - * %SKL_TKN_U8_CONN_TYPE: Module connection type can be a FE, - * BE or NONE as defined : - * SKL_PIPE_CONN_TYPE_NONE = 0, - * SKL_PIPE_CONN_TYPE_FE = 1 (HOST_DMA) - * SKL_PIPE_CONN_TYPE_BE = 2 (LINK_DMA) - * - * %SKL_TKN_U8_DEV_TYPE: Type of device to which the module is - * connected - * Can take the values: - * SKL_DEVICE_BT = 0x0, - * SKL_DEVICE_DMIC = 0x1, - * SKL_DEVICE_I2S = 0x2, - * SKL_DEVICE_SLIMBUS = 0x3, - * SKL_DEVICE_HDALINK = 0x4, - * SKL_DEVICE_HDAHOST = 0x5, - * SKL_DEVICE_NONE - * - * %SKL_TKN_U8_HW_CONN_TYPE: Connection type of the HW to which the - * module is connected - * SKL_CONN_NONE = 0, - * SKL_CONN_SOURCE = 1, - * SKL_CONN_SINK = 2 - * - * %SKL_TKN_U16_PIN_INST_ID: Stores the pin instance id - * - * %SKL_TKN_U16_MOD_INST_ID: Stores the mdule instance id - * - * %SKL_TKN_U32_MAX_MCPS: Module max mcps value - * - * %SKL_TKN_U32_MEM_PAGES: Module resource pages - * - * %SKL_TKN_U32_OBS: Stores Output Buffer size - * - * %SKL_TKN_U32_IBS: Stores input buffer size - * - * %SKL_TKN_U32_VBUS_ID: Module VBUS_ID. PDM=0, SSP0=0, - * SSP1=1,SSP2=2, - * SSP3=3, SSP4=4, - * SSP5=5, SSP6=6,INVALID - * - * %SKL_TKN_U32_PARAMS_FIXUP: Module Params fixup mask - * %SKL_TKN_U32_CONVERTER: Module params converter mask - * %SKL_TKN_U32_PIPE_ID: Stores the pipe id - * - * %SKL_TKN_U32_PIPE_CONN_TYPE: Type of the token to which the pipe is - * connected to. It can be - * SKL_PIPE_CONN_TYPE_NONE = 0, - * SKL_PIPE_CONN_TYPE_FE = 1 (HOST_DMA), - * SKL_PIPE_CONN_TYPE_BE = 2 (LINK_DMA), - * - * %SKL_TKN_U32_PIPE_PRIORITY: Pipe priority value - * %SKL_TKN_U32_PIPE_MEM_PGS: Pipe resource pages - * - * %SKL_TKN_U32_DIR_PIN_COUNT: Value for the direction to set input/output - * formats and the pin count. - * The first 4 bits have the direction - * value and the next 4 have - * the pin count value. - * SKL_DIR_IN = 0, SKL_DIR_OUT = 1. - * The input and output formats - * share the same set of tokens - * with the distinction between input - * and output made by reading direction - * token. - * - * %SKL_TKN_U32_FMT_CH: Supported channel count - * - * %SKL_TKN_U32_FMT_FREQ: Supported frequency/sample rate - * - * %SKL_TKN_U32_FMT_BIT_DEPTH: Supported container size - * - * %SKL_TKN_U32_FMT_SAMPLE_SIZE:Number of samples in the container - * - * %SKL_TKN_U32_FMT_CH_CONFIG: Supported channel configurations for the - * input/output. - * - * %SKL_TKN_U32_FMT_INTERLEAVE: Interleaving style which can be per - * channel or per sample. The values can be : - * SKL_INTERLEAVING_PER_CHANNEL = 0, - * SKL_INTERLEAVING_PER_SAMPLE = 1, - * - * %SKL_TKN_U32_FMT_SAMPLE_TYPE: - * Specifies the sample type. Can take the - * values: SKL_SAMPLE_TYPE_INT_MSB = 0, - * SKL_SAMPLE_TYPE_INT_LSB = 1, - * SKL_SAMPLE_TYPE_INT_SIGNED = 2, - * SKL_SAMPLE_TYPE_INT_UNSIGNED = 3, - * SKL_SAMPLE_TYPE_FLOAT = 4 - * - * %SKL_TKN_U32_CH_MAP: Channel map values - * %SKL_TKN_U32_MOD_SET_PARAMS: It can take these values: - * SKL_PARAM_DEFAULT, SKL_PARAM_INIT, - * SKL_PARAM_SET, SKL_PARAM_BIND - * - * %SKL_TKN_U32_MOD_PARAM_ID: ID of the module params - * - * %SKL_TKN_U32_CAPS_SET_PARAMS: - * Set params value - * - * %SKL_TKN_U32_CAPS_PARAMS_ID: Params ID - * - * %SKL_TKN_U32_CAPS_SIZE: Caps size - * - * %SKL_TKN_U32_PROC_DOMAIN: Specify processing domain - * - * %SKL_TKN_U32_LIB_COUNT: Specifies the number of libraries - * - * %SKL_TKN_STR_LIB_NAME: Specifies the library name - * - * %SKL_TKN_U32_PMODE: Specifies the power mode for pipe - * - * %SKL_TKL_U32_D0I3_CAPS: Specifies the D0i3 capability for module - * - * %SKL_TKN_U32_DMA_BUF_SIZE: DMA buffer size in millisec - * - * %SKL_TKN_U32_PIPE_DIR: Specifies pipe direction. Can be - * playback/capture. - * - * %SKL_TKN_U32_NUM_CONFIGS: Number of pipe configs - * - * %SKL_TKN_U32_PATH_MEM_PGS: Size of memory (in pages) required for pipeline - * and its data - * - * %SKL_TKN_U32_PIPE_CONFIG_ID: Config id for the modules in the pipe - * and PCM params supported by that pipe - * config. This is used as index to fill - * up the pipe config and module config - * structure. - * - * %SKL_TKN_U32_CFG_FREQ: - * %SKL_TKN_U8_CFG_CHAN: - * %SKL_TKN_U8_CFG_BPS: PCM params (freq, channels, bits per sample) - * supported for each of the pipe configs. - * - * %SKL_TKN_CFG_MOD_RES_ID: Module's resource index for each of the - * pipe config - * - * %SKL_TKN_CFG_MOD_FMT_ID: Module's interface index for each of the - * pipe config - * - * %SKL_TKN_U8_NUM_MOD: Number of modules in the manifest - * - * %SKL_TKN_MM_U8_MOD_IDX: Current index of the module in the manifest - * - * %SKL_TKN_MM_U8_NUM_RES: Number of resources for the module - * - * %SKL_TKN_MM_U8_NUM_INTF: Number of interfaces for the module - * - * %SKL_TKN_MM_U32_RES_ID: Resource index for the resource info to - * be filled into. - * A module can support multiple resource - * configuration and is represnted as a - * resource table. This index is used to - * fill information into appropriate index. - * - * %SKL_TKN_MM_U32_CPS: DSP cycles per second - * - * %SKL_TKN_MM_U32_DMA_SIZE: Allocated buffer size for gateway DMA - * - * %SKL_TKN_MM_U32_CPC: DSP cycles allocated per frame - * - * %SKL_TKN_MM_U32_RES_PIN_ID: Resource pin index in the module - * - * %SKL_TKN_MM_U32_INTF_PIN_ID: Interface index in the module - * - * %SKL_TKN_MM_U32_PIN_BUF: Buffer size of the module pin - * - * %SKL_TKN_MM_U32_FMT_ID: Format index for each of the interface/ - * format information to be filled into. - * - * %SKL_TKN_MM_U32_NUM_IN_FMT: Number of input formats - * %SKL_TKN_MM_U32_NUM_OUT_FMT: Number of output formats - * - * %SKL_TKN_U32_ASTATE_IDX: Table Index for the A-State entry to be filled - * with kcps and clock source - * - * %SKL_TKN_U32_ASTATE_COUNT: Number of valid entries in A-State table - * - * %SKL_TKN_U32_ASTATE_KCPS: Specifies the core load threshold (in kilo - * cycles per second) below which DSP is clocked - * from source specified by clock source. - * - * %SKL_TKN_U32_ASTATE_CLK_SRC: Clock source for A-State entry - * - * module_id and loadable flags dont have tokens as these values will be - * read from the DSP FW manifest - * - * Tokens defined can be used either in the manifest or widget private data. - * - * SKL_TKN_MM is used as a suffix for all tokens that represent - * module data in the manifest. - */ -enum SKL_TKNS { - SKL_TKN_UUID = 1, - SKL_TKN_U8_NUM_BLOCKS, - SKL_TKN_U8_BLOCK_TYPE, - SKL_TKN_U8_IN_PIN_TYPE, - SKL_TKN_U8_OUT_PIN_TYPE, - SKL_TKN_U8_DYN_IN_PIN, - SKL_TKN_U8_DYN_OUT_PIN, - SKL_TKN_U8_IN_QUEUE_COUNT, - SKL_TKN_U8_OUT_QUEUE_COUNT, - SKL_TKN_U8_TIME_SLOT, - SKL_TKN_U8_CORE_ID, - SKL_TKN_U8_MOD_TYPE, - SKL_TKN_U8_CONN_TYPE, - SKL_TKN_U8_DEV_TYPE, - SKL_TKN_U8_HW_CONN_TYPE, - SKL_TKN_U16_MOD_INST_ID, - SKL_TKN_U16_BLOCK_SIZE, - SKL_TKN_U32_MAX_MCPS, - SKL_TKN_U32_MEM_PAGES, - SKL_TKN_U32_OBS, - SKL_TKN_U32_IBS, - SKL_TKN_U32_VBUS_ID, - SKL_TKN_U32_PARAMS_FIXUP, - SKL_TKN_U32_CONVERTER, - SKL_TKN_U32_PIPE_ID, - SKL_TKN_U32_PIPE_CONN_TYPE, - SKL_TKN_U32_PIPE_PRIORITY, - SKL_TKN_U32_PIPE_MEM_PGS, - SKL_TKN_U32_DIR_PIN_COUNT, - SKL_TKN_U32_FMT_CH, - SKL_TKN_U32_FMT_FREQ, - SKL_TKN_U32_FMT_BIT_DEPTH, - SKL_TKN_U32_FMT_SAMPLE_SIZE, - SKL_TKN_U32_FMT_CH_CONFIG, - SKL_TKN_U32_FMT_INTERLEAVE, - SKL_TKN_U32_FMT_SAMPLE_TYPE, - SKL_TKN_U32_FMT_CH_MAP, - SKL_TKN_U32_PIN_MOD_ID, - SKL_TKN_U32_PIN_INST_ID, - SKL_TKN_U32_MOD_SET_PARAMS, - SKL_TKN_U32_MOD_PARAM_ID, - SKL_TKN_U32_CAPS_SET_PARAMS, - SKL_TKN_U32_CAPS_PARAMS_ID, - SKL_TKN_U32_CAPS_SIZE, - SKL_TKN_U32_PROC_DOMAIN, - SKL_TKN_U32_LIB_COUNT, - SKL_TKN_STR_LIB_NAME, - SKL_TKN_U32_PMODE, - SKL_TKL_U32_D0I3_CAPS, /* Typo added at v4.10 */ - SKL_TKN_U32_D0I3_CAPS = SKL_TKL_U32_D0I3_CAPS, - SKL_TKN_U32_DMA_BUF_SIZE, - - SKL_TKN_U32_PIPE_DIRECTION, - SKL_TKN_U32_PIPE_CONFIG_ID, - SKL_TKN_U32_NUM_CONFIGS, - SKL_TKN_U32_PATH_MEM_PGS, - - SKL_TKN_U32_CFG_FREQ, - SKL_TKN_U8_CFG_CHAN, - SKL_TKN_U8_CFG_BPS, - SKL_TKN_CFG_MOD_RES_ID, - SKL_TKN_CFG_MOD_FMT_ID, - SKL_TKN_U8_NUM_MOD, - - SKL_TKN_MM_U8_MOD_IDX, - SKL_TKN_MM_U8_NUM_RES, - SKL_TKN_MM_U8_NUM_INTF, - SKL_TKN_MM_U32_RES_ID, - SKL_TKN_MM_U32_CPS, - SKL_TKN_MM_U32_DMA_SIZE, - SKL_TKN_MM_U32_CPC, - SKL_TKN_MM_U32_RES_PIN_ID, - SKL_TKN_MM_U32_INTF_PIN_ID, - SKL_TKN_MM_U32_PIN_BUF, - SKL_TKN_MM_U32_FMT_ID, - SKL_TKN_MM_U32_NUM_IN_FMT, - SKL_TKN_MM_U32_NUM_OUT_FMT, - - SKL_TKN_U32_ASTATE_IDX, - SKL_TKN_U32_ASTATE_COUNT, - SKL_TKN_U32_ASTATE_KCPS, - SKL_TKN_U32_ASTATE_CLK_SRC, - SKL_TKN_MAX = SKL_TKN_U32_ASTATE_CLK_SRC, -}; - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/tlv.h b/lib/libc/include/generic-musl/sound/tlv.h deleted file mode 100644 index af766e90d7..0000000000 --- a/lib/libc/include/generic-musl/sound/tlv.h +++ /dev/null @@ -1,117 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * 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. - */ - -#ifndef __UAPI_SOUND_TLV_H -#define __UAPI_SOUND_TLV_H - -#define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */ -#define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */ -#define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */ -#define SNDRV_CTL_TLVT_DB_RANGE 3 /* dB range container */ -#define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */ -#define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute */ - -/* - * channel-mapping TLV items - * TLV length must match with num_channels - */ -#define SNDRV_CTL_TLVT_CHMAP_FIXED 0x101 /* fixed channel position */ -#define SNDRV_CTL_TLVT_CHMAP_VAR 0x102 /* channels freely swappable */ -#define SNDRV_CTL_TLVT_CHMAP_PAIRED 0x103 /* pair-wise swappable */ - -/* - * TLV structure is right behind the struct snd_ctl_tlv: - * unsigned int type - see SNDRV_CTL_TLVT_* - * unsigned int length - * .... data aligned to sizeof(unsigned int), use - * block_length = (length + (sizeof(unsigned int) - 1)) & - * ~(sizeof(unsigned int) - 1)) .... - */ -#define SNDRV_CTL_TLVD_ITEM(type, ...) \ - (type), SNDRV_CTL_TLVD_LENGTH(__VA_ARGS__), __VA_ARGS__ -#define SNDRV_CTL_TLVD_LENGTH(...) \ - ((unsigned int)sizeof((const unsigned int[]) { __VA_ARGS__ })) - -/* Accessor offsets for TLV data items */ -#define SNDRV_CTL_TLVO_TYPE 0 -#define SNDRV_CTL_TLVO_LEN 1 - -#define SNDRV_CTL_TLVD_CONTAINER_ITEM(...) \ - SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_CONTAINER, __VA_ARGS__) -#define SNDRV_CTL_TLVD_DECLARE_CONTAINER(name, ...) \ - unsigned int name[] = { \ - SNDRV_CTL_TLVD_CONTAINER_ITEM(__VA_ARGS__) \ - } - -#define SNDRV_CTL_TLVD_DB_SCALE_MASK 0xffff -#define SNDRV_CTL_TLVD_DB_SCALE_MUTE 0x10000 -#define SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) \ - SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_SCALE, \ - (min), \ - ((step) & SNDRV_CTL_TLVD_DB_SCALE_MASK) | \ - ((mute) ? SNDRV_CTL_TLVD_DB_SCALE_MUTE : 0)) -#define SNDRV_CTL_TLVD_DECLARE_DB_SCALE(name, min, step, mute) \ - unsigned int name[] = { \ - SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) \ - } - -/* Accessor offsets for min, mute and step items in dB scale type TLV */ -#define SNDRV_CTL_TLVO_DB_SCALE_MIN 2 -#define SNDRV_CTL_TLVO_DB_SCALE_MUTE_AND_STEP 3 - -/* dB scale specified with min/max values instead of step */ -#define SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) \ - SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX, (min_dB), (max_dB)) -#define SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \ - SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX_MUTE, (min_dB), (max_dB)) -#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(name, min_dB, max_dB) \ - unsigned int name[] = { \ - SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) \ - } -#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX_MUTE(name, min_dB, max_dB) \ - unsigned int name[] = { \ - SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \ - } - -/* Accessor offsets for min, max items in db-minmax types of TLV. */ -#define SNDRV_CTL_TLVO_DB_MINMAX_MIN 2 -#define SNDRV_CTL_TLVO_DB_MINMAX_MAX 3 - -/* linear volume between min_dB and max_dB (.01dB unit) */ -#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \ - SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB)) -#define SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(name, min_dB, max_dB) \ - unsigned int name[] = { \ - SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \ - } - -/* Accessor offsets for min, max items in db-linear type of TLV. */ -#define SNDRV_CTL_TLVO_DB_LINEAR_MIN 2 -#define SNDRV_CTL_TLVO_DB_LINEAR_MAX 3 - -/* dB range container: - * Items in dB range container must be ordered by their values and by their - * dB values. This implies that larger values must correspond with larger - * dB values (which is also required for all other mixer controls). - */ -/* Each item is: */ -#define SNDRV_CTL_TLVD_DB_RANGE_ITEM(...) \ - SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__) -#define SNDRV_CTL_TLVD_DECLARE_DB_RANGE(name, ...) \ - unsigned int name[] = { \ - SNDRV_CTL_TLVD_DB_RANGE_ITEM(__VA_ARGS__) \ - } - -#define SNDRV_CTL_TLVD_DB_GAIN_MUTE -9999999 - -#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sound/usb_stream.h b/lib/libc/include/generic-musl/sound/usb_stream.h deleted file mode 100644 index f5907a6e02..0000000000 --- a/lib/libc/include/generic-musl/sound/usb_stream.h +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * Copyright (C) 2007, 2008 Karsten Wiese - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __SOUND_USB_STREAM_H -#define __SOUND_USB_STREAM_H - -#define USB_STREAM_INTERFACE_VERSION 2 - -#define SNDRV_USB_STREAM_IOCTL_SET_PARAMS \ - _IOW('H', 0x90, struct usb_stream_config) - -struct usb_stream_packet { - unsigned offset; - unsigned length; -}; - - -struct usb_stream_config { - unsigned version; - unsigned sample_rate; - unsigned period_frames; - unsigned frame_size; -}; - -struct usb_stream { - struct usb_stream_config cfg; - unsigned read_size; - unsigned write_size; - - int period_size; - - unsigned state; - - int idle_insize; - int idle_outsize; - int sync_packet; - unsigned insize_done; - unsigned periods_done; - unsigned periods_polled; - - struct usb_stream_packet outpacket[2]; - unsigned inpackets; - unsigned inpacket_head; - unsigned inpacket_split; - unsigned inpacket_split_at; - unsigned next_inpacket_split; - unsigned next_inpacket_split_at; - struct usb_stream_packet inpacket[0]; -}; - -enum usb_stream_state { - usb_stream_invalid, - usb_stream_stopped, - usb_stream_sync0, - usb_stream_sync1, - usb_stream_ready, - usb_stream_running, - usb_stream_xrun, -}; - -#endif /* __SOUND_USB_STREAM_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/stdio.h b/lib/libc/include/generic-musl/stdio.h index ee6fb33dd6..92f52bd27e 100644 --- a/lib/libc/include/generic-musl/stdio.h +++ b/lib/libc/include/generic-musl/stdio.h @@ -11,6 +11,10 @@ extern "C" { #define __NEED___isoc_va_list #define __NEED_size_t +#if __STDC_VERSION__ < 201112L +#define __NEED_struct__IO_FILE +#endif + #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ || defined(_BSD_SOURCE) diff --git a/lib/libc/include/generic-musl/symcat.h b/lib/libc/include/generic-musl/symcat.h deleted file mode 100644 index 2bb88303a9..0000000000 --- a/lib/libc/include/generic-musl/symcat.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Symbol concatenation utilities. - - Copyright (C) 1998-2019 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 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. */ - -#ifndef SYM_CAT_H -#define SYM_CAT_H - -#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) -#define CONCAT2(a,b) a##b -#define CONCAT3(a,b,c) a##b##c -#define CONCAT4(a,b,c,d) a##b##c##d -#define CONCAT5(a,b,c,d,e) a##b##c##d##e -#define CONCAT6(a,b,c,d,e,f) a##b##c##d##e##f -#define STRINGX(s) #s -#else -/* Note one should never pass extra whitespace to the CONCATn macros, - e.g. CONCAT2(foo, bar) because traditonal C will keep the space between - the two labels instead of concatenating them. Instead, make sure to - write CONCAT2(foo,bar). */ -#define CONCAT2(a,b) a/**/b -#define CONCAT3(a,b,c) a/**/b/**/c -#define CONCAT4(a,b,c,d) a/**/b/**/c/**/d -#define CONCAT5(a,b,c,d,e) a/**/b/**/c/**/d/**/e -#define CONCAT6(a,b,c,d,e,f) a/**/b/**/c/**/d/**/e/**/f -#define STRINGX(s) "s" -#endif - -#define XCONCAT2(a,b) CONCAT2(a,b) -#define XCONCAT3(a,b,c) CONCAT3(a,b,c) -#define XCONCAT4(a,b,c,d) CONCAT4(a,b,c,d) -#define XCONCAT5(a,b,c,d,e) CONCAT5(a,b,c,d,e) -#define XCONCAT6(a,b,c,d,e,f) CONCAT6(a,b,c,d,e,f) - -/* Note the layer of indirection here is typically used to allow - stringification of the expansion of macros. I.e. "#define foo - bar", "XSTRING(foo)", to yield "bar". Be aware that this only - works for __STDC__, not for traditional C which will still resolve - to "foo". */ -#define XSTRING(s) STRINGX(s) - -#endif /* SYM_CAT_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sys/fanotify.h b/lib/libc/include/generic-musl/sys/fanotify.h index 698c4baa26..ba00797ca2 100644 --- a/lib/libc/include/generic-musl/sys/fanotify.h +++ b/lib/libc/include/generic-musl/sys/fanotify.h @@ -5,6 +5,8 @@ extern "C" { #endif +#include + struct fanotify_event_metadata { unsigned event_len; unsigned char vers; @@ -19,6 +21,18 @@ struct fanotify_event_metadata { int pid; }; +struct fanotify_event_info_header { + unsigned char info_type; + unsigned char pad; + unsigned short len; +}; + +struct fanotify_event_info_fid { + struct fanotify_event_info_header hdr; + fsid_t fsid; + unsigned char handle[]; +}; + struct fanotify_response { int fd; unsigned response; @@ -26,15 +40,25 @@ struct fanotify_response { #define FAN_ACCESS 0x01 #define FAN_MODIFY 0x02 +#define FAN_ATTRIB 0x04 #define FAN_CLOSE_WRITE 0x08 #define FAN_CLOSE_NOWRITE 0x10 #define FAN_OPEN 0x20 +#define FAN_MOVED_FROM 0x40 +#define FAN_MOVED_TO 0x80 +#define FAN_CREATE 0x100 +#define FAN_DELETE 0x200 +#define FAN_DELETE_SELF 0x400 +#define FAN_MOVE_SELF 0x800 +#define FAN_OPEN_EXEC 0x1000 #define FAN_Q_OVERFLOW 0x4000 #define FAN_OPEN_PERM 0x10000 #define FAN_ACCESS_PERM 0x20000 +#define FAN_OPEN_EXEC_PERM 0x40000 #define FAN_ONDIR 0x40000000 #define FAN_EVENT_ON_CHILD 0x08000000 #define FAN_CLOSE (FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE) +#define FAN_MOVE (FAN_MOVED_FROM | FAN_MOVED_TO) #define FAN_CLOEXEC 0x01 #define FAN_NONBLOCK 0x02 #define FAN_CLASS_NOTIF 0 @@ -43,22 +67,30 @@ struct fanotify_response { #define FAN_ALL_CLASS_BITS (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | FAN_CLASS_PRE_CONTENT) #define FAN_UNLIMITED_QUEUE 0x10 #define FAN_UNLIMITED_MARKS 0x20 +#define FAN_ENABLE_AUDIT 0x40 +#define FAN_REPORT_TID 0x100 +#define FAN_REPORT_FID 0x200 #define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE | FAN_UNLIMITED_MARKS) #define FAN_MARK_ADD 0x01 #define FAN_MARK_REMOVE 0x02 #define FAN_MARK_DONT_FOLLOW 0x04 #define FAN_MARK_ONLYDIR 0x08 -#define FAN_MARK_MOUNT 0x10 #define FAN_MARK_IGNORED_MASK 0x20 #define FAN_MARK_IGNORED_SURV_MODIFY 0x40 #define FAN_MARK_FLUSH 0x80 +#define FAN_MARK_INODE 0x00 +#define FAN_MARK_MOUNT 0x10 +#define FAN_MARK_FILESYSTEM 0x100 +#define FAN_MARK_TYPE_MASK (FAN_MARK_INODE | FAN_MARK_MOUNT | FAN_MARK_FILESYSTEM) #define FAN_ALL_MARK_FLAGS (FAN_MARK_ADD | FAN_MARK_REMOVE | FAN_MARK_DONT_FOLLOW | FAN_MARK_ONLYDIR | FAN_MARK_MOUNT | FAN_MARK_IGNORED_MASK | FAN_MARK_IGNORED_SURV_MODIFY | FAN_MARK_FLUSH) #define FAN_ALL_EVENTS (FAN_ACCESS | FAN_MODIFY | FAN_CLOSE | FAN_OPEN) #define FAN_ALL_PERM_EVENTS (FAN_OPEN_PERM | FAN_ACCESS_PERM) #define FAN_ALL_OUTGOING_EVENTS (FAN_ALL_EVENTS | FAN_ALL_PERM_EVENTS | FAN_Q_OVERFLOW) #define FANOTIFY_METADATA_VERSION 3 +#define FAN_EVENT_INFO_TYPE_FID 1 #define FAN_ALLOW 0x01 #define FAN_DENY 0x02 +#define FAN_AUDIT 0x10 #define FAN_NOFD -1 #define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata)) #define FAN_EVENT_NEXT(meta, len) ((len) -= (meta)->event_len, (struct fanotify_event_metadata*)(((char *)(meta)) + (meta)->event_len)) diff --git a/lib/libc/include/generic-musl/sys/inotify.h b/lib/libc/include/generic-musl/sys/inotify.h index 8384e0728b..95833a2cb8 100644 --- a/lib/libc/include/generic-musl/sys/inotify.h +++ b/lib/libc/include/generic-musl/sys/inotify.h @@ -40,6 +40,7 @@ struct inotify_event { #define IN_ONLYDIR 0x01000000 #define IN_DONT_FOLLOW 0x02000000 #define IN_EXCL_UNLINK 0x04000000 +#define IN_MASK_CREATE 0x10000000 #define IN_MASK_ADD 0x20000000 #define IN_ISDIR 0x40000000 diff --git a/lib/libc/include/generic-musl/sys/ioctl.h b/lib/libc/include/generic-musl/sys/ioctl.h index 42a24c7401..7d3a88079a 100644 --- a/lib/libc/include/generic-musl/sys/ioctl.h +++ b/lib/libc/include/generic-musl/sys/ioctl.h @@ -6,6 +6,116 @@ extern "C" { #include +#define N_TTY 0 +#define N_SLIP 1 +#define N_MOUSE 2 +#define N_PPP 3 +#define N_STRIP 4 +#define N_AX25 5 +#define N_X25 6 +#define N_6PACK 7 +#define N_MASC 8 +#define N_R3964 9 +#define N_PROFIBUS_FDL 10 +#define N_IRDA 11 +#define N_SMSBLOCK 12 +#define N_HDLC 13 +#define N_SYNC_PPP 14 +#define N_HCI 15 +#define N_GIGASET_M101 16 +#define N_SLCAN 17 +#define N_PPS 18 +#define N_V253 19 +#define N_CAIF 20 +#define N_GSM0710 21 +#define N_TI_WL 22 +#define N_TRACESINK 23 +#define N_TRACEROUTER 24 +#define N_NCI 25 +#define N_SPEAKUP 26 +#define N_NULL 27 + +#define TIOCPKT_DATA 0 +#define TIOCPKT_FLUSHREAD 1 +#define TIOCPKT_FLUSHWRITE 2 +#define TIOCPKT_STOP 4 +#define TIOCPKT_START 8 +#define TIOCPKT_NOSTOP 16 +#define TIOCPKT_DOSTOP 32 +#define TIOCPKT_IOCTL 64 + +#define TIOCSER_TEMT 1 + +struct winsize { + unsigned short ws_row; + unsigned short ws_col; + unsigned short ws_xpixel; + unsigned short ws_ypixel; +}; + +#define SIOCADDRT 0x890B +#define SIOCDELRT 0x890C +#define SIOCRTMSG 0x890D + +#define SIOCGIFNAME 0x8910 +#define SIOCSIFLINK 0x8911 +#define SIOCGIFCONF 0x8912 +#define SIOCGIFFLAGS 0x8913 +#define SIOCSIFFLAGS 0x8914 +#define SIOCGIFADDR 0x8915 +#define SIOCSIFADDR 0x8916 +#define SIOCGIFDSTADDR 0x8917 +#define SIOCSIFDSTADDR 0x8918 +#define SIOCGIFBRDADDR 0x8919 +#define SIOCSIFBRDADDR 0x891a +#define SIOCGIFNETMASK 0x891b +#define SIOCSIFNETMASK 0x891c +#define SIOCGIFMETRIC 0x891d +#define SIOCSIFMETRIC 0x891e +#define SIOCGIFMEM 0x891f +#define SIOCSIFMEM 0x8920 +#define SIOCGIFMTU 0x8921 +#define SIOCSIFMTU 0x8922 +#define SIOCSIFNAME 0x8923 +#define SIOCSIFHWADDR 0x8924 +#define SIOCGIFENCAP 0x8925 +#define SIOCSIFENCAP 0x8926 +#define SIOCGIFHWADDR 0x8927 +#define SIOCGIFSLAVE 0x8929 +#define SIOCSIFSLAVE 0x8930 +#define SIOCADDMULTI 0x8931 +#define SIOCDELMULTI 0x8932 +#define SIOCGIFINDEX 0x8933 +#define SIOGIFINDEX SIOCGIFINDEX +#define SIOCSIFPFLAGS 0x8934 +#define SIOCGIFPFLAGS 0x8935 +#define SIOCDIFADDR 0x8936 +#define SIOCSIFHWBROADCAST 0x8937 +#define SIOCGIFCOUNT 0x8938 + +#define SIOCGIFBR 0x8940 +#define SIOCSIFBR 0x8941 + +#define SIOCGIFTXQLEN 0x8942 +#define SIOCSIFTXQLEN 0x8943 + +#define SIOCDARP 0x8953 +#define SIOCGARP 0x8954 +#define SIOCSARP 0x8955 + +#define SIOCDRARP 0x8960 +#define SIOCGRARP 0x8961 +#define SIOCSRARP 0x8962 + +#define SIOCGIFMAP 0x8970 +#define SIOCSIFMAP 0x8971 + +#define SIOCADDDLCI 0x8980 +#define SIOCDELDLCI 0x8981 + +#define SIOCDEVPRIVATE 0x89F0 +#define SIOCPROTOPRIVATE 0x89E0 + int ioctl (int, int, ...); #ifdef __cplusplus diff --git a/lib/libc/include/generic-musl/sys/membarrier.h b/lib/libc/include/generic-musl/sys/membarrier.h new file mode 100644 index 0000000000..b4559ee15e --- /dev/null +++ b/lib/libc/include/generic-musl/sys/membarrier.h @@ -0,0 +1,17 @@ +#ifndef _SYS_MEMBARRIER_H +#define _SYS_MEMBARRIER_H + +#define MEMBARRIER_CMD_QUERY 0 +#define MEMBARRIER_CMD_GLOBAL 1 +#define MEMBARRIER_CMD_GLOBAL_EXPEDITED 2 +#define MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED 4 +#define MEMBARRIER_CMD_PRIVATE_EXPEDITED 8 +#define MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED 16 +#define MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE 32 +#define MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE 64 + +#define MEMBARRIER_CMD_SHARED MEMBARRIER_CMD_GLOBAL + +int membarrier(int, int); + +#endif \ No newline at end of file diff --git a/lib/libc/include/generic-musl/sys/mman.h b/lib/libc/include/generic-musl/sys/mman.h index af411be574..85c605b75f 100644 --- a/lib/libc/include/generic-musl/sys/mman.h +++ b/lib/libc/include/generic-musl/sys/mman.h @@ -46,7 +46,9 @@ extern "C" { #define MAP_HUGE_2MB (21 << 26) #define MAP_HUGE_8MB (23 << 26) #define MAP_HUGE_16MB (24 << 26) +#define MAP_HUGE_32MB (25 << 26) #define MAP_HUGE_256MB (28 << 26) +#define MAP_HUGE_512MB (29 << 26) #define MAP_HUGE_1GB (30 << 26) #define MAP_HUGE_2GB (31 << 26) #define MAP_HUGE_16GB (34U << 26) diff --git a/lib/libc/include/generic-musl/sys/prctl.h b/lib/libc/include/generic-musl/sys/prctl.h index 64131bce27..4cc6567f93 100644 --- a/lib/libc/include/generic-musl/sys/prctl.h +++ b/lib/libc/include/generic-musl/sys/prctl.h @@ -139,11 +139,20 @@ struct prctl_mm_map { #define PR_GET_SPECULATION_CTRL 52 #define PR_SET_SPECULATION_CTRL 53 #define PR_SPEC_STORE_BYPASS 0 +#define PR_SPEC_INDIRECT_BRANCH 1 #define PR_SPEC_NOT_AFFECTED 0 #define PR_SPEC_PRCTL (1UL << 0) #define PR_SPEC_ENABLE (1UL << 1) #define PR_SPEC_DISABLE (1UL << 2) #define PR_SPEC_FORCE_DISABLE (1UL << 3) +#define PR_SPEC_DISABLE_NOEXEC (1UL << 4) + +#define PR_PAC_RESET_KEYS 54 +#define PR_PAC_APIAKEY (1UL << 0) +#define PR_PAC_APIBKEY (1UL << 1) +#define PR_PAC_APDAKEY (1UL << 2) +#define PR_PAC_APDBKEY (1UL << 3) +#define PR_PAC_APGAKEY (1UL << 4) int prctl (int, ...); diff --git a/lib/libc/include/generic-musl/sys/shm.h b/lib/libc/include/generic-musl/sys/shm.h index 3ae09ff06b..70ccd644ce 100644 --- a/lib/libc/include/generic-musl/sys/shm.h +++ b/lib/libc/include/generic-musl/sys/shm.h @@ -49,7 +49,9 @@ extern "C" { #define SHM_HUGE_2MB (21 << 26) #define SHM_HUGE_8MB (23 << 26) #define SHM_HUGE_16MB (24 << 26) +#define SHM_HUGE_32MB (25 << 26) #define SHM_HUGE_256MB (28 << 26) +#define SHM_HUGE_512MB (29 << 26) #define SHM_HUGE_1GB (30 << 26) #define SHM_HUGE_2GB (31 << 26) #define SHM_HUGE_16GB (34U << 26) diff --git a/lib/libc/include/generic-musl/sys/socket.h b/lib/libc/include/generic-musl/sys/socket.h index 1d3224a40f..2c82ee12b2 100644 --- a/lib/libc/include/generic-musl/sys/socket.h +++ b/lib/libc/include/generic-musl/sys/socket.h @@ -235,6 +235,9 @@ struct linger { #define SCM_TIMESTAMPING_PKTINFO 58 #define SO_PEERGROUPS 59 #define SO_ZEROCOPY 60 +#define SO_TXTIME 61 +#define SCM_TXTIME SO_TXTIME +#define SO_BINDTOIFINDEX 62 #ifndef SOL_SOCKET #define SOL_SOCKET 1 diff --git a/lib/libc/include/generic-musl/sys/types.h b/lib/libc/include/generic-musl/sys/types.h index 5defc3eeba..272d50970e 100644 --- a/lib/libc/include/generic-musl/sys/types.h +++ b/lib/libc/include/generic-musl/sys/types.h @@ -69,7 +69,6 @@ typedef long long quad_t; typedef unsigned long long u_quad_t; #include #include -#include #endif #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) diff --git a/lib/libc/include/generic-musl/tar.h b/lib/libc/include/generic-musl/tar.h index f3f78bd4e1..7bdb412c7c 100644 --- a/lib/libc/include/generic-musl/tar.h +++ b/lib/libc/include/generic-musl/tar.h @@ -1,13 +1,9 @@ #ifndef _TAR_H #define _TAR_H -#include - #define TSUID 04000 #define TSGID 02000 -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE) #define TSVTX 01000 -#endif #define TUREAD 00400 #define TUWRITE 00200 #define TUEXEC 00100 diff --git a/lib/libc/include/generic-musl/ucontext.h b/lib/libc/include/generic-musl/ucontext.h index fb034de21a..a99b20d753 100644 --- a/lib/libc/include/generic-musl/ucontext.h +++ b/lib/libc/include/generic-musl/ucontext.h @@ -15,7 +15,7 @@ extern "C" { struct __ucontext; int getcontext(struct __ucontext *); -void makecontext(struct __ucontext *, void (*)(void), int, ...); +void makecontext(struct __ucontext *, void (*)(), int, ...); int setcontext(const struct __ucontext *); int swapcontext(struct __ucontext *, const struct __ucontext *); diff --git a/lib/libc/include/generic-musl/video/edid.h b/lib/libc/include/generic-musl/video/edid.h deleted file mode 100644 index 806e319290..0000000000 --- a/lib/libc/include/generic-musl/video/edid.h +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef __linux_video_edid_h__ -#define __linux_video_edid_h__ - -struct edid_info { - unsigned char dummy[128]; -}; - - -#endif /* __linux_video_edid_h__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/video/sisfb.h b/lib/libc/include/generic-musl/video/sisfb.h deleted file mode 100644 index 6ac46cbf4a..0000000000 --- a/lib/libc/include/generic-musl/video/sisfb.h +++ /dev/null @@ -1,210 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -/* - * sisfb.h - definitions for the SiS framebuffer driver - * - * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria. - * - * 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 named License, - * or 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA - */ - -#ifndef _LINUX_SISFB_H_ -#define _LINUX_SISFB_H_ - -#include -#include - -/**********************************************/ -/* PUBLIC */ -/**********************************************/ - -/* vbflags, public (others in sis.h) */ -#define CRT2_DEFAULT 0x00000001 -#define CRT2_LCD 0x00000002 -#define CRT2_TV 0x00000004 -#define CRT2_VGA 0x00000008 -#define TV_NTSC 0x00000010 -#define TV_PAL 0x00000020 -#define TV_HIVISION 0x00000040 -#define TV_YPBPR 0x00000080 -#define TV_AVIDEO 0x00000100 -#define TV_SVIDEO 0x00000200 -#define TV_SCART 0x00000400 -#define TV_PALM 0x00001000 -#define TV_PALN 0x00002000 -#define TV_NTSCJ 0x00001000 -#define TV_CHSCART 0x00008000 -#define TV_CHYPBPR525I 0x00010000 -#define CRT1_VGA 0x00000000 -#define CRT1_LCDA 0x00020000 -#define VGA2_CONNECTED 0x00040000 -#define VB_DISPTYPE_CRT1 0x00080000 /* CRT1 connected and used */ -#define VB_SINGLE_MODE 0x20000000 /* CRT1 or CRT2; determined by DISPTYPE_CRTx */ -#define VB_MIRROR_MODE 0x40000000 /* CRT1 + CRT2 identical (mirror mode) */ -#define VB_DUALVIEW_MODE 0x80000000 /* CRT1 + CRT2 independent (dual head mode) */ - -/* Aliases: */ -#define CRT2_ENABLE (CRT2_LCD | CRT2_TV | CRT2_VGA) -#define TV_STANDARD (TV_NTSC | TV_PAL | TV_PALM | TV_PALN | TV_NTSCJ) -#define TV_INTERFACE (TV_AVIDEO|TV_SVIDEO|TV_SCART|TV_HIVISION|TV_YPBPR|TV_CHSCART|TV_CHYPBPR525I) - -/* Only if TV_YPBPR is set: */ -#define TV_YPBPR525I TV_NTSC -#define TV_YPBPR525P TV_PAL -#define TV_YPBPR750P TV_PALM -#define TV_YPBPR1080I TV_PALN -#define TV_YPBPRALL (TV_YPBPR525I | TV_YPBPR525P | TV_YPBPR750P | TV_YPBPR1080I) - -#define VB_DISPTYPE_DISP2 CRT2_ENABLE -#define VB_DISPTYPE_CRT2 CRT2_ENABLE -#define VB_DISPTYPE_DISP1 VB_DISPTYPE_CRT1 -#define VB_DISPMODE_SINGLE VB_SINGLE_MODE -#define VB_DISPMODE_MIRROR VB_MIRROR_MODE -#define VB_DISPMODE_DUAL VB_DUALVIEW_MODE -#define VB_DISPLAY_MODE (SINGLE_MODE | MIRROR_MODE | DUALVIEW_MODE) - -/* Structure argument for SISFB_GET_INFO ioctl */ -struct sisfb_info { - __u32 sisfb_id; /* for identifying sisfb */ -#ifndef SISFB_ID -#define SISFB_ID 0x53495346 /* Identify myself with 'SISF' */ -#endif - __u32 chip_id; /* PCI-ID of detected chip */ - __u32 memory; /* total video memory in KB */ - __u32 heapstart; /* heap start offset in KB */ - __u8 fbvidmode; /* current sisfb mode */ - - __u8 sisfb_version; - __u8 sisfb_revision; - __u8 sisfb_patchlevel; - - __u8 sisfb_caps; /* sisfb capabilities */ - - __u32 sisfb_tqlen; /* turbo queue length (in KB) */ - - __u32 sisfb_pcibus; /* The card's PCI ID */ - __u32 sisfb_pcislot; - __u32 sisfb_pcifunc; - - __u8 sisfb_lcdpdc; /* PanelDelayCompensation */ - - __u8 sisfb_lcda; /* Detected status of LCDA for low res/text modes */ - - __u32 sisfb_vbflags; - __u32 sisfb_currentvbflags; - - __u32 sisfb_scalelcd; - __u32 sisfb_specialtiming; - - __u8 sisfb_haveemi; - __u8 sisfb_emi30,sisfb_emi31,sisfb_emi32,sisfb_emi33; - __u8 sisfb_haveemilcd; - - __u8 sisfb_lcdpdca; /* PanelDelayCompensation for LCD-via-CRT1 */ - - __u16 sisfb_tvxpos, sisfb_tvypos; /* Warning: Values + 32 ! */ - - __u32 sisfb_heapsize; /* heap size (in KB) */ - __u32 sisfb_videooffset; /* Offset of viewport in video memory (in bytes) */ - - __u32 sisfb_curfstn; /* currently running FSTN/DSTN mode */ - __u32 sisfb_curdstn; - - __u16 sisfb_pci_vendor; /* PCI vendor (SiS or XGI) */ - - __u32 sisfb_vbflags2; /* ivideo->vbflags2 */ - - __u8 sisfb_can_post; /* sisfb can POST this card */ - __u8 sisfb_card_posted; /* card is POSTED */ - __u8 sisfb_was_boot_device; /* This card was the boot video device (ie is primary) */ - - __u8 reserved[183]; /* for future use */ -}; - -#define SISFB_CMD_GETVBFLAGS 0x55AA0001 /* no arg; result[1] = vbflags */ -#define SISFB_CMD_SWITCHCRT1 0x55AA0010 /* arg[0]: 99 = query, 0 = off, 1 = on */ -/* more to come */ - -#define SISFB_CMD_ERR_OK 0x80000000 /* command succeeded */ -#define SISFB_CMD_ERR_LOCKED 0x80000001 /* sisfb is locked */ -#define SISFB_CMD_ERR_EARLY 0x80000002 /* request before sisfb took over gfx system */ -#define SISFB_CMD_ERR_NOVB 0x80000003 /* No video bridge */ -#define SISFB_CMD_ERR_NOCRT2 0x80000004 /* can't change CRT1 status, CRT2 disabled */ -/* more to come */ -#define SISFB_CMD_ERR_UNKNOWN 0x8000ffff /* Unknown command */ -#define SISFB_CMD_ERR_OTHER 0x80010000 /* Other error */ - -/* Argument for SISFB_CMD ioctl */ -struct sisfb_cmd { - __u32 sisfb_cmd; - __u32 sisfb_arg[16]; - __u32 sisfb_result[4]; -}; - -/* Additional IOCTLs for communication sisfb <> X driver */ -/* If changing this, vgatypes.h must also be changed (for X driver) */ - -/* ioctl for identifying and giving some info (esp. memory heap start) */ -#define SISFB_GET_INFO_SIZE _IOR(0xF3,0x00,__u32) -#define SISFB_GET_INFO _IOR(0xF3,0x01,struct sisfb_info) - -/* ioctrl to get current vertical retrace status */ -#define SISFB_GET_VBRSTATUS _IOR(0xF3,0x02,__u32) - -/* ioctl to enable/disable panning auto-maximize (like nomax parameter) */ -#define SISFB_GET_AUTOMAXIMIZE _IOR(0xF3,0x03,__u32) -#define SISFB_SET_AUTOMAXIMIZE _IOW(0xF3,0x03,__u32) - -/* ioctls to relocate TV output (x=D[31:16], y=D[15:0], + 32)*/ -#define SISFB_GET_TVPOSOFFSET _IOR(0xF3,0x04,__u32) -#define SISFB_SET_TVPOSOFFSET _IOW(0xF3,0x04,__u32) - -/* ioctl for internal sisfb commands (sisfbctrl) */ -#define SISFB_COMMAND _IOWR(0xF3,0x05,struct sisfb_cmd) - -/* ioctl for locking sisfb (no register access during lock) */ -/* As of now, only used to avoid register access during - * the ioctls listed above. - */ -#define SISFB_SET_LOCK _IOW(0xF3,0x06,__u32) - -/* ioctls 0xF3 up to 0x3F reserved for sisfb */ - -/****************************************************************/ -/* The following are deprecated and should not be used anymore: */ -/****************************************************************/ -/* ioctl for identifying and giving some info (esp. memory heap start) */ -#define SISFB_GET_INFO_OLD _IOR('n',0xF8,__u32) -/* ioctrl to get current vertical retrace status */ -#define SISFB_GET_VBRSTATUS_OLD _IOR('n',0xF9,__u32) -/* ioctl to enable/disable panning auto-maximize (like nomax parameter) */ -#define SISFB_GET_AUTOMAXIMIZE_OLD _IOR('n',0xFA,__u32) -#define SISFB_SET_AUTOMAXIMIZE_OLD _IOW('n',0xFA,__u32) -/****************************************************************/ -/* End of deprecated ioctl numbers */ -/****************************************************************/ - -/* For fb memory manager (FBIO_ALLOC, FBIO_FREE) */ -struct sis_memreq { - __u32 offset; - __u32 size; -}; - -/**********************************************/ -/* PRIVATE */ -/* (for IN-KERNEL usage only) */ -/**********************************************/ - - -#endif /* _LINUX_SISFB_H_ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/video/uvesafb.h b/lib/libc/include/generic-musl/video/uvesafb.h deleted file mode 100644 index 430e72fcf6..0000000000 --- a/lib/libc/include/generic-musl/video/uvesafb.h +++ /dev/null @@ -1,61 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _UVESAFB_H -#define _UVESAFB_H - -#include - -struct v86_regs { - __u32 ebx; - __u32 ecx; - __u32 edx; - __u32 esi; - __u32 edi; - __u32 ebp; - __u32 eax; - __u32 eip; - __u32 eflags; - __u32 esp; - __u16 cs; - __u16 ss; - __u16 es; - __u16 ds; - __u16 fs; - __u16 gs; -}; - -/* Task flags */ -#define TF_VBEIB 0x01 -#define TF_BUF_ESDI 0x02 -#define TF_BUF_ESBX 0x04 -#define TF_BUF_RET 0x08 -#define TF_EXIT 0x10 - -struct uvesafb_task { - __u8 flags; - int buf_len; - struct v86_regs regs; -}; - -/* Constants for the capabilities field - * in vbe_ib */ -#define VBE_CAP_CAN_SWITCH_DAC 0x01 -#define VBE_CAP_VGACOMPAT 0x02 - -/* The VBE Info Block */ -struct vbe_ib { - char vbe_signature[4]; - __u16 vbe_version; - __u32 oem_string_ptr; - __u32 capabilities; - __u32 mode_list_ptr; - __u16 total_memory; - __u16 oem_software_rev; - __u32 oem_vendor_name_ptr; - __u32 oem_product_name_ptr; - __u32 oem_product_rev_ptr; - __u8 reserved[222]; - char oem_data[256]; - char misc_data[512]; -} __attribute__ ((packed)); - -#endif /* _UVESAFB_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/wchar.h b/lib/libc/include/generic-musl/wchar.h index e97b84b7c5..9c11e0c77f 100644 --- a/lib/libc/include/generic-musl/wchar.h +++ b/lib/libc/include/generic-musl/wchar.h @@ -14,6 +14,10 @@ extern "C" { #define __NEED_wint_t #define __NEED_mbstate_t +#if __STDC_VERSION__ < 201112L +#define __NEED_struct__IO_FILE +#endif + #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) #define __NEED_locale_t diff --git a/lib/libc/include/generic-musl/xen/evtchn.h b/lib/libc/include/generic-musl/xen/evtchn.h deleted file mode 100644 index 780c15f71e..0000000000 --- a/lib/libc/include/generic-musl/xen/evtchn.h +++ /dev/null @@ -1,104 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT) */ -/****************************************************************************** - * evtchn.h - * - * Interface to /dev/xen/evtchn. - * - * Copyright (c) 2003-2005, K A Fraser - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation; or, when distributed - * separately from the Linux kernel or incorporated into other - * software packages, subject to the following license: - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this source file (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, modify, - * merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef __LINUX_PUBLIC_EVTCHN_H__ -#define __LINUX_PUBLIC_EVTCHN_H__ - -/* - * Bind a fresh port to VIRQ @virq. - * Return allocated port. - */ -#define IOCTL_EVTCHN_BIND_VIRQ \ - _IOC(_IOC_NONE, 'E', 0, sizeof(struct ioctl_evtchn_bind_virq)) -struct ioctl_evtchn_bind_virq { - unsigned int virq; -}; - -/* - * Bind a fresh port to remote <@remote_domain, @remote_port>. - * Return allocated port. - */ -#define IOCTL_EVTCHN_BIND_INTERDOMAIN \ - _IOC(_IOC_NONE, 'E', 1, sizeof(struct ioctl_evtchn_bind_interdomain)) -struct ioctl_evtchn_bind_interdomain { - unsigned int remote_domain, remote_port; -}; - -/* - * Allocate a fresh port for binding to @remote_domain. - * Return allocated port. - */ -#define IOCTL_EVTCHN_BIND_UNBOUND_PORT \ - _IOC(_IOC_NONE, 'E', 2, sizeof(struct ioctl_evtchn_bind_unbound_port)) -struct ioctl_evtchn_bind_unbound_port { - unsigned int remote_domain; -}; - -/* - * Unbind previously allocated @port. - */ -#define IOCTL_EVTCHN_UNBIND \ - _IOC(_IOC_NONE, 'E', 3, sizeof(struct ioctl_evtchn_unbind)) -struct ioctl_evtchn_unbind { - unsigned int port; -}; - -/* - * Unbind previously allocated @port. - */ -#define IOCTL_EVTCHN_NOTIFY \ - _IOC(_IOC_NONE, 'E', 4, sizeof(struct ioctl_evtchn_notify)) -struct ioctl_evtchn_notify { - unsigned int port; -}; - -/* Clear and reinitialise the event buffer. Clear error condition. */ -#define IOCTL_EVTCHN_RESET \ - _IOC(_IOC_NONE, 'E', 5, 0) - -/* - * Restrict this file descriptor so that it can only be used to bind - * new interdomain events from one domain. - * - * Once a file descriptor has been restricted it cannot be - * de-restricted, and must be closed and re-opened. Event channels - * which were bound before restricting remain bound afterwards, and - * can be notified as usual. - */ -#define IOCTL_EVTCHN_RESTRICT_DOMID \ - _IOC(_IOC_NONE, 'E', 6, sizeof(struct ioctl_evtchn_restrict_domid)) -struct ioctl_evtchn_restrict_domid { - domid_t domid; -}; - -#endif /* __LINUX_PUBLIC_EVTCHN_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/xen/gntalloc.h b/lib/libc/include/generic-musl/xen/gntalloc.h deleted file mode 100644 index f3f6ef48e2..0000000000 --- a/lib/libc/include/generic-musl/xen/gntalloc.h +++ /dev/null @@ -1,84 +0,0 @@ -/****************************************************************************** - * gntalloc.h - * - * Interface to /dev/xen/gntalloc. - * - * Author: Daniel De Graaf - * - * This file is in the public domain. - */ - -#ifndef __LINUX_PUBLIC_GNTALLOC_H__ -#define __LINUX_PUBLIC_GNTALLOC_H__ - -#include - -/* - * Allocates a new page and creates a new grant reference. - */ -#define IOCTL_GNTALLOC_ALLOC_GREF \ -_IOC(_IOC_NONE, 'G', 5, sizeof(struct ioctl_gntalloc_alloc_gref)) -struct ioctl_gntalloc_alloc_gref { - /* IN parameters */ - /* The ID of the domain to be given access to the grants. */ - __u16 domid; - /* Flags for this mapping */ - __u16 flags; - /* Number of pages to map */ - __u32 count; - /* OUT parameters */ - /* The offset to be used on a subsequent call to mmap(). */ - __u64 index; - /* The grant references of the newly created grant, one per page */ - /* Variable size, depending on count */ - __u32 gref_ids[1]; -}; - -#define GNTALLOC_FLAG_WRITABLE 1 - -/* - * Deallocates the grant reference, allowing the associated page to be freed if - * no other domains are using it. - */ -#define IOCTL_GNTALLOC_DEALLOC_GREF \ -_IOC(_IOC_NONE, 'G', 6, sizeof(struct ioctl_gntalloc_dealloc_gref)) -struct ioctl_gntalloc_dealloc_gref { - /* IN parameters */ - /* The offset returned in the map operation */ - __u64 index; - /* Number of references to unmap */ - __u32 count; -}; - -/* - * Sets up an unmap notification within the page, so that the other side can do - * cleanup if this side crashes. Required to implement cross-domain robust - * mutexes or close notification on communication channels. - * - * Each mapped page only supports one notification; multiple calls referring to - * the same page overwrite the previous notification. You must clear the - * notification prior to the IOCTL_GNTALLOC_DEALLOC_GREF if you do not want it - * to occur. - */ -#define IOCTL_GNTALLOC_SET_UNMAP_NOTIFY \ -_IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntalloc_unmap_notify)) -struct ioctl_gntalloc_unmap_notify { - /* IN parameters */ - /* Offset in the file descriptor for a byte within the page (same as - * used in mmap). If using UNMAP_NOTIFY_CLEAR_BYTE, this is the byte to - * be cleared. Otherwise, it can be any byte in the page whose - * notification we are adjusting. - */ - __u64 index; - /* Action(s) to take on unmap */ - __u32 action; - /* Event channel to notify */ - __u32 event_channel_port; -}; - -/* Clear (set to zero) the byte specified by index */ -#define UNMAP_NOTIFY_CLEAR_BYTE 0x1 -/* Send an interrupt on the indicated event channel */ -#define UNMAP_NOTIFY_SEND_EVENT 0x2 - -#endif /* __LINUX_PUBLIC_GNTALLOC_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/xen/gntdev.h b/lib/libc/include/generic-musl/xen/gntdev.h deleted file mode 100644 index d191925b4b..0000000000 --- a/lib/libc/include/generic-musl/xen/gntdev.h +++ /dev/null @@ -1,309 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT) */ -/****************************************************************************** - * gntdev.h - * - * Interface to /dev/xen/gntdev. - * - * Copyright (c) 2007, D G Murray - * Copyright (c) 2018, Oleksandr Andrushchenko, EPAM Systems Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation; or, when distributed - * separately from the Linux kernel or incorporated into other - * software packages, subject to the following license: - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this source file (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, modify, - * merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef __LINUX_PUBLIC_GNTDEV_H__ -#define __LINUX_PUBLIC_GNTDEV_H__ - -#include - -struct ioctl_gntdev_grant_ref { - /* The domain ID of the grant to be mapped. */ - __u32 domid; - /* The grant reference of the grant to be mapped. */ - __u32 ref; -}; - -/* - * Inserts the grant references into the mapping table of an instance - * of gntdev. N.B. This does not perform the mapping, which is deferred - * until mmap() is called with @index as the offset. - */ -#define IOCTL_GNTDEV_MAP_GRANT_REF \ -_IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref)) -struct ioctl_gntdev_map_grant_ref { - /* IN parameters */ - /* The number of grants to be mapped. */ - __u32 count; - __u32 pad; - /* OUT parameters */ - /* The offset to be used on a subsequent call to mmap(). */ - __u64 index; - /* Variable IN parameter. */ - /* Array of grant references, of size @count. */ - struct ioctl_gntdev_grant_ref refs[1]; -}; - -/* - * Removes the grant references from the mapping table of an instance of - * of gntdev. N.B. munmap() must be called on the relevant virtual address(es) - * before this ioctl is called, or an error will result. - */ -#define IOCTL_GNTDEV_UNMAP_GRANT_REF \ -_IOC(_IOC_NONE, 'G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref)) -struct ioctl_gntdev_unmap_grant_ref { - /* IN parameters */ - /* The offset was returned by the corresponding map operation. */ - __u64 index; - /* The number of pages to be unmapped. */ - __u32 count; - __u32 pad; -}; - -/* - * Returns the offset in the driver's address space that corresponds - * to @vaddr. This can be used to perform a munmap(), followed by an - * UNMAP_GRANT_REF ioctl, where no state about the offset is retained by - * the caller. The number of pages that were allocated at the same time as - * @vaddr is returned in @count. - * - * N.B. Where more than one page has been mapped into a contiguous range, the - * supplied @vaddr must correspond to the start of the range; otherwise - * an error will result. It is only possible to munmap() the entire - * contiguously-allocated range at once, and not any subrange thereof. - */ -#define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR \ -_IOC(_IOC_NONE, 'G', 2, sizeof(struct ioctl_gntdev_get_offset_for_vaddr)) -struct ioctl_gntdev_get_offset_for_vaddr { - /* IN parameters */ - /* The virtual address of the first mapped page in a range. */ - __u64 vaddr; - /* OUT parameters */ - /* The offset that was used in the initial mmap() operation. */ - __u64 offset; - /* The number of pages mapped in the VM area that begins at @vaddr. */ - __u32 count; - __u32 pad; -}; - -/* - * Sets the maximum number of grants that may mapped at once by this gntdev - * instance. - * - * N.B. This must be called before any other ioctl is performed on the device. - */ -#define IOCTL_GNTDEV_SET_MAX_GRANTS \ -_IOC(_IOC_NONE, 'G', 3, sizeof(struct ioctl_gntdev_set_max_grants)) -struct ioctl_gntdev_set_max_grants { - /* IN parameter */ - /* The maximum number of grants that may be mapped at once. */ - __u32 count; -}; - -/* - * Sets up an unmap notification within the page, so that the other side can do - * cleanup if this side crashes. Required to implement cross-domain robust - * mutexes or close notification on communication channels. - * - * Each mapped page only supports one notification; multiple calls referring to - * the same page overwrite the previous notification. You must clear the - * notification prior to the IOCTL_GNTALLOC_DEALLOC_GREF if you do not want it - * to occur. - */ -#define IOCTL_GNTDEV_SET_UNMAP_NOTIFY \ -_IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntdev_unmap_notify)) -struct ioctl_gntdev_unmap_notify { - /* IN parameters */ - /* Offset in the file descriptor for a byte within the page (same as - * used in mmap). If using UNMAP_NOTIFY_CLEAR_BYTE, this is the byte to - * be cleared. Otherwise, it can be any byte in the page whose - * notification we are adjusting. - */ - __u64 index; - /* Action(s) to take on unmap */ - __u32 action; - /* Event channel to notify */ - __u32 event_channel_port; -}; - -struct gntdev_grant_copy_segment { - union { - void *virt; - struct { - grant_ref_t ref; - __u16 offset; - domid_t domid; - } foreign; - } source, dest; - __u16 len; - - __u16 flags; /* GNTCOPY_* */ - __s16 status; /* GNTST_* */ -}; - -/* - * Copy between grant references and local buffers. - * - * The copy is split into @count @segments, each of which can copy - * to/from one grant reference. - * - * Each segment is similar to struct gnttab_copy in the hypervisor ABI - * except the local buffer is specified using a virtual address - * (instead of a GFN and offset). - * - * The local buffer may cross a Xen page boundary -- the driver will - * split segments into multiple ops if required. - * - * Returns 0 if all segments have been processed and @status in each - * segment is valid. Note that one or more segments may have failed - * (status != GNTST_okay). - * - * If the driver had to split a segment into two or more ops, @status - * includes the status of the first failed op for that segment (or - * GNTST_okay if all ops were successful). - * - * If -1 is returned, the status of all segments is undefined. - * - * EINVAL: A segment has local buffers for both source and - * destination. - * EINVAL: A segment crosses the boundary of a foreign page. - * EFAULT: A segment's local buffer is not accessible. - */ -#define IOCTL_GNTDEV_GRANT_COPY \ - _IOC(_IOC_NONE, 'G', 8, sizeof(struct ioctl_gntdev_grant_copy)) -struct ioctl_gntdev_grant_copy { - unsigned int count; - struct gntdev_grant_copy_segment *segments; -}; - -/* Clear (set to zero) the byte specified by index */ -#define UNMAP_NOTIFY_CLEAR_BYTE 0x1 -/* Send an interrupt on the indicated event channel */ -#define UNMAP_NOTIFY_SEND_EVENT 0x2 - -/* - * Flags to be used while requesting memory mapping's backing storage - * to be allocated with DMA API. - */ - -/* - * The buffer is backed with memory allocated with dma_alloc_wc. - */ -#define GNTDEV_DMA_FLAG_WC (1 << 0) - -/* - * The buffer is backed with memory allocated with dma_alloc_coherent. - */ -#define GNTDEV_DMA_FLAG_COHERENT (1 << 1) - -/* - * Create a dma-buf [1] from grant references @refs of count @count provided - * by the foreign domain @domid with flags @flags. - * - * By default dma-buf is backed by system memory pages, but by providing - * one of the GNTDEV_DMA_FLAG_XXX flags it can also be created as - * a DMA write-combine or coherent buffer, e.g. allocated with dma_alloc_wc/ - * dma_alloc_coherent. - * - * Returns 0 if dma-buf was successfully created and the corresponding - * dma-buf's file descriptor is returned in @fd. - * - * [1] Documentation/driver-api/dma-buf.rst - */ - -#define IOCTL_GNTDEV_DMABUF_EXP_FROM_REFS \ - _IOC(_IOC_NONE, 'G', 9, \ - sizeof(struct ioctl_gntdev_dmabuf_exp_from_refs)) -struct ioctl_gntdev_dmabuf_exp_from_refs { - /* IN parameters. */ - /* Specific options for this dma-buf: see GNTDEV_DMA_FLAG_XXX. */ - __u32 flags; - /* Number of grant references in @refs array. */ - __u32 count; - /* OUT parameters. */ - /* File descriptor of the dma-buf. */ - __u32 fd; - /* The domain ID of the grant references to be mapped. */ - __u32 domid; - /* Variable IN parameter. */ - /* Array of grant references of size @count. */ - __u32 refs[1]; -}; - -/* - * This will block until the dma-buf with the file descriptor @fd is - * released. This is only valid for buffers created with - * IOCTL_GNTDEV_DMABUF_EXP_FROM_REFS. - * - * If within @wait_to_ms milliseconds the buffer is not released - * then -ETIMEDOUT error is returned. - * If the buffer with the file descriptor @fd does not exist or has already - * been released, then -ENOENT is returned. For valid file descriptors - * this must not be treated as error. - */ -#define IOCTL_GNTDEV_DMABUF_EXP_WAIT_RELEASED \ - _IOC(_IOC_NONE, 'G', 10, \ - sizeof(struct ioctl_gntdev_dmabuf_exp_wait_released)) -struct ioctl_gntdev_dmabuf_exp_wait_released { - /* IN parameters */ - __u32 fd; - __u32 wait_to_ms; -}; - -/* - * Import a dma-buf with file descriptor @fd and export granted references - * to the pages of that dma-buf into array @refs of size @count. - */ -#define IOCTL_GNTDEV_DMABUF_IMP_TO_REFS \ - _IOC(_IOC_NONE, 'G', 11, \ - sizeof(struct ioctl_gntdev_dmabuf_imp_to_refs)) -struct ioctl_gntdev_dmabuf_imp_to_refs { - /* IN parameters. */ - /* File descriptor of the dma-buf. */ - __u32 fd; - /* Number of grant references in @refs array. */ - __u32 count; - /* The domain ID for which references to be granted. */ - __u32 domid; - /* Reserved - must be zero. */ - __u32 reserved; - /* OUT parameters. */ - /* Array of grant references of size @count. */ - __u32 refs[1]; -}; - -/* - * This will close all references to the imported buffer with file descriptor - * @fd, so it can be released by the owner. This is only valid for buffers - * created with IOCTL_GNTDEV_DMABUF_IMP_TO_REFS. - */ -#define IOCTL_GNTDEV_DMABUF_IMP_RELEASE \ - _IOC(_IOC_NONE, 'G', 12, \ - sizeof(struct ioctl_gntdev_dmabuf_imp_release)) -struct ioctl_gntdev_dmabuf_imp_release { - /* IN parameters */ - __u32 fd; - __u32 reserved; -}; - -#endif /* __LINUX_PUBLIC_GNTDEV_H__ */ \ No newline at end of file diff --git a/lib/libc/include/generic-musl/xen/privcmd.h b/lib/libc/include/generic-musl/xen/privcmd.h deleted file mode 100644 index e6b71023bf..0000000000 --- a/lib/libc/include/generic-musl/xen/privcmd.h +++ /dev/null @@ -1,129 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT) */ -/****************************************************************************** - * privcmd.h - * - * Interface to /proc/xen/privcmd. - * - * Copyright (c) 2003-2005, K A Fraser - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation; or, when distributed - * separately from the Linux kernel or incorporated into other - * software packages, subject to the following license: - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this source file (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, modify, - * merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef __LINUX_PUBLIC_PRIVCMD_H__ -#define __LINUX_PUBLIC_PRIVCMD_H__ - -#include - -#include - -struct privcmd_hypercall { - __u64 op; - __u64 arg[5]; -}; - -struct privcmd_mmap_entry { - __u64 va; - /* - * This should be a GFN. It's not possible to change the name because - * it's exposed to the user-space. - */ - __u64 mfn; - __u64 npages; -}; - -struct privcmd_mmap { - int num; - domid_t dom; /* target domain */ - struct privcmd_mmap_entry *entry; -}; - -struct privcmd_mmapbatch { - int num; /* number of pages to populate */ - domid_t dom; /* target domain */ - __u64 addr; /* virtual address */ - xen_pfn_t *arr; /* array of mfns - or'd with - PRIVCMD_MMAPBATCH_*_ERROR on err */ -}; - -#define PRIVCMD_MMAPBATCH_MFN_ERROR 0xf0000000U -#define PRIVCMD_MMAPBATCH_PAGED_ERROR 0x80000000U - -struct privcmd_mmapbatch_v2 { - unsigned int num; /* number of pages to populate */ - domid_t dom; /* target domain */ - __u64 addr; /* virtual address */ - const xen_pfn_t *arr; /* array of mfns */ - int *err; /* array of error codes */ -}; - -struct privcmd_dm_op_buf { - void *uptr; - size_t size; -}; - -struct privcmd_dm_op { - domid_t dom; - __u16 num; - const struct privcmd_dm_op_buf *ubufs; -}; - -struct privcmd_mmap_resource { - domid_t dom; - __u32 type; - __u32 id; - __u32 idx; - __u64 num; - __u64 addr; -}; - -/* - * @cmd: IOCTL_PRIVCMD_HYPERCALL - * @arg: &privcmd_hypercall_t - * Return: Value returned from execution of the specified hypercall. - * - * @cmd: IOCTL_PRIVCMD_MMAPBATCH_V2 - * @arg: &struct privcmd_mmapbatch_v2 - * Return: 0 on success (i.e., arg->err contains valid error codes for - * each frame). On an error other than a failed frame remap, -1 is - * returned and errno is set to EINVAL, EFAULT etc. As an exception, - * if the operation was otherwise successful but any frame failed with - * -ENOENT, then -1 is returned and errno is set to ENOENT. - */ -#define IOCTL_PRIVCMD_HYPERCALL \ - _IOC(_IOC_NONE, 'P', 0, sizeof(struct privcmd_hypercall)) -#define IOCTL_PRIVCMD_MMAP \ - _IOC(_IOC_NONE, 'P', 2, sizeof(struct privcmd_mmap)) -#define IOCTL_PRIVCMD_MMAPBATCH \ - _IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch)) -#define IOCTL_PRIVCMD_MMAPBATCH_V2 \ - _IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2)) -#define IOCTL_PRIVCMD_DM_OP \ - _IOC(_IOC_NONE, 'P', 5, sizeof(struct privcmd_dm_op)) -#define IOCTL_PRIVCMD_RESTRICT \ - _IOC(_IOC_NONE, 'P', 6, sizeof(domid_t)) -#define IOCTL_PRIVCMD_MMAP_RESOURCE \ - _IOC(_IOC_NONE, 'P', 7, sizeof(struct privcmd_mmap_resource)) - -#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */ \ No newline at end of file diff --git a/lib/libc/include/i386-linux-musl/bfd.h b/lib/libc/include/i386-linux-musl/bfd.h deleted file mode 100644 index 73d2dccfe2..0000000000 --- a/lib/libc/include/i386-linux-musl/bfd.h +++ /dev/null @@ -1,8034 +0,0 @@ -/* 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-2019 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 32 - -/* The word size of the default bfd target. */ -#define BFD_DEFAULT_TARGET_SIZE 32 - -#define BFD_HOST_64BIT_LONG 0 -#define BFD_HOST_64BIT_LONG_LONG 1 -#if 1 -#define BFD_HOST_64_BIT long long -#define BFD_HOST_U_64_BIT unsigned long 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) - -/* 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; - 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) - -#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 bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#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_get_section_limit_octets(bfd, sec) / 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) - -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 *); - -/* 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_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) - -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); - -#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_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_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 **); -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 int 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 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)); - -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_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -/* 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); - -/* XCOFF support routines for the linker. */ - -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_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -/* 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 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 *); - -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 *); - -struct elf32_arm_params { - char *thumb_entry_symbol; - int byteswap_code; - int target1_is_rel; - char * target2_type; - int fix_v4bx; - int use_blx; - bfd_arm_vfp11_fix vfp11_denorm_fix; - bfd_arm_stm32l4xx_fix stm32l4xx_fix; - int no_enum_size_warning; - int no_wchar_size_warning; - int pic_veneer; - int fix_cortex_a8; - int fix_arm1176; - int merge_exidx_entries; - int cmse_implib; - bfd *in_implib_bfd; -}; - -void bfd_elf32_arm_set_target_params - (bfd *, struct bfd_link_info *, struct elf32_arm_params *); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_keep_private_stub_output_sections - (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 *, 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 - (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 *, - struct bfd_section *, unsigned int), - 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); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -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, int); - -extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, 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 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 - (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 *); -/* 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); - -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); - -/* 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); - -/* MIPS ABI flags data access. For the disassembler. */ -struct elf_internal_abiflags_v0; -extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); - -/* C-SKY functions. */ -extern bfd_boolean elf32_csky_build_stubs - (struct bfd_link_info *); -extern bfd_boolean elf32_csky_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section *(*) (const char*, struct bfd_section*), - void (*) (void)); -extern void elf32_csky_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern int elf32_csky_setup_section_lists - (bfd *, struct bfd_link_info *); -/* 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); - -/* 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) \ - (*(const unsigned char *) (ptr) & 0xff) -#define bfd_get_signed_8(abfd, ptr) \ - (((*(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_vma) 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 - - /* 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; -}; - -/* 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 _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]) - -#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) - -#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)) - -/* 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)) - -#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 - (bfd *abfd, asection *sec, flagword flags); - -void bfd_rename_section - (bfd *abfd, 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 - (bfd *abfd, 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); - -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 - 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_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_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_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. */ -#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_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_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; -} -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 (bfd *abfd); - -unsigned long bfd_get_mach (bfd *abfd); - -unsigned int bfd_arch_bits_per_byte (bfd *abfd); - -unsigned int bfd_arch_bits_per_address (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 (bfd *abfd); - -unsigned int bfd_arch_mach_octets_per_byte - (enum bfd_architecture arch, unsigned long machine); - -/* Extracted from reloc.c. */ - -typedef enum bfd_reloc_status -{ - /* No errors detected. Note - the value 2 is used so that it - will not be mistaken for the boolean TRUE or FALSE values. */ - bfd_reloc_ok = 2, - - /* The relocation was performed, but there was an overflow. */ - bfd_reloc_overflow, - - /* The address to relocate was not within the section supplied. */ - bfd_reloc_outofrange, - - /* Used by special functions. */ - bfd_reloc_continue, - - /* Unsupported relocation size requested. */ - bfd_reloc_notsupported, - - /* 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. */ - 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, - -/* 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_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_HIGHER, - 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, - -/* 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, - -/* 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_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 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, - -/* 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, - -/* 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, - -/* 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 : 20; - - /* 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 - - /* 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 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 - 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; -}; - -/* 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, - 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_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_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. */ - 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_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 *); - - /* 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; - -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 \ No newline at end of file diff --git a/lib/libc/include/i386-linux-musl/bfd_stdint.h b/lib/libc/include/i386-linux-musl/bfd_stdint.h deleted file mode 100644 index f130540f91..0000000000 --- a/lib/libc/include/i386-linux-musl/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for i686-linux-musl-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/i386-linux-musl/bits/alltypes.h b/lib/libc/include/i386-linux-musl/bits/alltypes.h deleted file mode 100644 index 4f566ee05f..0000000000 --- a/lib/libc/include/i386-linux-musl/bits/alltypes.h +++ /dev/null @@ -1,433 +0,0 @@ -#define _Addr int -#define _Int64 long long -#define _Reg int - -#if __GNUC__ >= 3 -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - -#else -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef struct __va_list * va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef struct __va_list * __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - -#endif - -#ifndef __cplusplus -#ifdef __WCHAR_TYPE__ -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef __WCHAR_TYPE__ wchar_t; -#define __DEFINED_wchar_t -#endif - -#else -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef long wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif -#endif - -#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 0 -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - -#else -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef long double float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef long double double_t; -#define __DEFINED_double_t -#endif - -#endif - -#if !defined(__cplusplus) -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { _Alignas(8) long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - -#elif defined(__GNUC__) -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { __attribute__((__aligned__(8))) long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - -#else -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { alignas(8) long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - -#endif - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/i386-linux-musl/bits/endian.h b/lib/libc/include/i386-linux-musl/bits/endian.h deleted file mode 100644 index b1a7affbbb..0000000000 --- a/lib/libc/include/i386-linux-musl/bits/endian.h +++ /dev/null @@ -1 +0,0 @@ -#define __BYTE_ORDER __LITTLE_ENDIAN \ No newline at end of file diff --git a/lib/libc/include/i386-linux-musl/bits/syscall.h b/lib/libc/include/i386-linux-musl/bits/syscall.h deleted file mode 100644 index d4f03059fa..0000000000 --- a/lib/libc/include/i386-linux-musl/bits/syscall.h +++ /dev/null @@ -1,771 +0,0 @@ -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 -#define __NR_break 17 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_stty 31 -#define __NR_gtty 32 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_ftime 35 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_prof 44 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_lock 53 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_mpx 56 -#define __NR_setpgid 57 -#define __NR_ulimit 58 -#define __NR_oldolduname 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_profil 98 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_ioperm 101 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_olduname 109 -#define __NR_iopl 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_vm86old 113 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_modify_ldt 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_vm86 166 -#define __NR_query_module 167 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_setresgid 170 -#define __NR_getresgid 171 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 -#define __NR_chown 182 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_getpmsg 188 -#define __NR_putpmsg 189 -#define __NR_vfork 190 -#define __NR_ugetrlimit 191 -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 -#define __NR_lchown32 198 -#define __NR_getuid32 199 -#define __NR_getgid32 200 -#define __NR_geteuid32 201 -#define __NR_getegid32 202 -#define __NR_setreuid32 203 -#define __NR_setregid32 204 -#define __NR_getgroups32 205 -#define __NR_setgroups32 206 -#define __NR_fchown32 207 -#define __NR_setresuid32 208 -#define __NR_getresuid32 209 -#define __NR_setresgid32 210 -#define __NR_getresgid32 211 -#define __NR_chown32 212 -#define __NR_setuid32 213 -#define __NR_setgid32 214 -#define __NR_setfsuid32 215 -#define __NR_setfsgid32 216 -#define __NR_pivot_root 217 -#define __NR_mincore 218 -#define __NR_madvise 219 -#define __NR_getdents64 220 -#define __NR_fcntl64 221 -/* 223 is unused */ -#define __NR_gettid 224 -#define __NR_readahead 225 -#define __NR_setxattr 226 -#define __NR_lsetxattr 227 -#define __NR_fsetxattr 228 -#define __NR_getxattr 229 -#define __NR_lgetxattr 230 -#define __NR_fgetxattr 231 -#define __NR_listxattr 232 -#define __NR_llistxattr 233 -#define __NR_flistxattr 234 -#define __NR_removexattr 235 -#define __NR_lremovexattr 236 -#define __NR_fremovexattr 237 -#define __NR_tkill 238 -#define __NR_sendfile64 239 -#define __NR_futex 240 -#define __NR_sched_setaffinity 241 -#define __NR_sched_getaffinity 242 -#define __NR_set_thread_area 243 -#define __NR_get_thread_area 244 -#define __NR_io_setup 245 -#define __NR_io_destroy 246 -#define __NR_io_getevents 247 -#define __NR_io_submit 248 -#define __NR_io_cancel 249 -#define __NR_fadvise64 250 -/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */ -#define __NR_exit_group 252 -#define __NR_lookup_dcookie 253 -#define __NR_epoll_create 254 -#define __NR_epoll_ctl 255 -#define __NR_epoll_wait 256 -#define __NR_remap_file_pages 257 -#define __NR_set_tid_address 258 -#define __NR_timer_create 259 -#define __NR_timer_settime (__NR_timer_create+1) -#define __NR_timer_gettime (__NR_timer_create+2) -#define __NR_timer_getoverrun (__NR_timer_create+3) -#define __NR_timer_delete (__NR_timer_create+4) -#define __NR_clock_settime (__NR_timer_create+5) -#define __NR_clock_gettime (__NR_timer_create+6) -#define __NR_clock_getres (__NR_timer_create+7) -#define __NR_clock_nanosleep (__NR_timer_create+8) -#define __NR_statfs64 268 -#define __NR_fstatfs64 269 -#define __NR_tgkill 270 -#define __NR_utimes 271 -#define __NR_fadvise64_64 272 -#define __NR_vserver 273 -#define __NR_mbind 274 -#define __NR_get_mempolicy 275 -#define __NR_set_mempolicy 276 -#define __NR_mq_open 277 -#define __NR_mq_unlink (__NR_mq_open+1) -#define __NR_mq_timedsend (__NR_mq_open+2) -#define __NR_mq_timedreceive (__NR_mq_open+3) -#define __NR_mq_notify (__NR_mq_open+4) -#define __NR_mq_getsetattr (__NR_mq_open+5) -#define __NR_kexec_load 283 -#define __NR_waitid 284 -/* #define __NR_sys_setaltroot 285 */ -#define __NR_add_key 286 -#define __NR_request_key 287 -#define __NR_keyctl 288 -#define __NR_ioprio_set 289 -#define __NR_ioprio_get 290 -#define __NR_inotify_init 291 -#define __NR_inotify_add_watch 292 -#define __NR_inotify_rm_watch 293 -#define __NR_migrate_pages 294 -#define __NR_openat 295 -#define __NR_mkdirat 296 -#define __NR_mknodat 297 -#define __NR_fchownat 298 -#define __NR_futimesat 299 -#define __NR_fstatat64 300 -#define __NR_unlinkat 301 -#define __NR_renameat 302 -#define __NR_linkat 303 -#define __NR_symlinkat 304 -#define __NR_readlinkat 305 -#define __NR_fchmodat 306 -#define __NR_faccessat 307 -#define __NR_pselect6 308 -#define __NR_ppoll 309 -#define __NR_unshare 310 -#define __NR_set_robust_list 311 -#define __NR_get_robust_list 312 -#define __NR_splice 313 -#define __NR_sync_file_range 314 -#define __NR_tee 315 -#define __NR_vmsplice 316 -#define __NR_move_pages 317 -#define __NR_getcpu 318 -#define __NR_epoll_pwait 319 -#define __NR_utimensat 320 -#define __NR_signalfd 321 -#define __NR_timerfd_create 322 -#define __NR_eventfd 323 -#define __NR_fallocate 324 -#define __NR_timerfd_settime 325 -#define __NR_timerfd_gettime 326 -#define __NR_signalfd4 327 -#define __NR_eventfd2 328 -#define __NR_epoll_create1 329 -#define __NR_dup3 330 -#define __NR_pipe2 331 -#define __NR_inotify_init1 332 -#define __NR_preadv 333 -#define __NR_pwritev 334 -#define __NR_rt_tgsigqueueinfo 335 -#define __NR_perf_event_open 336 -#define __NR_recvmmsg 337 -#define __NR_fanotify_init 338 -#define __NR_fanotify_mark 339 -#define __NR_prlimit64 340 -#define __NR_name_to_handle_at 341 -#define __NR_open_by_handle_at 342 -#define __NR_clock_adjtime 343 -#define __NR_syncfs 344 -#define __NR_sendmmsg 345 -#define __NR_setns 346 -#define __NR_process_vm_readv 347 -#define __NR_process_vm_writev 348 -#define __NR_kcmp 349 -#define __NR_finit_module 350 -#define __NR_sched_setattr 351 -#define __NR_sched_getattr 352 -#define __NR_renameat2 353 -#define __NR_seccomp 354 -#define __NR_getrandom 355 -#define __NR_memfd_create 356 -#define __NR_bpf 357 -#define __NR_execveat 358 -#define __NR_socket 359 -#define __NR_socketpair 360 -#define __NR_bind 361 -#define __NR_connect 362 -#define __NR_listen 363 -#define __NR_accept4 364 -#define __NR_getsockopt 365 -#define __NR_setsockopt 366 -#define __NR_getsockname 367 -#define __NR_getpeername 368 -#define __NR_sendto 369 -#define __NR_sendmsg 370 -#define __NR_recvfrom 371 -#define __NR_recvmsg 372 -#define __NR_shutdown 373 -#define __NR_userfaultfd 374 -#define __NR_membarrier 375 -#define __NR_mlock2 376 -#define __NR_copy_file_range 377 -#define __NR_preadv2 378 -#define __NR_pwritev2 379 -#define __NR_pkey_mprotect 380 -#define __NR_pkey_alloc 381 -#define __NR_pkey_free 382 -#define __NR_statx 383 -#define __NR_arch_prctl 384 -#define __NR_io_pgetevents 385 -#define __NR_rseq 386 - -#define SYS_restart_syscall 0 -#define SYS_exit 1 -#define SYS_fork 2 -#define SYS_read 3 -#define SYS_write 4 -#define SYS_open 5 -#define SYS_close 6 -#define SYS_waitpid 7 -#define SYS_creat 8 -#define SYS_link 9 -#define SYS_unlink 10 -#define SYS_execve 11 -#define SYS_chdir 12 -#define SYS_time 13 -#define SYS_mknod 14 -#define SYS_chmod 15 -#define SYS_lchown 16 -#define SYS_break 17 -#define SYS_oldstat 18 -#define SYS_lseek 19 -#define SYS_getpid 20 -#define SYS_mount 21 -#define SYS_umount 22 -#define SYS_setuid 23 -#define SYS_getuid 24 -#define SYS_stime 25 -#define SYS_ptrace 26 -#define SYS_alarm 27 -#define SYS_oldfstat 28 -#define SYS_pause 29 -#define SYS_utime 30 -#define SYS_stty 31 -#define SYS_gtty 32 -#define SYS_access 33 -#define SYS_nice 34 -#define SYS_ftime 35 -#define SYS_sync 36 -#define SYS_kill 37 -#define SYS_rename 38 -#define SYS_mkdir 39 -#define SYS_rmdir 40 -#define SYS_dup 41 -#define SYS_pipe 42 -#define SYS_times 43 -#define SYS_prof 44 -#define SYS_brk 45 -#define SYS_setgid 46 -#define SYS_getgid 47 -#define SYS_signal 48 -#define SYS_geteuid 49 -#define SYS_getegid 50 -#define SYS_acct 51 -#define SYS_umount2 52 -#define SYS_lock 53 -#define SYS_ioctl 54 -#define SYS_fcntl 55 -#define SYS_mpx 56 -#define SYS_setpgid 57 -#define SYS_ulimit 58 -#define SYS_oldolduname 59 -#define SYS_umask 60 -#define SYS_chroot 61 -#define SYS_ustat 62 -#define SYS_dup2 63 -#define SYS_getppid 64 -#define SYS_getpgrp 65 -#define SYS_setsid 66 -#define SYS_sigaction 67 -#define SYS_sgetmask 68 -#define SYS_ssetmask 69 -#define SYS_setreuid 70 -#define SYS_setregid 71 -#define SYS_sigsuspend 72 -#define SYS_sigpending 73 -#define SYS_sethostname 74 -#define SYS_setrlimit 75 -#define SYS_getrlimit 76 /* Back compatible 2Gig limited rlimit */ -#define SYS_getrusage 77 -#define SYS_gettimeofday 78 -#define SYS_settimeofday 79 -#define SYS_getgroups 80 -#define SYS_setgroups 81 -#define SYS_select 82 -#define SYS_symlink 83 -#define SYS_oldlstat 84 -#define SYS_readlink 85 -#define SYS_uselib 86 -#define SYS_swapon 87 -#define SYS_reboot 88 -#define SYS_readdir 89 -#define SYS_mmap 90 -#define SYS_munmap 91 -#define SYS_truncate 92 -#define SYS_ftruncate 93 -#define SYS_fchmod 94 -#define SYS_fchown 95 -#define SYS_getpriority 96 -#define SYS_setpriority 97 -#define SYS_profil 98 -#define SYS_statfs 99 -#define SYS_fstatfs 100 -#define SYS_ioperm 101 -#define SYS_socketcall 102 -#define SYS_syslog 103 -#define SYS_setitimer 104 -#define SYS_getitimer 105 -#define SYS_stat 106 -#define SYS_lstat 107 -#define SYS_fstat 108 -#define SYS_olduname 109 -#define SYS_iopl 110 -#define SYS_vhangup 111 -#define SYS_idle 112 -#define SYS_vm86old 113 -#define SYS_wait4 114 -#define SYS_swapoff 115 -#define SYS_sysinfo 116 -#define SYS_ipc 117 -#define SYS_fsync 118 -#define SYS_sigreturn 119 -#define SYS_clone 120 -#define SYS_setdomainname 121 -#define SYS_uname 122 -#define SYS_modify_ldt 123 -#define SYS_adjtimex 124 -#define SYS_mprotect 125 -#define SYS_sigprocmask 126 -#define SYS_create_module 127 -#define SYS_init_module 128 -#define SYS_delete_module 129 -#define SYS_get_kernel_syms 130 -#define SYS_quotactl 131 -#define SYS_getpgid 132 -#define SYS_fchdir 133 -#define SYS_bdflush 134 -#define SYS_sysfs 135 -#define SYS_personality 136 -#define SYS_afs_syscall 137 -#define SYS_setfsuid 138 -#define SYS_setfsgid 139 -#define SYS__llseek 140 -#define SYS_getdents 141 -#define SYS__newselect 142 -#define SYS_flock 143 -#define SYS_msync 144 -#define SYS_readv 145 -#define SYS_writev 146 -#define SYS_getsid 147 -#define SYS_fdatasync 148 -#define SYS__sysctl 149 -#define SYS_mlock 150 -#define SYS_munlock 151 -#define SYS_mlockall 152 -#define SYS_munlockall 153 -#define SYS_sched_setparam 154 -#define SYS_sched_getparam 155 -#define SYS_sched_setscheduler 156 -#define SYS_sched_getscheduler 157 -#define SYS_sched_yield 158 -#define SYS_sched_get_priority_max 159 -#define SYS_sched_get_priority_min 160 -#define SYS_sched_rr_get_interval 161 -#define SYS_nanosleep 162 -#define SYS_mremap 163 -#define SYS_setresuid 164 -#define SYS_getresuid 165 -#define SYS_vm86 166 -#define SYS_query_module 167 -#define SYS_poll 168 -#define SYS_nfsservctl 169 -#define SYS_setresgid 170 -#define SYS_getresgid 171 -#define SYS_prctl 172 -#define SYS_rt_sigreturn 173 -#define SYS_rt_sigaction 174 -#define SYS_rt_sigprocmask 175 -#define SYS_rt_sigpending 176 -#define SYS_rt_sigtimedwait 177 -#define SYS_rt_sigqueueinfo 178 -#define SYS_rt_sigsuspend 179 -#define SYS_pread64 180 -#define SYS_pwrite64 181 -#define SYS_chown 182 -#define SYS_getcwd 183 -#define SYS_capget 184 -#define SYS_capset 185 -#define SYS_sigaltstack 186 -#define SYS_sendfile 187 -#define SYS_getpmsg 188 -#define SYS_putpmsg 189 -#define SYS_vfork 190 -#define SYS_ugetrlimit 191 -#define SYS_mmap2 192 -#define SYS_truncate64 193 -#define SYS_ftruncate64 194 -#define SYS_stat64 195 -#define SYS_lstat64 196 -#define SYS_fstat64 197 -#define SYS_lchown32 198 -#define SYS_getuid32 199 -#define SYS_getgid32 200 -#define SYS_geteuid32 201 -#define SYS_getegid32 202 -#define SYS_setreuid32 203 -#define SYS_setregid32 204 -#define SYS_getgroups32 205 -#define SYS_setgroups32 206 -#define SYS_fchown32 207 -#define SYS_setresuid32 208 -#define SYS_getresuid32 209 -#define SYS_setresgid32 210 -#define SYS_getresgid32 211 -#define SYS_chown32 212 -#define SYS_setuid32 213 -#define SYS_setgid32 214 -#define SYS_setfsuid32 215 -#define SYS_setfsgid32 216 -#define SYS_pivot_root 217 -#define SYS_mincore 218 -#define SYS_madvise 219 -#define SYS_getdents64 220 -#define SYS_fcntl64 221 -#define SYS_gettid 224 -#define SYS_readahead 225 -#define SYS_setxattr 226 -#define SYS_lsetxattr 227 -#define SYS_fsetxattr 228 -#define SYS_getxattr 229 -#define SYS_lgetxattr 230 -#define SYS_fgetxattr 231 -#define SYS_listxattr 232 -#define SYS_llistxattr 233 -#define SYS_flistxattr 234 -#define SYS_removexattr 235 -#define SYS_lremovexattr 236 -#define SYS_fremovexattr 237 -#define SYS_tkill 238 -#define SYS_sendfile64 239 -#define SYS_futex 240 -#define SYS_sched_setaffinity 241 -#define SYS_sched_getaffinity 242 -#define SYS_set_thread_area 243 -#define SYS_get_thread_area 244 -#define SYS_io_setup 245 -#define SYS_io_destroy 246 -#define SYS_io_getevents 247 -#define SYS_io_submit 248 -#define SYS_io_cancel 249 -#define SYS_fadvise64 250 -#define SYS_exit_group 252 -#define SYS_lookup_dcookie 253 -#define SYS_epoll_create 254 -#define SYS_epoll_ctl 255 -#define SYS_epoll_wait 256 -#define SYS_remap_file_pages 257 -#define SYS_set_tid_address 258 -#define SYS_timer_create 259 -#define SYS_timer_settime (__NR_timer_create+1) -#define SYS_timer_gettime (__NR_timer_create+2) -#define SYS_timer_getoverrun (__NR_timer_create+3) -#define SYS_timer_delete (__NR_timer_create+4) -#define SYS_clock_settime (__NR_timer_create+5) -#define SYS_clock_gettime (__NR_timer_create+6) -#define SYS_clock_getres (__NR_timer_create+7) -#define SYS_clock_nanosleep (__NR_timer_create+8) -#define SYS_statfs64 268 -#define SYS_fstatfs64 269 -#define SYS_tgkill 270 -#define SYS_utimes 271 -#define SYS_fadvise64_64 272 -#define SYS_vserver 273 -#define SYS_mbind 274 -#define SYS_get_mempolicy 275 -#define SYS_set_mempolicy 276 -#define SYS_mq_open 277 -#define SYS_mq_unlink (__NR_mq_open+1) -#define SYS_mq_timedsend (__NR_mq_open+2) -#define SYS_mq_timedreceive (__NR_mq_open+3) -#define SYS_mq_notify (__NR_mq_open+4) -#define SYS_mq_getsetattr (__NR_mq_open+5) -#define SYS_kexec_load 283 -#define SYS_waitid 284 -/* #define SYS_sys_setaltroot 285 */ -#define SYS_add_key 286 -#define SYS_request_key 287 -#define SYS_keyctl 288 -#define SYS_ioprio_set 289 -#define SYS_ioprio_get 290 -#define SYS_inotify_init 291 -#define SYS_inotify_add_watch 292 -#define SYS_inotify_rm_watch 293 -#define SYS_migrate_pages 294 -#define SYS_openat 295 -#define SYS_mkdirat 296 -#define SYS_mknodat 297 -#define SYS_fchownat 298 -#define SYS_futimesat 299 -#define SYS_fstatat64 300 -#define SYS_unlinkat 301 -#define SYS_renameat 302 -#define SYS_linkat 303 -#define SYS_symlinkat 304 -#define SYS_readlinkat 305 -#define SYS_fchmodat 306 -#define SYS_faccessat 307 -#define SYS_pselect6 308 -#define SYS_ppoll 309 -#define SYS_unshare 310 -#define SYS_set_robust_list 311 -#define SYS_get_robust_list 312 -#define SYS_splice 313 -#define SYS_sync_file_range 314 -#define SYS_tee 315 -#define SYS_vmsplice 316 -#define SYS_move_pages 317 -#define SYS_getcpu 318 -#define SYS_epoll_pwait 319 -#define SYS_utimensat 320 -#define SYS_signalfd 321 -#define SYS_timerfd_create 322 -#define SYS_eventfd 323 -#define SYS_fallocate 324 -#define SYS_timerfd_settime 325 -#define SYS_timerfd_gettime 326 -#define SYS_signalfd4 327 -#define SYS_eventfd2 328 -#define SYS_epoll_create1 329 -#define SYS_dup3 330 -#define SYS_pipe2 331 -#define SYS_inotify_init1 332 -#define SYS_preadv 333 -#define SYS_pwritev 334 -#define SYS_rt_tgsigqueueinfo 335 -#define SYS_perf_event_open 336 -#define SYS_recvmmsg 337 -#define SYS_fanotify_init 338 -#define SYS_fanotify_mark 339 -#define SYS_prlimit64 340 -#define SYS_name_to_handle_at 341 -#define SYS_open_by_handle_at 342 -#define SYS_clock_adjtime 343 -#define SYS_syncfs 344 -#define SYS_sendmmsg 345 -#define SYS_setns 346 -#define SYS_process_vm_readv 347 -#define SYS_process_vm_writev 348 -#define SYS_kcmp 349 -#define SYS_finit_module 350 -#define SYS_sched_setattr 351 -#define SYS_sched_getattr 352 -#define SYS_renameat2 353 -#define SYS_seccomp 354 -#define SYS_getrandom 355 -#define SYS_memfd_create 356 -#define SYS_bpf 357 -#define SYS_execveat 358 -#define SYS_socket 359 -#define SYS_socketpair 360 -#define SYS_bind 361 -#define SYS_connect 362 -#define SYS_listen 363 -#define SYS_accept4 364 -#define SYS_getsockopt 365 -#define SYS_setsockopt 366 -#define SYS_getsockname 367 -#define SYS_getpeername 368 -#define SYS_sendto 369 -#define SYS_sendmsg 370 -#define SYS_recvfrom 371 -#define SYS_recvmsg 372 -#define SYS_shutdown 373 -#define SYS_userfaultfd 374 -#define SYS_membarrier 375 -#define SYS_mlock2 376 -#define SYS_copy_file_range 377 -#define SYS_preadv2 378 -#define SYS_pwritev2 379 -#define SYS_pkey_mprotect 380 -#define SYS_pkey_alloc 381 -#define SYS_pkey_free 382 -#define SYS_statx 383 -#define SYS_arch_prctl 384 -#define SYS_io_pgetevents 385 -#define SYS_rseq 386 \ No newline at end of file diff --git a/lib/libc/include/mips-linux-musl/bfd.h b/lib/libc/include/mips-linux-musl/bfd.h deleted file mode 100644 index 1e0f4b1ef1..0000000000 --- a/lib/libc/include/mips-linux-musl/bfd.h +++ /dev/null @@ -1,8034 +0,0 @@ -/* 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-2019 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 32 - -#define BFD_HOST_64BIT_LONG 0 -#define BFD_HOST_64BIT_LONG_LONG 1 -#if 1 -#define BFD_HOST_64_BIT long long -#define BFD_HOST_U_64_BIT unsigned long 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) - -/* 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; - 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) - -#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 bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#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_get_section_limit_octets(bfd, sec) / 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) - -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 *); - -/* 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_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) - -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); - -#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_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_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 **); -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 int 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 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)); - -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_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -/* 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); - -/* XCOFF support routines for the linker. */ - -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_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -/* 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 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 *); - -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 *); - -struct elf32_arm_params { - char *thumb_entry_symbol; - int byteswap_code; - int target1_is_rel; - char * target2_type; - int fix_v4bx; - int use_blx; - bfd_arm_vfp11_fix vfp11_denorm_fix; - bfd_arm_stm32l4xx_fix stm32l4xx_fix; - int no_enum_size_warning; - int no_wchar_size_warning; - int pic_veneer; - int fix_cortex_a8; - int fix_arm1176; - int merge_exidx_entries; - int cmse_implib; - bfd *in_implib_bfd; -}; - -void bfd_elf32_arm_set_target_params - (bfd *, struct bfd_link_info *, struct elf32_arm_params *); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_keep_private_stub_output_sections - (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 *, 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 - (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 *, - struct bfd_section *, unsigned int), - 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); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -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, int); - -extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, 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 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 - (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 *); -/* 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); - -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); - -/* 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); - -/* MIPS ABI flags data access. For the disassembler. */ -struct elf_internal_abiflags_v0; -extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); - -/* C-SKY functions. */ -extern bfd_boolean elf32_csky_build_stubs - (struct bfd_link_info *); -extern bfd_boolean elf32_csky_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section *(*) (const char*, struct bfd_section*), - void (*) (void)); -extern void elf32_csky_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern int elf32_csky_setup_section_lists - (bfd *, struct bfd_link_info *); -/* 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); - -/* 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) \ - (*(const unsigned char *) (ptr) & 0xff) -#define bfd_get_signed_8(abfd, ptr) \ - (((*(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_vma) 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 - - /* 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; -}; - -/* 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 _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]) - -#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) - -#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)) - -/* 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)) - -#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 - (bfd *abfd, asection *sec, flagword flags); - -void bfd_rename_section - (bfd *abfd, 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 - (bfd *abfd, 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); - -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 - 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_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_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_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. */ -#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_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_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; -} -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 (bfd *abfd); - -unsigned long bfd_get_mach (bfd *abfd); - -unsigned int bfd_arch_bits_per_byte (bfd *abfd); - -unsigned int bfd_arch_bits_per_address (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 (bfd *abfd); - -unsigned int bfd_arch_mach_octets_per_byte - (enum bfd_architecture arch, unsigned long machine); - -/* Extracted from reloc.c. */ - -typedef enum bfd_reloc_status -{ - /* No errors detected. Note - the value 2 is used so that it - will not be mistaken for the boolean TRUE or FALSE values. */ - bfd_reloc_ok = 2, - - /* The relocation was performed, but there was an overflow. */ - bfd_reloc_overflow, - - /* The address to relocate was not within the section supplied. */ - bfd_reloc_outofrange, - - /* Used by special functions. */ - bfd_reloc_continue, - - /* Unsupported relocation size requested. */ - bfd_reloc_notsupported, - - /* 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. */ - 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, - -/* 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_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_HIGHER, - 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, - -/* 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, - -/* 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_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 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, - -/* 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, - -/* 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, - -/* 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 : 20; - - /* 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 - - /* 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 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 - 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; -}; - -/* 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, - 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_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_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. */ - 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_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 *); - - /* 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; - -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 \ No newline at end of file diff --git a/lib/libc/include/mips-linux-musl/bfd_stdint.h b/lib/libc/include/mips-linux-musl/bfd_stdint.h deleted file mode 100644 index f6b0ec8fb9..0000000000 --- a/lib/libc/include/mips-linux-musl/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for mips-linux-musl-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/mips-linux-musl/bits/alltypes.h b/lib/libc/include/mips-linux-musl/bits/alltypes.h deleted file mode 100644 index c0c65a6d93..0000000000 --- a/lib/libc/include/mips-linux-musl/bits/alltypes.h +++ /dev/null @@ -1,385 +0,0 @@ -#define _Addr int -#define _Int64 long long -#define _Reg int - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef int wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif - -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/mips-linux-musl/bits/ioctl.h b/lib/libc/include/mips-linux-musl/bits/ioctl.h index 1c0450bcd7..ce20d2e760 100644 --- a/lib/libc/include/mips-linux-musl/bits/ioctl.h +++ b/lib/libc/include/mips-linux-musl/bits/ioctl.h @@ -90,24 +90,6 @@ #define TIOCMIWAIT 0x5491 #define TIOCGICOUNT 0x5492 -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01 - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - #define TIOCM_LE 0x001 #define TIOCM_DTR 0x002 #define TIOCM_RTS 0x004 @@ -123,90 +105,10 @@ struct winsize { #define TIOCM_OUT2 0x4000 #define TIOCM_LOOP 0x8000 -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 -#define N_6PACK 7 -#define N_MASC 8 -#define N_R3964 9 -#define N_PROFIBUS_FDL 10 -#define N_IRDA 11 -#define N_SMSBLOCK 12 -#define N_HDLC 13 -#define N_SYNC_PPP 14 -#define N_HCI 15 - #define FIOGETOWN _IOR('f', 123, int) #define FIOSETOWN _IOW('f', 124, int) #define SIOCATMARK _IOR('s', 7, int) #define SIOCSPGRP _IOW('s', 8, pid_t) #define SIOCGPGRP _IOR('s', 9, pid_t) #define SIOCGSTAMP 0x8906 -#define SIOCGSTAMPNS 0x8907 - -#define SIOCADDRT 0x890B -#define SIOCDELRT 0x890C -#define SIOCRTMSG 0x890D - -#define SIOCGIFNAME 0x8910 -#define SIOCSIFLINK 0x8911 -#define SIOCGIFCONF 0x8912 -#define SIOCGIFFLAGS 0x8913 -#define SIOCSIFFLAGS 0x8914 -#define SIOCGIFADDR 0x8915 -#define SIOCSIFADDR 0x8916 -#define SIOCGIFDSTADDR 0x8917 -#define SIOCSIFDSTADDR 0x8918 -#define SIOCGIFBRDADDR 0x8919 -#define SIOCSIFBRDADDR 0x891a -#define SIOCGIFNETMASK 0x891b -#define SIOCSIFNETMASK 0x891c -#define SIOCGIFMETRIC 0x891d -#define SIOCSIFMETRIC 0x891e -#define SIOCGIFMEM 0x891f -#define SIOCSIFMEM 0x8920 -#define SIOCGIFMTU 0x8921 -#define SIOCSIFMTU 0x8922 -#define SIOCSIFNAME 0x8923 -#define SIOCSIFHWADDR 0x8924 -#define SIOCGIFENCAP 0x8925 -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 -#define SIOCGIFSLAVE 0x8929 -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 -#define SIOGIFINDEX SIOCGIFINDEX -#define SIOCSIFPFLAGS 0x8934 -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 -#define SIOCSIFHWBROADCAST 0x8937 -#define SIOCGIFCOUNT 0x8938 - -#define SIOCGIFBR 0x8940 -#define SIOCSIFBR 0x8941 - -#define SIOCGIFTXQLEN 0x8942 -#define SIOCSIFTXQLEN 0x8943 - -#define SIOCDARP 0x8953 -#define SIOCGARP 0x8954 -#define SIOCSARP 0x8955 - -#define SIOCDRARP 0x8960 -#define SIOCGRARP 0x8961 -#define SIOCSRARP 0x8962 - -#define SIOCGIFMAP 0x8970 -#define SIOCSIFMAP 0x8971 - -#define SIOCADDDLCI 0x8980 -#define SIOCDELDLCI 0x8981 - -#define SIOCDEVPRIVATE 0x89F0 -#define SIOCPROTOPRIVATE 0x89E0 \ No newline at end of file +#define SIOCGSTAMPNS 0x8907 \ No newline at end of file diff --git a/lib/libc/include/mips-linux-musl/bits/syscall.h b/lib/libc/include/mips-linux-musl/bits/syscall.h deleted file mode 100644 index cfcc2092b1..0000000000 --- a/lib/libc/include/mips-linux-musl/bits/syscall.h +++ /dev/null @@ -1,737 +0,0 @@ -#define __NR_syscall 4000 -#define __NR_exit 4001 -#define __NR_fork 4002 -#define __NR_read 4003 -#define __NR_write 4004 -#define __NR_open 4005 -#define __NR_close 4006 -#define __NR_waitpid 4007 -#define __NR_creat 4008 -#define __NR_link 4009 -#define __NR_unlink 4010 -#define __NR_execve 4011 -#define __NR_chdir 4012 -#define __NR_time 4013 -#define __NR_mknod 4014 -#define __NR_chmod 4015 -#define __NR_lchown 4016 -#define __NR_break 4017 -#define __NR_unused18 4018 -#define __NR_lseek 4019 -#define __NR_getpid 4020 -#define __NR_mount 4021 -#define __NR_umount 4022 -#define __NR_setuid 4023 -#define __NR_getuid 4024 -#define __NR_stime 4025 -#define __NR_ptrace 4026 -#define __NR_alarm 4027 -#define __NR_unused28 4028 -#define __NR_pause 4029 -#define __NR_utime 4030 -#define __NR_stty 4031 -#define __NR_gtty 4032 -#define __NR_access 4033 -#define __NR_nice 4034 -#define __NR_ftime 4035 -#define __NR_sync 4036 -#define __NR_kill 4037 -#define __NR_rename 4038 -#define __NR_mkdir 4039 -#define __NR_rmdir 4040 -#define __NR_dup 4041 -#define __NR_pipe 4042 -#define __NR_times 4043 -#define __NR_prof 4044 -#define __NR_brk 4045 -#define __NR_setgid 4046 -#define __NR_getgid 4047 -#define __NR_signal 4048 -#define __NR_geteuid 4049 -#define __NR_getegid 4050 -#define __NR_acct 4051 -#define __NR_umount2 4052 -#define __NR_lock 4053 -#define __NR_ioctl 4054 -#define __NR_fcntl 4055 -#define __NR_mpx 4056 -#define __NR_setpgid 4057 -#define __NR_ulimit 4058 -#define __NR_unused59 4059 -#define __NR_umask 4060 -#define __NR_chroot 4061 -#define __NR_ustat 4062 -#define __NR_dup2 4063 -#define __NR_getppid 4064 -#define __NR_getpgrp 4065 -#define __NR_setsid 4066 -#define __NR_sigaction 4067 -#define __NR_sgetmask 4068 -#define __NR_ssetmask 4069 -#define __NR_setreuid 4070 -#define __NR_setregid 4071 -#define __NR_sigsuspend 4072 -#define __NR_sigpending 4073 -#define __NR_sethostname 4074 -#define __NR_setrlimit 4075 -#define __NR_getrlimit 4076 -#define __NR_getrusage 4077 -#define __NR_gettimeofday 4078 -#define __NR_settimeofday 4079 -#define __NR_getgroups 4080 -#define __NR_setgroups 4081 -#define __NR_reserved82 4082 -#define __NR_symlink 4083 -#define __NR_unused84 4084 -#define __NR_readlink 4085 -#define __NR_uselib 4086 -#define __NR_swapon 4087 -#define __NR_reboot 4088 -#define __NR_readdir 4089 -#define __NR_mmap 4090 -#define __NR_munmap 4091 -#define __NR_truncate 4092 -#define __NR_ftruncate 4093 -#define __NR_fchmod 4094 -#define __NR_fchown 4095 -#define __NR_getpriority 4096 -#define __NR_setpriority 4097 -#define __NR_profil 4098 -#define __NR_statfs 4099 -#define __NR_fstatfs 4100 -#define __NR_ioperm 4101 -#define __NR_socketcall 4102 -#define __NR_syslog 4103 -#define __NR_setitimer 4104 -#define __NR_getitimer 4105 -#define __NR_stat 4106 -#define __NR_lstat 4107 -#define __NR_fstat 4108 -#define __NR_unused109 4109 -#define __NR_iopl 4110 -#define __NR_vhangup 4111 -#define __NR_idle 4112 -#define __NR_vm86 4113 -#define __NR_wait4 4114 -#define __NR_swapoff 4115 -#define __NR_sysinfo 4116 -#define __NR_ipc 4117 -#define __NR_fsync 4118 -#define __NR_sigreturn 4119 -#define __NR_clone 4120 -#define __NR_setdomainname 4121 -#define __NR_uname 4122 -#define __NR_modify_ldt 4123 -#define __NR_adjtimex 4124 -#define __NR_mprotect 4125 -#define __NR_sigprocmask 4126 -#define __NR_create_module 4127 -#define __NR_init_module 4128 -#define __NR_delete_module 4129 -#define __NR_get_kernel_syms 4130 -#define __NR_quotactl 4131 -#define __NR_getpgid 4132 -#define __NR_fchdir 4133 -#define __NR_bdflush 4134 -#define __NR_sysfs 4135 -#define __NR_personality 4136 -#define __NR_afs_syscall 4137 -#define __NR_setfsuid 4138 -#define __NR_setfsgid 4139 -#define __NR__llseek 4140 -#define __NR_getdents 4141 -#define __NR__newselect 4142 -#define __NR_flock 4143 -#define __NR_msync 4144 -#define __NR_readv 4145 -#define __NR_writev 4146 -#define __NR_cacheflush 4147 -#define __NR_cachectl 4148 -#define __NR_sysmips 4149 -#define __NR_unused150 4150 -#define __NR_getsid 4151 -#define __NR_fdatasync 4152 -#define __NR__sysctl 4153 -#define __NR_mlock 4154 -#define __NR_munlock 4155 -#define __NR_mlockall 4156 -#define __NR_munlockall 4157 -#define __NR_sched_setparam 4158 -#define __NR_sched_getparam 4159 -#define __NR_sched_setscheduler 4160 -#define __NR_sched_getscheduler 4161 -#define __NR_sched_yield 4162 -#define __NR_sched_get_priority_max 4163 -#define __NR_sched_get_priority_min 4164 -#define __NR_sched_rr_get_interval 4165 -#define __NR_nanosleep 4166 -#define __NR_mremap 4167 -#define __NR_accept 4168 -#define __NR_bind 4169 -#define __NR_connect 4170 -#define __NR_getpeername 4171 -#define __NR_getsockname 4172 -#define __NR_getsockopt 4173 -#define __NR_listen 4174 -#define __NR_recv 4175 -#define __NR_recvfrom 4176 -#define __NR_recvmsg 4177 -#define __NR_send 4178 -#define __NR_sendmsg 4179 -#define __NR_sendto 4180 -#define __NR_setsockopt 4181 -#define __NR_shutdown 4182 -#define __NR_socket 4183 -#define __NR_socketpair 4184 -#define __NR_setresuid 4185 -#define __NR_getresuid 4186 -#define __NR_query_module 4187 -#define __NR_poll 4188 -#define __NR_nfsservctl 4189 -#define __NR_setresgid 4190 -#define __NR_getresgid 4191 -#define __NR_prctl 4192 -#define __NR_rt_sigreturn 4193 -#define __NR_rt_sigaction 4194 -#define __NR_rt_sigprocmask 4195 -#define __NR_rt_sigpending 4196 -#define __NR_rt_sigtimedwait 4197 -#define __NR_rt_sigqueueinfo 4198 -#define __NR_rt_sigsuspend 4199 -#define __NR_pread64 4200 -#define __NR_pwrite64 4201 -#define __NR_chown 4202 -#define __NR_getcwd 4203 -#define __NR_capget 4204 -#define __NR_capset 4205 -#define __NR_sigaltstack 4206 -#define __NR_sendfile 4207 -#define __NR_getpmsg 4208 -#define __NR_putpmsg 4209 -#define __NR_mmap2 4210 -#define __NR_truncate64 4211 -#define __NR_ftruncate64 4212 -#define __NR_stat64 4213 -#define __NR_lstat64 4214 -#define __NR_fstat64 4215 -#define __NR_pivot_root 4216 -#define __NR_mincore 4217 -#define __NR_madvise 4218 -#define __NR_getdents64 4219 -#define __NR_fcntl64 4220 -#define __NR_reserved221 4221 -#define __NR_gettid 4222 -#define __NR_readahead 4223 -#define __NR_setxattr 4224 -#define __NR_lsetxattr 4225 -#define __NR_fsetxattr 4226 -#define __NR_getxattr 4227 -#define __NR_lgetxattr 4228 -#define __NR_fgetxattr 4229 -#define __NR_listxattr 4230 -#define __NR_llistxattr 4231 -#define __NR_flistxattr 4232 -#define __NR_removexattr 4233 -#define __NR_lremovexattr 4234 -#define __NR_fremovexattr 4235 -#define __NR_tkill 4236 -#define __NR_sendfile64 4237 -#define __NR_futex 4238 -#define __NR_sched_setaffinity 4239 -#define __NR_sched_getaffinity 4240 -#define __NR_io_setup 4241 -#define __NR_io_destroy 4242 -#define __NR_io_getevents 4243 -#define __NR_io_submit 4244 -#define __NR_io_cancel 4245 -#define __NR_exit_group 4246 -#define __NR_lookup_dcookie 4247 -#define __NR_epoll_create 4248 -#define __NR_epoll_ctl 4249 -#define __NR_epoll_wait 4250 -#define __NR_remap_file_pages 4251 -#define __NR_set_tid_address 4252 -#define __NR_restart_syscall 4253 -#define __NR_fadvise64 4254 -#define __NR_statfs64 4255 -#define __NR_fstatfs64 4256 -#define __NR_timer_create 4257 -#define __NR_timer_settime 4258 -#define __NR_timer_gettime 4259 -#define __NR_timer_getoverrun 4260 -#define __NR_timer_delete 4261 -#define __NR_clock_settime 4262 -#define __NR_clock_gettime 4263 -#define __NR_clock_getres 4264 -#define __NR_clock_nanosleep 4265 -#define __NR_tgkill 4266 -#define __NR_utimes 4267 -#define __NR_mbind 4268 -#define __NR_get_mempolicy 4269 -#define __NR_set_mempolicy 4270 -#define __NR_mq_open 4271 -#define __NR_mq_unlink 4272 -#define __NR_mq_timedsend 4273 -#define __NR_mq_timedreceive 4274 -#define __NR_mq_notify 4275 -#define __NR_mq_getsetattr 4276 -#define __NR_vserver 4277 -#define __NR_waitid 4278 -#define __NR_add_key 4280 -#define __NR_request_key 4281 -#define __NR_keyctl 4282 -#define __NR_set_thread_area 4283 -#define __NR_inotify_init 4284 -#define __NR_inotify_add_watch 4285 -#define __NR_inotify_rm_watch 4286 -#define __NR_migrate_pages 4287 -#define __NR_openat 4288 -#define __NR_mkdirat 4289 -#define __NR_mknodat 4290 -#define __NR_fchownat 4291 -#define __NR_futimesat 4292 -#define __NR_fstatat64 4293 -#define __NR_unlinkat 4294 -#define __NR_renameat 4295 -#define __NR_linkat 4296 -#define __NR_symlinkat 4297 -#define __NR_readlinkat 4298 -#define __NR_fchmodat 4299 -#define __NR_faccessat 4300 -#define __NR_pselect6 4301 -#define __NR_ppoll 4302 -#define __NR_unshare 4303 -#define __NR_splice 4304 -#define __NR_sync_file_range 4305 -#define __NR_tee 4306 -#define __NR_vmsplice 4307 -#define __NR_move_pages 4308 -#define __NR_set_robust_list 4309 -#define __NR_get_robust_list 4310 -#define __NR_kexec_load 4311 -#define __NR_getcpu 4312 -#define __NR_epoll_pwait 4313 -#define __NR_ioprio_set 4314 -#define __NR_ioprio_get 4315 -#define __NR_utimensat 4316 -#define __NR_signalfd 4317 -#define __NR_timerfd 4318 -#define __NR_eventfd 4319 -#define __NR_fallocate 4320 -#define __NR_timerfd_create 4321 -#define __NR_timerfd_gettime 4322 -#define __NR_timerfd_settime 4323 -#define __NR_signalfd4 4324 -#define __NR_eventfd2 4325 -#define __NR_epoll_create1 4326 -#define __NR_dup3 4327 -#define __NR_pipe2 4328 -#define __NR_inotify_init1 4329 -#define __NR_preadv 4330 -#define __NR_pwritev 4331 -#define __NR_rt_tgsigqueueinfo 4332 -#define __NR_perf_event_open 4333 -#define __NR_accept4 4334 -#define __NR_recvmmsg 4335 -#define __NR_fanotify_init 4336 -#define __NR_fanotify_mark 4337 -#define __NR_prlimit64 4338 -#define __NR_name_to_handle_at 4339 -#define __NR_open_by_handle_at 4340 -#define __NR_clock_adjtime 4341 -#define __NR_syncfs 4342 -#define __NR_sendmmsg 4343 -#define __NR_setns 4344 -#define __NR_process_vm_readv 4345 -#define __NR_process_vm_writev 4346 -#define __NR_kcmp 4347 -#define __NR_finit_module 4348 -#define __NR_sched_setattr 4349 -#define __NR_sched_getattr 4350 -#define __NR_renameat2 4351 -#define __NR_seccomp 4352 -#define __NR_getrandom 4353 -#define __NR_memfd_create 4354 -#define __NR_bpf 4355 -#define __NR_execveat 4356 -#define __NR_userfaultfd 4357 -#define __NR_membarrier 4358 -#define __NR_mlock2 4359 -#define __NR_copy_file_range 4360 -#define __NR_preadv2 4361 -#define __NR_pwritev2 4362 -#define __NR_pkey_mprotect 4363 -#define __NR_pkey_alloc 4364 -#define __NR_pkey_free 4365 -#define __NR_statx 4366 -#define __NR_rseq 4367 -#define __NR_io_pgetevents 4368 - -#define SYS_syscall 4000 -#define SYS_exit 4001 -#define SYS_fork 4002 -#define SYS_read 4003 -#define SYS_write 4004 -#define SYS_open 4005 -#define SYS_close 4006 -#define SYS_waitpid 4007 -#define SYS_creat 4008 -#define SYS_link 4009 -#define SYS_unlink 4010 -#define SYS_execve 4011 -#define SYS_chdir 4012 -#define SYS_time 4013 -#define SYS_mknod 4014 -#define SYS_chmod 4015 -#define SYS_lchown 4016 -#define SYS_break 4017 -#define SYS_unused18 4018 -#define SYS_lseek 4019 -#define SYS_getpid 4020 -#define SYS_mount 4021 -#define SYS_umount 4022 -#define SYS_setuid 4023 -#define SYS_getuid 4024 -#define SYS_stime 4025 -#define SYS_ptrace 4026 -#define SYS_alarm 4027 -#define SYS_unused28 4028 -#define SYS_pause 4029 -#define SYS_utime 4030 -#define SYS_stty 4031 -#define SYS_gtty 4032 -#define SYS_access 4033 -#define SYS_nice 4034 -#define SYS_ftime 4035 -#define SYS_sync 4036 -#define SYS_kill 4037 -#define SYS_rename 4038 -#define SYS_mkdir 4039 -#define SYS_rmdir 4040 -#define SYS_dup 4041 -#define SYS_pipe 4042 -#define SYS_times 4043 -#define SYS_prof 4044 -#define SYS_brk 4045 -#define SYS_setgid 4046 -#define SYS_getgid 4047 -#define SYS_signal 4048 -#define SYS_geteuid 4049 -#define SYS_getegid 4050 -#define SYS_acct 4051 -#define SYS_umount2 4052 -#define SYS_lock 4053 -#define SYS_ioctl 4054 -#define SYS_fcntl 4055 -#define SYS_mpx 4056 -#define SYS_setpgid 4057 -#define SYS_ulimit 4058 -#define SYS_unused59 4059 -#define SYS_umask 4060 -#define SYS_chroot 4061 -#define SYS_ustat 4062 -#define SYS_dup2 4063 -#define SYS_getppid 4064 -#define SYS_getpgrp 4065 -#define SYS_setsid 4066 -#define SYS_sigaction 4067 -#define SYS_sgetmask 4068 -#define SYS_ssetmask 4069 -#define SYS_setreuid 4070 -#define SYS_setregid 4071 -#define SYS_sigsuspend 4072 -#define SYS_sigpending 4073 -#define SYS_sethostname 4074 -#define SYS_setrlimit 4075 -#define SYS_getrlimit 4076 -#define SYS_getrusage 4077 -#define SYS_gettimeofday 4078 -#define SYS_settimeofday 4079 -#define SYS_getgroups 4080 -#define SYS_setgroups 4081 -#define SYS_reserved82 4082 -#define SYS_symlink 4083 -#define SYS_unused84 4084 -#define SYS_readlink 4085 -#define SYS_uselib 4086 -#define SYS_swapon 4087 -#define SYS_reboot 4088 -#define SYS_readdir 4089 -#define SYS_mmap 4090 -#define SYS_munmap 4091 -#define SYS_truncate 4092 -#define SYS_ftruncate 4093 -#define SYS_fchmod 4094 -#define SYS_fchown 4095 -#define SYS_getpriority 4096 -#define SYS_setpriority 4097 -#define SYS_profil 4098 -#define SYS_statfs 4099 -#define SYS_fstatfs 4100 -#define SYS_ioperm 4101 -#define SYS_socketcall 4102 -#define SYS_syslog 4103 -#define SYS_setitimer 4104 -#define SYS_getitimer 4105 -#define SYS_stat 4106 -#define SYS_lstat 4107 -#define SYS_fstat 4108 -#define SYS_unused109 4109 -#define SYS_iopl 4110 -#define SYS_vhangup 4111 -#define SYS_idle 4112 -#define SYS_vm86 4113 -#define SYS_wait4 4114 -#define SYS_swapoff 4115 -#define SYS_sysinfo 4116 -#define SYS_ipc 4117 -#define SYS_fsync 4118 -#define SYS_sigreturn 4119 -#define SYS_clone 4120 -#define SYS_setdomainname 4121 -#define SYS_uname 4122 -#define SYS_modify_ldt 4123 -#define SYS_adjtimex 4124 -#define SYS_mprotect 4125 -#define SYS_sigprocmask 4126 -#define SYS_create_module 4127 -#define SYS_init_module 4128 -#define SYS_delete_module 4129 -#define SYS_get_kernel_syms 4130 -#define SYS_quotactl 4131 -#define SYS_getpgid 4132 -#define SYS_fchdir 4133 -#define SYS_bdflush 4134 -#define SYS_sysfs 4135 -#define SYS_personality 4136 -#define SYS_afs_syscall 4137 -#define SYS_setfsuid 4138 -#define SYS_setfsgid 4139 -#define SYS__llseek 4140 -#define SYS_getdents 4141 -#define SYS__newselect 4142 -#define SYS_flock 4143 -#define SYS_msync 4144 -#define SYS_readv 4145 -#define SYS_writev 4146 -#define SYS_cacheflush 4147 -#define SYS_cachectl 4148 -#define SYS_sysmips 4149 -#define SYS_unused150 4150 -#define SYS_getsid 4151 -#define SYS_fdatasync 4152 -#define SYS__sysctl 4153 -#define SYS_mlock 4154 -#define SYS_munlock 4155 -#define SYS_mlockall 4156 -#define SYS_munlockall 4157 -#define SYS_sched_setparam 4158 -#define SYS_sched_getparam 4159 -#define SYS_sched_setscheduler 4160 -#define SYS_sched_getscheduler 4161 -#define SYS_sched_yield 4162 -#define SYS_sched_get_priority_max 4163 -#define SYS_sched_get_priority_min 4164 -#define SYS_sched_rr_get_interval 4165 -#define SYS_nanosleep 4166 -#define SYS_mremap 4167 -#define SYS_accept 4168 -#define SYS_bind 4169 -#define SYS_connect 4170 -#define SYS_getpeername 4171 -#define SYS_getsockname 4172 -#define SYS_getsockopt 4173 -#define SYS_listen 4174 -#define SYS_recv 4175 -#define SYS_recvfrom 4176 -#define SYS_recvmsg 4177 -#define SYS_send 4178 -#define SYS_sendmsg 4179 -#define SYS_sendto 4180 -#define SYS_setsockopt 4181 -#define SYS_shutdown 4182 -#define SYS_socket 4183 -#define SYS_socketpair 4184 -#define SYS_setresuid 4185 -#define SYS_getresuid 4186 -#define SYS_query_module 4187 -#define SYS_poll 4188 -#define SYS_nfsservctl 4189 -#define SYS_setresgid 4190 -#define SYS_getresgid 4191 -#define SYS_prctl 4192 -#define SYS_rt_sigreturn 4193 -#define SYS_rt_sigaction 4194 -#define SYS_rt_sigprocmask 4195 -#define SYS_rt_sigpending 4196 -#define SYS_rt_sigtimedwait 4197 -#define SYS_rt_sigqueueinfo 4198 -#define SYS_rt_sigsuspend 4199 -#define SYS_pread64 4200 -#define SYS_pwrite64 4201 -#define SYS_chown 4202 -#define SYS_getcwd 4203 -#define SYS_capget 4204 -#define SYS_capset 4205 -#define SYS_sigaltstack 4206 -#define SYS_sendfile 4207 -#define SYS_getpmsg 4208 -#define SYS_putpmsg 4209 -#define SYS_mmap2 4210 -#define SYS_truncate64 4211 -#define SYS_ftruncate64 4212 -#define SYS_stat64 4213 -#define SYS_lstat64 4214 -#define SYS_fstat64 4215 -#define SYS_pivot_root 4216 -#define SYS_mincore 4217 -#define SYS_madvise 4218 -#define SYS_getdents64 4219 -#define SYS_fcntl64 4220 -#define SYS_reserved221 4221 -#define SYS_gettid 4222 -#define SYS_readahead 4223 -#define SYS_setxattr 4224 -#define SYS_lsetxattr 4225 -#define SYS_fsetxattr 4226 -#define SYS_getxattr 4227 -#define SYS_lgetxattr 4228 -#define SYS_fgetxattr 4229 -#define SYS_listxattr 4230 -#define SYS_llistxattr 4231 -#define SYS_flistxattr 4232 -#define SYS_removexattr 4233 -#define SYS_lremovexattr 4234 -#define SYS_fremovexattr 4235 -#define SYS_tkill 4236 -#define SYS_sendfile64 4237 -#define SYS_futex 4238 -#define SYS_sched_setaffinity 4239 -#define SYS_sched_getaffinity 4240 -#define SYS_io_setup 4241 -#define SYS_io_destroy 4242 -#define SYS_io_getevents 4243 -#define SYS_io_submit 4244 -#define SYS_io_cancel 4245 -#define SYS_exit_group 4246 -#define SYS_lookup_dcookie 4247 -#define SYS_epoll_create 4248 -#define SYS_epoll_ctl 4249 -#define SYS_epoll_wait 4250 -#define SYS_remap_file_pages 4251 -#define SYS_set_tid_address 4252 -#define SYS_restart_syscall 4253 -#define SYS_fadvise64 4254 -#define SYS_statfs64 4255 -#define SYS_fstatfs64 4256 -#define SYS_timer_create 4257 -#define SYS_timer_settime 4258 -#define SYS_timer_gettime 4259 -#define SYS_timer_getoverrun 4260 -#define SYS_timer_delete 4261 -#define SYS_clock_settime 4262 -#define SYS_clock_gettime 4263 -#define SYS_clock_getres 4264 -#define SYS_clock_nanosleep 4265 -#define SYS_tgkill 4266 -#define SYS_utimes 4267 -#define SYS_mbind 4268 -#define SYS_get_mempolicy 4269 -#define SYS_set_mempolicy 4270 -#define SYS_mq_open 4271 -#define SYS_mq_unlink 4272 -#define SYS_mq_timedsend 4273 -#define SYS_mq_timedreceive 4274 -#define SYS_mq_notify 4275 -#define SYS_mq_getsetattr 4276 -#define SYS_vserver 4277 -#define SYS_waitid 4278 -#define SYS_add_key 4280 -#define SYS_request_key 4281 -#define SYS_keyctl 4282 -#define SYS_set_thread_area 4283 -#define SYS_inotify_init 4284 -#define SYS_inotify_add_watch 4285 -#define SYS_inotify_rm_watch 4286 -#define SYS_migrate_pages 4287 -#define SYS_openat 4288 -#define SYS_mkdirat 4289 -#define SYS_mknodat 4290 -#define SYS_fchownat 4291 -#define SYS_futimesat 4292 -#define SYS_fstatat64 4293 -#define SYS_unlinkat 4294 -#define SYS_renameat 4295 -#define SYS_linkat 4296 -#define SYS_symlinkat 4297 -#define SYS_readlinkat 4298 -#define SYS_fchmodat 4299 -#define SYS_faccessat 4300 -#define SYS_pselect6 4301 -#define SYS_ppoll 4302 -#define SYS_unshare 4303 -#define SYS_splice 4304 -#define SYS_sync_file_range 4305 -#define SYS_tee 4306 -#define SYS_vmsplice 4307 -#define SYS_move_pages 4308 -#define SYS_set_robust_list 4309 -#define SYS_get_robust_list 4310 -#define SYS_kexec_load 4311 -#define SYS_getcpu 4312 -#define SYS_epoll_pwait 4313 -#define SYS_ioprio_set 4314 -#define SYS_ioprio_get 4315 -#define SYS_utimensat 4316 -#define SYS_signalfd 4317 -#define SYS_timerfd 4318 -#define SYS_eventfd 4319 -#define SYS_fallocate 4320 -#define SYS_timerfd_create 4321 -#define SYS_timerfd_gettime 4322 -#define SYS_timerfd_settime 4323 -#define SYS_signalfd4 4324 -#define SYS_eventfd2 4325 -#define SYS_epoll_create1 4326 -#define SYS_dup3 4327 -#define SYS_pipe2 4328 -#define SYS_inotify_init1 4329 -#define SYS_preadv 4330 -#define SYS_pwritev 4331 -#define SYS_rt_tgsigqueueinfo 4332 -#define SYS_perf_event_open 4333 -#define SYS_accept4 4334 -#define SYS_recvmmsg 4335 -#define SYS_fanotify_init 4336 -#define SYS_fanotify_mark 4337 -#define SYS_prlimit64 4338 -#define SYS_name_to_handle_at 4339 -#define SYS_open_by_handle_at 4340 -#define SYS_clock_adjtime 4341 -#define SYS_syncfs 4342 -#define SYS_sendmmsg 4343 -#define SYS_setns 4344 -#define SYS_process_vm_readv 4345 -#define SYS_process_vm_writev 4346 -#define SYS_kcmp 4347 -#define SYS_finit_module 4348 -#define SYS_sched_setattr 4349 -#define SYS_sched_getattr 4350 -#define SYS_renameat2 4351 -#define SYS_seccomp 4352 -#define SYS_getrandom 4353 -#define SYS_memfd_create 4354 -#define SYS_bpf 4355 -#define SYS_execveat 4356 -#define SYS_userfaultfd 4357 -#define SYS_membarrier 4358 -#define SYS_mlock2 4359 -#define SYS_copy_file_range 4360 -#define SYS_preadv2 4361 -#define SYS_pwritev2 4362 -#define SYS_pkey_mprotect 4363 -#define SYS_pkey_alloc 4364 -#define SYS_pkey_free 4365 -#define SYS_statx 4366 -#define SYS_rseq 4367 -#define SYS_io_pgetevents 4368 \ No newline at end of file diff --git a/lib/libc/include/mips-linux-musl/bits/termios.h b/lib/libc/include/mips-linux-musl/bits/termios.h index 04f10fa6d1..0940ce20fb 100644 --- a/lib/libc/include/mips-linux-musl/bits/termios.h +++ b/lib/libc/include/mips-linux-musl/bits/termios.h @@ -165,5 +165,5 @@ struct termios { #define EXTPROC 0200000 #define XTABS 0014000 -#define TIOCSER_TEMT 0x01 +#define TIOCSER_TEMT 1 #endif \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-musl/bfd_stdint.h b/lib/libc/include/mips64-linux-musl/bfd_stdint.h deleted file mode 100644 index fc27dfb970..0000000000 --- a/lib/libc/include/mips64-linux-musl/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for mips64-linux-musl-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-musl/bits/alltypes.h b/lib/libc/include/mips64-linux-musl/bits/alltypes.h deleted file mode 100644 index 155b2f3961..0000000000 --- a/lib/libc/include/mips64-linux-musl/bits/alltypes.h +++ /dev/null @@ -1,391 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef int wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif - -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned nlink_t; -#define __DEFINED_nlink_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-musl/bits/ioctl.h b/lib/libc/include/mips64-linux-musl/bits/ioctl.h index 1c0450bcd7..ce20d2e760 100644 --- a/lib/libc/include/mips64-linux-musl/bits/ioctl.h +++ b/lib/libc/include/mips64-linux-musl/bits/ioctl.h @@ -90,24 +90,6 @@ #define TIOCMIWAIT 0x5491 #define TIOCGICOUNT 0x5492 -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01 - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - #define TIOCM_LE 0x001 #define TIOCM_DTR 0x002 #define TIOCM_RTS 0x004 @@ -123,90 +105,10 @@ struct winsize { #define TIOCM_OUT2 0x4000 #define TIOCM_LOOP 0x8000 -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 -#define N_6PACK 7 -#define N_MASC 8 -#define N_R3964 9 -#define N_PROFIBUS_FDL 10 -#define N_IRDA 11 -#define N_SMSBLOCK 12 -#define N_HDLC 13 -#define N_SYNC_PPP 14 -#define N_HCI 15 - #define FIOGETOWN _IOR('f', 123, int) #define FIOSETOWN _IOW('f', 124, int) #define SIOCATMARK _IOR('s', 7, int) #define SIOCSPGRP _IOW('s', 8, pid_t) #define SIOCGPGRP _IOR('s', 9, pid_t) #define SIOCGSTAMP 0x8906 -#define SIOCGSTAMPNS 0x8907 - -#define SIOCADDRT 0x890B -#define SIOCDELRT 0x890C -#define SIOCRTMSG 0x890D - -#define SIOCGIFNAME 0x8910 -#define SIOCSIFLINK 0x8911 -#define SIOCGIFCONF 0x8912 -#define SIOCGIFFLAGS 0x8913 -#define SIOCSIFFLAGS 0x8914 -#define SIOCGIFADDR 0x8915 -#define SIOCSIFADDR 0x8916 -#define SIOCGIFDSTADDR 0x8917 -#define SIOCSIFDSTADDR 0x8918 -#define SIOCGIFBRDADDR 0x8919 -#define SIOCSIFBRDADDR 0x891a -#define SIOCGIFNETMASK 0x891b -#define SIOCSIFNETMASK 0x891c -#define SIOCGIFMETRIC 0x891d -#define SIOCSIFMETRIC 0x891e -#define SIOCGIFMEM 0x891f -#define SIOCSIFMEM 0x8920 -#define SIOCGIFMTU 0x8921 -#define SIOCSIFMTU 0x8922 -#define SIOCSIFNAME 0x8923 -#define SIOCSIFHWADDR 0x8924 -#define SIOCGIFENCAP 0x8925 -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 -#define SIOCGIFSLAVE 0x8929 -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 -#define SIOGIFINDEX SIOCGIFINDEX -#define SIOCSIFPFLAGS 0x8934 -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 -#define SIOCSIFHWBROADCAST 0x8937 -#define SIOCGIFCOUNT 0x8938 - -#define SIOCGIFBR 0x8940 -#define SIOCSIFBR 0x8941 - -#define SIOCGIFTXQLEN 0x8942 -#define SIOCSIFTXQLEN 0x8943 - -#define SIOCDARP 0x8953 -#define SIOCGARP 0x8954 -#define SIOCSARP 0x8955 - -#define SIOCDRARP 0x8960 -#define SIOCGRARP 0x8961 -#define SIOCSRARP 0x8962 - -#define SIOCGIFMAP 0x8970 -#define SIOCSIFMAP 0x8971 - -#define SIOCADDDLCI 0x8980 -#define SIOCDELDLCI 0x8981 - -#define SIOCDEVPRIVATE 0x89F0 -#define SIOCPROTOPRIVATE 0x89E0 \ No newline at end of file +#define SIOCGSTAMPNS 0x8907 \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-musl/bits/syscall.h b/lib/libc/include/mips64-linux-musl/bits/syscall.h deleted file mode 100644 index 92d5fded65..0000000000 --- a/lib/libc/include/mips64-linux-musl/bits/syscall.h +++ /dev/null @@ -1,657 +0,0 @@ -#define __NR_read 5000 -#define __NR_write 5001 -#define __NR_open 5002 -#define __NR_close 5003 -#define __NR_stat 5004 -#define __NR_fstat 5005 -#define __NR_lstat 5006 -#define __NR_poll 5007 -#define __NR_lseek 5008 -#define __NR_mmap 5009 -#define __NR_mprotect 5010 -#define __NR_munmap 5011 -#define __NR_brk 5012 -#define __NR_rt_sigaction 5013 -#define __NR_rt_sigprocmask 5014 -#define __NR_ioctl 5015 -#define __NR_pread64 5016 -#define __NR_pwrite64 5017 -#define __NR_readv 5018 -#define __NR_writev 5019 -#define __NR_access 5020 -#define __NR_pipe 5021 -#define __NR__newselect 5022 -#define __NR_sched_yield 5023 -#define __NR_mremap 5024 -#define __NR_msync 5025 -#define __NR_mincore 5026 -#define __NR_madvise 5027 -#define __NR_shmget 5028 -#define __NR_shmat 5029 -#define __NR_shmctl 5030 -#define __NR_dup 5031 -#define __NR_dup2 5032 -#define __NR_pause 5033 -#define __NR_nanosleep 5034 -#define __NR_getitimer 5035 -#define __NR_setitimer 5036 -#define __NR_alarm 5037 -#define __NR_getpid 5038 -#define __NR_sendfile 5039 -#define __NR_socket 5040 -#define __NR_connect 5041 -#define __NR_accept 5042 -#define __NR_sendto 5043 -#define __NR_recvfrom 5044 -#define __NR_sendmsg 5045 -#define __NR_recvmsg 5046 -#define __NR_shutdown 5047 -#define __NR_bind 5048 -#define __NR_listen 5049 -#define __NR_getsockname 5050 -#define __NR_getpeername 5051 -#define __NR_socketpair 5052 -#define __NR_setsockopt 5053 -#define __NR_getsockopt 5054 -#define __NR_clone 5055 -#define __NR_fork 5056 -#define __NR_execve 5057 -#define __NR_exit 5058 -#define __NR_wait4 5059 -#define __NR_kill 5060 -#define __NR_uname 5061 -#define __NR_semget 5062 -#define __NR_semop 5063 -#define __NR_semctl 5064 -#define __NR_shmdt 5065 -#define __NR_msgget 5066 -#define __NR_msgsnd 5067 -#define __NR_msgrcv 5068 -#define __NR_msgctl 5069 -#define __NR_fcntl 5070 -#define __NR_flock 5071 -#define __NR_fsync 5072 -#define __NR_fdatasync 5073 -#define __NR_truncate 5074 -#define __NR_ftruncate 5075 -#define __NR_getdents 5076 -#define __NR_getcwd 5077 -#define __NR_chdir 5078 -#define __NR_fchdir 5079 -#define __NR_rename 5080 -#define __NR_mkdir 5081 -#define __NR_rmdir 5082 -#define __NR_creat 5083 -#define __NR_link 5084 -#define __NR_unlink 5085 -#define __NR_symlink 5086 -#define __NR_readlink 5087 -#define __NR_chmod 5088 -#define __NR_fchmod 5089 -#define __NR_chown 5090 -#define __NR_fchown 5091 -#define __NR_lchown 5092 -#define __NR_umask 5093 -#define __NR_gettimeofday 5094 -#define __NR_getrlimit 5095 -#define __NR_getrusage 5096 -#define __NR_sysinfo 5097 -#define __NR_times 5098 -#define __NR_ptrace 5099 -#define __NR_getuid 5100 -#define __NR_syslog 5101 -#define __NR_getgid 5102 -#define __NR_setuid 5103 -#define __NR_setgid 5104 -#define __NR_geteuid 5105 -#define __NR_getegid 5106 -#define __NR_setpgid 5107 -#define __NR_getppid 5108 -#define __NR_getpgrp 5109 -#define __NR_setsid 5110 -#define __NR_setreuid 5111 -#define __NR_setregid 5112 -#define __NR_getgroups 5113 -#define __NR_setgroups 5114 -#define __NR_setresuid 5115 -#define __NR_getresuid 5116 -#define __NR_setresgid 5117 -#define __NR_getresgid 5118 -#define __NR_getpgid 5119 -#define __NR_setfsuid 5120 -#define __NR_setfsgid 5121 -#define __NR_getsid 5122 -#define __NR_capget 5123 -#define __NR_capset 5124 -#define __NR_rt_sigpending 5125 -#define __NR_rt_sigtimedwait 5126 -#define __NR_rt_sigqueueinfo 5127 -#define __NR_rt_sigsuspend 5128 -#define __NR_sigaltstack 5129 -#define __NR_utime 5130 -#define __NR_mknod 5131 -#define __NR_personality 5132 -#define __NR_ustat 5133 -#define __NR_statfs 5134 -#define __NR_fstatfs 5135 -#define __NR_sysfs 5136 -#define __NR_getpriority 5137 -#define __NR_setpriority 5138 -#define __NR_sched_setparam 5139 -#define __NR_sched_getparam 5140 -#define __NR_sched_setscheduler 5141 -#define __NR_sched_getscheduler 5142 -#define __NR_sched_get_priority_max 5143 -#define __NR_sched_get_priority_min 5144 -#define __NR_sched_rr_get_interval 5145 -#define __NR_mlock 5146 -#define __NR_munlock 5147 -#define __NR_mlockall 5148 -#define __NR_munlockall 5149 -#define __NR_vhangup 5150 -#define __NR_pivot_root 5151 -#define __NR__sysctl 5152 -#define __NR_prctl 5153 -#define __NR_adjtimex 5154 -#define __NR_setrlimit 5155 -#define __NR_chroot 5156 -#define __NR_sync 5157 -#define __NR_acct 5158 -#define __NR_settimeofday 5159 -#define __NR_mount 5160 -#define __NR_umount2 5161 -#define __NR_swapon 5162 -#define __NR_swapoff 5163 -#define __NR_reboot 5164 -#define __NR_sethostname 5165 -#define __NR_setdomainname 5166 -#define __NR_create_module 5167 -#define __NR_init_module 5168 -#define __NR_delete_module 5169 -#define __NR_get_kernel_syms 5170 -#define __NR_query_module 5171 -#define __NR_quotactl 5172 -#define __NR_nfsservctl 5173 -#define __NR_getpmsg 5174 -#define __NR_putpmsg 5175 -#define __NR_afs_syscall 5176 -#define __NR_reserved177 5177 -#define __NR_gettid 5178 -#define __NR_readahead 5179 -#define __NR_setxattr 5180 -#define __NR_lsetxattr 5181 -#define __NR_fsetxattr 5182 -#define __NR_getxattr 5183 -#define __NR_lgetxattr 5184 -#define __NR_fgetxattr 5185 -#define __NR_listxattr 5186 -#define __NR_llistxattr 5187 -#define __NR_flistxattr 5188 -#define __NR_removexattr 5189 -#define __NR_lremovexattr 5190 -#define __NR_fremovexattr 5191 -#define __NR_tkill 5192 -#define __NR_reserved193 5193 -#define __NR_futex 5194 -#define __NR_sched_setaffinity 5195 -#define __NR_sched_getaffinity 5196 -#define __NR_cacheflush 5197 -#define __NR_cachectl 5198 -#define __NR_sysmips 5199 -#define __NR_io_setup 5200 -#define __NR_io_destroy 5201 -#define __NR_io_getevents 5202 -#define __NR_io_submit 5203 -#define __NR_io_cancel 5204 -#define __NR_exit_group 5205 -#define __NR_lookup_dcookie 5206 -#define __NR_epoll_create 5207 -#define __NR_epoll_ctl 5208 -#define __NR_epoll_wait 5209 -#define __NR_remap_file_pages 5210 -#define __NR_rt_sigreturn 5211 -#define __NR_set_tid_address 5212 -#define __NR_restart_syscall 5213 -#define __NR_semtimedop 5214 -#define __NR_fadvise64 5215 -#define __NR_timer_create 5216 -#define __NR_timer_settime 5217 -#define __NR_timer_gettime 5218 -#define __NR_timer_getoverrun 5219 -#define __NR_timer_delete 5220 -#define __NR_clock_settime 5221 -#define __NR_clock_gettime 5222 -#define __NR_clock_getres 5223 -#define __NR_clock_nanosleep 5224 -#define __NR_tgkill 5225 -#define __NR_utimes 5226 -#define __NR_mbind 5227 -#define __NR_get_mempolicy 5228 -#define __NR_set_mempolicy 5229 -#define __NR_mq_open 5230 -#define __NR_mq_unlink 5231 -#define __NR_mq_timedsend 5232 -#define __NR_mq_timedreceive 5233 -#define __NR_mq_notify 5234 -#define __NR_mq_getsetattr 5235 -#define __NR_vserver 5236 -#define __NR_waitid 5237 -#define __NR_add_key 5239 -#define __NR_request_key 5240 -#define __NR_keyctl 5241 -#define __NR_set_thread_area 5242 -#define __NR_inotify_init 5243 -#define __NR_inotify_add_watch 5244 -#define __NR_inotify_rm_watch 5245 -#define __NR_migrate_pages 5246 -#define __NR_openat 5247 -#define __NR_mkdirat 5248 -#define __NR_mknodat 5249 -#define __NR_fchownat 5250 -#define __NR_futimesat 5251 -#define __NR_newfstatat 5252 -#define __NR_unlinkat 5253 -#define __NR_renameat 5254 -#define __NR_linkat 5255 -#define __NR_symlinkat 5256 -#define __NR_readlinkat 5257 -#define __NR_fchmodat 5258 -#define __NR_faccessat 5259 -#define __NR_pselect6 5260 -#define __NR_ppoll 5261 -#define __NR_unshare 5262 -#define __NR_splice 5263 -#define __NR_sync_file_range 5264 -#define __NR_tee 5265 -#define __NR_vmsplice 5266 -#define __NR_move_pages 5267 -#define __NR_set_robust_list 5268 -#define __NR_get_robust_list 5269 -#define __NR_kexec_load 5270 -#define __NR_getcpu 5271 -#define __NR_epoll_pwait 5272 -#define __NR_ioprio_set 5273 -#define __NR_ioprio_get 5274 -#define __NR_utimensat 5275 -#define __NR_signalfd 5276 -#define __NR_timerfd 5277 -#define __NR_eventfd 5278 -#define __NR_fallocate 5279 -#define __NR_timerfd_create 5280 -#define __NR_timerfd_gettime 5281 -#define __NR_timerfd_settime 5282 -#define __NR_signalfd4 5283 -#define __NR_eventfd2 5284 -#define __NR_epoll_create1 5285 -#define __NR_dup3 5286 -#define __NR_pipe2 5287 -#define __NR_inotify_init1 5288 -#define __NR_preadv 5289 -#define __NR_pwritev 5290 -#define __NR_rt_tgsigqueueinfo 5291 -#define __NR_perf_event_open 5292 -#define __NR_accept4 5293 -#define __NR_recvmmsg 5294 -#define __NR_fanotify_init 5295 -#define __NR_fanotify_mark 5296 -#define __NR_prlimit64 5297 -#define __NR_name_to_handle_at 5298 -#define __NR_open_by_handle_at 5299 -#define __NR_clock_adjtime 5300 -#define __NR_syncfs 5301 -#define __NR_sendmmsg 5302 -#define __NR_setns 5303 -#define __NR_process_vm_readv 5304 -#define __NR_process_vm_writev 5305 -#define __NR_kcmp 5306 -#define __NR_finit_module 5307 -#define __NR_getdents64 5308 -#define __NR_sched_setattr 5309 -#define __NR_sched_getattr 5310 -#define __NR_renameat2 5311 -#define __NR_seccomp 5312 -#define __NR_getrandom 5313 -#define __NR_memfd_create 5314 -#define __NR_bpf 5315 -#define __NR_execveat 5316 -#define __NR_userfaultfd 5317 -#define __NR_membarrier 5318 -#define __NR_mlock2 5319 -#define __NR_copy_file_range 5320 -#define __NR_preadv2 5321 -#define __NR_pwritev2 5322 -#define __NR_pkey_mprotect 5323 -#define __NR_pkey_alloc 5324 -#define __NR_pkey_free 5325 -#define __NR_statx 5326 -#define __NR_rseq 4327 -#define __NR_io_pgetevents 4328 - -#define SYS_read 5000 -#define SYS_write 5001 -#define SYS_open 5002 -#define SYS_close 5003 -#define SYS_stat 5004 -#define SYS_fstat 5005 -#define SYS_lstat 5006 -#define SYS_poll 5007 -#define SYS_lseek 5008 -#define SYS_mmap 5009 -#define SYS_mprotect 5010 -#define SYS_munmap 5011 -#define SYS_brk 5012 -#define SYS_rt_sigaction 5013 -#define SYS_rt_sigprocmask 5014 -#define SYS_ioctl 5015 -#define SYS_pread64 5016 -#define SYS_pwrite64 5017 -#define SYS_readv 5018 -#define SYS_writev 5019 -#define SYS_access 5020 -#define SYS_pipe 5021 -#define SYS__newselect 5022 -#define SYS_sched_yield 5023 -#define SYS_mremap 5024 -#define SYS_msync 5025 -#define SYS_mincore 5026 -#define SYS_madvise 5027 -#define SYS_shmget 5028 -#define SYS_shmat 5029 -#define SYS_shmctl 5030 -#define SYS_dup 5031 -#define SYS_dup2 5032 -#define SYS_pause 5033 -#define SYS_nanosleep 5034 -#define SYS_getitimer 5035 -#define SYS_setitimer 5036 -#define SYS_alarm 5037 -#define SYS_getpid 5038 -#define SYS_sendfile 5039 -#define SYS_socket 5040 -#define SYS_connect 5041 -#define SYS_accept 5042 -#define SYS_sendto 5043 -#define SYS_recvfrom 5044 -#define SYS_sendmsg 5045 -#define SYS_recvmsg 5046 -#define SYS_shutdown 5047 -#define SYS_bind 5048 -#define SYS_listen 5049 -#define SYS_getsockname 5050 -#define SYS_getpeername 5051 -#define SYS_socketpair 5052 -#define SYS_setsockopt 5053 -#define SYS_getsockopt 5054 -#define SYS_clone 5055 -#define SYS_fork 5056 -#define SYS_execve 5057 -#define SYS_exit 5058 -#define SYS_wait4 5059 -#define SYS_kill 5060 -#define SYS_uname 5061 -#define SYS_semget 5062 -#define SYS_semop 5063 -#define SYS_semctl 5064 -#define SYS_shmdt 5065 -#define SYS_msgget 5066 -#define SYS_msgsnd 5067 -#define SYS_msgrcv 5068 -#define SYS_msgctl 5069 -#define SYS_fcntl 5070 -#define SYS_flock 5071 -#define SYS_fsync 5072 -#define SYS_fdatasync 5073 -#define SYS_truncate 5074 -#define SYS_ftruncate 5075 -#define SYS_getdents 5076 -#define SYS_getcwd 5077 -#define SYS_chdir 5078 -#define SYS_fchdir 5079 -#define SYS_rename 5080 -#define SYS_mkdir 5081 -#define SYS_rmdir 5082 -#define SYS_creat 5083 -#define SYS_link 5084 -#define SYS_unlink 5085 -#define SYS_symlink 5086 -#define SYS_readlink 5087 -#define SYS_chmod 5088 -#define SYS_fchmod 5089 -#define SYS_chown 5090 -#define SYS_fchown 5091 -#define SYS_lchown 5092 -#define SYS_umask 5093 -#define SYS_gettimeofday 5094 -#define SYS_getrlimit 5095 -#define SYS_getrusage 5096 -#define SYS_sysinfo 5097 -#define SYS_times 5098 -#define SYS_ptrace 5099 -#define SYS_getuid 5100 -#define SYS_syslog 5101 -#define SYS_getgid 5102 -#define SYS_setuid 5103 -#define SYS_setgid 5104 -#define SYS_geteuid 5105 -#define SYS_getegid 5106 -#define SYS_setpgid 5107 -#define SYS_getppid 5108 -#define SYS_getpgrp 5109 -#define SYS_setsid 5110 -#define SYS_setreuid 5111 -#define SYS_setregid 5112 -#define SYS_getgroups 5113 -#define SYS_setgroups 5114 -#define SYS_setresuid 5115 -#define SYS_getresuid 5116 -#define SYS_setresgid 5117 -#define SYS_getresgid 5118 -#define SYS_getpgid 5119 -#define SYS_setfsuid 5120 -#define SYS_setfsgid 5121 -#define SYS_getsid 5122 -#define SYS_capget 5123 -#define SYS_capset 5124 -#define SYS_rt_sigpending 5125 -#define SYS_rt_sigtimedwait 5126 -#define SYS_rt_sigqueueinfo 5127 -#define SYS_rt_sigsuspend 5128 -#define SYS_sigaltstack 5129 -#define SYS_utime 5130 -#define SYS_mknod 5131 -#define SYS_personality 5132 -#define SYS_ustat 5133 -#define SYS_statfs 5134 -#define SYS_fstatfs 5135 -#define SYS_sysfs 5136 -#define SYS_getpriority 5137 -#define SYS_setpriority 5138 -#define SYS_sched_setparam 5139 -#define SYS_sched_getparam 5140 -#define SYS_sched_setscheduler 5141 -#define SYS_sched_getscheduler 5142 -#define SYS_sched_get_priority_max 5143 -#define SYS_sched_get_priority_min 5144 -#define SYS_sched_rr_get_interval 5145 -#define SYS_mlock 5146 -#define SYS_munlock 5147 -#define SYS_mlockall 5148 -#define SYS_munlockall 5149 -#define SYS_vhangup 5150 -#define SYS_pivot_root 5151 -#define SYS__sysctl 5152 -#define SYS_prctl 5153 -#define SYS_adjtimex 5154 -#define SYS_setrlimit 5155 -#define SYS_chroot 5156 -#define SYS_sync 5157 -#define SYS_acct 5158 -#define SYS_settimeofday 5159 -#define SYS_mount 5160 -#define SYS_umount2 5161 -#define SYS_swapon 5162 -#define SYS_swapoff 5163 -#define SYS_reboot 5164 -#define SYS_sethostname 5165 -#define SYS_setdomainname 5166 -#define SYS_create_module 5167 -#define SYS_init_module 5168 -#define SYS_delete_module 5169 -#define SYS_get_kernel_syms 5170 -#define SYS_query_module 5171 -#define SYS_quotactl 5172 -#define SYS_nfsservctl 5173 -#define SYS_getpmsg 5174 -#define SYS_putpmsg 5175 -#define SYS_afs_syscall 5176 -#define SYS_reserved177 5177 -#define SYS_gettid 5178 -#define SYS_readahead 5179 -#define SYS_setxattr 5180 -#define SYS_lsetxattr 5181 -#define SYS_fsetxattr 5182 -#define SYS_getxattr 5183 -#define SYS_lgetxattr 5184 -#define SYS_fgetxattr 5185 -#define SYS_listxattr 5186 -#define SYS_llistxattr 5187 -#define SYS_flistxattr 5188 -#define SYS_removexattr 5189 -#define SYS_lremovexattr 5190 -#define SYS_fremovexattr 5191 -#define SYS_tkill 5192 -#define SYS_reserved193 5193 -#define SYS_futex 5194 -#define SYS_sched_setaffinity 5195 -#define SYS_sched_getaffinity 5196 -#define SYS_cacheflush 5197 -#define SYS_cachectl 5198 -#define SYS_sysmips 5199 -#define SYS_io_setup 5200 -#define SYS_io_destroy 5201 -#define SYS_io_getevents 5202 -#define SYS_io_submit 5203 -#define SYS_io_cancel 5204 -#define SYS_exit_group 5205 -#define SYS_lookup_dcookie 5206 -#define SYS_epoll_create 5207 -#define SYS_epoll_ctl 5208 -#define SYS_epoll_wait 5209 -#define SYS_remap_file_pages 5210 -#define SYS_rt_sigreturn 5211 -#define SYS_set_tid_address 5212 -#define SYS_restart_syscall 5213 -#define SYS_semtimedop 5214 -#define SYS_fadvise64 5215 -#define SYS_timer_create 5216 -#define SYS_timer_settime 5217 -#define SYS_timer_gettime 5218 -#define SYS_timer_getoverrun 5219 -#define SYS_timer_delete 5220 -#define SYS_clock_settime 5221 -#define SYS_clock_gettime 5222 -#define SYS_clock_getres 5223 -#define SYS_clock_nanosleep 5224 -#define SYS_tgkill 5225 -#define SYS_utimes 5226 -#define SYS_mbind 5227 -#define SYS_get_mempolicy 5228 -#define SYS_set_mempolicy 5229 -#define SYS_mq_open 5230 -#define SYS_mq_unlink 5231 -#define SYS_mq_timedsend 5232 -#define SYS_mq_timedreceive 5233 -#define SYS_mq_notify 5234 -#define SYS_mq_getsetattr 5235 -#define SYS_vserver 5236 -#define SYS_waitid 5237 -#define SYS_add_key 5239 -#define SYS_request_key 5240 -#define SYS_keyctl 5241 -#define SYS_set_thread_area 5242 -#define SYS_inotify_init 5243 -#define SYS_inotify_add_watch 5244 -#define SYS_inotify_rm_watch 5245 -#define SYS_migrate_pages 5246 -#define SYS_openat 5247 -#define SYS_mkdirat 5248 -#define SYS_mknodat 5249 -#define SYS_fchownat 5250 -#define SYS_futimesat 5251 -#define SYS_newfstatat 5252 -#define SYS_unlinkat 5253 -#define SYS_renameat 5254 -#define SYS_linkat 5255 -#define SYS_symlinkat 5256 -#define SYS_readlinkat 5257 -#define SYS_fchmodat 5258 -#define SYS_faccessat 5259 -#define SYS_pselect6 5260 -#define SYS_ppoll 5261 -#define SYS_unshare 5262 -#define SYS_splice 5263 -#define SYS_sync_file_range 5264 -#define SYS_tee 5265 -#define SYS_vmsplice 5266 -#define SYS_move_pages 5267 -#define SYS_set_robust_list 5268 -#define SYS_get_robust_list 5269 -#define SYS_kexec_load 5270 -#define SYS_getcpu 5271 -#define SYS_epoll_pwait 5272 -#define SYS_ioprio_set 5273 -#define SYS_ioprio_get 5274 -#define SYS_utimensat 5275 -#define SYS_signalfd 5276 -#define SYS_timerfd 5277 -#define SYS_eventfd 5278 -#define SYS_fallocate 5279 -#define SYS_timerfd_create 5280 -#define SYS_timerfd_gettime 5281 -#define SYS_timerfd_settime 5282 -#define SYS_signalfd4 5283 -#define SYS_eventfd2 5284 -#define SYS_epoll_create1 5285 -#define SYS_dup3 5286 -#define SYS_pipe2 5287 -#define SYS_inotify_init1 5288 -#define SYS_preadv 5289 -#define SYS_pwritev 5290 -#define SYS_rt_tgsigqueueinfo 5291 -#define SYS_perf_event_open 5292 -#define SYS_accept4 5293 -#define SYS_recvmmsg 5294 -#define SYS_fanotify_init 5295 -#define SYS_fanotify_mark 5296 -#define SYS_prlimit64 5297 -#define SYS_name_to_handle_at 5298 -#define SYS_open_by_handle_at 5299 -#define SYS_clock_adjtime 5300 -#define SYS_syncfs 5301 -#define SYS_sendmmsg 5302 -#define SYS_setns 5303 -#define SYS_process_vm_readv 5304 -#define SYS_process_vm_writev 5305 -#define SYS_kcmp 5306 -#define SYS_finit_module 5307 -#define SYS_getdents64 5308 -#define SYS_sched_setattr 5309 -#define SYS_sched_getattr 5310 -#define SYS_renameat2 5311 -#define SYS_seccomp 5312 -#define SYS_getrandom 5313 -#define SYS_memfd_create 5314 -#define SYS_bpf 5315 -#define SYS_execveat 5316 -#define SYS_userfaultfd 5317 -#define SYS_membarrier 5318 -#define SYS_mlock2 5319 -#define SYS_copy_file_range 5320 -#define SYS_preadv2 5321 -#define SYS_pwritev2 5322 -#define SYS_pkey_mprotect 5323 -#define SYS_pkey_alloc 5324 -#define SYS_pkey_free 5325 -#define SYS_statx 5326 -#define SYS_rseq 4327 -#define SYS_io_pgetevents 4328 \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-musl/bits/termios.h b/lib/libc/include/mips64-linux-musl/bits/termios.h index 04f10fa6d1..0940ce20fb 100644 --- a/lib/libc/include/mips64-linux-musl/bits/termios.h +++ b/lib/libc/include/mips64-linux-musl/bits/termios.h @@ -165,5 +165,5 @@ struct termios { #define EXTPROC 0200000 #define XTABS 0014000 -#define TIOCSER_TEMT 0x01 +#define TIOCSER_TEMT 1 #endif \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bfd_stdint.h b/lib/libc/include/mips64el-linux-musl/bfd_stdint.h deleted file mode 100644 index 623fef1fd3..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for mips64el-linux-musl-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/alltypes.h b/lib/libc/include/mips64el-linux-musl/bits/alltypes.h deleted file mode 100644 index 155b2f3961..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/alltypes.h +++ /dev/null @@ -1,391 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef int wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif - -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned nlink_t; -#define __DEFINED_nlink_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/endian.h b/lib/libc/include/mips64el-linux-musl/bits/endian.h deleted file mode 100644 index e888a1939f..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/endian.h +++ /dev/null @@ -1,5 +0,0 @@ -#if _MIPSEL || __MIPSEL || __MIPSEL__ -#define __BYTE_ORDER __LITTLE_ENDIAN -#else -#define __BYTE_ORDER __BIG_ENDIAN -#endif \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/errno.h b/lib/libc/include/mips64el-linux-musl/bits/errno.h deleted file mode 100644 index 54adcccfee..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/errno.h +++ /dev/null @@ -1,134 +0,0 @@ -#define EPERM 1 -#define ENOENT 2 -#define ESRCH 3 -#define EINTR 4 -#define EIO 5 -#define ENXIO 6 -#define E2BIG 7 -#define ENOEXEC 8 -#define EBADF 9 -#define ECHILD 10 -#define EAGAIN 11 -#define ENOMEM 12 -#define EACCES 13 -#define EFAULT 14 -#define ENOTBLK 15 -#define EBUSY 16 -#define EEXIST 17 -#define EXDEV 18 -#define ENODEV 19 -#define ENOTDIR 20 -#define EISDIR 21 -#define EINVAL 22 -#define ENFILE 23 -#define EMFILE 24 -#define ENOTTY 25 -#define ETXTBSY 26 -#define EFBIG 27 -#define ENOSPC 28 -#define ESPIPE 29 -#define EROFS 30 -#define EMLINK 31 -#define EPIPE 32 -#define EDOM 33 -#define ERANGE 34 -#define ENOMSG 35 -#define EIDRM 36 -#define ECHRNG 37 -#define EL2NSYNC 38 -#define EL3HLT 39 -#define EL3RST 40 -#define ELNRNG 41 -#define EUNATCH 42 -#define ENOCSI 43 -#define EL2HLT 44 -#define EDEADLK 45 -#define ENOLCK 46 -#define EBADE 50 -#define EBADR 51 -#define EXFULL 52 -#define ENOANO 53 -#define EBADRQC 54 -#define EBADSLT 55 -#define EDEADLOCK 56 -#define EBFONT 59 -#define ENOSTR 60 -#define ENODATA 61 -#define ETIME 62 -#define ENOSR 63 -#define ENONET 64 -#define ENOPKG 65 -#define EREMOTE 66 -#define ENOLINK 67 -#define EADV 68 -#define ESRMNT 69 -#define ECOMM 70 -#define EPROTO 71 -#define EDOTDOT 73 -#define EMULTIHOP 74 -#define EBADMSG 77 -#define ENAMETOOLONG 78 -#define EOVERFLOW 79 -#define ENOTUNIQ 80 -#define EBADFD 81 -#define EREMCHG 82 -#define ELIBACC 83 -#define ELIBBAD 84 -#define ELIBSCN 85 -#define ELIBMAX 86 -#define ELIBEXEC 87 -#define EILSEQ 88 -#define ENOSYS 89 -#define ELOOP 90 -#define ERESTART 91 -#define ESTRPIPE 92 -#define ENOTEMPTY 93 -#define EUSERS 94 -#define ENOTSOCK 95 -#define EDESTADDRREQ 96 -#define EMSGSIZE 97 -#define EPROTOTYPE 98 -#define ENOPROTOOPT 99 -#define EPROTONOSUPPORT 120 -#define ESOCKTNOSUPPORT 121 -#define EOPNOTSUPP 122 -#define ENOTSUP EOPNOTSUPP -#define EPFNOSUPPORT 123 -#define EAFNOSUPPORT 124 -#define EADDRINUSE 125 -#define EADDRNOTAVAIL 126 -#define ENETDOWN 127 -#define ENETUNREACH 128 -#define ENETRESET 129 -#define ECONNABORTED 130 -#define ECONNRESET 131 -#define ENOBUFS 132 -#define EISCONN 133 -#define ENOTCONN 134 -#define EUCLEAN 135 -#define ENOTNAM 137 -#define ENAVAIL 138 -#define EISNAM 139 -#define EREMOTEIO 140 -#define ESHUTDOWN 143 -#define ETOOMANYREFS 144 -#define ETIMEDOUT 145 -#define ECONNREFUSED 146 -#define EHOSTDOWN 147 -#define EHOSTUNREACH 148 -#define EWOULDBLOCK EAGAIN -#define EALREADY 149 -#define EINPROGRESS 150 -#define ESTALE 151 -#define ECANCELED 158 -#define ENOMEDIUM 159 -#define EMEDIUMTYPE 160 -#define ENOKEY 161 -#define EKEYEXPIRED 162 -#define EKEYREVOKED 163 -#define EKEYREJECTED 164 -#define EOWNERDEAD 165 -#define ENOTRECOVERABLE 166 -#define ERFKILL 167 -#define EHWPOISON 168 -#define EDQUOT 1133 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/fcntl.h b/lib/libc/include/mips64el-linux-musl/bits/fcntl.h deleted file mode 100644 index 30ca0e0ca1..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/fcntl.h +++ /dev/null @@ -1,40 +0,0 @@ -#define O_CREAT 0400 -#define O_EXCL 02000 -#define O_NOCTTY 04000 -#define O_TRUNC 01000 -#define O_APPEND 0010 -#define O_NONBLOCK 0200 -#define O_DSYNC 0020 -#define O_SYNC 040020 -#define O_RSYNC 040020 -#define O_DIRECTORY 0200000 -#define O_NOFOLLOW 0400000 -#define O_CLOEXEC 02000000 - -#define O_ASYNC 010000 -#define O_DIRECT 0100000 -#define O_LARGEFILE 0 -#define O_NOATIME 01000000 -#define O_PATH 010000000 -#define O_TMPFILE 020200000 -#define O_NDELAY O_NONBLOCK - -#define F_DUPFD 0 -#define F_GETFD 1 -#define F_SETFD 2 -#define F_GETFL 3 -#define F_SETFL 4 - -#define F_SETOWN 24 -#define F_GETOWN 23 -#define F_SETSIG 10 -#define F_GETSIG 11 - -#define F_GETLK 14 -#define F_SETLK 6 -#define F_SETLKW 7 - -#define F_SETOWN_EX 15 -#define F_GETOWN_EX 16 - -#define F_GETOWNER_UIDS 17 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/fenv.h b/lib/libc/include/mips64el-linux-musl/bits/fenv.h deleted file mode 100644 index 38799ccf34..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/fenv.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifdef __mips_soft_float -#define FE_ALL_EXCEPT 0 -#define FE_TONEAREST 0 -#else -#define FE_INEXACT 4 -#define FE_UNDERFLOW 8 -#define FE_OVERFLOW 16 -#define FE_DIVBYZERO 32 -#define FE_INVALID 64 - -#define FE_ALL_EXCEPT 124 - -#define FE_TONEAREST 0 -#define FE_TOWARDZERO 1 -#define FE_UPWARD 2 -#define FE_DOWNWARD 3 -#endif - -typedef unsigned short fexcept_t; - -typedef struct { - unsigned __cw; -} fenv_t; - -#define FE_DFL_ENV ((const fenv_t *) -1) \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/float.h b/lib/libc/include/mips64el-linux-musl/bits/float.h deleted file mode 100644 index f8cb54bb3f..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/float.h +++ /dev/null @@ -1,16 +0,0 @@ -#define FLT_EVAL_METHOD 0 - -#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L -#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L -#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L -#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L - -#define LDBL_MANT_DIG 113 -#define LDBL_MIN_EXP (-16381) -#define LDBL_MAX_EXP 16384 - -#define LDBL_DIG 33 -#define LDBL_MIN_10_EXP (-4931) -#define LDBL_MAX_10_EXP 4932 - -#define DECIMAL_DIG 36 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/hwcap.h b/lib/libc/include/mips64el-linux-musl/bits/hwcap.h deleted file mode 100644 index 0cc1faa9f7..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/hwcap.h +++ /dev/null @@ -1,3 +0,0 @@ -#define HWCAP_MIPS_R6 (1 << 0) -#define HWCAP_MIPS_MSA (1 << 1) -#define HWCAP_MIPS_CRC32 (1 << 2) \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/ioctl.h b/lib/libc/include/mips64el-linux-musl/bits/ioctl.h deleted file mode 100644 index 1c0450bcd7..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/ioctl.h +++ /dev/null @@ -1,212 +0,0 @@ -#define _IOC(a,b,c,d) ( ((a)<<29) | ((b)<<8) | (c) | ((d)<<16) ) -#define _IOC_NONE 1U -#define _IOC_READ 2U -#define _IOC_WRITE 4U - -#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0) -#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c)) -#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c)) -#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c)) - -#define TCGETA 0x5401 -#define TCSETA 0x5402 -#define TCSETAW 0x5403 -#define TCSETAF 0x5404 -#define TCSBRK 0x5405 -#define TCXONC 0x5406 -#define TCFLSH 0x5407 -#define TCGETS 0x540D -#define TCSETS 0x540E -#define TCSETSW 0x540F -#define TCSETSF 0x5410 - -#define TIOCEXCL 0x740D -#define TIOCNXCL 0x740E -#define TIOCOUTQ 0x7472 -#define TIOCSTI 0x5472 -#define TIOCMGET 0x741D -#define TIOCMBIS 0x741B -#define TIOCMBIC 0x741C -#define TIOCMSET 0x741A - -#define TIOCPKT 0x5470 -#define TIOCSWINSZ _IOW('t', 103, struct winsize) -#define TIOCGWINSZ _IOR('t', 104, struct winsize) -#define TIOCNOTTY 0x5471 -#define TIOCSETD 0x7401 -#define TIOCGETD 0x7400 - -#define FIOCLEX 0x6601 -#define FIONCLEX 0x6602 -#define FIOASYNC 0x667D -#define FIONBIO 0x667E -#define FIOQSIZE 0x667F - -#define TIOCGLTC 0x7474 -#define TIOCSLTC 0x7475 -#define TIOCSPGRP _IOW('t', 118, int) -#define TIOCGPGRP _IOR('t', 119, int) -#define TIOCCONS _IOW('t', 120, int) - -#define FIONREAD 0x467F -#define TIOCINQ FIONREAD - -#define TIOCGETP 0x7408 -#define TIOCSETP 0x7409 -#define TIOCSETN 0x740A - -#define TIOCSBRK 0x5427 -#define TIOCCBRK 0x5428 -#define TIOCGSID 0x7416 -#define TIOCGRS485 _IOR('T', 0x2E, char[32]) -#define TIOCSRS485 _IOWR('T', 0x2F, char[32]) -#define TIOCGPTN _IOR('T', 0x30, unsigned int) -#define TIOCSPTLCK _IOW('T', 0x31, int) -#define TIOCGDEV _IOR('T', 0x32, unsigned int) -#define TIOCSIG _IOW('T', 0x36, int) -#define TIOCVHANGUP 0x5437 -#define TIOCGPKT _IOR('T', 0x38, int) -#define TIOCGPTLCK _IOR('T', 0x39, int) -#define TIOCGEXCL _IOR('T', 0x40, int) -#define TIOCGPTPEER _IO('T', 0x41) - -#define TIOCSCTTY 0x5480 -#define TIOCGSOFTCAR 0x5481 -#define TIOCSSOFTCAR 0x5482 -#define TIOCLINUX 0x5483 -#define TIOCGSERIAL 0x5484 -#define TIOCSSERIAL 0x5485 -#define TCSBRKP 0x5486 - -#define TIOCSERCONFIG 0x5488 -#define TIOCSERGWILD 0x5489 -#define TIOCSERSWILD 0x548A -#define TIOCGLCKTRMIOS 0x548B -#define TIOCSLCKTRMIOS 0x548C -#define TIOCSERGSTRUCT 0x548D -#define TIOCSERGETLSR 0x548E -#define TIOCSERGETMULTI 0x548F -#define TIOCSERSETMULTI 0x5490 -#define TIOCMIWAIT 0x5491 -#define TIOCGICOUNT 0x5492 - -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01 - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x010 -#define TIOCM_SR 0x020 -#define TIOCM_CTS 0x040 -#define TIOCM_CAR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RNG 0x200 -#define TIOCM_RI TIOCM_RNG -#define TIOCM_DSR 0x400 -#define TIOCM_OUT1 0x2000 -#define TIOCM_OUT2 0x4000 -#define TIOCM_LOOP 0x8000 - -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 -#define N_6PACK 7 -#define N_MASC 8 -#define N_R3964 9 -#define N_PROFIBUS_FDL 10 -#define N_IRDA 11 -#define N_SMSBLOCK 12 -#define N_HDLC 13 -#define N_SYNC_PPP 14 -#define N_HCI 15 - -#define FIOGETOWN _IOR('f', 123, int) -#define FIOSETOWN _IOW('f', 124, int) -#define SIOCATMARK _IOR('s', 7, int) -#define SIOCSPGRP _IOW('s', 8, pid_t) -#define SIOCGPGRP _IOR('s', 9, pid_t) -#define SIOCGSTAMP 0x8906 -#define SIOCGSTAMPNS 0x8907 - -#define SIOCADDRT 0x890B -#define SIOCDELRT 0x890C -#define SIOCRTMSG 0x890D - -#define SIOCGIFNAME 0x8910 -#define SIOCSIFLINK 0x8911 -#define SIOCGIFCONF 0x8912 -#define SIOCGIFFLAGS 0x8913 -#define SIOCSIFFLAGS 0x8914 -#define SIOCGIFADDR 0x8915 -#define SIOCSIFADDR 0x8916 -#define SIOCGIFDSTADDR 0x8917 -#define SIOCSIFDSTADDR 0x8918 -#define SIOCGIFBRDADDR 0x8919 -#define SIOCSIFBRDADDR 0x891a -#define SIOCGIFNETMASK 0x891b -#define SIOCSIFNETMASK 0x891c -#define SIOCGIFMETRIC 0x891d -#define SIOCSIFMETRIC 0x891e -#define SIOCGIFMEM 0x891f -#define SIOCSIFMEM 0x8920 -#define SIOCGIFMTU 0x8921 -#define SIOCSIFMTU 0x8922 -#define SIOCSIFNAME 0x8923 -#define SIOCSIFHWADDR 0x8924 -#define SIOCGIFENCAP 0x8925 -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 -#define SIOCGIFSLAVE 0x8929 -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 -#define SIOGIFINDEX SIOCGIFINDEX -#define SIOCSIFPFLAGS 0x8934 -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 -#define SIOCSIFHWBROADCAST 0x8937 -#define SIOCGIFCOUNT 0x8938 - -#define SIOCGIFBR 0x8940 -#define SIOCSIFBR 0x8941 - -#define SIOCGIFTXQLEN 0x8942 -#define SIOCSIFTXQLEN 0x8943 - -#define SIOCDARP 0x8953 -#define SIOCGARP 0x8954 -#define SIOCSARP 0x8955 - -#define SIOCDRARP 0x8960 -#define SIOCGRARP 0x8961 -#define SIOCSRARP 0x8962 - -#define SIOCGIFMAP 0x8970 -#define SIOCSIFMAP 0x8971 - -#define SIOCADDDLCI 0x8980 -#define SIOCDELDLCI 0x8981 - -#define SIOCDEVPRIVATE 0x89F0 -#define SIOCPROTOPRIVATE 0x89E0 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/ipc.h b/lib/libc/include/mips64el-linux-musl/bits/ipc.h deleted file mode 100644 index 83ebc69b7c..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/ipc.h +++ /dev/null @@ -1,14 +0,0 @@ -struct ipc_perm { - key_t __ipc_perm_key; - uid_t uid; - gid_t gid; - uid_t cuid; - gid_t cgid; - mode_t mode; - int __ipc_perm_seq; - int __pad1; - unsigned long __unused1; - unsigned long __unused2; -}; - -#define IPC_64 0x100 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/limits.h b/lib/libc/include/mips64el-linux-musl/bits/limits.h deleted file mode 100644 index ac11a8d7bf..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/limits.h +++ /dev/null @@ -1,7 +0,0 @@ -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define LONG_BIT 64 -#endif - -#define LONG_MAX 0x7fffffffffffffffL -#define LLONG_MAX 0x7fffffffffffffffLL \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/mman.h b/lib/libc/include/mips64el-linux-musl/bits/mman.h deleted file mode 100644 index 54231d15a7..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/mman.h +++ /dev/null @@ -1,25 +0,0 @@ -#undef MAP_ANON -#define MAP_ANON 0x800 -#undef MAP_NORESERVE -#define MAP_NORESERVE 0x0400 -#undef MAP_GROWSDOWN -#define MAP_GROWSDOWN 0x1000 -#undef MAP_DENYWRITE -#define MAP_DENYWRITE 0x2000 -#undef MAP_EXECUTABLE -#define MAP_EXECUTABLE 0x4000 -#undef MAP_LOCKED -#define MAP_LOCKED 0x8000 -#undef MAP_POPULATE -#define MAP_POPULATE 0x10000 -#undef MAP_NONBLOCK -#define MAP_NONBLOCK 0x20000 -#undef MAP_STACK -#define MAP_STACK 0x40000 -#undef MAP_HUGETLB -#define MAP_HUGETLB 0x80000 -#undef MAP_SYNC - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#undef MADV_SOFT_OFFLINE -#endif \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/poll.h b/lib/libc/include/mips64el-linux-musl/bits/poll.h deleted file mode 100644 index cefdd9be80..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/poll.h +++ /dev/null @@ -1,2 +0,0 @@ -#define POLLWRNORM POLLOUT -#define POLLWRBAND 0x100 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/posix.h b/lib/libc/include/mips64el-linux-musl/bits/posix.h deleted file mode 100644 index a463a878a8..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/posix.h +++ /dev/null @@ -1,2 +0,0 @@ -#define _POSIX_V6_LP64_OFFBIG 1 -#define _POSIX_V7_LP64_OFFBIG 1 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/ptrace.h b/lib/libc/include/mips64el-linux-musl/bits/ptrace.h deleted file mode 100644 index 275462def0..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/ptrace.h +++ /dev/null @@ -1,9 +0,0 @@ -#define PTRACE_GET_THREAD_AREA 25 -#define PTRACE_SET_THREAD_AREA 26 -#define PTRACE_PEEKTEXT_3264 0xc0 -#define PTRACE_PEEKDATA_3264 0xc1 -#define PTRACE_POKETEXT_3264 0xc2 -#define PTRACE_POKEDATA_3264 0xc3 -#define PTRACE_GET_THREAD_AREA_3264 0xc4 -#define PTRACE_GET_WATCH_REGS 0xd0 -#define PTRACE_SET_WATCH_REGS 0xd1 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/reg.h b/lib/libc/include/mips64el-linux-musl/bits/reg.h deleted file mode 100644 index e40c44d384..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/reg.h +++ /dev/null @@ -1,47 +0,0 @@ -#undef __WORDSIZE -#define __WORDSIZE 64 - -#define EF_R0 0 -#define EF_R1 1 -#define EF_R2 2 -#define EF_R3 3 -#define EF_R4 4 -#define EF_R5 5 -#define EF_R6 6 -#define EF_R7 7 -#define EF_R8 8 -#define EF_R9 9 -#define EF_R10 10 -#define EF_R11 11 -#define EF_R12 12 -#define EF_R13 13 -#define EF_R14 14 -#define EF_R15 15 -#define EF_R16 16 -#define EF_R17 17 -#define EF_R18 18 -#define EF_R19 19 -#define EF_R20 20 -#define EF_R21 21 -#define EF_R22 22 -#define EF_R23 23 -#define EF_R24 24 -#define EF_R25 25 - -#define EF_R26 26 -#define EF_R27 27 -#define EF_R28 28 -#define EF_R29 29 -#define EF_R30 30 -#define EF_R31 31 - -#define EF_LO 32 -#define EF_HI 33 - -#define EF_CP0_EPC 34 -#define EF_CP0_BADVADDR 35 -#define EF_CP0_STATUS 36 -#define EF_CP0_CAUSE 37 -#define EF_UNUSED0 38 - -#define EF_SIZE 304 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/resource.h b/lib/libc/include/mips64el-linux-musl/bits/resource.h deleted file mode 100644 index ef7ada7cb1..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/resource.h +++ /dev/null @@ -1,5 +0,0 @@ -#define RLIMIT_NOFILE 5 -#define RLIMIT_AS 6 -#define RLIMIT_RSS 7 -#define RLIMIT_NPROC 8 -#define RLIMIT_MEMLOCK 9 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/sem.h b/lib/libc/include/mips64el-linux-musl/bits/sem.h deleted file mode 100644 index bf8e59f52e..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/sem.h +++ /dev/null @@ -1,14 +0,0 @@ -struct semid_ds { - struct ipc_perm sem_perm; - time_t sem_otime; - time_t sem_ctime; -#if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned short sem_nsems; - char __sem_nsems_pad[sizeof(time_t)-sizeof(short)]; -#else - char __sem_nsems_pad[sizeof(time_t)-sizeof(short)]; - unsigned short sem_nsems; -#endif - time_t __unused3; - time_t __unused4; -}; \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/setjmp.h b/lib/libc/include/mips64el-linux-musl/bits/setjmp.h deleted file mode 100644 index a7cb9dbc8b..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/setjmp.h +++ /dev/null @@ -1 +0,0 @@ -typedef unsigned long long __jmp_buf[23]; \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/signal.h b/lib/libc/include/mips64el-linux-musl/bits/signal.h deleted file mode 100644 index 82029cc2b4..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/signal.h +++ /dev/null @@ -1,143 +0,0 @@ -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) - -#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define MINSIGSTKSZ 2048 -#define SIGSTKSZ 8192 -#endif - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -typedef unsigned long long greg_t, gregset_t[32]; - -typedef struct { - union { - double fp_dregs[32]; - struct { - float _fp_fregs; - unsigned _fp_pad; - } fp_fregs[32]; - } fp_r; -} fpregset_t; - -struct sigcontext { - unsigned long long sc_regs[32]; - unsigned long long sc_fpregs[32]; - unsigned long long sc_mdhi; - unsigned long long sc_hi1; - unsigned long long sc_hi2; - unsigned long long sc_hi3; - unsigned long long sc_mdlo; - unsigned long long sc_lo1; - unsigned long long sc_lo2; - unsigned long long sc_lo3; - unsigned long long sc_pc; - unsigned int sc_fpc_csr; - unsigned int sc_used_math; - unsigned int sc_dsp; - unsigned int sc_reserved; -}; - -typedef struct { - gregset_t gregs; - fpregset_t fpregs; - greg_t mdhi; - greg_t hi1; - greg_t hi2; - greg_t hi3; - greg_t mdlo; - greg_t lo1; - greg_t lo2; - greg_t lo3; - greg_t pc; - unsigned int fpc_csr; - unsigned int used_math; - unsigned int dsp; - unsigned int reserved; -} mcontext_t; - -#else -typedef struct { - unsigned long long __mc1[32]; - double __mc2[32]; - unsigned long long __mc3[9]; - unsigned __mc4[4]; -} mcontext_t; -#endif - -struct sigaltstack { - void *ss_sp; - size_t ss_size; - int ss_flags; -}; - -typedef struct __ucontext { - unsigned long uc_flags; - struct __ucontext *uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - sigset_t uc_sigmask; -} ucontext_t; - -#define SA_NOCLDSTOP 1 -#define SA_NOCLDWAIT 0x10000 -#define SA_SIGINFO 8 -#define SA_ONSTACK 0x08000000 -#define SA_RESTART 0x10000000 -#define SA_NODEFER 0x40000000 -#define SA_RESETHAND 0x80000000 -#define SA_RESTORER 0x04000000 - -#undef SIG_BLOCK -#undef SIG_UNBLOCK -#undef SIG_SETMASK -#define SIG_BLOCK 1 -#define SIG_UNBLOCK 2 -#define SIG_SETMASK 3 - -#undef SI_ASYNCIO -#undef SI_MESGQ -#undef SI_TIMER -#define SI_ASYNCIO (-2) -#define SI_MESGQ (-4) -#define SI_TIMER (-3) - -#define __SI_SWAP_ERRNO_CODE - -#endif - -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGIOT SIGABRT -#define SIGSTKFLT 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGBUS 10 -#define SIGSEGV 11 -#define SIGSYS 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGUSR1 16 -#define SIGUSR2 17 -#define SIGCHLD 18 -#define SIGPWR 19 -#define SIGWINCH 20 -#define SIGURG 21 -#define SIGIO 22 -#define SIGPOLL SIGIO -#define SIGSTOP 23 -#define SIGTSTP 24 -#define SIGCONT 25 -#define SIGTTIN 26 -#define SIGTTOU 27 -#define SIGVTALRM 28 -#define SIGPROF 29 -#define SIGXCPU 30 -#define SIGXFSZ 31 -#define SIGUNUSED SIGSYS - -#define _NSIG 128 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/socket.h b/lib/libc/include/mips64el-linux-musl/bits/socket.h deleted file mode 100644 index 87d555b12d..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/socket.h +++ /dev/null @@ -1,69 +0,0 @@ -#include - -struct msghdr { - void *msg_name; - socklen_t msg_namelen; - struct iovec *msg_iov; -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad1, msg_iovlen; -#else - int msg_iovlen, __pad1; -#endif - void *msg_control; -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad2; - socklen_t msg_controllen; -#else - socklen_t msg_controllen; - int __pad2; -#endif - int msg_flags; -}; - -struct cmsghdr { -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad1; - socklen_t cmsg_len; -#else - socklen_t cmsg_len; - int __pad1; -#endif - int cmsg_level; - int cmsg_type; -}; - -#define SOCK_STREAM 2 -#define SOCK_DGRAM 1 -#define SOL_SOCKET 65535 -#define SO_DEBUG 1 - -#define SO_REUSEADDR 0x0004 -#define SO_KEEPALIVE 0x0008 -#define SO_DONTROUTE 0x0010 -#define SO_BROADCAST 0x0020 -#define SO_LINGER 0x0080 -#define SO_OOBINLINE 0x0100 -#define SO_REUSEPORT 0x0200 -#define SO_SNDBUF 0x1001 -#define SO_RCVBUF 0x1002 -#define SO_SNDLOWAT 0x1003 -#define SO_RCVLOWAT 0x1004 -#define SO_RCVTIMEO 0x1006 -#define SO_SNDTIMEO 0x1005 -#define SO_ERROR 0x1007 -#define SO_TYPE 0x1008 -#define SO_ACCEPTCONN 0x1009 -#define SO_PROTOCOL 0x1028 -#define SO_DOMAIN 0x1029 - -#define SO_NO_CHECK 11 -#define SO_PRIORITY 12 -#define SO_BSDCOMPAT 14 -#define SO_PASSCRED 17 -#define SO_PEERCRED 18 -#define SO_PEERSEC 30 -#define SO_SNDBUFFORCE 31 -#define SO_RCVBUFFORCE 33 - -#define SOCK_NONBLOCK 0200 -#define SOCK_CLOEXEC 02000000 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/stat.h b/lib/libc/include/mips64el-linux-musl/bits/stat.h deleted file mode 100644 index 57b02c688f..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/stat.h +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include - -struct stat { - dev_t st_dev; - int __pad1[3]; - ino_t st_ino; - mode_t st_mode; - nlink_t st_nlink; - uid_t st_uid; - gid_t st_gid; - dev_t st_rdev; - unsigned int __pad2[2]; - off_t st_size; - int __pad3; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; - blksize_t st_blksize; - unsigned int __pad4; - blkcnt_t st_blocks; - int __pad5[14]; -}; \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/statfs.h b/lib/libc/include/mips64el-linux-musl/bits/statfs.h deleted file mode 100644 index 8fdd34ef66..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/statfs.h +++ /dev/null @@ -1,8 +0,0 @@ -struct statfs { - unsigned long f_type, f_bsize, f_frsize; - fsblkcnt_t f_blocks, f_bfree; - fsfilcnt_t f_files, f_ffree; - fsblkcnt_t f_bavail; - fsid_t f_fsid; - unsigned long f_namelen, f_flags, f_spare[5]; -}; \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/syscall.h b/lib/libc/include/mips64el-linux-musl/bits/syscall.h deleted file mode 100644 index 92d5fded65..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/syscall.h +++ /dev/null @@ -1,657 +0,0 @@ -#define __NR_read 5000 -#define __NR_write 5001 -#define __NR_open 5002 -#define __NR_close 5003 -#define __NR_stat 5004 -#define __NR_fstat 5005 -#define __NR_lstat 5006 -#define __NR_poll 5007 -#define __NR_lseek 5008 -#define __NR_mmap 5009 -#define __NR_mprotect 5010 -#define __NR_munmap 5011 -#define __NR_brk 5012 -#define __NR_rt_sigaction 5013 -#define __NR_rt_sigprocmask 5014 -#define __NR_ioctl 5015 -#define __NR_pread64 5016 -#define __NR_pwrite64 5017 -#define __NR_readv 5018 -#define __NR_writev 5019 -#define __NR_access 5020 -#define __NR_pipe 5021 -#define __NR__newselect 5022 -#define __NR_sched_yield 5023 -#define __NR_mremap 5024 -#define __NR_msync 5025 -#define __NR_mincore 5026 -#define __NR_madvise 5027 -#define __NR_shmget 5028 -#define __NR_shmat 5029 -#define __NR_shmctl 5030 -#define __NR_dup 5031 -#define __NR_dup2 5032 -#define __NR_pause 5033 -#define __NR_nanosleep 5034 -#define __NR_getitimer 5035 -#define __NR_setitimer 5036 -#define __NR_alarm 5037 -#define __NR_getpid 5038 -#define __NR_sendfile 5039 -#define __NR_socket 5040 -#define __NR_connect 5041 -#define __NR_accept 5042 -#define __NR_sendto 5043 -#define __NR_recvfrom 5044 -#define __NR_sendmsg 5045 -#define __NR_recvmsg 5046 -#define __NR_shutdown 5047 -#define __NR_bind 5048 -#define __NR_listen 5049 -#define __NR_getsockname 5050 -#define __NR_getpeername 5051 -#define __NR_socketpair 5052 -#define __NR_setsockopt 5053 -#define __NR_getsockopt 5054 -#define __NR_clone 5055 -#define __NR_fork 5056 -#define __NR_execve 5057 -#define __NR_exit 5058 -#define __NR_wait4 5059 -#define __NR_kill 5060 -#define __NR_uname 5061 -#define __NR_semget 5062 -#define __NR_semop 5063 -#define __NR_semctl 5064 -#define __NR_shmdt 5065 -#define __NR_msgget 5066 -#define __NR_msgsnd 5067 -#define __NR_msgrcv 5068 -#define __NR_msgctl 5069 -#define __NR_fcntl 5070 -#define __NR_flock 5071 -#define __NR_fsync 5072 -#define __NR_fdatasync 5073 -#define __NR_truncate 5074 -#define __NR_ftruncate 5075 -#define __NR_getdents 5076 -#define __NR_getcwd 5077 -#define __NR_chdir 5078 -#define __NR_fchdir 5079 -#define __NR_rename 5080 -#define __NR_mkdir 5081 -#define __NR_rmdir 5082 -#define __NR_creat 5083 -#define __NR_link 5084 -#define __NR_unlink 5085 -#define __NR_symlink 5086 -#define __NR_readlink 5087 -#define __NR_chmod 5088 -#define __NR_fchmod 5089 -#define __NR_chown 5090 -#define __NR_fchown 5091 -#define __NR_lchown 5092 -#define __NR_umask 5093 -#define __NR_gettimeofday 5094 -#define __NR_getrlimit 5095 -#define __NR_getrusage 5096 -#define __NR_sysinfo 5097 -#define __NR_times 5098 -#define __NR_ptrace 5099 -#define __NR_getuid 5100 -#define __NR_syslog 5101 -#define __NR_getgid 5102 -#define __NR_setuid 5103 -#define __NR_setgid 5104 -#define __NR_geteuid 5105 -#define __NR_getegid 5106 -#define __NR_setpgid 5107 -#define __NR_getppid 5108 -#define __NR_getpgrp 5109 -#define __NR_setsid 5110 -#define __NR_setreuid 5111 -#define __NR_setregid 5112 -#define __NR_getgroups 5113 -#define __NR_setgroups 5114 -#define __NR_setresuid 5115 -#define __NR_getresuid 5116 -#define __NR_setresgid 5117 -#define __NR_getresgid 5118 -#define __NR_getpgid 5119 -#define __NR_setfsuid 5120 -#define __NR_setfsgid 5121 -#define __NR_getsid 5122 -#define __NR_capget 5123 -#define __NR_capset 5124 -#define __NR_rt_sigpending 5125 -#define __NR_rt_sigtimedwait 5126 -#define __NR_rt_sigqueueinfo 5127 -#define __NR_rt_sigsuspend 5128 -#define __NR_sigaltstack 5129 -#define __NR_utime 5130 -#define __NR_mknod 5131 -#define __NR_personality 5132 -#define __NR_ustat 5133 -#define __NR_statfs 5134 -#define __NR_fstatfs 5135 -#define __NR_sysfs 5136 -#define __NR_getpriority 5137 -#define __NR_setpriority 5138 -#define __NR_sched_setparam 5139 -#define __NR_sched_getparam 5140 -#define __NR_sched_setscheduler 5141 -#define __NR_sched_getscheduler 5142 -#define __NR_sched_get_priority_max 5143 -#define __NR_sched_get_priority_min 5144 -#define __NR_sched_rr_get_interval 5145 -#define __NR_mlock 5146 -#define __NR_munlock 5147 -#define __NR_mlockall 5148 -#define __NR_munlockall 5149 -#define __NR_vhangup 5150 -#define __NR_pivot_root 5151 -#define __NR__sysctl 5152 -#define __NR_prctl 5153 -#define __NR_adjtimex 5154 -#define __NR_setrlimit 5155 -#define __NR_chroot 5156 -#define __NR_sync 5157 -#define __NR_acct 5158 -#define __NR_settimeofday 5159 -#define __NR_mount 5160 -#define __NR_umount2 5161 -#define __NR_swapon 5162 -#define __NR_swapoff 5163 -#define __NR_reboot 5164 -#define __NR_sethostname 5165 -#define __NR_setdomainname 5166 -#define __NR_create_module 5167 -#define __NR_init_module 5168 -#define __NR_delete_module 5169 -#define __NR_get_kernel_syms 5170 -#define __NR_query_module 5171 -#define __NR_quotactl 5172 -#define __NR_nfsservctl 5173 -#define __NR_getpmsg 5174 -#define __NR_putpmsg 5175 -#define __NR_afs_syscall 5176 -#define __NR_reserved177 5177 -#define __NR_gettid 5178 -#define __NR_readahead 5179 -#define __NR_setxattr 5180 -#define __NR_lsetxattr 5181 -#define __NR_fsetxattr 5182 -#define __NR_getxattr 5183 -#define __NR_lgetxattr 5184 -#define __NR_fgetxattr 5185 -#define __NR_listxattr 5186 -#define __NR_llistxattr 5187 -#define __NR_flistxattr 5188 -#define __NR_removexattr 5189 -#define __NR_lremovexattr 5190 -#define __NR_fremovexattr 5191 -#define __NR_tkill 5192 -#define __NR_reserved193 5193 -#define __NR_futex 5194 -#define __NR_sched_setaffinity 5195 -#define __NR_sched_getaffinity 5196 -#define __NR_cacheflush 5197 -#define __NR_cachectl 5198 -#define __NR_sysmips 5199 -#define __NR_io_setup 5200 -#define __NR_io_destroy 5201 -#define __NR_io_getevents 5202 -#define __NR_io_submit 5203 -#define __NR_io_cancel 5204 -#define __NR_exit_group 5205 -#define __NR_lookup_dcookie 5206 -#define __NR_epoll_create 5207 -#define __NR_epoll_ctl 5208 -#define __NR_epoll_wait 5209 -#define __NR_remap_file_pages 5210 -#define __NR_rt_sigreturn 5211 -#define __NR_set_tid_address 5212 -#define __NR_restart_syscall 5213 -#define __NR_semtimedop 5214 -#define __NR_fadvise64 5215 -#define __NR_timer_create 5216 -#define __NR_timer_settime 5217 -#define __NR_timer_gettime 5218 -#define __NR_timer_getoverrun 5219 -#define __NR_timer_delete 5220 -#define __NR_clock_settime 5221 -#define __NR_clock_gettime 5222 -#define __NR_clock_getres 5223 -#define __NR_clock_nanosleep 5224 -#define __NR_tgkill 5225 -#define __NR_utimes 5226 -#define __NR_mbind 5227 -#define __NR_get_mempolicy 5228 -#define __NR_set_mempolicy 5229 -#define __NR_mq_open 5230 -#define __NR_mq_unlink 5231 -#define __NR_mq_timedsend 5232 -#define __NR_mq_timedreceive 5233 -#define __NR_mq_notify 5234 -#define __NR_mq_getsetattr 5235 -#define __NR_vserver 5236 -#define __NR_waitid 5237 -#define __NR_add_key 5239 -#define __NR_request_key 5240 -#define __NR_keyctl 5241 -#define __NR_set_thread_area 5242 -#define __NR_inotify_init 5243 -#define __NR_inotify_add_watch 5244 -#define __NR_inotify_rm_watch 5245 -#define __NR_migrate_pages 5246 -#define __NR_openat 5247 -#define __NR_mkdirat 5248 -#define __NR_mknodat 5249 -#define __NR_fchownat 5250 -#define __NR_futimesat 5251 -#define __NR_newfstatat 5252 -#define __NR_unlinkat 5253 -#define __NR_renameat 5254 -#define __NR_linkat 5255 -#define __NR_symlinkat 5256 -#define __NR_readlinkat 5257 -#define __NR_fchmodat 5258 -#define __NR_faccessat 5259 -#define __NR_pselect6 5260 -#define __NR_ppoll 5261 -#define __NR_unshare 5262 -#define __NR_splice 5263 -#define __NR_sync_file_range 5264 -#define __NR_tee 5265 -#define __NR_vmsplice 5266 -#define __NR_move_pages 5267 -#define __NR_set_robust_list 5268 -#define __NR_get_robust_list 5269 -#define __NR_kexec_load 5270 -#define __NR_getcpu 5271 -#define __NR_epoll_pwait 5272 -#define __NR_ioprio_set 5273 -#define __NR_ioprio_get 5274 -#define __NR_utimensat 5275 -#define __NR_signalfd 5276 -#define __NR_timerfd 5277 -#define __NR_eventfd 5278 -#define __NR_fallocate 5279 -#define __NR_timerfd_create 5280 -#define __NR_timerfd_gettime 5281 -#define __NR_timerfd_settime 5282 -#define __NR_signalfd4 5283 -#define __NR_eventfd2 5284 -#define __NR_epoll_create1 5285 -#define __NR_dup3 5286 -#define __NR_pipe2 5287 -#define __NR_inotify_init1 5288 -#define __NR_preadv 5289 -#define __NR_pwritev 5290 -#define __NR_rt_tgsigqueueinfo 5291 -#define __NR_perf_event_open 5292 -#define __NR_accept4 5293 -#define __NR_recvmmsg 5294 -#define __NR_fanotify_init 5295 -#define __NR_fanotify_mark 5296 -#define __NR_prlimit64 5297 -#define __NR_name_to_handle_at 5298 -#define __NR_open_by_handle_at 5299 -#define __NR_clock_adjtime 5300 -#define __NR_syncfs 5301 -#define __NR_sendmmsg 5302 -#define __NR_setns 5303 -#define __NR_process_vm_readv 5304 -#define __NR_process_vm_writev 5305 -#define __NR_kcmp 5306 -#define __NR_finit_module 5307 -#define __NR_getdents64 5308 -#define __NR_sched_setattr 5309 -#define __NR_sched_getattr 5310 -#define __NR_renameat2 5311 -#define __NR_seccomp 5312 -#define __NR_getrandom 5313 -#define __NR_memfd_create 5314 -#define __NR_bpf 5315 -#define __NR_execveat 5316 -#define __NR_userfaultfd 5317 -#define __NR_membarrier 5318 -#define __NR_mlock2 5319 -#define __NR_copy_file_range 5320 -#define __NR_preadv2 5321 -#define __NR_pwritev2 5322 -#define __NR_pkey_mprotect 5323 -#define __NR_pkey_alloc 5324 -#define __NR_pkey_free 5325 -#define __NR_statx 5326 -#define __NR_rseq 4327 -#define __NR_io_pgetevents 4328 - -#define SYS_read 5000 -#define SYS_write 5001 -#define SYS_open 5002 -#define SYS_close 5003 -#define SYS_stat 5004 -#define SYS_fstat 5005 -#define SYS_lstat 5006 -#define SYS_poll 5007 -#define SYS_lseek 5008 -#define SYS_mmap 5009 -#define SYS_mprotect 5010 -#define SYS_munmap 5011 -#define SYS_brk 5012 -#define SYS_rt_sigaction 5013 -#define SYS_rt_sigprocmask 5014 -#define SYS_ioctl 5015 -#define SYS_pread64 5016 -#define SYS_pwrite64 5017 -#define SYS_readv 5018 -#define SYS_writev 5019 -#define SYS_access 5020 -#define SYS_pipe 5021 -#define SYS__newselect 5022 -#define SYS_sched_yield 5023 -#define SYS_mremap 5024 -#define SYS_msync 5025 -#define SYS_mincore 5026 -#define SYS_madvise 5027 -#define SYS_shmget 5028 -#define SYS_shmat 5029 -#define SYS_shmctl 5030 -#define SYS_dup 5031 -#define SYS_dup2 5032 -#define SYS_pause 5033 -#define SYS_nanosleep 5034 -#define SYS_getitimer 5035 -#define SYS_setitimer 5036 -#define SYS_alarm 5037 -#define SYS_getpid 5038 -#define SYS_sendfile 5039 -#define SYS_socket 5040 -#define SYS_connect 5041 -#define SYS_accept 5042 -#define SYS_sendto 5043 -#define SYS_recvfrom 5044 -#define SYS_sendmsg 5045 -#define SYS_recvmsg 5046 -#define SYS_shutdown 5047 -#define SYS_bind 5048 -#define SYS_listen 5049 -#define SYS_getsockname 5050 -#define SYS_getpeername 5051 -#define SYS_socketpair 5052 -#define SYS_setsockopt 5053 -#define SYS_getsockopt 5054 -#define SYS_clone 5055 -#define SYS_fork 5056 -#define SYS_execve 5057 -#define SYS_exit 5058 -#define SYS_wait4 5059 -#define SYS_kill 5060 -#define SYS_uname 5061 -#define SYS_semget 5062 -#define SYS_semop 5063 -#define SYS_semctl 5064 -#define SYS_shmdt 5065 -#define SYS_msgget 5066 -#define SYS_msgsnd 5067 -#define SYS_msgrcv 5068 -#define SYS_msgctl 5069 -#define SYS_fcntl 5070 -#define SYS_flock 5071 -#define SYS_fsync 5072 -#define SYS_fdatasync 5073 -#define SYS_truncate 5074 -#define SYS_ftruncate 5075 -#define SYS_getdents 5076 -#define SYS_getcwd 5077 -#define SYS_chdir 5078 -#define SYS_fchdir 5079 -#define SYS_rename 5080 -#define SYS_mkdir 5081 -#define SYS_rmdir 5082 -#define SYS_creat 5083 -#define SYS_link 5084 -#define SYS_unlink 5085 -#define SYS_symlink 5086 -#define SYS_readlink 5087 -#define SYS_chmod 5088 -#define SYS_fchmod 5089 -#define SYS_chown 5090 -#define SYS_fchown 5091 -#define SYS_lchown 5092 -#define SYS_umask 5093 -#define SYS_gettimeofday 5094 -#define SYS_getrlimit 5095 -#define SYS_getrusage 5096 -#define SYS_sysinfo 5097 -#define SYS_times 5098 -#define SYS_ptrace 5099 -#define SYS_getuid 5100 -#define SYS_syslog 5101 -#define SYS_getgid 5102 -#define SYS_setuid 5103 -#define SYS_setgid 5104 -#define SYS_geteuid 5105 -#define SYS_getegid 5106 -#define SYS_setpgid 5107 -#define SYS_getppid 5108 -#define SYS_getpgrp 5109 -#define SYS_setsid 5110 -#define SYS_setreuid 5111 -#define SYS_setregid 5112 -#define SYS_getgroups 5113 -#define SYS_setgroups 5114 -#define SYS_setresuid 5115 -#define SYS_getresuid 5116 -#define SYS_setresgid 5117 -#define SYS_getresgid 5118 -#define SYS_getpgid 5119 -#define SYS_setfsuid 5120 -#define SYS_setfsgid 5121 -#define SYS_getsid 5122 -#define SYS_capget 5123 -#define SYS_capset 5124 -#define SYS_rt_sigpending 5125 -#define SYS_rt_sigtimedwait 5126 -#define SYS_rt_sigqueueinfo 5127 -#define SYS_rt_sigsuspend 5128 -#define SYS_sigaltstack 5129 -#define SYS_utime 5130 -#define SYS_mknod 5131 -#define SYS_personality 5132 -#define SYS_ustat 5133 -#define SYS_statfs 5134 -#define SYS_fstatfs 5135 -#define SYS_sysfs 5136 -#define SYS_getpriority 5137 -#define SYS_setpriority 5138 -#define SYS_sched_setparam 5139 -#define SYS_sched_getparam 5140 -#define SYS_sched_setscheduler 5141 -#define SYS_sched_getscheduler 5142 -#define SYS_sched_get_priority_max 5143 -#define SYS_sched_get_priority_min 5144 -#define SYS_sched_rr_get_interval 5145 -#define SYS_mlock 5146 -#define SYS_munlock 5147 -#define SYS_mlockall 5148 -#define SYS_munlockall 5149 -#define SYS_vhangup 5150 -#define SYS_pivot_root 5151 -#define SYS__sysctl 5152 -#define SYS_prctl 5153 -#define SYS_adjtimex 5154 -#define SYS_setrlimit 5155 -#define SYS_chroot 5156 -#define SYS_sync 5157 -#define SYS_acct 5158 -#define SYS_settimeofday 5159 -#define SYS_mount 5160 -#define SYS_umount2 5161 -#define SYS_swapon 5162 -#define SYS_swapoff 5163 -#define SYS_reboot 5164 -#define SYS_sethostname 5165 -#define SYS_setdomainname 5166 -#define SYS_create_module 5167 -#define SYS_init_module 5168 -#define SYS_delete_module 5169 -#define SYS_get_kernel_syms 5170 -#define SYS_query_module 5171 -#define SYS_quotactl 5172 -#define SYS_nfsservctl 5173 -#define SYS_getpmsg 5174 -#define SYS_putpmsg 5175 -#define SYS_afs_syscall 5176 -#define SYS_reserved177 5177 -#define SYS_gettid 5178 -#define SYS_readahead 5179 -#define SYS_setxattr 5180 -#define SYS_lsetxattr 5181 -#define SYS_fsetxattr 5182 -#define SYS_getxattr 5183 -#define SYS_lgetxattr 5184 -#define SYS_fgetxattr 5185 -#define SYS_listxattr 5186 -#define SYS_llistxattr 5187 -#define SYS_flistxattr 5188 -#define SYS_removexattr 5189 -#define SYS_lremovexattr 5190 -#define SYS_fremovexattr 5191 -#define SYS_tkill 5192 -#define SYS_reserved193 5193 -#define SYS_futex 5194 -#define SYS_sched_setaffinity 5195 -#define SYS_sched_getaffinity 5196 -#define SYS_cacheflush 5197 -#define SYS_cachectl 5198 -#define SYS_sysmips 5199 -#define SYS_io_setup 5200 -#define SYS_io_destroy 5201 -#define SYS_io_getevents 5202 -#define SYS_io_submit 5203 -#define SYS_io_cancel 5204 -#define SYS_exit_group 5205 -#define SYS_lookup_dcookie 5206 -#define SYS_epoll_create 5207 -#define SYS_epoll_ctl 5208 -#define SYS_epoll_wait 5209 -#define SYS_remap_file_pages 5210 -#define SYS_rt_sigreturn 5211 -#define SYS_set_tid_address 5212 -#define SYS_restart_syscall 5213 -#define SYS_semtimedop 5214 -#define SYS_fadvise64 5215 -#define SYS_timer_create 5216 -#define SYS_timer_settime 5217 -#define SYS_timer_gettime 5218 -#define SYS_timer_getoverrun 5219 -#define SYS_timer_delete 5220 -#define SYS_clock_settime 5221 -#define SYS_clock_gettime 5222 -#define SYS_clock_getres 5223 -#define SYS_clock_nanosleep 5224 -#define SYS_tgkill 5225 -#define SYS_utimes 5226 -#define SYS_mbind 5227 -#define SYS_get_mempolicy 5228 -#define SYS_set_mempolicy 5229 -#define SYS_mq_open 5230 -#define SYS_mq_unlink 5231 -#define SYS_mq_timedsend 5232 -#define SYS_mq_timedreceive 5233 -#define SYS_mq_notify 5234 -#define SYS_mq_getsetattr 5235 -#define SYS_vserver 5236 -#define SYS_waitid 5237 -#define SYS_add_key 5239 -#define SYS_request_key 5240 -#define SYS_keyctl 5241 -#define SYS_set_thread_area 5242 -#define SYS_inotify_init 5243 -#define SYS_inotify_add_watch 5244 -#define SYS_inotify_rm_watch 5245 -#define SYS_migrate_pages 5246 -#define SYS_openat 5247 -#define SYS_mkdirat 5248 -#define SYS_mknodat 5249 -#define SYS_fchownat 5250 -#define SYS_futimesat 5251 -#define SYS_newfstatat 5252 -#define SYS_unlinkat 5253 -#define SYS_renameat 5254 -#define SYS_linkat 5255 -#define SYS_symlinkat 5256 -#define SYS_readlinkat 5257 -#define SYS_fchmodat 5258 -#define SYS_faccessat 5259 -#define SYS_pselect6 5260 -#define SYS_ppoll 5261 -#define SYS_unshare 5262 -#define SYS_splice 5263 -#define SYS_sync_file_range 5264 -#define SYS_tee 5265 -#define SYS_vmsplice 5266 -#define SYS_move_pages 5267 -#define SYS_set_robust_list 5268 -#define SYS_get_robust_list 5269 -#define SYS_kexec_load 5270 -#define SYS_getcpu 5271 -#define SYS_epoll_pwait 5272 -#define SYS_ioprio_set 5273 -#define SYS_ioprio_get 5274 -#define SYS_utimensat 5275 -#define SYS_signalfd 5276 -#define SYS_timerfd 5277 -#define SYS_eventfd 5278 -#define SYS_fallocate 5279 -#define SYS_timerfd_create 5280 -#define SYS_timerfd_gettime 5281 -#define SYS_timerfd_settime 5282 -#define SYS_signalfd4 5283 -#define SYS_eventfd2 5284 -#define SYS_epoll_create1 5285 -#define SYS_dup3 5286 -#define SYS_pipe2 5287 -#define SYS_inotify_init1 5288 -#define SYS_preadv 5289 -#define SYS_pwritev 5290 -#define SYS_rt_tgsigqueueinfo 5291 -#define SYS_perf_event_open 5292 -#define SYS_accept4 5293 -#define SYS_recvmmsg 5294 -#define SYS_fanotify_init 5295 -#define SYS_fanotify_mark 5296 -#define SYS_prlimit64 5297 -#define SYS_name_to_handle_at 5298 -#define SYS_open_by_handle_at 5299 -#define SYS_clock_adjtime 5300 -#define SYS_syncfs 5301 -#define SYS_sendmmsg 5302 -#define SYS_setns 5303 -#define SYS_process_vm_readv 5304 -#define SYS_process_vm_writev 5305 -#define SYS_kcmp 5306 -#define SYS_finit_module 5307 -#define SYS_getdents64 5308 -#define SYS_sched_setattr 5309 -#define SYS_sched_getattr 5310 -#define SYS_renameat2 5311 -#define SYS_seccomp 5312 -#define SYS_getrandom 5313 -#define SYS_memfd_create 5314 -#define SYS_bpf 5315 -#define SYS_execveat 5316 -#define SYS_userfaultfd 5317 -#define SYS_membarrier 5318 -#define SYS_mlock2 5319 -#define SYS_copy_file_range 5320 -#define SYS_preadv2 5321 -#define SYS_pwritev2 5322 -#define SYS_pkey_mprotect 5323 -#define SYS_pkey_alloc 5324 -#define SYS_pkey_free 5325 -#define SYS_statx 5326 -#define SYS_rseq 4327 -#define SYS_io_pgetevents 4328 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/termios.h b/lib/libc/include/mips64el-linux-musl/bits/termios.h deleted file mode 100644 index 04f10fa6d1..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/termios.h +++ /dev/null @@ -1,169 +0,0 @@ -struct termios { - tcflag_t c_iflag; - tcflag_t c_oflag; - tcflag_t c_cflag; - tcflag_t c_lflag; - cc_t c_line; - cc_t c_cc[NCCS]; - speed_t __c_ispeed; - speed_t __c_ospeed; -}; - -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VMIN 4 -#define VTIME 5 -#define VEOL2 6 -#define VSWTC 7 -#define VSWTCH 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOF 16 -#define VEOL 17 - -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 -#define IUTF8 0040000 - -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE) -#define NLDLY 0000400 -#define NL0 0000000 -#define NL1 0000400 -#define CRDLY 0003000 -#define CR0 0000000 -#define CR1 0001000 -#define CR2 0002000 -#define CR3 0003000 -#define TABDLY 0014000 -#define TAB0 0000000 -#define TAB1 0004000 -#define TAB2 0010000 -#define TAB3 0014000 -#define BSDLY 0020000 -#define BS0 0000000 -#define BS1 0020000 -#define FFDLY 0100000 -#define FF0 0000000 -#define FF1 0100000 -#endif - -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 - -#define B0 0000000 -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 - -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define B500000 0010005 -#define B576000 0010006 -#define B921600 0010007 -#define B1000000 0010010 -#define B1152000 0010011 -#define B1500000 0010012 -#define B2000000 0010013 -#define B2500000 0010014 -#define B3000000 0010015 -#define B3500000 0010016 -#define B4000000 0010017 - -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 - -#define ISIG 0000001 -#define ICANON 0000002 -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define IEXTEN 0000400 -#define TOSTOP 0100000 -#define ITOSTOP 0100000 - -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define EXTA 0000016 -#define EXTB 0000017 -#define CBAUD 0010017 -#define CBAUDEX 0010000 -#define CIBAUD 002003600000 -#define CMSPAR 010000000000 -#define CRTSCTS 020000000000 - -#define XCASE 0000004 -#define ECHOCTL 0001000 -#define ECHOPRT 0002000 -#define ECHOKE 0004000 -#define FLUSHO 0020000 -#define PENDIN 0040000 -#define EXTPROC 0200000 - -#define XTABS 0014000 -#define TIOCSER_TEMT 0x01 -#endif \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-musl/bits/user.h b/lib/libc/include/mips64el-linux-musl/bits/user.h deleted file mode 100644 index 0c2b245fee..0000000000 --- a/lib/libc/include/mips64el-linux-musl/bits/user.h +++ /dev/null @@ -1,15 +0,0 @@ -struct user { - unsigned long regs[102]; - unsigned long u_tsize, u_dsize, u_ssize; - unsigned long long start_code, start_data, start_stack; - long long signal; - unsigned long long *u_ar0; - unsigned long long magic; - char u_comm[32]; -}; - -#define ELF_NGREG 45 -#define ELF_NFPREG 33 - -typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; -typedef double elf_fpreg_t, elf_fpregset_t[ELF_NFPREG]; \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bfd.h b/lib/libc/include/mipsel-linux-musl/bfd.h deleted file mode 100644 index 1e0f4b1ef1..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bfd.h +++ /dev/null @@ -1,8034 +0,0 @@ -/* 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-2019 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 32 - -#define BFD_HOST_64BIT_LONG 0 -#define BFD_HOST_64BIT_LONG_LONG 1 -#if 1 -#define BFD_HOST_64_BIT long long -#define BFD_HOST_U_64_BIT unsigned long 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) - -/* 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; - 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) - -#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 bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#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_get_section_limit_octets(bfd, sec) / 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) - -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 *); - -/* 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_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) - -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); - -#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_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_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 **); -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 int 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 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)); - -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_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -/* 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); - -/* XCOFF support routines for the linker. */ - -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_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -/* 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 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 *); - -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 *); - -struct elf32_arm_params { - char *thumb_entry_symbol; - int byteswap_code; - int target1_is_rel; - char * target2_type; - int fix_v4bx; - int use_blx; - bfd_arm_vfp11_fix vfp11_denorm_fix; - bfd_arm_stm32l4xx_fix stm32l4xx_fix; - int no_enum_size_warning; - int no_wchar_size_warning; - int pic_veneer; - int fix_cortex_a8; - int fix_arm1176; - int merge_exidx_entries; - int cmse_implib; - bfd *in_implib_bfd; -}; - -void bfd_elf32_arm_set_target_params - (bfd *, struct bfd_link_info *, struct elf32_arm_params *); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_keep_private_stub_output_sections - (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 *, 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 - (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 *, - struct bfd_section *, unsigned int), - 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); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -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, int); - -extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, 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 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 - (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 *); -/* 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); - -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); - -/* 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); - -/* MIPS ABI flags data access. For the disassembler. */ -struct elf_internal_abiflags_v0; -extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); - -/* C-SKY functions. */ -extern bfd_boolean elf32_csky_build_stubs - (struct bfd_link_info *); -extern bfd_boolean elf32_csky_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section *(*) (const char*, struct bfd_section*), - void (*) (void)); -extern void elf32_csky_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern int elf32_csky_setup_section_lists - (bfd *, struct bfd_link_info *); -/* 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); - -/* 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) \ - (*(const unsigned char *) (ptr) & 0xff) -#define bfd_get_signed_8(abfd, ptr) \ - (((*(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_vma) 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 - - /* 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; -}; - -/* 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 _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]) - -#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) - -#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)) - -/* 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)) - -#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 - (bfd *abfd, asection *sec, flagword flags); - -void bfd_rename_section - (bfd *abfd, 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 - (bfd *abfd, 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); - -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 - 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_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_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_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. */ -#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_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_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; -} -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 (bfd *abfd); - -unsigned long bfd_get_mach (bfd *abfd); - -unsigned int bfd_arch_bits_per_byte (bfd *abfd); - -unsigned int bfd_arch_bits_per_address (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 (bfd *abfd); - -unsigned int bfd_arch_mach_octets_per_byte - (enum bfd_architecture arch, unsigned long machine); - -/* Extracted from reloc.c. */ - -typedef enum bfd_reloc_status -{ - /* No errors detected. Note - the value 2 is used so that it - will not be mistaken for the boolean TRUE or FALSE values. */ - bfd_reloc_ok = 2, - - /* The relocation was performed, but there was an overflow. */ - bfd_reloc_overflow, - - /* The address to relocate was not within the section supplied. */ - bfd_reloc_outofrange, - - /* Used by special functions. */ - bfd_reloc_continue, - - /* Unsupported relocation size requested. */ - bfd_reloc_notsupported, - - /* 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. */ - 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, - -/* 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_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_HIGHER, - 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, - -/* 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, - -/* 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_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 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, - -/* 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, - -/* 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, - -/* 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 : 20; - - /* 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 - - /* 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 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 - 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; -}; - -/* 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, - 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_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_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. */ - 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_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 *); - - /* 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; - -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 \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bfd_stdint.h b/lib/libc/include/mipsel-linux-musl/bfd_stdint.h deleted file mode 100644 index 5e80479183..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for mipsel-linux-musl-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/alltypes.h b/lib/libc/include/mipsel-linux-musl/bits/alltypes.h deleted file mode 100644 index c0c65a6d93..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/alltypes.h +++ /dev/null @@ -1,385 +0,0 @@ -#define _Addr int -#define _Int64 long long -#define _Reg int - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef int wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif - -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/endian.h b/lib/libc/include/mipsel-linux-musl/bits/endian.h deleted file mode 100644 index e888a1939f..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/endian.h +++ /dev/null @@ -1,5 +0,0 @@ -#if _MIPSEL || __MIPSEL || __MIPSEL__ -#define __BYTE_ORDER __LITTLE_ENDIAN -#else -#define __BYTE_ORDER __BIG_ENDIAN -#endif \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/errno.h b/lib/libc/include/mipsel-linux-musl/bits/errno.h deleted file mode 100644 index 54adcccfee..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/errno.h +++ /dev/null @@ -1,134 +0,0 @@ -#define EPERM 1 -#define ENOENT 2 -#define ESRCH 3 -#define EINTR 4 -#define EIO 5 -#define ENXIO 6 -#define E2BIG 7 -#define ENOEXEC 8 -#define EBADF 9 -#define ECHILD 10 -#define EAGAIN 11 -#define ENOMEM 12 -#define EACCES 13 -#define EFAULT 14 -#define ENOTBLK 15 -#define EBUSY 16 -#define EEXIST 17 -#define EXDEV 18 -#define ENODEV 19 -#define ENOTDIR 20 -#define EISDIR 21 -#define EINVAL 22 -#define ENFILE 23 -#define EMFILE 24 -#define ENOTTY 25 -#define ETXTBSY 26 -#define EFBIG 27 -#define ENOSPC 28 -#define ESPIPE 29 -#define EROFS 30 -#define EMLINK 31 -#define EPIPE 32 -#define EDOM 33 -#define ERANGE 34 -#define ENOMSG 35 -#define EIDRM 36 -#define ECHRNG 37 -#define EL2NSYNC 38 -#define EL3HLT 39 -#define EL3RST 40 -#define ELNRNG 41 -#define EUNATCH 42 -#define ENOCSI 43 -#define EL2HLT 44 -#define EDEADLK 45 -#define ENOLCK 46 -#define EBADE 50 -#define EBADR 51 -#define EXFULL 52 -#define ENOANO 53 -#define EBADRQC 54 -#define EBADSLT 55 -#define EDEADLOCK 56 -#define EBFONT 59 -#define ENOSTR 60 -#define ENODATA 61 -#define ETIME 62 -#define ENOSR 63 -#define ENONET 64 -#define ENOPKG 65 -#define EREMOTE 66 -#define ENOLINK 67 -#define EADV 68 -#define ESRMNT 69 -#define ECOMM 70 -#define EPROTO 71 -#define EDOTDOT 73 -#define EMULTIHOP 74 -#define EBADMSG 77 -#define ENAMETOOLONG 78 -#define EOVERFLOW 79 -#define ENOTUNIQ 80 -#define EBADFD 81 -#define EREMCHG 82 -#define ELIBACC 83 -#define ELIBBAD 84 -#define ELIBSCN 85 -#define ELIBMAX 86 -#define ELIBEXEC 87 -#define EILSEQ 88 -#define ENOSYS 89 -#define ELOOP 90 -#define ERESTART 91 -#define ESTRPIPE 92 -#define ENOTEMPTY 93 -#define EUSERS 94 -#define ENOTSOCK 95 -#define EDESTADDRREQ 96 -#define EMSGSIZE 97 -#define EPROTOTYPE 98 -#define ENOPROTOOPT 99 -#define EPROTONOSUPPORT 120 -#define ESOCKTNOSUPPORT 121 -#define EOPNOTSUPP 122 -#define ENOTSUP EOPNOTSUPP -#define EPFNOSUPPORT 123 -#define EAFNOSUPPORT 124 -#define EADDRINUSE 125 -#define EADDRNOTAVAIL 126 -#define ENETDOWN 127 -#define ENETUNREACH 128 -#define ENETRESET 129 -#define ECONNABORTED 130 -#define ECONNRESET 131 -#define ENOBUFS 132 -#define EISCONN 133 -#define ENOTCONN 134 -#define EUCLEAN 135 -#define ENOTNAM 137 -#define ENAVAIL 138 -#define EISNAM 139 -#define EREMOTEIO 140 -#define ESHUTDOWN 143 -#define ETOOMANYREFS 144 -#define ETIMEDOUT 145 -#define ECONNREFUSED 146 -#define EHOSTDOWN 147 -#define EHOSTUNREACH 148 -#define EWOULDBLOCK EAGAIN -#define EALREADY 149 -#define EINPROGRESS 150 -#define ESTALE 151 -#define ECANCELED 158 -#define ENOMEDIUM 159 -#define EMEDIUMTYPE 160 -#define ENOKEY 161 -#define EKEYEXPIRED 162 -#define EKEYREVOKED 163 -#define EKEYREJECTED 164 -#define EOWNERDEAD 165 -#define ENOTRECOVERABLE 166 -#define ERFKILL 167 -#define EHWPOISON 168 -#define EDQUOT 1133 \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/fcntl.h b/lib/libc/include/mipsel-linux-musl/bits/fcntl.h deleted file mode 100644 index 911a8adc48..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/fcntl.h +++ /dev/null @@ -1,40 +0,0 @@ -#define O_CREAT 0400 -#define O_EXCL 02000 -#define O_NOCTTY 04000 -#define O_TRUNC 01000 -#define O_APPEND 0010 -#define O_NONBLOCK 0200 -#define O_DSYNC 0020 -#define O_SYNC 040020 -#define O_RSYNC 040020 -#define O_DIRECTORY 0200000 -#define O_NOFOLLOW 0400000 -#define O_CLOEXEC 02000000 - -#define O_ASYNC 010000 -#define O_DIRECT 0100000 -#define O_LARGEFILE 020000 -#define O_NOATIME 01000000 -#define O_PATH 010000000 -#define O_TMPFILE 020200000 -#define O_NDELAY O_NONBLOCK - -#define F_DUPFD 0 -#define F_GETFD 1 -#define F_SETFD 2 -#define F_GETFL 3 -#define F_SETFL 4 - -#define F_SETOWN 24 -#define F_GETOWN 23 -#define F_SETSIG 10 -#define F_GETSIG 11 - -#define F_GETLK 33 -#define F_SETLK 34 -#define F_SETLKW 35 - -#define F_SETOWN_EX 15 -#define F_GETOWN_EX 16 - -#define F_GETOWNER_UIDS 17 \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/fenv.h b/lib/libc/include/mipsel-linux-musl/bits/fenv.h deleted file mode 100644 index dbf9b368f1..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/fenv.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifdef __mips_soft_float -#define FE_ALL_EXCEPT 0 -#define FE_TONEAREST 0 -#else -#define FE_INEXACT 4 -#define FE_UNDERFLOW 8 -#define FE_OVERFLOW 16 -#define FE_DIVBYZERO 32 -#define FE_INVALID 64 - -#define FE_ALL_EXCEPT 124 - -#define FE_TONEAREST 0 -#define FE_TOWARDZERO 1 -#define FE_UPWARD 2 -#define FE_DOWNWARD 3 -#endif - -typedef unsigned short fexcept_t; - -typedef struct { - unsigned __cw; -} fenv_t; - -#define FE_DFL_ENV ((const fenv_t *) -1) \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/hwcap.h b/lib/libc/include/mipsel-linux-musl/bits/hwcap.h deleted file mode 100644 index 0cc1faa9f7..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/hwcap.h +++ /dev/null @@ -1,3 +0,0 @@ -#define HWCAP_MIPS_R6 (1 << 0) -#define HWCAP_MIPS_MSA (1 << 1) -#define HWCAP_MIPS_CRC32 (1 << 2) \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/ioctl.h b/lib/libc/include/mipsel-linux-musl/bits/ioctl.h deleted file mode 100644 index 1c0450bcd7..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/ioctl.h +++ /dev/null @@ -1,212 +0,0 @@ -#define _IOC(a,b,c,d) ( ((a)<<29) | ((b)<<8) | (c) | ((d)<<16) ) -#define _IOC_NONE 1U -#define _IOC_READ 2U -#define _IOC_WRITE 4U - -#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0) -#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c)) -#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c)) -#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c)) - -#define TCGETA 0x5401 -#define TCSETA 0x5402 -#define TCSETAW 0x5403 -#define TCSETAF 0x5404 -#define TCSBRK 0x5405 -#define TCXONC 0x5406 -#define TCFLSH 0x5407 -#define TCGETS 0x540D -#define TCSETS 0x540E -#define TCSETSW 0x540F -#define TCSETSF 0x5410 - -#define TIOCEXCL 0x740D -#define TIOCNXCL 0x740E -#define TIOCOUTQ 0x7472 -#define TIOCSTI 0x5472 -#define TIOCMGET 0x741D -#define TIOCMBIS 0x741B -#define TIOCMBIC 0x741C -#define TIOCMSET 0x741A - -#define TIOCPKT 0x5470 -#define TIOCSWINSZ _IOW('t', 103, struct winsize) -#define TIOCGWINSZ _IOR('t', 104, struct winsize) -#define TIOCNOTTY 0x5471 -#define TIOCSETD 0x7401 -#define TIOCGETD 0x7400 - -#define FIOCLEX 0x6601 -#define FIONCLEX 0x6602 -#define FIOASYNC 0x667D -#define FIONBIO 0x667E -#define FIOQSIZE 0x667F - -#define TIOCGLTC 0x7474 -#define TIOCSLTC 0x7475 -#define TIOCSPGRP _IOW('t', 118, int) -#define TIOCGPGRP _IOR('t', 119, int) -#define TIOCCONS _IOW('t', 120, int) - -#define FIONREAD 0x467F -#define TIOCINQ FIONREAD - -#define TIOCGETP 0x7408 -#define TIOCSETP 0x7409 -#define TIOCSETN 0x740A - -#define TIOCSBRK 0x5427 -#define TIOCCBRK 0x5428 -#define TIOCGSID 0x7416 -#define TIOCGRS485 _IOR('T', 0x2E, char[32]) -#define TIOCSRS485 _IOWR('T', 0x2F, char[32]) -#define TIOCGPTN _IOR('T', 0x30, unsigned int) -#define TIOCSPTLCK _IOW('T', 0x31, int) -#define TIOCGDEV _IOR('T', 0x32, unsigned int) -#define TIOCSIG _IOW('T', 0x36, int) -#define TIOCVHANGUP 0x5437 -#define TIOCGPKT _IOR('T', 0x38, int) -#define TIOCGPTLCK _IOR('T', 0x39, int) -#define TIOCGEXCL _IOR('T', 0x40, int) -#define TIOCGPTPEER _IO('T', 0x41) - -#define TIOCSCTTY 0x5480 -#define TIOCGSOFTCAR 0x5481 -#define TIOCSSOFTCAR 0x5482 -#define TIOCLINUX 0x5483 -#define TIOCGSERIAL 0x5484 -#define TIOCSSERIAL 0x5485 -#define TCSBRKP 0x5486 - -#define TIOCSERCONFIG 0x5488 -#define TIOCSERGWILD 0x5489 -#define TIOCSERSWILD 0x548A -#define TIOCGLCKTRMIOS 0x548B -#define TIOCSLCKTRMIOS 0x548C -#define TIOCSERGSTRUCT 0x548D -#define TIOCSERGETLSR 0x548E -#define TIOCSERGETMULTI 0x548F -#define TIOCSERSETMULTI 0x5490 -#define TIOCMIWAIT 0x5491 -#define TIOCGICOUNT 0x5492 - -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCSER_TEMT 0x01 - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x010 -#define TIOCM_SR 0x020 -#define TIOCM_CTS 0x040 -#define TIOCM_CAR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RNG 0x200 -#define TIOCM_RI TIOCM_RNG -#define TIOCM_DSR 0x400 -#define TIOCM_OUT1 0x2000 -#define TIOCM_OUT2 0x4000 -#define TIOCM_LOOP 0x8000 - -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 -#define N_6PACK 7 -#define N_MASC 8 -#define N_R3964 9 -#define N_PROFIBUS_FDL 10 -#define N_IRDA 11 -#define N_SMSBLOCK 12 -#define N_HDLC 13 -#define N_SYNC_PPP 14 -#define N_HCI 15 - -#define FIOGETOWN _IOR('f', 123, int) -#define FIOSETOWN _IOW('f', 124, int) -#define SIOCATMARK _IOR('s', 7, int) -#define SIOCSPGRP _IOW('s', 8, pid_t) -#define SIOCGPGRP _IOR('s', 9, pid_t) -#define SIOCGSTAMP 0x8906 -#define SIOCGSTAMPNS 0x8907 - -#define SIOCADDRT 0x890B -#define SIOCDELRT 0x890C -#define SIOCRTMSG 0x890D - -#define SIOCGIFNAME 0x8910 -#define SIOCSIFLINK 0x8911 -#define SIOCGIFCONF 0x8912 -#define SIOCGIFFLAGS 0x8913 -#define SIOCSIFFLAGS 0x8914 -#define SIOCGIFADDR 0x8915 -#define SIOCSIFADDR 0x8916 -#define SIOCGIFDSTADDR 0x8917 -#define SIOCSIFDSTADDR 0x8918 -#define SIOCGIFBRDADDR 0x8919 -#define SIOCSIFBRDADDR 0x891a -#define SIOCGIFNETMASK 0x891b -#define SIOCSIFNETMASK 0x891c -#define SIOCGIFMETRIC 0x891d -#define SIOCSIFMETRIC 0x891e -#define SIOCGIFMEM 0x891f -#define SIOCSIFMEM 0x8920 -#define SIOCGIFMTU 0x8921 -#define SIOCSIFMTU 0x8922 -#define SIOCSIFNAME 0x8923 -#define SIOCSIFHWADDR 0x8924 -#define SIOCGIFENCAP 0x8925 -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 -#define SIOCGIFSLAVE 0x8929 -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 -#define SIOGIFINDEX SIOCGIFINDEX -#define SIOCSIFPFLAGS 0x8934 -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 -#define SIOCSIFHWBROADCAST 0x8937 -#define SIOCGIFCOUNT 0x8938 - -#define SIOCGIFBR 0x8940 -#define SIOCSIFBR 0x8941 - -#define SIOCGIFTXQLEN 0x8942 -#define SIOCSIFTXQLEN 0x8943 - -#define SIOCDARP 0x8953 -#define SIOCGARP 0x8954 -#define SIOCSARP 0x8955 - -#define SIOCDRARP 0x8960 -#define SIOCGRARP 0x8961 -#define SIOCSRARP 0x8962 - -#define SIOCGIFMAP 0x8970 -#define SIOCSIFMAP 0x8971 - -#define SIOCADDDLCI 0x8980 -#define SIOCDELDLCI 0x8981 - -#define SIOCDEVPRIVATE 0x89F0 -#define SIOCPROTOPRIVATE 0x89E0 \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/mman.h b/lib/libc/include/mipsel-linux-musl/bits/mman.h deleted file mode 100644 index 54231d15a7..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/mman.h +++ /dev/null @@ -1,25 +0,0 @@ -#undef MAP_ANON -#define MAP_ANON 0x800 -#undef MAP_NORESERVE -#define MAP_NORESERVE 0x0400 -#undef MAP_GROWSDOWN -#define MAP_GROWSDOWN 0x1000 -#undef MAP_DENYWRITE -#define MAP_DENYWRITE 0x2000 -#undef MAP_EXECUTABLE -#define MAP_EXECUTABLE 0x4000 -#undef MAP_LOCKED -#define MAP_LOCKED 0x8000 -#undef MAP_POPULATE -#define MAP_POPULATE 0x10000 -#undef MAP_NONBLOCK -#define MAP_NONBLOCK 0x20000 -#undef MAP_STACK -#define MAP_STACK 0x40000 -#undef MAP_HUGETLB -#define MAP_HUGETLB 0x80000 -#undef MAP_SYNC - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#undef MADV_SOFT_OFFLINE -#endif \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/msg.h b/lib/libc/include/mipsel-linux-musl/bits/msg.h deleted file mode 100644 index f310867d19..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/msg.h +++ /dev/null @@ -1,24 +0,0 @@ -struct msqid_ds { - struct ipc_perm msg_perm; -#if _MIPSEL || __MIPSEL || __MIPSEL__ - time_t msg_stime; - int __unused1; - time_t msg_rtime; - int __unused2; - time_t msg_ctime; - int __unused3; -#else - int __unused1; - time_t msg_stime; - int __unused2; - time_t msg_rtime; - int __unused3; - time_t msg_ctime; -#endif - unsigned long msg_cbytes; - msgqnum_t msg_qnum; - msglen_t msg_qbytes; - pid_t msg_lspid; - pid_t msg_lrpid; - unsigned long __unused[2]; -}; \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/poll.h b/lib/libc/include/mipsel-linux-musl/bits/poll.h deleted file mode 100644 index cefdd9be80..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/poll.h +++ /dev/null @@ -1,2 +0,0 @@ -#define POLLWRNORM POLLOUT -#define POLLWRBAND 0x100 \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/ptrace.h b/lib/libc/include/mipsel-linux-musl/bits/ptrace.h deleted file mode 100644 index 275462def0..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/ptrace.h +++ /dev/null @@ -1,9 +0,0 @@ -#define PTRACE_GET_THREAD_AREA 25 -#define PTRACE_SET_THREAD_AREA 26 -#define PTRACE_PEEKTEXT_3264 0xc0 -#define PTRACE_PEEKDATA_3264 0xc1 -#define PTRACE_POKETEXT_3264 0xc2 -#define PTRACE_POKEDATA_3264 0xc3 -#define PTRACE_GET_THREAD_AREA_3264 0xc4 -#define PTRACE_GET_WATCH_REGS 0xd0 -#define PTRACE_SET_WATCH_REGS 0xd1 \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/reg.h b/lib/libc/include/mipsel-linux-musl/bits/reg.h deleted file mode 100644 index 945e565c44..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/reg.h +++ /dev/null @@ -1,47 +0,0 @@ -#undef __WORDSIZE -#define __WORDSIZE 32 - -#define EF_R0 6 -#define EF_R1 7 -#define EF_R2 8 -#define EF_R3 9 -#define EF_R4 10 -#define EF_R5 11 -#define EF_R6 12 -#define EF_R7 13 -#define EF_R8 14 -#define EF_R9 15 -#define EF_R10 16 -#define EF_R11 17 -#define EF_R12 18 -#define EF_R13 19 -#define EF_R14 20 -#define EF_R15 21 -#define EF_R16 22 -#define EF_R17 23 -#define EF_R18 24 -#define EF_R19 25 -#define EF_R20 26 -#define EF_R21 27 -#define EF_R22 28 -#define EF_R23 29 -#define EF_R24 30 -#define EF_R25 31 - -#define EF_R26 32 -#define EF_R27 33 -#define EF_R28 34 -#define EF_R29 35 -#define EF_R30 36 -#define EF_R31 37 - -#define EF_LO 38 -#define EF_HI 39 - -#define EF_CP0_EPC 40 -#define EF_CP0_BADVADDR 41 -#define EF_CP0_STATUS 42 -#define EF_CP0_CAUSE 43 -#define EF_UNUSED0 44 - -#define EF_SIZE 180 \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/resource.h b/lib/libc/include/mipsel-linux-musl/bits/resource.h deleted file mode 100644 index ef7ada7cb1..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/resource.h +++ /dev/null @@ -1,5 +0,0 @@ -#define RLIMIT_NOFILE 5 -#define RLIMIT_AS 6 -#define RLIMIT_RSS 7 -#define RLIMIT_NPROC 8 -#define RLIMIT_MEMLOCK 9 \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/sem.h b/lib/libc/include/mipsel-linux-musl/bits/sem.h deleted file mode 100644 index bf8e59f52e..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/sem.h +++ /dev/null @@ -1,14 +0,0 @@ -struct semid_ds { - struct ipc_perm sem_perm; - time_t sem_otime; - time_t sem_ctime; -#if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned short sem_nsems; - char __sem_nsems_pad[sizeof(time_t)-sizeof(short)]; -#else - char __sem_nsems_pad[sizeof(time_t)-sizeof(short)]; - unsigned short sem_nsems; -#endif - time_t __unused3; - time_t __unused4; -}; \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/setjmp.h b/lib/libc/include/mipsel-linux-musl/bits/setjmp.h deleted file mode 100644 index 7bee131807..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/setjmp.h +++ /dev/null @@ -1 +0,0 @@ -typedef unsigned long long __jmp_buf[13]; \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/signal.h b/lib/libc/include/mipsel-linux-musl/bits/signal.h deleted file mode 100644 index 8a7d5852ed..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/signal.h +++ /dev/null @@ -1,120 +0,0 @@ -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) - -#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define MINSIGSTKSZ 2048 -#define SIGSTKSZ 8192 -#endif - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -typedef unsigned long long greg_t, gregset_t[32]; -typedef struct { - union { - double fp_dregs[32]; - struct { - float _fp_fregs; - unsigned _fp_pad; - } fp_fregs[32]; - } fp_r; -} fpregset_t; -struct sigcontext { - unsigned sc_regmask, sc_status; - unsigned long long sc_pc, sc_regs[32], sc_fpregs[32]; - unsigned sc_ownedfp, sc_fpc_csr, sc_fpc_eir, sc_used_math, sc_dsp; - unsigned long long sc_mdhi, sc_mdlo; - unsigned long sc_hi1, sc_lo1, sc_hi2, sc_lo2, sc_hi3, sc_lo3; -}; -typedef struct { - unsigned regmask, status; - unsigned long long pc, gregs[32], fpregs[32]; - unsigned ownedfp, fpc_csr, fpc_eir, used_math, dsp; - unsigned long long mdhi, mdlo; - unsigned long hi1, lo1, hi2, lo2, hi3, lo3; -} mcontext_t; -#else -typedef struct { - unsigned __mc1[2]; - unsigned long long __mc2[65]; - unsigned __mc3[5]; - unsigned long long __mc4[2]; - unsigned __mc5[6]; -} mcontext_t; -#endif - -struct sigaltstack { - void *ss_sp; - size_t ss_size; - int ss_flags; -}; - -typedef struct __ucontext { - unsigned long uc_flags; - struct __ucontext *uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - sigset_t uc_sigmask; -} ucontext_t; - -#define SA_NOCLDSTOP 1 -#define SA_NOCLDWAIT 0x10000 -#define SA_SIGINFO 8 -#define SA_ONSTACK 0x08000000 -#define SA_RESTART 0x10000000 -#define SA_NODEFER 0x40000000 -#define SA_RESETHAND 0x80000000 -#define SA_RESTORER 0x04000000 - -#undef SIG_BLOCK -#undef SIG_UNBLOCK -#undef SIG_SETMASK -#define SIG_BLOCK 1 -#define SIG_UNBLOCK 2 -#define SIG_SETMASK 3 - -#undef SI_ASYNCIO -#undef SI_MESGQ -#undef SI_TIMER -#define SI_ASYNCIO (-2) -#define SI_MESGQ (-4) -#define SI_TIMER (-3) - -#define __SI_SWAP_ERRNO_CODE - -#endif - -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGIOT SIGABRT -#define SIGSTKFLT 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGBUS 10 -#define SIGSEGV 11 -#define SIGSYS 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGUSR1 16 -#define SIGUSR2 17 -#define SIGCHLD 18 -#define SIGPWR 19 -#define SIGWINCH 20 -#define SIGURG 21 -#define SIGIO 22 -#define SIGPOLL SIGIO -#define SIGSTOP 23 -#define SIGTSTP 24 -#define SIGCONT 25 -#define SIGTTIN 26 -#define SIGTTOU 27 -#define SIGVTALRM 28 -#define SIGPROF 29 -#define SIGXCPU 30 -#define SIGXFSZ 31 -#define SIGUNUSED SIGSYS - -#define _NSIG 128 \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/socket.h b/lib/libc/include/mipsel-linux-musl/bits/socket.h deleted file mode 100644 index dd4c03b7f6..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/socket.h +++ /dev/null @@ -1,53 +0,0 @@ -struct msghdr { - void *msg_name; - socklen_t msg_namelen; - struct iovec *msg_iov; - int msg_iovlen; - void *msg_control; - socklen_t msg_controllen; - int msg_flags; -}; - -struct cmsghdr { - socklen_t cmsg_len; - int cmsg_level; - int cmsg_type; -}; - -#define SOCK_STREAM 2 -#define SOCK_DGRAM 1 - -#define SOL_SOCKET 65535 - -#define SO_DEBUG 1 - -#define SO_REUSEADDR 0x0004 -#define SO_KEEPALIVE 0x0008 -#define SO_DONTROUTE 0x0010 -#define SO_BROADCAST 0x0020 -#define SO_LINGER 0x0080 -#define SO_OOBINLINE 0x0100 -#define SO_REUSEPORT 0x0200 -#define SO_SNDBUF 0x1001 -#define SO_RCVBUF 0x1002 -#define SO_SNDLOWAT 0x1003 -#define SO_RCVLOWAT 0x1004 -#define SO_RCVTIMEO 0x1006 -#define SO_SNDTIMEO 0x1005 -#define SO_ERROR 0x1007 -#define SO_TYPE 0x1008 -#define SO_ACCEPTCONN 0x1009 -#define SO_PROTOCOL 0x1028 -#define SO_DOMAIN 0x1029 - -#define SO_NO_CHECK 11 -#define SO_PRIORITY 12 -#define SO_BSDCOMPAT 14 -#define SO_PASSCRED 17 -#define SO_PEERCRED 18 -#define SO_PEERSEC 30 -#define SO_SNDBUFFORCE 31 -#define SO_RCVBUFFORCE 33 - -#define SOCK_NONBLOCK 0200 -#define SOCK_CLOEXEC 02000000 \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/stat.h b/lib/libc/include/mipsel-linux-musl/bits/stat.h deleted file mode 100644 index 5e9d7ce475..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/stat.h +++ /dev/null @@ -1,22 +0,0 @@ -/* copied from kernel definition, but with padding replaced - * by the corresponding correctly-sized userspace types. */ - -struct stat { - dev_t st_dev; - long __st_padding1[2]; - ino_t st_ino; - mode_t st_mode; - nlink_t st_nlink; - uid_t st_uid; - gid_t st_gid; - dev_t st_rdev; - long __st_padding2[2]; - off_t st_size; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; - blksize_t st_blksize; - long __st_padding3; - blkcnt_t st_blocks; - long __st_padding4[14]; -}; \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/statfs.h b/lib/libc/include/mipsel-linux-musl/bits/statfs.h deleted file mode 100644 index 8fdd34ef66..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/statfs.h +++ /dev/null @@ -1,8 +0,0 @@ -struct statfs { - unsigned long f_type, f_bsize, f_frsize; - fsblkcnt_t f_blocks, f_bfree; - fsfilcnt_t f_files, f_ffree; - fsblkcnt_t f_bavail; - fsid_t f_fsid; - unsigned long f_namelen, f_flags, f_spare[5]; -}; \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/stdint.h b/lib/libc/include/mipsel-linux-musl/bits/stdint.h deleted file mode 100644 index b70a87dc9d..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/stdint.h +++ /dev/null @@ -1,20 +0,0 @@ -typedef int32_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef uint32_t uint_fast16_t; -typedef uint32_t uint_fast32_t; - -#define INT_FAST16_MIN INT32_MIN -#define INT_FAST32_MIN INT32_MIN - -#define INT_FAST16_MAX INT32_MAX -#define INT_FAST32_MAX INT32_MAX - -#define UINT_FAST16_MAX UINT32_MAX -#define UINT_FAST32_MAX UINT32_MAX - -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX -#define PTRDIFF_MIN INT32_MIN -#define PTRDIFF_MAX INT32_MAX -#define SIZE_MAX UINT32_MAX \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/syscall.h b/lib/libc/include/mipsel-linux-musl/bits/syscall.h deleted file mode 100644 index cfcc2092b1..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/syscall.h +++ /dev/null @@ -1,737 +0,0 @@ -#define __NR_syscall 4000 -#define __NR_exit 4001 -#define __NR_fork 4002 -#define __NR_read 4003 -#define __NR_write 4004 -#define __NR_open 4005 -#define __NR_close 4006 -#define __NR_waitpid 4007 -#define __NR_creat 4008 -#define __NR_link 4009 -#define __NR_unlink 4010 -#define __NR_execve 4011 -#define __NR_chdir 4012 -#define __NR_time 4013 -#define __NR_mknod 4014 -#define __NR_chmod 4015 -#define __NR_lchown 4016 -#define __NR_break 4017 -#define __NR_unused18 4018 -#define __NR_lseek 4019 -#define __NR_getpid 4020 -#define __NR_mount 4021 -#define __NR_umount 4022 -#define __NR_setuid 4023 -#define __NR_getuid 4024 -#define __NR_stime 4025 -#define __NR_ptrace 4026 -#define __NR_alarm 4027 -#define __NR_unused28 4028 -#define __NR_pause 4029 -#define __NR_utime 4030 -#define __NR_stty 4031 -#define __NR_gtty 4032 -#define __NR_access 4033 -#define __NR_nice 4034 -#define __NR_ftime 4035 -#define __NR_sync 4036 -#define __NR_kill 4037 -#define __NR_rename 4038 -#define __NR_mkdir 4039 -#define __NR_rmdir 4040 -#define __NR_dup 4041 -#define __NR_pipe 4042 -#define __NR_times 4043 -#define __NR_prof 4044 -#define __NR_brk 4045 -#define __NR_setgid 4046 -#define __NR_getgid 4047 -#define __NR_signal 4048 -#define __NR_geteuid 4049 -#define __NR_getegid 4050 -#define __NR_acct 4051 -#define __NR_umount2 4052 -#define __NR_lock 4053 -#define __NR_ioctl 4054 -#define __NR_fcntl 4055 -#define __NR_mpx 4056 -#define __NR_setpgid 4057 -#define __NR_ulimit 4058 -#define __NR_unused59 4059 -#define __NR_umask 4060 -#define __NR_chroot 4061 -#define __NR_ustat 4062 -#define __NR_dup2 4063 -#define __NR_getppid 4064 -#define __NR_getpgrp 4065 -#define __NR_setsid 4066 -#define __NR_sigaction 4067 -#define __NR_sgetmask 4068 -#define __NR_ssetmask 4069 -#define __NR_setreuid 4070 -#define __NR_setregid 4071 -#define __NR_sigsuspend 4072 -#define __NR_sigpending 4073 -#define __NR_sethostname 4074 -#define __NR_setrlimit 4075 -#define __NR_getrlimit 4076 -#define __NR_getrusage 4077 -#define __NR_gettimeofday 4078 -#define __NR_settimeofday 4079 -#define __NR_getgroups 4080 -#define __NR_setgroups 4081 -#define __NR_reserved82 4082 -#define __NR_symlink 4083 -#define __NR_unused84 4084 -#define __NR_readlink 4085 -#define __NR_uselib 4086 -#define __NR_swapon 4087 -#define __NR_reboot 4088 -#define __NR_readdir 4089 -#define __NR_mmap 4090 -#define __NR_munmap 4091 -#define __NR_truncate 4092 -#define __NR_ftruncate 4093 -#define __NR_fchmod 4094 -#define __NR_fchown 4095 -#define __NR_getpriority 4096 -#define __NR_setpriority 4097 -#define __NR_profil 4098 -#define __NR_statfs 4099 -#define __NR_fstatfs 4100 -#define __NR_ioperm 4101 -#define __NR_socketcall 4102 -#define __NR_syslog 4103 -#define __NR_setitimer 4104 -#define __NR_getitimer 4105 -#define __NR_stat 4106 -#define __NR_lstat 4107 -#define __NR_fstat 4108 -#define __NR_unused109 4109 -#define __NR_iopl 4110 -#define __NR_vhangup 4111 -#define __NR_idle 4112 -#define __NR_vm86 4113 -#define __NR_wait4 4114 -#define __NR_swapoff 4115 -#define __NR_sysinfo 4116 -#define __NR_ipc 4117 -#define __NR_fsync 4118 -#define __NR_sigreturn 4119 -#define __NR_clone 4120 -#define __NR_setdomainname 4121 -#define __NR_uname 4122 -#define __NR_modify_ldt 4123 -#define __NR_adjtimex 4124 -#define __NR_mprotect 4125 -#define __NR_sigprocmask 4126 -#define __NR_create_module 4127 -#define __NR_init_module 4128 -#define __NR_delete_module 4129 -#define __NR_get_kernel_syms 4130 -#define __NR_quotactl 4131 -#define __NR_getpgid 4132 -#define __NR_fchdir 4133 -#define __NR_bdflush 4134 -#define __NR_sysfs 4135 -#define __NR_personality 4136 -#define __NR_afs_syscall 4137 -#define __NR_setfsuid 4138 -#define __NR_setfsgid 4139 -#define __NR__llseek 4140 -#define __NR_getdents 4141 -#define __NR__newselect 4142 -#define __NR_flock 4143 -#define __NR_msync 4144 -#define __NR_readv 4145 -#define __NR_writev 4146 -#define __NR_cacheflush 4147 -#define __NR_cachectl 4148 -#define __NR_sysmips 4149 -#define __NR_unused150 4150 -#define __NR_getsid 4151 -#define __NR_fdatasync 4152 -#define __NR__sysctl 4153 -#define __NR_mlock 4154 -#define __NR_munlock 4155 -#define __NR_mlockall 4156 -#define __NR_munlockall 4157 -#define __NR_sched_setparam 4158 -#define __NR_sched_getparam 4159 -#define __NR_sched_setscheduler 4160 -#define __NR_sched_getscheduler 4161 -#define __NR_sched_yield 4162 -#define __NR_sched_get_priority_max 4163 -#define __NR_sched_get_priority_min 4164 -#define __NR_sched_rr_get_interval 4165 -#define __NR_nanosleep 4166 -#define __NR_mremap 4167 -#define __NR_accept 4168 -#define __NR_bind 4169 -#define __NR_connect 4170 -#define __NR_getpeername 4171 -#define __NR_getsockname 4172 -#define __NR_getsockopt 4173 -#define __NR_listen 4174 -#define __NR_recv 4175 -#define __NR_recvfrom 4176 -#define __NR_recvmsg 4177 -#define __NR_send 4178 -#define __NR_sendmsg 4179 -#define __NR_sendto 4180 -#define __NR_setsockopt 4181 -#define __NR_shutdown 4182 -#define __NR_socket 4183 -#define __NR_socketpair 4184 -#define __NR_setresuid 4185 -#define __NR_getresuid 4186 -#define __NR_query_module 4187 -#define __NR_poll 4188 -#define __NR_nfsservctl 4189 -#define __NR_setresgid 4190 -#define __NR_getresgid 4191 -#define __NR_prctl 4192 -#define __NR_rt_sigreturn 4193 -#define __NR_rt_sigaction 4194 -#define __NR_rt_sigprocmask 4195 -#define __NR_rt_sigpending 4196 -#define __NR_rt_sigtimedwait 4197 -#define __NR_rt_sigqueueinfo 4198 -#define __NR_rt_sigsuspend 4199 -#define __NR_pread64 4200 -#define __NR_pwrite64 4201 -#define __NR_chown 4202 -#define __NR_getcwd 4203 -#define __NR_capget 4204 -#define __NR_capset 4205 -#define __NR_sigaltstack 4206 -#define __NR_sendfile 4207 -#define __NR_getpmsg 4208 -#define __NR_putpmsg 4209 -#define __NR_mmap2 4210 -#define __NR_truncate64 4211 -#define __NR_ftruncate64 4212 -#define __NR_stat64 4213 -#define __NR_lstat64 4214 -#define __NR_fstat64 4215 -#define __NR_pivot_root 4216 -#define __NR_mincore 4217 -#define __NR_madvise 4218 -#define __NR_getdents64 4219 -#define __NR_fcntl64 4220 -#define __NR_reserved221 4221 -#define __NR_gettid 4222 -#define __NR_readahead 4223 -#define __NR_setxattr 4224 -#define __NR_lsetxattr 4225 -#define __NR_fsetxattr 4226 -#define __NR_getxattr 4227 -#define __NR_lgetxattr 4228 -#define __NR_fgetxattr 4229 -#define __NR_listxattr 4230 -#define __NR_llistxattr 4231 -#define __NR_flistxattr 4232 -#define __NR_removexattr 4233 -#define __NR_lremovexattr 4234 -#define __NR_fremovexattr 4235 -#define __NR_tkill 4236 -#define __NR_sendfile64 4237 -#define __NR_futex 4238 -#define __NR_sched_setaffinity 4239 -#define __NR_sched_getaffinity 4240 -#define __NR_io_setup 4241 -#define __NR_io_destroy 4242 -#define __NR_io_getevents 4243 -#define __NR_io_submit 4244 -#define __NR_io_cancel 4245 -#define __NR_exit_group 4246 -#define __NR_lookup_dcookie 4247 -#define __NR_epoll_create 4248 -#define __NR_epoll_ctl 4249 -#define __NR_epoll_wait 4250 -#define __NR_remap_file_pages 4251 -#define __NR_set_tid_address 4252 -#define __NR_restart_syscall 4253 -#define __NR_fadvise64 4254 -#define __NR_statfs64 4255 -#define __NR_fstatfs64 4256 -#define __NR_timer_create 4257 -#define __NR_timer_settime 4258 -#define __NR_timer_gettime 4259 -#define __NR_timer_getoverrun 4260 -#define __NR_timer_delete 4261 -#define __NR_clock_settime 4262 -#define __NR_clock_gettime 4263 -#define __NR_clock_getres 4264 -#define __NR_clock_nanosleep 4265 -#define __NR_tgkill 4266 -#define __NR_utimes 4267 -#define __NR_mbind 4268 -#define __NR_get_mempolicy 4269 -#define __NR_set_mempolicy 4270 -#define __NR_mq_open 4271 -#define __NR_mq_unlink 4272 -#define __NR_mq_timedsend 4273 -#define __NR_mq_timedreceive 4274 -#define __NR_mq_notify 4275 -#define __NR_mq_getsetattr 4276 -#define __NR_vserver 4277 -#define __NR_waitid 4278 -#define __NR_add_key 4280 -#define __NR_request_key 4281 -#define __NR_keyctl 4282 -#define __NR_set_thread_area 4283 -#define __NR_inotify_init 4284 -#define __NR_inotify_add_watch 4285 -#define __NR_inotify_rm_watch 4286 -#define __NR_migrate_pages 4287 -#define __NR_openat 4288 -#define __NR_mkdirat 4289 -#define __NR_mknodat 4290 -#define __NR_fchownat 4291 -#define __NR_futimesat 4292 -#define __NR_fstatat64 4293 -#define __NR_unlinkat 4294 -#define __NR_renameat 4295 -#define __NR_linkat 4296 -#define __NR_symlinkat 4297 -#define __NR_readlinkat 4298 -#define __NR_fchmodat 4299 -#define __NR_faccessat 4300 -#define __NR_pselect6 4301 -#define __NR_ppoll 4302 -#define __NR_unshare 4303 -#define __NR_splice 4304 -#define __NR_sync_file_range 4305 -#define __NR_tee 4306 -#define __NR_vmsplice 4307 -#define __NR_move_pages 4308 -#define __NR_set_robust_list 4309 -#define __NR_get_robust_list 4310 -#define __NR_kexec_load 4311 -#define __NR_getcpu 4312 -#define __NR_epoll_pwait 4313 -#define __NR_ioprio_set 4314 -#define __NR_ioprio_get 4315 -#define __NR_utimensat 4316 -#define __NR_signalfd 4317 -#define __NR_timerfd 4318 -#define __NR_eventfd 4319 -#define __NR_fallocate 4320 -#define __NR_timerfd_create 4321 -#define __NR_timerfd_gettime 4322 -#define __NR_timerfd_settime 4323 -#define __NR_signalfd4 4324 -#define __NR_eventfd2 4325 -#define __NR_epoll_create1 4326 -#define __NR_dup3 4327 -#define __NR_pipe2 4328 -#define __NR_inotify_init1 4329 -#define __NR_preadv 4330 -#define __NR_pwritev 4331 -#define __NR_rt_tgsigqueueinfo 4332 -#define __NR_perf_event_open 4333 -#define __NR_accept4 4334 -#define __NR_recvmmsg 4335 -#define __NR_fanotify_init 4336 -#define __NR_fanotify_mark 4337 -#define __NR_prlimit64 4338 -#define __NR_name_to_handle_at 4339 -#define __NR_open_by_handle_at 4340 -#define __NR_clock_adjtime 4341 -#define __NR_syncfs 4342 -#define __NR_sendmmsg 4343 -#define __NR_setns 4344 -#define __NR_process_vm_readv 4345 -#define __NR_process_vm_writev 4346 -#define __NR_kcmp 4347 -#define __NR_finit_module 4348 -#define __NR_sched_setattr 4349 -#define __NR_sched_getattr 4350 -#define __NR_renameat2 4351 -#define __NR_seccomp 4352 -#define __NR_getrandom 4353 -#define __NR_memfd_create 4354 -#define __NR_bpf 4355 -#define __NR_execveat 4356 -#define __NR_userfaultfd 4357 -#define __NR_membarrier 4358 -#define __NR_mlock2 4359 -#define __NR_copy_file_range 4360 -#define __NR_preadv2 4361 -#define __NR_pwritev2 4362 -#define __NR_pkey_mprotect 4363 -#define __NR_pkey_alloc 4364 -#define __NR_pkey_free 4365 -#define __NR_statx 4366 -#define __NR_rseq 4367 -#define __NR_io_pgetevents 4368 - -#define SYS_syscall 4000 -#define SYS_exit 4001 -#define SYS_fork 4002 -#define SYS_read 4003 -#define SYS_write 4004 -#define SYS_open 4005 -#define SYS_close 4006 -#define SYS_waitpid 4007 -#define SYS_creat 4008 -#define SYS_link 4009 -#define SYS_unlink 4010 -#define SYS_execve 4011 -#define SYS_chdir 4012 -#define SYS_time 4013 -#define SYS_mknod 4014 -#define SYS_chmod 4015 -#define SYS_lchown 4016 -#define SYS_break 4017 -#define SYS_unused18 4018 -#define SYS_lseek 4019 -#define SYS_getpid 4020 -#define SYS_mount 4021 -#define SYS_umount 4022 -#define SYS_setuid 4023 -#define SYS_getuid 4024 -#define SYS_stime 4025 -#define SYS_ptrace 4026 -#define SYS_alarm 4027 -#define SYS_unused28 4028 -#define SYS_pause 4029 -#define SYS_utime 4030 -#define SYS_stty 4031 -#define SYS_gtty 4032 -#define SYS_access 4033 -#define SYS_nice 4034 -#define SYS_ftime 4035 -#define SYS_sync 4036 -#define SYS_kill 4037 -#define SYS_rename 4038 -#define SYS_mkdir 4039 -#define SYS_rmdir 4040 -#define SYS_dup 4041 -#define SYS_pipe 4042 -#define SYS_times 4043 -#define SYS_prof 4044 -#define SYS_brk 4045 -#define SYS_setgid 4046 -#define SYS_getgid 4047 -#define SYS_signal 4048 -#define SYS_geteuid 4049 -#define SYS_getegid 4050 -#define SYS_acct 4051 -#define SYS_umount2 4052 -#define SYS_lock 4053 -#define SYS_ioctl 4054 -#define SYS_fcntl 4055 -#define SYS_mpx 4056 -#define SYS_setpgid 4057 -#define SYS_ulimit 4058 -#define SYS_unused59 4059 -#define SYS_umask 4060 -#define SYS_chroot 4061 -#define SYS_ustat 4062 -#define SYS_dup2 4063 -#define SYS_getppid 4064 -#define SYS_getpgrp 4065 -#define SYS_setsid 4066 -#define SYS_sigaction 4067 -#define SYS_sgetmask 4068 -#define SYS_ssetmask 4069 -#define SYS_setreuid 4070 -#define SYS_setregid 4071 -#define SYS_sigsuspend 4072 -#define SYS_sigpending 4073 -#define SYS_sethostname 4074 -#define SYS_setrlimit 4075 -#define SYS_getrlimit 4076 -#define SYS_getrusage 4077 -#define SYS_gettimeofday 4078 -#define SYS_settimeofday 4079 -#define SYS_getgroups 4080 -#define SYS_setgroups 4081 -#define SYS_reserved82 4082 -#define SYS_symlink 4083 -#define SYS_unused84 4084 -#define SYS_readlink 4085 -#define SYS_uselib 4086 -#define SYS_swapon 4087 -#define SYS_reboot 4088 -#define SYS_readdir 4089 -#define SYS_mmap 4090 -#define SYS_munmap 4091 -#define SYS_truncate 4092 -#define SYS_ftruncate 4093 -#define SYS_fchmod 4094 -#define SYS_fchown 4095 -#define SYS_getpriority 4096 -#define SYS_setpriority 4097 -#define SYS_profil 4098 -#define SYS_statfs 4099 -#define SYS_fstatfs 4100 -#define SYS_ioperm 4101 -#define SYS_socketcall 4102 -#define SYS_syslog 4103 -#define SYS_setitimer 4104 -#define SYS_getitimer 4105 -#define SYS_stat 4106 -#define SYS_lstat 4107 -#define SYS_fstat 4108 -#define SYS_unused109 4109 -#define SYS_iopl 4110 -#define SYS_vhangup 4111 -#define SYS_idle 4112 -#define SYS_vm86 4113 -#define SYS_wait4 4114 -#define SYS_swapoff 4115 -#define SYS_sysinfo 4116 -#define SYS_ipc 4117 -#define SYS_fsync 4118 -#define SYS_sigreturn 4119 -#define SYS_clone 4120 -#define SYS_setdomainname 4121 -#define SYS_uname 4122 -#define SYS_modify_ldt 4123 -#define SYS_adjtimex 4124 -#define SYS_mprotect 4125 -#define SYS_sigprocmask 4126 -#define SYS_create_module 4127 -#define SYS_init_module 4128 -#define SYS_delete_module 4129 -#define SYS_get_kernel_syms 4130 -#define SYS_quotactl 4131 -#define SYS_getpgid 4132 -#define SYS_fchdir 4133 -#define SYS_bdflush 4134 -#define SYS_sysfs 4135 -#define SYS_personality 4136 -#define SYS_afs_syscall 4137 -#define SYS_setfsuid 4138 -#define SYS_setfsgid 4139 -#define SYS__llseek 4140 -#define SYS_getdents 4141 -#define SYS__newselect 4142 -#define SYS_flock 4143 -#define SYS_msync 4144 -#define SYS_readv 4145 -#define SYS_writev 4146 -#define SYS_cacheflush 4147 -#define SYS_cachectl 4148 -#define SYS_sysmips 4149 -#define SYS_unused150 4150 -#define SYS_getsid 4151 -#define SYS_fdatasync 4152 -#define SYS__sysctl 4153 -#define SYS_mlock 4154 -#define SYS_munlock 4155 -#define SYS_mlockall 4156 -#define SYS_munlockall 4157 -#define SYS_sched_setparam 4158 -#define SYS_sched_getparam 4159 -#define SYS_sched_setscheduler 4160 -#define SYS_sched_getscheduler 4161 -#define SYS_sched_yield 4162 -#define SYS_sched_get_priority_max 4163 -#define SYS_sched_get_priority_min 4164 -#define SYS_sched_rr_get_interval 4165 -#define SYS_nanosleep 4166 -#define SYS_mremap 4167 -#define SYS_accept 4168 -#define SYS_bind 4169 -#define SYS_connect 4170 -#define SYS_getpeername 4171 -#define SYS_getsockname 4172 -#define SYS_getsockopt 4173 -#define SYS_listen 4174 -#define SYS_recv 4175 -#define SYS_recvfrom 4176 -#define SYS_recvmsg 4177 -#define SYS_send 4178 -#define SYS_sendmsg 4179 -#define SYS_sendto 4180 -#define SYS_setsockopt 4181 -#define SYS_shutdown 4182 -#define SYS_socket 4183 -#define SYS_socketpair 4184 -#define SYS_setresuid 4185 -#define SYS_getresuid 4186 -#define SYS_query_module 4187 -#define SYS_poll 4188 -#define SYS_nfsservctl 4189 -#define SYS_setresgid 4190 -#define SYS_getresgid 4191 -#define SYS_prctl 4192 -#define SYS_rt_sigreturn 4193 -#define SYS_rt_sigaction 4194 -#define SYS_rt_sigprocmask 4195 -#define SYS_rt_sigpending 4196 -#define SYS_rt_sigtimedwait 4197 -#define SYS_rt_sigqueueinfo 4198 -#define SYS_rt_sigsuspend 4199 -#define SYS_pread64 4200 -#define SYS_pwrite64 4201 -#define SYS_chown 4202 -#define SYS_getcwd 4203 -#define SYS_capget 4204 -#define SYS_capset 4205 -#define SYS_sigaltstack 4206 -#define SYS_sendfile 4207 -#define SYS_getpmsg 4208 -#define SYS_putpmsg 4209 -#define SYS_mmap2 4210 -#define SYS_truncate64 4211 -#define SYS_ftruncate64 4212 -#define SYS_stat64 4213 -#define SYS_lstat64 4214 -#define SYS_fstat64 4215 -#define SYS_pivot_root 4216 -#define SYS_mincore 4217 -#define SYS_madvise 4218 -#define SYS_getdents64 4219 -#define SYS_fcntl64 4220 -#define SYS_reserved221 4221 -#define SYS_gettid 4222 -#define SYS_readahead 4223 -#define SYS_setxattr 4224 -#define SYS_lsetxattr 4225 -#define SYS_fsetxattr 4226 -#define SYS_getxattr 4227 -#define SYS_lgetxattr 4228 -#define SYS_fgetxattr 4229 -#define SYS_listxattr 4230 -#define SYS_llistxattr 4231 -#define SYS_flistxattr 4232 -#define SYS_removexattr 4233 -#define SYS_lremovexattr 4234 -#define SYS_fremovexattr 4235 -#define SYS_tkill 4236 -#define SYS_sendfile64 4237 -#define SYS_futex 4238 -#define SYS_sched_setaffinity 4239 -#define SYS_sched_getaffinity 4240 -#define SYS_io_setup 4241 -#define SYS_io_destroy 4242 -#define SYS_io_getevents 4243 -#define SYS_io_submit 4244 -#define SYS_io_cancel 4245 -#define SYS_exit_group 4246 -#define SYS_lookup_dcookie 4247 -#define SYS_epoll_create 4248 -#define SYS_epoll_ctl 4249 -#define SYS_epoll_wait 4250 -#define SYS_remap_file_pages 4251 -#define SYS_set_tid_address 4252 -#define SYS_restart_syscall 4253 -#define SYS_fadvise64 4254 -#define SYS_statfs64 4255 -#define SYS_fstatfs64 4256 -#define SYS_timer_create 4257 -#define SYS_timer_settime 4258 -#define SYS_timer_gettime 4259 -#define SYS_timer_getoverrun 4260 -#define SYS_timer_delete 4261 -#define SYS_clock_settime 4262 -#define SYS_clock_gettime 4263 -#define SYS_clock_getres 4264 -#define SYS_clock_nanosleep 4265 -#define SYS_tgkill 4266 -#define SYS_utimes 4267 -#define SYS_mbind 4268 -#define SYS_get_mempolicy 4269 -#define SYS_set_mempolicy 4270 -#define SYS_mq_open 4271 -#define SYS_mq_unlink 4272 -#define SYS_mq_timedsend 4273 -#define SYS_mq_timedreceive 4274 -#define SYS_mq_notify 4275 -#define SYS_mq_getsetattr 4276 -#define SYS_vserver 4277 -#define SYS_waitid 4278 -#define SYS_add_key 4280 -#define SYS_request_key 4281 -#define SYS_keyctl 4282 -#define SYS_set_thread_area 4283 -#define SYS_inotify_init 4284 -#define SYS_inotify_add_watch 4285 -#define SYS_inotify_rm_watch 4286 -#define SYS_migrate_pages 4287 -#define SYS_openat 4288 -#define SYS_mkdirat 4289 -#define SYS_mknodat 4290 -#define SYS_fchownat 4291 -#define SYS_futimesat 4292 -#define SYS_fstatat64 4293 -#define SYS_unlinkat 4294 -#define SYS_renameat 4295 -#define SYS_linkat 4296 -#define SYS_symlinkat 4297 -#define SYS_readlinkat 4298 -#define SYS_fchmodat 4299 -#define SYS_faccessat 4300 -#define SYS_pselect6 4301 -#define SYS_ppoll 4302 -#define SYS_unshare 4303 -#define SYS_splice 4304 -#define SYS_sync_file_range 4305 -#define SYS_tee 4306 -#define SYS_vmsplice 4307 -#define SYS_move_pages 4308 -#define SYS_set_robust_list 4309 -#define SYS_get_robust_list 4310 -#define SYS_kexec_load 4311 -#define SYS_getcpu 4312 -#define SYS_epoll_pwait 4313 -#define SYS_ioprio_set 4314 -#define SYS_ioprio_get 4315 -#define SYS_utimensat 4316 -#define SYS_signalfd 4317 -#define SYS_timerfd 4318 -#define SYS_eventfd 4319 -#define SYS_fallocate 4320 -#define SYS_timerfd_create 4321 -#define SYS_timerfd_gettime 4322 -#define SYS_timerfd_settime 4323 -#define SYS_signalfd4 4324 -#define SYS_eventfd2 4325 -#define SYS_epoll_create1 4326 -#define SYS_dup3 4327 -#define SYS_pipe2 4328 -#define SYS_inotify_init1 4329 -#define SYS_preadv 4330 -#define SYS_pwritev 4331 -#define SYS_rt_tgsigqueueinfo 4332 -#define SYS_perf_event_open 4333 -#define SYS_accept4 4334 -#define SYS_recvmmsg 4335 -#define SYS_fanotify_init 4336 -#define SYS_fanotify_mark 4337 -#define SYS_prlimit64 4338 -#define SYS_name_to_handle_at 4339 -#define SYS_open_by_handle_at 4340 -#define SYS_clock_adjtime 4341 -#define SYS_syncfs 4342 -#define SYS_sendmmsg 4343 -#define SYS_setns 4344 -#define SYS_process_vm_readv 4345 -#define SYS_process_vm_writev 4346 -#define SYS_kcmp 4347 -#define SYS_finit_module 4348 -#define SYS_sched_setattr 4349 -#define SYS_sched_getattr 4350 -#define SYS_renameat2 4351 -#define SYS_seccomp 4352 -#define SYS_getrandom 4353 -#define SYS_memfd_create 4354 -#define SYS_bpf 4355 -#define SYS_execveat 4356 -#define SYS_userfaultfd 4357 -#define SYS_membarrier 4358 -#define SYS_mlock2 4359 -#define SYS_copy_file_range 4360 -#define SYS_preadv2 4361 -#define SYS_pwritev2 4362 -#define SYS_pkey_mprotect 4363 -#define SYS_pkey_alloc 4364 -#define SYS_pkey_free 4365 -#define SYS_statx 4366 -#define SYS_rseq 4367 -#define SYS_io_pgetevents 4368 \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/termios.h b/lib/libc/include/mipsel-linux-musl/bits/termios.h deleted file mode 100644 index 04f10fa6d1..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/termios.h +++ /dev/null @@ -1,169 +0,0 @@ -struct termios { - tcflag_t c_iflag; - tcflag_t c_oflag; - tcflag_t c_cflag; - tcflag_t c_lflag; - cc_t c_line; - cc_t c_cc[NCCS]; - speed_t __c_ispeed; - speed_t __c_ospeed; -}; - -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VMIN 4 -#define VTIME 5 -#define VEOL2 6 -#define VSWTC 7 -#define VSWTCH 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOF 16 -#define VEOL 17 - -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 -#define IUTF8 0040000 - -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE) -#define NLDLY 0000400 -#define NL0 0000000 -#define NL1 0000400 -#define CRDLY 0003000 -#define CR0 0000000 -#define CR1 0001000 -#define CR2 0002000 -#define CR3 0003000 -#define TABDLY 0014000 -#define TAB0 0000000 -#define TAB1 0004000 -#define TAB2 0010000 -#define TAB3 0014000 -#define BSDLY 0020000 -#define BS0 0000000 -#define BS1 0020000 -#define FFDLY 0100000 -#define FF0 0000000 -#define FF1 0100000 -#endif - -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 - -#define B0 0000000 -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 - -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define B500000 0010005 -#define B576000 0010006 -#define B921600 0010007 -#define B1000000 0010010 -#define B1152000 0010011 -#define B1500000 0010012 -#define B2000000 0010013 -#define B2500000 0010014 -#define B3000000 0010015 -#define B3500000 0010016 -#define B4000000 0010017 - -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 - -#define ISIG 0000001 -#define ICANON 0000002 -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define IEXTEN 0000400 -#define TOSTOP 0100000 -#define ITOSTOP 0100000 - -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define EXTA 0000016 -#define EXTB 0000017 -#define CBAUD 0010017 -#define CBAUDEX 0010000 -#define CIBAUD 002003600000 -#define CMSPAR 010000000000 -#define CRTSCTS 020000000000 - -#define XCASE 0000004 -#define ECHOCTL 0001000 -#define ECHOPRT 0002000 -#define ECHOKE 0004000 -#define FLUSHO 0020000 -#define PENDIN 0040000 -#define EXTPROC 0200000 - -#define XTABS 0014000 -#define TIOCSER_TEMT 0x01 -#endif \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-musl/bits/user.h b/lib/libc/include/mipsel-linux-musl/bits/user.h deleted file mode 100644 index a76e81c910..0000000000 --- a/lib/libc/include/mipsel-linux-musl/bits/user.h +++ /dev/null @@ -1,13 +0,0 @@ -struct user { - unsigned long regs[45+64]; - unsigned long u_tsize, u_dsize, u_ssize; - unsigned long start_code, start_data, start_stack; - long signal; - void *u_ar0; - unsigned long magic; - char u_comm[32]; -}; -#define ELF_NGREG 45 -#define ELF_NFPREG 33 -typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; -typedef double elf_fpreg_t, elf_fpregset_t[ELF_NFPREG]; \ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-musl/bfd.h b/lib/libc/include/powerpc-linux-musl/bfd.h deleted file mode 100644 index 73d2dccfe2..0000000000 --- a/lib/libc/include/powerpc-linux-musl/bfd.h +++ /dev/null @@ -1,8034 +0,0 @@ -/* 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-2019 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 32 - -/* The word size of the default bfd target. */ -#define BFD_DEFAULT_TARGET_SIZE 32 - -#define BFD_HOST_64BIT_LONG 0 -#define BFD_HOST_64BIT_LONG_LONG 1 -#if 1 -#define BFD_HOST_64_BIT long long -#define BFD_HOST_U_64_BIT unsigned long 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) - -/* 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; - 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) - -#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 bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#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_get_section_limit_octets(bfd, sec) / 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) - -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 *); - -/* 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_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) - -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); - -#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_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_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 **); -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 int 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 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)); - -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_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -/* 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); - -/* XCOFF support routines for the linker. */ - -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_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -/* 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 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 *); - -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 *); - -struct elf32_arm_params { - char *thumb_entry_symbol; - int byteswap_code; - int target1_is_rel; - char * target2_type; - int fix_v4bx; - int use_blx; - bfd_arm_vfp11_fix vfp11_denorm_fix; - bfd_arm_stm32l4xx_fix stm32l4xx_fix; - int no_enum_size_warning; - int no_wchar_size_warning; - int pic_veneer; - int fix_cortex_a8; - int fix_arm1176; - int merge_exidx_entries; - int cmse_implib; - bfd *in_implib_bfd; -}; - -void bfd_elf32_arm_set_target_params - (bfd *, struct bfd_link_info *, struct elf32_arm_params *); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_keep_private_stub_output_sections - (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 *, 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 - (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 *, - struct bfd_section *, unsigned int), - 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); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -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, int); - -extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, 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 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 - (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 *); -/* 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); - -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); - -/* 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); - -/* MIPS ABI flags data access. For the disassembler. */ -struct elf_internal_abiflags_v0; -extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); - -/* C-SKY functions. */ -extern bfd_boolean elf32_csky_build_stubs - (struct bfd_link_info *); -extern bfd_boolean elf32_csky_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section *(*) (const char*, struct bfd_section*), - void (*) (void)); -extern void elf32_csky_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern int elf32_csky_setup_section_lists - (bfd *, struct bfd_link_info *); -/* 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); - -/* 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) \ - (*(const unsigned char *) (ptr) & 0xff) -#define bfd_get_signed_8(abfd, ptr) \ - (((*(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_vma) 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 - - /* 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; -}; - -/* 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 _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]) - -#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) - -#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)) - -/* 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)) - -#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 - (bfd *abfd, asection *sec, flagword flags); - -void bfd_rename_section - (bfd *abfd, 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 - (bfd *abfd, 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); - -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 - 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_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_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_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. */ -#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_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_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; -} -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 (bfd *abfd); - -unsigned long bfd_get_mach (bfd *abfd); - -unsigned int bfd_arch_bits_per_byte (bfd *abfd); - -unsigned int bfd_arch_bits_per_address (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 (bfd *abfd); - -unsigned int bfd_arch_mach_octets_per_byte - (enum bfd_architecture arch, unsigned long machine); - -/* Extracted from reloc.c. */ - -typedef enum bfd_reloc_status -{ - /* No errors detected. Note - the value 2 is used so that it - will not be mistaken for the boolean TRUE or FALSE values. */ - bfd_reloc_ok = 2, - - /* The relocation was performed, but there was an overflow. */ - bfd_reloc_overflow, - - /* The address to relocate was not within the section supplied. */ - bfd_reloc_outofrange, - - /* Used by special functions. */ - bfd_reloc_continue, - - /* Unsupported relocation size requested. */ - bfd_reloc_notsupported, - - /* 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. */ - 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, - -/* 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_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_HIGHER, - 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, - -/* 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, - -/* 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_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 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, - -/* 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, - -/* 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, - -/* 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 : 20; - - /* 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 - - /* 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 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 - 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; -}; - -/* 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, - 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_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_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. */ - 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_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 *); - - /* 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; - -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 \ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-musl/bfd_stdint.h b/lib/libc/include/powerpc-linux-musl/bfd_stdint.h deleted file mode 100644 index dde4941df3..0000000000 --- a/lib/libc/include/powerpc-linux-musl/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for powerpc-linux-musl-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-musl/bits/alltypes.h b/lib/libc/include/powerpc-linux-musl/bits/alltypes.h deleted file mode 100644 index 26264e16bf..0000000000 --- a/lib/libc/include/powerpc-linux-musl/bits/alltypes.h +++ /dev/null @@ -1,385 +0,0 @@ -#define _Addr int -#define _Int64 long long -#define _Reg int - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef long wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif - -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-musl/bits/ioctl.h b/lib/libc/include/powerpc-linux-musl/bits/ioctl.h index a2e7f3127b..98eff9a7d5 100644 --- a/lib/libc/include/powerpc-linux-musl/bits/ioctl.h +++ b/lib/libc/include/powerpc-linux-musl/bits/ioctl.h @@ -78,14 +78,6 @@ #define TIOCGSERIAL 0x541E #define TIOCSSERIAL 0x541F #define TIOCPKT 0x5420 -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 #define TIOCNOTTY 0x5422 #define TIOCSETD 0x5423 @@ -113,105 +105,16 @@ #define TIOCSLCKTRMIOS 0x5457 #define TIOCSERGSTRUCT 0x5458 #define TIOCSERGETLSR 0x5459 -#define TIOCSER_TEMT 0x01 #define TIOCSERGETMULTI 0x545A #define TIOCSERSETMULTI 0x545B #define TIOCMIWAIT 0x545C #define TIOCGICOUNT 0x545D - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 -#define N_6PACK 7 -#define N_MASC 8 -#define N_R3964 9 -#define N_PROFIBUS_FDL 10 -#define N_IRDA 11 -#define N_SMSBLOCK 12 -#define N_HDLC 13 -#define N_SYNC_PPP 14 -#define N_HCI 15 - #define FIOSETOWN 0x8901 #define SIOCSPGRP 0x8902 #define FIOGETOWN 0x8903 #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 #define SIOCGSTAMP 0x8906 -#define SIOCGSTAMPNS 0x8907 - -#define SIOCADDRT 0x890B -#define SIOCDELRT 0x890C -#define SIOCRTMSG 0x890D - -#define SIOCGIFNAME 0x8910 -#define SIOCSIFLINK 0x8911 -#define SIOCGIFCONF 0x8912 -#define SIOCGIFFLAGS 0x8913 -#define SIOCSIFFLAGS 0x8914 -#define SIOCGIFADDR 0x8915 -#define SIOCSIFADDR 0x8916 -#define SIOCGIFDSTADDR 0x8917 -#define SIOCSIFDSTADDR 0x8918 -#define SIOCGIFBRDADDR 0x8919 -#define SIOCSIFBRDADDR 0x891a -#define SIOCGIFNETMASK 0x891b -#define SIOCSIFNETMASK 0x891c -#define SIOCGIFMETRIC 0x891d -#define SIOCSIFMETRIC 0x891e -#define SIOCGIFMEM 0x891f -#define SIOCSIFMEM 0x8920 -#define SIOCGIFMTU 0x8921 -#define SIOCSIFMTU 0x8922 -#define SIOCSIFNAME 0x8923 -#define SIOCSIFHWADDR 0x8924 -#define SIOCGIFENCAP 0x8925 -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 -#define SIOCGIFSLAVE 0x8929 -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 -#define SIOGIFINDEX SIOCGIFINDEX -#define SIOCSIFPFLAGS 0x8934 -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 -#define SIOCSIFHWBROADCAST 0x8937 -#define SIOCGIFCOUNT 0x8938 - -#define SIOCGIFBR 0x8940 -#define SIOCSIFBR 0x8941 - -#define SIOCGIFTXQLEN 0x8942 -#define SIOCSIFTXQLEN 0x8943 - -#define SIOCDARP 0x8953 -#define SIOCGARP 0x8954 -#define SIOCSARP 0x8955 - -#define SIOCDRARP 0x8960 -#define SIOCGRARP 0x8961 -#define SIOCSRARP 0x8962 - -#define SIOCGIFMAP 0x8970 -#define SIOCSIFMAP 0x8971 - -#define SIOCADDDLCI 0x8980 -#define SIOCDELDLCI 0x8981 - -#define SIOCDEVPRIVATE 0x89F0 -#define SIOCPROTOPRIVATE 0x89E0 \ No newline at end of file +#define SIOCGSTAMPNS 0x8907 \ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-musl/bits/ptrace.h b/lib/libc/include/powerpc-linux-musl/bits/ptrace.h index fcaf79524f..ba4cc8e84e 100644 --- a/lib/libc/include/powerpc-linux-musl/bits/ptrace.h +++ b/lib/libc/include/powerpc-linux-musl/bits/ptrace.h @@ -8,6 +8,8 @@ #define PTRACE_SET_DEBUGREG 0x1a #define PTRACE_GETVSRREGS 0x1b #define PTRACE_SETVSRREGS 0x1c +#define PTRACE_SYSEMU 0x1d +#define PTRACE_SYSEMU_SINGLESTEP 0x1e #define PTRACE_SINGLEBLOCK 0x100 #define PT_GETVRREGS PTRACE_GETVRREGS diff --git a/lib/libc/include/powerpc-linux-musl/bits/syscall.h b/lib/libc/include/powerpc-linux-musl/bits/syscall.h deleted file mode 100644 index e0ddb541f2..0000000000 --- a/lib/libc/include/powerpc-linux-musl/bits/syscall.h +++ /dev/null @@ -1,751 +0,0 @@ -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 -#define __NR_break 17 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_stty 31 -#define __NR_gtty 32 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_ftime 35 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_prof 44 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_lock 53 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_mpx 56 -#define __NR_setpgid 57 -#define __NR_ulimit 58 -#define __NR_oldolduname 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_profil 98 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_ioperm 101 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_olduname 109 -#define __NR_iopl 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_vm86 113 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_modify_ldt 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_query_module 166 -#define __NR_poll 167 -#define __NR_nfsservctl 168 -#define __NR_setresgid 169 -#define __NR_getresgid 170 -#define __NR_prctl 171 -#define __NR_rt_sigreturn 172 -#define __NR_rt_sigaction 173 -#define __NR_rt_sigprocmask 174 -#define __NR_rt_sigpending 175 -#define __NR_rt_sigtimedwait 176 -#define __NR_rt_sigqueueinfo 177 -#define __NR_rt_sigsuspend 178 -#define __NR_pread64 179 -#define __NR_pwrite64 180 -#define __NR_chown 181 -#define __NR_getcwd 182 -#define __NR_capget 183 -#define __NR_capset 184 -#define __NR_sigaltstack 185 -#define __NR_sendfile 186 -#define __NR_getpmsg 187 -#define __NR_putpmsg 188 -#define __NR_vfork 189 -#define __NR_ugetrlimit 190 -#define __NR_readahead 191 -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 -#define __NR_pciconfig_read 198 -#define __NR_pciconfig_write 199 -#define __NR_pciconfig_iobase 200 -#define __NR_multiplexer 201 -#define __NR_getdents64 202 -#define __NR_pivot_root 203 -#define __NR_fcntl64 204 -#define __NR_madvise 205 -#define __NR_mincore 206 -#define __NR_gettid 207 -#define __NR_tkill 208 -#define __NR_setxattr 209 -#define __NR_lsetxattr 210 -#define __NR_fsetxattr 211 -#define __NR_getxattr 212 -#define __NR_lgetxattr 213 -#define __NR_fgetxattr 214 -#define __NR_listxattr 215 -#define __NR_llistxattr 216 -#define __NR_flistxattr 217 -#define __NR_removexattr 218 -#define __NR_lremovexattr 219 -#define __NR_fremovexattr 220 -#define __NR_futex 221 -#define __NR_sched_setaffinity 222 -#define __NR_sched_getaffinity 223 -#define __NR_tuxcall 225 -#define __NR_sendfile64 226 -#define __NR_io_setup 227 -#define __NR_io_destroy 228 -#define __NR_io_getevents 229 -#define __NR_io_submit 230 -#define __NR_io_cancel 231 -#define __NR_set_tid_address 232 -#define __NR_fadvise64 233 -#define __NR_exit_group 234 -#define __NR_lookup_dcookie 235 -#define __NR_epoll_create 236 -#define __NR_epoll_ctl 237 -#define __NR_epoll_wait 238 -#define __NR_remap_file_pages 239 -#define __NR_timer_create 240 -#define __NR_timer_settime 241 -#define __NR_timer_gettime 242 -#define __NR_timer_getoverrun 243 -#define __NR_timer_delete 244 -#define __NR_clock_settime 245 -#define __NR_clock_gettime 246 -#define __NR_clock_getres 247 -#define __NR_clock_nanosleep 248 -#define __NR_swapcontext 249 -#define __NR_tgkill 250 -#define __NR_utimes 251 -#define __NR_statfs64 252 -#define __NR_fstatfs64 253 -#define __NR_fadvise64_64 254 -#define __NR_rtas 255 -#define __NR_sys_debug_setcontext 256 -#define __NR_migrate_pages 258 -#define __NR_mbind 259 -#define __NR_get_mempolicy 260 -#define __NR_set_mempolicy 261 -#define __NR_mq_open 262 -#define __NR_mq_unlink 263 -#define __NR_mq_timedsend 264 -#define __NR_mq_timedreceive 265 -#define __NR_mq_notify 266 -#define __NR_mq_getsetattr 267 -#define __NR_kexec_load 268 -#define __NR_add_key 269 -#define __NR_request_key 270 -#define __NR_keyctl 271 -#define __NR_waitid 272 -#define __NR_ioprio_set 273 -#define __NR_ioprio_get 274 -#define __NR_inotify_init 275 -#define __NR_inotify_add_watch 276 -#define __NR_inotify_rm_watch 277 -#define __NR_spu_run 278 -#define __NR_spu_create 279 -#define __NR_pselect6 280 -#define __NR_ppoll 281 -#define __NR_unshare 282 -#define __NR_splice 283 -#define __NR_tee 284 -#define __NR_vmsplice 285 -#define __NR_openat 286 -#define __NR_mkdirat 287 -#define __NR_mknodat 288 -#define __NR_fchownat 289 -#define __NR_futimesat 290 -#define __NR_fstatat64 291 -#define __NR_unlinkat 292 -#define __NR_renameat 293 -#define __NR_linkat 294 -#define __NR_symlinkat 295 -#define __NR_readlinkat 296 -#define __NR_fchmodat 297 -#define __NR_faccessat 298 -#define __NR_get_robust_list 299 -#define __NR_set_robust_list 300 -#define __NR_move_pages 301 -#define __NR_getcpu 302 -#define __NR_epoll_pwait 303 -#define __NR_utimensat 304 -#define __NR_signalfd 305 -#define __NR_timerfd_create 306 -#define __NR_eventfd 307 -#define __NR_sync_file_range2 308 -#define __NR_fallocate 309 -#define __NR_subpage_prot 310 -#define __NR_timerfd_settime 311 -#define __NR_timerfd_gettime 312 -#define __NR_signalfd4 313 -#define __NR_eventfd2 314 -#define __NR_epoll_create1 315 -#define __NR_dup3 316 -#define __NR_pipe2 317 -#define __NR_inotify_init1 318 -#define __NR_perf_event_open 319 -#define __NR_preadv 320 -#define __NR_pwritev 321 -#define __NR_rt_tgsigqueueinfo 322 -#define __NR_fanotify_init 323 -#define __NR_fanotify_mark 324 -#define __NR_prlimit64 325 -#define __NR_socket 326 -#define __NR_bind 327 -#define __NR_connect 328 -#define __NR_listen 329 -#define __NR_accept 330 -#define __NR_getsockname 331 -#define __NR_getpeername 332 -#define __NR_socketpair 333 -#define __NR_send 334 -#define __NR_sendto 335 -#define __NR_recv 336 -#define __NR_recvfrom 337 -#define __NR_shutdown 338 -#define __NR_setsockopt 339 -#define __NR_getsockopt 340 -#define __NR_sendmsg 341 -#define __NR_recvmsg 342 -#define __NR_recvmmsg 343 -#define __NR_accept4 344 -#define __NR_name_to_handle_at 345 -#define __NR_open_by_handle_at 346 -#define __NR_clock_adjtime 347 -#define __NR_syncfs 348 -#define __NR_sendmmsg 349 -#define __NR_setns 350 -#define __NR_process_vm_readv 351 -#define __NR_process_vm_writev 352 -#define __NR_finit_module 353 -#define __NR_kcmp 354 -#define __NR_sched_setattr 355 -#define __NR_sched_getattr 356 -#define __NR_renameat2 357 -#define __NR_seccomp 358 -#define __NR_getrandom 359 -#define __NR_memfd_create 360 -#define __NR_bpf 361 -#define __NR_execveat 362 -#define __NR_switch_endian 363 -#define __NR_userfaultfd 364 -#define __NR_membarrier 365 -#define __NR_mlock2 378 -#define __NR_copy_file_range 379 -#define __NR_preadv2 380 -#define __NR_pwritev2 381 -#define __NR_kexec_file_load 382 -#define __NR_statx 383 -#define __NR_pkey_alloc 384 -#define __NR_pkey_free 385 -#define __NR_pkey_mprotect 386 -#define __NR_rseq 387 -#define __NR_io_pgetevents 388 - -#define SYS_restart_syscall 0 -#define SYS_exit 1 -#define SYS_fork 2 -#define SYS_read 3 -#define SYS_write 4 -#define SYS_open 5 -#define SYS_close 6 -#define SYS_waitpid 7 -#define SYS_creat 8 -#define SYS_link 9 -#define SYS_unlink 10 -#define SYS_execve 11 -#define SYS_chdir 12 -#define SYS_time 13 -#define SYS_mknod 14 -#define SYS_chmod 15 -#define SYS_lchown 16 -#define SYS_break 17 -#define SYS_oldstat 18 -#define SYS_lseek 19 -#define SYS_getpid 20 -#define SYS_mount 21 -#define SYS_umount 22 -#define SYS_setuid 23 -#define SYS_getuid 24 -#define SYS_stime 25 -#define SYS_ptrace 26 -#define SYS_alarm 27 -#define SYS_oldfstat 28 -#define SYS_pause 29 -#define SYS_utime 30 -#define SYS_stty 31 -#define SYS_gtty 32 -#define SYS_access 33 -#define SYS_nice 34 -#define SYS_ftime 35 -#define SYS_sync 36 -#define SYS_kill 37 -#define SYS_rename 38 -#define SYS_mkdir 39 -#define SYS_rmdir 40 -#define SYS_dup 41 -#define SYS_pipe 42 -#define SYS_times 43 -#define SYS_prof 44 -#define SYS_brk 45 -#define SYS_setgid 46 -#define SYS_getgid 47 -#define SYS_signal 48 -#define SYS_geteuid 49 -#define SYS_getegid 50 -#define SYS_acct 51 -#define SYS_umount2 52 -#define SYS_lock 53 -#define SYS_ioctl 54 -#define SYS_fcntl 55 -#define SYS_mpx 56 -#define SYS_setpgid 57 -#define SYS_ulimit 58 -#define SYS_oldolduname 59 -#define SYS_umask 60 -#define SYS_chroot 61 -#define SYS_ustat 62 -#define SYS_dup2 63 -#define SYS_getppid 64 -#define SYS_getpgrp 65 -#define SYS_setsid 66 -#define SYS_sigaction 67 -#define SYS_sgetmask 68 -#define SYS_ssetmask 69 -#define SYS_setreuid 70 -#define SYS_setregid 71 -#define SYS_sigsuspend 72 -#define SYS_sigpending 73 -#define SYS_sethostname 74 -#define SYS_setrlimit 75 -#define SYS_getrlimit 76 -#define SYS_getrusage 77 -#define SYS_gettimeofday 78 -#define SYS_settimeofday 79 -#define SYS_getgroups 80 -#define SYS_setgroups 81 -#define SYS_select 82 -#define SYS_symlink 83 -#define SYS_oldlstat 84 -#define SYS_readlink 85 -#define SYS_uselib 86 -#define SYS_swapon 87 -#define SYS_reboot 88 -#define SYS_readdir 89 -#define SYS_mmap 90 -#define SYS_munmap 91 -#define SYS_truncate 92 -#define SYS_ftruncate 93 -#define SYS_fchmod 94 -#define SYS_fchown 95 -#define SYS_getpriority 96 -#define SYS_setpriority 97 -#define SYS_profil 98 -#define SYS_statfs 99 -#define SYS_fstatfs 100 -#define SYS_ioperm 101 -#define SYS_socketcall 102 -#define SYS_syslog 103 -#define SYS_setitimer 104 -#define SYS_getitimer 105 -#define SYS_stat 106 -#define SYS_lstat 107 -#define SYS_fstat 108 -#define SYS_olduname 109 -#define SYS_iopl 110 -#define SYS_vhangup 111 -#define SYS_idle 112 -#define SYS_vm86 113 -#define SYS_wait4 114 -#define SYS_swapoff 115 -#define SYS_sysinfo 116 -#define SYS_ipc 117 -#define SYS_fsync 118 -#define SYS_sigreturn 119 -#define SYS_clone 120 -#define SYS_setdomainname 121 -#define SYS_uname 122 -#define SYS_modify_ldt 123 -#define SYS_adjtimex 124 -#define SYS_mprotect 125 -#define SYS_sigprocmask 126 -#define SYS_create_module 127 -#define SYS_init_module 128 -#define SYS_delete_module 129 -#define SYS_get_kernel_syms 130 -#define SYS_quotactl 131 -#define SYS_getpgid 132 -#define SYS_fchdir 133 -#define SYS_bdflush 134 -#define SYS_sysfs 135 -#define SYS_personality 136 -#define SYS_afs_syscall 137 -#define SYS_setfsuid 138 -#define SYS_setfsgid 139 -#define SYS__llseek 140 -#define SYS_getdents 141 -#define SYS__newselect 142 -#define SYS_flock 143 -#define SYS_msync 144 -#define SYS_readv 145 -#define SYS_writev 146 -#define SYS_getsid 147 -#define SYS_fdatasync 148 -#define SYS__sysctl 149 -#define SYS_mlock 150 -#define SYS_munlock 151 -#define SYS_mlockall 152 -#define SYS_munlockall 153 -#define SYS_sched_setparam 154 -#define SYS_sched_getparam 155 -#define SYS_sched_setscheduler 156 -#define SYS_sched_getscheduler 157 -#define SYS_sched_yield 158 -#define SYS_sched_get_priority_max 159 -#define SYS_sched_get_priority_min 160 -#define SYS_sched_rr_get_interval 161 -#define SYS_nanosleep 162 -#define SYS_mremap 163 -#define SYS_setresuid 164 -#define SYS_getresuid 165 -#define SYS_query_module 166 -#define SYS_poll 167 -#define SYS_nfsservctl 168 -#define SYS_setresgid 169 -#define SYS_getresgid 170 -#define SYS_prctl 171 -#define SYS_rt_sigreturn 172 -#define SYS_rt_sigaction 173 -#define SYS_rt_sigprocmask 174 -#define SYS_rt_sigpending 175 -#define SYS_rt_sigtimedwait 176 -#define SYS_rt_sigqueueinfo 177 -#define SYS_rt_sigsuspend 178 -#define SYS_pread64 179 -#define SYS_pwrite64 180 -#define SYS_chown 181 -#define SYS_getcwd 182 -#define SYS_capget 183 -#define SYS_capset 184 -#define SYS_sigaltstack 185 -#define SYS_sendfile 186 -#define SYS_getpmsg 187 -#define SYS_putpmsg 188 -#define SYS_vfork 189 -#define SYS_ugetrlimit 190 -#define SYS_readahead 191 -#define SYS_mmap2 192 -#define SYS_truncate64 193 -#define SYS_ftruncate64 194 -#define SYS_stat64 195 -#define SYS_lstat64 196 -#define SYS_fstat64 197 -#define SYS_pciconfig_read 198 -#define SYS_pciconfig_write 199 -#define SYS_pciconfig_iobase 200 -#define SYS_multiplexer 201 -#define SYS_getdents64 202 -#define SYS_pivot_root 203 -#define SYS_fcntl64 204 -#define SYS_madvise 205 -#define SYS_mincore 206 -#define SYS_gettid 207 -#define SYS_tkill 208 -#define SYS_setxattr 209 -#define SYS_lsetxattr 210 -#define SYS_fsetxattr 211 -#define SYS_getxattr 212 -#define SYS_lgetxattr 213 -#define SYS_fgetxattr 214 -#define SYS_listxattr 215 -#define SYS_llistxattr 216 -#define SYS_flistxattr 217 -#define SYS_removexattr 218 -#define SYS_lremovexattr 219 -#define SYS_fremovexattr 220 -#define SYS_futex 221 -#define SYS_sched_setaffinity 222 -#define SYS_sched_getaffinity 223 -#define SYS_tuxcall 225 -#define SYS_sendfile64 226 -#define SYS_io_setup 227 -#define SYS_io_destroy 228 -#define SYS_io_getevents 229 -#define SYS_io_submit 230 -#define SYS_io_cancel 231 -#define SYS_set_tid_address 232 -#define SYS_fadvise64 233 -#define SYS_exit_group 234 -#define SYS_lookup_dcookie 235 -#define SYS_epoll_create 236 -#define SYS_epoll_ctl 237 -#define SYS_epoll_wait 238 -#define SYS_remap_file_pages 239 -#define SYS_timer_create 240 -#define SYS_timer_settime 241 -#define SYS_timer_gettime 242 -#define SYS_timer_getoverrun 243 -#define SYS_timer_delete 244 -#define SYS_clock_settime 245 -#define SYS_clock_gettime 246 -#define SYS_clock_getres 247 -#define SYS_clock_nanosleep 248 -#define SYS_swapcontext 249 -#define SYS_tgkill 250 -#define SYS_utimes 251 -#define SYS_statfs64 252 -#define SYS_fstatfs64 253 -#define SYS_fadvise64_64 254 -#define SYS_rtas 255 -#define SYS_sys_debug_setcontext 256 -#define SYS_migrate_pages 258 -#define SYS_mbind 259 -#define SYS_get_mempolicy 260 -#define SYS_set_mempolicy 261 -#define SYS_mq_open 262 -#define SYS_mq_unlink 263 -#define SYS_mq_timedsend 264 -#define SYS_mq_timedreceive 265 -#define SYS_mq_notify 266 -#define SYS_mq_getsetattr 267 -#define SYS_kexec_load 268 -#define SYS_add_key 269 -#define SYS_request_key 270 -#define SYS_keyctl 271 -#define SYS_waitid 272 -#define SYS_ioprio_set 273 -#define SYS_ioprio_get 274 -#define SYS_inotify_init 275 -#define SYS_inotify_add_watch 276 -#define SYS_inotify_rm_watch 277 -#define SYS_spu_run 278 -#define SYS_spu_create 279 -#define SYS_pselect6 280 -#define SYS_ppoll 281 -#define SYS_unshare 282 -#define SYS_splice 283 -#define SYS_tee 284 -#define SYS_vmsplice 285 -#define SYS_openat 286 -#define SYS_mkdirat 287 -#define SYS_mknodat 288 -#define SYS_fchownat 289 -#define SYS_futimesat 290 -#define SYS_fstatat64 291 -#define SYS_unlinkat 292 -#define SYS_renameat 293 -#define SYS_linkat 294 -#define SYS_symlinkat 295 -#define SYS_readlinkat 296 -#define SYS_fchmodat 297 -#define SYS_faccessat 298 -#define SYS_get_robust_list 299 -#define SYS_set_robust_list 300 -#define SYS_move_pages 301 -#define SYS_getcpu 302 -#define SYS_epoll_pwait 303 -#define SYS_utimensat 304 -#define SYS_signalfd 305 -#define SYS_timerfd_create 306 -#define SYS_eventfd 307 -#define SYS_sync_file_range2 308 -#define SYS_fallocate 309 -#define SYS_subpage_prot 310 -#define SYS_timerfd_settime 311 -#define SYS_timerfd_gettime 312 -#define SYS_signalfd4 313 -#define SYS_eventfd2 314 -#define SYS_epoll_create1 315 -#define SYS_dup3 316 -#define SYS_pipe2 317 -#define SYS_inotify_init1 318 -#define SYS_perf_event_open 319 -#define SYS_preadv 320 -#define SYS_pwritev 321 -#define SYS_rt_tgsigqueueinfo 322 -#define SYS_fanotify_init 323 -#define SYS_fanotify_mark 324 -#define SYS_prlimit64 325 -#define SYS_socket 326 -#define SYS_bind 327 -#define SYS_connect 328 -#define SYS_listen 329 -#define SYS_accept 330 -#define SYS_getsockname 331 -#define SYS_getpeername 332 -#define SYS_socketpair 333 -#define SYS_send 334 -#define SYS_sendto 335 -#define SYS_recv 336 -#define SYS_recvfrom 337 -#define SYS_shutdown 338 -#define SYS_setsockopt 339 -#define SYS_getsockopt 340 -#define SYS_sendmsg 341 -#define SYS_recvmsg 342 -#define SYS_recvmmsg 343 -#define SYS_accept4 344 -#define SYS_name_to_handle_at 345 -#define SYS_open_by_handle_at 346 -#define SYS_clock_adjtime 347 -#define SYS_syncfs 348 -#define SYS_sendmmsg 349 -#define SYS_setns 350 -#define SYS_process_vm_readv 351 -#define SYS_process_vm_writev 352 -#define SYS_finit_module 353 -#define SYS_kcmp 354 -#define SYS_sched_setattr 355 -#define SYS_sched_getattr 356 -#define SYS_renameat2 357 -#define SYS_seccomp 358 -#define SYS_getrandom 359 -#define SYS_memfd_create 360 -#define SYS_bpf 361 -#define SYS_execveat 362 -#define SYS_switch_endian 363 -#define SYS_userfaultfd 364 -#define SYS_membarrier 365 -#define SYS_mlock2 378 -#define SYS_copy_file_range 379 -#define SYS_preadv2 380 -#define SYS_pwritev2 381 -#define SYS_kexec_file_load 382 -#define SYS_statx 383 -#define SYS_pkey_alloc 384 -#define SYS_pkey_free 385 -#define SYS_pkey_mprotect 386 -#define SYS_rseq 387 -#define SYS_io_pgetevents 388 \ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-musl/bits/termios.h b/lib/libc/include/powerpc-linux-musl/bits/termios.h index 2794c01c65..0613854d06 100644 --- a/lib/libc/include/powerpc-linux-musl/bits/termios.h +++ b/lib/libc/include/powerpc-linux-musl/bits/termios.h @@ -167,5 +167,5 @@ struct termios { #define EXTPROC 0x10000000 #define XTABS 00006000 -#define TIOCSER_TEMT 0x01 +#define TIOCSER_TEMT 1 #endif \ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-musl/bfd_stdint.h b/lib/libc/include/powerpc64-linux-musl/bfd_stdint.h deleted file mode 100644 index 451bead35d..0000000000 --- a/lib/libc/include/powerpc64-linux-musl/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for powerpc64-linux-musl-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-musl/bits/alltypes.h b/lib/libc/include/powerpc64-linux-musl/bits/alltypes.h deleted file mode 100644 index c80818ac20..0000000000 --- a/lib/libc/include/powerpc64-linux-musl/bits/alltypes.h +++ /dev/null @@ -1,385 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef int wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif - -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-musl/bits/ioctl.h b/lib/libc/include/powerpc64-linux-musl/bits/ioctl.h index a2e7f3127b..98eff9a7d5 100644 --- a/lib/libc/include/powerpc64-linux-musl/bits/ioctl.h +++ b/lib/libc/include/powerpc64-linux-musl/bits/ioctl.h @@ -78,14 +78,6 @@ #define TIOCGSERIAL 0x541E #define TIOCSSERIAL 0x541F #define TIOCPKT 0x5420 -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 #define TIOCNOTTY 0x5422 #define TIOCSETD 0x5423 @@ -113,105 +105,16 @@ #define TIOCSLCKTRMIOS 0x5457 #define TIOCSERGSTRUCT 0x5458 #define TIOCSERGETLSR 0x5459 -#define TIOCSER_TEMT 0x01 #define TIOCSERGETMULTI 0x545A #define TIOCSERSETMULTI 0x545B #define TIOCMIWAIT 0x545C #define TIOCGICOUNT 0x545D - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 -#define N_6PACK 7 -#define N_MASC 8 -#define N_R3964 9 -#define N_PROFIBUS_FDL 10 -#define N_IRDA 11 -#define N_SMSBLOCK 12 -#define N_HDLC 13 -#define N_SYNC_PPP 14 -#define N_HCI 15 - #define FIOSETOWN 0x8901 #define SIOCSPGRP 0x8902 #define FIOGETOWN 0x8903 #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 #define SIOCGSTAMP 0x8906 -#define SIOCGSTAMPNS 0x8907 - -#define SIOCADDRT 0x890B -#define SIOCDELRT 0x890C -#define SIOCRTMSG 0x890D - -#define SIOCGIFNAME 0x8910 -#define SIOCSIFLINK 0x8911 -#define SIOCGIFCONF 0x8912 -#define SIOCGIFFLAGS 0x8913 -#define SIOCSIFFLAGS 0x8914 -#define SIOCGIFADDR 0x8915 -#define SIOCSIFADDR 0x8916 -#define SIOCGIFDSTADDR 0x8917 -#define SIOCSIFDSTADDR 0x8918 -#define SIOCGIFBRDADDR 0x8919 -#define SIOCSIFBRDADDR 0x891a -#define SIOCGIFNETMASK 0x891b -#define SIOCSIFNETMASK 0x891c -#define SIOCGIFMETRIC 0x891d -#define SIOCSIFMETRIC 0x891e -#define SIOCGIFMEM 0x891f -#define SIOCSIFMEM 0x8920 -#define SIOCGIFMTU 0x8921 -#define SIOCSIFMTU 0x8922 -#define SIOCSIFNAME 0x8923 -#define SIOCSIFHWADDR 0x8924 -#define SIOCGIFENCAP 0x8925 -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 -#define SIOCGIFSLAVE 0x8929 -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 -#define SIOGIFINDEX SIOCGIFINDEX -#define SIOCSIFPFLAGS 0x8934 -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 -#define SIOCSIFHWBROADCAST 0x8937 -#define SIOCGIFCOUNT 0x8938 - -#define SIOCGIFBR 0x8940 -#define SIOCSIFBR 0x8941 - -#define SIOCGIFTXQLEN 0x8942 -#define SIOCSIFTXQLEN 0x8943 - -#define SIOCDARP 0x8953 -#define SIOCGARP 0x8954 -#define SIOCSARP 0x8955 - -#define SIOCDRARP 0x8960 -#define SIOCGRARP 0x8961 -#define SIOCSRARP 0x8962 - -#define SIOCGIFMAP 0x8970 -#define SIOCSIFMAP 0x8971 - -#define SIOCADDDLCI 0x8980 -#define SIOCDELDLCI 0x8981 - -#define SIOCDEVPRIVATE 0x89F0 -#define SIOCPROTOPRIVATE 0x89E0 \ No newline at end of file +#define SIOCGSTAMPNS 0x8907 \ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-musl/bits/ptrace.h b/lib/libc/include/powerpc64-linux-musl/bits/ptrace.h index fcaf79524f..ba4cc8e84e 100644 --- a/lib/libc/include/powerpc64-linux-musl/bits/ptrace.h +++ b/lib/libc/include/powerpc64-linux-musl/bits/ptrace.h @@ -8,6 +8,8 @@ #define PTRACE_SET_DEBUGREG 0x1a #define PTRACE_GETVSRREGS 0x1b #define PTRACE_SETVSRREGS 0x1c +#define PTRACE_SYSEMU 0x1d +#define PTRACE_SYSEMU_SINGLESTEP 0x1e #define PTRACE_SINGLEBLOCK 0x100 #define PT_GETVRREGS PTRACE_GETVRREGS diff --git a/lib/libc/include/powerpc64-linux-musl/bits/signal.h b/lib/libc/include/powerpc64-linux-musl/bits/signal.h index e18d54b2ae..c312b0d459 100644 --- a/lib/libc/include/powerpc64-linux-musl/bits/signal.h +++ b/lib/libc/include/powerpc64-linux-musl/bits/signal.h @@ -16,11 +16,18 @@ typedef struct { } fpregset_t; typedef struct { - unsigned __int128 vrregs[32]; - unsigned _pad[3]; - unsigned vrsave; - unsigned vscr; - unsigned _pad2[3]; +#ifdef __GNUC__ + __attribute__((__aligned__(16))) +#endif + unsigned vrregs[32][4]; + struct { +#if __BIG_ENDIAN__ + unsigned _pad[3], vscr_word; +#else + unsigned vscr_word, _pad[3]; +#endif + } vscr; + unsigned vrsave, _pad[3]; } vrregset_t; typedef struct sigcontext { diff --git a/lib/libc/include/powerpc64-linux-musl/bits/syscall.h b/lib/libc/include/powerpc64-linux-musl/bits/syscall.h deleted file mode 100644 index 993472d871..0000000000 --- a/lib/libc/include/powerpc64-linux-musl/bits/syscall.h +++ /dev/null @@ -1,733 +0,0 @@ -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 -#define __NR_break 17 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_stty 31 -#define __NR_gtty 32 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_ftime 35 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_prof 44 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_lock 53 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_mpx 56 -#define __NR_setpgid 57 -#define __NR_ulimit 58 -#define __NR_oldolduname 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_profil 98 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_ioperm 101 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_olduname 109 -#define __NR_iopl 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_vm86 113 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_modify_ldt 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_query_module 166 -#define __NR_poll 167 -#define __NR_nfsservctl 168 -#define __NR_setresgid 169 -#define __NR_getresgid 170 -#define __NR_prctl 171 -#define __NR_rt_sigreturn 172 -#define __NR_rt_sigaction 173 -#define __NR_rt_sigprocmask 174 -#define __NR_rt_sigpending 175 -#define __NR_rt_sigtimedwait 176 -#define __NR_rt_sigqueueinfo 177 -#define __NR_rt_sigsuspend 178 -#define __NR_pread64 179 -#define __NR_pwrite64 180 -#define __NR_chown 181 -#define __NR_getcwd 182 -#define __NR_capget 183 -#define __NR_capset 184 -#define __NR_sigaltstack 185 -#define __NR_sendfile 186 -#define __NR_getpmsg 187 -#define __NR_putpmsg 188 -#define __NR_vfork 189 -#define __NR_ugetrlimit 190 -#define __NR_readahead 191 -#define __NR_pciconfig_read 198 -#define __NR_pciconfig_write 199 -#define __NR_pciconfig_iobase 200 -#define __NR_multiplexer 201 -#define __NR_getdents64 202 -#define __NR_pivot_root 203 -#define __NR_madvise 205 -#define __NR_mincore 206 -#define __NR_gettid 207 -#define __NR_tkill 208 -#define __NR_setxattr 209 -#define __NR_lsetxattr 210 -#define __NR_fsetxattr 211 -#define __NR_getxattr 212 -#define __NR_lgetxattr 213 -#define __NR_fgetxattr 214 -#define __NR_listxattr 215 -#define __NR_llistxattr 216 -#define __NR_flistxattr 217 -#define __NR_removexattr 218 -#define __NR_lremovexattr 219 -#define __NR_fremovexattr 220 -#define __NR_futex 221 -#define __NR_sched_setaffinity 222 -#define __NR_sched_getaffinity 223 -#define __NR_tuxcall 225 -#define __NR_io_setup 227 -#define __NR_io_destroy 228 -#define __NR_io_getevents 229 -#define __NR_io_submit 230 -#define __NR_io_cancel 231 -#define __NR_set_tid_address 232 -#define __NR_fadvise64 233 -#define __NR_exit_group 234 -#define __NR_lookup_dcookie 235 -#define __NR_epoll_create 236 -#define __NR_epoll_ctl 237 -#define __NR_epoll_wait 238 -#define __NR_remap_file_pages 239 -#define __NR_timer_create 240 -#define __NR_timer_settime 241 -#define __NR_timer_gettime 242 -#define __NR_timer_getoverrun 243 -#define __NR_timer_delete 244 -#define __NR_clock_settime 245 -#define __NR_clock_gettime 246 -#define __NR_clock_getres 247 -#define __NR_clock_nanosleep 248 -#define __NR_swapcontext 249 -#define __NR_tgkill 250 -#define __NR_utimes 251 -#define __NR_statfs64 252 -#define __NR_fstatfs64 253 -#define __NR_rtas 255 -#define __NR_sys_debug_setcontext 256 -#define __NR_migrate_pages 258 -#define __NR_mbind 259 -#define __NR_get_mempolicy 260 -#define __NR_set_mempolicy 261 -#define __NR_mq_open 262 -#define __NR_mq_unlink 263 -#define __NR_mq_timedsend 264 -#define __NR_mq_timedreceive 265 -#define __NR_mq_notify 266 -#define __NR_mq_getsetattr 267 -#define __NR_kexec_load 268 -#define __NR_add_key 269 -#define __NR_request_key 270 -#define __NR_keyctl 271 -#define __NR_waitid 272 -#define __NR_ioprio_set 273 -#define __NR_ioprio_get 274 -#define __NR_inotify_init 275 -#define __NR_inotify_add_watch 276 -#define __NR_inotify_rm_watch 277 -#define __NR_spu_run 278 -#define __NR_spu_create 279 -#define __NR_pselect6 280 -#define __NR_ppoll 281 -#define __NR_unshare 282 -#define __NR_splice 283 -#define __NR_tee 284 -#define __NR_vmsplice 285 -#define __NR_openat 286 -#define __NR_mkdirat 287 -#define __NR_mknodat 288 -#define __NR_fchownat 289 -#define __NR_futimesat 290 -#define __NR_newfstatat 291 -#define __NR_unlinkat 292 -#define __NR_renameat 293 -#define __NR_linkat 294 -#define __NR_symlinkat 295 -#define __NR_readlinkat 296 -#define __NR_fchmodat 297 -#define __NR_faccessat 298 -#define __NR_get_robust_list 299 -#define __NR_set_robust_list 300 -#define __NR_move_pages 301 -#define __NR_getcpu 302 -#define __NR_epoll_pwait 303 -#define __NR_utimensat 304 -#define __NR_signalfd 305 -#define __NR_timerfd_create 306 -#define __NR_eventfd 307 -#define __NR_sync_file_range2 308 -#define __NR_fallocate 309 -#define __NR_subpage_prot 310 -#define __NR_timerfd_settime 311 -#define __NR_timerfd_gettime 312 -#define __NR_signalfd4 313 -#define __NR_eventfd2 314 -#define __NR_epoll_create1 315 -#define __NR_dup3 316 -#define __NR_pipe2 317 -#define __NR_inotify_init1 318 -#define __NR_perf_event_open 319 -#define __NR_preadv 320 -#define __NR_pwritev 321 -#define __NR_rt_tgsigqueueinfo 322 -#define __NR_fanotify_init 323 -#define __NR_fanotify_mark 324 -#define __NR_prlimit64 325 -#define __NR_socket 326 -#define __NR_bind 327 -#define __NR_connect 328 -#define __NR_listen 329 -#define __NR_accept 330 -#define __NR_getsockname 331 -#define __NR_getpeername 332 -#define __NR_socketpair 333 -#define __NR_send 334 -#define __NR_sendto 335 -#define __NR_recv 336 -#define __NR_recvfrom 337 -#define __NR_shutdown 338 -#define __NR_setsockopt 339 -#define __NR_getsockopt 340 -#define __NR_sendmsg 341 -#define __NR_recvmsg 342 -#define __NR_recvmmsg 343 -#define __NR_accept4 344 -#define __NR_name_to_handle_at 345 -#define __NR_open_by_handle_at 346 -#define __NR_clock_adjtime 347 -#define __NR_syncfs 348 -#define __NR_sendmmsg 349 -#define __NR_setns 350 -#define __NR_process_vm_readv 351 -#define __NR_process_vm_writev 352 -#define __NR_finit_module 353 -#define __NR_kcmp 354 -#define __NR_sched_setattr 355 -#define __NR_sched_getattr 356 -#define __NR_renameat2 357 -#define __NR_seccomp 358 -#define __NR_getrandom 359 -#define __NR_memfd_create 360 -#define __NR_bpf 361 -#define __NR_execveat 362 -#define __NR_switch_endian 363 -#define __NR_userfaultfd 364 -#define __NR_membarrier 365 -#define __NR_mlock2 378 -#define __NR_copy_file_range 379 -#define __NR_preadv2 380 -#define __NR_pwritev2 381 -#define __NR_kexec_file_load 382 -#define __NR_statx 383 -#define __NR_pkey_alloc 384 -#define __NR_pkey_free 385 -#define __NR_pkey_mprotect 386 -#define __NR_rseq 387 -#define __NR_io_pgetevents 388 - -#define SYS_restart_syscall 0 -#define SYS_exit 1 -#define SYS_fork 2 -#define SYS_read 3 -#define SYS_write 4 -#define SYS_open 5 -#define SYS_close 6 -#define SYS_waitpid 7 -#define SYS_creat 8 -#define SYS_link 9 -#define SYS_unlink 10 -#define SYS_execve 11 -#define SYS_chdir 12 -#define SYS_time 13 -#define SYS_mknod 14 -#define SYS_chmod 15 -#define SYS_lchown 16 -#define SYS_break 17 -#define SYS_oldstat 18 -#define SYS_lseek 19 -#define SYS_getpid 20 -#define SYS_mount 21 -#define SYS_umount 22 -#define SYS_setuid 23 -#define SYS_getuid 24 -#define SYS_stime 25 -#define SYS_ptrace 26 -#define SYS_alarm 27 -#define SYS_oldfstat 28 -#define SYS_pause 29 -#define SYS_utime 30 -#define SYS_stty 31 -#define SYS_gtty 32 -#define SYS_access 33 -#define SYS_nice 34 -#define SYS_ftime 35 -#define SYS_sync 36 -#define SYS_kill 37 -#define SYS_rename 38 -#define SYS_mkdir 39 -#define SYS_rmdir 40 -#define SYS_dup 41 -#define SYS_pipe 42 -#define SYS_times 43 -#define SYS_prof 44 -#define SYS_brk 45 -#define SYS_setgid 46 -#define SYS_getgid 47 -#define SYS_signal 48 -#define SYS_geteuid 49 -#define SYS_getegid 50 -#define SYS_acct 51 -#define SYS_umount2 52 -#define SYS_lock 53 -#define SYS_ioctl 54 -#define SYS_fcntl 55 -#define SYS_mpx 56 -#define SYS_setpgid 57 -#define SYS_ulimit 58 -#define SYS_oldolduname 59 -#define SYS_umask 60 -#define SYS_chroot 61 -#define SYS_ustat 62 -#define SYS_dup2 63 -#define SYS_getppid 64 -#define SYS_getpgrp 65 -#define SYS_setsid 66 -#define SYS_sigaction 67 -#define SYS_sgetmask 68 -#define SYS_ssetmask 69 -#define SYS_setreuid 70 -#define SYS_setregid 71 -#define SYS_sigsuspend 72 -#define SYS_sigpending 73 -#define SYS_sethostname 74 -#define SYS_setrlimit 75 -#define SYS_getrlimit 76 -#define SYS_getrusage 77 -#define SYS_gettimeofday 78 -#define SYS_settimeofday 79 -#define SYS_getgroups 80 -#define SYS_setgroups 81 -#define SYS_select 82 -#define SYS_symlink 83 -#define SYS_oldlstat 84 -#define SYS_readlink 85 -#define SYS_uselib 86 -#define SYS_swapon 87 -#define SYS_reboot 88 -#define SYS_readdir 89 -#define SYS_mmap 90 -#define SYS_munmap 91 -#define SYS_truncate 92 -#define SYS_ftruncate 93 -#define SYS_fchmod 94 -#define SYS_fchown 95 -#define SYS_getpriority 96 -#define SYS_setpriority 97 -#define SYS_profil 98 -#define SYS_statfs 99 -#define SYS_fstatfs 100 -#define SYS_ioperm 101 -#define SYS_socketcall 102 -#define SYS_syslog 103 -#define SYS_setitimer 104 -#define SYS_getitimer 105 -#define SYS_stat 106 -#define SYS_lstat 107 -#define SYS_fstat 108 -#define SYS_olduname 109 -#define SYS_iopl 110 -#define SYS_vhangup 111 -#define SYS_idle 112 -#define SYS_vm86 113 -#define SYS_wait4 114 -#define SYS_swapoff 115 -#define SYS_sysinfo 116 -#define SYS_ipc 117 -#define SYS_fsync 118 -#define SYS_sigreturn 119 -#define SYS_clone 120 -#define SYS_setdomainname 121 -#define SYS_uname 122 -#define SYS_modify_ldt 123 -#define SYS_adjtimex 124 -#define SYS_mprotect 125 -#define SYS_sigprocmask 126 -#define SYS_create_module 127 -#define SYS_init_module 128 -#define SYS_delete_module 129 -#define SYS_get_kernel_syms 130 -#define SYS_quotactl 131 -#define SYS_getpgid 132 -#define SYS_fchdir 133 -#define SYS_bdflush 134 -#define SYS_sysfs 135 -#define SYS_personality 136 -#define SYS_afs_syscall 137 -#define SYS_setfsuid 138 -#define SYS_setfsgid 139 -#define SYS__llseek 140 -#define SYS_getdents 141 -#define SYS__newselect 142 -#define SYS_flock 143 -#define SYS_msync 144 -#define SYS_readv 145 -#define SYS_writev 146 -#define SYS_getsid 147 -#define SYS_fdatasync 148 -#define SYS__sysctl 149 -#define SYS_mlock 150 -#define SYS_munlock 151 -#define SYS_mlockall 152 -#define SYS_munlockall 153 -#define SYS_sched_setparam 154 -#define SYS_sched_getparam 155 -#define SYS_sched_setscheduler 156 -#define SYS_sched_getscheduler 157 -#define SYS_sched_yield 158 -#define SYS_sched_get_priority_max 159 -#define SYS_sched_get_priority_min 160 -#define SYS_sched_rr_get_interval 161 -#define SYS_nanosleep 162 -#define SYS_mremap 163 -#define SYS_setresuid 164 -#define SYS_getresuid 165 -#define SYS_query_module 166 -#define SYS_poll 167 -#define SYS_nfsservctl 168 -#define SYS_setresgid 169 -#define SYS_getresgid 170 -#define SYS_prctl 171 -#define SYS_rt_sigreturn 172 -#define SYS_rt_sigaction 173 -#define SYS_rt_sigprocmask 174 -#define SYS_rt_sigpending 175 -#define SYS_rt_sigtimedwait 176 -#define SYS_rt_sigqueueinfo 177 -#define SYS_rt_sigsuspend 178 -#define SYS_pread64 179 -#define SYS_pwrite64 180 -#define SYS_chown 181 -#define SYS_getcwd 182 -#define SYS_capget 183 -#define SYS_capset 184 -#define SYS_sigaltstack 185 -#define SYS_sendfile 186 -#define SYS_getpmsg 187 -#define SYS_putpmsg 188 -#define SYS_vfork 189 -#define SYS_ugetrlimit 190 -#define SYS_readahead 191 -#define SYS_pciconfig_read 198 -#define SYS_pciconfig_write 199 -#define SYS_pciconfig_iobase 200 -#define SYS_multiplexer 201 -#define SYS_getdents64 202 -#define SYS_pivot_root 203 -#define SYS_madvise 205 -#define SYS_mincore 206 -#define SYS_gettid 207 -#define SYS_tkill 208 -#define SYS_setxattr 209 -#define SYS_lsetxattr 210 -#define SYS_fsetxattr 211 -#define SYS_getxattr 212 -#define SYS_lgetxattr 213 -#define SYS_fgetxattr 214 -#define SYS_listxattr 215 -#define SYS_llistxattr 216 -#define SYS_flistxattr 217 -#define SYS_removexattr 218 -#define SYS_lremovexattr 219 -#define SYS_fremovexattr 220 -#define SYS_futex 221 -#define SYS_sched_setaffinity 222 -#define SYS_sched_getaffinity 223 -#define SYS_tuxcall 225 -#define SYS_io_setup 227 -#define SYS_io_destroy 228 -#define SYS_io_getevents 229 -#define SYS_io_submit 230 -#define SYS_io_cancel 231 -#define SYS_set_tid_address 232 -#define SYS_fadvise64 233 -#define SYS_exit_group 234 -#define SYS_lookup_dcookie 235 -#define SYS_epoll_create 236 -#define SYS_epoll_ctl 237 -#define SYS_epoll_wait 238 -#define SYS_remap_file_pages 239 -#define SYS_timer_create 240 -#define SYS_timer_settime 241 -#define SYS_timer_gettime 242 -#define SYS_timer_getoverrun 243 -#define SYS_timer_delete 244 -#define SYS_clock_settime 245 -#define SYS_clock_gettime 246 -#define SYS_clock_getres 247 -#define SYS_clock_nanosleep 248 -#define SYS_swapcontext 249 -#define SYS_tgkill 250 -#define SYS_utimes 251 -#define SYS_statfs64 252 -#define SYS_fstatfs64 253 -#define SYS_rtas 255 -#define SYS_sys_debug_setcontext 256 -#define SYS_migrate_pages 258 -#define SYS_mbind 259 -#define SYS_get_mempolicy 260 -#define SYS_set_mempolicy 261 -#define SYS_mq_open 262 -#define SYS_mq_unlink 263 -#define SYS_mq_timedsend 264 -#define SYS_mq_timedreceive 265 -#define SYS_mq_notify 266 -#define SYS_mq_getsetattr 267 -#define SYS_kexec_load 268 -#define SYS_add_key 269 -#define SYS_request_key 270 -#define SYS_keyctl 271 -#define SYS_waitid 272 -#define SYS_ioprio_set 273 -#define SYS_ioprio_get 274 -#define SYS_inotify_init 275 -#define SYS_inotify_add_watch 276 -#define SYS_inotify_rm_watch 277 -#define SYS_spu_run 278 -#define SYS_spu_create 279 -#define SYS_pselect6 280 -#define SYS_ppoll 281 -#define SYS_unshare 282 -#define SYS_splice 283 -#define SYS_tee 284 -#define SYS_vmsplice 285 -#define SYS_openat 286 -#define SYS_mkdirat 287 -#define SYS_mknodat 288 -#define SYS_fchownat 289 -#define SYS_futimesat 290 -#define SYS_newfstatat 291 -#define SYS_unlinkat 292 -#define SYS_renameat 293 -#define SYS_linkat 294 -#define SYS_symlinkat 295 -#define SYS_readlinkat 296 -#define SYS_fchmodat 297 -#define SYS_faccessat 298 -#define SYS_get_robust_list 299 -#define SYS_set_robust_list 300 -#define SYS_move_pages 301 -#define SYS_getcpu 302 -#define SYS_epoll_pwait 303 -#define SYS_utimensat 304 -#define SYS_signalfd 305 -#define SYS_timerfd_create 306 -#define SYS_eventfd 307 -#define SYS_sync_file_range2 308 -#define SYS_fallocate 309 -#define SYS_subpage_prot 310 -#define SYS_timerfd_settime 311 -#define SYS_timerfd_gettime 312 -#define SYS_signalfd4 313 -#define SYS_eventfd2 314 -#define SYS_epoll_create1 315 -#define SYS_dup3 316 -#define SYS_pipe2 317 -#define SYS_inotify_init1 318 -#define SYS_perf_event_open 319 -#define SYS_preadv 320 -#define SYS_pwritev 321 -#define SYS_rt_tgsigqueueinfo 322 -#define SYS_fanotify_init 323 -#define SYS_fanotify_mark 324 -#define SYS_prlimit64 325 -#define SYS_socket 326 -#define SYS_bind 327 -#define SYS_connect 328 -#define SYS_listen 329 -#define SYS_accept 330 -#define SYS_getsockname 331 -#define SYS_getpeername 332 -#define SYS_socketpair 333 -#define SYS_send 334 -#define SYS_sendto 335 -#define SYS_recv 336 -#define SYS_recvfrom 337 -#define SYS_shutdown 338 -#define SYS_setsockopt 339 -#define SYS_getsockopt 340 -#define SYS_sendmsg 341 -#define SYS_recvmsg 342 -#define SYS_recvmmsg 343 -#define SYS_accept4 344 -#define SYS_name_to_handle_at 345 -#define SYS_open_by_handle_at 346 -#define SYS_clock_adjtime 347 -#define SYS_syncfs 348 -#define SYS_sendmmsg 349 -#define SYS_setns 350 -#define SYS_process_vm_readv 351 -#define SYS_process_vm_writev 352 -#define SYS_finit_module 353 -#define SYS_kcmp 354 -#define SYS_sched_setattr 355 -#define SYS_sched_getattr 356 -#define SYS_renameat2 357 -#define SYS_seccomp 358 -#define SYS_getrandom 359 -#define SYS_memfd_create 360 -#define SYS_bpf 361 -#define SYS_execveat 362 -#define SYS_switch_endian 363 -#define SYS_userfaultfd 364 -#define SYS_membarrier 365 -#define SYS_mlock2 378 -#define SYS_copy_file_range 379 -#define SYS_preadv2 380 -#define SYS_pwritev2 381 -#define SYS_kexec_file_load 382 -#define SYS_statx 383 -#define SYS_pkey_alloc 384 -#define SYS_pkey_free 385 -#define SYS_pkey_mprotect 386 -#define SYS_rseq 387 -#define SYS_io_pgetevents 388 \ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-musl/bits/termios.h b/lib/libc/include/powerpc64-linux-musl/bits/termios.h index 2794c01c65..0613854d06 100644 --- a/lib/libc/include/powerpc64-linux-musl/bits/termios.h +++ b/lib/libc/include/powerpc64-linux-musl/bits/termios.h @@ -167,5 +167,5 @@ struct termios { #define EXTPROC 0x10000000 #define XTABS 00006000 -#define TIOCSER_TEMT 0x01 +#define TIOCSER_TEMT 1 #endif \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bfd_stdint.h b/lib/libc/include/powerpc64le-linux-musl/bfd_stdint.h deleted file mode 100644 index 2ec116f9ef..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for powerpc64le-linux-musl-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/alltypes.h b/lib/libc/include/powerpc64le-linux-musl/bits/alltypes.h deleted file mode 100644 index c80818ac20..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/alltypes.h +++ /dev/null @@ -1,385 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef int wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif - -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/endian.h b/lib/libc/include/powerpc64le-linux-musl/bits/endian.h deleted file mode 100644 index 4f3a41f0c1..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/endian.h +++ /dev/null @@ -1,5 +0,0 @@ -#if __BIG_ENDIAN__ -#define __BYTE_ORDER __BIG_ENDIAN -#else -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/errno.h b/lib/libc/include/powerpc64le-linux-musl/bits/errno.h deleted file mode 100644 index 56544f790f..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/errno.h +++ /dev/null @@ -1,134 +0,0 @@ -#define EPERM 1 -#define ENOENT 2 -#define ESRCH 3 -#define EINTR 4 -#define EIO 5 -#define ENXIO 6 -#define E2BIG 7 -#define ENOEXEC 8 -#define EBADF 9 -#define ECHILD 10 -#define EAGAIN 11 -#define ENOMEM 12 -#define EACCES 13 -#define EFAULT 14 -#define ENOTBLK 15 -#define EBUSY 16 -#define EEXIST 17 -#define EXDEV 18 -#define ENODEV 19 -#define ENOTDIR 20 -#define EISDIR 21 -#define EINVAL 22 -#define ENFILE 23 -#define EMFILE 24 -#define ENOTTY 25 -#define ETXTBSY 26 -#define EFBIG 27 -#define ENOSPC 28 -#define ESPIPE 29 -#define EROFS 30 -#define EMLINK 31 -#define EPIPE 32 -#define EDOM 33 -#define ERANGE 34 -#define EDEADLK 35 -#define ENAMETOOLONG 36 -#define ENOLCK 37 -#define ENOSYS 38 -#define ENOTEMPTY 39 -#define ELOOP 40 -#define EWOULDBLOCK EAGAIN -#define ENOMSG 42 -#define EIDRM 43 -#define ECHRNG 44 -#define EL2NSYNC 45 -#define EL3HLT 46 -#define EL3RST 47 -#define ELNRNG 48 -#define EUNATCH 49 -#define ENOCSI 50 -#define EL2HLT 51 -#define EBADE 52 -#define EBADR 53 -#define EXFULL 54 -#define ENOANO 55 -#define EBADRQC 56 -#define EBADSLT 57 -#define EDEADLOCK 58 -#define EBFONT 59 -#define ENOSTR 60 -#define ENODATA 61 -#define ETIME 62 -#define ENOSR 63 -#define ENONET 64 -#define ENOPKG 65 -#define EREMOTE 66 -#define ENOLINK 67 -#define EADV 68 -#define ESRMNT 69 -#define ECOMM 70 -#define EPROTO 71 -#define EMULTIHOP 72 -#define EDOTDOT 73 -#define EBADMSG 74 -#define EOVERFLOW 75 -#define ENOTUNIQ 76 -#define EBADFD 77 -#define EREMCHG 78 -#define ELIBACC 79 -#define ELIBBAD 80 -#define ELIBSCN 81 -#define ELIBMAX 82 -#define ELIBEXEC 83 -#define EILSEQ 84 -#define ERESTART 85 -#define ESTRPIPE 86 -#define EUSERS 87 -#define ENOTSOCK 88 -#define EDESTADDRREQ 89 -#define EMSGSIZE 90 -#define EPROTOTYPE 91 -#define ENOPROTOOPT 92 -#define EPROTONOSUPPORT 93 -#define ESOCKTNOSUPPORT 94 -#define EOPNOTSUPP 95 -#define ENOTSUP EOPNOTSUPP -#define EPFNOSUPPORT 96 -#define EAFNOSUPPORT 97 -#define EADDRINUSE 98 -#define EADDRNOTAVAIL 99 -#define ENETDOWN 100 -#define ENETUNREACH 101 -#define ENETRESET 102 -#define ECONNABORTED 103 -#define ECONNRESET 104 -#define ENOBUFS 105 -#define EISCONN 106 -#define ENOTCONN 107 -#define ESHUTDOWN 108 -#define ETOOMANYREFS 109 -#define ETIMEDOUT 110 -#define ECONNREFUSED 111 -#define EHOSTDOWN 112 -#define EHOSTUNREACH 113 -#define EALREADY 114 -#define EINPROGRESS 115 -#define ESTALE 116 -#define EUCLEAN 117 -#define ENOTNAM 118 -#define ENAVAIL 119 -#define EISNAM 120 -#define EREMOTEIO 121 -#define EDQUOT 122 -#define ENOMEDIUM 123 -#define EMEDIUMTYPE 124 -#define ECANCELED 125 -#define ENOKEY 126 -#define EKEYEXPIRED 127 -#define EKEYREVOKED 128 -#define EKEYREJECTED 129 -#define EOWNERDEAD 130 -#define ENOTRECOVERABLE 131 -#define ERFKILL 132 -#define EHWPOISON 133 \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/fenv.h b/lib/libc/include/powerpc64le-linux-musl/bits/fenv.h deleted file mode 100644 index 7374134ba6..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/fenv.h +++ /dev/null @@ -1,31 +0,0 @@ -#define FE_TONEAREST 0 -#define FE_TOWARDZERO 1 -#define FE_UPWARD 2 -#define FE_DOWNWARD 3 - -#define FE_INEXACT 0x02000000 -#define FE_DIVBYZERO 0x04000000 -#define FE_UNDERFLOW 0x08000000 -#define FE_OVERFLOW 0x10000000 -#define FE_INVALID 0x20000000 - -#define FE_ALL_EXCEPT 0x3e000000 - -#ifdef _GNU_SOURCE -#define FE_INVALID_SNAN 0x01000000 -#define FE_INVALID_ISI 0x00800000 -#define FE_INVALID_IDI 0x00400000 -#define FE_INVALID_ZDZ 0x00200000 -#define FE_INVALID_IMZ 0x00100000 -#define FE_INVALID_COMPARE 0x00080000 -#define FE_INVALID_SOFTWARE 0x00000400 -#define FE_INVALID_SQRT 0x00000200 -#define FE_INVALID_INTEGER_CONVERSION 0x00000100 - -#define FE_ALL_INVALID 0x01f80700 -#endif - -typedef unsigned fexcept_t; -typedef double fenv_t; - -#define FE_DFL_ENV ((const fenv_t *)-1) \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/hwcap.h b/lib/libc/include/powerpc64le-linux-musl/bits/hwcap.h deleted file mode 100644 index fff9d1e280..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/hwcap.h +++ /dev/null @@ -1,43 +0,0 @@ -#define PPC_FEATURE_32 0x80000000 -#define PPC_FEATURE_64 0x40000000 -#define PPC_FEATURE_601_INSTR 0x20000000 -#define PPC_FEATURE_HAS_ALTIVEC 0x10000000 -#define PPC_FEATURE_HAS_FPU 0x08000000 -#define PPC_FEATURE_HAS_MMU 0x04000000 -#define PPC_FEATURE_HAS_4xxMAC 0x02000000 -#define PPC_FEATURE_UNIFIED_CACHE 0x01000000 -#define PPC_FEATURE_HAS_SPE 0x00800000 -#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 -#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 -#define PPC_FEATURE_NO_TB 0x00100000 -#define PPC_FEATURE_POWER4 0x00080000 -#define PPC_FEATURE_POWER5 0x00040000 -#define PPC_FEATURE_POWER5_PLUS 0x00020000 -#define PPC_FEATURE_CELL 0x00010000 -#define PPC_FEATURE_BOOKE 0x00008000 -#define PPC_FEATURE_SMT 0x00004000 -#define PPC_FEATURE_ICACHE_SNOOP 0x00002000 -#define PPC_FEATURE_ARCH_2_05 0x00001000 -#define PPC_FEATURE_PA6T 0x00000800 -#define PPC_FEATURE_HAS_DFP 0x00000400 -#define PPC_FEATURE_POWER6_EXT 0x00000200 -#define PPC_FEATURE_ARCH_2_06 0x00000100 -#define PPC_FEATURE_HAS_VSX 0x00000080 -#define PPC_FEATURE_PSERIES_PERFMON_COMPAT 0x00000040 - -#define PPC_FEATURE_TRUE_LE 0x00000002 -#define PPC_FEATURE_PPC_LE 0x00000001 - -#define PPC_FEATURE2_ARCH_2_07 0x80000000 -#define PPC_FEATURE2_HTM 0x40000000 -#define PPC_FEATURE2_DSCR 0x20000000 -#define PPC_FEATURE2_EBB 0x10000000 -#define PPC_FEATURE2_ISEL 0x08000000 -#define PPC_FEATURE2_TAR 0x04000000 -#define PPC_FEATURE2_VEC_CRYPTO 0x02000000 -#define PPC_FEATURE2_HTM_NOSC 0x01000000 -#define PPC_FEATURE2_ARCH_3_00 0x00800000 -#define PPC_FEATURE2_HAS_IEEE128 0x00400000 -#define PPC_FEATURE2_DARN 0x00200000 -#define PPC_FEATURE2_SCV 0x00100000 -#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/ioctl.h b/lib/libc/include/powerpc64le-linux-musl/bits/ioctl.h deleted file mode 100644 index a2e7f3127b..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/ioctl.h +++ /dev/null @@ -1,217 +0,0 @@ -#define _IOC(a,b,c,d) ( ((a)<<29) | ((b)<<8) | (c) | ((d)<<16) ) -#define _IOC_NONE 1U -#define _IOC_WRITE 4U -#define _IOC_READ 2U - -#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0) -#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c)) -#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c)) -#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c)) - -#define FIONCLEX _IO('f', 2) -#define FIOCLEX _IO('f', 1) -#define FIOASYNC _IOW('f', 125, int) -#define FIONBIO _IOW('f', 126, int) -#define FIONREAD _IOR('f', 127, int) -#define TIOCINQ FIONREAD -#define FIOQSIZE _IOR('f', 128, char[8]) -#define TIOCGETP _IOR('t', 8, char[6]) -#define TIOCSETP _IOW('t', 9, char[6]) -#define TIOCSETN _IOW('t', 10, char[6]) - -#define TIOCSETC _IOW('t', 17, char[6]) -#define TIOCGETC _IOR('t', 18, char[6]) -#define TCGETS _IOR('t', 19, char[44]) -#define TCSETS _IOW('t', 20, char[44]) -#define TCSETSW _IOW('t', 21, char[44]) -#define TCSETSF _IOW('t', 22, char[44]) - -#define TCGETA _IOR('t', 23, char[20]) -#define TCSETA _IOW('t', 24, char[20]) -#define TCSETAW _IOW('t', 25, char[20]) -#define TCSETAF _IOW('t', 28, char[20]) - -#define TCSBRK _IO('t', 29) -#define TCXONC _IO('t', 30) -#define TCFLSH _IO('t', 31) - -#define TIOCSWINSZ _IOW('t', 103, char[8]) -#define TIOCGWINSZ _IOR('t', 104, char[8]) -#define TIOCSTART _IO('t', 110) -#define TIOCSTOP _IO('t', 111) - -#define TIOCOUTQ _IOR('t', 115, int) - -#define TIOCGLTC _IOR('t', 116, char[6]) -#define TIOCSLTC _IOW('t', 117, char[6]) -#define TIOCSPGRP _IOW('t', 118, int) -#define TIOCGPGRP _IOR('t', 119, int) - -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E - -#define TIOCSTI 0x5412 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG -#define TIOCM_OUT1 0x2000 -#define TIOCM_OUT2 0x4000 -#define TIOCM_LOOP 0x8000 - -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 -#define TIOCPKT_IOCTL 64 - -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425 -#define TIOCSBRK 0x5427 -#define TIOCCBRK 0x5428 -#define TIOCGSID 0x5429 -#define TIOCGRS485 0x542e -#define TIOCSRS485 0x542f -#define TIOCGPTN _IOR('T',0x30, unsigned int) -#define TIOCSPTLCK _IOW('T',0x31, int) -#define TIOCGDEV _IOR('T',0x32, unsigned int) -#define TIOCSIG _IOW('T',0x36, int) -#define TIOCVHANGUP 0x5437 -#define TIOCGPKT _IOR('T', 0x38, int) -#define TIOCGPTLCK _IOR('T', 0x39, int) -#define TIOCGEXCL _IOR('T', 0x40, int) -#define TIOCGPTPEER _IO('T', 0x41) - -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458 -#define TIOCSERGETLSR 0x5459 -#define TIOCSER_TEMT 0x01 -#define TIOCSERGETMULTI 0x545A -#define TIOCSERSETMULTI 0x545B - -#define TIOCMIWAIT 0x545C -#define TIOCGICOUNT 0x545D - - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 -#define N_6PACK 7 -#define N_MASC 8 -#define N_R3964 9 -#define N_PROFIBUS_FDL 10 -#define N_IRDA 11 -#define N_SMSBLOCK 12 -#define N_HDLC 13 -#define N_SYNC_PPP 14 -#define N_HCI 15 - -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 -#define SIOCGSTAMPNS 0x8907 - -#define SIOCADDRT 0x890B -#define SIOCDELRT 0x890C -#define SIOCRTMSG 0x890D - -#define SIOCGIFNAME 0x8910 -#define SIOCSIFLINK 0x8911 -#define SIOCGIFCONF 0x8912 -#define SIOCGIFFLAGS 0x8913 -#define SIOCSIFFLAGS 0x8914 -#define SIOCGIFADDR 0x8915 -#define SIOCSIFADDR 0x8916 -#define SIOCGIFDSTADDR 0x8917 -#define SIOCSIFDSTADDR 0x8918 -#define SIOCGIFBRDADDR 0x8919 -#define SIOCSIFBRDADDR 0x891a -#define SIOCGIFNETMASK 0x891b -#define SIOCSIFNETMASK 0x891c -#define SIOCGIFMETRIC 0x891d -#define SIOCSIFMETRIC 0x891e -#define SIOCGIFMEM 0x891f -#define SIOCSIFMEM 0x8920 -#define SIOCGIFMTU 0x8921 -#define SIOCSIFMTU 0x8922 -#define SIOCSIFNAME 0x8923 -#define SIOCSIFHWADDR 0x8924 -#define SIOCGIFENCAP 0x8925 -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 -#define SIOCGIFSLAVE 0x8929 -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 -#define SIOGIFINDEX SIOCGIFINDEX -#define SIOCSIFPFLAGS 0x8934 -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 -#define SIOCSIFHWBROADCAST 0x8937 -#define SIOCGIFCOUNT 0x8938 - -#define SIOCGIFBR 0x8940 -#define SIOCSIFBR 0x8941 - -#define SIOCGIFTXQLEN 0x8942 -#define SIOCSIFTXQLEN 0x8943 - -#define SIOCDARP 0x8953 -#define SIOCGARP 0x8954 -#define SIOCSARP 0x8955 - -#define SIOCDRARP 0x8960 -#define SIOCGRARP 0x8961 -#define SIOCSRARP 0x8962 - -#define SIOCGIFMAP 0x8970 -#define SIOCSIFMAP 0x8971 - -#define SIOCADDDLCI 0x8980 -#define SIOCDELDLCI 0x8981 - -#define SIOCDEVPRIVATE 0x89F0 -#define SIOCPROTOPRIVATE 0x89E0 \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/ipc.h b/lib/libc/include/powerpc64le-linux-musl/bits/ipc.h deleted file mode 100644 index b83c026759..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/ipc.h +++ /dev/null @@ -1,14 +0,0 @@ -struct ipc_perm { - key_t __ipc_perm_key; - uid_t uid; - gid_t gid; - uid_t cuid; - gid_t cgid; - mode_t mode; - int __ipc_perm_seq; - int __pad1; - long long __pad2; - long long __pad3; -}; - -#define IPC_64 0x100 \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/limits.h b/lib/libc/include/powerpc64le-linux-musl/bits/limits.h deleted file mode 100644 index 1be0deba7a..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/limits.h +++ /dev/null @@ -1,7 +0,0 @@ -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define LONG_BIT 64 -#endif - -#define LONG_MAX 0x7fffffffffffffffL -#define LLONG_MAX 0x7fffffffffffffffLL \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/mman.h b/lib/libc/include/powerpc64le-linux-musl/bits/mman.h deleted file mode 100644 index 91dfed1e5a..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/mman.h +++ /dev/null @@ -1,14 +0,0 @@ -#define PROT_SAO 0x10 - -#undef MAP_NORESERVE -#define MAP_NORESERVE 0x40 -#undef MAP_LOCKED -#define MAP_LOCKED 0x80 -#undef MAP_SYNC - -#undef MCL_CURRENT -#define MCL_CURRENT 0x2000 -#undef MCL_FUTURE -#define MCL_FUTURE 0x4000 -#undef MCL_ONFAULT -#define MCL_ONFAULT 0x8000 \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/msg.h b/lib/libc/include/powerpc64le-linux-musl/bits/msg.h deleted file mode 100644 index 39bdf2a3de..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/msg.h +++ /dev/null @@ -1,12 +0,0 @@ -struct msqid_ds { - struct ipc_perm msg_perm; - time_t msg_stime; - time_t msg_rtime; - time_t msg_ctime; - unsigned long msg_cbytes; - msgqnum_t msg_qnum; - msglen_t msg_qbytes; - pid_t msg_lspid; - pid_t msg_lrpid; - unsigned long __unused[2]; -}; \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/posix.h b/lib/libc/include/powerpc64le-linux-musl/bits/posix.h deleted file mode 100644 index 9fcc205cc1..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/posix.h +++ /dev/null @@ -1,2 +0,0 @@ -#define _POSIX_V6_LP64_OFF64 1 -#define _POSIX_V7_LP64_OFF64 1 \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/ptrace.h b/lib/libc/include/powerpc64le-linux-musl/bits/ptrace.h deleted file mode 100644 index fcaf79524f..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/ptrace.h +++ /dev/null @@ -1,23 +0,0 @@ -#define PTRACE_GETVRREGS 0x12 -#define PTRACE_SETVRREGS 0x13 -#define PTRACE_GETEVRREGS 0x14 -#define PTRACE_SETEVRREGS 0x15 -#define PTRACE_GETREGS64 0x16 -#define PTRACE_SETREGS64 0x17 -#define PTRACE_GET_DEBUGREG 0x19 -#define PTRACE_SET_DEBUGREG 0x1a -#define PTRACE_GETVSRREGS 0x1b -#define PTRACE_SETVSRREGS 0x1c -#define PTRACE_SINGLEBLOCK 0x100 - -#define PT_GETVRREGS PTRACE_GETVRREGS -#define PT_SETVRREGS PTRACE_SETVRREGS -#define PT_GETEVRREGS PTRACE_GETEVRREGS -#define PT_SETEVRREGS PTRACE_SETEVRREGS -#define PT_GETREGS64 PTRACE_GETREGS64 -#define PT_SETREGS64 PTRACE_SETREGS64 -#define PT_GET_DEBUGREG PTRACE_GET_DEBUGREG -#define PT_SET_DEBUGREG PTRACE_SET_DEBUGREG -#define PT_GETVSRREGS PTRACE_GETVSRREGS -#define PT_SETVSRREGS PTRACE_SETVSRREGS -#define PT_STEPBLOCK PTRACE_SINGLEBLOCK \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/reg.h b/lib/libc/include/powerpc64le-linux-musl/bits/reg.h deleted file mode 100644 index 5affe032bd..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/reg.h +++ /dev/null @@ -1,3 +0,0 @@ -#undef __WORDSIZE -#define __WORDSIZE 64 -/* FIXME */ \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/sem.h b/lib/libc/include/powerpc64le-linux-musl/bits/sem.h deleted file mode 100644 index fde97e13c5..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/sem.h +++ /dev/null @@ -1,13 +0,0 @@ -#include - -struct semid_ds { - struct ipc_perm sem_perm; - time_t sem_otime; - time_t sem_ctime; -#if __BYTE_ORDER == __BIG_ENDIAN - unsigned short __pad[3], sem_nsems; -#else - unsigned short sem_nsems, __pad[3]; -#endif - unsigned long __unused[2]; -}; \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/setjmp.h b/lib/libc/include/powerpc64le-linux-musl/bits/setjmp.h deleted file mode 100644 index 8aeb660b5b..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/setjmp.h +++ /dev/null @@ -1 +0,0 @@ -typedef unsigned __int128 __jmp_buf[32]; \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/shm.h b/lib/libc/include/powerpc64le-linux-musl/bits/shm.h deleted file mode 100644 index 0d958692cc..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/shm.h +++ /dev/null @@ -1,23 +0,0 @@ -#define SHMLBA 4096 - -struct shmid_ds { - struct ipc_perm shm_perm; - time_t shm_atime; - time_t shm_dtime; - time_t shm_ctime; - size_t shm_segsz; - pid_t shm_cpid; - pid_t shm_lpid; - unsigned long shm_nattch; - unsigned long __unused[2]; -}; - -struct shminfo { - unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; -}; - -struct shm_info { - int __used_ids; - unsigned long shm_tot, shm_rss, shm_swp; - unsigned long __swap_attempts, __swap_successes; -}; \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/signal.h b/lib/libc/include/powerpc64le-linux-musl/bits/signal.h deleted file mode 100644 index e18d54b2ae..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/signal.h +++ /dev/null @@ -1,107 +0,0 @@ -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) - -#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define MINSIGSTKSZ 4096 -#define SIGSTKSZ 10240 -#endif - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) - -typedef unsigned long greg_t, gregset_t[48]; - -typedef struct { - double fpregs[32]; - double fpscr; -} fpregset_t; - -typedef struct { - unsigned __int128 vrregs[32]; - unsigned _pad[3]; - unsigned vrsave; - unsigned vscr; - unsigned _pad2[3]; -} vrregset_t; - -typedef struct sigcontext { - unsigned long _unused[4]; - int signal; - int _pad0; - unsigned long handler; - unsigned long oldmask; - void *regs; - gregset_t gp_regs; - fpregset_t fp_regs; - vrregset_t *v_regs; - long vmx_reserve[34+34+32+1]; -} mcontext_t; - -#else - -typedef struct { - long __regs[4+4+48+33+1+34+34+32+1]; -} mcontext_t; - -#endif - -struct sigaltstack { - void *ss_sp; - int ss_flags; - size_t ss_size; -}; - -typedef struct __ucontext { - unsigned long uc_flags; - struct __ucontext *uc_link; - stack_t uc_stack; - sigset_t uc_sigmask; - mcontext_t uc_mcontext; -} ucontext_t; - -#define SA_NOCLDSTOP 1U -#define SA_NOCLDWAIT 2U -#define SA_SIGINFO 4U -#define SA_ONSTACK 0x08000000U -#define SA_RESTART 0x10000000U -#define SA_NODEFER 0x40000000U -#define SA_RESETHAND 0x80000000U -#define SA_RESTORER 0x04000000U - -#endif - -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGIOT SIGABRT -#define SIGBUS 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGUSR1 10 -#define SIGSEGV 11 -#define SIGUSR2 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGSTKFLT 16 -#define SIGCHLD 17 -#define SIGCONT 18 -#define SIGSTOP 19 -#define SIGTSTP 20 -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGURG 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGIO 29 -#define SIGPOLL SIGIO -#define SIGPWR 30 -#define SIGSYS 31 -#define SIGUNUSED SIGSYS - -#define _NSIG 65 \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/socket.h b/lib/libc/include/powerpc64le-linux-musl/bits/socket.h deleted file mode 100644 index d453d65ce4..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/socket.h +++ /dev/null @@ -1,61 +0,0 @@ -#include - -struct msghdr { - void *msg_name; - socklen_t msg_namelen; - struct iovec *msg_iov; -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad1, msg_iovlen; -#else - int msg_iovlen, __pad1; -#endif - void *msg_control; -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad2; - socklen_t msg_controllen; -#else - socklen_t msg_controllen; - int __pad2; -#endif - int msg_flags; -}; - -struct cmsghdr { -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad1; - socklen_t cmsg_len; -#else - socklen_t cmsg_len; - int __pad1; -#endif - int cmsg_level; - int cmsg_type; -}; - -#define SO_DEBUG 1 -#define SO_REUSEADDR 2 -#define SO_TYPE 3 -#define SO_ERROR 4 -#define SO_DONTROUTE 5 -#define SO_BROADCAST 6 -#define SO_SNDBUF 7 -#define SO_RCVBUF 8 -#define SO_KEEPALIVE 9 -#define SO_OOBINLINE 10 -#define SO_NO_CHECK 11 -#define SO_PRIORITY 12 -#define SO_LINGER 13 -#define SO_BSDCOMPAT 14 -#define SO_REUSEPORT 15 -#define SO_RCVLOWAT 16 -#define SO_SNDLOWAT 17 -#define SO_RCVTIMEO 18 -#define SO_SNDTIMEO 19 -#define SO_PASSCRED 20 -#define SO_PEERCRED 21 -#define SO_ACCEPTCONN 30 -#define SO_PEERSEC 31 -#define SO_SNDBUFFORCE 32 -#define SO_RCVBUFFORCE 33 -#define SO_PROTOCOL 38 -#define SO_DOMAIN 39 \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/stat.h b/lib/libc/include/powerpc64le-linux-musl/bits/stat.h deleted file mode 100644 index 5953fb9cf4..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/stat.h +++ /dev/null @@ -1,16 +0,0 @@ -struct stat { - dev_t st_dev; - ino_t st_ino; - nlink_t st_nlink; - mode_t st_mode; - uid_t st_uid; - gid_t st_gid; - dev_t st_rdev; - off_t st_size; - blksize_t st_blksize; - blkcnt_t st_blocks; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; - unsigned long __unused[3]; -}; \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/syscall.h b/lib/libc/include/powerpc64le-linux-musl/bits/syscall.h deleted file mode 100644 index 993472d871..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/syscall.h +++ /dev/null @@ -1,733 +0,0 @@ -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 -#define __NR_break 17 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_stty 31 -#define __NR_gtty 32 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_ftime 35 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_prof 44 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_lock 53 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_mpx 56 -#define __NR_setpgid 57 -#define __NR_ulimit 58 -#define __NR_oldolduname 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_profil 98 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_ioperm 101 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_olduname 109 -#define __NR_iopl 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_vm86 113 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_modify_ldt 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_query_module 166 -#define __NR_poll 167 -#define __NR_nfsservctl 168 -#define __NR_setresgid 169 -#define __NR_getresgid 170 -#define __NR_prctl 171 -#define __NR_rt_sigreturn 172 -#define __NR_rt_sigaction 173 -#define __NR_rt_sigprocmask 174 -#define __NR_rt_sigpending 175 -#define __NR_rt_sigtimedwait 176 -#define __NR_rt_sigqueueinfo 177 -#define __NR_rt_sigsuspend 178 -#define __NR_pread64 179 -#define __NR_pwrite64 180 -#define __NR_chown 181 -#define __NR_getcwd 182 -#define __NR_capget 183 -#define __NR_capset 184 -#define __NR_sigaltstack 185 -#define __NR_sendfile 186 -#define __NR_getpmsg 187 -#define __NR_putpmsg 188 -#define __NR_vfork 189 -#define __NR_ugetrlimit 190 -#define __NR_readahead 191 -#define __NR_pciconfig_read 198 -#define __NR_pciconfig_write 199 -#define __NR_pciconfig_iobase 200 -#define __NR_multiplexer 201 -#define __NR_getdents64 202 -#define __NR_pivot_root 203 -#define __NR_madvise 205 -#define __NR_mincore 206 -#define __NR_gettid 207 -#define __NR_tkill 208 -#define __NR_setxattr 209 -#define __NR_lsetxattr 210 -#define __NR_fsetxattr 211 -#define __NR_getxattr 212 -#define __NR_lgetxattr 213 -#define __NR_fgetxattr 214 -#define __NR_listxattr 215 -#define __NR_llistxattr 216 -#define __NR_flistxattr 217 -#define __NR_removexattr 218 -#define __NR_lremovexattr 219 -#define __NR_fremovexattr 220 -#define __NR_futex 221 -#define __NR_sched_setaffinity 222 -#define __NR_sched_getaffinity 223 -#define __NR_tuxcall 225 -#define __NR_io_setup 227 -#define __NR_io_destroy 228 -#define __NR_io_getevents 229 -#define __NR_io_submit 230 -#define __NR_io_cancel 231 -#define __NR_set_tid_address 232 -#define __NR_fadvise64 233 -#define __NR_exit_group 234 -#define __NR_lookup_dcookie 235 -#define __NR_epoll_create 236 -#define __NR_epoll_ctl 237 -#define __NR_epoll_wait 238 -#define __NR_remap_file_pages 239 -#define __NR_timer_create 240 -#define __NR_timer_settime 241 -#define __NR_timer_gettime 242 -#define __NR_timer_getoverrun 243 -#define __NR_timer_delete 244 -#define __NR_clock_settime 245 -#define __NR_clock_gettime 246 -#define __NR_clock_getres 247 -#define __NR_clock_nanosleep 248 -#define __NR_swapcontext 249 -#define __NR_tgkill 250 -#define __NR_utimes 251 -#define __NR_statfs64 252 -#define __NR_fstatfs64 253 -#define __NR_rtas 255 -#define __NR_sys_debug_setcontext 256 -#define __NR_migrate_pages 258 -#define __NR_mbind 259 -#define __NR_get_mempolicy 260 -#define __NR_set_mempolicy 261 -#define __NR_mq_open 262 -#define __NR_mq_unlink 263 -#define __NR_mq_timedsend 264 -#define __NR_mq_timedreceive 265 -#define __NR_mq_notify 266 -#define __NR_mq_getsetattr 267 -#define __NR_kexec_load 268 -#define __NR_add_key 269 -#define __NR_request_key 270 -#define __NR_keyctl 271 -#define __NR_waitid 272 -#define __NR_ioprio_set 273 -#define __NR_ioprio_get 274 -#define __NR_inotify_init 275 -#define __NR_inotify_add_watch 276 -#define __NR_inotify_rm_watch 277 -#define __NR_spu_run 278 -#define __NR_spu_create 279 -#define __NR_pselect6 280 -#define __NR_ppoll 281 -#define __NR_unshare 282 -#define __NR_splice 283 -#define __NR_tee 284 -#define __NR_vmsplice 285 -#define __NR_openat 286 -#define __NR_mkdirat 287 -#define __NR_mknodat 288 -#define __NR_fchownat 289 -#define __NR_futimesat 290 -#define __NR_newfstatat 291 -#define __NR_unlinkat 292 -#define __NR_renameat 293 -#define __NR_linkat 294 -#define __NR_symlinkat 295 -#define __NR_readlinkat 296 -#define __NR_fchmodat 297 -#define __NR_faccessat 298 -#define __NR_get_robust_list 299 -#define __NR_set_robust_list 300 -#define __NR_move_pages 301 -#define __NR_getcpu 302 -#define __NR_epoll_pwait 303 -#define __NR_utimensat 304 -#define __NR_signalfd 305 -#define __NR_timerfd_create 306 -#define __NR_eventfd 307 -#define __NR_sync_file_range2 308 -#define __NR_fallocate 309 -#define __NR_subpage_prot 310 -#define __NR_timerfd_settime 311 -#define __NR_timerfd_gettime 312 -#define __NR_signalfd4 313 -#define __NR_eventfd2 314 -#define __NR_epoll_create1 315 -#define __NR_dup3 316 -#define __NR_pipe2 317 -#define __NR_inotify_init1 318 -#define __NR_perf_event_open 319 -#define __NR_preadv 320 -#define __NR_pwritev 321 -#define __NR_rt_tgsigqueueinfo 322 -#define __NR_fanotify_init 323 -#define __NR_fanotify_mark 324 -#define __NR_prlimit64 325 -#define __NR_socket 326 -#define __NR_bind 327 -#define __NR_connect 328 -#define __NR_listen 329 -#define __NR_accept 330 -#define __NR_getsockname 331 -#define __NR_getpeername 332 -#define __NR_socketpair 333 -#define __NR_send 334 -#define __NR_sendto 335 -#define __NR_recv 336 -#define __NR_recvfrom 337 -#define __NR_shutdown 338 -#define __NR_setsockopt 339 -#define __NR_getsockopt 340 -#define __NR_sendmsg 341 -#define __NR_recvmsg 342 -#define __NR_recvmmsg 343 -#define __NR_accept4 344 -#define __NR_name_to_handle_at 345 -#define __NR_open_by_handle_at 346 -#define __NR_clock_adjtime 347 -#define __NR_syncfs 348 -#define __NR_sendmmsg 349 -#define __NR_setns 350 -#define __NR_process_vm_readv 351 -#define __NR_process_vm_writev 352 -#define __NR_finit_module 353 -#define __NR_kcmp 354 -#define __NR_sched_setattr 355 -#define __NR_sched_getattr 356 -#define __NR_renameat2 357 -#define __NR_seccomp 358 -#define __NR_getrandom 359 -#define __NR_memfd_create 360 -#define __NR_bpf 361 -#define __NR_execveat 362 -#define __NR_switch_endian 363 -#define __NR_userfaultfd 364 -#define __NR_membarrier 365 -#define __NR_mlock2 378 -#define __NR_copy_file_range 379 -#define __NR_preadv2 380 -#define __NR_pwritev2 381 -#define __NR_kexec_file_load 382 -#define __NR_statx 383 -#define __NR_pkey_alloc 384 -#define __NR_pkey_free 385 -#define __NR_pkey_mprotect 386 -#define __NR_rseq 387 -#define __NR_io_pgetevents 388 - -#define SYS_restart_syscall 0 -#define SYS_exit 1 -#define SYS_fork 2 -#define SYS_read 3 -#define SYS_write 4 -#define SYS_open 5 -#define SYS_close 6 -#define SYS_waitpid 7 -#define SYS_creat 8 -#define SYS_link 9 -#define SYS_unlink 10 -#define SYS_execve 11 -#define SYS_chdir 12 -#define SYS_time 13 -#define SYS_mknod 14 -#define SYS_chmod 15 -#define SYS_lchown 16 -#define SYS_break 17 -#define SYS_oldstat 18 -#define SYS_lseek 19 -#define SYS_getpid 20 -#define SYS_mount 21 -#define SYS_umount 22 -#define SYS_setuid 23 -#define SYS_getuid 24 -#define SYS_stime 25 -#define SYS_ptrace 26 -#define SYS_alarm 27 -#define SYS_oldfstat 28 -#define SYS_pause 29 -#define SYS_utime 30 -#define SYS_stty 31 -#define SYS_gtty 32 -#define SYS_access 33 -#define SYS_nice 34 -#define SYS_ftime 35 -#define SYS_sync 36 -#define SYS_kill 37 -#define SYS_rename 38 -#define SYS_mkdir 39 -#define SYS_rmdir 40 -#define SYS_dup 41 -#define SYS_pipe 42 -#define SYS_times 43 -#define SYS_prof 44 -#define SYS_brk 45 -#define SYS_setgid 46 -#define SYS_getgid 47 -#define SYS_signal 48 -#define SYS_geteuid 49 -#define SYS_getegid 50 -#define SYS_acct 51 -#define SYS_umount2 52 -#define SYS_lock 53 -#define SYS_ioctl 54 -#define SYS_fcntl 55 -#define SYS_mpx 56 -#define SYS_setpgid 57 -#define SYS_ulimit 58 -#define SYS_oldolduname 59 -#define SYS_umask 60 -#define SYS_chroot 61 -#define SYS_ustat 62 -#define SYS_dup2 63 -#define SYS_getppid 64 -#define SYS_getpgrp 65 -#define SYS_setsid 66 -#define SYS_sigaction 67 -#define SYS_sgetmask 68 -#define SYS_ssetmask 69 -#define SYS_setreuid 70 -#define SYS_setregid 71 -#define SYS_sigsuspend 72 -#define SYS_sigpending 73 -#define SYS_sethostname 74 -#define SYS_setrlimit 75 -#define SYS_getrlimit 76 -#define SYS_getrusage 77 -#define SYS_gettimeofday 78 -#define SYS_settimeofday 79 -#define SYS_getgroups 80 -#define SYS_setgroups 81 -#define SYS_select 82 -#define SYS_symlink 83 -#define SYS_oldlstat 84 -#define SYS_readlink 85 -#define SYS_uselib 86 -#define SYS_swapon 87 -#define SYS_reboot 88 -#define SYS_readdir 89 -#define SYS_mmap 90 -#define SYS_munmap 91 -#define SYS_truncate 92 -#define SYS_ftruncate 93 -#define SYS_fchmod 94 -#define SYS_fchown 95 -#define SYS_getpriority 96 -#define SYS_setpriority 97 -#define SYS_profil 98 -#define SYS_statfs 99 -#define SYS_fstatfs 100 -#define SYS_ioperm 101 -#define SYS_socketcall 102 -#define SYS_syslog 103 -#define SYS_setitimer 104 -#define SYS_getitimer 105 -#define SYS_stat 106 -#define SYS_lstat 107 -#define SYS_fstat 108 -#define SYS_olduname 109 -#define SYS_iopl 110 -#define SYS_vhangup 111 -#define SYS_idle 112 -#define SYS_vm86 113 -#define SYS_wait4 114 -#define SYS_swapoff 115 -#define SYS_sysinfo 116 -#define SYS_ipc 117 -#define SYS_fsync 118 -#define SYS_sigreturn 119 -#define SYS_clone 120 -#define SYS_setdomainname 121 -#define SYS_uname 122 -#define SYS_modify_ldt 123 -#define SYS_adjtimex 124 -#define SYS_mprotect 125 -#define SYS_sigprocmask 126 -#define SYS_create_module 127 -#define SYS_init_module 128 -#define SYS_delete_module 129 -#define SYS_get_kernel_syms 130 -#define SYS_quotactl 131 -#define SYS_getpgid 132 -#define SYS_fchdir 133 -#define SYS_bdflush 134 -#define SYS_sysfs 135 -#define SYS_personality 136 -#define SYS_afs_syscall 137 -#define SYS_setfsuid 138 -#define SYS_setfsgid 139 -#define SYS__llseek 140 -#define SYS_getdents 141 -#define SYS__newselect 142 -#define SYS_flock 143 -#define SYS_msync 144 -#define SYS_readv 145 -#define SYS_writev 146 -#define SYS_getsid 147 -#define SYS_fdatasync 148 -#define SYS__sysctl 149 -#define SYS_mlock 150 -#define SYS_munlock 151 -#define SYS_mlockall 152 -#define SYS_munlockall 153 -#define SYS_sched_setparam 154 -#define SYS_sched_getparam 155 -#define SYS_sched_setscheduler 156 -#define SYS_sched_getscheduler 157 -#define SYS_sched_yield 158 -#define SYS_sched_get_priority_max 159 -#define SYS_sched_get_priority_min 160 -#define SYS_sched_rr_get_interval 161 -#define SYS_nanosleep 162 -#define SYS_mremap 163 -#define SYS_setresuid 164 -#define SYS_getresuid 165 -#define SYS_query_module 166 -#define SYS_poll 167 -#define SYS_nfsservctl 168 -#define SYS_setresgid 169 -#define SYS_getresgid 170 -#define SYS_prctl 171 -#define SYS_rt_sigreturn 172 -#define SYS_rt_sigaction 173 -#define SYS_rt_sigprocmask 174 -#define SYS_rt_sigpending 175 -#define SYS_rt_sigtimedwait 176 -#define SYS_rt_sigqueueinfo 177 -#define SYS_rt_sigsuspend 178 -#define SYS_pread64 179 -#define SYS_pwrite64 180 -#define SYS_chown 181 -#define SYS_getcwd 182 -#define SYS_capget 183 -#define SYS_capset 184 -#define SYS_sigaltstack 185 -#define SYS_sendfile 186 -#define SYS_getpmsg 187 -#define SYS_putpmsg 188 -#define SYS_vfork 189 -#define SYS_ugetrlimit 190 -#define SYS_readahead 191 -#define SYS_pciconfig_read 198 -#define SYS_pciconfig_write 199 -#define SYS_pciconfig_iobase 200 -#define SYS_multiplexer 201 -#define SYS_getdents64 202 -#define SYS_pivot_root 203 -#define SYS_madvise 205 -#define SYS_mincore 206 -#define SYS_gettid 207 -#define SYS_tkill 208 -#define SYS_setxattr 209 -#define SYS_lsetxattr 210 -#define SYS_fsetxattr 211 -#define SYS_getxattr 212 -#define SYS_lgetxattr 213 -#define SYS_fgetxattr 214 -#define SYS_listxattr 215 -#define SYS_llistxattr 216 -#define SYS_flistxattr 217 -#define SYS_removexattr 218 -#define SYS_lremovexattr 219 -#define SYS_fremovexattr 220 -#define SYS_futex 221 -#define SYS_sched_setaffinity 222 -#define SYS_sched_getaffinity 223 -#define SYS_tuxcall 225 -#define SYS_io_setup 227 -#define SYS_io_destroy 228 -#define SYS_io_getevents 229 -#define SYS_io_submit 230 -#define SYS_io_cancel 231 -#define SYS_set_tid_address 232 -#define SYS_fadvise64 233 -#define SYS_exit_group 234 -#define SYS_lookup_dcookie 235 -#define SYS_epoll_create 236 -#define SYS_epoll_ctl 237 -#define SYS_epoll_wait 238 -#define SYS_remap_file_pages 239 -#define SYS_timer_create 240 -#define SYS_timer_settime 241 -#define SYS_timer_gettime 242 -#define SYS_timer_getoverrun 243 -#define SYS_timer_delete 244 -#define SYS_clock_settime 245 -#define SYS_clock_gettime 246 -#define SYS_clock_getres 247 -#define SYS_clock_nanosleep 248 -#define SYS_swapcontext 249 -#define SYS_tgkill 250 -#define SYS_utimes 251 -#define SYS_statfs64 252 -#define SYS_fstatfs64 253 -#define SYS_rtas 255 -#define SYS_sys_debug_setcontext 256 -#define SYS_migrate_pages 258 -#define SYS_mbind 259 -#define SYS_get_mempolicy 260 -#define SYS_set_mempolicy 261 -#define SYS_mq_open 262 -#define SYS_mq_unlink 263 -#define SYS_mq_timedsend 264 -#define SYS_mq_timedreceive 265 -#define SYS_mq_notify 266 -#define SYS_mq_getsetattr 267 -#define SYS_kexec_load 268 -#define SYS_add_key 269 -#define SYS_request_key 270 -#define SYS_keyctl 271 -#define SYS_waitid 272 -#define SYS_ioprio_set 273 -#define SYS_ioprio_get 274 -#define SYS_inotify_init 275 -#define SYS_inotify_add_watch 276 -#define SYS_inotify_rm_watch 277 -#define SYS_spu_run 278 -#define SYS_spu_create 279 -#define SYS_pselect6 280 -#define SYS_ppoll 281 -#define SYS_unshare 282 -#define SYS_splice 283 -#define SYS_tee 284 -#define SYS_vmsplice 285 -#define SYS_openat 286 -#define SYS_mkdirat 287 -#define SYS_mknodat 288 -#define SYS_fchownat 289 -#define SYS_futimesat 290 -#define SYS_newfstatat 291 -#define SYS_unlinkat 292 -#define SYS_renameat 293 -#define SYS_linkat 294 -#define SYS_symlinkat 295 -#define SYS_readlinkat 296 -#define SYS_fchmodat 297 -#define SYS_faccessat 298 -#define SYS_get_robust_list 299 -#define SYS_set_robust_list 300 -#define SYS_move_pages 301 -#define SYS_getcpu 302 -#define SYS_epoll_pwait 303 -#define SYS_utimensat 304 -#define SYS_signalfd 305 -#define SYS_timerfd_create 306 -#define SYS_eventfd 307 -#define SYS_sync_file_range2 308 -#define SYS_fallocate 309 -#define SYS_subpage_prot 310 -#define SYS_timerfd_settime 311 -#define SYS_timerfd_gettime 312 -#define SYS_signalfd4 313 -#define SYS_eventfd2 314 -#define SYS_epoll_create1 315 -#define SYS_dup3 316 -#define SYS_pipe2 317 -#define SYS_inotify_init1 318 -#define SYS_perf_event_open 319 -#define SYS_preadv 320 -#define SYS_pwritev 321 -#define SYS_rt_tgsigqueueinfo 322 -#define SYS_fanotify_init 323 -#define SYS_fanotify_mark 324 -#define SYS_prlimit64 325 -#define SYS_socket 326 -#define SYS_bind 327 -#define SYS_connect 328 -#define SYS_listen 329 -#define SYS_accept 330 -#define SYS_getsockname 331 -#define SYS_getpeername 332 -#define SYS_socketpair 333 -#define SYS_send 334 -#define SYS_sendto 335 -#define SYS_recv 336 -#define SYS_recvfrom 337 -#define SYS_shutdown 338 -#define SYS_setsockopt 339 -#define SYS_getsockopt 340 -#define SYS_sendmsg 341 -#define SYS_recvmsg 342 -#define SYS_recvmmsg 343 -#define SYS_accept4 344 -#define SYS_name_to_handle_at 345 -#define SYS_open_by_handle_at 346 -#define SYS_clock_adjtime 347 -#define SYS_syncfs 348 -#define SYS_sendmmsg 349 -#define SYS_setns 350 -#define SYS_process_vm_readv 351 -#define SYS_process_vm_writev 352 -#define SYS_finit_module 353 -#define SYS_kcmp 354 -#define SYS_sched_setattr 355 -#define SYS_sched_getattr 356 -#define SYS_renameat2 357 -#define SYS_seccomp 358 -#define SYS_getrandom 359 -#define SYS_memfd_create 360 -#define SYS_bpf 361 -#define SYS_execveat 362 -#define SYS_switch_endian 363 -#define SYS_userfaultfd 364 -#define SYS_membarrier 365 -#define SYS_mlock2 378 -#define SYS_copy_file_range 379 -#define SYS_preadv2 380 -#define SYS_pwritev2 381 -#define SYS_kexec_file_load 382 -#define SYS_statx 383 -#define SYS_pkey_alloc 384 -#define SYS_pkey_free 385 -#define SYS_pkey_mprotect 386 -#define SYS_rseq 387 -#define SYS_io_pgetevents 388 \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/termios.h b/lib/libc/include/powerpc64le-linux-musl/bits/termios.h deleted file mode 100644 index 2794c01c65..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/termios.h +++ /dev/null @@ -1,171 +0,0 @@ -#undef NCCS -#define NCCS 19 -struct termios { - tcflag_t c_iflag; - tcflag_t c_oflag; - tcflag_t c_cflag; - tcflag_t c_lflag; - cc_t c_cc[NCCS]; - cc_t c_line; - speed_t __c_ispeed; - speed_t __c_ospeed; -}; - -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VMIN 5 -#define VEOL 6 -#define VTIME 7 -#define VEOL2 8 -#define VSWTC 9 -#define VWERASE 10 -#define VREPRINT 11 -#define VSUSP 12 -#define VSTART 13 -#define VSTOP 14 -#define VLNEXT 15 -#define VDISCARD 16 - -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IXON 0001000 -#define IXOFF 0002000 -#define IXANY 0004000 -#define IUCLC 0010000 -#define IMAXBEL 0020000 -#define IUTF8 0040000 - -#define OPOST 0000001 -#define ONLCR 0000002 -#define OLCUC 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE) -#define NLDLY 0001400 -#define NL0 0000000 -#define NL1 0000400 -#define NL2 0001000 -#define NL3 0001400 -#define TABDLY 0006000 -#define TAB0 0000000 -#define TAB1 0002000 -#define TAB2 0004000 -#define TAB3 0006000 -#define CRDLY 0030000 -#define CR0 0000000 -#define CR1 0010000 -#define CR2 0020000 -#define CR3 0030000 -#define FFDLY 0040000 -#define FF0 0000000 -#define FF1 0040000 -#define BSDLY 0100000 -#define BS0 0000000 -#define BS1 0100000 -#endif - -#define VTDLY 0200000 -#define VT0 0000000 -#define VT1 0200000 - -#define B0 0000000 -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 - -#define B57600 00020 -#define B115200 00021 -#define B230400 00022 -#define B460800 00023 -#define B500000 00024 -#define B576000 00025 -#define B921600 00026 -#define B1000000 00027 -#define B1152000 00030 -#define B1500000 00031 -#define B2000000 00032 -#define B2500000 00033 -#define B3000000 00034 -#define B3500000 00035 -#define B4000000 00036 - -#define CSIZE 00001400 -#define CS5 00000000 -#define CS6 00000400 -#define CS7 00001000 -#define CS8 00001400 -#define CSTOPB 00002000 -#define CREAD 00004000 -#define PARENB 00010000 -#define PARODD 00020000 -#define HUPCL 00040000 -#define CLOCAL 00100000 - -#define ECHOE 0x00000002 -#define ECHOK 0x00000004 -#define ECHO 0x00000008 -#define ECHONL 0x00000010 -#define ISIG 0x00000080 -#define ICANON 0x00000100 -#define IEXTEN 0x00000400 -#define TOSTOP 0x00400000 -#define NOFLSH 0x80000000 - -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define EXTA 0000016 -#define EXTB 0000017 -#define CBAUD 00377 -#define CBAUDEX 0000020 -#define CIBAUD 077600000 -#define CMSPAR 010000000000 -#define CRTSCTS 020000000000 - -#define XCASE 0x00004000 -#define ECHOCTL 0x00000040 -#define ECHOPRT 0x00000020 -#define ECHOKE 0x00000001 -#define FLUSHO 0x00800000 -#define PENDIN 0x20000000 -#define EXTPROC 0x10000000 - -#define XTABS 00006000 -#define TIOCSER_TEMT 0x01 -#endif \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/user.h b/lib/libc/include/powerpc64le-linux-musl/bits/user.h deleted file mode 100644 index cedbed6df7..0000000000 --- a/lib/libc/include/powerpc64le-linux-musl/bits/user.h +++ /dev/null @@ -1,25 +0,0 @@ -struct pt_regs { - unsigned long gpr[32], nip, msr, orig_gpr3, ctr, link, xer, ccr, softe; - unsigned long trap, dar, dsisr, result; -}; - -struct user { - struct pt_regs regs; - unsigned long u_tsize, u_dsize, u_ssize; - unsigned long start_code, start_data, start_stack; - long signal; - void *u_ar0; - unsigned long magic; - char u_comm[32]; -}; - -#define ELF_NGREG 48 -#define ELF_NFPREG 33 -#define ELF_NVRREG 34 -typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; -typedef double elf_fpreg_t, elf_fpregset_t[ELF_NFPREG]; -typedef struct { unsigned u[4]; } -#ifdef __GNUC__ -__attribute__((__aligned__(16))) -#endif - elf_vrreg_t, elf_vrregset_t[ELF_NVRREG]; \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bfd.h b/lib/libc/include/riscv32-linux-musl/bfd.h deleted file mode 100644 index 1e0f4b1ef1..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bfd.h +++ /dev/null @@ -1,8034 +0,0 @@ -/* 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-2019 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 32 - -#define BFD_HOST_64BIT_LONG 0 -#define BFD_HOST_64BIT_LONG_LONG 1 -#if 1 -#define BFD_HOST_64_BIT long long -#define BFD_HOST_U_64_BIT unsigned long 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) - -/* 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; - 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) - -#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 bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#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_get_section_limit_octets(bfd, sec) / 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) - -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 *); - -/* 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_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) - -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); - -#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_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_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 **); -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 int 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 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)); - -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_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); - -/* 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); - -/* XCOFF support routines for the linker. */ - -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_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -/* 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 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 *); - -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 *); - -struct elf32_arm_params { - char *thumb_entry_symbol; - int byteswap_code; - int target1_is_rel; - char * target2_type; - int fix_v4bx; - int use_blx; - bfd_arm_vfp11_fix vfp11_denorm_fix; - bfd_arm_stm32l4xx_fix stm32l4xx_fix; - int no_enum_size_warning; - int no_wchar_size_warning; - int pic_veneer; - int fix_cortex_a8; - int fix_arm1176; - int merge_exidx_entries; - int cmse_implib; - bfd *in_implib_bfd; -}; - -void bfd_elf32_arm_set_target_params - (bfd *, struct bfd_link_info *, struct elf32_arm_params *); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_keep_private_stub_output_sections - (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 *, 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 - (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 *, - struct bfd_section *, unsigned int), - 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); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -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, int); - -extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, 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 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 - (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 *); -/* 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); - -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); - -/* 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); - -/* MIPS ABI flags data access. For the disassembler. */ -struct elf_internal_abiflags_v0; -extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); - -/* C-SKY functions. */ -extern bfd_boolean elf32_csky_build_stubs - (struct bfd_link_info *); -extern bfd_boolean elf32_csky_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section *(*) (const char*, struct bfd_section*), - void (*) (void)); -extern void elf32_csky_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern int elf32_csky_setup_section_lists - (bfd *, struct bfd_link_info *); -/* 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); - -/* 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) \ - (*(const unsigned char *) (ptr) & 0xff) -#define bfd_get_signed_8(abfd, ptr) \ - (((*(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_vma) 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 - - /* 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; -}; - -/* 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 _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]) - -#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) - -#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)) - -/* 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)) - -#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 - (bfd *abfd, asection *sec, flagword flags); - -void bfd_rename_section - (bfd *abfd, 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 - (bfd *abfd, 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); - -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 - 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_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_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_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. */ -#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_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_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; -} -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 (bfd *abfd); - -unsigned long bfd_get_mach (bfd *abfd); - -unsigned int bfd_arch_bits_per_byte (bfd *abfd); - -unsigned int bfd_arch_bits_per_address (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 (bfd *abfd); - -unsigned int bfd_arch_mach_octets_per_byte - (enum bfd_architecture arch, unsigned long machine); - -/* Extracted from reloc.c. */ - -typedef enum bfd_reloc_status -{ - /* No errors detected. Note - the value 2 is used so that it - will not be mistaken for the boolean TRUE or FALSE values. */ - bfd_reloc_ok = 2, - - /* The relocation was performed, but there was an overflow. */ - bfd_reloc_overflow, - - /* The address to relocate was not within the section supplied. */ - bfd_reloc_outofrange, - - /* Used by special functions. */ - bfd_reloc_continue, - - /* Unsupported relocation size requested. */ - bfd_reloc_notsupported, - - /* 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. */ - 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, - -/* 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_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_HIGHER, - 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, - -/* 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, - -/* 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_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 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, - -/* 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, - -/* 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, - -/* 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 : 20; - - /* 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 - - /* 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 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 - 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; -}; - -/* 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, - 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_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_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. */ - 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_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 *); - - /* 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; - -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 \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bfd_stdint.h b/lib/libc/include/riscv32-linux-musl/bfd_stdint.h deleted file mode 100644 index 91a3d7ea2f..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for riscv32-linux-musl-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/alltypes.h b/lib/libc/include/riscv32-linux-musl/bits/alltypes.h deleted file mode 100644 index c0c65a6d93..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/alltypes.h +++ /dev/null @@ -1,385 +0,0 @@ -#define _Addr int -#define _Int64 long long -#define _Reg int - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef int wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif - -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/fenv.h b/lib/libc/include/riscv32-linux-musl/bits/fenv.h deleted file mode 100644 index f3040af500..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/fenv.h +++ /dev/null @@ -1,18 +0,0 @@ -#define FE_INVALID 16 -#define FE_DIVBYZERO 8 -#define FE_OVERFLOW 4 -#define FE_UNDERFLOW 2 -#define FE_INEXACT 1 - -#define FE_ALL_EXCEPT 31 - -#define FE_TONEAREST 0 -#define FE_DOWNWARD 2 -#define FE_UPWARD 3 -#define FE_TOWARDZERO 1 - -typedef unsigned int fexcept_t; - -typedef unsigned int fenv_t; - -#define FE_DFL_ENV ((const fenv_t *) -1) \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/float.h b/lib/libc/include/riscv32-linux-musl/bits/float.h deleted file mode 100644 index f8cb54bb3f..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/float.h +++ /dev/null @@ -1,16 +0,0 @@ -#define FLT_EVAL_METHOD 0 - -#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L -#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L -#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L -#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L - -#define LDBL_MANT_DIG 113 -#define LDBL_MIN_EXP (-16381) -#define LDBL_MAX_EXP 16384 - -#define LDBL_DIG 33 -#define LDBL_MIN_10_EXP (-4931) -#define LDBL_MAX_10_EXP 4932 - -#define DECIMAL_DIG 36 \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/ipc.h b/lib/libc/include/riscv32-linux-musl/bits/ipc.h deleted file mode 100644 index 37561db60d..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/ipc.h +++ /dev/null @@ -1,14 +0,0 @@ -struct ipc_perm { - key_t __ipc_perm_key; - uid_t uid; - gid_t gid; - uid_t cuid; - gid_t cgid; - mode_t mode; - unsigned short __ipc_perm_seq; - - unsigned long __pad1; - unsigned long __pad2; -}; - -#define IPC_64 0 \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/posix.h b/lib/libc/include/riscv32-linux-musl/bits/posix.h deleted file mode 100644 index 0a6c8f6f20..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/posix.h +++ /dev/null @@ -1,2 +0,0 @@ -# define _POSIX_V6_ILP32_OFFBIG 1 -# define _POSIX_V7_ILP32_OFFBIG 1 \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/reg.h b/lib/libc/include/riscv32-linux-musl/bits/reg.h deleted file mode 100644 index 46adb050bc..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/reg.h +++ /dev/null @@ -1,8 +0,0 @@ -#undef __WORDSIZE -#define __WORDSIZE 32 -#define REG_PC 0 -#define REG_RA 1 -#define REG_SP 2 -#define REG_TP 4 -#define REG_S0 8 -#define REG_A0 10 \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/sem.h b/lib/libc/include/riscv32-linux-musl/bits/sem.h deleted file mode 100644 index d1734344c1..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/sem.h +++ /dev/null @@ -1,9 +0,0 @@ -struct semid_ds { - struct ipc_perm sem_perm; - time_t sem_otime; - time_t sem_ctime; - unsigned short sem_nsems; - char __sem_nsems_pad[sizeof(time_t)-sizeof(short)]; - time_t __unused3; - time_t __unused4; -}; \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/setjmp.h b/lib/libc/include/riscv32-linux-musl/bits/setjmp.h deleted file mode 100644 index 711189bd83..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/setjmp.h +++ /dev/null @@ -1 +0,0 @@ -typedef unsigned long __jmp_buf[40]; \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/shm.h b/lib/libc/include/riscv32-linux-musl/bits/shm.h deleted file mode 100644 index 10041f9bf2..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/shm.h +++ /dev/null @@ -1,25 +0,0 @@ -#define SHMLBA 4096 - -struct shmid_ds -{ - struct ipc_perm shm_perm; - size_t shm_segsz; - time_t shm_atime; - time_t shm_dtime; - time_t shm_ctime; - pid_t shm_cpid; - pid_t shm_lpid; - unsigned long shm_nattch; - unsigned long __pad1; - unsigned long __pad2; -}; - -struct shminfo { - unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; -}; - -struct shm_info { - int __used_ids; - unsigned long shm_tot, shm_rss, shm_swp; - unsigned long __swap_attempts, __swap_successes; -}; \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/signal.h b/lib/libc/include/riscv32-linux-musl/bits/signal.h deleted file mode 100644 index 6377923876..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/signal.h +++ /dev/null @@ -1,113 +0,0 @@ -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) - -#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -# define MINSIGSTKSZ 2048 -# define SIGSTKSZ 8192 -#endif - -/* gregs[0] holds the program counter. */ - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -typedef unsigned long greg_t; -typedef unsigned long gregset_t[32]; - -struct __riscv_f_ext_state { - unsigned int f[32]; - unsigned int fcsr; -}; - -struct __riscv_d_ext_state { - unsigned long long f[32]; - unsigned int fcsr; -}; - -struct __riscv_q_ext_state { - unsigned long long f[64] __attribute__((aligned(16))); - unsigned int fcsr; - unsigned int reserved[3]; -}; - -union __riscv_fp_state { - struct __riscv_f_ext_state f; - struct __riscv_d_ext_state d; - struct __riscv_q_ext_state q; -}; - -typedef union __riscv_fp_state fpregset_t; - -typedef struct sigcontext { - gregset_t gregs; - fpregset_t fpregs; -} mcontext_t; - -#else -typedef struct { - unsigned long gregs[32]; - unsigned long long fpregs[66]; -} mcontext_t; -#endif - -struct sigaltstack { - void *ss_sp; - int ss_flags; - size_t ss_size; -}; - -typedef struct __ucontext -{ - unsigned long uc_flags; - struct __ucontext *uc_link; - stack_t uc_stack; - sigset_t uc_sigmask; - char __unused[1024 / 8 - sizeof(sigset_t)]; - mcontext_t uc_mcontext; -} ucontext_t; - -#define SA_NOCLDSTOP 1 -#define SA_NOCLDWAIT 2 -#define SA_SIGINFO 4 -#define SA_ONSTACK 0x08000000 -#define SA_RESTART 0x10000000 -#define SA_NODEFER 0x40000000 -#define SA_RESETHAND 0x80000000 -#define SA_RESTORER 0x04000000 - -#endif - -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGIOT SIGABRT -#define SIGBUS 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGUSR1 10 -#define SIGSEGV 11 -#define SIGUSR2 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGSTKFLT 16 -#define SIGCHLD 17 -#define SIGCONT 18 -#define SIGSTOP 19 -#define SIGTSTP 20 -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGURG 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGIO 29 -#define SIGPOLL SIGIO -#define SIGPWR 30 -#define SIGSYS 31 -#define SIGUNUSED SIGSYS - -#define _NSIG 65 \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/socket.h b/lib/libc/include/riscv32-linux-musl/bits/socket.h deleted file mode 100644 index b4e9fb6a1c..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/socket.h +++ /dev/null @@ -1,33 +0,0 @@ -#include - -struct msghdr { - void *msg_name; - socklen_t msg_namelen; - struct iovec *msg_iov; -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad1, msg_iovlen; -#else - int msg_iovlen, __pad1; -#endif - void *msg_control; -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad2; - socklen_t msg_controllen; -#else - socklen_t msg_controllen; - int __pad2; -#endif - int msg_flags; -}; - -struct cmsghdr { -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad1; - socklen_t cmsg_len; -#else - socklen_t cmsg_len; - int __pad1; -#endif - int cmsg_level; - int cmsg_type; -}; \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/stat.h b/lib/libc/include/riscv32-linux-musl/bits/stat.h deleted file mode 100644 index 6ce9af119f..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/stat.h +++ /dev/null @@ -1,18 +0,0 @@ -struct stat { - dev_t st_dev; - ino_t st_ino; - mode_t st_mode; - nlink_t st_nlink; - uid_t st_uid; - gid_t st_gid; - dev_t st_rdev; - unsigned long __pad; - off_t st_size; - blksize_t st_blksize; - int __pad2; - blkcnt_t st_blocks; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; - unsigned __unused[2]; -}; \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/stdint.h b/lib/libc/include/riscv32-linux-musl/bits/stdint.h deleted file mode 100644 index b70a87dc9d..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/stdint.h +++ /dev/null @@ -1,20 +0,0 @@ -typedef int32_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef uint32_t uint_fast16_t; -typedef uint32_t uint_fast32_t; - -#define INT_FAST16_MIN INT32_MIN -#define INT_FAST32_MIN INT32_MIN - -#define INT_FAST16_MAX INT32_MAX -#define INT_FAST32_MAX INT32_MAX - -#define UINT_FAST16_MAX UINT32_MAX -#define UINT_FAST32_MAX UINT32_MAX - -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX -#define PTRDIFF_MIN INT32_MIN -#define PTRDIFF_MAX INT32_MAX -#define SIZE_MAX UINT32_MAX \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/syscall.h b/lib/libc/include/riscv32-linux-musl/bits/syscall.h deleted file mode 100644 index 4d87edf1fb..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/syscall.h +++ /dev/null @@ -1,555 +0,0 @@ -#define __NR_io_setup 0 -#define __NR_io_destroy 1 -#define __NR_io_submit 2 -#define __NR_io_cancel 3 -#define __NR_io_getevents 4 -#define __NR_setxattr 5 -#define __NR_lsetxattr 6 -#define __NR_fsetxattr 7 -#define __NR_getxattr 8 -#define __NR_lgetxattr 9 -#define __NR_fgetxattr 10 -#define __NR_listxattr 11 -#define __NR_llistxattr 12 -#define __NR_flistxattr 13 -#define __NR_removexattr 14 -#define __NR_lremovexattr 15 -#define __NR_fremovexattr 16 -#define __NR_getcwd 17 -#define __NR_lookup_dcookie 18 -#define __NR_eventfd2 19 -#define __NR_epoll_create1 20 -#define __NR_epoll_ctl 21 -#define __NR_epoll_pwait 22 -#define __NR_dup 23 -#define __NR_dup3 24 -#define __NR_fcntl 25 -#define __NR_inotify_init1 26 -#define __NR_inotify_add_watch 27 -#define __NR_inotify_rm_watch 28 -#define __NR_ioctl 29 -#define __NR_ioprio_set 30 -#define __NR_ioprio_get 31 -#define __NR_flock 32 -#define __NR_mknodat 33 -#define __NR_mkdirat 34 -#define __NR_unlinkat 35 -#define __NR_symlinkat 36 -#define __NR_linkat 37 -#define __NR_renameat 38 -#define __NR_umount2 39 -#define __NR_mount 40 -#define __NR_pivot_root 41 -#define __NR_nfsservctl 42 -#define __NR_statfs 43 -#define __NR_fstatfs 44 -#define __NR_truncate 45 -#define __NR_ftruncate 46 -#define __NR_fallocate 47 -#define __NR_faccessat 48 -#define __NR_chdir 49 -#define __NR_fchdir 50 -#define __NR_chroot 51 -#define __NR_fchmod 52 -#define __NR_fchmodat 53 -#define __NR_fchownat 54 -#define __NR_fchown 55 -#define __NR_openat 56 -#define __NR_close 57 -#define __NR_vhangup 58 -#define __NR_pipe2 59 -#define __NR_quotactl 60 -#define __NR_getdents64 61 -#define __NR_lseek 62 -#define __NR_read 63 -#define __NR_write 64 -#define __NR_readv 65 -#define __NR_writev 66 -#define __NR_pread64 67 -#define __NR_pwrite64 68 -#define __NR_preadv 69 -#define __NR_pwritev 70 -#define __NR_sendfile 71 -#define __NR_pselect6 72 -#define __NR_ppoll 73 -#define __NR_signalfd4 74 -#define __NR_vmsplice 75 -#define __NR_splice 76 -#define __NR_tee 77 -#define __NR_readlinkat 78 -#define __NR_fstatat 79 -#define __NR_fstat 80 -#define __NR_sync 81 -#define __NR_fsync 82 -#define __NR_fdatasync 83 -#define __NR_sync_file_range 84 -#define __NR_timerfd_create 85 -#define __NR_timerfd_settime 86 -#define __NR_timerfd_gettime 87 -#define __NR_utimensat 88 -#define __NR_acct 89 -#define __NR_capget 90 -#define __NR_capset 91 -#define __NR_personality 92 -#define __NR_exit 93 -#define __NR_exit_group 94 -#define __NR_waitid 95 -#define __NR_set_tid_address 96 -#define __NR_unshare 97 -#define __NR_futex 98 -#define __NR_set_robust_list 99 -#define __NR_get_robust_list 100 -#define __NR_nanosleep 101 -#define __NR_getitimer 102 -#define __NR_setitimer 103 -#define __NR_kexec_load 104 -#define __NR_init_module 105 -#define __NR_delete_module 106 -#define __NR_timer_create 107 -#define __NR_timer_gettime 108 -#define __NR_timer_getoverrun 109 -#define __NR_timer_settime 110 -#define __NR_timer_delete 111 -#define __NR_clock_settime 112 -#define __NR_clock_gettime 113 -#define __NR_clock_getres 114 -#define __NR_clock_nanosleep 115 -#define __NR_syslog 116 -#define __NR_ptrace 117 -#define __NR_sched_setparam 118 -#define __NR_sched_setscheduler 119 -#define __NR_sched_getscheduler 120 -#define __NR_sched_getparam 121 -#define __NR_sched_setaffinity 122 -#define __NR_sched_getaffinity 123 -#define __NR_sched_yield 124 -#define __NR_sched_get_priority_max 125 -#define __NR_sched_get_priority_min 126 -#define __NR_sched_rr_get_interval 127 -#define __NR_restart_syscall 128 -#define __NR_kill 129 -#define __NR_tkill 130 -#define __NR_tgkill 131 -#define __NR_sigaltstack 132 -#define __NR_rt_sigsuspend 133 -#define __NR_rt_sigaction 134 -#define __NR_rt_sigprocmask 135 -#define __NR_rt_sigpending 136 -#define __NR_rt_sigtimedwait 137 -#define __NR_rt_sigqueueinfo 138 -#define __NR_rt_sigreturn 139 -#define __NR_setpriority 140 -#define __NR_getpriority 141 -#define __NR_reboot 142 -#define __NR_setregid 143 -#define __NR_setgid 144 -#define __NR_setreuid 145 -#define __NR_setuid 146 -#define __NR_setresuid 147 -#define __NR_getresuid 148 -#define __NR_setresgid 149 -#define __NR_getresgid 150 -#define __NR_setfsuid 151 -#define __NR_setfsgid 152 -#define __NR_times 153 -#define __NR_setpgid 154 -#define __NR_getpgid 155 -#define __NR_getsid 156 -#define __NR_setsid 157 -#define __NR_getgroups 158 -#define __NR_setgroups 159 -#define __NR_uname 160 -#define __NR_sethostname 161 -#define __NR_setdomainname 162 -#define __NR_getrlimit 163 -#define __NR_setrlimit 164 -#define __NR_getrusage 165 -#define __NR_umask 166 -#define __NR_prctl 167 -#define __NR_getcpu 168 -#define __NR_gettimeofday 169 -#define __NR_settimeofday 170 -#define __NR_adjtimex 171 -#define __NR_getpid 172 -#define __NR_getppid 173 -#define __NR_getuid 174 -#define __NR_geteuid 175 -#define __NR_getgid 176 -#define __NR_getegid 177 -#define __NR_gettid 178 -#define __NR_sysinfo 179 -#define __NR_mq_open 180 -#define __NR_mq_unlink 181 -#define __NR_mq_timedsend 182 -#define __NR_mq_timedreceive 183 -#define __NR_mq_notify 184 -#define __NR_mq_getsetattr 185 -#define __NR_msgget 186 -#define __NR_msgctl 187 -#define __NR_msgrcv 188 -#define __NR_msgsnd 189 -#define __NR_semget 190 -#define __NR_semctl 191 -#define __NR_semtimedop 192 -#define __NR_semop 193 -#define __NR_shmget 194 -#define __NR_shmctl 195 -#define __NR_shmat 196 -#define __NR_shmdt 197 -#define __NR_socket 198 -#define __NR_socketpair 199 -#define __NR_bind 200 -#define __NR_listen 201 -#define __NR_accept 202 -#define __NR_connect 203 -#define __NR_getsockname 204 -#define __NR_getpeername 205 -#define __NR_sendto 206 -#define __NR_recvfrom 207 -#define __NR_setsockopt 208 -#define __NR_getsockopt 209 -#define __NR_shutdown 210 -#define __NR_sendmsg 211 -#define __NR_recvmsg 212 -#define __NR_readahead 213 -#define __NR_brk 214 -#define __NR_munmap 215 -#define __NR_mremap 216 -#define __NR_add_key 217 -#define __NR_request_key 218 -#define __NR_keyctl 219 -#define __NR_clone 220 -#define __NR_execve 221 -#define __NR_mmap 222 -#define __NR_fadvise64 223 -#define __NR_swapon 224 -#define __NR_swapoff 225 -#define __NR_mprotect 226 -#define __NR_msync 227 -#define __NR_mlock 228 -#define __NR_munlock 229 -#define __NR_mlockall 230 -#define __NR_munlockall 231 -#define __NR_mincore 232 -#define __NR_madvise 233 -#define __NR_remap_file_pages 234 -#define __NR_mbind 235 -#define __NR_get_mempolicy 236 -#define __NR_set_mempolicy 237 -#define __NR_migrate_pages 238 -#define __NR_move_pages 239 -#define __NR_rt_tgsigqueueinfo 240 -#define __NR_perf_event_open 241 -#define __NR_accept4 242 -#define __NR_recvmmsg 243 -#define __NR_arch_specific_syscall 244 -#define __NR_wait4 260 -#define __NR_prlimit64 261 -#define __NR_fanotify_init 262 -#define __NR_fanotify_mark 263 -#define __NR_name_to_handle_at 264 -#define __NR_open_by_handle_at 265 -#define __NR_clock_adjtime 266 -#define __NR_syncfs 267 -#define __NR_setns 268 -#define __NR_sendmmsg 269 -#define __NR_process_vm_readv 270 -#define __NR_process_vm_writev 271 -#define __NR_kcmp 272 -#define __NR_finit_module 273 -#define __NR_sched_setattr 274 -#define __NR_sched_getattr 275 -#define __NR_renameat2 276 -#define __NR_seccomp 277 -#define __NR_getrandom 278 -#define __NR_memfd_create 279 -#define __NR_bpf 280 -#define __NR_execveat 281 -#define __NR_userfaultfd 282 -#define __NR_membarrier 283 -#define __NR_mlock2 284 -#define __NR_copy_file_range 285 -#define __NR_preadv2 286 -#define __NR_pwritev2 287 -#define __NR_pkey_mprotect 288 -#define __NR_pkey_alloc 289 -#define __NR_pkey_free 290 -#define __NR_sysriscv __NR_arch_specific_syscall - -#define SYS_io_setup 0 -#define SYS_io_destroy 1 -#define SYS_io_submit 2 -#define SYS_io_cancel 3 -#define SYS_io_getevents 4 -#define SYS_setxattr 5 -#define SYS_lsetxattr 6 -#define SYS_fsetxattr 7 -#define SYS_getxattr 8 -#define SYS_lgetxattr 9 -#define SYS_fgetxattr 10 -#define SYS_listxattr 11 -#define SYS_llistxattr 12 -#define SYS_flistxattr 13 -#define SYS_removexattr 14 -#define SYS_lremovexattr 15 -#define SYS_fremovexattr 16 -#define SYS_getcwd 17 -#define SYS_lookup_dcookie 18 -#define SYS_eventfd2 19 -#define SYS_epoll_create1 20 -#define SYS_epoll_ctl 21 -#define SYS_epoll_pwait 22 -#define SYS_dup 23 -#define SYS_dup3 24 -#define SYS_fcntl 25 -#define SYS_inotify_init1 26 -#define SYS_inotify_add_watch 27 -#define SYS_inotify_rm_watch 28 -#define SYS_ioctl 29 -#define SYS_ioprio_set 30 -#define SYS_ioprio_get 31 -#define SYS_flock 32 -#define SYS_mknodat 33 -#define SYS_mkdirat 34 -#define SYS_unlinkat 35 -#define SYS_symlinkat 36 -#define SYS_linkat 37 -#define SYS_renameat 38 -#define SYS_umount2 39 -#define SYS_mount 40 -#define SYS_pivot_root 41 -#define SYS_nfsservctl 42 -#define SYS_statfs 43 -#define SYS_fstatfs 44 -#define SYS_truncate 45 -#define SYS_ftruncate 46 -#define SYS_fallocate 47 -#define SYS_faccessat 48 -#define SYS_chdir 49 -#define SYS_fchdir 50 -#define SYS_chroot 51 -#define SYS_fchmod 52 -#define SYS_fchmodat 53 -#define SYS_fchownat 54 -#define SYS_fchown 55 -#define SYS_openat 56 -#define SYS_close 57 -#define SYS_vhangup 58 -#define SYS_pipe2 59 -#define SYS_quotactl 60 -#define SYS_getdents64 61 -#define SYS_lseek 62 -#define SYS_read 63 -#define SYS_write 64 -#define SYS_readv 65 -#define SYS_writev 66 -#define SYS_pread64 67 -#define SYS_pwrite64 68 -#define SYS_preadv 69 -#define SYS_pwritev 70 -#define SYS_sendfile 71 -#define SYS_pselect6 72 -#define SYS_ppoll 73 -#define SYS_signalfd4 74 -#define SYS_vmsplice 75 -#define SYS_splice 76 -#define SYS_tee 77 -#define SYS_readlinkat 78 -#define SYS_fstatat 79 -#define SYS_fstat 80 -#define SYS_sync 81 -#define SYS_fsync 82 -#define SYS_fdatasync 83 -#define SYS_sync_file_range 84 -#define SYS_timerfd_create 85 -#define SYS_timerfd_settime 86 -#define SYS_timerfd_gettime 87 -#define SYS_utimensat 88 -#define SYS_acct 89 -#define SYS_capget 90 -#define SYS_capset 91 -#define SYS_personality 92 -#define SYS_exit 93 -#define SYS_exit_group 94 -#define SYS_waitid 95 -#define SYS_set_tid_address 96 -#define SYS_unshare 97 -#define SYS_futex 98 -#define SYS_set_robust_list 99 -#define SYS_get_robust_list 100 -#define SYS_nanosleep 101 -#define SYS_getitimer 102 -#define SYS_setitimer 103 -#define SYS_kexec_load 104 -#define SYS_init_module 105 -#define SYS_delete_module 106 -#define SYS_timer_create 107 -#define SYS_timer_gettime 108 -#define SYS_timer_getoverrun 109 -#define SYS_timer_settime 110 -#define SYS_timer_delete 111 -#define SYS_clock_settime 112 -#define SYS_clock_gettime 113 -#define SYS_clock_getres 114 -#define SYS_clock_nanosleep 115 -#define SYS_syslog 116 -#define SYS_ptrace 117 -#define SYS_sched_setparam 118 -#define SYS_sched_setscheduler 119 -#define SYS_sched_getscheduler 120 -#define SYS_sched_getparam 121 -#define SYS_sched_setaffinity 122 -#define SYS_sched_getaffinity 123 -#define SYS_sched_yield 124 -#define SYS_sched_get_priority_max 125 -#define SYS_sched_get_priority_min 126 -#define SYS_sched_rr_get_interval 127 -#define SYS_restart_syscall 128 -#define SYS_kill 129 -#define SYS_tkill 130 -#define SYS_tgkill 131 -#define SYS_sigaltstack 132 -#define SYS_rt_sigsuspend 133 -#define SYS_rt_sigaction 134 -#define SYS_rt_sigprocmask 135 -#define SYS_rt_sigpending 136 -#define SYS_rt_sigtimedwait 137 -#define SYS_rt_sigqueueinfo 138 -#define SYS_rt_sigreturn 139 -#define SYS_setpriority 140 -#define SYS_getpriority 141 -#define SYS_reboot 142 -#define SYS_setregid 143 -#define SYS_setgid 144 -#define SYS_setreuid 145 -#define SYS_setuid 146 -#define SYS_setresuid 147 -#define SYS_getresuid 148 -#define SYS_setresgid 149 -#define SYS_getresgid 150 -#define SYS_setfsuid 151 -#define SYS_setfsgid 152 -#define SYS_times 153 -#define SYS_setpgid 154 -#define SYS_getpgid 155 -#define SYS_getsid 156 -#define SYS_setsid 157 -#define SYS_getgroups 158 -#define SYS_setgroups 159 -#define SYS_uname 160 -#define SYS_sethostname 161 -#define SYS_setdomainname 162 -#define SYS_getrlimit 163 -#define SYS_setrlimit 164 -#define SYS_getrusage 165 -#define SYS_umask 166 -#define SYS_prctl 167 -#define SYS_getcpu 168 -#define SYS_gettimeofday 169 -#define SYS_settimeofday 170 -#define SYS_adjtimex 171 -#define SYS_getpid 172 -#define SYS_getppid 173 -#define SYS_getuid 174 -#define SYS_geteuid 175 -#define SYS_getgid 176 -#define SYS_getegid 177 -#define SYS_gettid 178 -#define SYS_sysinfo 179 -#define SYS_mq_open 180 -#define SYS_mq_unlink 181 -#define SYS_mq_timedsend 182 -#define SYS_mq_timedreceive 183 -#define SYS_mq_notify 184 -#define SYS_mq_getsetattr 185 -#define SYS_msgget 186 -#define SYS_msgctl 187 -#define SYS_msgrcv 188 -#define SYS_msgsnd 189 -#define SYS_semget 190 -#define SYS_semctl 191 -#define SYS_semtimedop 192 -#define SYS_semop 193 -#define SYS_shmget 194 -#define SYS_shmctl 195 -#define SYS_shmat 196 -#define SYS_shmdt 197 -#define SYS_socket 198 -#define SYS_socketpair 199 -#define SYS_bind 200 -#define SYS_listen 201 -#define SYS_accept 202 -#define SYS_connect 203 -#define SYS_getsockname 204 -#define SYS_getpeername 205 -#define SYS_sendto 206 -#define SYS_recvfrom 207 -#define SYS_setsockopt 208 -#define SYS_getsockopt 209 -#define SYS_shutdown 210 -#define SYS_sendmsg 211 -#define SYS_recvmsg 212 -#define SYS_readahead 213 -#define SYS_brk 214 -#define SYS_munmap 215 -#define SYS_mremap 216 -#define SYS_add_key 217 -#define SYS_request_key 218 -#define SYS_keyctl 219 -#define SYS_clone 220 -#define SYS_execve 221 -#define SYS_mmap 222 -#define SYS_fadvise64 223 -#define SYS_swapon 224 -#define SYS_swapoff 225 -#define SYS_mprotect 226 -#define SYS_msync 227 -#define SYS_mlock 228 -#define SYS_munlock 229 -#define SYS_mlockall 230 -#define SYS_munlockall 231 -#define SYS_mincore 232 -#define SYS_madvise 233 -#define SYS_remap_file_pages 234 -#define SYS_mbind 235 -#define SYS_get_mempolicy 236 -#define SYS_set_mempolicy 237 -#define SYS_migrate_pages 238 -#define SYS_move_pages 239 -#define SYS_rt_tgsigqueueinfo 240 -#define SYS_perf_event_open 241 -#define SYS_accept4 242 -#define SYS_recvmmsg 243 -#define SYS_arch_specific_syscall 244 -#define SYS_wait4 260 -#define SYS_prlimit64 261 -#define SYS_fanotify_init 262 -#define SYS_fanotify_mark 263 -#define SYS_name_to_handle_at 264 -#define SYS_open_by_handle_at 265 -#define SYS_clock_adjtime 266 -#define SYS_syncfs 267 -#define SYS_setns 268 -#define SYS_sendmmsg 269 -#define SYS_process_vm_readv 270 -#define SYS_process_vm_writev 271 -#define SYS_kcmp 272 -#define SYS_finit_module 273 -#define SYS_sched_setattr 274 -#define SYS_sched_getattr 275 -#define SYS_renameat2 276 -#define SYS_seccomp 277 -#define SYS_getrandom 278 -#define SYS_memfd_create 279 -#define SYS_bpf 280 -#define SYS_execveat 281 -#define SYS_userfaultfd 282 -#define SYS_membarrier 283 -#define SYS_mlock2 284 -#define SYS_copy_file_range 285 -#define SYS_preadv2 286 -#define SYS_pwritev2 287 -#define SYS_pkey_mprotect 288 -#define SYS_pkey_alloc 289 -#define SYS_pkey_free 290 -#define SYS_sysriscv __NR_arch_specific_syscall \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/user.h b/lib/libc/include/riscv32-linux-musl/bits/user.h deleted file mode 100644 index 2f23ff4a72..0000000000 --- a/lib/libc/include/riscv32-linux-musl/bits/user.h +++ /dev/null @@ -1,43 +0,0 @@ -struct user_regs_struct { - unsigned long pc; - unsigned long ra; - unsigned long sp; - unsigned long gp; - unsigned long tp; - unsigned long t0; - unsigned long t1; - unsigned long t2; - unsigned long s0; - unsigned long s1; - unsigned long a0; - unsigned long a1; - unsigned long a2; - unsigned long a3; - unsigned long a4; - unsigned long a5; - unsigned long a6; - unsigned long a7; - unsigned long s2; - unsigned long s3; - unsigned long s4; - unsigned long s5; - unsigned long s6; - unsigned long s7; - unsigned long s8; - unsigned long s9; - unsigned long s10; - unsigned long s11; - unsigned long t3; - unsigned long t4; - unsigned long t5; - unsigned long t6; -}; - -struct user_fpregs_struct { - double f[32]; - unsigned int fcsr; -}; - -#define ELF_NGREG 32 -typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; -typedef struct user_fpregs_struct elf_fpregset_t; \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/elf.h b/lib/libc/include/riscv32-linux-musl/elf.h deleted file mode 100644 index c6b7718c7b..0000000000 --- a/lib/libc/include/riscv32-linux-musl/elf.h +++ /dev/null @@ -1,3228 +0,0 @@ -#ifndef _ELF_H -#define _ELF_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -typedef uint16_t Elf32_Half; -typedef uint16_t Elf64_Half; - -typedef uint32_t Elf32_Word; -typedef int32_t Elf32_Sword; -typedef uint32_t Elf64_Word; -typedef int32_t Elf64_Sword; - -typedef uint64_t Elf32_Xword; -typedef int64_t Elf32_Sxword; -typedef uint64_t Elf64_Xword; -typedef int64_t Elf64_Sxword; - -typedef uint32_t Elf32_Addr; -typedef uint64_t Elf64_Addr; - -typedef uint32_t Elf32_Off; -typedef uint64_t Elf64_Off; - -typedef uint16_t Elf32_Section; -typedef uint16_t Elf64_Section; - -typedef Elf32_Half Elf32_Versym; -typedef Elf64_Half Elf64_Versym; - -#define EI_NIDENT (16) - -typedef struct { - unsigned char e_ident[EI_NIDENT]; - Elf32_Half e_type; - Elf32_Half e_machine; - Elf32_Word e_version; - Elf32_Addr e_entry; - Elf32_Off e_phoff; - Elf32_Off e_shoff; - Elf32_Word e_flags; - Elf32_Half e_ehsize; - Elf32_Half e_phentsize; - Elf32_Half e_phnum; - Elf32_Half e_shentsize; - Elf32_Half e_shnum; - Elf32_Half e_shstrndx; -} Elf32_Ehdr; - -typedef struct { - unsigned char e_ident[EI_NIDENT]; - Elf64_Half e_type; - Elf64_Half e_machine; - Elf64_Word e_version; - Elf64_Addr e_entry; - Elf64_Off e_phoff; - Elf64_Off e_shoff; - Elf64_Word e_flags; - Elf64_Half e_ehsize; - Elf64_Half e_phentsize; - Elf64_Half e_phnum; - Elf64_Half e_shentsize; - Elf64_Half e_shnum; - Elf64_Half e_shstrndx; -} Elf64_Ehdr; - -#define EI_MAG0 0 -#define ELFMAG0 0x7f - -#define EI_MAG1 1 -#define ELFMAG1 'E' - -#define EI_MAG2 2 -#define ELFMAG2 'L' - -#define EI_MAG3 3 -#define ELFMAG3 'F' - - -#define ELFMAG "\177ELF" -#define SELFMAG 4 - -#define EI_CLASS 4 -#define ELFCLASSNONE 0 -#define ELFCLASS32 1 -#define ELFCLASS64 2 -#define ELFCLASSNUM 3 - -#define EI_DATA 5 -#define ELFDATANONE 0 -#define ELFDATA2LSB 1 -#define ELFDATA2MSB 2 -#define ELFDATANUM 3 - -#define EI_VERSION 6 - - -#define EI_OSABI 7 -#define ELFOSABI_NONE 0 -#define ELFOSABI_SYSV 0 -#define ELFOSABI_HPUX 1 -#define ELFOSABI_NETBSD 2 -#define ELFOSABI_LINUX 3 -#define ELFOSABI_GNU 3 -#define ELFOSABI_SOLARIS 6 -#define ELFOSABI_AIX 7 -#define ELFOSABI_IRIX 8 -#define ELFOSABI_FREEBSD 9 -#define ELFOSABI_TRU64 10 -#define ELFOSABI_MODESTO 11 -#define ELFOSABI_OPENBSD 12 -#define ELFOSABI_ARM 97 -#define ELFOSABI_STANDALONE 255 - -#define EI_ABIVERSION 8 - -#define EI_PAD 9 - - - -#define ET_NONE 0 -#define ET_REL 1 -#define ET_EXEC 2 -#define ET_DYN 3 -#define ET_CORE 4 -#define ET_NUM 5 -#define ET_LOOS 0xfe00 -#define ET_HIOS 0xfeff -#define ET_LOPROC 0xff00 -#define ET_HIPROC 0xffff - - - -#define EM_NONE 0 -#define EM_M32 1 -#define EM_SPARC 2 -#define EM_386 3 -#define EM_68K 4 -#define EM_88K 5 -#define EM_860 7 -#define EM_MIPS 8 -#define EM_S370 9 -#define EM_MIPS_RS3_LE 10 - -#define EM_PARISC 15 -#define EM_VPP500 17 -#define EM_SPARC32PLUS 18 -#define EM_960 19 -#define EM_PPC 20 -#define EM_PPC64 21 -#define EM_S390 22 - -#define EM_V800 36 -#define EM_FR20 37 -#define EM_RH32 38 -#define EM_RCE 39 -#define EM_ARM 40 -#define EM_FAKE_ALPHA 41 -#define EM_SH 42 -#define EM_SPARCV9 43 -#define EM_TRICORE 44 -#define EM_ARC 45 -#define EM_H8_300 46 -#define EM_H8_300H 47 -#define EM_H8S 48 -#define EM_H8_500 49 -#define EM_IA_64 50 -#define EM_MIPS_X 51 -#define EM_COLDFIRE 52 -#define EM_68HC12 53 -#define EM_MMA 54 -#define EM_PCP 55 -#define EM_NCPU 56 -#define EM_NDR1 57 -#define EM_STARCORE 58 -#define EM_ME16 59 -#define EM_ST100 60 -#define EM_TINYJ 61 -#define EM_X86_64 62 -#define EM_PDSP 63 - -#define EM_FX66 66 -#define EM_ST9PLUS 67 -#define EM_ST7 68 -#define EM_68HC16 69 -#define EM_68HC11 70 -#define EM_68HC08 71 -#define EM_68HC05 72 -#define EM_SVX 73 -#define EM_ST19 74 -#define EM_VAX 75 -#define EM_CRIS 76 -#define EM_JAVELIN 77 -#define EM_FIREPATH 78 -#define EM_ZSP 79 -#define EM_MMIX 80 -#define EM_HUANY 81 -#define EM_PRISM 82 -#define EM_AVR 83 -#define EM_FR30 84 -#define EM_D10V 85 -#define EM_D30V 86 -#define EM_V850 87 -#define EM_M32R 88 -#define EM_MN10300 89 -#define EM_MN10200 90 -#define EM_PJ 91 -#define EM_OR1K 92 -#define EM_OPENRISC 92 -#define EM_ARC_A5 93 -#define EM_ARC_COMPACT 93 -#define EM_XTENSA 94 -#define EM_VIDEOCORE 95 -#define EM_TMM_GPP 96 -#define EM_NS32K 97 -#define EM_TPC 98 -#define EM_SNP1K 99 -#define EM_ST200 100 -#define EM_IP2K 101 -#define EM_MAX 102 -#define EM_CR 103 -#define EM_F2MC16 104 -#define EM_MSP430 105 -#define EM_BLACKFIN 106 -#define EM_SE_C33 107 -#define EM_SEP 108 -#define EM_ARCA 109 -#define EM_UNICORE 110 -#define EM_EXCESS 111 -#define EM_DXP 112 -#define EM_ALTERA_NIOS2 113 -#define EM_CRX 114 -#define EM_XGATE 115 -#define EM_C166 116 -#define EM_M16C 117 -#define EM_DSPIC30F 118 -#define EM_CE 119 -#define EM_M32C 120 -#define EM_TSK3000 131 -#define EM_RS08 132 -#define EM_SHARC 133 -#define EM_ECOG2 134 -#define EM_SCORE7 135 -#define EM_DSP24 136 -#define EM_VIDEOCORE3 137 -#define EM_LATTICEMICO32 138 -#define EM_SE_C17 139 -#define EM_TI_C6000 140 -#define EM_TI_C2000 141 -#define EM_TI_C5500 142 -#define EM_TI_ARP32 143 -#define EM_TI_PRU 144 -#define EM_MMDSP_PLUS 160 -#define EM_CYPRESS_M8C 161 -#define EM_R32C 162 -#define EM_TRIMEDIA 163 -#define EM_QDSP6 164 -#define EM_8051 165 -#define EM_STXP7X 166 -#define EM_NDS32 167 -#define EM_ECOG1X 168 -#define EM_MAXQ30 169 -#define EM_XIMO16 170 -#define EM_MANIK 171 -#define EM_CRAYNV2 172 -#define EM_RX 173 -#define EM_METAG 174 -#define EM_MCST_ELBRUS 175 -#define EM_ECOG16 176 -#define EM_CR16 177 -#define EM_ETPU 178 -#define EM_SLE9X 179 -#define EM_L10M 180 -#define EM_K10M 181 -#define EM_AARCH64 183 -#define EM_AVR32 185 -#define EM_STM8 186 -#define EM_TILE64 187 -#define EM_TILEPRO 188 -#define EM_MICROBLAZE 189 -#define EM_CUDA 190 -#define EM_TILEGX 191 -#define EM_CLOUDSHIELD 192 -#define EM_COREA_1ST 193 -#define EM_COREA_2ND 194 -#define EM_ARC_COMPACT2 195 -#define EM_OPEN8 196 -#define EM_RL78 197 -#define EM_VIDEOCORE5 198 -#define EM_78KOR 199 -#define EM_56800EX 200 -#define EM_BA1 201 -#define EM_BA2 202 -#define EM_XCORE 203 -#define EM_MCHP_PIC 204 -#define EM_KM32 210 -#define EM_KMX32 211 -#define EM_EMX16 212 -#define EM_EMX8 213 -#define EM_KVARC 214 -#define EM_CDP 215 -#define EM_COGE 216 -#define EM_COOL 217 -#define EM_NORC 218 -#define EM_CSR_KALIMBA 219 -#define EM_Z80 220 -#define EM_VISIUM 221 -#define EM_FT32 222 -#define EM_MOXIE 223 -#define EM_AMDGPU 224 -#define EM_RISCV 243 -#define EM_BPF 247 -#define EM_NUM 248 - -#define EM_ALPHA 0x9026 - -#define EV_NONE 0 -#define EV_CURRENT 1 -#define EV_NUM 2 - -typedef struct { - Elf32_Word sh_name; - Elf32_Word sh_type; - Elf32_Word sh_flags; - Elf32_Addr sh_addr; - Elf32_Off sh_offset; - Elf32_Word sh_size; - Elf32_Word sh_link; - Elf32_Word sh_info; - Elf32_Word sh_addralign; - Elf32_Word sh_entsize; -} Elf32_Shdr; - -typedef struct { - Elf64_Word sh_name; - Elf64_Word sh_type; - Elf64_Xword sh_flags; - Elf64_Addr sh_addr; - Elf64_Off sh_offset; - Elf64_Xword sh_size; - Elf64_Word sh_link; - Elf64_Word sh_info; - Elf64_Xword sh_addralign; - Elf64_Xword sh_entsize; -} Elf64_Shdr; - - - -#define SHN_UNDEF 0 -#define SHN_LORESERVE 0xff00 -#define SHN_LOPROC 0xff00 -#define SHN_BEFORE 0xff00 - -#define SHN_AFTER 0xff01 - -#define SHN_HIPROC 0xff1f -#define SHN_LOOS 0xff20 -#define SHN_HIOS 0xff3f -#define SHN_ABS 0xfff1 -#define SHN_COMMON 0xfff2 -#define SHN_XINDEX 0xffff -#define SHN_HIRESERVE 0xffff - - - -#define SHT_NULL 0 -#define SHT_PROGBITS 1 -#define SHT_SYMTAB 2 -#define SHT_STRTAB 3 -#define SHT_RELA 4 -#define SHT_HASH 5 -#define SHT_DYNAMIC 6 -#define SHT_NOTE 7 -#define SHT_NOBITS 8 -#define SHT_REL 9 -#define SHT_SHLIB 10 -#define SHT_DYNSYM 11 -#define SHT_INIT_ARRAY 14 -#define SHT_FINI_ARRAY 15 -#define SHT_PREINIT_ARRAY 16 -#define SHT_GROUP 17 -#define SHT_SYMTAB_SHNDX 18 -#define SHT_NUM 19 -#define SHT_LOOS 0x60000000 -#define SHT_GNU_ATTRIBUTES 0x6ffffff5 -#define SHT_GNU_HASH 0x6ffffff6 -#define SHT_GNU_LIBLIST 0x6ffffff7 -#define SHT_CHECKSUM 0x6ffffff8 -#define SHT_LOSUNW 0x6ffffffa -#define SHT_SUNW_move 0x6ffffffa -#define SHT_SUNW_COMDAT 0x6ffffffb -#define SHT_SUNW_syminfo 0x6ffffffc -#define SHT_GNU_verdef 0x6ffffffd -#define SHT_GNU_verneed 0x6ffffffe -#define SHT_GNU_versym 0x6fffffff -#define SHT_HISUNW 0x6fffffff -#define SHT_HIOS 0x6fffffff -#define SHT_LOPROC 0x70000000 -#define SHT_HIPROC 0x7fffffff -#define SHT_LOUSER 0x80000000 -#define SHT_HIUSER 0x8fffffff - -#define SHF_WRITE (1 << 0) -#define SHF_ALLOC (1 << 1) -#define SHF_EXECINSTR (1 << 2) -#define SHF_MERGE (1 << 4) -#define SHF_STRINGS (1 << 5) -#define SHF_INFO_LINK (1 << 6) -#define SHF_LINK_ORDER (1 << 7) -#define SHF_OS_NONCONFORMING (1 << 8) - -#define SHF_GROUP (1 << 9) -#define SHF_TLS (1 << 10) -#define SHF_COMPRESSED (1 << 11) -#define SHF_MASKOS 0x0ff00000 -#define SHF_MASKPROC 0xf0000000 -#define SHF_ORDERED (1 << 30) -#define SHF_EXCLUDE (1U << 31) - -typedef struct { - Elf32_Word ch_type; - Elf32_Word ch_size; - Elf32_Word ch_addralign; -} Elf32_Chdr; - -typedef struct { - Elf64_Word ch_type; - Elf64_Word ch_reserved; - Elf64_Xword ch_size; - Elf64_Xword ch_addralign; -} Elf64_Chdr; - -#define ELFCOMPRESS_ZLIB 1 -#define ELFCOMPRESS_LOOS 0x60000000 -#define ELFCOMPRESS_HIOS 0x6fffffff -#define ELFCOMPRESS_LOPROC 0x70000000 -#define ELFCOMPRESS_HIPROC 0x7fffffff - - -#define GRP_COMDAT 0x1 - -typedef struct { - Elf32_Word st_name; - Elf32_Addr st_value; - Elf32_Word st_size; - unsigned char st_info; - unsigned char st_other; - Elf32_Section st_shndx; -} Elf32_Sym; - -typedef struct { - Elf64_Word st_name; - unsigned char st_info; - unsigned char st_other; - Elf64_Section st_shndx; - Elf64_Addr st_value; - Elf64_Xword st_size; -} Elf64_Sym; - -typedef struct { - Elf32_Half si_boundto; - Elf32_Half si_flags; -} Elf32_Syminfo; - -typedef struct { - Elf64_Half si_boundto; - Elf64_Half si_flags; -} Elf64_Syminfo; - -#define SYMINFO_BT_SELF 0xffff -#define SYMINFO_BT_PARENT 0xfffe -#define SYMINFO_BT_LOWRESERVE 0xff00 - -#define SYMINFO_FLG_DIRECT 0x0001 -#define SYMINFO_FLG_PASSTHRU 0x0002 -#define SYMINFO_FLG_COPY 0x0004 -#define SYMINFO_FLG_LAZYLOAD 0x0008 - -#define SYMINFO_NONE 0 -#define SYMINFO_CURRENT 1 -#define SYMINFO_NUM 2 - -#define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4) -#define ELF32_ST_TYPE(val) ((val) & 0xf) -#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) - -#define ELF64_ST_BIND(val) ELF32_ST_BIND (val) -#define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val) -#define ELF64_ST_INFO(bind, type) ELF32_ST_INFO ((bind), (type)) - -#define STB_LOCAL 0 -#define STB_GLOBAL 1 -#define STB_WEAK 2 -#define STB_NUM 3 -#define STB_LOOS 10 -#define STB_GNU_UNIQUE 10 -#define STB_HIOS 12 -#define STB_LOPROC 13 -#define STB_HIPROC 15 - -#define STT_NOTYPE 0 -#define STT_OBJECT 1 -#define STT_FUNC 2 -#define STT_SECTION 3 -#define STT_FILE 4 -#define STT_COMMON 5 -#define STT_TLS 6 -#define STT_NUM 7 -#define STT_LOOS 10 -#define STT_GNU_IFUNC 10 -#define STT_HIOS 12 -#define STT_LOPROC 13 -#define STT_HIPROC 15 - -#define STN_UNDEF 0 - -#define ELF32_ST_VISIBILITY(o) ((o) & 0x03) -#define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o) - -#define STV_DEFAULT 0 -#define STV_INTERNAL 1 -#define STV_HIDDEN 2 -#define STV_PROTECTED 3 - - - - -typedef struct { - Elf32_Addr r_offset; - Elf32_Word r_info; -} Elf32_Rel; - -typedef struct { - Elf64_Addr r_offset; - Elf64_Xword r_info; -} Elf64_Rel; - - - -typedef struct { - Elf32_Addr r_offset; - Elf32_Word r_info; - Elf32_Sword r_addend; -} Elf32_Rela; - -typedef struct { - Elf64_Addr r_offset; - Elf64_Xword r_info; - Elf64_Sxword r_addend; -} Elf64_Rela; - - - -#define ELF32_R_SYM(val) ((val) >> 8) -#define ELF32_R_TYPE(val) ((val) & 0xff) -#define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff)) - -#define ELF64_R_SYM(i) ((i) >> 32) -#define ELF64_R_TYPE(i) ((i) & 0xffffffff) -#define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type)) - - - -typedef struct { - Elf32_Word p_type; - Elf32_Off p_offset; - Elf32_Addr p_vaddr; - Elf32_Addr p_paddr; - Elf32_Word p_filesz; - Elf32_Word p_memsz; - Elf32_Word p_flags; - Elf32_Word p_align; -} Elf32_Phdr; - -typedef struct { - Elf64_Word p_type; - Elf64_Word p_flags; - Elf64_Off p_offset; - Elf64_Addr p_vaddr; - Elf64_Addr p_paddr; - Elf64_Xword p_filesz; - Elf64_Xword p_memsz; - Elf64_Xword p_align; -} Elf64_Phdr; - - - -#define PT_NULL 0 -#define PT_LOAD 1 -#define PT_DYNAMIC 2 -#define PT_INTERP 3 -#define PT_NOTE 4 -#define PT_SHLIB 5 -#define PT_PHDR 6 -#define PT_TLS 7 -#define PT_NUM 8 -#define PT_LOOS 0x60000000 -#define PT_GNU_EH_FRAME 0x6474e550 -#define PT_GNU_STACK 0x6474e551 -#define PT_GNU_RELRO 0x6474e552 -#define PT_LOSUNW 0x6ffffffa -#define PT_SUNWBSS 0x6ffffffa -#define PT_SUNWSTACK 0x6ffffffb -#define PT_HISUNW 0x6fffffff -#define PT_HIOS 0x6fffffff -#define PT_LOPROC 0x70000000 -#define PT_HIPROC 0x7fffffff - - -#define PN_XNUM 0xffff - - -#define PF_X (1 << 0) -#define PF_W (1 << 1) -#define PF_R (1 << 2) -#define PF_MASKOS 0x0ff00000 -#define PF_MASKPROC 0xf0000000 - - - -#define NT_PRSTATUS 1 -#define NT_PRFPREG 2 -#define NT_FPREGSET 2 -#define NT_PRPSINFO 3 -#define NT_PRXREG 4 -#define NT_TASKSTRUCT 4 -#define NT_PLATFORM 5 -#define NT_AUXV 6 -#define NT_GWINDOWS 7 -#define NT_ASRS 8 -#define NT_PSTATUS 10 -#define NT_PSINFO 13 -#define NT_PRCRED 14 -#define NT_UTSNAME 15 -#define NT_LWPSTATUS 16 -#define NT_LWPSINFO 17 -#define NT_PRFPXREG 20 -#define NT_SIGINFO 0x53494749 -#define NT_FILE 0x46494c45 -#define NT_PRXFPREG 0x46e62b7f -#define NT_PPC_VMX 0x100 -#define NT_PPC_SPE 0x101 -#define NT_PPC_VSX 0x102 -#define NT_PPC_TAR 0x103 -#define NT_PPC_PPR 0x104 -#define NT_PPC_DSCR 0x105 -#define NT_PPC_EBB 0x106 -#define NT_PPC_PMU 0x107 -#define NT_PPC_TM_CGPR 0x108 -#define NT_PPC_TM_CFPR 0x109 -#define NT_PPC_TM_CVMX 0x10a -#define NT_PPC_TM_CVSX 0x10b -#define NT_PPC_TM_SPR 0x10c -#define NT_PPC_TM_CTAR 0x10d -#define NT_PPC_TM_CPPR 0x10e -#define NT_PPC_TM_CDSCR 0x10f -#define NT_386_TLS 0x200 -#define NT_386_IOPERM 0x201 -#define NT_X86_XSTATE 0x202 -#define NT_S390_HIGH_GPRS 0x300 -#define NT_S390_TIMER 0x301 -#define NT_S390_TODCMP 0x302 -#define NT_S390_TODPREG 0x303 -#define NT_S390_CTRS 0x304 -#define NT_S390_PREFIX 0x305 -#define NT_S390_LAST_BREAK 0x306 -#define NT_S390_SYSTEM_CALL 0x307 -#define NT_S390_TDB 0x308 -#define NT_S390_VXRS_LOW 0x309 -#define NT_S390_VXRS_HIGH 0x30a -#define NT_S390_GS_CB 0x30b -#define NT_S390_GS_BC 0x30c -#define NT_S390_RI_CB 0x30d -#define NT_ARM_VFP 0x400 -#define NT_ARM_TLS 0x401 -#define NT_ARM_HW_BREAK 0x402 -#define NT_ARM_HW_WATCH 0x403 -#define NT_ARM_SYSTEM_CALL 0x404 -#define NT_ARM_SVE 0x405 -#define NT_METAG_CBUF 0x500 -#define NT_METAG_RPIPE 0x501 -#define NT_METAG_TLS 0x502 -#define NT_ARC_V2 0x600 -#define NT_VERSION 1 - - - - -typedef struct { - Elf32_Sword d_tag; - union { - Elf32_Word d_val; - Elf32_Addr d_ptr; - } d_un; -} Elf32_Dyn; - -typedef struct { - Elf64_Sxword d_tag; - union { - Elf64_Xword d_val; - Elf64_Addr d_ptr; - } d_un; -} Elf64_Dyn; - - - -#define DT_NULL 0 -#define DT_NEEDED 1 -#define DT_PLTRELSZ 2 -#define DT_PLTGOT 3 -#define DT_HASH 4 -#define DT_STRTAB 5 -#define DT_SYMTAB 6 -#define DT_RELA 7 -#define DT_RELASZ 8 -#define DT_RELAENT 9 -#define DT_STRSZ 10 -#define DT_SYMENT 11 -#define DT_INIT 12 -#define DT_FINI 13 -#define DT_SONAME 14 -#define DT_RPATH 15 -#define DT_SYMBOLIC 16 -#define DT_REL 17 -#define DT_RELSZ 18 -#define DT_RELENT 19 -#define DT_PLTREL 20 -#define DT_DEBUG 21 -#define DT_TEXTREL 22 -#define DT_JMPREL 23 -#define DT_BIND_NOW 24 -#define DT_INIT_ARRAY 25 -#define DT_FINI_ARRAY 26 -#define DT_INIT_ARRAYSZ 27 -#define DT_FINI_ARRAYSZ 28 -#define DT_RUNPATH 29 -#define DT_FLAGS 30 -#define DT_ENCODING 32 -#define DT_PREINIT_ARRAY 32 -#define DT_PREINIT_ARRAYSZ 33 -#define DT_SYMTAB_SHNDX 34 -#define DT_NUM 35 -#define DT_LOOS 0x6000000d -#define DT_HIOS 0x6ffff000 -#define DT_LOPROC 0x70000000 -#define DT_HIPROC 0x7fffffff -#define DT_PROCNUM DT_MIPS_NUM - -#define DT_VALRNGLO 0x6ffffd00 -#define DT_GNU_PRELINKED 0x6ffffdf5 -#define DT_GNU_CONFLICTSZ 0x6ffffdf6 -#define DT_GNU_LIBLISTSZ 0x6ffffdf7 -#define DT_CHECKSUM 0x6ffffdf8 -#define DT_PLTPADSZ 0x6ffffdf9 -#define DT_MOVEENT 0x6ffffdfa -#define DT_MOVESZ 0x6ffffdfb -#define DT_FEATURE_1 0x6ffffdfc -#define DT_POSFLAG_1 0x6ffffdfd - -#define DT_SYMINSZ 0x6ffffdfe -#define DT_SYMINENT 0x6ffffdff -#define DT_VALRNGHI 0x6ffffdff -#define DT_VALTAGIDX(tag) (DT_VALRNGHI - (tag)) -#define DT_VALNUM 12 - -#define DT_ADDRRNGLO 0x6ffffe00 -#define DT_GNU_HASH 0x6ffffef5 -#define DT_TLSDESC_PLT 0x6ffffef6 -#define DT_TLSDESC_GOT 0x6ffffef7 -#define DT_GNU_CONFLICT 0x6ffffef8 -#define DT_GNU_LIBLIST 0x6ffffef9 -#define DT_CONFIG 0x6ffffefa -#define DT_DEPAUDIT 0x6ffffefb -#define DT_AUDIT 0x6ffffefc -#define DT_PLTPAD 0x6ffffefd -#define DT_MOVETAB 0x6ffffefe -#define DT_SYMINFO 0x6ffffeff -#define DT_ADDRRNGHI 0x6ffffeff -#define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag)) -#define DT_ADDRNUM 11 - - - -#define DT_VERSYM 0x6ffffff0 - -#define DT_RELACOUNT 0x6ffffff9 -#define DT_RELCOUNT 0x6ffffffa - - -#define DT_FLAGS_1 0x6ffffffb -#define DT_VERDEF 0x6ffffffc - -#define DT_VERDEFNUM 0x6ffffffd -#define DT_VERNEED 0x6ffffffe - -#define DT_VERNEEDNUM 0x6fffffff -#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) -#define DT_VERSIONTAGNUM 16 - - - -#define DT_AUXILIARY 0x7ffffffd -#define DT_FILTER 0x7fffffff -#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1) -#define DT_EXTRANUM 3 - - -#define DF_ORIGIN 0x00000001 -#define DF_SYMBOLIC 0x00000002 -#define DF_TEXTREL 0x00000004 -#define DF_BIND_NOW 0x00000008 -#define DF_STATIC_TLS 0x00000010 - - - -#define DF_1_NOW 0x00000001 -#define DF_1_GLOBAL 0x00000002 -#define DF_1_GROUP 0x00000004 -#define DF_1_NODELETE 0x00000008 -#define DF_1_LOADFLTR 0x00000010 -#define DF_1_INITFIRST 0x00000020 -#define DF_1_NOOPEN 0x00000040 -#define DF_1_ORIGIN 0x00000080 -#define DF_1_DIRECT 0x00000100 -#define DF_1_TRANS 0x00000200 -#define DF_1_INTERPOSE 0x00000400 -#define DF_1_NODEFLIB 0x00000800 -#define DF_1_NODUMP 0x00001000 -#define DF_1_CONFALT 0x00002000 -#define DF_1_ENDFILTEE 0x00004000 -#define DF_1_DISPRELDNE 0x00008000 -#define DF_1_DISPRELPND 0x00010000 -#define DF_1_NODIRECT 0x00020000 -#define DF_1_IGNMULDEF 0x00040000 -#define DF_1_NOKSYMS 0x00080000 -#define DF_1_NOHDR 0x00100000 -#define DF_1_EDITED 0x00200000 -#define DF_1_NORELOC 0x00400000 -#define DF_1_SYMINTPOSE 0x00800000 -#define DF_1_GLOBAUDIT 0x01000000 -#define DF_1_SINGLETON 0x02000000 -#define DF_1_STUB 0x04000000 -#define DF_1_PIE 0x08000000 - -#define DTF_1_PARINIT 0x00000001 -#define DTF_1_CONFEXP 0x00000002 - - -#define DF_P1_LAZYLOAD 0x00000001 -#define DF_P1_GROUPPERM 0x00000002 - - - - -typedef struct { - Elf32_Half vd_version; - Elf32_Half vd_flags; - Elf32_Half vd_ndx; - Elf32_Half vd_cnt; - Elf32_Word vd_hash; - Elf32_Word vd_aux; - Elf32_Word vd_next; -} Elf32_Verdef; - -typedef struct { - Elf64_Half vd_version; - Elf64_Half vd_flags; - Elf64_Half vd_ndx; - Elf64_Half vd_cnt; - Elf64_Word vd_hash; - Elf64_Word vd_aux; - Elf64_Word vd_next; -} Elf64_Verdef; - - - -#define VER_DEF_NONE 0 -#define VER_DEF_CURRENT 1 -#define VER_DEF_NUM 2 - - -#define VER_FLG_BASE 0x1 -#define VER_FLG_WEAK 0x2 - - -#define VER_NDX_LOCAL 0 -#define VER_NDX_GLOBAL 1 -#define VER_NDX_LORESERVE 0xff00 -#define VER_NDX_ELIMINATE 0xff01 - - - -typedef struct { - Elf32_Word vda_name; - Elf32_Word vda_next; -} Elf32_Verdaux; - -typedef struct { - Elf64_Word vda_name; - Elf64_Word vda_next; -} Elf64_Verdaux; - - - - -typedef struct { - Elf32_Half vn_version; - Elf32_Half vn_cnt; - Elf32_Word vn_file; - Elf32_Word vn_aux; - Elf32_Word vn_next; -} Elf32_Verneed; - -typedef struct { - Elf64_Half vn_version; - Elf64_Half vn_cnt; - Elf64_Word vn_file; - Elf64_Word vn_aux; - Elf64_Word vn_next; -} Elf64_Verneed; - - - -#define VER_NEED_NONE 0 -#define VER_NEED_CURRENT 1 -#define VER_NEED_NUM 2 - - - -typedef struct { - Elf32_Word vna_hash; - Elf32_Half vna_flags; - Elf32_Half vna_other; - Elf32_Word vna_name; - Elf32_Word vna_next; -} Elf32_Vernaux; - -typedef struct { - Elf64_Word vna_hash; - Elf64_Half vna_flags; - Elf64_Half vna_other; - Elf64_Word vna_name; - Elf64_Word vna_next; -} Elf64_Vernaux; - - - -#define VER_FLG_WEAK 0x2 - - - -typedef struct { - uint32_t a_type; - union { - uint32_t a_val; - } a_un; -} Elf32_auxv_t; - -typedef struct { - uint64_t a_type; - union { - uint64_t a_val; - } a_un; -} Elf64_auxv_t; - - - -#define AT_NULL 0 -#define AT_IGNORE 1 -#define AT_EXECFD 2 -#define AT_PHDR 3 -#define AT_PHENT 4 -#define AT_PHNUM 5 -#define AT_PAGESZ 6 -#define AT_BASE 7 -#define AT_FLAGS 8 -#define AT_ENTRY 9 -#define AT_NOTELF 10 -#define AT_UID 11 -#define AT_EUID 12 -#define AT_GID 13 -#define AT_EGID 14 -#define AT_CLKTCK 17 - - -#define AT_PLATFORM 15 -#define AT_HWCAP 16 - - - - -#define AT_FPUCW 18 - - -#define AT_DCACHEBSIZE 19 -#define AT_ICACHEBSIZE 20 -#define AT_UCACHEBSIZE 21 - - - -#define AT_IGNOREPPC 22 - -#define AT_SECURE 23 - -#define AT_BASE_PLATFORM 24 - -#define AT_RANDOM 25 - -#define AT_HWCAP2 26 - -#define AT_EXECFN 31 - - - -#define AT_SYSINFO 32 -#define AT_SYSINFO_EHDR 33 - - - -#define AT_L1I_CACHESHAPE 34 -#define AT_L1D_CACHESHAPE 35 -#define AT_L2_CACHESHAPE 36 -#define AT_L3_CACHESHAPE 37 - -#define AT_L1I_CACHESIZE 40 -#define AT_L1I_CACHEGEOMETRY 41 -#define AT_L1D_CACHESIZE 42 -#define AT_L1D_CACHEGEOMETRY 43 -#define AT_L2_CACHESIZE 44 -#define AT_L2_CACHEGEOMETRY 45 -#define AT_L3_CACHESIZE 46 -#define AT_L3_CACHEGEOMETRY 47 - - - -typedef struct { - Elf32_Word n_namesz; - Elf32_Word n_descsz; - Elf32_Word n_type; -} Elf32_Nhdr; - -typedef struct { - Elf64_Word n_namesz; - Elf64_Word n_descsz; - Elf64_Word n_type; -} Elf64_Nhdr; - - - - -#define ELF_NOTE_SOLARIS "SUNW Solaris" - - -#define ELF_NOTE_GNU "GNU" - - - - - -#define ELF_NOTE_PAGESIZE_HINT 1 - - -#define NT_GNU_ABI_TAG 1 -#define ELF_NOTE_ABI NT_GNU_ABI_TAG - - - -#define ELF_NOTE_OS_LINUX 0 -#define ELF_NOTE_OS_GNU 1 -#define ELF_NOTE_OS_SOLARIS2 2 -#define ELF_NOTE_OS_FREEBSD 3 - -#define NT_GNU_BUILD_ID 3 -#define NT_GNU_GOLD_VERSION 4 - - - -typedef struct { - Elf32_Xword m_value; - Elf32_Word m_info; - Elf32_Word m_poffset; - Elf32_Half m_repeat; - Elf32_Half m_stride; -} Elf32_Move; - -typedef struct { - Elf64_Xword m_value; - Elf64_Xword m_info; - Elf64_Xword m_poffset; - Elf64_Half m_repeat; - Elf64_Half m_stride; -} Elf64_Move; - - -#define ELF32_M_SYM(info) ((info) >> 8) -#define ELF32_M_SIZE(info) ((unsigned char) (info)) -#define ELF32_M_INFO(sym, size) (((sym) << 8) + (unsigned char) (size)) - -#define ELF64_M_SYM(info) ELF32_M_SYM (info) -#define ELF64_M_SIZE(info) ELF32_M_SIZE (info) -#define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size) - -#define EF_CPU32 0x00810000 - -#define R_68K_NONE 0 -#define R_68K_32 1 -#define R_68K_16 2 -#define R_68K_8 3 -#define R_68K_PC32 4 -#define R_68K_PC16 5 -#define R_68K_PC8 6 -#define R_68K_GOT32 7 -#define R_68K_GOT16 8 -#define R_68K_GOT8 9 -#define R_68K_GOT32O 10 -#define R_68K_GOT16O 11 -#define R_68K_GOT8O 12 -#define R_68K_PLT32 13 -#define R_68K_PLT16 14 -#define R_68K_PLT8 15 -#define R_68K_PLT32O 16 -#define R_68K_PLT16O 17 -#define R_68K_PLT8O 18 -#define R_68K_COPY 19 -#define R_68K_GLOB_DAT 20 -#define R_68K_JMP_SLOT 21 -#define R_68K_RELATIVE 22 -#define R_68K_TLS_GD32 25 -#define R_68K_TLS_GD16 26 -#define R_68K_TLS_GD8 27 -#define R_68K_TLS_LDM32 28 -#define R_68K_TLS_LDM16 29 -#define R_68K_TLS_LDM8 30 -#define R_68K_TLS_LDO32 31 -#define R_68K_TLS_LDO16 32 -#define R_68K_TLS_LDO8 33 -#define R_68K_TLS_IE32 34 -#define R_68K_TLS_IE16 35 -#define R_68K_TLS_IE8 36 -#define R_68K_TLS_LE32 37 -#define R_68K_TLS_LE16 38 -#define R_68K_TLS_LE8 39 -#define R_68K_TLS_DTPMOD32 40 -#define R_68K_TLS_DTPREL32 41 -#define R_68K_TLS_TPREL32 42 -#define R_68K_NUM 43 - -#define R_386_NONE 0 -#define R_386_32 1 -#define R_386_PC32 2 -#define R_386_GOT32 3 -#define R_386_PLT32 4 -#define R_386_COPY 5 -#define R_386_GLOB_DAT 6 -#define R_386_JMP_SLOT 7 -#define R_386_RELATIVE 8 -#define R_386_GOTOFF 9 -#define R_386_GOTPC 10 -#define R_386_32PLT 11 -#define R_386_TLS_TPOFF 14 -#define R_386_TLS_IE 15 -#define R_386_TLS_GOTIE 16 -#define R_386_TLS_LE 17 -#define R_386_TLS_GD 18 -#define R_386_TLS_LDM 19 -#define R_386_16 20 -#define R_386_PC16 21 -#define R_386_8 22 -#define R_386_PC8 23 -#define R_386_TLS_GD_32 24 -#define R_386_TLS_GD_PUSH 25 -#define R_386_TLS_GD_CALL 26 -#define R_386_TLS_GD_POP 27 -#define R_386_TLS_LDM_32 28 -#define R_386_TLS_LDM_PUSH 29 -#define R_386_TLS_LDM_CALL 30 -#define R_386_TLS_LDM_POP 31 -#define R_386_TLS_LDO_32 32 -#define R_386_TLS_IE_32 33 -#define R_386_TLS_LE_32 34 -#define R_386_TLS_DTPMOD32 35 -#define R_386_TLS_DTPOFF32 36 -#define R_386_TLS_TPOFF32 37 -#define R_386_SIZE32 38 -#define R_386_TLS_GOTDESC 39 -#define R_386_TLS_DESC_CALL 40 -#define R_386_TLS_DESC 41 -#define R_386_IRELATIVE 42 -#define R_386_GOT32X 43 -#define R_386_NUM 44 - - - - - -#define STT_SPARC_REGISTER 13 - - - -#define EF_SPARCV9_MM 3 -#define EF_SPARCV9_TSO 0 -#define EF_SPARCV9_PSO 1 -#define EF_SPARCV9_RMO 2 -#define EF_SPARC_LEDATA 0x800000 -#define EF_SPARC_EXT_MASK 0xFFFF00 -#define EF_SPARC_32PLUS 0x000100 -#define EF_SPARC_SUN_US1 0x000200 -#define EF_SPARC_HAL_R1 0x000400 -#define EF_SPARC_SUN_US3 0x000800 - - - -#define R_SPARC_NONE 0 -#define R_SPARC_8 1 -#define R_SPARC_16 2 -#define R_SPARC_32 3 -#define R_SPARC_DISP8 4 -#define R_SPARC_DISP16 5 -#define R_SPARC_DISP32 6 -#define R_SPARC_WDISP30 7 -#define R_SPARC_WDISP22 8 -#define R_SPARC_HI22 9 -#define R_SPARC_22 10 -#define R_SPARC_13 11 -#define R_SPARC_LO10 12 -#define R_SPARC_GOT10 13 -#define R_SPARC_GOT13 14 -#define R_SPARC_GOT22 15 -#define R_SPARC_PC10 16 -#define R_SPARC_PC22 17 -#define R_SPARC_WPLT30 18 -#define R_SPARC_COPY 19 -#define R_SPARC_GLOB_DAT 20 -#define R_SPARC_JMP_SLOT 21 -#define R_SPARC_RELATIVE 22 -#define R_SPARC_UA32 23 - - - -#define R_SPARC_PLT32 24 -#define R_SPARC_HIPLT22 25 -#define R_SPARC_LOPLT10 26 -#define R_SPARC_PCPLT32 27 -#define R_SPARC_PCPLT22 28 -#define R_SPARC_PCPLT10 29 -#define R_SPARC_10 30 -#define R_SPARC_11 31 -#define R_SPARC_64 32 -#define R_SPARC_OLO10 33 -#define R_SPARC_HH22 34 -#define R_SPARC_HM10 35 -#define R_SPARC_LM22 36 -#define R_SPARC_PC_HH22 37 -#define R_SPARC_PC_HM10 38 -#define R_SPARC_PC_LM22 39 -#define R_SPARC_WDISP16 40 -#define R_SPARC_WDISP19 41 -#define R_SPARC_GLOB_JMP 42 -#define R_SPARC_7 43 -#define R_SPARC_5 44 -#define R_SPARC_6 45 -#define R_SPARC_DISP64 46 -#define R_SPARC_PLT64 47 -#define R_SPARC_HIX22 48 -#define R_SPARC_LOX10 49 -#define R_SPARC_H44 50 -#define R_SPARC_M44 51 -#define R_SPARC_L44 52 -#define R_SPARC_REGISTER 53 -#define R_SPARC_UA64 54 -#define R_SPARC_UA16 55 -#define R_SPARC_TLS_GD_HI22 56 -#define R_SPARC_TLS_GD_LO10 57 -#define R_SPARC_TLS_GD_ADD 58 -#define R_SPARC_TLS_GD_CALL 59 -#define R_SPARC_TLS_LDM_HI22 60 -#define R_SPARC_TLS_LDM_LO10 61 -#define R_SPARC_TLS_LDM_ADD 62 -#define R_SPARC_TLS_LDM_CALL 63 -#define R_SPARC_TLS_LDO_HIX22 64 -#define R_SPARC_TLS_LDO_LOX10 65 -#define R_SPARC_TLS_LDO_ADD 66 -#define R_SPARC_TLS_IE_HI22 67 -#define R_SPARC_TLS_IE_LO10 68 -#define R_SPARC_TLS_IE_LD 69 -#define R_SPARC_TLS_IE_LDX 70 -#define R_SPARC_TLS_IE_ADD 71 -#define R_SPARC_TLS_LE_HIX22 72 -#define R_SPARC_TLS_LE_LOX10 73 -#define R_SPARC_TLS_DTPMOD32 74 -#define R_SPARC_TLS_DTPMOD64 75 -#define R_SPARC_TLS_DTPOFF32 76 -#define R_SPARC_TLS_DTPOFF64 77 -#define R_SPARC_TLS_TPOFF32 78 -#define R_SPARC_TLS_TPOFF64 79 -#define R_SPARC_GOTDATA_HIX22 80 -#define R_SPARC_GOTDATA_LOX10 81 -#define R_SPARC_GOTDATA_OP_HIX22 82 -#define R_SPARC_GOTDATA_OP_LOX10 83 -#define R_SPARC_GOTDATA_OP 84 -#define R_SPARC_H34 85 -#define R_SPARC_SIZE32 86 -#define R_SPARC_SIZE64 87 -#define R_SPARC_GNU_VTINHERIT 250 -#define R_SPARC_GNU_VTENTRY 251 -#define R_SPARC_REV32 252 - -#define R_SPARC_NUM 253 - - - -#define DT_SPARC_REGISTER 0x70000001 -#define DT_SPARC_NUM 2 - - -#define EF_MIPS_NOREORDER 1 -#define EF_MIPS_PIC 2 -#define EF_MIPS_CPIC 4 -#define EF_MIPS_XGOT 8 -#define EF_MIPS_64BIT_WHIRL 16 -#define EF_MIPS_ABI2 32 -#define EF_MIPS_ABI_ON32 64 -#define EF_MIPS_FP64 512 -#define EF_MIPS_NAN2008 1024 -#define EF_MIPS_ARCH 0xf0000000 - - - -#define EF_MIPS_ARCH_1 0x00000000 -#define EF_MIPS_ARCH_2 0x10000000 -#define EF_MIPS_ARCH_3 0x20000000 -#define EF_MIPS_ARCH_4 0x30000000 -#define EF_MIPS_ARCH_5 0x40000000 -#define EF_MIPS_ARCH_32 0x50000000 -#define EF_MIPS_ARCH_64 0x60000000 -#define EF_MIPS_ARCH_32R2 0x70000000 -#define EF_MIPS_ARCH_64R2 0x80000000 - - -#define E_MIPS_ARCH_1 0x00000000 -#define E_MIPS_ARCH_2 0x10000000 -#define E_MIPS_ARCH_3 0x20000000 -#define E_MIPS_ARCH_4 0x30000000 -#define E_MIPS_ARCH_5 0x40000000 -#define E_MIPS_ARCH_32 0x50000000 -#define E_MIPS_ARCH_64 0x60000000 - - - -#define SHN_MIPS_ACOMMON 0xff00 -#define SHN_MIPS_TEXT 0xff01 -#define SHN_MIPS_DATA 0xff02 -#define SHN_MIPS_SCOMMON 0xff03 -#define SHN_MIPS_SUNDEFINED 0xff04 - - - -#define SHT_MIPS_LIBLIST 0x70000000 -#define SHT_MIPS_MSYM 0x70000001 -#define SHT_MIPS_CONFLICT 0x70000002 -#define SHT_MIPS_GPTAB 0x70000003 -#define SHT_MIPS_UCODE 0x70000004 -#define SHT_MIPS_DEBUG 0x70000005 -#define SHT_MIPS_REGINFO 0x70000006 -#define SHT_MIPS_PACKAGE 0x70000007 -#define SHT_MIPS_PACKSYM 0x70000008 -#define SHT_MIPS_RELD 0x70000009 -#define SHT_MIPS_IFACE 0x7000000b -#define SHT_MIPS_CONTENT 0x7000000c -#define SHT_MIPS_OPTIONS 0x7000000d -#define SHT_MIPS_SHDR 0x70000010 -#define SHT_MIPS_FDESC 0x70000011 -#define SHT_MIPS_EXTSYM 0x70000012 -#define SHT_MIPS_DENSE 0x70000013 -#define SHT_MIPS_PDESC 0x70000014 -#define SHT_MIPS_LOCSYM 0x70000015 -#define SHT_MIPS_AUXSYM 0x70000016 -#define SHT_MIPS_OPTSYM 0x70000017 -#define SHT_MIPS_LOCSTR 0x70000018 -#define SHT_MIPS_LINE 0x70000019 -#define SHT_MIPS_RFDESC 0x7000001a -#define SHT_MIPS_DELTASYM 0x7000001b -#define SHT_MIPS_DELTAINST 0x7000001c -#define SHT_MIPS_DELTACLASS 0x7000001d -#define SHT_MIPS_DWARF 0x7000001e -#define SHT_MIPS_DELTADECL 0x7000001f -#define SHT_MIPS_SYMBOL_LIB 0x70000020 -#define SHT_MIPS_EVENTS 0x70000021 -#define SHT_MIPS_TRANSLATE 0x70000022 -#define SHT_MIPS_PIXIE 0x70000023 -#define SHT_MIPS_XLATE 0x70000024 -#define SHT_MIPS_XLATE_DEBUG 0x70000025 -#define SHT_MIPS_WHIRL 0x70000026 -#define SHT_MIPS_EH_REGION 0x70000027 -#define SHT_MIPS_XLATE_OLD 0x70000028 -#define SHT_MIPS_PDR_EXCEPTION 0x70000029 - - - -#define SHF_MIPS_GPREL 0x10000000 -#define SHF_MIPS_MERGE 0x20000000 -#define SHF_MIPS_ADDR 0x40000000 -#define SHF_MIPS_STRINGS 0x80000000 -#define SHF_MIPS_NOSTRIP 0x08000000 -#define SHF_MIPS_LOCAL 0x04000000 -#define SHF_MIPS_NAMES 0x02000000 -#define SHF_MIPS_NODUPE 0x01000000 - - - - - -#define STO_MIPS_DEFAULT 0x0 -#define STO_MIPS_INTERNAL 0x1 -#define STO_MIPS_HIDDEN 0x2 -#define STO_MIPS_PROTECTED 0x3 -#define STO_MIPS_PLT 0x8 -#define STO_MIPS_SC_ALIGN_UNUSED 0xff - - -#define STB_MIPS_SPLIT_COMMON 13 - - - -typedef union { - struct { - Elf32_Word gt_current_g_value; - Elf32_Word gt_unused; - } gt_header; - struct { - Elf32_Word gt_g_value; - Elf32_Word gt_bytes; - } gt_entry; -} Elf32_gptab; - - - -typedef struct { - Elf32_Word ri_gprmask; - Elf32_Word ri_cprmask[4]; - Elf32_Sword ri_gp_value; -} Elf32_RegInfo; - - - -typedef struct { - unsigned char kind; - - unsigned char size; - Elf32_Section section; - - Elf32_Word info; -} Elf_Options; - - - -#define ODK_NULL 0 -#define ODK_REGINFO 1 -#define ODK_EXCEPTIONS 2 -#define ODK_PAD 3 -#define ODK_HWPATCH 4 -#define ODK_FILL 5 -#define ODK_TAGS 6 -#define ODK_HWAND 7 -#define ODK_HWOR 8 - - - -#define OEX_FPU_MIN 0x1f -#define OEX_FPU_MAX 0x1f00 -#define OEX_PAGE0 0x10000 -#define OEX_SMM 0x20000 -#define OEX_FPDBUG 0x40000 -#define OEX_PRECISEFP OEX_FPDBUG -#define OEX_DISMISS 0x80000 - -#define OEX_FPU_INVAL 0x10 -#define OEX_FPU_DIV0 0x08 -#define OEX_FPU_OFLO 0x04 -#define OEX_FPU_UFLO 0x02 -#define OEX_FPU_INEX 0x01 - - - -#define OHW_R4KEOP 0x1 -#define OHW_R8KPFETCH 0x2 -#define OHW_R5KEOP 0x4 -#define OHW_R5KCVTL 0x8 - -#define OPAD_PREFIX 0x1 -#define OPAD_POSTFIX 0x2 -#define OPAD_SYMBOL 0x4 - - - -typedef struct { - Elf32_Word hwp_flags1; - Elf32_Word hwp_flags2; -} Elf_Options_Hw; - - - -#define OHWA0_R4KEOP_CHECKED 0x00000001 -#define OHWA1_R4KEOP_CLEAN 0x00000002 - - - -#define R_MIPS_NONE 0 -#define R_MIPS_16 1 -#define R_MIPS_32 2 -#define R_MIPS_REL32 3 -#define R_MIPS_26 4 -#define R_MIPS_HI16 5 -#define R_MIPS_LO16 6 -#define R_MIPS_GPREL16 7 -#define R_MIPS_LITERAL 8 -#define R_MIPS_GOT16 9 -#define R_MIPS_PC16 10 -#define R_MIPS_CALL16 11 -#define R_MIPS_GPREL32 12 - -#define R_MIPS_SHIFT5 16 -#define R_MIPS_SHIFT6 17 -#define R_MIPS_64 18 -#define R_MIPS_GOT_DISP 19 -#define R_MIPS_GOT_PAGE 20 -#define R_MIPS_GOT_OFST 21 -#define R_MIPS_GOT_HI16 22 -#define R_MIPS_GOT_LO16 23 -#define R_MIPS_SUB 24 -#define R_MIPS_INSERT_A 25 -#define R_MIPS_INSERT_B 26 -#define R_MIPS_DELETE 27 -#define R_MIPS_HIGHER 28 -#define R_MIPS_HIGHEST 29 -#define R_MIPS_CALL_HI16 30 -#define R_MIPS_CALL_LO16 31 -#define R_MIPS_SCN_DISP 32 -#define R_MIPS_REL16 33 -#define R_MIPS_ADD_IMMEDIATE 34 -#define R_MIPS_PJUMP 35 -#define R_MIPS_RELGOT 36 -#define R_MIPS_JALR 37 -#define R_MIPS_TLS_DTPMOD32 38 -#define R_MIPS_TLS_DTPREL32 39 -#define R_MIPS_TLS_DTPMOD64 40 -#define R_MIPS_TLS_DTPREL64 41 -#define R_MIPS_TLS_GD 42 -#define R_MIPS_TLS_LDM 43 -#define R_MIPS_TLS_DTPREL_HI16 44 -#define R_MIPS_TLS_DTPREL_LO16 45 -#define R_MIPS_TLS_GOTTPREL 46 -#define R_MIPS_TLS_TPREL32 47 -#define R_MIPS_TLS_TPREL64 48 -#define R_MIPS_TLS_TPREL_HI16 49 -#define R_MIPS_TLS_TPREL_LO16 50 -#define R_MIPS_GLOB_DAT 51 -#define R_MIPS_COPY 126 -#define R_MIPS_JUMP_SLOT 127 - -#define R_MIPS_NUM 128 - - - -#define PT_MIPS_REGINFO 0x70000000 -#define PT_MIPS_RTPROC 0x70000001 -#define PT_MIPS_OPTIONS 0x70000002 -#define PT_MIPS_ABIFLAGS 0x70000003 - - - -#define PF_MIPS_LOCAL 0x10000000 - - - -#define DT_MIPS_RLD_VERSION 0x70000001 -#define DT_MIPS_TIME_STAMP 0x70000002 -#define DT_MIPS_ICHECKSUM 0x70000003 -#define DT_MIPS_IVERSION 0x70000004 -#define DT_MIPS_FLAGS 0x70000005 -#define DT_MIPS_BASE_ADDRESS 0x70000006 -#define DT_MIPS_MSYM 0x70000007 -#define DT_MIPS_CONFLICT 0x70000008 -#define DT_MIPS_LIBLIST 0x70000009 -#define DT_MIPS_LOCAL_GOTNO 0x7000000a -#define DT_MIPS_CONFLICTNO 0x7000000b -#define DT_MIPS_LIBLISTNO 0x70000010 -#define DT_MIPS_SYMTABNO 0x70000011 -#define DT_MIPS_UNREFEXTNO 0x70000012 -#define DT_MIPS_GOTSYM 0x70000013 -#define DT_MIPS_HIPAGENO 0x70000014 -#define DT_MIPS_RLD_MAP 0x70000016 -#define DT_MIPS_DELTA_CLASS 0x70000017 -#define DT_MIPS_DELTA_CLASS_NO 0x70000018 - -#define DT_MIPS_DELTA_INSTANCE 0x70000019 -#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a - -#define DT_MIPS_DELTA_RELOC 0x7000001b -#define DT_MIPS_DELTA_RELOC_NO 0x7000001c - -#define DT_MIPS_DELTA_SYM 0x7000001d - -#define DT_MIPS_DELTA_SYM_NO 0x7000001e - -#define DT_MIPS_DELTA_CLASSSYM 0x70000020 - -#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 - -#define DT_MIPS_CXX_FLAGS 0x70000022 -#define DT_MIPS_PIXIE_INIT 0x70000023 -#define DT_MIPS_SYMBOL_LIB 0x70000024 -#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025 -#define DT_MIPS_LOCAL_GOTIDX 0x70000026 -#define DT_MIPS_HIDDEN_GOTIDX 0x70000027 -#define DT_MIPS_PROTECTED_GOTIDX 0x70000028 -#define DT_MIPS_OPTIONS 0x70000029 -#define DT_MIPS_INTERFACE 0x7000002a -#define DT_MIPS_DYNSTR_ALIGN 0x7000002b -#define DT_MIPS_INTERFACE_SIZE 0x7000002c -#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d - -#define DT_MIPS_PERF_SUFFIX 0x7000002e - -#define DT_MIPS_COMPACT_SIZE 0x7000002f -#define DT_MIPS_GP_VALUE 0x70000030 -#define DT_MIPS_AUX_DYNAMIC 0x70000031 - -#define DT_MIPS_PLTGOT 0x70000032 - -#define DT_MIPS_RWPLT 0x70000034 -#define DT_MIPS_RLD_MAP_REL 0x70000035 -#define DT_MIPS_NUM 0x36 - - - -#define RHF_NONE 0 -#define RHF_QUICKSTART (1 << 0) -#define RHF_NOTPOT (1 << 1) -#define RHF_NO_LIBRARY_REPLACEMENT (1 << 2) -#define RHF_NO_MOVE (1 << 3) -#define RHF_SGI_ONLY (1 << 4) -#define RHF_GUARANTEE_INIT (1 << 5) -#define RHF_DELTA_C_PLUS_PLUS (1 << 6) -#define RHF_GUARANTEE_START_INIT (1 << 7) -#define RHF_PIXIE (1 << 8) -#define RHF_DEFAULT_DELAY_LOAD (1 << 9) -#define RHF_REQUICKSTART (1 << 10) -#define RHF_REQUICKSTARTED (1 << 11) -#define RHF_CORD (1 << 12) -#define RHF_NO_UNRES_UNDEF (1 << 13) -#define RHF_RLD_ORDER_SAFE (1 << 14) - - - -typedef struct { - Elf32_Word l_name; - Elf32_Word l_time_stamp; - Elf32_Word l_checksum; - Elf32_Word l_version; - Elf32_Word l_flags; -} Elf32_Lib; - -typedef struct { - Elf64_Word l_name; - Elf64_Word l_time_stamp; - Elf64_Word l_checksum; - Elf64_Word l_version; - Elf64_Word l_flags; -} Elf64_Lib; - - - - -#define LL_NONE 0 -#define LL_EXACT_MATCH (1 << 0) -#define LL_IGNORE_INT_VER (1 << 1) -#define LL_REQUIRE_MINOR (1 << 2) -#define LL_EXPORTS (1 << 3) -#define LL_DELAY_LOAD (1 << 4) -#define LL_DELTA (1 << 5) - - - -typedef Elf32_Addr Elf32_Conflict; - -typedef struct { - Elf32_Half version; - unsigned char isa_level; - unsigned char isa_rev; - unsigned char gpr_size; - unsigned char cpr1_size; - unsigned char cpr2_size; - unsigned char fp_abi; - Elf32_Word isa_ext; - Elf32_Word ases; - Elf32_Word flags1; - Elf32_Word flags2; -} Elf_MIPS_ABIFlags_v0; - -#define MIPS_AFL_REG_NONE 0x00 -#define MIPS_AFL_REG_32 0x01 -#define MIPS_AFL_REG_64 0x02 -#define MIPS_AFL_REG_128 0x03 - -#define MIPS_AFL_ASE_DSP 0x00000001 -#define MIPS_AFL_ASE_DSPR2 0x00000002 -#define MIPS_AFL_ASE_EVA 0x00000004 -#define MIPS_AFL_ASE_MCU 0x00000008 -#define MIPS_AFL_ASE_MDMX 0x00000010 -#define MIPS_AFL_ASE_MIPS3D 0x00000020 -#define MIPS_AFL_ASE_MT 0x00000040 -#define MIPS_AFL_ASE_SMARTMIPS 0x00000080 -#define MIPS_AFL_ASE_VIRT 0x00000100 -#define MIPS_AFL_ASE_MSA 0x00000200 -#define MIPS_AFL_ASE_MIPS16 0x00000400 -#define MIPS_AFL_ASE_MICROMIPS 0x00000800 -#define MIPS_AFL_ASE_XPA 0x00001000 -#define MIPS_AFL_ASE_MASK 0x00001fff - -#define MIPS_AFL_EXT_XLR 1 -#define MIPS_AFL_EXT_OCTEON2 2 -#define MIPS_AFL_EXT_OCTEONP 3 -#define MIPS_AFL_EXT_LOONGSON_3A 4 -#define MIPS_AFL_EXT_OCTEON 5 -#define MIPS_AFL_EXT_5900 6 -#define MIPS_AFL_EXT_4650 7 -#define MIPS_AFL_EXT_4010 8 -#define MIPS_AFL_EXT_4100 9 -#define MIPS_AFL_EXT_3900 10 -#define MIPS_AFL_EXT_10000 11 -#define MIPS_AFL_EXT_SB1 12 -#define MIPS_AFL_EXT_4111 13 -#define MIPS_AFL_EXT_4120 14 -#define MIPS_AFL_EXT_5400 15 -#define MIPS_AFL_EXT_5500 16 -#define MIPS_AFL_EXT_LOONGSON_2E 17 -#define MIPS_AFL_EXT_LOONGSON_2F 18 - -#define MIPS_AFL_FLAGS1_ODDSPREG 1 - -enum -{ - Val_GNU_MIPS_ABI_FP_ANY = 0, - Val_GNU_MIPS_ABI_FP_DOUBLE = 1, - Val_GNU_MIPS_ABI_FP_SINGLE = 2, - Val_GNU_MIPS_ABI_FP_SOFT = 3, - Val_GNU_MIPS_ABI_FP_OLD_64 = 4, - Val_GNU_MIPS_ABI_FP_XX = 5, - Val_GNU_MIPS_ABI_FP_64 = 6, - Val_GNU_MIPS_ABI_FP_64A = 7, - Val_GNU_MIPS_ABI_FP_MAX = 7 -}; - - - - -#define EF_PARISC_TRAPNIL 0x00010000 -#define EF_PARISC_EXT 0x00020000 -#define EF_PARISC_LSB 0x00040000 -#define EF_PARISC_WIDE 0x00080000 -#define EF_PARISC_NO_KABP 0x00100000 - -#define EF_PARISC_LAZYSWAP 0x00400000 -#define EF_PARISC_ARCH 0x0000ffff - - - -#define EFA_PARISC_1_0 0x020b -#define EFA_PARISC_1_1 0x0210 -#define EFA_PARISC_2_0 0x0214 - - - -#define SHN_PARISC_ANSI_COMMON 0xff00 - -#define SHN_PARISC_HUGE_COMMON 0xff01 - - - -#define SHT_PARISC_EXT 0x70000000 -#define SHT_PARISC_UNWIND 0x70000001 -#define SHT_PARISC_DOC 0x70000002 - - - -#define SHF_PARISC_SHORT 0x20000000 -#define SHF_PARISC_HUGE 0x40000000 -#define SHF_PARISC_SBP 0x80000000 - - - -#define STT_PARISC_MILLICODE 13 - -#define STT_HP_OPAQUE (STT_LOOS + 0x1) -#define STT_HP_STUB (STT_LOOS + 0x2) - - - -#define R_PARISC_NONE 0 -#define R_PARISC_DIR32 1 -#define R_PARISC_DIR21L 2 -#define R_PARISC_DIR17R 3 -#define R_PARISC_DIR17F 4 -#define R_PARISC_DIR14R 6 -#define R_PARISC_PCREL32 9 -#define R_PARISC_PCREL21L 10 -#define R_PARISC_PCREL17R 11 -#define R_PARISC_PCREL17F 12 -#define R_PARISC_PCREL14R 14 -#define R_PARISC_DPREL21L 18 -#define R_PARISC_DPREL14R 22 -#define R_PARISC_GPREL21L 26 -#define R_PARISC_GPREL14R 30 -#define R_PARISC_LTOFF21L 34 -#define R_PARISC_LTOFF14R 38 -#define R_PARISC_SECREL32 41 -#define R_PARISC_SEGBASE 48 -#define R_PARISC_SEGREL32 49 -#define R_PARISC_PLTOFF21L 50 -#define R_PARISC_PLTOFF14R 54 -#define R_PARISC_LTOFF_FPTR32 57 -#define R_PARISC_LTOFF_FPTR21L 58 -#define R_PARISC_LTOFF_FPTR14R 62 -#define R_PARISC_FPTR64 64 -#define R_PARISC_PLABEL32 65 -#define R_PARISC_PLABEL21L 66 -#define R_PARISC_PLABEL14R 70 -#define R_PARISC_PCREL64 72 -#define R_PARISC_PCREL22F 74 -#define R_PARISC_PCREL14WR 75 -#define R_PARISC_PCREL14DR 76 -#define R_PARISC_PCREL16F 77 -#define R_PARISC_PCREL16WF 78 -#define R_PARISC_PCREL16DF 79 -#define R_PARISC_DIR64 80 -#define R_PARISC_DIR14WR 83 -#define R_PARISC_DIR14DR 84 -#define R_PARISC_DIR16F 85 -#define R_PARISC_DIR16WF 86 -#define R_PARISC_DIR16DF 87 -#define R_PARISC_GPREL64 88 -#define R_PARISC_GPREL14WR 91 -#define R_PARISC_GPREL14DR 92 -#define R_PARISC_GPREL16F 93 -#define R_PARISC_GPREL16WF 94 -#define R_PARISC_GPREL16DF 95 -#define R_PARISC_LTOFF64 96 -#define R_PARISC_LTOFF14WR 99 -#define R_PARISC_LTOFF14DR 100 -#define R_PARISC_LTOFF16F 101 -#define R_PARISC_LTOFF16WF 102 -#define R_PARISC_LTOFF16DF 103 -#define R_PARISC_SECREL64 104 -#define R_PARISC_SEGREL64 112 -#define R_PARISC_PLTOFF14WR 115 -#define R_PARISC_PLTOFF14DR 116 -#define R_PARISC_PLTOFF16F 117 -#define R_PARISC_PLTOFF16WF 118 -#define R_PARISC_PLTOFF16DF 119 -#define R_PARISC_LTOFF_FPTR64 120 -#define R_PARISC_LTOFF_FPTR14WR 123 -#define R_PARISC_LTOFF_FPTR14DR 124 -#define R_PARISC_LTOFF_FPTR16F 125 -#define R_PARISC_LTOFF_FPTR16WF 126 -#define R_PARISC_LTOFF_FPTR16DF 127 -#define R_PARISC_LORESERVE 128 -#define R_PARISC_COPY 128 -#define R_PARISC_IPLT 129 -#define R_PARISC_EPLT 130 -#define R_PARISC_TPREL32 153 -#define R_PARISC_TPREL21L 154 -#define R_PARISC_TPREL14R 158 -#define R_PARISC_LTOFF_TP21L 162 -#define R_PARISC_LTOFF_TP14R 166 -#define R_PARISC_LTOFF_TP14F 167 -#define R_PARISC_TPREL64 216 -#define R_PARISC_TPREL14WR 219 -#define R_PARISC_TPREL14DR 220 -#define R_PARISC_TPREL16F 221 -#define R_PARISC_TPREL16WF 222 -#define R_PARISC_TPREL16DF 223 -#define R_PARISC_LTOFF_TP64 224 -#define R_PARISC_LTOFF_TP14WR 227 -#define R_PARISC_LTOFF_TP14DR 228 -#define R_PARISC_LTOFF_TP16F 229 -#define R_PARISC_LTOFF_TP16WF 230 -#define R_PARISC_LTOFF_TP16DF 231 -#define R_PARISC_GNU_VTENTRY 232 -#define R_PARISC_GNU_VTINHERIT 233 -#define R_PARISC_TLS_GD21L 234 -#define R_PARISC_TLS_GD14R 235 -#define R_PARISC_TLS_GDCALL 236 -#define R_PARISC_TLS_LDM21L 237 -#define R_PARISC_TLS_LDM14R 238 -#define R_PARISC_TLS_LDMCALL 239 -#define R_PARISC_TLS_LDO21L 240 -#define R_PARISC_TLS_LDO14R 241 -#define R_PARISC_TLS_DTPMOD32 242 -#define R_PARISC_TLS_DTPMOD64 243 -#define R_PARISC_TLS_DTPOFF32 244 -#define R_PARISC_TLS_DTPOFF64 245 -#define R_PARISC_TLS_LE21L R_PARISC_TPREL21L -#define R_PARISC_TLS_LE14R R_PARISC_TPREL14R -#define R_PARISC_TLS_IE21L R_PARISC_LTOFF_TP21L -#define R_PARISC_TLS_IE14R R_PARISC_LTOFF_TP14R -#define R_PARISC_TLS_TPREL32 R_PARISC_TPREL32 -#define R_PARISC_TLS_TPREL64 R_PARISC_TPREL64 -#define R_PARISC_HIRESERVE 255 - - - -#define PT_HP_TLS (PT_LOOS + 0x0) -#define PT_HP_CORE_NONE (PT_LOOS + 0x1) -#define PT_HP_CORE_VERSION (PT_LOOS + 0x2) -#define PT_HP_CORE_KERNEL (PT_LOOS + 0x3) -#define PT_HP_CORE_COMM (PT_LOOS + 0x4) -#define PT_HP_CORE_PROC (PT_LOOS + 0x5) -#define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6) -#define PT_HP_CORE_STACK (PT_LOOS + 0x7) -#define PT_HP_CORE_SHM (PT_LOOS + 0x8) -#define PT_HP_CORE_MMF (PT_LOOS + 0x9) -#define PT_HP_PARALLEL (PT_LOOS + 0x10) -#define PT_HP_FASTBIND (PT_LOOS + 0x11) -#define PT_HP_OPT_ANNOT (PT_LOOS + 0x12) -#define PT_HP_HSL_ANNOT (PT_LOOS + 0x13) -#define PT_HP_STACK (PT_LOOS + 0x14) - -#define PT_PARISC_ARCHEXT 0x70000000 -#define PT_PARISC_UNWIND 0x70000001 - - - -#define PF_PARISC_SBP 0x08000000 - -#define PF_HP_PAGE_SIZE 0x00100000 -#define PF_HP_FAR_SHARED 0x00200000 -#define PF_HP_NEAR_SHARED 0x00400000 -#define PF_HP_CODE 0x01000000 -#define PF_HP_MODIFY 0x02000000 -#define PF_HP_LAZYSWAP 0x04000000 -#define PF_HP_SBP 0x08000000 - - - - - - -#define EF_ALPHA_32BIT 1 -#define EF_ALPHA_CANRELAX 2 - - - - -#define SHT_ALPHA_DEBUG 0x70000001 -#define SHT_ALPHA_REGINFO 0x70000002 - - - -#define SHF_ALPHA_GPREL 0x10000000 - - -#define STO_ALPHA_NOPV 0x80 -#define STO_ALPHA_STD_GPLOAD 0x88 - - - -#define R_ALPHA_NONE 0 -#define R_ALPHA_REFLONG 1 -#define R_ALPHA_REFQUAD 2 -#define R_ALPHA_GPREL32 3 -#define R_ALPHA_LITERAL 4 -#define R_ALPHA_LITUSE 5 -#define R_ALPHA_GPDISP 6 -#define R_ALPHA_BRADDR 7 -#define R_ALPHA_HINT 8 -#define R_ALPHA_SREL16 9 -#define R_ALPHA_SREL32 10 -#define R_ALPHA_SREL64 11 -#define R_ALPHA_GPRELHIGH 17 -#define R_ALPHA_GPRELLOW 18 -#define R_ALPHA_GPREL16 19 -#define R_ALPHA_COPY 24 -#define R_ALPHA_GLOB_DAT 25 -#define R_ALPHA_JMP_SLOT 26 -#define R_ALPHA_RELATIVE 27 -#define R_ALPHA_TLS_GD_HI 28 -#define R_ALPHA_TLSGD 29 -#define R_ALPHA_TLS_LDM 30 -#define R_ALPHA_DTPMOD64 31 -#define R_ALPHA_GOTDTPREL 32 -#define R_ALPHA_DTPREL64 33 -#define R_ALPHA_DTPRELHI 34 -#define R_ALPHA_DTPRELLO 35 -#define R_ALPHA_DTPREL16 36 -#define R_ALPHA_GOTTPREL 37 -#define R_ALPHA_TPREL64 38 -#define R_ALPHA_TPRELHI 39 -#define R_ALPHA_TPRELLO 40 -#define R_ALPHA_TPREL16 41 - -#define R_ALPHA_NUM 46 - - -#define LITUSE_ALPHA_ADDR 0 -#define LITUSE_ALPHA_BASE 1 -#define LITUSE_ALPHA_BYTOFF 2 -#define LITUSE_ALPHA_JSR 3 -#define LITUSE_ALPHA_TLS_GD 4 -#define LITUSE_ALPHA_TLS_LDM 5 - - -#define DT_ALPHA_PLTRO (DT_LOPROC + 0) -#define DT_ALPHA_NUM 1 - - - - -#define EF_PPC_EMB 0x80000000 - - -#define EF_PPC_RELOCATABLE 0x00010000 -#define EF_PPC_RELOCATABLE_LIB 0x00008000 - - - -#define R_PPC_NONE 0 -#define R_PPC_ADDR32 1 -#define R_PPC_ADDR24 2 -#define R_PPC_ADDR16 3 -#define R_PPC_ADDR16_LO 4 -#define R_PPC_ADDR16_HI 5 -#define R_PPC_ADDR16_HA 6 -#define R_PPC_ADDR14 7 -#define R_PPC_ADDR14_BRTAKEN 8 -#define R_PPC_ADDR14_BRNTAKEN 9 -#define R_PPC_REL24 10 -#define R_PPC_REL14 11 -#define R_PPC_REL14_BRTAKEN 12 -#define R_PPC_REL14_BRNTAKEN 13 -#define R_PPC_GOT16 14 -#define R_PPC_GOT16_LO 15 -#define R_PPC_GOT16_HI 16 -#define R_PPC_GOT16_HA 17 -#define R_PPC_PLTREL24 18 -#define R_PPC_COPY 19 -#define R_PPC_GLOB_DAT 20 -#define R_PPC_JMP_SLOT 21 -#define R_PPC_RELATIVE 22 -#define R_PPC_LOCAL24PC 23 -#define R_PPC_UADDR32 24 -#define R_PPC_UADDR16 25 -#define R_PPC_REL32 26 -#define R_PPC_PLT32 27 -#define R_PPC_PLTREL32 28 -#define R_PPC_PLT16_LO 29 -#define R_PPC_PLT16_HI 30 -#define R_PPC_PLT16_HA 31 -#define R_PPC_SDAREL16 32 -#define R_PPC_SECTOFF 33 -#define R_PPC_SECTOFF_LO 34 -#define R_PPC_SECTOFF_HI 35 -#define R_PPC_SECTOFF_HA 36 - - -#define R_PPC_TLS 67 -#define R_PPC_DTPMOD32 68 -#define R_PPC_TPREL16 69 -#define R_PPC_TPREL16_LO 70 -#define R_PPC_TPREL16_HI 71 -#define R_PPC_TPREL16_HA 72 -#define R_PPC_TPREL32 73 -#define R_PPC_DTPREL16 74 -#define R_PPC_DTPREL16_LO 75 -#define R_PPC_DTPREL16_HI 76 -#define R_PPC_DTPREL16_HA 77 -#define R_PPC_DTPREL32 78 -#define R_PPC_GOT_TLSGD16 79 -#define R_PPC_GOT_TLSGD16_LO 80 -#define R_PPC_GOT_TLSGD16_HI 81 -#define R_PPC_GOT_TLSGD16_HA 82 -#define R_PPC_GOT_TLSLD16 83 -#define R_PPC_GOT_TLSLD16_LO 84 -#define R_PPC_GOT_TLSLD16_HI 85 -#define R_PPC_GOT_TLSLD16_HA 86 -#define R_PPC_GOT_TPREL16 87 -#define R_PPC_GOT_TPREL16_LO 88 -#define R_PPC_GOT_TPREL16_HI 89 -#define R_PPC_GOT_TPREL16_HA 90 -#define R_PPC_GOT_DTPREL16 91 -#define R_PPC_GOT_DTPREL16_LO 92 -#define R_PPC_GOT_DTPREL16_HI 93 -#define R_PPC_GOT_DTPREL16_HA 94 -#define R_PPC_TLSGD 95 -#define R_PPC_TLSLD 96 - - -#define R_PPC_EMB_NADDR32 101 -#define R_PPC_EMB_NADDR16 102 -#define R_PPC_EMB_NADDR16_LO 103 -#define R_PPC_EMB_NADDR16_HI 104 -#define R_PPC_EMB_NADDR16_HA 105 -#define R_PPC_EMB_SDAI16 106 -#define R_PPC_EMB_SDA2I16 107 -#define R_PPC_EMB_SDA2REL 108 -#define R_PPC_EMB_SDA21 109 -#define R_PPC_EMB_MRKREF 110 -#define R_PPC_EMB_RELSEC16 111 -#define R_PPC_EMB_RELST_LO 112 -#define R_PPC_EMB_RELST_HI 113 -#define R_PPC_EMB_RELST_HA 114 -#define R_PPC_EMB_BIT_FLD 115 -#define R_PPC_EMB_RELSDA 116 - - -#define R_PPC_DIAB_SDA21_LO 180 -#define R_PPC_DIAB_SDA21_HI 181 -#define R_PPC_DIAB_SDA21_HA 182 -#define R_PPC_DIAB_RELSDA_LO 183 -#define R_PPC_DIAB_RELSDA_HI 184 -#define R_PPC_DIAB_RELSDA_HA 185 - - -#define R_PPC_IRELATIVE 248 - - -#define R_PPC_REL16 249 -#define R_PPC_REL16_LO 250 -#define R_PPC_REL16_HI 251 -#define R_PPC_REL16_HA 252 - - - -#define R_PPC_TOC16 255 - - -#define DT_PPC_GOT (DT_LOPROC + 0) -#define DT_PPC_OPT (DT_LOPROC + 1) -#define DT_PPC_NUM 2 - -#define PPC_OPT_TLS 1 - - -#define R_PPC64_NONE R_PPC_NONE -#define R_PPC64_ADDR32 R_PPC_ADDR32 -#define R_PPC64_ADDR24 R_PPC_ADDR24 -#define R_PPC64_ADDR16 R_PPC_ADDR16 -#define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO -#define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI -#define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA -#define R_PPC64_ADDR14 R_PPC_ADDR14 -#define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN -#define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN -#define R_PPC64_REL24 R_PPC_REL24 -#define R_PPC64_REL14 R_PPC_REL14 -#define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN -#define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN -#define R_PPC64_GOT16 R_PPC_GOT16 -#define R_PPC64_GOT16_LO R_PPC_GOT16_LO -#define R_PPC64_GOT16_HI R_PPC_GOT16_HI -#define R_PPC64_GOT16_HA R_PPC_GOT16_HA - -#define R_PPC64_COPY R_PPC_COPY -#define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT -#define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT -#define R_PPC64_RELATIVE R_PPC_RELATIVE - -#define R_PPC64_UADDR32 R_PPC_UADDR32 -#define R_PPC64_UADDR16 R_PPC_UADDR16 -#define R_PPC64_REL32 R_PPC_REL32 -#define R_PPC64_PLT32 R_PPC_PLT32 -#define R_PPC64_PLTREL32 R_PPC_PLTREL32 -#define R_PPC64_PLT16_LO R_PPC_PLT16_LO -#define R_PPC64_PLT16_HI R_PPC_PLT16_HI -#define R_PPC64_PLT16_HA R_PPC_PLT16_HA - -#define R_PPC64_SECTOFF R_PPC_SECTOFF -#define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO -#define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI -#define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA -#define R_PPC64_ADDR30 37 -#define R_PPC64_ADDR64 38 -#define R_PPC64_ADDR16_HIGHER 39 -#define R_PPC64_ADDR16_HIGHERA 40 -#define R_PPC64_ADDR16_HIGHEST 41 -#define R_PPC64_ADDR16_HIGHESTA 42 -#define R_PPC64_UADDR64 43 -#define R_PPC64_REL64 44 -#define R_PPC64_PLT64 45 -#define R_PPC64_PLTREL64 46 -#define R_PPC64_TOC16 47 -#define R_PPC64_TOC16_LO 48 -#define R_PPC64_TOC16_HI 49 -#define R_PPC64_TOC16_HA 50 -#define R_PPC64_TOC 51 -#define R_PPC64_PLTGOT16 52 -#define R_PPC64_PLTGOT16_LO 53 -#define R_PPC64_PLTGOT16_HI 54 -#define R_PPC64_PLTGOT16_HA 55 - -#define R_PPC64_ADDR16_DS 56 -#define R_PPC64_ADDR16_LO_DS 57 -#define R_PPC64_GOT16_DS 58 -#define R_PPC64_GOT16_LO_DS 59 -#define R_PPC64_PLT16_LO_DS 60 -#define R_PPC64_SECTOFF_DS 61 -#define R_PPC64_SECTOFF_LO_DS 62 -#define R_PPC64_TOC16_DS 63 -#define R_PPC64_TOC16_LO_DS 64 -#define R_PPC64_PLTGOT16_DS 65 -#define R_PPC64_PLTGOT16_LO_DS 66 - - -#define R_PPC64_TLS 67 -#define R_PPC64_DTPMOD64 68 -#define R_PPC64_TPREL16 69 -#define R_PPC64_TPREL16_LO 70 -#define R_PPC64_TPREL16_HI 71 -#define R_PPC64_TPREL16_HA 72 -#define R_PPC64_TPREL64 73 -#define R_PPC64_DTPREL16 74 -#define R_PPC64_DTPREL16_LO 75 -#define R_PPC64_DTPREL16_HI 76 -#define R_PPC64_DTPREL16_HA 77 -#define R_PPC64_DTPREL64 78 -#define R_PPC64_GOT_TLSGD16 79 -#define R_PPC64_GOT_TLSGD16_LO 80 -#define R_PPC64_GOT_TLSGD16_HI 81 -#define R_PPC64_GOT_TLSGD16_HA 82 -#define R_PPC64_GOT_TLSLD16 83 -#define R_PPC64_GOT_TLSLD16_LO 84 -#define R_PPC64_GOT_TLSLD16_HI 85 -#define R_PPC64_GOT_TLSLD16_HA 86 -#define R_PPC64_GOT_TPREL16_DS 87 -#define R_PPC64_GOT_TPREL16_LO_DS 88 -#define R_PPC64_GOT_TPREL16_HI 89 -#define R_PPC64_GOT_TPREL16_HA 90 -#define R_PPC64_GOT_DTPREL16_DS 91 -#define R_PPC64_GOT_DTPREL16_LO_DS 92 -#define R_PPC64_GOT_DTPREL16_HI 93 -#define R_PPC64_GOT_DTPREL16_HA 94 -#define R_PPC64_TPREL16_DS 95 -#define R_PPC64_TPREL16_LO_DS 96 -#define R_PPC64_TPREL16_HIGHER 97 -#define R_PPC64_TPREL16_HIGHERA 98 -#define R_PPC64_TPREL16_HIGHEST 99 -#define R_PPC64_TPREL16_HIGHESTA 100 -#define R_PPC64_DTPREL16_DS 101 -#define R_PPC64_DTPREL16_LO_DS 102 -#define R_PPC64_DTPREL16_HIGHER 103 -#define R_PPC64_DTPREL16_HIGHERA 104 -#define R_PPC64_DTPREL16_HIGHEST 105 -#define R_PPC64_DTPREL16_HIGHESTA 106 -#define R_PPC64_TLSGD 107 -#define R_PPC64_TLSLD 108 -#define R_PPC64_TOCSAVE 109 -#define R_PPC64_ADDR16_HIGH 110 -#define R_PPC64_ADDR16_HIGHA 111 -#define R_PPC64_TPREL16_HIGH 112 -#define R_PPC64_TPREL16_HIGHA 113 -#define R_PPC64_DTPREL16_HIGH 114 -#define R_PPC64_DTPREL16_HIGHA 115 - - -#define R_PPC64_JMP_IREL 247 -#define R_PPC64_IRELATIVE 248 -#define R_PPC64_REL16 249 -#define R_PPC64_REL16_LO 250 -#define R_PPC64_REL16_HI 251 -#define R_PPC64_REL16_HA 252 - -#define EF_PPC64_ABI 3 - -#define DT_PPC64_GLINK (DT_LOPROC + 0) -#define DT_PPC64_OPD (DT_LOPROC + 1) -#define DT_PPC64_OPDSZ (DT_LOPROC + 2) -#define DT_PPC64_OPT (DT_LOPROC + 3) -#define DT_PPC64_NUM 4 - -#define PPC64_OPT_TLS 1 -#define PPC64_OPT_MULTI_TOC 2 -#define PPC64_OPT_LOCALENTRY 4 - -#define STO_PPC64_LOCAL_BIT 5 -#define STO_PPC64_LOCAL_MASK 0xe0 -#define PPC64_LOCAL_ENTRY_OFFSET(x) (1 << (((x)&0xe0)>>5) & 0xfc) - - -#define EF_ARM_RELEXEC 0x01 -#define EF_ARM_HASENTRY 0x02 -#define EF_ARM_INTERWORK 0x04 -#define EF_ARM_APCS_26 0x08 -#define EF_ARM_APCS_FLOAT 0x10 -#define EF_ARM_PIC 0x20 -#define EF_ARM_ALIGN8 0x40 -#define EF_ARM_NEW_ABI 0x80 -#define EF_ARM_OLD_ABI 0x100 -#define EF_ARM_SOFT_FLOAT 0x200 -#define EF_ARM_VFP_FLOAT 0x400 -#define EF_ARM_MAVERICK_FLOAT 0x800 - -#define EF_ARM_ABI_FLOAT_SOFT 0x200 -#define EF_ARM_ABI_FLOAT_HARD 0x400 - - -#define EF_ARM_SYMSARESORTED 0x04 -#define EF_ARM_DYNSYMSUSESEGIDX 0x08 -#define EF_ARM_MAPSYMSFIRST 0x10 -#define EF_ARM_EABIMASK 0XFF000000 - - -#define EF_ARM_BE8 0x00800000 -#define EF_ARM_LE8 0x00400000 - -#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK) -#define EF_ARM_EABI_UNKNOWN 0x00000000 -#define EF_ARM_EABI_VER1 0x01000000 -#define EF_ARM_EABI_VER2 0x02000000 -#define EF_ARM_EABI_VER3 0x03000000 -#define EF_ARM_EABI_VER4 0x04000000 -#define EF_ARM_EABI_VER5 0x05000000 - - -#define STT_ARM_TFUNC STT_LOPROC -#define STT_ARM_16BIT STT_HIPROC - - -#define SHF_ARM_ENTRYSECT 0x10000000 -#define SHF_ARM_COMDEF 0x80000000 - - - -#define PF_ARM_SB 0x10000000 - -#define PF_ARM_PI 0x20000000 -#define PF_ARM_ABS 0x40000000 - - -#define PT_ARM_EXIDX (PT_LOPROC + 1) - - -#define SHT_ARM_EXIDX (SHT_LOPROC + 1) -#define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) -#define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) - -#define R_AARCH64_NONE 0 -#define R_AARCH64_P32_ABS32 1 -#define R_AARCH64_P32_COPY 180 -#define R_AARCH64_P32_GLOB_DAT 181 -#define R_AARCH64_P32_JUMP_SLOT 182 -#define R_AARCH64_P32_RELATIVE 183 -#define R_AARCH64_P32_TLS_DTPMOD 184 -#define R_AARCH64_P32_TLS_DTPREL 185 -#define R_AARCH64_P32_TLS_TPREL 186 -#define R_AARCH64_P32_TLSDESC 187 -#define R_AARCH64_P32_IRELATIVE 188 -#define R_AARCH64_ABS64 257 -#define R_AARCH64_ABS32 258 -#define R_AARCH64_ABS16 259 -#define R_AARCH64_PREL64 260 -#define R_AARCH64_PREL32 261 -#define R_AARCH64_PREL16 262 -#define R_AARCH64_MOVW_UABS_G0 263 -#define R_AARCH64_MOVW_UABS_G0_NC 264 -#define R_AARCH64_MOVW_UABS_G1 265 -#define R_AARCH64_MOVW_UABS_G1_NC 266 -#define R_AARCH64_MOVW_UABS_G2 267 -#define R_AARCH64_MOVW_UABS_G2_NC 268 -#define R_AARCH64_MOVW_UABS_G3 269 -#define R_AARCH64_MOVW_SABS_G0 270 -#define R_AARCH64_MOVW_SABS_G1 271 -#define R_AARCH64_MOVW_SABS_G2 272 -#define R_AARCH64_LD_PREL_LO19 273 -#define R_AARCH64_ADR_PREL_LO21 274 -#define R_AARCH64_ADR_PREL_PG_HI21 275 -#define R_AARCH64_ADR_PREL_PG_HI21_NC 276 -#define R_AARCH64_ADD_ABS_LO12_NC 277 -#define R_AARCH64_LDST8_ABS_LO12_NC 278 -#define R_AARCH64_TSTBR14 279 -#define R_AARCH64_CONDBR19 280 -#define R_AARCH64_JUMP26 282 -#define R_AARCH64_CALL26 283 -#define R_AARCH64_LDST16_ABS_LO12_NC 284 -#define R_AARCH64_LDST32_ABS_LO12_NC 285 -#define R_AARCH64_LDST64_ABS_LO12_NC 286 -#define R_AARCH64_MOVW_PREL_G0 287 -#define R_AARCH64_MOVW_PREL_G0_NC 288 -#define R_AARCH64_MOVW_PREL_G1 289 -#define R_AARCH64_MOVW_PREL_G1_NC 290 -#define R_AARCH64_MOVW_PREL_G2 291 -#define R_AARCH64_MOVW_PREL_G2_NC 292 -#define R_AARCH64_MOVW_PREL_G3 293 -#define R_AARCH64_LDST128_ABS_LO12_NC 299 -#define R_AARCH64_MOVW_GOTOFF_G0 300 -#define R_AARCH64_MOVW_GOTOFF_G0_NC 301 -#define R_AARCH64_MOVW_GOTOFF_G1 302 -#define R_AARCH64_MOVW_GOTOFF_G1_NC 303 -#define R_AARCH64_MOVW_GOTOFF_G2 304 -#define R_AARCH64_MOVW_GOTOFF_G2_NC 305 -#define R_AARCH64_MOVW_GOTOFF_G3 306 -#define R_AARCH64_GOTREL64 307 -#define R_AARCH64_GOTREL32 308 -#define R_AARCH64_GOT_LD_PREL19 309 -#define R_AARCH64_LD64_GOTOFF_LO15 310 -#define R_AARCH64_ADR_GOT_PAGE 311 -#define R_AARCH64_LD64_GOT_LO12_NC 312 -#define R_AARCH64_LD64_GOTPAGE_LO15 313 -#define R_AARCH64_TLSGD_ADR_PREL21 512 -#define R_AARCH64_TLSGD_ADR_PAGE21 513 -#define R_AARCH64_TLSGD_ADD_LO12_NC 514 -#define R_AARCH64_TLSGD_MOVW_G1 515 -#define R_AARCH64_TLSGD_MOVW_G0_NC 516 -#define R_AARCH64_TLSLD_ADR_PREL21 517 -#define R_AARCH64_TLSLD_ADR_PAGE21 518 -#define R_AARCH64_TLSLD_ADD_LO12_NC 519 -#define R_AARCH64_TLSLD_MOVW_G1 520 -#define R_AARCH64_TLSLD_MOVW_G0_NC 521 -#define R_AARCH64_TLSLD_LD_PREL19 522 -#define R_AARCH64_TLSLD_MOVW_DTPREL_G2 523 -#define R_AARCH64_TLSLD_MOVW_DTPREL_G1 524 -#define R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC 525 -#define R_AARCH64_TLSLD_MOVW_DTPREL_G0 526 -#define R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC 527 -#define R_AARCH64_TLSLD_ADD_DTPREL_HI12 528 -#define R_AARCH64_TLSLD_ADD_DTPREL_LO12 529 -#define R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC 530 -#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12 531 -#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC 532 -#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12 533 -#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC 534 -#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12 535 -#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC 536 -#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12 537 -#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC 538 -#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 539 -#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC 540 -#define R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 541 -#define R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC 542 -#define R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 543 -#define R_AARCH64_TLSLE_MOVW_TPREL_G2 544 -#define R_AARCH64_TLSLE_MOVW_TPREL_G1 545 -#define R_AARCH64_TLSLE_MOVW_TPREL_G1_NC 546 -#define R_AARCH64_TLSLE_MOVW_TPREL_G0 547 -#define R_AARCH64_TLSLE_MOVW_TPREL_G0_NC 548 -#define R_AARCH64_TLSLE_ADD_TPREL_HI12 549 -#define R_AARCH64_TLSLE_ADD_TPREL_LO12 550 -#define R_AARCH64_TLSLE_ADD_TPREL_LO12_NC 551 -#define R_AARCH64_TLSLE_LDST8_TPREL_LO12 552 -#define R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC 553 -#define R_AARCH64_TLSLE_LDST16_TPREL_LO12 554 -#define R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC 555 -#define R_AARCH64_TLSLE_LDST32_TPREL_LO12 556 -#define R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC 557 -#define R_AARCH64_TLSLE_LDST64_TPREL_LO12 558 -#define R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC 559 -#define R_AARCH64_TLSDESC_LD_PREL19 560 -#define R_AARCH64_TLSDESC_ADR_PREL21 561 -#define R_AARCH64_TLSDESC_ADR_PAGE21 562 -#define R_AARCH64_TLSDESC_LD64_LO12 563 -#define R_AARCH64_TLSDESC_ADD_LO12 564 -#define R_AARCH64_TLSDESC_OFF_G1 565 -#define R_AARCH64_TLSDESC_OFF_G0_NC 566 -#define R_AARCH64_TLSDESC_LDR 567 -#define R_AARCH64_TLSDESC_ADD 568 -#define R_AARCH64_TLSDESC_CALL 569 -#define R_AARCH64_TLSLE_LDST128_TPREL_LO12 570 -#define R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC 571 -#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12 572 -#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC 573 -#define R_AARCH64_COPY 1024 -#define R_AARCH64_GLOB_DAT 1025 -#define R_AARCH64_JUMP_SLOT 1026 -#define R_AARCH64_RELATIVE 1027 -#define R_AARCH64_TLS_DTPMOD 1028 -#define R_AARCH64_TLS_DTPMOD64 1028 -#define R_AARCH64_TLS_DTPREL 1029 -#define R_AARCH64_TLS_DTPREL64 1029 -#define R_AARCH64_TLS_TPREL 1030 -#define R_AARCH64_TLS_TPREL64 1030 -#define R_AARCH64_TLSDESC 1031 - - -#define R_ARM_NONE 0 -#define R_ARM_PC24 1 -#define R_ARM_ABS32 2 -#define R_ARM_REL32 3 -#define R_ARM_PC13 4 -#define R_ARM_ABS16 5 -#define R_ARM_ABS12 6 -#define R_ARM_THM_ABS5 7 -#define R_ARM_ABS8 8 -#define R_ARM_SBREL32 9 -#define R_ARM_THM_PC22 10 -#define R_ARM_THM_PC8 11 -#define R_ARM_AMP_VCALL9 12 -#define R_ARM_TLS_DESC 13 -#define R_ARM_THM_SWI8 14 -#define R_ARM_XPC25 15 -#define R_ARM_THM_XPC22 16 -#define R_ARM_TLS_DTPMOD32 17 -#define R_ARM_TLS_DTPOFF32 18 -#define R_ARM_TLS_TPOFF32 19 -#define R_ARM_COPY 20 -#define R_ARM_GLOB_DAT 21 -#define R_ARM_JUMP_SLOT 22 -#define R_ARM_RELATIVE 23 -#define R_ARM_GOTOFF 24 -#define R_ARM_GOTPC 25 -#define R_ARM_GOT32 26 -#define R_ARM_PLT32 27 -#define R_ARM_CALL 28 -#define R_ARM_JUMP24 29 -#define R_ARM_THM_JUMP24 30 -#define R_ARM_BASE_ABS 31 -#define R_ARM_ALU_PCREL_7_0 32 -#define R_ARM_ALU_PCREL_15_8 33 -#define R_ARM_ALU_PCREL_23_15 34 -#define R_ARM_LDR_SBREL_11_0 35 -#define R_ARM_ALU_SBREL_19_12 36 -#define R_ARM_ALU_SBREL_27_20 37 -#define R_ARM_TARGET1 38 -#define R_ARM_SBREL31 39 -#define R_ARM_V4BX 40 -#define R_ARM_TARGET2 41 -#define R_ARM_PREL31 42 -#define R_ARM_MOVW_ABS_NC 43 -#define R_ARM_MOVT_ABS 44 -#define R_ARM_MOVW_PREL_NC 45 -#define R_ARM_MOVT_PREL 46 -#define R_ARM_THM_MOVW_ABS_NC 47 -#define R_ARM_THM_MOVT_ABS 48 -#define R_ARM_THM_MOVW_PREL_NC 49 -#define R_ARM_THM_MOVT_PREL 50 -#define R_ARM_THM_JUMP19 51 -#define R_ARM_THM_JUMP6 52 -#define R_ARM_THM_ALU_PREL_11_0 53 -#define R_ARM_THM_PC12 54 -#define R_ARM_ABS32_NOI 55 -#define R_ARM_REL32_NOI 56 -#define R_ARM_ALU_PC_G0_NC 57 -#define R_ARM_ALU_PC_G0 58 -#define R_ARM_ALU_PC_G1_NC 59 -#define R_ARM_ALU_PC_G1 60 -#define R_ARM_ALU_PC_G2 61 -#define R_ARM_LDR_PC_G1 62 -#define R_ARM_LDR_PC_G2 63 -#define R_ARM_LDRS_PC_G0 64 -#define R_ARM_LDRS_PC_G1 65 -#define R_ARM_LDRS_PC_G2 66 -#define R_ARM_LDC_PC_G0 67 -#define R_ARM_LDC_PC_G1 68 -#define R_ARM_LDC_PC_G2 69 -#define R_ARM_ALU_SB_G0_NC 70 -#define R_ARM_ALU_SB_G0 71 -#define R_ARM_ALU_SB_G1_NC 72 -#define R_ARM_ALU_SB_G1 73 -#define R_ARM_ALU_SB_G2 74 -#define R_ARM_LDR_SB_G0 75 -#define R_ARM_LDR_SB_G1 76 -#define R_ARM_LDR_SB_G2 77 -#define R_ARM_LDRS_SB_G0 78 -#define R_ARM_LDRS_SB_G1 79 -#define R_ARM_LDRS_SB_G2 80 -#define R_ARM_LDC_SB_G0 81 -#define R_ARM_LDC_SB_G1 82 -#define R_ARM_LDC_SB_G2 83 -#define R_ARM_MOVW_BREL_NC 84 -#define R_ARM_MOVT_BREL 85 -#define R_ARM_MOVW_BREL 86 -#define R_ARM_THM_MOVW_BREL_NC 87 -#define R_ARM_THM_MOVT_BREL 88 -#define R_ARM_THM_MOVW_BREL 89 -#define R_ARM_TLS_GOTDESC 90 -#define R_ARM_TLS_CALL 91 -#define R_ARM_TLS_DESCSEQ 92 -#define R_ARM_THM_TLS_CALL 93 -#define R_ARM_PLT32_ABS 94 -#define R_ARM_GOT_ABS 95 -#define R_ARM_GOT_PREL 96 -#define R_ARM_GOT_BREL12 97 -#define R_ARM_GOTOFF12 98 -#define R_ARM_GOTRELAX 99 -#define R_ARM_GNU_VTENTRY 100 -#define R_ARM_GNU_VTINHERIT 101 -#define R_ARM_THM_PC11 102 -#define R_ARM_THM_PC9 103 -#define R_ARM_TLS_GD32 104 - -#define R_ARM_TLS_LDM32 105 - -#define R_ARM_TLS_LDO32 106 - -#define R_ARM_TLS_IE32 107 - -#define R_ARM_TLS_LE32 108 -#define R_ARM_TLS_LDO12 109 -#define R_ARM_TLS_LE12 110 -#define R_ARM_TLS_IE12GP 111 -#define R_ARM_ME_TOO 128 -#define R_ARM_THM_TLS_DESCSEQ 129 -#define R_ARM_THM_TLS_DESCSEQ16 129 -#define R_ARM_THM_TLS_DESCSEQ32 130 -#define R_ARM_THM_GOT_BREL12 131 -#define R_ARM_IRELATIVE 160 -#define R_ARM_RXPC25 249 -#define R_ARM_RSBREL32 250 -#define R_ARM_THM_RPC22 251 -#define R_ARM_RREL32 252 -#define R_ARM_RABS22 253 -#define R_ARM_RPC24 254 -#define R_ARM_RBASE 255 - -#define R_ARM_NUM 256 - - - - -#define EF_IA_64_MASKOS 0x0000000f -#define EF_IA_64_ABI64 0x00000010 -#define EF_IA_64_ARCH 0xff000000 - - -#define PT_IA_64_ARCHEXT (PT_LOPROC + 0) -#define PT_IA_64_UNWIND (PT_LOPROC + 1) -#define PT_IA_64_HP_OPT_ANOT (PT_LOOS + 0x12) -#define PT_IA_64_HP_HSL_ANOT (PT_LOOS + 0x13) -#define PT_IA_64_HP_STACK (PT_LOOS + 0x14) - - -#define PF_IA_64_NORECOV 0x80000000 - - -#define SHT_IA_64_EXT (SHT_LOPROC + 0) -#define SHT_IA_64_UNWIND (SHT_LOPROC + 1) - - -#define SHF_IA_64_SHORT 0x10000000 -#define SHF_IA_64_NORECOV 0x20000000 - - -#define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0) -#define DT_IA_64_NUM 1 - - -#define R_IA64_NONE 0x00 -#define R_IA64_IMM14 0x21 -#define R_IA64_IMM22 0x22 -#define R_IA64_IMM64 0x23 -#define R_IA64_DIR32MSB 0x24 -#define R_IA64_DIR32LSB 0x25 -#define R_IA64_DIR64MSB 0x26 -#define R_IA64_DIR64LSB 0x27 -#define R_IA64_GPREL22 0x2a -#define R_IA64_GPREL64I 0x2b -#define R_IA64_GPREL32MSB 0x2c -#define R_IA64_GPREL32LSB 0x2d -#define R_IA64_GPREL64MSB 0x2e -#define R_IA64_GPREL64LSB 0x2f -#define R_IA64_LTOFF22 0x32 -#define R_IA64_LTOFF64I 0x33 -#define R_IA64_PLTOFF22 0x3a -#define R_IA64_PLTOFF64I 0x3b -#define R_IA64_PLTOFF64MSB 0x3e -#define R_IA64_PLTOFF64LSB 0x3f -#define R_IA64_FPTR64I 0x43 -#define R_IA64_FPTR32MSB 0x44 -#define R_IA64_FPTR32LSB 0x45 -#define R_IA64_FPTR64MSB 0x46 -#define R_IA64_FPTR64LSB 0x47 -#define R_IA64_PCREL60B 0x48 -#define R_IA64_PCREL21B 0x49 -#define R_IA64_PCREL21M 0x4a -#define R_IA64_PCREL21F 0x4b -#define R_IA64_PCREL32MSB 0x4c -#define R_IA64_PCREL32LSB 0x4d -#define R_IA64_PCREL64MSB 0x4e -#define R_IA64_PCREL64LSB 0x4f -#define R_IA64_LTOFF_FPTR22 0x52 -#define R_IA64_LTOFF_FPTR64I 0x53 -#define R_IA64_LTOFF_FPTR32MSB 0x54 -#define R_IA64_LTOFF_FPTR32LSB 0x55 -#define R_IA64_LTOFF_FPTR64MSB 0x56 -#define R_IA64_LTOFF_FPTR64LSB 0x57 -#define R_IA64_SEGREL32MSB 0x5c -#define R_IA64_SEGREL32LSB 0x5d -#define R_IA64_SEGREL64MSB 0x5e -#define R_IA64_SEGREL64LSB 0x5f -#define R_IA64_SECREL32MSB 0x64 -#define R_IA64_SECREL32LSB 0x65 -#define R_IA64_SECREL64MSB 0x66 -#define R_IA64_SECREL64LSB 0x67 -#define R_IA64_REL32MSB 0x6c -#define R_IA64_REL32LSB 0x6d -#define R_IA64_REL64MSB 0x6e -#define R_IA64_REL64LSB 0x6f -#define R_IA64_LTV32MSB 0x74 -#define R_IA64_LTV32LSB 0x75 -#define R_IA64_LTV64MSB 0x76 -#define R_IA64_LTV64LSB 0x77 -#define R_IA64_PCREL21BI 0x79 -#define R_IA64_PCREL22 0x7a -#define R_IA64_PCREL64I 0x7b -#define R_IA64_IPLTMSB 0x80 -#define R_IA64_IPLTLSB 0x81 -#define R_IA64_COPY 0x84 -#define R_IA64_SUB 0x85 -#define R_IA64_LTOFF22X 0x86 -#define R_IA64_LDXMOV 0x87 -#define R_IA64_TPREL14 0x91 -#define R_IA64_TPREL22 0x92 -#define R_IA64_TPREL64I 0x93 -#define R_IA64_TPREL64MSB 0x96 -#define R_IA64_TPREL64LSB 0x97 -#define R_IA64_LTOFF_TPREL22 0x9a -#define R_IA64_DTPMOD64MSB 0xa6 -#define R_IA64_DTPMOD64LSB 0xa7 -#define R_IA64_LTOFF_DTPMOD22 0xaa -#define R_IA64_DTPREL14 0xb1 -#define R_IA64_DTPREL22 0xb2 -#define R_IA64_DTPREL64I 0xb3 -#define R_IA64_DTPREL32MSB 0xb4 -#define R_IA64_DTPREL32LSB 0xb5 -#define R_IA64_DTPREL64MSB 0xb6 -#define R_IA64_DTPREL64LSB 0xb7 -#define R_IA64_LTOFF_DTPREL22 0xba - - -#define EF_SH_MACH_MASK 0x1f -#define EF_SH_UNKNOWN 0x0 -#define EF_SH1 0x1 -#define EF_SH2 0x2 -#define EF_SH3 0x3 -#define EF_SH_DSP 0x4 -#define EF_SH3_DSP 0x5 -#define EF_SH4AL_DSP 0x6 -#define EF_SH3E 0x8 -#define EF_SH4 0x9 -#define EF_SH2E 0xb -#define EF_SH4A 0xc -#define EF_SH2A 0xd -#define EF_SH4_NOFPU 0x10 -#define EF_SH4A_NOFPU 0x11 -#define EF_SH4_NOMMU_NOFPU 0x12 -#define EF_SH2A_NOFPU 0x13 -#define EF_SH3_NOMMU 0x14 -#define EF_SH2A_SH4_NOFPU 0x15 -#define EF_SH2A_SH3_NOFPU 0x16 -#define EF_SH2A_SH4 0x17 -#define EF_SH2A_SH3E 0x18 - -#define R_SH_NONE 0 -#define R_SH_DIR32 1 -#define R_SH_REL32 2 -#define R_SH_DIR8WPN 3 -#define R_SH_IND12W 4 -#define R_SH_DIR8WPL 5 -#define R_SH_DIR8WPZ 6 -#define R_SH_DIR8BP 7 -#define R_SH_DIR8W 8 -#define R_SH_DIR8L 9 -#define R_SH_SWITCH16 25 -#define R_SH_SWITCH32 26 -#define R_SH_USES 27 -#define R_SH_COUNT 28 -#define R_SH_ALIGN 29 -#define R_SH_CODE 30 -#define R_SH_DATA 31 -#define R_SH_LABEL 32 -#define R_SH_SWITCH8 33 -#define R_SH_GNU_VTINHERIT 34 -#define R_SH_GNU_VTENTRY 35 -#define R_SH_TLS_GD_32 144 -#define R_SH_TLS_LD_32 145 -#define R_SH_TLS_LDO_32 146 -#define R_SH_TLS_IE_32 147 -#define R_SH_TLS_LE_32 148 -#define R_SH_TLS_DTPMOD32 149 -#define R_SH_TLS_DTPOFF32 150 -#define R_SH_TLS_TPOFF32 151 -#define R_SH_GOT32 160 -#define R_SH_PLT32 161 -#define R_SH_COPY 162 -#define R_SH_GLOB_DAT 163 -#define R_SH_JMP_SLOT 164 -#define R_SH_RELATIVE 165 -#define R_SH_GOTOFF 166 -#define R_SH_GOTPC 167 -#define R_SH_GOT20 201 -#define R_SH_GOTOFF20 202 -#define R_SH_GOTFUNCDESC 203 -#define R_SH_GOTFUNCDEST20 204 -#define R_SH_GOTOFFFUNCDESC 205 -#define R_SH_GOTOFFFUNCDEST20 206 -#define R_SH_FUNCDESC 207 -#define R_SH_FUNCDESC_VALUE 208 - -#define R_SH_NUM 256 - - - -#define R_390_NONE 0 -#define R_390_8 1 -#define R_390_12 2 -#define R_390_16 3 -#define R_390_32 4 -#define R_390_PC32 5 -#define R_390_GOT12 6 -#define R_390_GOT32 7 -#define R_390_PLT32 8 -#define R_390_COPY 9 -#define R_390_GLOB_DAT 10 -#define R_390_JMP_SLOT 11 -#define R_390_RELATIVE 12 -#define R_390_GOTOFF32 13 -#define R_390_GOTPC 14 -#define R_390_GOT16 15 -#define R_390_PC16 16 -#define R_390_PC16DBL 17 -#define R_390_PLT16DBL 18 -#define R_390_PC32DBL 19 -#define R_390_PLT32DBL 20 -#define R_390_GOTPCDBL 21 -#define R_390_64 22 -#define R_390_PC64 23 -#define R_390_GOT64 24 -#define R_390_PLT64 25 -#define R_390_GOTENT 26 -#define R_390_GOTOFF16 27 -#define R_390_GOTOFF64 28 -#define R_390_GOTPLT12 29 -#define R_390_GOTPLT16 30 -#define R_390_GOTPLT32 31 -#define R_390_GOTPLT64 32 -#define R_390_GOTPLTENT 33 -#define R_390_PLTOFF16 34 -#define R_390_PLTOFF32 35 -#define R_390_PLTOFF64 36 -#define R_390_TLS_LOAD 37 -#define R_390_TLS_GDCALL 38 - -#define R_390_TLS_LDCALL 39 - -#define R_390_TLS_GD32 40 - -#define R_390_TLS_GD64 41 - -#define R_390_TLS_GOTIE12 42 - -#define R_390_TLS_GOTIE32 43 - -#define R_390_TLS_GOTIE64 44 - -#define R_390_TLS_LDM32 45 - -#define R_390_TLS_LDM64 46 - -#define R_390_TLS_IE32 47 - -#define R_390_TLS_IE64 48 - -#define R_390_TLS_IEENT 49 - -#define R_390_TLS_LE32 50 - -#define R_390_TLS_LE64 51 - -#define R_390_TLS_LDO32 52 - -#define R_390_TLS_LDO64 53 - -#define R_390_TLS_DTPMOD 54 -#define R_390_TLS_DTPOFF 55 -#define R_390_TLS_TPOFF 56 - -#define R_390_20 57 -#define R_390_GOT20 58 -#define R_390_GOTPLT20 59 -#define R_390_TLS_GOTIE20 60 - - -#define R_390_NUM 61 - - - -#define R_CRIS_NONE 0 -#define R_CRIS_8 1 -#define R_CRIS_16 2 -#define R_CRIS_32 3 -#define R_CRIS_8_PCREL 4 -#define R_CRIS_16_PCREL 5 -#define R_CRIS_32_PCREL 6 -#define R_CRIS_GNU_VTINHERIT 7 -#define R_CRIS_GNU_VTENTRY 8 -#define R_CRIS_COPY 9 -#define R_CRIS_GLOB_DAT 10 -#define R_CRIS_JUMP_SLOT 11 -#define R_CRIS_RELATIVE 12 -#define R_CRIS_16_GOT 13 -#define R_CRIS_32_GOT 14 -#define R_CRIS_16_GOTPLT 15 -#define R_CRIS_32_GOTPLT 16 -#define R_CRIS_32_GOTREL 17 -#define R_CRIS_32_PLT_GOTREL 18 -#define R_CRIS_32_PLT_PCREL 19 - -#define R_CRIS_NUM 20 - - - -#define R_X86_64_NONE 0 -#define R_X86_64_64 1 -#define R_X86_64_PC32 2 -#define R_X86_64_GOT32 3 -#define R_X86_64_PLT32 4 -#define R_X86_64_COPY 5 -#define R_X86_64_GLOB_DAT 6 -#define R_X86_64_JUMP_SLOT 7 -#define R_X86_64_RELATIVE 8 -#define R_X86_64_GOTPCREL 9 - -#define R_X86_64_32 10 -#define R_X86_64_32S 11 -#define R_X86_64_16 12 -#define R_X86_64_PC16 13 -#define R_X86_64_8 14 -#define R_X86_64_PC8 15 -#define R_X86_64_DTPMOD64 16 -#define R_X86_64_DTPOFF64 17 -#define R_X86_64_TPOFF64 18 -#define R_X86_64_TLSGD 19 - -#define R_X86_64_TLSLD 20 - -#define R_X86_64_DTPOFF32 21 -#define R_X86_64_GOTTPOFF 22 - -#define R_X86_64_TPOFF32 23 -#define R_X86_64_PC64 24 -#define R_X86_64_GOTOFF64 25 -#define R_X86_64_GOTPC32 26 -#define R_X86_64_GOT64 27 -#define R_X86_64_GOTPCREL64 28 -#define R_X86_64_GOTPC64 29 -#define R_X86_64_GOTPLT64 30 -#define R_X86_64_PLTOFF64 31 -#define R_X86_64_SIZE32 32 -#define R_X86_64_SIZE64 33 - -#define R_X86_64_GOTPC32_TLSDESC 34 -#define R_X86_64_TLSDESC_CALL 35 - -#define R_X86_64_TLSDESC 36 -#define R_X86_64_IRELATIVE 37 -#define R_X86_64_RELATIVE64 38 -#define R_X86_64_GOTPCRELX 41 -#define R_X86_64_REX_GOTPCRELX 42 -#define R_X86_64_NUM 43 - - - -#define R_MN10300_NONE 0 -#define R_MN10300_32 1 -#define R_MN10300_16 2 -#define R_MN10300_8 3 -#define R_MN10300_PCREL32 4 -#define R_MN10300_PCREL16 5 -#define R_MN10300_PCREL8 6 -#define R_MN10300_GNU_VTINHERIT 7 -#define R_MN10300_GNU_VTENTRY 8 -#define R_MN10300_24 9 -#define R_MN10300_GOTPC32 10 -#define R_MN10300_GOTPC16 11 -#define R_MN10300_GOTOFF32 12 -#define R_MN10300_GOTOFF24 13 -#define R_MN10300_GOTOFF16 14 -#define R_MN10300_PLT32 15 -#define R_MN10300_PLT16 16 -#define R_MN10300_GOT32 17 -#define R_MN10300_GOT24 18 -#define R_MN10300_GOT16 19 -#define R_MN10300_COPY 20 -#define R_MN10300_GLOB_DAT 21 -#define R_MN10300_JMP_SLOT 22 -#define R_MN10300_RELATIVE 23 - -#define R_MN10300_NUM 24 - - - -#define R_M32R_NONE 0 -#define R_M32R_16 1 -#define R_M32R_32 2 -#define R_M32R_24 3 -#define R_M32R_10_PCREL 4 -#define R_M32R_18_PCREL 5 -#define R_M32R_26_PCREL 6 -#define R_M32R_HI16_ULO 7 -#define R_M32R_HI16_SLO 8 -#define R_M32R_LO16 9 -#define R_M32R_SDA16 10 -#define R_M32R_GNU_VTINHERIT 11 -#define R_M32R_GNU_VTENTRY 12 - -#define R_M32R_16_RELA 33 -#define R_M32R_32_RELA 34 -#define R_M32R_24_RELA 35 -#define R_M32R_10_PCREL_RELA 36 -#define R_M32R_18_PCREL_RELA 37 -#define R_M32R_26_PCREL_RELA 38 -#define R_M32R_HI16_ULO_RELA 39 -#define R_M32R_HI16_SLO_RELA 40 -#define R_M32R_LO16_RELA 41 -#define R_M32R_SDA16_RELA 42 -#define R_M32R_RELA_GNU_VTINHERIT 43 -#define R_M32R_RELA_GNU_VTENTRY 44 -#define R_M32R_REL32 45 - -#define R_M32R_GOT24 48 -#define R_M32R_26_PLTREL 49 -#define R_M32R_COPY 50 -#define R_M32R_GLOB_DAT 51 -#define R_M32R_JMP_SLOT 52 -#define R_M32R_RELATIVE 53 -#define R_M32R_GOTOFF 54 -#define R_M32R_GOTPC24 55 -#define R_M32R_GOT16_HI_ULO 56 - -#define R_M32R_GOT16_HI_SLO 57 - -#define R_M32R_GOT16_LO 58 -#define R_M32R_GOTPC_HI_ULO 59 - -#define R_M32R_GOTPC_HI_SLO 60 - -#define R_M32R_GOTPC_LO 61 - -#define R_M32R_GOTOFF_HI_ULO 62 - -#define R_M32R_GOTOFF_HI_SLO 63 - -#define R_M32R_GOTOFF_LO 64 -#define R_M32R_NUM 256 - -#define R_MICROBLAZE_NONE 0 -#define R_MICROBLAZE_32 1 -#define R_MICROBLAZE_32_PCREL 2 -#define R_MICROBLAZE_64_PCREL 3 -#define R_MICROBLAZE_32_PCREL_LO 4 -#define R_MICROBLAZE_64 5 -#define R_MICROBLAZE_32_LO 6 -#define R_MICROBLAZE_SRO32 7 -#define R_MICROBLAZE_SRW32 8 -#define R_MICROBLAZE_64_NONE 9 -#define R_MICROBLAZE_32_SYM_OP_SYM 10 -#define R_MICROBLAZE_GNU_VTINHERIT 11 -#define R_MICROBLAZE_GNU_VTENTRY 12 -#define R_MICROBLAZE_GOTPC_64 13 -#define R_MICROBLAZE_GOT_64 14 -#define R_MICROBLAZE_PLT_64 15 -#define R_MICROBLAZE_REL 16 -#define R_MICROBLAZE_JUMP_SLOT 17 -#define R_MICROBLAZE_GLOB_DAT 18 -#define R_MICROBLAZE_GOTOFF_64 19 -#define R_MICROBLAZE_GOTOFF_32 20 -#define R_MICROBLAZE_COPY 21 -#define R_MICROBLAZE_TLS 22 -#define R_MICROBLAZE_TLSGD 23 -#define R_MICROBLAZE_TLSLD 24 -#define R_MICROBLAZE_TLSDTPMOD32 25 -#define R_MICROBLAZE_TLSDTPREL32 26 -#define R_MICROBLAZE_TLSDTPREL64 27 -#define R_MICROBLAZE_TLSGOTTPREL32 28 -#define R_MICROBLAZE_TLSTPREL32 29 - -#define DT_NIOS2_GP 0x70000002 - -#define R_NIOS2_NONE 0 -#define R_NIOS2_S16 1 -#define R_NIOS2_U16 2 -#define R_NIOS2_PCREL16 3 -#define R_NIOS2_CALL26 4 -#define R_NIOS2_IMM5 5 -#define R_NIOS2_CACHE_OPX 6 -#define R_NIOS2_IMM6 7 -#define R_NIOS2_IMM8 8 -#define R_NIOS2_HI16 9 -#define R_NIOS2_LO16 10 -#define R_NIOS2_HIADJ16 11 -#define R_NIOS2_BFD_RELOC_32 12 -#define R_NIOS2_BFD_RELOC_16 13 -#define R_NIOS2_BFD_RELOC_8 14 -#define R_NIOS2_GPREL 15 -#define R_NIOS2_GNU_VTINHERIT 16 -#define R_NIOS2_GNU_VTENTRY 17 -#define R_NIOS2_UJMP 18 -#define R_NIOS2_CJMP 19 -#define R_NIOS2_CALLR 20 -#define R_NIOS2_ALIGN 21 -#define R_NIOS2_GOT16 22 -#define R_NIOS2_CALL16 23 -#define R_NIOS2_GOTOFF_LO 24 -#define R_NIOS2_GOTOFF_HA 25 -#define R_NIOS2_PCREL_LO 26 -#define R_NIOS2_PCREL_HA 27 -#define R_NIOS2_TLS_GD16 28 -#define R_NIOS2_TLS_LDM16 29 -#define R_NIOS2_TLS_LDO16 30 -#define R_NIOS2_TLS_IE16 31 -#define R_NIOS2_TLS_LE16 32 -#define R_NIOS2_TLS_DTPMOD 33 -#define R_NIOS2_TLS_DTPREL 34 -#define R_NIOS2_TLS_TPREL 35 -#define R_NIOS2_COPY 36 -#define R_NIOS2_GLOB_DAT 37 -#define R_NIOS2_JUMP_SLOT 38 -#define R_NIOS2_RELATIVE 39 -#define R_NIOS2_GOTOFF 40 -#define R_NIOS2_CALL26_NOAT 41 -#define R_NIOS2_GOT_LO 42 -#define R_NIOS2_GOT_HA 43 -#define R_NIOS2_CALL_LO 44 -#define R_NIOS2_CALL_HA 45 - -#define R_OR1K_NONE 0 -#define R_OR1K_32 1 -#define R_OR1K_16 2 -#define R_OR1K_8 3 -#define R_OR1K_LO_16_IN_INSN 4 -#define R_OR1K_HI_16_IN_INSN 5 -#define R_OR1K_INSN_REL_26 6 -#define R_OR1K_GNU_VTENTRY 7 -#define R_OR1K_GNU_VTINHERIT 8 -#define R_OR1K_32_PCREL 9 -#define R_OR1K_16_PCREL 10 -#define R_OR1K_8_PCREL 11 -#define R_OR1K_GOTPC_HI16 12 -#define R_OR1K_GOTPC_LO16 13 -#define R_OR1K_GOT16 14 -#define R_OR1K_PLT26 15 -#define R_OR1K_GOTOFF_HI16 16 -#define R_OR1K_GOTOFF_LO16 17 -#define R_OR1K_COPY 18 -#define R_OR1K_GLOB_DAT 19 -#define R_OR1K_JMP_SLOT 20 -#define R_OR1K_RELATIVE 21 -#define R_OR1K_TLS_GD_HI16 22 -#define R_OR1K_TLS_GD_LO16 23 -#define R_OR1K_TLS_LDM_HI16 24 -#define R_OR1K_TLS_LDM_LO16 25 -#define R_OR1K_TLS_LDO_HI16 26 -#define R_OR1K_TLS_LDO_LO16 27 -#define R_OR1K_TLS_IE_HI16 28 -#define R_OR1K_TLS_IE_LO16 29 -#define R_OR1K_TLS_LE_HI16 30 -#define R_OR1K_TLS_LE_LO16 31 -#define R_OR1K_TLS_TPOFF 32 -#define R_OR1K_TLS_DTPOFF 33 -#define R_OR1K_TLS_DTPMOD 34 - -#define R_BPF_NONE 0 -#define R_BPF_MAP_FD 1 - -#define R_RISCV_NONE 0 -#define R_RISCV_32 1 -#define R_RISCV_64 2 -#define R_RISCV_RELATIVE 3 -#define R_RISCV_COPY 4 -#define R_RISCV_JUMP_SLOT 5 -#define R_RISCV_TLS_DTPMOD32 6 -#define R_RISCV_TLS_DTPMOD64 7 -#define R_RISCV_TLS_DTPREL32 8 -#define R_RISCV_TLS_DTPREL64 9 -#define R_RISCV_TLS_TPREL32 10 -#define R_RISCV_TLS_TPREL64 11 - -#define R_RISCV_BRANCH 16 -#define R_RISCV_JAL 17 -#define R_RISCV_CALL 18 -#define R_RISCV_CALL_PLT 19 -#define R_RISCV_GOT_HI20 20 -#define R_RISCV_TLS_GOT_HI20 21 -#define R_RISCV_TLS_GD_HI20 22 -#define R_RISCV_PCREL_HI20 23 -#define R_RISCV_PCREL_LO12_I 24 -#define R_RISCV_PCREL_LO12_S 25 -#define R_RISCV_HI20 26 -#define R_RISCV_LO12_I 27 -#define R_RISCV_LO12_S 28 -#define R_RISCV_TPREL_HI20 29 -#define R_RISCV_TPREL_LO12_I 30 -#define R_RISCV_TPREL_LO12_S 31 -#define R_RISCV_TPREL_ADD 32 -#define R_RISCV_ADD8 33 -#define R_RISCV_ADD16 34 -#define R_RISCV_ADD32 35 -#define R_RISCV_ADD64 36 -#define R_RISCV_SUB8 37 -#define R_RISCV_SUB16 38 -#define R_RISCV_SUB32 39 -#define R_RISCV_SUB64 40 -#define R_RISCV_GNU_VTINHERIT 41 -#define R_RISCV_GNU_VTENTRY 42 -#define R_RISCV_ALIGN 43 -#define R_RISCV_RVC_BRANCH 44 -#define R_RISCV_RVC_JUMP 45 -#define R_RISCV_RVC_LUI 46 -#define R_RISCV_GPREL_I 47 -#define R_RISCV_GPREL_S 48 -#define R_RISCV_TPREL_I 49 -#define R_RISCV_TPREL_S 50 -#define R_RISCV_RELAX 51 -#define R_RISCV_SUB6 52 -#define R_RISCV_SET6 53 -#define R_RISCV_SET8 54 -#define R_RISCV_SET16 55 -#define R_RISCV_SET32 56 -#define R_RISCV_32_PCREL 57 - -#ifdef __cplusplus -} -#endif - - -#endif \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/netinet/tcp.h b/lib/libc/include/riscv32-linux-musl/netinet/tcp.h deleted file mode 100644 index ba72214424..0000000000 --- a/lib/libc/include/riscv32-linux-musl/netinet/tcp.h +++ /dev/null @@ -1,253 +0,0 @@ -#ifndef _NETINET_TCP_H -#define _NETINET_TCP_H - -#include - -#define TCP_NODELAY 1 -#define TCP_MAXSEG 2 -#define TCP_CORK 3 -#define TCP_KEEPIDLE 4 -#define TCP_KEEPINTVL 5 -#define TCP_KEEPCNT 6 -#define TCP_SYNCNT 7 -#define TCP_LINGER2 8 -#define TCP_DEFER_ACCEPT 9 -#define TCP_WINDOW_CLAMP 10 -#define TCP_INFO 11 -#define TCP_QUICKACK 12 -#define TCP_CONGESTION 13 -#define TCP_MD5SIG 14 -#define TCP_THIN_LINEAR_TIMEOUTS 16 -#define TCP_THIN_DUPACK 17 -#define TCP_USER_TIMEOUT 18 -#define TCP_REPAIR 19 -#define TCP_REPAIR_QUEUE 20 -#define TCP_QUEUE_SEQ 21 -#define TCP_REPAIR_OPTIONS 22 -#define TCP_FASTOPEN 23 -#define TCP_TIMESTAMP 24 -#define TCP_NOTSENT_LOWAT 25 -#define TCP_CC_INFO 26 -#define TCP_SAVE_SYN 27 -#define TCP_SAVED_SYN 28 -#define TCP_REPAIR_WINDOW 29 -#define TCP_FASTOPEN_CONNECT 30 -#define TCP_ULP 31 -#define TCP_MD5SIG_EXT 32 -#define TCP_FASTOPEN_KEY 33 -#define TCP_FASTOPEN_NO_COOKIE 34 - -#define TCP_ESTABLISHED 1 -#define TCP_SYN_SENT 2 -#define TCP_SYN_RECV 3 -#define TCP_FIN_WAIT1 4 -#define TCP_FIN_WAIT2 5 -#define TCP_TIME_WAIT 6 -#define TCP_CLOSE 7 -#define TCP_CLOSE_WAIT 8 -#define TCP_LAST_ACK 9 -#define TCP_LISTEN 10 -#define TCP_CLOSING 11 - -enum { - TCP_NLA_PAD, - TCP_NLA_BUSY, - TCP_NLA_RWND_LIMITED, - TCP_NLA_SNDBUF_LIMITED, - TCP_NLA_DATA_SEGS_OUT, - TCP_NLA_TOTAL_RETRANS, - TCP_NLA_PACING_RATE, - TCP_NLA_DELIVERY_RATE, - TCP_NLA_SND_CWND, - TCP_NLA_REORDERING, - TCP_NLA_MIN_RTT, - TCP_NLA_RECUR_RETRANS, - TCP_NLA_DELIVERY_RATE_APP_LMT, - TCP_NLA_SNDQ_SIZE, - TCP_NLA_CA_STATE, - TCP_NLA_SND_SSTHRESH, -}; - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define TCPOPT_EOL 0 -#define TCPOPT_NOP 1 -#define TCPOPT_MAXSEG 2 -#define TCPOPT_WINDOW 3 -#define TCPOPT_SACK_PERMITTED 4 -#define TCPOPT_SACK 5 -#define TCPOPT_TIMESTAMP 8 -#define TCPOLEN_SACK_PERMITTED 2 -#define TCPOLEN_WINDOW 3 -#define TCPOLEN_MAXSEG 4 -#define TCPOLEN_TIMESTAMP 10 - -#define SOL_TCP 6 - -#include -#include -#include -#include - -typedef uint32_t tcp_seq; - -#define TH_FIN 0x01 -#define TH_SYN 0x02 -#define TH_RST 0x04 -#define TH_PUSH 0x08 -#define TH_ACK 0x10 -#define TH_URG 0x20 - -struct tcphdr { -#ifdef _GNU_SOURCE -#ifdef __GNUC__ - __extension__ -#endif - union { struct { - - uint16_t source; - uint16_t dest; - uint32_t seq; - uint32_t ack_seq; -#if __BYTE_ORDER == __LITTLE_ENDIAN - uint16_t res1:4; - uint16_t doff:4; - uint16_t fin:1; - uint16_t syn:1; - uint16_t rst:1; - uint16_t psh:1; - uint16_t ack:1; - uint16_t urg:1; - uint16_t res2:2; -#else - uint16_t doff:4; - uint16_t res1:4; - uint16_t res2:2; - uint16_t urg:1; - uint16_t ack:1; - uint16_t psh:1; - uint16_t rst:1; - uint16_t syn:1; - uint16_t fin:1; -#endif - uint16_t window; - uint16_t check; - uint16_t urg_ptr; - - }; struct { -#endif - - uint16_t th_sport; - uint16_t th_dport; - uint32_t th_seq; - uint32_t th_ack; -#if __BYTE_ORDER == __LITTLE_ENDIAN - uint8_t th_x2:4; - uint8_t th_off:4; -#else - uint8_t th_off:4; - uint8_t th_x2:4; -#endif - uint8_t th_flags; - uint16_t th_win; - uint16_t th_sum; - uint16_t th_urp; - -#ifdef _GNU_SOURCE - }; }; -#endif -}; -#endif - -#ifdef _GNU_SOURCE -#define TCPI_OPT_TIMESTAMPS 1 -#define TCPI_OPT_SACK 2 -#define TCPI_OPT_WSCALE 4 -#define TCPI_OPT_ECN 8 - -#define TCP_CA_Open 0 -#define TCP_CA_Disorder 1 -#define TCP_CA_CWR 2 -#define TCP_CA_Recovery 3 -#define TCP_CA_Loss 4 - -struct tcp_info { - uint8_t tcpi_state; - uint8_t tcpi_ca_state; - uint8_t tcpi_retransmits; - uint8_t tcpi_probes; - uint8_t tcpi_backoff; - uint8_t tcpi_options; - uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; - uint8_t tcpi_delivery_rate_app_limited : 1; - uint32_t tcpi_rto; - uint32_t tcpi_ato; - uint32_t tcpi_snd_mss; - uint32_t tcpi_rcv_mss; - uint32_t tcpi_unacked; - uint32_t tcpi_sacked; - uint32_t tcpi_lost; - uint32_t tcpi_retrans; - uint32_t tcpi_fackets; - uint32_t tcpi_last_data_sent; - uint32_t tcpi_last_ack_sent; - uint32_t tcpi_last_data_recv; - uint32_t tcpi_last_ack_recv; - uint32_t tcpi_pmtu; - uint32_t tcpi_rcv_ssthresh; - uint32_t tcpi_rtt; - uint32_t tcpi_rttvar; - uint32_t tcpi_snd_ssthresh; - uint32_t tcpi_snd_cwnd; - uint32_t tcpi_advmss; - uint32_t tcpi_reordering; - uint32_t tcpi_rcv_rtt; - uint32_t tcpi_rcv_space; - uint32_t tcpi_total_retrans; - uint64_t tcpi_pacing_rate; - uint64_t tcpi_max_pacing_rate; - uint64_t tcpi_bytes_acked; - uint64_t tcpi_bytes_received; - uint32_t tcpi_segs_out; - uint32_t tcpi_segs_in; - uint32_t tcpi_notsent_bytes; - uint32_t tcpi_min_rtt; - uint32_t tcpi_data_segs_in; - uint32_t tcpi_data_segs_out; - uint64_t tcpi_delivery_rate; - uint64_t tcpi_busy_time; - uint64_t tcpi_rwnd_limited; - uint64_t tcpi_sndbuf_limited; -}; - -#define TCP_MD5SIG_MAXKEYLEN 80 - -#define TCP_MD5SIG_FLAG_PREFIX 1 - -struct tcp_md5sig { - struct sockaddr_storage tcpm_addr; - uint8_t tcpm_flags; - uint8_t tcpm_prefixlen; - uint16_t tcpm_keylen; - uint32_t __tcpm_pad; - uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; -}; - -struct tcp_diag_md5sig { - uint8_t tcpm_family; - uint8_t tcpm_prefixlen; - uint16_t tcpm_keylen; - uint32_t tcpm_addr[4]; - uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; -}; - -struct tcp_repair_window { - uint32_t snd_wl1; - uint32_t snd_wnd; - uint32_t max_window; - uint32_t rcv_wnd; - uint32_t rcv_wup; -}; - -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/netinet/udp.h b/lib/libc/include/riscv32-linux-musl/netinet/udp.h deleted file mode 100644 index f175f7447c..0000000000 --- a/lib/libc/include/riscv32-linux-musl/netinet/udp.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef _NETINET_UDP_H -#define _NETINET_UDP_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#ifdef _GNU_SOURCE -#define uh_sport source -#define uh_dport dest -#define uh_ulen len -#define uh_sum check -#endif - -struct udphdr { - uint16_t uh_sport; - uint16_t uh_dport; - uint16_t uh_ulen; - uint16_t uh_sum; -}; - -#define UDP_CORK 1 -#define UDP_ENCAP 100 - -#define UDP_ENCAP_ESPINUDP_NON_IKE 1 -#define UDP_ENCAP_ESPINUDP 2 -#define UDP_ENCAP_L2TPINUDP 3 -#define UDP_ENCAP_GTP0 4 -#define UDP_ENCAP_GTP1U 5 - -#define SOL_UDP 17 - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/signal.h b/lib/libc/include/riscv32-linux-musl/signal.h deleted file mode 100644 index 8e06b90287..0000000000 --- a/lib/libc/include/riscv32-linux-musl/signal.h +++ /dev/null @@ -1,277 +0,0 @@ -#ifndef _SIGNAL_H -#define _SIGNAL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ - || defined(_BSD_SOURCE) - -#ifdef _GNU_SOURCE -#define __ucontext ucontext -#endif - -#define __NEED_size_t -#define __NEED_pid_t -#define __NEED_uid_t -#define __NEED_struct_timespec -#define __NEED_pthread_t -#define __NEED_pthread_attr_t -#define __NEED_time_t -#define __NEED_clock_t -#define __NEED_sigset_t - -#include - -#define SIG_BLOCK 0 -#define SIG_UNBLOCK 1 -#define SIG_SETMASK 2 - -#define SI_ASYNCNL (-60) -#define SI_TKILL (-6) -#define SI_SIGIO (-5) -#define SI_ASYNCIO (-4) -#define SI_MESGQ (-3) -#define SI_TIMER (-2) -#define SI_QUEUE (-1) -#define SI_USER 0 -#define SI_KERNEL 128 - -typedef struct sigaltstack stack_t; - -#endif - -#include - -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ - || defined(_BSD_SOURCE) - -#define SIG_HOLD ((void (*)(int)) 2) - -#define FPE_INTDIV 1 -#define FPE_INTOVF 2 -#define FPE_FLTDIV 3 -#define FPE_FLTOVF 4 -#define FPE_FLTUND 5 -#define FPE_FLTRES 6 -#define FPE_FLTINV 7 -#define FPE_FLTSUB 8 - -#define ILL_ILLOPC 1 -#define ILL_ILLOPN 2 -#define ILL_ILLADR 3 -#define ILL_ILLTRP 4 -#define ILL_PRVOPC 5 -#define ILL_PRVREG 6 -#define ILL_COPROC 7 -#define ILL_BADSTK 8 - -#define SEGV_MAPERR 1 -#define SEGV_ACCERR 2 -#define SEGV_BNDERR 3 -#define SEGV_PKUERR 4 - -#define BUS_ADRALN 1 -#define BUS_ADRERR 2 -#define BUS_OBJERR 3 -#define BUS_MCEERR_AR 4 -#define BUS_MCEERR_AO 5 - -#define CLD_EXITED 1 -#define CLD_KILLED 2 -#define CLD_DUMPED 3 -#define CLD_TRAPPED 4 -#define CLD_STOPPED 5 -#define CLD_CONTINUED 6 - -union sigval { - int sival_int; - void *sival_ptr; -}; - -typedef struct { -#ifdef __SI_SWAP_ERRNO_CODE - int si_signo, si_code, si_errno; -#else - int si_signo, si_errno, si_code; -#endif - union { - char __pad[128 - 2*sizeof(int) - sizeof(long)]; - struct { - union { - struct { - pid_t si_pid; - uid_t si_uid; - } __piduid; - struct { - int si_timerid; - int si_overrun; - } __timer; - } __first; - union { - union sigval si_value; - struct { - int si_status; - clock_t si_utime, si_stime; - } __sigchld; - } __second; - } __si_common; - struct { - void *si_addr; - short si_addr_lsb; - union { - struct { - void *si_lower; - void *si_upper; - } __addr_bnd; - unsigned si_pkey; - } __first; - } __sigfault; - struct { - long si_band; - int si_fd; - } __sigpoll; - struct { - void *si_call_addr; - int si_syscall; - unsigned si_arch; - } __sigsys; - } __si_fields; -} siginfo_t; -#define si_pid __si_fields.__si_common.__first.__piduid.si_pid -#define si_uid __si_fields.__si_common.__first.__piduid.si_uid -#define si_status __si_fields.__si_common.__second.__sigchld.si_status -#define si_utime __si_fields.__si_common.__second.__sigchld.si_utime -#define si_stime __si_fields.__si_common.__second.__sigchld.si_stime -#define si_value __si_fields.__si_common.__second.si_value -#define si_addr __si_fields.__sigfault.si_addr -#define si_addr_lsb __si_fields.__sigfault.si_addr_lsb -#define si_lower __si_fields.__sigfault.__first.__addr_bnd.si_lower -#define si_upper __si_fields.__sigfault.__first.__addr_bnd.si_upper -#define si_pkey __si_fields.__sigfault.__first.si_pkey -#define si_band __si_fields.__sigpoll.si_band -#define si_fd __si_fields.__sigpoll.si_fd -#define si_timerid __si_fields.__si_common.__first.__timer.si_timerid -#define si_overrun __si_fields.__si_common.__first.__timer.si_overrun -#define si_ptr si_value.sival_ptr -#define si_int si_value.sival_int -#define si_call_addr __si_fields.__sigsys.si_call_addr -#define si_syscall __si_fields.__sigsys.si_syscall -#define si_arch __si_fields.__sigsys.si_arch - -struct sigaction { - union { - void (*sa_handler)(int); - void (*sa_sigaction)(int, siginfo_t *, void *); - } __sa_handler; - sigset_t sa_mask; - int sa_flags; - void (*sa_restorer)(void); -}; -#define sa_handler __sa_handler.sa_handler -#define sa_sigaction __sa_handler.sa_sigaction - -struct sigevent { - union sigval sigev_value; - int sigev_signo; - int sigev_notify; - void (*sigev_notify_function)(union sigval); - pthread_attr_t *sigev_notify_attributes; - char __pad[56-3*sizeof(long)]; -}; - -#define SIGEV_SIGNAL 0 -#define SIGEV_NONE 1 -#define SIGEV_THREAD 2 - -int __libc_current_sigrtmin(void); -int __libc_current_sigrtmax(void); - -#define SIGRTMIN (__libc_current_sigrtmin()) -#define SIGRTMAX (__libc_current_sigrtmax()) - -int kill(pid_t, int); - -int sigemptyset(sigset_t *); -int sigfillset(sigset_t *); -int sigaddset(sigset_t *, int); -int sigdelset(sigset_t *, int); -int sigismember(const sigset_t *, int); - -int sigprocmask(int, const sigset_t *__restrict, sigset_t *__restrict); -int sigsuspend(const sigset_t *); -int sigaction(int, const struct sigaction *__restrict, struct sigaction *__restrict); -int sigpending(sigset_t *); -int sigwait(const sigset_t *__restrict, int *__restrict); -int sigwaitinfo(const sigset_t *__restrict, siginfo_t *__restrict); -int sigtimedwait(const sigset_t *__restrict, siginfo_t *__restrict, const struct timespec *__restrict); -int sigqueue(pid_t, int, union sigval); - -int pthread_sigmask(int, const sigset_t *__restrict, sigset_t *__restrict); -int pthread_kill(pthread_t, int); - -void psiginfo(const siginfo_t *, const char *); -void psignal(int, const char *); - -#endif - -#if defined(_XOPEN_SOURCE) || defined(_BSD_SOURCE) || defined(_GNU_SOURCE) -int killpg(pid_t, int); -int sigaltstack(const stack_t *__restrict, stack_t *__restrict); -int sighold(int); -int sigignore(int); -int siginterrupt(int, int); -int sigpause(int); -int sigrelse(int); -void (*sigset(int, void (*)(int)))(int); -#define TRAP_BRKPT 1 -#define TRAP_TRACE 2 -#define TRAP_BRANCH 3 -#define TRAP_HWBKPT 4 -#define POLL_IN 1 -#define POLL_OUT 2 -#define POLL_MSG 3 -#define POLL_ERR 4 -#define POLL_PRI 5 -#define POLL_HUP 6 -#define SS_ONSTACK 1 -#define SS_DISABLE 2 -#define SS_AUTODISARM (1U << 31) -#define SS_FLAG_BITS SS_AUTODISARM -#endif - -#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) -#define NSIG _NSIG -typedef void (*sig_t)(int); -#endif - -#ifdef _GNU_SOURCE -typedef void (*sighandler_t)(int); -void (*bsd_signal(int, void (*)(int)))(int); -int sigisemptyset(const sigset_t *); -int sigorset (sigset_t *, const sigset_t *, const sigset_t *); -int sigandset(sigset_t *, const sigset_t *, const sigset_t *); - -#define SA_NOMASK SA_NODEFER -#define SA_ONESHOT SA_RESETHAND -#endif - -#define SIG_ERR ((void (*)(int))-1) -#define SIG_DFL ((void (*)(int)) 0) -#define SIG_IGN ((void (*)(int)) 1) - -typedef int sig_atomic_t; - -void (*signal(int, void (*)(int)))(int); -int raise(int); - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/sys/signalfd.h b/lib/libc/include/riscv32-linux-musl/sys/signalfd.h deleted file mode 100644 index 95029e47d1..0000000000 --- a/lib/libc/include/riscv32-linux-musl/sys/signalfd.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _SYS_SIGNALFD_H -#define _SYS_SIGNALFD_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#define __NEED_sigset_t - -#include - -#define SFD_CLOEXEC O_CLOEXEC -#define SFD_NONBLOCK O_NONBLOCK - -int signalfd(int, const sigset_t *, int); - -struct signalfd_siginfo { - uint32_t ssi_signo; - int32_t ssi_errno; - int32_t ssi_code; - uint32_t ssi_pid; - uint32_t ssi_uid; - int32_t ssi_fd; - uint32_t ssi_tid; - uint32_t ssi_band; - uint32_t ssi_overrun; - uint32_t ssi_trapno; - int32_t ssi_status; - int32_t ssi_int; - uint64_t ssi_ptr; - uint64_t ssi_utime; - uint64_t ssi_stime; - uint64_t ssi_addr; - uint16_t ssi_addr_lsb; - uint8_t pad[128-12*4-4*8-2]; -}; - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/sys/socket.h b/lib/libc/include/riscv32-linux-musl/sys/socket.h deleted file mode 100644 index 40c7f89e2d..0000000000 --- a/lib/libc/include/riscv32-linux-musl/sys/socket.h +++ /dev/null @@ -1,350 +0,0 @@ -#ifndef _SYS_SOCKET_H -#define _SYS_SOCKET_H -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#define __NEED_socklen_t -#define __NEED_sa_family_t -#define __NEED_size_t -#define __NEED_ssize_t -#define __NEED_uid_t -#define __NEED_pid_t -#define __NEED_gid_t -#define __NEED_struct_iovec - -#include - -#include - -#ifdef _GNU_SOURCE -struct ucred { - pid_t pid; - uid_t uid; - gid_t gid; -}; - -struct mmsghdr { - struct msghdr msg_hdr; - unsigned int msg_len; -}; - -struct timespec; - -int sendmmsg (int, struct mmsghdr *, unsigned int, unsigned int); -int recvmmsg (int, struct mmsghdr *, unsigned int, unsigned int, struct timespec *); -#endif - -struct linger { - int l_onoff; - int l_linger; -}; - -#define SHUT_RD 0 -#define SHUT_WR 1 -#define SHUT_RDWR 2 - -#ifndef SOCK_STREAM -#define SOCK_STREAM 1 -#define SOCK_DGRAM 2 -#endif - -#define SOCK_RAW 3 -#define SOCK_RDM 4 -#define SOCK_SEQPACKET 5 -#define SOCK_DCCP 6 -#define SOCK_PACKET 10 - -#ifndef SOCK_CLOEXEC -#define SOCK_CLOEXEC 02000000 -#define SOCK_NONBLOCK 04000 -#endif - -#define PF_UNSPEC 0 -#define PF_LOCAL 1 -#define PF_UNIX PF_LOCAL -#define PF_FILE PF_LOCAL -#define PF_INET 2 -#define PF_AX25 3 -#define PF_IPX 4 -#define PF_APPLETALK 5 -#define PF_NETROM 6 -#define PF_BRIDGE 7 -#define PF_ATMPVC 8 -#define PF_X25 9 -#define PF_INET6 10 -#define PF_ROSE 11 -#define PF_DECnet 12 -#define PF_NETBEUI 13 -#define PF_SECURITY 14 -#define PF_KEY 15 -#define PF_NETLINK 16 -#define PF_ROUTE PF_NETLINK -#define PF_PACKET 17 -#define PF_ASH 18 -#define PF_ECONET 19 -#define PF_ATMSVC 20 -#define PF_RDS 21 -#define PF_SNA 22 -#define PF_IRDA 23 -#define PF_PPPOX 24 -#define PF_WANPIPE 25 -#define PF_LLC 26 -#define PF_IB 27 -#define PF_MPLS 28 -#define PF_CAN 29 -#define PF_TIPC 30 -#define PF_BLUETOOTH 31 -#define PF_IUCV 32 -#define PF_RXRPC 33 -#define PF_ISDN 34 -#define PF_PHONET 35 -#define PF_IEEE802154 36 -#define PF_CAIF 37 -#define PF_ALG 38 -#define PF_NFC 39 -#define PF_VSOCK 40 -#define PF_KCM 41 -#define PF_QIPCRTR 42 -#define PF_SMC 43 -#define PF_MAX 44 - -#define AF_UNSPEC PF_UNSPEC -#define AF_LOCAL PF_LOCAL -#define AF_UNIX AF_LOCAL -#define AF_FILE AF_LOCAL -#define AF_INET PF_INET -#define AF_AX25 PF_AX25 -#define AF_IPX PF_IPX -#define AF_APPLETALK PF_APPLETALK -#define AF_NETROM PF_NETROM -#define AF_BRIDGE PF_BRIDGE -#define AF_ATMPVC PF_ATMPVC -#define AF_X25 PF_X25 -#define AF_INET6 PF_INET6 -#define AF_ROSE PF_ROSE -#define AF_DECnet PF_DECnet -#define AF_NETBEUI PF_NETBEUI -#define AF_SECURITY PF_SECURITY -#define AF_KEY PF_KEY -#define AF_NETLINK PF_NETLINK -#define AF_ROUTE PF_ROUTE -#define AF_PACKET PF_PACKET -#define AF_ASH PF_ASH -#define AF_ECONET PF_ECONET -#define AF_ATMSVC PF_ATMSVC -#define AF_RDS PF_RDS -#define AF_SNA PF_SNA -#define AF_IRDA PF_IRDA -#define AF_PPPOX PF_PPPOX -#define AF_WANPIPE PF_WANPIPE -#define AF_LLC PF_LLC -#define AF_IB PF_IB -#define AF_MPLS PF_MPLS -#define AF_CAN PF_CAN -#define AF_TIPC PF_TIPC -#define AF_BLUETOOTH PF_BLUETOOTH -#define AF_IUCV PF_IUCV -#define AF_RXRPC PF_RXRPC -#define AF_ISDN PF_ISDN -#define AF_PHONET PF_PHONET -#define AF_IEEE802154 PF_IEEE802154 -#define AF_CAIF PF_CAIF -#define AF_ALG PF_ALG -#define AF_NFC PF_NFC -#define AF_VSOCK PF_VSOCK -#define AF_KCM PF_KCM -#define AF_QIPCRTR PF_QIPCRTR -#define AF_SMC PF_SMC -#define AF_MAX PF_MAX - -#ifndef SO_DEBUG -#define SO_DEBUG 1 -#define SO_REUSEADDR 2 -#define SO_TYPE 3 -#define SO_ERROR 4 -#define SO_DONTROUTE 5 -#define SO_BROADCAST 6 -#define SO_SNDBUF 7 -#define SO_RCVBUF 8 -#define SO_KEEPALIVE 9 -#define SO_OOBINLINE 10 -#define SO_NO_CHECK 11 -#define SO_PRIORITY 12 -#define SO_LINGER 13 -#define SO_BSDCOMPAT 14 -#define SO_REUSEPORT 15 -#define SO_PASSCRED 16 -#define SO_PEERCRED 17 -#define SO_RCVLOWAT 18 -#define SO_SNDLOWAT 19 -#define SO_RCVTIMEO 20 -#define SO_SNDTIMEO 21 -#define SO_ACCEPTCONN 30 -#define SO_PEERSEC 31 -#define SO_SNDBUFFORCE 32 -#define SO_RCVBUFFORCE 33 -#define SO_PROTOCOL 38 -#define SO_DOMAIN 39 -#endif - -#define SO_SECURITY_AUTHENTICATION 22 -#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 -#define SO_SECURITY_ENCRYPTION_NETWORK 24 - -#define SO_BINDTODEVICE 25 - -#define SO_ATTACH_FILTER 26 -#define SO_DETACH_FILTER 27 -#define SO_GET_FILTER SO_ATTACH_FILTER - -#define SO_PEERNAME 28 -#define SO_TIMESTAMP 29 -#define SCM_TIMESTAMP SO_TIMESTAMP - -#define SO_PASSSEC 34 -#define SO_TIMESTAMPNS 35 -#define SCM_TIMESTAMPNS SO_TIMESTAMPNS -#define SO_MARK 36 -#define SO_TIMESTAMPING 37 -#define SCM_TIMESTAMPING SO_TIMESTAMPING -#define SO_RXQ_OVFL 40 -#define SO_WIFI_STATUS 41 -#define SCM_WIFI_STATUS SO_WIFI_STATUS -#define SO_PEEK_OFF 42 -#define SO_NOFCS 43 -#define SO_LOCK_FILTER 44 -#define SO_SELECT_ERR_QUEUE 45 -#define SO_BUSY_POLL 46 -#define SO_MAX_PACING_RATE 47 -#define SO_BPF_EXTENSIONS 48 -#define SO_INCOMING_CPU 49 -#define SO_ATTACH_BPF 50 -#define SO_DETACH_BPF SO_DETACH_FILTER -#define SO_ATTACH_REUSEPORT_CBPF 51 -#define SO_ATTACH_REUSEPORT_EBPF 52 -#define SO_CNX_ADVICE 53 -#define SCM_TIMESTAMPING_OPT_STATS 54 -#define SO_MEMINFO 55 -#define SO_INCOMING_NAPI_ID 56 -#define SO_COOKIE 57 -#define SCM_TIMESTAMPING_PKTINFO 58 -#define SO_PEERGROUPS 59 -#define SO_ZEROCOPY 60 - -#ifndef SOL_SOCKET -#define SOL_SOCKET 1 -#endif - -#define SOL_IP 0 -#define SOL_IPV6 41 -#define SOL_ICMPV6 58 - -#define SOL_RAW 255 -#define SOL_DECNET 261 -#define SOL_X25 262 -#define SOL_PACKET 263 -#define SOL_ATM 264 -#define SOL_AAL 265 -#define SOL_IRDA 266 -#define SOL_NETBEUI 267 -#define SOL_LLC 268 -#define SOL_DCCP 269 -#define SOL_NETLINK 270 -#define SOL_TIPC 271 -#define SOL_RXRPC 272 -#define SOL_PPPOL2TP 273 -#define SOL_BLUETOOTH 274 -#define SOL_PNPIPE 275 -#define SOL_RDS 276 -#define SOL_IUCV 277 -#define SOL_CAIF 278 -#define SOL_ALG 279 -#define SOL_NFC 280 -#define SOL_KCM 281 -#define SOL_TLS 282 - -#define SOMAXCONN 128 - -#define MSG_OOB 0x0001 -#define MSG_PEEK 0x0002 -#define MSG_DONTROUTE 0x0004 -#define MSG_CTRUNC 0x0008 -#define MSG_PROXY 0x0010 -#define MSG_TRUNC 0x0020 -#define MSG_DONTWAIT 0x0040 -#define MSG_EOR 0x0080 -#define MSG_WAITALL 0x0100 -#define MSG_FIN 0x0200 -#define MSG_SYN 0x0400 -#define MSG_CONFIRM 0x0800 -#define MSG_RST 0x1000 -#define MSG_ERRQUEUE 0x2000 -#define MSG_NOSIGNAL 0x4000 -#define MSG_MORE 0x8000 -#define MSG_WAITFORONE 0x10000 -#define MSG_BATCH 0x40000 -#define MSG_ZEROCOPY 0x4000000 -#define MSG_FASTOPEN 0x20000000 -#define MSG_CMSG_CLOEXEC 0x40000000 - -#define __CMSG_LEN(cmsg) (((cmsg)->cmsg_len + sizeof(long) - 1) & ~(long)(sizeof(long) - 1)) -#define __CMSG_NEXT(cmsg) ((unsigned char *)(cmsg) + __CMSG_LEN(cmsg)) -#define __MHDR_END(mhdr) ((unsigned char *)(mhdr)->msg_control + (mhdr)->msg_controllen) - -#define CMSG_DATA(cmsg) ((unsigned char *) (((struct cmsghdr *)(cmsg)) + 1)) -#define CMSG_NXTHDR(mhdr, cmsg) ((cmsg)->cmsg_len < sizeof (struct cmsghdr) || \ - __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \ - ? 0 : (struct cmsghdr *)__CMSG_NEXT(cmsg)) -#define CMSG_FIRSTHDR(mhdr) ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0) - -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) -#define CMSG_SPACE(len) (CMSG_ALIGN (len) + CMSG_ALIGN (sizeof (struct cmsghdr))) -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -#define SCM_RIGHTS 0x01 -#define SCM_CREDENTIALS 0x02 - -struct sockaddr { - sa_family_t sa_family; - char sa_data[14]; -}; - -struct sockaddr_storage { - sa_family_t ss_family; - char __ss_padding[128-sizeof(long)-sizeof(sa_family_t)]; - unsigned long __ss_align; -}; - -int socket (int, int, int); -int socketpair (int, int, int, int [2]); - -int shutdown (int, int); - -int bind (int, const struct sockaddr *, socklen_t); -int connect (int, const struct sockaddr *, socklen_t); -int listen (int, int); -int accept (int, struct sockaddr *__restrict, socklen_t *__restrict); -int accept4(int, struct sockaddr *__restrict, socklen_t *__restrict, int); - -int getsockname (int, struct sockaddr *__restrict, socklen_t *__restrict); -int getpeername (int, struct sockaddr *__restrict, socklen_t *__restrict); - -ssize_t send (int, const void *, size_t, int); -ssize_t recv (int, void *, size_t, int); -ssize_t sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t); -ssize_t recvfrom (int, void *__restrict, size_t, int, struct sockaddr *__restrict, socklen_t *__restrict); -ssize_t sendmsg (int, const struct msghdr *, int); -ssize_t recvmsg (int, struct msghdr *, int); - -int getsockopt (int, int, int, void *__restrict, socklen_t *__restrict); -int setsockopt (int, int, int, const void *, socklen_t); - -int sockatmark (int); - -#ifdef __cplusplus -} -#endif -#endif \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/bfd_stdint.h b/lib/libc/include/riscv64-linux-musl/bfd_stdint.h deleted file mode 100644 index 5ebedb345d..0000000000 --- a/lib/libc/include/riscv64-linux-musl/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for riscv64-linux-musl-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/bits/alltypes.h b/lib/libc/include/riscv64-linux-musl/bits/alltypes.h deleted file mode 100644 index d0d0ba1aef..0000000000 --- a/lib/libc/include/riscv64-linux-musl/bits/alltypes.h +++ /dev/null @@ -1,396 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef int wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef int blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned int nlink_t; -#define __DEFINED_nlink_t -#endif - - -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/bits/endian.h b/lib/libc/include/riscv64-linux-musl/bits/endian.h deleted file mode 100644 index e58b42d6d3..0000000000 --- a/lib/libc/include/riscv64-linux-musl/bits/endian.h +++ /dev/null @@ -1,5 +0,0 @@ -#if __RISCVEB__ -#define __BYTE_ORDER __BIG_ENDIAN -#else -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-musl/bits/fcntl.h b/lib/libc/include/riscv64-linux-musl/bits/fcntl.h similarity index 83% rename from lib/libc/include/powerpc64le-linux-musl/bits/fcntl.h rename to lib/libc/include/riscv64-linux-musl/bits/fcntl.h index 90f6f3a350..4d410ad758 100644 --- a/lib/libc/include/powerpc64le-linux-musl/bits/fcntl.h +++ b/lib/libc/include/riscv64-linux-musl/bits/fcntl.h @@ -7,16 +7,16 @@ #define O_DSYNC 010000 #define O_SYNC 04010000 #define O_RSYNC 04010000 -#define O_DIRECTORY 040000 -#define O_NOFOLLOW 0100000 +#define O_DIRECTORY 0200000 +#define O_NOFOLLOW 0400000 #define O_CLOEXEC 02000000 #define O_ASYNC 020000 -#define O_DIRECT 0400000 -#define O_LARGEFILE 0200000 +#define O_DIRECT 040000 +#define O_LARGEFILE 0100000 #define O_NOATIME 01000000 #define O_PATH 010000000 -#define O_TMPFILE 020040000 +#define O_TMPFILE 020200000 #define O_NDELAY O_NONBLOCK #define F_DUPFD 0 @@ -24,11 +24,9 @@ #define F_SETFD 2 #define F_GETFL 3 #define F_SETFL 4 - #define F_GETLK 5 #define F_SETLK 6 #define F_SETLKW 7 - #define F_SETOWN 8 #define F_GETOWN 9 #define F_SETSIG 10 diff --git a/lib/libc/include/riscv64-linux-musl/bits/mman.h b/lib/libc/include/riscv64-linux-musl/bits/mman.h deleted file mode 100644 index 4935708ffa..0000000000 --- a/lib/libc/include/riscv64-linux-musl/bits/mman.h +++ /dev/null @@ -1 +0,0 @@ -#define MAP_32BIT 0x40 \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/bits/setjmp.h b/lib/libc/include/riscv64-linux-musl/bits/setjmp.h index dfdfda0cc1..3a0b69a669 100644 --- a/lib/libc/include/riscv64-linux-musl/bits/setjmp.h +++ b/lib/libc/include/riscv64-linux-musl/bits/setjmp.h @@ -1 +1 @@ -typedef unsigned long __jmp_buf[28]; \ No newline at end of file +typedef unsigned long __jmp_buf[26]; \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/bits/signal.h b/lib/libc/include/riscv64-linux-musl/bits/signal.h index 6377923876..2e3110d7db 100644 --- a/lib/libc/include/riscv64-linux-musl/bits/signal.h +++ b/lib/libc/include/riscv64-linux-musl/bits/signal.h @@ -60,7 +60,6 @@ typedef struct __ucontext struct __ucontext *uc_link; stack_t uc_stack; sigset_t uc_sigmask; - char __unused[1024 / 8 - sizeof(sigset_t)]; mcontext_t uc_mcontext; } ucontext_t; diff --git a/lib/libc/include/riscv64-linux-musl/bits/socket.h b/lib/libc/include/riscv64-linux-musl/bits/socket.h index b4e9fb6a1c..dfedbe836f 100644 --- a/lib/libc/include/riscv64-linux-musl/bits/socket.h +++ b/lib/libc/include/riscv64-linux-musl/bits/socket.h @@ -4,30 +4,16 @@ struct msghdr { void *msg_name; socklen_t msg_namelen; struct iovec *msg_iov; -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad1, msg_iovlen; -#else int msg_iovlen, __pad1; -#endif void *msg_control; -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad2; - socklen_t msg_controllen; -#else socklen_t msg_controllen; int __pad2; -#endif int msg_flags; }; struct cmsghdr { -#if __BYTE_ORDER == __BIG_ENDIAN - int __pad1; - socklen_t cmsg_len; -#else socklen_t cmsg_len; int __pad1; -#endif int cmsg_level; int cmsg_type; }; \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/bits/syscall.h b/lib/libc/include/riscv64-linux-musl/bits/syscall.h deleted file mode 100644 index 4d87edf1fb..0000000000 --- a/lib/libc/include/riscv64-linux-musl/bits/syscall.h +++ /dev/null @@ -1,555 +0,0 @@ -#define __NR_io_setup 0 -#define __NR_io_destroy 1 -#define __NR_io_submit 2 -#define __NR_io_cancel 3 -#define __NR_io_getevents 4 -#define __NR_setxattr 5 -#define __NR_lsetxattr 6 -#define __NR_fsetxattr 7 -#define __NR_getxattr 8 -#define __NR_lgetxattr 9 -#define __NR_fgetxattr 10 -#define __NR_listxattr 11 -#define __NR_llistxattr 12 -#define __NR_flistxattr 13 -#define __NR_removexattr 14 -#define __NR_lremovexattr 15 -#define __NR_fremovexattr 16 -#define __NR_getcwd 17 -#define __NR_lookup_dcookie 18 -#define __NR_eventfd2 19 -#define __NR_epoll_create1 20 -#define __NR_epoll_ctl 21 -#define __NR_epoll_pwait 22 -#define __NR_dup 23 -#define __NR_dup3 24 -#define __NR_fcntl 25 -#define __NR_inotify_init1 26 -#define __NR_inotify_add_watch 27 -#define __NR_inotify_rm_watch 28 -#define __NR_ioctl 29 -#define __NR_ioprio_set 30 -#define __NR_ioprio_get 31 -#define __NR_flock 32 -#define __NR_mknodat 33 -#define __NR_mkdirat 34 -#define __NR_unlinkat 35 -#define __NR_symlinkat 36 -#define __NR_linkat 37 -#define __NR_renameat 38 -#define __NR_umount2 39 -#define __NR_mount 40 -#define __NR_pivot_root 41 -#define __NR_nfsservctl 42 -#define __NR_statfs 43 -#define __NR_fstatfs 44 -#define __NR_truncate 45 -#define __NR_ftruncate 46 -#define __NR_fallocate 47 -#define __NR_faccessat 48 -#define __NR_chdir 49 -#define __NR_fchdir 50 -#define __NR_chroot 51 -#define __NR_fchmod 52 -#define __NR_fchmodat 53 -#define __NR_fchownat 54 -#define __NR_fchown 55 -#define __NR_openat 56 -#define __NR_close 57 -#define __NR_vhangup 58 -#define __NR_pipe2 59 -#define __NR_quotactl 60 -#define __NR_getdents64 61 -#define __NR_lseek 62 -#define __NR_read 63 -#define __NR_write 64 -#define __NR_readv 65 -#define __NR_writev 66 -#define __NR_pread64 67 -#define __NR_pwrite64 68 -#define __NR_preadv 69 -#define __NR_pwritev 70 -#define __NR_sendfile 71 -#define __NR_pselect6 72 -#define __NR_ppoll 73 -#define __NR_signalfd4 74 -#define __NR_vmsplice 75 -#define __NR_splice 76 -#define __NR_tee 77 -#define __NR_readlinkat 78 -#define __NR_fstatat 79 -#define __NR_fstat 80 -#define __NR_sync 81 -#define __NR_fsync 82 -#define __NR_fdatasync 83 -#define __NR_sync_file_range 84 -#define __NR_timerfd_create 85 -#define __NR_timerfd_settime 86 -#define __NR_timerfd_gettime 87 -#define __NR_utimensat 88 -#define __NR_acct 89 -#define __NR_capget 90 -#define __NR_capset 91 -#define __NR_personality 92 -#define __NR_exit 93 -#define __NR_exit_group 94 -#define __NR_waitid 95 -#define __NR_set_tid_address 96 -#define __NR_unshare 97 -#define __NR_futex 98 -#define __NR_set_robust_list 99 -#define __NR_get_robust_list 100 -#define __NR_nanosleep 101 -#define __NR_getitimer 102 -#define __NR_setitimer 103 -#define __NR_kexec_load 104 -#define __NR_init_module 105 -#define __NR_delete_module 106 -#define __NR_timer_create 107 -#define __NR_timer_gettime 108 -#define __NR_timer_getoverrun 109 -#define __NR_timer_settime 110 -#define __NR_timer_delete 111 -#define __NR_clock_settime 112 -#define __NR_clock_gettime 113 -#define __NR_clock_getres 114 -#define __NR_clock_nanosleep 115 -#define __NR_syslog 116 -#define __NR_ptrace 117 -#define __NR_sched_setparam 118 -#define __NR_sched_setscheduler 119 -#define __NR_sched_getscheduler 120 -#define __NR_sched_getparam 121 -#define __NR_sched_setaffinity 122 -#define __NR_sched_getaffinity 123 -#define __NR_sched_yield 124 -#define __NR_sched_get_priority_max 125 -#define __NR_sched_get_priority_min 126 -#define __NR_sched_rr_get_interval 127 -#define __NR_restart_syscall 128 -#define __NR_kill 129 -#define __NR_tkill 130 -#define __NR_tgkill 131 -#define __NR_sigaltstack 132 -#define __NR_rt_sigsuspend 133 -#define __NR_rt_sigaction 134 -#define __NR_rt_sigprocmask 135 -#define __NR_rt_sigpending 136 -#define __NR_rt_sigtimedwait 137 -#define __NR_rt_sigqueueinfo 138 -#define __NR_rt_sigreturn 139 -#define __NR_setpriority 140 -#define __NR_getpriority 141 -#define __NR_reboot 142 -#define __NR_setregid 143 -#define __NR_setgid 144 -#define __NR_setreuid 145 -#define __NR_setuid 146 -#define __NR_setresuid 147 -#define __NR_getresuid 148 -#define __NR_setresgid 149 -#define __NR_getresgid 150 -#define __NR_setfsuid 151 -#define __NR_setfsgid 152 -#define __NR_times 153 -#define __NR_setpgid 154 -#define __NR_getpgid 155 -#define __NR_getsid 156 -#define __NR_setsid 157 -#define __NR_getgroups 158 -#define __NR_setgroups 159 -#define __NR_uname 160 -#define __NR_sethostname 161 -#define __NR_setdomainname 162 -#define __NR_getrlimit 163 -#define __NR_setrlimit 164 -#define __NR_getrusage 165 -#define __NR_umask 166 -#define __NR_prctl 167 -#define __NR_getcpu 168 -#define __NR_gettimeofday 169 -#define __NR_settimeofday 170 -#define __NR_adjtimex 171 -#define __NR_getpid 172 -#define __NR_getppid 173 -#define __NR_getuid 174 -#define __NR_geteuid 175 -#define __NR_getgid 176 -#define __NR_getegid 177 -#define __NR_gettid 178 -#define __NR_sysinfo 179 -#define __NR_mq_open 180 -#define __NR_mq_unlink 181 -#define __NR_mq_timedsend 182 -#define __NR_mq_timedreceive 183 -#define __NR_mq_notify 184 -#define __NR_mq_getsetattr 185 -#define __NR_msgget 186 -#define __NR_msgctl 187 -#define __NR_msgrcv 188 -#define __NR_msgsnd 189 -#define __NR_semget 190 -#define __NR_semctl 191 -#define __NR_semtimedop 192 -#define __NR_semop 193 -#define __NR_shmget 194 -#define __NR_shmctl 195 -#define __NR_shmat 196 -#define __NR_shmdt 197 -#define __NR_socket 198 -#define __NR_socketpair 199 -#define __NR_bind 200 -#define __NR_listen 201 -#define __NR_accept 202 -#define __NR_connect 203 -#define __NR_getsockname 204 -#define __NR_getpeername 205 -#define __NR_sendto 206 -#define __NR_recvfrom 207 -#define __NR_setsockopt 208 -#define __NR_getsockopt 209 -#define __NR_shutdown 210 -#define __NR_sendmsg 211 -#define __NR_recvmsg 212 -#define __NR_readahead 213 -#define __NR_brk 214 -#define __NR_munmap 215 -#define __NR_mremap 216 -#define __NR_add_key 217 -#define __NR_request_key 218 -#define __NR_keyctl 219 -#define __NR_clone 220 -#define __NR_execve 221 -#define __NR_mmap 222 -#define __NR_fadvise64 223 -#define __NR_swapon 224 -#define __NR_swapoff 225 -#define __NR_mprotect 226 -#define __NR_msync 227 -#define __NR_mlock 228 -#define __NR_munlock 229 -#define __NR_mlockall 230 -#define __NR_munlockall 231 -#define __NR_mincore 232 -#define __NR_madvise 233 -#define __NR_remap_file_pages 234 -#define __NR_mbind 235 -#define __NR_get_mempolicy 236 -#define __NR_set_mempolicy 237 -#define __NR_migrate_pages 238 -#define __NR_move_pages 239 -#define __NR_rt_tgsigqueueinfo 240 -#define __NR_perf_event_open 241 -#define __NR_accept4 242 -#define __NR_recvmmsg 243 -#define __NR_arch_specific_syscall 244 -#define __NR_wait4 260 -#define __NR_prlimit64 261 -#define __NR_fanotify_init 262 -#define __NR_fanotify_mark 263 -#define __NR_name_to_handle_at 264 -#define __NR_open_by_handle_at 265 -#define __NR_clock_adjtime 266 -#define __NR_syncfs 267 -#define __NR_setns 268 -#define __NR_sendmmsg 269 -#define __NR_process_vm_readv 270 -#define __NR_process_vm_writev 271 -#define __NR_kcmp 272 -#define __NR_finit_module 273 -#define __NR_sched_setattr 274 -#define __NR_sched_getattr 275 -#define __NR_renameat2 276 -#define __NR_seccomp 277 -#define __NR_getrandom 278 -#define __NR_memfd_create 279 -#define __NR_bpf 280 -#define __NR_execveat 281 -#define __NR_userfaultfd 282 -#define __NR_membarrier 283 -#define __NR_mlock2 284 -#define __NR_copy_file_range 285 -#define __NR_preadv2 286 -#define __NR_pwritev2 287 -#define __NR_pkey_mprotect 288 -#define __NR_pkey_alloc 289 -#define __NR_pkey_free 290 -#define __NR_sysriscv __NR_arch_specific_syscall - -#define SYS_io_setup 0 -#define SYS_io_destroy 1 -#define SYS_io_submit 2 -#define SYS_io_cancel 3 -#define SYS_io_getevents 4 -#define SYS_setxattr 5 -#define SYS_lsetxattr 6 -#define SYS_fsetxattr 7 -#define SYS_getxattr 8 -#define SYS_lgetxattr 9 -#define SYS_fgetxattr 10 -#define SYS_listxattr 11 -#define SYS_llistxattr 12 -#define SYS_flistxattr 13 -#define SYS_removexattr 14 -#define SYS_lremovexattr 15 -#define SYS_fremovexattr 16 -#define SYS_getcwd 17 -#define SYS_lookup_dcookie 18 -#define SYS_eventfd2 19 -#define SYS_epoll_create1 20 -#define SYS_epoll_ctl 21 -#define SYS_epoll_pwait 22 -#define SYS_dup 23 -#define SYS_dup3 24 -#define SYS_fcntl 25 -#define SYS_inotify_init1 26 -#define SYS_inotify_add_watch 27 -#define SYS_inotify_rm_watch 28 -#define SYS_ioctl 29 -#define SYS_ioprio_set 30 -#define SYS_ioprio_get 31 -#define SYS_flock 32 -#define SYS_mknodat 33 -#define SYS_mkdirat 34 -#define SYS_unlinkat 35 -#define SYS_symlinkat 36 -#define SYS_linkat 37 -#define SYS_renameat 38 -#define SYS_umount2 39 -#define SYS_mount 40 -#define SYS_pivot_root 41 -#define SYS_nfsservctl 42 -#define SYS_statfs 43 -#define SYS_fstatfs 44 -#define SYS_truncate 45 -#define SYS_ftruncate 46 -#define SYS_fallocate 47 -#define SYS_faccessat 48 -#define SYS_chdir 49 -#define SYS_fchdir 50 -#define SYS_chroot 51 -#define SYS_fchmod 52 -#define SYS_fchmodat 53 -#define SYS_fchownat 54 -#define SYS_fchown 55 -#define SYS_openat 56 -#define SYS_close 57 -#define SYS_vhangup 58 -#define SYS_pipe2 59 -#define SYS_quotactl 60 -#define SYS_getdents64 61 -#define SYS_lseek 62 -#define SYS_read 63 -#define SYS_write 64 -#define SYS_readv 65 -#define SYS_writev 66 -#define SYS_pread64 67 -#define SYS_pwrite64 68 -#define SYS_preadv 69 -#define SYS_pwritev 70 -#define SYS_sendfile 71 -#define SYS_pselect6 72 -#define SYS_ppoll 73 -#define SYS_signalfd4 74 -#define SYS_vmsplice 75 -#define SYS_splice 76 -#define SYS_tee 77 -#define SYS_readlinkat 78 -#define SYS_fstatat 79 -#define SYS_fstat 80 -#define SYS_sync 81 -#define SYS_fsync 82 -#define SYS_fdatasync 83 -#define SYS_sync_file_range 84 -#define SYS_timerfd_create 85 -#define SYS_timerfd_settime 86 -#define SYS_timerfd_gettime 87 -#define SYS_utimensat 88 -#define SYS_acct 89 -#define SYS_capget 90 -#define SYS_capset 91 -#define SYS_personality 92 -#define SYS_exit 93 -#define SYS_exit_group 94 -#define SYS_waitid 95 -#define SYS_set_tid_address 96 -#define SYS_unshare 97 -#define SYS_futex 98 -#define SYS_set_robust_list 99 -#define SYS_get_robust_list 100 -#define SYS_nanosleep 101 -#define SYS_getitimer 102 -#define SYS_setitimer 103 -#define SYS_kexec_load 104 -#define SYS_init_module 105 -#define SYS_delete_module 106 -#define SYS_timer_create 107 -#define SYS_timer_gettime 108 -#define SYS_timer_getoverrun 109 -#define SYS_timer_settime 110 -#define SYS_timer_delete 111 -#define SYS_clock_settime 112 -#define SYS_clock_gettime 113 -#define SYS_clock_getres 114 -#define SYS_clock_nanosleep 115 -#define SYS_syslog 116 -#define SYS_ptrace 117 -#define SYS_sched_setparam 118 -#define SYS_sched_setscheduler 119 -#define SYS_sched_getscheduler 120 -#define SYS_sched_getparam 121 -#define SYS_sched_setaffinity 122 -#define SYS_sched_getaffinity 123 -#define SYS_sched_yield 124 -#define SYS_sched_get_priority_max 125 -#define SYS_sched_get_priority_min 126 -#define SYS_sched_rr_get_interval 127 -#define SYS_restart_syscall 128 -#define SYS_kill 129 -#define SYS_tkill 130 -#define SYS_tgkill 131 -#define SYS_sigaltstack 132 -#define SYS_rt_sigsuspend 133 -#define SYS_rt_sigaction 134 -#define SYS_rt_sigprocmask 135 -#define SYS_rt_sigpending 136 -#define SYS_rt_sigtimedwait 137 -#define SYS_rt_sigqueueinfo 138 -#define SYS_rt_sigreturn 139 -#define SYS_setpriority 140 -#define SYS_getpriority 141 -#define SYS_reboot 142 -#define SYS_setregid 143 -#define SYS_setgid 144 -#define SYS_setreuid 145 -#define SYS_setuid 146 -#define SYS_setresuid 147 -#define SYS_getresuid 148 -#define SYS_setresgid 149 -#define SYS_getresgid 150 -#define SYS_setfsuid 151 -#define SYS_setfsgid 152 -#define SYS_times 153 -#define SYS_setpgid 154 -#define SYS_getpgid 155 -#define SYS_getsid 156 -#define SYS_setsid 157 -#define SYS_getgroups 158 -#define SYS_setgroups 159 -#define SYS_uname 160 -#define SYS_sethostname 161 -#define SYS_setdomainname 162 -#define SYS_getrlimit 163 -#define SYS_setrlimit 164 -#define SYS_getrusage 165 -#define SYS_umask 166 -#define SYS_prctl 167 -#define SYS_getcpu 168 -#define SYS_gettimeofday 169 -#define SYS_settimeofday 170 -#define SYS_adjtimex 171 -#define SYS_getpid 172 -#define SYS_getppid 173 -#define SYS_getuid 174 -#define SYS_geteuid 175 -#define SYS_getgid 176 -#define SYS_getegid 177 -#define SYS_gettid 178 -#define SYS_sysinfo 179 -#define SYS_mq_open 180 -#define SYS_mq_unlink 181 -#define SYS_mq_timedsend 182 -#define SYS_mq_timedreceive 183 -#define SYS_mq_notify 184 -#define SYS_mq_getsetattr 185 -#define SYS_msgget 186 -#define SYS_msgctl 187 -#define SYS_msgrcv 188 -#define SYS_msgsnd 189 -#define SYS_semget 190 -#define SYS_semctl 191 -#define SYS_semtimedop 192 -#define SYS_semop 193 -#define SYS_shmget 194 -#define SYS_shmctl 195 -#define SYS_shmat 196 -#define SYS_shmdt 197 -#define SYS_socket 198 -#define SYS_socketpair 199 -#define SYS_bind 200 -#define SYS_listen 201 -#define SYS_accept 202 -#define SYS_connect 203 -#define SYS_getsockname 204 -#define SYS_getpeername 205 -#define SYS_sendto 206 -#define SYS_recvfrom 207 -#define SYS_setsockopt 208 -#define SYS_getsockopt 209 -#define SYS_shutdown 210 -#define SYS_sendmsg 211 -#define SYS_recvmsg 212 -#define SYS_readahead 213 -#define SYS_brk 214 -#define SYS_munmap 215 -#define SYS_mremap 216 -#define SYS_add_key 217 -#define SYS_request_key 218 -#define SYS_keyctl 219 -#define SYS_clone 220 -#define SYS_execve 221 -#define SYS_mmap 222 -#define SYS_fadvise64 223 -#define SYS_swapon 224 -#define SYS_swapoff 225 -#define SYS_mprotect 226 -#define SYS_msync 227 -#define SYS_mlock 228 -#define SYS_munlock 229 -#define SYS_mlockall 230 -#define SYS_munlockall 231 -#define SYS_mincore 232 -#define SYS_madvise 233 -#define SYS_remap_file_pages 234 -#define SYS_mbind 235 -#define SYS_get_mempolicy 236 -#define SYS_set_mempolicy 237 -#define SYS_migrate_pages 238 -#define SYS_move_pages 239 -#define SYS_rt_tgsigqueueinfo 240 -#define SYS_perf_event_open 241 -#define SYS_accept4 242 -#define SYS_recvmmsg 243 -#define SYS_arch_specific_syscall 244 -#define SYS_wait4 260 -#define SYS_prlimit64 261 -#define SYS_fanotify_init 262 -#define SYS_fanotify_mark 263 -#define SYS_name_to_handle_at 264 -#define SYS_open_by_handle_at 265 -#define SYS_clock_adjtime 266 -#define SYS_syncfs 267 -#define SYS_setns 268 -#define SYS_sendmmsg 269 -#define SYS_process_vm_readv 270 -#define SYS_process_vm_writev 271 -#define SYS_kcmp 272 -#define SYS_finit_module 273 -#define SYS_sched_setattr 274 -#define SYS_sched_getattr 275 -#define SYS_renameat2 276 -#define SYS_seccomp 277 -#define SYS_getrandom 278 -#define SYS_memfd_create 279 -#define SYS_bpf 280 -#define SYS_execveat 281 -#define SYS_userfaultfd 282 -#define SYS_membarrier 283 -#define SYS_mlock2 284 -#define SYS_copy_file_range 285 -#define SYS_preadv2 286 -#define SYS_pwritev2 287 -#define SYS_pkey_mprotect 288 -#define SYS_pkey_alloc 289 -#define SYS_pkey_free 290 -#define SYS_sysriscv __NR_arch_specific_syscall \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/elf.h b/lib/libc/include/riscv64-linux-musl/elf.h deleted file mode 100644 index c6b7718c7b..0000000000 --- a/lib/libc/include/riscv64-linux-musl/elf.h +++ /dev/null @@ -1,3228 +0,0 @@ -#ifndef _ELF_H -#define _ELF_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -typedef uint16_t Elf32_Half; -typedef uint16_t Elf64_Half; - -typedef uint32_t Elf32_Word; -typedef int32_t Elf32_Sword; -typedef uint32_t Elf64_Word; -typedef int32_t Elf64_Sword; - -typedef uint64_t Elf32_Xword; -typedef int64_t Elf32_Sxword; -typedef uint64_t Elf64_Xword; -typedef int64_t Elf64_Sxword; - -typedef uint32_t Elf32_Addr; -typedef uint64_t Elf64_Addr; - -typedef uint32_t Elf32_Off; -typedef uint64_t Elf64_Off; - -typedef uint16_t Elf32_Section; -typedef uint16_t Elf64_Section; - -typedef Elf32_Half Elf32_Versym; -typedef Elf64_Half Elf64_Versym; - -#define EI_NIDENT (16) - -typedef struct { - unsigned char e_ident[EI_NIDENT]; - Elf32_Half e_type; - Elf32_Half e_machine; - Elf32_Word e_version; - Elf32_Addr e_entry; - Elf32_Off e_phoff; - Elf32_Off e_shoff; - Elf32_Word e_flags; - Elf32_Half e_ehsize; - Elf32_Half e_phentsize; - Elf32_Half e_phnum; - Elf32_Half e_shentsize; - Elf32_Half e_shnum; - Elf32_Half e_shstrndx; -} Elf32_Ehdr; - -typedef struct { - unsigned char e_ident[EI_NIDENT]; - Elf64_Half e_type; - Elf64_Half e_machine; - Elf64_Word e_version; - Elf64_Addr e_entry; - Elf64_Off e_phoff; - Elf64_Off e_shoff; - Elf64_Word e_flags; - Elf64_Half e_ehsize; - Elf64_Half e_phentsize; - Elf64_Half e_phnum; - Elf64_Half e_shentsize; - Elf64_Half e_shnum; - Elf64_Half e_shstrndx; -} Elf64_Ehdr; - -#define EI_MAG0 0 -#define ELFMAG0 0x7f - -#define EI_MAG1 1 -#define ELFMAG1 'E' - -#define EI_MAG2 2 -#define ELFMAG2 'L' - -#define EI_MAG3 3 -#define ELFMAG3 'F' - - -#define ELFMAG "\177ELF" -#define SELFMAG 4 - -#define EI_CLASS 4 -#define ELFCLASSNONE 0 -#define ELFCLASS32 1 -#define ELFCLASS64 2 -#define ELFCLASSNUM 3 - -#define EI_DATA 5 -#define ELFDATANONE 0 -#define ELFDATA2LSB 1 -#define ELFDATA2MSB 2 -#define ELFDATANUM 3 - -#define EI_VERSION 6 - - -#define EI_OSABI 7 -#define ELFOSABI_NONE 0 -#define ELFOSABI_SYSV 0 -#define ELFOSABI_HPUX 1 -#define ELFOSABI_NETBSD 2 -#define ELFOSABI_LINUX 3 -#define ELFOSABI_GNU 3 -#define ELFOSABI_SOLARIS 6 -#define ELFOSABI_AIX 7 -#define ELFOSABI_IRIX 8 -#define ELFOSABI_FREEBSD 9 -#define ELFOSABI_TRU64 10 -#define ELFOSABI_MODESTO 11 -#define ELFOSABI_OPENBSD 12 -#define ELFOSABI_ARM 97 -#define ELFOSABI_STANDALONE 255 - -#define EI_ABIVERSION 8 - -#define EI_PAD 9 - - - -#define ET_NONE 0 -#define ET_REL 1 -#define ET_EXEC 2 -#define ET_DYN 3 -#define ET_CORE 4 -#define ET_NUM 5 -#define ET_LOOS 0xfe00 -#define ET_HIOS 0xfeff -#define ET_LOPROC 0xff00 -#define ET_HIPROC 0xffff - - - -#define EM_NONE 0 -#define EM_M32 1 -#define EM_SPARC 2 -#define EM_386 3 -#define EM_68K 4 -#define EM_88K 5 -#define EM_860 7 -#define EM_MIPS 8 -#define EM_S370 9 -#define EM_MIPS_RS3_LE 10 - -#define EM_PARISC 15 -#define EM_VPP500 17 -#define EM_SPARC32PLUS 18 -#define EM_960 19 -#define EM_PPC 20 -#define EM_PPC64 21 -#define EM_S390 22 - -#define EM_V800 36 -#define EM_FR20 37 -#define EM_RH32 38 -#define EM_RCE 39 -#define EM_ARM 40 -#define EM_FAKE_ALPHA 41 -#define EM_SH 42 -#define EM_SPARCV9 43 -#define EM_TRICORE 44 -#define EM_ARC 45 -#define EM_H8_300 46 -#define EM_H8_300H 47 -#define EM_H8S 48 -#define EM_H8_500 49 -#define EM_IA_64 50 -#define EM_MIPS_X 51 -#define EM_COLDFIRE 52 -#define EM_68HC12 53 -#define EM_MMA 54 -#define EM_PCP 55 -#define EM_NCPU 56 -#define EM_NDR1 57 -#define EM_STARCORE 58 -#define EM_ME16 59 -#define EM_ST100 60 -#define EM_TINYJ 61 -#define EM_X86_64 62 -#define EM_PDSP 63 - -#define EM_FX66 66 -#define EM_ST9PLUS 67 -#define EM_ST7 68 -#define EM_68HC16 69 -#define EM_68HC11 70 -#define EM_68HC08 71 -#define EM_68HC05 72 -#define EM_SVX 73 -#define EM_ST19 74 -#define EM_VAX 75 -#define EM_CRIS 76 -#define EM_JAVELIN 77 -#define EM_FIREPATH 78 -#define EM_ZSP 79 -#define EM_MMIX 80 -#define EM_HUANY 81 -#define EM_PRISM 82 -#define EM_AVR 83 -#define EM_FR30 84 -#define EM_D10V 85 -#define EM_D30V 86 -#define EM_V850 87 -#define EM_M32R 88 -#define EM_MN10300 89 -#define EM_MN10200 90 -#define EM_PJ 91 -#define EM_OR1K 92 -#define EM_OPENRISC 92 -#define EM_ARC_A5 93 -#define EM_ARC_COMPACT 93 -#define EM_XTENSA 94 -#define EM_VIDEOCORE 95 -#define EM_TMM_GPP 96 -#define EM_NS32K 97 -#define EM_TPC 98 -#define EM_SNP1K 99 -#define EM_ST200 100 -#define EM_IP2K 101 -#define EM_MAX 102 -#define EM_CR 103 -#define EM_F2MC16 104 -#define EM_MSP430 105 -#define EM_BLACKFIN 106 -#define EM_SE_C33 107 -#define EM_SEP 108 -#define EM_ARCA 109 -#define EM_UNICORE 110 -#define EM_EXCESS 111 -#define EM_DXP 112 -#define EM_ALTERA_NIOS2 113 -#define EM_CRX 114 -#define EM_XGATE 115 -#define EM_C166 116 -#define EM_M16C 117 -#define EM_DSPIC30F 118 -#define EM_CE 119 -#define EM_M32C 120 -#define EM_TSK3000 131 -#define EM_RS08 132 -#define EM_SHARC 133 -#define EM_ECOG2 134 -#define EM_SCORE7 135 -#define EM_DSP24 136 -#define EM_VIDEOCORE3 137 -#define EM_LATTICEMICO32 138 -#define EM_SE_C17 139 -#define EM_TI_C6000 140 -#define EM_TI_C2000 141 -#define EM_TI_C5500 142 -#define EM_TI_ARP32 143 -#define EM_TI_PRU 144 -#define EM_MMDSP_PLUS 160 -#define EM_CYPRESS_M8C 161 -#define EM_R32C 162 -#define EM_TRIMEDIA 163 -#define EM_QDSP6 164 -#define EM_8051 165 -#define EM_STXP7X 166 -#define EM_NDS32 167 -#define EM_ECOG1X 168 -#define EM_MAXQ30 169 -#define EM_XIMO16 170 -#define EM_MANIK 171 -#define EM_CRAYNV2 172 -#define EM_RX 173 -#define EM_METAG 174 -#define EM_MCST_ELBRUS 175 -#define EM_ECOG16 176 -#define EM_CR16 177 -#define EM_ETPU 178 -#define EM_SLE9X 179 -#define EM_L10M 180 -#define EM_K10M 181 -#define EM_AARCH64 183 -#define EM_AVR32 185 -#define EM_STM8 186 -#define EM_TILE64 187 -#define EM_TILEPRO 188 -#define EM_MICROBLAZE 189 -#define EM_CUDA 190 -#define EM_TILEGX 191 -#define EM_CLOUDSHIELD 192 -#define EM_COREA_1ST 193 -#define EM_COREA_2ND 194 -#define EM_ARC_COMPACT2 195 -#define EM_OPEN8 196 -#define EM_RL78 197 -#define EM_VIDEOCORE5 198 -#define EM_78KOR 199 -#define EM_56800EX 200 -#define EM_BA1 201 -#define EM_BA2 202 -#define EM_XCORE 203 -#define EM_MCHP_PIC 204 -#define EM_KM32 210 -#define EM_KMX32 211 -#define EM_EMX16 212 -#define EM_EMX8 213 -#define EM_KVARC 214 -#define EM_CDP 215 -#define EM_COGE 216 -#define EM_COOL 217 -#define EM_NORC 218 -#define EM_CSR_KALIMBA 219 -#define EM_Z80 220 -#define EM_VISIUM 221 -#define EM_FT32 222 -#define EM_MOXIE 223 -#define EM_AMDGPU 224 -#define EM_RISCV 243 -#define EM_BPF 247 -#define EM_NUM 248 - -#define EM_ALPHA 0x9026 - -#define EV_NONE 0 -#define EV_CURRENT 1 -#define EV_NUM 2 - -typedef struct { - Elf32_Word sh_name; - Elf32_Word sh_type; - Elf32_Word sh_flags; - Elf32_Addr sh_addr; - Elf32_Off sh_offset; - Elf32_Word sh_size; - Elf32_Word sh_link; - Elf32_Word sh_info; - Elf32_Word sh_addralign; - Elf32_Word sh_entsize; -} Elf32_Shdr; - -typedef struct { - Elf64_Word sh_name; - Elf64_Word sh_type; - Elf64_Xword sh_flags; - Elf64_Addr sh_addr; - Elf64_Off sh_offset; - Elf64_Xword sh_size; - Elf64_Word sh_link; - Elf64_Word sh_info; - Elf64_Xword sh_addralign; - Elf64_Xword sh_entsize; -} Elf64_Shdr; - - - -#define SHN_UNDEF 0 -#define SHN_LORESERVE 0xff00 -#define SHN_LOPROC 0xff00 -#define SHN_BEFORE 0xff00 - -#define SHN_AFTER 0xff01 - -#define SHN_HIPROC 0xff1f -#define SHN_LOOS 0xff20 -#define SHN_HIOS 0xff3f -#define SHN_ABS 0xfff1 -#define SHN_COMMON 0xfff2 -#define SHN_XINDEX 0xffff -#define SHN_HIRESERVE 0xffff - - - -#define SHT_NULL 0 -#define SHT_PROGBITS 1 -#define SHT_SYMTAB 2 -#define SHT_STRTAB 3 -#define SHT_RELA 4 -#define SHT_HASH 5 -#define SHT_DYNAMIC 6 -#define SHT_NOTE 7 -#define SHT_NOBITS 8 -#define SHT_REL 9 -#define SHT_SHLIB 10 -#define SHT_DYNSYM 11 -#define SHT_INIT_ARRAY 14 -#define SHT_FINI_ARRAY 15 -#define SHT_PREINIT_ARRAY 16 -#define SHT_GROUP 17 -#define SHT_SYMTAB_SHNDX 18 -#define SHT_NUM 19 -#define SHT_LOOS 0x60000000 -#define SHT_GNU_ATTRIBUTES 0x6ffffff5 -#define SHT_GNU_HASH 0x6ffffff6 -#define SHT_GNU_LIBLIST 0x6ffffff7 -#define SHT_CHECKSUM 0x6ffffff8 -#define SHT_LOSUNW 0x6ffffffa -#define SHT_SUNW_move 0x6ffffffa -#define SHT_SUNW_COMDAT 0x6ffffffb -#define SHT_SUNW_syminfo 0x6ffffffc -#define SHT_GNU_verdef 0x6ffffffd -#define SHT_GNU_verneed 0x6ffffffe -#define SHT_GNU_versym 0x6fffffff -#define SHT_HISUNW 0x6fffffff -#define SHT_HIOS 0x6fffffff -#define SHT_LOPROC 0x70000000 -#define SHT_HIPROC 0x7fffffff -#define SHT_LOUSER 0x80000000 -#define SHT_HIUSER 0x8fffffff - -#define SHF_WRITE (1 << 0) -#define SHF_ALLOC (1 << 1) -#define SHF_EXECINSTR (1 << 2) -#define SHF_MERGE (1 << 4) -#define SHF_STRINGS (1 << 5) -#define SHF_INFO_LINK (1 << 6) -#define SHF_LINK_ORDER (1 << 7) -#define SHF_OS_NONCONFORMING (1 << 8) - -#define SHF_GROUP (1 << 9) -#define SHF_TLS (1 << 10) -#define SHF_COMPRESSED (1 << 11) -#define SHF_MASKOS 0x0ff00000 -#define SHF_MASKPROC 0xf0000000 -#define SHF_ORDERED (1 << 30) -#define SHF_EXCLUDE (1U << 31) - -typedef struct { - Elf32_Word ch_type; - Elf32_Word ch_size; - Elf32_Word ch_addralign; -} Elf32_Chdr; - -typedef struct { - Elf64_Word ch_type; - Elf64_Word ch_reserved; - Elf64_Xword ch_size; - Elf64_Xword ch_addralign; -} Elf64_Chdr; - -#define ELFCOMPRESS_ZLIB 1 -#define ELFCOMPRESS_LOOS 0x60000000 -#define ELFCOMPRESS_HIOS 0x6fffffff -#define ELFCOMPRESS_LOPROC 0x70000000 -#define ELFCOMPRESS_HIPROC 0x7fffffff - - -#define GRP_COMDAT 0x1 - -typedef struct { - Elf32_Word st_name; - Elf32_Addr st_value; - Elf32_Word st_size; - unsigned char st_info; - unsigned char st_other; - Elf32_Section st_shndx; -} Elf32_Sym; - -typedef struct { - Elf64_Word st_name; - unsigned char st_info; - unsigned char st_other; - Elf64_Section st_shndx; - Elf64_Addr st_value; - Elf64_Xword st_size; -} Elf64_Sym; - -typedef struct { - Elf32_Half si_boundto; - Elf32_Half si_flags; -} Elf32_Syminfo; - -typedef struct { - Elf64_Half si_boundto; - Elf64_Half si_flags; -} Elf64_Syminfo; - -#define SYMINFO_BT_SELF 0xffff -#define SYMINFO_BT_PARENT 0xfffe -#define SYMINFO_BT_LOWRESERVE 0xff00 - -#define SYMINFO_FLG_DIRECT 0x0001 -#define SYMINFO_FLG_PASSTHRU 0x0002 -#define SYMINFO_FLG_COPY 0x0004 -#define SYMINFO_FLG_LAZYLOAD 0x0008 - -#define SYMINFO_NONE 0 -#define SYMINFO_CURRENT 1 -#define SYMINFO_NUM 2 - -#define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4) -#define ELF32_ST_TYPE(val) ((val) & 0xf) -#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) - -#define ELF64_ST_BIND(val) ELF32_ST_BIND (val) -#define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val) -#define ELF64_ST_INFO(bind, type) ELF32_ST_INFO ((bind), (type)) - -#define STB_LOCAL 0 -#define STB_GLOBAL 1 -#define STB_WEAK 2 -#define STB_NUM 3 -#define STB_LOOS 10 -#define STB_GNU_UNIQUE 10 -#define STB_HIOS 12 -#define STB_LOPROC 13 -#define STB_HIPROC 15 - -#define STT_NOTYPE 0 -#define STT_OBJECT 1 -#define STT_FUNC 2 -#define STT_SECTION 3 -#define STT_FILE 4 -#define STT_COMMON 5 -#define STT_TLS 6 -#define STT_NUM 7 -#define STT_LOOS 10 -#define STT_GNU_IFUNC 10 -#define STT_HIOS 12 -#define STT_LOPROC 13 -#define STT_HIPROC 15 - -#define STN_UNDEF 0 - -#define ELF32_ST_VISIBILITY(o) ((o) & 0x03) -#define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o) - -#define STV_DEFAULT 0 -#define STV_INTERNAL 1 -#define STV_HIDDEN 2 -#define STV_PROTECTED 3 - - - - -typedef struct { - Elf32_Addr r_offset; - Elf32_Word r_info; -} Elf32_Rel; - -typedef struct { - Elf64_Addr r_offset; - Elf64_Xword r_info; -} Elf64_Rel; - - - -typedef struct { - Elf32_Addr r_offset; - Elf32_Word r_info; - Elf32_Sword r_addend; -} Elf32_Rela; - -typedef struct { - Elf64_Addr r_offset; - Elf64_Xword r_info; - Elf64_Sxword r_addend; -} Elf64_Rela; - - - -#define ELF32_R_SYM(val) ((val) >> 8) -#define ELF32_R_TYPE(val) ((val) & 0xff) -#define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff)) - -#define ELF64_R_SYM(i) ((i) >> 32) -#define ELF64_R_TYPE(i) ((i) & 0xffffffff) -#define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type)) - - - -typedef struct { - Elf32_Word p_type; - Elf32_Off p_offset; - Elf32_Addr p_vaddr; - Elf32_Addr p_paddr; - Elf32_Word p_filesz; - Elf32_Word p_memsz; - Elf32_Word p_flags; - Elf32_Word p_align; -} Elf32_Phdr; - -typedef struct { - Elf64_Word p_type; - Elf64_Word p_flags; - Elf64_Off p_offset; - Elf64_Addr p_vaddr; - Elf64_Addr p_paddr; - Elf64_Xword p_filesz; - Elf64_Xword p_memsz; - Elf64_Xword p_align; -} Elf64_Phdr; - - - -#define PT_NULL 0 -#define PT_LOAD 1 -#define PT_DYNAMIC 2 -#define PT_INTERP 3 -#define PT_NOTE 4 -#define PT_SHLIB 5 -#define PT_PHDR 6 -#define PT_TLS 7 -#define PT_NUM 8 -#define PT_LOOS 0x60000000 -#define PT_GNU_EH_FRAME 0x6474e550 -#define PT_GNU_STACK 0x6474e551 -#define PT_GNU_RELRO 0x6474e552 -#define PT_LOSUNW 0x6ffffffa -#define PT_SUNWBSS 0x6ffffffa -#define PT_SUNWSTACK 0x6ffffffb -#define PT_HISUNW 0x6fffffff -#define PT_HIOS 0x6fffffff -#define PT_LOPROC 0x70000000 -#define PT_HIPROC 0x7fffffff - - -#define PN_XNUM 0xffff - - -#define PF_X (1 << 0) -#define PF_W (1 << 1) -#define PF_R (1 << 2) -#define PF_MASKOS 0x0ff00000 -#define PF_MASKPROC 0xf0000000 - - - -#define NT_PRSTATUS 1 -#define NT_PRFPREG 2 -#define NT_FPREGSET 2 -#define NT_PRPSINFO 3 -#define NT_PRXREG 4 -#define NT_TASKSTRUCT 4 -#define NT_PLATFORM 5 -#define NT_AUXV 6 -#define NT_GWINDOWS 7 -#define NT_ASRS 8 -#define NT_PSTATUS 10 -#define NT_PSINFO 13 -#define NT_PRCRED 14 -#define NT_UTSNAME 15 -#define NT_LWPSTATUS 16 -#define NT_LWPSINFO 17 -#define NT_PRFPXREG 20 -#define NT_SIGINFO 0x53494749 -#define NT_FILE 0x46494c45 -#define NT_PRXFPREG 0x46e62b7f -#define NT_PPC_VMX 0x100 -#define NT_PPC_SPE 0x101 -#define NT_PPC_VSX 0x102 -#define NT_PPC_TAR 0x103 -#define NT_PPC_PPR 0x104 -#define NT_PPC_DSCR 0x105 -#define NT_PPC_EBB 0x106 -#define NT_PPC_PMU 0x107 -#define NT_PPC_TM_CGPR 0x108 -#define NT_PPC_TM_CFPR 0x109 -#define NT_PPC_TM_CVMX 0x10a -#define NT_PPC_TM_CVSX 0x10b -#define NT_PPC_TM_SPR 0x10c -#define NT_PPC_TM_CTAR 0x10d -#define NT_PPC_TM_CPPR 0x10e -#define NT_PPC_TM_CDSCR 0x10f -#define NT_386_TLS 0x200 -#define NT_386_IOPERM 0x201 -#define NT_X86_XSTATE 0x202 -#define NT_S390_HIGH_GPRS 0x300 -#define NT_S390_TIMER 0x301 -#define NT_S390_TODCMP 0x302 -#define NT_S390_TODPREG 0x303 -#define NT_S390_CTRS 0x304 -#define NT_S390_PREFIX 0x305 -#define NT_S390_LAST_BREAK 0x306 -#define NT_S390_SYSTEM_CALL 0x307 -#define NT_S390_TDB 0x308 -#define NT_S390_VXRS_LOW 0x309 -#define NT_S390_VXRS_HIGH 0x30a -#define NT_S390_GS_CB 0x30b -#define NT_S390_GS_BC 0x30c -#define NT_S390_RI_CB 0x30d -#define NT_ARM_VFP 0x400 -#define NT_ARM_TLS 0x401 -#define NT_ARM_HW_BREAK 0x402 -#define NT_ARM_HW_WATCH 0x403 -#define NT_ARM_SYSTEM_CALL 0x404 -#define NT_ARM_SVE 0x405 -#define NT_METAG_CBUF 0x500 -#define NT_METAG_RPIPE 0x501 -#define NT_METAG_TLS 0x502 -#define NT_ARC_V2 0x600 -#define NT_VERSION 1 - - - - -typedef struct { - Elf32_Sword d_tag; - union { - Elf32_Word d_val; - Elf32_Addr d_ptr; - } d_un; -} Elf32_Dyn; - -typedef struct { - Elf64_Sxword d_tag; - union { - Elf64_Xword d_val; - Elf64_Addr d_ptr; - } d_un; -} Elf64_Dyn; - - - -#define DT_NULL 0 -#define DT_NEEDED 1 -#define DT_PLTRELSZ 2 -#define DT_PLTGOT 3 -#define DT_HASH 4 -#define DT_STRTAB 5 -#define DT_SYMTAB 6 -#define DT_RELA 7 -#define DT_RELASZ 8 -#define DT_RELAENT 9 -#define DT_STRSZ 10 -#define DT_SYMENT 11 -#define DT_INIT 12 -#define DT_FINI 13 -#define DT_SONAME 14 -#define DT_RPATH 15 -#define DT_SYMBOLIC 16 -#define DT_REL 17 -#define DT_RELSZ 18 -#define DT_RELENT 19 -#define DT_PLTREL 20 -#define DT_DEBUG 21 -#define DT_TEXTREL 22 -#define DT_JMPREL 23 -#define DT_BIND_NOW 24 -#define DT_INIT_ARRAY 25 -#define DT_FINI_ARRAY 26 -#define DT_INIT_ARRAYSZ 27 -#define DT_FINI_ARRAYSZ 28 -#define DT_RUNPATH 29 -#define DT_FLAGS 30 -#define DT_ENCODING 32 -#define DT_PREINIT_ARRAY 32 -#define DT_PREINIT_ARRAYSZ 33 -#define DT_SYMTAB_SHNDX 34 -#define DT_NUM 35 -#define DT_LOOS 0x6000000d -#define DT_HIOS 0x6ffff000 -#define DT_LOPROC 0x70000000 -#define DT_HIPROC 0x7fffffff -#define DT_PROCNUM DT_MIPS_NUM - -#define DT_VALRNGLO 0x6ffffd00 -#define DT_GNU_PRELINKED 0x6ffffdf5 -#define DT_GNU_CONFLICTSZ 0x6ffffdf6 -#define DT_GNU_LIBLISTSZ 0x6ffffdf7 -#define DT_CHECKSUM 0x6ffffdf8 -#define DT_PLTPADSZ 0x6ffffdf9 -#define DT_MOVEENT 0x6ffffdfa -#define DT_MOVESZ 0x6ffffdfb -#define DT_FEATURE_1 0x6ffffdfc -#define DT_POSFLAG_1 0x6ffffdfd - -#define DT_SYMINSZ 0x6ffffdfe -#define DT_SYMINENT 0x6ffffdff -#define DT_VALRNGHI 0x6ffffdff -#define DT_VALTAGIDX(tag) (DT_VALRNGHI - (tag)) -#define DT_VALNUM 12 - -#define DT_ADDRRNGLO 0x6ffffe00 -#define DT_GNU_HASH 0x6ffffef5 -#define DT_TLSDESC_PLT 0x6ffffef6 -#define DT_TLSDESC_GOT 0x6ffffef7 -#define DT_GNU_CONFLICT 0x6ffffef8 -#define DT_GNU_LIBLIST 0x6ffffef9 -#define DT_CONFIG 0x6ffffefa -#define DT_DEPAUDIT 0x6ffffefb -#define DT_AUDIT 0x6ffffefc -#define DT_PLTPAD 0x6ffffefd -#define DT_MOVETAB 0x6ffffefe -#define DT_SYMINFO 0x6ffffeff -#define DT_ADDRRNGHI 0x6ffffeff -#define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag)) -#define DT_ADDRNUM 11 - - - -#define DT_VERSYM 0x6ffffff0 - -#define DT_RELACOUNT 0x6ffffff9 -#define DT_RELCOUNT 0x6ffffffa - - -#define DT_FLAGS_1 0x6ffffffb -#define DT_VERDEF 0x6ffffffc - -#define DT_VERDEFNUM 0x6ffffffd -#define DT_VERNEED 0x6ffffffe - -#define DT_VERNEEDNUM 0x6fffffff -#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) -#define DT_VERSIONTAGNUM 16 - - - -#define DT_AUXILIARY 0x7ffffffd -#define DT_FILTER 0x7fffffff -#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1) -#define DT_EXTRANUM 3 - - -#define DF_ORIGIN 0x00000001 -#define DF_SYMBOLIC 0x00000002 -#define DF_TEXTREL 0x00000004 -#define DF_BIND_NOW 0x00000008 -#define DF_STATIC_TLS 0x00000010 - - - -#define DF_1_NOW 0x00000001 -#define DF_1_GLOBAL 0x00000002 -#define DF_1_GROUP 0x00000004 -#define DF_1_NODELETE 0x00000008 -#define DF_1_LOADFLTR 0x00000010 -#define DF_1_INITFIRST 0x00000020 -#define DF_1_NOOPEN 0x00000040 -#define DF_1_ORIGIN 0x00000080 -#define DF_1_DIRECT 0x00000100 -#define DF_1_TRANS 0x00000200 -#define DF_1_INTERPOSE 0x00000400 -#define DF_1_NODEFLIB 0x00000800 -#define DF_1_NODUMP 0x00001000 -#define DF_1_CONFALT 0x00002000 -#define DF_1_ENDFILTEE 0x00004000 -#define DF_1_DISPRELDNE 0x00008000 -#define DF_1_DISPRELPND 0x00010000 -#define DF_1_NODIRECT 0x00020000 -#define DF_1_IGNMULDEF 0x00040000 -#define DF_1_NOKSYMS 0x00080000 -#define DF_1_NOHDR 0x00100000 -#define DF_1_EDITED 0x00200000 -#define DF_1_NORELOC 0x00400000 -#define DF_1_SYMINTPOSE 0x00800000 -#define DF_1_GLOBAUDIT 0x01000000 -#define DF_1_SINGLETON 0x02000000 -#define DF_1_STUB 0x04000000 -#define DF_1_PIE 0x08000000 - -#define DTF_1_PARINIT 0x00000001 -#define DTF_1_CONFEXP 0x00000002 - - -#define DF_P1_LAZYLOAD 0x00000001 -#define DF_P1_GROUPPERM 0x00000002 - - - - -typedef struct { - Elf32_Half vd_version; - Elf32_Half vd_flags; - Elf32_Half vd_ndx; - Elf32_Half vd_cnt; - Elf32_Word vd_hash; - Elf32_Word vd_aux; - Elf32_Word vd_next; -} Elf32_Verdef; - -typedef struct { - Elf64_Half vd_version; - Elf64_Half vd_flags; - Elf64_Half vd_ndx; - Elf64_Half vd_cnt; - Elf64_Word vd_hash; - Elf64_Word vd_aux; - Elf64_Word vd_next; -} Elf64_Verdef; - - - -#define VER_DEF_NONE 0 -#define VER_DEF_CURRENT 1 -#define VER_DEF_NUM 2 - - -#define VER_FLG_BASE 0x1 -#define VER_FLG_WEAK 0x2 - - -#define VER_NDX_LOCAL 0 -#define VER_NDX_GLOBAL 1 -#define VER_NDX_LORESERVE 0xff00 -#define VER_NDX_ELIMINATE 0xff01 - - - -typedef struct { - Elf32_Word vda_name; - Elf32_Word vda_next; -} Elf32_Verdaux; - -typedef struct { - Elf64_Word vda_name; - Elf64_Word vda_next; -} Elf64_Verdaux; - - - - -typedef struct { - Elf32_Half vn_version; - Elf32_Half vn_cnt; - Elf32_Word vn_file; - Elf32_Word vn_aux; - Elf32_Word vn_next; -} Elf32_Verneed; - -typedef struct { - Elf64_Half vn_version; - Elf64_Half vn_cnt; - Elf64_Word vn_file; - Elf64_Word vn_aux; - Elf64_Word vn_next; -} Elf64_Verneed; - - - -#define VER_NEED_NONE 0 -#define VER_NEED_CURRENT 1 -#define VER_NEED_NUM 2 - - - -typedef struct { - Elf32_Word vna_hash; - Elf32_Half vna_flags; - Elf32_Half vna_other; - Elf32_Word vna_name; - Elf32_Word vna_next; -} Elf32_Vernaux; - -typedef struct { - Elf64_Word vna_hash; - Elf64_Half vna_flags; - Elf64_Half vna_other; - Elf64_Word vna_name; - Elf64_Word vna_next; -} Elf64_Vernaux; - - - -#define VER_FLG_WEAK 0x2 - - - -typedef struct { - uint32_t a_type; - union { - uint32_t a_val; - } a_un; -} Elf32_auxv_t; - -typedef struct { - uint64_t a_type; - union { - uint64_t a_val; - } a_un; -} Elf64_auxv_t; - - - -#define AT_NULL 0 -#define AT_IGNORE 1 -#define AT_EXECFD 2 -#define AT_PHDR 3 -#define AT_PHENT 4 -#define AT_PHNUM 5 -#define AT_PAGESZ 6 -#define AT_BASE 7 -#define AT_FLAGS 8 -#define AT_ENTRY 9 -#define AT_NOTELF 10 -#define AT_UID 11 -#define AT_EUID 12 -#define AT_GID 13 -#define AT_EGID 14 -#define AT_CLKTCK 17 - - -#define AT_PLATFORM 15 -#define AT_HWCAP 16 - - - - -#define AT_FPUCW 18 - - -#define AT_DCACHEBSIZE 19 -#define AT_ICACHEBSIZE 20 -#define AT_UCACHEBSIZE 21 - - - -#define AT_IGNOREPPC 22 - -#define AT_SECURE 23 - -#define AT_BASE_PLATFORM 24 - -#define AT_RANDOM 25 - -#define AT_HWCAP2 26 - -#define AT_EXECFN 31 - - - -#define AT_SYSINFO 32 -#define AT_SYSINFO_EHDR 33 - - - -#define AT_L1I_CACHESHAPE 34 -#define AT_L1D_CACHESHAPE 35 -#define AT_L2_CACHESHAPE 36 -#define AT_L3_CACHESHAPE 37 - -#define AT_L1I_CACHESIZE 40 -#define AT_L1I_CACHEGEOMETRY 41 -#define AT_L1D_CACHESIZE 42 -#define AT_L1D_CACHEGEOMETRY 43 -#define AT_L2_CACHESIZE 44 -#define AT_L2_CACHEGEOMETRY 45 -#define AT_L3_CACHESIZE 46 -#define AT_L3_CACHEGEOMETRY 47 - - - -typedef struct { - Elf32_Word n_namesz; - Elf32_Word n_descsz; - Elf32_Word n_type; -} Elf32_Nhdr; - -typedef struct { - Elf64_Word n_namesz; - Elf64_Word n_descsz; - Elf64_Word n_type; -} Elf64_Nhdr; - - - - -#define ELF_NOTE_SOLARIS "SUNW Solaris" - - -#define ELF_NOTE_GNU "GNU" - - - - - -#define ELF_NOTE_PAGESIZE_HINT 1 - - -#define NT_GNU_ABI_TAG 1 -#define ELF_NOTE_ABI NT_GNU_ABI_TAG - - - -#define ELF_NOTE_OS_LINUX 0 -#define ELF_NOTE_OS_GNU 1 -#define ELF_NOTE_OS_SOLARIS2 2 -#define ELF_NOTE_OS_FREEBSD 3 - -#define NT_GNU_BUILD_ID 3 -#define NT_GNU_GOLD_VERSION 4 - - - -typedef struct { - Elf32_Xword m_value; - Elf32_Word m_info; - Elf32_Word m_poffset; - Elf32_Half m_repeat; - Elf32_Half m_stride; -} Elf32_Move; - -typedef struct { - Elf64_Xword m_value; - Elf64_Xword m_info; - Elf64_Xword m_poffset; - Elf64_Half m_repeat; - Elf64_Half m_stride; -} Elf64_Move; - - -#define ELF32_M_SYM(info) ((info) >> 8) -#define ELF32_M_SIZE(info) ((unsigned char) (info)) -#define ELF32_M_INFO(sym, size) (((sym) << 8) + (unsigned char) (size)) - -#define ELF64_M_SYM(info) ELF32_M_SYM (info) -#define ELF64_M_SIZE(info) ELF32_M_SIZE (info) -#define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size) - -#define EF_CPU32 0x00810000 - -#define R_68K_NONE 0 -#define R_68K_32 1 -#define R_68K_16 2 -#define R_68K_8 3 -#define R_68K_PC32 4 -#define R_68K_PC16 5 -#define R_68K_PC8 6 -#define R_68K_GOT32 7 -#define R_68K_GOT16 8 -#define R_68K_GOT8 9 -#define R_68K_GOT32O 10 -#define R_68K_GOT16O 11 -#define R_68K_GOT8O 12 -#define R_68K_PLT32 13 -#define R_68K_PLT16 14 -#define R_68K_PLT8 15 -#define R_68K_PLT32O 16 -#define R_68K_PLT16O 17 -#define R_68K_PLT8O 18 -#define R_68K_COPY 19 -#define R_68K_GLOB_DAT 20 -#define R_68K_JMP_SLOT 21 -#define R_68K_RELATIVE 22 -#define R_68K_TLS_GD32 25 -#define R_68K_TLS_GD16 26 -#define R_68K_TLS_GD8 27 -#define R_68K_TLS_LDM32 28 -#define R_68K_TLS_LDM16 29 -#define R_68K_TLS_LDM8 30 -#define R_68K_TLS_LDO32 31 -#define R_68K_TLS_LDO16 32 -#define R_68K_TLS_LDO8 33 -#define R_68K_TLS_IE32 34 -#define R_68K_TLS_IE16 35 -#define R_68K_TLS_IE8 36 -#define R_68K_TLS_LE32 37 -#define R_68K_TLS_LE16 38 -#define R_68K_TLS_LE8 39 -#define R_68K_TLS_DTPMOD32 40 -#define R_68K_TLS_DTPREL32 41 -#define R_68K_TLS_TPREL32 42 -#define R_68K_NUM 43 - -#define R_386_NONE 0 -#define R_386_32 1 -#define R_386_PC32 2 -#define R_386_GOT32 3 -#define R_386_PLT32 4 -#define R_386_COPY 5 -#define R_386_GLOB_DAT 6 -#define R_386_JMP_SLOT 7 -#define R_386_RELATIVE 8 -#define R_386_GOTOFF 9 -#define R_386_GOTPC 10 -#define R_386_32PLT 11 -#define R_386_TLS_TPOFF 14 -#define R_386_TLS_IE 15 -#define R_386_TLS_GOTIE 16 -#define R_386_TLS_LE 17 -#define R_386_TLS_GD 18 -#define R_386_TLS_LDM 19 -#define R_386_16 20 -#define R_386_PC16 21 -#define R_386_8 22 -#define R_386_PC8 23 -#define R_386_TLS_GD_32 24 -#define R_386_TLS_GD_PUSH 25 -#define R_386_TLS_GD_CALL 26 -#define R_386_TLS_GD_POP 27 -#define R_386_TLS_LDM_32 28 -#define R_386_TLS_LDM_PUSH 29 -#define R_386_TLS_LDM_CALL 30 -#define R_386_TLS_LDM_POP 31 -#define R_386_TLS_LDO_32 32 -#define R_386_TLS_IE_32 33 -#define R_386_TLS_LE_32 34 -#define R_386_TLS_DTPMOD32 35 -#define R_386_TLS_DTPOFF32 36 -#define R_386_TLS_TPOFF32 37 -#define R_386_SIZE32 38 -#define R_386_TLS_GOTDESC 39 -#define R_386_TLS_DESC_CALL 40 -#define R_386_TLS_DESC 41 -#define R_386_IRELATIVE 42 -#define R_386_GOT32X 43 -#define R_386_NUM 44 - - - - - -#define STT_SPARC_REGISTER 13 - - - -#define EF_SPARCV9_MM 3 -#define EF_SPARCV9_TSO 0 -#define EF_SPARCV9_PSO 1 -#define EF_SPARCV9_RMO 2 -#define EF_SPARC_LEDATA 0x800000 -#define EF_SPARC_EXT_MASK 0xFFFF00 -#define EF_SPARC_32PLUS 0x000100 -#define EF_SPARC_SUN_US1 0x000200 -#define EF_SPARC_HAL_R1 0x000400 -#define EF_SPARC_SUN_US3 0x000800 - - - -#define R_SPARC_NONE 0 -#define R_SPARC_8 1 -#define R_SPARC_16 2 -#define R_SPARC_32 3 -#define R_SPARC_DISP8 4 -#define R_SPARC_DISP16 5 -#define R_SPARC_DISP32 6 -#define R_SPARC_WDISP30 7 -#define R_SPARC_WDISP22 8 -#define R_SPARC_HI22 9 -#define R_SPARC_22 10 -#define R_SPARC_13 11 -#define R_SPARC_LO10 12 -#define R_SPARC_GOT10 13 -#define R_SPARC_GOT13 14 -#define R_SPARC_GOT22 15 -#define R_SPARC_PC10 16 -#define R_SPARC_PC22 17 -#define R_SPARC_WPLT30 18 -#define R_SPARC_COPY 19 -#define R_SPARC_GLOB_DAT 20 -#define R_SPARC_JMP_SLOT 21 -#define R_SPARC_RELATIVE 22 -#define R_SPARC_UA32 23 - - - -#define R_SPARC_PLT32 24 -#define R_SPARC_HIPLT22 25 -#define R_SPARC_LOPLT10 26 -#define R_SPARC_PCPLT32 27 -#define R_SPARC_PCPLT22 28 -#define R_SPARC_PCPLT10 29 -#define R_SPARC_10 30 -#define R_SPARC_11 31 -#define R_SPARC_64 32 -#define R_SPARC_OLO10 33 -#define R_SPARC_HH22 34 -#define R_SPARC_HM10 35 -#define R_SPARC_LM22 36 -#define R_SPARC_PC_HH22 37 -#define R_SPARC_PC_HM10 38 -#define R_SPARC_PC_LM22 39 -#define R_SPARC_WDISP16 40 -#define R_SPARC_WDISP19 41 -#define R_SPARC_GLOB_JMP 42 -#define R_SPARC_7 43 -#define R_SPARC_5 44 -#define R_SPARC_6 45 -#define R_SPARC_DISP64 46 -#define R_SPARC_PLT64 47 -#define R_SPARC_HIX22 48 -#define R_SPARC_LOX10 49 -#define R_SPARC_H44 50 -#define R_SPARC_M44 51 -#define R_SPARC_L44 52 -#define R_SPARC_REGISTER 53 -#define R_SPARC_UA64 54 -#define R_SPARC_UA16 55 -#define R_SPARC_TLS_GD_HI22 56 -#define R_SPARC_TLS_GD_LO10 57 -#define R_SPARC_TLS_GD_ADD 58 -#define R_SPARC_TLS_GD_CALL 59 -#define R_SPARC_TLS_LDM_HI22 60 -#define R_SPARC_TLS_LDM_LO10 61 -#define R_SPARC_TLS_LDM_ADD 62 -#define R_SPARC_TLS_LDM_CALL 63 -#define R_SPARC_TLS_LDO_HIX22 64 -#define R_SPARC_TLS_LDO_LOX10 65 -#define R_SPARC_TLS_LDO_ADD 66 -#define R_SPARC_TLS_IE_HI22 67 -#define R_SPARC_TLS_IE_LO10 68 -#define R_SPARC_TLS_IE_LD 69 -#define R_SPARC_TLS_IE_LDX 70 -#define R_SPARC_TLS_IE_ADD 71 -#define R_SPARC_TLS_LE_HIX22 72 -#define R_SPARC_TLS_LE_LOX10 73 -#define R_SPARC_TLS_DTPMOD32 74 -#define R_SPARC_TLS_DTPMOD64 75 -#define R_SPARC_TLS_DTPOFF32 76 -#define R_SPARC_TLS_DTPOFF64 77 -#define R_SPARC_TLS_TPOFF32 78 -#define R_SPARC_TLS_TPOFF64 79 -#define R_SPARC_GOTDATA_HIX22 80 -#define R_SPARC_GOTDATA_LOX10 81 -#define R_SPARC_GOTDATA_OP_HIX22 82 -#define R_SPARC_GOTDATA_OP_LOX10 83 -#define R_SPARC_GOTDATA_OP 84 -#define R_SPARC_H34 85 -#define R_SPARC_SIZE32 86 -#define R_SPARC_SIZE64 87 -#define R_SPARC_GNU_VTINHERIT 250 -#define R_SPARC_GNU_VTENTRY 251 -#define R_SPARC_REV32 252 - -#define R_SPARC_NUM 253 - - - -#define DT_SPARC_REGISTER 0x70000001 -#define DT_SPARC_NUM 2 - - -#define EF_MIPS_NOREORDER 1 -#define EF_MIPS_PIC 2 -#define EF_MIPS_CPIC 4 -#define EF_MIPS_XGOT 8 -#define EF_MIPS_64BIT_WHIRL 16 -#define EF_MIPS_ABI2 32 -#define EF_MIPS_ABI_ON32 64 -#define EF_MIPS_FP64 512 -#define EF_MIPS_NAN2008 1024 -#define EF_MIPS_ARCH 0xf0000000 - - - -#define EF_MIPS_ARCH_1 0x00000000 -#define EF_MIPS_ARCH_2 0x10000000 -#define EF_MIPS_ARCH_3 0x20000000 -#define EF_MIPS_ARCH_4 0x30000000 -#define EF_MIPS_ARCH_5 0x40000000 -#define EF_MIPS_ARCH_32 0x50000000 -#define EF_MIPS_ARCH_64 0x60000000 -#define EF_MIPS_ARCH_32R2 0x70000000 -#define EF_MIPS_ARCH_64R2 0x80000000 - - -#define E_MIPS_ARCH_1 0x00000000 -#define E_MIPS_ARCH_2 0x10000000 -#define E_MIPS_ARCH_3 0x20000000 -#define E_MIPS_ARCH_4 0x30000000 -#define E_MIPS_ARCH_5 0x40000000 -#define E_MIPS_ARCH_32 0x50000000 -#define E_MIPS_ARCH_64 0x60000000 - - - -#define SHN_MIPS_ACOMMON 0xff00 -#define SHN_MIPS_TEXT 0xff01 -#define SHN_MIPS_DATA 0xff02 -#define SHN_MIPS_SCOMMON 0xff03 -#define SHN_MIPS_SUNDEFINED 0xff04 - - - -#define SHT_MIPS_LIBLIST 0x70000000 -#define SHT_MIPS_MSYM 0x70000001 -#define SHT_MIPS_CONFLICT 0x70000002 -#define SHT_MIPS_GPTAB 0x70000003 -#define SHT_MIPS_UCODE 0x70000004 -#define SHT_MIPS_DEBUG 0x70000005 -#define SHT_MIPS_REGINFO 0x70000006 -#define SHT_MIPS_PACKAGE 0x70000007 -#define SHT_MIPS_PACKSYM 0x70000008 -#define SHT_MIPS_RELD 0x70000009 -#define SHT_MIPS_IFACE 0x7000000b -#define SHT_MIPS_CONTENT 0x7000000c -#define SHT_MIPS_OPTIONS 0x7000000d -#define SHT_MIPS_SHDR 0x70000010 -#define SHT_MIPS_FDESC 0x70000011 -#define SHT_MIPS_EXTSYM 0x70000012 -#define SHT_MIPS_DENSE 0x70000013 -#define SHT_MIPS_PDESC 0x70000014 -#define SHT_MIPS_LOCSYM 0x70000015 -#define SHT_MIPS_AUXSYM 0x70000016 -#define SHT_MIPS_OPTSYM 0x70000017 -#define SHT_MIPS_LOCSTR 0x70000018 -#define SHT_MIPS_LINE 0x70000019 -#define SHT_MIPS_RFDESC 0x7000001a -#define SHT_MIPS_DELTASYM 0x7000001b -#define SHT_MIPS_DELTAINST 0x7000001c -#define SHT_MIPS_DELTACLASS 0x7000001d -#define SHT_MIPS_DWARF 0x7000001e -#define SHT_MIPS_DELTADECL 0x7000001f -#define SHT_MIPS_SYMBOL_LIB 0x70000020 -#define SHT_MIPS_EVENTS 0x70000021 -#define SHT_MIPS_TRANSLATE 0x70000022 -#define SHT_MIPS_PIXIE 0x70000023 -#define SHT_MIPS_XLATE 0x70000024 -#define SHT_MIPS_XLATE_DEBUG 0x70000025 -#define SHT_MIPS_WHIRL 0x70000026 -#define SHT_MIPS_EH_REGION 0x70000027 -#define SHT_MIPS_XLATE_OLD 0x70000028 -#define SHT_MIPS_PDR_EXCEPTION 0x70000029 - - - -#define SHF_MIPS_GPREL 0x10000000 -#define SHF_MIPS_MERGE 0x20000000 -#define SHF_MIPS_ADDR 0x40000000 -#define SHF_MIPS_STRINGS 0x80000000 -#define SHF_MIPS_NOSTRIP 0x08000000 -#define SHF_MIPS_LOCAL 0x04000000 -#define SHF_MIPS_NAMES 0x02000000 -#define SHF_MIPS_NODUPE 0x01000000 - - - - - -#define STO_MIPS_DEFAULT 0x0 -#define STO_MIPS_INTERNAL 0x1 -#define STO_MIPS_HIDDEN 0x2 -#define STO_MIPS_PROTECTED 0x3 -#define STO_MIPS_PLT 0x8 -#define STO_MIPS_SC_ALIGN_UNUSED 0xff - - -#define STB_MIPS_SPLIT_COMMON 13 - - - -typedef union { - struct { - Elf32_Word gt_current_g_value; - Elf32_Word gt_unused; - } gt_header; - struct { - Elf32_Word gt_g_value; - Elf32_Word gt_bytes; - } gt_entry; -} Elf32_gptab; - - - -typedef struct { - Elf32_Word ri_gprmask; - Elf32_Word ri_cprmask[4]; - Elf32_Sword ri_gp_value; -} Elf32_RegInfo; - - - -typedef struct { - unsigned char kind; - - unsigned char size; - Elf32_Section section; - - Elf32_Word info; -} Elf_Options; - - - -#define ODK_NULL 0 -#define ODK_REGINFO 1 -#define ODK_EXCEPTIONS 2 -#define ODK_PAD 3 -#define ODK_HWPATCH 4 -#define ODK_FILL 5 -#define ODK_TAGS 6 -#define ODK_HWAND 7 -#define ODK_HWOR 8 - - - -#define OEX_FPU_MIN 0x1f -#define OEX_FPU_MAX 0x1f00 -#define OEX_PAGE0 0x10000 -#define OEX_SMM 0x20000 -#define OEX_FPDBUG 0x40000 -#define OEX_PRECISEFP OEX_FPDBUG -#define OEX_DISMISS 0x80000 - -#define OEX_FPU_INVAL 0x10 -#define OEX_FPU_DIV0 0x08 -#define OEX_FPU_OFLO 0x04 -#define OEX_FPU_UFLO 0x02 -#define OEX_FPU_INEX 0x01 - - - -#define OHW_R4KEOP 0x1 -#define OHW_R8KPFETCH 0x2 -#define OHW_R5KEOP 0x4 -#define OHW_R5KCVTL 0x8 - -#define OPAD_PREFIX 0x1 -#define OPAD_POSTFIX 0x2 -#define OPAD_SYMBOL 0x4 - - - -typedef struct { - Elf32_Word hwp_flags1; - Elf32_Word hwp_flags2; -} Elf_Options_Hw; - - - -#define OHWA0_R4KEOP_CHECKED 0x00000001 -#define OHWA1_R4KEOP_CLEAN 0x00000002 - - - -#define R_MIPS_NONE 0 -#define R_MIPS_16 1 -#define R_MIPS_32 2 -#define R_MIPS_REL32 3 -#define R_MIPS_26 4 -#define R_MIPS_HI16 5 -#define R_MIPS_LO16 6 -#define R_MIPS_GPREL16 7 -#define R_MIPS_LITERAL 8 -#define R_MIPS_GOT16 9 -#define R_MIPS_PC16 10 -#define R_MIPS_CALL16 11 -#define R_MIPS_GPREL32 12 - -#define R_MIPS_SHIFT5 16 -#define R_MIPS_SHIFT6 17 -#define R_MIPS_64 18 -#define R_MIPS_GOT_DISP 19 -#define R_MIPS_GOT_PAGE 20 -#define R_MIPS_GOT_OFST 21 -#define R_MIPS_GOT_HI16 22 -#define R_MIPS_GOT_LO16 23 -#define R_MIPS_SUB 24 -#define R_MIPS_INSERT_A 25 -#define R_MIPS_INSERT_B 26 -#define R_MIPS_DELETE 27 -#define R_MIPS_HIGHER 28 -#define R_MIPS_HIGHEST 29 -#define R_MIPS_CALL_HI16 30 -#define R_MIPS_CALL_LO16 31 -#define R_MIPS_SCN_DISP 32 -#define R_MIPS_REL16 33 -#define R_MIPS_ADD_IMMEDIATE 34 -#define R_MIPS_PJUMP 35 -#define R_MIPS_RELGOT 36 -#define R_MIPS_JALR 37 -#define R_MIPS_TLS_DTPMOD32 38 -#define R_MIPS_TLS_DTPREL32 39 -#define R_MIPS_TLS_DTPMOD64 40 -#define R_MIPS_TLS_DTPREL64 41 -#define R_MIPS_TLS_GD 42 -#define R_MIPS_TLS_LDM 43 -#define R_MIPS_TLS_DTPREL_HI16 44 -#define R_MIPS_TLS_DTPREL_LO16 45 -#define R_MIPS_TLS_GOTTPREL 46 -#define R_MIPS_TLS_TPREL32 47 -#define R_MIPS_TLS_TPREL64 48 -#define R_MIPS_TLS_TPREL_HI16 49 -#define R_MIPS_TLS_TPREL_LO16 50 -#define R_MIPS_GLOB_DAT 51 -#define R_MIPS_COPY 126 -#define R_MIPS_JUMP_SLOT 127 - -#define R_MIPS_NUM 128 - - - -#define PT_MIPS_REGINFO 0x70000000 -#define PT_MIPS_RTPROC 0x70000001 -#define PT_MIPS_OPTIONS 0x70000002 -#define PT_MIPS_ABIFLAGS 0x70000003 - - - -#define PF_MIPS_LOCAL 0x10000000 - - - -#define DT_MIPS_RLD_VERSION 0x70000001 -#define DT_MIPS_TIME_STAMP 0x70000002 -#define DT_MIPS_ICHECKSUM 0x70000003 -#define DT_MIPS_IVERSION 0x70000004 -#define DT_MIPS_FLAGS 0x70000005 -#define DT_MIPS_BASE_ADDRESS 0x70000006 -#define DT_MIPS_MSYM 0x70000007 -#define DT_MIPS_CONFLICT 0x70000008 -#define DT_MIPS_LIBLIST 0x70000009 -#define DT_MIPS_LOCAL_GOTNO 0x7000000a -#define DT_MIPS_CONFLICTNO 0x7000000b -#define DT_MIPS_LIBLISTNO 0x70000010 -#define DT_MIPS_SYMTABNO 0x70000011 -#define DT_MIPS_UNREFEXTNO 0x70000012 -#define DT_MIPS_GOTSYM 0x70000013 -#define DT_MIPS_HIPAGENO 0x70000014 -#define DT_MIPS_RLD_MAP 0x70000016 -#define DT_MIPS_DELTA_CLASS 0x70000017 -#define DT_MIPS_DELTA_CLASS_NO 0x70000018 - -#define DT_MIPS_DELTA_INSTANCE 0x70000019 -#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a - -#define DT_MIPS_DELTA_RELOC 0x7000001b -#define DT_MIPS_DELTA_RELOC_NO 0x7000001c - -#define DT_MIPS_DELTA_SYM 0x7000001d - -#define DT_MIPS_DELTA_SYM_NO 0x7000001e - -#define DT_MIPS_DELTA_CLASSSYM 0x70000020 - -#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 - -#define DT_MIPS_CXX_FLAGS 0x70000022 -#define DT_MIPS_PIXIE_INIT 0x70000023 -#define DT_MIPS_SYMBOL_LIB 0x70000024 -#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025 -#define DT_MIPS_LOCAL_GOTIDX 0x70000026 -#define DT_MIPS_HIDDEN_GOTIDX 0x70000027 -#define DT_MIPS_PROTECTED_GOTIDX 0x70000028 -#define DT_MIPS_OPTIONS 0x70000029 -#define DT_MIPS_INTERFACE 0x7000002a -#define DT_MIPS_DYNSTR_ALIGN 0x7000002b -#define DT_MIPS_INTERFACE_SIZE 0x7000002c -#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d - -#define DT_MIPS_PERF_SUFFIX 0x7000002e - -#define DT_MIPS_COMPACT_SIZE 0x7000002f -#define DT_MIPS_GP_VALUE 0x70000030 -#define DT_MIPS_AUX_DYNAMIC 0x70000031 - -#define DT_MIPS_PLTGOT 0x70000032 - -#define DT_MIPS_RWPLT 0x70000034 -#define DT_MIPS_RLD_MAP_REL 0x70000035 -#define DT_MIPS_NUM 0x36 - - - -#define RHF_NONE 0 -#define RHF_QUICKSTART (1 << 0) -#define RHF_NOTPOT (1 << 1) -#define RHF_NO_LIBRARY_REPLACEMENT (1 << 2) -#define RHF_NO_MOVE (1 << 3) -#define RHF_SGI_ONLY (1 << 4) -#define RHF_GUARANTEE_INIT (1 << 5) -#define RHF_DELTA_C_PLUS_PLUS (1 << 6) -#define RHF_GUARANTEE_START_INIT (1 << 7) -#define RHF_PIXIE (1 << 8) -#define RHF_DEFAULT_DELAY_LOAD (1 << 9) -#define RHF_REQUICKSTART (1 << 10) -#define RHF_REQUICKSTARTED (1 << 11) -#define RHF_CORD (1 << 12) -#define RHF_NO_UNRES_UNDEF (1 << 13) -#define RHF_RLD_ORDER_SAFE (1 << 14) - - - -typedef struct { - Elf32_Word l_name; - Elf32_Word l_time_stamp; - Elf32_Word l_checksum; - Elf32_Word l_version; - Elf32_Word l_flags; -} Elf32_Lib; - -typedef struct { - Elf64_Word l_name; - Elf64_Word l_time_stamp; - Elf64_Word l_checksum; - Elf64_Word l_version; - Elf64_Word l_flags; -} Elf64_Lib; - - - - -#define LL_NONE 0 -#define LL_EXACT_MATCH (1 << 0) -#define LL_IGNORE_INT_VER (1 << 1) -#define LL_REQUIRE_MINOR (1 << 2) -#define LL_EXPORTS (1 << 3) -#define LL_DELAY_LOAD (1 << 4) -#define LL_DELTA (1 << 5) - - - -typedef Elf32_Addr Elf32_Conflict; - -typedef struct { - Elf32_Half version; - unsigned char isa_level; - unsigned char isa_rev; - unsigned char gpr_size; - unsigned char cpr1_size; - unsigned char cpr2_size; - unsigned char fp_abi; - Elf32_Word isa_ext; - Elf32_Word ases; - Elf32_Word flags1; - Elf32_Word flags2; -} Elf_MIPS_ABIFlags_v0; - -#define MIPS_AFL_REG_NONE 0x00 -#define MIPS_AFL_REG_32 0x01 -#define MIPS_AFL_REG_64 0x02 -#define MIPS_AFL_REG_128 0x03 - -#define MIPS_AFL_ASE_DSP 0x00000001 -#define MIPS_AFL_ASE_DSPR2 0x00000002 -#define MIPS_AFL_ASE_EVA 0x00000004 -#define MIPS_AFL_ASE_MCU 0x00000008 -#define MIPS_AFL_ASE_MDMX 0x00000010 -#define MIPS_AFL_ASE_MIPS3D 0x00000020 -#define MIPS_AFL_ASE_MT 0x00000040 -#define MIPS_AFL_ASE_SMARTMIPS 0x00000080 -#define MIPS_AFL_ASE_VIRT 0x00000100 -#define MIPS_AFL_ASE_MSA 0x00000200 -#define MIPS_AFL_ASE_MIPS16 0x00000400 -#define MIPS_AFL_ASE_MICROMIPS 0x00000800 -#define MIPS_AFL_ASE_XPA 0x00001000 -#define MIPS_AFL_ASE_MASK 0x00001fff - -#define MIPS_AFL_EXT_XLR 1 -#define MIPS_AFL_EXT_OCTEON2 2 -#define MIPS_AFL_EXT_OCTEONP 3 -#define MIPS_AFL_EXT_LOONGSON_3A 4 -#define MIPS_AFL_EXT_OCTEON 5 -#define MIPS_AFL_EXT_5900 6 -#define MIPS_AFL_EXT_4650 7 -#define MIPS_AFL_EXT_4010 8 -#define MIPS_AFL_EXT_4100 9 -#define MIPS_AFL_EXT_3900 10 -#define MIPS_AFL_EXT_10000 11 -#define MIPS_AFL_EXT_SB1 12 -#define MIPS_AFL_EXT_4111 13 -#define MIPS_AFL_EXT_4120 14 -#define MIPS_AFL_EXT_5400 15 -#define MIPS_AFL_EXT_5500 16 -#define MIPS_AFL_EXT_LOONGSON_2E 17 -#define MIPS_AFL_EXT_LOONGSON_2F 18 - -#define MIPS_AFL_FLAGS1_ODDSPREG 1 - -enum -{ - Val_GNU_MIPS_ABI_FP_ANY = 0, - Val_GNU_MIPS_ABI_FP_DOUBLE = 1, - Val_GNU_MIPS_ABI_FP_SINGLE = 2, - Val_GNU_MIPS_ABI_FP_SOFT = 3, - Val_GNU_MIPS_ABI_FP_OLD_64 = 4, - Val_GNU_MIPS_ABI_FP_XX = 5, - Val_GNU_MIPS_ABI_FP_64 = 6, - Val_GNU_MIPS_ABI_FP_64A = 7, - Val_GNU_MIPS_ABI_FP_MAX = 7 -}; - - - - -#define EF_PARISC_TRAPNIL 0x00010000 -#define EF_PARISC_EXT 0x00020000 -#define EF_PARISC_LSB 0x00040000 -#define EF_PARISC_WIDE 0x00080000 -#define EF_PARISC_NO_KABP 0x00100000 - -#define EF_PARISC_LAZYSWAP 0x00400000 -#define EF_PARISC_ARCH 0x0000ffff - - - -#define EFA_PARISC_1_0 0x020b -#define EFA_PARISC_1_1 0x0210 -#define EFA_PARISC_2_0 0x0214 - - - -#define SHN_PARISC_ANSI_COMMON 0xff00 - -#define SHN_PARISC_HUGE_COMMON 0xff01 - - - -#define SHT_PARISC_EXT 0x70000000 -#define SHT_PARISC_UNWIND 0x70000001 -#define SHT_PARISC_DOC 0x70000002 - - - -#define SHF_PARISC_SHORT 0x20000000 -#define SHF_PARISC_HUGE 0x40000000 -#define SHF_PARISC_SBP 0x80000000 - - - -#define STT_PARISC_MILLICODE 13 - -#define STT_HP_OPAQUE (STT_LOOS + 0x1) -#define STT_HP_STUB (STT_LOOS + 0x2) - - - -#define R_PARISC_NONE 0 -#define R_PARISC_DIR32 1 -#define R_PARISC_DIR21L 2 -#define R_PARISC_DIR17R 3 -#define R_PARISC_DIR17F 4 -#define R_PARISC_DIR14R 6 -#define R_PARISC_PCREL32 9 -#define R_PARISC_PCREL21L 10 -#define R_PARISC_PCREL17R 11 -#define R_PARISC_PCREL17F 12 -#define R_PARISC_PCREL14R 14 -#define R_PARISC_DPREL21L 18 -#define R_PARISC_DPREL14R 22 -#define R_PARISC_GPREL21L 26 -#define R_PARISC_GPREL14R 30 -#define R_PARISC_LTOFF21L 34 -#define R_PARISC_LTOFF14R 38 -#define R_PARISC_SECREL32 41 -#define R_PARISC_SEGBASE 48 -#define R_PARISC_SEGREL32 49 -#define R_PARISC_PLTOFF21L 50 -#define R_PARISC_PLTOFF14R 54 -#define R_PARISC_LTOFF_FPTR32 57 -#define R_PARISC_LTOFF_FPTR21L 58 -#define R_PARISC_LTOFF_FPTR14R 62 -#define R_PARISC_FPTR64 64 -#define R_PARISC_PLABEL32 65 -#define R_PARISC_PLABEL21L 66 -#define R_PARISC_PLABEL14R 70 -#define R_PARISC_PCREL64 72 -#define R_PARISC_PCREL22F 74 -#define R_PARISC_PCREL14WR 75 -#define R_PARISC_PCREL14DR 76 -#define R_PARISC_PCREL16F 77 -#define R_PARISC_PCREL16WF 78 -#define R_PARISC_PCREL16DF 79 -#define R_PARISC_DIR64 80 -#define R_PARISC_DIR14WR 83 -#define R_PARISC_DIR14DR 84 -#define R_PARISC_DIR16F 85 -#define R_PARISC_DIR16WF 86 -#define R_PARISC_DIR16DF 87 -#define R_PARISC_GPREL64 88 -#define R_PARISC_GPREL14WR 91 -#define R_PARISC_GPREL14DR 92 -#define R_PARISC_GPREL16F 93 -#define R_PARISC_GPREL16WF 94 -#define R_PARISC_GPREL16DF 95 -#define R_PARISC_LTOFF64 96 -#define R_PARISC_LTOFF14WR 99 -#define R_PARISC_LTOFF14DR 100 -#define R_PARISC_LTOFF16F 101 -#define R_PARISC_LTOFF16WF 102 -#define R_PARISC_LTOFF16DF 103 -#define R_PARISC_SECREL64 104 -#define R_PARISC_SEGREL64 112 -#define R_PARISC_PLTOFF14WR 115 -#define R_PARISC_PLTOFF14DR 116 -#define R_PARISC_PLTOFF16F 117 -#define R_PARISC_PLTOFF16WF 118 -#define R_PARISC_PLTOFF16DF 119 -#define R_PARISC_LTOFF_FPTR64 120 -#define R_PARISC_LTOFF_FPTR14WR 123 -#define R_PARISC_LTOFF_FPTR14DR 124 -#define R_PARISC_LTOFF_FPTR16F 125 -#define R_PARISC_LTOFF_FPTR16WF 126 -#define R_PARISC_LTOFF_FPTR16DF 127 -#define R_PARISC_LORESERVE 128 -#define R_PARISC_COPY 128 -#define R_PARISC_IPLT 129 -#define R_PARISC_EPLT 130 -#define R_PARISC_TPREL32 153 -#define R_PARISC_TPREL21L 154 -#define R_PARISC_TPREL14R 158 -#define R_PARISC_LTOFF_TP21L 162 -#define R_PARISC_LTOFF_TP14R 166 -#define R_PARISC_LTOFF_TP14F 167 -#define R_PARISC_TPREL64 216 -#define R_PARISC_TPREL14WR 219 -#define R_PARISC_TPREL14DR 220 -#define R_PARISC_TPREL16F 221 -#define R_PARISC_TPREL16WF 222 -#define R_PARISC_TPREL16DF 223 -#define R_PARISC_LTOFF_TP64 224 -#define R_PARISC_LTOFF_TP14WR 227 -#define R_PARISC_LTOFF_TP14DR 228 -#define R_PARISC_LTOFF_TP16F 229 -#define R_PARISC_LTOFF_TP16WF 230 -#define R_PARISC_LTOFF_TP16DF 231 -#define R_PARISC_GNU_VTENTRY 232 -#define R_PARISC_GNU_VTINHERIT 233 -#define R_PARISC_TLS_GD21L 234 -#define R_PARISC_TLS_GD14R 235 -#define R_PARISC_TLS_GDCALL 236 -#define R_PARISC_TLS_LDM21L 237 -#define R_PARISC_TLS_LDM14R 238 -#define R_PARISC_TLS_LDMCALL 239 -#define R_PARISC_TLS_LDO21L 240 -#define R_PARISC_TLS_LDO14R 241 -#define R_PARISC_TLS_DTPMOD32 242 -#define R_PARISC_TLS_DTPMOD64 243 -#define R_PARISC_TLS_DTPOFF32 244 -#define R_PARISC_TLS_DTPOFF64 245 -#define R_PARISC_TLS_LE21L R_PARISC_TPREL21L -#define R_PARISC_TLS_LE14R R_PARISC_TPREL14R -#define R_PARISC_TLS_IE21L R_PARISC_LTOFF_TP21L -#define R_PARISC_TLS_IE14R R_PARISC_LTOFF_TP14R -#define R_PARISC_TLS_TPREL32 R_PARISC_TPREL32 -#define R_PARISC_TLS_TPREL64 R_PARISC_TPREL64 -#define R_PARISC_HIRESERVE 255 - - - -#define PT_HP_TLS (PT_LOOS + 0x0) -#define PT_HP_CORE_NONE (PT_LOOS + 0x1) -#define PT_HP_CORE_VERSION (PT_LOOS + 0x2) -#define PT_HP_CORE_KERNEL (PT_LOOS + 0x3) -#define PT_HP_CORE_COMM (PT_LOOS + 0x4) -#define PT_HP_CORE_PROC (PT_LOOS + 0x5) -#define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6) -#define PT_HP_CORE_STACK (PT_LOOS + 0x7) -#define PT_HP_CORE_SHM (PT_LOOS + 0x8) -#define PT_HP_CORE_MMF (PT_LOOS + 0x9) -#define PT_HP_PARALLEL (PT_LOOS + 0x10) -#define PT_HP_FASTBIND (PT_LOOS + 0x11) -#define PT_HP_OPT_ANNOT (PT_LOOS + 0x12) -#define PT_HP_HSL_ANNOT (PT_LOOS + 0x13) -#define PT_HP_STACK (PT_LOOS + 0x14) - -#define PT_PARISC_ARCHEXT 0x70000000 -#define PT_PARISC_UNWIND 0x70000001 - - - -#define PF_PARISC_SBP 0x08000000 - -#define PF_HP_PAGE_SIZE 0x00100000 -#define PF_HP_FAR_SHARED 0x00200000 -#define PF_HP_NEAR_SHARED 0x00400000 -#define PF_HP_CODE 0x01000000 -#define PF_HP_MODIFY 0x02000000 -#define PF_HP_LAZYSWAP 0x04000000 -#define PF_HP_SBP 0x08000000 - - - - - - -#define EF_ALPHA_32BIT 1 -#define EF_ALPHA_CANRELAX 2 - - - - -#define SHT_ALPHA_DEBUG 0x70000001 -#define SHT_ALPHA_REGINFO 0x70000002 - - - -#define SHF_ALPHA_GPREL 0x10000000 - - -#define STO_ALPHA_NOPV 0x80 -#define STO_ALPHA_STD_GPLOAD 0x88 - - - -#define R_ALPHA_NONE 0 -#define R_ALPHA_REFLONG 1 -#define R_ALPHA_REFQUAD 2 -#define R_ALPHA_GPREL32 3 -#define R_ALPHA_LITERAL 4 -#define R_ALPHA_LITUSE 5 -#define R_ALPHA_GPDISP 6 -#define R_ALPHA_BRADDR 7 -#define R_ALPHA_HINT 8 -#define R_ALPHA_SREL16 9 -#define R_ALPHA_SREL32 10 -#define R_ALPHA_SREL64 11 -#define R_ALPHA_GPRELHIGH 17 -#define R_ALPHA_GPRELLOW 18 -#define R_ALPHA_GPREL16 19 -#define R_ALPHA_COPY 24 -#define R_ALPHA_GLOB_DAT 25 -#define R_ALPHA_JMP_SLOT 26 -#define R_ALPHA_RELATIVE 27 -#define R_ALPHA_TLS_GD_HI 28 -#define R_ALPHA_TLSGD 29 -#define R_ALPHA_TLS_LDM 30 -#define R_ALPHA_DTPMOD64 31 -#define R_ALPHA_GOTDTPREL 32 -#define R_ALPHA_DTPREL64 33 -#define R_ALPHA_DTPRELHI 34 -#define R_ALPHA_DTPRELLO 35 -#define R_ALPHA_DTPREL16 36 -#define R_ALPHA_GOTTPREL 37 -#define R_ALPHA_TPREL64 38 -#define R_ALPHA_TPRELHI 39 -#define R_ALPHA_TPRELLO 40 -#define R_ALPHA_TPREL16 41 - -#define R_ALPHA_NUM 46 - - -#define LITUSE_ALPHA_ADDR 0 -#define LITUSE_ALPHA_BASE 1 -#define LITUSE_ALPHA_BYTOFF 2 -#define LITUSE_ALPHA_JSR 3 -#define LITUSE_ALPHA_TLS_GD 4 -#define LITUSE_ALPHA_TLS_LDM 5 - - -#define DT_ALPHA_PLTRO (DT_LOPROC + 0) -#define DT_ALPHA_NUM 1 - - - - -#define EF_PPC_EMB 0x80000000 - - -#define EF_PPC_RELOCATABLE 0x00010000 -#define EF_PPC_RELOCATABLE_LIB 0x00008000 - - - -#define R_PPC_NONE 0 -#define R_PPC_ADDR32 1 -#define R_PPC_ADDR24 2 -#define R_PPC_ADDR16 3 -#define R_PPC_ADDR16_LO 4 -#define R_PPC_ADDR16_HI 5 -#define R_PPC_ADDR16_HA 6 -#define R_PPC_ADDR14 7 -#define R_PPC_ADDR14_BRTAKEN 8 -#define R_PPC_ADDR14_BRNTAKEN 9 -#define R_PPC_REL24 10 -#define R_PPC_REL14 11 -#define R_PPC_REL14_BRTAKEN 12 -#define R_PPC_REL14_BRNTAKEN 13 -#define R_PPC_GOT16 14 -#define R_PPC_GOT16_LO 15 -#define R_PPC_GOT16_HI 16 -#define R_PPC_GOT16_HA 17 -#define R_PPC_PLTREL24 18 -#define R_PPC_COPY 19 -#define R_PPC_GLOB_DAT 20 -#define R_PPC_JMP_SLOT 21 -#define R_PPC_RELATIVE 22 -#define R_PPC_LOCAL24PC 23 -#define R_PPC_UADDR32 24 -#define R_PPC_UADDR16 25 -#define R_PPC_REL32 26 -#define R_PPC_PLT32 27 -#define R_PPC_PLTREL32 28 -#define R_PPC_PLT16_LO 29 -#define R_PPC_PLT16_HI 30 -#define R_PPC_PLT16_HA 31 -#define R_PPC_SDAREL16 32 -#define R_PPC_SECTOFF 33 -#define R_PPC_SECTOFF_LO 34 -#define R_PPC_SECTOFF_HI 35 -#define R_PPC_SECTOFF_HA 36 - - -#define R_PPC_TLS 67 -#define R_PPC_DTPMOD32 68 -#define R_PPC_TPREL16 69 -#define R_PPC_TPREL16_LO 70 -#define R_PPC_TPREL16_HI 71 -#define R_PPC_TPREL16_HA 72 -#define R_PPC_TPREL32 73 -#define R_PPC_DTPREL16 74 -#define R_PPC_DTPREL16_LO 75 -#define R_PPC_DTPREL16_HI 76 -#define R_PPC_DTPREL16_HA 77 -#define R_PPC_DTPREL32 78 -#define R_PPC_GOT_TLSGD16 79 -#define R_PPC_GOT_TLSGD16_LO 80 -#define R_PPC_GOT_TLSGD16_HI 81 -#define R_PPC_GOT_TLSGD16_HA 82 -#define R_PPC_GOT_TLSLD16 83 -#define R_PPC_GOT_TLSLD16_LO 84 -#define R_PPC_GOT_TLSLD16_HI 85 -#define R_PPC_GOT_TLSLD16_HA 86 -#define R_PPC_GOT_TPREL16 87 -#define R_PPC_GOT_TPREL16_LO 88 -#define R_PPC_GOT_TPREL16_HI 89 -#define R_PPC_GOT_TPREL16_HA 90 -#define R_PPC_GOT_DTPREL16 91 -#define R_PPC_GOT_DTPREL16_LO 92 -#define R_PPC_GOT_DTPREL16_HI 93 -#define R_PPC_GOT_DTPREL16_HA 94 -#define R_PPC_TLSGD 95 -#define R_PPC_TLSLD 96 - - -#define R_PPC_EMB_NADDR32 101 -#define R_PPC_EMB_NADDR16 102 -#define R_PPC_EMB_NADDR16_LO 103 -#define R_PPC_EMB_NADDR16_HI 104 -#define R_PPC_EMB_NADDR16_HA 105 -#define R_PPC_EMB_SDAI16 106 -#define R_PPC_EMB_SDA2I16 107 -#define R_PPC_EMB_SDA2REL 108 -#define R_PPC_EMB_SDA21 109 -#define R_PPC_EMB_MRKREF 110 -#define R_PPC_EMB_RELSEC16 111 -#define R_PPC_EMB_RELST_LO 112 -#define R_PPC_EMB_RELST_HI 113 -#define R_PPC_EMB_RELST_HA 114 -#define R_PPC_EMB_BIT_FLD 115 -#define R_PPC_EMB_RELSDA 116 - - -#define R_PPC_DIAB_SDA21_LO 180 -#define R_PPC_DIAB_SDA21_HI 181 -#define R_PPC_DIAB_SDA21_HA 182 -#define R_PPC_DIAB_RELSDA_LO 183 -#define R_PPC_DIAB_RELSDA_HI 184 -#define R_PPC_DIAB_RELSDA_HA 185 - - -#define R_PPC_IRELATIVE 248 - - -#define R_PPC_REL16 249 -#define R_PPC_REL16_LO 250 -#define R_PPC_REL16_HI 251 -#define R_PPC_REL16_HA 252 - - - -#define R_PPC_TOC16 255 - - -#define DT_PPC_GOT (DT_LOPROC + 0) -#define DT_PPC_OPT (DT_LOPROC + 1) -#define DT_PPC_NUM 2 - -#define PPC_OPT_TLS 1 - - -#define R_PPC64_NONE R_PPC_NONE -#define R_PPC64_ADDR32 R_PPC_ADDR32 -#define R_PPC64_ADDR24 R_PPC_ADDR24 -#define R_PPC64_ADDR16 R_PPC_ADDR16 -#define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO -#define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI -#define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA -#define R_PPC64_ADDR14 R_PPC_ADDR14 -#define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN -#define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN -#define R_PPC64_REL24 R_PPC_REL24 -#define R_PPC64_REL14 R_PPC_REL14 -#define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN -#define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN -#define R_PPC64_GOT16 R_PPC_GOT16 -#define R_PPC64_GOT16_LO R_PPC_GOT16_LO -#define R_PPC64_GOT16_HI R_PPC_GOT16_HI -#define R_PPC64_GOT16_HA R_PPC_GOT16_HA - -#define R_PPC64_COPY R_PPC_COPY -#define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT -#define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT -#define R_PPC64_RELATIVE R_PPC_RELATIVE - -#define R_PPC64_UADDR32 R_PPC_UADDR32 -#define R_PPC64_UADDR16 R_PPC_UADDR16 -#define R_PPC64_REL32 R_PPC_REL32 -#define R_PPC64_PLT32 R_PPC_PLT32 -#define R_PPC64_PLTREL32 R_PPC_PLTREL32 -#define R_PPC64_PLT16_LO R_PPC_PLT16_LO -#define R_PPC64_PLT16_HI R_PPC_PLT16_HI -#define R_PPC64_PLT16_HA R_PPC_PLT16_HA - -#define R_PPC64_SECTOFF R_PPC_SECTOFF -#define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO -#define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI -#define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA -#define R_PPC64_ADDR30 37 -#define R_PPC64_ADDR64 38 -#define R_PPC64_ADDR16_HIGHER 39 -#define R_PPC64_ADDR16_HIGHERA 40 -#define R_PPC64_ADDR16_HIGHEST 41 -#define R_PPC64_ADDR16_HIGHESTA 42 -#define R_PPC64_UADDR64 43 -#define R_PPC64_REL64 44 -#define R_PPC64_PLT64 45 -#define R_PPC64_PLTREL64 46 -#define R_PPC64_TOC16 47 -#define R_PPC64_TOC16_LO 48 -#define R_PPC64_TOC16_HI 49 -#define R_PPC64_TOC16_HA 50 -#define R_PPC64_TOC 51 -#define R_PPC64_PLTGOT16 52 -#define R_PPC64_PLTGOT16_LO 53 -#define R_PPC64_PLTGOT16_HI 54 -#define R_PPC64_PLTGOT16_HA 55 - -#define R_PPC64_ADDR16_DS 56 -#define R_PPC64_ADDR16_LO_DS 57 -#define R_PPC64_GOT16_DS 58 -#define R_PPC64_GOT16_LO_DS 59 -#define R_PPC64_PLT16_LO_DS 60 -#define R_PPC64_SECTOFF_DS 61 -#define R_PPC64_SECTOFF_LO_DS 62 -#define R_PPC64_TOC16_DS 63 -#define R_PPC64_TOC16_LO_DS 64 -#define R_PPC64_PLTGOT16_DS 65 -#define R_PPC64_PLTGOT16_LO_DS 66 - - -#define R_PPC64_TLS 67 -#define R_PPC64_DTPMOD64 68 -#define R_PPC64_TPREL16 69 -#define R_PPC64_TPREL16_LO 70 -#define R_PPC64_TPREL16_HI 71 -#define R_PPC64_TPREL16_HA 72 -#define R_PPC64_TPREL64 73 -#define R_PPC64_DTPREL16 74 -#define R_PPC64_DTPREL16_LO 75 -#define R_PPC64_DTPREL16_HI 76 -#define R_PPC64_DTPREL16_HA 77 -#define R_PPC64_DTPREL64 78 -#define R_PPC64_GOT_TLSGD16 79 -#define R_PPC64_GOT_TLSGD16_LO 80 -#define R_PPC64_GOT_TLSGD16_HI 81 -#define R_PPC64_GOT_TLSGD16_HA 82 -#define R_PPC64_GOT_TLSLD16 83 -#define R_PPC64_GOT_TLSLD16_LO 84 -#define R_PPC64_GOT_TLSLD16_HI 85 -#define R_PPC64_GOT_TLSLD16_HA 86 -#define R_PPC64_GOT_TPREL16_DS 87 -#define R_PPC64_GOT_TPREL16_LO_DS 88 -#define R_PPC64_GOT_TPREL16_HI 89 -#define R_PPC64_GOT_TPREL16_HA 90 -#define R_PPC64_GOT_DTPREL16_DS 91 -#define R_PPC64_GOT_DTPREL16_LO_DS 92 -#define R_PPC64_GOT_DTPREL16_HI 93 -#define R_PPC64_GOT_DTPREL16_HA 94 -#define R_PPC64_TPREL16_DS 95 -#define R_PPC64_TPREL16_LO_DS 96 -#define R_PPC64_TPREL16_HIGHER 97 -#define R_PPC64_TPREL16_HIGHERA 98 -#define R_PPC64_TPREL16_HIGHEST 99 -#define R_PPC64_TPREL16_HIGHESTA 100 -#define R_PPC64_DTPREL16_DS 101 -#define R_PPC64_DTPREL16_LO_DS 102 -#define R_PPC64_DTPREL16_HIGHER 103 -#define R_PPC64_DTPREL16_HIGHERA 104 -#define R_PPC64_DTPREL16_HIGHEST 105 -#define R_PPC64_DTPREL16_HIGHESTA 106 -#define R_PPC64_TLSGD 107 -#define R_PPC64_TLSLD 108 -#define R_PPC64_TOCSAVE 109 -#define R_PPC64_ADDR16_HIGH 110 -#define R_PPC64_ADDR16_HIGHA 111 -#define R_PPC64_TPREL16_HIGH 112 -#define R_PPC64_TPREL16_HIGHA 113 -#define R_PPC64_DTPREL16_HIGH 114 -#define R_PPC64_DTPREL16_HIGHA 115 - - -#define R_PPC64_JMP_IREL 247 -#define R_PPC64_IRELATIVE 248 -#define R_PPC64_REL16 249 -#define R_PPC64_REL16_LO 250 -#define R_PPC64_REL16_HI 251 -#define R_PPC64_REL16_HA 252 - -#define EF_PPC64_ABI 3 - -#define DT_PPC64_GLINK (DT_LOPROC + 0) -#define DT_PPC64_OPD (DT_LOPROC + 1) -#define DT_PPC64_OPDSZ (DT_LOPROC + 2) -#define DT_PPC64_OPT (DT_LOPROC + 3) -#define DT_PPC64_NUM 4 - -#define PPC64_OPT_TLS 1 -#define PPC64_OPT_MULTI_TOC 2 -#define PPC64_OPT_LOCALENTRY 4 - -#define STO_PPC64_LOCAL_BIT 5 -#define STO_PPC64_LOCAL_MASK 0xe0 -#define PPC64_LOCAL_ENTRY_OFFSET(x) (1 << (((x)&0xe0)>>5) & 0xfc) - - -#define EF_ARM_RELEXEC 0x01 -#define EF_ARM_HASENTRY 0x02 -#define EF_ARM_INTERWORK 0x04 -#define EF_ARM_APCS_26 0x08 -#define EF_ARM_APCS_FLOAT 0x10 -#define EF_ARM_PIC 0x20 -#define EF_ARM_ALIGN8 0x40 -#define EF_ARM_NEW_ABI 0x80 -#define EF_ARM_OLD_ABI 0x100 -#define EF_ARM_SOFT_FLOAT 0x200 -#define EF_ARM_VFP_FLOAT 0x400 -#define EF_ARM_MAVERICK_FLOAT 0x800 - -#define EF_ARM_ABI_FLOAT_SOFT 0x200 -#define EF_ARM_ABI_FLOAT_HARD 0x400 - - -#define EF_ARM_SYMSARESORTED 0x04 -#define EF_ARM_DYNSYMSUSESEGIDX 0x08 -#define EF_ARM_MAPSYMSFIRST 0x10 -#define EF_ARM_EABIMASK 0XFF000000 - - -#define EF_ARM_BE8 0x00800000 -#define EF_ARM_LE8 0x00400000 - -#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK) -#define EF_ARM_EABI_UNKNOWN 0x00000000 -#define EF_ARM_EABI_VER1 0x01000000 -#define EF_ARM_EABI_VER2 0x02000000 -#define EF_ARM_EABI_VER3 0x03000000 -#define EF_ARM_EABI_VER4 0x04000000 -#define EF_ARM_EABI_VER5 0x05000000 - - -#define STT_ARM_TFUNC STT_LOPROC -#define STT_ARM_16BIT STT_HIPROC - - -#define SHF_ARM_ENTRYSECT 0x10000000 -#define SHF_ARM_COMDEF 0x80000000 - - - -#define PF_ARM_SB 0x10000000 - -#define PF_ARM_PI 0x20000000 -#define PF_ARM_ABS 0x40000000 - - -#define PT_ARM_EXIDX (PT_LOPROC + 1) - - -#define SHT_ARM_EXIDX (SHT_LOPROC + 1) -#define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) -#define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) - -#define R_AARCH64_NONE 0 -#define R_AARCH64_P32_ABS32 1 -#define R_AARCH64_P32_COPY 180 -#define R_AARCH64_P32_GLOB_DAT 181 -#define R_AARCH64_P32_JUMP_SLOT 182 -#define R_AARCH64_P32_RELATIVE 183 -#define R_AARCH64_P32_TLS_DTPMOD 184 -#define R_AARCH64_P32_TLS_DTPREL 185 -#define R_AARCH64_P32_TLS_TPREL 186 -#define R_AARCH64_P32_TLSDESC 187 -#define R_AARCH64_P32_IRELATIVE 188 -#define R_AARCH64_ABS64 257 -#define R_AARCH64_ABS32 258 -#define R_AARCH64_ABS16 259 -#define R_AARCH64_PREL64 260 -#define R_AARCH64_PREL32 261 -#define R_AARCH64_PREL16 262 -#define R_AARCH64_MOVW_UABS_G0 263 -#define R_AARCH64_MOVW_UABS_G0_NC 264 -#define R_AARCH64_MOVW_UABS_G1 265 -#define R_AARCH64_MOVW_UABS_G1_NC 266 -#define R_AARCH64_MOVW_UABS_G2 267 -#define R_AARCH64_MOVW_UABS_G2_NC 268 -#define R_AARCH64_MOVW_UABS_G3 269 -#define R_AARCH64_MOVW_SABS_G0 270 -#define R_AARCH64_MOVW_SABS_G1 271 -#define R_AARCH64_MOVW_SABS_G2 272 -#define R_AARCH64_LD_PREL_LO19 273 -#define R_AARCH64_ADR_PREL_LO21 274 -#define R_AARCH64_ADR_PREL_PG_HI21 275 -#define R_AARCH64_ADR_PREL_PG_HI21_NC 276 -#define R_AARCH64_ADD_ABS_LO12_NC 277 -#define R_AARCH64_LDST8_ABS_LO12_NC 278 -#define R_AARCH64_TSTBR14 279 -#define R_AARCH64_CONDBR19 280 -#define R_AARCH64_JUMP26 282 -#define R_AARCH64_CALL26 283 -#define R_AARCH64_LDST16_ABS_LO12_NC 284 -#define R_AARCH64_LDST32_ABS_LO12_NC 285 -#define R_AARCH64_LDST64_ABS_LO12_NC 286 -#define R_AARCH64_MOVW_PREL_G0 287 -#define R_AARCH64_MOVW_PREL_G0_NC 288 -#define R_AARCH64_MOVW_PREL_G1 289 -#define R_AARCH64_MOVW_PREL_G1_NC 290 -#define R_AARCH64_MOVW_PREL_G2 291 -#define R_AARCH64_MOVW_PREL_G2_NC 292 -#define R_AARCH64_MOVW_PREL_G3 293 -#define R_AARCH64_LDST128_ABS_LO12_NC 299 -#define R_AARCH64_MOVW_GOTOFF_G0 300 -#define R_AARCH64_MOVW_GOTOFF_G0_NC 301 -#define R_AARCH64_MOVW_GOTOFF_G1 302 -#define R_AARCH64_MOVW_GOTOFF_G1_NC 303 -#define R_AARCH64_MOVW_GOTOFF_G2 304 -#define R_AARCH64_MOVW_GOTOFF_G2_NC 305 -#define R_AARCH64_MOVW_GOTOFF_G3 306 -#define R_AARCH64_GOTREL64 307 -#define R_AARCH64_GOTREL32 308 -#define R_AARCH64_GOT_LD_PREL19 309 -#define R_AARCH64_LD64_GOTOFF_LO15 310 -#define R_AARCH64_ADR_GOT_PAGE 311 -#define R_AARCH64_LD64_GOT_LO12_NC 312 -#define R_AARCH64_LD64_GOTPAGE_LO15 313 -#define R_AARCH64_TLSGD_ADR_PREL21 512 -#define R_AARCH64_TLSGD_ADR_PAGE21 513 -#define R_AARCH64_TLSGD_ADD_LO12_NC 514 -#define R_AARCH64_TLSGD_MOVW_G1 515 -#define R_AARCH64_TLSGD_MOVW_G0_NC 516 -#define R_AARCH64_TLSLD_ADR_PREL21 517 -#define R_AARCH64_TLSLD_ADR_PAGE21 518 -#define R_AARCH64_TLSLD_ADD_LO12_NC 519 -#define R_AARCH64_TLSLD_MOVW_G1 520 -#define R_AARCH64_TLSLD_MOVW_G0_NC 521 -#define R_AARCH64_TLSLD_LD_PREL19 522 -#define R_AARCH64_TLSLD_MOVW_DTPREL_G2 523 -#define R_AARCH64_TLSLD_MOVW_DTPREL_G1 524 -#define R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC 525 -#define R_AARCH64_TLSLD_MOVW_DTPREL_G0 526 -#define R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC 527 -#define R_AARCH64_TLSLD_ADD_DTPREL_HI12 528 -#define R_AARCH64_TLSLD_ADD_DTPREL_LO12 529 -#define R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC 530 -#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12 531 -#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC 532 -#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12 533 -#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC 534 -#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12 535 -#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC 536 -#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12 537 -#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC 538 -#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 539 -#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC 540 -#define R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 541 -#define R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC 542 -#define R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 543 -#define R_AARCH64_TLSLE_MOVW_TPREL_G2 544 -#define R_AARCH64_TLSLE_MOVW_TPREL_G1 545 -#define R_AARCH64_TLSLE_MOVW_TPREL_G1_NC 546 -#define R_AARCH64_TLSLE_MOVW_TPREL_G0 547 -#define R_AARCH64_TLSLE_MOVW_TPREL_G0_NC 548 -#define R_AARCH64_TLSLE_ADD_TPREL_HI12 549 -#define R_AARCH64_TLSLE_ADD_TPREL_LO12 550 -#define R_AARCH64_TLSLE_ADD_TPREL_LO12_NC 551 -#define R_AARCH64_TLSLE_LDST8_TPREL_LO12 552 -#define R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC 553 -#define R_AARCH64_TLSLE_LDST16_TPREL_LO12 554 -#define R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC 555 -#define R_AARCH64_TLSLE_LDST32_TPREL_LO12 556 -#define R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC 557 -#define R_AARCH64_TLSLE_LDST64_TPREL_LO12 558 -#define R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC 559 -#define R_AARCH64_TLSDESC_LD_PREL19 560 -#define R_AARCH64_TLSDESC_ADR_PREL21 561 -#define R_AARCH64_TLSDESC_ADR_PAGE21 562 -#define R_AARCH64_TLSDESC_LD64_LO12 563 -#define R_AARCH64_TLSDESC_ADD_LO12 564 -#define R_AARCH64_TLSDESC_OFF_G1 565 -#define R_AARCH64_TLSDESC_OFF_G0_NC 566 -#define R_AARCH64_TLSDESC_LDR 567 -#define R_AARCH64_TLSDESC_ADD 568 -#define R_AARCH64_TLSDESC_CALL 569 -#define R_AARCH64_TLSLE_LDST128_TPREL_LO12 570 -#define R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC 571 -#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12 572 -#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC 573 -#define R_AARCH64_COPY 1024 -#define R_AARCH64_GLOB_DAT 1025 -#define R_AARCH64_JUMP_SLOT 1026 -#define R_AARCH64_RELATIVE 1027 -#define R_AARCH64_TLS_DTPMOD 1028 -#define R_AARCH64_TLS_DTPMOD64 1028 -#define R_AARCH64_TLS_DTPREL 1029 -#define R_AARCH64_TLS_DTPREL64 1029 -#define R_AARCH64_TLS_TPREL 1030 -#define R_AARCH64_TLS_TPREL64 1030 -#define R_AARCH64_TLSDESC 1031 - - -#define R_ARM_NONE 0 -#define R_ARM_PC24 1 -#define R_ARM_ABS32 2 -#define R_ARM_REL32 3 -#define R_ARM_PC13 4 -#define R_ARM_ABS16 5 -#define R_ARM_ABS12 6 -#define R_ARM_THM_ABS5 7 -#define R_ARM_ABS8 8 -#define R_ARM_SBREL32 9 -#define R_ARM_THM_PC22 10 -#define R_ARM_THM_PC8 11 -#define R_ARM_AMP_VCALL9 12 -#define R_ARM_TLS_DESC 13 -#define R_ARM_THM_SWI8 14 -#define R_ARM_XPC25 15 -#define R_ARM_THM_XPC22 16 -#define R_ARM_TLS_DTPMOD32 17 -#define R_ARM_TLS_DTPOFF32 18 -#define R_ARM_TLS_TPOFF32 19 -#define R_ARM_COPY 20 -#define R_ARM_GLOB_DAT 21 -#define R_ARM_JUMP_SLOT 22 -#define R_ARM_RELATIVE 23 -#define R_ARM_GOTOFF 24 -#define R_ARM_GOTPC 25 -#define R_ARM_GOT32 26 -#define R_ARM_PLT32 27 -#define R_ARM_CALL 28 -#define R_ARM_JUMP24 29 -#define R_ARM_THM_JUMP24 30 -#define R_ARM_BASE_ABS 31 -#define R_ARM_ALU_PCREL_7_0 32 -#define R_ARM_ALU_PCREL_15_8 33 -#define R_ARM_ALU_PCREL_23_15 34 -#define R_ARM_LDR_SBREL_11_0 35 -#define R_ARM_ALU_SBREL_19_12 36 -#define R_ARM_ALU_SBREL_27_20 37 -#define R_ARM_TARGET1 38 -#define R_ARM_SBREL31 39 -#define R_ARM_V4BX 40 -#define R_ARM_TARGET2 41 -#define R_ARM_PREL31 42 -#define R_ARM_MOVW_ABS_NC 43 -#define R_ARM_MOVT_ABS 44 -#define R_ARM_MOVW_PREL_NC 45 -#define R_ARM_MOVT_PREL 46 -#define R_ARM_THM_MOVW_ABS_NC 47 -#define R_ARM_THM_MOVT_ABS 48 -#define R_ARM_THM_MOVW_PREL_NC 49 -#define R_ARM_THM_MOVT_PREL 50 -#define R_ARM_THM_JUMP19 51 -#define R_ARM_THM_JUMP6 52 -#define R_ARM_THM_ALU_PREL_11_0 53 -#define R_ARM_THM_PC12 54 -#define R_ARM_ABS32_NOI 55 -#define R_ARM_REL32_NOI 56 -#define R_ARM_ALU_PC_G0_NC 57 -#define R_ARM_ALU_PC_G0 58 -#define R_ARM_ALU_PC_G1_NC 59 -#define R_ARM_ALU_PC_G1 60 -#define R_ARM_ALU_PC_G2 61 -#define R_ARM_LDR_PC_G1 62 -#define R_ARM_LDR_PC_G2 63 -#define R_ARM_LDRS_PC_G0 64 -#define R_ARM_LDRS_PC_G1 65 -#define R_ARM_LDRS_PC_G2 66 -#define R_ARM_LDC_PC_G0 67 -#define R_ARM_LDC_PC_G1 68 -#define R_ARM_LDC_PC_G2 69 -#define R_ARM_ALU_SB_G0_NC 70 -#define R_ARM_ALU_SB_G0 71 -#define R_ARM_ALU_SB_G1_NC 72 -#define R_ARM_ALU_SB_G1 73 -#define R_ARM_ALU_SB_G2 74 -#define R_ARM_LDR_SB_G0 75 -#define R_ARM_LDR_SB_G1 76 -#define R_ARM_LDR_SB_G2 77 -#define R_ARM_LDRS_SB_G0 78 -#define R_ARM_LDRS_SB_G1 79 -#define R_ARM_LDRS_SB_G2 80 -#define R_ARM_LDC_SB_G0 81 -#define R_ARM_LDC_SB_G1 82 -#define R_ARM_LDC_SB_G2 83 -#define R_ARM_MOVW_BREL_NC 84 -#define R_ARM_MOVT_BREL 85 -#define R_ARM_MOVW_BREL 86 -#define R_ARM_THM_MOVW_BREL_NC 87 -#define R_ARM_THM_MOVT_BREL 88 -#define R_ARM_THM_MOVW_BREL 89 -#define R_ARM_TLS_GOTDESC 90 -#define R_ARM_TLS_CALL 91 -#define R_ARM_TLS_DESCSEQ 92 -#define R_ARM_THM_TLS_CALL 93 -#define R_ARM_PLT32_ABS 94 -#define R_ARM_GOT_ABS 95 -#define R_ARM_GOT_PREL 96 -#define R_ARM_GOT_BREL12 97 -#define R_ARM_GOTOFF12 98 -#define R_ARM_GOTRELAX 99 -#define R_ARM_GNU_VTENTRY 100 -#define R_ARM_GNU_VTINHERIT 101 -#define R_ARM_THM_PC11 102 -#define R_ARM_THM_PC9 103 -#define R_ARM_TLS_GD32 104 - -#define R_ARM_TLS_LDM32 105 - -#define R_ARM_TLS_LDO32 106 - -#define R_ARM_TLS_IE32 107 - -#define R_ARM_TLS_LE32 108 -#define R_ARM_TLS_LDO12 109 -#define R_ARM_TLS_LE12 110 -#define R_ARM_TLS_IE12GP 111 -#define R_ARM_ME_TOO 128 -#define R_ARM_THM_TLS_DESCSEQ 129 -#define R_ARM_THM_TLS_DESCSEQ16 129 -#define R_ARM_THM_TLS_DESCSEQ32 130 -#define R_ARM_THM_GOT_BREL12 131 -#define R_ARM_IRELATIVE 160 -#define R_ARM_RXPC25 249 -#define R_ARM_RSBREL32 250 -#define R_ARM_THM_RPC22 251 -#define R_ARM_RREL32 252 -#define R_ARM_RABS22 253 -#define R_ARM_RPC24 254 -#define R_ARM_RBASE 255 - -#define R_ARM_NUM 256 - - - - -#define EF_IA_64_MASKOS 0x0000000f -#define EF_IA_64_ABI64 0x00000010 -#define EF_IA_64_ARCH 0xff000000 - - -#define PT_IA_64_ARCHEXT (PT_LOPROC + 0) -#define PT_IA_64_UNWIND (PT_LOPROC + 1) -#define PT_IA_64_HP_OPT_ANOT (PT_LOOS + 0x12) -#define PT_IA_64_HP_HSL_ANOT (PT_LOOS + 0x13) -#define PT_IA_64_HP_STACK (PT_LOOS + 0x14) - - -#define PF_IA_64_NORECOV 0x80000000 - - -#define SHT_IA_64_EXT (SHT_LOPROC + 0) -#define SHT_IA_64_UNWIND (SHT_LOPROC + 1) - - -#define SHF_IA_64_SHORT 0x10000000 -#define SHF_IA_64_NORECOV 0x20000000 - - -#define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0) -#define DT_IA_64_NUM 1 - - -#define R_IA64_NONE 0x00 -#define R_IA64_IMM14 0x21 -#define R_IA64_IMM22 0x22 -#define R_IA64_IMM64 0x23 -#define R_IA64_DIR32MSB 0x24 -#define R_IA64_DIR32LSB 0x25 -#define R_IA64_DIR64MSB 0x26 -#define R_IA64_DIR64LSB 0x27 -#define R_IA64_GPREL22 0x2a -#define R_IA64_GPREL64I 0x2b -#define R_IA64_GPREL32MSB 0x2c -#define R_IA64_GPREL32LSB 0x2d -#define R_IA64_GPREL64MSB 0x2e -#define R_IA64_GPREL64LSB 0x2f -#define R_IA64_LTOFF22 0x32 -#define R_IA64_LTOFF64I 0x33 -#define R_IA64_PLTOFF22 0x3a -#define R_IA64_PLTOFF64I 0x3b -#define R_IA64_PLTOFF64MSB 0x3e -#define R_IA64_PLTOFF64LSB 0x3f -#define R_IA64_FPTR64I 0x43 -#define R_IA64_FPTR32MSB 0x44 -#define R_IA64_FPTR32LSB 0x45 -#define R_IA64_FPTR64MSB 0x46 -#define R_IA64_FPTR64LSB 0x47 -#define R_IA64_PCREL60B 0x48 -#define R_IA64_PCREL21B 0x49 -#define R_IA64_PCREL21M 0x4a -#define R_IA64_PCREL21F 0x4b -#define R_IA64_PCREL32MSB 0x4c -#define R_IA64_PCREL32LSB 0x4d -#define R_IA64_PCREL64MSB 0x4e -#define R_IA64_PCREL64LSB 0x4f -#define R_IA64_LTOFF_FPTR22 0x52 -#define R_IA64_LTOFF_FPTR64I 0x53 -#define R_IA64_LTOFF_FPTR32MSB 0x54 -#define R_IA64_LTOFF_FPTR32LSB 0x55 -#define R_IA64_LTOFF_FPTR64MSB 0x56 -#define R_IA64_LTOFF_FPTR64LSB 0x57 -#define R_IA64_SEGREL32MSB 0x5c -#define R_IA64_SEGREL32LSB 0x5d -#define R_IA64_SEGREL64MSB 0x5e -#define R_IA64_SEGREL64LSB 0x5f -#define R_IA64_SECREL32MSB 0x64 -#define R_IA64_SECREL32LSB 0x65 -#define R_IA64_SECREL64MSB 0x66 -#define R_IA64_SECREL64LSB 0x67 -#define R_IA64_REL32MSB 0x6c -#define R_IA64_REL32LSB 0x6d -#define R_IA64_REL64MSB 0x6e -#define R_IA64_REL64LSB 0x6f -#define R_IA64_LTV32MSB 0x74 -#define R_IA64_LTV32LSB 0x75 -#define R_IA64_LTV64MSB 0x76 -#define R_IA64_LTV64LSB 0x77 -#define R_IA64_PCREL21BI 0x79 -#define R_IA64_PCREL22 0x7a -#define R_IA64_PCREL64I 0x7b -#define R_IA64_IPLTMSB 0x80 -#define R_IA64_IPLTLSB 0x81 -#define R_IA64_COPY 0x84 -#define R_IA64_SUB 0x85 -#define R_IA64_LTOFF22X 0x86 -#define R_IA64_LDXMOV 0x87 -#define R_IA64_TPREL14 0x91 -#define R_IA64_TPREL22 0x92 -#define R_IA64_TPREL64I 0x93 -#define R_IA64_TPREL64MSB 0x96 -#define R_IA64_TPREL64LSB 0x97 -#define R_IA64_LTOFF_TPREL22 0x9a -#define R_IA64_DTPMOD64MSB 0xa6 -#define R_IA64_DTPMOD64LSB 0xa7 -#define R_IA64_LTOFF_DTPMOD22 0xaa -#define R_IA64_DTPREL14 0xb1 -#define R_IA64_DTPREL22 0xb2 -#define R_IA64_DTPREL64I 0xb3 -#define R_IA64_DTPREL32MSB 0xb4 -#define R_IA64_DTPREL32LSB 0xb5 -#define R_IA64_DTPREL64MSB 0xb6 -#define R_IA64_DTPREL64LSB 0xb7 -#define R_IA64_LTOFF_DTPREL22 0xba - - -#define EF_SH_MACH_MASK 0x1f -#define EF_SH_UNKNOWN 0x0 -#define EF_SH1 0x1 -#define EF_SH2 0x2 -#define EF_SH3 0x3 -#define EF_SH_DSP 0x4 -#define EF_SH3_DSP 0x5 -#define EF_SH4AL_DSP 0x6 -#define EF_SH3E 0x8 -#define EF_SH4 0x9 -#define EF_SH2E 0xb -#define EF_SH4A 0xc -#define EF_SH2A 0xd -#define EF_SH4_NOFPU 0x10 -#define EF_SH4A_NOFPU 0x11 -#define EF_SH4_NOMMU_NOFPU 0x12 -#define EF_SH2A_NOFPU 0x13 -#define EF_SH3_NOMMU 0x14 -#define EF_SH2A_SH4_NOFPU 0x15 -#define EF_SH2A_SH3_NOFPU 0x16 -#define EF_SH2A_SH4 0x17 -#define EF_SH2A_SH3E 0x18 - -#define R_SH_NONE 0 -#define R_SH_DIR32 1 -#define R_SH_REL32 2 -#define R_SH_DIR8WPN 3 -#define R_SH_IND12W 4 -#define R_SH_DIR8WPL 5 -#define R_SH_DIR8WPZ 6 -#define R_SH_DIR8BP 7 -#define R_SH_DIR8W 8 -#define R_SH_DIR8L 9 -#define R_SH_SWITCH16 25 -#define R_SH_SWITCH32 26 -#define R_SH_USES 27 -#define R_SH_COUNT 28 -#define R_SH_ALIGN 29 -#define R_SH_CODE 30 -#define R_SH_DATA 31 -#define R_SH_LABEL 32 -#define R_SH_SWITCH8 33 -#define R_SH_GNU_VTINHERIT 34 -#define R_SH_GNU_VTENTRY 35 -#define R_SH_TLS_GD_32 144 -#define R_SH_TLS_LD_32 145 -#define R_SH_TLS_LDO_32 146 -#define R_SH_TLS_IE_32 147 -#define R_SH_TLS_LE_32 148 -#define R_SH_TLS_DTPMOD32 149 -#define R_SH_TLS_DTPOFF32 150 -#define R_SH_TLS_TPOFF32 151 -#define R_SH_GOT32 160 -#define R_SH_PLT32 161 -#define R_SH_COPY 162 -#define R_SH_GLOB_DAT 163 -#define R_SH_JMP_SLOT 164 -#define R_SH_RELATIVE 165 -#define R_SH_GOTOFF 166 -#define R_SH_GOTPC 167 -#define R_SH_GOT20 201 -#define R_SH_GOTOFF20 202 -#define R_SH_GOTFUNCDESC 203 -#define R_SH_GOTFUNCDEST20 204 -#define R_SH_GOTOFFFUNCDESC 205 -#define R_SH_GOTOFFFUNCDEST20 206 -#define R_SH_FUNCDESC 207 -#define R_SH_FUNCDESC_VALUE 208 - -#define R_SH_NUM 256 - - - -#define R_390_NONE 0 -#define R_390_8 1 -#define R_390_12 2 -#define R_390_16 3 -#define R_390_32 4 -#define R_390_PC32 5 -#define R_390_GOT12 6 -#define R_390_GOT32 7 -#define R_390_PLT32 8 -#define R_390_COPY 9 -#define R_390_GLOB_DAT 10 -#define R_390_JMP_SLOT 11 -#define R_390_RELATIVE 12 -#define R_390_GOTOFF32 13 -#define R_390_GOTPC 14 -#define R_390_GOT16 15 -#define R_390_PC16 16 -#define R_390_PC16DBL 17 -#define R_390_PLT16DBL 18 -#define R_390_PC32DBL 19 -#define R_390_PLT32DBL 20 -#define R_390_GOTPCDBL 21 -#define R_390_64 22 -#define R_390_PC64 23 -#define R_390_GOT64 24 -#define R_390_PLT64 25 -#define R_390_GOTENT 26 -#define R_390_GOTOFF16 27 -#define R_390_GOTOFF64 28 -#define R_390_GOTPLT12 29 -#define R_390_GOTPLT16 30 -#define R_390_GOTPLT32 31 -#define R_390_GOTPLT64 32 -#define R_390_GOTPLTENT 33 -#define R_390_PLTOFF16 34 -#define R_390_PLTOFF32 35 -#define R_390_PLTOFF64 36 -#define R_390_TLS_LOAD 37 -#define R_390_TLS_GDCALL 38 - -#define R_390_TLS_LDCALL 39 - -#define R_390_TLS_GD32 40 - -#define R_390_TLS_GD64 41 - -#define R_390_TLS_GOTIE12 42 - -#define R_390_TLS_GOTIE32 43 - -#define R_390_TLS_GOTIE64 44 - -#define R_390_TLS_LDM32 45 - -#define R_390_TLS_LDM64 46 - -#define R_390_TLS_IE32 47 - -#define R_390_TLS_IE64 48 - -#define R_390_TLS_IEENT 49 - -#define R_390_TLS_LE32 50 - -#define R_390_TLS_LE64 51 - -#define R_390_TLS_LDO32 52 - -#define R_390_TLS_LDO64 53 - -#define R_390_TLS_DTPMOD 54 -#define R_390_TLS_DTPOFF 55 -#define R_390_TLS_TPOFF 56 - -#define R_390_20 57 -#define R_390_GOT20 58 -#define R_390_GOTPLT20 59 -#define R_390_TLS_GOTIE20 60 - - -#define R_390_NUM 61 - - - -#define R_CRIS_NONE 0 -#define R_CRIS_8 1 -#define R_CRIS_16 2 -#define R_CRIS_32 3 -#define R_CRIS_8_PCREL 4 -#define R_CRIS_16_PCREL 5 -#define R_CRIS_32_PCREL 6 -#define R_CRIS_GNU_VTINHERIT 7 -#define R_CRIS_GNU_VTENTRY 8 -#define R_CRIS_COPY 9 -#define R_CRIS_GLOB_DAT 10 -#define R_CRIS_JUMP_SLOT 11 -#define R_CRIS_RELATIVE 12 -#define R_CRIS_16_GOT 13 -#define R_CRIS_32_GOT 14 -#define R_CRIS_16_GOTPLT 15 -#define R_CRIS_32_GOTPLT 16 -#define R_CRIS_32_GOTREL 17 -#define R_CRIS_32_PLT_GOTREL 18 -#define R_CRIS_32_PLT_PCREL 19 - -#define R_CRIS_NUM 20 - - - -#define R_X86_64_NONE 0 -#define R_X86_64_64 1 -#define R_X86_64_PC32 2 -#define R_X86_64_GOT32 3 -#define R_X86_64_PLT32 4 -#define R_X86_64_COPY 5 -#define R_X86_64_GLOB_DAT 6 -#define R_X86_64_JUMP_SLOT 7 -#define R_X86_64_RELATIVE 8 -#define R_X86_64_GOTPCREL 9 - -#define R_X86_64_32 10 -#define R_X86_64_32S 11 -#define R_X86_64_16 12 -#define R_X86_64_PC16 13 -#define R_X86_64_8 14 -#define R_X86_64_PC8 15 -#define R_X86_64_DTPMOD64 16 -#define R_X86_64_DTPOFF64 17 -#define R_X86_64_TPOFF64 18 -#define R_X86_64_TLSGD 19 - -#define R_X86_64_TLSLD 20 - -#define R_X86_64_DTPOFF32 21 -#define R_X86_64_GOTTPOFF 22 - -#define R_X86_64_TPOFF32 23 -#define R_X86_64_PC64 24 -#define R_X86_64_GOTOFF64 25 -#define R_X86_64_GOTPC32 26 -#define R_X86_64_GOT64 27 -#define R_X86_64_GOTPCREL64 28 -#define R_X86_64_GOTPC64 29 -#define R_X86_64_GOTPLT64 30 -#define R_X86_64_PLTOFF64 31 -#define R_X86_64_SIZE32 32 -#define R_X86_64_SIZE64 33 - -#define R_X86_64_GOTPC32_TLSDESC 34 -#define R_X86_64_TLSDESC_CALL 35 - -#define R_X86_64_TLSDESC 36 -#define R_X86_64_IRELATIVE 37 -#define R_X86_64_RELATIVE64 38 -#define R_X86_64_GOTPCRELX 41 -#define R_X86_64_REX_GOTPCRELX 42 -#define R_X86_64_NUM 43 - - - -#define R_MN10300_NONE 0 -#define R_MN10300_32 1 -#define R_MN10300_16 2 -#define R_MN10300_8 3 -#define R_MN10300_PCREL32 4 -#define R_MN10300_PCREL16 5 -#define R_MN10300_PCREL8 6 -#define R_MN10300_GNU_VTINHERIT 7 -#define R_MN10300_GNU_VTENTRY 8 -#define R_MN10300_24 9 -#define R_MN10300_GOTPC32 10 -#define R_MN10300_GOTPC16 11 -#define R_MN10300_GOTOFF32 12 -#define R_MN10300_GOTOFF24 13 -#define R_MN10300_GOTOFF16 14 -#define R_MN10300_PLT32 15 -#define R_MN10300_PLT16 16 -#define R_MN10300_GOT32 17 -#define R_MN10300_GOT24 18 -#define R_MN10300_GOT16 19 -#define R_MN10300_COPY 20 -#define R_MN10300_GLOB_DAT 21 -#define R_MN10300_JMP_SLOT 22 -#define R_MN10300_RELATIVE 23 - -#define R_MN10300_NUM 24 - - - -#define R_M32R_NONE 0 -#define R_M32R_16 1 -#define R_M32R_32 2 -#define R_M32R_24 3 -#define R_M32R_10_PCREL 4 -#define R_M32R_18_PCREL 5 -#define R_M32R_26_PCREL 6 -#define R_M32R_HI16_ULO 7 -#define R_M32R_HI16_SLO 8 -#define R_M32R_LO16 9 -#define R_M32R_SDA16 10 -#define R_M32R_GNU_VTINHERIT 11 -#define R_M32R_GNU_VTENTRY 12 - -#define R_M32R_16_RELA 33 -#define R_M32R_32_RELA 34 -#define R_M32R_24_RELA 35 -#define R_M32R_10_PCREL_RELA 36 -#define R_M32R_18_PCREL_RELA 37 -#define R_M32R_26_PCREL_RELA 38 -#define R_M32R_HI16_ULO_RELA 39 -#define R_M32R_HI16_SLO_RELA 40 -#define R_M32R_LO16_RELA 41 -#define R_M32R_SDA16_RELA 42 -#define R_M32R_RELA_GNU_VTINHERIT 43 -#define R_M32R_RELA_GNU_VTENTRY 44 -#define R_M32R_REL32 45 - -#define R_M32R_GOT24 48 -#define R_M32R_26_PLTREL 49 -#define R_M32R_COPY 50 -#define R_M32R_GLOB_DAT 51 -#define R_M32R_JMP_SLOT 52 -#define R_M32R_RELATIVE 53 -#define R_M32R_GOTOFF 54 -#define R_M32R_GOTPC24 55 -#define R_M32R_GOT16_HI_ULO 56 - -#define R_M32R_GOT16_HI_SLO 57 - -#define R_M32R_GOT16_LO 58 -#define R_M32R_GOTPC_HI_ULO 59 - -#define R_M32R_GOTPC_HI_SLO 60 - -#define R_M32R_GOTPC_LO 61 - -#define R_M32R_GOTOFF_HI_ULO 62 - -#define R_M32R_GOTOFF_HI_SLO 63 - -#define R_M32R_GOTOFF_LO 64 -#define R_M32R_NUM 256 - -#define R_MICROBLAZE_NONE 0 -#define R_MICROBLAZE_32 1 -#define R_MICROBLAZE_32_PCREL 2 -#define R_MICROBLAZE_64_PCREL 3 -#define R_MICROBLAZE_32_PCREL_LO 4 -#define R_MICROBLAZE_64 5 -#define R_MICROBLAZE_32_LO 6 -#define R_MICROBLAZE_SRO32 7 -#define R_MICROBLAZE_SRW32 8 -#define R_MICROBLAZE_64_NONE 9 -#define R_MICROBLAZE_32_SYM_OP_SYM 10 -#define R_MICROBLAZE_GNU_VTINHERIT 11 -#define R_MICROBLAZE_GNU_VTENTRY 12 -#define R_MICROBLAZE_GOTPC_64 13 -#define R_MICROBLAZE_GOT_64 14 -#define R_MICROBLAZE_PLT_64 15 -#define R_MICROBLAZE_REL 16 -#define R_MICROBLAZE_JUMP_SLOT 17 -#define R_MICROBLAZE_GLOB_DAT 18 -#define R_MICROBLAZE_GOTOFF_64 19 -#define R_MICROBLAZE_GOTOFF_32 20 -#define R_MICROBLAZE_COPY 21 -#define R_MICROBLAZE_TLS 22 -#define R_MICROBLAZE_TLSGD 23 -#define R_MICROBLAZE_TLSLD 24 -#define R_MICROBLAZE_TLSDTPMOD32 25 -#define R_MICROBLAZE_TLSDTPREL32 26 -#define R_MICROBLAZE_TLSDTPREL64 27 -#define R_MICROBLAZE_TLSGOTTPREL32 28 -#define R_MICROBLAZE_TLSTPREL32 29 - -#define DT_NIOS2_GP 0x70000002 - -#define R_NIOS2_NONE 0 -#define R_NIOS2_S16 1 -#define R_NIOS2_U16 2 -#define R_NIOS2_PCREL16 3 -#define R_NIOS2_CALL26 4 -#define R_NIOS2_IMM5 5 -#define R_NIOS2_CACHE_OPX 6 -#define R_NIOS2_IMM6 7 -#define R_NIOS2_IMM8 8 -#define R_NIOS2_HI16 9 -#define R_NIOS2_LO16 10 -#define R_NIOS2_HIADJ16 11 -#define R_NIOS2_BFD_RELOC_32 12 -#define R_NIOS2_BFD_RELOC_16 13 -#define R_NIOS2_BFD_RELOC_8 14 -#define R_NIOS2_GPREL 15 -#define R_NIOS2_GNU_VTINHERIT 16 -#define R_NIOS2_GNU_VTENTRY 17 -#define R_NIOS2_UJMP 18 -#define R_NIOS2_CJMP 19 -#define R_NIOS2_CALLR 20 -#define R_NIOS2_ALIGN 21 -#define R_NIOS2_GOT16 22 -#define R_NIOS2_CALL16 23 -#define R_NIOS2_GOTOFF_LO 24 -#define R_NIOS2_GOTOFF_HA 25 -#define R_NIOS2_PCREL_LO 26 -#define R_NIOS2_PCREL_HA 27 -#define R_NIOS2_TLS_GD16 28 -#define R_NIOS2_TLS_LDM16 29 -#define R_NIOS2_TLS_LDO16 30 -#define R_NIOS2_TLS_IE16 31 -#define R_NIOS2_TLS_LE16 32 -#define R_NIOS2_TLS_DTPMOD 33 -#define R_NIOS2_TLS_DTPREL 34 -#define R_NIOS2_TLS_TPREL 35 -#define R_NIOS2_COPY 36 -#define R_NIOS2_GLOB_DAT 37 -#define R_NIOS2_JUMP_SLOT 38 -#define R_NIOS2_RELATIVE 39 -#define R_NIOS2_GOTOFF 40 -#define R_NIOS2_CALL26_NOAT 41 -#define R_NIOS2_GOT_LO 42 -#define R_NIOS2_GOT_HA 43 -#define R_NIOS2_CALL_LO 44 -#define R_NIOS2_CALL_HA 45 - -#define R_OR1K_NONE 0 -#define R_OR1K_32 1 -#define R_OR1K_16 2 -#define R_OR1K_8 3 -#define R_OR1K_LO_16_IN_INSN 4 -#define R_OR1K_HI_16_IN_INSN 5 -#define R_OR1K_INSN_REL_26 6 -#define R_OR1K_GNU_VTENTRY 7 -#define R_OR1K_GNU_VTINHERIT 8 -#define R_OR1K_32_PCREL 9 -#define R_OR1K_16_PCREL 10 -#define R_OR1K_8_PCREL 11 -#define R_OR1K_GOTPC_HI16 12 -#define R_OR1K_GOTPC_LO16 13 -#define R_OR1K_GOT16 14 -#define R_OR1K_PLT26 15 -#define R_OR1K_GOTOFF_HI16 16 -#define R_OR1K_GOTOFF_LO16 17 -#define R_OR1K_COPY 18 -#define R_OR1K_GLOB_DAT 19 -#define R_OR1K_JMP_SLOT 20 -#define R_OR1K_RELATIVE 21 -#define R_OR1K_TLS_GD_HI16 22 -#define R_OR1K_TLS_GD_LO16 23 -#define R_OR1K_TLS_LDM_HI16 24 -#define R_OR1K_TLS_LDM_LO16 25 -#define R_OR1K_TLS_LDO_HI16 26 -#define R_OR1K_TLS_LDO_LO16 27 -#define R_OR1K_TLS_IE_HI16 28 -#define R_OR1K_TLS_IE_LO16 29 -#define R_OR1K_TLS_LE_HI16 30 -#define R_OR1K_TLS_LE_LO16 31 -#define R_OR1K_TLS_TPOFF 32 -#define R_OR1K_TLS_DTPOFF 33 -#define R_OR1K_TLS_DTPMOD 34 - -#define R_BPF_NONE 0 -#define R_BPF_MAP_FD 1 - -#define R_RISCV_NONE 0 -#define R_RISCV_32 1 -#define R_RISCV_64 2 -#define R_RISCV_RELATIVE 3 -#define R_RISCV_COPY 4 -#define R_RISCV_JUMP_SLOT 5 -#define R_RISCV_TLS_DTPMOD32 6 -#define R_RISCV_TLS_DTPMOD64 7 -#define R_RISCV_TLS_DTPREL32 8 -#define R_RISCV_TLS_DTPREL64 9 -#define R_RISCV_TLS_TPREL32 10 -#define R_RISCV_TLS_TPREL64 11 - -#define R_RISCV_BRANCH 16 -#define R_RISCV_JAL 17 -#define R_RISCV_CALL 18 -#define R_RISCV_CALL_PLT 19 -#define R_RISCV_GOT_HI20 20 -#define R_RISCV_TLS_GOT_HI20 21 -#define R_RISCV_TLS_GD_HI20 22 -#define R_RISCV_PCREL_HI20 23 -#define R_RISCV_PCREL_LO12_I 24 -#define R_RISCV_PCREL_LO12_S 25 -#define R_RISCV_HI20 26 -#define R_RISCV_LO12_I 27 -#define R_RISCV_LO12_S 28 -#define R_RISCV_TPREL_HI20 29 -#define R_RISCV_TPREL_LO12_I 30 -#define R_RISCV_TPREL_LO12_S 31 -#define R_RISCV_TPREL_ADD 32 -#define R_RISCV_ADD8 33 -#define R_RISCV_ADD16 34 -#define R_RISCV_ADD32 35 -#define R_RISCV_ADD64 36 -#define R_RISCV_SUB8 37 -#define R_RISCV_SUB16 38 -#define R_RISCV_SUB32 39 -#define R_RISCV_SUB64 40 -#define R_RISCV_GNU_VTINHERIT 41 -#define R_RISCV_GNU_VTENTRY 42 -#define R_RISCV_ALIGN 43 -#define R_RISCV_RVC_BRANCH 44 -#define R_RISCV_RVC_JUMP 45 -#define R_RISCV_RVC_LUI 46 -#define R_RISCV_GPREL_I 47 -#define R_RISCV_GPREL_S 48 -#define R_RISCV_TPREL_I 49 -#define R_RISCV_TPREL_S 50 -#define R_RISCV_RELAX 51 -#define R_RISCV_SUB6 52 -#define R_RISCV_SET6 53 -#define R_RISCV_SET8 54 -#define R_RISCV_SET16 55 -#define R_RISCV_SET32 56 -#define R_RISCV_32_PCREL 57 - -#ifdef __cplusplus -} -#endif - - -#endif \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/netinet/tcp.h b/lib/libc/include/riscv64-linux-musl/netinet/tcp.h deleted file mode 100644 index ba72214424..0000000000 --- a/lib/libc/include/riscv64-linux-musl/netinet/tcp.h +++ /dev/null @@ -1,253 +0,0 @@ -#ifndef _NETINET_TCP_H -#define _NETINET_TCP_H - -#include - -#define TCP_NODELAY 1 -#define TCP_MAXSEG 2 -#define TCP_CORK 3 -#define TCP_KEEPIDLE 4 -#define TCP_KEEPINTVL 5 -#define TCP_KEEPCNT 6 -#define TCP_SYNCNT 7 -#define TCP_LINGER2 8 -#define TCP_DEFER_ACCEPT 9 -#define TCP_WINDOW_CLAMP 10 -#define TCP_INFO 11 -#define TCP_QUICKACK 12 -#define TCP_CONGESTION 13 -#define TCP_MD5SIG 14 -#define TCP_THIN_LINEAR_TIMEOUTS 16 -#define TCP_THIN_DUPACK 17 -#define TCP_USER_TIMEOUT 18 -#define TCP_REPAIR 19 -#define TCP_REPAIR_QUEUE 20 -#define TCP_QUEUE_SEQ 21 -#define TCP_REPAIR_OPTIONS 22 -#define TCP_FASTOPEN 23 -#define TCP_TIMESTAMP 24 -#define TCP_NOTSENT_LOWAT 25 -#define TCP_CC_INFO 26 -#define TCP_SAVE_SYN 27 -#define TCP_SAVED_SYN 28 -#define TCP_REPAIR_WINDOW 29 -#define TCP_FASTOPEN_CONNECT 30 -#define TCP_ULP 31 -#define TCP_MD5SIG_EXT 32 -#define TCP_FASTOPEN_KEY 33 -#define TCP_FASTOPEN_NO_COOKIE 34 - -#define TCP_ESTABLISHED 1 -#define TCP_SYN_SENT 2 -#define TCP_SYN_RECV 3 -#define TCP_FIN_WAIT1 4 -#define TCP_FIN_WAIT2 5 -#define TCP_TIME_WAIT 6 -#define TCP_CLOSE 7 -#define TCP_CLOSE_WAIT 8 -#define TCP_LAST_ACK 9 -#define TCP_LISTEN 10 -#define TCP_CLOSING 11 - -enum { - TCP_NLA_PAD, - TCP_NLA_BUSY, - TCP_NLA_RWND_LIMITED, - TCP_NLA_SNDBUF_LIMITED, - TCP_NLA_DATA_SEGS_OUT, - TCP_NLA_TOTAL_RETRANS, - TCP_NLA_PACING_RATE, - TCP_NLA_DELIVERY_RATE, - TCP_NLA_SND_CWND, - TCP_NLA_REORDERING, - TCP_NLA_MIN_RTT, - TCP_NLA_RECUR_RETRANS, - TCP_NLA_DELIVERY_RATE_APP_LMT, - TCP_NLA_SNDQ_SIZE, - TCP_NLA_CA_STATE, - TCP_NLA_SND_SSTHRESH, -}; - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define TCPOPT_EOL 0 -#define TCPOPT_NOP 1 -#define TCPOPT_MAXSEG 2 -#define TCPOPT_WINDOW 3 -#define TCPOPT_SACK_PERMITTED 4 -#define TCPOPT_SACK 5 -#define TCPOPT_TIMESTAMP 8 -#define TCPOLEN_SACK_PERMITTED 2 -#define TCPOLEN_WINDOW 3 -#define TCPOLEN_MAXSEG 4 -#define TCPOLEN_TIMESTAMP 10 - -#define SOL_TCP 6 - -#include -#include -#include -#include - -typedef uint32_t tcp_seq; - -#define TH_FIN 0x01 -#define TH_SYN 0x02 -#define TH_RST 0x04 -#define TH_PUSH 0x08 -#define TH_ACK 0x10 -#define TH_URG 0x20 - -struct tcphdr { -#ifdef _GNU_SOURCE -#ifdef __GNUC__ - __extension__ -#endif - union { struct { - - uint16_t source; - uint16_t dest; - uint32_t seq; - uint32_t ack_seq; -#if __BYTE_ORDER == __LITTLE_ENDIAN - uint16_t res1:4; - uint16_t doff:4; - uint16_t fin:1; - uint16_t syn:1; - uint16_t rst:1; - uint16_t psh:1; - uint16_t ack:1; - uint16_t urg:1; - uint16_t res2:2; -#else - uint16_t doff:4; - uint16_t res1:4; - uint16_t res2:2; - uint16_t urg:1; - uint16_t ack:1; - uint16_t psh:1; - uint16_t rst:1; - uint16_t syn:1; - uint16_t fin:1; -#endif - uint16_t window; - uint16_t check; - uint16_t urg_ptr; - - }; struct { -#endif - - uint16_t th_sport; - uint16_t th_dport; - uint32_t th_seq; - uint32_t th_ack; -#if __BYTE_ORDER == __LITTLE_ENDIAN - uint8_t th_x2:4; - uint8_t th_off:4; -#else - uint8_t th_off:4; - uint8_t th_x2:4; -#endif - uint8_t th_flags; - uint16_t th_win; - uint16_t th_sum; - uint16_t th_urp; - -#ifdef _GNU_SOURCE - }; }; -#endif -}; -#endif - -#ifdef _GNU_SOURCE -#define TCPI_OPT_TIMESTAMPS 1 -#define TCPI_OPT_SACK 2 -#define TCPI_OPT_WSCALE 4 -#define TCPI_OPT_ECN 8 - -#define TCP_CA_Open 0 -#define TCP_CA_Disorder 1 -#define TCP_CA_CWR 2 -#define TCP_CA_Recovery 3 -#define TCP_CA_Loss 4 - -struct tcp_info { - uint8_t tcpi_state; - uint8_t tcpi_ca_state; - uint8_t tcpi_retransmits; - uint8_t tcpi_probes; - uint8_t tcpi_backoff; - uint8_t tcpi_options; - uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; - uint8_t tcpi_delivery_rate_app_limited : 1; - uint32_t tcpi_rto; - uint32_t tcpi_ato; - uint32_t tcpi_snd_mss; - uint32_t tcpi_rcv_mss; - uint32_t tcpi_unacked; - uint32_t tcpi_sacked; - uint32_t tcpi_lost; - uint32_t tcpi_retrans; - uint32_t tcpi_fackets; - uint32_t tcpi_last_data_sent; - uint32_t tcpi_last_ack_sent; - uint32_t tcpi_last_data_recv; - uint32_t tcpi_last_ack_recv; - uint32_t tcpi_pmtu; - uint32_t tcpi_rcv_ssthresh; - uint32_t tcpi_rtt; - uint32_t tcpi_rttvar; - uint32_t tcpi_snd_ssthresh; - uint32_t tcpi_snd_cwnd; - uint32_t tcpi_advmss; - uint32_t tcpi_reordering; - uint32_t tcpi_rcv_rtt; - uint32_t tcpi_rcv_space; - uint32_t tcpi_total_retrans; - uint64_t tcpi_pacing_rate; - uint64_t tcpi_max_pacing_rate; - uint64_t tcpi_bytes_acked; - uint64_t tcpi_bytes_received; - uint32_t tcpi_segs_out; - uint32_t tcpi_segs_in; - uint32_t tcpi_notsent_bytes; - uint32_t tcpi_min_rtt; - uint32_t tcpi_data_segs_in; - uint32_t tcpi_data_segs_out; - uint64_t tcpi_delivery_rate; - uint64_t tcpi_busy_time; - uint64_t tcpi_rwnd_limited; - uint64_t tcpi_sndbuf_limited; -}; - -#define TCP_MD5SIG_MAXKEYLEN 80 - -#define TCP_MD5SIG_FLAG_PREFIX 1 - -struct tcp_md5sig { - struct sockaddr_storage tcpm_addr; - uint8_t tcpm_flags; - uint8_t tcpm_prefixlen; - uint16_t tcpm_keylen; - uint32_t __tcpm_pad; - uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; -}; - -struct tcp_diag_md5sig { - uint8_t tcpm_family; - uint8_t tcpm_prefixlen; - uint16_t tcpm_keylen; - uint32_t tcpm_addr[4]; - uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; -}; - -struct tcp_repair_window { - uint32_t snd_wl1; - uint32_t snd_wnd; - uint32_t max_window; - uint32_t rcv_wnd; - uint32_t rcv_wup; -}; - -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/netinet/udp.h b/lib/libc/include/riscv64-linux-musl/netinet/udp.h deleted file mode 100644 index f175f7447c..0000000000 --- a/lib/libc/include/riscv64-linux-musl/netinet/udp.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef _NETINET_UDP_H -#define _NETINET_UDP_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#ifdef _GNU_SOURCE -#define uh_sport source -#define uh_dport dest -#define uh_ulen len -#define uh_sum check -#endif - -struct udphdr { - uint16_t uh_sport; - uint16_t uh_dport; - uint16_t uh_ulen; - uint16_t uh_sum; -}; - -#define UDP_CORK 1 -#define UDP_ENCAP 100 - -#define UDP_ENCAP_ESPINUDP_NON_IKE 1 -#define UDP_ENCAP_ESPINUDP 2 -#define UDP_ENCAP_L2TPINUDP 3 -#define UDP_ENCAP_GTP0 4 -#define UDP_ENCAP_GTP1U 5 - -#define SOL_UDP 17 - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/signal.h b/lib/libc/include/riscv64-linux-musl/signal.h deleted file mode 100644 index 8e06b90287..0000000000 --- a/lib/libc/include/riscv64-linux-musl/signal.h +++ /dev/null @@ -1,277 +0,0 @@ -#ifndef _SIGNAL_H -#define _SIGNAL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ - || defined(_BSD_SOURCE) - -#ifdef _GNU_SOURCE -#define __ucontext ucontext -#endif - -#define __NEED_size_t -#define __NEED_pid_t -#define __NEED_uid_t -#define __NEED_struct_timespec -#define __NEED_pthread_t -#define __NEED_pthread_attr_t -#define __NEED_time_t -#define __NEED_clock_t -#define __NEED_sigset_t - -#include - -#define SIG_BLOCK 0 -#define SIG_UNBLOCK 1 -#define SIG_SETMASK 2 - -#define SI_ASYNCNL (-60) -#define SI_TKILL (-6) -#define SI_SIGIO (-5) -#define SI_ASYNCIO (-4) -#define SI_MESGQ (-3) -#define SI_TIMER (-2) -#define SI_QUEUE (-1) -#define SI_USER 0 -#define SI_KERNEL 128 - -typedef struct sigaltstack stack_t; - -#endif - -#include - -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ - || defined(_BSD_SOURCE) - -#define SIG_HOLD ((void (*)(int)) 2) - -#define FPE_INTDIV 1 -#define FPE_INTOVF 2 -#define FPE_FLTDIV 3 -#define FPE_FLTOVF 4 -#define FPE_FLTUND 5 -#define FPE_FLTRES 6 -#define FPE_FLTINV 7 -#define FPE_FLTSUB 8 - -#define ILL_ILLOPC 1 -#define ILL_ILLOPN 2 -#define ILL_ILLADR 3 -#define ILL_ILLTRP 4 -#define ILL_PRVOPC 5 -#define ILL_PRVREG 6 -#define ILL_COPROC 7 -#define ILL_BADSTK 8 - -#define SEGV_MAPERR 1 -#define SEGV_ACCERR 2 -#define SEGV_BNDERR 3 -#define SEGV_PKUERR 4 - -#define BUS_ADRALN 1 -#define BUS_ADRERR 2 -#define BUS_OBJERR 3 -#define BUS_MCEERR_AR 4 -#define BUS_MCEERR_AO 5 - -#define CLD_EXITED 1 -#define CLD_KILLED 2 -#define CLD_DUMPED 3 -#define CLD_TRAPPED 4 -#define CLD_STOPPED 5 -#define CLD_CONTINUED 6 - -union sigval { - int sival_int; - void *sival_ptr; -}; - -typedef struct { -#ifdef __SI_SWAP_ERRNO_CODE - int si_signo, si_code, si_errno; -#else - int si_signo, si_errno, si_code; -#endif - union { - char __pad[128 - 2*sizeof(int) - sizeof(long)]; - struct { - union { - struct { - pid_t si_pid; - uid_t si_uid; - } __piduid; - struct { - int si_timerid; - int si_overrun; - } __timer; - } __first; - union { - union sigval si_value; - struct { - int si_status; - clock_t si_utime, si_stime; - } __sigchld; - } __second; - } __si_common; - struct { - void *si_addr; - short si_addr_lsb; - union { - struct { - void *si_lower; - void *si_upper; - } __addr_bnd; - unsigned si_pkey; - } __first; - } __sigfault; - struct { - long si_band; - int si_fd; - } __sigpoll; - struct { - void *si_call_addr; - int si_syscall; - unsigned si_arch; - } __sigsys; - } __si_fields; -} siginfo_t; -#define si_pid __si_fields.__si_common.__first.__piduid.si_pid -#define si_uid __si_fields.__si_common.__first.__piduid.si_uid -#define si_status __si_fields.__si_common.__second.__sigchld.si_status -#define si_utime __si_fields.__si_common.__second.__sigchld.si_utime -#define si_stime __si_fields.__si_common.__second.__sigchld.si_stime -#define si_value __si_fields.__si_common.__second.si_value -#define si_addr __si_fields.__sigfault.si_addr -#define si_addr_lsb __si_fields.__sigfault.si_addr_lsb -#define si_lower __si_fields.__sigfault.__first.__addr_bnd.si_lower -#define si_upper __si_fields.__sigfault.__first.__addr_bnd.si_upper -#define si_pkey __si_fields.__sigfault.__first.si_pkey -#define si_band __si_fields.__sigpoll.si_band -#define si_fd __si_fields.__sigpoll.si_fd -#define si_timerid __si_fields.__si_common.__first.__timer.si_timerid -#define si_overrun __si_fields.__si_common.__first.__timer.si_overrun -#define si_ptr si_value.sival_ptr -#define si_int si_value.sival_int -#define si_call_addr __si_fields.__sigsys.si_call_addr -#define si_syscall __si_fields.__sigsys.si_syscall -#define si_arch __si_fields.__sigsys.si_arch - -struct sigaction { - union { - void (*sa_handler)(int); - void (*sa_sigaction)(int, siginfo_t *, void *); - } __sa_handler; - sigset_t sa_mask; - int sa_flags; - void (*sa_restorer)(void); -}; -#define sa_handler __sa_handler.sa_handler -#define sa_sigaction __sa_handler.sa_sigaction - -struct sigevent { - union sigval sigev_value; - int sigev_signo; - int sigev_notify; - void (*sigev_notify_function)(union sigval); - pthread_attr_t *sigev_notify_attributes; - char __pad[56-3*sizeof(long)]; -}; - -#define SIGEV_SIGNAL 0 -#define SIGEV_NONE 1 -#define SIGEV_THREAD 2 - -int __libc_current_sigrtmin(void); -int __libc_current_sigrtmax(void); - -#define SIGRTMIN (__libc_current_sigrtmin()) -#define SIGRTMAX (__libc_current_sigrtmax()) - -int kill(pid_t, int); - -int sigemptyset(sigset_t *); -int sigfillset(sigset_t *); -int sigaddset(sigset_t *, int); -int sigdelset(sigset_t *, int); -int sigismember(const sigset_t *, int); - -int sigprocmask(int, const sigset_t *__restrict, sigset_t *__restrict); -int sigsuspend(const sigset_t *); -int sigaction(int, const struct sigaction *__restrict, struct sigaction *__restrict); -int sigpending(sigset_t *); -int sigwait(const sigset_t *__restrict, int *__restrict); -int sigwaitinfo(const sigset_t *__restrict, siginfo_t *__restrict); -int sigtimedwait(const sigset_t *__restrict, siginfo_t *__restrict, const struct timespec *__restrict); -int sigqueue(pid_t, int, union sigval); - -int pthread_sigmask(int, const sigset_t *__restrict, sigset_t *__restrict); -int pthread_kill(pthread_t, int); - -void psiginfo(const siginfo_t *, const char *); -void psignal(int, const char *); - -#endif - -#if defined(_XOPEN_SOURCE) || defined(_BSD_SOURCE) || defined(_GNU_SOURCE) -int killpg(pid_t, int); -int sigaltstack(const stack_t *__restrict, stack_t *__restrict); -int sighold(int); -int sigignore(int); -int siginterrupt(int, int); -int sigpause(int); -int sigrelse(int); -void (*sigset(int, void (*)(int)))(int); -#define TRAP_BRKPT 1 -#define TRAP_TRACE 2 -#define TRAP_BRANCH 3 -#define TRAP_HWBKPT 4 -#define POLL_IN 1 -#define POLL_OUT 2 -#define POLL_MSG 3 -#define POLL_ERR 4 -#define POLL_PRI 5 -#define POLL_HUP 6 -#define SS_ONSTACK 1 -#define SS_DISABLE 2 -#define SS_AUTODISARM (1U << 31) -#define SS_FLAG_BITS SS_AUTODISARM -#endif - -#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) -#define NSIG _NSIG -typedef void (*sig_t)(int); -#endif - -#ifdef _GNU_SOURCE -typedef void (*sighandler_t)(int); -void (*bsd_signal(int, void (*)(int)))(int); -int sigisemptyset(const sigset_t *); -int sigorset (sigset_t *, const sigset_t *, const sigset_t *); -int sigandset(sigset_t *, const sigset_t *, const sigset_t *); - -#define SA_NOMASK SA_NODEFER -#define SA_ONESHOT SA_RESETHAND -#endif - -#define SIG_ERR ((void (*)(int))-1) -#define SIG_DFL ((void (*)(int)) 0) -#define SIG_IGN ((void (*)(int)) 1) - -typedef int sig_atomic_t; - -void (*signal(int, void (*)(int)))(int); -int raise(int); - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/sys/signalfd.h b/lib/libc/include/riscv64-linux-musl/sys/signalfd.h deleted file mode 100644 index 95029e47d1..0000000000 --- a/lib/libc/include/riscv64-linux-musl/sys/signalfd.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _SYS_SIGNALFD_H -#define _SYS_SIGNALFD_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#define __NEED_sigset_t - -#include - -#define SFD_CLOEXEC O_CLOEXEC -#define SFD_NONBLOCK O_NONBLOCK - -int signalfd(int, const sigset_t *, int); - -struct signalfd_siginfo { - uint32_t ssi_signo; - int32_t ssi_errno; - int32_t ssi_code; - uint32_t ssi_pid; - uint32_t ssi_uid; - int32_t ssi_fd; - uint32_t ssi_tid; - uint32_t ssi_band; - uint32_t ssi_overrun; - uint32_t ssi_trapno; - int32_t ssi_status; - int32_t ssi_int; - uint64_t ssi_ptr; - uint64_t ssi_utime; - uint64_t ssi_stime; - uint64_t ssi_addr; - uint16_t ssi_addr_lsb; - uint8_t pad[128-12*4-4*8-2]; -}; - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/sys/socket.h b/lib/libc/include/riscv64-linux-musl/sys/socket.h deleted file mode 100644 index 40c7f89e2d..0000000000 --- a/lib/libc/include/riscv64-linux-musl/sys/socket.h +++ /dev/null @@ -1,350 +0,0 @@ -#ifndef _SYS_SOCKET_H -#define _SYS_SOCKET_H -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#define __NEED_socklen_t -#define __NEED_sa_family_t -#define __NEED_size_t -#define __NEED_ssize_t -#define __NEED_uid_t -#define __NEED_pid_t -#define __NEED_gid_t -#define __NEED_struct_iovec - -#include - -#include - -#ifdef _GNU_SOURCE -struct ucred { - pid_t pid; - uid_t uid; - gid_t gid; -}; - -struct mmsghdr { - struct msghdr msg_hdr; - unsigned int msg_len; -}; - -struct timespec; - -int sendmmsg (int, struct mmsghdr *, unsigned int, unsigned int); -int recvmmsg (int, struct mmsghdr *, unsigned int, unsigned int, struct timespec *); -#endif - -struct linger { - int l_onoff; - int l_linger; -}; - -#define SHUT_RD 0 -#define SHUT_WR 1 -#define SHUT_RDWR 2 - -#ifndef SOCK_STREAM -#define SOCK_STREAM 1 -#define SOCK_DGRAM 2 -#endif - -#define SOCK_RAW 3 -#define SOCK_RDM 4 -#define SOCK_SEQPACKET 5 -#define SOCK_DCCP 6 -#define SOCK_PACKET 10 - -#ifndef SOCK_CLOEXEC -#define SOCK_CLOEXEC 02000000 -#define SOCK_NONBLOCK 04000 -#endif - -#define PF_UNSPEC 0 -#define PF_LOCAL 1 -#define PF_UNIX PF_LOCAL -#define PF_FILE PF_LOCAL -#define PF_INET 2 -#define PF_AX25 3 -#define PF_IPX 4 -#define PF_APPLETALK 5 -#define PF_NETROM 6 -#define PF_BRIDGE 7 -#define PF_ATMPVC 8 -#define PF_X25 9 -#define PF_INET6 10 -#define PF_ROSE 11 -#define PF_DECnet 12 -#define PF_NETBEUI 13 -#define PF_SECURITY 14 -#define PF_KEY 15 -#define PF_NETLINK 16 -#define PF_ROUTE PF_NETLINK -#define PF_PACKET 17 -#define PF_ASH 18 -#define PF_ECONET 19 -#define PF_ATMSVC 20 -#define PF_RDS 21 -#define PF_SNA 22 -#define PF_IRDA 23 -#define PF_PPPOX 24 -#define PF_WANPIPE 25 -#define PF_LLC 26 -#define PF_IB 27 -#define PF_MPLS 28 -#define PF_CAN 29 -#define PF_TIPC 30 -#define PF_BLUETOOTH 31 -#define PF_IUCV 32 -#define PF_RXRPC 33 -#define PF_ISDN 34 -#define PF_PHONET 35 -#define PF_IEEE802154 36 -#define PF_CAIF 37 -#define PF_ALG 38 -#define PF_NFC 39 -#define PF_VSOCK 40 -#define PF_KCM 41 -#define PF_QIPCRTR 42 -#define PF_SMC 43 -#define PF_MAX 44 - -#define AF_UNSPEC PF_UNSPEC -#define AF_LOCAL PF_LOCAL -#define AF_UNIX AF_LOCAL -#define AF_FILE AF_LOCAL -#define AF_INET PF_INET -#define AF_AX25 PF_AX25 -#define AF_IPX PF_IPX -#define AF_APPLETALK PF_APPLETALK -#define AF_NETROM PF_NETROM -#define AF_BRIDGE PF_BRIDGE -#define AF_ATMPVC PF_ATMPVC -#define AF_X25 PF_X25 -#define AF_INET6 PF_INET6 -#define AF_ROSE PF_ROSE -#define AF_DECnet PF_DECnet -#define AF_NETBEUI PF_NETBEUI -#define AF_SECURITY PF_SECURITY -#define AF_KEY PF_KEY -#define AF_NETLINK PF_NETLINK -#define AF_ROUTE PF_ROUTE -#define AF_PACKET PF_PACKET -#define AF_ASH PF_ASH -#define AF_ECONET PF_ECONET -#define AF_ATMSVC PF_ATMSVC -#define AF_RDS PF_RDS -#define AF_SNA PF_SNA -#define AF_IRDA PF_IRDA -#define AF_PPPOX PF_PPPOX -#define AF_WANPIPE PF_WANPIPE -#define AF_LLC PF_LLC -#define AF_IB PF_IB -#define AF_MPLS PF_MPLS -#define AF_CAN PF_CAN -#define AF_TIPC PF_TIPC -#define AF_BLUETOOTH PF_BLUETOOTH -#define AF_IUCV PF_IUCV -#define AF_RXRPC PF_RXRPC -#define AF_ISDN PF_ISDN -#define AF_PHONET PF_PHONET -#define AF_IEEE802154 PF_IEEE802154 -#define AF_CAIF PF_CAIF -#define AF_ALG PF_ALG -#define AF_NFC PF_NFC -#define AF_VSOCK PF_VSOCK -#define AF_KCM PF_KCM -#define AF_QIPCRTR PF_QIPCRTR -#define AF_SMC PF_SMC -#define AF_MAX PF_MAX - -#ifndef SO_DEBUG -#define SO_DEBUG 1 -#define SO_REUSEADDR 2 -#define SO_TYPE 3 -#define SO_ERROR 4 -#define SO_DONTROUTE 5 -#define SO_BROADCAST 6 -#define SO_SNDBUF 7 -#define SO_RCVBUF 8 -#define SO_KEEPALIVE 9 -#define SO_OOBINLINE 10 -#define SO_NO_CHECK 11 -#define SO_PRIORITY 12 -#define SO_LINGER 13 -#define SO_BSDCOMPAT 14 -#define SO_REUSEPORT 15 -#define SO_PASSCRED 16 -#define SO_PEERCRED 17 -#define SO_RCVLOWAT 18 -#define SO_SNDLOWAT 19 -#define SO_RCVTIMEO 20 -#define SO_SNDTIMEO 21 -#define SO_ACCEPTCONN 30 -#define SO_PEERSEC 31 -#define SO_SNDBUFFORCE 32 -#define SO_RCVBUFFORCE 33 -#define SO_PROTOCOL 38 -#define SO_DOMAIN 39 -#endif - -#define SO_SECURITY_AUTHENTICATION 22 -#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 -#define SO_SECURITY_ENCRYPTION_NETWORK 24 - -#define SO_BINDTODEVICE 25 - -#define SO_ATTACH_FILTER 26 -#define SO_DETACH_FILTER 27 -#define SO_GET_FILTER SO_ATTACH_FILTER - -#define SO_PEERNAME 28 -#define SO_TIMESTAMP 29 -#define SCM_TIMESTAMP SO_TIMESTAMP - -#define SO_PASSSEC 34 -#define SO_TIMESTAMPNS 35 -#define SCM_TIMESTAMPNS SO_TIMESTAMPNS -#define SO_MARK 36 -#define SO_TIMESTAMPING 37 -#define SCM_TIMESTAMPING SO_TIMESTAMPING -#define SO_RXQ_OVFL 40 -#define SO_WIFI_STATUS 41 -#define SCM_WIFI_STATUS SO_WIFI_STATUS -#define SO_PEEK_OFF 42 -#define SO_NOFCS 43 -#define SO_LOCK_FILTER 44 -#define SO_SELECT_ERR_QUEUE 45 -#define SO_BUSY_POLL 46 -#define SO_MAX_PACING_RATE 47 -#define SO_BPF_EXTENSIONS 48 -#define SO_INCOMING_CPU 49 -#define SO_ATTACH_BPF 50 -#define SO_DETACH_BPF SO_DETACH_FILTER -#define SO_ATTACH_REUSEPORT_CBPF 51 -#define SO_ATTACH_REUSEPORT_EBPF 52 -#define SO_CNX_ADVICE 53 -#define SCM_TIMESTAMPING_OPT_STATS 54 -#define SO_MEMINFO 55 -#define SO_INCOMING_NAPI_ID 56 -#define SO_COOKIE 57 -#define SCM_TIMESTAMPING_PKTINFO 58 -#define SO_PEERGROUPS 59 -#define SO_ZEROCOPY 60 - -#ifndef SOL_SOCKET -#define SOL_SOCKET 1 -#endif - -#define SOL_IP 0 -#define SOL_IPV6 41 -#define SOL_ICMPV6 58 - -#define SOL_RAW 255 -#define SOL_DECNET 261 -#define SOL_X25 262 -#define SOL_PACKET 263 -#define SOL_ATM 264 -#define SOL_AAL 265 -#define SOL_IRDA 266 -#define SOL_NETBEUI 267 -#define SOL_LLC 268 -#define SOL_DCCP 269 -#define SOL_NETLINK 270 -#define SOL_TIPC 271 -#define SOL_RXRPC 272 -#define SOL_PPPOL2TP 273 -#define SOL_BLUETOOTH 274 -#define SOL_PNPIPE 275 -#define SOL_RDS 276 -#define SOL_IUCV 277 -#define SOL_CAIF 278 -#define SOL_ALG 279 -#define SOL_NFC 280 -#define SOL_KCM 281 -#define SOL_TLS 282 - -#define SOMAXCONN 128 - -#define MSG_OOB 0x0001 -#define MSG_PEEK 0x0002 -#define MSG_DONTROUTE 0x0004 -#define MSG_CTRUNC 0x0008 -#define MSG_PROXY 0x0010 -#define MSG_TRUNC 0x0020 -#define MSG_DONTWAIT 0x0040 -#define MSG_EOR 0x0080 -#define MSG_WAITALL 0x0100 -#define MSG_FIN 0x0200 -#define MSG_SYN 0x0400 -#define MSG_CONFIRM 0x0800 -#define MSG_RST 0x1000 -#define MSG_ERRQUEUE 0x2000 -#define MSG_NOSIGNAL 0x4000 -#define MSG_MORE 0x8000 -#define MSG_WAITFORONE 0x10000 -#define MSG_BATCH 0x40000 -#define MSG_ZEROCOPY 0x4000000 -#define MSG_FASTOPEN 0x20000000 -#define MSG_CMSG_CLOEXEC 0x40000000 - -#define __CMSG_LEN(cmsg) (((cmsg)->cmsg_len + sizeof(long) - 1) & ~(long)(sizeof(long) - 1)) -#define __CMSG_NEXT(cmsg) ((unsigned char *)(cmsg) + __CMSG_LEN(cmsg)) -#define __MHDR_END(mhdr) ((unsigned char *)(mhdr)->msg_control + (mhdr)->msg_controllen) - -#define CMSG_DATA(cmsg) ((unsigned char *) (((struct cmsghdr *)(cmsg)) + 1)) -#define CMSG_NXTHDR(mhdr, cmsg) ((cmsg)->cmsg_len < sizeof (struct cmsghdr) || \ - __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \ - ? 0 : (struct cmsghdr *)__CMSG_NEXT(cmsg)) -#define CMSG_FIRSTHDR(mhdr) ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0) - -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) -#define CMSG_SPACE(len) (CMSG_ALIGN (len) + CMSG_ALIGN (sizeof (struct cmsghdr))) -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -#define SCM_RIGHTS 0x01 -#define SCM_CREDENTIALS 0x02 - -struct sockaddr { - sa_family_t sa_family; - char sa_data[14]; -}; - -struct sockaddr_storage { - sa_family_t ss_family; - char __ss_padding[128-sizeof(long)-sizeof(sa_family_t)]; - unsigned long __ss_align; -}; - -int socket (int, int, int); -int socketpair (int, int, int, int [2]); - -int shutdown (int, int); - -int bind (int, const struct sockaddr *, socklen_t); -int connect (int, const struct sockaddr *, socklen_t); -int listen (int, int); -int accept (int, struct sockaddr *__restrict, socklen_t *__restrict); -int accept4(int, struct sockaddr *__restrict, socklen_t *__restrict, int); - -int getsockname (int, struct sockaddr *__restrict, socklen_t *__restrict); -int getpeername (int, struct sockaddr *__restrict, socklen_t *__restrict); - -ssize_t send (int, const void *, size_t, int); -ssize_t recv (int, void *, size_t, int); -ssize_t sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t); -ssize_t recvfrom (int, void *__restrict, size_t, int, struct sockaddr *__restrict, socklen_t *__restrict); -ssize_t sendmsg (int, const struct msghdr *, int); -ssize_t recvmsg (int, struct msghdr *, int); - -int getsockopt (int, int, int, void *__restrict, socklen_t *__restrict); -int setsockopt (int, int, int, const void *, socklen_t); - -int sockatmark (int); - -#ifdef __cplusplus -} -#endif -#endif \ No newline at end of file diff --git a/lib/libc/include/s390x-linux-musl/bfd_stdint.h b/lib/libc/include/s390x-linux-musl/bfd_stdint.h deleted file mode 100644 index b62f20f936..0000000000 --- a/lib/libc/include/s390x-linux-musl/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for s390x-linux-musl-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/s390x-linux-musl/bits/alltypes.h b/lib/libc/include/s390x-linux-musl/bits/alltypes.h deleted file mode 100644 index e704aca0b2..0000000000 --- a/lib/libc/include/s390x-linux-musl/bits/alltypes.h +++ /dev/null @@ -1,385 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef int wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif - -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef double float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/s390x-linux-musl/bits/fcntl.h b/lib/libc/include/s390x-linux-musl/bits/fcntl.h index 04f3d1c604..c496dd0641 100644 --- a/lib/libc/include/s390x-linux-musl/bits/fcntl.h +++ b/lib/libc/include/s390x-linux-musl/bits/fcntl.h @@ -37,4 +37,7 @@ #define F_SETOWN_EX 15 #define F_GETOWN_EX 16 -#define F_GETOWNER_UIDS 17 \ No newline at end of file +#define F_GETOWNER_UIDS 17 + +#define POSIX_FADV_DONTNEED 6 +#define POSIX_FADV_NOREUSE 7 \ No newline at end of file diff --git a/lib/libc/include/s390x-linux-musl/bits/socket.h b/lib/libc/include/s390x-linux-musl/bits/socket.h index afe0139607..decce20733 100644 --- a/lib/libc/include/s390x-linux-musl/bits/socket.h +++ b/lib/libc/include/s390x-linux-musl/bits/socket.h @@ -14,31 +14,4 @@ struct cmsghdr { socklen_t cmsg_len; int cmsg_level; int cmsg_type; -}; - -#define SO_DEBUG 1 -#define SO_REUSEADDR 2 -#define SO_TYPE 3 -#define SO_ERROR 4 -#define SO_DONTROUTE 5 -#define SO_BROADCAST 6 -#define SO_SNDBUF 7 -#define SO_RCVBUF 8 -#define SO_KEEPALIVE 9 -#define SO_OOBINLINE 10 -#define SO_NO_CHECK 11 -#define SO_PRIORITY 12 -#define SO_LINGER 13 -#define SO_BSDCOMPAT 14 -#define SO_REUSEPORT 15 -#define SO_PASSCRED 16 -#define SO_PEERCRED 17 -#define SO_RCVLOWAT 18 -#define SO_SNDLOWAT 19 -#define SO_RCVTIMEO 20 -#define SO_SNDTIMEO 21 -#define SO_ACCEPTCONN 30 -#define SO_SNDBUFFORCE 32 -#define SO_RCVBUFFORCE 33 -#define SO_PROTOCOL 38 -#define SO_DOMAIN 39 \ No newline at end of file +}; \ No newline at end of file diff --git a/lib/libc/include/s390x-linux-musl/bits/syscall.h b/lib/libc/include/s390x-linux-musl/bits/syscall.h deleted file mode 100644 index 7def11ef72..0000000000 --- a/lib/libc/include/s390x-linux-musl/bits/syscall.h +++ /dev/null @@ -1,657 +0,0 @@ -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_restart_syscall 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_brk 45 -#define __NR_signal 48 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_setpgid 57 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_symlink 83 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_lookup_dcookie 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 -#define __NR_getdents 141 -#define __NR_select 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_query_module 167 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_getpmsg 188 -#define __NR_putpmsg 189 -#define __NR_vfork 190 -#define __NR_getrlimit 191 -#define __NR_lchown 198 -#define __NR_getuid 199 -#define __NR_getgid 200 -#define __NR_geteuid 201 -#define __NR_getegid 202 -#define __NR_setreuid 203 -#define __NR_setregid 204 -#define __NR_getgroups 205 -#define __NR_setgroups 206 -#define __NR_fchown 207 -#define __NR_setresuid 208 -#define __NR_getresuid 209 -#define __NR_setresgid 210 -#define __NR_getresgid 211 -#define __NR_chown 212 -#define __NR_setuid 213 -#define __NR_setgid 214 -#define __NR_setfsuid 215 -#define __NR_setfsgid 216 -#define __NR_pivot_root 217 -#define __NR_mincore 218 -#define __NR_madvise 219 -#define __NR_getdents64 220 -#define __NR_readahead 222 -#define __NR_setxattr 224 -#define __NR_lsetxattr 225 -#define __NR_fsetxattr 226 -#define __NR_getxattr 227 -#define __NR_lgetxattr 228 -#define __NR_fgetxattr 229 -#define __NR_listxattr 230 -#define __NR_llistxattr 231 -#define __NR_flistxattr 232 -#define __NR_removexattr 233 -#define __NR_lremovexattr 234 -#define __NR_fremovexattr 235 -#define __NR_gettid 236 -#define __NR_tkill 237 -#define __NR_futex 238 -#define __NR_sched_setaffinity 239 -#define __NR_sched_getaffinity 240 -#define __NR_tgkill 241 -#define __NR_io_setup 243 -#define __NR_io_destroy 244 -#define __NR_io_getevents 245 -#define __NR_io_submit 246 -#define __NR_io_cancel 247 -#define __NR_exit_group 248 -#define __NR_epoll_create 249 -#define __NR_epoll_ctl 250 -#define __NR_epoll_wait 251 -#define __NR_set_tid_address 252 -#define __NR_fadvise64 253 -#define __NR_timer_create 254 -#define __NR_timer_settime 255 -#define __NR_timer_gettime 256 -#define __NR_timer_getoverrun 257 -#define __NR_timer_delete 258 -#define __NR_clock_settime 259 -#define __NR_clock_gettime 260 -#define __NR_clock_getres 261 -#define __NR_clock_nanosleep 262 -#define __NR_statfs64 265 -#define __NR_fstatfs64 266 -#define __NR_remap_file_pages 267 -#define __NR_mbind 268 -#define __NR_get_mempolicy 269 -#define __NR_set_mempolicy 270 -#define __NR_mq_open 271 -#define __NR_mq_unlink 272 -#define __NR_mq_timedsend 273 -#define __NR_mq_timedreceive 274 -#define __NR_mq_notify 275 -#define __NR_mq_getsetattr 276 -#define __NR_kexec_load 277 -#define __NR_add_key 278 -#define __NR_request_key 279 -#define __NR_keyctl 280 -#define __NR_waitid 281 -#define __NR_ioprio_set 282 -#define __NR_ioprio_get 283 -#define __NR_inotify_init 284 -#define __NR_inotify_add_watch 285 -#define __NR_inotify_rm_watch 286 -#define __NR_migrate_pages 287 -#define __NR_openat 288 -#define __NR_mkdirat 289 -#define __NR_mknodat 290 -#define __NR_fchownat 291 -#define __NR_futimesat 292 -#define __NR_newfstatat 293 -#define __NR_unlinkat 294 -#define __NR_renameat 295 -#define __NR_linkat 296 -#define __NR_symlinkat 297 -#define __NR_readlinkat 298 -#define __NR_fchmodat 299 -#define __NR_faccessat 300 -#define __NR_pselect6 301 -#define __NR_ppoll 302 -#define __NR_unshare 303 -#define __NR_set_robust_list 304 -#define __NR_get_robust_list 305 -#define __NR_splice 306 -#define __NR_sync_file_range 307 -#define __NR_tee 308 -#define __NR_vmsplice 309 -#define __NR_move_pages 310 -#define __NR_getcpu 311 -#define __NR_epoll_pwait 312 -#define __NR_utimes 313 -#define __NR_fallocate 314 -#define __NR_utimensat 315 -#define __NR_signalfd 316 -#define __NR_timerfd 317 -#define __NR_eventfd 318 -#define __NR_timerfd_create 319 -#define __NR_timerfd_settime 320 -#define __NR_timerfd_gettime 321 -#define __NR_signalfd4 322 -#define __NR_eventfd2 323 -#define __NR_inotify_init1 324 -#define __NR_pipe2 325 -#define __NR_dup3 326 -#define __NR_epoll_create1 327 -#define __NR_preadv 328 -#define __NR_pwritev 329 -#define __NR_rt_tgsigqueueinfo 330 -#define __NR_perf_event_open 331 -#define __NR_fanotify_init 332 -#define __NR_fanotify_mark 333 -#define __NR_prlimit64 334 -#define __NR_name_to_handle_at 335 -#define __NR_open_by_handle_at 336 -#define __NR_clock_adjtime 337 -#define __NR_syncfs 338 -#define __NR_setns 339 -#define __NR_process_vm_readv 340 -#define __NR_process_vm_writev 341 -#define __NR_s390_runtime_instr 342 -#define __NR_kcmp 343 -#define __NR_finit_module 344 -#define __NR_sched_setattr 345 -#define __NR_sched_getattr 346 -#define __NR_renameat2 347 -#define __NR_seccomp 348 -#define __NR_getrandom 349 -#define __NR_memfd_create 350 -#define __NR_bpf 351 -#define __NR_s390_pci_mmio_write 352 -#define __NR_s390_pci_mmio_read 353 -#define __NR_execveat 354 -#define __NR_userfaultfd 355 -#define __NR_membarrier 356 -#define __NR_recvmmsg 357 -#define __NR_sendmmsg 358 -#define __NR_socket 359 -#define __NR_socketpair 360 -#define __NR_bind 361 -#define __NR_connect 362 -#define __NR_listen 363 -#define __NR_accept4 364 -#define __NR_getsockopt 365 -#define __NR_setsockopt 366 -#define __NR_getsockname 367 -#define __NR_getpeername 368 -#define __NR_sendto 369 -#define __NR_sendmsg 370 -#define __NR_recvfrom 371 -#define __NR_recvmsg 372 -#define __NR_shutdown 373 -#define __NR_mlock2 374 -#define __NR_copy_file_range 375 -#define __NR_preadv2 376 -#define __NR_pwritev2 377 -#define __NR_s390_guarded_storage 378 -#define __NR_statx 379 -#define __NR_s390_sthyi 380 -#define __NR_kexec_file_load 381 -#define __NR_io_pgetevents 382 -#define __NR_rseq 383 - -#define SYS_exit 1 -#define SYS_fork 2 -#define SYS_read 3 -#define SYS_write 4 -#define SYS_open 5 -#define SYS_close 6 -#define SYS_restart_syscall 7 -#define SYS_creat 8 -#define SYS_link 9 -#define SYS_unlink 10 -#define SYS_execve 11 -#define SYS_chdir 12 -#define SYS_mknod 14 -#define SYS_chmod 15 -#define SYS_lseek 19 -#define SYS_getpid 20 -#define SYS_mount 21 -#define SYS_umount 22 -#define SYS_ptrace 26 -#define SYS_alarm 27 -#define SYS_pause 29 -#define SYS_utime 30 -#define SYS_access 33 -#define SYS_nice 34 -#define SYS_sync 36 -#define SYS_kill 37 -#define SYS_rename 38 -#define SYS_mkdir 39 -#define SYS_rmdir 40 -#define SYS_dup 41 -#define SYS_pipe 42 -#define SYS_times 43 -#define SYS_brk 45 -#define SYS_signal 48 -#define SYS_acct 51 -#define SYS_umount2 52 -#define SYS_ioctl 54 -#define SYS_fcntl 55 -#define SYS_setpgid 57 -#define SYS_umask 60 -#define SYS_chroot 61 -#define SYS_ustat 62 -#define SYS_dup2 63 -#define SYS_getppid 64 -#define SYS_getpgrp 65 -#define SYS_setsid 66 -#define SYS_sigaction 67 -#define SYS_sigsuspend 72 -#define SYS_sigpending 73 -#define SYS_sethostname 74 -#define SYS_setrlimit 75 -#define SYS_getrusage 77 -#define SYS_gettimeofday 78 -#define SYS_settimeofday 79 -#define SYS_symlink 83 -#define SYS_readlink 85 -#define SYS_uselib 86 -#define SYS_swapon 87 -#define SYS_reboot 88 -#define SYS_readdir 89 -#define SYS_mmap 90 -#define SYS_munmap 91 -#define SYS_truncate 92 -#define SYS_ftruncate 93 -#define SYS_fchmod 94 -#define SYS_getpriority 96 -#define SYS_setpriority 97 -#define SYS_statfs 99 -#define SYS_fstatfs 100 -#define SYS_socketcall 102 -#define SYS_syslog 103 -#define SYS_setitimer 104 -#define SYS_getitimer 105 -#define SYS_stat 106 -#define SYS_lstat 107 -#define SYS_fstat 108 -#define SYS_lookup_dcookie 110 -#define SYS_vhangup 111 -#define SYS_idle 112 -#define SYS_wait4 114 -#define SYS_swapoff 115 -#define SYS_sysinfo 116 -#define SYS_ipc 117 -#define SYS_fsync 118 -#define SYS_sigreturn 119 -#define SYS_clone 120 -#define SYS_setdomainname 121 -#define SYS_uname 122 -#define SYS_adjtimex 124 -#define SYS_mprotect 125 -#define SYS_sigprocmask 126 -#define SYS_create_module 127 -#define SYS_init_module 128 -#define SYS_delete_module 129 -#define SYS_get_kernel_syms 130 -#define SYS_quotactl 131 -#define SYS_getpgid 132 -#define SYS_fchdir 133 -#define SYS_bdflush 134 -#define SYS_sysfs 135 -#define SYS_personality 136 -#define SYS_afs_syscall 137 -#define SYS_getdents 141 -#define SYS_select 142 -#define SYS_flock 143 -#define SYS_msync 144 -#define SYS_readv 145 -#define SYS_writev 146 -#define SYS_getsid 147 -#define SYS_fdatasync 148 -#define SYS__sysctl 149 -#define SYS_mlock 150 -#define SYS_munlock 151 -#define SYS_mlockall 152 -#define SYS_munlockall 153 -#define SYS_sched_setparam 154 -#define SYS_sched_getparam 155 -#define SYS_sched_setscheduler 156 -#define SYS_sched_getscheduler 157 -#define SYS_sched_yield 158 -#define SYS_sched_get_priority_max 159 -#define SYS_sched_get_priority_min 160 -#define SYS_sched_rr_get_interval 161 -#define SYS_nanosleep 162 -#define SYS_mremap 163 -#define SYS_query_module 167 -#define SYS_poll 168 -#define SYS_nfsservctl 169 -#define SYS_prctl 172 -#define SYS_rt_sigreturn 173 -#define SYS_rt_sigaction 174 -#define SYS_rt_sigprocmask 175 -#define SYS_rt_sigpending 176 -#define SYS_rt_sigtimedwait 177 -#define SYS_rt_sigqueueinfo 178 -#define SYS_rt_sigsuspend 179 -#define SYS_pread64 180 -#define SYS_pwrite64 181 -#define SYS_getcwd 183 -#define SYS_capget 184 -#define SYS_capset 185 -#define SYS_sigaltstack 186 -#define SYS_sendfile 187 -#define SYS_getpmsg 188 -#define SYS_putpmsg 189 -#define SYS_vfork 190 -#define SYS_getrlimit 191 -#define SYS_lchown 198 -#define SYS_getuid 199 -#define SYS_getgid 200 -#define SYS_geteuid 201 -#define SYS_getegid 202 -#define SYS_setreuid 203 -#define SYS_setregid 204 -#define SYS_getgroups 205 -#define SYS_setgroups 206 -#define SYS_fchown 207 -#define SYS_setresuid 208 -#define SYS_getresuid 209 -#define SYS_setresgid 210 -#define SYS_getresgid 211 -#define SYS_chown 212 -#define SYS_setuid 213 -#define SYS_setgid 214 -#define SYS_setfsuid 215 -#define SYS_setfsgid 216 -#define SYS_pivot_root 217 -#define SYS_mincore 218 -#define SYS_madvise 219 -#define SYS_getdents64 220 -#define SYS_readahead 222 -#define SYS_setxattr 224 -#define SYS_lsetxattr 225 -#define SYS_fsetxattr 226 -#define SYS_getxattr 227 -#define SYS_lgetxattr 228 -#define SYS_fgetxattr 229 -#define SYS_listxattr 230 -#define SYS_llistxattr 231 -#define SYS_flistxattr 232 -#define SYS_removexattr 233 -#define SYS_lremovexattr 234 -#define SYS_fremovexattr 235 -#define SYS_gettid 236 -#define SYS_tkill 237 -#define SYS_futex 238 -#define SYS_sched_setaffinity 239 -#define SYS_sched_getaffinity 240 -#define SYS_tgkill 241 -#define SYS_io_setup 243 -#define SYS_io_destroy 244 -#define SYS_io_getevents 245 -#define SYS_io_submit 246 -#define SYS_io_cancel 247 -#define SYS_exit_group 248 -#define SYS_epoll_create 249 -#define SYS_epoll_ctl 250 -#define SYS_epoll_wait 251 -#define SYS_set_tid_address 252 -#define SYS_fadvise64 253 -#define SYS_timer_create 254 -#define SYS_timer_settime 255 -#define SYS_timer_gettime 256 -#define SYS_timer_getoverrun 257 -#define SYS_timer_delete 258 -#define SYS_clock_settime 259 -#define SYS_clock_gettime 260 -#define SYS_clock_getres 261 -#define SYS_clock_nanosleep 262 -#define SYS_statfs64 265 -#define SYS_fstatfs64 266 -#define SYS_remap_file_pages 267 -#define SYS_mbind 268 -#define SYS_get_mempolicy 269 -#define SYS_set_mempolicy 270 -#define SYS_mq_open 271 -#define SYS_mq_unlink 272 -#define SYS_mq_timedsend 273 -#define SYS_mq_timedreceive 274 -#define SYS_mq_notify 275 -#define SYS_mq_getsetattr 276 -#define SYS_kexec_load 277 -#define SYS_add_key 278 -#define SYS_request_key 279 -#define SYS_keyctl 280 -#define SYS_waitid 281 -#define SYS_ioprio_set 282 -#define SYS_ioprio_get 283 -#define SYS_inotify_init 284 -#define SYS_inotify_add_watch 285 -#define SYS_inotify_rm_watch 286 -#define SYS_migrate_pages 287 -#define SYS_openat 288 -#define SYS_mkdirat 289 -#define SYS_mknodat 290 -#define SYS_fchownat 291 -#define SYS_futimesat 292 -#define SYS_newfstatat 293 -#define SYS_unlinkat 294 -#define SYS_renameat 295 -#define SYS_linkat 296 -#define SYS_symlinkat 297 -#define SYS_readlinkat 298 -#define SYS_fchmodat 299 -#define SYS_faccessat 300 -#define SYS_pselect6 301 -#define SYS_ppoll 302 -#define SYS_unshare 303 -#define SYS_set_robust_list 304 -#define SYS_get_robust_list 305 -#define SYS_splice 306 -#define SYS_sync_file_range 307 -#define SYS_tee 308 -#define SYS_vmsplice 309 -#define SYS_move_pages 310 -#define SYS_getcpu 311 -#define SYS_epoll_pwait 312 -#define SYS_utimes 313 -#define SYS_fallocate 314 -#define SYS_utimensat 315 -#define SYS_signalfd 316 -#define SYS_timerfd 317 -#define SYS_eventfd 318 -#define SYS_timerfd_create 319 -#define SYS_timerfd_settime 320 -#define SYS_timerfd_gettime 321 -#define SYS_signalfd4 322 -#define SYS_eventfd2 323 -#define SYS_inotify_init1 324 -#define SYS_pipe2 325 -#define SYS_dup3 326 -#define SYS_epoll_create1 327 -#define SYS_preadv 328 -#define SYS_pwritev 329 -#define SYS_rt_tgsigqueueinfo 330 -#define SYS_perf_event_open 331 -#define SYS_fanotify_init 332 -#define SYS_fanotify_mark 333 -#define SYS_prlimit64 334 -#define SYS_name_to_handle_at 335 -#define SYS_open_by_handle_at 336 -#define SYS_clock_adjtime 337 -#define SYS_syncfs 338 -#define SYS_setns 339 -#define SYS_process_vm_readv 340 -#define SYS_process_vm_writev 341 -#define SYS_s390_runtime_instr 342 -#define SYS_kcmp 343 -#define SYS_finit_module 344 -#define SYS_sched_setattr 345 -#define SYS_sched_getattr 346 -#define SYS_renameat2 347 -#define SYS_seccomp 348 -#define SYS_getrandom 349 -#define SYS_memfd_create 350 -#define SYS_bpf 351 -#define SYS_s390_pci_mmio_write 352 -#define SYS_s390_pci_mmio_read 353 -#define SYS_execveat 354 -#define SYS_userfaultfd 355 -#define SYS_membarrier 356 -#define SYS_recvmmsg 357 -#define SYS_sendmmsg 358 -#define SYS_socket 359 -#define SYS_socketpair 360 -#define SYS_bind 361 -#define SYS_connect 362 -#define SYS_listen 363 -#define SYS_accept4 364 -#define SYS_getsockopt 365 -#define SYS_setsockopt 366 -#define SYS_getsockname 367 -#define SYS_getpeername 368 -#define SYS_sendto 369 -#define SYS_sendmsg 370 -#define SYS_recvfrom 371 -#define SYS_recvmsg 372 -#define SYS_shutdown 373 -#define SYS_mlock2 374 -#define SYS_copy_file_range 375 -#define SYS_preadv2 376 -#define SYS_pwritev2 377 -#define SYS_s390_guarded_storage 378 -#define SYS_statx 379 -#define SYS_s390_sthyi 380 -#define SYS_kexec_file_load 381 -#define SYS_io_pgetevents 382 -#define SYS_rseq 383 \ No newline at end of file diff --git a/lib/libc/include/wasm32-freestanding-musl/bits/alltypes.h b/lib/libc/include/wasm32-freestanding-musl/bits/alltypes.h deleted file mode 100644 index 5c5a52c7e9..0000000000 --- a/lib/libc/include/wasm32-freestanding-musl/bits/alltypes.h +++ /dev/null @@ -1,385 +0,0 @@ -#define _Addr long -#define _Int64 long long -#define _Reg long - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef int wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif - -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg diff --git a/lib/libc/include/wasm32-freestanding-musl/errno.h b/lib/libc/include/wasm32-freestanding-musl/errno.h deleted file mode 100644 index e26c76e754..0000000000 --- a/lib/libc/include/wasm32-freestanding-musl/errno.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _ERRNO_H -#define _ERRNO_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef WASM_THREAD_MODEL_SINGLE -extern int errno; -#else -#ifdef __cplusplus -extern thread_local int errno; -#else -extern _Thread_local int errno; -#endif -#endif - -#define errno errno - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/lib/libc/include/x86_64-linux-musl/bfd_stdint.h b/lib/libc/include/x86_64-linux-musl/bfd_stdint.h deleted file mode 100644 index 0e3242c254..0000000000 --- a/lib/libc/include/x86_64-linux-musl/bfd_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* generated for x86_64-linux-musl-gcc (GCC) 8.3.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 */ \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-musl/bits/alltypes.h b/lib/libc/include/x86_64-linux-musl/bits/alltypes.h deleted file mode 100644 index 2201345adb..0000000000 --- a/lib/libc/include/x86_64-linux-musl/bits/alltypes.h +++ /dev/null @@ -1,398 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) -typedef __builtin_va_list va_list; -#define __DEFINED_va_list -#endif - -#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) -typedef __builtin_va_list __isoc_va_list; -#define __DEFINED___isoc_va_list -#endif - - -#ifndef __cplusplus -#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) -typedef int wchar_t; -#define __DEFINED_wchar_t -#endif - -#endif - -#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2 -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef long double float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef long double double_t; -#define __DEFINED_double_t -#endif - -#else -#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) -typedef float float_t; -#define __DEFINED_float_t -#endif - -#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) -typedef double double_t; -#define __DEFINED_double_t -#endif - -#endif - -#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) -typedef struct { long long __ll; long double __ld; } max_align_t; -#define __DEFINED_max_align_t -#endif - - -#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) -typedef long time_t; -#define __DEFINED_time_t -#endif - -#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) -typedef long suseconds_t; -#define __DEFINED_suseconds_t -#endif - - -#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t; -#define __DEFINED_pthread_attr_t -#endif - -#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t; -#define __DEFINED_pthread_mutex_t -#endif - -#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) -typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t; -#define __DEFINED_mtx_t -#endif - -#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t; -#define __DEFINED_pthread_cond_t -#endif - -#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) -typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t; -#define __DEFINED_cnd_t -#endif - -#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) -typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t; -#define __DEFINED_pthread_rwlock_t -#endif - -#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) -typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t; -#define __DEFINED_pthread_barrier_t -#endif - -#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) -typedef unsigned _Addr size_t; -#define __DEFINED_size_t -#endif - -#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) -typedef unsigned _Addr uintptr_t; -#define __DEFINED_uintptr_t -#endif - -#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) -typedef _Addr ptrdiff_t; -#define __DEFINED_ptrdiff_t -#endif - -#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) -typedef _Addr ssize_t; -#define __DEFINED_ssize_t -#endif - -#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) -typedef _Addr intptr_t; -#define __DEFINED_intptr_t -#endif - -#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) -typedef _Addr regoff_t; -#define __DEFINED_regoff_t -#endif - -#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) -typedef _Reg register_t; -#define __DEFINED_register_t -#endif - - -#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) -typedef signed char int8_t; -#define __DEFINED_int8_t -#endif - -#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) -typedef signed short int16_t; -#define __DEFINED_int16_t -#endif - -#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) -typedef signed int int32_t; -#define __DEFINED_int32_t -#endif - -#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) -typedef signed _Int64 int64_t; -#define __DEFINED_int64_t -#endif - -#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) -typedef signed _Int64 intmax_t; -#define __DEFINED_intmax_t -#endif - -#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) -typedef unsigned char uint8_t; -#define __DEFINED_uint8_t -#endif - -#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) -typedef unsigned short uint16_t; -#define __DEFINED_uint16_t -#endif - -#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) -typedef unsigned int uint32_t; -#define __DEFINED_uint32_t -#endif - -#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) -typedef unsigned _Int64 uint64_t; -#define __DEFINED_uint64_t -#endif - -#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) -typedef unsigned _Int64 u_int64_t; -#define __DEFINED_u_int64_t -#endif - -#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) -typedef unsigned _Int64 uintmax_t; -#define __DEFINED_uintmax_t -#endif - - -#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) -typedef unsigned mode_t; -#define __DEFINED_mode_t -#endif - -#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) -typedef unsigned _Reg nlink_t; -#define __DEFINED_nlink_t -#endif - -#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) -typedef _Int64 off_t; -#define __DEFINED_off_t -#endif - -#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) -typedef unsigned _Int64 ino_t; -#define __DEFINED_ino_t -#endif - -#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) -typedef unsigned _Int64 dev_t; -#define __DEFINED_dev_t -#endif - -#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) -typedef long blksize_t; -#define __DEFINED_blksize_t -#endif - -#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) -typedef _Int64 blkcnt_t; -#define __DEFINED_blkcnt_t -#endif - -#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) -typedef unsigned _Int64 fsblkcnt_t; -#define __DEFINED_fsblkcnt_t -#endif - -#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) -typedef unsigned _Int64 fsfilcnt_t; -#define __DEFINED_fsfilcnt_t -#endif - - -#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) -typedef unsigned wint_t; -#define __DEFINED_wint_t -#endif - -#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) -typedef unsigned long wctype_t; -#define __DEFINED_wctype_t -#endif - - -#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) -typedef void * timer_t; -#define __DEFINED_timer_t -#endif - -#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) -typedef int clockid_t; -#define __DEFINED_clockid_t -#endif - -#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) -typedef long clock_t; -#define __DEFINED_clock_t -#endif - -#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) -struct timeval { time_t tv_sec; suseconds_t tv_usec; }; -#define __DEFINED_struct_timeval -#endif - -#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) -struct timespec { time_t tv_sec; long tv_nsec; }; -#define __DEFINED_struct_timespec -#endif - - -#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) -typedef int pid_t; -#define __DEFINED_pid_t -#endif - -#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) -typedef unsigned id_t; -#define __DEFINED_id_t -#endif - -#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) -typedef unsigned uid_t; -#define __DEFINED_uid_t -#endif - -#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) -typedef unsigned gid_t; -#define __DEFINED_gid_t -#endif - -#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) -typedef int key_t; -#define __DEFINED_key_t -#endif - -#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) -typedef unsigned useconds_t; -#define __DEFINED_useconds_t -#endif - - -#ifdef __cplusplus -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef unsigned long pthread_t; -#define __DEFINED_pthread_t -#endif - -#else -#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) -typedef struct __pthread * pthread_t; -#define __DEFINED_pthread_t -#endif - -#endif -#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) -typedef int pthread_once_t; -#define __DEFINED_pthread_once_t -#endif - -#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) -typedef unsigned pthread_key_t; -#define __DEFINED_pthread_key_t -#endif - -#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) -typedef int pthread_spinlock_t; -#define __DEFINED_pthread_spinlock_t -#endif - -#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) -typedef struct { unsigned __attr; } pthread_mutexattr_t; -#define __DEFINED_pthread_mutexattr_t -#endif - -#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) -typedef struct { unsigned __attr; } pthread_condattr_t; -#define __DEFINED_pthread_condattr_t -#endif - -#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) -typedef struct { unsigned __attr; } pthread_barrierattr_t; -#define __DEFINED_pthread_barrierattr_t -#endif - -#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) -typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; -#define __DEFINED_pthread_rwlockattr_t -#endif - - -#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) -typedef struct _IO_FILE FILE; -#define __DEFINED_FILE -#endif - - -#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) -typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; -#define __DEFINED_mbstate_t -#endif - - -#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) -typedef struct __locale_struct * locale_t; -#define __DEFINED_locale_t -#endif - - -#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) -typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; -#define __DEFINED_sigset_t -#endif - - -#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) -struct iovec { void *iov_base; size_t iov_len; }; -#define __DEFINED_struct_iovec -#endif - - -#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) -typedef unsigned socklen_t; -#define __DEFINED_socklen_t -#endif - -#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) -typedef unsigned short sa_family_t; -#define __DEFINED_sa_family_t -#endif - - -#undef _Addr -#undef _Int64 -#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-musl/bits/endian.h b/lib/libc/include/x86_64-linux-musl/bits/endian.h deleted file mode 100644 index b1a7affbbb..0000000000 --- a/lib/libc/include/x86_64-linux-musl/bits/endian.h +++ /dev/null @@ -1 +0,0 @@ -#define __BYTE_ORDER __LITTLE_ENDIAN \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-musl/bits/syscall.h b/lib/libc/include/x86_64-linux-musl/bits/syscall.h deleted file mode 100644 index b184c9aab6..0000000000 --- a/lib/libc/include/x86_64-linux-musl/bits/syscall.h +++ /dev/null @@ -1,671 +0,0 @@ -#define __NR_read 0 -#define __NR_write 1 -#define __NR_open 2 -#define __NR_close 3 -#define __NR_stat 4 -#define __NR_fstat 5 -#define __NR_lstat 6 -#define __NR_poll 7 -#define __NR_lseek 8 -#define __NR_mmap 9 -#define __NR_mprotect 10 -#define __NR_munmap 11 -#define __NR_brk 12 -#define __NR_rt_sigaction 13 -#define __NR_rt_sigprocmask 14 -#define __NR_rt_sigreturn 15 -#define __NR_ioctl 16 -#define __NR_pread64 17 -#define __NR_pwrite64 18 -#define __NR_readv 19 -#define __NR_writev 20 -#define __NR_access 21 -#define __NR_pipe 22 -#define __NR_select 23 -#define __NR_sched_yield 24 -#define __NR_mremap 25 -#define __NR_msync 26 -#define __NR_mincore 27 -#define __NR_madvise 28 -#define __NR_shmget 29 -#define __NR_shmat 30 -#define __NR_shmctl 31 -#define __NR_dup 32 -#define __NR_dup2 33 -#define __NR_pause 34 -#define __NR_nanosleep 35 -#define __NR_getitimer 36 -#define __NR_alarm 37 -#define __NR_setitimer 38 -#define __NR_getpid 39 -#define __NR_sendfile 40 -#define __NR_socket 41 -#define __NR_connect 42 -#define __NR_accept 43 -#define __NR_sendto 44 -#define __NR_recvfrom 45 -#define __NR_sendmsg 46 -#define __NR_recvmsg 47 -#define __NR_shutdown 48 -#define __NR_bind 49 -#define __NR_listen 50 -#define __NR_getsockname 51 -#define __NR_getpeername 52 -#define __NR_socketpair 53 -#define __NR_setsockopt 54 -#define __NR_getsockopt 55 -#define __NR_clone 56 -#define __NR_fork 57 -#define __NR_vfork 58 -#define __NR_execve 59 -#define __NR_exit 60 -#define __NR_wait4 61 -#define __NR_kill 62 -#define __NR_uname 63 -#define __NR_semget 64 -#define __NR_semop 65 -#define __NR_semctl 66 -#define __NR_shmdt 67 -#define __NR_msgget 68 -#define __NR_msgsnd 69 -#define __NR_msgrcv 70 -#define __NR_msgctl 71 -#define __NR_fcntl 72 -#define __NR_flock 73 -#define __NR_fsync 74 -#define __NR_fdatasync 75 -#define __NR_truncate 76 -#define __NR_ftruncate 77 -#define __NR_getdents 78 -#define __NR_getcwd 79 -#define __NR_chdir 80 -#define __NR_fchdir 81 -#define __NR_rename 82 -#define __NR_mkdir 83 -#define __NR_rmdir 84 -#define __NR_creat 85 -#define __NR_link 86 -#define __NR_unlink 87 -#define __NR_symlink 88 -#define __NR_readlink 89 -#define __NR_chmod 90 -#define __NR_fchmod 91 -#define __NR_chown 92 -#define __NR_fchown 93 -#define __NR_lchown 94 -#define __NR_umask 95 -#define __NR_gettimeofday 96 -#define __NR_getrlimit 97 -#define __NR_getrusage 98 -#define __NR_sysinfo 99 -#define __NR_times 100 -#define __NR_ptrace 101 -#define __NR_getuid 102 -#define __NR_syslog 103 -#define __NR_getgid 104 -#define __NR_setuid 105 -#define __NR_setgid 106 -#define __NR_geteuid 107 -#define __NR_getegid 108 -#define __NR_setpgid 109 -#define __NR_getppid 110 -#define __NR_getpgrp 111 -#define __NR_setsid 112 -#define __NR_setreuid 113 -#define __NR_setregid 114 -#define __NR_getgroups 115 -#define __NR_setgroups 116 -#define __NR_setresuid 117 -#define __NR_getresuid 118 -#define __NR_setresgid 119 -#define __NR_getresgid 120 -#define __NR_getpgid 121 -#define __NR_setfsuid 122 -#define __NR_setfsgid 123 -#define __NR_getsid 124 -#define __NR_capget 125 -#define __NR_capset 126 -#define __NR_rt_sigpending 127 -#define __NR_rt_sigtimedwait 128 -#define __NR_rt_sigqueueinfo 129 -#define __NR_rt_sigsuspend 130 -#define __NR_sigaltstack 131 -#define __NR_utime 132 -#define __NR_mknod 133 -#define __NR_uselib 134 -#define __NR_personality 135 -#define __NR_ustat 136 -#define __NR_statfs 137 -#define __NR_fstatfs 138 -#define __NR_sysfs 139 -#define __NR_getpriority 140 -#define __NR_setpriority 141 -#define __NR_sched_setparam 142 -#define __NR_sched_getparam 143 -#define __NR_sched_setscheduler 144 -#define __NR_sched_getscheduler 145 -#define __NR_sched_get_priority_max 146 -#define __NR_sched_get_priority_min 147 -#define __NR_sched_rr_get_interval 148 -#define __NR_mlock 149 -#define __NR_munlock 150 -#define __NR_mlockall 151 -#define __NR_munlockall 152 -#define __NR_vhangup 153 -#define __NR_modify_ldt 154 -#define __NR_pivot_root 155 -#define __NR__sysctl 156 -#define __NR_prctl 157 -#define __NR_arch_prctl 158 -#define __NR_adjtimex 159 -#define __NR_setrlimit 160 -#define __NR_chroot 161 -#define __NR_sync 162 -#define __NR_acct 163 -#define __NR_settimeofday 164 -#define __NR_mount 165 -#define __NR_umount2 166 -#define __NR_swapon 167 -#define __NR_swapoff 168 -#define __NR_reboot 169 -#define __NR_sethostname 170 -#define __NR_setdomainname 171 -#define __NR_iopl 172 -#define __NR_ioperm 173 -#define __NR_create_module 174 -#define __NR_init_module 175 -#define __NR_delete_module 176 -#define __NR_get_kernel_syms 177 -#define __NR_query_module 178 -#define __NR_quotactl 179 -#define __NR_nfsservctl 180 -#define __NR_getpmsg 181 -#define __NR_putpmsg 182 -#define __NR_afs_syscall 183 -#define __NR_tuxcall 184 -#define __NR_security 185 -#define __NR_gettid 186 -#define __NR_readahead 187 -#define __NR_setxattr 188 -#define __NR_lsetxattr 189 -#define __NR_fsetxattr 190 -#define __NR_getxattr 191 -#define __NR_lgetxattr 192 -#define __NR_fgetxattr 193 -#define __NR_listxattr 194 -#define __NR_llistxattr 195 -#define __NR_flistxattr 196 -#define __NR_removexattr 197 -#define __NR_lremovexattr 198 -#define __NR_fremovexattr 199 -#define __NR_tkill 200 -#define __NR_time 201 -#define __NR_futex 202 -#define __NR_sched_setaffinity 203 -#define __NR_sched_getaffinity 204 -#define __NR_set_thread_area 205 -#define __NR_io_setup 206 -#define __NR_io_destroy 207 -#define __NR_io_getevents 208 -#define __NR_io_submit 209 -#define __NR_io_cancel 210 -#define __NR_get_thread_area 211 -#define __NR_lookup_dcookie 212 -#define __NR_epoll_create 213 -#define __NR_epoll_ctl_old 214 -#define __NR_epoll_wait_old 215 -#define __NR_remap_file_pages 216 -#define __NR_getdents64 217 -#define __NR_set_tid_address 218 -#define __NR_restart_syscall 219 -#define __NR_semtimedop 220 -#define __NR_fadvise64 221 -#define __NR_timer_create 222 -#define __NR_timer_settime 223 -#define __NR_timer_gettime 224 -#define __NR_timer_getoverrun 225 -#define __NR_timer_delete 226 -#define __NR_clock_settime 227 -#define __NR_clock_gettime 228 -#define __NR_clock_getres 229 -#define __NR_clock_nanosleep 230 -#define __NR_exit_group 231 -#define __NR_epoll_wait 232 -#define __NR_epoll_ctl 233 -#define __NR_tgkill 234 -#define __NR_utimes 235 -#define __NR_vserver 236 -#define __NR_mbind 237 -#define __NR_set_mempolicy 238 -#define __NR_get_mempolicy 239 -#define __NR_mq_open 240 -#define __NR_mq_unlink 241 -#define __NR_mq_timedsend 242 -#define __NR_mq_timedreceive 243 -#define __NR_mq_notify 244 -#define __NR_mq_getsetattr 245 -#define __NR_kexec_load 246 -#define __NR_waitid 247 -#define __NR_add_key 248 -#define __NR_request_key 249 -#define __NR_keyctl 250 -#define __NR_ioprio_set 251 -#define __NR_ioprio_get 252 -#define __NR_inotify_init 253 -#define __NR_inotify_add_watch 254 -#define __NR_inotify_rm_watch 255 -#define __NR_migrate_pages 256 -#define __NR_openat 257 -#define __NR_mkdirat 258 -#define __NR_mknodat 259 -#define __NR_fchownat 260 -#define __NR_futimesat 261 -#define __NR_newfstatat 262 -#define __NR_unlinkat 263 -#define __NR_renameat 264 -#define __NR_linkat 265 -#define __NR_symlinkat 266 -#define __NR_readlinkat 267 -#define __NR_fchmodat 268 -#define __NR_faccessat 269 -#define __NR_pselect6 270 -#define __NR_ppoll 271 -#define __NR_unshare 272 -#define __NR_set_robust_list 273 -#define __NR_get_robust_list 274 -#define __NR_splice 275 -#define __NR_tee 276 -#define __NR_sync_file_range 277 -#define __NR_vmsplice 278 -#define __NR_move_pages 279 -#define __NR_utimensat 280 -#define __NR_epoll_pwait 281 -#define __NR_signalfd 282 -#define __NR_timerfd_create 283 -#define __NR_eventfd 284 -#define __NR_fallocate 285 -#define __NR_timerfd_settime 286 -#define __NR_timerfd_gettime 287 -#define __NR_accept4 288 -#define __NR_signalfd4 289 -#define __NR_eventfd2 290 -#define __NR_epoll_create1 291 -#define __NR_dup3 292 -#define __NR_pipe2 293 -#define __NR_inotify_init1 294 -#define __NR_preadv 295 -#define __NR_pwritev 296 -#define __NR_rt_tgsigqueueinfo 297 -#define __NR_perf_event_open 298 -#define __NR_recvmmsg 299 -#define __NR_fanotify_init 300 -#define __NR_fanotify_mark 301 -#define __NR_prlimit64 302 -#define __NR_name_to_handle_at 303 -#define __NR_open_by_handle_at 304 -#define __NR_clock_adjtime 305 -#define __NR_syncfs 306 -#define __NR_sendmmsg 307 -#define __NR_setns 308 -#define __NR_getcpu 309 -#define __NR_process_vm_readv 310 -#define __NR_process_vm_writev 311 -#define __NR_kcmp 312 -#define __NR_finit_module 313 -#define __NR_sched_setattr 314 -#define __NR_sched_getattr 315 -#define __NR_renameat2 316 -#define __NR_seccomp 317 -#define __NR_getrandom 318 -#define __NR_memfd_create 319 -#define __NR_kexec_file_load 320 -#define __NR_bpf 321 -#define __NR_execveat 322 -#define __NR_userfaultfd 323 -#define __NR_membarrier 324 -#define __NR_mlock2 325 -#define __NR_copy_file_range 326 -#define __NR_preadv2 327 -#define __NR_pwritev2 328 -#define __NR_pkey_mprotect 329 -#define __NR_pkey_alloc 330 -#define __NR_pkey_free 331 -#define __NR_statx 332 -#define __NR_io_pgetevents 333 -#define __NR_rseq 334 - -#define SYS_read 0 -#define SYS_write 1 -#define SYS_open 2 -#define SYS_close 3 -#define SYS_stat 4 -#define SYS_fstat 5 -#define SYS_lstat 6 -#define SYS_poll 7 -#define SYS_lseek 8 -#define SYS_mmap 9 -#define SYS_mprotect 10 -#define SYS_munmap 11 -#define SYS_brk 12 -#define SYS_rt_sigaction 13 -#define SYS_rt_sigprocmask 14 -#define SYS_rt_sigreturn 15 -#define SYS_ioctl 16 -#define SYS_pread64 17 -#define SYS_pwrite64 18 -#define SYS_readv 19 -#define SYS_writev 20 -#define SYS_access 21 -#define SYS_pipe 22 -#define SYS_select 23 -#define SYS_sched_yield 24 -#define SYS_mremap 25 -#define SYS_msync 26 -#define SYS_mincore 27 -#define SYS_madvise 28 -#define SYS_shmget 29 -#define SYS_shmat 30 -#define SYS_shmctl 31 -#define SYS_dup 32 -#define SYS_dup2 33 -#define SYS_pause 34 -#define SYS_nanosleep 35 -#define SYS_getitimer 36 -#define SYS_alarm 37 -#define SYS_setitimer 38 -#define SYS_getpid 39 -#define SYS_sendfile 40 -#define SYS_socket 41 -#define SYS_connect 42 -#define SYS_accept 43 -#define SYS_sendto 44 -#define SYS_recvfrom 45 -#define SYS_sendmsg 46 -#define SYS_recvmsg 47 -#define SYS_shutdown 48 -#define SYS_bind 49 -#define SYS_listen 50 -#define SYS_getsockname 51 -#define SYS_getpeername 52 -#define SYS_socketpair 53 -#define SYS_setsockopt 54 -#define SYS_getsockopt 55 -#define SYS_clone 56 -#define SYS_fork 57 -#define SYS_vfork 58 -#define SYS_execve 59 -#define SYS_exit 60 -#define SYS_wait4 61 -#define SYS_kill 62 -#define SYS_uname 63 -#define SYS_semget 64 -#define SYS_semop 65 -#define SYS_semctl 66 -#define SYS_shmdt 67 -#define SYS_msgget 68 -#define SYS_msgsnd 69 -#define SYS_msgrcv 70 -#define SYS_msgctl 71 -#define SYS_fcntl 72 -#define SYS_flock 73 -#define SYS_fsync 74 -#define SYS_fdatasync 75 -#define SYS_truncate 76 -#define SYS_ftruncate 77 -#define SYS_getdents 78 -#define SYS_getcwd 79 -#define SYS_chdir 80 -#define SYS_fchdir 81 -#define SYS_rename 82 -#define SYS_mkdir 83 -#define SYS_rmdir 84 -#define SYS_creat 85 -#define SYS_link 86 -#define SYS_unlink 87 -#define SYS_symlink 88 -#define SYS_readlink 89 -#define SYS_chmod 90 -#define SYS_fchmod 91 -#define SYS_chown 92 -#define SYS_fchown 93 -#define SYS_lchown 94 -#define SYS_umask 95 -#define SYS_gettimeofday 96 -#define SYS_getrlimit 97 -#define SYS_getrusage 98 -#define SYS_sysinfo 99 -#define SYS_times 100 -#define SYS_ptrace 101 -#define SYS_getuid 102 -#define SYS_syslog 103 -#define SYS_getgid 104 -#define SYS_setuid 105 -#define SYS_setgid 106 -#define SYS_geteuid 107 -#define SYS_getegid 108 -#define SYS_setpgid 109 -#define SYS_getppid 110 -#define SYS_getpgrp 111 -#define SYS_setsid 112 -#define SYS_setreuid 113 -#define SYS_setregid 114 -#define SYS_getgroups 115 -#define SYS_setgroups 116 -#define SYS_setresuid 117 -#define SYS_getresuid 118 -#define SYS_setresgid 119 -#define SYS_getresgid 120 -#define SYS_getpgid 121 -#define SYS_setfsuid 122 -#define SYS_setfsgid 123 -#define SYS_getsid 124 -#define SYS_capget 125 -#define SYS_capset 126 -#define SYS_rt_sigpending 127 -#define SYS_rt_sigtimedwait 128 -#define SYS_rt_sigqueueinfo 129 -#define SYS_rt_sigsuspend 130 -#define SYS_sigaltstack 131 -#define SYS_utime 132 -#define SYS_mknod 133 -#define SYS_uselib 134 -#define SYS_personality 135 -#define SYS_ustat 136 -#define SYS_statfs 137 -#define SYS_fstatfs 138 -#define SYS_sysfs 139 -#define SYS_getpriority 140 -#define SYS_setpriority 141 -#define SYS_sched_setparam 142 -#define SYS_sched_getparam 143 -#define SYS_sched_setscheduler 144 -#define SYS_sched_getscheduler 145 -#define SYS_sched_get_priority_max 146 -#define SYS_sched_get_priority_min 147 -#define SYS_sched_rr_get_interval 148 -#define SYS_mlock 149 -#define SYS_munlock 150 -#define SYS_mlockall 151 -#define SYS_munlockall 152 -#define SYS_vhangup 153 -#define SYS_modify_ldt 154 -#define SYS_pivot_root 155 -#define SYS__sysctl 156 -#define SYS_prctl 157 -#define SYS_arch_prctl 158 -#define SYS_adjtimex 159 -#define SYS_setrlimit 160 -#define SYS_chroot 161 -#define SYS_sync 162 -#define SYS_acct 163 -#define SYS_settimeofday 164 -#define SYS_mount 165 -#define SYS_umount2 166 -#define SYS_swapon 167 -#define SYS_swapoff 168 -#define SYS_reboot 169 -#define SYS_sethostname 170 -#define SYS_setdomainname 171 -#define SYS_iopl 172 -#define SYS_ioperm 173 -#define SYS_create_module 174 -#define SYS_init_module 175 -#define SYS_delete_module 176 -#define SYS_get_kernel_syms 177 -#define SYS_query_module 178 -#define SYS_quotactl 179 -#define SYS_nfsservctl 180 -#define SYS_getpmsg 181 -#define SYS_putpmsg 182 -#define SYS_afs_syscall 183 -#define SYS_tuxcall 184 -#define SYS_security 185 -#define SYS_gettid 186 -#define SYS_readahead 187 -#define SYS_setxattr 188 -#define SYS_lsetxattr 189 -#define SYS_fsetxattr 190 -#define SYS_getxattr 191 -#define SYS_lgetxattr 192 -#define SYS_fgetxattr 193 -#define SYS_listxattr 194 -#define SYS_llistxattr 195 -#define SYS_flistxattr 196 -#define SYS_removexattr 197 -#define SYS_lremovexattr 198 -#define SYS_fremovexattr 199 -#define SYS_tkill 200 -#define SYS_time 201 -#define SYS_futex 202 -#define SYS_sched_setaffinity 203 -#define SYS_sched_getaffinity 204 -#define SYS_set_thread_area 205 -#define SYS_io_setup 206 -#define SYS_io_destroy 207 -#define SYS_io_getevents 208 -#define SYS_io_submit 209 -#define SYS_io_cancel 210 -#define SYS_get_thread_area 211 -#define SYS_lookup_dcookie 212 -#define SYS_epoll_create 213 -#define SYS_epoll_ctl_old 214 -#define SYS_epoll_wait_old 215 -#define SYS_remap_file_pages 216 -#define SYS_getdents64 217 -#define SYS_set_tid_address 218 -#define SYS_restart_syscall 219 -#define SYS_semtimedop 220 -#define SYS_fadvise64 221 -#define SYS_timer_create 222 -#define SYS_timer_settime 223 -#define SYS_timer_gettime 224 -#define SYS_timer_getoverrun 225 -#define SYS_timer_delete 226 -#define SYS_clock_settime 227 -#define SYS_clock_gettime 228 -#define SYS_clock_getres 229 -#define SYS_clock_nanosleep 230 -#define SYS_exit_group 231 -#define SYS_epoll_wait 232 -#define SYS_epoll_ctl 233 -#define SYS_tgkill 234 -#define SYS_utimes 235 -#define SYS_vserver 236 -#define SYS_mbind 237 -#define SYS_set_mempolicy 238 -#define SYS_get_mempolicy 239 -#define SYS_mq_open 240 -#define SYS_mq_unlink 241 -#define SYS_mq_timedsend 242 -#define SYS_mq_timedreceive 243 -#define SYS_mq_notify 244 -#define SYS_mq_getsetattr 245 -#define SYS_kexec_load 246 -#define SYS_waitid 247 -#define SYS_add_key 248 -#define SYS_request_key 249 -#define SYS_keyctl 250 -#define SYS_ioprio_set 251 -#define SYS_ioprio_get 252 -#define SYS_inotify_init 253 -#define SYS_inotify_add_watch 254 -#define SYS_inotify_rm_watch 255 -#define SYS_migrate_pages 256 -#define SYS_openat 257 -#define SYS_mkdirat 258 -#define SYS_mknodat 259 -#define SYS_fchownat 260 -#define SYS_futimesat 261 -#define SYS_newfstatat 262 -#define SYS_unlinkat 263 -#define SYS_renameat 264 -#define SYS_linkat 265 -#define SYS_symlinkat 266 -#define SYS_readlinkat 267 -#define SYS_fchmodat 268 -#define SYS_faccessat 269 -#define SYS_pselect6 270 -#define SYS_ppoll 271 -#define SYS_unshare 272 -#define SYS_set_robust_list 273 -#define SYS_get_robust_list 274 -#define SYS_splice 275 -#define SYS_tee 276 -#define SYS_sync_file_range 277 -#define SYS_vmsplice 278 -#define SYS_move_pages 279 -#define SYS_utimensat 280 -#define SYS_epoll_pwait 281 -#define SYS_signalfd 282 -#define SYS_timerfd_create 283 -#define SYS_eventfd 284 -#define SYS_fallocate 285 -#define SYS_timerfd_settime 286 -#define SYS_timerfd_gettime 287 -#define SYS_accept4 288 -#define SYS_signalfd4 289 -#define SYS_eventfd2 290 -#define SYS_epoll_create1 291 -#define SYS_dup3 292 -#define SYS_pipe2 293 -#define SYS_inotify_init1 294 -#define SYS_preadv 295 -#define SYS_pwritev 296 -#define SYS_rt_tgsigqueueinfo 297 -#define SYS_perf_event_open 298 -#define SYS_recvmmsg 299 -#define SYS_fanotify_init 300 -#define SYS_fanotify_mark 301 -#define SYS_prlimit64 302 -#define SYS_name_to_handle_at 303 -#define SYS_open_by_handle_at 304 -#define SYS_clock_adjtime 305 -#define SYS_syncfs 306 -#define SYS_sendmmsg 307 -#define SYS_setns 308 -#define SYS_getcpu 309 -#define SYS_process_vm_readv 310 -#define SYS_process_vm_writev 311 -#define SYS_kcmp 312 -#define SYS_finit_module 313 -#define SYS_sched_setattr 314 -#define SYS_sched_getattr 315 -#define SYS_renameat2 316 -#define SYS_seccomp 317 -#define SYS_getrandom 318 -#define SYS_memfd_create 319 -#define SYS_kexec_file_load 320 -#define SYS_bpf 321 -#define SYS_execveat 322 -#define SYS_userfaultfd 323 -#define SYS_membarrier 324 -#define SYS_mlock2 325 -#define SYS_copy_file_range 326 -#define SYS_preadv2 327 -#define SYS_pwritev2 328 -#define SYS_pkey_mprotect 329 -#define SYS_pkey_alloc 330 -#define SYS_pkey_free 331 -#define SYS_statx 332 -#define SYS_io_pgetevents 333 -#define SYS_rseq 334 \ No newline at end of file diff --git a/src/codegen.cpp b/src/codegen.cpp index 234b28219b..73125c3b55 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -8267,10 +8267,39 @@ static void detect_libc(CodeGen *g) { if (target_can_build_libc(g->zig_target)) { const char *generic_name = target_libc_generic_name(g->zig_target); - + const char *arch_name = target_arch_name(g->zig_target->arch); + const char *abi_name = target_abi_name(g->zig_target->abi); + if (target_is_musl(g->zig_target)) { + // musl has some overrides. its headers are ABI-agnostic and so they all have the "musl" ABI name. + abi_name = "musl"; + // some architectures are handled by the same set of headers + switch (g->zig_target->arch) { + case ZigLLVM_aarch64: + case ZigLLVM_aarch64_be: + arch_name = "aarch64"; + break; + case ZigLLVM_arm: + case ZigLLVM_armeb: + arch_name = "arm"; + break; + case ZigLLVM_mips: + case ZigLLVM_mipsel: + arch_name = "mips"; + break; + case ZigLLVM_mips64: + case ZigLLVM_mips64el: + arch_name = "mips64"; + break; + case ZigLLVM_ppc64: + case ZigLLVM_ppc64le: + arch_name = "powerpc64"; + break; + default: + break; + } + } Buf *arch_include_dir = buf_sprintf("%s" OS_SEP "libc" OS_SEP "include" OS_SEP "%s-%s-%s", - buf_ptr(g->zig_lib_dir), target_arch_name(g->zig_target->arch), - target_os_name(g->zig_target->os), target_abi_name(g->zig_target->abi)); + buf_ptr(g->zig_lib_dir), arch_name, target_os_name(g->zig_target->os), abi_name); Buf *generic_include_dir = buf_sprintf("%s" OS_SEP "libc" OS_SEP "include" OS_SEP "generic-%s", buf_ptr(g->zig_lib_dir), generic_name); Buf *arch_os_include_dir = buf_sprintf("%s" OS_SEP "libc" OS_SEP "include" OS_SEP "%s-%s-any", diff --git a/tools/process_headers.zig b/tools/process_headers.zig index 7ee0ae18f1..f191721316 100644 --- a/tools/process_headers.zig +++ b/tools/process_headers.zig @@ -19,11 +19,27 @@ const assert = std.debug.assert; const LibCTarget = struct { name: []const u8, - zig_arch: ?@TagType(Arch), - zig_abi: ?Abi, + arch: MultiArch, }; -const glibc_targets = []LibCTarget{ +const MultiArch = union(enum) { + aarch64, + arm, + mips, + mips64, + powerpc64, + specific: @TagType(Arch), + + fn eql(a: MultiArch, b: MultiArch) bool { + if (@enumToInt(a) != @enumToInt(b)) + return false; + if (@TagType(MultiArch)(a) != .specific) + return true; + return a.specific == b.specific; + } +}; + +const glibc_targets = [_]LibCTarget{ LibCTarget{ .name = "aarch64_be-linux-gnu", .zig_arch = Arch.aarch64_be, @@ -274,11 +290,6 @@ const glibc_targets = []LibCTarget{ .zig_arch = Arch.mips, .zig_abi = null, }, - LibCTarget{ - .name = "nios2-linux-gnu", - .zig_arch = Arch.nios2, - .zig_abi = Abi.gnu, - }, LibCTarget{ .name = "powerpc64le-linux-gnu", .zig_arch = Arch.powerpc64le, @@ -420,261 +431,52 @@ const glibc_targets = []LibCTarget{ .zig_abi = null, }, }; -const musl_targets = []LibCTarget{ + +const musl_targets = [_]LibCTarget{ LibCTarget{ - .name = "aarch64_be-linux-musl-native", - .zig_arch = Arch.aarch64_be, - .zig_abi = Abi.musl, + .name = "aarch64", + .arch = MultiArch.aarch64, }, LibCTarget{ - .name = "aarch64-linux-musleabi-native", - .zig_arch = Arch.aarch64, - .zig_abi = Abi.musleabi, + .name = "arm", + .arch = MultiArch.arm, }, LibCTarget{ - .name = "armeb-linux-musleabihf-native", - .zig_arch = Arch.armeb, - .zig_abi = Abi.musleabihf, + .name = "i386", + .arch = MultiArch{ .specific = .i386 }, }, LibCTarget{ - .name = "armeb-linux-musleabi-native", - .zig_arch = Arch.armeb, - .zig_abi = Abi.musleabi, + .name = "mips", + .arch = MultiArch.mips, }, LibCTarget{ - .name = "armel-linux-musleabihf-native", - .zig_arch = null, - .zig_abi = Abi.musleabihf, + .name = "mips64", + .arch = MultiArch.mips64, }, LibCTarget{ - .name = "armel-linux-musleabi-native", - .zig_arch = null, - .zig_abi = Abi.musleabi, + .name = "powerpc", + .arch = MultiArch{ .specific = .powerpc }, }, LibCTarget{ - .name = "arm-linux-musleabihf-native", - .zig_arch = Arch.arm, - .zig_abi = Abi.musleabihf, + .name = "powerpc64", + .arch = MultiArch.powerpc64, }, LibCTarget{ - .name = "arm-linux-musleabi-native", - .zig_arch = Arch.arm, - .zig_abi = Abi.musleabi, + .name = "riscv64", + .arch = MultiArch{ .specific = .riscv64 }, }, LibCTarget{ - .name = "armv5l-linux-musleabihf-native", - .zig_arch = null, - .zig_abi = Abi.musleabihf, + .name = "s390x", + .arch = MultiArch{ .specific = .s390x }, }, LibCTarget{ - .name = "armv7l-linux-musleabihf-native", - .zig_arch = null, - .zig_abi = Abi.musleabihf, - }, - LibCTarget{ - .name = "armv7m-linux-musleabi-native", - .zig_arch = null, - .zig_abi = Abi.musleabi, - }, - LibCTarget{ - .name = "armv7r-linux-musleabihf-native", - .zig_arch = null, - .zig_abi = Abi.musleabihf, - }, - LibCTarget{ - .name = "i486-linux-musl-native", - .zig_arch = null, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "i686-linux-musl-native", - .zig_arch = Arch.i386, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "i686-w64-mingw32-native", - .zig_arch = null, - .zig_abi = null, - }, - LibCTarget{ - .name = "m68k-linux-musl-native", - .zig_arch = null, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "microblazeel-linux-musl-native", - .zig_arch = null, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "microblaze-linux-musl-native", - .zig_arch = null, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "mips64el-linux-musln32-native", - .zig_arch = Arch.mips64el, - .zig_abi = null, - }, - LibCTarget{ - .name = "mips64el-linux-musln32sf-native", - .zig_arch = Arch.mips64el, - .zig_abi = null, - }, - LibCTarget{ - .name = "mips64el-linux-musl-native", - .zig_arch = Arch.mips64el, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "mips64-linux-musln32-native", - .zig_arch = Arch.mips64, - .zig_abi = null, - }, - LibCTarget{ - .name = "mips64-linux-musln32sf-native", - .zig_arch = Arch.mips64, - .zig_abi = null, - }, - LibCTarget{ - .name = "mips64-linux-musl-native", - .zig_arch = Arch.mips64, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "mipsel-linux-musln32-native", - .zig_arch = null, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "mipsel-linux-musln32sf-native", - .zig_arch = Arch.mipsel, - .zig_abi = null, - }, - LibCTarget{ - .name = "mipsel-linux-musl-native", - .zig_arch = Arch.mipsel, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "mipsel-linux-muslsf-native", - .zig_arch = Arch.mipsel, - .zig_abi = null, - }, - LibCTarget{ - .name = "mips-linux-musln32sf-native", - .zig_arch = Arch.mips, - .zig_abi = null, - }, - LibCTarget{ - .name = "mips-linux-musl-native", - .zig_arch = Arch.mips, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "mips-linux-muslsf-native", - .zig_arch = Arch.mips, - .zig_abi = null, - }, - LibCTarget{ - .name = "or1k-linux-musl-native", - .zig_arch = null, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "powerpc64le-linux-musl-native", - .zig_arch = Arch.powerpc64le, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "powerpc64-linux-musl-native", - .zig_arch = Arch.powerpc64, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "powerpcle-linux-musl-native", - .zig_arch = null, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "powerpcle-linux-muslsf-native", - .zig_arch = null, - .zig_abi = null, - }, - LibCTarget{ - .name = "powerpc-linux-musl-native", - .zig_arch = Arch.powerpc, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "powerpc-linux-muslsf-native", - .zig_arch = Arch.powerpc, - .zig_abi = null, - }, - LibCTarget{ - .name = "riscv32-linux-musl-native", - .zig_arch = Arch.riscv32, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "riscv64-linux-musl-native", - .zig_arch = Arch.riscv64, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "s390x-linux-musl-native", - .zig_arch = Arch.s390x, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "sh2eb-linux-muslfdpic-native", - .zig_arch = null, - .zig_abi = null, - }, - LibCTarget{ - .name = "sh2eb-linux-musl-native", - .zig_arch = null, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "sh2-linux-muslfdpic-native", - .zig_arch = null, - .zig_abi = null, - }, - LibCTarget{ - .name = "sh2-linux-musl-native", - .zig_arch = null, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "sh4eb-linux-musl-native", - .zig_arch = null, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "sh4-linux-musl-native", - .zig_arch = null, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "x86_64-linux-musl-native", - .zig_arch = Arch.x86_64, - .zig_abi = Abi.musl, - }, - LibCTarget{ - .name = "x86_64-linux-muslx32-native", - .zig_arch = Arch.x86_64, - .zig_abi = null, - }, - LibCTarget{ - .name = "x86_64-w64-mingw32-native", - .zig_arch = null, - .zig_abi = null, + .name = "x86_64", + .arch = MultiArch{ .specific = .x86_64 }, }, }; const DestTarget = struct { - arch: @TagType(Arch), + arch: MultiArch, os: Os, abi: Abi, @@ -685,7 +487,7 @@ const DestTarget = struct { } fn eql(a: DestTarget, b: DestTarget) bool { - return a.arch == b.arch and + return a.arch.eql(b.arch) and a.os == b.os and a.abi == b.abi; } @@ -706,10 +508,15 @@ const HashToContents = std.AutoHashMap([]const u8, Contents); const TargetToHash = std.HashMap(DestTarget, []const u8, DestTarget.hash, DestTarget.eql); const PathTable = std.AutoHashMap([]const u8, *TargetToHash); +const LibCVendor = enum { + musl, + glibc, +}; + pub fn main() !void { var arena = std.heap.ArenaAllocator.init(std.heap.direct_allocator); const allocator = &arena.allocator; - const args = try std.os.argsAlloc(allocator); + const args = try std.process.argsAlloc(allocator); var search_paths = std.ArrayList([]const u8).init(allocator); var opt_out_dir: ?[]const u8 = null; var opt_abi: ?[]const u8 = null; @@ -741,14 +548,22 @@ pub fn main() !void { const out_dir = opt_out_dir orelse usageAndExit(args[0]); const abi_name = opt_abi orelse usageAndExit(args[0]); - const libc_targets = if (std.mem.eql(u8, abi_name, "musl")) - musl_targets + const vendor = if (std.mem.eql(u8, abi_name, "musl")) + LibCVendor.musl else if (std.mem.eql(u8, abi_name, "glibc")) - glibc_targets + LibCVendor.glibc else { std.debug.warn("unrecognized C ABI: {}\n", abi_name); usageAndExit(args[0]); }; + const generic_name = try std.fmt.allocPrint(allocator, "generic-{}", abi_name); + + // TODO compiler crashed when I wrote this the canonical way + var libc_targets: []const LibCTarget = undefined; + switch (vendor) { + .musl => libc_targets = musl_targets, + .glibc => @panic("TODO this regressed"), // glibc_targets, + } var path_table = PathTable.init(allocator); var hash_to_contents = HashToContents.init(allocator); @@ -759,20 +574,29 @@ pub fn main() !void { for (libc_targets) |libc_target| { const dest_target = DestTarget{ - .arch = libc_target.zig_arch orelse continue, - .abi = libc_target.zig_abi orelse continue, - .os = builtin.Os.linux, + .arch = libc_target.arch, + .abi = switch (vendor) { + .musl => .musl, + else => @panic("TODO this regressed"), + }, + .os = .linux, }; search: for (search_paths.toSliceConst()) |search_path| { - const target_include_dir = try std.os.path.join( - allocator, - [][]const u8{ search_path, libc_target.name, "usr", "include" }, - ); + var sub_path: []const []const u8 = undefined; + switch (vendor) { + .musl => { + sub_path = [_][]const u8{ search_path, libc_target.name, "usr", "local", "musl", "include" }; + }, + .glibc => { + sub_path = [_][]const u8{ search_path, libc_target.name, "usr", "include" }; + }, + } + const target_include_dir = try std.fs.path.join(allocator, sub_path); var dir_stack = std.ArrayList([]const u8).init(allocator); try dir_stack.append(target_include_dir); while (dir_stack.popOrNull()) |full_dir_name| { - var dir = std.os.Dir.open(allocator, full_dir_name) catch |err| switch (err) { + var dir = std.fs.Dir.open(allocator, full_dir_name) catch |err| switch (err) { error.FileNotFound => continue :search, error.AccessDenied => continue :search, else => return err, @@ -780,11 +604,11 @@ pub fn main() !void { defer dir.close(); while (try dir.next()) |entry| { - const full_path = try std.os.path.join(allocator, [][]const u8{ full_dir_name, entry.name }); + const full_path = try std.fs.path.join(allocator, [_][]const u8{ full_dir_name, entry.name }); switch (entry.kind) { - std.os.Dir.Entry.Kind.Directory => try dir_stack.append(full_path), - std.os.Dir.Entry.Kind.File => { - const rel_path = try std.os.path.relative(allocator, target_include_dir, full_path); + .Directory => try dir_stack.append(full_path), + .File => { + const rel_path = try std.fs.path.relative(allocator, target_include_dir, full_path); const raw_bytes = try std.io.readFileAlloc(allocator, full_path); const trimmed = std.mem.trim(u8, raw_bytes, " \r\n\t"); total_bytes += raw_bytes.len; @@ -798,7 +622,7 @@ pub fn main() !void { max_bytes_saved += raw_bytes.len; gop.kv.value.hit_count += 1; std.debug.warn( - "duplicate: {} {} ({Bi2})\n", + "duplicate: {} {} ({Bi:2})\n", libc_target.name, rel_path, raw_bytes.len, @@ -829,8 +653,8 @@ pub fn main() !void { std.debug.warn("warning: libc target not found: {}\n", libc_target.name); } } - std.debug.warn("summary: {Bi2} could be reduced to {Bi2}\n", total_bytes, total_bytes - max_bytes_saved); - try std.os.makePath(allocator, out_dir); + std.debug.warn("summary: {Bi:2} could be reduced to {Bi:2}\n", total_bytes, total_bytes - max_bytes_saved); + try std.fs.makePath(allocator, out_dir); var missed_opportunity_bytes: usize = 0; // iterate path_table. for each path, put all the hashes into a list. sort by hit_count. @@ -850,15 +674,15 @@ pub fn main() !void { var best_contents = contents_list.popOrNull().?; if (best_contents.hit_count > 1) { // worth it to make it generic - const full_path = try std.os.path.join(allocator, [][]const u8{ out_dir, "generic", path_kv.key }); - try std.os.makePath(allocator, std.os.path.dirname(full_path).?); + const full_path = try std.fs.path.join(allocator, [_][]const u8{ out_dir, generic_name, path_kv.key }); + try std.fs.makePath(allocator, std.fs.path.dirname(full_path).?); try std.io.writeFile(full_path, best_contents.bytes); best_contents.is_generic = true; while (contents_list.popOrNull()) |contender| { if (contender.hit_count > 1) { const this_missed_bytes = contender.hit_count * contender.bytes.len; missed_opportunity_bytes += this_missed_bytes; - std.debug.warn("Missed opportunity ({Bi2}): {}\n", this_missed_bytes, path_kv.key); + std.debug.warn("Missed opportunity ({Bi:2}): {}\n", this_missed_bytes, path_kv.key); } else break; } } @@ -868,15 +692,19 @@ pub fn main() !void { if (contents.is_generic) continue; const dest_target = hash_kv.key; + const arch_name = switch (dest_target.arch) { + .specific => |a| @tagName(a), + else => @tagName(dest_target.arch), + }; const out_subpath = try std.fmt.allocPrint( allocator, "{}-{}-{}", - @tagName(dest_target.arch), + arch_name, @tagName(dest_target.os), @tagName(dest_target.abi), ); - const full_path = try std.os.path.join(allocator, [][]const u8{ out_dir, out_subpath, path_kv.key }); - try std.os.makePath(allocator, std.os.path.dirname(full_path).?); + const full_path = try std.fs.path.join(allocator, [_][]const u8{ out_dir, out_subpath, path_kv.key }); + try std.fs.makePath(allocator, std.fs.path.dirname(full_path).?); try std.io.writeFile(full_path, contents.bytes); } } @@ -888,5 +716,5 @@ fn usageAndExit(arg0: []const u8) noreturn { std.debug.warn(" subdirectories of search paths look like, e.g. x86_64-linux-gnu\n"); std.debug.warn("--out is a dir that will be created, and populated with the results\n"); std.debug.warn("--abi is either musl or glibc\n"); - std.os.exit(1); + std.process.exit(1); }