From 268a53de823a6750d6256ee1fb1e7707b4b45740 Mon Sep 17 00:00:00 2001 From: Xavier ASUS Date: Fri, 18 Oct 2019 00:31:54 +0200 Subject: sdcc-3.9.0 fork implementing GNU assembler syntax This fork aims to provide better support for stm8-binutils --- support/sdbinutils/include/COPYING | 340 ++ support/sdbinutils/include/COPYING3 | 674 ++++ support/sdbinutils/include/ChangeLog | 34 + support/sdbinutils/include/ChangeLog-0415 | 2183 ++++++++++++ support/sdbinutils/include/ChangeLog-2016 | 841 +++++ support/sdbinutils/include/ChangeLog-2017 | 871 +++++ support/sdbinutils/include/ChangeLog-9103 | 2688 ++++++++++++++ support/sdbinutils/include/MAINTAINERS | 7 + support/sdbinutils/include/alloca-conf.h | 60 + support/sdbinutils/include/ansidecl.h | 393 +++ support/sdbinutils/include/aout/ChangeLog-9115 | 285 ++ support/sdbinutils/include/aout/adobe.h | 319 ++ support/sdbinutils/include/aout/aout64.h | 516 +++ support/sdbinutils/include/aout/ar.h | 55 + support/sdbinutils/include/aout/dynix3.h | 87 + support/sdbinutils/include/aout/encap.h | 135 + support/sdbinutils/include/aout/host.h | 43 + support/sdbinutils/include/aout/hp.h | 83 + support/sdbinutils/include/aout/hp300hpux.h | 131 + support/sdbinutils/include/aout/hppa.h | 22 + support/sdbinutils/include/aout/ranlib.h | 63 + support/sdbinutils/include/aout/reloc.h | 67 + support/sdbinutils/include/aout/stab.def | 282 ++ support/sdbinutils/include/aout/stab_gnu.h | 55 + support/sdbinutils/include/aout/sun4.h | 239 ++ support/sdbinutils/include/bfdlink.h | 944 +++++ support/sdbinutils/include/binary-io.h | 62 + support/sdbinutils/include/bout.h | 192 + support/sdbinutils/include/cgen/ChangeLog-0915 | 44 + support/sdbinutils/include/cgen/basic-modes.h | 52 + support/sdbinutils/include/cgen/basic-ops.h | 347 ++ support/sdbinutils/include/cgen/bitset.h | 56 + support/sdbinutils/include/coff/ChangeLog-0415 | 419 +++ support/sdbinutils/include/coff/ChangeLog-9103 | 1186 +++++++ support/sdbinutils/include/coff/alpha.h | 386 ++ support/sdbinutils/include/coff/apollo.h | 125 + support/sdbinutils/include/coff/arm.h | 129 + support/sdbinutils/include/coff/aux-coff.h | 49 + support/sdbinutils/include/coff/ecoff.h | 411 +++ support/sdbinutils/include/coff/external.h | 269 ++ support/sdbinutils/include/coff/go32exe.h | 36 + support/sdbinutils/include/coff/h8300.h | 55 + support/sdbinutils/include/coff/h8500.h | 47 + support/sdbinutils/include/coff/i386.h | 74 + support/sdbinutils/include/coff/i860.h | 87 + support/sdbinutils/include/coff/i960.h | 320 ++ support/sdbinutils/include/coff/ia64.h | 89 + support/sdbinutils/include/coff/internal.h | 871 +++++ support/sdbinutils/include/coff/m68k.h | 82 + support/sdbinutils/include/coff/m88k.h | 197 ++ support/sdbinutils/include/coff/mcore.h | 72 + support/sdbinutils/include/coff/mips.h | 344 ++ support/sdbinutils/include/coff/mipspe.h | 67 + support/sdbinutils/include/coff/pe.h | 629 ++++ support/sdbinutils/include/coff/powerpc.h | 59 + support/sdbinutils/include/coff/rs6000.h | 353 ++ support/sdbinutils/include/coff/rs6k64.h | 275 ++ support/sdbinutils/include/coff/sh.h | 148 + support/sdbinutils/include/coff/sparc.h | 164 + support/sdbinutils/include/coff/sym.h | 484 +++ support/sdbinutils/include/coff/symconst.h | 184 + support/sdbinutils/include/coff/ti.h | 560 +++ support/sdbinutils/include/coff/tic30.h | 51 + support/sdbinutils/include/coff/tic4x.h | 47 + support/sdbinutils/include/coff/tic54x.h | 60 + support/sdbinutils/include/coff/tic80.h | 123 + support/sdbinutils/include/coff/w65.h | 47 + support/sdbinutils/include/coff/we32k.h | 62 + support/sdbinutils/include/coff/x86_64.h | 57 + support/sdbinutils/include/coff/xcoff.h | 646 ++++ support/sdbinutils/include/coff/z80.h | 60 + support/sdbinutils/include/coff/z8k.h | 49 + support/sdbinutils/include/demangle.h | 723 ++++ support/sdbinutils/include/dis-asm.h | 354 ++ support/sdbinutils/include/dwarf2.def | 799 +++++ support/sdbinutils/include/dwarf2.h | 542 +++ support/sdbinutils/include/dyn-string.h | 72 + support/sdbinutils/include/elf/ChangeLog-0415 | 2348 +++++++++++++ support/sdbinutils/include/elf/ChangeLog-9103 | 1957 +++++++++++ support/sdbinutils/include/elf/aarch64.h | 427 +++ support/sdbinutils/include/elf/alpha.h | 131 + support/sdbinutils/include/elf/arc-cpu.def | 49 + support/sdbinutils/include/elf/arc-reloc.def | 513 +++ support/sdbinutils/include/elf/arc.h | 96 + support/sdbinutils/include/elf/arm.h | 395 +++ support/sdbinutils/include/elf/avr.h | 93 + support/sdbinutils/include/elf/bfin.h | 95 + support/sdbinutils/include/elf/common.h | 1172 +++++++ support/sdbinutils/include/elf/cr16.h | 62 + support/sdbinutils/include/elf/cr16c.h | 258 ++ support/sdbinutils/include/elf/cris.h | 193 + support/sdbinutils/include/elf/crx.h | 53 + support/sdbinutils/include/elf/d10v.h | 38 + support/sdbinutils/include/elf/d30v.h | 42 + support/sdbinutils/include/elf/dlx.h | 61 + support/sdbinutils/include/elf/dwarf.h | 323 ++ support/sdbinutils/include/elf/epiphany.h | 59 + support/sdbinutils/include/elf/external.h | 318 ++ support/sdbinutils/include/elf/fr30.h | 42 + support/sdbinutils/include/elf/frv.h | 130 + support/sdbinutils/include/elf/ft32.h | 42 + support/sdbinutils/include/elf/h8.h | 101 + support/sdbinutils/include/elf/hppa.h | 634 ++++ support/sdbinutils/include/elf/i370.h | 61 + support/sdbinutils/include/elf/i386.h | 80 + support/sdbinutils/include/elf/i860.h | 66 + support/sdbinutils/include/elf/i960.h | 37 + support/sdbinutils/include/elf/ia64.h | 415 +++ support/sdbinutils/include/elf/internal.h | 374 ++ support/sdbinutils/include/elf/ip2k.h | 62 + support/sdbinutils/include/elf/iq2000.h | 58 + support/sdbinutils/include/elf/lm32.h | 56 + support/sdbinutils/include/elf/m32c.h | 67 + support/sdbinutils/include/elf/m32r.h | 122 + support/sdbinutils/include/elf/m68hc11.h | 107 + support/sdbinutils/include/elf/m68k.h | 101 + support/sdbinutils/include/elf/mcore.h | 47 + support/sdbinutils/include/elf/mep.h | 90 + support/sdbinutils/include/elf/metag.h | 91 + support/sdbinutils/include/elf/microblaze.h | 71 + support/sdbinutils/include/elf/mips.h | 1327 +++++++ support/sdbinutils/include/elf/mmix.h | 173 + support/sdbinutils/include/elf/mn10200.h | 40 + support/sdbinutils/include/elf/mn10300.h | 80 + support/sdbinutils/include/elf/moxie.h | 32 + support/sdbinutils/include/elf/msp430.h | 101 + support/sdbinutils/include/elf/mt.h | 46 + support/sdbinutils/include/elf/nds32.h | 299 ++ support/sdbinutils/include/elf/nios2.h | 120 + support/sdbinutils/include/elf/or1k.h | 65 + support/sdbinutils/include/elf/pj.h | 44 + support/sdbinutils/include/elf/ppc.h | 251 ++ support/sdbinutils/include/elf/ppc64.h | 256 ++ support/sdbinutils/include/elf/pru.h | 55 + support/sdbinutils/include/elf/reloc-macros.h | 129 + support/sdbinutils/include/elf/riscv.h | 116 + support/sdbinutils/include/elf/rl78.h | 125 + support/sdbinutils/include/elf/rx.h | 141 + support/sdbinutils/include/elf/s390.h | 148 + support/sdbinutils/include/elf/score.h | 131 + support/sdbinutils/include/elf/sh.h | 257 ++ support/sdbinutils/include/elf/sparc.h | 261 ++ support/sdbinutils/include/elf/spu.h | 61 + support/sdbinutils/include/elf/tic6x-attrs.h | 34 + support/sdbinutils/include/elf/tic6x.h | 166 + support/sdbinutils/include/elf/tilegx.h | 176 + support/sdbinutils/include/elf/tilepro.h | 144 + support/sdbinutils/include/elf/v850.h | 329 ++ support/sdbinutils/include/elf/vax.h | 51 + support/sdbinutils/include/elf/visium.h | 51 + support/sdbinutils/include/elf/vxworks.h | 32 + support/sdbinutils/include/elf/wasm32.h | 30 + support/sdbinutils/include/elf/x86-64.h | 98 + support/sdbinutils/include/elf/xc16x.h | 40 + support/sdbinutils/include/elf/xgate.h | 77 + support/sdbinutils/include/elf/xstormy16.h | 57 + support/sdbinutils/include/elf/xtensa.h | 218 ++ support/sdbinutils/include/environ.h | 35 + support/sdbinutils/include/fibheap.h | 94 + support/sdbinutils/include/filenames.h | 99 + support/sdbinutils/include/floatformat.h | 159 + support/sdbinutils/include/fnmatch.h | 70 + support/sdbinutils/include/fopen-bin.h | 44 + support/sdbinutils/include/fopen-same.h | 44 + support/sdbinutils/include/fopen-vms.h | 42 + support/sdbinutils/include/gcc-c-fe.def | 222 ++ support/sdbinutils/include/gcc-c-interface.h | 211 ++ support/sdbinutils/include/gcc-cp-fe.def | 1050 ++++++ support/sdbinutils/include/gcc-cp-interface.h | 496 +++ support/sdbinutils/include/gcc-interface.h | 194 ++ support/sdbinutils/include/gdb/ChangeLog | 354 ++ support/sdbinutils/include/gdb/callback.h | 347 ++ support/sdbinutils/include/gdb/fileio.h | 144 + support/sdbinutils/include/gdb/gdb-index.h | 99 + support/sdbinutils/include/gdb/remote-sim.h | 290 ++ support/sdbinutils/include/gdb/section-scripts.h | 62 + support/sdbinutils/include/gdb/signals.def | 202 ++ support/sdbinutils/include/gdb/signals.h | 58 + support/sdbinutils/include/gdb/sim-aarch64.h | 48 + support/sdbinutils/include/gdb/sim-arm.h | 104 + support/sdbinutils/include/gdb/sim-bfin.h | 82 + support/sdbinutils/include/gdb/sim-cr16.h | 66 + support/sdbinutils/include/gdb/sim-d10v.h | 110 + support/sdbinutils/include/gdb/sim-frv.h | 43 + support/sdbinutils/include/gdb/sim-ft32.h | 35 + support/sdbinutils/include/gdb/sim-h8300.h | 69 + support/sdbinutils/include/gdb/sim-lm32.h | 68 + support/sdbinutils/include/gdb/sim-m32c.h | 62 + support/sdbinutils/include/gdb/sim-ppc.h | 773 ++++ support/sdbinutils/include/gdb/sim-rl78.h | 76 + support/sdbinutils/include/gdb/sim-rx.h | 56 + support/sdbinutils/include/gdb/sim-sh.h | 161 + support/sdbinutils/include/getopt.h | 143 + support/sdbinutils/include/hashtab.h | 204 ++ support/sdbinutils/include/hp-symtab.h | 1867 ++++++++++ support/sdbinutils/include/ieee.h | 165 + support/sdbinutils/include/leb128.h | 136 + support/sdbinutils/include/libiberty.h | 750 ++++ support/sdbinutils/include/longlong.h | 1722 +++++++++ support/sdbinutils/include/lto-symtab.h | 41 + support/sdbinutils/include/mach-o/ChangeLog-1115 | 136 + support/sdbinutils/include/mach-o/arm.h | 36 + support/sdbinutils/include/mach-o/arm64.h | 50 + support/sdbinutils/include/mach-o/codesign.h | 84 + support/sdbinutils/include/mach-o/external.h | 419 +++ support/sdbinutils/include/mach-o/loader.h | 454 +++ support/sdbinutils/include/mach-o/reloc.h | 32 + support/sdbinutils/include/mach-o/unwind.h | 228 ++ support/sdbinutils/include/mach-o/x86-64.h | 36 + support/sdbinutils/include/md5.h | 154 + support/sdbinutils/include/nlm/ChangeLog-9315 | 127 + support/sdbinutils/include/nlm/alpha-ext.h | 167 + support/sdbinutils/include/nlm/common.h | 123 + support/sdbinutils/include/nlm/external.h | 172 + support/sdbinutils/include/nlm/i386-ext.h | 117 + support/sdbinutils/include/nlm/internal.h | 309 ++ support/sdbinutils/include/nlm/ppc-ext.h | 164 + support/sdbinutils/include/nlm/sparc32-ext.h | 121 + support/sdbinutils/include/oasys.h | 192 + support/sdbinutils/include/objalloc.h | 115 + support/sdbinutils/include/obstack.h | 535 +++ support/sdbinutils/include/opcode/ChangeLog-0415 | 2596 ++++++++++++++ support/sdbinutils/include/opcode/ChangeLog-9103 | 3131 +++++++++++++++++ support/sdbinutils/include/opcode/aarch64.h | 1188 +++++++ support/sdbinutils/include/opcode/alpha.h | 238 ++ support/sdbinutils/include/opcode/arc-attrs.h | 72 + support/sdbinutils/include/opcode/arc-func.h | 294 ++ support/sdbinutils/include/opcode/arc.h | 670 ++++ support/sdbinutils/include/opcode/arm.h | 417 +++ support/sdbinutils/include/opcode/avr.h | 313 ++ support/sdbinutils/include/opcode/bfin.h | 1761 ++++++++++ support/sdbinutils/include/opcode/cgen.h | 1487 ++++++++ support/sdbinutils/include/opcode/convex.h | 1708 +++++++++ support/sdbinutils/include/opcode/cr16.h | 443 +++ support/sdbinutils/include/opcode/cris.h | 367 ++ support/sdbinutils/include/opcode/crx.h | 416 +++ support/sdbinutils/include/opcode/d10v.h | 216 ++ support/sdbinutils/include/opcode/d30v.h | 295 ++ support/sdbinutils/include/opcode/dlx.h | 283 ++ support/sdbinutils/include/opcode/ft32.h | 489 +++ support/sdbinutils/include/opcode/h8300.h | 1892 ++++++++++ support/sdbinutils/include/opcode/hppa.h | 1090 ++++++ support/sdbinutils/include/opcode/i370.h | 266 ++ support/sdbinutils/include/opcode/i386.h | 147 + support/sdbinutils/include/opcode/i860.h | 506 +++ support/sdbinutils/include/opcode/i960.h | 525 +++ support/sdbinutils/include/opcode/ia64.h | 428 +++ support/sdbinutils/include/opcode/m68hc11.h | 455 +++ support/sdbinutils/include/opcode/m68k.h | 377 ++ support/sdbinutils/include/opcode/m88k.h | 454 +++ support/sdbinutils/include/opcode/metag.h | 2087 +++++++++++ support/sdbinutils/include/opcode/mips.h | 2356 +++++++++++++ support/sdbinutils/include/opcode/mmix.h | 187 + support/sdbinutils/include/opcode/mn10200.h | 111 + support/sdbinutils/include/opcode/mn10300.h | 170 + support/sdbinutils/include/opcode/moxie.h | 74 + support/sdbinutils/include/opcode/msp430-decode.h | 131 + support/sdbinutils/include/opcode/msp430.h | 200 ++ support/sdbinutils/include/opcode/nds32.h | 831 +++++ support/sdbinutils/include/opcode/nios2.h | 235 ++ support/sdbinutils/include/opcode/nios2r1.h | 474 +++ support/sdbinutils/include/opcode/nios2r2.h | 1081 ++++++ support/sdbinutils/include/opcode/np1.h | 421 +++ support/sdbinutils/include/opcode/ns32k.h | 487 +++ support/sdbinutils/include/opcode/pdp11.h | 84 + support/sdbinutils/include/opcode/pj.h | 49 + support/sdbinutils/include/opcode/pn.h | 283 ++ support/sdbinutils/include/opcode/ppc.h | 503 +++ support/sdbinutils/include/opcode/pru.h | 411 +++ support/sdbinutils/include/opcode/pyr.h | 305 ++ support/sdbinutils/include/opcode/riscv-opc.h | 1376 ++++++++ support/sdbinutils/include/opcode/riscv.h | 344 ++ support/sdbinutils/include/opcode/rl78.h | 182 + support/sdbinutils/include/opcode/rx.h | 248 ++ support/sdbinutils/include/opcode/s390.h | 173 + support/sdbinutils/include/opcode/score-datadep.h | 65 + support/sdbinutils/include/opcode/score-inst.h | 236 ++ support/sdbinutils/include/opcode/sparc.h | 344 ++ support/sdbinutils/include/opcode/spu-insns.h | 417 +++ support/sdbinutils/include/opcode/spu.h | 125 + support/sdbinutils/include/opcode/tahoe.h | 232 ++ support/sdbinutils/include/opcode/tic30.h | 691 ++++ support/sdbinutils/include/opcode/tic4x.h | 1079 ++++++ support/sdbinutils/include/opcode/tic54x.h | 163 + .../include/opcode/tic6x-control-registers.h | 55 + .../sdbinutils/include/opcode/tic6x-insn-formats.h | 616 ++++ .../sdbinutils/include/opcode/tic6x-opcode-table.h | 3677 ++++++++++++++++++++ support/sdbinutils/include/opcode/tic6x.h | 726 ++++ support/sdbinutils/include/opcode/tic80.h | 283 ++ support/sdbinutils/include/opcode/tilegx.h | 1310 +++++++ support/sdbinutils/include/opcode/tilepro.h | 1638 +++++++++ support/sdbinutils/include/opcode/v850.h | 248 ++ support/sdbinutils/include/opcode/vax.h | 383 ++ support/sdbinutils/include/opcode/visium.h | 338 ++ support/sdbinutils/include/opcode/wasm.h | 226 ++ support/sdbinutils/include/opcode/xgate.h | 100 + support/sdbinutils/include/os9k.h | 181 + support/sdbinutils/include/partition.h | 82 + support/sdbinutils/include/plugin-api.h | 473 +++ support/sdbinutils/include/progress.h | 38 + support/sdbinutils/include/safe-ctype.h | 150 + support/sdbinutils/include/sha1.h | 145 + support/sdbinutils/include/simple-object.h | 212 ++ support/sdbinutils/include/som/ChangeLog-1015 | 28 + support/sdbinutils/include/som/aout.h | 249 ++ support/sdbinutils/include/som/clock.h | 30 + support/sdbinutils/include/som/internal.h | 206 ++ support/sdbinutils/include/som/lst.h | 93 + support/sdbinutils/include/som/reloc.h | 79 + support/sdbinutils/include/sort.h | 48 + support/sdbinutils/include/splay-tree.h | 156 + support/sdbinutils/include/symcat.h | 55 + support/sdbinutils/include/timeval-utils.h | 40 + support/sdbinutils/include/vms/ChangeLog-1015 | 95 + support/sdbinutils/include/vms/dcx.h | 50 + support/sdbinutils/include/vms/dmt.h | 48 + support/sdbinutils/include/vms/dsc.h | 129 + support/sdbinutils/include/vms/dst.h | 274 ++ support/sdbinutils/include/vms/eeom.h | 62 + support/sdbinutils/include/vms/egps.h | 64 + support/sdbinutils/include/vms/egsd.h | 60 + support/sdbinutils/include/vms/egst.h | 39 + support/sdbinutils/include/vms/egsy.h | 54 + support/sdbinutils/include/vms/eiaf.h | 80 + support/sdbinutils/include/vms/eicp.h | 38 + support/sdbinutils/include/vms/eidc.h | 49 + support/sdbinutils/include/vms/eiha.h | 54 + support/sdbinutils/include/vms/eihd.h | 145 + support/sdbinutils/include/vms/eihi.h | 50 + support/sdbinutils/include/vms/eihs.h | 62 + support/sdbinutils/include/vms/eihvn.h | 58 + support/sdbinutils/include/vms/eisd.h | 118 + support/sdbinutils/include/vms/emh.h | 79 + support/sdbinutils/include/vms/eobjrec.h | 48 + support/sdbinutils/include/vms/esdf.h | 41 + support/sdbinutils/include/vms/esdfm.h | 49 + support/sdbinutils/include/vms/esdfv.h | 49 + support/sdbinutils/include/vms/esgps.h | 72 + support/sdbinutils/include/vms/esrf.h | 36 + support/sdbinutils/include/vms/etir.h | 114 + support/sdbinutils/include/vms/internal.h | 63 + support/sdbinutils/include/vms/lbr.h | 332 ++ support/sdbinutils/include/vms/prt.h | 43 + support/sdbinutils/include/vms/shl.h | 55 + support/sdbinutils/include/vtv-change-permission.h | 58 + support/sdbinutils/include/xregex.h | 29 + support/sdbinutils/include/xregex2.h | 564 +++ support/sdbinutils/include/xtensa-config.h | 176 + support/sdbinutils/include/xtensa-isa-internal.h | 234 ++ support/sdbinutils/include/xtensa-isa.h | 813 +++++ 350 files changed, 111127 insertions(+) create mode 100644 support/sdbinutils/include/COPYING create mode 100644 support/sdbinutils/include/COPYING3 create mode 100644 support/sdbinutils/include/ChangeLog create mode 100644 support/sdbinutils/include/ChangeLog-0415 create mode 100644 support/sdbinutils/include/ChangeLog-2016 create mode 100644 support/sdbinutils/include/ChangeLog-2017 create mode 100644 support/sdbinutils/include/ChangeLog-9103 create mode 100644 support/sdbinutils/include/MAINTAINERS create mode 100644 support/sdbinutils/include/alloca-conf.h create mode 100644 support/sdbinutils/include/ansidecl.h create mode 100644 support/sdbinutils/include/aout/ChangeLog-9115 create mode 100644 support/sdbinutils/include/aout/adobe.h create mode 100644 support/sdbinutils/include/aout/aout64.h create mode 100644 support/sdbinutils/include/aout/ar.h create mode 100644 support/sdbinutils/include/aout/dynix3.h create mode 100644 support/sdbinutils/include/aout/encap.h create mode 100644 support/sdbinutils/include/aout/host.h create mode 100644 support/sdbinutils/include/aout/hp.h create mode 100644 support/sdbinutils/include/aout/hp300hpux.h create mode 100644 support/sdbinutils/include/aout/hppa.h create mode 100644 support/sdbinutils/include/aout/ranlib.h create mode 100644 support/sdbinutils/include/aout/reloc.h create mode 100644 support/sdbinutils/include/aout/stab.def create mode 100644 support/sdbinutils/include/aout/stab_gnu.h create mode 100644 support/sdbinutils/include/aout/sun4.h create mode 100644 support/sdbinutils/include/bfdlink.h create mode 100644 support/sdbinutils/include/binary-io.h create mode 100644 support/sdbinutils/include/bout.h create mode 100644 support/sdbinutils/include/cgen/ChangeLog-0915 create mode 100644 support/sdbinutils/include/cgen/basic-modes.h create mode 100644 support/sdbinutils/include/cgen/basic-ops.h create mode 100644 support/sdbinutils/include/cgen/bitset.h create mode 100644 support/sdbinutils/include/coff/ChangeLog-0415 create mode 100644 support/sdbinutils/include/coff/ChangeLog-9103 create mode 100644 support/sdbinutils/include/coff/alpha.h create mode 100644 support/sdbinutils/include/coff/apollo.h create mode 100644 support/sdbinutils/include/coff/arm.h create mode 100644 support/sdbinutils/include/coff/aux-coff.h create mode 100644 support/sdbinutils/include/coff/ecoff.h create mode 100644 support/sdbinutils/include/coff/external.h create mode 100644 support/sdbinutils/include/coff/go32exe.h create mode 100644 support/sdbinutils/include/coff/h8300.h create mode 100644 support/sdbinutils/include/coff/h8500.h create mode 100644 support/sdbinutils/include/coff/i386.h create mode 100644 support/sdbinutils/include/coff/i860.h create mode 100644 support/sdbinutils/include/coff/i960.h create mode 100644 support/sdbinutils/include/coff/ia64.h create mode 100644 support/sdbinutils/include/coff/internal.h create mode 100644 support/sdbinutils/include/coff/m68k.h create mode 100644 support/sdbinutils/include/coff/m88k.h create mode 100644 support/sdbinutils/include/coff/mcore.h create mode 100644 support/sdbinutils/include/coff/mips.h create mode 100644 support/sdbinutils/include/coff/mipspe.h create mode 100644 support/sdbinutils/include/coff/pe.h create mode 100644 support/sdbinutils/include/coff/powerpc.h create mode 100644 support/sdbinutils/include/coff/rs6000.h create mode 100644 support/sdbinutils/include/coff/rs6k64.h create mode 100644 support/sdbinutils/include/coff/sh.h create mode 100644 support/sdbinutils/include/coff/sparc.h create mode 100644 support/sdbinutils/include/coff/sym.h create mode 100644 support/sdbinutils/include/coff/symconst.h create mode 100644 support/sdbinutils/include/coff/ti.h create mode 100644 support/sdbinutils/include/coff/tic30.h create mode 100644 support/sdbinutils/include/coff/tic4x.h create mode 100644 support/sdbinutils/include/coff/tic54x.h create mode 100644 support/sdbinutils/include/coff/tic80.h create mode 100644 support/sdbinutils/include/coff/w65.h create mode 100644 support/sdbinutils/include/coff/we32k.h create mode 100644 support/sdbinutils/include/coff/x86_64.h create mode 100644 support/sdbinutils/include/coff/xcoff.h create mode 100644 support/sdbinutils/include/coff/z80.h create mode 100644 support/sdbinutils/include/coff/z8k.h create mode 100644 support/sdbinutils/include/demangle.h create mode 100644 support/sdbinutils/include/dis-asm.h create mode 100644 support/sdbinutils/include/dwarf2.def create mode 100644 support/sdbinutils/include/dwarf2.h create mode 100644 support/sdbinutils/include/dyn-string.h create mode 100644 support/sdbinutils/include/elf/ChangeLog-0415 create mode 100644 support/sdbinutils/include/elf/ChangeLog-9103 create mode 100644 support/sdbinutils/include/elf/aarch64.h create mode 100644 support/sdbinutils/include/elf/alpha.h create mode 100644 support/sdbinutils/include/elf/arc-cpu.def create mode 100644 support/sdbinutils/include/elf/arc-reloc.def create mode 100644 support/sdbinutils/include/elf/arc.h create mode 100644 support/sdbinutils/include/elf/arm.h create mode 100644 support/sdbinutils/include/elf/avr.h create mode 100644 support/sdbinutils/include/elf/bfin.h create mode 100644 support/sdbinutils/include/elf/common.h create mode 100644 support/sdbinutils/include/elf/cr16.h create mode 100644 support/sdbinutils/include/elf/cr16c.h create mode 100644 support/sdbinutils/include/elf/cris.h create mode 100644 support/sdbinutils/include/elf/crx.h create mode 100644 support/sdbinutils/include/elf/d10v.h create mode 100644 support/sdbinutils/include/elf/d30v.h create mode 100644 support/sdbinutils/include/elf/dlx.h create mode 100644 support/sdbinutils/include/elf/dwarf.h create mode 100755 support/sdbinutils/include/elf/epiphany.h create mode 100644 support/sdbinutils/include/elf/external.h create mode 100644 support/sdbinutils/include/elf/fr30.h create mode 100644 support/sdbinutils/include/elf/frv.h create mode 100644 support/sdbinutils/include/elf/ft32.h create mode 100644 support/sdbinutils/include/elf/h8.h create mode 100644 support/sdbinutils/include/elf/hppa.h create mode 100644 support/sdbinutils/include/elf/i370.h create mode 100644 support/sdbinutils/include/elf/i386.h create mode 100644 support/sdbinutils/include/elf/i860.h create mode 100644 support/sdbinutils/include/elf/i960.h create mode 100644 support/sdbinutils/include/elf/ia64.h create mode 100644 support/sdbinutils/include/elf/internal.h create mode 100644 support/sdbinutils/include/elf/ip2k.h create mode 100644 support/sdbinutils/include/elf/iq2000.h create mode 100644 support/sdbinutils/include/elf/lm32.h create mode 100644 support/sdbinutils/include/elf/m32c.h create mode 100644 support/sdbinutils/include/elf/m32r.h create mode 100644 support/sdbinutils/include/elf/m68hc11.h create mode 100644 support/sdbinutils/include/elf/m68k.h create mode 100644 support/sdbinutils/include/elf/mcore.h create mode 100644 support/sdbinutils/include/elf/mep.h create mode 100644 support/sdbinutils/include/elf/metag.h create mode 100644 support/sdbinutils/include/elf/microblaze.h create mode 100644 support/sdbinutils/include/elf/mips.h create mode 100644 support/sdbinutils/include/elf/mmix.h create mode 100644 support/sdbinutils/include/elf/mn10200.h create mode 100644 support/sdbinutils/include/elf/mn10300.h create mode 100644 support/sdbinutils/include/elf/moxie.h create mode 100644 support/sdbinutils/include/elf/msp430.h create mode 100644 support/sdbinutils/include/elf/mt.h create mode 100644 support/sdbinutils/include/elf/nds32.h create mode 100644 support/sdbinutils/include/elf/nios2.h create mode 100644 support/sdbinutils/include/elf/or1k.h create mode 100644 support/sdbinutils/include/elf/pj.h create mode 100644 support/sdbinutils/include/elf/ppc.h create mode 100644 support/sdbinutils/include/elf/ppc64.h create mode 100644 support/sdbinutils/include/elf/pru.h create mode 100644 support/sdbinutils/include/elf/reloc-macros.h create mode 100644 support/sdbinutils/include/elf/riscv.h create mode 100644 support/sdbinutils/include/elf/rl78.h create mode 100644 support/sdbinutils/include/elf/rx.h create mode 100644 support/sdbinutils/include/elf/s390.h create mode 100644 support/sdbinutils/include/elf/score.h create mode 100644 support/sdbinutils/include/elf/sh.h create mode 100644 support/sdbinutils/include/elf/sparc.h create mode 100644 support/sdbinutils/include/elf/spu.h create mode 100644 support/sdbinutils/include/elf/tic6x-attrs.h create mode 100644 support/sdbinutils/include/elf/tic6x.h create mode 100644 support/sdbinutils/include/elf/tilegx.h create mode 100644 support/sdbinutils/include/elf/tilepro.h create mode 100644 support/sdbinutils/include/elf/v850.h create mode 100644 support/sdbinutils/include/elf/vax.h create mode 100644 support/sdbinutils/include/elf/visium.h create mode 100644 support/sdbinutils/include/elf/vxworks.h create mode 100644 support/sdbinutils/include/elf/wasm32.h create mode 100644 support/sdbinutils/include/elf/x86-64.h create mode 100644 support/sdbinutils/include/elf/xc16x.h create mode 100644 support/sdbinutils/include/elf/xgate.h create mode 100644 support/sdbinutils/include/elf/xstormy16.h create mode 100644 support/sdbinutils/include/elf/xtensa.h create mode 100644 support/sdbinutils/include/environ.h create mode 100644 support/sdbinutils/include/fibheap.h create mode 100644 support/sdbinutils/include/filenames.h create mode 100644 support/sdbinutils/include/floatformat.h create mode 100644 support/sdbinutils/include/fnmatch.h create mode 100644 support/sdbinutils/include/fopen-bin.h create mode 100644 support/sdbinutils/include/fopen-same.h create mode 100644 support/sdbinutils/include/fopen-vms.h create mode 100644 support/sdbinutils/include/gcc-c-fe.def create mode 100644 support/sdbinutils/include/gcc-c-interface.h create mode 100644 support/sdbinutils/include/gcc-cp-fe.def create mode 100644 support/sdbinutils/include/gcc-cp-interface.h create mode 100644 support/sdbinutils/include/gcc-interface.h create mode 100644 support/sdbinutils/include/gdb/ChangeLog create mode 100644 support/sdbinutils/include/gdb/callback.h create mode 100644 support/sdbinutils/include/gdb/fileio.h create mode 100644 support/sdbinutils/include/gdb/gdb-index.h create mode 100644 support/sdbinutils/include/gdb/remote-sim.h create mode 100644 support/sdbinutils/include/gdb/section-scripts.h create mode 100644 support/sdbinutils/include/gdb/signals.def create mode 100644 support/sdbinutils/include/gdb/signals.h create mode 100644 support/sdbinutils/include/gdb/sim-aarch64.h create mode 100644 support/sdbinutils/include/gdb/sim-arm.h create mode 100644 support/sdbinutils/include/gdb/sim-bfin.h create mode 100644 support/sdbinutils/include/gdb/sim-cr16.h create mode 100644 support/sdbinutils/include/gdb/sim-d10v.h create mode 100644 support/sdbinutils/include/gdb/sim-frv.h create mode 100644 support/sdbinutils/include/gdb/sim-ft32.h create mode 100644 support/sdbinutils/include/gdb/sim-h8300.h create mode 100644 support/sdbinutils/include/gdb/sim-lm32.h create mode 100644 support/sdbinutils/include/gdb/sim-m32c.h create mode 100644 support/sdbinutils/include/gdb/sim-ppc.h create mode 100644 support/sdbinutils/include/gdb/sim-rl78.h create mode 100644 support/sdbinutils/include/gdb/sim-rx.h create mode 100644 support/sdbinutils/include/gdb/sim-sh.h create mode 100644 support/sdbinutils/include/getopt.h create mode 100644 support/sdbinutils/include/hashtab.h create mode 100644 support/sdbinutils/include/hp-symtab.h create mode 100644 support/sdbinutils/include/ieee.h create mode 100644 support/sdbinutils/include/leb128.h create mode 100644 support/sdbinutils/include/libiberty.h create mode 100644 support/sdbinutils/include/longlong.h create mode 100644 support/sdbinutils/include/lto-symtab.h create mode 100644 support/sdbinutils/include/mach-o/ChangeLog-1115 create mode 100644 support/sdbinutils/include/mach-o/arm.h create mode 100644 support/sdbinutils/include/mach-o/arm64.h create mode 100644 support/sdbinutils/include/mach-o/codesign.h create mode 100644 support/sdbinutils/include/mach-o/external.h create mode 100644 support/sdbinutils/include/mach-o/loader.h create mode 100644 support/sdbinutils/include/mach-o/reloc.h create mode 100644 support/sdbinutils/include/mach-o/unwind.h create mode 100644 support/sdbinutils/include/mach-o/x86-64.h create mode 100644 support/sdbinutils/include/md5.h create mode 100644 support/sdbinutils/include/nlm/ChangeLog-9315 create mode 100644 support/sdbinutils/include/nlm/alpha-ext.h create mode 100644 support/sdbinutils/include/nlm/common.h create mode 100644 support/sdbinutils/include/nlm/external.h create mode 100644 support/sdbinutils/include/nlm/i386-ext.h create mode 100644 support/sdbinutils/include/nlm/internal.h create mode 100644 support/sdbinutils/include/nlm/ppc-ext.h create mode 100644 support/sdbinutils/include/nlm/sparc32-ext.h create mode 100644 support/sdbinutils/include/oasys.h create mode 100644 support/sdbinutils/include/objalloc.h create mode 100644 support/sdbinutils/include/obstack.h create mode 100644 support/sdbinutils/include/opcode/ChangeLog-0415 create mode 100644 support/sdbinutils/include/opcode/ChangeLog-9103 create mode 100644 support/sdbinutils/include/opcode/aarch64.h create mode 100644 support/sdbinutils/include/opcode/alpha.h create mode 100644 support/sdbinutils/include/opcode/arc-attrs.h create mode 100644 support/sdbinutils/include/opcode/arc-func.h create mode 100644 support/sdbinutils/include/opcode/arc.h create mode 100644 support/sdbinutils/include/opcode/arm.h create mode 100644 support/sdbinutils/include/opcode/avr.h create mode 100644 support/sdbinutils/include/opcode/bfin.h create mode 100644 support/sdbinutils/include/opcode/cgen.h create mode 100644 support/sdbinutils/include/opcode/convex.h create mode 100644 support/sdbinutils/include/opcode/cr16.h create mode 100644 support/sdbinutils/include/opcode/cris.h create mode 100644 support/sdbinutils/include/opcode/crx.h create mode 100644 support/sdbinutils/include/opcode/d10v.h create mode 100644 support/sdbinutils/include/opcode/d30v.h create mode 100644 support/sdbinutils/include/opcode/dlx.h create mode 100644 support/sdbinutils/include/opcode/ft32.h create mode 100644 support/sdbinutils/include/opcode/h8300.h create mode 100644 support/sdbinutils/include/opcode/hppa.h create mode 100644 support/sdbinutils/include/opcode/i370.h create mode 100644 support/sdbinutils/include/opcode/i386.h create mode 100644 support/sdbinutils/include/opcode/i860.h create mode 100644 support/sdbinutils/include/opcode/i960.h create mode 100644 support/sdbinutils/include/opcode/ia64.h create mode 100644 support/sdbinutils/include/opcode/m68hc11.h create mode 100644 support/sdbinutils/include/opcode/m68k.h create mode 100644 support/sdbinutils/include/opcode/m88k.h create mode 100644 support/sdbinutils/include/opcode/metag.h create mode 100644 support/sdbinutils/include/opcode/mips.h create mode 100644 support/sdbinutils/include/opcode/mmix.h create mode 100644 support/sdbinutils/include/opcode/mn10200.h create mode 100644 support/sdbinutils/include/opcode/mn10300.h create mode 100644 support/sdbinutils/include/opcode/moxie.h create mode 100644 support/sdbinutils/include/opcode/msp430-decode.h create mode 100644 support/sdbinutils/include/opcode/msp430.h create mode 100644 support/sdbinutils/include/opcode/nds32.h create mode 100644 support/sdbinutils/include/opcode/nios2.h create mode 100644 support/sdbinutils/include/opcode/nios2r1.h create mode 100644 support/sdbinutils/include/opcode/nios2r2.h create mode 100644 support/sdbinutils/include/opcode/np1.h create mode 100644 support/sdbinutils/include/opcode/ns32k.h create mode 100644 support/sdbinutils/include/opcode/pdp11.h create mode 100644 support/sdbinutils/include/opcode/pj.h create mode 100644 support/sdbinutils/include/opcode/pn.h create mode 100644 support/sdbinutils/include/opcode/ppc.h create mode 100644 support/sdbinutils/include/opcode/pru.h create mode 100644 support/sdbinutils/include/opcode/pyr.h create mode 100644 support/sdbinutils/include/opcode/riscv-opc.h create mode 100644 support/sdbinutils/include/opcode/riscv.h create mode 100644 support/sdbinutils/include/opcode/rl78.h create mode 100644 support/sdbinutils/include/opcode/rx.h create mode 100644 support/sdbinutils/include/opcode/s390.h create mode 100644 support/sdbinutils/include/opcode/score-datadep.h create mode 100644 support/sdbinutils/include/opcode/score-inst.h create mode 100644 support/sdbinutils/include/opcode/sparc.h create mode 100644 support/sdbinutils/include/opcode/spu-insns.h create mode 100644 support/sdbinutils/include/opcode/spu.h create mode 100644 support/sdbinutils/include/opcode/tahoe.h create mode 100644 support/sdbinutils/include/opcode/tic30.h create mode 100644 support/sdbinutils/include/opcode/tic4x.h create mode 100644 support/sdbinutils/include/opcode/tic54x.h create mode 100644 support/sdbinutils/include/opcode/tic6x-control-registers.h create mode 100644 support/sdbinutils/include/opcode/tic6x-insn-formats.h create mode 100644 support/sdbinutils/include/opcode/tic6x-opcode-table.h create mode 100644 support/sdbinutils/include/opcode/tic6x.h create mode 100644 support/sdbinutils/include/opcode/tic80.h create mode 100644 support/sdbinutils/include/opcode/tilegx.h create mode 100644 support/sdbinutils/include/opcode/tilepro.h create mode 100644 support/sdbinutils/include/opcode/v850.h create mode 100644 support/sdbinutils/include/opcode/vax.h create mode 100644 support/sdbinutils/include/opcode/visium.h create mode 100644 support/sdbinutils/include/opcode/wasm.h create mode 100644 support/sdbinutils/include/opcode/xgate.h create mode 100644 support/sdbinutils/include/os9k.h create mode 100644 support/sdbinutils/include/partition.h create mode 100644 support/sdbinutils/include/plugin-api.h create mode 100644 support/sdbinutils/include/progress.h create mode 100644 support/sdbinutils/include/safe-ctype.h create mode 100644 support/sdbinutils/include/sha1.h create mode 100644 support/sdbinutils/include/simple-object.h create mode 100644 support/sdbinutils/include/som/ChangeLog-1015 create mode 100644 support/sdbinutils/include/som/aout.h create mode 100644 support/sdbinutils/include/som/clock.h create mode 100644 support/sdbinutils/include/som/internal.h create mode 100644 support/sdbinutils/include/som/lst.h create mode 100644 support/sdbinutils/include/som/reloc.h create mode 100644 support/sdbinutils/include/sort.h create mode 100644 support/sdbinutils/include/splay-tree.h create mode 100644 support/sdbinutils/include/symcat.h create mode 100644 support/sdbinutils/include/timeval-utils.h create mode 100644 support/sdbinutils/include/vms/ChangeLog-1015 create mode 100644 support/sdbinutils/include/vms/dcx.h create mode 100644 support/sdbinutils/include/vms/dmt.h create mode 100644 support/sdbinutils/include/vms/dsc.h create mode 100644 support/sdbinutils/include/vms/dst.h create mode 100644 support/sdbinutils/include/vms/eeom.h create mode 100644 support/sdbinutils/include/vms/egps.h create mode 100644 support/sdbinutils/include/vms/egsd.h create mode 100644 support/sdbinutils/include/vms/egst.h create mode 100644 support/sdbinutils/include/vms/egsy.h create mode 100644 support/sdbinutils/include/vms/eiaf.h create mode 100644 support/sdbinutils/include/vms/eicp.h create mode 100644 support/sdbinutils/include/vms/eidc.h create mode 100644 support/sdbinutils/include/vms/eiha.h create mode 100644 support/sdbinutils/include/vms/eihd.h create mode 100644 support/sdbinutils/include/vms/eihi.h create mode 100644 support/sdbinutils/include/vms/eihs.h create mode 100644 support/sdbinutils/include/vms/eihvn.h create mode 100644 support/sdbinutils/include/vms/eisd.h create mode 100644 support/sdbinutils/include/vms/emh.h create mode 100644 support/sdbinutils/include/vms/eobjrec.h create mode 100644 support/sdbinutils/include/vms/esdf.h create mode 100644 support/sdbinutils/include/vms/esdfm.h create mode 100644 support/sdbinutils/include/vms/esdfv.h create mode 100644 support/sdbinutils/include/vms/esgps.h create mode 100644 support/sdbinutils/include/vms/esrf.h create mode 100644 support/sdbinutils/include/vms/etir.h create mode 100644 support/sdbinutils/include/vms/internal.h create mode 100644 support/sdbinutils/include/vms/lbr.h create mode 100644 support/sdbinutils/include/vms/prt.h create mode 100644 support/sdbinutils/include/vms/shl.h create mode 100644 support/sdbinutils/include/vtv-change-permission.h create mode 100644 support/sdbinutils/include/xregex.h create mode 100644 support/sdbinutils/include/xregex2.h create mode 100644 support/sdbinutils/include/xtensa-config.h create mode 100644 support/sdbinutils/include/xtensa-isa-internal.h create mode 100644 support/sdbinutils/include/xtensa-isa.h (limited to 'support/sdbinutils/include') diff --git a/support/sdbinutils/include/COPYING b/support/sdbinutils/include/COPYING new file mode 100644 index 0000000..623b625 --- /dev/null +++ b/support/sdbinutils/include/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/support/sdbinutils/include/COPYING3 b/support/sdbinutils/include/COPYING3 new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/support/sdbinutils/include/COPYING3 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/support/sdbinutils/include/ChangeLog b/support/sdbinutils/include/ChangeLog new file mode 100644 index 0000000..ea7476c --- /dev/null +++ b/support/sdbinutils/include/ChangeLog @@ -0,0 +1,34 @@ +2018-01-13 Nick Clifton + + 2.30 branch created. + +2018-01-11 H.J. Lu + + PR ld/22393 + * bfdlink.h (bfd_link_info): Add separate_code. + +2018-01-04 Jim Wilson + + * opcode/riscv-opc.h (CSR_SBADADDR): Rename to CSR_STVAL. Rename + DECLARE_CSR entry. Add alias to map sbadaddr to CSR_STVAL. + (CSR_MBADADDR): Rename to CSR_MTVAL. Rename DECLARE_CSR entry. + Add alias to map mbadaddr to CSR_MTVAL. + +2018-01-03 Alan Modra + + Update year range in copyright notice of all files. + +For older changes see ChangeLog-2017 + +Copyright (C) 2018 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/support/sdbinutils/include/ChangeLog-0415 b/support/sdbinutils/include/ChangeLog-0415 new file mode 100644 index 0000000..ee2fb83 --- /dev/null +++ b/support/sdbinutils/include/ChangeLog-0415 @@ -0,0 +1,2183 @@ +2015-12-01 Alan Modra + + * bout.h: Invoke aout N_* macros with pointer to + struct internal_exec. + * os9k.h: Likewise. + +2015-11-25 Rainer Orth + + * vtv-change-permission.h (VTV_PAGE_SIZE) [__sun__ && __svr4__ && + __sparc__]: Define. + +2015-11-09 Alan Modra + + PR gdb/17133 + * obstack.h (__attribute_pure__): Expand _GL_ATTRIBUTE_PURE. + +2015-11-09 Alan Modra + + PR gdb/17133 + * obstack.h: Import current gnulib file. + +2015-10-22 H.J. Lu + + * bfdlink.h (bfd_link_info): Add call_nop_as_suffix and + call_nop_byte. + +2015-10-27 Daniel Jacobowitz + Joseph Myers + Mark Shinwell + Andrew Stubbs + Rich Felker + + * longlong.h (udiv_qrnnd): Add FDPIC compatible version for SH. + +2015-10-18 Roland McGrath + + PR other/63758 + * environ.h: New file. + +2015-10-07 Claudiu Zissulescu + + * dis-asm.h (arc_get_disassembler): Correct declaration. + +2015-09-30 Nick Clifton + + Import the following patches from the GCC mainline: + + 2015-08-14 Pierre-Marie de Rodat + + * dwarf2.def (DW_AT_GNU_bias): New attribute. + + 2015-08-14 Pierre-Marie de Rodat + + * dwarf2.def (DW_AT_GNU_numerator, DW_AT_GNU_denominator): New + attributes. + +2015-09-20 Rich Felker + + * bfdlink.h (struct bfd_link_info): Add "nointerp" field. + +2015-08-23 Alan Modra + + * bfdlink.h (enum output_type): Reorder enum. + +2015-08-19 Alan Modra + + * bfdlink.h (enum output_type): Delete type_executable, add type_pde + and type_pie. Reorder. + (struct bfd_link_info): Delete pic field. + (bfd_link_executable, bfd_link_pde, bfd_link_pie, bfd_link_pic): Adjust. + +2015-08-19 Alan Modra + + * bfdlink.h (bfd_link_pde): Define. + +2015-08-18 H.J. Lu + + * bfdlink.h (output_type): New enum. + (bfd_link_executable): New macro. + (bfd_link_dll): Likewise. + (bfd_link_relocatable): Likewise. + (bfd_link_pic): Likewise. + (bfd_link_pie): Likewise. + (bfd_link_info): Remove shared, executable, pie and relocatable. + Add output_type and pic. + +2015-08-12 H.J. Lu + + Sync with GCC + 2015-08-11 Trevor Saunders + + * ansidecl.h (GCC_FINAL): New macro. + +2015-07-14 H.J. Lu + + Sync with GCC + 2014-10-28 Richard Henderson + + * longlong.h [__alpha] (umul_ppmm): Disable for c++. + +2015-07-14 H.J. Lu + + Sync with GCC + 2014-12-09 Trevor Saunders + + * hashtab.h, splay-tree.h: Remove GTY markers. + +2015-07-14 H.J. Lu + + Sync with GCC + 2015-03-02 Markus Trippelsdorf + + PR target/65261 + * ansidecl.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro. + +2015-06-22 Nick Clifton + + * dis-asm.h (struct disassemble_info): Add stop_vma field. + +2015-05-28 Catherine Moore + + * bfdlink.h: Rename eh_frame_hdr to eh_frame_hdr_type. + +2015-05-22 Yunlian Jiang + + * libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is + not defined. + +2015-05-01 H.J. Lu + + Merge with gcc: + 2014-11-11 Anthony Brandon + Manuel López-Ibáñez + + PR driver/36312 + * filenames.h: Add prototype for canonical_filename_eq. + +2015-04-30 DJ Delorie + + * dis-asm.h (print_insn_rl78_g10): New. + (print_insn_rl78_g13): New. + (print_insn_rl78_g14): New. + (rl78_get_disassembler): New. + +2015-04-17 Richard Earnshaw + + Merge from gcc: + 2015-03-19 Richard Biener + + * partition.h (struct partition_elem): Re-order elements to + avoid padding. + +2015-04-14 H.J. Lu + + * bfdlink.h (bfd_link_info): Add compress_debug. + +2015-04-14 H.J. Lu + + PR ld/pr17709 + * bfdlink.h (bfd_link_info): Add extern_protected_data. + +2015-02-19 Pedro Alves + + * floatformat.h [__cplusplus]: Wrap in extern "C". + +2015-02-14 Alan Modra + + PR ld/17973 + * bfdlink.h (struct bfd_link_info): Delete loading_lto_outputs. + +2015-02-09 Mark Wielaard + + * dwarf2.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08. + +2015-02-09 Mark Wielaard + + * dwarf2.def: Add DW_TAG_atomic_type. + +2015-01-28 James Bowman + + * dis-asm.h (print_insn_ft32): Declare. + +2015-01-15 Mark Wielaard + + * dwarf2.def (DW_AT_noreturn): New DWARF5 attribute. + +2015-01-14 Jan-Benedict Glaw + + * libiberty.h: Merge from GCC. + +2015-01-01 Alan Modra + + Update year range in copyright notice of all files. + +2014-12-24 Uros Bizjak + Ben Elliston + Manuel Lopez-Ibanez + + * libiberty.h (xasprintf): Declare. + +2014-12-23 Alan Modra + + * bfdlink.h (struct bfd_link_hash_entry): Comment non_ir_ref. Add + linker_def. + +2014-12-12 Phil Muldoon + Jan Kratochvil + Tom Tromey + + * gcc-c-fe.def: New file. + * gcc-c-interface.h: New file. + * gcc-interface.h: New file. + +2014-12-11 Uros Bizjak + Ben Elliston + Manuel Lopez-Ibanez + + * libiberty.h (xvasprintf): Declare. + +2014-12-06 Eric Botcazou + + * dis-asm.h (print_insn_visium): Declare. + +2014-11-24 Mark Wielaard + + * dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and + DW_LANG_C_plus_plus_14. + +2014-11-21 Shinichiro Hamaji + + * dwarf2.def (DW_AT_APPLE_optimized, DW_AT_APPLE_flags) + (DW_AT_APPLE_isa, DW_AT_APPLE_block) + (DW_AT_APPLE_major_runtime_vers, DW_AT_APPLE_runtime_class) + (DW_AT_APPLE_omit_frame_ptr, DW_AT_APPLE_property_name) + (DW_AT_APPLE_property_getter, DW_AT_APPLE_property_setter) + (DW_AT_APPLE_property_attribute, DW_AT_APPLE_objc_complete_type) + (DW_AT_APPLE_property): New macros. + +2014-11-21 Mark Wielaard + + PR debug/63239 + * dwarf2.def (DW_AT_GNU_deleted): New attribute. + +2014-11-18 Igor Zamyatin + + * bfdlink.h (struct bfd_link_info): Add bndplt. + +2014-10-28 Yury Gribov + + * libiberty.h (strtol, strtoul, strtoll, strtoull): New prototypes. + +2014-10-15 David Malcolm + + * libiberty.h (choose_tmpdir): New prototype. + +2014-09-26 Max Ostapenko + + * libiberty.h (PEX_STDOUT_APPEND): New flag. + (PEX_STDERR_APPEND): Likewise. + +2014-09-23 Iain Buclaw + + * demangle.h (DMGL_DLANG): New macro. + (DMGL_STYLE_MASK): Add DMGL_DLANG. + (demangling_styles): Add dlang_demangling. + (DLANG_DEMANGLING_STYLE_STRING): New macro. + (DLANG_DEMANGLING): New macro. + (dlang_demangle): New prototype. + +2014-09-15 Andreas Krebbel + + * longlong.h: Add __udiv_w_sdiv prototype. + +2014-08-12 Alan Modra + + * bfdlink.h (struct bfd_link_callbacks ): Remove "string" + param, add "inh". + +2014-08-12 Alan Modra + + * bfdlink.h (struct bfd_link_info): Add lto_plugin_active. + +2014-06-13 Alan Modra + + * bfdlink.h (struct bfd_link_hash_table): Add hash_table_free field. + +2014-06-13 Alan Modra + + * bfdlink.h: Update for bfd.link_next change. + +2014-06-10 Alan Modra + + PR ld/16910 + * bfdlink.h (unwrap_hash_lookup): Declare. + +2014-05-01 Steve Ellcey + + * longlong.h: Import latest version from GCC tree. + +2014-04-22 Christian Svensson + + * dis-asm.h: Remove openrisc and or32 support. Add support for or1k. + +2014-03-05 Alan Modra + + Update copyright years. + +2014-01-21 Tom Tromey + + * ansidecl.h (ANSI_PROTOTYPES, PTRCONST, LONG_DOUBLE, PARAMS) + (VPARAMS, VA_START, VA_OPEN, VA_CLOSE, VA_FIXEDARG, CONST) + (VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID, AND, DOTS) + (NOARGS): Don't define. + * libiberty.h (expandargv, writeargv): Don't use PARAMS. + +2014-01-09 Tom Tromey + + * gdbm.h: Remove. + +2013-12-23 Bill Maddox + + * demangle.h (enum gnu_v3_ctor_kinds): + Added literal gnu_v3_unified_ctor. + (enum gnu_v3_ctor_kinds): + Added literal gnu_v3_unified_dtor. + +2013-12-13 Kuan-Lin Chen + Wei-Cheng Wang + + * dis-asm.h (print_insn_nds32): Add nds32 target. + +2013-12-04 Richard Sandiford + + * longlong.h: New file. + +2013-10-29 Marc Glisse + + PR tree-optimization/58689 + * ansidecl.h (ATTRIBUTE_RETURNS_NONNULL): New macro. + * libiberty.h (basename, lbasename, dos_lbasename, unix_lbasename, + concat_copy): Mark with attributes nonnull(1) and returns_nonnull. + (concat, reconcat, concat_copy2, choose_temp_base, xstrerror, + xmalloc, xrealloc, xcalloc, xstrdup, xstrndup, xmemdup, pex_init): + Mark with attribute returns_nonnull. + +2013-10-10 Sean Keys + + * xgate.h : Cleanup after opcode + table modification.. + +2013-08-20 Alan Modra + + * floatformat.h (floatformat_ibm_long_double): Delete. + (floatformat_ibm_long_double_big): Declare. + (floatformat_ibm_long_double_little): Declare. + +2013-08-19 Dehao Chen + + * dwarf2.def (DW_AT_GNU_discriminator): New attribute. + +2013-08-02 Caroline Tice + + * vtv-change-permission.h: New file. + +2013-04-03 Jason Merrill + + Demangle C++11 ref-qualifier. + * demangle.h (enum demangle_component_type): Add + DEMANGLE_COMPONENT_REFERENCE_THIS, + DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS. + +2013-03-01 Cary Coutant + + * dwarf2.h (enum dwarf_sect): New enum type. + +2013-02-19 Alan Modra + + * bfdlink.h (struct bfd_link_info): Delete emit_note_gnu_build_id. + +2013-02-11 Sriraman Tallam + + * plugin-api.h (enum ld_plugin_level): Assign integers + explicitly for all values. + +2013-02-06 Sandra Loosemore + Andrew Jenner + + Based on patches from Altera Corporation. + + * dis-asm.h (print_insn_big_nios2): Declare. + (print_insn_little_nios2): Declare. + +2013-01-30 Kai Tietz + + PR other/54620 + PR target/39064 + * md5.h (md5_uintptr, md5_uint32): Define as uintptr_t/uint32_t if + stdint.h and sys/types.h headers are present. + * sha1.h (sha1_uintptr, sha1_uint32): Likewise. + +2013-01-10 Will Newton + + * dis-asm.h (print_insn_metag): New declaration. + +2012-12-18 Aldy Hernandez + + PR other/54324 + * ansidecl.h (ATTRIBUTE_UNUSED): Do not set __attribute__ for GCC + < 3.4. + +2012-12-17 Nick Clifton + + * MAINTAINERS: Add copyright notice. + * alloca-conf.h: Likewise. + * fopen-bin.h: Likewise. + * fopen-same.h: Likewise. + * fopen-vms.h: Likewise. + +2012-11-09 Jason Merrill + + * demangle.h (enum demangle_component_type): Add + DEMANGLE_COMPONENT_TAGGED_NAME. + +2012-10-29 Sterling Augustine + Cary Coutant + + * dwarf2.h (dwarf_location_list_entry_type): New enum with fields + DW_LLE_GNU_end_of_list_entry, DW_LLE_GNU_base_address_selection_entry, + DW_LLE_GNU_start_end_entry and DW_LLE_GNU_start_length_entry. + + +2012-10-26 Shinichiro Hamaji + + * dwarf2.h (DW_AT_APPLE_optimized, DW_AT_APPLE_flags) + (DW_AT_APPLE_isa, DW_AT_APPLE_block) + (DW_AT_APPLE_major_runtime_vers, DW_AT_APPLE_runtime_class) + (DW_AT_APPLE_omit_frame_ptr, DW_AT_APPLE_property_name) + (DW_AT_APPLE_property_getter, DW_AT_APPLE_property_setter) + (DW_AT_APPLE_property_attribute, DW_AT_APPLE_objc_complete_type) + (DW_AT_APPLE_property, DW_OP_GNU_entry_value): New macros. + +2012-10-24 H.J. Lu + + * bfdlink.h (bfd_link_info): Add + disable_target_specific_optimizations. + +2012-10-23 Nathan Sidwell + + * bfdlink.h (struct bfd_link_info): Add stacksize option. + +2012-10-22 Jan Beich + + PR ld/14426 + * bfdlink.h (bfd_link_info): Add ignore_hash. + +2012-10-08 Jason Merrill + + * demangle.h (enum demangle_component_type): Add + DEMANGLE_COMPONENT_TLS_INIT and DEMANGLE_COMPONENT_TLS_WRAPPER. + +2012-09-18 Florian Weimer + + PR other/54411 + * objalloc.h (objalloc_alloc): Do not use fast path on wraparound. + +2012-09-06 Cary Coutant + + * dwarf2.def: Edit comment. + +2012-08-24 Sriraman Tallam + + * plugin-api.h (ld_plugin_allow_unique_segment_for_sections): + New interface. + (ld_plugin_unique_segment_for_sections): New interface. + (LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val. + (LDPT_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val. + (tv_allow_unique_segment_for_sections): New member. + (tv_unique_segment_for_sections): New member. + +2012-08-13 Ian Bolton + Laurent Desnogues + Jim MacArthur + Marcus Shawcroft + Nigel Stephens + Ramana Radhakrishnan + Richard Earnshaw + Sofiane Naci + Tejas Belagod + Yufeng Zhang + + * dis-asm.h (print_insn_aarch64): New declaration. + (print_aarch64_disassembler_options): New declaration. + (aarch64_symbol_is_valid): New declaration. + +2012-07-24 Stephan McCamant + Dr David Alan Gilbert + + PR binutils/13135 + * dis-asm.h (fprintf_ftype): Add ATTRIBUTE_FPTR_PRINTF_2. + +2012-07-13 Doug Evans + + * filenames.h: #include "hashtab.h". + (filename_hash, filename_eq): Declare. + +2012-06-18 Doug Evans + + * dwarf2.def (DW_OP): Add DW_OP_GNU_const_index. + +2012-06-12 Rafael Ãvila de Espíndola + + * plugin-api.h (ld_plugin_output_file_type): Add LDPO_PIE. + +2012-06-08 Jakub Jelinek + + * dwarf2.def (DW_FORM_GNU_ref_alt, DW_FORM_GNU_strp_alt): New + forms. + * dwarf2.h (enum dwarf_macro_record_type): Add + DW_MACRO_GNU_define_indirect_alt, DW_MACRO_GNU_undef_indirect_alt + and DW_MACRO_GNU_transparent_include_alt. + +2012-05-23 Doug Evans + + * leb128.h: #include stdint.h, inttypes.h. + (read_uleb128_to_uint64): Renamed from read_uleb128_to_ull. + Change to take a uint64_t * argument instead of unsigned long long. + (read_sleb128_to_uint64): Renamed from read_sleb128_to_ll. + Change to take an int64_t * argument instead of long long. + +2012-05-22 Doug Evans + + * leb128.h: New file. + +2012-05-19 Gary Funck + + * dwarf2.def: Update comment re: UPC extensions to reference + DWARF4 specification. + +2012-05-15 James Murray + + * dis-asm.h (print_insn_m9s12x): Prototype. + (print_insn_m9s12xg): Prototype. + +2012-05-03 Sean Keys + + * dis-asm.h (print_insn_xgate): Define. + (print_insn_xgate): Ditto. + Added new files for XGATE port. + +2012-05-02 Cary Coutant + + * dwarf2.def: Remove DW_FORM_GNU_ref_index, + replace DW_AT_GNU_ref_base with DW_AT_GNU_ranges_base. + +2012-04-28 Doug Evans + + * dwarf2.def (DW_OP): Add DW_OP_GNU_addr_index. + +2012-04-27 Tom Tromey + + * dwarf2.h: Wrap function declarations in extern "C". + +2012-04-27 Tom Tromey + + * dwarf2.h (enum dwarf_tag, enum dwarf_form, enum dwarf_attribute) + (enum dwarf_location_atom, enum dwarf_type, enum + dwarf_call_frame_info): Remove. + (DW_TAG, DW_TAG_DUP, DW_FORM, DW_AT, DW_AT_DUP, DW_OP) + (DW_OP_DUP, DW_ATE, DW_ATE_DUP, DW_CFA): New macros. + Include dwarf2.def. + (get_DW_TAG_name, get_DW_AT_name, get_DW_FORM_name) + (get_DW_OP_name, get_DW_ATE_name): Declare. + * dwarf2.def: New file, from dwarf2.h. + +2012-04-10 Tristan Gingold + + * splay-tree.h: Conditionnaly includes stdint.h and inttypes.h + (libi_uhostptr_t, libi_shostptr_t): Remove, replaced by uintptr_t. + +2012-04-09 Roland McGrath + + * bfdlink.h (struct bfd_link_info): Add new member user_phdrs. + +2012-03-15 Alan Modra + + * dis-asm.h (disassemble_init_powerpc): Declare. + +2009-11-06 Jonas Maebe + + Add DWARF attribute value for the "Borland fastcall" calling + convention. + * dwarf2.h: Add DW_CC_GNU_borland_fastcall_i386 constant. + +2012-01-31 H.J. Lu + + PR ld/13616 + * bfdlink.h (bfd_link_order): Update comments on data size. + +2012-01-26 Cary Coutant + + * dwarf2.h (enum dwarf_form): Add Fission extensions. + (enum dwarf_attribute): Likewise. + +2012-01-06 Jason Merrill + + PR c++/6057 + PR c++/48051 + PR c++/50855 + PR c++/51322 + * demangle.h (enum demangle_component_type): Add + DEMANGLE_COMPONENT_INITIALIZER_LIST, DEMANGLE_COMPONENT_NULLARY. + +2011-12-14 Iain Sandoe + + * mach-o/loader.h (bfd_mach_o_section_type): define + BFD_MACH_O_S_ATTR_NONE to 0. + +2011-11-07 Richard Henderson + + Merged from transactional-memory. + + * demangle.h (enum gnu_v3_ctor_kinds): Add gnu_v3_object_ctor_group. + (enum gnu_v3_dtor_kinds): Add gnu_v3_object_dtor_group. + (DEMANGLE_COMPONENT_TRANSACTION_CLONE): New. + (DEMANGLE_COMPONENT_NONTRANSACTION_CLONE): New. + +2011-11-01 DJ Delorie + + * dis-asm.h (print_insn_rl78): Declare. + +2011-10-25 Joern Rennecke + + * dis-asm.h (print_insn_epiphany): Declare. + +2011-10-21 Ulrich Drepper + + * obstack.h [!GNUC] (obstack_free): Avoid cast to int. + +2011-10-21 Marc Glisse + + * ansidecl.h (ENUM_BITFIELD): Always use enum in C++ + +2011-10-19 Alan Modra + + PR ld/13254 + * bfdlink.h (struct bfd_link_info): Add error_textrel. + +2011-09-28 Doug Evans + + * timeval-utils.h: New file. + + * libiberty.h (countargv): Declare. + +2011-09-26 Cary Coutant + + gcc PR lto/47247 + * plugin-api.h (enum ld_plugin_symbol_resolution): Add + LDPR_PREVAILING_DEF_IRONLY_EXP. + (enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V2. + +2011-09-23 Cary Coutant + + PR 40831 + * demangle.h (enum demangle_component_type): Add + DEMANGLE_COMPONENT_CLONE. + +2011-09-15 H.J. Lu + + PR ld/12975 + * bfdlink.h (bfd_link_info): Add version_info. + +2011-07-25 Rainer Orth + + * xregex.h (regoff_t): Define. + +2011-07-22 Jakub Jelinek + + * dwarf2.h (DW_AT_GNU_macros): New. + (enum dwarf_macro_record_type): New enum. Add DW_MACRO_GNU_*. + + PR c++/49756 + * libiberty.h (stack_limit_increase): New prototype. + +2011-07-13 Sriraman Tallam + + * plugin-api.h + (ld_plugin_section): New struct. + (ld_plugin_get_section_count): New typedef. + (ld_plugin_get_section_type): New typedef. + (ld_plugin_get_section_name): New typedef. + (ld_plugin_get_section_contents): New typedef. + (ld_plugin_update_section_order): New typedef. + (ld_plugin_allow_section_ordering): New typedef. + (LDPT_GET_SECTION_COUNT): New enum value. + (LDPT_GET_SECTION_TYPE): New enum value. + (LDPT_GET_SECTION_NAME): New enum value. + (LDPT_GET_SECTION_CONTENTS): New enum value. + (LDPT_UPDATE_SECTION_ORDER): New enum value. + (LDPT_ALLOW_SECTION_ORDERING): New enum value. + (tv_get_section_count): New struct members. + (tv_get_section_type): New struct members. + (tv_get_section_name): New struct members. + (tv_get_section_contents): New struct members. + (tv_update_section_order): New struct members. + (tv_allow_section_ordering): New struct members. + +2011-07-15 Alan Modra + + * bfdlink.h (struct bfd_link_info): Use ENUM_BITFIELD for strip, + discard, common_skip_ar_symbols, unresolved_syms_in_objects, and + unresolved_syms_in_shared_libs fields. Move emit_note_gnu_build_id + out of bitfields. Reorder bitfields. + +2011-07-13 Sriraman Tallam + + * plugin-api.h (ld_plugin_section): New struct. + (ld_plugin_get_section_count): New typedef. + (ld_plugin_get_section_type): New typedef. + (ld_plugin_get_section_name): New typedef. + (ld_plugin_get_section_contents): New typedef. + (ld_plugin_update_section_order): New typedef. + (ld_plugin_allow_section_ordering): New typedef. + (LDPT_GET_SECTION_COUNT): New enum value. + (LDPT_GET_SECTION_TYPE): New enum value. + (LDPT_GET_SECTION_NAME): New enum value. + (LDPT_GET_SECTION_CONTENTS): New enum value. + (LDPT_UPDATE_SECTION_ORDER): New enum value. + (LDPT_ALLOW_SECTION_ORDERING): New enum value. + (tv_get_section_count): New struct members. + (tv_get_section_type): New struct members. + (tv_get_section_name): New struct members. + (tv_get_section_contents): New struct members. + (tv_update_section_order): New struct members. + (tv_allow_section_ordering): New struct members. + +2011-07-11 Catherine Moore + + * bfdlink.h (flag_type): New enumeration. + (flag_info_list): New structure. + (flag_info): New structure. + +2011-07-09 H.J. Lu + + PR ld/12942 + * bfdlink.h (bfd_link_info): Add loading_lto_outputs. + +2011-07-01 Joel Brobecker + + * filenames.h (HAVE_CASE_INSENSITIVE_FILE_SYSTEM): Define + on Darwin, as well as on the systems that use a DOS-like + filesystem. + +2011-06-22 Jakub Jelinek + + PR debug/47858 + * dwarf2.h (enum dwarf_location_atom): Add DW_OP_GNU_parameter_ref. + +2011-06-22 Jakub Jelinek + + * dwarf2.h (enum dwarf_location_atom): Add DW_OP_GNU_parameter_ref. + +2011-06-20 Jakub Jelinek + + PR ld/12570 + * bfdlink.h (struct bfd_link_info): Add no_ld_generated_unwind_info + option. + +2011-06-13 Jan Kratochvil + + * demangle.h (DMGL_RET_POSTFIX): Extend the comment. + (DMGL_RET_DROP): New. + +2011-06-13 Walter Lee + + * dis-asm.h (print_insn_tilegx): Declare. + (print_insn_tilepro): Likewise. + +2011-05-17 Alan Modra + + PR ld/12760 + * bfdlink.h (struct bfd_link_callbacks ): Add "flags" and + "string" param. + +2011-05-16 Alan Modra + + * bfdlink.h (struct bfd_link_hash_entry): Remove u.undef.weak field. + +2011-04-30 Jakub Jelinek + + * dwarf2.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type, + DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret): New. + +2011-04-25 Jan Kratochvil + + * bfdlink.h (ENUM_BITFIELD): Remove. + +2011-04-25 Jan Kratochvil + + * ansidecl.h (ENUM_BITFIELD): New, from gcc/system.h. + +2011-04-24 Alan Modra + + PR ld/12365 + PR ld/12696 + * bfdlink.h (ENUM_BITFIELD): Define. + (struct bfd_link_hash_entry): Make "type" a bitfield. Add "non_ir_ref". + (struct bfd_link_callbacks ): Pass bfd_link_hash_entry pointer + rather than "name". + +2011-04-20 Alan Modra + + PR ld/12365 + * bfdlink.h (struct bfd_link_callbacks): Modify multiple_definition + and multiple_common parameters to pass in a bfd_link_hash_entry + pointer rather than name,bfd etc. found in the hash entry. + +2011-03-31 Tristan Gingold + + * dwarf2.h (dwarf_line_number_hp_sfc_ops): New enum. + +2011-03-24 Mark Wielaard + + * dwarf2.h (dwarf_form): Remove deprecated DW_FORM_sig8 define. + +2010-03-23 Rafael Ãvila de Espíndola + + * plugin-api.h (ld_plugin_get_view): New. + (ld_plugin_tag): Add LDPT_GET_VIEW. + (ld_plugin_tv): Add tv_get_view. + +2011-03-16 Jakub Jelinek + + * dwarf2.h (DW_TAG_GNU_call_site, DW_TAG_GNU_call_site_parameter, + DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value, + DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered, + DW_AT_GNU_tail_call, DW_AT_GNU_all_tail_call_sites, + DW_AT_GNU_all_call_sites,, DW_AT_GNU_all_source_call_sites, + DW_OP_GNU_entry_value): New. + +2011-02-28 Kai Tietz + + * filenames.h (filename_ncmp): New prototype. + +2011-02-23 Kai Tietz + + * dwarf2.h (_ELF_DWARF2_H): Renamed to + _DWARF2_H. + (DWARF2_External_LineInfo, DWARF2_Internal_LineInfo, + DWARF2_External_PubNames, DWARF2_Internal_PubNames, + DWARF2_External_CompUnit, DWARF2_Internal_CompUnit, + DWARF2_External_ARange, DWARF2_Internal_ARange): Removed. + +2011-02-08 Ulrich Weigand + + * dwarf2.h (enum dwarf_calling_convention): Add DW_CC_GDB_IBM_OpenCL. + +2011-01-12 Iain Sandoe + + * dwarf2.h: Update value for DW_AT_hi_user. + +2010-11-16 Ian Lance Taylor + + * simple-object.h (simple_object_attributes_merge): Declare, + replacing simple_object_attributes_compare. + +2010-11-04 Ian Lance Taylor + + * dwarf2.h (enum dwarf_source_language): Add DW_LANG_Go. + +2010-11-02 Ian Lance Taylor + + * simple-object.h: New file. + +2010-10-15 Dave Korn + + Sync LD plugin patch series (part 1/6) with src/include/. + * plugin-api.h (LDPT_GNU_LD_VERSION): New ld_plugin_tag enum member. + +2010-10-14 Dave Korn + + Apply LD plugin patch series (part 6/6). + * bfdlink.h (struct_bfd_link_callbacks): Document new argument + to add_archive_element callback used to return a replacement bfd which + is to be added to the hash table in place of the original element. + +2010-10-14 Dave Korn + + Apply LD plugin patch series (part 1/6). + * plugin-api.h (LDPT_GNU_LD_VERSION): New ld_plugin_tag enum member. + +2010-10-06 Andi Kleen + + * libiberty.h (setproctitle): Add prototype. + +2010-09-23 Matthew Gretton-Dann + + * arm.h (ARM_EXT_V6Z): Remove. + (ARM_EXT_SEC): New define. + (ARM_AEXT_V6Z): Use Security Extensions. + (ARM_AEXT_V6ZK): Likeiwse. + (ARM_AEXT_V6ZT2): Likewise. + (ARM_AEXT_V6ZKT2): Likewise. + (ARM_AEXT_V7_ARM): Base v7 does not have Security Extensions. + (ARM_ARCH_V7A_SEC): New define. + (ARM_ARCH_V7A_MP): Rename... + (ARM_ARCH_V7A_MP_SEC): ...to this and add Security Extensions. + +2010-09-09 Jakub Jelinek + + * dwarf2.h (DW_OP_GNU_implicit_pointer): New. + +2010-07-06 Ken Werner + + * floatformat.h (floatformat_ieee_half_big): Add declaration. + (floatformat_ieee_half_little): Likewise. + +2010-06-29 Alan Modra + + * dis-asm.h: Remove references to maxq. + +2010-06-21 Rafael Espindola + + * plugin-api.h (ld_plugin_set_extra_library_path): New. + (ld_plugin_tag): Add LDPT_SET_EXTRA_LIBRARY_PATH. + (ld_plugin_tv): Add tv_set_extra_library_path. + +2010-06-21 Jakub Jelinek + + * dwarf2.h (enum dwarf_type): Add DW_ATE_UTF. + +2010-06-18 Rafael Espindola + + * plugin.h (ld_plugin_add_input_file, ld_plugin_add_input_library): + Make argument const. + +2010-06-08 Laurynas Biveinis + + * splay-tree.h: Update copyright years. + (splay_tree_s): Document fields. + (splay_tree_new_typed_alloc): New. + + * hashtab.h: Update copyright years. + (htab_create_typed_alloc): New. + +2010-06-10 Tristan Gingold + + * dwarf2.h (enum dwarf_tag): Add DW_TAG_HP_Bliss_field and + DW_TAG_HP_Bliss_field_set. + (enum dwarf_attribute): Add DW_AT_HP_prologue, DW_AT_HP_epilogue, + DW_AT_HP_unit_name, DW_AT_HP_unit_size, DW_AT_HP_widened_byte_size, + DW_AT_HP_definition_points, DW_AT_HP_default_location and + DW_AT_HP_is_result_param. + (enum dwarf_type): Add DW_ATE_HP_VAX_float, DW_ATE_HP_VAX_float_d, + DW_ATE_HP_packed_decimal, DW_ATE_HP_zoned_decimal, DW_ATE_HP_edited, + DW_ATE_HP_signed_fixed, DW_ATE_HP_unsigned_fixed, + DW_ATE_HP_VAX_complex_float and DW_ATE_HP_VAX_complex_float_d. + (enum dwarf_line_number_x_ops): Add + DW_LNE_HP_source_file_correlation. + (enum dwarf_source_language): Add DW_LANG_HP_Bliss, + DW_LANG_HP_Basic91, DW_LANG_HP_Pascal91, DW_LANG_HP_IMacro, + DW_LANG_HP_Assembler. + +2010-06-01 Rafael Espindola + + * plugin-api.h (ld_plugin_tag): Add LDPT_OUTPUT_NAME. + +2010-04-26 Pedro Alves + + * filenames.h (PATH_SEPARATOR): Delete. + +2010-04-23 Pedro Alves + + * filenames.h (IS_DIR_SEPARATOR_1): Rename from IS_DIR_SEPARATOR, + always define it independently of host, add `dos_based' parameter, + and handle it. + (PATH_SEPARATOR): Define. + (HAS_DRIVE_SPEC_1): Rename from HAS_DRIVE_SPEC, always define it + independently of host, add `dos_based' parameter, and handle it. + (IS_ABSOLUTE_PATH_1): Rename from IS_ABSOLUTE_PATH, always define + it independently of host, add `dos_based' parameter, and handle + it. + (IS_DOS_DIR_SEPARATOR, IS_DOS_ABSOLUTE_PATH) + (IS_UNIX_DIR_SEPARATOR, IS_UNIX_ABSOLUTE_PATH) + (HAS_DOS_DRIVE_SPEC): New. + (HAS_DRIVE_SPEC): Reimplement on top of HAS_DRIVE_SPEC_1. + (IS_DIR_SEPARATOR): Reimplement on top of IS_DIR_SEPARATOR_1. + (IS_ABSOLUTE_PATH): Reimplement on top of IS_ABSOLUTE_PATH_1. + * libiberty.h (dos_lbasename, unix_lbasename): Declare. + +2009-05-31 Ian Lance Taylor + + * ansidecl.h: Add extern "C" when compiling with C++. Treat C++ + the way we treat an ISO C compiler. Don't define inline as a + macro when compiling with C++. + * dyn-string.h: Add header guard DYN_STRING_H. Add extern "C" + when compiling with C++. + * fibheap.h: Add extern "C" when compiling with C++. + +2010-04-23 Pedro Alves + + * filenames.h (IS_DIR_SEPARATOR_1): Rename from IS_DIR_SEPARATOR, + always define it independently of host, add `dos_based' parameter, + and handle it. + (HAS_DRIVE_SPEC_1): Rename from HAS_DRIVE_SPEC, always define it + independently of host, add `dos_based' parameter, and handle it. + (IS_ABSOLUTE_PATH_1): Rename from IS_ABSOLUTE_PATH, always define + it independently of host, add `dos_based' parameter, and handle + it. + (IS_DOS_DIR_SEPARATOR, IS_DOS_ABSOLUTE_PATH) + (IS_UNIX_DIR_SEPARATOR, IS_UNIX_ABSOLUTE_PATH) + (HAS_DOS_DRIVE_SPEC): New. + (HAS_DRIVE_SPEC): Reimplement on top of HAS_DRIVE_SPEC_1. + (IS_DIR_SEPARATOR): Reimplement on top of IS_DIR_SEPARATOR_1. + (IS_ABSOLUTE_PATH): Reimplement on top of IS_ABSOLUTE_PATH_1. + * libiberty.h (dos_lbasename, unix_lbasename): Declare. + +2010-04-20 Nick Clifton + + * sha1.h: Update copyright notice to use GPLv3. + +2010-04-15 Nick Clifton + + * bout.h: Update copyright notice to use GPLv3. + * hp-symtab.h: Likewise. + * oasys.h: Likewise. + * progress.h: Likewise. + * sha1.h: Likewise. + * xtensa-isa-internal.h: Likewise. + * xtensa-isa.h: Likewise. + +2010-04-14 Doug Evans + + * filenames.h (HAS_DRIVE_SPEC, STRIP_DRIVE_SPEC): New macros. + +2010-04-05 Jakub Jelinek + + * dwarf2.h (DWARF2_Internal_LineInfo): Add li_max_ops_per_insn + field. + +2010-03-25 Joseph Myers + + * dis-asm.h (print_insn_tic6x): Declare. + +2010-03-23 Joseph Myers + + * symcat.h (CONCAT5, CONCAT6, XCONCAT5, XCONCAT6): Define. + +2010-01-13 Joel Brobecker + + Add new DW_AT_use_GNAT_descriptive_type CU attribute. + * dwarf2.h (dwarf_attribute): Add DW_AT_use_GNAT_descriptive_type. + +2010-01-11 Tristan Gingold + + * demangle.h (ada_demangle): Add prototype. + +2010-01-05 Rainer Orth + + PR bootstrap/41771 + * ansidecl.h: Fix inline test for C99 and Sun Studio cc. + +2009-12-29 Joel Brobecker + + * dwarf2.h (enum dwarf_attribute): Add DW_AT_GNAT_descriptive_type. + +2009-12-14 Doug Kwan + + * bfdlink.h (struct bfd_link_callbacks): Rename function parameters + to avoid shadowed variable warnings. + * dis-asm.h (struct disassemble_info): Ditto. + (disassemble_init_for_target): Ditto. + (init_disassemble_info): Ditto. + +2009-11-18 Alan Modra + + * alloca-conf.h: Clarify comment. + +2009-11-06 Jonas Maebe + + Add DWARF attribute value for the "Borland fastcall" calling + convention. + * dwarf2.h: Add DW_CC_GNU_borland_fastcall_i386 constant. + +2009-10-23 Kai Tietz + + * splay-tree.h (libi_uhostptr_t): Add gcc specific + __extension__ for long long type case to silent cX9. + (libi_shostptr_t): Likewise. + +2009-10-19 Rafael Avila de Espindola + + PR40790 + * plugin-api.h: Don't include stdint.h unconditionally. + +2009-10-15 Jakub Jelinek + + * dwarf2.h (DW_LANG_Python): Add comment that it is + a DWARF 4 addition. + +2009-10-14 Alan Modra + + * bfdlink.h (enum bfd_link_common_skip_ar_symbols): Rename from + bfd_link_common_skip_ar_aymbols. + (struct bfd_link_info): Here too. + +2009-10-09 Rafael Espindola + + * plugin-api.h (ld_plugin_add_input_library): Change argument name to + libname. + +2008-10-03 Rafael Espindola + + * plugin-api.h: New. + * lto-symtab.h: New. + +2009-10-05 Rafael Espindola + + * plugin-api.h (ld_plugin_status): Add LDPS_BAD_HANDLE. + (ld_plugin_get_input_file): New. + (ld_plugin_release_input_file): New. + (ld_plugin_add_input_library): New. + (ld_plugin_message): Mark format const. + (ld_plugin_level): Add LDPT_GET_INPUT_FILE, LDPT_RELEASE_INPUT_FILE and + LDPT_ADD_INPUT_LIBRARY. + (ld_plugin_tv): Add tv_get_input_file, tv_release_input_file and + tv_add_input_library. + +2009-10-04 Jerry Quinn + + * plugin-api.h: Fix compile. + +2009-09-29 Jason Merrill + + * demangle.h (enum demangle_component_type): Add + DEMANGLE_COMPONENT_LAMBDA, DEMANGLE_COMPONENT_DEFAULT_ARG, + DEMANGLE_COMPONENT_UNNAMED_TYPE. + (struct demangle_component): Add s_unary_num. + +2009-09-29 DJ Delorie + + * dis-asm.h: Add prototype for print_insn_rx. + +2009-09-25 Dodji Seketeli + + * dwarf2.h (enum dwarf_tag): Rename DW_TAG_template_parameter_pack and + DW_TAG_formal_parameter_pack into DW_TAG_GNU_template_parameter_pack + and DW_TAG_formal_parameter_pack until DWARF 5 is out. + +2009-09-25 Cary Coutant + + Add rest of new values from DWARF Version 4. + * dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias): + New tags. + (DW_FORM_ref_sig8): New name for DW_FORM_sig8. + (DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr, + DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by, + DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded, + DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required, + DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New + attributes. + (DW_LANG_Python): New language. + +2009-09-24 Cary Coutant + + * dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias): + New tags. + (DW_FORM_ref_sig8): New name for DW_FORM_sig8. + (DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr, + DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by, + DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded, + DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required, + DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New + attributes. + (DW_LANG_Python): New language. + +2009-09-22 Dodji Seketeli + + * dwarf2.h (enum dwarf_tag): Add + DW_TAG_template_parameter_pack and DW_TAG_formal_parameter_pack. + +2009-09-09 Martin Thuresson + + * bfdlink.h (struct bfd_link_hash_common_entry): Move to top + level. + +2009-08-06 Michael Eager + + * dis-asm.h: Decl print_insn_microblaze(). + +2009-07-24 Ian Lance Taylor + + * libiberty.h (crc32): Declare. + +2009-07-20 Cary Coutant + Doug Evans + + Add some dwarf4 values. + * dwarf2.h (enum dwarf_tag): Add DW_TAG_type_unit. + (enum dwarf_form): Add DW_FORM_sec_offset, DW_FORM_exprloc, + DW_FORM_flag_present, DW_FORM_sig8. + (enum dwarf_attribute): Add DW_AT_signature. + +2009-07-17 Jan Kratochvil + + * demangle.h + (enum demangle_component_type ) + (enum demangle_component_type ): + New. + +2009-07-10 Tom Tromey + + * dwarf2.h: New file, moved from elf/. + +2009-07-09 Jakub Jelinek + + * dwarf2.h (enum dwarf_location_atom): Add DW_OP_implicit_value + and DW_OP_stack_value. + +2009-07-09 Tom Tromey + + * elf/dwarf2.h: Remove, renaming to... + * dwarf2.h: ... this. + +2009-06-29 Tom Tromey + + * elf/dwarf2.h: New file. Merged with gdb. + +2009-06-18 Nick Clifton + + * dis-asm.h (USER_SPECIFIED_MACHINE_TYPE): New value for the flags + field of struct disassemble_info. + +2009-06-09 Ian Lance Taylor + + * ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Define for C++. + +2009-06-15 Nick Clifton + + * dis-asm.h (DISASSEMBLE_DATA): New value for the flags field of + struct disassemble_info. + +2009-06-02 Ian Lance Taylor + + * ansidecl.h (EXPORTED_CONST): Define. + +2009-05-31 Ian Lance Taylor + + * ansidecl.h: Add extern "C" when compiling with C++. Treat C++ + the way we treat an ISO C compiler. Don't define inline as a + macdro when compiling with C++. + * dyn-string.h: Add header guard DYN_STRING_H. Add extern "C" + when compiling with C++. + * fibheap.h: Add extern "C" when compiling with C++. + +2009-05-25 Tristan Gingold + + * fopen-vms.h (FOPEN_RB, FOPEN_WB, FOPEN_AB, FOPEN_RUB, FOPEN_WUB, + FOPEN_AUB): Use "rfm=udf,rat=none" attribute. + +2009-04-22 Taras Glek + + * hashtab.h: Update GTY annotations to new syntax. + * splay-tree.h: Likewise. + +2009-04-08 H.J. Lu + + * bfdlink.h (bfd_link_info): Add warn_alternate_em. + +2009-03-18 Alan Modra + + * alloca-conf.h: Revise based on autoconf-2.61, autoconf-2.13 + documentation. + +2009-03-17 Jason Merrill + + * demangle.h (enum demangle_component_type): Add + DEMANGLE_COMPONENT_FUNCTION_PARAM. + +2008-12-01 Cary Coutant + + * plugin-api.h (LDPS_BAD_HANDLE): New constant. + (ld_plugin_get_input_file): New typedef. + (ld_plugin_release_input_file): New typedef. + (LDPT_GET_INPUT_FILE, LDPT_RELEASE_INPUT_FILE): New constants. + (struct ld_plugin_tv): Add two new fields. + +2008-12-23 Jon Beniston + + * dis-asm.h: Add LM32 disassembler function prototype. + +2008-12-10 Jason Merrill + + * demangle.h (enum demangle_component_type): Add + DEMANGLE_COMPONENT_FIXED_TYPE. + +2008-12-01 Cary Coutant + + * plugin-api.h (ld_plugin_message): Change format parameter to const. + +2008-12-01 Cary Coutant + + * plugin-api.h: Fix syntax error when compiling with C++. + +2008-11-26 Alan Modra + + PR 7047 + * bfdlink.h (struct bfd_elf_version_expr): Delete "symbol". + Add "literal". + +2008-11-21 Sterling Augustine + + * xtensa-isa-internal.h (XTENSA_STATE_IS_SHARED_OR): New flag. + * xtensa-isa.h (xtensa_state_is_shared_or): New prototype. + +2008-11-19 Bob Wilson + + * xtensa-config.h (XCHAL_HAVE_MUL16, XCHAL_HAVE_MUL32, XCHAL_HAVE_DIV32) + (XCHAL_HAVE_MINMAX, XCHAL_HAVE_SEXT, XCHAL_HAVE_THREADPTR) + (XCHAL_HAVE_RELEASE_SYNC, XCHAL_HAVE_S32C1I): Change to 1. + (XCHAL_NUM_AREGS): Change to 32. + (XCHAL_ICACHE_SIZE, XCHAL_DCACHE_SIZE): Change to 16K. + (XCHAL_ICACHE_LINESIZE, XCHAL_DCACHE_LINESIZE): Change to 32. + (XCHAL_ICACHE_LINEWIDTH, XCHAL_DCACHE_LINEWIDTH): Change to 5. + (XCHAL_DCACHE_IS_WRITEBACK): Change to 1. + (XCHAL_DEBUGLEVEL): Change to 6. + +2008-11-14 Tristan Gingold + + * fopen-vms.h (FOPEN_RB): Use a single string to match the + standard prototype. + (FOPEN_WB): Ditto. + (FOPEN_AB): Ditto. + (FOPEN_RUB): Ditto. + (FOPEN_WUB): Ditto. + (FOPEN_AUB): Ditto. + +2008-10-21 Alan Modra + + * obstack.h (obstack_finish ): Cast result to void *. + +2008-10-06 Jason Merrill + + * demangle.h (enum demangle_component_type): Add + DEMANGLE_COMPONENT_PACK_EXPANSION. + +2008-09-22 Rafael Espindola + + * plugin-api.h (ld_plugin_status): Remove comma from the last item. + Use C style comment. + (ld_plugin_api_version, ld_plugin_output_file_type, + ld_plugin_symbol_kind, ld_plugin_symbol_visibility, + ld_plugin_symbol_resolution, ld_plugin_level, ld_plugin_tag): Remove + comma from the last item. + +2008-09-18 Cary Coutant + + Add plugin functionality for link-time optimization (LTO). + * plugin-api.h: New file. + +2008-09-09 Jason Merrill + + * demangle.h (enum demangle_component_type): Add + DEMANGLE_COMPONENT_DECLTYPE. + +2008-08-25 Alan Modra + + * binary-io.h: New file, imported from gnulib, but don't + #include or . + +2008-08-17 Alan Modra + + * bfdlink.h (bfd_generic_link_read_symbols): Declare. + +2008-07-12 Jie Zhang + + Revert + 2008-07-12 Jie Zhang + * bfdlink.h (struct bfd_link_info): Add sep_code member + variable. + +2008-07-12 Jie Zhang + + * bfdlink.h (struct bfd_link_info): Add sep_code member + variable. + +2008-07-07 Stan Shebs + + * dis-asm.h (struct disassemble_info): Add endian_code field. + +2008-07-07 Joel Brobecker + + * safe-ctype.h: Add #include of ctype.h before redefining + the ctype.h macros. + +2008-07-04 Joel Brobecker + + * safe-ctype.h: Remove #error when detecting that ctype.h has been + included. Redefine the various macros provided by ctype.h as + undefined variables. + +2008-06-23 Kaveh R. Ghazi + + * libiberty.h (XALLOCA, XDUP, XALLOCAVEC, XDUPVEC, XALLOCAVAR, + XDUPVAR, XOBNEWVEC, XOBNEWVAR): New. + +2008-06-06 Alan Modra + + * bfdlink.h (struct bfd_link_info): Add "path_separator". + +2008-04-10 Andreas Krebbel + + * dis-asm.h (print_s390_disassembler_options): + Prototype added. + +2008-03-24 Ian Lance Taylor + + * sha1.h: New file, from gnulib. + + * md5.h: Add extern "C" when compiled with C++. + +2008-03-24 Ian Lance Taylor + + * md5.h: Add extern "C" when compiled with C++. + +2008-03-21 Ian Lance Taylor + + * filenames.h: Add extern "C" when compiled with C++. + +2008-02-15 Alan Modra + + * bfdlink.h (struct bfd_link_hash_table): Delete creator field. + (struct bfd_link_info): Add output_bfd. + +2008-02-11 Bob Wilson + + * xtensa-config.h (XCHAL_HAVE_THREADPTR): Redefine to zero. + (XCHAL_NUM_AREGS, XCHAL_MAX_INSTRUCTION_SIZE): New. + +2008-01-26 David Daney + + * demangle.h (demangle_component_type): Add + DEMANGLE_COMPONENT_JAVA_RESOURCE, + DEMANGLE_COMPONENT_COMPOUND_NAME, and + DEMANGLE_COMPONENT_CHARACTER as new enum values. + (demangle_component): Add struct s_character to union u. + +2007-11-07 Joseph Myers + Daniel Jacobowitz + + * floatformat.h (struct floatformat): Add split_half field. + (floatformat_ibm_long_double): New. + +2007-09-06 Tom Tromey + + * libiberty.h (pex_free): Document process killing. + +2007-08-31 Douglas Gregor + + * demangle.h (enum demangle_component_type): Add + DEMANGLE_COMPONENT_RVALUE_REFERENCE. + +2007-07-25 Ben Elliston + + * ternary.h: Remove. + +2007-07-18 Bob Wilson + + * xtensa-config.h (XCHAL_HAVE_THREADPTR): New. + (XCHAL_HAVE_RELEASE_SYNC, XCHAL_HAVE_S32C1I): New. + +2007-07-17 Nick Clifton + + * COPYING3: New file. Contains version 3 of the GNU General + Public License. + +2007-07-12 Kai Tietz + + * splay-tree.h (libi_uhostptr_t, libi_shostptr_t): Adjust types + work-a-round whitespace problem in gcc gengtype. + + * splay-tree.h (libi_uhostptr_t, libi_shostptr_t): New types, + needed for WIN64 when a long is not wide enough for a pointer. + (splay_tree_key, splay_tree_value): Use the new types. + +2007-07-09 Roland McGrath + + * bfdlink.h (struct bfd_link_info): Add member emit_note_gnu_build_id. + +2007-07-06 Nick Clifton + + * bfdlink.h: Update copyright notice to refer to GPLv3. + +2007-06-29 M R Swami Reddy + + * dis-asm.h (print_insn_cr16): New prototype. + +2007-06-01 Noah Misch + Alan Modra + + * bfdlink.h (struct bfd_link_info): Add input_bfds_tail. + +2007-05-07 Nathan Froyd + + * libiberty.h (writeargv): Declare. + +2007-04-30 Alan Modra + + * bfdlink.h (struct bfd_link_info): Add "info" and "minfo". + +2007-04-25 Mark Mitchell + + * demangle.h: Change license to LGPL + exception. + +2007-04-10 Richard Henderson + + * bfdlink.h (struct bfd_link_info): Add relax_trip. + +2007-03-29 Joel Brobecker + + * filenames.h (FILENAME_CMP): Adjust define to call filename_cmp + regardless of the type of file system. + +2007-03-06 Jan Hubicka + + * ansidecl.h (ATTRIBUTE_COLD, ATTRIBUTE_HOT): New. + +2007-02-21 Nick Clifton + + * bfdlink.h (struct bfd_link_callbacks): Add + override_segment_assignment field. + +2007-02-17 Mark Mitchell + Nathan Sidwell + Vladimir Prus + + * bin-bugs.h: Remove. + +2007-02-09 Joseph S. Myers + + * libiberty.h (pex_write_input): Remove prototype. + +2007-02-05 Dave Brolley + + * Contribute the following changes: + 2001-03-26 Ben Elliston + + * dis-asm.h (print_insn_mep): Declare. + +2007-02-02 H.J. Lu + + * dis-asm.h (print_i386_disassembler_options): New. + +2007-01-31 Vladimir Prus + + * libiberty.h (PEX_STDERR_TO_PIPE): New define. + (PEX_BINARY_ERROR): New define. + (pex_read_err): New function. + +2007-01-29 Simon Baldwin + + * demangle.h: New cplus_demangle_print_callback, + cplus_demangle_v3_callback, and java_demangle_v3_callback function + prototypes, and demangle_callbackref type definition. + +2007-01-16 H.J. Lu + + PR ld/3831 + * bfdlink.h (bfd_link_info): Rename dynamic to dynamic_list. + Add dynamic and dynamic_data. + +2006-12-05 Michael Tautschnig + Nick Clifton + + * ansidecl.h (ATTRIBUTE_PACKED): Define. + +2006-11-30 Andrew Stubbs + J"orn Rennecke + + PR driver/29931 + * libiberty.h (make_relative_prefix_ignore_links): Declare. + +2006-11-27 Bob Wilson + + * xtensa-config.h (XSHAL_ABI): New. + (XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New. + +2006-11-27 Bob Wilson + + * xtensa-isa.h (STATIC_LIBISA): Delete. + +2006-10-30 Paul Brook + + * dis-asm.h (disassemble_info): Add symtab, symtab_pos and + symtab_size. + +2006-10-30 H.J. Lu + + PR ld/3111 + * bfdlink.h (bfd_link_info): Add reduce_memory_overheads. + +2006-10-25 Trevor Smigiel + Yukishige Shibata + Nobuhisa Fujinami + Takeaki Fukuoka + Alan Modra + + * dis-asm.h (print_insn_spu): Declare. + +2006-09-17 Mei Ligang + + * dis-asm.h: Add prototypes for Score disassembler routines. + +2006-09-07 H.J. Lu + + * bfdlink.h (bfd_elf_dynamic_list): New. + (bfd_link_info): Add a dynamic field. + +2006-08-04 Marcelo Tosatti + + * bfdlink.h (struct bfd_link_info): New field: print_gc_sections. + +2006-07-10 Jakub Jelinek + + * bfdlink.h (struct bfd_link_info): Add emit_hash and + emit_gnu_hash bitfields. + +2006-04-11 Jim Blandy + + * libiberty.h (pex_input_file, pex_input_pipe): New declarations. + +2006-04-06 H.J. Lu + + * bfdlink.h (bfd_link_info): Replace need_relax_finalize with + relax_pass. + +2006-02-17 Shrirang Khisti + Anil Paranjape + Shilin Shakti + + * dis-asm.h (print_insn_xc16c): New prototype. + +2006-01-18 DJ Delorie + + * md5.h: Include ansidecl.h + +2006-01-17 Andreas Schwab + + PR binutils/1486 + * dis-asm.h (struct disassemble_info): Add + disassembler_needs_relocs. + +2006-01-09 Bob Wilson + + * xtensa-config.h (XCHAL_HAVE_MUL32_HIGH): Define. + +2005-12-30 Bob Wilson + + * xtensa-config.h (XCHAL_HAVE_WIDE_BRANCHES): New. + +2005-12-16 Nathan Sidwell + + Second part of ms1 to mt renaming. + * dis-asm.h (print_insn_mt): Renamed. + +2005-12-10 Terry Laurenzo + + PR java/9861 + * demangle.h : Add DMGL_RET_POSTFIX define to enable alternative + output format for return types + +2005-11-03 Alan Modra + + * bfdlink.h (struct bfd_link_order): Tweak comment. + +2005-10-31 Mark Kettenis + + * floatformat.h (enum floatformat_byteorders): Add + floatformat_vax. + (floatformat_vax_aingle, floatformat_vax_double): Declare. + +2005-10-28 Dave Brolley + + Contribute the following changes: + 2003-09-29 Dave Brolley + + * dis-asm.h (disassemble_info): insn_sets now (void *) to allow for + more exotic underlying types to be used. + +2005-10-25 Arnold Metselaar + + disasm.h: Add declaration for print_insn_z80 + +2005-09-30 Catherine Moore + + * dis-asm.h (print_insn_bfin): Declare. + +2005-09-26 Mark Mitchell + + * libiberty.h (expandargv): New function. + +2005-08-18 Alan Modra + + * bfdlink.h: Remove mention of a29k. + * dis-asm.h: Remove a29k support. + +2005-08-17 Mark Kettenis + + * floatformat.h (struct floatformat): Change type of large + argument for is_valid member to `const void *'. + (floatformat_to_double): Change type of second argument to `const + void *'. + (floatformat_from_double): Change type of last argument to `void + *'. + (floatformat_is_valid): Change type of last argument to `const + void *'. + +2005-07-14 Jim Blandy + + * dis-asm.h (print_insn_m32c): New declaration. + +2005-07-12 Ben Elliston + + * xregex2.h (regexec): Qualify this prototype with __extension__ + when compiling with GNU C. + +2005-07-07 Kaveh R. Ghazi + + * dis-asm.h (fprintf_ftype): Add format attribute. + +2005-07-03 Steve Ellcey + + PR other/13906 + * ansidecl.h (ATTRIBUTE_ALIGNED_ALIGNOF): New. + * md5.h (md5_uintptr): New. + (md5_ctx): Align buffer field. + +2005-06-30 Daniel Berlin + + * hashtab.h (HTAB_DELETED_ENTRY): New macro. + (HTAB_EMPTY_ENTRY): New macro. + +2005-06-20 Geoffrey Keating + + * libiberty.h (strverscmp): Prototype. + +2005-06-08 Zack Weinberg + + * dis-asm.h (get_arm_regnames): Update prototype. + +2005-06-07 Aldy Hernandez + Michael Snyder + Stan Cox + + * dis-asm.h: Externalize print_insn_ms1. + +2005-06-06 Gabriel Dos Reis + + * libiberty.h (XOBFINISH): New. + +2005-06-03 Alan Modra + + * bfdlink.h (struct bfd_link_callbacks): Add einfo. + +2005-06-01 Kaveh R. Ghazi + + * libiberty.h (vsnprintf): Add format attribute. + +2005-05-29 Kaveh R. Ghazi + + * ansidecl.h: Add ATTRIBUTE_FPTR_PRINTF. + +2005-05-28 Eli Zaretskii + + * libiberty.h: (snprintf) [!HAVE_DECL_SNPRINTF]: Declare if + needed. + (vsnprintf) [!HAVE_DECL_VSNPRINTF]: Declare if needed. + +2005-05-25 Richard Henderson + + * demangle.h (DEMANGLE_COMPONENT_HIDDEN_ALIAS): New. + +2005-05-24 Gabriel Dos Reis + + * libiberty.h (ACONCAT): Properly cast value of alloca(). + + * ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Don't define if + __cplusplus. + +2005-05-12 Steve Ellcey + + libiberty.h: Do not define empty basename prototype. + +2005-05-10 Nick Clifton + + * Update the address and phone number of the FSF organization in + the GPL notices in the following files: + COPYING, ansidecl.h, bfdlink.h, bout.h, demangle.h, dis-asm.h, + dyn-string.h, fibheap.h, filenames.h, floatformat.h, + fnmatch.h, gdbm.h, getopt.h, hashtab.h, hp-symtab.h, ieee.h, + libiberty.h, md5.h, oasys.h, objalloc.h, obstack.h, os9k.h, + partition.h, progress.h, safe-ctype.h, sort.h, splay-tree.h, + symcat.h, ternary.h, xregex2.h, xtensa-config.h, + xtensa-isa-internal.h, xtensa-isa.h + +2005-04-25 Kaveh R. Ghazi + + * libiberty.h (unlock_std_streams): New. + +2005-04-19 Kaveh R. Ghazi + + * hashtab.h, libiberty.h, objalloc.h, splay-tree.h, ternary.h: + Don't use the PTR macro. + + * sort.h: Don't use the PARAMS macro. + +2005-04-16 Kaveh R. Ghazi + + * libiberty.h (unlock_stream): New. + +2005-04-13 Kaveh R. Ghazi + + * libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked): + Remove parameter names. + +2005-04-11 Kaveh R. Ghazi + + * libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked): + Provide prototypes for new functions. + +2005-03-29 Ian Lance Taylor + + * libiberty.h: Fix indentation. + +2005-03-28 Ian Lance Taylor + + * libiberty.h: Include . + (PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define. + (PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define. + (PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define. + (pex_init, pex_run, pex_read_output): Declare. + (pex_get_status, pex_get_times, pex_free, pex_one): Declare. + (struct pex_time): Define. + +2005-03-28 Mark Mitchell + + * libiberty.h (ffs): Declare, if necessary. + +2005-03-27 Gabriel Dos Reis + + * ternary.h: Don't use PARAMS anymore. + +2005-03-27 Gabriel Dos Reis + + * md5.h: Remove definition and uses of __P. + * dyn-string.h: Remove uses of PARAMS. + * fibheap.h: Likewise. + * floatformat.h: Likewise. + * hashtab.h: Likewise. + +2005-03-26 Gabriel Dos Reis + + * demangle.h: Remove uses of PARAMS. + + * libiberty.h (ANSI_PROTOTYPES): Remove guard since + ANSI_PROTOTYPES is always assumed. + Remove uses of PARAMS throughout. + +2005-03-24 Kaveh R. Ghazi + + * libiberty.h (xstrndup): Declare. + +2005-03-22 Kaveh R. Ghazi + + * libiberty.h (make_relative_prefix): Add ATTRIBUTE_MALLOC. + +2005-03-22 Bob Wilson + + * xtensa-isa.h: Update a comment and whitespace. + +2005-03-16 H.J. Lu + + * bfdlink.h (bfd_link_info): Add gc_sections. + +2005-03-09 Mark Mitchell + + * libiberty.h (gettimeofday): Declare. + +2005-03-01 Jan Beulich + + * libiberty.h: Declare unlink_if_ordinary. + +2005-02-21 Alan Modra + + * xtensa-isa-internal.h (xtensa_length_decode_fn): Warning fix. + * xtensa-isa.h (xtensa_insnbuf_to_chars): Likewise. + (xtensa_insnbuf_from_chars, xtensa_isa_length_from_chars): Likewise. + +2005-02-14 Paolo Bonzini + + PR bootstrap/19818 + * ansidecl.h (PARAMS): Guard from redefinition. + +2005-02-03 Alan Modra + + * bfdlink.h (struct bfd_link_hash_entry): Add u.undef.weak. + +2005-02-01 Alan Modra + + * bfdlink.h (bfd_link_repair_undef_list): Declare. + +2005-01-10 Andreas Schwab + + * dis-asm.h (struct disassemble_info): Add skip_zeroes and + skip_zeroes_at_end. + +2004-12-11 Ben Elliston + + * fibheap.h (struct fibnode): Only use unsigned long bitfields + when __GNUC__ is defined and ints are less than 32-bits wide. + +2004-11-04 Paul Brook + + * bfdlink.h (bfd_link_info): Add default_imported_symver. + +2004-11-12 Bob Wilson + + * xtensa-isa-internal.h (xtensa_interface_internal): Add class_id. + * xtensa-isa.h (xtensa_interface_class_id): New prototype. + +2004-11-08 Inderpreet Singh + Vineet Sharma + + * dis-asm.h: Add prototype for print_insn_maxq_little. + +2004-10-26 Paul Brook + + * bfdlink.h (struct bfd_link_info): Add create_default_symver. + +2004-10-21 H.J. Lu + + PR 463 + * bfdlink.h (bfd_link_callbacks): Add a pointer to struct + bfd_link_hash_entry to reloc_overflow. + +2004-10-07 Bob Wilson + + * xtensa-config.h (XSHAL_USE_ABSOLUTE_LITERALS, + XCHAL_HAVE_PREDICTED_BRANCHES, XCHAL_INST_FETCH_WIDTH): New. + (XCHAL_EXTRA_SA_SIZE, XCHAL_EXTRA_SA_ALIGN): Delete. + + * xtensa-isa-internal.h (ISA_INTERFACE_VERSION): Delete. + (config_sturct struct): Delete. + (XTENSA_OPERAND_IS_REGISTER, XTENSA_OPERAND_IS_PCRELATIVE, + XTENSA_OPERAND_IS_INVISIBLE, XTENSA_OPERAND_IS_UNKNOWN, + XTENSA_OPCODE_IS_BRANCH, XTENSA_OPCODE_IS_JUMP, + XTENSA_OPCODE_IS_LOOP, XTENSA_OPCODE_IS_CALL, + XTENSA_STATE_IS_EXPORTED, XTENSA_INTERFACE_HAS_SIDE_EFFECT): Define. + (xtensa_format_encode_fn, xtensa_get_slot_fn, xtensa_set_slot_fn): New. + (xtensa_insn_decode_fn): Rename to ... + (xtensa_opcode_decode_fn): ... this. + (xtensa_immed_decode_fn, xtensa_immed_encode_fn, xtensa_do_reloc_fn, + xtensa_undo_reloc_fn): Update. + (xtensa_encoding_template_fn): Delete. + (xtensa_opcode_encode_fn, xtensa_format_decode_fn, + xtensa_length_decode_fn): New. + (xtensa_format_internal, xtensa_slot_internal): New types. + (xtensa_operand_internal): Delete operand_kind, inout, isPCRelative, + get_field, and set_field fields. Add name, field_id, regfile, + num_regs, and flags fields. + (xtensa_arg_internal): New type. + (xtensa_iclass_internal): Change operands field to array of + xtensa_arg_internal. Add num_stateOperands, stateOperands, + num_interfaceOperands, and interfaceOperands fields. + (xtensa_opcode_internal): Delete length, template, and iclass fields. + Add iclass_id, flags, encode_fns, num_funcUnit_uses, and funcUnit_uses. + (opname_lookup_entry): Delete. + (xtensa_regfile_internal, xtensa_interface_internal, + xtensa_funcUnit_internal, xtensa_state_internal, + xtensa_sysreg_internal, xtensa_lookup_entry): New. + (xtensa_isa_internal): Replace opcode_table field with opcodes field. + Change type of opname_lookup_table. Delete num_modules, + module_opcode_base, module_decode_fn, config, and has_density fields. + Add num_formats, formats, format_decode_fn, length_decode_fn, + num_slots, slots, num_fields, num_operands, operands, num_iclasses, + iclasses, num_regfiles, regfiles, num_states, states, + state_lookup_table, num_sysregs, sysregs, sysreg_lookup_table, + max_sysreg_num, sysreg_table, num_interfaces, interfaces, + interface_lookup_table, num_funcUnits, funcUnits and + funcUnit_lookup_table fields. + (xtensa_isa_module, xtensa_isa_modules): Delete. + (xtensa_isa_name_compare): New prototype. + (xtisa_errno, xtisa_error_msg): New. + * xtensa-isa.h (XTENSA_ISA_VERSION): Define. + (xtensa_isa): Change type. + (xtensa_operand): Delete. + (xtensa_format, xtensa_regfile, xtensa_state, xtensa_sysreg, + xtensa_interface, xtensa_funcUnit, xtensa_isa_status, + xtensa_funcUnit_use): New types. + (libisa_module_specifier): Delete. + (xtensa_isa_errno, xtensa_isa_error_msg): New prototypes. + (xtensa_insnbuf_free, xtensa_insnbuf_to_chars, + xtensa_insnbuf_from_chars): Update prototypes. + (xtensa_load_isa, xtensa_extend_isa, xtensa_default_isa, + xtensa_insn_maxlength, xtensa_num_opcodes, xtensa_decode_insn, + xtensa_encode_insn, xtensa_insn_length, + xtensa_insn_length_from_first_byte, xtensa_num_operands, + xtensa_operand_kind, xtensa_encode_result, + xtensa_operand_isPCRelative): Delete. + (xtensa_isa_init, xtensa_operand_inout, xtensa_operand_get_field, + xtensa_operand_set_field, xtensa_operand_encode, + xtensa_operand_decode, xtensa_operand_do_reloc, + xtensa_operand_undo_reloc): Update prototypes. + (xtensa_isa_maxlength, xtensa_isa_length_from_chars, + xtensa_isa_num_pipe_stages, xtensa_isa_num_formats, + xtensa_isa_num_opcodes, xtensa_isa_num_regfiles, xtensa_isa_num_states, + xtensa_isa_num_sysregs, xtensa_isa_num_interfaces, + xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup, + xtensa_format_decode, xtensa_format_encode, xtensa_format_length, + xtensa_format_num_slots, xtensa_format_slot_nop_opcode, + xtensa_format_get_slot, xtensa_format_set_slot, xtensa_opcode_decode, + xtensa_opcode_encode, xtensa_opcode_is_branch, xtensa_opcode_is_jump, + xtensa_opcode_is_loop, xtensa_opcode_is_call, + xtensa_opcode_num_operands, xtensa_opcode_num_stateOperands, + xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses, + xtensa_opcode_funcUnit_use, xtensa_operand_name, + xtensa_operand_is_visible, xtensa_operand_is_register, + xtensa_operand_regfile, xtensa_operand_num_regs, + xtensa_operand_is_known_reg, xtensa_operand_is_PCrelative, + xtensa_stateOperand_state, xtensa_stateOperand_inout, + xtensa_interfaceOperand_interface, xtensa_regfile_lookup, + xtensa_regfile_lookup_shortname, xtensa_regfile_name, + xtensa_regfile_shortname, xtensa_regfile_view_parent, + xtensa_regfile_num_bits, xtensa_regfile_num_entries, + xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits, + xtensa_state_is_exported, xtensa_sysreg_lookup, + xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number, + xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name, + xtensa_interface_num_bits, xtensa_interface_inout, + xtensa_interface_has_side_effect, xtensa_funcUnit_lookup, + xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New prototypes. +2004-10-07 Jeff Baker + + * bfdlink.h (bfd_link_info): Add bitfield: warn_shared_textrel. + +2004-09-17 Alan Modra + + * bfdlink.h (struct bfd_link_hash_entry): Move und_next into elements + of union. + +2004-09-13 Aaron W. LaFramboise + + * libiberty.h (basename): Prototype for __MINGW32__. + +2004-09-04 Kaveh R. Ghazi + + * ansidecl.h (ATTRIBUTE_SENTINEL): Define. + * libiberty.h (concat, reconcat, concat_length, concat_copy, + concat_copy2): Use ATTRIBUTE_SENTINEL. + +2004-08-13 Alan Modra + + * bfdlink.h (struct bfd_link_callbacks): Remove "error_handler". + (LD_DEFINITION_IN_DISCARDED_SECTION): Delete. + +2004-08-02 Gabriel Dos Reis + + * libiberty.h (XDELETE, XDELETEVEC, XRESIZEVEC): Remove any + const-qualification before disposal. + +2004-07-24 Bernardo Innocenti + + * ansidecl.h (ARG_UNUSED): New Macro. + +2004-07-23 H.J. Lu + + * bin-bugs.h (REPORT_BUGS_TO): Set to + "". + +2004-07-21 Paolo Bonzini + + * ansidecl.h (ATTRIBUTE_PURE): New. + +2004-07-13 Bernardo Innocenti + + * libiberty.h (XNEW, XCNEW, XNEWVEC, XCNEWVEC, XOBNEW): Move here from + libcpp/internal.h. + (XDELETE, XRESIZEVEC, XDELETEVEC, XNEWVAR, XCNEWVAR, XRESIZEVAR): New + macros. + +2004-07-13 Bernardo Innocenti + + * libiberty.h (ASTRDUP): Add casts required for stricter + type conversion rules of C++. + * obstack.h (obstack_free): Likewise. + +2004-07-07 Tomer Levi + + * dis-asm.h (print_insn_crx): Declare. + +2004-06-24 Alan Modra + + * bfdlink.h (struct bfd_link_order): Update comment. + +2004-05-11 Jakub Jelinek + + * bfdlink.h (struct bfd_link_info): Add relro, relro_start and + relro_end fields. + +2004-05-04 Andreas Jaeger + + * demangle.h: Do not use C++ reserved keyword typename as + parameter for cplus_demangle_fill_builtin_type. + +2004-04-22 Richard Henderson + + * hashtab.h (struct htab): Add size_prime_index. + +2004-04-13 Jeff Law + + * hashtab.h (htab_remove_elt_with_hash): Prototype new function. + +2004-03-30 Zack Weinberg + + * hashtab.h, splay-tree.h: Use new shorter form of GTY markers. + +2004-03-25 Stan Shebs + + * mpw/: Remove subdirectory and everything in it. + +2004-03-23 Alan Modra + + PR 51. + * bfdlink.h (struct bfd_link_info): Add wrap_char. + +2004-03-20 H.J. Lu + + * bfdlink.h (bfd_link_info): Correct comments for the + unresolved_syms_in_objects field. + +2004-02-24 Ian Lance Taylor + + * dyn-string.h: Update copyright date. + +2004-02-23 Ian Lance Taylor + + * dyn-string.h: Remove test of IN_LIBGCC2 and IN_GLIBCPP_V3 and + the associated #defines. + +2004-01-12 Ian Lance Taylor + + * demangle.h: Instead of checking ANSI_PROTOTYPES, just include + "libiberty.h". + + * demangle.h: If ANSI_PROTOTYPES is defined, include . + + * demangle.h (enum demangle_component_type): Define. + (struct demangle_operator_info): Declare. + (struct demangle_builtin_type_info): Declare. + (struct demangle_component): Define. + (cplus_demangle_fill_component): Declare. + (cplus_demangle_fill_name): Declare. + (cplus_demangle_fill_builtin_type): Declare. + (cplus_demangle_fill_operator): Declare. + (cplus_demangle_fill_extended_operator): Declare. + (cplus_demangle_fill_ctor, cplus_demangle_fill_dtor): Declare. + (cplus_demangle_v3_components): Declare. + (cplus_demangle_print): Declare. + +For older changes see ChangeLog-9103 + +Copyright (C) 2004-2015 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/support/sdbinutils/include/ChangeLog-2016 b/support/sdbinutils/include/ChangeLog-2016 new file mode 100644 index 0000000..42cf3d8 --- /dev/null +++ b/support/sdbinutils/include/ChangeLog-2016 @@ -0,0 +1,841 @@ +2016-12-31 Dimitar Dimitrov + + * elf/common.h: Add PRU ELF. + * elf/pru.h: New file. + * opcode/pru.h: New file. + * dis-asm.h (print_insn_pru): Declare. + +2016-12-23 Maciej W. Rozycki + + * opcode/mips.h: Document `0', `1', `2', `3', `4' and `s' + operand codes. + +2016-12-23 Maciej W. Rozycki + + * opcode/mips.h: Replace `0' and `4' operand codes with `.' and + `F' respectively. + +2016-12-23 Maciej W. Rozycki + + * opcode/mips.h (INSN2_SHORT_ONLY): New macro. + +2016-12-21 Alan Modra + + * coff/pe.h: Fix comment chars with high bit set. + * opcode/xgate.h: Likewise. + +2016-12-20 Maciej W. Rozycki + + * opcode/mips.h (mips_opcode_32bit_p): New inline function. + +2016-12-20 Andrew Waterman + + * elf/riscv.h (EF_RISCV_SOFT_FLOAT): Don't define. + (EF_RISCV_FLOAT_ABI, EF_RISCV_FLOAT_ABI_SOFT): Define. + (EF_RISCV_FLOAT_ABI_SINGLE, EF_RISCV_FLOAT_ABI_DOUBLE): Define. + (EF_RISCV_FLOAT_ABI_QUAD): Define. + +2016-12-20 Andrew Waterman + Kuan-Lin Chen + + * elf/riscv.h: Add R_RISCV_TPREL_I through R_RISCV_SET32. + +2016-12-16 fincs + + * bfdlink.h (struct bfd_link_info): Add gc_keep_exported. + +2016-12-14 Maciej W. Rozycki + + * elf/mips.h (Elf_Internal_ABIFlags_v0): Also declare struct + typedef as `elf_internal_abiflags_v0'. + +2016-12-13 Renlin Li + + * opcode/aarch64.h (aarch64_operand_class): Remove + AARCH64_OPND_CLASS_CP_REG. + (enum aarch64_opnd): Change AARCH64_OPND_Cn to AARCH64_OPND_CRn, + AARCH64_OPND_Cm to AARCH64_OPND_CRm. + (aarch64_opnd_qualifier): Define AARCH64_OPND_QLF_CR qualifier. + +2016-12-09 Maciej W. Rozycki + + * opcode/mips.h: Remove references to `>' operand code. + +2016-12-07 Maciej W. Rozycki + + * opcode/mips.h (INSN_CHIP_MASK): Update according to bit use. + +2016-12-07 Maciej W. Rozycki + + * opcode/mips.h (ASE_DSPR3): Add a comment. + +2016-12-05 Szabolcs Nagy + + * opcode/arm.h (ARM_EXT2_V8_3A, ARM_AEXT2_V8_3A): New. + (ARM_ARCH_V8_3A): New. + +2016-11-29 Claudiu Zissulescu + + * opcode/arc.h (insn_class_t): Add DIVREM, LOAD, MOVE, MPY, STORE + instruction classes. + +2016-11-22 Jose E. Marchesi + + * opcode/sparc.h (sparc_opcode_arch): New fields hwcaps and + hwcaps2. + +2016-11-22 Alan Modra + + PR 20744 + * opcode/ppc.h: Define VLE insns using 16A and 16D relocs. + +2016-11-03 David Tolnay + Mark Wielaard + + * demangle.h (DMGL_RUST): New macro. + (DMGL_STYLE_MASK): Add DMGL_RUST. + (demangling_styles): Add dlang_rust. + (RUST_DEMANGLING_STYLE_STRING): New macro. + (RUST_DEMANGLING): New macro. + (rust_demangle): New prototype. + (rust_is_mangled): Likewise. + (rust_demangle_sym): Likewise. + +2016-11-07 Jason Merrill + + * demangle.h (enum demangle_component_type): Add + DEMANGLE_COMPONENT_NOEXCEPT, DEMANGLE_COMPONENT_THROW_SPEC. + +2016-11-18 Szabolcs Nagy + + * opcode/aarch64.h (enum aarch64_opnd): Add AARCH64_OPND_IMM_ROT1, + AARCH64_OPND_IMM_ROT2, AARCH64_OPND_IMM_ROT3. + (enum aarch64_op): Add OP_FCMLA_ELEM. + +2016-11-18 Szabolcs Nagy + + * opcode/aarch64.h (enum aarch64_opnd): Add AARCH64_OPND_ADDR_SIMM10. + (enum aarch64_insn_class): Add ldst_imm10. + +2016-11-11 Szabolcs Nagy + + * opcode/aarch64.h (enum aarch64_opnd): Add AARCH64_OPND_Rm_SP. + +2016-11-11 Szabolcs Nagy + + * opcode/aarch64.h (AARCH64_FEATURE_V8_3): Define. + (AARCH64_ARCH_V8_3): Define. + (AARCH64_ARCH_V8_1, AARCH64_ARCH_V8_2): Simplify. + +2016-11-04 Thomas Preud'homme + + * opcode/arm.h (ARM_AEXT_V8M_MAIN_DSP): Define. + (ARM_AEXT2_V8M_MAIN_DSP): Likewise. + (ARM_ARCH_V8M_MAIN_DSP): Likewise. + +2016-11-03 Graham Markall + + * opcode/arc.h: Add PROTOCOL_DECODE to insn_class_t. + +2016-11-03 Andrew Burgess + + * opcode/arc.h (struct arc_opcode): Change type of opcode and mask + fields. + (struct arc_long_opcode): Delete. + (struct arc_operand): Change types for insert and extract + handlers. + +2016-11-03 Andrew Burgess + + * opcode/arc.h: Make macros 64-bit safe. + +2016-11-03 Graham Markall + + * opcode/arc.h (arc_opcode_len): Declare. + (ARC_SHORT): Delete. + +2016-11-01 Palmer Dabbelt + Andrew Waterman + + Add support for RISC-V architecture. + * dis-asm.h: Add prototypes for print_insn_riscv and + print_riscv_disassembler_options. + * elf/riscv.h: New file. + * opcode/riscv-opc.h: New file. + * opcode/riscv.h: New file. + +2016-10-17 Nick Clifton + + * elf/common.h (DT_SYMTAB_SHNDX): Define. + (EM_CLOUDSHIELD, EM_COREA_1ST, EM_COREA_2ND, EM_OPEN8): Define. + (EM_VIDEOCORE5, EM_56800EX, EM_BA1, EM_BA2, EM_XCORE): Define. + (EM_MCHP_PIC, EM_KM32, EM_KMX32, EM_KMX16, EM_KMX8): Define. + (EM_KVARC, EM_CDP, EM_COGE, EM_COOL, EM_NORC): Define. + (EM_CSR_KALIMBA, EM_Z80, EM_AMDGPU, EM_RISCV): Define. + (ELFOSABI_OPENVOS): Define. + (GRP_MASKOS, GRP_MASKPROC): Define. + +2016-10-14 Pedro Alves + + * ansidecl.h [__cplusplus >= 201103 && GCC_VERSION < 4007] (FINAL, + OVERRIDE): Define as empty. + [__cplusplus < 201103 && GCC_VERSION < 4007] (FINAL): Define as + __final. + [__cplusplus < 201103 && GCC_VERSION >= 4007] (OVERRIDE): Define as + empty. + +2016-10-14 Pedro Alves + + * ansidecl.h (GCC_FINAL): Delete. + (OVERRIDE, FINAL): New, moved from gcc/coretypes.h. + +2016-10-14 Claudiu Zissulescu + + * opcode/arc.h (ARC_OPCODE_ARCV2): New define. + +2016-09-29 Alan Modra + + * opcode/ppc.h (PPC_OPERAND_OPTIONAL32): Define. + +2016-09-26 Claudiu Zissulescu + + * opcode/arc.h (insn_class_t): Add two new classes. + +2016-09-26 Alan Modra + + * elf/ppc.h (Tag_GNU_Power_ABI_FP): Comment on new values. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (aarch64_cond): Bump array size to 4. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (AARCH64_FEATURE_SVE): New macro. + (OP_MOV_P_P, OP_MOV_Z_P_Z, OP_MOV_Z_V, OP_MOV_Z_Z, OP_MOV_Z_Zi) + (OP_MOVM_P_P_P, OP_MOVS_P_P, OP_MOVZS_P_P_P, OP_MOVZ_P_P_P) + (OP_NOTS_P_P_P_Z, OP_NOT_P_P_P_Z): New aarch64_ops. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (sve_cpy, sve_index, sve_limm, sve_misc) + (sve_movprfx, sve_pred_zm, sve_shift_pred, sve_shift_unpred) + (sve_size_bhs, sve_size_bhsd, sve_size_hsd, sve_size_sd): New + aarch64_insn_classes. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (AARCH64_OPND_SVE_Rm): New aarch64_opnd. + (AARCH64_OPND_SVE_Rn_SP, AARCH64_OPND_SVE_VZn, AARCH64_OPND_SVE_Vd) + (AARCH64_OPND_SVE_Vm, AARCH64_OPND_SVE_Vn): Likewise. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (AARCH64_OPND_SVE_FPIMM8): New aarch64_opnd. + (AARCH64_OPND_SVE_I1_HALF_ONE, AARCH64_OPND_SVE_I1_HALF_TWO) + (AARCH64_OPND_SVE_I1_ZERO_ONE): Likewise. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (AARCH64_OPND_SIMM5): New aarch64_opnd. + (AARCH64_OPND_SVE_AIMM, AARCH64_OPND_SVE_ASIMM) + (AARCH64_OPND_SVE_INV_LIMM, AARCH64_OPND_SVE_LIMM) + (AARCH64_OPND_SVE_LIMM_MOV, AARCH64_OPND_SVE_SHLIMM_PRED) + (AARCH64_OPND_SVE_SHLIMM_UNPRED, AARCH64_OPND_SVE_SHRIMM_PRED) + (AARCH64_OPND_SVE_SHRIMM_UNPRED, AARCH64_OPND_SVE_SIMM5) + (AARCH64_OPND_SVE_SIMM5B, AARCH64_OPND_SVE_SIMM6) + (AARCH64_OPND_SVE_SIMM8, AARCH64_OPND_SVE_UIMM3) + (AARCH64_OPND_SVE_UIMM7, AARCH64_OPND_SVE_UIMM8) + (AARCH64_OPND_SVE_UIMM8_53): Likewise. + (aarch64_sve_dupm_mov_immediate_p): Declare. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (AARCH64_OPND_SVE_ADDR_RI_S4xVL): New aarch64_opnd. + (AARCH64_OPND_SVE_ADDR_RI_S4x2xVL, AARCH64_OPND_SVE_ADDR_RI_S4x3xVL) + (AARCH64_OPND_SVE_ADDR_RI_S4x4xVL, AARCH64_OPND_SVE_ADDR_RI_S6xVL) + (AARCH64_OPND_SVE_ADDR_RI_S9xVL): Likewise. + (AARCH64_MOD_MUL_VL): New aarch64_modifier_kind. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (AARCH64_OPND_SVE_ADDR_RI_U6): New aarch64_opnd. + (AARCH64_OPND_SVE_ADDR_RI_U6x2, AARCH64_OPND_SVE_ADDR_RI_U6x4) + (AARCH64_OPND_SVE_ADDR_RI_U6x8, AARCH64_OPND_SVE_ADDR_RR) + (AARCH64_OPND_SVE_ADDR_RR_LSL1, AARCH64_OPND_SVE_ADDR_RR_LSL2) + (AARCH64_OPND_SVE_ADDR_RR_LSL3, AARCH64_OPND_SVE_ADDR_RX) + (AARCH64_OPND_SVE_ADDR_RX_LSL1, AARCH64_OPND_SVE_ADDR_RX_LSL2) + (AARCH64_OPND_SVE_ADDR_RX_LSL3, AARCH64_OPND_SVE_ADDR_RZ) + (AARCH64_OPND_SVE_ADDR_RZ_LSL1, AARCH64_OPND_SVE_ADDR_RZ_LSL2) + (AARCH64_OPND_SVE_ADDR_RZ_LSL3, AARCH64_OPND_SVE_ADDR_RZ_XTW_14) + (AARCH64_OPND_SVE_ADDR_RZ_XTW_22, AARCH64_OPND_SVE_ADDR_RZ_XTW1_14) + (AARCH64_OPND_SVE_ADDR_RZ_XTW1_22, AARCH64_OPND_SVE_ADDR_RZ_XTW2_14) + (AARCH64_OPND_SVE_ADDR_RZ_XTW2_22, AARCH64_OPND_SVE_ADDR_RZ_XTW3_14) + (AARCH64_OPND_SVE_ADDR_RZ_XTW3_22, AARCH64_OPND_SVE_ADDR_ZI_U5) + (AARCH64_OPND_SVE_ADDR_ZI_U5x2, AARCH64_OPND_SVE_ADDR_ZI_U5x4) + (AARCH64_OPND_SVE_ADDR_ZI_U5x8, AARCH64_OPND_SVE_ADDR_ZZ_LSL) + (AARCH64_OPND_SVE_ADDR_ZZ_SXTW, AARCH64_OPND_SVE_ADDR_ZZ_UXTW): + Likewise. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (AARCH64_OPND_SVE_PATTERN_SCALED): New + aarch64_opnd. + (AARCH64_MOD_MUL): New aarch64_modifier_kind. + (aarch64_opnd_info): Make shifter.amount an int64_t and + rearrange the fields. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (AARCH64_OPND_SVE_PATTERN): New aarch64_opnd. + (AARCH64_OPND_SVE_PRFOP): Likewise. + (aarch64_sve_pattern_array): Declare. + (aarch64_sve_prfop_array): Likewise. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (AARCH64_OPND_QLF_P_Z): New aarch64_opnd_qualifier. + (AARCH64_OPND_QLF_P_M): Likewise. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (AARCH64_OPND_CLASS_SVE_REG): New + aarch64_operand_class. + (AARCH64_OPND_CLASS_PRED_REG): Likewise. + (AARCH64_OPND_SVE_Pd, AARCH64_OPND_SVE_Pg3, AARCH64_OPND_SVE_Pg4_5) + (AARCH64_OPND_SVE_Pg4_10, AARCH64_OPND_SVE_Pg4_16) + (AARCH64_OPND_SVE_Pm, AARCH64_OPND_SVE_Pn, AARCH64_OPND_SVE_Pt) + (AARCH64_OPND_SVE_Za_5, AARCH64_OPND_SVE_Za_16, AARCH64_OPND_SVE_Zd) + (AARCH64_OPND_SVE_Zm_5, AARCH64_OPND_SVE_Zm_16, AARCH64_OPND_SVE_Zn) + (AARCH64_OPND_SVE_Zn_INDEX, AARCH64_OPND_SVE_ZnxN) + (AARCH64_OPND_SVE_Zt, AARCH64_OPND_SVE_ZtxN): New aarch64_opnds. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (aarch64_opcode): Add a tied_operand field. + (AARCH64_OPDE_UNTIED_OPERAND): New aarch64_operand_error_kind. + +2016-09-21 Richard Sandiford + + * opcode/aarch64.h (F_STRICT): New flag. + +2016-09-07 Richard Earnshaw + + * opcode/arm.h (ARM_ARCH_V8A_CRC): New architecture. + +2016-08-26 Cupertino Miranda + * elf/arc-reloc.def: Fixed relocation formula for N*, SDA, SDA_12, + SDA_16_LD*, S13_PCREL, N32_ME, SECTOFF_* relocations. + * opcode/arc-func.h (replace_disp12s): Added. Used for SDA_12 + relocation. + +2016-08-04 Thomas Preud'homme + + * arm.h (ARM_GET_SYM_CMSE_SPCL): Define macro. + (ARM_SET_SYM_CMSE_SPCL): Likewise. + +2016-08-01 Andrew Jenner + + * opcode/ppc.h (PPC_OPCODE_E200Z4): New define. + +2016-07-29 Aldy Hernandez + + * libiberty.h (MAX_ALLOCA_SIZE): New macro. + +2016-07-27 Graham Markall + + * opcode/arc.h: Add ARC_OPERAND_ADDRTYPE, + ARC_OPERAND_COLON. Add the arc_nps_address_type enum and + ARC_NUM_ADDRTYPES. + * opcode/arc.h: Add BMU to insn_class_t enum. + * opcode/arc.h: Add PMU to insn_class_t enum. + +2016-07-20 Claudiu Zissulescu + + * dis-asm.h: Declare print_arc_disassembler_options. + +2016-07-15 Thomas Preud'homme + + * bfdlink.h (struct bfd_link_info): Declare new ldscript_def and + out_implib_bfd fields. + +2016-07-14 Claudiu Zissulescu + + * elf/arc-reloc.def (ARC_SDA32): Don't use ME transformation. + +2016-07-05 Andre Vieria + + * include/elf/arm.h (SHF_ARM_NOREAD): Rename to ... + (SHF_ARM_PURECODE): ... this. + +2016-07-01 Szabolcs Nagy + + * opcode/aarch64.h (AARCH64_CPU_HAS_ALL_FEATURES): New. + (AARCH64_CPU_HAS_ANY_FEATURES): New. + (AARCH64_CPU_HAS_FEATURE): Define as AARCH64_CPU_HAS_ALL_FEATURES. + (AARCH64_OPCODE_HAS_FEATURE): Remove. + +2016-06-30 Matthew Wahab + + * opcode/arm.h (ARM_ARCH_V8_2a): Add FPU_NEON_EXT_RDMA to the set + of enabled FPU features. + +2016-06-29 Trevor Saunders + + * opcode/sparc.h (enum sparc_opcode_arch_val): Move + SPARC_OPCODE_ARCH_MAX into the enum. + +2016-06-28 Richard Sandiford + + * opcode/aarch64.h (aarch64_opnd_info): Change index fields to int64_t. + +2016-06-28 Maciej W. Rozycki + + * elf/mips.h (R_MIPS16_PC16_S1): New relocation. + +2016-06-25 Trevor Saunders + + * elf/xtensa.h (xtensa_make_property_section): New prototype. + +2016-06-24 John Baldwin + + * elf/common.h (AT_FREEBSD_EXECPATH, AT_FREEBSD_CANARY) + (AT_FREEBSD_CANARYLEN, AT_FREEBSD_OSRELDATE, AT_FREEBSD_NCPUS) + (AT_FREEBSD_PAGESIZES, AT_FREEBSD_PAGESIZESLEN) + (AT_FREEBSD_TIMEKEEP, AT_FREEBSD_STACKPROT): Define. + +2016-06-23 Graham Markall + + * opcode/arc.h: Make insn_class_t alphabetical again. + +2016-06-22 Trevor Saunders + + * elf/dlx.h: Wrap in extern C. + * elf/xtensa.h: Likewise. + * opcode/arc.h: Likewise. + +2016-06-22 Trevor Saunders + + * opcode/tilegx.h: Move TILEGX_NUM_PIPELINE_ENCODINGS into + tilegx_pipeline. + +2016-06-21 Graham Markall + + * opcode/arc.h: Add nps400 extension and instruction + subclass. + Remove ARC_OPCODE_NPS400 + * elf/arc.h: Remove E_ARC_MACH_NPS400 + +2016-06-17 Jose E. Marchesi + + * opcode/sparc.h (enum sparc_opcode_arch_val): Add + SPARC_OPCODE_ARCH_V9C, SPARC_OPCODE_ARCH_V9D, + SPARC_OPCODE_ARCH_V9E, SPARC_OPCODE_ARCH_V9V and + SPARC_OPCODE_ARCH_V9M. + +2016-06-14 John Baldwin + + * opcode/msp430-decode.h (MSP430_Size): Remove. + (Msp430_Opcode_Decoded): Change type of size to int. + +2016-06-11 Alan Modra + + * coff/sparc.h (COFF_ADJUST_SYM_OUT_POST): Define. + +2016-06-08 Jose E. Marchesi + + * opcode/sparc.h: Add missing documentation for hyperprivileged + registers in rd (%) and rs1 ($). + +2016-06-07 Alan Modra + + * elf/ppc.h (APUINFO_SECTION_NAME, APUINFO_LABEL, PPC_APUINFO_ISEL, + PPC_APUINFO_PMR, PPC_APUINFO_RFMCI, PPC_APUINFO_CACHELCK, + PPC_APUINFO_SPE, PPC_APUINFO_EFS, PPC_APUINFO_BRLOCK, + PPC_APUINFO_VLE: Define. + +2016-06-07 Matthew Wahab + + * opcode/arm.h (ARM_EXT2_RAS): New. Also align preceding + entries. + (ARM_AEXT_V8_2A): Add ARM_EXT2_RAS. + +2016-06-02 Andrew Burgess + + * opcode/arc.h (MAX_INSN_ARGS): Increase to 16. + (struct arc_long_opcode): New structure. + (arc_long_opcodes): Declare. + (arc_num_long_opcodes): Declare. + +2016-06-01 Trevor Saunders + + * elf/mips.h: Add extern "C". + * elf/sh.h: Likewise. + * opcode/d10v.h: Likewise. + * opcode/d30v.h: Likewise. + * opcode/ia64.h: Likewise. + * opcode/mips.h: Likewise. + * opcode/ppc.h: Likewise. + * opcode/sparc.h: Likewise. + * opcode/tic6x.h: Likewise. + * opcode/v850.h: Likewise. + +2016-05-28 Alan Modra + + * bfdlink.h (struct bfd_link_callbacks): Update comments. + Return void from multiple_definition, multiple_common, + add_to_set, constructor, warning, undefined_symbol, + reloc_overflow, reloc_dangerous and unattached_reloc. + +2016-05-26 Trevor Saunders + + * opcode/metag.h: wrap declarations in extern "C". + +2016-05-23 Claudiu Zissulescu + + * opcode/arc.h (insn_subclass_t): Add COND. + (flag_class_t): Add F_CLASS_EXTEND. + +2016-05-23 Cupertino Miranda + + * opcode/arc.h (struct arc_opcode): Renamed attribute class to + insn_class. + (struct arc_flag_class): Renamed attribute class to flag_class. + +2016-05-23 Trevor Saunders + + * opcode/tic54x.h (struct symbol_): typedef to tic54x_symbol instead of + plain symbol. + +2016-04-29 Tom Tromey + + * dwarf2.h (enum dwarf_source_language) : New constants. + +2016-05-11 Andrew Bennett + + * elf/mips.h (AFL_ASE_DSPR3): New macro. + (AFL_ASE_MASK): Update to include AFL_ASE_DSPR3. + * opcode/mips.h (ASE_DSPR3): New macro. + +2016-05-10 Thomas Preud'homme + Nick Clifton + + * arm.h (enum arm_st_branch_type): Add new ST_BRANCH_ENUM_SIZE + enumerator. + (NUM_ENUM_ARM_ST_BRANCH_TYPE_BITS): New macro. + (ENUM_ARM_ST_BRANCH_TYPE_BITMASK): Likewise. + (ARM_SYM_BRANCH_TYPE): Replace by ... + (ARM_GET_SYM_BRANCH_TYPE): This and ... + (ARM_SET_SYM_BRANCH_TYPE): This in two versions depending on whether + BFD_ASSERT is defined or not. + +2016-05-10 Thomas Preud'homme + + * elf/arm.h (Tag_DSP_extension): Define. + +2016-05-10 Thomas Preud'homme + + * arm.h (ARM_FSET_CPU_SUBSET): Define macro. + +2016-05-10 Thomas Preud'homme + + * opcode/arm.h (ARM_EXT2_V8M_MAIN): new feature bit. + (ARM_AEXT2_V8M_MAIN): New architecture extension feature set. + (ARM_ARCH_V8M_MAIN): Use ARM_AEXT2_V8M_MAIN instead of ARM_AEXT2_V8M + for the high core bits. + +2016-05-03 Claudiu Zissulescu + + * opcode/arc.h (ARC_SYNTAX_1OP): Declare + (ARC_SYNTAX_NOP): Likewsie. + (ARC_OP1_MUST_BE_IMM): Update defined value. + (ARC_OP1_IMM_IMPLIED): Likewise. + (arg_32bit_rc, arg_32bit_u6, arg_32bit_limm): Declare. + +2016-04-28 Nick Clifton + + PR target/19722 + * opcode/aarch64.h (struct aarch64_opcode): Add verifier field. + +2016-04-27 Alan Modra + + * bfdlink.h (struct bfd_link_hash_entry): Add "section" field to + undef. Formatting. + +2016-04-21 Nick Clifton + + * bfdlink.h: Add prototype for bfd_link_check_relocs. + +2016-04-20 H.J. Lu + + * bfdlink.h (bfd_link_info): Add check_relocs_after_open_input. + +2016-04-20 Andrew Burgess + + * elf/arc-reloc.def (ARC_NPS_CMEM16): Add ME modifier to formula. + +2016-04-19 Andrew Burgess + + * opcode/arc.h (MAX_INSN_ARGS): Increase 6 to 8. + +2016-04-19 Andrew Burgess + + * opcode/arc.h (insn_class_t): Add NET and ACL class. + +2016-04-14 Andrew Burgess + + * elf/arc-reloc.def: Add ARC_NPS_CMEM16 reloc. + * opcode/arc.h (NPS_CMEM_HIGH_VALUE): Define. + +2016-04-12 Claudiu Zissulescu + + * opcode/arc.h (flag_class_t): Update. + (ARC_OPCODE_NONE): Define. + (ARC_OPCODE_ARCALL): Likewise. + (ARC_OPCODE_ARCFPX): Likewise. + (ARC_REGISTER_READONLY): Likewise. + (ARC_REGISTER_WRITEONLY): Likewise. + (ARC_REGISTER_NOSHORT_CUT): Likewise. + (arc_aux_reg): Add cpu. + +2016-04-12 Claudiu Zissulescu + + * opcode/arc.h (arc_num_opcodes): Remove. + (ARC_SYNTAX_3OP, ARC_SYNTAX_2OP, ARC_OP1_MUST_BE_IMM) + (ARC_OP1_IMM_IMPLIED, ARC_SUFFIX_NONE, ARC_SUFFIX_COND) + (ARC_SUFFIX_FLAG): Define. + (flags_none, flags_f, flags_cc, flags_ccf): Declare. + (arg_none, arg_32bit_rarbrc, arg_32bit_zarbrc, arg_32bit_rbrbrc) + (arg_32bit_rarbu6, arg_32bit_zarbu6, arg_32bit_rbrbu6) + (arg_32bit_rbrbs12, arg_32bit_ralimmrc, arg_32bit_rarblimm) + (arg_32bit_zalimmrc, arg_32bit_zarblimm, arg_32bit_rbrblimm) + (arg_32bit_ralimmu6, arg_32bit_zalimmu6, arg_32bit_zalimms12) + (arg_32bit_ralimmlimm, arg_32bit_zalimmlimm, arg_32bit_rbrc) + (arg_32bit_zarc, arg_32bit_rbu6, arg_32bit_zau6, arg_32bit_rblimm) + (arg_32bit_zalimm, arg_32bit_limmrc, arg_32bit_limmu6) + (arg_32bit_limms12, arg_32bit_limmlimm): Likewise. + +2016-04-05 Claudiu Zissulescu + + * opcode/arc.h (DPA, DPX, SPX): New subclass enums. + (ARC_FPUDA): Define. + (arc_aux_reg): Add new field. + +2016-04-05 Cupertino Miranda + + * opcode/arc-func.h (replace_bits24): Changed. + (replace_bits24_be): Created. + +2016-03-29 Claudiu Zissulescu + + * opcode/arc.h (insn_subclass_t): Add QUARKSE subclass. + (FIELDA, FIELDB, FIELDC, FIELDF, FIELDQ, INSN3OP, INSN2OP) + (INSN2OP, INSN3OP_ABC, INSN3OP_ALC, INSN3OP_ABL, INSN3OP_ALL) + (INSN3OP_0BC, INSN3OP_0LC, INSN3OP_0BL, INSN3OP_0LL, INSN3OP_ABU) + (INSN3OP_ALU, INSN3OP_0BU, INSN3OP_0LU, INSN3OP_BBS, INSN3OP_0LS) + (INSN3OP_CBBC, INSN3OP_CBBL, INSN3OP_C0LC, INSN3OP_C0LL) + (INSN3OP_CBBU, INSN3OP_C0LU, MINSN3OP_ABC, MINSN3OP_ALC) + (MINSN3OP_ABL, MINSN3OP_ALL, MINSN3OP_0BC, MINSN3OP_0LC) + (MINSN3OP_0BL, MINSN3OP_0LL, MINSN3OP_ABU, MINSN3OP_ALU) + (MINSN3OP_0BU, MINSN3OP_0LU, MINSN3OP_BBS, MINSN3OP_0LS) + (MINSN3OP_CBBC, MINSN3OP_CBBL, MINSN3OP_C0LC, MINSN3OP_C0LL) + (MINSN3OP_CBBU, MINSN3OP_C0LU, INSN2OP_BC, INSN2OP_BL, INSN2OP_0C) + (INSN2OP_0L INSN2OP_BU, INSN2OP_0U, MINSN2OP_BC, MINSN2OP_BL) + (MINSN2OP_0C, MINSN2OP_0L, MINSN2OP_BU, MINSN2OP_0U): Define. + +2016-03-22 Trevor Saunders + + * opcode/i960.h: Add const qualifiers. + * opcode/tic4x.h (struct tic4x_inst): Likewise. + +2016-03-21 Andrew Burgess + + * opcodes/arc.h (insn_class_t): Add BITOP type. + +2016-03-21 Andrew Burgess + + * opcode/arc.h (flag_class_t): Remove all old flag classes, add 3 + new classes instead. + +2016-03-21 Andrew Burgess + + * elf/arc.h (E_ARC_MACH_NPS400): Define. + * opcode/arc.h (ARC_OPCODE_NPS400): Define. + +2016-03-21 Andrew Burgess + + * elf/arc.h (EF_ARC_CPU_GENERIC): Delete. Update related comment. + +2016-03-21 Andrew Burgess + + * elf/arc.h (EF_ARC_MACH): Delete. + (EF_ARC_MACH_MSK): Remove out of date comment. + +2016-03-21 Andrew Burgess + + * opcode/arc.h (ARC_OPCODE_BASE): Delete. + +2016-03-15 H.J. Lu + + PR ld/19807 + * bfdlink.h (bfd_link_info): Add no_reloc_overflow_check. + +2016-03-08 Cupertino Miranda + Andrew Burgess + + * elf/arc-reloc.def: Add a call to ME within the formula for each + relocation that requires middle-endian correction. + +2016-03-07 Trevor Saunders + + * opcode/dlx.h (struct dlx_opcode): Add const qualifiers. + * opcode/h8300.h (struct h8_opcode): Likewise. + * opcode/hppa.h (struct pa_opcode): Likewise. + * opcode/msp430.h: Likewise. + * opcode/spu.h (struct spu_opcode): Likewise. + * opcode/tic30.h (struct _register): Likewise. + * opcode/tic4x.h (struct tic4x_register): Likewise. + (struct tic4x_cond): Likewise. + (struct tic4x_indirect): Likewise. + (struct tic4x_inst): Likewise. + * opcode/visium.h (struct reg_entry): Likewise. + +2016-03-04 Matthew Wahab + + * arm.h (ARM_ARCH_V8_1A): Add FPU_NEON_EXT_RDMA. + (ARM_CPU_HAS_FEATURE): Add comment. + +2016-03-03 Than McIntosh + + * plugin-api.h: Add new hooks to the plugin transfer vector to + to support querying section alignment and section size. + (ld_plugin_get_input_section_alignment): New hook. + (ld_plugin_get_input_section_size): New hook. + (ld_plugin_tag): Add LDPT_GET_INPUT_SECTION_ALIGNMENT + and LDPT_GET_INPUT_SECTION_SIZE. + (ld_plugin_tv): Add tv_get_input_section_alignment and + tv_get_input_section_size. + +2016-03-03 Evgenii Stepanov + + * plugin-api.h (enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V3. + +2016-02-26 H.J. Lu + + PR ld/19645 + * bfdlink.h (bfd_link_elf_stt_common): New enum. + (bfd_link_info): Add elf_stt_common. + +2016-02-26 H.J. Lu + + PR ld/19636 + PR ld/19704 + PR ld/19719 + * bfdlink.h (bfd_link_info): Add dynamic_undefined_weak. + +2016-02-19 Matthew Wahab + Jiong Wang + + * opcode/arm.h (ARM_EXT2_FP16_INSN): New. + +2016-02-10 Claudiu Zissulescu + Janek van Oirschot + + * opcode/arc.h (arc_opcode arc_relax_opcodes) + (arc_num_relax_opcodes): Declare. + +2016-02-09 Nick Clifton + + * opcode/metag.h (metag_scondtab): Mark as possibly unused. + * opcode/nds32.h (nds32_r45map): Likewise. + (nds32_r54map): Likewise. + * opcode/visium.h (gen_reg_table): Likewise. + (fp_reg_table, cc_table, opcode_table): Likewise. + +2016-02-09 Alan Modra + + PR 16583 + * elf/common.h (AT_SUN_HWCAP): Undef before defining. + +2016-02-04 Nick Clifton + + PR target/19561 + * opcode/msp430.h (IGNORE_CARRY_BIT): New define. + (RRUX): Synthesise using case 2 rather than 7. + +2016-01-19 John Baldwin + + * elf/common.h (NT_FREEBSD_THRMISC): Define. + (NT_FREEBSD_PROCSTAT_PROC): Define. + (NT_FREEBSD_PROCSTAT_FILES): Define. + (NT_FREEBSD_PROCSTAT_VMMAP): Define. + (NT_FREEBSD_PROCSTAT_GROUPS): Define. + (NT_FREEBSD_PROCSTAT_UMASK): Define. + (NT_FREEBSD_PROCSTAT_RLIMIT): Define. + (NT_FREEBSD_PROCSTAT_OSREL): Define. + (NT_FREEBSD_PROCSTAT_PSSTRINGS): Define. + (NT_FREEBSD_PROCSTAT_AUXV): Define. + +2016-01-18 Miranda Cupertino + Zissulescu Claudiu + + * elf/arc-reloc.def (ARC_32, ARC_GOTPC, ARC_TLS_GD_GOT) + (ARC_TLS_IE_GOT, ARC_TLS_DTPOFF, ARC_TLS_DTPOFF_S9, ARC_TLS_LE_S9) + (ARC_TLS_LE_32): Fixed formula. + (ARC_TLS_GD_LD): Use new special function. + * opcode/arc-func.h: Changed all the replacement + functions to clear the patching bits before doing an or it with the value + argument. + +2016-01-18 Nick Clifton + + PR ld/19440 + * coff/internal.h (internal_syment): Use int to hold section + number. + (N_UNDEF): Cast to int not short. + (N_ABS): Likewise. + (N_DEBUG): Likewise. + (N_TV): Likewise. + (P_TV): Likewise. + +2016-01-11 Nick Clifton + + Import this change from GCC mainline: + + 2016-01-07 Mike Frysinger + + * longlong.h: Change !__SHMEDIA__ to + (!defined (__SHMEDIA__) || !__SHMEDIA__). + Change __SHMEDIA__ to defined (__SHMEDIA__) && __SHMEDIA__. + +2016-01-06 Maciej W. Rozycki + + * opcode/mips.h: Add a summary of MIPS16 operand codes. + +2016-01-05 Mike Frysinger + + * libiberty.h (dupargv): Change arg to char * const *. + (writeargv, countargv): Likewise. + +2016-01-01 Alan Modra + + Update year range in copyright notice of all files. + +For older changes see ChangeLog-0415, aout/ChangeLog-9115, +cgen/ChangeLog-0915, coff/ChangeLog-0415, elf/ChangeLog-0415, +mach-o/ChangeLog-1115, nlm/ChangeLog-9315, opcode/ChangeLog-0415, +som/ChangeLog-1015, and vms/ChangeLog-1015 + +Copyright (C) 2016 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/support/sdbinutils/include/ChangeLog-2017 b/support/sdbinutils/include/ChangeLog-2017 new file mode 100644 index 0000000..8f39d6c --- /dev/null +++ b/support/sdbinutils/include/ChangeLog-2017 @@ -0,0 +1,871 @@ +2017-12-28 Jim Wilson + + * opcode/riscv-opc.h (DECLARE_CSR): Add missing privileged registers. + Sort to match privileged spec documentation order. + (DECLARE_CSR_ALIAS): Add ubadaddr, and comments. + +2017-12-19 Tamar Christina + + PR gas/22559 + * aarch64.h (aarch64_opnd_qualifier): Add AARCH64_OPND_QLF_S_4B. + +2017-12-19 Tamar Christina + + PR gas/22529 + * opcode/aarch64.h (aarch64_opnd_qualifier): Add AARCH64_OPND_QLF_V_4B. + +2017-12-11 Stephen Crane + + * plugin-api.h: Add new plugin hook to allow processing of input + files added by a plugin. + (ld_plugin_new_input_handler): New function hook type. + (ld_plugin_register_new_input): New interface. + (LDPT_REGISTER_NEW_INPUT_HOOK): New enum val. + (tv_register_new_input): New member. + +2017-12-01 Peter Bergner + + * opcode/ppc.h (PPC_INT_FMT): Define. + (struct powerpc_opcode) : Update type. + (struct powerpc_opcode) : Likewise. + (struct powerpc_opcode) : Likewise. + (struct powerpc_opcode) : Likewise. + (struct powerpc_opcode) : Likewise. + (ppc_optional_operand_value): Likewise. + +2017-11-24 H.J. Lu + + PR binutils/22444 + * elf/external.h (ELF_ALIGN_UP): New. + (ELF_NOTE_DESC_OFFSET): Likewise. + (ELF_NOTE_NEXT_OFFSET): Likewise. + +2017-11-16 Tamar Christina + + * opcode/aarch64.h: (AARCH64_FEATURE_F16_FML): New. + (AARCH64_ARCH_V8_4): Enable AARCH64_FEATURE_F16_FML by default. + +2017-11-15 Tamar Christina + + * opcode/arm.h: (ARM_EXT2_FP16_FML): New. + (ARM_AEXT2_V8_4A): Add ARM_EXT2_FP16_FML. + +2017-11-13 Jan Beulich + + * coff/pe.h (COFF_ENCODE_ALIGNMENT): Cap value to maximum one + representable. + (COFF_DECODE_ALIGNMENT): Define. + +2017-11-09 Tamar Christina + + * opcode/aarch64.h (AARCH64_ARCH_V8_4): Enable DOTPROD. + +2017-11-09 Tamar Christina + + * opcode/aarch64.h: + (aarch64_opnd): Add AARCH64_OPND_Va, AARCH64_OPND_MASK, + AARCH64_OPND_IMM_2, AARCH64_OPND_ADDR_OFFSET + and AARCH64_OPND_SM3_IMM2. + (aarch64_insn_class): Add cryptosm3 and cryptosm4. + (arch64_feature_set): Make uint64_t. + +2017-11-09 Tamar Christina + + * opcode/aarch64.h: + (AARCH64_FEATURE_V8_4, AARCH64_FEATURE_SM4): New. + (AARCH64_ARCH_V8_4, AARCH64_FEATURE_SHA3): New. + +2017-11-09 Nick Clifton + + * opcode/aarch64.h (aarch64_feature_set): Change type to unsigned + long long. + +2017-11-08 Tamar Christina + + * opcode/aarch64.h: + (AARCH64_FEATURE_SHA2, AARCH64_FEATURE_AES): New. + +2017-11-08 Jiong Wang + + * opcode/arm.h (ARM_AEXT2_V8_4A): Include Dot Product feature. + (ARM_EXT2_V8_4A): New macro. + (ARM_AEXT2_V8_4A): Likewise. + (ARM_ARCH_V8_4A): Likewise. + +2017-11-07 Palmer Dabbelt + + * opcode/riscv-opc.h (sptbr): Rename to satp. + (CSR_SPTBR): Rename to CSR_SATP. + (sptbr): Alias to CSR_SATP. + +2017-11-07 Tamar Christina + + * opcode/arm.h (FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_DOTPROD): + New macro. + +2017-11-02 Siddhesh Poyarekar + + * include/opcode/aarch64.h (AARCH64_ARCH_V8_2): Drop + AARCH64_FEATURE_F16. + +2017-11-01 James Bowman + + * elf/ft32.h: Add R_FT32_RELAX, SC0, SC1, DIFF32. + +2017-10-25 Alan Modra + + PR 22348 + * opcode/cr16.h (instruction): Delete. + (cr16_words, cr16_allWords, cr16_currInsn): Delete. + * opcode/crx.h (crx_cst4_map): Rename from cst4_map. + (crx_cst4_maps): Rename from cst4_maps. + (crx_no_op_insn): Rename from no_op_insn. + (instruction): Delete. + +2017-10-24 Andrew Waterman + + * opcode/riscv.h (VALID_RVC_LUI_IMM): c.lui can't load the + immediate 0. + +2017-10-12 James Bowman + + * elf/ft32.h: Add R_FT32_15. + * opcode/ft32.h: Replace FT32_FLD_K8 with K15. + (ft32_shortcode, sc_compar, ft32_split_shortcode, + ft32_merge_shortcode, ft32_merge_shortcode): New functions. + +2017-10-05 John Baldwin + + * elf/common.h (AT_FREEBSD_EHDRFLAGS, AT_FREEBSD_HWCAP): Define. + +2017-09-22 Alexandre Oliva + + * dwarf2.def (DW_AT_GNU_locviews): New. + * dwarf2.h (enum dwarf_location_list_entry_type): Add + DW_LLE_GNU_view_pair. + (DW_LLE_view_pair): Define. + +2017-09-15 Pedro Alves + + Sync with mainline gcc sources (r252823) + + 2017-09-15 Yao Qi + Pedro Alves + + * ansidecl.h (DISABLE_COPY_AND_ASSIGN): New macro. + + 2017-09-12 Jiong Wang + + * dwarf2.def (DW_CFA_AARCH64_negate_ra_state): New DW_CFA_DUP. + * dwarf2.h (DW_CFA_DUP): New define. + + 2017-08-21 Richard Biener + + * simple-object.h (simple_object_copy_lto_debug_sections): New + function. + + 2017-05-18 Martin Liska + + * ansidecl.h: Define CONSTEXPR macro. + + 2017-05-24 Nathan Sidwell + + * libiberty.h (ASTRDUP): Adjust cast to avoid warning. + + 2017-01-30 Alexandre Oliva + + Introduce C++ support in libcc1. + * gcc-c-fe.def (int_type_v0): Rename from... + (int_type): ... this. Introduce new version. + (float_type_v0): Rename from... + (float_type): ... this. Introduce new version. + (char_type): New. + * gcc-c-interface.h (gcc_c_api_version): Add GCC_C_FE_VERSION_1. + (gcc_type_array): Move... + * gcc-interface.h: ... here. + * gcc-cp-fe.def: New. + * gcc-cp-interface.h: New. + + 2016-04-29 Oleg Endo + + * longlong.h (umul_ppmm): Remove SHMEDIA checks. + (__umulsidi3, count_leading_zeros): Remove SHMEDIA implementations. + + 2017-09-15 Yao Qi + Pedro Alves + + * ansidecl.h (DISABLE_COPY_AND_ASSIGN): New macro. + + 2017-09-12 Jiong Wang + + * dwarf2.def (DW_CFA_AARCH64_negate_ra_state): New DW_CFA_DUP. + * dwarf2.h (DW_CFA_DUP): New define. + + 2017-08-21 Richard Biener + + * simple-object.h (simple_object_copy_lto_debug_sections): New + function. + + 2017-05-18 Martin Liska + + * ansidecl.h: Define CONSTEXPR macro. + + 2017-05-24 Nathan Sidwell + + * libiberty.h (ASTRDUP): Adjust cast to avoid warning. + + 2017-01-30 Alexandre Oliva + + Introduce C++ support in libcc1. + * gcc-c-fe.def (int_type_v0): Rename from... + (int_type): ... this. Introduce new version. + (float_type_v0): Rename from... + (float_type): ... this. Introduce new version. + (char_type): New. + * gcc-c-interface.h (gcc_c_api_version): Add GCC_C_FE_VERSION_1. + (gcc_type_array): Move... + * gcc-interface.h: ... here. + * gcc-cp-fe.def: New. + * gcc-cp-interface.h: New. + + 2016-04-29 Oleg Endo + + * longlong.h (umul_ppmm): Remove SHMEDIA checks. + (__umulsidi3, count_leading_zeros): Remove SHMEDIA implementations. + +2017-09-06 Kamil Rytarowski + + * opcode/nds32.h: Rename __BIT() to N32_BIT(). + +2017-09-05 Alexander Fedotov + Edmar Wienskoski + Edmar Wienskoski + + * opcode/ppc.h: + (spe2_opcodes, spe2_num_opcodes): New. + (PPC_OPCODE_SPE2): New define. + (PPC_OPCODE_EFS2): Likewise. + (SPE2_XOP): Likewise. + (SPE2_XOP_TO_SEG): Likewise. + +2017-08-23 Jan Kratochvil + + * gcc-interface.h (enum gcc_base_api_version): Update comment for + GCC_FE_VERSION_1. + (struct gcc_base_vtable): Rename set_arguments to set_arguments_v0. + Add set_arguments, set_triplet_regexp and set_driver_filename. + +2017-08-23 Jan Kratochvil + + * gcc-interface.h (enum gcc_base_api_version): Add + GCC_FE_VERSION_1. + (struct gcc_base_vtable): Rename compile to compile_v0. Update + comment for compile. New methods set_verbose and compile. + +2017-08-21 Alexander Fedotov + Edmar Wienskoski + + * opcode/ppc.h (PPC_OPCODE_LSP): New define. + +2017-08-14 Gustavo Romero + + * elf/common.h (NT_PPC_TAR): New macro. + (NT_PPC_PPR): Likewise. + (NT_PPC_DSCR): Likewise. + (NT_PPC_EBB): Likewise. + (NT_PPC_PMU): Likewise. + (NT_PPC_TM_CGPR): Likewise. + (NT_PPC_TM_CFPR): Likewise. + (NT_PPC_TM_CVMX): Likewise. + (NT_PPC_TM_CVSX): Likewise. + (NT_PPC_TM_SPR): Likewise. + (NT_PPC_TM_CTAR): Likewise. + (NT_PPC_TM_CPPR): Likewise. + (NT_PPC_TM_CDSCR): Likewise. + +2017-08-06 H.J. Lu + + PR ld/21903: + * bfdlink.h (bfd_link_info): Add inhibit_common_definition. + +2017-07-31 Nick Clifton + + PR 21850 + * ansidecl.h (OVERRIDE): Protect check of __cplusplus value with + #idef __cplusplus. + +2017-07-19 Claudiu Zissulescu + + * opcode/arc.h (SJLI): Add. + +2017-07-19 Claudiu Zissulescu + John Eric Martin + + * elf/arc-reloc.def: Add JLI relocs howto. + * opcode/arc-func.h (replace_jli): New function. + +2017-07-18 Nick Clifton + + PR 21775 + * aout/adobe.h: Fix spelling typos. + * aout/aout64.h: Likewise. + * aout/hp300hpux.h: Likewise. + * elf/hppa.h: Likewise. + * gdb/remote-sim.h: Likewise. + * libiberty.h: Likewise. + * mach-o/arm.h: Likewise. + * opcode/v850.h: Likewise. + +2017-07-14 Ravi Bangoria + + * dis-asm.h (struct disassemble_info): Change type of buffer_length + field to size_t. + +2017-07-07 John Baldwin + + * elf/common.h (NT_FREEBSD_PTLWPINFO): Define. + +2017-07-02 Jan Kratochvil + + * dwarf2.def (DW_IDX_compile_unit, DW_IDX_type_unit, DW_IDX_die_offset) + (DW_IDX_parent, DW_IDX_type_hash, DW_IDX_lo_user, DW_IDX_hi_user) + (DW_IDX_GNU_internal, DW_IDX_GNU_external): New. + * dwarf2.h (DW_IDX, DW_IDX_DUP, DW_FIRST_IDX, DW_END_IDX): New. + (enum dwarf_name_index_attribute): Remove. + (get_DW_IDX_name): New declaration. + +2017-06-30 Georg-Johann Lay + + PR gas/21683 + * opcode/avr.h (AVR_INSN): Add one for __gcc_isr. + +2017-06-30 Maciej W. Rozycki + Andrew Bennett + + * opcode/mips.h (ASE_XPA_VIRT): New macro. + +2017-06-29 Andreas Arnez + + * elf/common.h (NT_S390_GS_CB): New macro. + (NT_S390_GS_BC): Likewise. + +2017-06-28 Tamar Christina + + * opcode/aarch64.h: (AARCH64_FEATURE_DOTPROD): New. + (aarch64_insn_class): Added dotprod. + +2017-06-28 Jiong Wang + + * opcode/arm.h (FPU_NEON_EXT_DOTPROD): New macro. + (FPU_ARCH_DOTPROD_NEON_VFP_ARMV8): New macro. + +2017-06-28 Maciej W. Rozycki + Matthew Fortune + + * elf/mips.h (E_MIPS_MACH_IAMR2): New macro. + (AFL_EXT_INTERAPTIV_MR2): Likewise. + * opcode/mips.h: Document new operand codes defined. + (INSN_INTERAPTIV_MR2): New macro. + (INSN_CHIP_MASK): Adjust accordingly. + (CPU_INTERAPTIV_MR2): New macro. + (cpu_is_member) : New case. + (MIPS16_ALL_ARGS): Rename to... + (MIPS_SVRS_ALL_ARGS): ... this. + (MIPS16_ALL_STATICS): Rename to... + (MIPS_SVRS_ALL_STATICS): ... this. + +2017-06-26 Kuan-Lin Chen + + * elf/riscv.h (R_RISCV_32_PCREL): New. + +2017-06-24 Thomas Preud'homme + + * elf/arm.h (TAG_CPU_ARCH_V8R): New macro. + * opcode/arm.h (ARM_EXT2_V8A): New macro. + (ARM_AEXT2_V8A): Rename into ... + (ARM_AEXT2_V8AR): This. + (ARM_AEXT2_V8A): New macro. + (ARM_AEXT_V8R): New macro. + (ARM_AEXT2_V8R): New macro. + (ARM_ARCH_V8R): New macro. + +2017-06-24 Thomas Preud'homme + + * opcode/arm.h (ARM_AEXT_V4TxM): Add ARM_EXT_OS bit to the set. + (ARM_AEXT_V4T): Likewise. + (ARM_AEXT_V5TxM): Likewise. + (ARM_AEXT_V5T): Likewise. + (ARM_AEXT_V6M): Mask off ARM_EXT_OS bit. + +2017-06-22 H.J. Lu + + * bfdlink.h (bfd_link_info): Add shstk. + * elf/common.h (GNU_PROPERTY_X86_FEATURE_1_SHSTK): New. + +2017-06-22 H.J. Lu + + * bfdlink.h (bfd_link_info): Add ibtplt and ibt. + * elf/common.h (GNU_PROPERTY_X86_FEATURE_1_AND): New. + (GNU_PROPERTY_X86_FEATURE_1_IBT): Likewise. + +2017-06-21 Thomas Preud'homme + + * opcode/arm.h (FPU_ANY): New macro. + +2017-06-20 Andreas Krebbel + + * elf/s390.h (PT_S390_PGSTE): Define macro. + +2017-06-16 Alan Modra + + PR ld/20022 + PR ld/21557 + PR ld/21562 + PR ld/21571 + * bfdlink.h (struct bfd_link_hash_entry): Delete undef.section. + +2017-06-14 Yao Qi + + * dis-asm.h (print_insn_aarch64): Move it to opcodes/disassemble.h. + (print_insn_big_arm, print_insn_big_mips): Likewise. + (print_insn_i386, print_insn_ia64): Likewise. + (print_insn_little_arm, print_insn_little_mips): Likewise. + (print_insn_spu): Likewise. + +2017-06-06 Andrew Burgess + + * bfdlink.h (struct bfd_link_info): Add new resolve_section_groups + flag. + +2017-06-01 Alan Modra + + * elf/ppc64.h (PPC64_OPT_LOCALENTRY): Define. + +2017-05-31 Eli Zaretskii + + * environ.h: Add #ifndef guard. + +2017-05-30 Anton Kolesov + + * elf/arc-cpu.def: New file. + +2017-05-24 Yao Qi + + * dis-asm.h: Move some function declarations to + opcodes/disassemble.h. + +2017-05-24 Yao Qi + + * dis-asm.h (disassembler): Update declaration. + +2017-05-23 Claudiu Zissulescu + + * opcode/arc.h (MAX_INSN_FLGS): Update to 4. + +2017-05-22 H.J. Lu + + * include/opcode/i386.h (NOTRACK_PREFIX_OPCODE): New. + +2017-05-19 Jose E. Marchesi + + * elf/sparc.h (ELF_SPARC_HWCAP2_SPARC6): Define. + (ELF_SPARC_HWCAP2_ONADDSUB): Likewise. + (ELF_SPARC_HWCAP2_ONMUL): Likewise. + (ELF_SPARC_HWCAP2_ONDIV): Likewise. + (ELF_SPARC_HWCAP2_DICTUNP): Likewise. + (ELF_SPARC_HWCAP2_FPCMPSHL): Likewise. + (ELF_SPARC_HWCAP2_RLE): Likewise. + (ELF_SPARC_HWCAP2_SHA3): Likewise. + * opcode/sparc.h (sparc_opcode_arch_val): Add SPARC_OPCODE_ARCH_M8 + and adjust SPARC_OPCODE_ARCH_MAX. + (HWCAP2_SPARC6): Define. + (HWCAP2_ONADDSUB): Likewise. + (HWCAP2_ONMUL): Likewise. + (HWCAP2_ONDIV): Likewise. + (HWCAP2_DICTUNP): Likewise. + (HWCAP2_FPCMPSHL): Likewise. + (HWCAP2_RLE): Likewise. + (HWCAP2_SHA3): Likewise. + (OPM): Likewise. + (OPMI): Likewise. + (ONFCN): Likewise. + (REVFCN): Likewise. + (SIMM10): Likewise. + +2017-05-16 Alan Modra + + * bfdlink.h (struct bfd_link_hash_entry ): Rename to + non_ir_ref_regular. + +2017-05-16 Alan Modra + + * bfdlink.h (struct bfd_link_hash_entry): Update non_ir_ref + comment. Rename dynamic_ref_after_ir_def to non_ir_ref_dynamic. + +2017-05-15 Maciej W. Rozycki + Matthew Fortune + + * elf/mips.h (AFL_ASE_MIPS16E2): New macro. + (AFL_ASE_MASK): Adjust accordingly. + * opcode/mips.h: Document new operand codes defined. + (mips_operand_type): Add OP_REG28 enum value. + (INSN2_SHORT_ONLY): Update description. + (ASE_MIPS16E2, ASE_MIPS16E2_MT): New macros. + +2017-05-14 John David Anglin + + * opcode/hppa.h: Fix match and mask for 64-bit bb opcode. + +2017-05-10 Claudiu Zissulescu + + * elf/arc.h (SHT_ARC_ATTRIBUTES): Define. + (Tag_ARC_*): Define. + (E_ARC_OSABI_V4): Define. + (E_ARC_OSABI_CURRENT): Reassign it. + (TAG_CPU_*): Define. + * opcode/arc-attrs.h: New file. + * opcode/arc.h (insn_subclass_t): Assign enum values. + (insn_subclass_t): Update enum with QUARKSE1, QUARKSE2, and LL64. + (ARC_EA, ARC_CD, ARC_LLOCK, ARC_ATOMIC, ARC_MPY, ARC_MULT) + (ARC_NPS400, ARC_DPFP, ARC_SPFP, ARC_FPU, ARC_FPUDA, ARC_SWAP) + (ARC_NORM, ARC_BSCAN, ARC_UIX, ARC_TSTAMP, ARC_VBFDW) + (ARC_BARREL, ARC_DSPA, ARC_SHIFT, ARC_INTR, ARC_DIV, ARC_XMAC) + (ARC_CRC): Delete. + +2017-04-20 H.J. Lu + + PR ld/21382 + * bfdlink.h (bfd_link_hash_entry): Add dynamic_ref_after_ir_def. + +2017-04-19 Alan Modra + + * bfdlink.h (struct bfd_link_info ): + Revise comment. + +2017-04-11 Alan Modra + + * opcode/ppc.h (PPC_OPCODE_ALTIVEC2): Delete. + (PPC_OPCODE_VSX3): Delete. + (PPC_OPCODE_HTM): Delete. + (PPC_OPCODE_*): Renumber and order chronologically. + (PPC_OPCODE_SPE): Comment on this and other bits used for APUinfo. + +2017-04-06 Pip Cet + + * dis-asm.h: Add prototypes for wasm32 disassembler. + +2017-04-05 Pedro Alves + + * dis-asm.h (disassemble_info) : Now a + "const char *". + (next_disassembler_option): Constify. + +2017-04-04 H.J. Lu + + * elf/common.h (PT_GNU_MBIND_NUM): New. + (PT_GNU_MBIND_LO): Likewise. + (PT_GNU_MBIND_HI): Likewise. + (SHF_GNU_MBIND): Likewise. + +2017-04-03 Palmer Dabbelt + + * elf/riscv.h (RISCV_GP_SYMBOL): New define. + +2017-03-27 Andrew Waterman + + * opcode/riscv-opc.h (CSR_PMPCFG0): New define. + (CSR_PMPCFG1): Likewise. + (CSR_PMPCFG2): Likewise. + (CSR_PMPCFG3): Likewise. + (CSR_PMPADDR0): Likewise. + (CSR_PMPADDR1): Likewise. + (CSR_PMPADDR2): Likewise. + (CSR_PMPADDR3): Likewise. + (CSR_PMPADDR4): Likewise. + (CSR_PMPADDR5): Likewise. + (CSR_PMPADDR6): Likewise. + (CSR_PMPADDR7): Likewise. + (CSR_PMPADDR8): Likewise. + (CSR_PMPADDR9): Likewise. + (CSR_PMPADDR10): Likewise. + (CSR_PMPADDR11): Likewise. + (CSR_PMPADDR12): Likewise. + (CSR_PMPADDR13): Likewise. + (CSR_PMPADDR14): Likewise. + (CSR_PMPADDR15): Likewise. + (pmpcfg0): Declare register. + (pmpcfg1): Likewise. + (pmpcfg2): Likewise. + (pmpcfg3): Likewise. + (pmpaddr0): Likewise. + (pmpaddr1): Likewise. + (pmpaddr2): Likewise. + (pmpaddr3): Likewise. + (pmpaddr4): Likewise. + (pmpaddr5): Likewise. + (pmpaddr6): Likewise. + (pmpaddr7): Likewise. + (pmpaddr8): Likewise. + (pmpaddr9): Likewise. + (pmpaddr10): Likewise. + (pmpaddr11): Likewise. + (pmpaddr12): Likewise. + (pmpaddr13): Likewise. + (pmpaddr14): Likewise. + (pmpaddr15): Likewise. + +2017-03-30 Pip Cet + + * opcode/wasm.h: New file to support wasm32 architecture. + * elf/wasm32.h: Add R_WASM32_32 relocation. + +2017-03-29 Alan Modra + + * opcode/ppc.h (PPC_OPCODE_RAW): Define. + (PPC_OPCODE_*): Make them all unsigned long long constants. + +2017-03-27 Pip Cet + + * elf/wasm32.h: New file to support wasm32 architecture. + +2017-03-27 Rinat Zelig + + * opcode/arc.h (insn_class_t): Add ULTRAIP and MISC class. + +2017-03-21 Andreas Krebbel + + * opcode/s390.h (S390_INSTR_FLAG_VX2): Remove. + (S390_INSTR_FLAG_FACILITY_MASK): Adjust value. + +2017-03-21 Rinat Zelig + + * opcode/arc.h (insn_class_t): Add DMA class. + +2017-03-16 Nick Clifton + + * elf/common.h (GNU_BUILD_ATTRIBUTE_SHORT_ENUM): New GNU BUILD + note type. + +2017-03-14 Jakub Jelinek + + PR debug/77589 + * dwarf2.def (DW_OP_GNU_variable_value): New opcode. + +2017-03-13 Markus Trippelsdorf + + PR demangler/70909 + PR demangler/67264 + * demangle.h (struct demangle_component): Add d_printing field. + (cplus_demangle_print): Remove const qualifier from tree + parameter. + (cplus_demangle_print_callback): Likewise. + +2017-03-13 Nick Clifton + + PR binutils/21202 + * elf/aarch64.h (R_AARCH64_TLSDESC_LD64_LO12_NC): Rename to + R_AARCH64_TLSDESC_LD64_LO12. + (R_AARCH64_TLSDESC_ADD_LO12_NC): Rename to + R_AARCH64_TLSDESC_ADD_LO12_NC. + +2017-03-10 Nick Clifton + + * elf/common.h (EM_LANAI): New machine number. + (EM_BPF): Likewise. + (EM_WEBASSEMBLY): Likewise. + Move low value, deprecated, numbers to their numerical + equivalents. + +2017-03-08 H.J. Lu + + PR binutils/21231 + * elf/common.h (GNU_PROPERTY_LOPROC): New. + (GNU_PROPERTY_HIPROC): Likewise. + (GNU_PROPERTY_LOUSER): Likewise. + (GNU_PROPERTY_HIUSER): Likewise. + +2017-03-01 Nick Clifton + + * elf/common.h (SHF_GNU_BUILD_NOTE): Define. + (NT_GNU_PROPERTY_TYPE_0): Define. + (NT_GNU_BUILD_ATTRIBUTE_OPEN): Define. + (NT_GNU_BUILD_ATTRIBUTE_FUN): Define. + (GNU_BUILD_ATTRIBUTE_TYPE_NUMERIC): Define. + (GNU_BUILD_ATTRIBUTE_TYPE_STRING): Define. + (GNU_BUILD_ATTRIBUTE_TYPE_BOOL_TRUE): Define. + (GNU_BUILD_ATTRIBUTE_TYPE_BOOL_FALSE): Define. + (GNU_BUILD_ATTRIBUTE_VERSION): Define. + (GNU_BUILD_ATTRIBUTE_STACK_PROT): Define. + (GNU_BUILD_ATTRIBUTE_RELRO): Define. + (GNU_BUILD_ATTRIBUTE_STACK_SIZE): Define. + (GNU_BUILD_ATTRIBUTE_TOOL): Define. + (GNU_BUILD_ATTRIBUTE_ABI): Define. + (GNU_BUILD_ATTRIBUTE_PIC): Define. + (NOTE_GNU_PROPERTY_SECTION_NAME): Define. + (GNU_BUILD_ATTRS_SECTION_NAME): Define. + (GNU_PROPERTY_STACK_SIZE): Define. + (GNU_PROPERTY_NO_COPY_ON_PROTECTED): Define. + (GNU_PROPERTY_X86_ISA_1_USED): Define. + (GNU_PROPERTY_X86_ISA_1_NEEDED): Define. + (GNU_PROPERTY_X86_ISA_1_486): Define. + (GNU_PROPERTY_X86_ISA_1_586): Define. + (GNU_PROPERTY_X86_ISA_1_686): Define. + (GNU_PROPERTY_X86_ISA_1_SSE): Define. + (GNU_PROPERTY_X86_ISA_1_SSE2): Define. + (GNU_PROPERTY_X86_ISA_1_SSE3): Define. + (GNU_PROPERTY_X86_ISA_1_SSSE3): Define. + (GNU_PROPERTY_X86_ISA_1_SSE4_1): Define. + (GNU_PROPERTY_X86_ISA_1_SSE4_2): Define. + (GNU_PROPERTY_X86_ISA_1_AVX): Define. + (GNU_PROPERTY_X86_ISA_1_AVX2): Define. + (GNU_PROPERTY_X86_ISA_1_AVX512F): Define. + (GNU_PROPERTY_X86_ISA_1_AVX512CD): Define. + (GNU_PROPERTY_X86_ISA_1_AVX512ER): Define. + (GNU_PROPERTY_X86_ISA_1_AVX512PF): Define. + (GNU_PROPERTY_X86_ISA_1_AVX512VL): Define. + (GNU_PROPERTY_X86_ISA_1_AVX512DQ): Define. + (GNU_PROPERTY_X86_ISA_1_AVX512BW): Define. + +2017-02-28 Peter Bergner + + * dis-asm.h (disasm_options_t): New typedef. + (parse_arm_disassembler_option): Remove prototype. + (set_arm_regname_option): Likewise. + (get_arm_regnames): Likewise. + (get_arm_regname_num_options): Likewise. + (disassemble_init_s390): New prototype. + (disassembler_options_powerpc): Likewise. + (disassembler_options_arm): Likewise. + (disassembler_options_s390): Likewise. + (remove_whitespace_and_extra_commas): Likewise. + (disassembler_options_cmp): Likewise. + (next_disassembler_option): New inline function. + (FOR_EACH_DISASSEMBLER_OPTION): New macro. + +2017-02-28 Alan Modra + + * elf/ppc64.h (R_PPC64_16DX_HA): New. Expand fake reloc comment. + * elf/ppc.h (R_PPC_16DX_HA): Likewise. + +2017-02-24 Richard Sandiford + + * opcode/aarch64.h (AARCH64_OPND_SVE_ADDR_RI_S4x16) + (AARCH64_OPND_SVE_IMM_ROT1, AARCH64_OPND_SVE_IMM_ROT2) + (AARCH64_OPND_SVE_Zm3_INDEX, AARCH64_OPND_SVE_Zm3_22_INDEX) + (AARCH64_OPND_SVE_Zm4_INDEX): New aarch64_opnds. + +2017-02-24 Richard Sandiford + + * opcode/aarch64.h (AARCH64_FEATURE_COMPNUM): New macro. + (AARCH64_ARCH_V8_3): Include AARCH64_FEATURE_COMPNUM. + +2017-02-22 Andrew Waterman + + * opcode/riscv-opc.h (CSR_SCOUNTEREN): New define. + (CSR_MCOUNTEREN): Likewise. + (scounteren): Declare register. + (mcounteren): Likewise. + +2017-02-14 Andrew Waterman + + * opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define. + (MASK_SFENCE_VMA): Likewise. + (sfence_vma): Declare instruction. + +2017-02-14 Alan Modra + + PR 21118 + * opcode/ppc.h (PPC_OPERAND_*): Reassign values, regs first. + (PPC_OPERAND_SPR, PPC_OPERAND_GQR): Define. + +2017-01-24 Dimitar Dimitrov + + * opcode/hppa.h: Clarify that file is part of GNU opcodes. + * opcode/i860.h: Ditto. + * opcode/nios2.h: Ditto. + * opcode/nios2r1.h: Ditto. + * opcode/nios2r2.h: Ditto. + * opcode/pru.h: Ditto. + +2017-01-24 Alan Hayward + + * elf/common.h (NT_ARM_SVE): Define. + +2017-01-04 Jiong Wang + + * dwarf2.def: Sync with mainline gcc sources. + + 2017-01-04 Richard Earnshaw + Jiong Wang + + * dwarf2.def (DW_OP_AARCH64_operation): Reserve the number 0xea. + (DW_CFA_GNU_window_save): Comments the multiplexing on AArch64. + +2017-01-04 Szabolcs Nagy + + * opcode/aarch64.h (AARCH64_FEATURE_RCPC): Define. + (AARCH64_ARCH_V8_3): Update. + +2017-01-03 Kito Cheng + + * opcode/riscv-opc.h: Add support for the "q" ISA extension. + +2017-01-03 Nick Clifton + + * dwarf2.def: Sync with mainline gcc sources + * dwarf2.h: Likewise. + + 2016-12-21 Jakub Jelinek + + * dwarf2.def (DW_FORM_ref_sup): Renamed to ... + (DW_FORM_ref_sup4): ... this. New form. + (DW_FORM_ref_sup8): New form. + + 2016-10-17 Jakub Jelinek + + * dwarf2.h (enum dwarf_calling_convention): Add new DWARF5 + calling convention codes. + (enum dwarf_line_number_content_type): New. + (enum dwarf_location_list_entry_type): Add DWARF5 DW_LLE_* + codes. + (enum dwarf_source_language): Add new DWARF5 DW_LANG_* codes. + (enum dwarf_macro_record_type): Add DWARF5 DW_MACRO_* codes. + (enum dwarf_name_index_attribute): New. + (enum dwarf_range_list_entry): New. + (enum dwarf_unit_type): New. + * dwarf2.def: Add new DWARF5 DW_TAG_*, DW_FORM_*, DW_AT_*, + DW_OP_* and DW_ATE_* entries. + + 2016-08-15 Jakub Jelinek + + * dwarf2.def (DW_AT_string_length_bit_size, + DW_AT_string_length_byte_size): New attributes. + + 2016-08-12 Alexandre Oliva + + PR debug/63240 + * dwarf2.def (DW_AT_deleted, DW_AT_defaulted): New. + * dwarf2.h (enum dwarf_defaulted_attribute): New. + +2017-01-02 Alan Modra + + Update year range in copyright notice of all files. + +For older changes see ChangeLog-2016 + +Copyright (C) 2017 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/support/sdbinutils/include/ChangeLog-9103 b/support/sdbinutils/include/ChangeLog-9103 new file mode 100644 index 0000000..bac5302 --- /dev/null +++ b/support/sdbinutils/include/ChangeLog-9103 @@ -0,0 +1,2688 @@ +2003-12-19 Andreas Tobler + + * include/fibheap.h (fibnode): Use __extension__ for + bit-fields mark and degree if __GNUC__. + +2003-12-18 Kazu Hirata + + * include/fibheap.h (fibnode): Use unsigned long int for + bit-fields if __GNUC__ is defined. + +2003-12-19 Andreas Tobler + + * fibheap.h (fibnode): Use __extension__ for + bit-fields mark and degree if __GNUC__. + +2003-12-18 Kazu Hirata + + * fibheap.h (fibnode): Use unsigned long int for + bit-fields if __GNUC__ is defined. + +2003-12-04 H.J. Lu + + * bfdlink.h (bfd_link_info): Change relax_finalizing to + need_relax_finalize. + +2003-12-03 Alan Modra + + * bfdlink.h (struct bfd_link_hash_entry): Rename "next" to "und_next". + +2003-12-02 Alan Modra + + * bfdlink.h (struct bfd_link_info): Remove mpc860c0 field. + +2003-11-14 Nick Clifton + + * dis-asm.h (struct disassemble_info): Add new field + 'symbol_is_valid' which is a function which can tell the + disassembler to skip certain symbols as they should not be + displayed to the user. + (arm_symbol_is_valid): New prototype. This is the ARM + specific function for the symbol_is_valid field. + (generic_symbol_is_valid): New prototype. This is the default + function pointed to by the symbol_is_valid field. + +2003-11-06 Bruno Rohee + + * hp-symtab.h: Fix "the the" typo. + +2003-10-24 H.J. Lu + + * bfdlink.h (bfd_elf_version_expr): Add "symbol" and remove + "wildcard". + +2003-10-22 Joseph S. Myers + + * obstack.h: Merge the following change from gnulib: + 2003-10-21 Paul Eggert + * obstack.h (obstack_1grow_fast): Properly parenthesize arg. + (obstack_ptr_grow_fast, obstack_int_grow_fast): + Don't use lvalue casts, as GCC plans to remove support for them + in GCC 3.5. Reported by Joseph S. Myers. This bug + was also present in the non-GCC version, indicating that this + code had always been buggy and had never been widely used. + (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank): + Use the fast variant of each macro, rather than copying the + definiens of the fast variant; that way, we'll be more likely to + catch future bugs in the fast variants. + +2003-10-22 Jakub Jelinek + + * bfdlink.h (struct bfd_elf_version_expr): Remove match field. + Add wildcard and mask fields. + (BFD_ELF_VERSION_C_TYPE): Define. + (BFD_ELF_VERSION_CXX_TYPE): Likewise. + (BFD_ELF_VERSION_JAVA_TYPE): Likewise. + (struct bfd_elf_version_expr_head): New. + (struct bfd_elf_version_tree): Add match field. + Change type of globals and locals fields + to struct bfd_elf_version_expr_head. + +2003-09-22 Andrew Cagney + + * floatformat.h (struct floatformat): Add field "is_valid". + +2003-09-15 Andrew Cagney + + * floatformat.h (floatformat_to_double): Make input buffer constant. + (floatformat_from_double, floatformat_is_valid): Ditto. + +2003-09-15 Andrew Cagney + + * floatformat.h (struct floatformat): Make "exp_bias" signed. + +2003-09-15 Daniel Jacobowitz + + * floatformat.h (floatformat_is_valid): Add prototype. + +2003-08-27 Andrew Cagney + + * dis-asm.h (init_disassemble_info): Declare. + (INIT_DISASSEMBLE_INFO): Redefine as a call to + init_disassemble_info. + (INIT_DISASSEMBLE_INFO_NO_ARCH): Ditto. + +2003-08-20 Nick Clifton + + * bfdlink.h (enum report_method): New enum. Describes how to + report something. + (struct bfd_link_info): Delete fields 'no_undefined' and + 'allow_shlib_undefined'. Replace with + 'unresolved_symbols_in_objects' and + 'unresolved_symbols_in_shared_libs'. + +2003-08-07 Alan Modra + + * bfdlink.h: Remove PARAMS macro. Replace PTR with void *. + * dis-asm.h: Likewise. + +2003-07-09 Bob Wilson + + * xtensa-config.h: Undef all macros before defining them. + +2003-07-06 H.J. Lu + + * demangle.h: Support C++. + +2003-07-01 Zack Weinberg + + * filenames.h: New file imported from binutils. + +2003-06-30 Bob Wilson + + * xtensa-config.h: New file imported from binutils. + +2003-06-30 Bob Wilson + + * xtensa-config.h (XCHAL_HAVE_CONST16, XCHAL_HAVE_ABS, + XCHAL_HAVE_ADDX, XCHAL_HAVE_L32R): Define. + +2003-06-25 Alan Modra + + * bfdlink.h: Correct spelling of "relocatable". + +2003-06-22 Zack Weinberg + + * safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC): Rename to + HOST_CHARSET_UNKNOWN, HOST_CHARSET_ASCII, HOST_CHARSET_EBCDIC + respectively. + +2003-06-21 Zack Weinberg + + * safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC, HOST_CHARSET): + New #defines. + +2003-06-17 Kaveh R. Ghazi + + * ansidecl.h: Delete HAVE_LONG_DOUBLE GCC bootstrap support. + +2003-05-23 Jakub Jelinek + + * bfdlink.h (struct bfd_link_info): Add execstack and noexecstack. + +2003-06-03 H.J. Lu + + * bfdlink.h (LD_DEFINITION_IN_DISCARDED_SECTION): New. + +2003-05-30 Ulrich Drepper + Jakub Jelinek + + * bfdlink.h (struct bfd_link_info): Add pie and executable + bits. + +2003-05-21 Nick Clifton + + * bfdlink.h (struct bfd_link_hash_table): Fix typo in comment. + +2003-05-15 Jim Blandy + + * libiberty.h (hex_value): Make the value an unsigned int, to + avoid unexpected sign-extension when cast to unsigned types larger + than int --- like bfd_vma, on some platforms. + (_hex_value): Update declaration. + +2003-05-09 Alan Modra + + * xtensa-isa-internal.h (xtensa_isa_module_struct): Remove const on + gen_num_opcodes_fn return type. + +2003-05-07 Jason Merrill + + * hashtab.h (iterative_hash): Prototype. + (iterative_hash_object): New macro. + +2003-04-28 H.J. Lu + + * bfdlink.h (bfd_link_info): Add relax_finalizing. + +2003-04-23 H.J. Lu + + * bfdlink.h (bfd_link_callbacks): Add error_handler. + +2003-04-02 Bob Wilson + + * xtensa-config.h: Remove comment indicating that this is a + generated file. + +2003-04-01 Bob Wilson + + * dis-asm.h (print_insn_xtensa): Declare. + * xtensa-config.h: New file. + * xtensa-isa-internal.h: Likewise. + * xtensa-isa.h: Likewise. + +2003-03-17 Kaveh R. Ghazi + + * ansidecl.h (ATTRIBUTE_NONNULL, ATTRIBUTE_NULL_PRINTF, + ATTRIBUTE_NULL_PRINTF_1, ATTRIBUTE_NULL_PRINTF_2, + ATTRIBUTE_NULL_PRINTF_3, ATTRIBUTE_NULL_PRINTF_4, + ATTRIBUTE_NULL_PRINTF_5): New. + (ATTRIBUTE_PRINTF): Add ATTRIBUTE_NONNULL. + +2003-03-17 Jan Hubicka + + * hashtab.h (htab_traverse_noresize): Declare. + +2003-02-27 Kaveh R. Ghazi + + * libiberty.h: Document return value of physmem routines. + +2003-02-20 Kaveh R. Ghazi + + * libiberty.h (physmem_total, physmem_available): Prototype. + +2003-02-20 Daniel Jacobowitz + + * libiberty.h (lrealpath): Add declaration. + +2003-01-31 Grant Grundler + + * hppa.h (ldwa, ldda): Add ordered opcodes. + +2003-01-26 Daniel Jacobowitz + + * hashtab.h (htab_alloc_with_arg, htab_free_with_arg): Add new types. + (struct htab): Add alloc_arg, alloc_with_arg_f, free_with_arg_f. + (htab_create_alloc_ex): New prototype. + (htab_set_functions_ex): New prototype. + +2002-07-17 Geoffrey Keating + + * splay-tree.h (GTY): Define if undefined. + (splay_tree_allocate_fn): Return PTR for compatibility, not void *. + (struct splay_tree_node_s): Support gengtype. + (struct splay_tree_s): Likewise. Make allocate_data a PTR, + not a void *. + +2002-01-02 Ben Elliston + + * dis-asm.h (print_insn_iq2000): Declare. + +2002-12-24 Dmitry Diky + + * dis-asm.h: Add msp430 disassembler prototype. + +2002-12-27 Chris Demetriou + + * dis-asm.h (print_mips_disassembler_options): Prototype. + +2002-12-23 Alan Modra + + * bfdlink.h (struct bfd_link_info): Add "strip_discarded". + +2002-12-20 Alan Modra + + * bfdlink.h (struct bfd_link_info): Replace bfd_boolean fields with + bit-fields. Rearrange to put all like types together. + +2002-11-30 Alan Modra + + * bfdlink.h: Replace boolean with bfd_boolean. Formatting. + +2002-11-23 Simon Burge + + * libiberty.h (basename): Add NetBSD to the list. + +2002-11-22 Daniel Jacobowitz + + * libiberty.h (make_relative_prefix): Add prototype. + +2002-11-14 Egor Duda + + * bfdlink.h (struct bfd_link_info): Add new boolean + field pei386_runtime_pseudo_reloc. + +2002-10-26 Roger Sayle + + * partition.h: Close the extern "C" scope when compiling with C++. + +2002-10-26 Roger Sayle + DJ Delorie + + PR bootstrap/8351 + * getopt.h: Avoid prototyping getopt with no arguments in C++. + +2002-10-24 Nathan Tallent + + * ansidecl.h (__STDC__): Add (__alpha && __cplusplus) to the + list of platform compilers that may look, smell and act + like __STDC__ but that may not define it. + +2002-10-11 David O'Brien + + * getopt.h: getopt is in unistd.h (based on SUSv2). + +2002-09-26 Andrew Cagney + + * regs/: Delete directory. + +2002-09-19 Alexandre Oliva + + * libiberty.h (asprintf, vasprintf): Don't declare them if the + corresponding HAVE_DECL_ macro is 1. + +2002-09-19 Nathan Tallent + + * dis-asm.h: Remove (errant) trailing semicolon (;) from the + extern "C" { } declaration. + +2002-09-04 Nick Clifton + + * dis-asm.h (print_ppc_disassembler_options): Prototype. + +2002-08-28 Michael Hayes + + * dis-asm.h: Add standard disassembler for tic4x. + +2002-08-07 H.J. Lu + + * bfdlink.h (bfd_link_info): Add allow_undefined_version. + (bfd_elf_version_expr): Add symver and script. + +2002-07-31 Ian Dall + + * bfdlink.h (bfd_link_common_skip_ar_symbols): New enum. + (struct bfd_link_info): Add new field 'common_skip_ar_symbols'. + +2002-07-19 Denis Chertykov + Matthew Green + + * dis-asm.h (print_insn_ip2k): Declare. + +2002-07-01 Alan Modra + + * bfdlink.h (struct bfd_sym_chain): Declare. + (struct bfd_link_info): Add gc_sym_list. Formatting fixes. + +2002-06-25 Alan Modra + + * demangle.h: #include "ansidecl.h" rather than #include . + * fibheap.h: Likewise. + * hashtab.h: Likewise. + * partition.h: Likewise. + * sort.h: Likewise. + * splay-tree.h: Likewise. + +2002-06-24 Alan Modra + + * libiberty.h (basename): Don't declare if HAVE_DECL_BASENAME. + * getopt.h (getopt): Don't declare if HAVE_DECL_GETOPT. + +2002-06-18 Dave Brolley + + From Catherine Moore: + * dis-asm.h (print_insn_frv): New prototype. + +2002-06-09 Andrew Cagney + + * remote-sim.h: Move to directory gdb/. + * callback.h: Move to directory gdb/. + +2002-06-07 Charles Wilson + + * bfdlink.h (struct bfd_link_info): Change type of + pei386_auto_import field to int so that -1 can mean enabled by + default and 1 can mean enabled by command line switch. + +2002-06-06 DJ Delorie + + * hashtab.h (htab): Rearrange new members for backward + compatibility. + (htab_create): Don't use a macro that requires other headers. + +2002-06-05 Geoffrey Keating + + * hashtab.h (htab_create): Restore prototype for backward + compatibility. + (htab_try_create): Likewise. + +2002-05-22 Geoffrey Keating + + * hashtab.h (struct htab): Update for change to length specifier. + +2002-05-10 Geoffrey Keating + + * hashtab.h (GTY): Define if undefined. + (htab_alloc): New typedef. + (htab_free): New typedef. + (struct htab): Support gengtype; allow user-specified memory + allocation. + (htab_create_alloc): New. + (htab_create): Replace with #define. + (htab_try_create): Delete. + +2002-05-28 Kuang Hwa Lin + + * dis-asm.h: Prototype print_insn_dlx. + +2002-05-23 Andrew Cagney + + * sim-d10v.h: Delete file. Moved to include/gdb/. + +2002-05-21 H.J. Lu (hjl@gnu.org) + + * bfdlink.h (bfd_link_info): Add allow_multiple_definition. + +2002-05-17 J"orn Rennecke + + * dis-asm.h (print_insn_shl, print_insn_sh64l): Remove prototype. + +2002-04-16 David S. Miller + + * xregex2.h (__restrict_arr): Define to __restrict on GCC + 3.1 and later. Do not redefine. + +2002-04-01 Phil Edwards + + * dyn-string.h: Also allow IN_GLIBCPP_V3 to redefine names. + +2002-03-10 Daniel Jacobowitz + + * gdb: New directory. + +2002-03-06 Andrew Cagney + + * floatformat.h (floatformat_arm_ext): Delete declaration. + +2002-02-21 Jim Blandy + + Allow the user to specify functions for allocating memory for + splay tree roots and nodes. + * splay-tree.h (splay_tree_allocate_fn, splay_tree_deallocate_fn): + New types. + (splay_tree): New fields: `allocate', `deallocate', and + `allocate_data'. + (splay_tree_new_with_allocator): New function declaration. + +2002-02-15 Alan Modra + + Support arbitrary length fill patterns. + * bfdlink.h (enum bfd_link_order_type): Remove bfd_fill_link_order. + (struct bfd_link_order): Remove fill. Add data.size. + +2002-02-08 Alexandre Oliva + + Contribute sh64-elf. + 2000-11-25 Hans-Peter Nilsson + * dis-asm.h (print_insn_sh64): New prototype. + (print_insn_sh64l): New prototype. + (print_insn_sh64x_media): New prototype. + +2002-02-05 Frank Ch. Eigler + + * dis-asm.h (disassemble_info): New field `insn_sets'. + (INIT_DISASSEMBLE_INFO): Clear it. + +2002-02-05 Jason Merrill + + * demangle.h (cplus_demangle_v3): Add "options" parm. + (cplus_demangle_v3_type): Remove prototype. + (DMGL_VERBOSE): New macro. + (DMGL_TYPES): New macro. + +2002-02-02 H.J. Lu (hjl@gnu.org) + + * demangle.h (cplus_demangle_v3_type): New prototype. + +2002-01-31 Ivan Guzvinec + + * dis-asm.h : Add support for or32 targets + +2002-01-28 Kaveh R. Ghazi + + * libiberty.h (C_alloca): Add ATTRIBUTE_MALLOC. + +2002-01-27 David O'Brien + + * cgen.h (BFD_VERSION): Use BFD_VERSION_DATE instead. + +2001-12-14 Nick Clifton + + * dis-asm.h (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialise the + disassembler_options field (to NULL). + +2001-12-13 Jakub Jelinek + + * bfdlink.h (struct bfd_link_info): Add eh_frame_hdr field. + +2001-12-07 Geoffrey Keating + + * dis-asm.h (print_insn_xstormy16): Declare. + +2001-12-06 Richard Henderson + + * demangle.h (no_demangling): New. + (NO_DEMANGLING_STYLE_STRING): New. + +2001-11-14 Alan Modra + + * dis-asm.h (print_insn_i386): Declare. + +2001-11-11 Timothy Wall + + * dis-asm.h: Fix comment to refer to octets rather than bytes. + +2001-10-30 Hans-Peter Nilsson + + * dis-asm.h (print_insn_mmix): Add prototype. + +2001-10-24 Neil Booth + + * safe-ctype.h (_sch_isbasic, IS_ISOBASIC): New. + +2001-10-22 Kaveh R. Ghazi + + * libiberty.h (hex_init): Revert delete. + + * libiberty.h (_hex_value): Const-ify. + (hex_init): Delete. + +2001-10-16 Christopher Faylor + + * filenames.h: Add cygwin to the list of dosish style path systems. + +2001-10-07 Kaveh R. Ghazi + + * demangle.h (demangler_engine): Const-ify. + * libiberty.h (buildargv): Likewise. + +2001-10-03 Vassili Karpov + + * bfdlink.h (struct bfd_link_info): Add nocopyreloc field. + +2001-09-24 Kaveh R. Ghazi + + * libiberty.h (reconcat): New function. + +2001-09-18 Kaveh R. Ghazi + + * libiberty.h (concat, concat_length, concat_copy, concat_copy2, + ACONCAT): Improve comments. + +2001-09-18 Alan Modra + + * objalloc.h (OBJALLOC_ALIGN): Define using offsetof. + +2001-09-17 Kaveh R. Ghazi + + * libiberty.h (concat_length, concat_copy, concat_copy2, + libiberty_concat_ptr, ACONCAT): New. + + * libiberty.h (ASTRDUP): New macro. + libiberty_optr, libiberty_nptr, libiberty_len): Declare. + +2001-08-29 Kaveh R. Ghazi + + * ansidecl.h: Update comments reflecting previous change. + +2001-08-27 Kaveh R. Ghazi + + * ansidecl.h (VA_OPEN, VA_CLOSE): Allow multiple uses. + +2001-08-25 Nick Clifton + + * bfdlink.h (struct bfd_link_info): Change 'spare_dynamic_tags' to + unsigned to remove a compile time warning message. + +2001-08-24 H.J. Lu + + * bfdlink.h (bfd_link_hash_table_type): New. The linker hash + table type, bfd_link_generic_hash_table and + bfd_link_elf_hash_table. + (bfd_link_hash_table): Add a new field, type, for the linker + hash table type. + +2001-08-23 Jakub Jelinek + + * bfdlink.h (struct bfd_link_info): Add combreloc and + spare_dynamic_tags fields. + +2001-08-23 Lars Brinkhoff + + * dyn-string.h, fibheap.h, partition.h, sort.h, splay-tree.h: + replace "GNU CC" with "GCC". + +2001-08-21 Richard Henderson + + * fibheap.h: Tidy formatting. + (fibnode_t): Limit degree to 31 bits to avoid warning. + +2001-08-20 Daniel Berlin + + * fibheap.h: New file. Fibonacci heap. + +2001-08-20 Andrew Cagney + + * floatformat.h (floatformat_arm_ext): Document as deprecated. + (floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword) + (floatformat_ia64_spill_little, floatformat_ia64_quad_little) + (floatformat_ia64_spill_big, floatformat_ia64_quad_big) + (floatformat_m88110_harris_ext): Declare. + +2001-08-18 Zack Weinberg + + * ansidecl.h: Reorganize for readability, remove documentation + of obsolete macros, document PARAMS and VPARAMS. Add new + macros VA_OPEN, VA_CLOSE, and VA_FIXEDARG for nicer variadic + function implementation. + +2001-08-16 Richard Henderson + + * hashtab.h (htab_hash_string): Declare. + +2001-08-10 Andrew Cagney + + * libiberty.h (lbasename): Change function declaration to return a + const char pointer. + +2001-08-02 Mark Kettenis + + * xregex.h (_REGEX_RE_COMP): Define. + (re_comp): Define to xre_comp. + (re_exec): Define to xre_exec. + +2001-08-02 Charles Wilson + + * bfdlink.h (struct bfd_link_info): add new boolean + field pei386_auto_import. + +2001-07-18 Andreas Jaeger + + * xregex2.h: Place under LGPL version 2.1. + +2001-07-10 Jeff Johnston + + * xregex.h: New file to support libiberty regex. + * xregex2.h: Ditto. + +2001-06-15 Hans-Peter Nilsson + + * bfdlink.h (struct bfd_link_info): New member export_dynamic. + +2001-05-16 Matt Kraai + + * partition.h: Fix misspelling of `implementation'. + +2001-05-10 Kaveh R. Ghazi + + * ansidecl.h (NULL_PTR): Delete. + +2001-05-07 Zack Weinberg + + * demangle.h: Use PARAMS for all prototypes. + * ternary.h: Use PARAMS for all prototypes. Use PTR, not void *. + Make arguments constant where possible. + +2001-05-07 Mark Mitchell + + * splay-tree.h (splay_tree_max): New function. + (splay_tree_min): Likewise. + +2001-04-27 Johan Rydberg + + * dis-asm.h (print_insn_openrisc): Add prototype. + +2001-04-15 Daniel Berlin + + * ternary.h: New file - Ternary search tree header. + +2001-04-13 Jakub Jelinek + + * bfdlink.h (bfd_link_discard): Add discard_sec_merge. + +2001-04-03 Zack Weinberg + + * ansidecl.h: All logic from gcc/gansidecl.h moved here. + +2001-03-31 Kaveh R. Ghazi + + * libiberty.h (alloca): Handle setting C_ALLOCA. + +2001-03-20 Jim Blandy + + * demangle.h (enum gnu_v3_constructor_kinds, + is_gnu_v3_mangled_ctor, enum gnu_v3_destructor_kinds, + is_gnu_v3_mangled_dtor): New declarations. + +2001-03-14 Nick Clifton + + * ansidecl.h: Fix copyright dates. + * demangle.h: Fix copyright dates. + * floatformat.h: Fix copyright dates. + * fnmatch.h: Fix copyright dates. + * getopt.h: Fix copyright dates. + * libiberty.h: Add FSF copyright notice. + * md5.h: Fix copyright dates. + * obstack.h: Fix copyright dates. + * splay-tree.h: Fix copyright dates. + +2001-03-10 Neil Booth + John David Anglin + + * libiberty.h: Add lbasename. + +2001-03-06 Zack Weinberg + + * libiberty.h: Prototype C_alloca; define alloca to either + __builtin_alloca or C_alloca as appropriate. + +2001-03-01 John David Anglin + + * safe-ctype.h (_sch_test): Cast enum bit to unsigned short int for pcc + compatibility. + +2001-02-18 lars brinkhoff + + * dis-asm.h: Add PDP-11 target. + +2001-02-09 Martin Schwidefsky + + * dis-asm.h: Add linux target for S/390. + +2001-01-11 Peter Targett + + * dis-asm.h (arc_get_disassembler): Correct declaration. + +2001-01-09 Philip Blundell + + * bin-bugs.h (REPORT_BUGS_TO): Set to `bug-binutils@gnu.org'. + +2000-12-18 Joseph S. Myers + + * COPYING: Update to current + ftp://ftp.gnu.org/pub/gnu/Licenses/COPYING-2.0 (fixes references + to 19yy as example year in copyright notice). + +2000-12-19 Hans-Peter Nilsson + + * dis-asm.h (struct disassemble_info): New member "section". + (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize private_data member. + Initialize section member. + +2000-12-16 Herman A.J. ten Brugge + + * safe-ctype.h: Make code work on all targets and not just on + targets where a char is 8 bits. + +2000-12-10 Fred Fish + + * bfdlink.h (struct bfd_link_info): Add new allow_shlib_undefined + member to struct for systems where it is normal to have undefined + symbols in shared libraries at runtime and the runtime linker + takes care of redirecting them. + +2000-12-07 Zack Weinberg + + * safe-ctype.h: New file. + +2000-12-06 Rodney Brown + + * getopt.h obstack.h: Standarize copyright statement. + +2000-12-04 Richard Henderson + + * demangle.h: Change "new_abi" to "v3" everywhere. + +2000-11-22 Zack Weinberg + + * libiberty.h: Move #includes to top. Prototype xmalloc_failed. + +2000-11-15 Kenneth Block + + * demangle.h: Add gnat and java demangle styles. + +2000-11-04 Hans-Peter Nilsson + + * hashtab.h (struct htab): Add member return_allocation_failure. + (htab_try_create): New prototype. Mention which functions may + return NULL when this is used. + +2000-11-03 Hans-Peter Nilsson + + * hashtab.h: Change void * to PTR where necessary. + +2000-10-11 Mark Mitchell + + * splay-tree.h (splay_tree_predecessor): Declare. + +2000-09-29 Hans-Peter Nilsson + + * dis-asm.h: Declare cris_get_disassembler, not print_insn_cris. + Fix typo in comment. + +2000-09-28 John David Anglin + + * alloca-conf.h: New file (copied from libiberty). + +2000-09-05 John David Anglin + + * md5.h (md5_uint32): Choose via INT_MAX instead of UINT_MAX. + +2000-09-04 Alex Samuel + + * dyn-string.h: Adjust formatting. + (dyn_string_insert_char): New macro. New declaration. + +2000-08-28 Jason Merrill + + * md5.h: New file. + +2000-08-24 Greg McGary + + * libiberty.h (ARRAY_SIZE): New macro. + +2000-07-29 Nick Clifton + + * os9k.h: Add copyright notice. + Fix formatting. + +2000-07-22 Jason Eckhardt + + * dis-asm.h (print_insn_i860): Add prototype. + +2000-07-20 H.J. Lu + + * bfdlink.h (bfd_link_info): Add new_dtags. + +2000-07-20 Hans-Peter Nilsson + + * dis-asm.h (print_insn_cris): Declare. + +2000-07-19 H.J. Lu (hjl@gnu.org) + + * bfdlink.h (bfd_link_info): Add flags and flags_1. + +2000-06-05 DJ Delorie + + * MAINTAINERS: new + +2000-06-21 Alex Samuel + + * dyn-string.h (dyn_string_init, dyn_string_new, + dyn_string_delete, dyn_string_release, dyn_string_resize, + dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr, + dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert, + dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr, + dyn_string_append_char, dyn_string_substring_dyn_string_eq): + Define as same name with __cxa_ prepended, if IN_LIBGCC2. + (dyn_string_init, dyn_string_copy, dyn_string_copy_cstr, + dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert, + dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr, + dyn_string_append_char, dyn_string_substring): Change return type + to int. + +2000-06-18 Stephane Carrez + + * dis-asm.h (print_insn_m68hc12): Define. + (print_insn_m68hc11): Likewise. + +2000-06-18 Nick Clifton + + * os9k.h: Change values of MODSYNC and CRCCON due to bug report + from Russ Magee . + +2000-06-07 Kaveh R. Ghazi + + * demangle.h (demangling_styles): Remove trailing comma in enum. + + * dyn-string.h (dyn_string_append_char): Change parameter from + char to int. + +2000-06-04 Alex Samuel + + * dyn-string.h: Move here from gcc/dyn-string.h. Add new functions. + + * demangle.h (DMGL_GNU_NEW_ABI): New macro. + (DMGL_STYLE_MASK): Or in DMGL_GNU_NEW_ABI. + (current_demangling_style): Add gnu_new_abi_demangling. + (GNU_NEW_ABI_DEMANGLING_STYLE_STRING): New macro. + (GNU_NEW_ABI_DEMANGLING): Likewise. + (cplus_demangle_new_abi): New declaration. + +Tue May 30 16:53:34 2000 Andrew Cagney + + * floatformat.h (struct floatformat): Add field name. + +2000-05-26 Eli Zaretskii + + * filenames.h: New file. + (HAVE_DOS_BASED_FILE_SYSTEM, IS_DIR_SEPARATOR) + (IS_ABSOLUTE_PATH, FILENAME_CMP): New macros. + +2000-05-23 Kaveh R. Ghazi + + * getopt.h (getopt): Also check HAVE_DECL_* when prototyping. + + * libiberty.h (basename): Likewise. + +2000-05-17 S. Bharadwaj Yadavalli + Rick Gorton + + * bfdlink.h (struct bfd_link_info): Add emitrelocations flag. + +2000-05-08 Alan Modra + + * dis-asm.h (print_insn_tic54x): Declare. + +2000-05-06 Zack Weinberg + + * ansidecl.h: #define __extension__ to nothing if + GCC_VERSION < 2008. + +2000-05-04 Kaveh R. Ghazi + + * demangle.h (demangler_engine): Constify. + +Thu May 4 17:15:26 2000 Philippe De Muyter + + * sort.h (sys/types.h): File included unconditionnaly. + (stddef.h): File include only #ifdef __STDC__. + +2000-05-03 Zack Weinberg + + * symcat.h: Remove #endif label. + +2000-04-28 Kenneth Block + Jason Merrill + + * demangle.h (libiberty_demanglers): new table for different styles. + (cplus_demangle_set_style): New function for setting style. + (cplus_demangle_name_to_style): New function to translate name. + +2000-04-24 Mark Mitchell + + * hashtab.h (hash_pointer): Declare. + (eq_pointer): Likewise. + +2000-04-23 Mark Mitchell + + * sort.h: New file. + +Fri Apr 21 13:20:53 2000 Richard Henderson + David Mosberger + + * dis-asm.h (print_insn_ia64): Declare. + +Tue Apr 18 16:22:30 2000 Richard Kenner + + * hashtab.h (enum insert_option): New type. + (htab_find_slot, htab_find_slot_with_hash): Use it. + +2000-04-17 Kaveh R. Ghazi + + * symcat.h: Honor autoconf macro HAVE_STRINGIZE. Add + comments/caveats with regard to traditional C behavior. + +2000-04-05 Richard Henderson + + * splay-tree.h (splay_tree_remove): Declare. + +2000-04-04 Alan Modra + + * bin-bugs.h (REPORT_BUGS_TO): Remove translated part. + +2000-04-03 Alan Modra + + * bin-bugs.h: New file. + +2000-03-30 Mark Mitchell + + * hashtab.h (hashval_t): New type. + (htab_find_with_hash): Use it as an argument. + (htab_find_slot_with_hash): Likewise. + +2000-03-27 Denis Chertykov + + * dis-asm.h (print_insn_avr): Declare. + +2000-03-14 Bernd Schmidt + + * hashtab.h (htab_trav): Modify type so that first arg is of type + void **. + (htab_find_with_hash, htab_find_slot_with_hash): Declare new + functions. + +2000-03-09 Alex Samuel + + * partition.h: New file. + +2000-03-09 Zack Weinberg + + * hashtab.h (struct htab): Add del_f. + (htab_del): New type. + (htab_create): Add fourth argument. + +2000-03-08 Zack Weinberg + + * hashtab.h (hash_table_t): Rename to htab_t. + (struct hash_table): Rename to struct htab. Shorten element + names. Reorder elements by size. + (htab_hash, htab_eq, htab_trav): New typedefs for the callback + function pointers. + (hash_table_entry_t): Discard; just use void * for element + type. + +2000-03-01 H.J. Lu + + * bfdlink.h (bfd_link_callbacks): Add a boolean arg to + the undefined_symbol callback. + +2000-02-23 Linas Vepstas + + * dis-asm.h (print_insn_i370): Declare. + +Tue Feb 22 15:19:54 2000 Andrew Cagney + + * remote-sim.h (sim_trace): Document return values. + (sim_set_trace): Declare. Deprecate. + +2000-02-21 Alan Modra + + * dis-asm.h (struct disassemble_info): Change `length' param of + read_memory_func to unsigned. Change type of `buffer_length' and + `octets_per_byte' to unsigned. + (buffer_read_memory): Change `length' param to unsigned. + +2000-02-16 Nick Clifton + + * dis-asm.h: Add prototypes for ARM register name functions. + +Wed Feb 9 18:45:49 2000 Andrew Cagney + + * wait.h: Delete. No longer used by GDB. + +Tue Feb 8 17:01:13 2000 Andrew Cagney + + * remote-sim.h (sim_resume): Clarify use of SIGGNAL. + (sim_stop_reason): Clarify meaning of sim_signalled. + +2000-02-03 Timothy Wall + + * dis-asm.h (struct disassemble_info): Added octets_per_byte + field and initialize it to one (1). + +2000-01-27 Nick Clifton + + * dis-asm.h: Add prototype for disassembler_usage(). + Add prototype for arm_disassembler_options(). + Remove prototype for arm_toggle_regnames(). + Add prototype for parse_arm_disassembler_option(). + +Sat Jan 1 19:06:52 2000 Hans-Peter Nilsson + + * symcat.h (STRINGX) [!__STDC__ || ALMOST_STDC]: Change "?" to "s" + to stringify argument s. + +Wed Dec 15 11:22:56 1999 Jeffrey A Law (law@cygnus.com) + + * hp-symtab.h (HP_LANGUAGE_FORTRAN): New enumeration constant. + (HP_LANGUAGE_F77): Define using HP_LANGUAGE_FORTRAN. + +1999-12-15 Doug Evans + + * dis-asm.h: Enclose in extern "C" ifdef __cplusplus. + +1999-12-05 Mark Mitchell + + * splay-tree.h (struct splay_tree_node): Rename to ... + (struct splay_tree_node_s): ... this. + (struct splay_tree): Rename to ... + (struct splay_tree_s): ... this. + +1999-11-30 Kaveh R. Ghazi + + * ansidecl.h (ATTRIBUTE_MALLOC): New macro. + + * libiberty.h (buildargv, dupargv, concat, choose_temp_base, + make_temp_file, xmalloc, xcalloc, xstrdup, xmemdup): Add + ATTRIBUTE_MALLOC. + (xatexit): Remove __GNUC__ check, add ATTRIBUTE_NORETURN. + +1999-11-28 Kaveh R. Ghazi + + * libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined. + (asprintf, vasprintf): Provide declarations. + +Wed Nov 10 12:43:21 1999 Philippe De Muyter + Kaveh R. Ghazi + + * ansidecl.h: Define and test `GCC_VERSION', not `HAVE_GCC_VERSION'. + +1999-11-04 Jimmy Guo + + * hp-symtab.h (dntt_type_fparam): Add doc_ranges, misc_kind + fields, change location type to CORE_ADDR from int. + (dntt_type_const): Name the 5th field location_type. + +Sun Oct 24 19:11:32 1999 Andrew Cagney + + * sim-d10v.h (SIM_D10V_TS2_DMAP_REGNUM): Define. + +1999-10-23 08:51 -0700 Zack Weinberg + + * hashtab.h: Give hash_table_t a struct tag. Add prototypes + for clear_hash_table_slot and traverse_hash_table. Correct + prototype of all_hash_table_collisions. + +Sat Oct 23 19:00:13 1999 Andrew Cagney + + * sim-d10v.h: New file. + +Fri Oct 15 01:47:51 1999 Vladimir Makarov + + * hashtab.h: New file. + +1999-10-10 Kaveh R. Ghazi + + * ansidecl.h (HAVE_GCC_VERSION): New macro. Use it instead of + explicitly testing __GNUC__ and __GNUC_MINOR__. + + (ATTRIBUTE_PRINTF): Use `__format__', not `format'. + +1999-09-25 Kaveh R. Ghazi + + * libiberty.h (make_temp_file): Add a prototype. + +Tue Sep 14 00:35:02 1999 Marc Espie + + * libiberty.h (basename): OpenBSD has a correct prototype. + (xrealloc): Remove outdated comment. + +1999-09-07 Jeff Garzik + + * libiberty.h (xmemdup): Add prototype for new function. + +1999-09-04 Steve Chamberlain + + * dis-asm.h (print_insn_pj): Declare. + +1999-09-01 Kaveh R. Ghazi + + * obstack.h (obstack_grow, obstack_grow0): Move (char*) casts + in calls to `_obstack_memcpy' from here ... + + (_obstack_memcpy): ... to here, except in the __STDC__ case which + doesn't need it. + +1999-08-30 Kaveh R. Ghazi + + * libiberty.h (getpwd): Prototype. + +1999-08-01 Mark Mitchell + + * splay-tree.h (splay_tree_insert): Return the new node. + +1999-07-11 Ian Lance Taylor + + * ansidecl.h: Copy attribute support macros from egcs. + +1999-06-22 Mark Mitchell + + * bfdlink.h (struct bfd_link_hash_entry): Add init_function and + fini_function. + +1999-06-20 Mark Mitchell + + * mips.h (Elf32_Internal_Msym): New structure. + (Elf32_External_Msym): Likewise. + (ELF32_MS_REL_INDEX): New macro. + (ELF32_MS_FLAGS): Likewise. + (ELF32_MS_INFO): Likewise. + +1999-06-14 Nick Clifton + + * dis-asm.h (arm_toggle_regnames): New prototype. + (struct diassemble_info): New field: disassembler_options. + +1999-04-11 Richard Henderson + + * bfdlink.h (bfd_elf_version_expr): Rename `match' to `pattern'. + Add `match' callback function. + +1999-04-10 Richard Henderson + + * bfdlink.h (bfd_link_info): Add no_undefined. + +1999-04-08 Nick Clifton + + * dis-asm.h: Add prototype for print_insn_mcore. + +1999-04-02 Mark Mitchell + + * splay-tree.h (splay_tree_compare_pointers): Declare. + +1999-03-30 Mark Mitchell + + * splay-tree.h (splay_tree_compare_ints): Declare. + +Wed Mar 24 12:46:29 1999 Andrew Cagney + + * libiberty.h (basename): Cygwin{,32} should have the prototype. + +1999-02-22 Jim Lemke + + * bfdlink.h (bfd_link_info): add field "mpc860c0". + +Mon Feb 1 21:05:46 1999 Catherine Moore + + * dis-asm.h (print_insn_i386_att): Declare. + (print_insn_i386_intel): Declare. + +1998-12-30 Michael Meissner + + * dis-asm.h (INIT_DISASSEMBLE_INFO_NO_ARCH): Cast STREAM and + FPRINTF_FUNC to avoid compiler warnings. + +Wed Dec 30 16:07:14 1998 David Taylor + + * dis-asm.h: change void * to PTR (two places). + +Mon Dec 14 09:53:31 1998 Kaveh R. Ghazi + + * demangle.h: Don't check IN_GCC anymore. + * splay-tree.h: Likewise. + +Tue Dec 8 00:30:31 1998 Elena Zannoni + + The following changes were made by Elena Zannoni + and Edith Epstein + as part of a project to merge in + changes made by HP; HP did not create ChangeLog entries. + + * dis-asm.h (struct disassemble_info): change the type of stream + from FILE* to void*, for use with gdb's new type GDB_FILE. + (fprintf_ftype): change FILE* parameter type to void*. + + * demangle.h: (DMGL_EDG): new macro for Kuck and Associates + (DMGL_STYLE_MASK): modify to include Kuck and Assoc style + (demangling_styles): add new edg_demangling style + (EDG_DEMANGLING_STYLE_STRING): new macro + (EDG_DEMANGLING): new macro + (DMGL_HP): new macro, for HP/aCC compiler. + (DMGL_STYLE_MASK): modify to include new HP's style. + (demangling_styles): add new hp_demangling value. + (HP_DEMANGLING_STYLE_STRING): new macro. + (ARM_DEMANGLING): coerce to int. + (HP_DEMANGLING): new macro. + + * hp-symtab.h: rewritten, from HP. + (quick_procedure): change type of language field to unsigned int + (quick_module): change type of language field to unsigned int + (struct dntt_type_svar): add field thread_specific. + (hp_language): add languages modcal and dmpascal. + +Fri Nov 20 13:14:00 1998 Andrew Cagney + + * libiberty.h (basename): Add prototype for FreeBSD. + +Fri Nov 13 19:19:11 1998 Kaveh R. Ghazi + + * libiberty.h: Prototype xcalloc. + +Sun Nov 8 17:42:25 1998 Kaveh R. Ghazi + + * ansidecl.h: Wrap problematic macros with !IN_GCC. + + * demangle.h: Never define PARAMS(). + * splay-tree.h: Likewise. + +Sat Nov 7 18:30:20 1998 Peter Schauer + + * dis-asm.h (print_insn_vax): Declare. + +Sat Nov 7 16:04:03 1998 Kaveh R. Ghazi + + * demangle.h: Don't include gansidecl.h. + * splay-tree.h: Likewise. + +1998-10-26 16:03 Ulrich Drepper + + * bfdlink.h (struct bfd_link_info): Add new field optimize. + +Thu Oct 22 19:58:00 1998 Kaveh R. Ghazi + + * splay-tree.h: Wrap function pointer parameter declarations in + PARAMS() macro. + +1998-10-21 Mark Mitchell + + * splay-tree.h: New file. + +Fri Oct 9 00:02:03 1998 Jeffrey A Law (law@cygnus.com) + + * Merge devo and egcs include directories. + +Sat Sep 5 12:16:33 1998 Jeffrey A Law (law@cygnus.com) + + * getopt.h, obstack.h: Updated from gcc. + +1998-08-03 Jason Molenda (jsm@bugshack.cygnus.com) + + * libiberty.h (xexit): Change decl to use modern GCC attribute + to indicate exit does not return. + +Mon Jun 1 13:48:32 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * obstack.h: Update to latest FSF version. + +Tue Feb 24 13:05:02 1998 Doug Evans + + * dis-asm.h (disassemble_info): Member `symbol' renamed to `symbols' + and made an "asymbol **". New member num_symbols. + (INIT_DISASSEMBLE_INFO_NO_ARCH): Update. + +Tue Feb 17 12:32:18 1998 Andrew Cagney + + * remote-sim.h (sim_fetch_register, sim_store_register): Add + register length parameter. Functions return actual length of + register. + +Thu Feb 12 16:29:01 1998 Ian Lance Taylor + + * getopt.h: Update to latest FSF version. + +Wed Feb 11 16:56:06 1998 Doug Evans + + * symcat.h: New file. + +Mon Feb 2 17:13:31 1998 Steve Haworth + + * dis-asm.h (print_insn_tic30): Declare. + +Thu Jan 22 16:23:59 1998 Fred Fish + + * dis-asm.h: Add flag INSN_HAS_RELOC to tell disassembly + function there is a reloc on this line. + +Mon Dec 8 11:22:23 1997 Nick Clifton + + * dis-asm.h: Remove prototype of disasm_symaddr() as this function + no longer exists. + +Tue Dec 2 10:20:53 1997 Nick Clifton + + * dis-asm.h (disasm_symaddr): New prototype. + +Mon Dec 1 11:29:35 1997 Doug Evans + + * callback.h (CB_SYSCALL): Comment out arg names in prototypes. + +Wed Nov 26 16:47:58 1997 Michael Meissner + + * callback.h (CB_SYSCALL): Consistantly use names for prototype + arguments. + +Wed Nov 26 11:39:30 1997 Doug Evans + + * callback.h (CB_SYSCALL): Change byte count arguments to + {read,write}_mem to `int'. New member `magic'. + (CB_SYSCALL_MAGIC,CB_SYSCALL_INIT): New macros. + +Tue Nov 25 01:35:52 1997 Doug Evans + + * callback.h (struct stat): Move forward decl up. + (host_callback): Pass stat struct pointer to stat,fstat. + (CB_SYS_nnn): Reorganize. + (CB_SYSCALL): New members p1,p2. + (cb_host_to_target_stat): Delete fourth arg. + +Sat Nov 22 23:34:15 1997 Andrew Cagney + + * remote-sim.h (sim_stop_reason): Clarify sim_signalled SIGRC + argument. + +Mon Nov 17 14:00:51 1997 Doug Evans + + * callback.h (CB_TARGET_DEFS_MAP): Renamed from target_defs_map. + (host_callback): Add stat, fstat, syscall_map, errno_map, open_map, + signal_map, stat_map. + (errn_map,open_map): Renamed to cb_init_foo_map. + (cb_host_to_target_errno,cb_target_to_host_open): Renamed from + host_to_target_errno,target_to_host_open. + (cb_read_target_syscall_maps): Add prototype. + (cb_target_to_host_syscall): Likewise. + (cb_host_to_target_stat): Likewise. + (cb_syscall): Likewise. + (CB_SYS_{exit,open,close,read,write,lseek,unlink,getpid,kill,fstat, + argvlen,argv,chdir,stat,chmod,utime,time}): Define. + (CB_SYSCALL): New type. + (CB_RC): New enum. + +Fri Nov 7 10:34:09 1997 Rob Savoye + + * libiberty.h: Add extern "C" { so it can be used with C++ + programs. + * remote-sim.h: Add extern "C" { so it can be used with C++ + programs. + +Tue Oct 14 16:07:51 1997 Nick Clifton + + * dis-asm.h (struct disassemble_info): New field + 'symbol_at_address_func'. + (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialise new field with + generic_symbol_at_address. + +Mon Oct 13 10:17:15 1997 Andrew Cagney + + * remote-sim.h: Clarify sim_read, sim_write MEM argument. + +Wed Sep 24 18:03:10 1997 Stu Grossman + + * remote-sim.h (SIM_RC): Add a bunch of new return codes for + breakpoint stuff. + * Add functions to tell the simulator to set/clear/enable/disable + intrinsic breakpoints. + +Thu Aug 28 19:41:42 1997 Andrew Cagney + + * libiberty.h (dupargv): Add prototype. + +Tue Aug 26 12:25:49 1997 Andrew Cagney + + * remote-sim.h (sim_create_inferior): Add ABFD arg. Document. + +Mon Aug 25 10:50:51 1997 Andrew Cagney + + * remote-sim.h (sim_open): Add ABFD arg. Document. + +Fri Aug 8 16:43:56 1997 Doug Evans + + * dis-asm.h (arc_get_disassembler): Declare. + +Wed Jul 30 11:39:50 1997 Per Bothner + + * demangle.h (DMGL_JAVA): New option to request Java demangling. + +Tue Jul 22 17:59:54 1997 Ian Lance Taylor + + * libiberty.h (PEXECUTE_*): Define. + (pexecute, pwait): Declare. + +Fri Jun 6 13:02:33 1997 Andrew Cagney + + * remote-sim.h (sim_kill): Mark as depreciated. + +Fri May 23 13:43:41 1997 Fred Fish + + * bfdlink.h (struct bfd_link_info): Add task_link member. + +Thu May 22 11:32:49 1997 Andrew Cagney + + * remote-sim.h: Review documentation. Clarify restrictions on + when functions can be called. + +Wed May 21 16:47:53 1997 Andrew Cagney + + * remote-sim.h (sim_set_profile_size): Add prototype, document as + depreciated. + +Tue May 20 09:32:22 1997 Andrew Cagney + + * remote-sim.h (sim_open): Add callback struct. + (sim_set_callbacks): Drop SIM_DESC argument. Document. + (sim_size): Remove recently added SIM_DESC argument. Document. + +Mon May 19 19:14:44 1997 Andrew Cagney + + * remote-sim.h: Pass SD into sim_size. + +Thu May 15 01:24:16 1997 Mark Alexander + + * obstack.h (obstack_specify_allocation_with_arg, obstack_chunkfun, + obstack_freefun): Eliminate compile warnings in gdb. + +Tue Apr 22 10:24:34 1997 Fred Fish + + * floatformat.h (floatformat_byteorders): Add comments for previous + formats and add floatformat_littlebyte_bigword, primarily for ARM. + Add declaration for floatformat_ieee_double_littlebyte_bigword. + +Fri Apr 18 13:04:49 1997 Andrew Cagney + + * remote-sim.h (sim_stop): New interface - asynchronous + notification of a request to stop / suspend the running + simulation. + + * remote-sim.h (enum sim_stop): Add sim_running and sim_polling as + states for use internal to simulators. + + * callback.h (struct host_callback_strut): Put a magic number at + the end of the struct to allow basic checking. + (struct host_callback_struct ): Add poll_quit - so + that the console etc can be polled at regular intervals. + +Thu Apr 17 02:17:12 1997 Doug Evans + + * remote-sim.h (struct _bfd): Declare. + (sim_load): Return SIM_RC. New arg `abfd'. + (sim_create_inferior): Return SIM_RC. Delete arg `start_address'. + +Wed Apr 2 17:09:12 1997 Andrew Cagney + + * remote-sim.h (sim_trace, sim_size): Make these global. They + will go away shortly. + +Wed Apr 2 15:23:49 1997 Doug Evans + + * remote-sim.h (SIM_OPEN_KIND, SIM_RC): New enums. + (sim_open): New argument `kind'. + +Wed Apr 2 14:45:51 1997 Ian Lance Taylor + + * COPYING: Update FSF address. + +Fri Mar 28 15:29:54 1997 Mike Meissner + + * callback.h (top level): Include stdarg.h or varargs.h if + va_start is not defined. + (host_callback_struct): Make {,e}vprintf_filtered take a va_list + instead of void *, since va_list might be an array or structure + type. + +Fri Mar 28 15:44:41 1997 H.J. Lu + + * libiberty.h (basename): Add prototype for glibc and linux. + +Mon Mar 17 19:22:12 1997 Ian Lance Taylor + + * objalloc.h: New file. + +Mon Mar 17 14:57:55 1997 Andrew Cagney + + * remote-sim.h: New file, copied in from gdb/remote-sim.h. One + day this will be placed in a directory of its own. + +Sat Mar 15 19:00:14 1997 Ian Lance Taylor + + * obstack.h: Update to current FSF version. + +Thu Mar 6 15:46:59 1997 Andrew Cagney + + * callback.h (struct host_callback_struct): Add callbacks - + flush_stdout, write_stderr, flush_stderr, vprintf_filtered, + evprintf_filtered. Delete redundant callbacks - printf_filtered. + +Thu Feb 27 23:18:27 1997 Ian Lance Taylor + + * bfdlink.h (struct bfd_link_info): Remove lprefix and lprefix_len + fields. + +Tue Feb 25 00:10:49 1997 Ian Lance Taylor + + * dis-asm.h (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize + bytes_per_chunk and display_endian. + +Mon Feb 24 17:47:02 1997 Ian Lance Taylor + + From Eric Youngdale : + * bfdlink.h (struct bfd_elf_version_expr): Define. + (struct bfd_elf_version_deps): Define. + (struct bfd_elf_version_tree): Define. + +Thu Feb 6 14:20:01 1997 Martin M. Hunt + + * dis-asm.h: (disassemble_info): Add new fields + bytes_per_chunk and display_endian to control the + display of raw instructions. + +Fri Dec 27 22:17:37 1996 Fred Fish + + * dis-asm.h (print_insn_tic80): Declare. + +Sun Dec 8 17:11:12 1996 Doug Evans + + * callback.h (host_callback): New member `error'. + +Wed Nov 20 00:40:23 1996 Doug Evans + + * callback.h: New file, moved here from gdb. + +Mon Nov 18 16:34:00 1996 Dawn Perchik + + * libiberty.h: Checkin again; last checkin failed due to sticky tag. + +Wed Nov 13 08:22:00 1996 Dawn Perchik + + * libiberty.h: Revert last commit due to conflicts with hpux + system headers. + +Tue Nov 12 16:31:00 1996 Dawn Perchik + + * libiberty.h: Move prototypes from argv.c here. + +Thu Oct 31 14:56:18 1996 Doug Evans + + * ansidecl.h (VPARAMS,VA_START): Define. + +Fri Oct 25 12:08:04 1996 Ian Lance Taylor + + * dis-asm.h (disassemble_info): Add bytes_per_line field. + (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize bytes_per_line field. + +Thu Oct 24 17:10:01 1996 Ian Lance Taylor + + * dis-asm.h (disassemble_info): Add symbol field. + (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize symbol field. + +Thu Oct 17 11:17:40 1996 Doug Evans + + * dis-asm.h (print_insn_m32r): Declare. + +Mon Oct 14 23:56:52 1996 Ian Lance Taylor + + * libiberty.h: Declare parameter types for xmalloc and xrealloc. + +Thu Oct 3 13:45:27 1996 Ian Lance Taylor + + * fnmatch.h: New file. + +Thu Oct 3 10:33:14 1996 Jeffrey A Law (law@cygnus.com) + + * dis-asm.h (print_insn_mn10x00): Delete declaration. + (print_insn_mn10200, print_insn_mn10300): Declare. + +Wed Oct 2 21:24:43 1996 Jeffrey A Law (law@cygnus.com) + + * dis-asm.h (print_insn_mn10x00): Declare. + +Mon Sep 30 13:56:11 1996 Fred Fish + + * libiberty.h: Remove #ifndef PRIVATE_XMALLOC. + +Sat Aug 31 13:27:06 1996 Jeffrey A Law (law@cygnus.com) + + * dis-asm.h (print_insn_v850): Declare. + +Tue Aug 13 16:10:30 1996 Stu Grossman (grossman@critters.cygnus.com) + + * obstack.h: Change bcopy to memcpy. Works better on Posix + systems, which generally lack bcopy. + +Mon Aug 12 17:03:18 1996 Stu Grossman (grossman@critters.cygnus.com) + + * ansidecl.h: Change WIN32 to _WIN32. + +Fri Jul 26 13:58:18 1996 Ian Lance Taylor + + * dis-asm.h: Add flavour field. + (print_insn_alpha): Declare. + (print_insn_alpha_osf, print_insn_alpha_vms): Don't declare. + (INIT_DISASSEMBLE_INFO): Initialize flavour field. + +Tue Jul 23 17:37:58 1996 Fred Fish + + * libiberty.h (PRIVATE_XMALLOC): Enclose xmalloc/xrealloc + definitions inside #ifndef so that programs that want to + can define PRIVATE_XMALLOC and then define xmalloc and + xrealloc anyway they want. + (basename): Document in source that we can't declare the + parameter type because it is declared inconsistently across + different systems. + +Mon Jul 22 13:16:13 1996 Richard Henderson + + * dis-asm.h (print_insn_alpha): Don't declare. + (print_insn_alpha_osf, print_insn_alpha_vms): Declare. + +Wed Jul 17 14:45:12 1996 Martin M. Hunt + + * dis-asm.h: (print_insn_d10v): Declare. + +Mon Jul 15 16:55:38 1996 Stu Grossman (grossman@critters.cygnus.com) + + * dis-asm.h: Get rid of decls for print_insn_i8086, + print_insn_sparc64 and print_insn_sparclite. + * (INIT_DISASSEMBLE_INFO): Split into two pieces. One, + INIT_DISASSEMBLE_INFO_NO_ARCH inits everything except for endian, + mach, and arch. + +Fri Jul 12 10:19:27 1996 Stu Grossman (grossman@critters.cygnus.com) + + * dis-asm.h (print_insn_i8086): Declare. + +Wed Jul 3 16:02:39 1996 Stu Grossman (grossman@critters.cygnus.com) + + * dis-asm.h (print_insn_sparclite): Declare. + +Tue Jun 18 16:02:46 1996 Jeffrey A. Law + + * dis-asm.h (print_insn_h8300s): Declare. + +Tue Jun 18 15:11:33 1996 Klaus Kaempf + + * fopen-vms.h: New file. + +Tue Jun 4 18:58:16 1996 Ian Lance Taylor + + * bfdlink.h (struct bfd_link_info): Add notice_all field. + +Fri Apr 26 10:33:12 1996 Doug Evans + + * demangle.h (#ifdef IN_GCC): #include "gansidecl.h". + (PROTO,PTR,const): Delete. + +Mon Apr 22 17:27:42 1996 Ian Lance Taylor + + * bfdlink.h (struct bfd_link_info): Add traditional_format field. + +Mon Apr 15 15:16:56 1996 Doug Evans + + * libiberty.h (choose_temp_base): Add prototype. + +Tue Mar 12 17:29:46 1996 Ian Lance Taylor + + * bfdlink.h (bfd_wrapped_link_hash_lookup): Declare. + (struct bfd_link_info): Add wrap_hash field. + +Wed Feb 14 16:49:17 1996 Martin Anantharaman + + * ieee.h (ieee_record_enum_type): Define + ieee_external_reference_info_enum. + +Fri Feb 2 17:09:25 1996 Doug Evans + + * dis-asm.h (DISASM_RAW_INSN): Delete. + +Tue Jan 23 09:21:47 1996 Doug Evans + + * dis-asm.h (INIT_DISASSEMBLE_INFO): Set endian to BFD_ENDIAN_UNKNOWN. + New argument FPRINTF_FUNC. + +Mon Jan 22 16:37:59 1996 Doug Evans + + * dis-asm.h (disassemble_info): New members arch, mach, endian. + (INIT_DISASSEMBLE_INFO): Initialize them. + (DISASM_RAW_INSN{,FLAG}): Define. + +Thu Jan 18 11:32:38 1996 Ian Lance Taylor + + * demangle.h (cplus_demangle_opname): Change opname parameter to + const char *. + (cplus_mangle_opname): Change return type and opname parameter to + const char *. + +Fri Jan 5 00:01:22 1996 Ian Lance Taylor + + * ieee.h (enum ieee_record): Add ieee_asn_record_enum, + ieee_at_record_enum, ieee_ty_record_enum, ieee_atn_record_enum, + ieee_bb_record_enum, and ieee_be_record_enum. + +Wed Jan 3 13:12:09 1996 Fred Fish + + * obstack.h: Update copyright to 1996. + (_obstack_memory_used): Declare. + (obstack_memory_used): Define macro. + +Thu Dec 28 11:42:12 1995 Ian Lance Taylor + + * libiberty.h (xstrdup): Declare. + +Thu Dec 21 14:47:17 1995 Michael Meissner + + * wait.h: Protect all macros with #ifndef. + +Tue Oct 24 21:45:40 1995 Ian Lance Taylor + + * bfdlink.h (struct bfd_link_info): Add static_link field. + +Tue Sep 12 16:28:04 1995 Ian Lance Taylor + + * bfdlink.h (struct bfd_link_callbacks): Add symbol parameter to + warning callback. + +Fri Sep 1 13:11:51 1995 Ian Lance Taylor + + * bfdlink.h (struct bfd_link_callbacks): Change warning callback + to take BFD, section, and address arguments. + +Thu Aug 31 16:45:12 1995 steve chamberlain + + * bfdlink.h (struct bfd_link_info): Remove PE stuff. + +Tue Aug 22 03:18:23 1995 Ken Raeburn + + * libiberty.h: Declare xstrerror. From Pat Rankin. + +Mon Aug 21 18:11:36 1995 steve chamberlain + + * bfdlink.h (struct bfd_link_info): Remove PE stuff. + +Wed Aug 2 08:14:12 1995 Doug Evans + + * dis-asm.h (print_insn_sparc64): Declare. + +Mon Jul 10 13:26:49 1995 Eric Youngdale + + * bfdlink.h (struct bfd_link_info): Add new field symbolic. + +Sun Jul 2 17:48:40 1995 Ian Lance Taylor + + * bfdlink.h (struct bfd_link_info): Change type of base_file to + PTR. + +Thu Jun 29 00:02:45 1995 Steve Chamberlain + + * bfdlink.h (struct bfd_link_info): Added base_file member. + +Tue Jun 20 16:40:04 1995 Steve Chamberlain + + * ansidecl.h: win32s is ANSI enough. + +Thu May 18 04:25:50 1995 Ken Raeburn + + Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk) + + * dis-asm.h (print_insn_arm): Delete declaration. + (print_insn_{little,big}_arm): New declarations. + + * floatformat.h (floatformat_arm_ext): Declare. + +Sat May 13 10:14:08 1995 Steve Chamberlain + + * bfdlink.h (subsytem, stack_heap_parameters): New. + +Thu May 4 14:36:42 1995 Jason Merrill + + * demangle.h: Don't include ansidecl.h if IN_GCC. + +Tue Feb 21 00:37:28 1995 Jeff Law (law@snake.cs.utah.edu) + + * hp-symtab.h: Don't use bitfield enumerations, the HP C compiler + does not handle them correctly. + +Thu Feb 9 14:20:27 1995 Ian Lance Taylor + + * libiberty.h (basename): Don't declare parameter type; some + systems have this in their header files. + +Wed Feb 8 17:35:38 1995 Ian Lance Taylor + + * bfdlink.h (struct bfd_link_hash_entry): Change format of common + symbol information, to remove restrictions on maximum size and + alignment power, by using a pointer to a structure instead. + +Mon Feb 6 14:55:32 1995 Ian Lance Taylor + + * bfdlink.h (enum bfd_link_hash_type): Rename bfd_link_hash_weak + to bfd_link_hash_undefweak. Add bfd_link_hash_defweak. + +Mon Jan 16 21:00:23 1995 Stan Shebs + + * dis-asm.h (GDB_INIT_DISASSEMBLE_INFO, etc): Remove all + GDB-specific definitions. + +Sun Jan 15 18:39:35 1995 Steve Chamberlain + + * dis-asm.h (print_insn_w65): Declare. + +Thu Jan 12 17:51:17 1995 Ken Raeburn + + * libiberty.h (hex_p): Fix sense of test. + +Wed Jan 11 22:36:40 1995 Ken Raeburn + + * libiberty.h (_hex_array_size, _hex_bad, _hex_value, hex_init, + hex_p, hex_value): New macros and declarations, for hex.c. + +Fri Jan 6 17:44:14 1995 Ian Lance Taylor + + * dis-asm.h: Make idempotent. + +Wed Dec 14 13:08:43 1994 Stan Shebs + + * progress.h: New file, empty definitions for progress macros. + +Fri Nov 25 00:14:05 1994 Jeff Law (law@snake.cs.utah.edu) + + * hp-symtab.h: New file describing the debug symbols emitted + by the HP C compilers. + +Fri Nov 11 15:48:37 1994 Ian Lance Taylor + + * bfdlink.h (struct bfd_link_hash_entry): Change u.c.size from 24 + to 26 bits, and change u.c.alignment_power from 8 to 6 bits. 6 + bit in the alignment power is enough for a 64 bit address space. + +Mon Oct 31 13:02:51 1994 Stan Shebs (shebs@andros.cygnus.com) + + * demangle.h (cplus_mangle_opname): Declare. + +Tue Oct 25 11:38:02 1994 Ian Lance Taylor + + * bfdlink.h (struct bfd_link_callbacks): Fix comments for + multiple_common field. + +Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * dis-asm.h: Add support for the ARM. + +Wed Aug 10 12:51:41 1994 Doug Evans (dje@canuck.cygnus.com) + + * libiberty.h (strsignal): Document its existence even if we + can't declare it. + +Tue Aug 2 14:40:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * os9k.h: Remove u_int16, u_int32, and owner_id typedefs and + expand their uses. Those names conflict with Mach headers. + +Fri Jul 22 14:17:12 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * bfdlink.h (struct bfd_link_hash_entry): Change u.c.size into a + bitfield. Add field u.c.alignment_power. + +Sun Jul 10 00:26:39 1994 Ian Dall (dall@hfrd.dsto.gov.au) + + * dis-asm.h: Add print_insn_ns32k declaration. + +Mon Jun 20 17:13:29 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * bfdlink.h (bfd_link_hash_table): Make creator a const pointer. + +Sat Jun 18 16:09:32 1994 Stan Shebs (shebs@andros.cygnus.com) + + * demangle.h (cplus_demangle_opname): Declare. + +Thu Jun 16 15:19:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * bfdlink.h (struct bfd_link_info): Add new field shared. + +Mon Jun 6 14:39:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * bfdlink.h (struct bfd_link_hash_entry): Remove written field: + not needed for all backends. + +Thu Apr 28 19:06:50 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * dis-asm.h (disassembler): Declare. + +Fri Apr 1 00:38:17 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) + + * obstack.h: Delete use of IN_GCC to control whether + stddef.h or gstddef.h is included. + +Tue Mar 22 13:06:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * bfdlink.h (enum bfd_link_order_type): Add bfd_data_link_order. + (struct bfd_link_order): Add data field to union. + +Mon Mar 21 18:45:26 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * bfdlink.h (struct bfd_link_callbacks): Change bitsize argument + to add_to_set to reloc. Remove bitsize argument from constructor. + Comment that reloc_overflow, reloc_dangerous and unattached_reloc + must handle NULL pointers for reloc location. + (enum bfd_link_order_type): Add bfd_section_reloc_link_order and + bfd_symbol_reloc_link_order. + (struct bfd_link_order): Add reloc field to union. + (struct bfd_link_order_reloc): Define. + +Mon Mar 14 12:27:50 1994 Ian Lance Taylor (ian@cygnus.com) + + * ieee-float.h: Removed; no longer used. + +Tue Mar 1 18:10:49 1994 Kung Hsu (kung@mexican.cygnus.com) + + * os9k.h: os9000 target specific header file, the header of the + object file is used now. + +Sun Feb 27 21:52:26 1994 Jim Kingdon (kingdon@deneb.cygnus.com) + + * floatformat.h: New file, intended to replace ieee-float.h. + +Sun Feb 20 17:15:42 1994 Ian Lance Taylor (ian@lisa.cygnus.com) + + * ansidecl.h (ANSI_PROTOTYPES): Define if using ANSI prototypes. + +Wed Feb 16 01:07:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * libiberty.h: Don't declare strsignal, to avoid conflicts with + Solaris system header files. + +Sat Feb 12 22:11:32 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * libiberty.h (xexit): Use __volatile__ to avoid losing if + compiling with gcc -traditional. + +Thu Feb 10 14:05:41 1994 Ian Lance Taylor (ian@cygnus.com) + + * libiberty.h: New file. Declares functions provided by + libiberty. + +Tue Feb 8 05:19:52 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + Handle obstack_chunk_alloc returning NULL. This allows + obstacks to be used by libraries, without forcing them + to call exit or longjmp. + * obstack.h (struct obstack): Add alloc_failed flag. + _obstack_begin, _obstack_begin_1): Declare to return int, not void. + (obstack_finish): If alloc_failed, return NULL. + (obstack_base, obstack_next_free, objstack_object_size): + If alloc_failed, return 0. + (obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow, + obstack_int_grow, obstack_blank): If alloc_failed, do nothing that + could corrupt the obstack. + +Mon Jan 24 15:06:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * bfdlink.h (struct bfd_link_callbacks): Add name, reloc_name and + addend argments to reloc_overflow callback. + +Fri Jan 21 19:13:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * dis-asm.h (print_insn_big_powerpc, print_insn_little_powerpc, + print_insn_rs6000): Declare. + +Thu Jan 6 14:15:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * bfdlink.h (struct bfd_link_callbacks): Add bitsize argument to + add_to_set field. Add new callback named constructor. + +Thu Dec 30 10:44:06 1993 Ian Lance Taylor (ian@rtl.cygnus.com) + + * bfdlink.h: New file for new BFD linker backend routines. + +Mon Nov 29 10:43:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * dis-asm.h (enum dis_insn_tyupe): Remove non-ANSI trailing comma. + +Sat Oct 2 20:42:26 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * dis-asm.h: Move comment to right place. + +Mon Aug 9 19:03:35 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * obstack.h (obstack_chunkfun, obstack_freefun): Add defns from + previous version. Are these Cygnus local changes? + +Fri Aug 6 17:05:47 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * getopt.h, obstack.h: Update to latest FSF version. + +Mon Aug 2 14:45:29 1993 John Gilmore (gnu@cygnus.com) + + * dis-asm.h: Move enum outside of struct defn to avoid warnings. + +Mon Aug 2 08:49:30 1993 Stu Grossman (grossman at cygnus.com) + + * wait.h (WEXITSTATUS, WSTOPSIG): Mask down to 8 bits. This is + for systems that store stuff into the high 16 bits of a wait + status. + +Fri Jul 30 18:38:02 1993 John Gilmore (gnu@cygnus.com) + + * dis-asm.h: Add new fields insn_info_valid, branch_delay_insns, + data_size, insn_type, target, target2. These are used to return + information from the instruction decoders back to the calling + program. Add comments, make more readable. + +Mon Jul 19 22:14:14 1993 Fred Fish (fnf@deneb.cygnus.com) + + * nlm: New directory containing NLM/NetWare includes. + +Thu Jul 15 12:10:04 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * dis-asm.h (struct disassemble_info): New field application_data. + +Thu Jul 15 12:41:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * dis-asm.h: Added declaration of print_insn_m88k. + +Fri Jul 2 10:31:59 1993 Ian Lance Taylor (ian@cygnus.com) + + * ansidecl.h: Use ANSI macros if __mips and _SYSTYPE_SVR4 are + defined, since RISC/OS cc handles ANSI declarations in SVR4 mode + but does not define __STDC__. + +Sun Jun 20 18:27:52 1993 Ken Raeburn (raeburn@poseidon.cygnus.com) + + * dis-asm.h: Don't need to include ansidecl.h any more. + +Fri Jun 18 03:22:10 1993 John Gilmore (gnu@cygnus.com) + + * oasys.h: Eliminate "int8_type", "int16_type", "int32_type", and + their variants. These changes are coordinated with corresponding + changes in ../bfd/oasys.c. + +Wed Jun 16 10:43:08 1993 Fred Fish (fnf@cygnus.com) + + * bfd.h: Note that it has been removed. + +Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) + + Support for H8/300-H + * dis-asm.h (print_insn_h8300, print_insn_h8300h): Declare it. + +Tue Jun 1 07:35:03 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com) + + * ansidecl.h (const): Don't define it if it's already defined. + +Thu May 27 18:19:51 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * dis-asm.h (print_insn_hppa): Declare it. + + * bfd.h: Moved to bfd directory. Small stub here includes it + without requiring "-I../bfd". + +Thu Apr 29 12:06:13 1993 Ken Raeburn (raeburn@deneb.cygnus.com) + + * bfd.h: Updated with BSF_FUNCTION. + +Mon Apr 26 18:15:50 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * bfd.h, dis-asm.h: Updated with Hitachi SH. + +Fri Apr 23 18:41:38 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * bfd.h: Updated with alpha changes. + * dis-asm.h: Added alpha. + +Fri Apr 16 17:35:30 1993 Jim Kingdon (kingdon@cygnus.com) + + * bfd.h: Update for signed bfd_*get_*. + +Thu Apr 15 09:24:21 1993 Jim Kingdon (kingdon@cygnus.com) + + * bfd.h: Updated for file_truncated error. + +Thu Apr 8 10:53:47 1993 Ian Lance Taylor (ian@cygnus.com) + + * ansidecl.h: If no ANSI, define const to be empty. + +Thu Apr 1 09:00:10 1993 Jim Kingdon (kingdon@cygnus.com) + + * dis-asm.h: Declare a29k and i960 print_insn_*. + + * dis-asm.h: Add print_address_func and related stuff. + + * dis-asm.h (dis_asm_read_memory): Fix prototype. + +Wed Mar 31 17:40:16 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * dis-asm.h: Add print_insn_sparc. + +Wed Mar 31 17:51:42 1993 Ian Lance Taylor (ian@cygnus.com) + + * bfd.h: Updated for BFD_RELOC_MIPS_GPREL and bfd_[gs]et_gp_size + prototypes. + +Wed Mar 31 16:35:12 1993 Stu Grossman (grossman@cygnus.com) + + * dis-asm.h: (disassemble_info): Fix typo in prototype of + dis_asm_memory_error(). + +Tue Mar 30 19:09:23 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * dis-asm.h (disassembler_info): Add read_memory_func, + memory_error_func, buffer, and length. + ({GDB_,}INIT_DISASSEMBLE_INFO): Set them. + print_insn_*: Remove second argument. + +Tue Mar 30 14:48:55 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * bfd.h: Update for lma field of section. + +Tue Mar 30 12:22:55 1993 Jim Kingdon (kingdon@cygnus.com) + + * ansidecl.h: Use ANSI versions on AIX regardless of __STDC__. + +Fri Mar 19 14:49:49 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * dis-asm.h: Add h8500. + +Thu Mar 18 13:49:09 1993 Per Bothner (bothner@rtl.cygnus.com) + + * ieee-float.h: Moved from ../gdb. + * dis-asm.h: New file. Interface to dis-assembler. + +Thu Mar 11 10:52:57 1993 Fred Fish (fnf@cygnus.com) + + * demangle.h (DMGL_NO_OPTS): Add define (set to 0) to use + in place of bare 0, for readability reasons. + +Tue Mar 2 17:50:11 1993 Fred Fish (fnf@cygnus.com) + + * demangle.h: Replace all references to cfront with ARM. + +Tue Feb 23 12:21:14 1993 Ian Lance Taylor (ian@cygnus.com) + + * bfd.h: Update for new elements in JUMP_TABLE. + +Tue Feb 16 00:51:30 1993 John Gilmore (gnu@cygnus.com) + + * bfd.h: Update for BFD_VERSION 2.1. + +Tue Jan 26 11:49:20 1993 Ian Lance Taylor (ian@cygnus.com) + + * bfd.h: Update for SEC_IS_COMMON flag. + +Tue Jan 19 12:25:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * bfd.h: Update for bfd_asymbol_value bug fix. + +Fri Jan 8 16:37:18 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * bfd.h: Update to include ECOFF tdata and target_flavour. + +Sun Dec 27 17:52:30 1992 Fred Fish (fnf@cygnus.com) + + * bfd.h: Add declaration for bfd_get_size(). + +Tue Dec 22 22:42:46 1992 Fred Fish (fnf@cygnus.com) + + * demangle.h: Protect file from multiple inclusions with + #if !defined(DEMANGLE_H)...#define DEMANGLE_H...#endif. + +Mon Dec 21 21:25:50 1992 Stu Grossman (grossman at cygnus.com) + + * bfd.h: Update to get hppa_core_struct from bfd.c. + +Thu Dec 17 00:42:35 1992 John Gilmore (gnu@cygnus.com) + + * bfd.h: Update to get tekhex tdata name change from bfd. + +Mon Nov 9 23:55:42 1992 John Gilmore (gnu@cygnus.com) + + * ansidecl.h: Update comments to discourage use of EXFUN. + +Thu Nov 5 16:35:44 1992 Ian Lance Taylor (ian@cygnus.com) + + * bfd.h: Update to bring in SEC_SHARED_LIBRARY. + +Thu Nov 5 03:21:32 1992 John Gilmore (gnu@cygnus.com) + + * bfd.h: Update to match EXFUN, bfd_seclet_struct, and SDEF + cleanups in bfd. + +Wed Nov 4 07:28:05 1992 Ken Raeburn (raeburn@cygnus.com) + + * bout.h (N_CALLNAME, N_BALNAME): Define as char-type values, so + widening works consistently. + +Fri Oct 16 03:17:08 1992 John Gilmore (gnu@cygnus.com) + + * getopt.h: Update to Revised Standard FSF Version. + +Thu Oct 15 21:43:22 1992 K. Richard Pixley (rich@sendai.cygnus.com) + + * getopt.h (struct option): use the provided enum for has_arg. + + * demangle.h (AUTO_DEMANGLING, GNU_DEMANGLING, + LUCID_DEMANGLING): ultrix compilers require enums to be + enums and ints to be ints and casts where they meet. cast some + enums into ints. + +Thu Oct 15 04:35:51 1992 John Gilmore (gnu@cygnus.com) + + * bfd.h: Update after comment changes. + +Thu Oct 8 09:03:02 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * bfd.h (bfd_get_symbol_leading_char): new macro for getting in xvec + +Thu Sep 3 09:10:50 1992 Stu Grossman (grossman at cygnus.com) + + * bfd.h (struct reloc_howto_struct): size needs to be signed if + it's going to hold negative values. + +Sun Aug 30 17:50:27 1992 Per Bothner (bothner@rtl.cygnus.com) + + * demangle.h: New file, moved from ../gdb. Made independent + of gdb. Allow demangling style option to be passed as a + parameter to cplus_demangle(), but using the + current_demangling_style global as the default. + +Sat Aug 29 10:07:55 1992 Fred Fish (fnf@cygnus.com) + + * obstack.h: Merge comment change from current FSF version. + +Thu Aug 27 12:59:29 1992 Brendan Kehoe (brendan@cygnus.com) + + * bfd.h: add we32k + +Tue Aug 25 15:07:47 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * bfd.h: new after Z8000 stuff + +Mon Aug 17 09:01:23 1992 Ken Raeburn (raeburn@cygnus.com) + + * bfd.h: Regenerated after page/segment size changes. + +Sat Aug 1 13:46:31 1992 Fred Fish (fnf@cygnus.com) + + * obstack.h: Merge changes from current FSF version. + +Mon Jul 20 21:06:23 1992 Fred Fish (fnf@cygnus.com) + + * obstack.h (area_id, flags): Remove, replace with extra_arg, + use_extra_arg, and maybe_empty_object. + * obstack.h (OBSTACK_MAYBE_EMPTY_OBJECT, OBSTACK_MMALLOC_LIKE): + Remove, replaced by maybe_empty_object and use_extra_arg bitfields. + * obstack.h (obstack_full_begin, _obstack_begin): Remove area_id + and flags arguments. + * obstack.h (obstack_alloc_arg): New macro to set extra_arg. + +Thu Jul 16 08:12:44 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * bfd.h: new after adding BFD_IS_RELAXABLE + +Sat Jul 4 03:22:23 1992 John Gilmore (gnu at cygnus.com) + + * bfd.h: Regen after adding BSF_FILE. + +Mon Jun 29 14:18:36 1992 Fred Fish (fnf at sunfish) + + * obstack.h: Convert bcopy() use to memcpy(), which is more + portable, more standard, and can take advantage of gcc's builtin + functions for increased performance. + +Thu Jun 25 04:46:08 1992 John Gilmore (gnu at cygnus.com) + + * ansidecl.h (PARAMS): Incorporate this macro from gdb's defs.h. + It's a cleaner way to forward-declare function prototypes. + +Fri Jun 19 15:46:32 1992 Stu Grossman (grossman at cygnus.com) + + * bfd.h: HPPA merge. + +Tue Jun 16 21:30:56 1992 K. Richard Pixley (rich@cygnus.com) + + * getopt.h: gratuitous white space changes merged from other prep + releases. + +Thu Jun 11 01:10:55 1992 John Gilmore (gnu at cygnus.com) + + * bfd.h: Regen'd from bfd.c after removing elf_core_tdata_struct. + +Mon May 18 17:29:03 1992 K. Richard Pixley (rich@cygnus.com) + + * getopt.h: merged changes from make-3.62.11. + + * getopt.h: merged changes from grep-1.6 (alpha). + +Fri May 8 14:53:32 1992 K. Richard Pixley (rich@cygnus.com) + + * getopt.h: merged changes from bison-1.18. + +Sat Mar 14 17:25:20 1992 Fred Fish (fnf@cygnus.com) + + * obstack.h: Add "area_id" and "flags" members to obstack + structure. Add obstack_chunkfun() and obstack_freefun() to + set functions explicitly. Convert maybe_empty_object to + a bit in "flags". + +Thu Feb 27 22:01:02 1992 Per Bothner (bothner@cygnus.com) + + * wait.h (WIFSTOPPED): Add IBM rs6000-specific version. + +Fri Feb 21 20:49:20 1992 John Gilmore (gnu at cygnus.com) + + * obstack.h: Add obstack_full_begin. + * bfd.h, obstack.h: Protolint. + +Thu Jan 30 01:18:42 1992 John Gilmore (gnu at cygnus.com) + + * bfd.h: Remove comma from enum declaration. + +Mon Jan 27 22:01:13 1992 Steve Chamberlain (sac at cygnus.com) + + * bfd.h : new target entr, bfd_relax_section + +Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com) + + * bfd.h, ieee.h: ANSIfy enums. + +Thu Dec 12 20:59:56 1991 John Gilmore (gnu at cygnus.com) + + * fopen-same.h, fopen-bin.h: New files for configuring + whether fopen distinguishes binary files or not. For use + by host-dependent config files. + +Sat Nov 30 20:46:43 1991 Steve Chamberlain (sac at rtl.cygnus.com) + + * bfd.h: change the documentation format. + + * created coff, elf and opcode and aout directories. Moved: + + aout64.h ==> aout/aout64.h + ar.h ==> aout/ar.h + a.out.encap.h ==> aout/encap.h + a.out.host.h ==> aout/host.h + a.out.hp.h ==> aout/hp.h + a.out.sun4.h ==> aout/sun4.h + ranlib.h ==> aout/ranlib.h + reloc.h ==> aout/reloc.h + stab.def ==> aout/stab.def + stab.gnu.h ==> aout/stab_gnu.h + + coff-a29k.h ==> coff/a29k.h + coff-h8300.h ==> coff/h8300.h + coff-i386.h ==> coff/i386.h + coff-i960.h ==> coff/i960.h + internalcoff.h ==> coff/internal.h + coff-m68k.h ==> coff/m68k.h + coff-m88k.h ==> coff/m88k.h + coff-mips.h ==> coff/mips.h + coff-rs6000.h ==> coff/rs6000.h + + elf-common.h ==> elf/common.h + dwarf.h ==> elf/dwarf.h + elf-external.h ==> elf/external.h + elf-internal.h ==> elf/internal.h + + a29k-opcode.h ==> opcode/a29k.h + arm-opcode.h ==> opcode/arm.h + h8300-opcode.h ==> opcode/h8300.h + i386-opcode.h ==> opcode/i386.h + i860-opcode.h ==> opcode/i860.h + i960-opcode.h ==> opcode/i960.h + m68k-opcode.h ==> opcode/m68k.h + m88k-opcode.h ==> opcode/m88k.h + mips-opcode.h ==> opcode/mips.h + np1-opcode.h ==> opcode/np1.h + ns32k-opcode.h ==> opcode/ns32k.h + pn-opcode.h ==> opcode/pn.h + pyr-opcode.h ==> opcode/pyr.h + sparc-opcode.h ==> opcode/sparc.h + tahoe-opcode.h ==> opcode/tahoe.h + vax-opcode.h ==> opcode/vax.h + + + +Wed Nov 27 10:38:31 1991 Steve Chamberlain (sac at rtl.cygnus.com) + + * internalcoff.h: (internal_scnhdr) took out #def dependency, now + s_nreloc and s_nlnno are always long. (internal_reloc): allways + has an offset field now. + +Fri Nov 22 08:12:58 1991 John Gilmore (gnu at cygnus.com) + + * coff-rs6000.h: Lint; use unsigned chars for external fields. + * internalcoff.h: Lint; cast storage classes to signed char. + +Thu Nov 21 21:01:05 1991 Per Bothner (bothner at cygnus.com) + + * stab.def: Remove the GNU extended type codes (e.g. N_SETT). + * aout64.h: The heuristic for distinguishing between + sunos-style and bsd-style ZMAGIC files (wrt. where the + text segment starts) is moved into (the default definition of) + the macro N_HEADER_IN_TEXT. This definition is only used + if no other definition is used - e.g. bfd/newsos3.c defines + N_HEADER_IN_TEXT(x) to be always 0 (as before). + +Thu Nov 21 11:53:03 1991 John Gilmore (gnu at cygnus.com) + + * aout64.h (N_TXTADDR, N_TXTOFF, N_TXTSIZE): New definitions + that should handle all uses. LOGICAL_ versions deleted. + Eliminate N_HEADER_IN_TEXT, using a_entry to determine which + kind of zmagic a.out file we are looking at. + * coff-rs6000.h: Typo. + +Tue Nov 19 18:43:37 1991 Per Bothner (bothner at cygnus.com) + + (Note: This is a revised entry, as was aout64.h.) + * aout64.h: Some cleanups of N_TXTADDR and N_TXTOFF: + Will now work for both old- and new-style ZMAGIC files, + depending on N_HEADER_IN_TEXT macro. + Add LOGICAL_TXTADDR, LOICAL_TXTOFF and LOGICAL_TXTSIZE + that don't count the exec header as part + of the text segment, to be consistent with bfd. + * a.out.sun4.h: Simplified/fixed for previous change. + +Mon Nov 18 00:02:06 1991 Fred Fish (fnf at cygnus.com) + + * dwarf.h: Update to DWARF draft 5 version from gcc2. + +Thu Nov 14 19:44:59 1991 Per Bothner (bothner at cygnus.com) + + * stab.def: Added defs for extended GNU symbol types, + such as N_SETT. These are normally ifdef'd out (because + of conflicts with a.out.gnu.h), but are used by bfb_stab_name(). + +Thu Nov 14 19:17:03 1991 Fred Fish (fnf at cygnus.com) + + * elf-common.h: Add defines to support ELF symbol table code. + +Mon Nov 11 19:01:06 1991 Fred Fish (fnf at cygnus.com) + + * elf-internal.h, elf-external.h, elf-common.h: Add support for + note sections, which are used in ELF core files to hold copies + of various /proc structures. + +Thu Nov 7 08:58:26 1991 Steve Chamberlain (sac at cygnus.com) + + * internalcoff.h: took out the M88 dependency in the lineno + struct. + * coff-m88k.h: defines GET_LINENO_LNNO and PUT_LINENO_LNNO to use + 32bit linno entries. + * a29k-opcode.h: fixed encoding of mtacc + +Sun Nov 3 11:54:22 1991 Per Bothner (bothner at cygnus.com) + + * bfd.h: Updated from ../bfd/bfd-in.h (q.v). + +Fri Nov 1 11:13:53 1991 John Gilmore (gnu at cygnus.com) + + * internalcoff.h: Add x_csect defines. + +Fri Oct 25 03:18:20 1991 John Gilmore (gnu at cygnus.com) + + * Rename COFF-related files in `coff-ARCH.h' form. + coff-a29k.h, coff-i386.h, coff-i960.h, coff-m68k.h, coff-m88k.h, + coff-mips.h, coff-rs6000.h to be exact. + +Thu Oct 24 22:11:11 1991 John Gilmore (gnu at cygnus.com) + + RS/6000 support, by Metin G. Ozisik, Mimi Phûông-ThÃ¥o Võ, and + John Gilmore. + + * a.out.gnu.h: Update slightly. + * bfd.h: Add new error code, fix doc, add bfd_arch_rs6000. + * internalcoff.h: Add more F_ codes for filehdr. Add + rs/6000-dependent fields to aouthdr. Add storage classes + to syments. Add 6000-specific auxent. Add r_size in reloc. + * rs6000coff.c: New file. + +Thu Oct 24 04:13:20 1991 Fred Fish (fnf at cygnus.com) + + * dwarf.h: New file for dwarf support. Copied from gcc2 + distribution. + +Wed Oct 16 13:31:45 1991 John Gilmore (gnu at cygnus.com) + + * aout64.h: Remove PAGE_SIZE defines; they are target-dependent. + Add N_FN_SEQ for N_FN symbol type used on Sequent machines. + * stab.def: Include N_FN_SEQ in table. + * bout.h: External formats of structures use unsigned chars. + +Fri Oct 11 12:40:43 1991 Steve Chamberlain (steve at cygnus.com) + + * bfd.h:upgrade from bfd.c + * internalcoff.h: add n_name, n_zeroes and n_offset macros + * amdcoff.h: Define OMAGIC and AOUTHDRSZ. + +Fri Oct 11 10:58:06 1991 Per Bothner (bothner at cygnus.com) + + * a.out.host.h: Change SEGMENT_SIZE to 0x1000 for Sony. + * bfd.h (align_power): Add (actually move) comment. + +Tue Oct 8 15:29:32 1991 Per Bothner (bothner at cygnus.com) + + * sys/h-rtbsd.h: Define MISSING_VFPRINT (for binutils/bucomm.c). + +Sun Oct 6 19:24:39 1991 John Gilmore (gnu at cygnus.com) + + * aout64.h: Move struct internal_exec to ../bfd/libaout.h so + it can be shared by all `a.out-family' code. Rename + EXTERNAL_LIST_SIZE to EXTERNAL_NLIST_SIZE. Use basic types + for nlist members, and make strx integral rather than pointer. + More commentary on n_type values. + * bout.h: Provide a struct external_exec rather than an + internal_exec. + * m68kcoff.h: Remove `tagentries' which snuck in from the i960 + COFF port. + +Fri Oct 4 01:25:59 1991 John Gilmore (gnu at cygnus.com) + + * h8300-opcode.h: Remove `_enum' from the typedef for an enum. + * bfd.h: Update to match bfd changes. + + * sys/h-i386mach.h, sysdep.h: Add 386 Mach host support. + +Tue Oct 1 04:58:42 1991 John Gilmore (gnu at cygnus.com) + + * bfd.h, elf-common.h, elf-external.h, elf-internal.h: + Add preliminary ELF support, sufficient for GDB, from Fred Fish. + * sysdep.h, sys/h-amix.h: Support Amiga SVR4. + + * sys/h-vaxult.h: Make it work. (David Taylor ) + * a.out.vax.h: Remove unused and confusing file. + +Mon Sep 30 12:52:35 1991 Per Bothner (bothner at cygnus.com) + + * sysdep.h: Define NEWSOS3_SYS, and use it. + +Fri Sep 20 13:38:21 1991 John Gilmore (gnu at cygnus.com) + + * a.out.gnu.h (N_FN): Its value *really is* 0x1F. + Fix it, and add comments warning about or-ing N_EXT with it + and/or N_WARNING. + * aout64.h (N_FN): Fix value, add comments about N_EXT. + * stab.def (table at end): Update to show all the type + values <0x20, including low order bits. Move N_FN to + its rightful place. + +Tue Sep 17 17:41:37 1991 Stu Grossman (grossman at cygnus.com) + + * sys/h-irix3.h: sgi/irix support. + +Tue Sep 17 07:52:59 1991 John Gilmore (gnu at cygint.cygnus.com) + + * stab.def (N_DEFD): Add GNU Modula-2 debug stab, from Andrew + Beers. + +Thu Sep 12 14:12:59 1991 John Gilmore (gnu at cygint.cygnus.com) + + * internalcoff.h (SYMNMLEN, FILNMLEN, DIMNUM): Define these + for internalcoff, separately from the various external coff's. + * amdcoff.h, bcs88kcoff.h, i386coff.h, intel-coff.h, m68kcoff.h, + m88k-bcs.h: Prefix SYMNMLEN, FILNMLEN, and DIMNUM with E_'s for + the external struct definitions. + * ecoff.h: Remove these #define's, kludge no longer needed. + + * sys/h-ultra3.h: Add new Ultracomputer host. + * sysdep.h: Add ULTRA3_SYM1_SYS and use it. + +Tue Sep 10 10:11:46 1991 John Gilmore (gnu at cygint.cygnus.com) + + * i386coff.h (LINESZ): Always 6, not based on sizeof(). + (Fix from Peter Schauer .) + +Wed Sep 4 08:58:37 1991 John Gilmore (gnu at cygint.cygnus.com) + + * a.out.gnu.h, aout64.h: Add N_WARNING. Change N_FN to 0x0E, + to match SunOS and BSD. Add N_COMM as 0x12 for SunOS shared lib + support. + * stab.def: Add N_COMM to table, fix overlap comment. + +Tue Sep 3 06:29:20 1991 John Gilmore (gnu at cygint.cygnus.com) + + Merge with latest FSF versions of these files. + + * stab.gnu.h: Add LAST_UNUSED_STAB_CODE. + * stab.def: Update to GPL2. Move N_WARNING out, since not a + debug symbol. Change comments, and reorder table to numeric + order. Update final table comment. + (N_DSLINE, N_BSLINE): Renumber from 0x66 and 0x68, to 0x46 and 0x48. + + * obstack.h: GPL2. Merge. + +Fri Aug 23 01:54:23 1991 John Gilmore (gnu at cygint.cygnus.com) + + * a.out.gnu.h, a.out.sun4.h: Make SEGMENT_SIZE able to depend + on the particular a.out being examined. + * a.out.sun4.h: Define segment sizes for Sun-3's and Sun-4's. + * FIXME: a.out.gnu.h is almost obsolete. + * FIXME: a.out.sun4.h should be renamed a.out.sun.h now. + +Wed Aug 21 20:32:13 1991 John Gilmore (gnu at cygint.cygnus.com) + + * Start a ChangeLog for the includes directory. + + * a.out.gnu.h (N_FN): Fix value -- was 15, should be 0x1E. + * stab.def: Update allocation table in comments at end, + to reflect reality as I know it. + + +Copyright (C) 1993-2003 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/support/sdbinutils/include/MAINTAINERS b/support/sdbinutils/include/MAINTAINERS new file mode 100644 index 0000000..61989d2 --- /dev/null +++ b/support/sdbinutils/include/MAINTAINERS @@ -0,0 +1,7 @@ +See ../binutils/MAINTAINERS + +Copyright (C) 2012-2018 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. diff --git a/support/sdbinutils/include/alloca-conf.h b/support/sdbinutils/include/alloca-conf.h new file mode 100644 index 0000000..2882b3f --- /dev/null +++ b/support/sdbinutils/include/alloca-conf.h @@ -0,0 +1,60 @@ +/* Copyright (C) 2012-2018 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 . */ + +#include "config.h" + +/* This is a merge of code recommended in the autoconf-2.61 documentation + with that recommended in the autoconf-2.13 documentation, with added + tweaks to heed C_ALLOCA. */ + +#if defined HAVE_ALLOCA_H && !defined C_ALLOCA +# include +#else +# if defined __GNUC__ && !defined C_ALLOCA +# if !defined alloca +# define alloca __builtin_alloca +# endif +# else +# if defined _AIX +/* Indented so that pre-ansi C compilers will ignore it, rather than + choke on it. Some versions of AIX require this to be the first + thing seen by the compiler except for comments and preprocessor + directives. */ + #pragma alloca +# else +# if defined _MSC_VER && !defined C_ALLOCA +# include +# define alloca _alloca +# else +# if !defined alloca +# if defined __STDC__ || defined __hpux +# if defined HAVE_STDDEF_H +# include +# if defined __cplusplus +extern "C" void *alloca (size_t); +# else +extern void *alloca (size_t); +# endif +# else +extern void *alloca (); +# endif +# else +extern char *alloca (); +# endif +# endif +# endif +# endif +# endif +#endif diff --git a/support/sdbinutils/include/ansidecl.h b/support/sdbinutils/include/ansidecl.h new file mode 100644 index 0000000..c11daff --- /dev/null +++ b/support/sdbinutils/include/ansidecl.h @@ -0,0 +1,393 @@ +/* ANSI and traditional C compatability macros + Copyright (C) 1991-2018 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 */ + +/* 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 */ diff --git a/support/sdbinutils/include/aout/ChangeLog-9115 b/support/sdbinutils/include/aout/ChangeLog-9115 new file mode 100644 index 0000000..f0148d4 --- /dev/null +++ b/support/sdbinutils/include/aout/ChangeLog-9115 @@ -0,0 +1,285 @@ +2015-12-01 Alan Modra + + * adobe.h: Invoke aout N_* macros with pointer to + struct internal_exec. + * aout64.h: Likewise. + * dynix3.h: Likewise. + * encap.h: Likewise. + * hp.h: Likewise. + * hp300hpux.h: Likewise. + * sun4.h: Likewise. + +2015-01-01 Alan Modra + + Update year range in copyright notice of all files. + +2014-03-05 Alan Modra + + Update copyright years. + +2012-12-17 Nick Clifton + + * hppa.h: Add copyright notice. + +2010-04-15 Nick Clifton + + * adobe.h: Update copyright notice to use GPLv3. + * aout64.h: Likewise. + * ar.h: Likewise. + * dynix3.h: Likewise. + * encap.h: Likewise. + * host.h: Likewise. + * hp.h: Likewise. + * hp300hpux.h: Likewise. + * ranlib.h: Likewise. + * reloc.h: Likewise. + * stab.def: Likewise. + * stab_gnu.h: Likewise. + * sun4.h: Likewise. + +2009-10-02 Alan Modra + + * aout64.h (N_SHARED_LIB): Define as zero if not already defined. + * sun4.h (N_SHARED_LIB): Define. + * hp300hpux.h (N_SHARED_LIB): Don't define. + +2008-08-28 Tristan Gingold + + * stab.def: Add BNSYM, ENSYM, OSO for darwin. + +2008-03-27 Cary Coutant + + * ar.h (ARMAGT): New magic string for thin archives. + +2005-08-18 Alan Modra + + * encap.h: Remove a29k support. + +2005-05-10 Nick Clifton + + * Update the address and phone number of the FSF organization in + the GPL notices in the following files: + adobe.h, aout64.h, ar.h, dynix3.h, encap.h, host.h, hp.h, + ranlib.h, reloc.h, stab.def, stab_gnu.h, sun4.h + +2004-01-06 Mark Kettenis + + * stab.def: Add N_PATCH to DO definition. + +2003-03-06 Elias Athanasopoulos + + * aout64.h (BYTES_IN_WORD): Define if necessary. + +2001-09-18 Alan Modra + + * aout64.h: Formatting fixes. + (N_TXTADDR): Evaluate to a bfd_vma. + (N_DATADDR): Avoid negative unsigned warning. + * hp300hpux.h: Formatting fixes. + (N_DATADDR): Avoid negative unsigned warning. + +2000-04-03 Hans-Peter Nilsson + + * aout64.h (RELOC_EXT_BITS_EXTERN_BIG): Wrap definition in #ifndef. + (RELOC_EXT_BITS_EXTERN_LITTLE): Ditto. + (RELOC_EXT_BITS_TYPE_BIG): Ditto. + (RELOC_EXT_BITS_TYPE_SH_BIG): Ditto. + (RELOC_EXT_BITS_TYPE_LITTLE): Ditto. + (RELOC_EXT_BITS_TYPE_SH_LITTLE): Ditto. + +1999-07-12 Ian Lance Taylor + + * aout64.h (N_SHARED_LIB): Define as 0 if TEXT_START_ADDR is + defined as 0. + +1998-06-28 Peter Schauer + + * stab.def: Add N_ALIAS from SunPro F77. + +1996-03-11 Ian Lance Taylor + + * stab.def: Use __define_stab_duplicate rather than __define_stab + for duplicate entries N_BROWS and N_MOD2. + * stab_gnu.h (__define_stab_duplicate): Define before including + stab.def. + +1995-10-27 Niklas Hallqvist + + * aout64.h, host.h, hp300hpux.h, sun4.h: Changed PAGE_SIZE to + TARGET_PAGE_SIZE. + +1995-09-12 Ian Lance Taylor + + * sun4.h (struct internal_sun4_dynamic_link): Change all fields + from long to unsigned long. + +1995-07-12 Ken Raeburn + + * sun4.h (PAGE_SIZE): Undefine before defining. + +1994-09-04 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * aout64.h: Only define QMAGIC if it isn't already defined. + +1994-06-16 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * aout64.h (BMAGIC): Define. + +1994-06-11 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + Add weak symbols as an extension to a.out. + * aout64.h (N_WEAKU, N_WEAKA, N_WEAKT, N_WEAKD, N_WEAKB): Define. + * stab.def: Update symbol value table. + +1994-06-02 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * sun4.h (EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE): Correct from 28 to + 24. Fix up ld_got comment. + +1994-03-30 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * dynix3.h: Cleanup, adapt to current bfd version. + +1994-02-26 Ian Lance Taylor (ian@cygnus.com) + + * aout64.h: Add casts to avoid warnings from SVR4 cc. + +1994-02-11 Stan Shebs (shebs@andros.cygnus.com) + + * ar.h (ARMAG, ARMAGB, ARFMAG): Change '\n' to '\012', for greater + portability. + +1994-01-21 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * sun4.h: Added information about SunOS shared libraries. + +1994-01-07 Jim Kingdon (kingdon@deneb.cygnus.com) + + * aout64.h (N_TXTADDR): Add comment regarding OMAGIC and NMAGIC. + +1993-12-25 Jim Kingdon (kingdon@lioth.cygnus.com) + + * aout64.h (N_DATOFF): Don't pad (revert change of 8 Jul 1993). + +1993-11-16 Jim Kingdon (kingdon@lioth.cygnus.com) + + * aout64.h: New macros ZMAGIC_DISK_BLOCK_SIZE and N_DISK_BLOCK_SIZE + for Linux ZMAGIC. + (N_TXTOFF, N_DATOFF): Use them. + +1993-11-04 Ken Raeburn (raeburn@kr-pc.cygnus.com) + + * aout64.h (RELOC_STD_BITS_RELATIVE_LITTLE): Fixed value to match + sun3 system; used to overlap other fields. + (RELOC_STD_BITS_JMPTABLE_LITTLE): Likewise. + +1993-11-03 David J. Mackenzie (djm@thepub.cygnus.com) + + * aout64.h (RELOC_STD_BITS_BASEREL_LITTLE): Make it 0x10 (Ken's + suggestion) to avoid conflict with RELOC_STD_BITS_EXTERN_LITTLE. + +1993-10-29 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * hp300hpux.h (N_SHARED_LIB): Define to be 0. + +1993-09-13 John Gilmore (gnu@cygnus.com) + + * ar.h (ARMAP_TIME_OFFSET): Add and describe. + +Mon Aug 23 Sean Fagan (sef@cygnus.com) + + * aout64.h [ARCH_SIZE != 64]: Allow N_BADMAG to be overridden. + +1993-08-16 Jim Kingdon (kingdon@lioth.cygnus.com) + + * stab_gnu.h: Include aout/stab.def not just stab.def. + +1993-07-18 Jim Kingdon (kingdon@rtl.cygnus.com) + + * dynix3.h: New, for symmetry running dynix. + +1993-07-08 Jim Kingdon (kingdon@lioth.cygnus.com) + + * aout64.h (N_BADMAG): Recognize QMAGIC. + N_TXTOFF, N_TXTADDR, N_TXTSIZE: Special code for QMAGIC. + N_DATOFF: Pad text size if we need to. + +1993-06-18 Jim Kingdon (kingdon@lioth.cygnus.com) + + * stab.def (N_ECOML): Fix comment. + +1993-05-31 Jim Kingdon (kingdon@cygnus.com) + + * stab.def: Remove Solaris information on N_FUN stabstring grammar; + I've transferred it to gdb/doc/stabs.texinfo, where it belongs. + +1993-05-10 Ken Raeburn (raeburn@kr-pc.cygnus.com) + + * hp300hpux.h: Patch from Glenn Engel for linker problem and + compatibility fix: + (OMAGIC, NMAGIC): New definitions. + (SHAREMAGIC): Deleted. + (HPUX_DOT_O_MAGIC): New macro. + (_N_BADMAG): Adjusted. + (N_HEADER_IN_TEXT, N_DATADDR): New macros. + +1993-04-29 Ken Raeburn (raeburn@deneb.cygnus.com) + + * hp300hpux.h: New file from Glenn Engel, glenne@lsid.hp.com. + +1993-04-27 Ken Raeburn (raeburn@kr-pc.cygnus.com) + + * aout64.h (struct external_exec, *MAGIC, N_BADMAG): Don't define + if `external_exec' is already defined as a macro. + (N_DATOFF, N_TRELOFF, N_DRELOFF, N_SYMOFF, N_STROFF): Don't define + if already defined. + (struct external_nlist, EXTERNAL_NLIST_SIZE): Don't define if + `external_nlist' is already defined as a macro. + +1992-08-15 John Gilmore (gnu@cygnus.com) + + * adobe.h: Add description of a.out.adobe format. + +1992-07-03 John Gilmore (gnu at cygnus.com) + + * stab.def: Update more Solaris definitions. + * stab_gnu.h: Add N_SO language types, and Solaris basic float types. + +1992-06-14 John Gilmore (gnu at cygnus.com) + + * stab.def: Update descriptions of Solaris-2 stabs; add N_UNDF. + +1992-06-11 John Gilmore (gnu at cygnus.com) + + * stab.def: Add N_OBJ and N_OPT from Solaris-2. + +1992-01-30 John Gilmore (gnu at cygnus.com) + + * aout64.h: N_TXTSIZE needs some more parentheses. + I don't trust C precedence. + +1991-12-18 Per Bothner (bothner at cygnus.com) + + * aout64.h: Move common sunos-specific test + to recognize shared libraries into new macro N_SHARED_LIB. + Use it to simplify & reformat N_TXTADDR, N_TXTOFF, N_TXTSIZE. + +1991-11-30 Steve Chamberlain (sac at rtl.cygnus.com) + + * aout64.h, ar.h, encap.h, host.h, hp.h, ranlib.h, reloc.h, + stab.def, stab_gnu.h, sun4.h: All moved from the devo/include + directory. + + +Copyright (C) 1991-2015 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/support/sdbinutils/include/aout/adobe.h b/support/sdbinutils/include/aout/adobe.h new file mode 100644 index 0000000..33770f9 --- /dev/null +++ b/support/sdbinutils/include/aout/adobe.h @@ -0,0 +1,319 @@ +/* `a.out.adobe' differences from standard a.out files + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef __A_OUT_ADOBE_H__ +#define __A_OUT_ADOBE_H__ + +#define BYTES_IN_WORD 4 + +/* Struct external_exec is the same. */ + +/* This is the layout on disk of the 32-bit or 64-bit exec header. */ + +struct external_exec +{ + bfd_byte e_info[4]; /* Magic number and stuff. */ + bfd_byte e_text[BYTES_IN_WORD]; /* Length of text section in bytes. */ + bfd_byte e_data[BYTES_IN_WORD]; /* Length of data section in bytes. */ + bfd_byte e_bss[BYTES_IN_WORD]; /* Length of bss area in bytes. */ + bfd_byte e_syms[BYTES_IN_WORD]; /* Length of symbol table in bytes. */ + bfd_byte e_entry[BYTES_IN_WORD]; /* Start address. */ + bfd_byte e_trsize[BYTES_IN_WORD]; /* Length of text relocation info. */ + bfd_byte e_drsize[BYTES_IN_WORD]; /* Length of data relocation info. */ +}; + +#define EXEC_BYTES_SIZE (4 + BYTES_IN_WORD * 7) + +/* Magic numbers for a.out files. */ + +#undef ZMAGIC +#define ZMAGIC 0xAD0BE /* Cute, eh? */ +#undef OMAGIC +#undef NMAGIC + +#define N_BADMAG(x) ((x)->a_info != ZMAGIC) + +/* By default, segment size is constant. But some machines override this + to be a function of the a.out header (e.g. machine type). */ +#ifndef N_SEGSIZE +#define N_SEGSIZE(x) SEGMENT_SIZE +#endif +#undef N_SEGSIZE /* FIXMEXXXX */ + +/* Segment information for the a.out.Adobe format is specified after the + file header. It contains N segment descriptors, followed by one with + a type of zero. + + The actual text of the segments starts at N_TXTOFF in the file, + regardless of how many or how few segment headers there are. */ + +struct external_segdesc +{ + unsigned char e_type[1]; + unsigned char e_size[3]; + unsigned char e_virtbase[4]; + unsigned char e_filebase[4]; +}; + +struct internal_segdesc +{ + unsigned int a_type:8; /* Segment type N_TEXT, N_DATA, 0. */ + unsigned int a_size:24; /* Segment size. */ + bfd_vma a_virtbase; /* Virtual address. */ + unsigned int a_filebase; /* Base address in object file. */ +}; + +#define N_TXTADDR(x) is_this_really_unused? + +/* This is documented to be at 1024, but appears to really be at 2048. + FIXME?! */ +#define N_TXTOFF(x) 2048 + +#define N_TXTSIZE(x) ((x)->a_text) + +#define N_DATADDR(x) is_this_really_unused? + +#define N_BSSADDR(x) is_this_really_unused? + +/* Offsets of the various portions of the file after the text segment. */ + +#define N_DATOFF(x) ( N_TXTOFF(x) + N_TXTSIZE(x) ) +#define N_TRELOFF(x) ( N_DATOFF(x) + (x)->a_data ) +#define N_DRELOFF(x) ( N_TRELOFF(x) + (x)->a_trsize ) +#define N_SYMOFF(x) ( N_DRELOFF(x) + (x)->a_drsize ) +#define N_STROFF(x) ( N_SYMOFF(x) + (x)->a_syms ) + +/* Symbols. */ +struct external_nlist +{ + bfd_byte e_strx[BYTES_IN_WORD]; /* Index into string table of name. */ + bfd_byte e_type[1]; /* Type of symbol. */ + bfd_byte e_other[1]; /* Misc info (usually empty). */ + bfd_byte e_desc[2]; /* Description field. */ + bfd_byte e_value[BYTES_IN_WORD]; /* Value of symbol. */ +}; + +#define EXTERNAL_NLIST_SIZE (BYTES_IN_WORD+4+BYTES_IN_WORD) + +struct internal_nlist +{ + unsigned long n_strx; /* Index into string table of name. */ + unsigned char n_type; /* Type of symbol. */ + unsigned char n_other; /* Misc info (usually empty). */ + unsigned short n_desc; /* Description field. */ + bfd_vma n_value; /* Value of symbol. */ +}; + +/* The n_type field is the symbol type, containing: */ + +#define N_UNDF 0 /* Undefined symbol. */ +#define N_ABS 2 /* Absolute symbol -- defined at particular addr. */ +#define N_TEXT 4 /* Text sym -- defined at offset in text seg. */ +#define N_DATA 6 /* Data sym -- defined at offset in data seg. */ +#define N_BSS 8 /* BSS sym -- defined at offset in zero'd seg. */ +#define N_COMM 0x12 /* Common symbol (visible after shared lib dynlink). */ +#define N_FN 0x1f /* File name of .o file. */ +#define N_FN_SEQ 0x0C /* N_FN from Sequent compilers (sigh). */ +/* Note: N_EXT can only be usefully OR-ed with N_UNDF, N_ABS, N_TEXT, + N_DATA, or N_BSS. When the low-order bit of other types is set, + (e.g. N_WARNING versus N_FN), they are two different types. */ +#define N_EXT 1 /* External symbol (as opposed to local-to-this-file). */ +#define N_TYPE 0x1e +#define N_STAB 0xe0 /* If any of these bits are on, it's a debug symbol. */ + +#define N_INDR 0x0a + +/* The following symbols refer to set elements. + All the N_SET[ATDB] symbols with the same name form one set. + Space is allocated for the set in the text section, and each set + elements value is stored into one word of the space. + The first word of the space is the length of the set (number of elements). + + The address of the set is made into an N_SETV symbol + whose name is the same as the name of the set. + This symbol acts like a N_DATA global symbol + in that it can satisfy undefined external references. */ + +/* These appear as input to LD, in a .o file. */ +#define N_SETA 0x14 /* Absolute set element symbol. */ +#define N_SETT 0x16 /* Text set element symbol. */ +#define N_SETD 0x18 /* Data set element symbol. */ +#define N_SETB 0x1A /* Bss set element symbol. */ + +/* This is output from LD. */ +#define N_SETV 0x1C /* Pointer to set vector in data area. */ + +/* Warning symbol. The text gives a warning message, the next symbol + in the table will be undefined. When the symbol is referenced, the + message is printed. */ + +#define N_WARNING 0x1e + +/* Relocations + + There are two types of relocation flavours for a.out systems, + standard and extended. The standard form is used on systems where the + instruction has room for all the bits of an offset to the operand, whilst + the extended form is used when an address operand has to be split over n + instructions. Eg, on the 68k, each move instruction can reference + the target with a displacement of 16 or 32 bits. On the sparc, move + instructions use an offset of 14 bits, so the offset is stored in + the reloc field, and the data in the section is ignored. */ + +/* This structure describes a single relocation to be performed. + The text-relocation section of the file is a vector of these structures, + all of which apply to the text section. + Likewise, the data-relocation section applies to the data section. */ + +struct reloc_std_external +{ + bfd_byte r_address[BYTES_IN_WORD]; /* Offset of data to relocate. */ + bfd_byte r_index[3]; /* Symbol table index of symbol. */ + bfd_byte r_type[1]; /* Relocation type. */ +}; + +#define RELOC_STD_BITS_PCREL_BIG 0x80 +#define RELOC_STD_BITS_PCREL_LITTLE 0x01 + +#define RELOC_STD_BITS_LENGTH_BIG 0x60 +#define RELOC_STD_BITS_LENGTH_SH_BIG 5 /* To shift to units place. */ +#define RELOC_STD_BITS_LENGTH_LITTLE 0x06 +#define RELOC_STD_BITS_LENGTH_SH_LITTLE 1 + +#define RELOC_STD_BITS_EXTERN_BIG 0x10 +#define RELOC_STD_BITS_EXTERN_LITTLE 0x08 + +#define RELOC_STD_BITS_BASEREL_BIG 0x08 +#define RELOC_STD_BITS_BASEREL_LITTLE 0x08 + +#define RELOC_STD_BITS_JMPTABLE_BIG 0x04 +#define RELOC_STD_BITS_JMPTABLE_LITTLE 0x04 + +#define RELOC_STD_BITS_RELATIVE_BIG 0x02 +#define RELOC_STD_BITS_RELATIVE_LITTLE 0x02 + +#define RELOC_STD_SIZE (BYTES_IN_WORD + 3 + 1) /* Bytes per relocation entry. */ + +struct reloc_std_internal +{ + bfd_vma r_address; /* Address (within segment) to be relocated. */ + /* The meaning of r_symbolnum depends on r_extern. */ + unsigned int r_symbolnum:24; + /* Nonzero means value is a pc-relative offset + and it should be relocated for changes in its own address + as well as for changes in the symbol or section specified. */ + unsigned int r_pcrel:1; + /* Length (as exponent of 2) of the field to be relocated. + Thus, a value of 2 indicates 1<<2 bytes. */ + unsigned int r_length:2; + /* 1 => relocate with value of symbol. + r_symbolnum is the index of the symbol + in files the symbol table. + 0 => relocate with the address of a segment. + r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS + (the N_EXT bit may be set also, but signifies nothing). */ + unsigned int r_extern:1; + /* The next three bits are for SunOS shared libraries, and seem to + be undocumented. */ + unsigned int r_baserel:1; /* Linkage table relative. */ + unsigned int r_jmptable:1; /* pc-relative to jump table. */ + unsigned int r_relative:1; /* "relative relocation". */ + /* unused */ + unsigned int r_pad:1; /* Padding -- set to zero. */ +}; + + +/* EXTENDED RELOCS */ + +struct reloc_ext_external +{ + bfd_byte r_address[BYTES_IN_WORD]; /* Offset of data to relocate. */ + bfd_byte r_index[3]; /* Symbol table index of symbol. */ + bfd_byte r_type[1]; /* Relocation type. */ + bfd_byte r_addend[BYTES_IN_WORD]; /* Datum addend. */ +}; + +#define RELOC_EXT_BITS_EXTERN_BIG 0x80 +#define RELOC_EXT_BITS_EXTERN_LITTLE 0x01 + +#define RELOC_EXT_BITS_TYPE_BIG 0x1F +#define RELOC_EXT_BITS_TYPE_SH_BIG 0 +#define RELOC_EXT_BITS_TYPE_LITTLE 0xF8 +#define RELOC_EXT_BITS_TYPE_SH_LITTLE 3 + +/* Bytes per relocation entry */ +#define RELOC_EXT_SIZE (BYTES_IN_WORD + 3 + 1 + BYTES_IN_WORD) + +enum reloc_type +{ + /* Simple relocations. */ + RELOC_8, /* data[0:7] = addend + sv */ + RELOC_16, /* data[0:15] = addend + sv */ + RELOC_32, /* data[0:31] = addend + sv */ + /* PC-rel displacement. */ + RELOC_DISP8, /* data[0:7] = addend - pc + sv */ + RELOC_DISP16, /* data[0:15] = addend - pc + sv */ + RELOC_DISP32, /* data[0:31] = addend - pc + sv */ + /* Special. */ + RELOC_WDISP30, /* data[0:29] = (addend + sv - pc)>>2 */ + RELOC_WDISP22, /* data[0:21] = (addend + sv - pc)>>2 */ + RELOC_HI22, /* data[0:21] = (addend + sv)>>10 */ + RELOC_22, /* data[0:21] = (addend + sv) */ + RELOC_13, /* data[0:12] = (addend + sv) */ + RELOC_LO10, /* data[0:9] = (addend + sv) */ + RELOC_SFA_BASE, + RELOC_SFA_OFF13, + /* P.I.C. (base-relative). */ + RELOC_BASE10, /* Not sure - maybe we can do this the */ + RELOC_BASE13, /* right way now. */ + RELOC_BASE22, + /* For some sort of pc-rel P.I.C. (?) */ + RELOC_PC10, + RELOC_PC22, + /* P.I.C. jump table. */ + RELOC_JMP_TBL, + /* Reputedly for shared libraries somehow. */ + RELOC_SEGOFF16, + RELOC_GLOB_DAT, + RELOC_JMP_SLOT, + RELOC_RELATIVE, + + RELOC_11, + RELOC_WDISP2_14, + RELOC_WDISP19, + RELOC_HHI22, /* data[0:21] = (addend + sv) >> 42 */ + RELOC_HLO10, /* data[0:9] = (addend + sv) >> 32 */ + + /* 29K relocation types */ + RELOC_JUMPTARG, + RELOC_CONST, + RELOC_CONSTH, + + NO_RELOC +}; + +struct reloc_internal +{ + bfd_vma r_address; /* Offset of data to relocate. */ + long r_index; /* Symbol table index of symbol. */ + enum reloc_type r_type; /* Relocation type. */ + bfd_vma r_addend; /* Datum addend. */ +}; + +#endif /* __A_OUT_ADOBE_H__ */ diff --git a/support/sdbinutils/include/aout/aout64.h b/support/sdbinutils/include/aout/aout64.h new file mode 100644 index 0000000..0e7ced7 --- /dev/null +++ b/support/sdbinutils/include/aout/aout64.h @@ -0,0 +1,516 @@ +/* `a.out' object-file definitions, including extensions to 64-bit fields + + Copyright (C) 1999-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef __A_OUT_64_H__ +#define __A_OUT_64_H__ + +#ifndef BYTES_IN_WORD +#define BYTES_IN_WORD 4 +#endif + +/* This is the layout on disk of the 32-bit or 64-bit exec header. */ + +#ifndef external_exec +struct external_exec +{ + bfd_byte e_info[4]; /* Magic number and stuff. */ + bfd_byte e_text[BYTES_IN_WORD]; /* Length of text section in bytes. */ + bfd_byte e_data[BYTES_IN_WORD]; /* Length of data section in bytes. */ + bfd_byte e_bss[BYTES_IN_WORD]; /* Length of bss area in bytes. */ + bfd_byte e_syms[BYTES_IN_WORD]; /* Length of symbol table in bytes. */ + bfd_byte e_entry[BYTES_IN_WORD]; /* Start address. */ + bfd_byte e_trsize[BYTES_IN_WORD]; /* Length of text relocation info. */ + bfd_byte e_drsize[BYTES_IN_WORD]; /* Length of data relocation info. */ +}; + +#define EXEC_BYTES_SIZE (4 + BYTES_IN_WORD * 7) + +/* Magic numbers for a.out files. */ + +#if ARCH_SIZE==64 +#define OMAGIC 0x1001 /* Code indicating object file. */ +#define ZMAGIC 0x1002 /* Code indicating demand-paged executable. */ +#define NMAGIC 0x1003 /* Code indicating pure executable. */ + +/* There is no 64-bit QMAGIC as far as I know. */ + +#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \ + && N_MAGIC(x) != NMAGIC \ + && N_MAGIC(x) != ZMAGIC) +#else +#define OMAGIC 0407 /* Object file or impure executable. */ +#define NMAGIC 0410 /* Code indicating pure executable. */ +#define ZMAGIC 0413 /* Code indicating demand-paged executable. */ +#define BMAGIC 0415 /* Used by a b.out object. */ + +/* This indicates a demand-paged executable with the header in the text. + It is used by 386BSD (and variants) and Linux, at least. */ +#ifndef QMAGIC +#define QMAGIC 0314 +#endif +# ifndef N_BADMAG +# define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \ + && N_MAGIC(x) != NMAGIC \ + && N_MAGIC(x) != ZMAGIC \ + && N_MAGIC(x) != QMAGIC) +# endif /* N_BADMAG */ +#endif + +#endif + +#ifdef QMAGIC +#define N_IS_QMAGIC(x) (N_MAGIC (x) == QMAGIC) +#else +#define N_IS_QMAGIC(x) (0) +#endif + +/* The difference between TARGET_PAGE_SIZE and N_SEGSIZE is that TARGET_PAGE_SIZE is + the finest granularity at which you can page something, thus it + controls the padding (if any) before the text segment of a ZMAGIC + file. N_SEGSIZE is the resolution at which things can be marked as + read-only versus read/write, so it controls the padding between the + text segment and the data segment (in memory; on disk the padding + between them is TARGET_PAGE_SIZE). TARGET_PAGE_SIZE and N_SEGSIZE are the same + for most machines, but different for sun3. */ + +/* By default, segment size is constant. But some machines override this + to be a function of the a.out header (e.g. machine type). */ + +#ifndef N_SEGSIZE +#define N_SEGSIZE(x) SEGMENT_SIZE +#endif + +/* Virtual memory address of the text section. + This is getting very complicated. A good reason to discard a.out format + for something that specifies these fields explicitly. But til then... + + * OMAGIC and NMAGIC files: + (object files: text for "relocatable addr 0" right after the header) + start at 0, offset is EXEC_BYTES_SIZE, size as stated. + * The text address, offset, and size of ZMAGIC files depend + on the entry point of the file: + * entry point below TEXT_START_ADDR: + (hack for SunOS shared libraries) + start at 0, offset is 0, size as stated. + * If N_HEADER_IN_TEXT(x) is true (which defaults to being the + case when the entry point is EXEC_BYTES_SIZE or further into a page): + no padding is needed; text can start after exec header. Sun + considers the text segment of such files to include the exec header; + for BFD's purposes, we don't, which makes more work for us. + start at TEXT_START_ADDR + EXEC_BYTES_SIZE, offset is EXEC_BYTES_SIZE, + size as stated minus EXEC_BYTES_SIZE. + * If N_HEADER_IN_TEXT(x) is false (which defaults to being the case when + the entry point is less than EXEC_BYTES_SIZE into a page (e.g. page + aligned)): (padding is needed so that text can start at a page boundary) + start at TEXT_START_ADDR, offset TARGET_PAGE_SIZE, size as stated. + + Specific configurations may want to hardwire N_HEADER_IN_TEXT, + for efficiency or to allow people to play games with the entry point. + In that case, you would #define N_HEADER_IN_TEXT(x) as 1 for sunos, + and as 0 for most other hosts (Sony News, Vax Ultrix, etc). + (Do this in the appropriate bfd target file.) + (The default is a heuristic that will break if people try changing + the entry point, perhaps with the ld -e flag.) + + * QMAGIC is always like a ZMAGIC for which N_HEADER_IN_TEXT is true, + and for which the starting address is TARGET_PAGE_SIZE (or should this be + SEGMENT_SIZE?) (TEXT_START_ADDR only applies to ZMAGIC, not to QMAGIC). */ + +/* This macro is only relevant for ZMAGIC files; QMAGIC always has the header + in the text. */ +#ifndef N_HEADER_IN_TEXT +#define N_HEADER_IN_TEXT(x) \ + (((x)->a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE) +#endif + +/* Sun shared libraries, not linux. This macro is only relevant for ZMAGIC + files. */ +#ifndef N_SHARED_LIB +#define N_SHARED_LIB(x) (0) +#endif + +/* Returning 0 not TEXT_START_ADDR for OMAGIC and NMAGIC is based on + the assumption that we are dealing with a .o file, not an + executable. This is necessary for OMAGIC (but means we don't work + right on the output from ld -N); more questionable for NMAGIC. */ + +#ifndef N_TXTADDR +#define N_TXTADDR(x) \ + (/* The address of a QMAGIC file is always one page in, \ + with the header in the text. */ \ + N_IS_QMAGIC (x) \ + ? (bfd_vma) TARGET_PAGE_SIZE + EXEC_BYTES_SIZE \ + : (N_MAGIC (x) != ZMAGIC \ + ? (bfd_vma) 0 /* Object file or NMAGIC. */ \ + : (N_SHARED_LIB (x) \ + ? (bfd_vma) 0 \ + : (N_HEADER_IN_TEXT (x) \ + ? (bfd_vma) TEXT_START_ADDR + EXEC_BYTES_SIZE \ + : (bfd_vma) TEXT_START_ADDR)))) +#endif + +/* If N_HEADER_IN_TEXT is not true for ZMAGIC, there is some padding + to make the text segment start at a certain boundary. For most + systems, this boundary is TARGET_PAGE_SIZE. But for Linux, in the + time-honored tradition of crazy ZMAGIC hacks, it is 1024 which is + not what TARGET_PAGE_SIZE needs to be for QMAGIC. */ + +#ifndef ZMAGIC_DISK_BLOCK_SIZE +#define ZMAGIC_DISK_BLOCK_SIZE TARGET_PAGE_SIZE +#endif + +#define N_DISK_BLOCK_SIZE(x) \ + (N_MAGIC(x) == ZMAGIC ? ZMAGIC_DISK_BLOCK_SIZE : TARGET_PAGE_SIZE) + +/* Offset in an a.out of the start of the text section. */ +#ifndef N_TXTOFF +#define N_TXTOFF(x) \ + (/* For {O,N,Q}MAGIC, no padding. */ \ + N_MAGIC (x) != ZMAGIC \ + ? EXEC_BYTES_SIZE \ + : (N_SHARED_LIB (x) \ + ? 0 \ + : (N_HEADER_IN_TEXT (x) \ + ? EXEC_BYTES_SIZE /* No padding. */ \ + : ZMAGIC_DISK_BLOCK_SIZE /* A page of padding. */))) +#endif +/* Size of the text section. It's always as stated, except that we + offset it to `undo' the adjustment to N_TXTADDR and N_TXTOFF + for ZMAGIC files that nominally include the exec header + as part of the first page of text. (BFD doesn't consider the + exec header to be part of the text segment.) */ +#ifndef N_TXTSIZE +#define N_TXTSIZE(x) \ + (/* For QMAGIC, we don't consider the header part of the text section. */\ + N_IS_QMAGIC (x) \ + ? (x)->a_text - EXEC_BYTES_SIZE \ + : ((N_MAGIC (x) != ZMAGIC || N_SHARED_LIB (x)) \ + ? (x)->a_text \ + : (N_HEADER_IN_TEXT (x) \ + ? (x)->a_text - EXEC_BYTES_SIZE /* No padding. */ \ + : (x)->a_text /* A page of padding. */ ))) +#endif +/* The address of the data segment in virtual memory. + It is the text segment address, plus text segment size, rounded + up to a N_SEGSIZE boundary for pure or pageable files. */ +#ifndef N_DATADDR +#define N_DATADDR(x) \ + (N_MAGIC (x) == OMAGIC \ + ? (N_TXTADDR (x) + N_TXTSIZE (x)) \ + : (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1) \ + & ~ (bfd_vma) (N_SEGSIZE (x) - 1)))) +#endif +/* The address of the BSS segment -- immediately after the data segment. */ + +#define N_BSSADDR(x) (N_DATADDR (x) + (x)->a_data) + +/* Offsets of the various portions of the file after the text segment. */ + +/* For {Q,Z}MAGIC, there is padding to make the data segment start on + a page boundary. Most of the time the a_text field (and thus + N_TXTSIZE) already contains this padding. It is possible that for + BSDI and/or 386BSD it sometimes doesn't contain the padding, and + perhaps we should be adding it here. But this seems kind of + questionable and probably should be BSDI/386BSD-specific if we do + do it. + + For NMAGIC (at least for hp300 BSD, probably others), there is + padding in memory only, not on disk, so we must *not* ever pad here + for NMAGIC. */ + +#ifndef N_DATOFF +#define N_DATOFF(x) (N_TXTOFF (x) + N_TXTSIZE (x)) +#endif +#ifndef N_TRELOFF +#define N_TRELOFF(x) (N_DATOFF (x) + (x)->a_data) +#endif +#ifndef N_DRELOFF +#define N_DRELOFF(x) (N_TRELOFF (x) + (x)->a_trsize) +#endif +#ifndef N_SYMOFF +#define N_SYMOFF(x) (N_DRELOFF (x) + (x)->a_drsize) +#endif +#ifndef N_STROFF +#define N_STROFF(x) (N_SYMOFF (x) + (x)->a_syms) +#endif + +/* Symbols */ +#ifndef external_nlist +struct external_nlist +{ + bfd_byte e_strx[BYTES_IN_WORD]; /* Index into string table of name. */ + bfd_byte e_type[1]; /* Type of symbol. */ + bfd_byte e_other[1]; /* Misc info (usually empty). */ + bfd_byte e_desc[2]; /* Description field. */ + bfd_byte e_value[BYTES_IN_WORD]; /* Value of symbol. */ +}; +#define EXTERNAL_NLIST_SIZE (BYTES_IN_WORD+4+BYTES_IN_WORD) +#endif + +struct internal_nlist +{ + unsigned long n_strx; /* Index into string table of name. */ + unsigned char n_type; /* Type of symbol. */ + unsigned char n_other; /* Misc info (usually empty). */ + unsigned short n_desc; /* Description field. */ + bfd_vma n_value; /* Value of symbol. */ +}; + +/* The n_type field is the symbol type, containing: */ + +#define N_UNDF 0 /* Undefined symbol. */ +#define N_ABS 2 /* Absolute symbol -- defined at particular addr. */ +#define N_TEXT 4 /* Text sym -- defined at offset in text seg. */ +#define N_DATA 6 /* Data sym -- defined at offset in data seg. */ +#define N_BSS 8 /* BSS sym -- defined at offset in zero'd seg. */ +#define N_COMM 0x12 /* Common symbol (visible after shared lib dynlink). */ +#define N_FN 0x1f /* File name of .o file. */ +#define N_FN_SEQ 0x0C /* N_FN from Sequent compilers (sigh). */ +/* Note: N_EXT can only be usefully OR-ed with N_UNDF, N_ABS, N_TEXT, + N_DATA, or N_BSS. When the low-order bit of other types is set, + (e.g. N_WARNING versus N_FN), they are two different types. */ +#define N_EXT 1 /* External symbol (as opposed to local-to-this-file). */ +#define N_TYPE 0x1e +#define N_STAB 0xe0 /* If any of these bits are on, it's a debug symbol. */ + +#define N_INDR 0x0a + +/* The following symbols refer to set elements. + All the N_SET[ATDB] symbols with the same name form one set. + Space is allocated for the set in the text section, and each set + elements value is stored into one word of the space. + The first word of the space is the length of the set (number of elements). + + The address of the set is made into an N_SETV symbol + whose name is the same as the name of the set. + This symbol acts like a N_DATA global symbol + in that it can satisfy undefined external references. */ + +/* These appear as input to LD, in a .o file. */ +#define N_SETA 0x14 /* Absolute set element symbol. */ +#define N_SETT 0x16 /* Text set element symbol. */ +#define N_SETD 0x18 /* Data set element symbol. */ +#define N_SETB 0x1A /* Bss set element symbol. */ + +/* This is output from LD. */ +#define N_SETV 0x1C /* Pointer to set vector in data area. */ + +/* Warning symbol. The text gives a warning message, the next symbol + in the table will be undefined. When the symbol is referenced, the + message is printed. */ + +#define N_WARNING 0x1e + +/* Weak symbols. These are a GNU extension to the a.out format. The + semantics are those of ELF weak symbols. Weak symbols are always + externally visible. The N_WEAK? values are squeezed into the + available slots. The value of a N_WEAKU symbol is 0. The values + of the other types are the definitions. */ +#define N_WEAKU 0x0d /* Weak undefined symbol. */ +#define N_WEAKA 0x0e /* Weak absolute symbol. */ +#define N_WEAKT 0x0f /* Weak text symbol. */ +#define N_WEAKD 0x10 /* Weak data symbol. */ +#define N_WEAKB 0x11 /* Weak bss symbol. */ + +/* Relocations + + There are two types of relocation flavours for a.out systems, + standard and extended. The standard form is used on systems where the + instruction has room for all the bits of an offset to the operand, whilst + the extended form is used when an address operand has to be split over n + instructions. Eg, on the 68k, each move instruction can reference + the target with a displacement of 16 or 32 bits. On the sparc, move + instructions use an offset of 14 bits, so the offset is stored in + the reloc field, and the data in the section is ignored. */ + +/* This structure describes a single relocation to be performed. + The text-relocation section of the file is a vector of these structures, + all of which apply to the text section. + Likewise, the data-relocation section applies to the data section. */ + +struct reloc_std_external +{ + bfd_byte r_address[BYTES_IN_WORD]; /* Offset of data to relocate. */ + bfd_byte r_index[3]; /* Symbol table index of symbol. */ + bfd_byte r_type[1]; /* Relocation type. */ +}; + +#define RELOC_STD_BITS_PCREL_BIG ((unsigned int) 0x80) +#define RELOC_STD_BITS_PCREL_LITTLE ((unsigned int) 0x01) + +#define RELOC_STD_BITS_LENGTH_BIG ((unsigned int) 0x60) +#define RELOC_STD_BITS_LENGTH_SH_BIG 5 +#define RELOC_STD_BITS_LENGTH_LITTLE ((unsigned int) 0x06) +#define RELOC_STD_BITS_LENGTH_SH_LITTLE 1 + +#define RELOC_STD_BITS_EXTERN_BIG ((unsigned int) 0x10) +#define RELOC_STD_BITS_EXTERN_LITTLE ((unsigned int) 0x08) + +#define RELOC_STD_BITS_BASEREL_BIG ((unsigned int) 0x08) +#define RELOC_STD_BITS_BASEREL_LITTLE ((unsigned int) 0x10) + +#define RELOC_STD_BITS_JMPTABLE_BIG ((unsigned int) 0x04) +#define RELOC_STD_BITS_JMPTABLE_LITTLE ((unsigned int) 0x20) + +#define RELOC_STD_BITS_RELATIVE_BIG ((unsigned int) 0x02) +#define RELOC_STD_BITS_RELATIVE_LITTLE ((unsigned int) 0x40) + +#define RELOC_STD_SIZE (BYTES_IN_WORD + 3 + 1) /* Bytes per relocation entry. */ + +struct reloc_std_internal +{ + bfd_vma r_address; /* Address (within segment) to be relocated. */ + /* The meaning of r_symbolnum depends on r_extern. */ + unsigned int r_symbolnum:24; + /* Nonzero means value is a pc-relative offset + and it should be relocated for changes in its own address + as well as for changes in the symbol or section specified. */ + unsigned int r_pcrel:1; + /* Length (as exponent of 2) of the field to be relocated. + Thus, a value of 2 indicates 1<<2 bytes. */ + unsigned int r_length:2; + /* 1 => relocate with value of symbol. + r_symbolnum is the index of the symbol + in files the symbol table. + 0 => relocate with the address of a segment. + r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS + (the N_EXT bit may be set also, but signifies nothing). */ + unsigned int r_extern:1; + /* The next three bits are for SunOS shared libraries, and seem to + be undocumented. */ + unsigned int r_baserel:1; /* Linkage table relative. */ + unsigned int r_jmptable:1; /* pc-relative to jump table. */ + unsigned int r_relative:1; /* "relative relocation". */ + /* unused */ + unsigned int r_pad:1; /* Padding -- set to zero. */ +}; + + +/* EXTENDED RELOCS. */ + +struct reloc_ext_external +{ + bfd_byte r_address[BYTES_IN_WORD]; /* Offset of data to relocate. */ + bfd_byte r_index[3]; /* Symbol table index of symbol. */ + bfd_byte r_type[1]; /* Relocation type. */ + bfd_byte r_addend[BYTES_IN_WORD]; /* Datum addend. */ +}; + +#ifndef RELOC_EXT_BITS_EXTERN_BIG +#define RELOC_EXT_BITS_EXTERN_BIG ((unsigned int) 0x80) +#endif + +#ifndef RELOC_EXT_BITS_EXTERN_LITTLE +#define RELOC_EXT_BITS_EXTERN_LITTLE ((unsigned int) 0x01) +#endif + +#ifndef RELOC_EXT_BITS_TYPE_BIG +#define RELOC_EXT_BITS_TYPE_BIG ((unsigned int) 0x1F) +#endif + +#ifndef RELOC_EXT_BITS_TYPE_SH_BIG +#define RELOC_EXT_BITS_TYPE_SH_BIG 0 +#endif + +#ifndef RELOC_EXT_BITS_TYPE_LITTLE +#define RELOC_EXT_BITS_TYPE_LITTLE ((unsigned int) 0xF8) +#endif + +#ifndef RELOC_EXT_BITS_TYPE_SH_LITTLE +#define RELOC_EXT_BITS_TYPE_SH_LITTLE 3 +#endif + +/* Bytes per relocation entry. */ +#define RELOC_EXT_SIZE (BYTES_IN_WORD + 3 + 1 + BYTES_IN_WORD) + +enum reloc_type +{ + /* Simple relocations. */ + RELOC_8, /* data[0:7] = addend + sv */ + RELOC_16, /* data[0:15] = addend + sv */ + RELOC_32, /* data[0:31] = addend + sv */ + /* PC-rel displacement. */ + RELOC_DISP8, /* data[0:7] = addend - pc + sv */ + RELOC_DISP16, /* data[0:15] = addend - pc + sv */ + RELOC_DISP32, /* data[0:31] = addend - pc + sv */ + /* Special. */ + RELOC_WDISP30, /* data[0:29] = (addend + sv - pc)>>2 */ + RELOC_WDISP22, /* data[0:21] = (addend + sv - pc)>>2 */ + RELOC_HI22, /* data[0:21] = (addend + sv)>>10 */ + RELOC_22, /* data[0:21] = (addend + sv) */ + RELOC_13, /* data[0:12] = (addend + sv) */ + RELOC_LO10, /* data[0:9] = (addend + sv) */ + RELOC_SFA_BASE, + RELOC_SFA_OFF13, + /* P.I.C. (base-relative). */ + RELOC_BASE10, /* Not sure - maybe we can do this the */ + RELOC_BASE13, /* right way now */ + RELOC_BASE22, + /* For some sort of pc-rel P.I.C. (?) */ + RELOC_PC10, + RELOC_PC22, + /* P.I.C. jump table. */ + RELOC_JMP_TBL, + /* Reputedly for shared libraries somehow. */ + RELOC_SEGOFF16, + RELOC_GLOB_DAT, + RELOC_JMP_SLOT, + RELOC_RELATIVE, + + RELOC_11, + RELOC_WDISP2_14, + RELOC_WDISP19, + RELOC_HHI22, /* data[0:21] = (addend + sv) >> 42 */ + RELOC_HLO10, /* data[0:9] = (addend + sv) >> 32 */ + + /* 29K relocation types. */ + RELOC_JUMPTARG, + RELOC_CONST, + RELOC_CONSTH, + + /* All the new ones I can think of, for sparc v9. */ + RELOC_64, /* data[0:63] = addend + sv */ + RELOC_DISP64, /* data[0:63] = addend - pc + sv */ + RELOC_WDISP21, /* data[0:20] = (addend + sv - pc)>>2 */ + RELOC_DISP21, /* data[0:20] = addend - pc + sv */ + RELOC_DISP14, /* data[0:13] = addend - pc + sv */ + /* Q . + What are the other ones, + Since this is a clean slate, can we throw away the ones we dont + understand ? Should we sort the values ? What about using a + microcode format like the 68k ? */ + NO_RELOC + }; + + +struct reloc_internal +{ + bfd_vma r_address; /* Offset of data to relocate. */ + long r_index; /* Symbol table index of symbol. */ + enum reloc_type r_type; /* Relocation type. */ + bfd_vma r_addend; /* Datum addend. */ +}; + +/* Q. + Should the length of the string table be 4 bytes or 8 bytes ? + + Q. + What about archive indexes ? */ + +#endif /* __A_OUT_64_H__ */ diff --git a/support/sdbinutils/include/aout/ar.h b/support/sdbinutils/include/aout/ar.h new file mode 100644 index 0000000..d9e3bc6 --- /dev/null +++ b/support/sdbinutils/include/aout/ar.h @@ -0,0 +1,55 @@ +/* archive file definition for GNU software + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* So far this is correct for BSDish archives. Don't forget that + files must begin on an even byte boundary. */ + +#ifndef __GNU_AR_H__ +#define __GNU_AR_H__ + +/* Note that the usual '\n' in magic strings may translate to different + characters, as allowed by ANSI. '\012' has a fixed value, and remains + compatible with existing BSDish archives. */ + +#define ARMAG "!\012" /* For COFF and a.out archives. */ +#define ARMAGB "!\012" /* For b.out archives. */ +#define ARMAGT "!\012" /* For thin archives. */ +#define SARMAG 8 +#define ARFMAG "`\012" + +/* The ar_date field of the armap (__.SYMDEF) member of an archive + must be greater than the modified date of the entire file, or + BSD-derived linkers complain. We originally write the ar_date with + this offset from the real file's mod-time. After finishing the + file, we rewrite ar_date if it's not still greater than the mod date. */ + +#define ARMAP_TIME_OFFSET 60 + +struct ar_hdr +{ + char ar_name[16]; /* Name of this member. */ + char ar_date[12]; /* File mtime. */ + char ar_uid[6]; /* Owner uid; printed as decimal. */ + char ar_gid[6]; /* Owner gid; printed as decimal. */ + char ar_mode[8]; /* File mode, printed as octal. */ + char ar_size[10]; /* File size, printed as decimal. */ + char ar_fmag[2]; /* Should contain ARFMAG. */ +}; + +#endif /* __GNU_AR_H__ */ diff --git a/support/sdbinutils/include/aout/dynix3.h b/support/sdbinutils/include/aout/dynix3.h new file mode 100644 index 0000000..ca6cf1b --- /dev/null +++ b/support/sdbinutils/include/aout/dynix3.h @@ -0,0 +1,87 @@ +/* a.out specifics for Sequent Symmetry running Dynix 3.x + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef A_OUT_DYNIX3_H +#define A_OUT_DYNIX3_H + +#define external_exec dynix_external_exec + +/* struct exec for Dynix 3 + + a_gdtbl and a_bootstrap are only for standalone binaries. + Shared data fields are not supported by the kernel as of Dynix 3.1, + but are supported by Dynix compiler programs. */ +struct dynix_external_exec + { + unsigned char e_info[4]; + unsigned char e_text[4]; + unsigned char e_data[4]; + unsigned char e_bss[4]; + unsigned char e_syms[4]; + unsigned char e_entry[4]; + unsigned char e_trsize[4]; + unsigned char e_drsize[4]; + unsigned char e_g_code[8]; + unsigned char e_g_data[8]; + unsigned char e_g_desc[8]; + unsigned char e_shdata[4]; + unsigned char e_shbss[4]; + unsigned char e_shdrsize[4]; + unsigned char e_bootstrap[44]; + unsigned char e_reserved[12]; + unsigned char e_version[4]; + }; + +#define EXEC_BYTES_SIZE (128) + +/* All executables under Dynix are demand paged with read-only text, + Thus no NMAGIC. + + ZMAGIC has a page of 0s at virtual 0, + XMAGIC has an invalid page at virtual 0. */ +#define OMAGIC 0x12eb /* .o */ +#define ZMAGIC 0x22eb /* zero @ 0, demand load */ +#define XMAGIC 0x32eb /* invalid @ 0, demand load */ +#define SMAGIC 0x42eb /* standalone, not supported here */ + +#define N_BADMAG(x) ((OMAGIC != N_MAGIC(x)) && \ + (ZMAGIC != N_MAGIC(x)) && \ + (XMAGIC != N_MAGIC(x)) && \ + (SMAGIC != N_MAGIC(x))) + +#define N_ADDRADJ(x) ((ZMAGIC == N_MAGIC(x) || XMAGIC == N_MAGIC(x)) ? 0x1000 : 0) + +#define N_TXTOFF(x) (EXEC_BYTES_SIZE) +#define N_DATOFF(x) (N_TXTOFF(x) + N_TXTSIZE(x)) +#define N_SHDATOFF(x) (N_DATOFF(x) + (x)->a_data) +#define N_TRELOFF(x) (N_SHDATOFF(x) + (x)->a_shdata) +#define N_DRELOFF(x) (N_TRELOFF(x) + (x)->a_trsize) +#define N_SHDRELOFF(x) (N_DRELOFF(x) + (x)->a_drsize) +#define N_SYMOFF(x) (N_SHDRELOFF(x) + (x)->a_shdrsize) +#define N_STROFF(x) (N_SYMOFF(x) + (x)->a_syms) + +#define N_TXTADDR(x) \ + (((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? 0 \ + : TEXT_START_ADDR + EXEC_BYTES_SIZE) + +#define N_TXTSIZE(x) \ + (((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? ((x)->a_text) \ + : ((x)->a_text - N_ADDRADJ(x) - EXEC_BYTES_SIZE)) + +#endif /* A_OUT_DYNIX3_H */ diff --git a/support/sdbinutils/include/aout/encap.h b/support/sdbinutils/include/aout/encap.h new file mode 100644 index 0000000..765e7cd --- /dev/null +++ b/support/sdbinutils/include/aout/encap.h @@ -0,0 +1,135 @@ +/* Yet Another Try at encapsulating bfd object files in coff. + Copyright (C) 1988-2018 Free Software Foundation, Inc. + Written by Pace Willisson 12/9/88 + + This file is obsolete. It needs to be converted to just define a bunch + of stuff that BFD can use to do coff-encapsulated files. --gnu@cygnus.com + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* + * We only use the coff headers to tell the kernel + * how to exec the file. Therefore, the only fields that need to + * be filled in are the scnptr and vaddr for the text and data + * sections, and the vaddr for the bss. As far as coff is concerned, + * there is no symbol table, relocation, or line numbers. + * + * A normal bsd header (struct exec) is placed after the coff headers, + * and before the real text. I defined a the new fields 'a_machtype' + * and a_flags. If a_machtype is M_386, and a_flags & A_ENCAP is + * true, then the bsd header is preceeded by a coff header. Macros + * like N_TXTOFF and N_TXTADDR use this field to find the bsd header. + * + * The only problem is to track down the bsd exec header. The + * macros HEADER_OFFSET, etc do this. + */ + +#define N_FLAGS_COFF_ENCAPSULATE 0x20 /* coff header precedes bsd header */ + +/* Describe the COFF header used for encapsulation. */ + +struct coffheader +{ + /* filehdr */ + unsigned short f_magic; + unsigned short f_nscns; + long f_timdat; + long f_symptr; + long f_nsyms; + unsigned short f_opthdr; + unsigned short f_flags; + /* aouthdr */ + short magic; + short vstamp; + long tsize; + long dsize; + long bsize; + long entry; + long text_start; + long data_start; + struct coffscn + { + char s_name[8]; + long s_paddr; + long s_vaddr; + long s_size; + long s_scnptr; + long s_relptr; + long s_lnnoptr; + unsigned short s_nreloc; + unsigned short s_nlnno; + long s_flags; + } scns[3]; +}; + +/* Describe some of the parameters of the encapsulation, + including how to find the encapsulated BSD header. */ + +/* FIXME, this is dumb. The same tools can't handle a.outs for different + architectures, just because COFF_MAGIC is different; so you need a + separate GNU nm for every architecture!!? Unfortunately, it needs to + be this way, since the COFF_MAGIC value is determined by the kernel + we're trying to fool here. */ + +#define COFF_MAGIC_I386 0514 /* I386MAGIC */ +#define COFF_MAGIC_M68K 0520 /* MC68MAGIC */ + +#ifdef COFF_MAGIC +short __header_offset_temp; +#define HEADER_OFFSET(f) \ + (__header_offset_temp = 0, \ + fread ((char *)&__header_offset_temp, sizeof (short), 1, (f)), \ + fseek ((f), -sizeof (short), 1), \ + __header_offset_temp==COFF_MAGIC ? sizeof(struct coffheader) : 0) +#else +#define HEADER_OFFSET(f) 0 +#endif + +#define HEADER_SEEK(f) (fseek ((f), HEADER_OFFSET((f)), 1)) + +/* Describe the characteristics of the BSD header + that appears inside the encapsulation. */ + +/* Encapsulated coff files that are linked ZMAGIC have a text segment + offset just past the header (and a matching TXTADDR), excluding + the headers from the text segment proper but keeping the physical + layout and the virtual memory layout page-aligned. + + Non-encapsulated a.out files that are linked ZMAGIC have a text + segment that starts at 0 and an N_TXTADR similarly offset to 0. + They too are page-aligned with each other, but they include the + a.out header as part of the text. + + The _N_HDROFF gets sizeof struct exec added to it, so we have + to compensate here. See . */ + +#undef _N_HDROFF +#undef N_TXTADDR +#undef N_DATADDR + +#define _N_HDROFF(x) ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \ + sizeof (struct coffheader) : 0) + +/* Address of text segment in memory after it is loaded. */ +#define N_TXTADDR(x) \ + ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \ + sizeof (struct coffheader) + sizeof (struct exec) : 0) +#define SEGMENT_SIZE 0x400000 + +#define N_DATADDR(x) \ + ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \ + (SEGMENT_SIZE + ((N_TXTADDR(x)+(x)->a_text-1) & ~(SEGMENT_SIZE-1))) : \ + (N_TXTADDR(x)+(x)->a_text)) diff --git a/support/sdbinutils/include/aout/host.h b/support/sdbinutils/include/aout/host.h new file mode 100644 index 0000000..2cbe733 --- /dev/null +++ b/support/sdbinutils/include/aout/host.h @@ -0,0 +1,43 @@ +/* host.h - Parameters about the a.out format, based on the host system + on which the program is compiled. + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* Address of data segment in memory after it is loaded. + It is up to you to define SEGMENT_SIZE on machines not listed here. */ +#ifndef SEGMENT_SIZE + +#if defined(hp300) || defined(pyr) +#define SEGMENT_SIZE page_size +#endif + +#ifdef sony +#define SEGMENT_SIZE 0x1000 +#endif /* Sony. */ + +#ifdef is68k +#define SEGMENT_SIZE 0x20000 +#endif + +#if defined(m68k) && defined(PORTAR) +#define TARGET_PAGE_SIZE 0x400 +#define SEGMENT_SIZE TARGET_PAGE_SIZE +#endif + +#endif /*!defined(SEGMENT_SIZE)*/ + diff --git a/support/sdbinutils/include/aout/hp.h b/support/sdbinutils/include/aout/hp.h new file mode 100644 index 0000000..634f8ab --- /dev/null +++ b/support/sdbinutils/include/aout/hp.h @@ -0,0 +1,83 @@ +/* Special version of for use under HP-UX. + Copyright (C) 1988-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* THIS FILE IS OBSOLETE. It needs to be revised as a variant "external" + a.out format for use with BFD. */ + +/* The `exec' structure and overall layout must be close to HP's when + we are running on an HP system, otherwise we will not be able to + execute the resulting file. */ + +/* Allow this file to be included twice. */ +#ifndef __GNU_EXEC_MACROS__ + +struct exec +{ + unsigned short a_machtype; /* machine type */ + unsigned short a_magic; /* magic number */ + unsigned long a_spare1; + unsigned long a_spare2; + unsigned long a_text; /* length of text, in bytes */ + unsigned long a_data; /* length of data, in bytes */ + unsigned long a_bss; /* length of uninitialized data area for file, in bytes */ + unsigned long a_trsize; /* length of relocation info for text, in bytes */ + unsigned long a_drsize; /* length of relocation info for data, in bytes */ + unsigned long a_spare3; /* HP = pascal interface size */ + unsigned long a_spare4; /* HP = symbol table size */ + unsigned long a_spare5; /* HP = debug name table size */ + unsigned long a_entry; /* start address */ + unsigned long a_spare6; /* HP = source line table size */ + unsigned long a_spare7; /* HP = value table size */ + unsigned long a_syms; /* length of symbol table data in file, in bytes */ + unsigned long a_spare8; +}; + +/* Tell a.out.gnu.h not to define `struct exec'. */ +#define __STRUCT_EXEC_OVERRIDE__ + +#include "../a.out.gnu.h" + +#undef N_MAGIC +#undef N_MACHTYPE +#undef N_FLAGS +#undef N_SET_INFO +#undef N_SET_MAGIC +#undef N_SET_MACHTYPE +#undef N_SET_FLAGS + +#define N_MAGIC(execp) ((execp)->a_magic) +#define N_MACHTYPE(execp) ((execp)->a_machtype) +#define N_SET_MAGIC(execp, magic) (((execp)->a_magic) = (magic)) +#define N_SET_MACHTYPE(execp, machtype) (((execp)->a_machtype) = (machtype)) + +#undef N_BADMAG +#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x))) + +#define _N_BADMACH(x) \ +(((N_MACHTYPE (x)) != HP9000S200_ID) && \ + ((N_MACHTYPE (x)) != HP98x6_ID)) + +#define HP98x6_ID 0x20A +#define HP9000S200_ID 0x20C + +#undef _N_HDROFF +#define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec))) + +#define SEGMENT_SIZE 0x1000 + +#endif /* __GNU_EXEC_MACROS__ */ diff --git a/support/sdbinutils/include/aout/hp300hpux.h b/support/sdbinutils/include/aout/hp300hpux.h new file mode 100644 index 0000000..f130c3c --- /dev/null +++ b/support/sdbinutils/include/aout/hp300hpux.h @@ -0,0 +1,131 @@ +/* Special version of for use under HP-UX. + Copyright (C) 1988-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +struct hp300hpux_exec_bytes +{ + unsigned char e_info[4]; /* a_machtype/a_magic */ + unsigned char e_spare1[4]; + unsigned char e_spare2[4]; + unsigned char e_text[4]; /* length of text, in bytes */ + unsigned char e_data[4]; /* length of data, in bytes */ + unsigned char e_bss[4]; /* length of uninitialized data area , in bytes */ + unsigned char e_trsize[4]; /* length of relocation info for text, in bytes*/ + unsigned char e_drsize[4]; /* length of relocation info for data, in bytes*/ + unsigned char e_passize[4];/* HP = pascal interface size */ + unsigned char e_syms[4]; /* HP = symbol table size */ + unsigned char e_spare5[4]; /* HP = debug name table size */ + unsigned char e_entry[4]; /* start address */ + unsigned char e_spare6[4]; /* HP = source line table size */ + unsigned char e_supsize[4];/* HP = value table size */ + unsigned char e_drelocs[4]; + unsigned char e_extension[4]; /* file offset of extension */ +}; +#define EXEC_BYTES_SIZE 64 + +struct hp300hpux_nlist_bytes +{ + unsigned char e_value[4]; + unsigned char e_type[1]; + unsigned char e_length[1]; /* Length of ascii symbol name. */ + unsigned char e_almod[2]; /* Alignment mod. */ + unsigned char e_shlib[2]; /* Info about dynamic linking. */ +}; +#define EXTERNAL_NLIST_SIZE 10 + +struct hp300hpux_reloc +{ + unsigned char r_address[4];/* offset of data to relocate */ + unsigned char r_index[2]; /* symbol table index of symbol */ + unsigned char r_type[1]; /* relocation type */ + unsigned char r_length[1]; /* length of item to reloc */ +}; + +struct hp300hpux_header_extension +{ + unsigned char e_syms[4]; + unsigned char unique_headers[12*4]; + unsigned char e_header[2]; /* Type of header. */ + unsigned char e_version[2]; /* Version. */ + unsigned char e_size[4]; /* Bytes following. */ + unsigned char e_extension[4];/* File offset of next extension. */ +}; +#define EXTERNAL_EXTENSION_HEADER_SIZE (16*4) + +/* HPUX separates object files (0x106) and impure executables (0x107) + but the bfd code does not distinguish between them. Since we want to + read hpux .o files, we add an special define and use it below in + offset and address calculations. */ + +#define HPUX_DOT_O_MAGIC 0x106 +#define OMAGIC 0x107 /* Object file or impure executable. */ +#define NMAGIC 0x108 /* Code indicating pure executable. */ +#define ZMAGIC 0x10B /* Demand-paged executable. */ + +#define N_HEADER_IN_TEXT(x) 0 + +#if 0 /* libaout.h only uses the lower 8 bits. */ +#define HP98x6_ID 0x20A +#define HP9000S200_ID 0x20C +#endif +#define HP98x6_ID 0x0A +#define HP9000S200_ID 0x0C + +#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x))) + +#define N_DATADDR(x) \ + ((N_MAGIC (x) == OMAGIC || N_MAGIC (x) == HPUX_DOT_O_MAGIC) \ + ? (N_TXTADDR (x) + N_TXTSIZE (x)) \ + : (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1) \ + & ~ (bfd_vma) (N_SEGSIZE (x) - 1)))) + +#define _N_BADMACH(x) \ + (((N_MACHTYPE (x)) != HP9000S200_ID) && ((N_MACHTYPE (x)) != HP98x6_ID)) + +#define _N_BADMAG(x) (N_MAGIC(x) != HPUX_DOT_O_MAGIC \ + && N_MAGIC(x) != OMAGIC \ + && N_MAGIC(x) != NMAGIC \ + && N_MAGIC(x) != ZMAGIC ) + +#undef _N_HDROFF +#define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec))) + +#undef N_DATOFF +#undef N_PASOFF +#undef N_SYMOFF +#undef N_SUPOFF +#undef N_TRELOFF +#undef N_DRELOFF +#undef N_STROFF + +#define N_DATOFF(x) ( N_TXTOFF(x) + N_TXTSIZE(x) ) +#define N_PASOFF(x) ( N_DATOFF(x) + (x)->a_data) +#define N_SYMOFF(x) ( N_PASOFF(x) /* + (x)->a_passize*/ ) +#define N_SUPOFF(x) ( N_SYMOFF(x) + (x)->a_syms ) +#define N_TRELOFF(x) ( N_SUPOFF(x) /* + (x)->a_supsize*/ ) +#define N_DRELOFF(x) ( N_TRELOFF(x) + (x)->a_trsize ) +#define N_EXTHOFF(x) ( N_DRELOFF(x) /* + (x)->a_drsize */) +#define N_STROFF(x) ( 0 /* no string table */ ) + +/* Use these when the file has gnu symbol tables. */ +#define N_GNU_TRELOFF(x) (N_DATOFF(x) + (x)->a_data) +#define N_GNU_DRELOFF(x) (N_GNU_TRELOFF(x) + (x)->a_trsize) +#define N_GNU_SYMOFF(x) (N_GNU_DRELOFF(x) + (x)->a_drsize) + +#define TARGET_PAGE_SIZE 0x1000 +#define SEGMENT_SIZE 0x1000 +#define TEXT_START_ADDR 0 diff --git a/support/sdbinutils/include/aout/hppa.h b/support/sdbinutils/include/aout/hppa.h new file mode 100644 index 0000000..b9ec350 --- /dev/null +++ b/support/sdbinutils/include/aout/hppa.h @@ -0,0 +1,22 @@ +/* Copyright (C) 2012-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#include "filehdr.h" +#include "aouthdr.h" +#include "scnhdr.h" +#include "spacehdr.h" +#include "syms.h" diff --git a/support/sdbinutils/include/aout/ranlib.h b/support/sdbinutils/include/aout/ranlib.h new file mode 100644 index 0000000..8cf3030 --- /dev/null +++ b/support/sdbinutils/include/aout/ranlib.h @@ -0,0 +1,63 @@ +/* ranlib.h -- archive library index member definition for GNU. + Copyright (C) 1990-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* The Symdef member of an archive contains two things: + a table that maps symbol-string offsets to file offsets, + and a symbol-string table. All the symbol names are + run together (each with trailing null) in the symbol-string + table. There is a single longword bytecount on the front + of each of these tables. Thus if we have two symbols, + "foo" and "_bar", that are in archive members at offsets + 200 and 900, it would look like this: + 16 ; byte count of index table + 0 ; offset of "foo" in string table + 200 ; offset of foo-module in file + 4 ; offset of "bar" in string table + 900 ; offset of bar-module in file + 9 ; byte count of string table + "foo\0_bar\0" ; string table */ + +#define RANLIBMAG "__.SYMDEF" /* Archive file name containing index */ +#define RANLIBSKEW 3 /* Creation time offset */ + +/* Format of __.SYMDEF: + First, a longword containing the size of the 'symdef' data that follows. + Second, zero or more 'symdef' structures. + Third, a longword containing the length of symbol name strings. + Fourth, zero or more symbol name strings (each followed by a null). */ + +struct symdef + { + union + { + unsigned long string_offset; /* In the file */ + char *name; /* In memory, sometimes */ + } s; + /* this points to the front of the file header (AKA member header -- + a struct ar_hdr), not to the front of the file or into the file). + in other words it only tells you which file to read */ + unsigned long file_offset; + }; + +/* Compatability with BSD code */ + +#define ranlib symdef +#define ran_un s +#define ran_strx string_offset +#define ran_name name +#define ran_off file_offset diff --git a/support/sdbinutils/include/aout/reloc.h b/support/sdbinutils/include/aout/reloc.h new file mode 100644 index 0000000..2249107 --- /dev/null +++ b/support/sdbinutils/include/aout/reloc.h @@ -0,0 +1,67 @@ +/* reloc.h -- Header file for relocation information. + Copyright (C) 1989-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* Relocation types for a.out files using reloc_info_extended + (SPARC and AMD 29000). */ + +#ifndef _RELOC_H_READ_ +#define _RELOC_H_READ_ 1 + +enum reloc_type + { + RELOC_8, RELOC_16, RELOC_32, /* simple relocations */ + RELOC_DISP8, RELOC_DISP16, RELOC_DISP32, /* pc-rel displacement */ + RELOC_WDISP30, RELOC_WDISP22, + RELOC_HI22, RELOC_22, + RELOC_13, RELOC_LO10, + RELOC_SFA_BASE, RELOC_SFA_OFF13, + RELOC_BASE10, RELOC_BASE13, RELOC_BASE22, /* P.I.C. (base-relative) */ + RELOC_PC10, RELOC_PC22, /* for some sort of pc-rel P.I.C. (?) */ + RELOC_JMP_TBL, /* P.I.C. jump table */ + RELOC_SEGOFF16, /* reputedly for shared libraries somehow */ + RELOC_GLOB_DAT, RELOC_JMP_SLOT, RELOC_RELATIVE, + RELOC_11, + RELOC_WDISP2_14, + RELOC_WDISP19, + RELOC_HHI22, + RELOC_HLO10, + + /* 29K relocation types */ + RELOC_JUMPTARG, RELOC_CONST, RELOC_CONSTH, + + RELOC_WDISP14, RELOC_WDISP21, + + NO_RELOC + }; + +#define RELOC_TYPE_NAMES \ +"8", "16", "32", "DISP8", \ +"DISP16", "DISP32", "WDISP30", "WDISP22", \ +"HI22", "22", "13", "LO10", \ +"SFA_BASE", "SFAOFF13", "BASE10", "BASE13", \ +"BASE22", "PC10", "PC22", "JMP_TBL", \ +"SEGOFF16", "GLOB_DAT", "JMP_SLOT", "RELATIVE", \ +"11", "WDISP2_14", "WDISP19", "HHI22", \ +"HLO10", \ +"JUMPTARG", "CONST", "CONSTH", "WDISP14", \ +"WDISP21", \ +"NO_RELOC" + +#endif /* _RELOC_H_READ_ */ + +/* end of reloc.h */ diff --git a/support/sdbinutils/include/aout/stab.def b/support/sdbinutils/include/aout/stab.def new file mode 100644 index 0000000..a3cb576 --- /dev/null +++ b/support/sdbinutils/include/aout/stab.def @@ -0,0 +1,282 @@ +/* Table of DBX symbol codes for the GNU system. + Copyright (C) 1988-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* New stab from Solaris 2. This uses an n_type of 0, which in a.out files + overlaps the N_UNDF used for ordinary symbols. In ELF files, the + debug information is in a different file section, so there is no conflict. + This symbol's n_value gives the size of the string section associated + with this file. The symbol's n_strx (relative to the just-updated + string section start address) gives the name of the source file, + e.g. "foo.c", without any path information. The symbol's n_desc gives + the count of upcoming symbols associated with this file (not including + this one). */ +/* __define_stab (N_UNDF, 0x00, "UNDF") */ + +/* Global variable. Only the name is significant. + To find the address, look in the corresponding external symbol. */ +__define_stab (N_GSYM, 0x20, "GSYM") + +/* Function name for BSD Fortran. Only the name is significant. + To find the address, look in the corresponding external symbol. */ +__define_stab (N_FNAME, 0x22, "FNAME") + +/* Function name or text-segment variable for C. Value is its address. + Desc is supposedly starting line number, but GCC doesn't set it + and DBX seems not to miss it. */ +__define_stab (N_FUN, 0x24, "FUN") + +/* Data-segment variable with internal linkage. Value is its address. + "Static Sym". */ +__define_stab (N_STSYM, 0x26, "STSYM") + +/* BSS-segment variable with internal linkage. Value is its address. */ +__define_stab (N_LCSYM, 0x28, "LCSYM") + +/* Name of main routine. Only the name is significant. */ +__define_stab (N_MAIN, 0x2a, "MAIN") + +/* Solaris2: Read-only data symbols. */ +__define_stab (N_ROSYM, 0x2c, "ROSYM") + +/* MacOS X: + The beginning of a relocatable function block - including stabs. */ +__define_stab (N_BNSYM, 0x2e, "BNSYM") + +/* Global symbol in Pascal. + Supposedly the value is its line number; I'm skeptical. */ +__define_stab (N_PC, 0x30, "PC") + +/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */ +__define_stab (N_NSYMS, 0x32, "NSYMS") + +/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */ +__define_stab (N_NOMAP, 0x34, "NOMAP") + +/* New stab from Solaris 2. Like N_SO, but for the object file. Two in + a row provide the build directory and the relative path of the .o from it. + Solaris2 uses this to avoid putting the stabs info into the linked + executable; this stab goes into the ".stab.index" section, and the debugger + reads the real stabs directly from the .o files instead. */ +__define_stab (N_OBJ, 0x38, "OBJ") + +/* New stab from Solaris 2. Options for the debugger, related to the + source language for this module. E.g. whether to use ANSI + integral promotions or traditional integral promotions. */ +__define_stab (N_OPT, 0x3c, "OPT") + +/* Register variable. Value is number of register. */ +__define_stab (N_RSYM, 0x40, "RSYM") + +/* Modula-2 compilation unit. Can someone say what info it contains? */ +__define_stab (N_M2C, 0x42, "M2C") + +/* Line number in text segment. Desc is the line number; + value is corresponding address. On Solaris2, the line number is + relative to the start of the current function. */ +__define_stab (N_SLINE, 0x44, "SLINE") + +/* Similar, for data segment. */ +__define_stab (N_DSLINE, 0x46, "DSLINE") + +/* Similar, for bss segment. */ +__define_stab (N_BSLINE, 0x48, "BSLINE") + +/* Sun's source-code browser stabs. ?? Don't know what the fields are. + Supposedly the field is "path to associated .cb file". THIS VALUE + OVERLAPS WITH N_BSLINE! */ +__define_stab_duplicate (N_BROWS, 0x48, "BROWS") + +/* GNU Modula-2 definition module dependency. Value is the modification time + of the definition file. Other is non-zero if it is imported with the + GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there + are enough empty fields? */ +__define_stab(N_DEFD, 0x4a, "DEFD") + +/* New in Solaris2. Function start/body/end line numbers. */ +__define_stab(N_FLINE, 0x4C, "FLINE") + +/* MacOS X: This tells the end of a relocatable function + debugging info. */ +__define_stab(N_ENSYM, 0x4E, "ENSYM") + +/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2 + and one is for C++. Still,... */ +/* GNU C++ exception variable. Name is variable name. */ +__define_stab (N_EHDECL, 0x50, "EHDECL") +/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */ +__define_stab_duplicate (N_MOD2, 0x50, "MOD2") + +/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if + this entry is immediately followed by a CAUGHT stab saying what exception + was caught. Multiple CAUGHT stabs means that multiple exceptions + can be caught here. If Desc is 0, it means all exceptions are caught + here. */ +__define_stab (N_CATCH, 0x54, "CATCH") + +/* Structure or union element. Value is offset in the structure. */ +__define_stab (N_SSYM, 0x60, "SSYM") + +/* Solaris2: Last stab emitted for module. */ +__define_stab (N_ENDM, 0x62, "ENDM") + +/* Name of main source file. + Value is starting text address of the compilation. + If multiple N_SO's appear, the first to contain a trailing / is the + compilation directory. The first to not contain a trailing / is the + source file name, relative to the compilation directory. Others (perhaps + resulting from cfront) are ignored. + On Solaris2, value is undefined, but desc is a source-language code. */ + +__define_stab (N_SO, 0x64, "SO") + +/* Apple: This is the stab that associated the .o file with the + N_SO stab, in the case where debug info is mostly stored in the .o file. */ +__define_stab (N_OSO, 0x66, "OSO") + +/* SunPro F77: Name of alias. */ +__define_stab (N_ALIAS, 0x6c, "ALIAS") + +/* Automatic variable in the stack. Value is offset from frame pointer. + Also used for type descriptions. */ +__define_stab (N_LSYM, 0x80, "LSYM") + +/* Beginning of an include file. Only Sun uses this. + In an object file, only the name is significant. + The Sun linker puts data into some of the other fields. */ +__define_stab (N_BINCL, 0x82, "BINCL") + +/* Name of sub-source file (#include file). + Value is starting text address of the compilation. */ +__define_stab (N_SOL, 0x84, "SOL") + +/* Parameter variable. Value is offset from argument pointer. + (On most machines the argument pointer is the same as the frame pointer. */ +__define_stab (N_PSYM, 0xa0, "PSYM") + +/* End of an include file. No name. + This and N_BINCL act as brackets around the file's output. + In an object file, there is no significant data in this entry. + The Sun linker puts data into some of the fields. */ +__define_stab (N_EINCL, 0xa2, "EINCL") + +/* Alternate entry point. Value is its address. */ +__define_stab (N_ENTRY, 0xa4, "ENTRY") + +/* Beginning of lexical block. + The desc is the nesting level in lexical blocks. + The value is the address of the start of the text for the block. + The variables declared inside the block *precede* the N_LBRAC symbol. + On Solaris2, the value is relative to the start of the current function. */ +__define_stab (N_LBRAC, 0xc0, "LBRAC") + +/* Place holder for deleted include file. Replaces a N_BINCL and everything + up to the corresponding N_EINCL. The Sun linker generates these when + it finds multiple identical copies of the symbols from an include file. + This appears only in output from the Sun linker. */ +__define_stab (N_EXCL, 0xc2, "EXCL") + +/* Modula-2 scope information. Can someone say what info it contains? */ +__define_stab (N_SCOPE, 0xc4, "SCOPE") + +/* Solaris2: Patch Run Time Checker. */ +__define_stab (N_PATCH, 0xd0, "PATCH") + +/* End of a lexical block. Desc matches the N_LBRAC's desc. + The value is the address of the end of the text for the block. + On Solaris2, the value is relative to the start of the current function. */ +__define_stab (N_RBRAC, 0xe0, "RBRAC") + +/* Begin named common block. Only the name is significant. */ +__define_stab (N_BCOMM, 0xe2, "BCOMM") + +/* End named common block. Only the name is significant + (and it should match the N_BCOMM). */ +__define_stab (N_ECOMM, 0xe4, "ECOMM") + +/* Member of a common block; value is offset within the common block. + This should occur within a BCOMM/ECOMM pair. */ +__define_stab (N_ECOML, 0xe8, "ECOML") + +/* Solaris2: Pascal "with" statement: type,,0,0,offset */ +__define_stab (N_WITH, 0xea, "WITH") + +/* These STAB's are used on Gould systems for Non-Base register symbols + or something like that. FIXME. I have assigned the values at random + since I don't have a Gould here. Fixups from Gould folk welcome... */ +__define_stab (N_NBTEXT, 0xF0, "NBTEXT") +__define_stab (N_NBDATA, 0xF2, "NBDATA") +__define_stab (N_NBBSS, 0xF4, "NBBSS") +__define_stab (N_NBSTS, 0xF6, "NBSTS") +__define_stab (N_NBLCS, 0xF8, "NBLCS") + +/* Second symbol entry containing a length-value for the preceding entry. + The value is the length. */ +__define_stab (N_LENG, 0xfe, "LENG") + +/* The above information, in matrix format. + + STAB MATRIX + _________________________________________________ + | 00 - 1F are not dbx stab symbols | + | In most cases, the low bit is the EXTernal bit| + + | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA | + | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT | + + | 08 BSS | 0A INDR | 0C FN_SEQ | 0E WEAKA | + | 09 |EXT | 0B | 0D WEAKU | 0F WEAKT | + + | 10 WEAKD | 12 COMM | 14 SETA | 16 SETT | + | 11 WEAKB | 13 | 15 | 17 | + + | 18 SETD | 1A SETB | 1C SETV | 1E WARNING| + | 19 | 1B | 1D | 1F FN | + + |_______________________________________________| + | Debug entries with bit 01 set are unused. | + | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM | + | 28 LCSYM | 2A MAIN | 2C ROSYM | 2E | + | 30 PC | 32 NSYMS | 34 NOMAP | 36 | + | 38 OBJ | 3A | 3C OPT | 3E | + | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE | + | 48 BSLINE*| 4A DEFD | 4C FLINE | 4E | + | 50 EHDECL*| 52 | 54 CATCH | 56 | + | 58 | 5A | 5C | 5E | + | 60 SSYM | 62 ENDM | 64 SO | 66 | + | 68 | 6A | 6C ALIAS | 6E | + | 70 | 72 | 74 | 76 | + | 78 | 7A | 7C | 7E | + | 80 LSYM | 82 BINCL | 84 SOL | 86 | + | 88 | 8A | 8C | 8E | + | 90 | 92 | 94 | 96 | + | 98 | 9A | 9C | 9E | + | A0 PSYM | A2 EINCL | A4 ENTRY | A6 | + | A8 | AA | AC | AE | + | B0 | B2 | B4 | B6 | + | B8 | BA | BC | BE | + | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 | + | C8 | CA | CC | CE | + | D0 PATCH | D2 | D4 | D6 | + | D8 | DA | DC | DE | + | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 | + | E8 ECOML | EA WITH | EC | EE | + | F0 | F2 | F4 | F6 | + | F8 | FA | FC | FE LENG | + +-----------------------------------------------+ + * 50 EHDECL is also MOD2. + * 48 BSLINE is also BROWS. + */ diff --git a/support/sdbinutils/include/aout/stab_gnu.h b/support/sdbinutils/include/aout/stab_gnu.h new file mode 100644 index 0000000..04156b7 --- /dev/null +++ b/support/sdbinutils/include/aout/stab_gnu.h @@ -0,0 +1,55 @@ +/* gnu_stab.h Definitions for GNU extensions to STABS + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ +#ifndef __GNU_STAB__ + +/* Indicate the GNU stab.h is in use. */ + +#define __GNU_STAB__ + +#define __define_stab(NAME, CODE, STRING) NAME=CODE, +#define __define_stab_duplicate(NAME, CODE, STRING) NAME=CODE, + +enum __stab_debug_code +{ +#include "aout/stab.def" +LAST_UNUSED_STAB_CODE +}; + +#undef __define_stab + +/* Definitions of "desc" field for N_SO stabs in Solaris2. */ + +#define N_SO_AS 1 +#define N_SO_C 2 +#define N_SO_ANSI_C 3 +#define N_SO_CC 4 /* C++ */ +#define N_SO_FORTRAN 5 +#define N_SO_PASCAL 6 + +/* Solaris2: Floating point type values in basic types. */ + +#define NF_NONE 0 +#define NF_SINGLE 1 /* IEEE 32-bit */ +#define NF_DOUBLE 2 /* IEEE 64-bit */ +#define NF_COMPLEX 3 /* Fortran complex */ +#define NF_COMPLEX16 4 /* Fortran double complex */ +#define NF_COMPLEX32 5 /* Fortran complex*16 */ +#define NF_LDOUBLE 6 /* Long double (whatever that is) */ + +#endif /* __GNU_STAB_ */ diff --git a/support/sdbinutils/include/aout/sun4.h b/support/sdbinutils/include/aout/sun4.h new file mode 100644 index 0000000..882c411 --- /dev/null +++ b/support/sdbinutils/include/aout/sun4.h @@ -0,0 +1,239 @@ +/* SPARC-specific values for a.out files + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* Some systems, e.g., AIX, may have defined this in header files already + included. */ +#undef TARGET_PAGE_SIZE +#define TARGET_PAGE_SIZE 0x2000 /* 8K. aka NBPG in */ +/* Note that some SPARCs have 4K pages, some 8K, some others. */ + +#define SEG_SIZE_SPARC TARGET_PAGE_SIZE +#define SEG_SIZE_SUN3 0x20000 /* Resolution of r/w protection hw */ + +#define TEXT_START_ADDR TARGET_PAGE_SIZE /* Location 0 is not accessible */ +#define N_HEADER_IN_TEXT(x) 1 + +/* Non-default definitions of the accessor macros... */ + +/* Segment size varies on Sun-3 versus Sun-4. */ + +#define N_SEGSIZE(x) (N_MACHTYPE(x) == M_SPARC? SEG_SIZE_SPARC: \ + N_MACHTYPE(x) == M_68020? SEG_SIZE_SUN3: \ + /* Guess? */ TARGET_PAGE_SIZE) + +/* Virtual Address of text segment from the a.out file. For OMAGIC, + (almost always "unlinked .o's" these days), should be zero. + Sun added a kludge so that shared libraries linked ZMAGIC get + an address of zero if a_entry (!!!) is lower than the otherwise + expected text address. These kludges have gotta go! + For linked files, should reflect reality if we know it. */ + +#define N_SHARED_LIB(x) ((x)->a_entry < TEXT_START_ADDR \ + && (x)->a_text >= EXEC_BYTES_SIZE) + +/* This differs from the version in aout64.h (which we override by defining + it here) only for NMAGIC (we return TEXT_START_ADDR+EXEC_BYTES_SIZE; + they return 0). */ + +#define N_TXTADDR(x) \ + (N_MAGIC(x)==OMAGIC? 0 \ + : (N_MAGIC(x) == ZMAGIC && (x)->a_entry < TEXT_START_ADDR)? 0 \ + : TEXT_START_ADDR+EXEC_BYTES_SIZE) + +/* When a file is linked against a shared library on SunOS 4, the + dynamic bit in the exec header is set, and the first symbol in the + symbol table is __DYNAMIC. Its value is the address of the + following structure. */ + +struct external_sun4_dynamic +{ + /* The version number of the structure. SunOS 4.1.x creates files + with version number 3, which is what this structure is based on. + According to gdb, version 2 is similar. I believe that version 2 + used a different type of procedure linkage table, and there may + have been other differences. */ + bfd_byte ld_version[4]; + /* The virtual address of a 28 byte structure used in debugging. + The contents are filled in at run time by ld.so. */ + bfd_byte ldd[4]; + /* The virtual address of another structure with information about + how to relocate the executable at run time. */ + bfd_byte ld[4]; +}; + +/* The size of the debugging structure pointed to by the debugger + field of __DYNAMIC. */ +#define EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE (24) + +/* The structure pointed to by the linker field of __DYNAMIC. As far + as I can tell, most of the addresses in this structure are offsets + within the file, but some are actually virtual addresses. */ + +struct internal_sun4_dynamic_link +{ + /* Linked list of loaded objects. This is filled in at runtime by + ld.so and probably by dlopen. */ + unsigned long ld_loaded; + + /* The address of the list of names of shared objects which must be + included at runtime. Each entry in the list is 16 bytes: the 4 + byte address of the string naming the object (e.g., for -lc this + is "c"); 4 bytes of flags--the high bit is whether to search for + the object using the library path; the 2 byte major version + number; the 2 byte minor version number; the 4 byte address of + the next entry in the list (zero if this is the last entry). The + version numbers seem to only be non-zero when doing library + searching. */ + unsigned long ld_need; + + /* The address of the path to search for the shared objects which + must be included. This points to a string in PATH format which + is generated from the -L arguments to the linker. According to + the man page, ld.so implicitly adds ${LD_LIBRARY_PATH} to the + beginning of this string and /lib:/usr/lib:/usr/local/lib to the + end. The string is terminated by a null byte. This field is + zero if there is no additional path. */ + unsigned long ld_rules; + + /* The address of the global offset table. This appears to be a + virtual address, not a file offset. The first entry in the + global offset table seems to be the virtual address of the + sun4_dynamic structure (the same value as the __DYNAMIC symbol). + The global offset table is used for PIC code to hold the + addresses of variables. A dynamically linked file which does not + itself contain PIC code has a four byte global offset table. */ + unsigned long ld_got; + + /* The address of the procedure linkage table. This appears to be a + virtual address, not a file offset. + + On a SPARC, the table is composed of 12 byte entries, each of + which consists of three instructions. The first entry is + sethi %hi(0),%g1 + jmp %g1 + nop + These instructions are changed by ld.so into a jump directly into + ld.so itself. Each subsequent entry is + save %sp, -96, %sp + call
+ + The reloc_number is the number of the reloc to use to resolve + this entry. The reloc will be a JMP_SLOT reloc against some + symbol that is not defined in this object file but should be + defined in a shared object (if it is not, ld.so will report a + runtime error and exit). The constant 0x010000000 turns the + reloc number into a sethi of %g0, which does nothing since %g0 is + hardwired to zero. + + When one of these entries is executed, it winds up calling into + ld.so. ld.so looks at the reloc number, available via the return + address, to determine which entry this is. It then looks at the + reloc and patches up the entry in the table into a sethi and jmp + to the real address followed by a nop. This means that the reloc + lookup only has to happen once, and it also means that the + relocation only needs to be done if the function is actually + called. The relocation is expensive because ld.so must look up + the symbol by name. + + The size of the procedure linkage table is given by the ld_plt_sz + field. */ + unsigned long ld_plt; + + /* The address of the relocs. These are in the same format as + ordinary relocs. Symbol index numbers refer to the symbols + pointed to by ld_stab. I think the only way to determine the + number of relocs is to assume that all the bytes from ld_rel to + ld_hash contain reloc entries. */ + unsigned long ld_rel; + + /* The address of a hash table of symbols. The hash table has + roughly the same number of entries as there are dynamic symbols; + I think the only way to get the exact size is to assume that + every byte from ld_hash to ld_stab is devoted to the hash table. + + Each entry in the hash table is eight bytes. The first four + bytes are a symbol index into the dynamic symbols. The second + four bytes are the index of the next hash table entry in the + bucket. The ld_buckets field gives the number of buckets, say B. + The first B entries in the hash table each start a bucket which + is chained through the second four bytes of each entry. A value + of zero ends the chain. + + The hash function is simply + h = 0; + while (*string != '\0') + h = (h << 1) + *string++; + h &= 0x7fffffff; + + To look up a symbol, compute the hash value of the name. Take + the modulos of hash value and the number of buckets. Start at + that entry in the hash table. See if the symbol (from the first + four bytes of the hash table entry) has the name you are looking + for. If not, use the chain field (the second four bytes of the + hash table entry) to move on to the next entry in this bucket. + If the chain field is zero you have reached the end of the + bucket, and the symbol is not in the hash table. */ + unsigned long ld_hash; + + /* The address of the symbol table. This is a list of + external_nlist structures. The string indices are relative to + the ld_symbols field. I think the only way to determine the + number of symbols is to assume that all the bytes between ld_stab + and ld_symbols are external_nlist structures. */ + unsigned long ld_stab; + + /* I don't know what this is for. It seems to always be zero. */ + unsigned long ld_stab_hash; + + /* The number of buckets in the hash table. */ + unsigned long ld_buckets; + + /* The address of the symbol string table. The first string in this + string table need not be the empty string. */ + unsigned long ld_symbols; + + /* The size in bytes of the symbol string table. */ + unsigned long ld_symb_size; + + /* The size in bytes of the text segment. */ + unsigned long ld_text; + + /* The size in bytes of the procedure linkage table. */ + unsigned long ld_plt_sz; +}; + +/* The external form of the structure. */ + +struct external_sun4_dynamic_link +{ + bfd_byte ld_loaded[4]; + bfd_byte ld_need[4]; + bfd_byte ld_rules[4]; + bfd_byte ld_got[4]; + bfd_byte ld_plt[4]; + bfd_byte ld_rel[4]; + bfd_byte ld_hash[4]; + bfd_byte ld_stab[4]; + bfd_byte ld_stab_hash[4]; + bfd_byte ld_buckets[4]; + bfd_byte ld_symbols[4]; + bfd_byte ld_symb_size[4]; + bfd_byte ld_text[4]; + bfd_byte ld_plt_sz[4]; +}; diff --git a/support/sdbinutils/include/bfdlink.h b/support/sdbinutils/include/bfdlink.h new file mode 100644 index 0000000..5d637ac --- /dev/null +++ b/support/sdbinutils/include/bfdlink.h @@ -0,0 +1,944 @@ +/* bfdlink.h -- header file for BFD link routines + Copyright (C) 1993-2018 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; + + /* 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 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 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; + + /* 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 diff --git a/support/sdbinutils/include/binary-io.h b/support/sdbinutils/include/binary-io.h new file mode 100644 index 0000000..779028b --- /dev/null +++ b/support/sdbinutils/include/binary-io.h @@ -0,0 +1,62 @@ +/* Binary mode I/O. + Copyright (C) 2001-2018 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 _BINARY_H +#define _BINARY_H + +/* Include this header after and , because + systems that distinguish between text and binary I/O usually + define O_BINARY in , and the MSVC7 doesn't + like to be included after '#define fileno ...' + + We don't include here because not all systems have + that header. */ + +#if !defined O_BINARY && defined _O_BINARY + /* For MSC-compatible compilers. */ +# define O_BINARY _O_BINARY +# define O_TEXT _O_TEXT +#endif +#ifdef __BEOS__ + /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ +# undef O_BINARY +# undef O_TEXT +#endif +#if O_BINARY +# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__ +# include /* declares setmode() */ +# else +# define setmode _setmode +# undef fileno +# define fileno _fileno +# endif +# ifdef __DJGPP__ +# include /* declares isatty() */ +# /* Avoid putting stdin/stdout in binary mode if it is connected to the +# console, because that would make it impossible for the user to +# interrupt the program through Ctrl-C or Ctrl-Break. */ +# define SET_BINARY(fd) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 0) +# else +# define SET_BINARY(fd) setmode (fd, O_BINARY) +# endif +#else + /* On reasonable systems, binary I/O is the default. */ +# undef O_BINARY +# define O_BINARY 0 +# define SET_BINARY(fd) /* nothing */ +#endif + +#endif /* _BINARY_H */ diff --git a/support/sdbinutils/include/bout.h b/support/sdbinutils/include/bout.h new file mode 100644 index 0000000..3a95f77 --- /dev/null +++ b/support/sdbinutils/include/bout.h @@ -0,0 +1,192 @@ +/* This file is a modified version of 'a.out.h'. It is to be used in all + GNU tools modified to support the i80960 (or tools that operate on + object files created by such tools). + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* All i80960 development is done in a CROSS-DEVELOPMENT environment. I.e., + object code is generated on, and executed under the direction of a symbolic + debugger running on, a host system. We do not want to be subject to the + vagaries of which host it is or whether it supports COFF or a.out format, + or anything else. We DO want to: + + o always generate the same format object files, regardless of host. + + o have an 'a.out' header that we can modify for our own purposes + (the 80960 is typically an embedded processor and may require + enhanced linker support that the normal a.out.h header can't + accommodate). + + As for byte-ordering, the following rules apply: + + o Text and data that is actually downloaded to the target is always + in i80960 (little-endian) order. + + o All other numbers (in the header, symbols, relocation directives) + are in host byte-order: object files CANNOT be lifted from a + little-end host and used on a big-endian (or vice versa) without + modification. + ==> THIS IS NO LONGER TRUE USING BFD. WE CAN GENERATE ANY BYTE ORDER + FOR THE HEADER, AND READ ANY BYTE ORDER. PREFERENCE WOULD BE TO + USE LITTLE-ENDIAN BYTE ORDER THROUGHOUT, REGARDLESS OF HOST. <== + + o The downloader ('comm960') takes care to generate a pseudo-header + with correct (i80960) byte-ordering before shipping text and data + off to the NINDY monitor in the target systems. Symbols and + relocation info are never sent to the target. */ + +#define BMAGIC 0415 +/* We don't accept the following (see N_BADMAG macro). + They're just here so GNU code will compile. */ +#define OMAGIC 0407 /* old impure format */ +#define NMAGIC 0410 /* read-only text */ +#define ZMAGIC 0413 /* demand load format */ + +/* FILE HEADER + All 'lengths' are given as a number of bytes. + All 'alignments' are for relinkable files only; an alignment of + 'n' indicates the corresponding segment must begin at an + address that is a multiple of (2**n). */ +struct external_exec + { + /* Standard stuff */ + unsigned char e_info[4]; /* Identifies this as a b.out file */ + unsigned char e_text[4]; /* Length of text */ + unsigned char e_data[4]; /* Length of data */ + unsigned char e_bss[4]; /* Length of uninitialized data area */ + unsigned char e_syms[4]; /* Length of symbol table */ + unsigned char e_entry[4]; /* Runtime start address */ + unsigned char e_trsize[4]; /* Length of text relocation info */ + unsigned char e_drsize[4]; /* Length of data relocation info */ + + /* Added for i960 */ + unsigned char e_tload[4]; /* Text runtime load address */ + unsigned char e_dload[4]; /* Data runtime load address */ + unsigned char e_talign[1]; /* Alignment of text segment */ + unsigned char e_dalign[1]; /* Alignment of data segment */ + unsigned char e_balign[1]; /* Alignment of bss segment */ + unsigned char e_relaxable[1];/* Assembled with enough info to allow linker to relax */ + }; + +#define EXEC_BYTES_SIZE (sizeof (struct external_exec)) + +/* These macros use the a_xxx field names, since they operate on the exec + structure after it's been byte-swapped and realigned on the host machine. */ +#define N_BADMAG(x) (((x)->a_info)!=BMAGIC) +#define N_TXTOFF(x) EXEC_BYTES_SIZE +#define N_DATOFF(x) ( N_TXTOFF(x) + (x)->a_text ) +#define N_TROFF(x) ( N_DATOFF(x) + (x)->a_data ) +#define N_TRELOFF N_TROFF +#define N_DROFF(x) ( N_TROFF(x) + (x)->a_trsize ) +#define N_DRELOFF N_DROFF +#define N_SYMOFF(x) ( N_DROFF(x) + (x)->a_drsize ) +#define N_STROFF(x) ( N_SYMOFF(x) + (x)->a_syms ) +#define N_DATADDR(x) ( (x)->a_dload ) + +/* Address of text segment in memory after it is loaded. */ +#if !defined (N_TXTADDR) +#define N_TXTADDR(x) 0 +#endif + +/* A single entry in the symbol table. */ +struct nlist + { + union + { + char* n_name; + struct nlist * n_next; + long n_strx; /* Index into string table */ + } n_un; + + unsigned char n_type; /* See below */ + char n_other; /* Used in i80960 support -- see below */ + short n_desc; + unsigned long n_value; + }; + + +/* Legal values of n_type. */ +#define N_UNDF 0 /* Undefined symbol */ +#define N_ABS 2 /* Absolute symbol */ +#define N_TEXT 4 /* Text symbol */ +#define N_DATA 6 /* Data symbol */ +#define N_BSS 8 /* BSS symbol */ +#define N_FN 31 /* Filename symbol */ + +#define N_EXT 1 /* External symbol (OR'd in with one of above) */ +#define N_TYPE 036 /* Mask for all the type bits */ +#define N_STAB 0340 /* Mask for all bits used for SDB entries */ + +/* MEANING OF 'n_other' + + If non-zero, the 'n_other' fields indicates either a leaf procedure or + a system procedure, as follows: + + 1 <= n_other <= 32 : + The symbol is the entry point to a system procedure. + 'n_value' is the address of the entry, as for any other + procedure. The system procedure number (which can be used in + a 'calls' instruction) is (n_other-1). These entries come from + '.sysproc' directives. + + n_other == N_CALLNAME + the symbol is the 'call' entry point to a leaf procedure. + The *next* symbol in the symbol table must be the corresponding + 'bal' entry point to the procedure (see following). These + entries come from '.leafproc' directives in which two different + symbols are specified (the first one is represented here). + + + n_other == N_BALNAME + the symbol is the 'bal' entry point to a leaf procedure. + These entries result from '.leafproc' directives in which only + one symbol is specified, or in which the same symbol is + specified twice. + + Note that an N_CALLNAME entry *must* have a corresponding N_BALNAME entry, + but not every N_BALNAME entry must have an N_CALLNAME entry. */ +#define N_CALLNAME ((char)-1) +#define N_BALNAME ((char)-2) +#define IS_CALLNAME(x) (N_CALLNAME == (x)) +#define IS_BALNAME(x) (N_BALNAME == (x)) +#define IS_OTHER(x) ((x)>0 && (x) <=32) + +#define b_out_relocation_info relocation_info +struct relocation_info + { + int r_address; /* File address of item to be relocated. */ + unsigned +#define r_index r_symbolnum + r_symbolnum:24, /* Index of symbol on which relocation is based, + if r_extern is set. Otherwise set to + either N_TEXT, N_DATA, or N_BSS to + indicate section on which relocation is + based. */ + r_pcrel:1, /* 1 => relocate PC-relative; else absolute + On i960, pc-relative implies 24-bit + address, absolute implies 32-bit. */ + r_length:2, /* Number of bytes to relocate: + 0 => 1 byte + 1 => 2 bytes -- used for 13 bit pcrel + 2 => 4 bytes. */ + r_extern:1, + r_bsr:1, /* Something for the GNU NS32K assembler. */ + r_disp:1, /* Something for the GNU NS32K assembler. */ + r_callj:1, /* 1 if relocation target is an i960 'callj'. */ + r_relaxable:1; /* 1 if enough info is left to relax the data. */ +}; diff --git a/support/sdbinutils/include/cgen/ChangeLog-0915 b/support/sdbinutils/include/cgen/ChangeLog-0915 new file mode 100644 index 0000000..d8dbb70 --- /dev/null +++ b/support/sdbinutils/include/cgen/ChangeLog-0915 @@ -0,0 +1,44 @@ +2015-01-01 Alan Modra + + Update year range in copyright notice of all files. + +2014-03-05 Alan Modra + + Update copyright years. + +2014-01-06 Tom Tromey + + * bitset.h: Remove uses of PARAMS. + +2013-07-18 Andrew Neitsch + + PR binutils/15728 + * basic-ops.h: (SUBWORDSIQI) Make declaration static. + * (SUBWORDSIHI): Likewise. + * (SUBWORDDIQI): Likewise. + * (SUBWORDDIHI): Likewise. + * (SUBWORDDISI): Likewise. + +2010-01-05 Doug Evans + + * basic-modes.h (MAKEDI): New macro. + +2009-10-23 Doug Evans + + * basic-modes.h: New file. Moved here from opcodes/cgen-types.h. + * basic-ops.h: New file. Moved here from opcodes/cgen-ops.h. + * bitset.h: New file. Moved here from ../opcode/cgen-bitset.h. + Update license to GPL v3. + +Copyright (C) 2009-2015 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/support/sdbinutils/include/cgen/basic-modes.h b/support/sdbinutils/include/cgen/basic-modes.h new file mode 100644 index 0000000..21de95b --- /dev/null +++ b/support/sdbinutils/include/cgen/basic-modes.h @@ -0,0 +1,52 @@ +/* Basic CGEN modes. + Copyright (C) 2005-2018 Free Software Foundation, Inc. + Contributed by Red Hat. + + This file is part of the GNU opcodes library. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + It is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING3. If not, write to the + Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#ifndef CGEN_BASIC_MODES_H +#define CGEN_BASIC_MODES_H + +/* This file doesn't contain all modes, + just the basic/portable ones. + It also provides access to stdint.h (*1) so the includer doesn't have + to deal with the portability issues. + (*1): To the extent that bfd_stdint.h does for now. */ + +/* IWBN to avoid unnecessary dependencies on bfd-anything. */ +#include "bfd_stdint.h" + +typedef int8_t QI; +typedef uint8_t UQI; + +typedef int16_t HI; +typedef uint16_t UHI; + +typedef int32_t SI; +typedef uint32_t USI; + +typedef int64_t DI; +typedef uint64_t UDI; + +typedef int INT; +typedef unsigned int UINT; + +/* Cover macro to create a 64-bit integer. */ +#define MAKEDI(hi, lo) ((((DI) (SI) (hi)) << 32) | ((UDI) (USI) (lo))) + +#endif /* CGEN_BASIC_MODES_H */ diff --git a/support/sdbinutils/include/cgen/basic-ops.h b/support/sdbinutils/include/cgen/basic-ops.h new file mode 100644 index 0000000..b756e75 --- /dev/null +++ b/support/sdbinutils/include/cgen/basic-ops.h @@ -0,0 +1,347 @@ +/* Basic semantics ops support for CGEN. + Copyright (C) 2005-2018 Free Software Foundation, Inc. + Contributed by Red Hat. + + This file is part of the GNU opcodes library. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + It is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING3. If not, write to the + Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#ifndef CGEN_BASIC_OPS_H +#define CGEN_BASIC_OPS_H + +#include + +#if defined (__GNUC__) && ! defined (SEMOPS_DEFINE_INLINE) +#define SEMOPS_DEFINE_INLINE +#define SEMOPS_INLINE extern inline +#else +#define SEMOPS_INLINE +#endif + +/* These don't really have a mode. */ +#define ANDIF(x, y) ((x) && (y)) +#define ORIF(x, y) ((x) || (y)) + +#define SUBBI(x, y) ((x) - (y)) +#define ANDBI(x, y) ((x) & (y)) +#define ORBI(x, y) ((x) | (y)) +#define XORBI(x, y) ((x) ^ (y)) +#define NEGBI(x) (- (x)) +#define NOTBI(x) (! (BI) (x)) +#define INVBI(x) (~ (x)) +#define EQBI(x, y) ((BI) (x) == (BI) (y)) +#define NEBI(x, y) ((BI) (x) != (BI) (y)) +#define LTBI(x, y) ((BI) (x) < (BI) (y)) +#define LEBI(x, y) ((BI) (x) <= (BI) (y)) +#define GTBI(x, y) ((BI) (x) > (BI) (y)) +#define GEBI(x, y) ((BI) (x) >= (BI) (y)) +#define LTUBI(x, y) ((BI) (x) < (BI) (y)) +#define LEUBI(x, y) ((BI) (x) <= (BI) (y)) +#define GTUBI(x, y) ((BI) (x) > (BI) (y)) +#define GEUBI(x, y) ((BI) (x) >= (BI) (y)) + +#define ADDQI(x, y) ((x) + (y)) +#define SUBQI(x, y) ((x) - (y)) +#define MULQI(x, y) ((x) * (y)) +#define DIVQI(x, y) ((QI) (x) / (QI) (y)) +#define UDIVQI(x, y) ((UQI) (x) / (UQI) (y)) +#define MODQI(x, y) ((QI) (x) % (QI) (y)) +#define UMODQI(x, y) ((UQI) (x) % (UQI) (y)) +#define SRAQI(x, y) ((QI) (x) >> (y)) +#define SRLQI(x, y) ((UQI) (x) >> (y)) +#define SLLQI(x, y) ((UQI) (x) << (y)) +extern QI RORQI (QI, int); +extern QI ROLQI (QI, int); +#define ANDQI(x, y) ((x) & (y)) +#define ORQI(x, y) ((x) | (y)) +#define XORQI(x, y) ((x) ^ (y)) +#define NEGQI(x) (- (x)) +#define NOTQI(x) (! (QI) (x)) +#define INVQI(x) (~ (x)) +#define ABSQI(x) ((x) < 0 ? -(x) : (x)) +#define EQQI(x, y) ((QI) (x) == (QI) (y)) +#define NEQI(x, y) ((QI) (x) != (QI) (y)) +#define LTQI(x, y) ((QI) (x) < (QI) (y)) +#define LEQI(x, y) ((QI) (x) <= (QI) (y)) +#define GTQI(x, y) ((QI) (x) > (QI) (y)) +#define GEQI(x, y) ((QI) (x) >= (QI) (y)) +#define LTUQI(x, y) ((UQI) (x) < (UQI) (y)) +#define LEUQI(x, y) ((UQI) (x) <= (UQI) (y)) +#define GTUQI(x, y) ((UQI) (x) > (UQI) (y)) +#define GEUQI(x, y) ((UQI) (x) >= (UQI) (y)) + +#define ADDHI(x, y) ((x) + (y)) +#define SUBHI(x, y) ((x) - (y)) +#define MULHI(x, y) ((x) * (y)) +#define DIVHI(x, y) ((HI) (x) / (HI) (y)) +#define UDIVHI(x, y) ((UHI) (x) / (UHI) (y)) +#define MODHI(x, y) ((HI) (x) % (HI) (y)) +#define UMODHI(x, y) ((UHI) (x) % (UHI) (y)) +#define SRAHI(x, y) ((HI) (x) >> (y)) +#define SRLHI(x, y) ((UHI) (x) >> (y)) +#define SLLHI(x, y) ((UHI) (x) << (y)) +extern HI RORHI (HI, int); +extern HI ROLHI (HI, int); +#define ANDHI(x, y) ((x) & (y)) +#define ORHI(x, y) ((x) | (y)) +#define XORHI(x, y) ((x) ^ (y)) +#define NEGHI(x) (- (x)) +#define NOTHI(x) (! (HI) (x)) +#define INVHI(x) (~ (x)) +#define ABSHI(x) ((x) < 0 ? -(x) : (x)) +#define EQHI(x, y) ((HI) (x) == (HI) (y)) +#define NEHI(x, y) ((HI) (x) != (HI) (y)) +#define LTHI(x, y) ((HI) (x) < (HI) (y)) +#define LEHI(x, y) ((HI) (x) <= (HI) (y)) +#define GTHI(x, y) ((HI) (x) > (HI) (y)) +#define GEHI(x, y) ((HI) (x) >= (HI) (y)) +#define LTUHI(x, y) ((UHI) (x) < (UHI) (y)) +#define LEUHI(x, y) ((UHI) (x) <= (UHI) (y)) +#define GTUHI(x, y) ((UHI) (x) > (UHI) (y)) +#define GEUHI(x, y) ((UHI) (x) >= (UHI) (y)) + +#define ADDSI(x, y) ((x) + (y)) +#define SUBSI(x, y) ((x) - (y)) +#define MULSI(x, y) ((x) * (y)) +#define DIVSI(x, y) ((SI) (x) / (SI) (y)) +#define UDIVSI(x, y) ((USI) (x) / (USI) (y)) +#define MODSI(x, y) ((SI) (x) % (SI) (y)) +#define UMODSI(x, y) ((USI) (x) % (USI) (y)) +#define SRASI(x, y) ((SI) (x) >> (y)) +#define SRLSI(x, y) ((USI) (x) >> (y)) +#define SLLSI(x, y) ((USI) (x) << (y)) +extern SI RORSI (SI, int); +extern SI ROLSI (SI, int); +#define ANDSI(x, y) ((x) & (y)) +#define ORSI(x, y) ((x) | (y)) +#define XORSI(x, y) ((x) ^ (y)) +#define NEGSI(x) (- (x)) +#define NOTSI(x) (! (SI) (x)) +#define INVSI(x) (~ (x)) +#define ABSSI(x) ((x) < 0 ? -(x) : (x)) +#define EQSI(x, y) ((SI) (x) == (SI) (y)) +#define NESI(x, y) ((SI) (x) != (SI) (y)) +#define LTSI(x, y) ((SI) (x) < (SI) (y)) +#define LESI(x, y) ((SI) (x) <= (SI) (y)) +#define GTSI(x, y) ((SI) (x) > (SI) (y)) +#define GESI(x, y) ((SI) (x) >= (SI) (y)) +#define LTUSI(x, y) ((USI) (x) < (USI) (y)) +#define LEUSI(x, y) ((USI) (x) <= (USI) (y)) +#define GTUSI(x, y) ((USI) (x) > (USI) (y)) +#define GEUSI(x, y) ((USI) (x) >= (USI) (y)) + +#ifdef DI_FN_SUPPORT +extern DI ADDDI (DI, DI); +extern DI SUBDI (DI, DI); +extern DI MULDI (DI, DI); +extern DI DIVDI (DI, DI); +extern DI UDIVDI (DI, DI); +extern DI MODDI (DI, DI); +extern DI UMODDI (DI, DI); +extern DI SRADI (DI, int); +extern UDI SRLDI (UDI, int); +extern UDI SLLDI (UDI, int); +extern DI RORDI (DI, int); +extern DI ROLDI (DI, int); +extern DI ANDDI (DI, DI); +extern DI ORDI (DI, DI); +extern DI XORDI (DI, DI); +extern DI NEGDI (DI); +extern int NOTDI (DI); +extern DI INVDI (DI); +extern int EQDI (DI, DI); +extern int NEDI (DI, DI); +extern int LTDI (DI, DI); +extern int LEDI (DI, DI); +extern int GTDI (DI, DI); +extern int GEDI (DI, DI); +extern int LTUDI (UDI, UDI); +extern int LEUDI (UDI, UDI); +extern int GTUDI (UDI, UDI); +extern int GEUDI (UDI, UDI); +#else /* ! DI_FN_SUPPORT */ +#define ADDDI(x, y) ((x) + (y)) +#define SUBDI(x, y) ((x) - (y)) +#define MULDI(x, y) ((x) * (y)) +#define DIVDI(x, y) ((DI) (x) / (DI) (y)) +#define UDIVDI(x, y) ((UDI) (x) / (UDI) (y)) +#define MODDI(x, y) ((DI) (x) % (DI) (y)) +#define UMODDI(x, y) ((UDI) (x) % (UDI) (y)) +#define SRADI(x, y) ((DI) (x) >> (y)) +#define SRLDI(x, y) ((UDI) (x) >> (y)) +#define SLLDI(x, y) ((UDI) (x) << (y)) +extern DI RORDI (DI, int); +extern DI ROLDI (DI, int); +#define ANDDI(x, y) ((x) & (y)) +#define ORDI(x, y) ((x) | (y)) +#define XORDI(x, y) ((x) ^ (y)) +#define NEGDI(x) (- (x)) +#define NOTDI(x) (! (DI) (x)) +#define INVDI(x) (~ (x)) +#define ABSDI(x) ((x) < 0 ? -(x) : (x)) +#define EQDI(x, y) ((DI) (x) == (DI) (y)) +#define NEDI(x, y) ((DI) (x) != (DI) (y)) +#define LTDI(x, y) ((DI) (x) < (DI) (y)) +#define LEDI(x, y) ((DI) (x) <= (DI) (y)) +#define GTDI(x, y) ((DI) (x) > (DI) (y)) +#define GEDI(x, y) ((DI) (x) >= (DI) (y)) +#define LTUDI(x, y) ((UDI) (x) < (UDI) (y)) +#define LEUDI(x, y) ((UDI) (x) <= (UDI) (y)) +#define GTUDI(x, y) ((UDI) (x) > (UDI) (y)) +#define GEUDI(x, y) ((UDI) (x) >= (UDI) (y)) +#endif /* DI_FN_SUPPORT */ + +#define EXTBIQI(x) ((QI) (BI) (x)) +#define EXTBIHI(x) ((HI) (BI) (x)) +#define EXTBISI(x) ((SI) (BI) (x)) +#if defined (DI_FN_SUPPORT) +extern DI EXTBIDI (BI); +#else +#define EXTBIDI(x) ((DI) (BI) (x)) +#endif +#define EXTQIHI(x) ((HI) (QI) (x)) +#define EXTQISI(x) ((SI) (QI) (x)) +#if defined (DI_FN_SUPPORT) +extern DI EXTQIDI (QI); +#else +#define EXTQIDI(x) ((DI) (QI) (x)) +#endif +#define EXTHIHI(x) ((HI) (HI) (x)) +#define EXTHISI(x) ((SI) (HI) (x)) +#define EXTSISI(x) ((SI) (SI) (x)) +#if defined (DI_FN_SUPPORT) +extern DI EXTHIDI (HI); +#else +#define EXTHIDI(x) ((DI) (HI) (x)) +#endif +#if defined (DI_FN_SUPPORT) +extern DI EXTSIDI (SI); +#else +#define EXTSIDI(x) ((DI) (SI) (x)) +#endif + +#define ZEXTBIQI(x) ((QI) (BI) (x)) +#define ZEXTBIHI(x) ((HI) (BI) (x)) +#define ZEXTBISI(x) ((SI) (BI) (x)) +#if defined (DI_FN_SUPPORT) +extern DI ZEXTBIDI (BI); +#else +#define ZEXTBIDI(x) ((DI) (BI) (x)) +#endif +#define ZEXTQIHI(x) ((HI) (UQI) (x)) +#define ZEXTQISI(x) ((SI) (UQI) (x)) +#if defined (DI_FN_SUPPORT) +extern DI ZEXTQIDI (QI); +#else +#define ZEXTQIDI(x) ((DI) (UQI) (x)) +#endif +#define ZEXTHISI(x) ((SI) (UHI) (x)) +#define ZEXTHIHI(x) ((HI) (UHI) (x)) +#define ZEXTSISI(x) ((SI) (USI) (x)) +#if defined (DI_FN_SUPPORT) +extern DI ZEXTHIDI (HI); +#else +#define ZEXTHIDI(x) ((DI) (UHI) (x)) +#endif +#if defined (DI_FN_SUPPORT) +extern DI ZEXTSIDI (SI); +#else +#define ZEXTSIDI(x) ((DI) (USI) (x)) +#endif + +#define TRUNCQIBI(x) ((BI) (QI) (x)) +#define TRUNCHIBI(x) ((BI) (HI) (x)) +#define TRUNCHIQI(x) ((QI) (HI) (x)) +#define TRUNCSIBI(x) ((BI) (SI) (x)) +#define TRUNCSIQI(x) ((QI) (SI) (x)) +#define TRUNCSIHI(x) ((HI) (SI) (x)) +#define TRUNCSISI(x) ((SI) (SI) (x)) +#if defined (DI_FN_SUPPORT) +extern BI TRUNCDIBI (DI); +#else +#define TRUNCDIBI(x) ((BI) (DI) (x)) +#endif +#if defined (DI_FN_SUPPORT) +extern QI TRUNCDIQI (DI); +#else +#define TRUNCDIQI(x) ((QI) (DI) (x)) +#endif +#if defined (DI_FN_SUPPORT) +extern HI TRUNCDIHI (DI); +#else +#define TRUNCDIHI(x) ((HI) (DI) (x)) +#endif +#if defined (DI_FN_SUPPORT) +extern SI TRUNCDISI (DI); +#else +#define TRUNCDISI(x) ((SI) (DI) (x)) +#endif + +/* Composing/decomposing the various types. + Word ordering is endian-independent. Words are specified most to least + significant and word number 0 is the most significant word. + ??? May also wish an endian-dependent version. Later. */ + +static QI SUBWORDSIQI (SI, int); +static HI SUBWORDSIHI (SI, int); +static QI SUBWORDDIQI (DI, int); +static HI SUBWORDDIHI (DI, int); +static SI SUBWORDDISI (DI, int); + +#ifdef SEMOPS_DEFINE_INLINE + +SEMOPS_INLINE QI +SUBWORDSIQI (SI in, int byte) +{ + assert (byte >= 0 && byte <= 3); + return (UQI) (in >> (8 * (3 - byte))) & 0xFF; +} + +SEMOPS_INLINE HI +SUBWORDSIHI (SI in, int word) +{ + if (word == 0) + return (USI) in >> 16; + else + return in; +} + +SEMOPS_INLINE QI +SUBWORDDIQI (DI in, int byte) +{ + assert (byte >= 0 && byte <= 7); + return (UQI) (in >> (8 * (7 - byte))) & 0xFF; +} + +SEMOPS_INLINE HI +SUBWORDDIHI (DI in, int word) +{ + assert (word >= 0 && word <= 3); + return (UHI) (in >> (16 * (3 - word))) & 0xFFFF; +} + +SEMOPS_INLINE SI +SUBWORDDISI (DI in, int word) +{ + if (word == 0) + return (UDI) in >> 32; + else + return in; +} + +#endif /* SUBWORD,JOIN */ + +#endif /* CGEN_BASIC_OPS_H */ diff --git a/support/sdbinutils/include/cgen/bitset.h b/support/sdbinutils/include/cgen/bitset.h new file mode 100644 index 0000000..c95766b --- /dev/null +++ b/support/sdbinutils/include/cgen/bitset.h @@ -0,0 +1,56 @@ +/* Header file the type CGEN_BITSET. + Copyright (C) 2002-2018 Free Software Foundation, Inc. + + This file is part of the GNU opcodes library. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + It is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING3. If not, write to the + Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#ifndef CGEN_BITSET_H +#define CGEN_BITSET_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* A bitmask represented as a string. + Each member of the set is represented as a bit + in the string. Bytes are indexed from left to right in the string and + bits from most significant to least within each byte. + + For example, the bit representing member number 6 is (set->bits[0] & 0x02). +*/ +typedef struct cgen_bitset +{ + unsigned length; + char *bits; +} CGEN_BITSET; + +extern CGEN_BITSET *cgen_bitset_create (unsigned); +extern void cgen_bitset_init (CGEN_BITSET *, unsigned); +extern void cgen_bitset_clear (CGEN_BITSET *); +extern void cgen_bitset_add (CGEN_BITSET *, unsigned); +extern void cgen_bitset_set (CGEN_BITSET *, unsigned); +extern int cgen_bitset_compare (CGEN_BITSET *, CGEN_BITSET *); +extern void cgen_bitset_union (CGEN_BITSET *, CGEN_BITSET *, CGEN_BITSET *); +extern int cgen_bitset_intersect_p (CGEN_BITSET *, CGEN_BITSET *); +extern int cgen_bitset_contains (CGEN_BITSET *, unsigned); +extern CGEN_BITSET *cgen_bitset_copy (CGEN_BITSET *); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif diff --git a/support/sdbinutils/include/coff/ChangeLog-0415 b/support/sdbinutils/include/coff/ChangeLog-0415 new file mode 100644 index 0000000..232e4fc --- /dev/null +++ b/support/sdbinutils/include/coff/ChangeLog-0415 @@ -0,0 +1,419 @@ +2015-01-06 Alan Modra + + PR binutils/17754 + * internal.h (internal_auxent): Increase size of x_fname field to + 20 to allow for PE format's longer file names. + +2015-01-01 Alan Modra + + Update year range in copyright notice of all files. + +2014-08-20 Daniel Micay + + * pe.h: Add HIGH_ENTROPY_VA flag + +2014-04-22 Christian Svensson + + * or32.h: Delete. + +2014-04-08 Jon TURNEY + + * pe.h (external_IMAGE_DEBUG_DIRECTORY, _CV_INFO_PDB70) + (_CV_INFO_PDB20): Add structures and constants for debug directory + and codeview records. + * internal.h (internal_IMAGE_DEBUG_DIRECTORY, CODEVIEW_INFO): + Add structures and constants for internal representation of debug + directory and codeview records. + +2014-03-13 Tristan Gingold + + * pe.h (struct external_ANON_OBJECT_HEADER_BIGOBJ): Declare. + (FILHSZ_BIGOBJ): Define. + (struct external_SYMBOL_EX): Declare. + (SYMENT_BIGOBJ, SYMESZ_BIGOBJ): Define. + (union external_AUX_SYMBOL_EX): Declare. + (AUXENT_BIGOBJ, AUXESZ_BIGOBJ): Define. + * internal.h (struct internal_filehdr): Change type + of f_nscns. + +2014-03-05 Alan Modra + + Update copyright years. + +2013-12-06 Tristan Gingold + + * pe.h (UWOP_EPILOG, UWOP_PARE): Define. + +2013-07-10 Tristan Gingold + + * rs6000.h (external_core_dumpx): New structure. + (external_ld_info32): Ditto. + +2013-07-02 Tristan Gingold + + * internal.h (C_STTLS, C_GTLS): Define. + * xcoff.h (XMC_TL, XMC_TU, XMC_TE): Define. + +2013-02-04 Alan Modra + + * ti.h (SWAP_OUT_RELOC_EXTRA): Define. + +2013-01-02 Martin Storsjo + + * arm.h (ARMV7PEMAGIC): Define. + (ARMBADMAG): Update. + +2011-06-02 Nick Clifton + + * i860.h: Fix spelling mistake in comment. + +2011-05-04 Tristan Gingold + + * rs6000.h (union external_auxent): Add x_ftype field. + * rs6k64.h: (struct external_auxent): Remap x_file field. + +2011-05-04 Tristan Gingold + + * rs6000.h (struct external_exceptab): New struct. + (EXCEPTSZ): New macro. + * rs6k64.h: (struct external_exceptab): New struct. + (EXCEPTSZ): New macro. + +2011-05-03 Tristan Gingold + + * rs6000.h (struct external_ldsym): Use E_SYMNMLEN instead of + SYMNMLEN. + +2011-04-27 Tristan Gingold + + * xcoff.h (F_FDPR_PROF, F_FDPR_OPTI, F_DSA, F_VARPG) + (STYP_DWARF, SSUBTYP_DWINFO) + (SSUBTYP_DWLINE, SSUBTYP_DWPBNMS, SSUBTYP_DWPBTYP) + (SSUBTYP_DWARNGE, SSUBTYP_DWABREV, SSUBTYP_DWSTR) + (SSUBTYP_DWRNGES, STYP_TDATA, STYP_TBSS, R_TLS, R_TLS_IE) + (R_TLS_LD, R_TLS_LE, R_TLSM, R_TLSML, R_TOCU, R_TOCL, C_DWARF): + New macros. + +2011-03-31 Tristan Gingold + + * internal.h (C_NULL_VALUE): Define. + +2010-06-29 Alan Modra + + * maxq.h: Delete file. + +2010-04-15 Nick Clifton + + * alpha.h: Update copyright notice to use GPLv3. + * apollo.h: Likewise. + * arm.h: Likewise. + * aux-coff.h: Likewise. + * ecoff.h: Likewise. + * external.h: Likewise. + * go32exe.h: Likewise. + * h8300.h: Likewise. + * h8500.h: Likewise. + * i386.h: Likewise. + * i860.h: Likewise. + * i960.h: Likewise. + * ia64.h: Likewise. + * internal.h: Likewise. + * m68k.h: Likewise. + * m88k.h: Likewise. + * maxq.h: Likewise. + * mcore.h: Likewise. + * mips.h: Likewise. + * mipspe.h: Likewise. + * or32.h: Likewise. + * pe.h: Likewise. + * powerpc.h: Likewise. + * rs6000.h: Likewise. + * rs6k64.h: Likewise. + * sh.h: Likewise. + * sparc.h: Likewise. + * ti.h: Likewise. + * tic30.h: Likewise. + * tic4x.h: Likewise. + * tic54x.h: Likewise. + * tic80.h: Likewise. + * w65.h: Likewise. + * we32k.h: Likewise. + * x86_64.h: Likewise. + * xcoff.h: Likewise. + * z80.h: Likewise. + * z8k.h: Likewise. + +2009-12-02 Jerker Bäck + + PR binutils/11017 + * i386lh (COFF_PAGE_SIZE): Define. + * x86_64.h (COFF_PAGE_SIZE): Define. + +2009-10-17 Arnold Metselaar + + * z80.h: Store alignment requirement in section header, to allow + ld to preserve alignment. Some code was copied from ti.h. + +2009-09-05 Martin Thuresson + + * ti.h (GET_LNSZ_SIZE, PUT_LNSZ_SIZE): Updated name of class + variable to in_class to match changes in function that use this + macro. + +2009-08-10 Jan Kratochvil + + Fix references past allocated memory for i386-*-go32. + * ti.h (COFF_ADJUST_FILEHDR_IN_POST, COFF_ADJUST_FILEHDR_OUT_POST): + Reference F_TARGET_ID only when !COFF0_P. + +2009-08-10 Jan Kratochvil + + Stop using bfd_usrdata in libbfd. + * go32exe.h (struct external_filehdr_go32_exe , FILHSZ): Replace + STUBSIZE by GO32_STUBSIZE. + (STUBSIZE): Move the definition ... + * internal.h (GO32_STUBSIZE): ... here and rename it. + (struct internal_filehdr , F_GO32STUB): New. + +2009-06-03 Ulrich Weigand + + * symconst.h (btLong64, btULong64, btLongLong64, btULongLong64, + btAdr64, btInt64, btUInt64): New defines. + +2009-04-21 Kai Tietz + + * pe.h (pex64_runtime_function): New structure. + (external_pex64_runtime_function): Likewise. + (pex64_unwind_code): Likewise. + (external_pex64_unwind_code): Likewise. + (pex64_unwind_info): Likewise. + (external_pex64_unwind_info): Likewise. + (external_pex64_scope): Likewise. + (pex64_scope): Likewise. + (pex64_scope_entry): Likewise. + (external_pex64_scope_entry): Likewise. + (PEX64_IS_RUNTIME_FUNCTION_CHAINED): New macro. + (PEX64_GET_UNWINDDATA_UNIFIED_RVA): Likewise. + (PEX64_UNWCODE_CODE): Likewise. + (PEX64_UNWCODE_INFO): Likewise. + (UWOP_...): Add defines for unwind code. + (UNW_FLAG_...): Add defined for unwind info flags. + (PEX64_SCOPE_ENTRY_SIZE): New macro. + (PEX64_UWI_VERSION): Likewise. + (PEX64_UWI_FLAGS): Likewise. + (PEX64_UWI_FRAMEREG): Likewise. + (PEX64_UWI_FRAMEOFF): Likewise. + (PEX64_UWI_SIZEOF_UWCODE_ARRAY): Likewise. + (PEX64_OFFSET_TO_UNWIND_CODE): Likewise. + (PEX64_OFFSET_TO_HANDLER_RVA): Likewise. + (PEX64_OFFSET_TO_SCOPE_COUNT): Likewise. + (PEX64_SCOPE_ENTRY): Likewise. + +2009-04-17 H.J. Lu + + * pe.h (IMAGE_SUBSYSTEM_EFI_ROM): Renamed to ... + (IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER): This. + +2009-04-01 Richard Sandiford + + * xcoff.h (xcoff_link_hash_table): Move to bfd/xcofflink.c. + +2009-03-14 Richard Sandiford + + * xcoff.h (XCOFF_EXPALL, XCOFF_EXPFULL): New flags. + (xcoff_loader_info): Add auto_export_flags. + +2009-03-14 Richard Sandiford + + * internal.h (C_AIX_WEAKEXT): New macro. + (C_WEAKEXT): Use the GNU definition in the generic part of the file, + and conditionally reset it to C_AIX_WEAKEXT in the XCOFF part of + the file. + (CSECT_SYM_P): New macro. + * xcoff.h (L_WEAK): Define. + (EXTERN_SYM_P): New macro. + +2009-03-14 Richard Sandiford + + * xcoff.h (XCOFF_ALLOCATED): New flag. + +2009-03-14 Richard Sandiford + + * xcoff.h (XCOFF_CALLED, XCOFF_IMPORT): Update comments. + (XCOFF_WAS_UNDEFINED): New flag. + (xcoff_link_hash_table): Add an "rtld" field. + +2009-03-14 Dave Korn + + * internal.h (struct internal_extra_pe_aouthdr): Correct type + of DllCharacteristics flags field to unsigned. + * pe.h (IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, + IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, + IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, + IMAGE_DLLCHARACTERISTICS_NO_ISOLATION, + IMAGE_DLLCHARACTERISTICS_NO_SEH, + IMAGE_DLLCHARACTERISTICS_NO_BIND, + IMAGE_DLLCHARACTERISTICS_WDM_DRIVER, + IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE): New macros to + define flag bit values for DllCharacteristics field of PEAOUTHDR, + PEPAOUTHDR. + +2008-12-23 Johan Olmutz Nielsen + + * ti.h (COFF_ADJUST_SCNHDR_OUT_PRE): Define. + +2008-06-17 Nick Clifton + + * ti.h (GET_SCNHDR_NLNNO): Provide an alternative version of this + macro which does not trigger an array bounds warning in gcc. + (PUT_SCNHDR_NLNNO): Likewise. + (GET_SCNHDR_FLAGS): Likewise. + (PUT_SCNHDR_FLAGS): Likewise. + (GET_SCNHDR_PAGE): Likewise. + (PUT_SCNHDR_PAGE): Likewise. + +2007-11-05 Danny Smith + + * pe.h (COFF_ENCODE_ALIGNMENT) Define. + +2007-08-02 H.J. Lu + + * pe.h (IMAGE_SCN_ALIGN_POWER_BIT_POS): New. + (IMAGE_SCN_ALIGN_POWER_BIT_MASK): Likewise. + (IMAGE_SCN_ALIGN_POWER_NUM): Likewise. + (IMAGE_SCN_ALIGN_POWER_CONST): Likewise. + (IMAGE_SCN_ALIGN_128BYTES): Likewise. + (IMAGE_SCN_ALIGN_256BYTES): Likewise. + (IMAGE_SCN_ALIGN_512BYTES): Likewise. + (IMAGE_SCN_ALIGN_1024BYTES): Likewise. + (IMAGE_SCN_ALIGN_2048BYTES): Likewise. + (IMAGE_SCN_ALIGN_4096BYTES): Likewise. + (IMAGE_SCN_ALIGN_8192BYTES): Likewise. + (IMAGE_SCN_ALIGN_1BYTES): Redefined with + IMAGE_SCN_ALIGN_POWER_CONST. + (IMAGE_SCN_ALIGN_2BYTES): Likewise. + (IMAGE_SCN_ALIGN_4BYTES): Likewise. + (IMAGE_SCN_ALIGN_8BYTES): Likewise. + (IMAGE_SCN_ALIGN_16BYTES): Likewise. + (IMAGE_SCN_ALIGN_32BYTES): Likewise. + (IMAGE_SCN_ALIGN_64BYTES): Likewise. + +2007-07-12 Kai Tietz + + * internal.h (struct internal_syment): Use bfd_hostptr_t for + _n_zeroes and _n_offset fields. + +2007-04-27 Alan Modra + + * rs6000.h: Write Mimi's name in ASCII. + +2007-03-19 H.J. Lu + + * internal.h (internal_extra_pe_aouthdr): Add Magic, + MajorLinkerVersion, MinorLinkerVersion, SizeOfCode, + SizeOfInitializedData, SizeOfUninitializedData, + AddressOfEntryPoint, BaseOfCode and BaseOfData. + +2006-12-05 Michael Tautschnig + Nick Clifton + + * external.h (struct external_aouthdr): Add ATTRIBUTE_PACKED. + (struct external_syment): Likewise. + (union external_auxent): Likewise. + +2006-11-14 Phil Lello + + * pe.h: Added defines for IMAGE_SUBSYSTEM_EFI_ROM and + IMAGE_SUBSYSTEM_XBOX. + * internal.h: Added defines for PE directory entry types. + NB: in internal.h because IMAGE_NUMBEROF_DIRECTORY_ENTRYIES is in + pe.h + +2006-09-20 Kai Tietz + + * external.h: Add proper external_aouthdr64 structure (without + data_start member). + (AOUTHDRSZ64): Set according structure size. + (AOUTHDR64): As typedef of external_aouthdr64 structure. + * internal.h: Add relocation identifiers for coff. + * pe.h: Add define IMAGE_FILE_MACHINE_AMD64 the coff signature. + (PEPAOUTHDR): Adjust structure to have proper size (using AOUTHDR64). + (PEPAOUTSZ): Calculated size of 240. + * x86_64.h: Coff information for x86_64 (AMD64). + +2006-02-05 Arnold Metselaar + + * internal.h: Add relocation number R_IMM24 for Z80. + +2005-10-25 Arnold Metselaar + + * internal.h: Add relocation number for Z80 + * z80.h: New file. + +2005-08-18 Alan Modra + + * a29k.h: Delete. + +2005-07-14 Daniel Marques + + * alpha.h (ALPHA_ECOFF_COMPRESSEDMAG): Define. + * ecoff.h (ALPHA_MAGIC_COMPRESSED): Define. + +2005-05-10 Nick Clifton + + * Update the address and phone number of the FSF organization in + the GPL notices in the following files: + a29k.h, alpha.h, apollo.h, arm.h, aux-coff.h, ecoff.h, external.h, + go32exe.h, h8300.h, h8500.h, i386.h, i860.h, i960.h, ia64.h, + internal.h, m68k.h, m88k.h, maxq.h, mcore.h, mips.h, mipspe.h, + or32.h, pe.h, powerpc.h, rs6k64.h, sh.h, sparc.h, ti.h, tic30.h, + tic4x.h, tic54x.h, tic80.h, w65.h, we32k.h, xcoff.h, z8k.h + +2005-02-21 Alan Modra + + * xcoff.h (struct xcoff_loader_info): Warning fix. + +2005-01-10 Inderpreet Singh + + * maxq.h (F_MAXQ10, F_MAXQ20): Define. + +2004-11-08 Inderpreet Singh + Vineet Sharma + + * maxq.h: New file: Defintions for the maxq port. + +2004-11-08 Aaron W. LaFramboise + + * pe.h (IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY): Define. + (IMAGE_WEAK_EXTERN_SEARCH_LIBRARY): Same. + (IMAGE_WEAK_EXTERN_SEARCH_ALIAS): Same. + +2004-08-13 Mark Kettenis + + * symconst.h (langMax): Fix typo in comment. + +2004-04-23 Chris Demetriou + + * mips.h (MIPS_R_RELHI, MIPS_R_RELLO, MIPS_R_SWITCH): Remove + (MIPS_R_PCREL16): Update comment. + * ecoff.h (struct ecoff_value_adjust): Remove structure. + (struct ecoff_debug_info): Remove 'adjust' member. + +2004-04-20 DJ Delorie + + * internal.h (R_SECREL32): Add. + +For older changes see ChangeLog-9103 + +Copyright (C) 2004-2015 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/support/sdbinutils/include/coff/ChangeLog-9103 b/support/sdbinutils/include/coff/ChangeLog-9103 new file mode 100644 index 0000000..c8a7b10 --- /dev/null +++ b/support/sdbinutils/include/coff/ChangeLog-9103 @@ -0,0 +1,1186 @@ +2005-04-13 H.J. Lu + + Moved from ../ChangeLog + + 2003-04-04 Svein E. Seldal + * tic4x.h: Namespace cleanup. Replace s/c4x/tic4x + and s/c3x/tic3x/ + + 2003-01-20 Svein E. Seldal + * tic4x.h (TICOFF_TARGET_MACHINE_GET): Fixed define bug + * ti.h (TICOFF_TARGET_MACHINE_GET): Added macros + + 2002-08-28 Michael Hayes + * internal.h: Add new relocation types. + * ti.h: Add file-header flags for tic4x code. + * tic4x.h: New file + +2003-12-02 Graham Reed + + * internal.h (C_WEAKEXT): Add alternative value for AIX 5.2 + based targets. + +2003-08-23 Jason Eckhardt + + * coff/i860.h (COFF860_R_PAIR, COFF860_R_LOW0, COFF860_R_LOW1, + COFF860_R_LOW2, COFF860_R_LOW3, COFF860_R_LOW4, COFF860_R_SPLIT0, + COFF860_R_SPLIT1, COFF860_R_SPLIT2, COFF860_R_HIGHADJ, + COFF860_R_BRADDR): Define new relocation constants and document. + Minor formatting adjustments. + +2003-08-07 Alan Modra + + * ti.h (GET_SCNHDR_NRELOC): Rename PTR param to LOC. + (PUT_SCNHDR_NRELOC, GET_SCNHDR_NLNNO, PUT_SCNHDR_NLNNO): Likewise. + (GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Likewise. + (GET_SCNHDR_PAGE, PUT_SCNHDR_PAGE): Likewise. + +2003-07-17 Jeff Muizelaar + + * pe.h: (IMAGE_FILE_NET_RUN_FROM_SWAP): Define. + (IMAGE_FILE_MACHINE_WCEMIPSV2): Define. + (IMAGE_FILE_MACHINE_SH3DSP): Define. + (IMAGE_FILE_MACHINE_SH3E): Define. + (IMAGE_FILE_MACHINE_SH5): Define. + (IMAGE_FILE_MACHINE_AM33): Define. + (IMAGE_FILE_MACHINE_POWERPCFP): Define. + (IMAGE_FILE_MACHINE_AXP64): Define. + (IMAGE_FILE_MACHINE_TRICORE): Define. + (IMAGE_FILE_MACHINE_CEF): Define. + (IMAGE_FILE_MACHINE_EBC): Define. + (IMAGE_FILE_MACHINE_AMD64): Define. + (IMAGE_FILE_MACHINE_M32R): Define. + (IMAGE_FILE_MACHINE_CEE): Define. + +2003-07-14 Christian Groessler + + * i860.h (AOUTSZ): Define for i860 coff. + +2003-06-29 Andreas Jaeger + + * xcoff.h (struct __rtinit ): Convert to ISO C90 prototypes. + + * ecoff.h: Convert to ISO C90 prototypes. Replace PTR by void *. + +2003-04-24 Dhananjay Deshpande + + * coff/h8300.h (H8300HNMAGIC, H8300SNMAGIC): New. + (H8300HNBADMAG, H8300SNBADMAG): New. + +2003-04-15 Rohit Kumar Srivastava + + * sh.h: Replace occurrances of 'Hitachi' with 'Renesas'. + * h8300.h: Likewise. + * h8500.h: Likewise. + +2003-03-25 Stan Cox + Nick Clifton + + Contribute support for Intel's iWMMXt chip - an ARM variant: + + * arm.h (ARM_NOTE_SECTION): Define. + +2002-11-30 Alan Modra + + * ecoff.h: Replace boolean with bfd_boolean. + * xcoff.h: Likewise. + +2002-03-18 Tom Rix + + * rs6k64.h: Add U64_TOCMAGIC, AIX 5 64 bit magic number. + +2002-02-01 Tom Rix + + * xcoff.h: Conditionally support for pre AIX 4.3. + +2002-01-31 Ivan Guzvinec + + * or32.h: New file. + +2001-12-24 Tom Rix + + * xcoff.h (xcoff_big_format_p): Make the default archive + format. + (XCOFFARMAG_ELEMENT_SIZE, XCOFFARMAGBIG_ELEMENT_SIZE): Define for + archive header ascii elements. + +2001-12-17 Tom Rix + + * xcoff.h : Add .except and .typchk section string and styp flags. + Fix xcoff_big_format_p macro. + +2001-12-16 Tom Rix + + * xcoff.h : Clean up formatting. + +2002-01-15 Richard Earnshaw + + * arm.h (F_VFP_FLOAT): Define. + +2001-11-11 Timothy Wall + + * ti.h: Move arch-specific stuff from here... + (COFF_ADJUST_SYM_IN/OUT): Optionally put page flag into symbol + value. + * tic54x.h: ...to here. + +2001-10-26 Christian Groessler + + * external.h (GET_LINENO_LNNO): Fix usage of H_GET_32/16. + (PUT_LINENO_LNNO): Likewise with H_PUT_32/16. + +2001-09-21 Nick Clifton + + * ti.h (GET_SCNHDR_PAGE): Fix compile time warning. + +2001-09-18 Alan Modra + + * external.h (GET_LINENO_LNNO): Use H_GET_32/16. + (PUT_LINENO_LNNO): Use H_PUT_32/16. + * m88k.h (GET_LNSZ_SIZE, GET_LNSZ_LNNO, GET_SCN_NRELOC, + GET_SCN_NLINNO): Use H_GET_32. + (PUT_LNSZ_LNNO, PUT_LNSZ_SIZE, PUT_SCN_NRELOC, PUT_SCN_NLINNO): + Use H_PUT_32. + * ti.h: Formatting fixes. Make use of H_GET_* and H_PUT_* throughout. + * xcoff.h: White space changes. + +2001-09-05 Tom Rix + + * xcoff.h : Add XCOFF_SYSCALL32 and XCOFF_SYSCALL64 hash table flags. + +2001-08-27 Andreas Jaeger + + * xcoff.h (struct __rtinit): Make proper prototype for rtl. + +Fri Aug 24 01:18:51 2001 J"orn Rennecke + + * internal.h (R_JMP2, R_JMPL2, R_MOVL2): Comment spelling fix. + +2001-04-05 Tom Rix + + * rs6000.h : move xcoff32 external structures from xcofflink. + * rs6k64.h : move xcoff64 external structures from xcofflink. + * internal.h : promote 32 bit structure elements to 64 bit + for xcoff64 support + * xcoff.h : New file. + +2001-03-23 Nick Clifton + + * a29k.h: Fix compile time warning. + * external.h: Fix compile time warning. + * m88k.h: Fix compile time warning. + +2001-03-13 Nick Clifton + + * external.h: New file. Common structure definitions found in + other COFF header files. + + * a29k.h: Use external.h. + * apollo.h: Use external.h. + * arm.h: Use external.h. + * h8300.h: Use external.h. + * h8500.h: Use external.h. + * i386.h: Use external.h. + * i860.h: Use external.h. + * ia64.h: Use external.h. + * m68k.h: Use external.h. + * m88k.h: Use external.h. + * mcore.h: Use external.h. + * mips.h: Use external.h. + * mipspe.h: Use external.h. + * powerpc.h: Use external.h. + * rs6000.h: Use external.h. + * rs6k64.h: Use external.h. + * sh.h: Use external.h. + * sparc.h: Use external.h. + * tic30.h: Use external.h. + * tic80.h: Use external.h. + * w65.h: Use external.h. + * we32k.h: Use external.h. + * z8k.h: Use external.h. + +2001-02-09 David Mosberger + + * pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ. + Rename from PEPAOUTHDR. + +2001-01-23 H.J. Lu + + * pe.h (struct external_PEI_DOS_hdr): New. + (struct external_PEI_IMAGE_hdr): New. + +2000-12-11 Alan Modra + + * ti.h (OCTETS_PER_BYTE_POWER): Change #warning to #error. + +2000-12-08 Alan Modra + + * ti.h (OCTETS_PER_BYTE_POWER): Change #warn to #warning. + +2000-06-30 DJ Delorie + + * pe.h: Clarify a comment. + +2000-05-05 Clinton Popetz + + * rs6k64.h (U802TOC64MAGIC): Change to U803XTOCMAGIC. + +2000-04-24 Clinton Popetz + + * rs6k64.h: New file. + +2000-04-17 Timothy Wall + + * ti.h: Load page cleanup. + * intental.h: Add load page field. + +Mon Apr 17 16:44:01 2000 David Mosberger + + * pe.h (PEP64AOUTHDR): New header for PE+. + (PEP64AOUTSZ): New macro. + (IMAGE_SUBSYSTEM_UNKNOWN): New macro. + (IMAGE_SUBSYSTEM_NATIVE): Ditto. + (IMAGE_SUBSYSTEM_WINDOWS_GUI): Ditto. + (IMAGE_SUBSYSTEM_WINDOWS_CUI): Ditto. + (IMAGE_SUBSYSTEM_POSIX_CUI): Ditto. + (IMAGE_SUBSYSTEM_WINDOWS_CE_GUI): Ditto. + (IMAGE_SUBSYSTEM_EFI_APPLICATION): Ditto. + (IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER): Ditto. + (IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER): Ditto. + * internal.h (PE_DEF_FILE_ALIGNMENT): Define only if not defined + already. + * ia64.h: New file. + +2000-04-13 Alan Modra + + * ti.h (ADDR_MASK): Don't use ul suffix on constants. + (PG_MASK): Ditto. + +2000-04-11 Timothy Wall + + * ti.h: Remove load page references until load pages are + reimplemented. + * tic54x.h: Ditto. + +2000-04-07 Timothy Wall + + * internal.h: Fix some comments related to TI COFF (instead of tic80). + * ti.h: New. + * tic54x.h: New. + +Wed Apr 5 22:08:41 2000 J"orn Rennecke + + * sh.h (R_SH_LOOP_START, R_SH_LOOP_END): Define. + +2000-03-15 Kazu Hirata + + * internal.h: Fix a typo in the comment for R_MOVL2. + +2000-02-28 Nick Clifton + + * mipspe.h (MIPS_PE_MAGIC): Define. + * sh.h (SH_PE_MAGIC): Define. + +2000-02-22 Nick Clifton DJ Delorie + + * sh.h: Add Windows CE definitions. + * arm.h: Add Windows CE definitions. + * mipspe.h: New file: Windows CE definitions for MIPS. + * pe.h: Add constants for ILF support. + +2000-01-05 Nick Clifton + + * pe.h: Fix formatting of comments. + (IMAGE_FILE_AGGRESSIVE_WS_TRIM): Define. + (IMAGE_FILE_LARGE_ADDRESS_AWARE): Define. + (IMAGE_FILE_16BIT_MACHINE): Define. + (IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP): Define. + (IMAGE_FILE_UP_SYSTEM_ONLY): Define. + (IMAGE_FILE_MACHINE_UNKNOWN): Define. + (IMAGE_FILE_MACHINE_ALPHA): Define. + (IMAGE_FILE_MACHINE_ALPHA64): Define. + (IMAGE_FILE_MACHINE_I386): Define. + (IMAGE_FILE_MACHINE_IA64): Define. + (IMAGE_FILE_MACHINE_M68K): Define. + (IMAGE_FILE_MACHINE_MIPS16): Define. + (IMAGE_FILE_MACHINE_MIPSFPU): Define. + (IMAGE_FILE_MACHINE_MIPSFPU16): Define. + (IMAGE_FILE_MACHINE_POWERPC): Define. + (IMAGE_FILE_MACHINE_R3000): Define. + (IMAGE_FILE_MACHINE_R4000): Define. + (IMAGE_FILE_MACHINE_R10000): Define. + (IMAGE_FILE_MACHINE_SH3): Define. + (IMAGE_FILE_MACHINE_SH4): Define. + (IMAGE_FILE_MACHINE_THUMB): Define. + +1999-09-20 Alan Modra + + * internal.h: Delete bogus R_PCLONG, duplicate R_RELBYTE and + R_RELWORD, and rewrite some R_* as decimal. + +1999-09-06 Donn Terry + + * internal.h (DTYPE): Define. + * pe.h (struct external_PEI_filehdr): Rename from + external_PE_filehdr. Define even if COFF_IMAGE_WITH_PE is not + defined. + +1999-07-17 Nick Clifton + + * arm.h (F_SOFT_FLOAT): Rename from F_SOFTFLOAT. + +1999-06-21 Philip Blundell + + * arm.h (F_SOFTFLOAT): Define. + +1999-07-05 Nick Clifton + + * arm.h (F_ARM_5): Define. + +Wed Jun 2 18:08:18 1999 Richard Henderson + + * internal.h (BEOS_EXE_IMAGE_BASE, BEOS_DLL_IMAGE_BASE): New. + +Mon May 17 13:35:35 1999 Stan Cox + + * arm.h (F_PIC, F_ARM_2, F_ARM_2a, F_ARM_3, F_ARM_3M, + F_ARM_4, F_ARM_4T, F_APCS26): Changed values to distinguish + F_ARM_2a, F_ARM_3M, F_ARM_4T. + +1999-05-15 Nick Clifton + + * mcore.h (IMAGE_REL_MCORE_RVA): Define. + +1999-04-21 Nick Clifton + + * mcore.h (GET_LINENO_LNNO): New macro. + (PUT_LINENO_LNNO): New macro. + +1999-04-08 Nick Clifton + + * mcore.h: New header file. Defines for Motorola's MCore + processor. + +Sun Dec 6 21:36:37 1998 Mark Elbrecht + + * internal.h (C_WEAKEXT): Define. + +Wed Jan 27 13:35:35 1999 Stan Cox + + * arm.h (F_PIC_INT, F_ARM_2, F_ARM_3, F_ARM_4, F_APCS26): + Changed values to avoid clashing with IMAGE_FILE_* coff header + flag values. + +Wed Apr 1 16:06:15 1998 Nick Clifton + + * internal.h: Document numbers associated with Thumb symbol + types. + +Fri Mar 27 17:16:57 1998 Ian Lance Taylor + + * internal.h (ISPTR, ISFCN, ISARY): Add casts to unsigned long. + +Mon Feb 2 17:10:38 1998 Steve Haworth + + * tic30.h: New file. + +Fri Dec 12 11:49:07 1997 Fred Fish + + * tic80.h (R_MPPCR15W): New relocation type, for 15 bit PC relative + offsets. + +Tue Dec 2 10:21:40 1997 Nick Clifton + + * arm.h (COFFARM): New define. + +Mon Dec 1 20:24:18 1997 J"orn Rennecke + + * sh.h (R_SH_SWITCH8): New. + +Sat Nov 22 15:10:14 1997 Nick Clifton + + * internal.h (C_THUMBEXTFUNC, C_THUMBSTATFUNC): Constants to + define static and external functions. + + * arm.h: Add bits to support PIC and APCS-FLOAT type binaries, + when implemented. + +Fri Oct 3 14:25:17 1997 Fred Fish + + * tic80.h (R_PPL16B): Make constant uppercase for consistency. + +Tue Jul 22 18:18:58 1997 Robert Hoehne + + * go32exe.h: New file. + +Tue Jul 8 12:23:55 1997 Fred Fish + + * tic80.h (TIC80_TARGET_ID): Add define. + * internal.h (struct internal_filehdr): Add f_target_id field. + +Tue Jun 3 16:44:18 1997 Nick Clifton + + * internal.h: Add storage classes for Thumb symbols + +Mon May 26 14:07:55 1997 Ian Lance Taylor + + * tic80.h (R_PPL16B): Correct value. + +Tue May 13 10:21:14 1997 Nick Clifton + + * arm.h (constants): Added new flag bits F_APCS_26 and + F_APCS_SET for the f_flags field of the filehdr structure. Added new + flags: F_APCS26, F_ARM_2, F_ARM_3, F_ARM_7, F_ARM_7T to store + information in the flags field of the internal_f structure used by BFD + routines. + +Sat May 3 08:24:59 1997 Fred Fish + + * internal.h (C_UEXT, C_STATLAB, C_EXTLAB, C_SYSTEM): + New storage classes for TIc80. + +Fri Apr 18 11:52:55 1997 Niklas Hallqvist + + * alpha.h (ALPHA_ECOFF_BADMAG): Recognize *BSD/alpha magic too. + (ALPHA_R_LITERALSLEAZY): Define. + * ecoff.h (ALPHA_MAGIC_BSD): Define. + +Wed Jan 29 11:31:51 1997 Ian Lance Taylor + + * i960.h (R_IPR13, R_ALIGN): Define. + +Mon Jan 27 13:34:30 1997 Ian Lance Taylor + + * internal.h (R_IPRMED, R_OPTCALL, R_OPTCALLX): Move definitions + from here... + * i960.h (R_IPRMED, R_OPTCALL, R_OPTCALLX): ...to here. + +Wed Jan 22 20:10:47 1997 Fred Fish + + * tic80.h (TIC80MAGIC): Renamed to TIC80_AOUTHDR_MAGIC. + +Fri Dec 27 22:05:45 1996 Fred Fish + + * tic80.h: New file for TIc80 support. + +Thu Dec 19 16:18:11 1996 Ian Lance Taylor + + * arm.h (_LIT): Define. + +Fri Jun 28 12:54:38 1996 Ian Lance Taylor + + * pe.h (FILHSZ): Define. + +Wed Jun 26 16:24:26 1996 Ian Lance Taylor + + * All files: Define FILHSZ, AOUTSZ, AOUTHDRSZ, SCNHSZ, SYMESZ, + AUXESZ, LINESZ, RELSZ as numeric constants rather than uses of + sizeof. Define AOUTHDRSZ in all files. + * pe.h (AOUTSZ): Define by adding to AOUTHDRSZ. + +Fri Jun 21 11:17:46 1996 Richard Henderson + + * alpha.h: Add declarations for relocation types added for Alpha + OSF/1 3.0. + +Tue Jun 18 16:04:29 1996 Jeffrey A. Law + + * h8300.h (H8300SMAGIC): Define. + (H8300SBADMAG): Define. + +Mon Jun 10 11:53:28 1996 Jeffrey A Law (law@cygnus.com) + + * internal.h (R_BCC_INV, R_JMP_DEL): New relocations for + relaxing in the H8/300 series. + +Thu May 16 15:49:22 1996 Ian Lance Taylor + + * sh.h (R_SH_CODE, R_SH_DATA, R_SH_LABEL): Define. + +Tue May 7 00:36:39 1996 Jeffrey A Law (law@cygnus.com) + + * internal.h (R_JMPL2): Renamed from R_JMPL_B8 to be + consistent with other similar relocs. + + * internal.h (H8/300 specific relocs): Add comments better + explaining what each reloc is used for. + (R_MOV16B1, R_MOV16B2): Renamed from R_MOVB1 and R_MOVB2. + (R_MOV24B1, R_MOV24B2): Renamed from R_MOVLB1 and R_MOVLB2. + (R_MOVL1, R_MOVL2): New relocs. + +Fri May 3 13:01:12 1996 Jeffrey A Law (law@cygnus.com) + + * internal.h (R_PCRWORD_B): Define for the h8300 relaxing + linker. + +Wed May 1 19:21:03 1996 Ian Lance Taylor + + * internal.h (SCNNMLEN): Define. + (struct internal_scnhdr): Use SCNNMLEN for s_name field. + +Fri Mar 29 13:41:25 1996 Ian Lance Taylor + + * pe.h: Define IMAGE_COMDAT codes. + +Wed Mar 27 17:29:42 1996 Ian Lance Taylor + + * arm.h (union external_auxent): Add x_checksum, x_associated, and + x_comdat fields to x_scn struct. + * i386.h (union external_auxent): Likewise. + * powerpc.h (union external_auxent): Likewise. + * internal.h (union internal_auxent): Likewise. + +Thu Mar 21 16:25:57 1996 David Mosberger-Tang + + * ecoff.h (struct ecoff_find_line): Add caching fields. + +Thu Mar 14 15:22:44 1996 Jeffrey A Law (law@cygnus.com) + + * internal.h (R_MEM_INDIRECT): New reloc for the h8300. + +Fri Feb 9 10:44:11 1996 Ian Lance Taylor + + * aux-coff.h: Rename from aux.h, to avoid problems on hapless DOS + systems which think that aux is a com port. + +Mon Feb 5 18:35:00 1996 Ian Lance Taylor + + * i960.h (F_I960HX): Define. + +Wed Jan 31 13:11:54 1996 Richard Henderson + + * aux.h: New file. + * internal.h, m68k.h: Protect against multiple inclusion. + +Wed Nov 22 13:48:39 1995 Ian Lance Taylor + + * ecoff.h (_RCONST, STYP_RCONST, RELOC_SECTION_RCONST): Define. + (NUM_RELOC_SECTIONS): Update. + * symconst.h (scRConst): Define. + +Tue Nov 14 18:54:29 1995 Ian Lance Taylor + + * internal.h (C_NT_WEAK): Define. + +Thu Nov 9 14:08:30 1995 Ian Lance Taylor + + * rs6000.h (STYP_OVRFLO): Define. + +Tue Nov 7 14:38:45 1995 Kim Knuttila + + * powerpc.h (IMAGE_NT_OPTIONAL_HDR_MAGIC): Added define. + * pe.h: Added defines for file level flags + +Mon Nov 6 17:28:01 1995 Harry Dolan + + * i860.h: New file, based on i386.h. + +Wed Nov 1 15:25:18 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 + + * m68k.h (PAGEMAGICEXECSWAPPED): Define. + (PAGEMAGICPEXECSWAPPED): Define. + (PAGEMAGICPEXECTSHLIB): Define. + (PAGEMAGICPEXECPAGED): Define. + (_COMMENT): DEFINE. + * m88k.h (_COMMENT): Define. + +Wed Oct 18 18:36:19 1995 Geoffrey Noer + + * sym.h: #if 0'd out runtime_pdr struct because it chokes + Visual C++ and there aren't any references to it elsewhere in gdb. + +Mon Oct 16 11:12:24 1995 Ian Lance Taylor + + * rs6000.h (SMALL_AOUTSZ): Define. + + * internal.h (XMC_TD): Define. + +Tue Oct 10 18:41:03 1995 Ian Lance Taylor + + * internal.h (struct internal_aouthdr): Add o_cputype field. + * rs6000.h (AOUTHDR): Rename o_resv1 to o_cputype. + +Mon Oct 9 14:45:46 1995 Ian Lance Taylor + + * rs6000.h (AOUTHDR): Add o_maxdata field. Add comments. + (_PAD, _LOADER): Define. + (STYP_LOADER): Define. + * internal.h (struct internal_aouthdr): Add o_maxdata field. + +Thu Oct 5 10:02:57 1995 Ian Lance Taylor + + * ecoff.h: Define section name macros and STYP macros for various + Alpha sections: .got, .hash, .dynsym, .dynstr, .rel.dyn, .conflic, + .comment, .liblist, .dynamic. + +Wed Oct 4 10:56:35 1995 Kim Knuttila + + * pe.h: Moved DOSMAGIC and NT_SIGNATURE defines here + * powerpc.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines + Also removed other unused defines (various MAGIC ones) + * i386.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines + * arm.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines + * apollo.h: removed unused DEFAULT_* defines + * alpha.h: removed unused DEFAULT_* defines + * h8500.h: removed unused DEFAULT_* defines + * h8300.h: removed unused DEFAULT_* defines + * i960.h: removed unused DEFAULT_* defines + * m88k.h: removed unused DEFAULT_* defines + * we32k.h: removed unused DEFAULT_* defines + * rs6000.h: removed unused DEFAULT_* defines + * mips.h: removed unused DEFAULT_* defines + * m68k.h: removed unused DEFAULT_* defines + * z8k.h: removed unused DEFAULT_* defines + * w65.h: removed unused DEFAULT_* defines + * sparc.h: removed unused DEFAULT_* defines + * sh.h: removed unused DEFAULT_* defines + +Fri Sep 29 08:40:08 1995 Kim Knuttila + + * powerpc.h: Reformatted to GNU coding conventions. + +Wed Sep 27 06:50:50 1995 Kim Knuttila + + * pe.h: added defines for more section characteristics + * powerpc.h (new file): base coff definitions for ppc PE + +Tue Sep 12 12:08:20 1995 Ian Lance Taylor + + * internal.h (struct internal_syment): Change n_numaux field from + char to unsigned char. + +Fri Sep 1 15:39:36 1995 Kazumoto Kojima + + * mips.h (struct rpdr_ext): Define. + +Thu Aug 31 16:51:50 1995 steve chamberlain + + * internal.h (internal_aouthdr, internal_filehdr): + don't indirect the pe stuff. + +Tue Aug 29 14:16:07 1995 steve chamberlain + + * i386.h (NT_DEF_RESERVE, NT_DEF_COMMIT): Make the same + as 'the other' compiler. + * internal.h (NT_IMAGE_BASE): Deleted. + (NT_EXE_IMAGE_BASE, NT_DLL_IMAGE_BASE): New. + (PE_DEF_SECTION_ALIGNMENT, PE_DEF_FILE_ALIGNMENT): New. + (R_IMAGEBASE): New. + +Mon Aug 21 18:12:19 1995 steve chamberlain + + * internal.h: (internal_filehdr): Moved PE stuff into + internal_extra_pe_filehdr. + (internal_aouthdr): Moved PE stuff into + interanl_extra_pe_aouthdr. + +Mon Jul 24 14:05:39 1995 Ian Lance Taylor + + * internal.h: Move R_SH_* relocs from here... + * sh.h: ...to here. + (R_SH_SWITCH16, R_SH_SWITCH32): Define. + (R_SH_USES, R_SH_COUNT, R_SH_ALIGN): Define. + +Thu Jun 29 00:04:25 1995 Steve Chamberlain + + * internal.h (NT_DEF_RESERVE, NT_DEF_COMMIT): Increase a lot. + +Tue May 16 15:08:20 1995 Ken Raeburn + + * internal.h (NT_subsystem, NT_stack_heap): Delete + +Tue May 16 15:08:20 1995 Ken Raeburn + + * internal.h (NT_subsystem, NT_stack_heap): Now extern. + +Sat May 13 10:14:08 1995 Steve Chamberlain + + * pe.h: New file. + * i386.h (NT_SECTION_ALIGNMENT, NT_FILE_ALIGNMENT, + NT_DEF_RESERVE, NT_DEF_COMMIT): New. + * internal.h (internal_filehdr): New fields for PE. + (IMAGE_DATA_DIRECTORY): New. + (internal_aouthdr): New fields for PE. + +Tue Feb 14 17:59:37 1995 Ian Lance Taylor + + * ecoff.h (struct ecoff_fdrtab_entry): Define. + (struct ecoff_find_line): Define. + +Sat Feb 4 14:38:03 1995 David Mosberger-Tang + + * sym.h (struct pdr): field "prof" added. + + * alpha.h (PDR_BITS1_PROF_*): added, macros for PDR_BITS*_RESERVED_* + updated accordingly. + +Sun Jan 15 18:38:33 1995 Steve Chamberlain + + * w65.h: New file. + +Wed Nov 23 22:43:38 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * sh.h (SH_ARCH_MAGIC_BIG, SH_ARCH_MAGIC_LITTLE): New. + (SHBADMAG): Changed to suit. + +Tue Jul 26 17:46:08 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * i960.h (F_I960JX): New macro. + +Wed Jul 6 00:48:57 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * alpha.h: Add definitions for alpha file header flags, encoding + the object type of the file. + +Mon Jun 20 13:47:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * ecoff.h (ecoff_swap_tir_in): Remove declaration. + (ecoff_swap_tir_out): Likewise. + (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Likewise. + (struct ecoff_debug_swap): Add new fields: swap_tir_in, + swap_rndx_in, swap_tir_out, swap_rndx_out, read_debug_info. + +Sun Jun 12 03:51:52 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * symconst.h: Pick up SGI define for stIndirect. + +Fri Apr 22 13:05:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ecoff.h (REGINFO): Don't define. + (struct ecoff_reginfo): Don't define. + + * sh.h (SH_ARCH_MAGIC): Rename from SHMAGIC. SHMAGIC is used by + several targets to mean a shared library. + (SHBADMAG): Corresponding change. + +Thu Apr 14 13:00:53 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * mips.h (RELOC_BITS3_TYPE_BIG): Changed from 0x1e to 0x3e. + (RELOC_BITS3_TYPEHI_LITTLE): Define. + (RELOC_BITS3_TYPEHI_SH_LITTLE): Define. + (MIPS_R_PCREL16): Change value from 8 to 12 to match Irix 4. + (MIPS_R_RELHI): Define. + (MIPS_R_RELLO): Define. + (MIPS_R_SWITCH): Change value from 9 to 22. + +Thu Apr 7 14:19:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * mips.h (MIPS_R_SWITCH): Define. + +Thu Mar 31 19:28:33 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * internal.h (internal_aouthdr): Added comments for Apollo fields. + +Thu Mar 31 16:28:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ecoff.h (STYP_ECOFF_LIB): Define as used on Irix 4. + +Fri Mar 25 17:16:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ecoff.h (struct ecoff_debug_info): Add adjust field. + (struct ecoff_value_adjust): Define. + +Tue Mar 22 13:22:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * mips.h (MIPS_R_PCREL16): Define. + +Sat Feb 26 10:26:38 1994 Ian Lance Taylor (ian@cygnus.com) + + * ecoff.h: Add casts to avoid warnings from SVR4 cc. + +Mon Feb 21 09:48:46 1994 Ian Lance Taylor (ian@lisa.cygnus.com) + + * sym.h (struct runtime_pdr): Make field adr bfd_vma, not unsigned + long. + (SYMR): Make field value bfd_vma, not long. + +Fri Feb 4 23:35:53 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * rs6000.h (STYP_DEBUG): Define. + +Wed Feb 2 14:31:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * internal.h (union internal_auxent): Change x_csect.x_scnlen into + a union of a long and a pointer to a symbol. XCOFF sometimes uses + this field as a symbol index. + +Mon Jan 10 23:54:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ecoff.h (ecoff_debug_info): Remove fields line_end, + external_dnr_end, external_pdr_end, external_sym_end, + external_opt_end, external_aux_end, ss_end, external_fdr_end. + Replace ifdbase with ifdmap. + +Wed Jan 5 17:05:36 1994 Ken Raeburn (raeburn@deneb.cygnus.com) + + * ecoff.h (STYP_EXTENDESC, STYP_COMMENT, STYP_XDATA, STYP_PDATA): + Define. + +Wed Jan 5 16:58:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ecoff.h (NUM_RELOC_SECTIONS): Define. + +Tue Dec 21 09:24:56 1993 Ken Raeburn (raeburn@rtl.cygnus.com) + + * sparc.h (struct external_reloc): Rename field r_addend to + r_offset. + +Sat Dec 11 16:12:32 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * internal.h (R_DISP7, R_SH_IMM16): New reloc types. + +Tue Nov 23 14:23:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ecoff.h (struct ecoff_debug_swap): Added *_end fields for all + the symbolic information pointers. + + * sym.h: Named the EXTR structure ecoff_extr. + +Fri Nov 19 08:21:18 1993 Ken Raeburn (raeburn@rover.cygnus.com) + + * sparc.h (RELSZ): Use correct size. + +Wed Nov 17 17:18:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * mips.h (struct ecoff_debug_info): Define. + +Tue Nov 2 17:56:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ecoff.h (struct ecoff_debug_swap): Define. + +Thu Oct 28 17:07:50 1993 Stan Shebs (shebs@rtl.cygnus.com) + + * i386.h (I386LYNXMAGIC): Rename to LYNXCOFFMAGIC. + * m68k.h (LYNXCOFFMAGIC): Define. + * sparc.h: New file. + +Tue Oct 19 15:34:50 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * alpha.h (external_aouthdr): Split four byte padding field into + two byte bldrev field and two byte padding field. + + * ecoff.h (_LITA, _PDATA, _XDATA, STYP_LITA): Defined. + +Wed Oct 13 15:52:34 1993 Ken Raeburn (raeburn@cygnus.com) + + Sun Oct 10 17:27:10 1993 Troy Rollo (troy@cbme.unsw.edu.au) + + * internal.h: Added o_sri, o_inlib and o_vid for Apollos as well + as R_DIR16. + + * apollo.h: New file + +Mon Oct 11 17:16:48 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ecoff.h (REGINFO, struct ecoff_reginfo): Define. + +Tue Oct 5 10:52:53 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * rs6000.h: Change non-ASCII characters in comment to octal + escapes. + +Tue Sep 28 03:27:04 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * ecoff.h (_FINI, STYP_ECOFF_FINI): Add to support .fini section. + +Fri Sep 24 11:53:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * mips.h (BADMAG): Recognize MIPS_MAGIC_LITTLE3 and MIPS_MAGIC_BIG3. + * ecoff.h: Define MIPS_MAGIC_LITTLE3 and MIPS_MAGIC_BIG3. + +Thu Sep 23 21:07:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * mips.h (BADMAG): Recognize MIPS_MAGIC_LITTLE2 and MIPS_MAGIC_BIG2. + * ecoff.h: Define MIPS_MAGIC_LITTLE2 and MIPS_MAGIC_BIG2. + +Thu Sep 16 20:27:21 1993 Jim Kingdon (kingdon@cirdan.cygnus.com) + + * sym.h, symconst.h: Add comment stating these files are not part + of GDB, GAS, etc. In 1991, when we asked rms whether we could + include these files in GDB (although they are copyrighted by + someone besides the FSF), he said it was OK if they were not + considered part of GDB. + +Fri Sep 10 17:40:35 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ecoff.h (AUX_PUT_ANY): Cast val argument to bfd_vma. + + * alpha.c (external_aouthdr): Need four bytes of padding between + vstamp and tsize. + +Tue Sep 7 14:20:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ecoff.h (AUX_GET_ANY, AUX_PUT_ANY): Changed to reflect further + change in bfd swapping routine names. + +Tue Sep 7 10:15:17 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * ecoff.h (AUX_GET_ANY): Change name of _do_getb32 to reflect bfd + changes. + +Fri Aug 13 14:30:32 1993 Ian Lance Taylor (ian@cygnus.com) + + * ecoff.h (RELOC_SECTION_NONE): Define. + +Thu Aug 12 11:24:42 1993 Ian Lance Taylor (ian@cygnus.com) + + * alpha.h (struct external_reloc): Add r_symndx field. + (RELSZ): Correct. + (RELOC_BITS*): Correct. + (ALPHA_R_*): Define. + * ecoff.h (RELOC_SECTION_{XDATA,PDATA,FINI,LITA,ABS}): Define. + (r_extern): Undefine. + * internal.h (struct internal_reloc): Make r_vaddr bfd_vma rather + than long. Add r_extern field. + + * alpha.h (PDR_BITS*): Define. + * sym.h (PDR): Give correct names to new fields. + + * ecoff.h: Moved MIPS reloc definitions from here... + * mips.h: to here. + +Mon Aug 2 16:37:14 1993 Stu Grossman (grossman at cygnus.com) + + * i386.h: Add Lynx magic number. + +Tue Aug 3 11:17:53 1993 Ian Lance Taylor (ian@cygnus.com) + + * alpha.h: Corrected external symbolic debugging structures to + match actual usage. + * internal.h (internal_filehdr, internal_aouthdr, + internal_scnhdr): Changed type of some fields to bfd_vma so they + can hold 64 bits. + * sym.h (HDRR, FDR, PDR, EXTR): Likewise. + (PDR): Added new fields found on Alpha. + * symconst.h (magicSym2): Define; new value found on Alpha. + + * ecoff.h: New file. + * alpha.h, mips.h: Moved common information into ecoff.h. Moved + external structure definitions in from ecoff-ext.h. + * ecoff-ext.h: Removed; information now in alpha.h and mips.h. + +Sun Jul 18 21:43:59 1993 Jim Kingdon (kingdon@rtl.cygnus.com) + + * i386.h: Recognize I386PTXMAGIC. + +Fri Jul 16 09:54:35 1993 Ian Lance Taylor (ian@cygnus.com) + + * mips.h (MIPS_AOUT_{OZ}MAGIC): Renamed from {OZ}MAGIC. + +Thu Jul 15 12:23:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * m88k.h (union external_auxent): Move x_fcn back inside x_fcnary. + ({GET,PUT}_FCN_{LNNOPTR,ENDNDX}): Adjust accordingly. + +Sun Jul 11 18:00:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * m68k.h: Define MC68KBCSMAGIC. + +Thu Jun 10 11:46:28 1993 Ian Lance Taylor (ian@cygnus.com) + + * mips.h (_INIT, STYP_MIPS_INIT): Define (used on Irix4). + (STYP_OTHER_LOAD): Define as STYP_MIPS_INIT. + +Wed Jun 9 15:09:09 1993 Ian Lance Taylor (ian@cygnus.com) + + * mips.h (OMAGIC): Define. + +Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) + + Support for H8/300-H + * h8300.h: New magic number. + * internal.h: New relocations. + +Mon Apr 26 18:04:47 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * internal.h, sh.h: Support for SH. + +Sat Apr 24 21:34:59 1993 Jim Kingdon (kingdon@cygnus.com) + + * a29k.h: Define _LIT. + +Fri Apr 23 18:41:23 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * alpha.h: New file. + +Thu Apr 8 12:36:34 1993 Ian Lance Taylor (ian@cygnus.com) + + * internal.h (C_SHADOW, C_VERSION): Copied in from m88k.h. + * m88k.h, i386.h, we32k.h: Don't define all the storage classes; + they're already in internal.h. + +Wed Apr 7 11:51:24 1993 Jim Kingdon (kingdon@cygnus.com) + + * internal.h: Change n_sclass to unsigned char. + Change C_EFCN to 0xff, change RS/6000 dbx symbols + to no longer be signed. + +Fri Mar 19 14:52:56 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * internal.h: Add H8/500 reloc types. + +Wed Mar 17 09:46:03 1993 Ian Lance Taylor (ian@cygnus.com) + + * ecoff-ext.h (AUX_PUT_ANY): Don't use void values in branches of + conditional expression. + +Thu Mar 4 14:12:06 1993 Ian Lance Taylor (ian@cygnus.com) + + * ecoff-ext.h (AUX_GET_*): Rewrote to use new macro AUX_GET_ANY. + (AUX_PUT_*): New macros corresponding to the AUX_GET macros. + (ecoff_swap_tir_out): Added prototype. + + * mips.h (N_BTMASK, N_TMASK, N_BTSHFT, N_TSHIFT): Define; these + are needed to interpret gcc debugging output. + +Tue Feb 9 07:43:27 1993 Ian Lance Taylor (ian@cygnus.com) + + * we32k.h (BTYPE, ISPTR, ISFCN, ISARY, DECREF): Removed + more definitions duplicated in internal.h. + +Wed Feb 3 09:18:24 1993 Ian Lance Taylor (ian@cygnus.com) + + * mips.h (RELOC_BITS3_TYPE_*): Correct for big endian machines. + +Mon Jan 25 11:35:51 1993 Ian Lance Taylor (ian@cygnus.com) + + * internal.h (internal_aouthdr): Added additional fields used only + by MIPS ECOFF. + +Thu Jan 21 10:28:38 1993 Ian Lance Taylor (ian@cygnus.com) + + * mips.h (AOUTHDR): Added additional fields used by ECOFF. + +Tue Jan 19 12:21:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * i386.h, we32k.h (N_*, T_*, DT_*): Removed still more definitions + duplicated in internal.h. + + * mips.h (RELOC_SECTION_*, ECOFF_R_*): Defined constants for ECOFF + relocs. + +Fri Jan 15 18:17:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ecoff-ext.h: Added prototypes for new ECOFF swapping functions. + (opt_ext): New structure. + * mips.h (ZMAGIC): Defined to be 0413. + (_LIB): Defined to be ".lib" + (external_reloc): MIPS ECOFF relocs are only 8 bytes. Added + macros to aid in swapping. + +Fri Jan 8 16:19:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ecoff-ext.h: Added prototypes for ECOFF swapping functions. + * internal.h (internal_scnhdr): Always provide s_align field, not + just on i960. + (internal_reloc): Always provide r_size field, not just on + RS/6000. + * mips.h (_RDATA, _SDATA, _SBSS, _LIT4, _LIT8, STYP_RDATA, + STYP_SDATA, STYP_SBSS, STYP_LIT4, STYP_LIT8): Defined. + (CODE_MASK, MIPS_IS_STAB, MIPS_MARK_STAB, MIPS_UNMARK_STAB, + STABS_SYMBOL): Moved in from gdb/mipsread.c. + +Wed Jan 6 14:01:46 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * i386.h, we32k.h: removed STYP_* defines, since they duplicated + those in internal.h. + +Tue Dec 29 15:40:07 1992 Ian Lance Taylor (ian@cygnus.com) + + * i386.h: define I386AIXMAGIC for Danbury AIX PS/2 compiler. + +Sat Dec 12 16:07:57 1992 Ian Lance Taylor (ian@cygnus.com) + + * i386.h: don't define BTYPE, ISPTR, ISFCN, ISARY, DECREF: they + are defined in internal.h. + +Thu Nov 12 09:52:01 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * internal.h: (internal_reloc): r_offset is now a long. + * z8k.h: slight comment enhancement + +Wed Sep 30 07:46:08 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * internal.h: changed z8k reloc types + +Fri Aug 28 10:16:31 1992 Brendan Kehoe (brendan@cygnus.com) + + * we32k.h: new file + +Thu Aug 27 13:00:01 1992 Brendan Kehoe (brendan@cygnus.com) + + * symconst.h: comment out cruft at the end of #endif + +Tue Aug 25 15:06:49 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * internal.h: added #define for STYP_LIT, removed from a29k and + h8300. + + * z8k.h: added z8000 support + +Thu Jul 16 16:32:00 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * internal.h: added R_RELLONG_NEG reloc type + +Fri Jun 12 20:11:04 1992 John Gilmore (gnu at cygnus.com) + + * symconst.h: Fix unterminated comment. + +Wed Jun 10 07:57:49 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * i386.h: a.out magic numbers from + mohring@informatik.tu-muenchen.de + +Mon Jun 8 20:13:33 1992 John Gilmore (gnu at cygnus.com) + + * ecoff-ext.h, mips.h: Use unsigned chars everywhere. + (Suggested by Antti Miettinen.) + +Tue Apr 14 15:18:44 1992 John Gilmore (gnu at cygnus.com) + + * sym.h: Add comments. + * symconst.h: Merge with Fred's changes. + +Tue Apr 14 14:30:05 1992 Fred Fish (fnf@cygnus.com) + + * symconst.h: Pick up SGI defines for stStruct, stUnion, stEnum, + langCplusplus, and langCplusplusV2. + +Thu Apr 2 19:47:43 1992 John Gilmore (gnu at cygnus.com) + + * sym.h, symconst.h: MIPS has provided redistributable versions + of these files. Thanks! + * ecoff-ext.h: Add weakext bit to match new sym.h. + +Fri Mar 6 00:10:46 1992 John Gilmore (gnu at cygnus.com) + + * ecoff-ext.h: Add relative file descriptors. + +Thu Feb 27 11:53:04 1992 John Gilmore (gnu at cygnus.com) + + * ecoff-ext.h: New file for external (in-file) form of ecoff + symbol structures. + +Thu Feb 6 11:33:32 1992 Steve Chamberlain (sac at rtl.cygnus.com) + + * h8300.h: made the external_lineno l_lnno field 4 bytes wide. + andded GET/PUT_LINENO_LNNO macros + +Sat Nov 30 20:38:35 1991 Steve Chamberlain (sac at rtl.cygnus.com) + + * a29k.h, h8300.h, i386.h, i960.h, internal.h, m68k.h, m88k.h, + mips.h, rs6000.h: Move from above coff-.h. + + +Copyright (C) 1991-2003 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/support/sdbinutils/include/coff/alpha.h b/support/sdbinutils/include/coff/alpha.h new file mode 100644 index 0000000..7440690 --- /dev/null +++ b/support/sdbinutils/include/coff/alpha.h @@ -0,0 +1,386 @@ +/* ECOFF support on Alpha machines. + coff/ecoff.h must be included before this file. + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/********************** FILE HEADER **********************/ + +struct external_filehdr +{ + unsigned char f_magic[2]; /* magic number */ + unsigned char f_nscns[2]; /* number of sections */ + unsigned char f_timdat[4]; /* time & date stamp */ + unsigned char f_symptr[8]; /* file pointer to symtab */ + unsigned char f_nsyms[4]; /* number of symtab entries */ + unsigned char f_opthdr[2]; /* sizeof(optional hdr) */ + unsigned char f_flags[2]; /* flags */ +}; + +/* Magic numbers are defined in coff/ecoff.h. */ +#define ALPHA_ECOFF_BADMAG(x) \ + ((x).f_magic != ALPHA_MAGIC && (x).f_magic != ALPHA_MAGIC_BSD) + +#define ALPHA_ECOFF_COMPRESSEDMAG(x) \ + ((x).f_magic == ALPHA_MAGIC_COMPRESSED) + +/* The object type is encoded in the f_flags. */ +#define F_ALPHA_OBJECT_TYPE_MASK 0x3000 +#define F_ALPHA_NO_SHARED 0x1000 +#define F_ALPHA_SHARABLE 0x2000 +#define F_ALPHA_CALL_SHARED 0x3000 + +#define FILHDR struct external_filehdr +#define FILHSZ 24 + +/********************** AOUT "OPTIONAL HEADER" **********************/ + +typedef struct external_aouthdr +{ + unsigned char magic[2]; /* type of file */ + unsigned char vstamp[2]; /* version stamp */ + unsigned char bldrev[2]; /* ?? */ + unsigned char padding[2]; /* pad to quadword boundary */ + unsigned char tsize[8]; /* text size in bytes */ + unsigned char dsize[8]; /* initialized data " " */ + unsigned char bsize[8]; /* uninitialized data " " */ + unsigned char entry[8]; /* entry pt. */ + unsigned char text_start[8]; /* base of text used for this file */ + unsigned char data_start[8]; /* base of data used for this file */ + unsigned char bss_start[8]; /* base of bss used for this file */ + unsigned char gprmask[4]; /* bitmask of general registers used */ + unsigned char fprmask[4]; /* bitmask of floating point registers used */ + unsigned char gp_value[8]; /* value for gp register */ +} AOUTHDR; + +/* compute size of a header */ + +#define AOUTSZ 80 +#define AOUTHDRSZ 80 + +/********************** SECTION HEADER **********************/ + +struct external_scnhdr +{ + unsigned char s_name[8]; /* section name */ + unsigned char s_paddr[8]; /* physical address, aliased s_nlib */ + unsigned char s_vaddr[8]; /* virtual address */ + unsigned char s_size[8]; /* section size */ + unsigned char s_scnptr[8]; /* file ptr to raw data for section */ + unsigned char s_relptr[8]; /* file ptr to relocation */ + unsigned char s_lnnoptr[8]; /* file ptr to line numbers */ + unsigned char s_nreloc[2]; /* number of relocation entries */ + unsigned char s_nlnno[2]; /* number of line number entries*/ + unsigned char s_flags[4]; /* flags */ +}; + +#define SCNHDR struct external_scnhdr +#define SCNHSZ 64 + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc +{ + unsigned char r_vaddr[8]; + unsigned char r_symndx[4]; + unsigned char r_bits[4]; +}; + +#define RELOC struct external_reloc +#define RELSZ 16 + +/* Constants to unpack the r_bits field. The Alpha seems to always be + little endian, so I haven't bothered to define big endian variants + of these. */ + +#define RELOC_BITS0_TYPE_LITTLE 0xff +#define RELOC_BITS0_TYPE_SH_LITTLE 0 + +#define RELOC_BITS1_EXTERN_LITTLE 0x01 + +#define RELOC_BITS1_OFFSET_LITTLE 0x7e +#define RELOC_BITS1_OFFSET_SH_LITTLE 1 + +#define RELOC_BITS1_RESERVED_LITTLE 0x80 +#define RELOC_BITS1_RESERVED_SH_LITTLE 7 +#define RELOC_BITS2_RESERVED_LITTLE 0xff +#define RELOC_BITS2_RESERVED_SH_LEFT_LITTLE 1 +#define RELOC_BITS3_RESERVED_LITTLE 0x03 +#define RELOC_BITS3_RESERVED_SH_LEFT_LITTLE 9 + +#define RELOC_BITS3_SIZE_LITTLE 0xfc +#define RELOC_BITS3_SIZE_SH_LITTLE 2 + +/* The r_type field in a reloc is one of the following values. */ +#define ALPHA_R_IGNORE 0 +#define ALPHA_R_REFLONG 1 +#define ALPHA_R_REFQUAD 2 +#define ALPHA_R_GPREL32 3 +#define ALPHA_R_LITERAL 4 +#define ALPHA_R_LITUSE 5 +#define ALPHA_R_GPDISP 6 +#define ALPHA_R_BRADDR 7 +#define ALPHA_R_HINT 8 +#define ALPHA_R_SREL16 9 +#define ALPHA_R_SREL32 10 +#define ALPHA_R_SREL64 11 +#define ALPHA_R_OP_PUSH 12 +#define ALPHA_R_OP_STORE 13 +#define ALPHA_R_OP_PSUB 14 +#define ALPHA_R_OP_PRSHIFT 15 +#define ALPHA_R_GPVALUE 16 +#define ALPHA_R_GPRELHIGH 17 +#define ALPHA_R_GPRELLOW 18 +#define ALPHA_R_IMMED 19 + +/* Overloaded reloc value used by Net- and OpenBSD. */ +#define ALPHA_R_LITERALSLEAZY 17 + +/* With ALPHA_R_LITUSE, the r_size field is one of the following values. */ +#define ALPHA_R_LU_BASE 1 +#define ALPHA_R_LU_BYTOFF 2 +#define ALPHA_R_LU_JSR 3 + +/* With ALPHA_R_IMMED, the r_size field is one of the following values. */ +#define ALPHA_R_IMMED_GP_16 1 +#define ALPHA_R_IMMED_GP_HI32 2 +#define ALPHA_R_IMMED_SCN_HI32 3 +#define ALPHA_R_IMMED_BR_HI32 4 +#define ALPHA_R_IMMED_LO32 5 + +/********************** SYMBOLIC INFORMATION **********************/ + +/* Written by John Gilmore. */ + +/* ECOFF uses COFF-like section structures, but its own symbol format. + This file defines the symbol format in fields whose size and alignment + will not vary on different host systems. */ + +/* File header as a set of bytes */ + +struct hdr_ext +{ + unsigned char h_magic[2]; + unsigned char h_vstamp[2]; + unsigned char h_ilineMax[4]; + unsigned char h_idnMax[4]; + unsigned char h_ipdMax[4]; + unsigned char h_isymMax[4]; + unsigned char h_ioptMax[4]; + unsigned char h_iauxMax[4]; + unsigned char h_issMax[4]; + unsigned char h_issExtMax[4]; + unsigned char h_ifdMax[4]; + unsigned char h_crfd[4]; + unsigned char h_iextMax[4]; + unsigned char h_cbLine[8]; + unsigned char h_cbLineOffset[8]; + unsigned char h_cbDnOffset[8]; + unsigned char h_cbPdOffset[8]; + unsigned char h_cbSymOffset[8]; + unsigned char h_cbOptOffset[8]; + unsigned char h_cbAuxOffset[8]; + unsigned char h_cbSsOffset[8]; + unsigned char h_cbSsExtOffset[8]; + unsigned char h_cbFdOffset[8]; + unsigned char h_cbRfdOffset[8]; + unsigned char h_cbExtOffset[8]; +}; + +/* File descriptor external record */ + +struct fdr_ext +{ + unsigned char f_adr[8]; + unsigned char f_cbLineOffset[8]; + unsigned char f_cbLine[8]; + unsigned char f_cbSs[8]; + unsigned char f_rss[4]; + unsigned char f_issBase[4]; + unsigned char f_isymBase[4]; + unsigned char f_csym[4]; + unsigned char f_ilineBase[4]; + unsigned char f_cline[4]; + unsigned char f_ioptBase[4]; + unsigned char f_copt[4]; + unsigned char f_ipdFirst[4]; + unsigned char f_cpd[4]; + unsigned char f_iauxBase[4]; + unsigned char f_caux[4]; + unsigned char f_rfdBase[4]; + unsigned char f_crfd[4]; + unsigned char f_bits1[1]; + unsigned char f_bits2[3]; + unsigned char f_padding[4]; +}; + +#define FDR_BITS1_LANG_BIG 0xF8 +#define FDR_BITS1_LANG_SH_BIG 3 +#define FDR_BITS1_LANG_LITTLE 0x1F +#define FDR_BITS1_LANG_SH_LITTLE 0 + +#define FDR_BITS1_FMERGE_BIG 0x04 +#define FDR_BITS1_FMERGE_LITTLE 0x20 + +#define FDR_BITS1_FREADIN_BIG 0x02 +#define FDR_BITS1_FREADIN_LITTLE 0x40 + +#define FDR_BITS1_FBIGENDIAN_BIG 0x01 +#define FDR_BITS1_FBIGENDIAN_LITTLE 0x80 + +#define FDR_BITS2_GLEVEL_BIG 0xC0 +#define FDR_BITS2_GLEVEL_SH_BIG 6 +#define FDR_BITS2_GLEVEL_LITTLE 0x03 +#define FDR_BITS2_GLEVEL_SH_LITTLE 0 + +/* We ignore the `reserved' field in bits2. */ + +/* Procedure descriptor external record */ + +struct pdr_ext { + unsigned char p_adr[8]; + unsigned char p_cbLineOffset[8]; + unsigned char p_isym[4]; + unsigned char p_iline[4]; + unsigned char p_regmask[4]; + unsigned char p_regoffset[4]; + unsigned char p_iopt[4]; + unsigned char p_fregmask[4]; + unsigned char p_fregoffset[4]; + unsigned char p_frameoffset[4]; + unsigned char p_lnLow[4]; + unsigned char p_lnHigh[4]; + unsigned char p_gp_prologue[1]; + unsigned char p_bits1[1]; + unsigned char p_bits2[1]; + unsigned char p_localoff[1]; + unsigned char p_framereg[2]; + unsigned char p_pcreg[2]; +}; + +#define PDR_BITS1_GP_USED_BIG 0x80 +#define PDR_BITS1_REG_FRAME_BIG 0x40 +#define PDR_BITS1_PROF_BIG 0x20 +#define PDR_BITS1_RESERVED_BIG 0x1f +#define PDR_BITS1_RESERVED_SH_LEFT_BIG 8 +#define PDR_BITS2_RESERVED_BIG 0xff +#define PDR_BITS2_RESERVED_SH_BIG 0 + +#define PDR_BITS1_GP_USED_LITTLE 0x01 +#define PDR_BITS1_REG_FRAME_LITTLE 0x02 +#define PDR_BITS1_PROF_LITTLE 0x04 +#define PDR_BITS1_RESERVED_LITTLE 0xf8 +#define PDR_BITS1_RESERVED_SH_LITTLE 3 +#define PDR_BITS2_RESERVED_LITTLE 0xff +#define PDR_BITS2_RESERVED_SH_LEFT_LITTLE 5 + +/* Line numbers */ + +struct line_ext { + unsigned char l_line[4]; +}; + +/* Symbol external record */ + +struct sym_ext { + unsigned char s_value[8]; + unsigned char s_iss[4]; + unsigned char s_bits1[1]; + unsigned char s_bits2[1]; + unsigned char s_bits3[1]; + unsigned char s_bits4[1]; +}; + +#define SYM_BITS1_ST_BIG 0xFC +#define SYM_BITS1_ST_SH_BIG 2 +#define SYM_BITS1_ST_LITTLE 0x3F +#define SYM_BITS1_ST_SH_LITTLE 0 + +#define SYM_BITS1_SC_BIG 0x03 +#define SYM_BITS1_SC_SH_LEFT_BIG 3 +#define SYM_BITS1_SC_LITTLE 0xC0 +#define SYM_BITS1_SC_SH_LITTLE 6 + +#define SYM_BITS2_SC_BIG 0xE0 +#define SYM_BITS2_SC_SH_BIG 5 +#define SYM_BITS2_SC_LITTLE 0x07 +#define SYM_BITS2_SC_SH_LEFT_LITTLE 2 + +#define SYM_BITS2_RESERVED_BIG 0x10 +#define SYM_BITS2_RESERVED_LITTLE 0x08 + +#define SYM_BITS2_INDEX_BIG 0x0F +#define SYM_BITS2_INDEX_SH_LEFT_BIG 16 +#define SYM_BITS2_INDEX_LITTLE 0xF0 +#define SYM_BITS2_INDEX_SH_LITTLE 4 + +#define SYM_BITS3_INDEX_SH_LEFT_BIG 8 +#define SYM_BITS3_INDEX_SH_LEFT_LITTLE 4 + +#define SYM_BITS4_INDEX_SH_LEFT_BIG 0 +#define SYM_BITS4_INDEX_SH_LEFT_LITTLE 12 + +/* External symbol external record */ + +struct ext_ext { + struct sym_ext es_asym; + unsigned char es_bits1[1]; + unsigned char es_bits2[3]; + unsigned char es_ifd[4]; +}; + +#define EXT_BITS1_JMPTBL_BIG 0x80 +#define EXT_BITS1_JMPTBL_LITTLE 0x01 + +#define EXT_BITS1_COBOL_MAIN_BIG 0x40 +#define EXT_BITS1_COBOL_MAIN_LITTLE 0x02 + +#define EXT_BITS1_WEAKEXT_BIG 0x20 +#define EXT_BITS1_WEAKEXT_LITTLE 0x04 + +/* Dense numbers external record */ + +struct dnr_ext { + unsigned char d_rfd[4]; + unsigned char d_index[4]; +}; + +/* Relative file descriptor */ + +struct rfd_ext { + unsigned char rfd[4]; +}; + +/* Optimizer symbol external record */ + +struct opt_ext { + unsigned char o_bits1[1]; + unsigned char o_bits2[1]; + unsigned char o_bits3[1]; + unsigned char o_bits4[1]; + struct rndx_ext o_rndx; + unsigned char o_offset[4]; +}; + +#define OPT_BITS2_VALUE_SH_LEFT_BIG 16 +#define OPT_BITS2_VALUE_SH_LEFT_LITTLE 0 + +#define OPT_BITS3_VALUE_SH_LEFT_BIG 8 +#define OPT_BITS3_VALUE_SH_LEFT_LITTLE 8 + +#define OPT_BITS4_VALUE_SH_LEFT_BIG 0 +#define OPT_BITS4_VALUE_SH_LEFT_LITTLE 16 diff --git a/support/sdbinutils/include/coff/apollo.h b/support/sdbinutils/include/coff/apollo.h new file mode 100644 index 0000000..14f223f --- /dev/null +++ b/support/sdbinutils/include/coff/apollo.h @@ -0,0 +1,125 @@ +/* coff information for Apollo M68K + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#define DO_NOT_DEFINE_AOUTHDR +#define L_LNNO_SIZE 2 +#include "coff/external.h" + +/* Motorola 68000/68008/68010/68020 */ +#define MC68MAGIC 0520 +#define MC68KWRMAGIC 0520 /* writeable text segments */ +#define MC68TVMAGIC 0521 +#define MC68KROMAGIC 0521 /* readonly shareable text segments */ +#define MC68KPGMAGIC 0522 /* demand paged text segments */ +#define M68MAGIC 0210 +#define M68TVMAGIC 0211 + +/* Apollo 68000-based machines have a different magic number. This comes + * from /usr/include/apollo/filehdr.h + */ +#define APOLLOM68KMAGIC 0627 + +#define OMAGIC M68MAGIC +#define M68KBADMAG(x) (((x).f_magic!=MC68MAGIC) && ((x).f_magic!=MC68KWRMAGIC) && ((x).f_magic!=MC68TVMAGIC) && \ + ((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) && \ + ((x).f_magic!=APOLLOM68KMAGIC) ) + +/********************** AOUT "OPTIONAL HEADER" **********************/ + +typedef struct +{ + char magic[2]; /* type of file */ + char vstamp[2]; /* version stamp */ + char tsize[4]; /* text size in bytes, padded to FW bdry*/ + char dsize[4]; /* initialized data " " */ + char bsize[4]; /* uninitialized data " " */ + char entry[4]; /* entry pt. */ + char text_start[4]; /* base of text used for this file */ + char data_start[4]; /* base of data used for this file */ + char o_sri[4]; /* Apollo specific - .sri data pointer */ + char o_inlib[4]; /* Apollo specific - .inlib data pointer */ + char vid[8]; /* Apollo specific - 64 bit version ID */ +} +AOUTHDR; + +#define APOLLO_COFF_VERSION_NUMBER 1 /* the value of the aouthdr magic */ +#define AOUTHDRSZ 44 +#define AOUTSZ 44 + +/* Apollo allowa for larger section names by allowing + them to be in the string table. */ + +/* If s_zeores is all zeroes, s_offset gives the real + location of the name in the string table. */ + +#define s_zeroes section_name.s_name +#define s_offset (section_name.s_name+4) + +/* More names of "special" sections. */ +#define _TV ".tv" +#define _INIT ".init" +#define _FINI ".fini" +#define _LINES ".lines" +#define _BLOCKS ".blocks" +#define _SRI ".sri" /* Static Resource Information (systype, + et al.) */ +#define _MIR ".mir" /* Module Information Records */ +#define _APTV ".aptv" /* Apollo-style transfer vectors. */ +#define _INLIB ".inlib" /* Shared Library information */ +#define _RWDI ".rwdi" /* Read/write data initialization directives for + compressed sections */ +#define _UNWIND ".unwind" /* Stack unwind information */ + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; +#ifdef M68K_COFF_OFFSET + char r_offset[4]; +#endif + +}; + +#define RELOC struct external_reloc + +#ifdef M68K_COFF_OFFSET +#define RELSZ 14 +#else +#define RELSZ 10 +#endif + +/* Apollo specific STYP flags */ + +#define STYP_RELOCATED_NOT_LOADED 0x00010000 /* Section is relocated normally during linking, but need + not be loaded during program execution */ +#define STYP_DEBUG 0x00020000 /* debug section */ +#define STYP_OVERLAY 0x00040000 /* Section is overlayed */ +#define STYP_INSTRUCTION 0x00200000 /* Section contains executable code */ + +#define STYP_ZERO 0x00800000 /* Section is initialized to zero */ +#define STYP_INSTALLED 0x02000000 /* Section should be installable in KGT */ +#define STYP_LOOK_INSTALLED 0x04000000 /* Look for section in KGT */ +#define STYP_SECALIGN1 0x08000000 /* Specially aligned section */ +#define STYP_SECALIGN2 0x10000000 /* " " " */ +#define STYP_COMPRESSED 0x20000000 /* No section data per se (s_scnptr = 0), but there are + initialization directives for it in .rwdi section + (used in conjunction with STYP_BSS) */ diff --git a/support/sdbinutils/include/coff/arm.h b/support/sdbinutils/include/coff/arm.h new file mode 100644 index 0000000..01aae15 --- /dev/null +++ b/support/sdbinutils/include/coff/arm.h @@ -0,0 +1,129 @@ +/* ARM COFF support for BFD. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#define COFFARM 1 + +#define L_LNNO_SIZE 2 +#define INCLUDE_COMDAT_FIELDS_IN_AUXENT +#include "coff/external.h" + +/* Bits for f_flags: + F_RELFLG relocation info stripped from file + F_EXEC file is executable (no unresolved external references) + F_LNNO line numbers stripped from file + F_LSYMS local symbols stripped from file + F_INTERWORK file supports switching between ARM and Thumb instruction sets + F_INTERWORK_SET the F_INTERWORK bit is valid + F_APCS_FLOAT code passes float arguments in float registers + F_PIC code is reentrant/position-independent + F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax) + F_APCS_26 file uses 26 bit ARM Procedure Calling Standard + F_APCS_SET the F_APCS_26, F_APCS_FLOAT and F_PIC bits have been initialised + F_SOFT_FLOAT code does not use floating point instructions. */ + +#define F_RELFLG (0x0001) +#define F_EXEC (0x0002) +#define F_LNNO (0x0004) +#define F_LSYMS (0x0008) +#define F_INTERWORK (0x0010) +#define F_INTERWORK_SET (0x0020) +#define F_APCS_FLOAT (0x0040) +#undef F_AR16WR +#define F_PIC (0x0080) +#define F_AR32WR (0x0100) +#define F_APCS_26 (0x0400) +#define F_APCS_SET (0x0800) +#define F_SOFT_FLOAT (0x2000) +#define F_VFP_FLOAT (0x4000) + +/* Bits stored in flags field of the internal_f structure */ + +#define F_INTERWORK (0x0010) +#define F_APCS_FLOAT (0x0040) +#define F_PIC (0x0080) +#define F_APCS26 (0x1000) +#define F_ARM_ARCHITECTURE_MASK (0x4000+0x0800+0x0400) +#define F_ARM_2 (0x0400) +#define F_ARM_2a (0x0800) +#define F_ARM_3 (0x0c00) +#define F_ARM_3M (0x4000) +#define F_ARM_4 (0x4400) +#define F_ARM_4T (0x4800) +#define F_ARM_5 (0x4c00) + +/* + ARMMAGIC ought to encoded the procesor type, + but it is too late to change it now, instead + the flags field of the internal_f structure + is used as shown above. + + XXX - NC 5/6/97. */ + +#define ARMMAGIC 0xa00 /* I just made this up */ + +#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC)) + +#define ARMPEMAGIC 0x1c0 +#define THUMBPEMAGIC 0x1c2 +#define ARMV7PEMAGIC 0x1c4 + +#undef ARMBADMAG +#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC) && ((x).f_magic != ARMPEMAGIC) && ((x).f_magic != THUMBPEMAGIC) && ((x).f_magic != ARMV7PEMAGIC)) + +#define OMAGIC 0404 /* object files, eg as output */ +#define ZMAGIC 0413 /* demand load format, eg normal ld output */ +#define STMAGIC 0401 /* target shlib */ +#define SHMAGIC 0443 /* host shlib */ + +/* define some NT default values */ +/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */ +#define NT_SECTION_ALIGNMENT 0x1000 +#define NT_FILE_ALIGNMENT 0x200 +#define NT_DEF_RESERVE 0x100000 +#define NT_DEF_COMMIT 0x1000 + +/* We use the .rdata section to hold read only data. */ +#define _LIT ".rdata" + +/********************** RELOCATION DIRECTIVES **********************/ +#ifdef ARM_WINCE +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 10 + +#else +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; + char r_offset[4]; +}; + +#define RELOC struct external_reloc +#define RELSZ 14 +#endif + +#define ARM_NOTE_SECTION ".note" diff --git a/support/sdbinutils/include/coff/aux-coff.h b/support/sdbinutils/include/coff/aux-coff.h new file mode 100644 index 0000000..6ebf941 --- /dev/null +++ b/support/sdbinutils/include/coff/aux-coff.h @@ -0,0 +1,49 @@ +/* Modifications of internal.h and m68k.h needed by A/UX + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. + + Suggested by Ian Lance Taylor */ + +#ifndef GNU_COFF_AUX_H +#define GNU_COFF_AUX_H 1 + +#include "coff/internal.h" +#include "coff/m68k.h" + +/* Section contains 64-byte padded pathnames of shared libraries */ +#undef STYP_LIB +#define STYP_LIB 0x200 + +/* Section contains shared library initialization code */ +#undef STYP_INIT +#define STYP_INIT 0x400 + +/* Section contains .ident information */ +#undef STYP_IDENT +#define STYP_IDENT 0x800 + +/* Section types used by bfd and gas not defined (directly) by A/UX */ +#undef STYP_OVER +#define STYP_OVER 0 +#undef STYP_INFO +#define STYP_INFO STYP_IDENT + +/* Traditional name of the section tagged with STYP_LIB */ +#define _LIB ".lib" + +#endif /* GNU_COFF_AUX_H */ diff --git a/support/sdbinutils/include/coff/ecoff.h b/support/sdbinutils/include/coff/ecoff.h new file mode 100644 index 0000000..71c0c72 --- /dev/null +++ b/support/sdbinutils/include/coff/ecoff.h @@ -0,0 +1,411 @@ +/* Generic ECOFF support. + This does not include symbol information, found in sym.h and + symconst.h. + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef ECOFF_H +#define ECOFF_H + +/* Mips magic numbers used in filehdr. MIPS_MAGIC_LITTLE is used on + little endian machines. MIPS_MAGIC_BIG is used on big endian + machines. Where is MIPS_MAGIC_1 from? */ +#define MIPS_MAGIC_1 0x0180 +#define MIPS_MAGIC_LITTLE 0x0162 +#define MIPS_MAGIC_BIG 0x0160 + +/* These are the magic numbers used for MIPS code compiled at ISA + level 2. */ +#define MIPS_MAGIC_LITTLE2 0x0166 +#define MIPS_MAGIC_BIG2 0x0163 + +/* These are the magic numbers used for MIPS code compiled at ISA + level 3. */ +#define MIPS_MAGIC_LITTLE3 0x142 +#define MIPS_MAGIC_BIG3 0x140 + +/* Alpha magic numbers used in filehdr. */ +#define ALPHA_MAGIC 0x183 +#define ALPHA_MAGIC_BSD 0x185 +/* A compressed version of an ALPHA_MAGIC file created by DEC's tools. */ +#define ALPHA_MAGIC_COMPRESSED 0x188 + +/* Magic numbers used in a.out header. */ +#define ECOFF_AOUT_OMAGIC 0407 /* not demand paged (ld -N). */ +#define ECOFF_AOUT_ZMAGIC 0413 /* demand load format, eg normal ld output */ + +/* Names of special sections. */ +#define _TEXT ".text" +#define _DATA ".data" +#define _BSS ".bss" +#define _RDATA ".rdata" +#define _SDATA ".sdata" +#define _SBSS ".sbss" +#define _LITA ".lita" +#define _LIT4 ".lit4" +#define _LIT8 ".lit8" +#define _LIB ".lib" +#define _INIT ".init" +#define _FINI ".fini" +#define _PDATA ".pdata" +#define _XDATA ".xdata" +#define _GOT ".got" +#define _HASH ".hash" +#define _DYNSYM ".dynsym" +#define _DYNSTR ".dynstr" +#define _RELDYN ".rel.dyn" +#define _CONFLIC ".conflic" +#define _COMMENT ".comment" +#define _LIBLIST ".liblist" +#define _DYNAMIC ".dynamic" +#define _RCONST ".rconst" + +/* ECOFF uses some additional section flags. */ +#define STYP_RDATA 0x100 +#define STYP_SDATA 0x200 +#define STYP_SBSS 0x400 +#define STYP_GOT 0x1000 +#define STYP_DYNAMIC 0x2000 +#define STYP_DYNSYM 0x4000 +#define STYP_RELDYN 0x8000 +#define STYP_DYNSTR 0x10000 +#define STYP_HASH 0x20000 +#define STYP_LIBLIST 0x40000 +#define STYP_CONFLIC 0x100000 +#define STYP_ECOFF_FINI 0x1000000 +#define STYP_EXTENDESC 0x2000000 /* 0x02FFF000 bits => scn type, rest clr */ +#define STYP_LITA 0x4000000 +#define STYP_LIT8 0x8000000 +#define STYP_LIT4 0x10000000 +#define STYP_ECOFF_LIB 0x40000000 +#define STYP_ECOFF_INIT 0x80000000 +#define STYP_OTHER_LOAD (STYP_ECOFF_INIT | STYP_ECOFF_FINI) + +/* extended section types */ +#define STYP_COMMENT 0x2100000 +#define STYP_RCONST 0x2200000 +#define STYP_XDATA 0x2400000 +#define STYP_PDATA 0x2800000 + +/* The linker needs a section to hold small common variables while + linking. There is no convenient way to create it when the linker + needs it, so we always create one for each BFD. We then avoid + writing it out. */ +#define SCOMMON ".scommon" + +/* If the extern bit in a reloc is 1, then r_symndx is an index into + the external symbol table. If the extern bit is 0, then r_symndx + indicates a section, and is one of the following values. */ +#define RELOC_SECTION_NONE 0 +#define RELOC_SECTION_TEXT 1 +#define RELOC_SECTION_RDATA 2 +#define RELOC_SECTION_DATA 3 +#define RELOC_SECTION_SDATA 4 +#define RELOC_SECTION_SBSS 5 +#define RELOC_SECTION_BSS 6 +#define RELOC_SECTION_INIT 7 +#define RELOC_SECTION_LIT8 8 +#define RELOC_SECTION_LIT4 9 +#define RELOC_SECTION_XDATA 10 +#define RELOC_SECTION_PDATA 11 +#define RELOC_SECTION_FINI 12 +#define RELOC_SECTION_LITA 13 +#define RELOC_SECTION_ABS 14 +#define RELOC_SECTION_RCONST 15 + +#define NUM_RELOC_SECTIONS 16 + +/********************** STABS **********************/ + +/* gcc uses mips-tfile to output type information in special stabs + entries. These must match the corresponding definition in + gcc/config/mips.h. At some point, these should probably go into a + shared include file, but currently gcc and gdb do not share any + directories. */ +#define CODE_MASK 0x8F300 +#define ECOFF_IS_STAB(sym) (((sym)->index & 0xFFF00) == CODE_MASK) +#define ECOFF_MARK_STAB(code) ((code)+CODE_MASK) +#define ECOFF_UNMARK_STAB(code) ((code)-CODE_MASK) +#define STABS_SYMBOL "@stabs" + +/********************** COFF **********************/ + +/* gcc also uses mips-tfile to output COFF debugging information. + These are the values it uses when outputting the .type directive. + These should also be in a shared include file. */ +#define N_BTMASK (017) +#define N_TMASK (060) +#define N_BTSHFT (4) +#define N_TSHIFT (2) + +/********************** AUX **********************/ + +/* The auxiliary type information is the same on all known ECOFF + targets. I can't see any reason that it would ever change, so I am + going to gamble and define the external structures here, in the + target independent ECOFF header file. The internal forms are + defined in coff/sym.h, which was originally donated by MIPS + Computer Systems. */ + +/* Type information external record */ + +struct tir_ext { + unsigned char t_bits1[1]; + unsigned char t_tq45[1]; + unsigned char t_tq01[1]; + unsigned char t_tq23[1]; +}; + +#define TIR_BITS1_FBITFIELD_BIG ((unsigned int) 0x80) +#define TIR_BITS1_FBITFIELD_LITTLE ((unsigned int) 0x01) + +#define TIR_BITS1_CONTINUED_BIG ((unsigned int) 0x40) +#define TIR_BITS1_CONTINUED_LITTLE ((unsigned int) 0x02) + +#define TIR_BITS1_BT_BIG ((unsigned int) 0x3F) +#define TIR_BITS1_BT_SH_BIG 0 +#define TIR_BITS1_BT_LITTLE ((unsigned int) 0xFC) +#define TIR_BITS1_BT_SH_LITTLE 2 + +#define TIR_BITS_TQ4_BIG ((unsigned int) 0xF0) +#define TIR_BITS_TQ4_SH_BIG 4 +#define TIR_BITS_TQ5_BIG ((unsigned int) 0x0F) +#define TIR_BITS_TQ5_SH_BIG 0 +#define TIR_BITS_TQ4_LITTLE ((unsigned int) 0x0F) +#define TIR_BITS_TQ4_SH_LITTLE 0 +#define TIR_BITS_TQ5_LITTLE ((unsigned int) 0xF0) +#define TIR_BITS_TQ5_SH_LITTLE 4 + +#define TIR_BITS_TQ0_BIG ((unsigned int) 0xF0) +#define TIR_BITS_TQ0_SH_BIG 4 +#define TIR_BITS_TQ1_BIG ((unsigned int) 0x0F) +#define TIR_BITS_TQ1_SH_BIG 0 +#define TIR_BITS_TQ0_LITTLE ((unsigned int) 0x0F) +#define TIR_BITS_TQ0_SH_LITTLE 0 +#define TIR_BITS_TQ1_LITTLE ((unsigned int) 0xF0) +#define TIR_BITS_TQ1_SH_LITTLE 4 + +#define TIR_BITS_TQ2_BIG ((unsigned int) 0xF0) +#define TIR_BITS_TQ2_SH_BIG 4 +#define TIR_BITS_TQ3_BIG ((unsigned int) 0x0F) +#define TIR_BITS_TQ3_SH_BIG 0 +#define TIR_BITS_TQ2_LITTLE ((unsigned int) 0x0F) +#define TIR_BITS_TQ2_SH_LITTLE 0 +#define TIR_BITS_TQ3_LITTLE ((unsigned int) 0xF0) +#define TIR_BITS_TQ3_SH_LITTLE 4 + +/* Relative symbol external record */ + +struct rndx_ext { + unsigned char r_bits[4]; +}; + +#define RNDX_BITS0_RFD_SH_LEFT_BIG 4 +#define RNDX_BITS1_RFD_BIG ((unsigned int) 0xF0) +#define RNDX_BITS1_RFD_SH_BIG 4 + +#define RNDX_BITS0_RFD_SH_LEFT_LITTLE 0 +#define RNDX_BITS1_RFD_LITTLE ((unsigned int) 0x0F) +#define RNDX_BITS1_RFD_SH_LEFT_LITTLE 8 + +#define RNDX_BITS1_INDEX_BIG ((unsigned int) 0x0F) +#define RNDX_BITS1_INDEX_SH_LEFT_BIG 16 +#define RNDX_BITS2_INDEX_SH_LEFT_BIG 8 +#define RNDX_BITS3_INDEX_SH_LEFT_BIG 0 + +#define RNDX_BITS1_INDEX_LITTLE ((unsigned int) 0xF0) +#define RNDX_BITS1_INDEX_SH_LITTLE 4 +#define RNDX_BITS2_INDEX_SH_LEFT_LITTLE 4 +#define RNDX_BITS3_INDEX_SH_LEFT_LITTLE 12 + +/* Auxiliary symbol information external record */ + +union aux_ext { + struct tir_ext a_ti; + struct rndx_ext a_rndx; + unsigned char a_dnLow[4]; + unsigned char a_dnHigh[4]; + unsigned char a_isym[4]; + unsigned char a_iss[4]; + unsigned char a_width[4]; + unsigned char a_count[4]; +}; + +#define AUX_GET_ANY(bigend, ax, field) \ + ((bigend) ? bfd_getb32 ((ax)->field) : bfd_getl32 ((ax)->field)) + +#define AUX_GET_DNLOW(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnLow) +#define AUX_GET_DNHIGH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnHigh) +#define AUX_GET_ISYM(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_isym) +#define AUX_GET_ISS(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_iss) +#define AUX_GET_WIDTH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_width) +#define AUX_GET_COUNT(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_count) + +#define AUX_PUT_ANY(bigend, val, ax, field) \ + ((bigend) \ + ? (bfd_putb32 ((bfd_vma) (val), (ax)->field), 0) \ + : (bfd_putl32 ((bfd_vma) (val), (ax)->field), 0)) + +#define AUX_PUT_DNLOW(bigend, val, ax) \ + AUX_PUT_ANY ((bigend), (val), (ax), a_dnLow) +#define AUX_PUT_DNHIGH(bigend, val, ax) \ + AUX_PUT_ANY ((bigend), (val), (ax), a_dnHigh) +#define AUX_PUT_ISYM(bigend, val, ax) \ + AUX_PUT_ANY ((bigend), (val), (ax), a_isym) +#define AUX_PUT_ISS(bigend, val, ax) \ + AUX_PUT_ANY ((bigend), (val), (ax), a_iss) +#define AUX_PUT_WIDTH(bigend, val, ax) \ + AUX_PUT_ANY ((bigend), (val), (ax), a_width) +#define AUX_PUT_COUNT(bigend, val, ax) \ + AUX_PUT_ANY ((bigend), (val), (ax), a_count) + +/********************** SYMBOLS **********************/ + +/* For efficiency, gdb deals directly with the unswapped symbolic + information (that way it only takes the time to swap information + that it really needs to read). gdb originally retrieved the + information directly from the BFD backend information, but that + strategy, besides being sort of ugly, does not work for MIPS ELF, + which also uses ECOFF debugging information. This structure holds + pointers to the (mostly) unswapped symbolic information. */ + +struct ecoff_debug_info +{ + /* The swapped ECOFF symbolic header. */ + HDRR symbolic_header; + + /* Pointers to the unswapped symbolic information. Note that the + pointers to external structures point to different sorts of + information on different ECOFF targets. The ecoff_debug_swap + structure provides the sizes of the structures and the functions + needed to swap the information in and out. These pointers are + all pointers to arrays, not single structures. They will be NULL + if there are no instances of the relevant structure. These + fields are also used by the assembler to output ECOFF debugging + information. */ + unsigned char *line; + void *external_dnr; /* struct dnr_ext */ + void *external_pdr; /* struct pdr_ext */ + void *external_sym; /* struct sym_ext */ + void *external_opt; /* struct opt_ext */ + union aux_ext *external_aux; + char *ss; + char *ssext; + void *external_fdr; /* struct fdr_ext */ + void *external_rfd; /* struct rfd_ext */ + void *external_ext; /* struct ext_ext */ + + /* These fields are used when linking. They may disappear at some + point. */ + char *ssext_end; + void *external_ext_end; + + /* When linking, this field holds a mapping from the input FDR + numbers to the output numbers, and is used when writing out the + external symbols. It is NULL if no mapping is required. */ + RFDT *ifdmap; + + /* The swapped FDR information. Currently this is never NULL, but + code using this structure should probably double-check in case + this changes in the future. This is a pointer to an array, not a + single structure. */ + FDR *fdr; +}; + +/* These structures are used by the ECOFF find_nearest_line function. */ + +struct ecoff_fdrtab_entry +{ + /* Base address in .text of this FDR. */ + bfd_vma base_addr; + FDR *fdr; +}; + +struct ecoff_find_line +{ + /* Allocated memory to hold function and file names. */ + char *find_buffer; + + /* FDR table, sorted by address: */ + long fdrtab_len; + struct ecoff_fdrtab_entry *fdrtab; + + /* Cache entry for most recently found line information. The sect + field is NULL if this cache does not contain valid information. */ + struct + { + asection *sect; + bfd_vma start; + bfd_vma stop; + const char *filename; + const char *functionname; + unsigned int line_num; + } cache; +}; + +/********************** SWAPPING **********************/ + +/* The generic ECOFF code needs to be able to swap debugging + information in and out in the specific format used by a particular + ECOFF implementation. This structure provides the information + needed to do this. */ + +struct ecoff_debug_swap +{ + /* Symbol table magic number. */ + int sym_magic; + /* Alignment of debugging information. E.g., 4. */ + bfd_size_type debug_align; + /* Sizes of external symbolic information. */ + bfd_size_type external_hdr_size; + bfd_size_type external_dnr_size; + bfd_size_type external_pdr_size; + bfd_size_type external_sym_size; + bfd_size_type external_opt_size; + bfd_size_type external_fdr_size; + bfd_size_type external_rfd_size; + bfd_size_type external_ext_size; + /* Functions to swap in external symbolic data. */ + void (*swap_hdr_in) (bfd *, void *, HDRR *); + void (*swap_dnr_in) (bfd *, void *, DNR *); + void (*swap_pdr_in) (bfd *, void *, PDR *); + void (*swap_sym_in) (bfd *, void *, SYMR *); + void (*swap_opt_in) (bfd *, void *, OPTR *); + void (*swap_fdr_in) (bfd *, void *, FDR *); + void (*swap_rfd_in) (bfd *, void *, RFDT *); + void (*swap_ext_in) (bfd *, void *, EXTR *); + void (*swap_tir_in) (int, const struct tir_ext *, TIR *); + void (*swap_rndx_in) (int, const struct rndx_ext *, RNDXR *); + /* Functions to swap out external symbolic data. */ + void (*swap_hdr_out) (bfd *, const HDRR *, void *); + void (*swap_dnr_out) (bfd *, const DNR *, void *); + void (*swap_pdr_out) (bfd *, const PDR *, void *); + void (*swap_sym_out) (bfd *, const SYMR *, void *); + void (*swap_opt_out) (bfd *, const OPTR *, void *); + void (*swap_fdr_out) (bfd *, const FDR *, void *); + void (*swap_rfd_out) (bfd *, const RFDT *, void *); + void (*swap_ext_out) (bfd *, const EXTR *, void *); + void (*swap_tir_out) (int, const TIR *, struct tir_ext *); + void (*swap_rndx_out) (int, const RNDXR *, struct rndx_ext *); + /* Function to read symbol data and set up pointers in + ecoff_debug_info structure. The section argument is used for + ELF, not straight ECOFF. */ + bfd_boolean (*read_debug_info) (bfd *, asection *, struct ecoff_debug_info *); +}; + +#endif /* ! defined (ECOFF_H) */ diff --git a/support/sdbinutils/include/coff/external.h b/support/sdbinutils/include/coff/external.h new file mode 100644 index 0000000..d7d4193 --- /dev/null +++ b/support/sdbinutils/include/coff/external.h @@ -0,0 +1,269 @@ +/* external.h -- External COFF structures + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef COFF_EXTERNAL_H +#define COFF_EXTERNAL_H + +#ifndef DO_NOT_DEFINE_FILHDR +/********************** FILE HEADER **********************/ + +struct external_filehdr + { + char f_magic[2]; /* magic number */ + char f_nscns[2]; /* number of sections */ + char f_timdat[4]; /* time & date stamp */ + char f_symptr[4]; /* file pointer to symtab */ + char f_nsyms[4]; /* number of symtab entries */ + char f_opthdr[2]; /* sizeof(optional hdr) */ + char f_flags[2]; /* flags */ + }; + +#define FILHDR struct external_filehdr +#define FILHSZ 20 +#endif + +#ifndef DO_NOT_DEFINE_AOUTHDR +/********************** AOUT "OPTIONAL HEADER" **********************/ + +typedef struct external_aouthdr + { + char magic[2]; /* type of file */ + char vstamp[2]; /* version stamp */ + char tsize[4]; /* text size in bytes, padded to FW bdry*/ + char dsize[4]; /* initialized data " " */ + char bsize[4]; /* uninitialized data " " */ + char entry[4]; /* entry pt. */ + char text_start[4]; /* base of text used for this file */ + char data_start[4]; /* base of data used for this file */ + } ATTRIBUTE_PACKED +AOUTHDR; + +#define AOUTHDRSZ 28 +#define AOUTSZ 28 + +typedef struct external_aouthdr64 +{ + char magic[2]; /* Type of file. */ + char vstamp[2]; /* Version stamp. */ + char tsize[4]; /* Text size in bytes, padded to FW bdry*/ + char dsize[4]; /* Initialized data " ". */ + char bsize[4]; /* Uninitialized data " ". */ + char entry[4]; /* Entry pt. */ + char text_start[4]; /* Base of text used for this file. */ +} +AOUTHDR64; +#define AOUTHDRSZ64 24 + +#endif /* not DO_NOT_DEFINE_AOUTHDR */ + +#ifndef DO_NOT_DEFINE_SCNHDR +/********************** SECTION HEADER **********************/ + +struct external_scnhdr + { + char s_name[8]; /* section name */ + char s_paddr[4]; /* physical address, aliased s_nlib */ + char s_vaddr[4]; /* virtual address */ + char s_size[4]; /* section size */ + char s_scnptr[4]; /* file ptr to raw data for section */ + char s_relptr[4]; /* file ptr to relocation */ + char s_lnnoptr[4]; /* file ptr to line numbers */ + char s_nreloc[2]; /* number of relocation entries */ + char s_nlnno[2]; /* number of line number entries */ + char s_flags[4]; /* flags */ + }; + +#define SCNHDR struct external_scnhdr +#define SCNHSZ 40 + +/* Names of "special" sections. */ + +#define _TEXT ".text" +#define _DATA ".data" +#define _BSS ".bss" +#define _COMMENT ".comment" +#define _LIB ".lib" +#endif /* not DO_NOT_DEFINE_SCNHDR */ + +#ifndef DO_NOT_DEFINE_LINENO + +/********************** LINE NUMBERS **********************/ + +#ifndef L_LNNO_SIZE +#error L_LNNO_SIZE needs to be defined +#endif + +/* 1 line number entry for every "breakpointable" source line in a section. + Line numbers are grouped on a per function basis; first entry in a function + grouping will have l_lnno = 0 and in place of physical address will be the + symbol table index of the function name. */ +struct external_lineno +{ + union + { + char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ + char l_paddr[4]; /* (physical) address of line number */ + } l_addr; + + char l_lnno[L_LNNO_SIZE]; /* line number */ +}; + +#define LINENO struct external_lineno +#define LINESZ (4 + L_LNNO_SIZE) + +#if L_LNNO_SIZE == 4 +#define GET_LINENO_LNNO(abfd, ext) H_GET_32 (abfd, (ext->l_lnno)) +#define PUT_LINENO_LNNO(abfd, val, ext) H_PUT_32 (abfd, val, (ext->l_lnno)) +#endif +#if L_LNNO_SIZE == 2 +#define GET_LINENO_LNNO(abfd, ext) H_GET_16 (abfd, (ext->l_lnno)) +#define PUT_LINENO_LNNO(abfd, val, ext) H_PUT_16 (abfd, val, (ext->l_lnno)) +#endif + +#endif /* not DO_NOT_DEFINE_LINENO */ + +#ifndef DO_NOT_DEFINE_SYMENT +/********************** SYMBOLS **********************/ + +#define E_SYMNMLEN 8 /* # characters in a symbol name */ +#ifndef E_FILNMLEN +#define E_FILNMLEN 14 +#endif +#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ + +struct external_syment +{ + union + { + char e_name[E_SYMNMLEN]; + + struct + { + char e_zeroes[4]; + char e_offset[4]; + } e; + } e; + + char e_value[4]; + char e_scnum[2]; + char e_type[2]; + char e_sclass[1]; + char e_numaux[1]; +} ATTRIBUTE_PACKED ; + +#define SYMENT struct external_syment +#define SYMESZ 18 + +#ifndef N_BTMASK +#define N_BTMASK 0xf +#endif + +#ifndef N_TMASK +#define N_TMASK 0x30 +#endif + +#ifndef N_BTSHFT +#define N_BTSHFT 4 +#endif + +#ifndef N_TSHIFT +#define N_TSHIFT 2 +#endif + +#endif /* not DO_NOT_DEFINE_SYMENT */ + +#ifndef DO_NOT_DEFINE_AUXENT + +union external_auxent +{ + struct + { + char x_tagndx[4]; /* str, un, or enum tag indx */ + + union + { + struct + { + char x_lnno[2]; /* declaration line number */ + char x_size[2]; /* str/union/array size */ + } x_lnsz; + + char x_fsize[4]; /* size of function */ + + } x_misc; + + union + { + struct /* if ISFCN, tag, or .bb */ + { + char x_lnnoptr[4]; /* ptr to fcn line # */ + char x_endndx[4]; /* entry ndx past block end */ + } x_fcn; + + struct /* if ISARY, up to 4 dimen. */ + { + char x_dimen[E_DIMNUM][2]; + } x_ary; + + } x_fcnary; + + char x_tvndx[2]; /* tv index */ + + } x_sym; + + union + { + char x_fname[E_FILNMLEN]; + + struct + { + char x_zeroes[4]; + char x_offset[4]; + } x_n; + + } x_file; + + struct + { + char x_scnlen[4]; /* section length */ + char x_nreloc[2]; /* # relocation entries */ + char x_nlinno[2]; /* # line numbers */ +#ifdef INCLUDE_COMDAT_FIELDS_IN_AUXENT + char x_checksum[4]; /* section COMDAT checksum */ + char x_associated[2]; /* COMDAT associated section index */ + char x_comdat[1]; /* COMDAT selection number */ +#endif + } x_scn; + + struct + { + char x_tvfill[4]; /* tv fill value */ + char x_tvlen[2]; /* length of .tv */ + char x_tvran[2][2]; /* tv range */ + } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ +} ATTRIBUTE_PACKED ; + +#define AUXENT union external_auxent +#define AUXESZ 18 + +#define _ETEXT "etext" + +#endif /* not DO_NOT_DEFINE_AUXENT */ + +#endif /* COFF_EXTERNAL_H */ diff --git a/support/sdbinutils/include/coff/go32exe.h b/support/sdbinutils/include/coff/go32exe.h new file mode 100644 index 0000000..e27e1bf --- /dev/null +++ b/support/sdbinutils/include/coff/go32exe.h @@ -0,0 +1,36 @@ +/* COFF information for PC running go32. + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +struct external_filehdr_go32_exe + { + char stub[GO32_STUBSIZE]; /* the stub to load the image */ + /* the standard COFF header */ + char f_magic[2]; /* magic number */ + char f_nscns[2]; /* number of sections */ + char f_timdat[4]; /* time & date stamp */ + char f_symptr[4]; /* file pointer to symtab */ + char f_nsyms[4]; /* number of symtab entries */ + char f_opthdr[2]; /* sizeof(optional hdr) */ + char f_flags[2]; /* flags */ + }; + +#undef FILHDR +#define FILHDR struct external_filehdr_go32_exe +#undef FILHSZ +#define FILHSZ GO32_STUBSIZE+20 diff --git a/support/sdbinutils/include/coff/h8300.h b/support/sdbinutils/include/coff/h8300.h new file mode 100644 index 0000000..78b0ee6 --- /dev/null +++ b/support/sdbinutils/include/coff/h8300.h @@ -0,0 +1,55 @@ +/* coff information for Renesas H8/300 and H8/300-H + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#define L_LNNO_SIZE 4 +#include "coff/external.h" + +#define H8300MAGIC 0x8300 +#define H8300HMAGIC 0x8301 +#define H8300SMAGIC 0x8302 +#define H8300HNMAGIC 0x8303 +#define H8300SNMAGIC 0x8304 + +#define H8300BADMAG(x) (((x).f_magic != H8300MAGIC)) +#define H8300HBADMAG(x) (((x).f_magic != H8300HMAGIC)) +#define H8300SBADMAG(x) (((x).f_magic != H8300SMAGIC)) +#define H8300HNBADMAG(x) (((x).f_magic != H8300HNMAGIC)) +#define H8300SNBADMAG(x) (((x).f_magic != H8300SNMAGIC)) + +/* Relocation directives. */ + +/* The external reloc has an offset field, because some of the reloc + types on the h8 don't have room in the instruction for the entire + offset - eg the strange jump and high page addressing modes. */ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_offset[4]; + char r_type[2]; + char r_stuff[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 16 + + + + diff --git a/support/sdbinutils/include/coff/h8500.h b/support/sdbinutils/include/coff/h8500.h new file mode 100644 index 0000000..18a1ae1 --- /dev/null +++ b/support/sdbinutils/include/coff/h8500.h @@ -0,0 +1,47 @@ +/* coff information for Renesas H8/500 + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#define L_LNNO_SIZE 4 +#include "coff/external.h" + +#define H8500MAGIC 0x8500 + +#define H8500BADMAG(x) ((0xffff && ((x).f_magic) != H8500MAGIC)) + +/********************** RELOCATION DIRECTIVES **********************/ + +/* The external reloc has an offset field, because some of the reloc + types on the h8 don't have room in the instruction for the entire + offset - eg the strange jump and high page addressing modes. */ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_offset[4]; + char r_type[2]; + char r_stuff[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 16 + + + + diff --git a/support/sdbinutils/include/coff/i386.h b/support/sdbinutils/include/coff/i386.h new file mode 100644 index 0000000..f1b2444 --- /dev/null +++ b/support/sdbinutils/include/coff/i386.h @@ -0,0 +1,74 @@ +/* coff information for Intel 386/486. + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#define L_LNNO_SIZE 2 +#define INCLUDE_COMDAT_FIELDS_IN_AUXENT +#include "coff/external.h" + +#define COFF_PAGE_SIZE 0x1000 + +/* Bits for f_flags: + F_RELFLG Relocation info stripped from file + F_EXEC File is executable (no unresolved external references) + F_LNNO Line numbers stripped from file + F_LSYMS Local symbols stripped from file + F_AR32WR File has byte ordering of an AR32WR machine (e.g. vax). */ + +#define F_RELFLG (0x0001) +#define F_EXEC (0x0002) +#define F_LNNO (0x0004) +#define F_LSYMS (0x0008) + +#define I386MAGIC 0x14c +#define I386PTXMAGIC 0x154 +#define I386AIXMAGIC 0x175 + +/* This is Lynx's all-platform magic number for executables. */ + +#define LYNXCOFFMAGIC 0415 + +#define I386BADMAG(x) ( ((x).f_magic != I386MAGIC) \ + && (x).f_magic != I386AIXMAGIC \ + && (x).f_magic != I386PTXMAGIC \ + && (x).f_magic != LYNXCOFFMAGIC) + +#define OMAGIC 0404 /* Object files, eg as output. */ +#define ZMAGIC 0413 /* Demand load format, eg normal ld output. */ +#define STMAGIC 0401 /* Target shlib. */ +#define SHMAGIC 0443 /* Host shlib. */ + +/* Define some NT default values. */ +/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */ +#define NT_SECTION_ALIGNMENT 0x1000 +#define NT_FILE_ALIGNMENT 0x200 +#define NT_DEF_RESERVE 0x100000 +#define NT_DEF_COMMIT 0x1000 + +/* Relocation directives. */ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 10 + diff --git a/support/sdbinutils/include/coff/i860.h b/support/sdbinutils/include/coff/i860.h new file mode 100644 index 0000000..3afa38f --- /dev/null +++ b/support/sdbinutils/include/coff/i860.h @@ -0,0 +1,87 @@ +/* COFF information for the Intel i860. + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file was hacked from i386.h [dolan@ssd.intel.com] */ + +#define L_LNNO_SIZE 2 +#include "coff/external.h" + +/* Bits for f_flags: + F_RELFLG relocation info stripped from file + F_EXEC file is executable (no unresolved external references) + F_LNNO line numbers stripped from file + F_LSYMS local symbols stripped from file + F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */ + +#define F_RELFLG (0x0001) +#define F_EXEC (0x0002) +#define F_LNNO (0x0004) +#define F_LSYMS (0x0008) + +#define I860MAGIC 0x14d + +#define I860BADMAG(x) ((x).f_magic != I860MAGIC) + +#undef AOUTSZ +#define AOUTSZ 36 + +/* FIXME: What are the a.out magic numbers? */ + +#define _ETEXT "etext" + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 10 + +/* The relocation directory entry types. + PAIR : The low half that follows relates to the preceding HIGH[ADJ]. + HIGH : The high half of a 32-bit constant. + LOWn : The low half, insn bits 15..(n-1), 2^n-byte aligned. + SPLITn : The low half, insn bits 20..16 and 10..(n-1), 2^n-byte aligned. + HIGHADJ: Similar to HIGH, but with adjustment. + BRADDR : 26-bit branch displacement. + + Note: The Intel assembler manual lists LOW4 as one of the + relocation types, but it appears to be useless for the i860. + We will recognize it anyway, just in case it actually appears in + any object files. */ + +enum { + COFF860_R_PAIR = 0x1c, + COFF860_R_HIGH = 0x1e, + COFF860_R_LOW0 = 0x1f, + COFF860_R_LOW1 = 0x20, + COFF860_R_LOW2 = 0x21, + COFF860_R_LOW3 = 0x22, + COFF860_R_LOW4 = 0x23, + COFF860_R_SPLIT0 = 0x24, + COFF860_R_SPLIT1 = 0x25, + COFF860_R_SPLIT2 = 0x26, + COFF860_R_HIGHADJ = 0x27, + COFF860_R_BRADDR = 0x28 +}; + diff --git a/support/sdbinutils/include/coff/i960.h b/support/sdbinutils/include/coff/i960.h new file mode 100644 index 0000000..19d35f9 --- /dev/null +++ b/support/sdbinutils/include/coff/i960.h @@ -0,0 +1,320 @@ +/* coff information for 80960. Origins: Intel corp, natch. + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* NOTE: Tagentries (cf TAGBITS) are no longer used by the 960 */ + +/********************** FILE HEADER **********************/ + +struct external_filehdr +{ + char f_magic[2]; /* magic number */ + char f_nscns[2]; /* number of sections */ + char f_timdat[4]; /* time & date stamp */ + char f_symptr[4]; /* file pointer to symtab */ + char f_nsyms[4]; /* number of symtab entries */ + char f_opthdr[2]; /* sizeof(optional hdr) */ + char f_flags[2]; /* flags */ +}; + +#define OMAGIC (0407) /* old impure format. data immediately + follows text. both sections are rw. */ +#define NMAGIC (0410) /* split i&d, read-only text */ + +/* +* Intel 80960 (I960) processor flags. +* F_I960TYPE == mask for processor type field. +*/ + +#define F_I960TYPE (0xf000) +#define F_I960CORE (0x1000) +#define F_I960KB (0x2000) +#define F_I960SB (0x2000) +#define F_I960MC (0x3000) +#define F_I960XA (0x4000) +#define F_I960CA (0x5000) +#define F_I960KA (0x6000) +#define F_I960SA (0x6000) +#define F_I960JX (0x7000) +#define F_I960HX (0x8000) + + +/** i80960 Magic Numbers +*/ + +#define I960ROMAGIC (0x160) /* read-only text segments */ +#define I960RWMAGIC (0x161) /* read-write text segments */ + +#define I960BADMAG(x) (((x).f_magic!=I960ROMAGIC) && ((x).f_magic!=I960RWMAGIC)) + +#define FILHDR struct external_filehdr +#define FILHSZ 20 + +/********************** AOUT "OPTIONAL HEADER" **********************/ + +typedef struct +{ + unsigned long phys_addr; + unsigned long bitarray; +} TAGBITS; + +typedef struct +{ + char magic[2]; /* type of file */ + char vstamp[2]; /* version stamp */ + char tsize[4]; /* text size in bytes, padded to FW bdry*/ + char dsize[4]; /* initialized data " " */ + char bsize[4]; /* uninitialized data " " */ + char entry[4]; /* entry pt. */ + char text_start[4]; /* base of text used for this file */ + char data_start[4]; /* base of data used for this file */ + char tagentries[4]; /* number of tag entries to follow */ +} +AOUTHDR; + +/* return a pointer to the tag bits array */ + +#define TAGPTR(aout) ((TAGBITS *) (&(aout.tagentries)+1)) + +/* compute size of a header */ + +/*#define AOUTSZ(aout) (sizeof(AOUTHDR)+(aout.tagentries*sizeof(TAGBITS)))*/ +#define AOUTSZ 32 +#define AOUTHDRSZ 32 + + +/********************** SECTION HEADER **********************/ + +struct external_scnhdr +{ + char s_name[8]; /* section name */ + char s_paddr[4]; /* physical address, aliased s_nlib */ + char s_vaddr[4]; /* virtual address */ + char s_size[4]; /* section size */ + char s_scnptr[4]; /* file ptr to raw data for section */ + char s_relptr[4]; /* file ptr to relocation */ + char s_lnnoptr[4]; /* file ptr to line numbers */ + char s_nreloc[2]; /* number of relocation entries */ + char s_nlnno[2]; /* number of line number entries*/ + char s_flags[4]; /* flags */ + char s_align[4]; /* section alignment */ +}; + + +#define SCNHDR struct external_scnhdr +#define SCNHSZ 44 + +/* + * names of "special" sections + */ +#define _TEXT ".text" +#define _DATA ".data" +#define _BSS ".bss" + +/********************** LINE NUMBERS **********************/ + +/* 1 line number entry for every "breakpointable" source line in a section. + * Line numbers are grouped on a per function basis; first entry in a function + * grouping will have l_lnno = 0 and in place of physical address will be the + * symbol table index of the function name. + */ +struct external_lineno +{ + union + { + char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ + char l_paddr[4]; /* (physical) address of line number */ + } l_addr; + + char l_lnno[2]; /* line number */ + char padding[2]; /* force alignment */ +}; + + +#define LINENO struct external_lineno +#define LINESZ 8 + +/********************** SYMBOLS **********************/ + +#define E_SYMNMLEN 8 /* # characters in a symbol name */ +#define E_FILNMLEN 14 /* # characters in a file name */ +#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ + +struct external_syment +{ + union + { + char e_name[E_SYMNMLEN]; + + struct + { + char e_zeroes[4]; + char e_offset[4]; + } e; + } e; + + char e_value[4]; + char e_scnum[2]; + char e_flags[2]; + char e_type[4]; + char e_sclass[1]; + char e_numaux[1]; + char pad2[2]; +}; + +#define N_BTMASK (0x1f) +#define N_TMASK (0x60) +#define N_BTSHFT (5) +#define N_TSHIFT (2) + +union external_auxent +{ + struct + { + char x_tagndx[4]; /* str, un, or enum tag indx */ + + union + { + struct + { + char x_lnno[2]; /* declaration line number */ + char x_size[2]; /* str/union/array size */ + } x_lnsz; + + char x_fsize[4]; /* size of function */ + + } x_misc; + + union + { + struct /* if ISFCN, tag, or .bb */ + { + char x_lnnoptr[4]; /* ptr to fcn line # */ + char x_endndx[4]; /* entry ndx past block end */ + } x_fcn; + + struct /* if ISARY, up to 4 dimen. */ + { + char x_dimen[E_DIMNUM][2]; + } x_ary; + + } x_fcnary; + + char x_tvndx[2]; /* tv index */ + + } x_sym; + + union + { + char x_fname[E_FILNMLEN]; + + struct + { + char x_zeroes[4]; + char x_offset[4]; + } x_n; + + } x_file; + + struct + { + char x_scnlen[4]; /* section length */ + char x_nreloc[2]; /* # relocation entries */ + char x_nlinno[2]; /* # line numbers */ + + } x_scn; + + struct + { + char x_tvfill[4]; /* tv fill value */ + char x_tvlen[2]; /* length of .tv */ + char x_tvran[2][2]; /* tv range */ + + } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ + + /****************************************** + * I960-specific *2nd* aux. entry formats + ******************************************/ + struct + { + /* This is a very old typo that keeps getting propagated. */ +#define x_stdindx x_stindx + char x_stindx[4]; /* sys. table entry */ + } x_sc; /* system call entry */ + + struct + { + char x_balntry[4]; /* BAL entry point */ + } x_bal; /* BAL-callable function */ + + struct + { + char x_timestamp[4]; /* time stamp */ + char x_idstring[20]; /* producer identity string */ + + } x_ident; /* Producer ident info */ +}; + +#define SYMENT struct external_syment +#define SYMESZ 24 +#define AUXENT union external_auxent +#define AUXESZ 24 + +# define _ETEXT "_etext" + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; + char pad[2]; +}; + +/* r_type values for the i960. */ + +/* The i960 uses R_RELLONG, which is defined in internal.h as 0x11. + It is an absolute 32 bit relocation. */ + +#define R_IPRMED (0x19) /* 24-bit ip-relative relocation */ +#define R_OPTCALL (0x1b) /* 32-bit optimizable call (leafproc/sysproc) */ +#define R_OPTCALLX (0x1c) /* 64-bit optimizable call (leafproc/sysproc) */ + +/* The following relocation types are defined use by relaxing linkers, + which convert 32 bit calls (which require a 64 bit instruction) + into 24 bit calls (which require a 32 bit instruction) when + possible. It will be possible whenever the target of the call is + within a 24 bit range of the call instruction. + + It is always safe to ignore these relocations. They only serve to + mark points which the relaxing linker will have to consider. The + assembler must ensure that the correct code is generated even if + the relocations are ignored. In particular, this means that the + R_IPR13 relocation may not appear with an external symbol. */ + +#define R_IPR13 (0x1d) /* 13 bit ip-relative branch */ +#define R_ALIGN (0x1e) /* alignment marker. This has no + associated symbol. Instead, the + r_symndx field indicates the + require alignment at this point in + the file. It must be a power of 2. */ + +#define RELOC struct external_reloc +#define RELSZ 12 + diff --git a/support/sdbinutils/include/coff/ia64.h b/support/sdbinutils/include/coff/ia64.h new file mode 100644 index 0000000..6c3b83b --- /dev/null +++ b/support/sdbinutils/include/coff/ia64.h @@ -0,0 +1,89 @@ +/* coff information for HP/Intel IA-64. + + Copyright (C) 2000-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#define DO_NOT_DEFINE_AOUTHDR +#define L_LNNO_SIZE 2 +#define INCLUDE_COMDAT_FIELDS_IN_AUXENT +#include "coff/external.h" + +#define IA64MAGIC 0x200 + +#define IA64BADMAG(x) (((x).f_magic != IA64MAGIC)) + +/* Bits for f_flags: + * F_RELFLG relocation info stripped from file + * F_EXEC file is executable (no unresolved external references) + * F_LNNO line numbers stripped from file + * F_LSYMS local symbols stripped from file + * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax) + */ + +#define F_RELFLG (0x0001) +#define F_EXEC (0x0002) +#define F_LNNO (0x0004) +#define F_LSYMS (0x0008) + +/********************** AOUT "OPTIONAL HEADER" **********************/ +typedef struct +{ + char magic[2]; /* type of file */ + char vstamp[2]; /* version stamp */ + char tsize[4]; /* text size in bytes, padded to FW bdry*/ + char dsize[4]; /* initialized data " " */ + char bsize[4]; /* uninitialized data " " */ + char entry[4]; /* entry pt. */ + char text_start[4]; /* base of text used for this file */ +#ifndef BFD64 + char data_start[4]; /* base of data used for this file */ +#endif +} +AOUTHDR; + +#define PE32MAGIC 0x10b /* 32-bit image */ +#define PE32PMAGIC 0x20b /* 32-bit image inside 64-bit address space */ + +#define PE32PBADMAG(x) (((x).f_magic != PE32PMAGIC)) + +#define AOUTSZ 108 +#define AOUTHDRSZ 108 + +#define OMAGIC 0404 /* object files, eg as output */ +#define ZMAGIC 0413 /* demand load format, eg normal ld output */ +#define STMAGIC 0401 /* target shlib */ +#define SHMAGIC 0443 /* host shlib */ + +/* define some NT default values */ +/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */ +#define NT_SECTION_ALIGNMENT 0x1000 +#define NT_FILE_ALIGNMENT 0x200 +#define NT_DEF_RESERVE 0x100000 +#define NT_DEF_COMMIT 0x1000 + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 10 + diff --git a/support/sdbinutils/include/coff/internal.h b/support/sdbinutils/include/coff/internal.h new file mode 100644 index 0000000..81a84c8 --- /dev/null +++ b/support/sdbinutils/include/coff/internal.h @@ -0,0 +1,871 @@ +/* Internal format of COFF object file data structures, for GNU BFD. + This file is part of BFD, the Binary File Descriptor library. + + Copyright (C) 1999-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef GNU_COFF_INTERNAL_H +#define GNU_COFF_INTERNAL_H 1 + +/* First, make "signed char" work, even on old compilers. */ +#ifndef signed +#ifndef __STDC__ +#define signed /**/ +#endif +#endif + +/********************** FILE HEADER **********************/ + +/* extra stuff in a PE header. */ + +struct internal_extra_pe_filehdr +{ + /* DOS header data follows for PE stuff */ + unsigned short e_magic; /* Magic number, 0x5a4d */ + unsigned short e_cblp; /* Bytes on last page of file, 0x90 */ + unsigned short e_cp; /* Pages in file, 0x3 */ + unsigned short e_crlc; /* Relocations, 0x0 */ + unsigned short e_cparhdr; /* Size of header in paragraphs, 0x4 */ + unsigned short e_minalloc; /* Minimum extra paragraphs needed, 0x0 */ + unsigned short e_maxalloc; /* Maximum extra paragraphs needed, 0xFFFF */ + unsigned short e_ss; /* Initial (relative) SS value, 0x0 */ + unsigned short e_sp; /* Initial SP value, 0xb8 */ + unsigned short e_csum; /* Checksum, 0x0 */ + unsigned short e_ip; /* Initial IP value, 0x0 */ + unsigned short e_cs; /* Initial (relative) CS value, 0x0 */ + unsigned short e_lfarlc; /* File address of relocation table, 0x40 */ + unsigned short e_ovno; /* Overlay number, 0x0 */ + unsigned short e_res[4]; /* Reserved words, all 0x0 */ + unsigned short e_oemid; /* OEM identifier (for e_oeminfo), 0x0 */ + unsigned short e_oeminfo; /* OEM information; e_oemid specific, 0x0 */ + unsigned short e_res2[10]; /* Reserved words, all 0x0 */ + bfd_vma e_lfanew; /* File address of new exe header, 0x80 */ + unsigned long dos_message[16]; /* text which always follows dos header */ + bfd_vma nt_signature; /* required NT signature, 0x4550 */ +}; + +#define GO32_STUBSIZE 2048 + +struct internal_filehdr +{ + struct internal_extra_pe_filehdr pe; + + /* coff-stgo32 EXE stub header before BFD tdata has been allocated. + Its data is kept in INTERNAL_FILEHDR.GO32STUB afterwards. + + F_GO32STUB is set iff go32stub contains a valid data. Artifical headers + created in BFD have no pre-set go32stub. */ + char go32stub[GO32_STUBSIZE]; + + /* Standard coff internal info. */ + unsigned short f_magic; /* magic number */ + unsigned int f_nscns; /* number of sections */ + long f_timdat; /* time & date stamp */ + bfd_vma f_symptr; /* file pointer to symtab */ + long f_nsyms; /* number of symtab entries */ + unsigned short f_opthdr; /* sizeof(optional hdr) */ + unsigned short f_flags; /* flags */ + unsigned short f_target_id; /* (TI COFF specific) */ +}; + + +/* Bits for f_flags: + F_RELFLG relocation info stripped from file + F_EXEC file is executable (no unresolved external references) + F_LNNO line numbers stripped from file + F_LSYMS local symbols stripped from file + F_AR16WR file is 16-bit little-endian + F_AR32WR file is 32-bit little-endian + F_AR32W file is 32-bit big-endian + F_DYNLOAD rs/6000 aix: dynamically loadable w/imports & exports + F_SHROBJ rs/6000 aix: file is a shared object + F_DLL PE format DLL + F_GO32STUB Field go32stub contains valid data. */ + +#define F_RELFLG (0x0001) +#define F_EXEC (0x0002) +#define F_LNNO (0x0004) +#define F_LSYMS (0x0008) +#define F_AR16WR (0x0080) +#define F_AR32WR (0x0100) +#define F_AR32W (0x0200) +#define F_DYNLOAD (0x1000) +#define F_SHROBJ (0x2000) +#define F_DLL (0x2000) +#define F_GO32STUB (0x4000) + +/* Extra structure which is used in the optional header. */ +typedef struct _IMAGE_DATA_DIRECTORY +{ + bfd_vma VirtualAddress; + long Size; +} IMAGE_DATA_DIRECTORY; +#define PE_EXPORT_TABLE 0 +#define PE_IMPORT_TABLE 1 +#define PE_RESOURCE_TABLE 2 +#define PE_EXCEPTION_TABLE 3 +#define PE_CERTIFICATE_TABLE 4 +#define PE_BASE_RELOCATION_TABLE 5 +#define PE_DEBUG_DATA 6 +#define PE_ARCHITECTURE 7 +#define PE_GLOBAL_PTR 8 +#define PE_TLS_TABLE 9 +#define PE_LOAD_CONFIG_TABLE 10 +#define PE_BOUND_IMPORT_TABLE 11 +#define PE_IMPORT_ADDRESS_TABLE 12 +#define PE_DELAY_IMPORT_DESCRIPTOR 13 +#define PE_CLR_RUNTIME_HEADER 14 +/* DataDirectory[15] is currently reserved, so no define. */ +#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 + +/* Extra structure used in debug directory. */ +struct internal_IMAGE_DEBUG_DIRECTORY +{ + unsigned long Characteristics; + unsigned long TimeDateStamp; + unsigned short MajorVersion; + unsigned short MinorVersion; + unsigned long Type; + unsigned long SizeOfData; + unsigned long AddressOfRawData; + unsigned long PointerToRawData; +}; + +#define PE_IMAGE_DEBUG_TYPE_UNKNOWN 0 +#define PE_IMAGE_DEBUG_TYPE_COFF 1 +#define PE_IMAGE_DEBUG_TYPE_CODEVIEW 2 +#define PE_IMAGE_DEBUG_TYPE_FPO 3 +#define PE_IMAGE_DEBUG_TYPE_MISC 4 +#define PE_IMAGE_DEBUG_TYPE_EXCEPTION 5 +#define PE_IMAGE_DEBUG_TYPE_FIXUP 6 +#define PE_IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7 +#define PE_IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8 +#define PE_IMAGE_DEBUG_TYPE_BORLAND 9 +#define PE_IMAGE_DEBUG_TYPE_RESERVED10 10 +#define PE_IMAGE_DEBUG_TYPE_CLSID 11 + +/* Extra structure for a codeview debug record */ +#define CV_INFO_SIGNATURE_LENGTH 16 + +typedef struct _CODEVIEW_INFO +{ + unsigned long CVSignature; + char Signature[CV_INFO_SIGNATURE_LENGTH]; + unsigned int SignatureLength; + unsigned long Age; + // char PdbFileName[]; +} CODEVIEW_INFO; + +/* Default image base for NT. */ +#define NT_EXE_IMAGE_BASE 0x400000 +#define NT_DLL_IMAGE_BASE 0x10000000 + +/* Default image base for BeOS. */ +#define BEOS_EXE_IMAGE_BASE 0x80000000 +#define BEOS_DLL_IMAGE_BASE 0x10000000 + +/* Extra stuff in a PE aouthdr */ + +#define PE_DEF_SECTION_ALIGNMENT 0x1000 +#ifndef PE_DEF_FILE_ALIGNMENT +# define PE_DEF_FILE_ALIGNMENT 0x200 +#endif + +struct internal_extra_pe_aouthdr +{ + /* FIXME: The following entries are in AOUTHDR. But they aren't + available internally in bfd. We add them here so that objdump + can dump them. */ + /* The state of the image file. */ + short Magic; + /* Linker major version number. */ + char MajorLinkerVersion; + /* Linker minor version number. */ + char MinorLinkerVersion; + /* Total size of all code sections. */ + long SizeOfCode; + /* Total size of all initialized data sections. */ + long SizeOfInitializedData; + /* Total size of all uninitialized data sections. */ + long SizeOfUninitializedData; + /* Address of entry point relative to image base. */ + bfd_vma AddressOfEntryPoint; + /* Address of the first code section relative to image base. */ + bfd_vma BaseOfCode; + /* Address of the first data section relative to image base. */ + bfd_vma BaseOfData; + + /* PE stuff */ + bfd_vma ImageBase; /* Address of specific location in memory that + file is located, NT default 0x10000. */ + + bfd_vma SectionAlignment; /* Section alignment default 0x1000. */ + bfd_vma FileAlignment; /* File alignment default 0x200. */ + short MajorOperatingSystemVersion; /* Minimum version of the operating. */ + short MinorOperatingSystemVersion; /* System req'd for exe, default to 1. */ + short MajorImageVersion; /* User defineable field to store version of */ + short MinorImageVersion; /* exe or dll being created, default to 0. */ + short MajorSubsystemVersion; /* Minimum subsystem version required to */ + short MinorSubsystemVersion; /* run exe; default to 3.1. */ + long Reserved1; /* Seems to be 0. */ + long SizeOfImage; /* Size of memory to allocate for prog. */ + long SizeOfHeaders; /* Size of PE header and section table. */ + long CheckSum; /* Set to 0. */ + short Subsystem; + + /* Type of subsystem exe uses for user interface, + possible values: + 1 - NATIVE Doesn't require a subsystem + 2 - WINDOWS_GUI runs in Windows GUI subsystem + 3 - WINDOWS_CUI runs in Windows char sub. (console app) + 5 - OS2_CUI runs in OS/2 character subsystem + 7 - POSIX_CUI runs in Posix character subsystem. */ + unsigned short DllCharacteristics; /* flags for DLL init. */ + bfd_vma SizeOfStackReserve; /* Amount of memory to reserve. */ + bfd_vma SizeOfStackCommit; /* Amount of memory initially committed for + initial thread's stack, default is 0x1000. */ + bfd_vma SizeOfHeapReserve; /* Amount of virtual memory to reserve and */ + bfd_vma SizeOfHeapCommit; /* commit, don't know what to defaut it to. */ + long LoaderFlags; /* Can probably set to 0. */ + long NumberOfRvaAndSizes; /* Number of entries in next entry, 16. */ + IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; +}; + +/********************** AOUT "OPTIONAL HEADER" **********************/ +struct internal_aouthdr +{ + short magic; /* type of file */ + short vstamp; /* version stamp */ + bfd_vma tsize; /* text size in bytes, padded to FW bdry*/ + bfd_vma dsize; /* initialized data " " */ + bfd_vma bsize; /* uninitialized data " " */ + bfd_vma entry; /* entry pt. */ + bfd_vma text_start; /* base of text used for this file */ + bfd_vma data_start; /* base of data used for this file */ + + /* i960 stuff */ + unsigned long tagentries; /* number of tag entries to follow */ + + /* RS/6000 stuff */ + bfd_vma o_toc; /* address of TOC */ + short o_snentry; /* section number for entry point */ + short o_sntext; /* section number for text */ + short o_sndata; /* section number for data */ + short o_sntoc; /* section number for toc */ + short o_snloader; /* section number for loader section */ + short o_snbss; /* section number for bss */ + short o_algntext; /* max alignment for text */ + short o_algndata; /* max alignment for data */ + short o_modtype; /* Module type field, 1R,RE,RO */ + short o_cputype; /* Encoded CPU type */ + bfd_vma o_maxstack; /* max stack size allowed. */ + bfd_vma o_maxdata; /* max data size allowed. */ + + /* ECOFF stuff */ + bfd_vma bss_start; /* Base of bss section. */ + bfd_vma gp_value; /* GP register value. */ + unsigned long gprmask; /* General registers used. */ + unsigned long cprmask[4]; /* Coprocessor registers used. */ + unsigned long fprmask; /* Floating pointer registers used. */ + + /* Apollo stuff */ + long o_inlib; /* inlib data */ + long o_sri; /* Static Resource Information */ + long vid[2]; /* Version id */ + + struct internal_extra_pe_aouthdr pe; +}; + +/********************** STORAGE CLASSES **********************/ + +/* This used to be defined as -1, but now n_sclass is unsigned. */ +#define C_EFCN 0xff /* physical end of function */ +#define C_NULL 0 +#define C_AUTO 1 /* automatic variable */ +#define C_EXT 2 /* external symbol */ +#define C_STAT 3 /* static */ +#define C_REG 4 /* register variable */ +#define C_EXTDEF 5 /* external definition */ +#define C_LABEL 6 /* label */ +#define C_ULABEL 7 /* undefined label */ +#define C_MOS 8 /* member of structure */ +#define C_ARG 9 /* function argument */ +#define C_STRTAG 10 /* structure tag */ +#define C_MOU 11 /* member of union */ +#define C_UNTAG 12 /* union tag */ +#define C_TPDEF 13 /* type definition */ +#define C_USTATIC 14 /* undefined static */ +#define C_ENTAG 15 /* enumeration tag */ +#define C_MOE 16 /* member of enumeration */ +#define C_REGPARM 17 /* register parameter */ +#define C_FIELD 18 /* bit field */ +#define C_AUTOARG 19 /* auto argument */ +#define C_LASTENT 20 /* dummy entry (end of block) */ +#define C_BLOCK 100 /* ".bb" or ".eb" */ +#define C_FCN 101 /* ".bf" or ".ef" */ +#define C_EOS 102 /* end of structure */ +#define C_FILE 103 /* file name */ +#define C_LINE 104 /* line # reformatted as symbol table entry */ +#define C_ALIAS 105 /* duplicate tag */ +#define C_HIDDEN 106 /* ext symbol in dmert public lib */ +#define C_WEAKEXT 127 /* weak symbol -- GNU extension. */ + +/* New storage classes for TI COFF */ +#define C_UEXT 19 /* Tentative external definition */ +#define C_STATLAB 20 /* Static load time label */ +#define C_EXTLAB 21 /* External load time label */ +#define C_SYSTEM 23 /* System Wide variable */ + +/* New storage classes for WINDOWS_NT */ +#define C_SECTION 104 /* section name */ +#define C_NT_WEAK 105 /* weak external */ + + /* New storage classes for 80960 */ + +/* C_LEAFPROC is obsolete. Use C_LEAFEXT or C_LEAFSTAT */ +#define C_LEAFPROC 108 /* Leaf procedure, "call" via BAL */ + +#define C_SCALL 107 /* Procedure reachable via system call */ +#define C_LEAFEXT 108 /* External leaf */ +#define C_LEAFSTAT 113 /* Static leaf */ +#define C_OPTVAR 109 /* Optimized variable */ +#define C_DEFINE 110 /* Preprocessor #define */ +#define C_PRAGMA 111 /* Advice to compiler or linker */ +#define C_SEGMENT 112 /* 80960 segment name */ + + /* Storage classes for m88k */ +#define C_SHADOW 107 /* shadow symbol */ +#define C_VERSION 108 /* coff version symbol */ + + /* New storage classes for RS/6000 */ +#define C_HIDEXT 107 /* Un-named external symbol */ +#define C_BINCL 108 /* Marks beginning of include file */ +#define C_EINCL 109 /* Marks ending of include file */ +#define C_AIX_WEAKEXT 111 /* AIX definition of C_WEAKEXT. */ + +#define C_NULL_VALUE 0x00de1e00 /* Value for a C_NULL deleted entry. */ + +#if defined _AIX52 || defined AIX_WEAK_SUPPORT +#undef C_WEAKEXT +#define C_WEAKEXT C_AIX_WEAKEXT +#endif + + /* storage classes for stab symbols for RS/6000 */ +#define C_GSYM (0x80) +#define C_LSYM (0x81) +#define C_PSYM (0x82) +#define C_RSYM (0x83) +#define C_RPSYM (0x84) +#define C_STSYM (0x85) +#define C_TCSYM (0x86) +#define C_BCOMM (0x87) +#define C_ECOML (0x88) +#define C_ECOMM (0x89) +#define C_DECL (0x8c) +#define C_ENTRY (0x8d) +#define C_FUN (0x8e) +#define C_BSTAT (0x8f) +#define C_ESTAT (0x90) +#define C_GTLS (0x97) +#define C_STTLS (0x98) + +/* Storage classes for Thumb symbols */ +#define C_THUMBEXT (128 + C_EXT) /* 130 */ +#define C_THUMBSTAT (128 + C_STAT) /* 131 */ +#define C_THUMBLABEL (128 + C_LABEL) /* 134 */ +#define C_THUMBEXTFUNC (C_THUMBEXT + 20) /* 150 */ +#define C_THUMBSTATFUNC (C_THUMBSTAT + 20) /* 151 */ + +/* True if XCOFF symbols of class CLASS have auxillary csect information. */ +#define CSECT_SYM_P(CLASS) \ + ((CLASS) == C_EXT || (CLASS) == C_AIX_WEAKEXT || (CLASS) == C_HIDEXT) + +/********************** SECTION HEADER **********************/ + +#define SCNNMLEN (8) + +struct internal_scnhdr +{ + char s_name[SCNNMLEN]; /* section name */ + + /* Physical address, aliased s_nlib. + In the pei format, this field is the virtual section size + (the size of the section after being loaded int memory), + NOT the physical address. */ + bfd_vma s_paddr; + + bfd_vma s_vaddr; /* virtual address */ + bfd_vma s_size; /* section size */ + bfd_vma s_scnptr; /* file ptr to raw data for section */ + bfd_vma s_relptr; /* file ptr to relocation */ + bfd_vma s_lnnoptr; /* file ptr to line numbers */ + unsigned long s_nreloc; /* number of relocation entries */ + unsigned long s_nlnno; /* number of line number entries*/ + long s_flags; /* flags */ + long s_align; /* used on I960 */ + unsigned char s_page; /* TI COFF load page */ +}; + +/* s_flags "type". */ +#define STYP_REG (0x0000) /* "regular": allocated, relocated, loaded */ +#define STYP_DSECT (0x0001) /* "dummy": relocated only*/ +#define STYP_NOLOAD (0x0002) /* "noload": allocated, relocated, not loaded */ +#define STYP_GROUP (0x0004) /* "grouped": formed of input sections */ +#define STYP_PAD (0x0008) /* "padding": not allocated, not relocated, loaded */ +#define STYP_COPY (0x0010) /* "copy": for decision function used by field update; not allocated, not relocated, + loaded; reloc & lineno entries processed normally */ +#define STYP_TEXT (0x0020) /* section contains text only */ +#define S_SHRSEG (0x0020) /* In 3b Update files (output of ogen), sections which appear in SHARED segments of the Pfile + will have the S_SHRSEG flag set by ogen, to inform dufr that updating 1 copy of the proc. will + update all process invocations. */ +#define STYP_DATA (0x0040) /* section contains data only */ +#define STYP_BSS (0x0080) /* section contains bss only */ +#define S_NEWFCN (0x0100) /* In a minimal file or an update file, a new function (as compared with a replaced function) */ +#define STYP_INFO (0x0200) /* comment: not allocated not relocated, not loaded */ +#define STYP_OVER (0x0400) /* overlay: relocated not allocated or loaded */ +#define STYP_LIB (0x0800) /* for .lib: same as INFO */ +#define STYP_MERGE (0x2000) /* merge section -- combines with text, data or bss sections only */ +#define STYP_REVERSE_PAD (0x4000) /* section will be padded with no-op instructions + wherever padding is necessary and there is a + word of contiguous bytes beginning on a word + boundary. */ + +#define STYP_LIT 0x8020 /* Literal data (like STYP_TEXT) */ + + +/********************** LINE NUMBERS **********************/ + +/* 1 line number entry for every "breakpointable" source line in a section. + Line numbers are grouped on a per function basis; first entry in a function + grouping will have l_lnno = 0 and in place of physical address will be the + symbol table index of the function name. */ + +struct internal_lineno +{ + union + { + bfd_signed_vma l_symndx; /* function name symbol index, iff l_lnno == 0*/ + bfd_signed_vma l_paddr; /* (physical) address of line number */ + } l_addr; + unsigned long l_lnno; /* line number */ +}; + +/********************** SYMBOLS **********************/ + +#define SYMNMLEN 8 /* # characters in a symbol name */ +#define FILNMLEN 14 /* # characters in a file name */ +#define DIMNUM 4 /* # array dimensions in auxiliary entry */ + +struct internal_syment +{ + union + { + char _n_name[SYMNMLEN]; /* old COFF version */ + struct + { + bfd_hostptr_t _n_zeroes; /* new == 0 */ + bfd_hostptr_t _n_offset; /* offset into string table */ + } _n_n; + char *_n_nptr[2]; /* allows for overlaying */ + } _n; + bfd_vma n_value; /* value of symbol */ + int n_scnum; /* section number */ + unsigned short n_flags; /* copy of flags from filhdr */ + unsigned short n_type; /* type and derived type */ + unsigned char n_sclass; /* storage class */ + unsigned char n_numaux; /* number of aux. entries */ +}; + +#define n_name _n._n_name +#define n_zeroes _n._n_n._n_zeroes +#define n_offset _n._n_n._n_offset + +/* Relocatable symbols have number of the section in which they are defined, + or one of the following: */ + +#define N_UNDEF ((int)0) /* undefined symbol */ +#define N_ABS ((int)-1) /* value of symbol is absolute */ +#define N_DEBUG ((int)-2) /* debugging symbol -- value is meaningless */ +#define N_TV ((int)-3) /* indicates symbol needs preload transfer vector */ +#define P_TV ((int)-4) /* indicates symbol needs postload transfer vector*/ + +/* Type of a symbol, in low N bits of the word. */ + +#define T_NULL 0 +#define T_VOID 1 /* function argument (only used by compiler) */ +#define T_CHAR 2 /* character */ +#define T_SHORT 3 /* short integer */ +#define T_INT 4 /* integer */ +#define T_LONG 5 /* long integer */ +#define T_FLOAT 6 /* floating point */ +#define T_DOUBLE 7 /* double word */ +#define T_STRUCT 8 /* structure */ +#define T_UNION 9 /* union */ +#define T_ENUM 10 /* enumeration */ +#define T_MOE 11 /* member of enumeration*/ +#define T_UCHAR 12 /* unsigned character */ +#define T_USHORT 13 /* unsigned short */ +#define T_UINT 14 /* unsigned integer */ +#define T_ULONG 15 /* unsigned long */ +#define T_LNGDBL 16 /* long double */ + +/* Derived types, in n_type. */ + +#define DT_NON (0) /* no derived type */ +#define DT_PTR (1) /* pointer */ +#define DT_FCN (2) /* function */ +#define DT_ARY (3) /* array */ + +#define BTYPE(x) ((x) & N_BTMASK) +#define DTYPE(x) (((x) & N_TMASK) >> N_BTSHFT) + +#define ISPTR(x) \ + (((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_PTR << N_BTSHFT)) +#define ISFCN(x) \ + (((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_FCN << N_BTSHFT)) +#define ISARY(x) \ + (((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_ARY << N_BTSHFT)) +#define ISTAG(x) \ + ((x) == C_STRTAG || (x) == C_UNTAG || (x) == C_ENTAG) +#define DECREF(x) \ + ((((x) >> N_TSHIFT) & ~ N_BTMASK) | ((x) & N_BTMASK)) + +union internal_auxent +{ + struct + { + + union + { + long l; /* str, un, or enum tag indx */ + struct coff_ptr_struct *p; + } x_tagndx; + + union + { + struct + { + unsigned short x_lnno; /* declaration line number */ + unsigned short x_size; /* str/union/array size */ + } x_lnsz; + long x_fsize; /* size of function */ + } x_misc; + + union + { + struct + { /* if ISFCN, tag, or .bb */ + bfd_signed_vma x_lnnoptr; /* ptr to fcn line # */ + union + { /* entry ndx past block end */ + long l; + struct coff_ptr_struct *p; + } x_endndx; + } x_fcn; + + struct + { /* if ISARY, up to 4 dimen. */ + unsigned short x_dimen[DIMNUM]; + } x_ary; + } x_fcnary; + + unsigned short x_tvndx; /* tv index */ + } x_sym; + + union + { + /* PR 17754: We use to FILNMLEN for the size of the x_fname + array, but that cause problems as PE targets use a larger + value. We cannot use their definition of EFILNMLEN as this + header can be used without including any PE headers. */ + char x_fname[20]; + struct + { + long x_zeroes; + long x_offset; + } x_n; + } x_file; + + struct + { + long x_scnlen; /* section length */ + unsigned short x_nreloc; /* # relocation entries */ + unsigned short x_nlinno; /* # line numbers */ + unsigned long x_checksum; /* section COMDAT checksum for PE */ + unsigned short x_associated; /* COMDAT associated section index for PE */ + unsigned char x_comdat; /* COMDAT selection number for PE */ + } x_scn; + + struct + { + long x_tvfill; /* tv fill value */ + unsigned short x_tvlen; /* length of .tv */ + unsigned short x_tvran[2]; /* tv range */ + } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ + + /****************************************** + * RS/6000-specific auxent - last auxent for every external symbol + ******************************************/ + struct + { + union + { /* csect length or enclosing csect */ + bfd_signed_vma l; + struct coff_ptr_struct *p; + } x_scnlen; + long x_parmhash; /* parm type hash index */ + unsigned short x_snhash; /* sect num with parm hash */ + unsigned char x_smtyp; /* symbol align and type */ + /* 0-4 - Log 2 of alignment */ + /* 5-7 - symbol type */ + unsigned char x_smclas; /* storage mapping class */ + long x_stab; /* dbx stab info index */ + unsigned short x_snstab; /* sect num with dbx stab */ + } x_csect; /* csect definition information */ + +/* x_smtyp values: */ + +#define SMTYP_ALIGN(x) ((x) >> 3) /* log2 of alignment */ +#define SMTYP_SMTYP(x) ((x) & 0x7) /* symbol type */ +/* Symbol type values: */ +#define XTY_ER 0 /* External reference */ +#define XTY_SD 1 /* Csect definition */ +#define XTY_LD 2 /* Label definition */ +#define XTY_CM 3 /* .BSS */ +#define XTY_EM 4 /* Error message */ +#define XTY_US 5 /* "Reserved for internal use" */ + +/* x_smclas values: */ + +#define XMC_PR 0 /* Read-only program code */ +#define XMC_RO 1 /* Read-only constant */ +#define XMC_DB 2 /* Read-only debug dictionary table */ +#define XMC_TC 3 /* Read-write general TOC entry */ +#define XMC_UA 4 /* Read-write unclassified */ +#define XMC_RW 5 /* Read-write data */ +#define XMC_GL 6 /* Read-only global linkage */ +#define XMC_XO 7 /* Read-only extended operation */ +#define XMC_SV 8 /* Read-only supervisor call */ +#define XMC_BS 9 /* Read-write BSS */ +#define XMC_DS 10 /* Read-write descriptor csect */ +#define XMC_UC 11 /* Read-write unnamed Fortran common */ +#define XMC_TI 12 /* Read-only traceback index csect */ +#define XMC_TB 13 /* Read-only traceback table csect */ +/* 14 ??? */ +#define XMC_TC0 15 /* Read-write TOC anchor */ +#define XMC_TD 16 /* Read-write data in TOC */ + + /****************************************** + * I960-specific *2nd* aux. entry formats + ******************************************/ + struct + { + /* This is a very old typo that keeps getting propagated. */ +#define x_stdindx x_stindx + long x_stindx; /* sys. table entry */ + } x_sc; /* system call entry */ + + struct + { + unsigned long x_balntry; /* BAL entry point */ + } x_bal; /* BAL-callable function */ + + struct + { + unsigned long x_timestamp; /* time stamp */ + char x_idstring[20]; /* producer identity string */ + } x_ident; /* Producer ident info */ + +}; + +/********************** RELOCATION DIRECTIVES **********************/ + +struct internal_reloc +{ + bfd_vma r_vaddr; /* Virtual address of reference */ + long r_symndx; /* Index into symbol table */ + unsigned short r_type; /* Relocation type */ + unsigned char r_size; /* Used by RS/6000 and ECOFF */ + unsigned char r_extern; /* Used by ECOFF */ + unsigned long r_offset; /* Used by Alpha ECOFF, SPARC, others */ +}; + +/* X86-64 relocations. */ +#define R_AMD64_ABS 0 /* Reference is absolute, no relocation is necessary. */ +#define R_AMD64_DIR64 1 /* 64-bit address (VA). */ +#define R_AMD64_DIR32 2 /* 32-bit address (VA) R_DIR32. */ +#define R_AMD64_IMAGEBASE 3 /* 32-bit absolute ref w/o base R_IMAGEBASE. */ +#define R_AMD64_PCRLONG 4 /* 32-bit relative address from byte following reloc R_PCRLONG. */ +#define R_AMD64_PCRLONG_1 5 /* 32-bit relative address from byte distance 1 from reloc. */ +#define R_AMD64_PCRLONG_2 6 /* 32-bit relative address from byte distance 2 from reloc. */ +#define R_AMD64_PCRLONG_3 7 /* 32-bit relative address from byte distance 3 from reloc. */ +#define R_AMD64_PCRLONG_4 8 /* 32-bit relative address from byte distance 4 from reloc. */ +#define R_AMD64_PCRLONG_5 9 /* 32-bit relative address from byte distance 5 from reloc. */ +#define R_AMD64_SECTION 10 /* Section index. */ +#define R_AMD64_SECREL 11 /* 32 bit offset from base of section containing target R_SECREL. */ +#define R_AMD64_SECREL7 12 /* 7 bit unsigned offset from base of section containing target. */ +#define R_AMD64_TOKEN 13 /* 32 bit metadata token. */ +#define R_AMD64_PCRQUAD 14 /* Pseude PC64 relocation - Note: not specified by MS/AMD but need for gas pc-relative 64bit wide relocation generated by ELF. */ + +/* i386 Relocations. */ + +#define R_DIR16 1 +#define R_REL24 5 +#define R_DIR32 6 +#define R_IMAGEBASE 7 +#define R_SECREL32 11 +#define R_RELBYTE 15 +#define R_RELWORD 16 +#define R_RELLONG 17 +#define R_PCRBYTE 18 +#define R_PCRWORD 19 +#define R_PCRLONG 20 +#define R_PCR24 21 +#define R_IPRSHORT 24 +#define R_IPRLONG 26 +#define R_GETSEG 29 +#define R_GETPA 30 +#define R_TAGWORD 31 +#define R_JUMPTARG 32 /* strange 29k 00xx00xx reloc */ +#define R_PARTLS16 32 +#define R_PARTMS8 33 + +#define R_PCR16L 128 +#define R_PCR26L 129 +#define R_VRT16 130 +#define R_HVRT16 131 +#define R_LVRT16 132 +#define R_VRT32 133 + + +/* This reloc identifies mov.b instructions with a 16bit absolute + address. The linker tries to turn insns with this reloc into + an absolute 8-bit address. */ +#define R_MOV16B1 0x41 + +/* This reloc identifies mov.b instructions which had a 16bit + absolute address which have been shortened into a 8-bit + absolute address. */ +#define R_MOV16B2 0x42 + +/* This reloc identifies jmp insns with a 16bit target address; + the linker tries to turn these insns into bra insns with + an 8bit pc-relative target. */ +#define R_JMP1 0x43 + +/* This reloc identifies a bra with an 8-bit pc-relative + target that was formerly a jmp insn with a 16bit target. */ +#define R_JMP2 0x44 + +/* ??? */ +#define R_RELLONG_NEG 0x45 + +/* This reloc identifies jmp insns with a 24bit target address; + the linker tries to turn these insns into bra insns with + an 8bit pc-relative target. */ +#define R_JMPL1 0x46 + +/* This reloc identifies a bra with an 8-bit pc-relative + target that was formerly a jmp insn with a 24bit target. */ +#define R_JMPL2 0x47 + +/* This reloc identifies mov.b instructions with a 24bit absolute + address. The linker tries to turn insns with this reloc into + an absolute 8-bit address. */ + +#define R_MOV24B1 0x48 + +/* This reloc identifies mov.b instructions which had a 24bit + absolute address which have been shortened into a 8-bit + absolute address. */ +#define R_MOV24B2 0x49 + +/* An h8300 memory indirect jump/call. Forces the address of the jump/call + target into the function vector (in page zero), and the address of the + vector entry to be placed in the jump/call instruction. */ +#define R_MEM_INDIRECT 0x4a + +/* This reloc identifies a 16bit pc-relative branch target which was + shortened into an 8bit pc-relative branch target. */ +#define R_PCRWORD_B 0x4b + +/* This reloc identifies mov.[wl] instructions with a 32/24 bit + absolute address; the linker may turn this into a mov.[wl] + insn with a 16bit absolute address. */ +#define R_MOVL1 0x4c + +/* This reloc identifies mov.[wl] insns which formerly had + a 32/24bit absolute address and now have a 16bit absolute address. */ +#define R_MOVL2 0x4d + +/* This reloc identifies a bCC:8 which will have it's condition + inverted and its target redirected to the target of the branch + in the following insn. */ +#define R_BCC_INV 0x4e + +/* This reloc identifies a jmp instruction that has been deleted. */ +#define R_JMP_DEL 0x4f + +/* Z8k modes */ +#define R_IMM16 0x01 /* 16 bit abs */ +#define R_JR 0x02 /* jr 8 bit disp */ +#define R_IMM4L 0x23 /* low nibble */ +#define R_IMM8 0x22 /* 8 bit abs */ +#define R_IMM32 R_RELLONG /* 32 bit abs */ +#define R_CALL R_DA /* Absolute address which could be a callr */ +#define R_JP R_DA /* Absolute address which could be a jp */ +#define R_REL16 0x04 /* 16 bit PC rel */ +#define R_CALLR 0x05 /* callr 12 bit disp */ +#define R_SEG 0x10 /* set if in segmented mode */ +#define R_IMM4H 0x24 /* high nibble */ +#define R_DISP7 0x25 /* djnz displacement */ + +/* Z80 modes */ +#define R_OFF8 0x32 /* 8 bit signed abs, for (i[xy]+d) */ +#define R_IMM24 0x33 /* 24 bit abs */ +/* R_JR, R_IMM8, R_IMM16, R_IMM32 - as for Z8k */ + +/* H8500 modes */ + +#define R_H8500_IMM8 1 /* 8 bit immediate */ +#define R_H8500_IMM16 2 /* 16 bit immediate */ +#define R_H8500_PCREL8 3 /* 8 bit pcrel */ +#define R_H8500_PCREL16 4 /* 16 bit pcrel */ +#define R_H8500_HIGH8 5 /* high 8 bits of 24 bit address */ +#define R_H8500_LOW16 7 /* low 16 bits of 24 bit immediate */ +#define R_H8500_IMM24 6 /* 24 bit immediate */ +#define R_H8500_IMM32 8 /* 32 bit immediate */ +#define R_H8500_HIGH16 9 /* high 16 bits of 32 bit immediate */ + +/* W65 modes */ + +#define R_W65_ABS8 1 /* addr & 0xff */ +#define R_W65_ABS16 2 /* addr & 0xffff */ +#define R_W65_ABS24 3 /* addr & 0xffffff */ + +#define R_W65_ABS8S8 4 /* (addr >> 8) & 0xff */ +#define R_W65_ABS8S16 5 /* (addr >> 16) & 0xff */ + +#define R_W65_ABS16S8 6 /* (addr >> 8) & 0ffff */ +#define R_W65_ABS16S16 7 /* (addr >> 16) & 0ffff */ + +#define R_W65_PCR8 8 +#define R_W65_PCR16 9 + +#define R_W65_DP 10 /* direct page 8 bits only */ + +#endif /* GNU_COFF_INTERNAL_H */ diff --git a/support/sdbinutils/include/coff/m68k.h b/support/sdbinutils/include/coff/m68k.h new file mode 100644 index 0000000..b031279 --- /dev/null +++ b/support/sdbinutils/include/coff/m68k.h @@ -0,0 +1,82 @@ +/* coff information for M68K + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef GNU_COFF_M68K_H +#define GNU_COFF_M68K_H 1 + +#define L_LNNO_SIZE 2 +#include "coff/external.h" + +/* Motorola 68000/68008/68010/68020 */ +#define MC68MAGIC 0520 +#define MC68KWRMAGIC 0520 /* writeable text segments */ +#define MC68TVMAGIC 0521 +#define MC68KROMAGIC 0521 /* readonly shareable text segments */ +#define MC68KPGMAGIC 0522 /* demand paged text segments */ +#define M68MAGIC 0210 +#define M68TVMAGIC 0211 + +/* This is the magic of the Bull dpx/2 */ +#define MC68KBCSMAGIC 0526 + +/* This is Lynx's all-platform magic number for executables. */ + +#define LYNXCOFFMAGIC 0415 + +#define OMAGIC M68MAGIC + +/* This intentionally does not include MC68KBCSMAGIC; it only includes + magic numbers which imply that names do not have underscores. */ +#define M68KBADMAG(x) (((x).f_magic != MC68MAGIC) \ + && ((x).f_magic != MC68KWRMAGIC) \ + && ((x).f_magic != MC68TVMAGIC) \ + && ((x).f_magic != MC68KROMAGIC) \ + && ((x).f_magic != MC68KPGMAGIC) \ + && ((x).f_magic != M68MAGIC) \ + && ((x).f_magic != M68TVMAGIC) \ + && ((x).f_magic != LYNXCOFFMAGIC)) + +/* Magic numbers for the a.out header. */ + +#define PAGEMAGICEXECSWAPPED 0407 /* executable (swapped) */ +#define PAGEMAGICPEXECSWAPPED 0410 /* pure executable (swapped) */ +#define PAGEMAGICPEXECTSHLIB 0443 /* pure executable (target shared library) */ +#define PAGEMAGICPEXECPAGED 0413 /* pure executable (paged) */ + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; +#ifdef M68K_COFF_OFFSET + char r_offset[4]; +#endif +}; + +#define RELOC struct external_reloc + +#ifdef M68K_COFF_OFFSET +#define RELSZ 14 +#else +#define RELSZ 10 +#endif + +#endif /* GNU_COFF_M68K_H */ diff --git a/support/sdbinutils/include/coff/m88k.h b/support/sdbinutils/include/coff/m88k.h new file mode 100644 index 0000000..6c1e544 --- /dev/null +++ b/support/sdbinutils/include/coff/m88k.h @@ -0,0 +1,197 @@ +/* coff information for 88k bcs + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#define DO_NOT_DEFINE_SCNHDR +#define L_LNNO_SIZE 4 +#define DO_NOT_DEFINE_SYMENT +#define DO_NOT_DEFINE_AUXENT +#include "coff/external.h" + +#define MC88MAGIC 0540 /* 88k BCS executable */ +#define MC88DMAGIC 0541 /* DG/UX executable */ +#define MC88OMAGIC 0555 /* Object file */ + +#define MC88BADMAG(x) (((x).f_magic != MC88MAGIC) \ + && ((x).f_magic != MC88DMAGIC) \ + && ((x).f_magic != MC88OMAGIC)) + +#define PAGEMAGIC3 0414 /* Split i&d, zero mapped */ +#define PAGEMAGICBCS 0413 + +/********************** SECTION HEADER **********************/ + +struct external_scnhdr +{ + char s_name[8]; /* section name */ + char s_paddr[4]; /* physical address, aliased s_nlib */ + char s_vaddr[4]; /* virtual address */ + char s_size[4]; /* section size */ + char s_scnptr[4]; /* file ptr to raw data for section */ + char s_relptr[4]; /* file ptr to relocation */ + char s_lnnoptr[4]; /* file ptr to line numbers */ + char s_nreloc[4]; /* number of relocation entries */ + char s_nlnno[4]; /* number of line number entries*/ + char s_flags[4]; /* flags */ +}; + +#define SCNHDR struct external_scnhdr +#define SCNHSZ 44 + +/* Names of "special" sections. */ +#define _TEXT ".text" +#define _DATA ".data" +#define _BSS ".bss" +#define _COMMENT ".comment" + + +/********************** SYMBOLS **********************/ + +#define E_SYMNMLEN 8 /* # characters in a symbol name */ +#define E_FILNMLEN 14 /* # characters in a file name */ +#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ + +struct external_syment +{ + union + { + char e_name[E_SYMNMLEN]; + + struct + { + char e_zeroes[4]; + char e_offset[4]; + } e; + + } e; + + char e_value[4]; + char e_scnum[2]; + char e_type[2]; + char e_sclass[1]; + char e_numaux[1]; + char pad2[2]; +}; + +#define N_BTMASK 017 +#define N_TMASK 060 +#define N_BTSHFT 4 +#define N_TSHIFT 2 + +/* Note that this isn't the same shape as other coffs */ +union external_auxent +{ + struct + { + char x_tagndx[4]; /* str, un, or enum tag indx */ + /* 4 */ + + union + { + char x_fsize[4]; /* size of function */ + + struct + { + char x_lnno[4]; /* declaration line number */ + char x_size[4]; /* str/union/array size */ + } x_lnsz; + + } x_misc; + + /* 12 */ + union + { + struct /* if ISFCN, tag, or .bb */ + { + char x_lnnoptr[4]; /* ptr to fcn line # */ + char x_endndx[4]; /* entry ndx past block end */ + } x_fcn; + + struct /* if ISARY, up to 4 dimen. */ + { + char x_dimen[E_DIMNUM][2]; + } x_ary; + + } x_fcnary; + /* 20 */ + + } x_sym; + + union + { + char x_fname[E_FILNMLEN]; + + struct + { + char x_zeroes[4]; + char x_offset[4]; + } x_n; + + } x_file; + + struct + { + char x_scnlen[4]; /* section length */ + char x_nreloc[4]; /* # relocation entries */ + char x_nlinno[4]; /* # line numbers */ + } x_scn; + + struct + { + char x_tvfill[4]; /* tv fill value */ + char x_tvlen[2]; /* length of .tv */ + char x_tvran[2][2]; /* tv range */ + } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ +}; + +#define GET_LNSZ_SIZE(abfd, ext) \ + H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) +#define GET_LNSZ_LNNO(abfd, ext) \ + H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno) +#define PUT_LNSZ_LNNO(abfd, in, ext) \ + H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_lnno) +#define PUT_LNSZ_SIZE(abfd, in, ext) \ + H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_size) +#define GET_SCN_NRELOC(abfd, ext) \ + H_GET_32 (abfd, ext->x_scn.x_nreloc) +#define GET_SCN_NLINNO(abfd, ext) \ + H_GET_32 (abfd, ext->x_scn.x_nlinno) +#define PUT_SCN_NRELOC(abfd, in, ext) \ + H_PUT_32 (abfd, in, ext->x_scn.x_nreloc) +#define PUT_SCN_NLINNO(abfd, in, ext) \ + H_PUT_32 (abfd,in, ext->x_scn.x_nlinno) + +#define SYMENT struct external_syment +#define SYMESZ 20 +#define AUXENT union external_auxent +#define AUXESZ 20 + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; + char r_offset[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 12 + +#define NO_TVNDX diff --git a/support/sdbinutils/include/coff/mcore.h b/support/sdbinutils/include/coff/mcore.h new file mode 100644 index 0000000..fde0521 --- /dev/null +++ b/support/sdbinutils/include/coff/mcore.h @@ -0,0 +1,72 @@ +/* Motorola MCore support for BFD. + Copyright (C) 1999-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file holds definitions specific to the MCore COFF/PE ABI. */ + +#ifndef _COFF_MORE_H +#define _COFF_MORE_H + +#define INCLUDE_COMDAT_FIELDS_IN_AUXENT +#define L_LNNO_SIZE 2 +#include "coff/external.h" + +#define MCOREMAGIC 0xb00 /* I just made this up */ + +#define MCOREBADMAG(x) (((x).f_magic != MCOREMAGIC)) + +#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ + +#define IMAGE_REL_MCORE_ABSOLUTE 0x0000 +#define IMAGE_REL_MCORE_ADDR32 0x0001 +#define IMAGE_REL_MCORE_PCREL_IMM8BY4 0x0002 +#define IMAGE_REL_MCORE_PCREL_IMM11BY2 0x0003 +#define IMAGE_REL_MCORE_PCREL_IMM4BY2 0x0004 +#define IMAGE_REL_MCORE_PCREL_32 0x0005 +#define IMAGE_REL_MCORE_PCREL_JSR_IMM11BY2 0x0006 +#define IMAGE_REL_MCORE_RVA 0x0007 + +#define PEMCORE + +#define OMAGIC 0404 /* object files, eg as output */ +#define ZMAGIC 0413 /* demand load format, eg normal ld output */ +#define STMAGIC 0401 /* target shlib */ +#define SHMAGIC 0443 /* host shlib */ + +/* From winnt.h */ +#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b + +/* Define some NT default values. */ +#define NT_SECTION_ALIGNMENT 0x1000 +#define NT_FILE_ALIGNMENT 0x200 +#define NT_DEF_RESERVE 0x100000 +#define NT_DEF_COMMIT 0x1000 + +struct external_reloc +{ + char r_vaddr [4]; + char r_symndx [4]; + char r_type [2]; + char r_offset [4]; +}; + +#define RELOC struct external_reloc +#define RELSZ 14 + +#endif /* __COFF_MCORE_H */ diff --git a/support/sdbinutils/include/coff/mips.h b/support/sdbinutils/include/coff/mips.h new file mode 100644 index 0000000..e319c1d --- /dev/null +++ b/support/sdbinutils/include/coff/mips.h @@ -0,0 +1,344 @@ +/* ECOFF support on MIPS machines. + coff/ecoff.h must be included before this file. + + Copyright (C) 1999-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#define DO_NOT_DEFINE_AOUTHDR +#define L_LNNO_SIZE 4 +#include "coff/external.h" + +/* Magic numbers are defined in coff/ecoff.h. */ +#define MIPS_ECOFF_BADMAG(x) (((x).f_magic!=MIPS_MAGIC_1) && \ + ((x).f_magic!=MIPS_MAGIC_LITTLE) &&\ + ((x).f_magic!=MIPS_MAGIC_BIG) && \ + ((x).f_magic!=MIPS_MAGIC_LITTLE2) && \ + ((x).f_magic!=MIPS_MAGIC_BIG2) && \ + ((x).f_magic!=MIPS_MAGIC_LITTLE3) && \ + ((x).f_magic!=MIPS_MAGIC_BIG3)) + + +/********************** AOUT "OPTIONAL HEADER" **********************/ + +typedef struct external_aouthdr +{ + unsigned char magic[2]; /* type of file */ + unsigned char vstamp[2]; /* version stamp */ + unsigned char tsize[4]; /* text size in bytes, padded to FW bdry*/ + unsigned char dsize[4]; /* initialized data " " */ + unsigned char bsize[4]; /* uninitialized data " " */ + unsigned char entry[4]; /* entry pt. */ + unsigned char text_start[4]; /* base of text used for this file */ + unsigned char data_start[4]; /* base of data used for this file */ + unsigned char bss_start[4]; /* base of bss used for this file */ + unsigned char gprmask[4]; /* ?? */ + unsigned char cprmask[4][4]; /* ?? */ + unsigned char gp_value[4]; /* value for gp register */ +} AOUTHDR; + +/* compute size of a header */ + +#define AOUTSZ 56 +#define AOUTHDRSZ 56 + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc + { + unsigned char r_vaddr[4]; + unsigned char r_bits[4]; + }; + +#define RELOC struct external_reloc +#define RELSZ 8 + +/* MIPS ECOFF uses a packed 8 byte format for relocs. These constants + are used to unpack the r_bits field. */ + +#define RELOC_BITS0_SYMNDX_SH_LEFT_BIG 16 +#define RELOC_BITS0_SYMNDX_SH_LEFT_LITTLE 0 + +#define RELOC_BITS1_SYMNDX_SH_LEFT_BIG 8 +#define RELOC_BITS1_SYMNDX_SH_LEFT_LITTLE 8 + +#define RELOC_BITS2_SYMNDX_SH_LEFT_BIG 0 +#define RELOC_BITS2_SYMNDX_SH_LEFT_LITTLE 16 + +/* Originally, ECOFF used four bits for the reloc type and had three + reserved bits. Irix 4 added another bit for the reloc type, which + was easy because it was big endian and one of the spare bits became + the new most significant bit. To make this also work for little + endian ECOFF, we need to wrap one of the reserved bits around to + become the most significant bit of the reloc type. */ +#define RELOC_BITS3_TYPE_BIG 0x3E +#define RELOC_BITS3_TYPE_SH_BIG 1 +#define RELOC_BITS3_TYPE_LITTLE 0x78 +#define RELOC_BITS3_TYPE_SH_LITTLE 3 +#define RELOC_BITS3_TYPEHI_LITTLE 0x04 +#define RELOC_BITS3_TYPEHI_SH_LITTLE 2 + +#define RELOC_BITS3_EXTERN_BIG 0x01 +#define RELOC_BITS3_EXTERN_LITTLE 0x80 + +/* The r_type field in a reloc is one of the following values. I + don't know if any other values can appear. These seem to be all + that occur in the Ultrix 4.2 libraries. */ +#define MIPS_R_IGNORE 0 +#define MIPS_R_REFHALF 1 +#define MIPS_R_REFWORD 2 +#define MIPS_R_JMPADDR 3 +#define MIPS_R_REFHI 4 +#define MIPS_R_REFLO 5 +#define MIPS_R_GPREL 6 +#define MIPS_R_LITERAL 7 + +/* FIXME: This relocation is used (internally only) to represent branches + when assembling. It should never appear in output files, and + be removed. (It used to be used for embedded-PIC support.) */ +#define MIPS_R_PCREL16 12 + +/********************** STABS **********************/ + +#define MIPS_IS_STAB ECOFF_IS_STAB +#define MIPS_MARK_STAB ECOFF_MARK_STAB +#define MIPS_UNMARK_STAB ECOFF_UNMARK_STAB + +/********************** SYMBOLIC INFORMATION **********************/ + +/* Written by John Gilmore. */ + +/* ECOFF uses COFF-like section structures, but its own symbol format. + This file defines the symbol format in fields whose size and alignment + will not vary on different host systems. */ + +/* File header as a set of bytes */ + +struct hdr_ext +{ + unsigned char h_magic[2]; + unsigned char h_vstamp[2]; + unsigned char h_ilineMax[4]; + unsigned char h_cbLine[4]; + unsigned char h_cbLineOffset[4]; + unsigned char h_idnMax[4]; + unsigned char h_cbDnOffset[4]; + unsigned char h_ipdMax[4]; + unsigned char h_cbPdOffset[4]; + unsigned char h_isymMax[4]; + unsigned char h_cbSymOffset[4]; + unsigned char h_ioptMax[4]; + unsigned char h_cbOptOffset[4]; + unsigned char h_iauxMax[4]; + unsigned char h_cbAuxOffset[4]; + unsigned char h_issMax[4]; + unsigned char h_cbSsOffset[4]; + unsigned char h_issExtMax[4]; + unsigned char h_cbSsExtOffset[4]; + unsigned char h_ifdMax[4]; + unsigned char h_cbFdOffset[4]; + unsigned char h_crfd[4]; + unsigned char h_cbRfdOffset[4]; + unsigned char h_iextMax[4]; + unsigned char h_cbExtOffset[4]; +}; + +/* File descriptor external record */ + +struct fdr_ext +{ + unsigned char f_adr[4]; + unsigned char f_rss[4]; + unsigned char f_issBase[4]; + unsigned char f_cbSs[4]; + unsigned char f_isymBase[4]; + unsigned char f_csym[4]; + unsigned char f_ilineBase[4]; + unsigned char f_cline[4]; + unsigned char f_ioptBase[4]; + unsigned char f_copt[4]; + unsigned char f_ipdFirst[2]; + unsigned char f_cpd[2]; + unsigned char f_iauxBase[4]; + unsigned char f_caux[4]; + unsigned char f_rfdBase[4]; + unsigned char f_crfd[4]; + unsigned char f_bits1[1]; + unsigned char f_bits2[3]; + unsigned char f_cbLineOffset[4]; + unsigned char f_cbLine[4]; +}; + +#define FDR_BITS1_LANG_BIG 0xF8 +#define FDR_BITS1_LANG_SH_BIG 3 +#define FDR_BITS1_LANG_LITTLE 0x1F +#define FDR_BITS1_LANG_SH_LITTLE 0 + +#define FDR_BITS1_FMERGE_BIG 0x04 +#define FDR_BITS1_FMERGE_LITTLE 0x20 + +#define FDR_BITS1_FREADIN_BIG 0x02 +#define FDR_BITS1_FREADIN_LITTLE 0x40 + +#define FDR_BITS1_FBIGENDIAN_BIG 0x01 +#define FDR_BITS1_FBIGENDIAN_LITTLE 0x80 + +#define FDR_BITS2_GLEVEL_BIG 0xC0 +#define FDR_BITS2_GLEVEL_SH_BIG 6 +#define FDR_BITS2_GLEVEL_LITTLE 0x03 +#define FDR_BITS2_GLEVEL_SH_LITTLE 0 + +/* We ignore the `reserved' field in bits2. */ + +/* Procedure descriptor external record */ + +struct pdr_ext +{ + unsigned char p_adr[4]; + unsigned char p_isym[4]; + unsigned char p_iline[4]; + unsigned char p_regmask[4]; + unsigned char p_regoffset[4]; + unsigned char p_iopt[4]; + unsigned char p_fregmask[4]; + unsigned char p_fregoffset[4]; + unsigned char p_frameoffset[4]; + unsigned char p_framereg[2]; + unsigned char p_pcreg[2]; + unsigned char p_lnLow[4]; + unsigned char p_lnHigh[4]; + unsigned char p_cbLineOffset[4]; +}; + +/* Runtime procedure table */ + +struct rpdr_ext +{ + unsigned char p_adr[4]; + unsigned char p_regmask[4]; + unsigned char p_regoffset[4]; + unsigned char p_fregmask[4]; + unsigned char p_fregoffset[4]; + unsigned char p_frameoffset[4]; + unsigned char p_framereg[2]; + unsigned char p_pcreg[2]; + unsigned char p_irpss[4]; + unsigned char p_reserved[4]; + unsigned char p_exception_info[4]; +}; + +/* Line numbers */ + +struct line_ext +{ + unsigned char l_line[4]; +}; + +/* Symbol external record */ + +struct sym_ext +{ + unsigned char s_iss[4]; + unsigned char s_value[4]; + unsigned char s_bits1[1]; + unsigned char s_bits2[1]; + unsigned char s_bits3[1]; + unsigned char s_bits4[1]; +}; + +#define SYM_BITS1_ST_BIG 0xFC +#define SYM_BITS1_ST_SH_BIG 2 +#define SYM_BITS1_ST_LITTLE 0x3F +#define SYM_BITS1_ST_SH_LITTLE 0 + +#define SYM_BITS1_SC_BIG 0x03 +#define SYM_BITS1_SC_SH_LEFT_BIG 3 +#define SYM_BITS1_SC_LITTLE 0xC0 +#define SYM_BITS1_SC_SH_LITTLE 6 + +#define SYM_BITS2_SC_BIG 0xE0 +#define SYM_BITS2_SC_SH_BIG 5 +#define SYM_BITS2_SC_LITTLE 0x07 +#define SYM_BITS2_SC_SH_LEFT_LITTLE 2 + +#define SYM_BITS2_RESERVED_BIG 0x10 +#define SYM_BITS2_RESERVED_LITTLE 0x08 + +#define SYM_BITS2_INDEX_BIG 0x0F +#define SYM_BITS2_INDEX_SH_LEFT_BIG 16 +#define SYM_BITS2_INDEX_LITTLE 0xF0 +#define SYM_BITS2_INDEX_SH_LITTLE 4 + +#define SYM_BITS3_INDEX_SH_LEFT_BIG 8 +#define SYM_BITS3_INDEX_SH_LEFT_LITTLE 4 + +#define SYM_BITS4_INDEX_SH_LEFT_BIG 0 +#define SYM_BITS4_INDEX_SH_LEFT_LITTLE 12 + +/* External symbol external record */ + +struct ext_ext +{ + unsigned char es_bits1[1]; + unsigned char es_bits2[1]; + unsigned char es_ifd[2]; + struct sym_ext es_asym; +}; + +#define EXT_BITS1_JMPTBL_BIG 0x80 +#define EXT_BITS1_JMPTBL_LITTLE 0x01 + +#define EXT_BITS1_COBOL_MAIN_BIG 0x40 +#define EXT_BITS1_COBOL_MAIN_LITTLE 0x02 + +#define EXT_BITS1_WEAKEXT_BIG 0x20 +#define EXT_BITS1_WEAKEXT_LITTLE 0x04 + +/* Dense numbers external record */ + +struct dnr_ext +{ + unsigned char d_rfd[4]; + unsigned char d_index[4]; +}; + +/* Relative file descriptor */ + +struct rfd_ext +{ + unsigned char rfd[4]; +}; + +/* Optimizer symbol external record */ + +struct opt_ext +{ + unsigned char o_bits1[1]; + unsigned char o_bits2[1]; + unsigned char o_bits3[1]; + unsigned char o_bits4[1]; + struct rndx_ext o_rndx; + unsigned char o_offset[4]; +}; + +#define OPT_BITS2_VALUE_SH_LEFT_BIG 16 +#define OPT_BITS2_VALUE_SH_LEFT_LITTLE 0 + +#define OPT_BITS3_VALUE_SH_LEFT_BIG 8 +#define OPT_BITS3_VALUE_SH_LEFT_LITTLE 8 + +#define OPT_BITS4_VALUE_SH_LEFT_BIG 0 +#define OPT_BITS4_VALUE_SH_LEFT_LITTLE 16 diff --git a/support/sdbinutils/include/coff/mipspe.h b/support/sdbinutils/include/coff/mipspe.h new file mode 100644 index 0000000..01bec6c --- /dev/null +++ b/support/sdbinutils/include/coff/mipspe.h @@ -0,0 +1,67 @@ +/* coff information for Windows CE with MIPS VR4111 + + Copyright (C) 2000-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#define L_LNNO_SIZE 2 +#define INCLUDE_COMDAT_FIELDS_IN_AUXENT +#include "coff/external.h" + +#define MIPS_ARCH_MAGIC_WINCE 0x0166 /* Windows CE - little endian */ +#define MIPS_PE_MAGIC 0x010b + +#define MIPSBADMAG(x) ((x).f_magic != MIPS_ARCH_MAGIC_WINCE) + +/* define some NT default values */ +/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */ +#define NT_SECTION_ALIGNMENT 0x1000 +#define NT_FILE_ALIGNMENT 0x200 +#define NT_DEF_RESERVE 0x100000 +#define NT_DEF_COMMIT 0x1000 + +/********************** RELOCATION DIRECTIVES **********************/ + +/* The external reloc has an offset field, because some of the reloc + types on the h8 don't have room in the instruction for the entire + offset - eg the strange jump and high page addressing modes. */ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 10 + +/* MIPS PE relocation types. */ + +#define MIPS_R_ABSOLUTE 0 /* ignored */ +#define MIPS_R_REFHALF 1 +#define MIPS_R_REFWORD 2 +#define MIPS_R_JMPADDR 3 +#define MIPS_R_REFHI 4 /* PAIR follows */ +#define MIPS_R_REFLO 5 +#define MIPS_R_GPREL 6 +#define MIPS_R_LITERAL 7 /* same as GPREL */ +#define MIPS_R_SECTION 10 +#define MIPS_R_SECREL 11 +#define MIPS_R_SECRELLO 12 +#define MIPS_R_SECRELHI 13 /* PAIR follows */ +#define MIPS_R_RVA 34 /* 0x22 */ +#define MIPS_R_PAIR 37 /* 0x25 - symndx is really a signed 16-bit addend */ diff --git a/support/sdbinutils/include/coff/pe.h b/support/sdbinutils/include/coff/pe.h new file mode 100644 index 0000000..f9035bf --- /dev/null +++ b/support/sdbinutils/include/coff/pe.h @@ -0,0 +1,629 @@ +/* pe.h - PE COFF header information + + Copyright (C) 1999-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef _PE_H +#define _PE_H + +/* NT specific file attributes. */ +#define IMAGE_FILE_RELOCS_STRIPPED 0x0001 +#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 +#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 +#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 +#define IMAGE_FILE_AGGRESSIVE_WS_TRIM 0x0010 +#define IMAGE_FILE_LARGE_ADDRESS_AWARE 0x0020 +#define IMAGE_FILE_16BIT_MACHINE 0x0040 +#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080 +#define IMAGE_FILE_32BIT_MACHINE 0x0100 +#define IMAGE_FILE_DEBUG_STRIPPED 0x0200 +#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400 +#define IMAGE_FILE_NET_RUN_FROM_SWAP 0x0800 +#define IMAGE_FILE_SYSTEM 0x1000 +#define IMAGE_FILE_DLL 0x2000 +#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000 +#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000 + +/* DllCharacteristics flag bits. The inconsistent naming may seem + odd, but that is how they are defined in the PE specification. */ +#define IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA 0x0020 +#define IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE 0x0040 +#define IMAGE_DLL_CHARACTERISTICS_FORCE_INTEGRITY 0x0080 +#define IMAGE_DLL_CHARACTERISTICS_NX_COMPAT 0x0100 +#define IMAGE_DLLCHARACTERISTICS_NO_ISOLATION 0x0200 +#define IMAGE_DLLCHARACTERISTICS_NO_SEH 0x0400 +#define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800 +#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000 +#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000 + +/* Additional flags to be set for section headers to allow the NT loader to + read and write to the section data (to replace the addresses of data in + dlls for one thing); also to execute the section in .text's case. */ +#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 +#define IMAGE_SCN_MEM_EXECUTE 0x20000000 +#define IMAGE_SCN_MEM_READ 0x40000000 +#define IMAGE_SCN_MEM_WRITE 0x80000000 + +/* Section characteristics added for ppc-nt. */ + +#define IMAGE_SCN_TYPE_NO_PAD 0x00000008 /* Reserved. */ + +#define IMAGE_SCN_CNT_CODE 0x00000020 /* Section contains code. */ +#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 /* Section contains initialized data. */ +#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080 /* Section contains uninitialized data. */ + +#define IMAGE_SCN_LNK_OTHER 0x00000100 /* Reserved. */ +#define IMAGE_SCN_LNK_INFO 0x00000200 /* Section contains comments or some other type of information. */ +#define IMAGE_SCN_LNK_REMOVE 0x00000800 /* Section contents will not become part of image. */ +#define IMAGE_SCN_LNK_COMDAT 0x00001000 /* Section contents comdat. */ + +#define IMAGE_SCN_MEM_FARDATA 0x00008000 + +#define IMAGE_SCN_MEM_PURGEABLE 0x00020000 +#define IMAGE_SCN_MEM_16BIT 0x00020000 +#define IMAGE_SCN_MEM_LOCKED 0x00040000 +#define IMAGE_SCN_MEM_PRELOAD 0x00080000 + +/* Bit position in the s_flags field where the alignment values start. */ +#define IMAGE_SCN_ALIGN_POWER_BIT_POS 20 +#define IMAGE_SCN_ALIGN_POWER_BIT_MASK 0x00f00000 +#define IMAGE_SCN_ALIGN_POWER_NUM(val) \ + (((val) >> IMAGE_SCN_ALIGN_POWER_BIT_POS) - 1) +#define IMAGE_SCN_ALIGN_POWER_CONST(val) \ + (((val) + 1) << IMAGE_SCN_ALIGN_POWER_BIT_POS) + +#define IMAGE_SCN_ALIGN_1BYTES IMAGE_SCN_ALIGN_POWER_CONST (0) +#define IMAGE_SCN_ALIGN_2BYTES IMAGE_SCN_ALIGN_POWER_CONST (1) +#define IMAGE_SCN_ALIGN_4BYTES IMAGE_SCN_ALIGN_POWER_CONST (2) +#define IMAGE_SCN_ALIGN_8BYTES IMAGE_SCN_ALIGN_POWER_CONST (3) +/* Default alignment if no others are specified. */ +#define IMAGE_SCN_ALIGN_16BYTES IMAGE_SCN_ALIGN_POWER_CONST (4) +#define IMAGE_SCN_ALIGN_32BYTES IMAGE_SCN_ALIGN_POWER_CONST (5) +#define IMAGE_SCN_ALIGN_64BYTES IMAGE_SCN_ALIGN_POWER_CONST (6) +#define IMAGE_SCN_ALIGN_128BYTES IMAGE_SCN_ALIGN_POWER_CONST (7) +#define IMAGE_SCN_ALIGN_256BYTES IMAGE_SCN_ALIGN_POWER_CONST (8) +#define IMAGE_SCN_ALIGN_512BYTES IMAGE_SCN_ALIGN_POWER_CONST (9) +#define IMAGE_SCN_ALIGN_1024BYTES IMAGE_SCN_ALIGN_POWER_CONST (10) +#define IMAGE_SCN_ALIGN_2048BYTES IMAGE_SCN_ALIGN_POWER_CONST (11) +#define IMAGE_SCN_ALIGN_4096BYTES IMAGE_SCN_ALIGN_POWER_CONST (12) +#define IMAGE_SCN_ALIGN_8192BYTES IMAGE_SCN_ALIGN_POWER_CONST (13) + +/* Encode alignment power into IMAGE_SCN_ALIGN bits of s_flags. */ +#define COFF_ENCODE_ALIGNMENT(SECTION, ALIGNMENT_POWER) \ + ((SECTION).s_flags |= IMAGE_SCN_ALIGN_POWER_CONST ((ALIGNMENT_POWER) <= 13 \ + ? (ALIGNMENT_POWER) : 13)) +#define COFF_DECODE_ALIGNMENT(X) \ + IMAGE_SCN_ALIGN_POWER_NUM ((X) & IMAGE_SCN_ALIGN_POWER_BIT_MASK) + +#define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000 /* Section contains extended relocations. */ +#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 /* Section is not cachable. */ +#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 /* Section is not pageable. */ +#define IMAGE_SCN_MEM_SHARED 0x10000000 /* Section is shareable. */ + +/* COMDAT selection codes. */ + +#define IMAGE_COMDAT_SELECT_NODUPLICATES (1) /* Warn if duplicates. */ +#define IMAGE_COMDAT_SELECT_ANY (2) /* No warning. */ +#define IMAGE_COMDAT_SELECT_SAME_SIZE (3) /* Warn if different size. */ +#define IMAGE_COMDAT_SELECT_EXACT_MATCH (4) /* Warn if different. */ +#define IMAGE_COMDAT_SELECT_ASSOCIATIVE (5) /* Base on other section. */ + +/* Machine numbers. */ + +#define IMAGE_FILE_MACHINE_UNKNOWN 0x0000 +#define IMAGE_FILE_MACHINE_ALPHA 0x0184 +#define IMAGE_FILE_MACHINE_ALPHA64 0x0284 +#define IMAGE_FILE_MACHINE_AM33 0x01d3 +#define IMAGE_FILE_MACHINE_AMD64 0x8664 +#define IMAGE_FILE_MACHINE_ARM 0x01c0 +#define IMAGE_FILE_MACHINE_AXP64 IMAGE_FILE_MACHINE_ALPHA64 +#define IMAGE_FILE_MACHINE_CEE 0xc0ee +#define IMAGE_FILE_MACHINE_CEF 0x0cef +#define IMAGE_FILE_MACHINE_EBC 0x0ebc +#define IMAGE_FILE_MACHINE_I386 0x014c +#define IMAGE_FILE_MACHINE_IA64 0x0200 +#define IMAGE_FILE_MACHINE_M32R 0x9041 +#define IMAGE_FILE_MACHINE_M68K 0x0268 +#define IMAGE_FILE_MACHINE_MIPS16 0x0266 +#define IMAGE_FILE_MACHINE_MIPSFPU 0x0366 +#define IMAGE_FILE_MACHINE_MIPSFPU16 0x0466 +#define IMAGE_FILE_MACHINE_POWERPC 0x01f0 +#define IMAGE_FILE_MACHINE_POWERPCFP 0x01f1 +#define IMAGE_FILE_MACHINE_R10000 0x0168 +#define IMAGE_FILE_MACHINE_R3000 0x0162 +#define IMAGE_FILE_MACHINE_R4000 0x0166 +#define IMAGE_FILE_MACHINE_SH3 0x01a2 +#define IMAGE_FILE_MACHINE_SH3DSP 0x01a3 +#define IMAGE_FILE_MACHINE_SH3E 0x01a4 +#define IMAGE_FILE_MACHINE_SH4 0x01a6 +#define IMAGE_FILE_MACHINE_SH5 0x01a8 +#define IMAGE_FILE_MACHINE_THUMB 0x01c2 +#define IMAGE_FILE_MACHINE_TRICORE 0x0520 +#define IMAGE_FILE_MACHINE_WCEMIPSV2 0x0169 +#define IMAGE_FILE_MACHINE_AMD64 0x8664 + +#define IMAGE_SUBSYSTEM_UNKNOWN 0 +#define IMAGE_SUBSYSTEM_NATIVE 1 +#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2 +#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3 +#define IMAGE_SUBSYSTEM_POSIX_CUI 7 +#define IMAGE_SUBSYSTEM_WINDOWS_CE_GUI 9 +#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10 +#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11 +#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12 +#define IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER 13 +#define IMAGE_SUBSYSTEM_XBOX 14 + +/* Magic values that are true for all dos/nt implementations. */ +#define DOSMAGIC 0x5a4d +#define NT_SIGNATURE 0x00004550 + +/* NT allows long filenames, we want to accommodate this. + This may break some of the bfd functions. */ +#undef FILNMLEN +#define FILNMLEN 18 /* # characters in a file name. */ + +struct external_PEI_DOS_hdr +{ + /* DOS header fields - always at offset zero in the EXE file. */ + char e_magic[2]; /* Magic number, 0x5a4d. */ + char e_cblp[2]; /* Bytes on last page of file, 0x90. */ + char e_cp[2]; /* Pages in file, 0x3. */ + char e_crlc[2]; /* Relocations, 0x0. */ + char e_cparhdr[2]; /* Size of header in paragraphs, 0x4. */ + char e_minalloc[2]; /* Minimum extra paragraphs needed, 0x0. */ + char e_maxalloc[2]; /* Maximum extra paragraphs needed, 0xFFFF. */ + char e_ss[2]; /* Initial (relative) SS value, 0x0. */ + char e_sp[2]; /* Initial SP value, 0xb8. */ + char e_csum[2]; /* Checksum, 0x0. */ + char e_ip[2]; /* Initial IP value, 0x0. */ + char e_cs[2]; /* Initial (relative) CS value, 0x0. */ + char e_lfarlc[2]; /* File address of relocation table, 0x40. */ + char e_ovno[2]; /* Overlay number, 0x0. */ + char e_res[4][2]; /* Reserved words, all 0x0. */ + char e_oemid[2]; /* OEM identifier (for e_oeminfo), 0x0. */ + char e_oeminfo[2]; /* OEM information; e_oemid specific, 0x0. */ + char e_res2[10][2]; /* Reserved words, all 0x0. */ + char e_lfanew[4]; /* File address of new exe header, usually 0x80. */ + char dos_message[16][4]; /* Other stuff, always follow DOS header. */ +}; + +struct external_PEI_IMAGE_hdr +{ + char nt_signature[4]; /* Required NT signature, 0x4550. */ + + /* From standard header. */ + char f_magic[2]; /* Magic number. */ + char f_nscns[2]; /* Number of sections. */ + char f_timdat[4]; /* Time & date stamp. */ + char f_symptr[4]; /* File pointer to symtab. */ + char f_nsyms[4]; /* Number of symtab entries. */ + char f_opthdr[2]; /* Sizeof(optional hdr). */ + char f_flags[2]; /* Flags. */ +}; + +struct external_PEI_filehdr +{ + /* DOS header fields - always at offset zero in the EXE file. */ + char e_magic[2]; /* Magic number, 0x5a4d. */ + char e_cblp[2]; /* Bytes on last page of file, 0x90. */ + char e_cp[2]; /* Pages in file, 0x3. */ + char e_crlc[2]; /* Relocations, 0x0. */ + char e_cparhdr[2]; /* Size of header in paragraphs, 0x4. */ + char e_minalloc[2]; /* Minimum extra paragraphs needed, 0x0. */ + char e_maxalloc[2]; /* Maximum extra paragraphs needed, 0xFFFF. */ + char e_ss[2]; /* Initial (relative) SS value, 0x0. */ + char e_sp[2]; /* Initial SP value, 0xb8. */ + char e_csum[2]; /* Checksum, 0x0. */ + char e_ip[2]; /* Initial IP value, 0x0. */ + char e_cs[2]; /* Initial (relative) CS value, 0x0. */ + char e_lfarlc[2]; /* File address of relocation table, 0x40. */ + char e_ovno[2]; /* Overlay number, 0x0. */ + char e_res[4][2]; /* Reserved words, all 0x0. */ + char e_oemid[2]; /* OEM identifier (for e_oeminfo), 0x0. */ + char e_oeminfo[2]; /* OEM information; e_oemid specific, 0x0. */ + char e_res2[10][2]; /* Reserved words, all 0x0. */ + char e_lfanew[4]; /* File address of new exe header, usually 0x80. */ + char dos_message[16][4]; /* Other stuff, always follow DOS header. */ + + /* Note: additional bytes may be inserted before the signature. Use + the e_lfanew field to find the actual location of the NT signature. */ + + char nt_signature[4]; /* Required NT signature, 0x4550. */ + + /* From standard header. */ + char f_magic[2]; /* Magic number. */ + char f_nscns[2]; /* Number of sections. */ + char f_timdat[4]; /* Time & date stamp. */ + char f_symptr[4]; /* File pointer to symtab. */ + char f_nsyms[4]; /* Number of symtab entries. */ + char f_opthdr[2]; /* Sizeof(optional hdr). */ + char f_flags[2]; /* Flags. */ +}; + +#ifdef COFF_IMAGE_WITH_PE + +/* The filehdr is only weird in images. */ + +#undef FILHDR +#define FILHDR struct external_PEI_filehdr +#undef FILHSZ +#define FILHSZ 152 + +#endif /* COFF_IMAGE_WITH_PE */ + +/* 32-bit PE a.out header: */ + +typedef struct +{ + AOUTHDR standard; + + /* NT extra fields; see internal.h for descriptions. */ + char ImageBase[4]; + char SectionAlignment[4]; + char FileAlignment[4]; + char MajorOperatingSystemVersion[2]; + char MinorOperatingSystemVersion[2]; + char MajorImageVersion[2]; + char MinorImageVersion[2]; + char MajorSubsystemVersion[2]; + char MinorSubsystemVersion[2]; + char Reserved1[4]; + char SizeOfImage[4]; + char SizeOfHeaders[4]; + char CheckSum[4]; + char Subsystem[2]; + char DllCharacteristics[2]; + char SizeOfStackReserve[4]; + char SizeOfStackCommit[4]; + char SizeOfHeapReserve[4]; + char SizeOfHeapCommit[4]; + char LoaderFlags[4]; + char NumberOfRvaAndSizes[4]; + /* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */ + char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars. */ +} PEAOUTHDR; + +#undef AOUTSZ +#define AOUTSZ (AOUTHDRSZ + 196) + +/* Like PEAOUTHDR, except that the "standard" member has no BaseOfData + (aka data_start) member and that some of the members are 8 instead + of just 4 bytes long. */ +typedef struct +{ +#ifdef AOUTHDRSZ64 + AOUTHDR64 standard; +#else + AOUTHDR standard; +#endif + /* NT extra fields; see internal.h for descriptions. */ + char ImageBase[8]; + char SectionAlignment[4]; + char FileAlignment[4]; + char MajorOperatingSystemVersion[2]; + char MinorOperatingSystemVersion[2]; + char MajorImageVersion[2]; + char MinorImageVersion[2]; + char MajorSubsystemVersion[2]; + char MinorSubsystemVersion[2]; + char Reserved1[4]; + char SizeOfImage[4]; + char SizeOfHeaders[4]; + char CheckSum[4]; + char Subsystem[2]; + char DllCharacteristics[2]; + char SizeOfStackReserve[8]; + char SizeOfStackCommit[8]; + char SizeOfHeapReserve[8]; + char SizeOfHeapCommit[8]; + char LoaderFlags[4]; + char NumberOfRvaAndSizes[4]; + /* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */ + char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars. */ +} PEPAOUTHDR; + +#ifdef AOUTHDRSZ64 +#define PEPAOUTSZ (AOUTHDRSZ64 + 196 + 5 * 4) /* = 240 */ +#else +#define PEPAOUTSZ 240 +#endif + +#undef E_FILNMLEN +#define E_FILNMLEN 18 /* # characters in a file name. */ + +/* Import Tyoes fot ILF format object files.. */ +#define IMPORT_CODE 0 +#define IMPORT_DATA 1 +#define IMPORT_CONST 2 + +/* Import Name Tyoes for ILF format object files. */ +#define IMPORT_ORDINAL 0 +#define IMPORT_NAME 1 +#define IMPORT_NAME_NOPREFIX 2 +#define IMPORT_NAME_UNDECORATE 3 + +/* Weak external characteristics. */ +#define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1 +#define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2 +#define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3 + +/* Bigobj header. */ +struct external_ANON_OBJECT_HEADER_BIGOBJ +{ + /* ANON_OBJECT_HEADER_V2 header. */ + char Sig1[2]; + char Sig2[2]; + char Version[2]; + char Machine[2]; + char TimeDateStamp[4]; + char ClassID[16]; + char SizeOfData[4]; + char Flags[4]; + char MetaDataSize[4]; + char MetaDataOffset[4]; + + /* BIGOBJ specific. */ + char NumberOfSections[4]; + char PointerToSymbolTable[4]; + char NumberOfSymbols[4]; +}; + +#define FILHSZ_BIGOBJ (14 * 4) + +struct external_SYMBOL_EX +{ + union + { + char e_name[E_SYMNMLEN]; + + struct + { + char e_zeroes[4]; + char e_offset[4]; + } e; + } e; + + char e_value[4]; + char e_scnum[4]; + char e_type[2]; + char e_sclass[1]; + char e_numaux[1]; +} ATTRIBUTE_PACKED ; + +#define SYMENT_BIGOBJ struct external_SYMBOL_EX +#define SYMESZ_BIGOBJ 20 + +#define FILNMLEN_BIGOBJ 20 + +union external_AUX_SYMBOL_EX +{ + struct + { + char WeakDefaultSymIndex[4]; + char WeakSearchType[4]; + char rgbReserved[12]; + } Sym; + + struct + { + char Name[FILNMLEN_BIGOBJ]; + } File; + + struct + { + char Length[4]; /* Section length. */ + char NumberOfRelocations[2];/* # relocation entries. */ + char NumberOfLinenumbers[2];/* # line numbers. */ + char Checksum[4]; /* Section COMDAT checksum. */ + char Number[2]; /* COMDAT associated section index. */ + char Selection[1]; /* COMDAT selection number. */ + char bReserved[1]; + char HighNumber[2]; /* High bits of COMDAT associated sec. */ + char rgbReserved[2]; + } Section; +} ATTRIBUTE_PACKED; + +#define AUXENT_BIGOBJ union external_AUX_SYMBOL_EX +#define AUXESZ_BIGOBJ 20 + +/* .pdata/.xdata defines and structures for x64 PE+ for exception handling. */ + +/* .pdata in exception directory. */ + +struct pex64_runtime_function +{ + bfd_vma rva_BeginAddress; + bfd_vma rva_EndAddress; + bfd_vma rva_UnwindData; +}; + +struct external_pex64_runtime_function +{ + bfd_byte rva_BeginAddress[4]; + bfd_byte rva_EndAddress[4]; + bfd_byte rva_UnwindData[4]; +}; + +/* If the lowest significant bit is set for rva_UnwindData RVA, it + means that the unified RVA points to another pex64_runtime_function + that this entry shares the unwind_info block with. */ +#define PEX64_IS_RUNTIME_FUNCTION_CHAINED(PTR_RTF) \ + (((PTR_RTF)->rva_UnwindData & 1) != 0) +#define PEX64_GET_UNWINDDATA_UNIFIED_RVA(PTR_RTF) \ + ((PTR_RTF)->rva_UnwindData & ~1) + +/* The unwind codes. */ +#define UWOP_PUSH_NONVOL 0 +#define UWOP_ALLOC_LARGE 1 +#define UWOP_ALLOC_SMALL 2 +#define UWOP_SET_FPREG 3 +#define UWOP_SAVE_NONVOL 4 +#define UWOP_SAVE_NONVOL_FAR 5 +#define UWOP_SAVE_XMM 6 /* For version 1. */ +#define UWOP_EPILOG 6 /* For version 2. */ +#define UWOP_SAVE_XMM_FAR 7 /* For version 1 (deprecated). */ +#define UWOP_SPARE 7 /* For version 2. */ +#define UWOP_SAVE_XMM128 8 +#define UWOP_SAVE_XMM128_FAR 9 +#define UWOP_PUSH_MACHFRAME 10 + +struct pex64_unwind_code +{ + bfd_vma prologue_offset; + /* Contains Frame offset, or frame allocation size. */ + bfd_vma frame_addr; + unsigned int uwop_code : 4; + /* xmm, mm, or standard register from 0 - 15. */ + unsigned int reg : 4; + /* Used for UWOP_PUSH_MACHFRAME to indicate optional errorcode stack + argument. */ + unsigned int has_errorcode : 1; +}; + +struct external_pex64_unwind_code +{ + bfd_byte dta[2]; +}; + +#define PEX64_UNWCODE_CODE(VAL) ((VAL) & 0xf) +#define PEX64_UNWCODE_INFO(VAL) (((VAL) >> 4) & 0xf) + +/* The unwind info. */ +#define UNW_FLAG_NHANDLER 0 +#define UNW_FLAG_EHANDLER 1 +#define UNW_FLAG_UHANDLER 2 +#define UNW_FLAG_FHANDLER 3 +#define UNW_FLAG_CHAININFO 4 + +#define UNW_FLAG_MASK 0x1f + +struct pex64_unwind_info +{ + bfd_vma SizeOfBlock; + bfd_byte Version; /* Values from 0 up to 7 are possible. */ + bfd_byte Flags; /* Values from 0 up to 31 are possible. */ + bfd_vma SizeOfPrologue; + bfd_vma CountOfCodes; /* Amount of pex64_unwind_code elements. */ + /* 0 = CFA, 1..15 are index of integer registers. */ + unsigned int FrameRegister : 4; + bfd_vma FrameOffset; + bfd_vma sizeofUnwindCodes; + bfd_byte *rawUnwindCodes; + bfd_vma rva_ExceptionHandler; /* UNW_EHANDLER or UNW_FLAG_UHANDLER. */ + bfd_vma rva_BeginAddress; /* UNW_FLAG_CHAININFO. */ + bfd_vma rva_EndAddress; /* UNW_FLAG_CHAININFO. */ + bfd_vma rva_UnwindData; /* UNW_FLAG_CHAININFO. */ +}; + +struct external_pex64_unwind_info +{ + bfd_byte Version_Flags; + bfd_byte SizeOfPrologue; + bfd_byte CountOfCodes; + bfd_byte FrameRegisterOffset; + /* external_pex64_unwind_code array. */ + /* bfd_byte handler[4]; */ + /* Optional language specific data. */ +}; + +struct external_pex64_scope +{ + bfd_vma Count; +}; + +struct pex64_scope +{ + bfd_byte Count[4]; +}; + +struct pex64_scope_entry +{ + bfd_vma rva_BeginAddress; + bfd_vma rva_EndAddress; + bfd_vma rva_HandlerAddress; + bfd_vma rva_JumpAddress; +}; +#define PEX64_SCOPE_ENTRY_SIZE 16 + +struct external_pex64_scope_entry +{ + bfd_byte rva_BeginAddress[4]; + bfd_byte rva_EndAddress[4]; + bfd_byte rva_HandlerAddress[4]; + bfd_byte rva_JumpAddress[4]; +}; + +#define PEX64_UWI_VERSION(VAL) ((VAL) & 7) +#define PEX64_UWI_FLAGS(VAL) (((VAL) >> 3) & 0x1f) +#define PEX64_UWI_FRAMEREG(VAL) ((VAL) & 0xf) +#define PEX64_UWI_FRAMEOFF(VAL) (((VAL) >> 4) & 0xf) +#define PEX64_UWI_SIZEOF_UWCODE_ARRAY(VAL) \ + ((((VAL) + 1) & ~1) * 2) + +#define PEX64_OFFSET_TO_UNWIND_CODE 0x4 + +#define PEX64_OFFSET_TO_HANDLER_RVA (COUNTOFUNWINDCODES) \ + (PEX64_OFFSET_TO_UNWIND_CODE + \ + PEX64_UWI_SIZEOF_UWCODE_ARRAY(COUNTOFUNWINDCODES)) + +#define PEX64_OFFSET_TO_SCOPE_COUNT(COUNTOFUNWINDCODES) \ + (PEX64_OFFSET_TO_HANDLER_RVA(COUNTOFUNWINDCODES) + 4) + +#define PEX64_SCOPE_ENTRY(COUNTOFUNWINDCODES, IDX) \ + (PEX64_OFFSET_TO_SCOPE_COUNT(COUNTOFUNWINDCODES) + \ + PEX64_SCOPE_ENTRY_SIZE * (IDX)) + +/* Extra structure used in debug directory. */ +struct external_IMAGE_DEBUG_DIRECTORY +{ + char Characteristics[4]; + char TimeDateStamp[4]; + char MajorVersion[2]; + char MinorVersion[2]; + char Type[4]; + char SizeOfData[4]; + char AddressOfRawData[4]; + char PointerToRawData[4]; +}; + +/* Extra structures used in codeview debug record. */ +/* This is not part of the PE specification. */ + +#define CVINFO_PDB70_CVSIGNATURE 0x53445352 // "RSDS" +#define CVINFO_PDB20_CVSIGNATURE 0x3031424e // "NB10" +#define CVINFO_CV50_CVSIGNATURE 0x3131424e // "NB11" +#define CVINFO_CV41_CVSIGNATURE 0x3930424e // "NB09" + +typedef struct _CV_INFO_PDB70 +{ + char CvSignature[4]; + char Signature[16]; + char Age[4]; + char PdbFileName[]; +} CV_INFO_PDB70; + +typedef struct _CV_INFO_PDB20 +{ + char CvHeader[4]; + char Offset[4]; + char Signature[4]; + char Age[4]; + char PdbFileName[]; +} CV_INFO_PDB20; + +#endif /* _PE_H */ diff --git a/support/sdbinutils/include/coff/powerpc.h b/support/sdbinutils/include/coff/powerpc.h new file mode 100644 index 0000000..37fef42 --- /dev/null +++ b/support/sdbinutils/include/coff/powerpc.h @@ -0,0 +1,59 @@ +/* Basic coff information for the PowerPC + Based on coff/rs6000.h, coff/i386.h and others. + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. + + Initial release: Kim Knuttila (krk@cygnus.com) */ +#define L_LNNO_SIZE 2 +#define INCLUDE_COMDAT_FIELDS_IN_AUXENT +#include "coff/external.h" + +/* Bits for f_flags: + F_RELFLG relocation info stripped from file + F_EXEC file is executable (no unresolved external references) + F_LNNO line numbers stripped from file + F_LSYMS local symbols stripped from file + F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */ + +#define F_RELFLG (0x0001) +#define F_EXEC (0x0002) +#define F_LNNO (0x0004) +#define F_LSYMS (0x0008) + +/* extra NT defines */ +#define PPCMAGIC 0760 /* peeked on aa PowerPC Windows NT box */ +#define DOSMAGIC 0x5a4d /* from arm.h, i386.h */ +#define NT_SIGNATURE 0x00004550 /* from arm.h, i386.h */ + +/* from winnt.h */ +#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b + +#define PPCBADMAG(x) ((x).f_magic != PPCMAGIC) + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 10 + diff --git a/support/sdbinutils/include/coff/rs6000.h b/support/sdbinutils/include/coff/rs6000.h new file mode 100644 index 0000000..7b9d243 --- /dev/null +++ b/support/sdbinutils/include/coff/rs6000.h @@ -0,0 +1,353 @@ +/* IBM RS/6000 "XCOFF" file definitions for BFD. + Copyright (C) 1990-2018 Free Software Foundation, Inc. + Written by Mimi Phuong-Thao Vo of IBM + and John Gilmore of Cygnus Support. + + 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. */ + +/********************** FILE HEADER **********************/ + +struct external_filehdr { + char f_magic[2]; /* magic number */ + char f_nscns[2]; /* number of sections */ + char f_timdat[4]; /* time & date stamp */ + char f_symptr[4]; /* file pointer to symtab */ + char f_nsyms[4]; /* number of symtab entries */ + char f_opthdr[2]; /* sizeof(optional hdr) */ + char f_flags[2]; /* flags */ +}; + + /* IBM RS/6000 */ +#define U802WRMAGIC 0730 /* writeable text segments **chh** */ +#define U802ROMAGIC 0735 /* readonly sharable text segments */ +#define U802TOCMAGIC 0737 /* readonly text segments and TOC */ + +#define BADMAG(x) \ + ((x).f_magic != U802ROMAGIC && (x).f_magic != U802WRMAGIC && \ + (x).f_magic != U802TOCMAGIC) + +#define FILHDR struct external_filehdr +#define FILHSZ 20 + + +/********************** AOUT "OPTIONAL HEADER" **********************/ + + +typedef struct +{ + unsigned char magic[2]; /* type of file */ + unsigned char vstamp[2]; /* version stamp */ + unsigned char tsize[4]; /* text size in bytes, padded to FW bdry */ + unsigned char dsize[4]; /* initialized data " " */ + unsigned char bsize[4]; /* uninitialized data " " */ + unsigned char entry[4]; /* entry pt. */ + unsigned char text_start[4]; /* base of text used for this file */ + unsigned char data_start[4]; /* base of data used for this file */ + unsigned char o_toc[4]; /* address of TOC */ + unsigned char o_snentry[2]; /* section number of entry point */ + unsigned char o_sntext[2]; /* section number of .text section */ + unsigned char o_sndata[2]; /* section number of .data section */ + unsigned char o_sntoc[2]; /* section number of TOC */ + unsigned char o_snloader[2]; /* section number of .loader section */ + unsigned char o_snbss[2]; /* section number of .bss section */ + unsigned char o_algntext[2]; /* .text alignment */ + unsigned char o_algndata[2]; /* .data alignment */ + unsigned char o_modtype[2]; /* module type (??) */ + unsigned char o_cputype[2]; /* cpu type */ + unsigned char o_maxstack[4]; /* max stack size (??) */ + unsigned char o_maxdata[4]; /* max data size (??) */ + unsigned char o_resv2[12]; /* reserved */ +} +AOUTHDR; + +#define AOUTSZ 72 +#define SMALL_AOUTSZ (28) +#define AOUTHDRSZ 72 + +/********************** SECTION HEADER **********************/ + + +struct external_scnhdr { + char s_name[8]; /* section name */ + char s_paddr[4]; /* physical address, aliased s_nlib */ + char s_vaddr[4]; /* virtual address */ + char s_size[4]; /* section size */ + char s_scnptr[4]; /* file ptr to raw data for section */ + char s_relptr[4]; /* file ptr to relocation */ + char s_lnnoptr[4]; /* file ptr to line numbers */ + char s_nreloc[2]; /* number of relocation entries */ + char s_nlnno[2]; /* number of line number entries*/ + char s_flags[4]; /* flags */ +}; + +#define SCNHDR struct external_scnhdr +#define SCNHSZ 40 + +/********************** LINE NUMBERS **********************/ + +/* 1 line number entry for every "breakpointable" source line in a section. + * Line numbers are grouped on a per function basis; first entry in a function + * grouping will have l_lnno = 0 and in place of physical address will be the + * symbol table index of the function name. + */ +struct external_lineno { + union { + char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ + char l_paddr[4]; /* (physical) address of line number */ + } l_addr; + char l_lnno[2]; /* line number */ +}; + + +#define LINENO struct external_lineno +#define LINESZ 6 + + +/********************** SYMBOLS **********************/ + +#define E_SYMNMLEN 8 /* # characters in a symbol name */ +#define E_FILNMLEN 14 /* # characters in a file name */ +#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ + +struct external_syment +{ + union { + char e_name[E_SYMNMLEN]; + struct { + char e_zeroes[4]; + char e_offset[4]; + } e; + } e; + char e_value[4]; + char e_scnum[2]; + char e_type[2]; + char e_sclass[1]; + char e_numaux[1]; +}; + + + +#define N_BTMASK (017) +#define N_TMASK (060) +#define N_BTSHFT (4) +#define N_TSHIFT (2) + + +union external_auxent { + struct { + char x_tagndx[4]; /* str, un, or enum tag indx */ + union { + struct { + char x_lnno[2]; /* declaration line number */ + char x_size[2]; /* str/union/array size */ + } x_lnsz; + char x_fsize[4]; /* size of function */ + } x_misc; + union { + struct { /* if ISFCN, tag, or .bb */ + char x_lnnoptr[4]; /* ptr to fcn line # */ + char x_endndx[4]; /* entry ndx past block end */ + } x_fcn; + struct { /* if ISARY, up to 4 dimen. */ + char x_dimen[E_DIMNUM][2]; + } x_ary; + } x_fcnary; + char x_tvndx[2]; /* tv index */ + } x_sym; + + struct { + union { + char x_fname[E_FILNMLEN]; + struct { + char x_zeroes[4]; + char x_offset[4]; + } x_n; + } x_n; + char x_ftype[1]; + } x_file; + + struct { + char x_scnlen[4]; /* section length */ + char x_nreloc[2]; /* # relocation entries */ + char x_nlinno[2]; /* # line numbers */ + } x_scn; + + struct { + char x_tvfill[4]; /* tv fill value */ + char x_tvlen[2]; /* length of .tv */ + char x_tvran[2][2]; /* tv range */ + } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ + + struct { + unsigned char x_scnlen[4]; + unsigned char x_parmhash[4]; + unsigned char x_snhash[2]; + unsigned char x_smtyp[1]; + unsigned char x_smclas[1]; + unsigned char x_stab[4]; + unsigned char x_snstab[2]; + } x_csect; + +}; + +#define SYMENT struct external_syment +#define SYMESZ 18 +#define AUXENT union external_auxent +#define AUXESZ 18 +#define DBXMASK 0x80 /* for dbx storage mask */ +#define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK) + + + +/********************** RELOCATION DIRECTIVES **********************/ + + +struct external_reloc { + char r_vaddr[4]; + char r_symndx[4]; + char r_size[1]; + char r_type[1]; +}; + + +#define RELOC struct external_reloc +#define RELSZ 10 + +#define DEFAULT_DATA_SECTION_ALIGNMENT 4 +#define DEFAULT_BSS_SECTION_ALIGNMENT 4 +#define DEFAULT_TEXT_SECTION_ALIGNMENT 4 +/* For new sections we havn't heard of before */ +#define DEFAULT_SECTION_ALIGNMENT 4 + +/* The ldhdr structure. This appears at the start of the .loader + section. */ + +struct external_ldhdr +{ + bfd_byte l_version[4]; + bfd_byte l_nsyms[4]; + bfd_byte l_nreloc[4]; + bfd_byte l_istlen[4]; + bfd_byte l_nimpid[4]; + bfd_byte l_impoff[4]; + bfd_byte l_stlen[4]; + bfd_byte l_stoff[4]; +}; + +#define LDHDRSZ (8 * 4) + +struct external_ldsym +{ + union + { + bfd_byte _l_name[E_SYMNMLEN]; + struct + { + bfd_byte _l_zeroes[4]; + bfd_byte _l_offset[4]; + } _l_l; + } _l; + bfd_byte l_value[4]; + bfd_byte l_scnum[2]; + bfd_byte l_smtype[1]; + bfd_byte l_smclas[1]; + bfd_byte l_ifile[4]; + bfd_byte l_parm[4]; +}; + +#define LDSYMSZ (8 + 3 * 4 + 2 + 2) + +struct external_ldrel +{ + bfd_byte l_vaddr[4]; + bfd_byte l_symndx[4]; + bfd_byte l_rtype[2]; + bfd_byte l_rsecnm[2]; +}; + +#define LDRELSZ (2 * 4 + 2 * 2) + +struct external_exceptab +{ + union { + bfd_byte e_symndx[4]; + bfd_byte e_paddr[4]; + } e_addr; + bfd_byte e_lang[1]; + bfd_byte e_reason[1]; +}; + +#define EXCEPTSZ (4 + 2) + +/******************** Core files *************************/ + +struct external_core_dumpx +{ + unsigned char c_signo[1]; + unsigned char c_flag[1]; + unsigned char c_entries[2]; + + unsigned char c_version[4]; + + unsigned char c_fdsinfox[8]; + unsigned char c_loader[8]; + unsigned char c_lsize[8]; + + unsigned char c_n_thr[4]; + unsigned char c_reserved0[4]; + unsigned char c_thr[8]; + + unsigned char c_segs[8]; + unsigned char c_segregion[8]; + + unsigned char c_stack[8]; + unsigned char c_stackorg[8]; + unsigned char c_size[8]; + + unsigned char c_data[8]; + unsigned char c_dataorg[8]; + unsigned char c_datasize[8]; + unsigned char c_sdorg[8]; + unsigned char c_sdsize[8]; + + unsigned char c_vmmregions[8]; + unsigned char c_vmm[8]; + + unsigned char c_impl[4]; + unsigned char c_pad[4]; + unsigned char c_cprs[8]; + unsigned char c_reserved[7 * 8]; + + /* Followed by: + - context of the faulting thread. + - user structure. */ +}; + + +/* Core file verion. */ +#define CORE_DUMPX_VERSION 0x0feeddb1 +#define CORE_DUMPXX_VERSION 0x0feeddb2 + +struct external_ld_info32 +{ + unsigned char ldinfo_next[4]; + unsigned char core_offset[4]; + unsigned char ldinfo_textorg[4]; + unsigned char ldinfo_textsize[4]; + unsigned char ldinfo_dataorg[4]; + unsigned char ldinfo_datasize[4]; + unsigned char ldinfo_filename[2]; +}; diff --git a/support/sdbinutils/include/coff/rs6k64.h b/support/sdbinutils/include/coff/rs6k64.h new file mode 100644 index 0000000..5ee2663 --- /dev/null +++ b/support/sdbinutils/include/coff/rs6k64.h @@ -0,0 +1,275 @@ +/* IBM RS/6000 "XCOFF64" file definitions for BFD. + Copyright (C) 2000-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/********************** FILE HEADER **********************/ + +struct external_filehdr +{ + char f_magic[2]; /* magic number */ + char f_nscns[2]; /* number of sections */ + char f_timdat[4]; /* time & date stamp */ + char f_symptr[8]; /* file pointer to symtab */ + char f_opthdr[2]; /* sizeof(optional hdr) */ + char f_flags[2]; /* flags */ + char f_nsyms[4]; /* number of symtab entries */ +}; + +/* IBM RS/6000. */ +#define U803XTOCMAGIC 0757 /* Aix 4.3 64-bit XCOFF */ +#define U64_TOCMAGIC 0767 /* AIX 5+ 64-bit XCOFF */ +#define BADMAG(x) ((x).f_magic != U803XTOCMAGIC && (x).f_magic != U64_TOCMAGIC) + +#define FILHDR struct external_filehdr +#define FILHSZ 24 + +/********************** AOUT "OPTIONAL HEADER" **********************/ + +typedef struct +{ + unsigned char magic[2]; /* type of file */ + unsigned char vstamp[2]; /* version stamp */ + unsigned char o_debugger[4]; /* reserved */ + unsigned char text_start[8]; /* base of text used for this file */ + unsigned char data_start[8]; /* base of data used for this file */ + unsigned char o_toc[8]; /* address of TOC */ + unsigned char o_snentry[2]; /* section number of entry point */ + unsigned char o_sntext[2]; /* section number of .text section */ + unsigned char o_sndata[2]; /* section number of .data section */ + unsigned char o_sntoc[2]; /* section number of TOC */ + unsigned char o_snloader[2]; /* section number of .loader section */ + unsigned char o_snbss[2]; /* section number of .bss section */ + unsigned char o_algntext[2]; /* .text alignment */ + unsigned char o_algndata[2]; /* .data alignment */ + unsigned char o_modtype[2]; /* module type (??) */ + unsigned char o_cputype[2]; /* cpu type */ + unsigned char o_resv2[4]; /* reserved */ + unsigned char tsize[8]; /* text size bytes, padded to FW bdry */ + unsigned char dsize[8]; /* initialized data " " */ + unsigned char bsize[8]; /* uninitialized data " " */ + unsigned char entry[8]; /* entry pt. */ + unsigned char o_maxstack[8]; /* max stack size (??) */ + unsigned char o_maxdata[8]; /* max data size (??) */ + unsigned char o_resv3[16]; /* reserved */ +} +AOUTHDR; + +#define AOUTSZ 120 +#define SMALL_AOUTSZ (0) +#define AOUTHDRSZ 72 + +/********************** SECTION HEADER **********************/ + +struct external_scnhdr +{ + char s_name[8]; /* section name */ + char s_paddr[8]; /* physical address, aliased s_nlib */ + char s_vaddr[8]; /* virtual address */ + char s_size[8]; /* section size */ + char s_scnptr[8]; /* file ptr to raw data for section */ + char s_relptr[8]; /* file ptr to relocation */ + char s_lnnoptr[8]; /* file ptr to line numbers */ + char s_nreloc[4]; /* number of relocation entries */ + char s_nlnno[4]; /* number of line number entries*/ + char s_flags[4]; /* flags */ + char s_pad[4]; /* padding */ +}; + +#define SCNHDR struct external_scnhdr + +#define SCNHSZ 72 + +/********************** LINE NUMBERS **********************/ + +/* 1 line number entry for every "breakpointable" source line in a section. + Line numbers are grouped on a per function basis; first entry in a function + grouping will have l_lnno = 0 and in place of physical address will be the + symbol table index of the function name. */ + +struct external_lineno +{ + union + { + char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ + char l_paddr[8]; /* (physical) address of line number */ + } l_addr; + + char l_lnno[4]; /* line number */ +}; + +#define LINENO struct external_lineno + +#define LINESZ 12 + +/********************** SYMBOLS **********************/ + +#define E_SYMNMLEN 8 /* # characters in a symbol name */ +#define E_FILNMLEN 14 /* # characters in a file name */ +#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ + +struct external_syment +{ + char e_value[8]; + char e_offset[4]; + char e_scnum[2]; + char e_type[2]; + char e_sclass[1]; + char e_numaux[1]; +}; + +#define N_BTMASK (017) +#define N_TMASK (060) +#define N_BTSHFT (4) +#define N_TSHIFT (2) + +union external_auxent +{ + struct { + union { + struct { + char x_lnno[4]; /* declaration line number */ + char x_size[2]; /* str/union/array size */ + } x_lnsz; + struct { + char x_lnnoptr[8];/* ptr to fcn line */ + char x_fsize[4]; /* size of function */ + char x_endndx[4]; /* entry ndx past block end */ + } x_fcn; + } x_fcnary; + } x_sym; + + struct { + union { + char x_fname[E_FILNMLEN]; + struct { + char x_zeroes[4]; + char x_offset[4]; + char x_pad[6]; + } x_n; + } x_n; + unsigned char x_ftype[1]; + unsigned char x_resv[2]; + } x_file; + + struct { + char x_exptr[8]; + char x_fsize[4]; + char x_endndx[4]; + char x_pad[1]; + } x_except; + + struct { + unsigned char x_scnlen_lo[4]; + unsigned char x_parmhash[4]; + unsigned char x_snhash[2]; + unsigned char x_smtyp[1]; + unsigned char x_smclas[1]; + unsigned char x_scnlen_hi[4]; + unsigned char x_pad[1]; + } x_csect; + + struct { + char x_pad[17]; + char x_auxtype[1]; + } x_auxtype; +}; + +#define SYMENT struct external_syment +#define SYMESZ 18 +#define AUXENT union external_auxent +#define AUXESZ 18 +#define DBXMASK 0x80 /* for dbx storage mask */ +#define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK) + +/* Values for auxtype field in XCOFF64, taken from AIX 4.3 sym.h. */ +#define _AUX_EXCEPT 255 +#define _AUX_FCN 254 +#define _AUX_SYM 253 +#define _AUX_FILE 252 +#define _AUX_CSECT 251 + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc +{ + char r_vaddr[8]; + char r_symndx[4]; + char r_size[1]; + char r_type[1]; +}; + +#define RELOC struct external_reloc +#define RELSZ 14 + +#define DEFAULT_DATA_SECTION_ALIGNMENT 4 +#define DEFAULT_BSS_SECTION_ALIGNMENT 4 +#define DEFAULT_TEXT_SECTION_ALIGNMENT 4 +/* For new sections we havn't heard of before */ +#define DEFAULT_SECTION_ALIGNMENT 4 + +/* The ldhdr structure. This appears at the start of the .loader + section. */ + +struct external_ldhdr +{ + bfd_byte l_version[4]; + bfd_byte l_nsyms[4]; + bfd_byte l_nreloc[4]; + bfd_byte l_istlen[4]; + bfd_byte l_nimpid[4]; + bfd_byte l_stlen[4]; + bfd_byte l_impoff[8]; + bfd_byte l_stoff[8]; + bfd_byte l_symoff[8]; + bfd_byte l_rldoff[8]; +}; +#define LDHDRSZ (56) + +struct external_ldsym +{ + bfd_byte l_value[8]; + bfd_byte l_offset[4]; + bfd_byte l_scnum[2]; + bfd_byte l_smtype[1]; + bfd_byte l_smclas[1]; + bfd_byte l_ifile[4]; + bfd_byte l_parm[4]; +}; + +#define LDSYMSZ (24) + +struct external_ldrel +{ + bfd_byte l_vaddr[8]; + bfd_byte l_rtype[2]; + bfd_byte l_rsecnm[2]; + bfd_byte l_symndx[4]; +}; + +#define LDRELSZ (16) + +struct external_exceptab +{ + union { + bfd_byte e_symndx[4]; + bfd_byte e_paddr[8]; + } e_addr; + bfd_byte e_lang[1]; + bfd_byte e_reason[1]; +}; + +#define EXCEPTSZ (10) diff --git a/support/sdbinutils/include/coff/sh.h b/support/sdbinutils/include/coff/sh.h new file mode 100644 index 0000000..2905599 --- /dev/null +++ b/support/sdbinutils/include/coff/sh.h @@ -0,0 +1,148 @@ +/* coff information for Renesas SH + + Copyright (C) 2000-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifdef COFF_WITH_PE +#define L_LNNO_SIZE 2 +#else +#define L_LNNO_SIZE 4 +#endif +#define INCLUDE_COMDAT_FIELDS_IN_AUXENT +#include "coff/external.h" + +#define SH_ARCH_MAGIC_BIG 0x0500 +#define SH_ARCH_MAGIC_LITTLE 0x0550 /* Little endian SH */ +#define SH_ARCH_MAGIC_WINCE 0x01a2 /* Windows CE - little endian */ +#define SH_PE_MAGIC 0x010b + +#define SHBADMAG(x) \ + (((x).f_magic != SH_ARCH_MAGIC_BIG) && \ + ((x).f_magic != SH_ARCH_MAGIC_WINCE) && \ + ((x).f_magic != SH_ARCH_MAGIC_LITTLE)) + +/* Define some NT default values. */ +/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */ +#define NT_SECTION_ALIGNMENT 0x1000 +#define NT_FILE_ALIGNMENT 0x200 +#define NT_DEF_RESERVE 0x100000 +#define NT_DEF_COMMIT 0x1000 + +/********************** RELOCATION DIRECTIVES **********************/ + +/* The external reloc has an offset field, because some of the reloc + types on the h8 don't have room in the instruction for the entire + offset - eg the strange jump and high page addressing modes. */ + +#ifndef COFF_WITH_PE +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_offset[4]; + char r_type[2]; + char r_stuff[2]; +}; +#else +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; +}; +#endif + +#define RELOC struct external_reloc +#ifdef COFF_WITH_PE +#define RELSZ 10 +#else +#define RELSZ 16 +#endif + +/* SH relocation types. Not all of these are actually used. */ + +#define R_SH_UNUSED 0 /* only used internally */ +#define R_SH_IMM32CE 2 /* 32 bit immediate for WinCE */ +#define R_SH_PCREL8 3 /* 8 bit pcrel */ +#define R_SH_PCREL16 4 /* 16 bit pcrel */ +#define R_SH_HIGH8 5 /* high 8 bits of 24 bit address */ +#define R_SH_LOW16 7 /* low 16 bits of 24 bit immediate */ +#define R_SH_IMM24 6 /* 24 bit immediate */ +#define R_SH_PCDISP8BY4 9 /* PC rel 8 bits *4 +ve */ +#define R_SH_PCDISP8BY2 10 /* PC rel 8 bits *2 +ve */ +#define R_SH_PCDISP8 11 /* 8 bit branch */ +#define R_SH_PCDISP 12 /* 12 bit branch */ +#define R_SH_IMM32 14 /* 32 bit immediate */ +#define R_SH_IMM8 16 /* 8 bit immediate */ +#define R_SH_IMAGEBASE 16 /* Windows CE */ +#define R_SH_IMM8BY2 17 /* 8 bit immediate *2 */ +#define R_SH_IMM8BY4 18 /* 8 bit immediate *4 */ +#define R_SH_IMM4 19 /* 4 bit immediate */ +#define R_SH_IMM4BY2 20 /* 4 bit immediate *2 */ +#define R_SH_IMM4BY4 21 /* 4 bit immediate *4 */ +#define R_SH_PCRELIMM8BY2 22 /* PC rel 8 bits *2 unsigned */ +#define R_SH_PCRELIMM8BY4 23 /* PC rel 8 bits *4 unsigned */ +#define R_SH_IMM16 24 /* 16 bit immediate */ + +/* The switch table reloc types are used for relaxing. They are + generated for expressions such as + .word L1 - L2 + The r_offset field holds the difference between the reloc address + and L2. */ +#define R_SH_SWITCH8 33 /* 8 bit switch table entry */ +#define R_SH_SWITCH16 25 /* 16 bit switch table entry */ +#define R_SH_SWITCH32 26 /* 32 bit switch table entry */ + +/* The USES reloc type is used for relaxing. The compiler will + generate .uses pseudo-ops when it finds a function call which it + can relax. The r_offset field of the USES reloc holds the PC + relative offset to the instruction which loads the register used in + the function call. */ +#define R_SH_USES 27 /* .uses pseudo-op */ + +/* The COUNT reloc type is used for relaxing. The assembler will + generate COUNT relocs for addresses referred to by the register + loads associated with USES relocs. The r_offset field of the COUNT + reloc holds the number of times the address is referenced in the + object file. */ +#define R_SH_COUNT 28 /* Count of constant pool uses */ + +/* The ALIGN reloc type is used for relaxing. The r_offset field is + the power of two to which subsequent portions of the object file + must be aligned. */ +#define R_SH_ALIGN 29 /* .align pseudo-op */ + +/* The CODE and DATA reloc types are used for aligning load and store + instructions. The assembler will generate a CODE reloc before a + block of instructions. It will generate a DATA reloc before data. + A section should be processed assuming it contains data, unless a + CODE reloc is seen. The only relevant pieces of information in the + CODE and DATA relocs are the section and the address. The symbol + and offset are meaningless. */ +#define R_SH_CODE 30 /* start of code */ +#define R_SH_DATA 31 /* start of data */ + +/* The LABEL reloc type is used for aligning load and store + instructions. The assembler will generate a LABEL reloc for each + label within a block of instructions. This permits the linker to + avoid swapping instructions which are the targets of branches. */ +#define R_SH_LABEL 32 /* label */ + +/* NB: R_SH_SWITCH8 is 33 */ + +#define R_SH_LOOP_START 34 +#define R_SH_LOOP_END 35 diff --git a/support/sdbinutils/include/coff/sparc.h b/support/sdbinutils/include/coff/sparc.h new file mode 100644 index 0000000..369097a --- /dev/null +++ b/support/sdbinutils/include/coff/sparc.h @@ -0,0 +1,164 @@ +/* coff information for Sparc. + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file is an amalgamation of several standard include files that + define coff format, such as filehdr.h, aouthdr.h, and so forth. In + addition, all datatypes have been translated into character arrays of + (presumed) equivalent size. This is necessary so that this file can + be used with different systems while still yielding the same results. */ + +#define L_LNNO_SIZE 2 +#define DO_NOT_DEFINE_SYMENT +#define DO_NOT_DEFINE_AUXENT +#include "coff/external.h" + +#define F_RELFLG (0x0001) /* relocation info stripped */ +#define F_EXEC (0x0002) /* file is executable */ +#define F_LNNO (0x0004) /* line numbers stripped */ +#define F_LSYMS (0x0008) /* local symbols stripped */ + +#define SPARCMAGIC (0540) + +/* This is Lynx's all-platform magic number for executables. */ + +#define LYNXCOFFMAGIC (0415) + +#define OMAGIC 0404 /* object files, eg as output */ +#define ZMAGIC 0413 /* demand load format, eg normal ld output */ +#define STMAGIC 0401 /* target shlib */ +#define SHMAGIC 0443 /* host shlib */ + +/* More names of "special" sections. */ + +#define _TV ".tv" +#define _INIT ".init" +#define _FINI ".fini" + +/********************** SYMBOLS **********************/ + +#define E_SYMNMLEN (8) /* # characters in a symbol name */ +#define E_FILNMLEN (14) /* # characters in a file name */ +#define E_DIMNUM (4) /* # array dimensions in auxiliary entry */ + +struct external_syment +{ + union { + char e_name[E_SYMNMLEN]; + struct { + char e_zeroes[4]; + char e_offset[4]; + } e; +#if 0 /* of doubtful value */ + char e_nptr[2][4]; + struct { + char e_leading_zero[1]; + char e_dbx_type[1]; + char e_dbx_desc[2]; + } e_dbx; +#endif + } e; + + char e_value[4]; + char e_scnum[2]; + char e_type[2]; + char e_sclass[1]; + char e_numaux[1]; + char padding[2]; +}; + +#define N_BTMASK (0xf) +#define N_TMASK (0x30) +#define N_BTSHFT (4) +#define N_TSHIFT (2) + +union external_auxent +{ + struct { + char x_tagndx[4]; /* str, un, or enum tag indx */ + union { + struct { + char x_lnno[2]; /* declaration line number */ + char x_size[2]; /* str/union/array size */ + } x_lnsz; + char x_fsize[4]; /* size of function */ + } x_misc; + union { + struct { /* if ISFCN, tag, or .bb */ + char x_lnnoptr[4]; /* ptr to fcn line # */ + char x_endndx[4]; /* entry ndx past block end */ + } x_fcn; + struct { /* if ISARY, up to 4 dimen. */ + char x_dimen[E_DIMNUM][2]; + } x_ary; + } x_fcnary; + char x_tvndx[2]; /* tv index */ + } x_sym; + + union { + char x_fname[E_FILNMLEN]; + struct { + char x_zeroes[4]; + char x_offset[4]; + } x_n; + } x_file; + + struct { + char x_scnlen[4]; /* section length */ + char x_nreloc[2]; /* # relocation entries */ + char x_nlinno[2]; /* # line numbers */ + } x_scn; + + struct { + char x_tvfill[4]; /* tv fill value */ + char x_tvlen[2]; /* length of .tv */ + char x_tvran[2][2]; /* tv range */ + } x_tv; /* .tv section info (in auxent of sym .tv)) */ + + char x_fill[20]; /* forces to 20-byte size */ +}; + +#define SYMENT struct external_syment +#define SYMESZ 20 +#define AUXENT union external_auxent +#define AUXESZ 20 + +#define COFF_ADJUST_SYM_OUT_POST(ABFD, INP, EXTP) \ + do \ + { \ + SYMENT *extsym = (SYMENT *) (EXTP); \ + extsym->padding[0] = 0; \ + extsym->padding[1] = 0; \ + } while (0) + +#define _ETEXT "etext" + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; + char r_spare[2]; + char r_offset[4]; +}; + +#define RELOC struct external_reloc +#define RELSZ 16 + diff --git a/support/sdbinutils/include/coff/sym.h b/support/sdbinutils/include/coff/sym.h new file mode 100644 index 0000000..76204af --- /dev/null +++ b/support/sdbinutils/include/coff/sym.h @@ -0,0 +1,484 @@ +/* Declarations of internal format of MIPS ECOFF symbols. + Originally contributed by MIPS Computer Systems and Third Eye Software. + Changes contributed by Cygnus Support are in the public domain. + + This file is just aggregated with the files that make up the GNU + release; it is not considered part of GAS, GDB, or other GNU + programs. */ + +/* + * |-----------------------------------------------------------| + * | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.| + * | MIPS Computer Systems, Inc. grants reproduction and use | + * | rights to all parties, PROVIDED that this comment is | + * | maintained in the copy. | + * |-----------------------------------------------------------| + */ +#ifndef _SYM_H +#define _SYM_H + +/* (C) Copyright 1984 by Third Eye Software, Inc. + * + * Third Eye Software, Inc. grants reproduction and use rights to + * all parties, PROVIDED that this comment is maintained in the copy. + * + * Third Eye makes no claims about the applicability of this + * symbol table to a particular use. + */ + +/* + * This file contains the definition of the Third Eye Symbol Table. + * + * Symbols are assumed to be in 'encounter order' - i.e. the order that + * the things they represent were encountered by the compiler/assembler/loader. + * EXCEPT for globals! These are assumed to be bunched together, + * probably right after the last 'normal' symbol. Globals ARE sorted + * in ascending order. + * + * ----------------------------------------------------------------------- + * A brief word about Third Eye naming/use conventions: + * + * All arrays and index's are 0 based. + * All "ifooMax" values are the highest legal value PLUS ONE. This makes + * them good for allocating arrays, etc. All checks are "ifoo < ifooMax". + * + * "isym" Index into the SYMbol table. + * "ipd" Index into the Procedure Descriptor array. + * "ifd" Index into the File Descriptor array. + * "iss" Index into String Space. + * "cb" Count of Bytes. + * "rgPd" array whose domain is "0..ipdMax-1" and RanGe is PDR. + * "rgFd" array whose domain is "0..ifdMax-1" and RanGe is FDR. + */ + + +/* + * Symbolic Header (HDR) structure. + * As long as all the pointers are set correctly, + * we don't care WHAT order the various sections come out in! + * + * A file produced solely for the use of CDB will probably NOT have + * any instructions or data areas in it, as these are available + * in the original. + */ + +typedef struct { + short magic; /* to verify validity of the table */ + short vstamp; /* version stamp */ + long ilineMax; /* number of line number entries */ + bfd_vma cbLine; /* number of bytes for line number entries */ + bfd_vma cbLineOffset; /* offset to start of line number entries*/ + long idnMax; /* max index into dense number table */ + bfd_vma cbDnOffset; /* offset to start dense number table */ + long ipdMax; /* number of procedures */ + bfd_vma cbPdOffset; /* offset to procedure descriptor table */ + long isymMax; /* number of local symbols */ + bfd_vma cbSymOffset; /* offset to start of local symbols*/ + long ioptMax; /* max index into optimization symbol entries */ + bfd_vma cbOptOffset; /* offset to optimization symbol entries */ + long iauxMax; /* number of auxillary symbol entries */ + bfd_vma cbAuxOffset; /* offset to start of auxillary symbol entries*/ + long issMax; /* max index into local strings */ + bfd_vma cbSsOffset; /* offset to start of local strings */ + long issExtMax; /* max index into external strings */ + bfd_vma cbSsExtOffset; /* offset to start of external strings */ + long ifdMax; /* number of file descriptor entries */ + bfd_vma cbFdOffset; /* offset to file descriptor table */ + long crfd; /* number of relative file descriptor entries */ + bfd_vma cbRfdOffset; /* offset to relative file descriptor table */ + long iextMax; /* max index into external symbols */ + bfd_vma cbExtOffset; /* offset to start of external symbol entries*/ + /* If you add machine dependent fields, add them here */ + } HDRR, *pHDRR; +#define cbHDRR sizeof(HDRR) +#define hdrNil ((pHDRR)0) + +/* + * The FDR and PDR structures speed mapping of address <-> name. + * They are sorted in ascending memory order and are kept in + * memory by CDB at runtime. + */ + +/* + * File Descriptor + * + * There is one of these for EVERY FILE, whether compiled with + * full debugging symbols or not. The name of a file should be + * the path name given to the compiler. This allows the user + * to simply specify the names of the directories where the COMPILES + * were done, and we will be able to find their files. + * A field whose comment starts with "R - " indicates that it will be + * setup at runtime. + */ +typedef struct fdr { + bfd_vma adr; /* memory address of beginning of file */ + long rss; /* file name (of source, if known) */ + long issBase; /* file's string space */ + bfd_vma cbSs; /* number of bytes in the ss */ + long isymBase; /* beginning of symbols */ + long csym; /* count file's of symbols */ + long ilineBase; /* file's line symbols */ + long cline; /* count of file's line symbols */ + long ioptBase; /* file's optimization entries */ + long copt; /* count of file's optimization entries */ + unsigned short ipdFirst;/* start of procedures for this file */ + short cpd; /* count of procedures for this file */ + long iauxBase; /* file's auxiliary entries */ + long caux; /* count of file's auxiliary entries */ + long rfdBase; /* index into the file indirect table */ + long crfd; /* count file indirect entries */ + unsigned lang: 5; /* language for this file */ + unsigned fMerge : 1; /* whether this file can be merged */ + unsigned fReadin : 1; /* true if it was read in (not just created) */ + unsigned fBigendian : 1;/* if set, was compiled on big endian machine */ + /* aux's will be in compile host's sex */ + unsigned glevel : 2; /* level this file was compiled with */ + unsigned reserved : 22; /* reserved for future use */ + bfd_vma cbLineOffset; /* byte offset from header for this file ln's */ + bfd_vma cbLine; /* size of lines for this file */ + } FDR, *pFDR; +#define cbFDR sizeof(FDR) +#define fdNil ((pFDR)0) +#define ifdNil -1 +#define ifdTemp 0 +#define ilnNil -1 + + +/* + * Procedure Descriptor + * + * There is one of these for EVERY TEXT LABEL. + * If a procedure is in a file with full symbols, then isym + * will point to the PROC symbols, else it will point to the + * global symbol for the label. + */ + +typedef struct pdr { + bfd_vma adr; /* memory address of start of procedure */ + long isym; /* start of local symbol entries */ + long iline; /* start of line number entries*/ + long regmask; /* save register mask */ + long regoffset; /* save register offset */ + long iopt; /* start of optimization symbol entries*/ + long fregmask; /* save floating point register mask */ + long fregoffset; /* save floating point register offset */ + long frameoffset; /* frame size */ + short framereg; /* frame pointer register */ + short pcreg; /* offset or reg of return pc */ + long lnLow; /* lowest line in the procedure */ + long lnHigh; /* highest line in the procedure */ + bfd_vma cbLineOffset; /* byte offset for this procedure from the fd base */ + /* These fields are new for 64 bit ECOFF. */ + unsigned gp_prologue : 8; /* byte size of GP prologue */ + unsigned gp_used : 1; /* true if the procedure uses GP */ + unsigned reg_frame : 1; /* true if register frame procedure */ + unsigned prof : 1; /* true if compiled with -pg */ + unsigned reserved : 13; /* reserved: must be zero */ + unsigned localoff : 8; /* offset of local variables from vfp */ + } PDR, *pPDR; +#define cbPDR sizeof(PDR) +#define pdNil ((pPDR) 0) +#define ipdNil -1 + +/* + * The structure of the runtime procedure descriptor created by the loader + * for use by the static exception system. + */ +/* + * If 0'd out because exception_info chokes Visual C++ and because there + * don't seem to be any references to this structure elsewhere in gdb. + */ +#if 0 +typedef struct runtime_pdr { + bfd_vma adr; /* memory address of start of procedure */ + long regmask; /* save register mask */ + long regoffset; /* save register offset */ + long fregmask; /* save floating point register mask */ + long fregoffset; /* save floating point register offset */ + long frameoffset; /* frame size */ + short framereg; /* frame pointer register */ + short pcreg; /* offset or reg of return pc */ + long irpss; /* index into the runtime string table */ + long reserved; + struct exception_info *exception_info;/* pointer to exception array */ +} RPDR, *pRPDR; +#define cbRPDR sizeof(RPDR) +#define rpdNil ((pRPDR) 0) +#endif + +/* + * Line Numbers + * + * Line Numbers are segregated from the normal symbols because they + * are [1] smaller , [2] are of no interest to your + * average loader, and [3] are never needed in the middle of normal + * scanning and therefore slow things down. + * + * By definition, the first LINER for any given procedure will have + * the first line of a procedure and represent the first address. + */ + +typedef long LINER, *pLINER; +#define lineNil ((pLINER)0) +#define cbLINER sizeof(LINER) +#define ilineNil -1 + + + +/* + * The Symbol Structure (GFW, to those who Know!) + */ + +typedef struct { + long iss; /* index into String Space of name */ + bfd_vma value; /* value of symbol */ + unsigned st : 6; /* symbol type */ + unsigned sc : 5; /* storage class - text, data, etc */ + unsigned reserved : 1; /* reserved */ + unsigned index : 20; /* index into sym/aux table */ + } SYMR, *pSYMR; +#define symNil ((pSYMR)0) +#define cbSYMR sizeof(SYMR) +#define isymNil -1 +#define indexNil 0xfffff +#define issNil -1 +#define issNull 0 + + +/* The following converts a memory resident string to an iss. + * This hack is recognized in SbFIss, in sym.c of the debugger. + */ +#define IssFSb(sb) (0x80000000 | ((unsigned long)(sb))) + +/* E X T E R N A L S Y M B O L R E C O R D + * + * Same as the SYMR except it contains file context to determine where + * the index is. + */ +typedef struct ecoff_extr { + unsigned jmptbl:1; /* symbol is a jump table entry for shlibs */ + unsigned cobol_main:1; /* symbol is a cobol main procedure */ + unsigned weakext:1; /* symbol is weak external */ + unsigned reserved:13; /* reserved for future use */ + int ifd; /* where the iss and index fields point into */ + SYMR asym; /* symbol for the external */ + } EXTR, *pEXTR; +#define extNil ((pEXTR)0) +#define cbEXTR sizeof(EXTR) + + +/* A U X I L L A R Y T Y P E I N F O R M A T I O N */ + +/* + * Type Information Record + */ +typedef struct { + unsigned fBitfield : 1; /* set if bit width is specified */ + unsigned continued : 1; /* indicates additional TQ info in next AUX */ + unsigned bt : 6; /* basic type */ + unsigned tq4 : 4; + unsigned tq5 : 4; + /* ---- 16 bit boundary ---- */ + unsigned tq0 : 4; + unsigned tq1 : 4; /* 6 type qualifiers - tqPtr, etc. */ + unsigned tq2 : 4; + unsigned tq3 : 4; + } TIR, *pTIR; +#define cbTIR sizeof(TIR) +#define tiNil ((pTIR)0) +#define itqMax 6 + +/* + * Relative symbol record + * + * If the rfd field is 4095, the index field indexes into the global symbol + * table. + */ + +typedef struct { + unsigned rfd : 12; /* index into the file indirect table */ + unsigned index : 20; /* index int sym/aux/iss tables */ + } RNDXR, *pRNDXR; +#define cbRNDXR sizeof(RNDXR) +#define rndxNil ((pRNDXR)0) + +/* dense numbers or sometimes called block numbers are stored in this type, + * a rfd of 0xffffffff is an index into the global table. + */ +typedef struct { + unsigned long rfd; /* index into the file table */ + unsigned long index; /* index int sym/aux/iss tables */ + } DNR, *pDNR; +#define cbDNR sizeof(DNR) +#define dnNil ((pDNR)0) + + + +/* + * Auxillary information occurs only if needed. + * It ALWAYS occurs in this order when present. + + isymMac used by stProc only + TIR type info + TIR additional TQ info (if first TIR was not enough) + rndx if (bt == btStruct,btUnion,btEnum,btSet,btRange, + btTypedef): + rsym.index == iaux for btSet or btRange + else rsym.index == isym + dimLow btRange, btSet + dimMac btRange, btSet + rndx0 As many as there are tq arrays + dimLow0 + dimHigh0 + ... + rndxMax-1 + dimLowMax-1 + dimHighMax-1 + width in bits if (bit field), width in bits. + */ +#define cAuxMax (6 + (idimMax*3)) + +/* a union of all possible info in the AUX universe */ +typedef union { + TIR ti; /* type information record */ + RNDXR rndx; /* relative index into symbol table */ + long dnLow; /* low dimension */ + long dnHigh; /* high dimension */ + long isym; /* symbol table index (end of proc) */ + long iss; /* index into string space (not used) */ + long width; /* width for non-default sized struc fields */ + long count; /* count of ranges for variant arm */ + } AUXU, *pAUXU; +#define cbAUXU sizeof(AUXU) +#define auxNil ((pAUXU)0) +#define iauxNil -1 + + +/* + * Optimization symbols + * + * Optimization symbols contain some overlap information with the normal + * symbol table. In particular, the proc information + * is somewhat redundant but necessary to easily find the other information + * present. + * + * All of the offsets are relative to the beginning of the last otProc + */ + +typedef struct { + unsigned ot: 8; /* optimization type */ + unsigned value: 24; /* address where we are moving it to */ + RNDXR rndx; /* points to a symbol or opt entry */ + unsigned long offset; /* relative offset this occured */ + } OPTR, *pOPTR; +#define optNil ((pOPTR) 0) +#define cbOPTR sizeof(OPTR) +#define ioptNil -1 + +/* + * File Indirect + * + * When a symbol is referenced across files the following procedure is used: + * 1) use the file index to get the File indirect entry. + * 2) use the file indirect entry to get the File descriptor. + * 3) add the sym index to the base of that file's sym table + * + */ + +typedef long RFDT, *pRFDT; +#define cbRFDT sizeof(RFDT) +#define rfdNil -1 + +/* + * The file indirect table in the mips loader is known as an array of FITs. + * This is done to keep the code in the loader readable in the area where + * these tables are merged. Note this is only a name change. + */ +typedef long FIT, *pFIT; +#define cbFIT sizeof(FIT) +#define ifiNil -1 +#define fiNil ((pFIT) 0) + +#ifdef _LANGUAGE_PASCAL +#define ifdNil -1 +#define ilnNil -1 +#define ipdNil -1 +#define ilineNil -1 +#define isymNil -1 +#define indexNil 16#fffff +#define issNil -1 +#define issNull 0 +#define itqMax 6 +#define iauxNil -1 +#define ioptNil -1 +#define rfdNil -1 +#define ifiNil -1 +#endif /* _LANGUAGE_PASCAL */ + + +/* Dense numbers + * + * Rather than use file index, symbol index pairs to represent symbols + * and globals, we use dense number so that they can be easily embeded + * in intermediate code and the programs that process them can + * use direct access tabls instead of hash table (which would be + * necesary otherwise because of the sparse name space caused by + * file index, symbol index pairs. Dense number are represented + * by RNDXRs. + */ + +/* + * The following table defines the meaning of each SYM field as + * a function of the "st". (scD/B == scData OR scBss) + * + * Note: the value "isymMac" is used by symbols that have the concept + * of enclosing a block of related information. This value is the + * isym of the first symbol AFTER the end associated with the primary + * symbol. For example if a procedure was at isym==90 and had an + * isymMac==155, the associated end would be at isym==154, and the + * symbol at 155 would probably (although not necessarily) be the + * symbol for the next procedure. This allows rapid skipping over + * internal information of various sorts. "stEnd"s ALWAYS have the + * isym of the primary symbol that started the block. + * + +ST SC VALUE INDEX +-------- ------ -------- ------ +stFile scText address isymMac +stLabel scText address --- +stGlobal scD/B address iaux +stStatic scD/B address iaux +stParam scAbs offset iaux +stLocal scAbs offset iaux +stProc scText address iaux (isymMac is first AUX) +stStaticProc scText address iaux (isymMac is first AUX) + +stMember scNil ordinal --- (if member of enum) + (mipsread thinks the case below has a bit, not byte, offset.) +stMember scNil byte offset iaux (if member of struct/union) +stMember scBits bit offset iaux (bit field spec) + +stBlock scText address isymMac (text block) + (the code seems to think that rather than scNil, we see scInfo for + the two cases below.) +stBlock scNil cb isymMac (struct/union member define) +stBlock scNil cMembers isymMac (enum member define) + + (New types added by SGI to simplify things:) +stStruct scInfo cb isymMac (struct type define) +stUnion scInfo cb isymMac (union type define) +stEnum scInfo cMembers isymMac (enum type define) + +stEnd scText address isymStart +stEnd scNil ------- isymStart (struct/union/enum) + +stTypedef scNil ------- iaux +stRegReloc sc??? value old register number +stForward sc??? new address isym to original symbol + +stConstant scInfo value --- (scalar) +stConstant scInfo iss --- (complex, e.g. string) + + * + */ +#endif diff --git a/support/sdbinutils/include/coff/symconst.h b/support/sdbinutils/include/coff/symconst.h new file mode 100644 index 0000000..ac62ba2 --- /dev/null +++ b/support/sdbinutils/include/coff/symconst.h @@ -0,0 +1,184 @@ +/* Declarations of constants for internal format of MIPS ECOFF symbols. + Originally contributed by MIPS Computer Systems and Third Eye Software. + Changes contributed by Cygnus Support are in the public domain. + + This file is just aggregated with the files that make up the GNU + release; it is not considered part of GAS, GDB, or other GNU + programs. */ + +/* + * |-----------------------------------------------------------| + * | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.| + * | MIPS Computer Systems, Inc. grants reproduction and use | + * | rights to all parties, PROVIDED that this comment is | + * | maintained in the copy. | + * |-----------------------------------------------------------| + */ + +/* (C) Copyright 1984 by Third Eye Software, Inc. + * + * Third Eye Software, Inc. grants reproduction and use rights to + * all parties, PROVIDED that this comment is maintained in the copy. + * + * Third Eye makes no claims about the applicability of this + * symbol table to a particular use. + */ + +/* glevels for field in FDR */ +#define GLEVEL_0 2 +#define GLEVEL_1 1 +#define GLEVEL_2 0 /* for upward compat reasons. */ +#define GLEVEL_3 3 + +/* magic number fo symheader */ +#define magicSym 0x7009 +/* The Alpha uses this value instead, for some reason. */ +#define magicSym2 0x1992 + +/* Language codes */ +#define langC 0 +#define langPascal 1 +#define langFortran 2 +#define langAssembler 3 /* one Assembley inst might map to many mach */ +#define langMachine 4 +#define langNil 5 +#define langAda 6 +#define langPl1 7 +#define langCobol 8 +#define langStdc 9 /* FIXME: Collides with SGI langCplusplus */ +#define langCplusplus 9 /* FIXME: Collides with langStdc */ +#define langCplusplusV2 10 /* SGI addition */ +#define langMax 11 /* maximum allowed 32 -- 5 bits */ + +/* The following are value definitions for the fields in the SYMR */ + +/* + * Storage Classes + */ + +#define scNil 0 +#define scText 1 /* text symbol */ +#define scData 2 /* initialized data symbol */ +#define scBss 3 /* un-initialized data symbol */ +#define scRegister 4 /* value of symbol is register number */ +#define scAbs 5 /* value of symbol is absolute */ +#define scUndefined 6 /* who knows? */ +#define scCdbLocal 7 /* variable's value is IN se->va.?? */ +#define scBits 8 /* this is a bit field */ +#define scCdbSystem 9 /* variable's value is IN CDB's address space */ +#define scDbx 9 /* overlap dbx internal use */ +#define scRegImage 10 /* register value saved on stack */ +#define scInfo 11 /* symbol contains debugger information */ +#define scUserStruct 12 /* address in struct user for current process */ +#define scSData 13 /* load time only small data */ +#define scSBss 14 /* load time only small common */ +#define scRData 15 /* load time only read only data */ +#define scVar 16 /* Var parameter (fortran,pascal) */ +#define scCommon 17 /* common variable */ +#define scSCommon 18 /* small common */ +#define scVarRegister 19 /* Var parameter in a register */ +#define scVariant 20 /* Variant record */ +#define scSUndefined 21 /* small undefined(external) data */ +#define scInit 22 /* .init section symbol */ +#define scBasedVar 23 /* Fortran or PL/1 ptr based var */ +#define scXData 24 /* exception handling data */ +#define scPData 25 /* Procedure section */ +#define scFini 26 /* .fini section */ +#define scRConst 27 /* .rconst section */ +#define scMax 32 + + +/* + * Symbol Types + */ + +#define stNil 0 /* Nuthin' special */ +#define stGlobal 1 /* external symbol */ +#define stStatic 2 /* static */ +#define stParam 3 /* procedure argument */ +#define stLocal 4 /* local variable */ +#define stLabel 5 /* label */ +#define stProc 6 /* " " Procedure */ +#define stBlock 7 /* beginnning of block */ +#define stEnd 8 /* end (of anything) */ +#define stMember 9 /* member (of anything - struct/union/enum */ +#define stTypedef 10 /* type definition */ +#define stFile 11 /* file name */ +#define stRegReloc 12 /* register relocation */ +#define stForward 13 /* forwarding address */ +#define stStaticProc 14 /* load time only static procs */ +#define stConstant 15 /* const */ +#define stStaParam 16 /* Fortran static parameters */ + /* These new symbol types have been recently added to SGI machines. */ +#define stStruct 26 /* Beginning of block defining a struct type */ +#define stUnion 27 /* Beginning of block defining a union type */ +#define stEnum 28 /* Beginning of block defining an enum type */ +#define stIndirect 34 /* Indirect type specification */ + /* Pseudo-symbols - internal to debugger */ +#define stStr 60 /* string */ +#define stNumber 61 /* pure number (ie. 4 NOR 2+2) */ +#define stExpr 62 /* 2+2 vs. 4 */ +#define stType 63 /* post-coersion SER */ +#define stMax 64 + +/* definitions for fields in TIR */ + +/* type qualifiers for ti.tq0 -> ti.(itqMax-1) */ +#define tqNil 0 /* bt is what you see */ +#define tqPtr 1 /* pointer */ +#define tqProc 2 /* procedure */ +#define tqArray 3 /* duh */ +#define tqFar 4 /* longer addressing - 8086/8 land */ +#define tqVol 5 /* volatile */ +#define tqConst 6 /* const */ +#define tqMax 8 + +/* basic types as seen in ti.bt */ +#define btNil 0 /* undefined (also, enum members) */ +#define btAdr 1 /* address - integer same size as pointer */ +#define btChar 2 /* character */ +#define btUChar 3 /* unsigned character */ +#define btShort 4 /* short */ +#define btUShort 5 /* unsigned short */ +#define btInt 6 /* int */ +#define btUInt 7 /* unsigned int */ +#define btLong 8 /* long */ +#define btULong 9 /* unsigned long */ +#define btFloat 10 /* float (real) */ +#define btDouble 11 /* Double (real) */ +#define btStruct 12 /* Structure (Record) */ +#define btUnion 13 /* Union (variant) */ +#define btEnum 14 /* Enumerated */ +#define btTypedef 15 /* defined via a typedef, isymRef points */ +#define btRange 16 /* subrange of int */ +#define btSet 17 /* pascal sets */ +#define btComplex 18 /* fortran complex */ +#define btDComplex 19 /* fortran double complex */ +#define btIndirect 20 /* forward or unnamed typedef */ +#define btFixedDec 21 /* Fixed Decimal */ +#define btFloatDec 22 /* Float Decimal */ +#define btString 23 /* Varying Length Character String */ +#define btBit 24 /* Aligned Bit String */ +#define btPicture 25 /* Picture */ +#define btVoid 26 /* void */ +#define btLongLong 27 /* long long */ +#define btULongLong 28 /* unsigned long long */ +#define btLong64 30 /* long (64-bit) */ +#define btULong64 31 /* unsigned long (64-bit) */ +#define btLongLong64 32 /* long long (64-bit) */ +#define btULongLong64 33 /* unsigned long long (64-bit) */ +#define btAdr64 34 /* address (64-bit) */ +#define btInt64 35 /* int (64-bit) */ +#define btUInt64 36 /* unsigned int (64-bit) */ +#define btMax 64 + +#if (_MFG == _MIPS) +/* optimization type codes */ +#define otNil 0 +#define otReg 1 /* move var to reg */ +#define otBlock 2 /* begin basic block */ +#define otProc 3 /* procedure */ +#define otInline 4 /* inline procedure */ +#define otEnd 5 /* whatever you started */ +#define otMax 6 /* KEEP UP TO DATE */ +#endif /* (_MFG == _MIPS) */ diff --git a/support/sdbinutils/include/coff/ti.h b/support/sdbinutils/include/coff/ti.h new file mode 100644 index 0000000..0ebc7bf --- /dev/null +++ b/support/sdbinutils/include/coff/ti.h @@ -0,0 +1,560 @@ +/* COFF information for TI COFF support. Definitions in this file should be + customized in a target-specific file, and then this file included (see + tic54x.h for an example). + + Copyright (C) 2000-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef COFF_TI_H +#define COFF_TI_H + +/* Note "coff/external.h is not used because TI adds extra fields to the structures. */ + +/********************** FILE HEADER **********************/ + +struct external_filehdr + { + char f_magic[2]; /* magic number */ + char f_nscns[2]; /* number of sections */ + char f_timdat[4]; /* time & date stamp */ + char f_symptr[4]; /* file pointer to symtab */ + char f_nsyms[4]; /* number of symtab entries */ + char f_opthdr[2]; /* sizeof(optional hdr) */ + char f_flags[2]; /* flags */ + char f_target_id[2]; /* magic no. (TI COFF-specific) */ + }; + +/* COFF0 has magic number in f_magic, and omits f_target_id from the file + header; for later versions, f_magic is 0xC1 for COFF1 and 0xC2 for COFF2 + and the target-specific magic number is found in f_target_id */ + +#define TICOFF0MAGIC TI_TARGET_ID +#define TICOFF1MAGIC 0x00C1 +#define TICOFF2MAGIC 0x00C2 +#define TICOFF_AOUT_MAGIC 0x0108 /* magic number in optional header */ +#define TICOFF 1 /* customize coffcode.h */ + +/* The target_id field changes depending on the particular CPU target */ +/* for COFF0, the target id appeared in f_magic, where COFFX magic is now */ +#ifndef TI_TARGET_ID +#error "TI_TARGET_ID needs to be defined for your CPU" +#endif + +/* Which bfd_arch to use... */ +#ifndef TICOFF_TARGET_ARCH +#error "TICOFF_TARGET_ARCH needs to be defined for your CPU" +#endif + +#ifndef TICOFF_TARGET_MACHINE_GET +#define TICOFF_TARGET_MACHINE_GET(FLAGS) 0 +#endif + +#ifndef TICOFF_TARGET_MACHINE_SET +#define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE) +#endif + +/* Default to COFF2 for file output */ +#ifndef TICOFF_DEFAULT_MAGIC +#define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC +#endif + +/* This value is made available in the rare case where a bfd is unavailable */ +#ifndef OCTETS_PER_BYTE_POWER +#error "OCTETS_PER_BYTE_POWER not defined for this CPU" +#else +#define OCTETS_PER_BYTE (1<>8)&0xF) + +#define COFF0_P(ABFD) (bfd_coff_filhsz(ABFD) == FILHSZ_V0) +#define COFF2_P(ABFD) (bfd_coff_scnhsz(ABFD) != SCNHSZ_V01) + +#define COFF0_BADMAG(x) ((x).f_magic != TICOFF0MAGIC) +#define COFF1_BADMAG(x) ((x).f_magic != TICOFF1MAGIC || (x).f_target_id != TI_TARGET_ID) +#define COFF2_BADMAG(x) ((x).f_magic != TICOFF2MAGIC || (x).f_target_id != TI_TARGET_ID) + +/* we need to read/write an extra field in the coff file header */ +#ifndef COFF_ADJUST_FILEHDR_IN_POST +#define COFF_ADJUST_FILEHDR_IN_POST(abfd, src, dst) \ + do \ + { \ + if (!COFF0_P (abfd)) \ + ((struct internal_filehdr *)(dst))->f_target_id = \ + H_GET_16 (abfd, ((FILHDR *)(src))->f_target_id); \ + } \ + while (0) +#endif + +#ifndef COFF_ADJUST_FILEHDR_OUT_POST +#define COFF_ADJUST_FILEHDR_OUT_POST(abfd, src, dst) \ + do \ + { \ + if (!COFF0_P (abfd)) \ + H_PUT_16 (abfd, ((struct internal_filehdr *)(src))->f_target_id, \ + ((FILHDR *)(dst))->f_target_id); \ + } \ + while (0) +#endif + +#define FILHDR struct external_filehdr +#define FILHSZ 22 +#define FILHSZ_V0 20 /* COFF0 omits target_id field */ + +/* File header flags */ +#define F_RELFLG (0x0001) +#define F_EXEC (0x0002) +#define F_LNNO (0x0004) +#define F_VERS (0x0010) /* TMS320C4x code */ +/* F_LSYMS needs to be redefined in your source file */ +#define F_LSYMS_TICOFF (0x0010) /* normal COFF is 0x8 */ + +#define F_10 0x00 /* file built for TMS320C1x devices */ +#define F_20 0x10 /* file built for TMS320C2x devices */ +#define F_25 0x20 /* file built for TMS320C2x/C5x devices */ +#define F_LENDIAN 0x0100 /* 16 bits/word, LSB first */ +#define F_SYMMERGE 0x1000 /* duplicate symbols were removed */ + +/********************** OPTIONAL HEADER **********************/ + + +typedef struct +{ + char magic[2]; /* type of file (0x108) */ + char vstamp[2]; /* version stamp */ + char tsize[4]; /* text size in bytes, padded to FW bdry*/ + char dsize[4]; /* initialized data " " */ + char bsize[4]; /* uninitialized data " " */ + char entry[4]; /* entry pt. */ + char text_start[4]; /* base of text used for this file */ + char data_start[4]; /* base of data used for this file */ +} +AOUTHDR; + + +#define AOUTHDRSZ 28 +#define AOUTSZ 28 + + +/********************** SECTION HEADER **********************/ +/* COFF0, COFF1 */ +struct external_scnhdr_v01 { + char s_name[8]; /* section name */ + char s_paddr[4]; /* physical address, aliased s_nlib */ + char s_vaddr[4]; /* virtual address */ + char s_size[4]; /* section size (in WORDS) */ + char s_scnptr[4]; /* file ptr to raw data for section */ + char s_relptr[4]; /* file ptr to relocation */ + char s_lnnoptr[4]; /* file ptr to line numbers */ + char s_nreloc[2]; /* number of relocation entries */ + char s_nlnno[2]; /* number of line number entries*/ + char s_flags[2]; /* flags */ + char s_reserved[1]; /* reserved */ + char s_page[1]; /* section page number (LOAD) */ +}; + +/* COFF2 */ +struct external_scnhdr { + char s_name[8]; /* section name */ + char s_paddr[4]; /* physical address, aliased s_nlib */ + char s_vaddr[4]; /* virtual address */ + char s_size[4]; /* section size (in WORDS) */ + char s_scnptr[4]; /* file ptr to raw data for section */ + char s_relptr[4]; /* file ptr to relocation */ + char s_lnnoptr[4]; /* file ptr to line numbers */ + char s_nreloc[4]; /* number of relocation entries */ + char s_nlnno[4]; /* number of line number entries*/ + char s_flags[4]; /* flags */ + char s_reserved[2]; /* reserved */ + char s_page[2]; /* section page number (LOAD) */ +}; + +/* + * Special section flags + */ + +/* TI COFF defines these flags; + STYP_CLINK: the section should be excluded from the final + linker output if there are no references found to any symbol in the section + STYP_BLOCK: the section should be blocked, i.e. if the section would cross + a page boundary, it is started at a page boundary instead. + TI COFF puts the section alignment power of two in the section flags + e.g. 2**N is alignment, flags |= (N & 0xF) << 8 +*/ +#define STYP_CLINK (0x4000) +#define STYP_BLOCK (0x1000) +#define STYP_ALIGN (0x0F00) /* TI COFF stores section alignment here */ + +#define SCNHDR_V01 struct external_scnhdr_v01 +#define SCNHDR struct external_scnhdr +#define SCNHSZ_V01 40 /* for v0 and v1 */ +#define SCNHSZ 48 + +/* COFF2 changes the offsets and sizes of these fields + Assume we're dealing with the COFF2 scnhdr structure, and adjust + accordingly. Note: The GNU C versions of some of these macros + are necessary in order to avoid compile time warnings triggered + gcc's array bounds checking. The PUT_SCNHDR_PAGE macro also has + the advantage on not evaluating LOC twice. */ + +#define GET_SCNHDR_NRELOC(ABFD, LOC) \ + (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, LOC)) +#define PUT_SCNHDR_NRELOC(ABFD, VAL, LOC) \ + (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, LOC)) +#ifdef __GNUC__ +#define GET_SCNHDR_NLNNO(ABFD, LOC) \ + ({ \ + int nlnno; \ + char * ptr = (LOC); \ + if (COFF2_P (ABFD)) \ + nlnno = H_GET_32 (ABFD, ptr); \ + else \ + nlnno = H_GET_16 (ABFD, ptr - 2); \ + nlnno; \ + }) +#define PUT_SCNHDR_NLNNO(ABFD, VAL, LOC) \ + do \ + { \ + char * ptr = (LOC); \ + if (COFF2_P (ABFD)) \ + H_PUT_32 (ABFD, VAL, ptr); \ + else \ + H_PUT_16 (ABFD, VAL, ptr - 2); \ + } \ + while (0) +#define GET_SCNHDR_FLAGS(ABFD, LOC) \ + ({ \ + int flags; \ + char * ptr = (LOC); \ + if (COFF2_P (ABFD)) \ + flags = H_GET_32 (ABFD, ptr); \ + else \ + flags = H_GET_16 (ABFD, ptr - 4); \ + flags; \ + }) +#define PUT_SCNHDR_FLAGS(ABFD, VAL, LOC) \ + do \ + { \ + char * ptr = (LOC); \ + if (COFF2_P (ABFD)) \ + H_PUT_32 (ABFD, VAL, ptr); \ + else \ + H_PUT_16 (ABFD, VAL, ptr - 4); \ + } \ + while (0) +#define GET_SCNHDR_PAGE(ABFD, LOC) \ + ({ \ + unsigned page; \ + char * ptr = (LOC); \ + if (COFF2_P (ABFD)) \ + page = H_GET_16 (ABFD, ptr); \ + else \ + page = (unsigned) H_GET_8 (ABFD, ptr - 7); \ + page; \ + }) +/* On output, make sure that the "reserved" field is zero. */ +#define PUT_SCNHDR_PAGE(ABFD, VAL, LOC) \ + do \ + { \ + char * ptr = (LOC); \ + if (COFF2_P (ABFD)) \ + H_PUT_16 (ABFD, VAL, ptr); \ + else \ + { \ + H_PUT_8 (ABFD, VAL, ptr - 7); \ + H_PUT_8 (ABFD, 0, ptr - 8); \ + } \ + } \ + while (0) +#else +#define GET_SCNHDR_NLNNO(ABFD, LOC) \ + (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, (LOC) - 2)) +#define PUT_SCNHDR_NLNNO(ABFD, VAL, LOC) \ + (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 2)) +#define GET_SCNHDR_FLAGS(ABFD, LOC) \ + (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, (LOC) - 4)) +#define PUT_SCNHDR_FLAGS(ABFD, VAL, LOC) \ + (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 4)) +#define GET_SCNHDR_PAGE(ABFD, LOC) \ + (COFF2_P (ABFD) ? H_GET_16 (ABFD, LOC) : (unsigned) H_GET_8 (ABFD, (LOC) - 7)) +/* On output, make sure that the "reserved" field is zero. */ +#define PUT_SCNHDR_PAGE(ABFD, VAL, LOC) \ + (COFF2_P (ABFD) \ + ? H_PUT_16 (ABFD, VAL, LOC) \ + : H_PUT_8 (ABFD, VAL, (LOC) - 7), H_PUT_8 (ABFD, 0, (LOC) - 8)) +#endif + + +/* TI COFF stores section size as number of bytes (address units, not octets), + so adjust to be number of octets, which is what BFD expects */ +#define GET_SCNHDR_SIZE(ABFD, SZP) \ + (H_GET_32 (ABFD, SZP) * bfd_octets_per_byte (ABFD)) +#define PUT_SCNHDR_SIZE(ABFD, SZ, SZP) \ + H_PUT_32 (ABFD, (SZ) / bfd_octets_per_byte (ABFD), SZP) + +#define COFF_ADJUST_SCNHDR_IN_POST(ABFD, EXT, INT) \ + do \ + { \ + ((struct internal_scnhdr *)(INT))->s_page = \ + GET_SCNHDR_PAGE (ABFD, ((SCNHDR *)(EXT))->s_page); \ + } \ + while (0) + +/* The entire scnhdr may not be assigned. + Ensure that everything is initialized. */ +#define COFF_ADJUST_SCNHDR_OUT_PRE(ABFD, INT, EXT) \ + do \ + { \ + memset((EXT), 0, sizeof (SCNHDR)); \ + } \ + while (0) + +/* The line number and reloc overflow checking in coff_swap_scnhdr_out in + coffswap.h doesn't use PUT_X for s_nlnno and s_nreloc. + Due to different sized v0/v1/v2 section headers, we have to re-write these + fields. + */ +#define COFF_ADJUST_SCNHDR_OUT_POST(ABFD, INT, EXT) \ + do \ + { \ + PUT_SCNHDR_NLNNO (ABFD, ((struct internal_scnhdr *)(INT))->s_nlnno, \ + ((SCNHDR *)(EXT))->s_nlnno); \ + PUT_SCNHDR_NRELOC (ABFD, ((struct internal_scnhdr *)(INT))->s_nreloc,\ + ((SCNHDR *)(EXT))->s_nreloc); \ + PUT_SCNHDR_FLAGS (ABFD, ((struct internal_scnhdr *)(INT))->s_flags, \ + ((SCNHDR *)(EXT))->s_flags); \ + PUT_SCNHDR_PAGE (ABFD, ((struct internal_scnhdr *)(INT))->s_page, \ + ((SCNHDR *)(EXT))->s_page); \ + } \ + while (0) + +/* + * names of "special" sections + */ +#define _TEXT ".text" +#define _DATA ".data" +#define _BSS ".bss" +#define _CINIT ".cinit" /* initialized C data */ +#define _SCONST ".const" /* constants */ +#define _SWITCH ".switch" /* switch tables */ +#define _STACK ".stack" /* C stack */ +#define _SYSMEM ".sysmem" /* used for malloc et al. syscalls */ + +/********************** LINE NUMBERS **********************/ + +/* 1 line number entry for every "breakpointable" source line in a section. + * Line numbers are grouped on a per function basis; first entry in a function + * grouping will have l_lnno = 0 and in place of physical address will be the + * symbol table index of the function name. + */ +struct external_lineno { + union { + char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/ + char l_paddr[4]; /* (physical) address of line number */ + } l_addr; + char l_lnno[2]; /* line number */ +}; + +#define LINENO struct external_lineno +#define LINESZ 6 + + +/********************** SYMBOLS **********************/ + +/* NOTE: this is what a local label looks like in assembly source; what it + looks like in COFF output is undefined */ +#define TICOFF_LOCAL_LABEL_P(NAME) \ +((NAME[0] == '$' && NAME[1] >= '0' && NAME[1] <= '9' && NAME[2] == '\0') \ + || NAME[strlen(NAME)-1] == '?') + +#define E_SYMNMLEN 8 /* # characters in a symbol name */ +#define E_FILNMLEN 14 /* # characters in a file name */ +#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ + +struct external_syment +{ + union { + char e_name[E_SYMNMLEN]; + struct { + char e_zeroes[4]; + char e_offset[4]; + } e; + } e; + char e_value[4]; + char e_scnum[2]; + char e_type[2]; + char e_sclass[1]; + char e_numaux[1]; +}; + + +#define N_BTMASK (017) +#define N_TMASK (060) +#define N_BTSHFT (4) +#define N_TSHIFT (2) + + +union external_auxent { + struct { + char x_tagndx[4]; /* str, un, or enum tag indx */ + union { + struct { + char x_lnno[2]; /* declaration line number */ + char x_size[2]; /* str/union/array size */ + } x_lnsz; + char x_fsize[4]; /* size of function */ + } x_misc; + union { + struct { /* if ISFCN, tag, or .bb */ + char x_lnnoptr[4]; /* ptr to fcn line # */ + char x_endndx[4]; /* entry ndx past block end */ + } x_fcn; + struct { /* if ISARY, up to 4 dimen. */ + char x_dimen[E_DIMNUM][2]; + } x_ary; + } x_fcnary; + char x_tvndx[2]; /* tv index */ + } x_sym; + + union { + char x_fname[E_FILNMLEN]; + struct { + char x_zeroes[4]; + char x_offset[4]; + } x_n; + } x_file; + + struct { + char x_scnlen[4]; /* section length */ + char x_nreloc[2]; /* # relocation entries */ + char x_nlinno[2]; /* # line numbers */ + } x_scn; + + struct { + char x_tvfill[4]; /* tv fill value */ + char x_tvlen[2]; /* length of .tv */ + char x_tvran[2][2]; /* tv range */ + } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ + + +}; + +#define SYMENT struct external_syment +#define SYMESZ 18 +#define AUXENT union external_auxent +#define AUXESZ 18 + +/* section lengths are in target bytes (not host bytes) */ +#define GET_SCN_SCNLEN(ABFD, EXT) \ + (H_GET_32 (ABFD, (EXT)->x_scn.x_scnlen) * bfd_octets_per_byte (ABFD)) +#define PUT_SCN_SCNLEN(ABFD, INT, EXT) \ + H_PUT_32 (ABFD, (INT) / bfd_octets_per_byte (ABFD), (EXT)->x_scn.x_scnlen) + +/* lnsz size is in bits in COFF file, in bytes in BFD */ +#define GET_LNSZ_SIZE(abfd, ext) \ + (H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) / (in_class != C_FIELD ? 8 : 1)) + +#define PUT_LNSZ_SIZE(abfd, in, ext) \ + H_PUT_16 (abfd, ((in_class != C_FIELD) ? (in) * 8 : (in)), \ + ext->x_sym.x_misc.x_lnsz.x_size) + +/* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes + Also put the load page flag of the section into the symbol value if it's an + address. */ +#ifndef NEEDS_PAGE +#define NEEDS_PAGE(X) 0 +#define PAGE_MASK 0 +#endif +#define COFF_ADJUST_SYM_IN_POST(ABFD, EXT, INT) \ + do \ + { \ + struct internal_syment *dst = (struct internal_syment *)(INT); \ + if (dst->n_sclass == C_MOS || dst->n_sclass == C_MOU) \ + dst->n_value /= 8; \ + else if (NEEDS_PAGE (dst->n_sclass)) { \ + asection *scn = coff_section_from_bfd_index (abfd, dst->n_scnum); \ + dst->n_value |= (scn->lma & PAGE_MASK); \ + } \ + } \ + while (0) + +#define COFF_ADJUST_SYM_OUT_POST(ABFD, INT, EXT) \ + do \ + { \ + struct internal_syment *src = (struct internal_syment *)(INT); \ + SYMENT *dst = (SYMENT *)(EXT); \ + if (src->n_sclass == C_MOU || src->n_sclass == C_MOS) \ + H_PUT_32 (abfd, src->n_value * 8, dst->e_value); \ + else if (NEEDS_PAGE (src->n_sclass)) { \ + H_PUT_32 (abfd, src->n_value &= ~PAGE_MASK, dst->e_value); \ + } \ + } \ + while (0) + +/* Detect section-relative absolute symbols so they get flagged with a sym + index of -1. +*/ +#define SECTION_RELATIVE_ABSOLUTE_SYMBOL_P(RELOC, SECT) \ + ((*(RELOC)->sym_ptr_ptr)->section->output_section == (SECT) \ + && (RELOC)->howto->name[0] == 'A') + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc_v0 +{ + char r_vaddr[4]; + char r_symndx[2]; + char r_reserved[2]; + char r_type[2]; +}; + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_reserved[2]; /* extended pmad byte for COFF2 */ + char r_type[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ_V0 10 /* FIXME -- coffcode.h needs fixing */ +#define RELSZ 12 /* for COFF1/2 */ + +#define SWAP_OUT_RELOC_EXTRA(abfd, src, dst) \ + do memset (dst->r_reserved, 0, sizeof (dst->r_reserved)); while (0) + +/* various relocation types. */ +#define R_ABS 0x0000 /* no relocation */ +#define R_REL13 0x002A /* 13-bit direct reference (???) */ +#define R_PARTLS7 0x0028 /* 7 LSBs of an address */ +#define R_PARTMS9 0x0029 /* 9MSBs of an address */ +#define R_EXTWORD 0x002B /* 23-bit direct reference */ +#define R_EXTWORD16 0x002C /* 16-bit direct reference to 23-bit addr*/ +#define R_EXTWORDMS7 0x002D /* upper 7 bits of 23-bit address */ + +#endif /* COFF_TI_H */ diff --git a/support/sdbinutils/include/coff/tic30.h b/support/sdbinutils/include/coff/tic30.h new file mode 100644 index 0000000..c1777c6 --- /dev/null +++ b/support/sdbinutils/include/coff/tic30.h @@ -0,0 +1,51 @@ +/* coff information for Texas Instruments TMS320C3X + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#define L_LNNO_SIZE 4 +#include "coff/external.h" + +#define TIC30MAGIC 0xC000 + +#define TIC30BADMAG(x) (((x).f_magic != TIC30MAGIC)) + +/********************** RELOCATION DIRECTIVES **********************/ + +/* The external reloc has an offset field, because some of the reloc + types on the z8k don't have room in the instruction for the entire + offset - eg with segments */ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_offset[4]; + char r_type[2]; + char r_stuff[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 16 + +/* TMS320C30 relocation types. */ + +#define R_TIC30_ABS16 0x100 /* 16 bit absolute. */ +#define R_TIC30_ABS24 0x101 /* 24 bit absolute. */ +#define R_TIC30_ABS32 0x102 /* 32 bit absolute. */ +#define R_TIC30_LDP 0x103 /* LDP bits 23-16 to 7-0. */ +#define R_TIC30_PC16 0x104 /* 16 bit pc relative. */ diff --git a/support/sdbinutils/include/coff/tic4x.h b/support/sdbinutils/include/coff/tic4x.h new file mode 100644 index 0000000..541f4af --- /dev/null +++ b/support/sdbinutils/include/coff/tic4x.h @@ -0,0 +1,47 @@ +/* TI COFF information for Texas Instruments TMS320C4X/C3X. + This file customizes the settings in coff/ti.h. + + Copyright (C) 2002-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef COFF_TIC4X_H +#define COFF_TIC4X_H + +#define TIC4X_TARGET_ID 0x0093 +/* Octets per byte, as a power of two. */ +#define TI_TARGET_ID TIC4X_TARGET_ID +#define OCTETS_PER_BYTE_POWER 2 +/* Add to howto to get absolute/sect-relative version. */ +#define HOWTO_BANK 6 +#define TICOFF_TARGET_ARCH bfd_arch_tic4x +/* We use COFF2. */ +#define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC + +#define TICOFF_TARGET_MACHINE_GET(FLAGS) \ + (((FLAGS) & F_VERS) ? bfd_mach_tic4x : bfd_mach_tic3x) + +#define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE) \ + do \ + { \ + if ((MACHINE) == bfd_mach_tic4x) \ + *(FLAGSP) |= F_VERS; \ + } \ + while (0) + +#include "coff/ti.h" + +#endif /* COFF_TIC4X_H */ diff --git a/support/sdbinutils/include/coff/tic54x.h b/support/sdbinutils/include/coff/tic54x.h new file mode 100644 index 0000000..b01b631 --- /dev/null +++ b/support/sdbinutils/include/coff/tic54x.h @@ -0,0 +1,60 @@ +/* TI COFF information for Texas Instruments TMS320C54X. + This file customizes the settings in coff/ti.h. + + Copyright (C) 2000-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef COFF_TIC54X_H +#define COFF_TIC54X_H + +#define TIC54X_TARGET_ID 0x98 +#define TIC54XALGMAGIC 0x009B /* c54x algebraic assembler output */ +#define TIC5X_TARGET_ID 0x92 +#define TI_TARGET_ID TIC54X_TARGET_ID +#define OCTETS_PER_BYTE_POWER 1 /* octets per byte, as a power of two */ +#define HOWTO_BANK 6 /* add to howto to get absolute/sect-relative version */ +#define TICOFF_TARGET_ARCH bfd_arch_tic54x +#define TICOFF_DEFAULT_MAGIC TICOFF1MAGIC /* we use COFF1 for compatibility */ + +/* Page macros + + The first GDB port requires flags in its remote memory access commands to + distinguish between data/prog space. Hopefully we can make this go away + eventually. Stuff the page in the upper bits of a 32-bit address, since + the c5x family only uses 16 or 23 bits. + + c2x, c5x and most c54x devices have 16-bit addresses, but the c548 has + 23-bit program addresses. Make sure the page flags don't interfere. + These flags are used by GDB to identify the destination page for + addresses. +*/ + +/* Recognized load pages (by common convention). */ +#define PG_PROG 0x0 /* PROG page */ +#define PG_DATA 0x1 /* DATA page */ +#define PG_IO 0x2 /* I/O page */ + +/** Indicate whether the given storage class requires a page flag. */ +#define NEEDS_PAGE(X) ((X)==C_EXT) +#define PAGE_MASK 0xFF000000 +#define ADDR_MASK 0x00FFFFFF +#define PG_TO_FLAG(p) (((unsigned long)(p) & 0xFF) << 24) +#define FLAG_TO_PG(f) (((f) >> 24) & 0xFF) + +#include "coff/ti.h" + +#endif /* COFF_TIC54X_H */ diff --git a/support/sdbinutils/include/coff/tic80.h b/support/sdbinutils/include/coff/tic80.h new file mode 100644 index 0000000..eda8d5a --- /dev/null +++ b/support/sdbinutils/include/coff/tic80.h @@ -0,0 +1,123 @@ +/* coff information for TI TMS320C80 (MVP) + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#define DO_NOT_DEFINE_FILHDR +#define DO_NOT_DEFINE_SCNHDR +#define L_LNNO_SIZE 2 +#include "coff/external.h" + +/********************** FILE HEADER **********************/ + +struct external_filehdr + { + char f_magic[2]; /* magic number */ + char f_nscns[2]; /* number of sections */ + char f_timdat[4]; /* time & date stamp */ + char f_symptr[4]; /* file pointer to symtab */ + char f_nsyms[4]; /* number of symtab entries */ + char f_opthdr[2]; /* sizeof(optional hdr) */ + char f_flags[2]; /* flags */ + char f_target_id[2];/* target id (TIc80 specific) */ +}; + +#define TIC80_ARCH_MAGIC 0x0C1 /* Goes in the file header magic number field */ +#define TIC80_TARGET_ID 0x95 /* Goes in the target id field */ + +#define TIC80BADMAG(x) ((x).f_magic != TIC80_ARCH_MAGIC) + +#define FILHDR struct external_filehdr +#define FILHSZ 22 + +#define TIC80_AOUTHDR_MAGIC 0x108 /* Goes in the optional file header magic number field */ + +/********************** SECTION HEADER **********************/ + +struct external_scnhdr +{ + char s_name[8]; /* section name */ + char s_paddr[4]; /* physical address, aliased s_nlib */ + char s_vaddr[4]; /* virtual address */ + char s_size[4]; /* section size */ + char s_scnptr[4]; /* file ptr to raw data for section */ + char s_relptr[4]; /* file ptr to relocation */ + char s_lnnoptr[4]; /* file ptr to line numbers */ + char s_nreloc[2]; /* number of relocation entries */ + char s_nlnno[2]; /* number of line number entries*/ + char s_flags[2]; /* flags */ + char s_reserved[1]; /* reserved (TIc80 specific) */ + char s_mempage[1]; /* memory page number (TIc80) */ +}; + +/* Names of "special" sections. */ +#define _TEXT ".text" +#define _DATA ".data" +#define _BSS ".bss" +#define _CINIT ".cinit" +#define _CONST ".const" +#define _SWITCH ".switch" +#define _STACK ".stack" +#define _SYSMEM ".sysmem" + +#define SCNHDR struct external_scnhdr +#define SCNHSZ 40 + +/* FIXME - need to correlate external_auxent with + TIc80 Code Generation Tools User's Guide, CG:A-25 */ + +/********************** RELOCATION DIRECTIVES **********************/ + +/* The external reloc has an offset field, because some of the reloc + types on the h8 don't have room in the instruction for the entire + offset - eg the strange jump and high page addressing modes. */ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_reserved[2]; + char r_type[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 12 + +/* TIc80 relocation types. */ + +#define R_ABS 0x00 /* Absolute address - no relocation */ +#define R_RELLONGX 0x11 /* PP: 32 bits, direct */ +#define R_PPBASE 0x34 /* PP: Global base address type */ +#define R_PPLBASE 0x35 /* PP: Local base address type */ +#define R_PP15 0x38 /* PP: Global 15 bit offset */ +#define R_PP15W 0x39 /* PP: Global 15 bit offset divided by 4 */ +#define R_PP15H 0x3A /* PP: Global 15 bit offset divided by 2 */ +#define R_PP16B 0x3B /* PP: Global 16 bit offset for bytes */ +#define R_PPL15 0x3C /* PP: Local 15 bit offset */ +#define R_PPL15W 0x3D /* PP: Local 15 bit offset divided by 4 */ +#define R_PPL15H 0x3E /* PP: Local 15 bit offset divided by 2 */ +#define R_PPL16B 0x3F /* PP: Local 16 bit offset for bytes */ +#define R_PPN15 0x40 /* PP: Global 15 bit negative offset */ +#define R_PPN15W 0x41 /* PP: Global 15 bit negative offset divided by 4 */ +#define R_PPN15H 0x42 /* PP: Global 15 bit negative offset divided by 2 */ +#define R_PPN16B 0x43 /* PP: Global 16 bit negative byte offset */ +#define R_PPLN15 0x44 /* PP: Local 15 bit negative offset */ +#define R_PPLN15W 0x45 /* PP: Local 15 bit negative offset divided by 4 */ +#define R_PPLN15H 0x46 /* PP: Local 15 bit negative offset divided by 2 */ +#define R_PPLN16B 0x47 /* PP: Local 16 bit negative byte offset */ +#define R_MPPCR15W 0x4E /* MP: 15 bit PC-relative divided by 4 */ +#define R_MPPCR 0x4F /* MP: 32 bit PC-relative divided by 4 */ diff --git a/support/sdbinutils/include/coff/w65.h b/support/sdbinutils/include/coff/w65.h new file mode 100644 index 0000000..f8401a5 --- /dev/null +++ b/support/sdbinutils/include/coff/w65.h @@ -0,0 +1,47 @@ +/* coff information for WDC 65816 + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#define L_LNNO_SIZE 4 +#include "coff/external.h" + +#define W65MAGIC 0x6500 + +#define W65BADMAG(x) (((x).f_magic != W65MAGIC)) + +/********************** RELOCATION DIRECTIVES **********************/ + +/* The external reloc has an offset field, because some of the reloc + types on the w65 don't have room in the instruction for the entire + offset - eg the strange jump and high page addressing modes */ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_offset[4]; + char r_type[2]; + char r_stuff[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 16 + + + + diff --git a/support/sdbinutils/include/coff/we32k.h b/support/sdbinutils/include/coff/we32k.h new file mode 100644 index 0000000..ed9899b --- /dev/null +++ b/support/sdbinutils/include/coff/we32k.h @@ -0,0 +1,62 @@ +/* coff information for we32k + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#define L_LNNO_SIZE 2 +#include "coff/external.h" + +/* Bits for f_flags: + F_RELFLG relocation info stripped from file + F_EXEC file is executable (no unresolved external references) + F_LNNO line numbers stripped from file + F_LSYMS local symbols stripped from file + F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */ + +#define F_RELFLG (0x0001) +#define F_EXEC (0x0002) +#define F_LNNO (0x0004) +#define F_LSYMS (0x0008) +#define F_BM32B (0020000) +#define F_BM32MAU (0040000) + +#define WE32KMAGIC 0x170 /* we32k sans transfer vector */ +#define FBOMAGIC 0x170 /* we32k sans transfer vector */ +#define MTVMAGIC 0x171 /* we32k with transfer vector */ +#define RBOMAGIC 0x172 /* reserved */ +#define WE32KBADMAG(x) ( ((x).f_magic != WE32KMAGIC) \ + && ((x).f_magic != FBOMAGIC) \ + && ((x).f_magic != RBOMAGIC) \ + && ((x).f_magic != MTVMAGIC)) + +/* More names of "special" sections. */ +#define _TV ".tv" +#define _INIT ".init" +#define _FINI ".fini" + +/********************** RELOCATION DIRECTIVES **********************/ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 10 + diff --git a/support/sdbinutils/include/coff/x86_64.h b/support/sdbinutils/include/coff/x86_64.h new file mode 100644 index 0000000..4ea1449 --- /dev/null +++ b/support/sdbinutils/include/coff/x86_64.h @@ -0,0 +1,57 @@ +/* COFF information for AMD 64. + Copyright (C) 2006-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. + + Written by Kai Tietz, OneVision Software GmbH&CoKg. */ + +#define L_LNNO_SIZE 2 +#define INCLUDE_COMDAT_FIELDS_IN_AUXENT + +#include "coff/external.h" + +#define COFF_PAGE_SIZE 0x1000 + +#define AMD64MAGIC 0x8664 + +#define AMD64BADMAG(x) ((x).f_magic != AMD64MAGIC) +#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b + +#define OMAGIC 0404 /* Object files, eg as output. */ +#define ZMAGIC IMAGE_NT_OPTIONAL_HDR64_MAGIC /* Demand load format, eg normal ld output 0x10b. */ +#define STMAGIC 0401 /* Target shlib. */ +#define SHMAGIC 0443 /* Host shlib. */ + +/* Define some NT default values. */ +/* #define NT_IMAGE_BASE 0x400000 moved to internal.h. */ +#define NT_SECTION_ALIGNMENT 0x1000 +#define NT_FILE_ALIGNMENT 0x200 +#define NT_DEF_RESERVE 0x100000 +#define NT_DEF_COMMIT 0x1000 + +/* Relocation directives. */ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_type[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 10 diff --git a/support/sdbinutils/include/coff/xcoff.h b/support/sdbinutils/include/coff/xcoff.h new file mode 100644 index 0000000..77c6bb2 --- /dev/null +++ b/support/sdbinutils/include/coff/xcoff.h @@ -0,0 +1,646 @@ +/* Internal format of XCOFF object file data structures for BFD. + + Copyright (C) 1995-2018 Free Software Foundation, Inc. + Written by 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 _INTERNAL_XCOFF_H +#define _INTERNAL_XCOFF_H + +/* XCOFF specific f_flags. */ + +/* File was profiled with fdpr. */ +#define F_FDPR_PROF 0x0010 + +/* File was reordered with fdpr. */ +#define F_FDPR_OPTI 0x0020 + +/* File use very large program support. */ +#define F_DSA 0x0040 + +/* One aux header specifying medium page sizes is non-zero. */ +#define F_VARPG 0x0100 + +/* Read/write sections are non-executable. */ +#define F_NONEXEC 0x8000 + +/* Linker */ + +/* Names of "special" sections. */ +#define _TEXT ".text" +#define _DATA ".data" +#define _BSS ".bss" +#define _PAD ".pad" +#define _LOADER ".loader" +#define _EXCEPT ".except" +#define _TYPCHK ".typchk" + +/* XCOFF uses special .dwXXX sections with the type STYP_DWARF. */ +#define STYP_DWARF 0x0010 + +/* High-order 16-bits dwarf subtypes. */ +#define SSUBTYP_DWINFO 0x10000 +#define SSUBTYP_DWLINE 0x20000 +#define SSUBTYP_DWPBNMS 0x30000 +#define SSUBTYP_DWPBTYP 0x40000 +#define SSUBTYP_DWARNGE 0x50000 +#define SSUBTYP_DWABREV 0x60000 +#define SSUBTYP_DWSTR 0x70000 +#define SSUBTYP_DWRNGES 0x80000 + +/* XCOFF uses a special .loader section with type STYP_LOADER. */ +#define STYP_LOADER 0x1000 + +/* Specifies an exception section. A section of this type provides + information to identify the reason that a trap or ececptin occured within + and executable object program */ +#define STYP_EXCEPT 0x0100 + +/* Specifies an initialized thread-local data section. */ +#define STYP_TDATA 0x0400 + +/* Specifies an uninitialized thread-local data section. */ +#define STYP_TBSS 0x0800 + +/* XCOFF uses a special .debug section with type STYP_DEBUG. */ +#define STYP_DEBUG 0x2000 + +/* Specifies a type check section. A section of this type contains parameter + argument type check strings used by the AIX binder. */ +#define STYP_TYPCHK 0x4000 + +/* XCOFF handles line number or relocation overflow by creating + another section header with STYP_OVRFLO set. */ +#define STYP_OVRFLO 0x8000 + +#define RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */ +#define RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */ +#define RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */ + +/* XCOFF relocation types. + The relocations are described in the function + xcoff[64]_ppc_relocate_section in coff64-rs6000.c and coff-rs6000.c */ + +#define R_POS (0x00) +#define R_NEG (0x01) +#define R_REL (0x02) +#define R_TOC (0x03) +#define R_RTB (0x04) +#define R_GL (0x05) +#define R_TCL (0x06) +#define R_BA (0x08) +#define R_BR (0x0a) +#define R_RL (0x0c) +#define R_RLA (0x0d) +#define R_REF (0x0f) +#define R_TRL (0x12) +#define R_TRLA (0x13) +#define R_RRTBI (0x14) +#define R_RRTBA (0x15) +#define R_CAI (0x16) +#define R_CREL (0x17) +#define R_RBA (0x18) +#define R_RBAC (0x19) +#define R_RBR (0x1a) +#define R_RBRC (0x1b) +#define R_TLS (0x20) +#define R_TLS_IE (0x21) +#define R_TLS_LD (0x22) +#define R_TLS_LE (0x23) +#define R_TLSM (0x24) +#define R_TLSML (0x25) +#define R_TOCU (0x30) +#define R_TOCL (0x31) + +/* Storage class #defines, from /usr/include/storclass.h that are not already + defined in internal.h */ + +/* Comment string in .info section */ +#define C_INFO 110 + +/* Dwarf symbol. */ +#define C_DWARF 112 + +/* Auxillary Symbol Entries */ + +/* x_smtyp values: */ +#define SMTYP_ALIGN(x) ((x) >> 3) /* log2 of alignment */ +#define SMTYP_SMTYP(x) ((x) & 0x7) /* symbol type */ +/* Symbol type values: */ +#define XTY_ER 0 /* External reference */ +#define XTY_SD 1 /* Csect definition */ +#define XTY_LD 2 /* Label definition */ +#define XTY_CM 3 /* .BSS */ +#define XTY_EM 4 /* Error message */ +#define XTY_US 5 /* "Reserved for internal use" */ + +/* x_smclas values: */ +#define XMC_PR 0 /* Read-only program code */ +#define XMC_RO 1 /* Read-only constant */ +#define XMC_DB 2 /* Read-only debug dictionary table */ +#define XMC_TC 3 /* Read-write general TOC entry */ +#define XMC_UA 4 /* Read-write unclassified */ +#define XMC_RW 5 /* Read-write data */ +#define XMC_GL 6 /* Read-only global linkage */ +#define XMC_XO 7 /* Read-only extended operation */ +#define XMC_SV 8 /* Read-only supervisor call */ +#define XMC_BS 9 /* Read-write BSS */ +#define XMC_DS 10 /* Read-write descriptor csect */ +#define XMC_UC 11 /* Read-write unnamed Fortran common */ +#define XMC_TI 12 /* Read-only traceback index csect */ +#define XMC_TB 13 /* Read-only traceback table csect */ +/* 14 ??? */ +#define XMC_TC0 15 /* Read-write TOC anchor */ +#define XMC_TD 16 /* Read-write data in TOC */ +#define XMC_SV64 17 /* Read-only 64 bit supervisor call */ +#define XMC_SV3264 18 /* Read-only 32 or 64 bit supervisor call */ +/* 19 ??? */ +#define XMC_TL 20 /* Read-write initialized TLS data */ +#define XMC_TU 21 /* Read-write uninitialized TLS data */ +#define XMC_TE 22 /* Same as XMC_TC but mapped after it */ + +/* The ldhdr structure. This appears at the start of the .loader + section. */ + +struct internal_ldhdr +{ + /* The version number: + 1 : 32 bit + 2 : 64 bit */ + unsigned long l_version; + + /* The number of symbol table entries. */ + bfd_size_type l_nsyms; + + /* The number of relocation table entries. */ + bfd_size_type l_nreloc; + + /* The length of the import file string table. */ + bfd_size_type l_istlen; + + /* The number of import files. */ + bfd_size_type l_nimpid; + + /* The offset from the start of the .loader section to the first + entry in the import file table. */ + bfd_size_type l_impoff; + + /* The length of the string table. */ + bfd_size_type l_stlen; + + /* The offset from the start of the .loader section to the first + entry in the string table. */ + bfd_size_type l_stoff; + + /* The offset to start of the symbol table, only in XCOFF64 */ + bfd_vma l_symoff; + + /* The offset to the start of the relocation table, only in XCOFF64 */ + bfd_vma l_rldoff; +}; + +/* The ldsym structure. This is used to represent a symbol in the + .loader section. */ + +struct internal_ldsym +{ + union + { + /* The symbol name if <= SYMNMLEN characters. */ + char _l_name[SYMNMLEN]; + struct + { + /* Zero if the symbol name is more than SYMNMLEN characters. */ + long _l_zeroes; + + /* The offset in the string table if the symbol name is more + than SYMNMLEN characters. */ + long _l_offset; + } + _l_l; + } + _l; + + /* The symbol value. */ + bfd_vma l_value; + + /* The symbol section number. */ + short l_scnum; + + /* The symbol type and flags. */ + char l_smtype; + + /* The symbol storage class. */ + char l_smclas; + + /* The import file ID. */ + bfd_size_type l_ifile; + + /* Offset to the parameter type check string. */ + bfd_size_type l_parm; +}; + +/* These flags are for the l_smtype field (the lower three bits are an + XTY_* value). */ + +/* Imported symbol. */ +#define L_IMPORT (0x40) +/* Entry point. */ +#define L_ENTRY (0x20) +/* Exported symbol. */ +#define L_EXPORT (0x10) +/* Weak symbol. */ +#define L_WEAK (0x08) + +/* The ldrel structure. This is used to represent a reloc in the + .loader section. */ + +struct internal_ldrel +{ + /* The reloc address. */ + bfd_vma l_vaddr; + + /* The symbol table index in the .loader section symbol table. */ + bfd_size_type l_symndx; + + /* The relocation type and size. */ + short l_rtype; + + /* The section number this relocation applies to. */ + short l_rsecnm; +}; + +/* An entry in the XCOFF linker hash table. */ +struct xcoff_link_hash_entry +{ + struct bfd_link_hash_entry root; + + /* Symbol index in output file. Set to -1 initially. Set to -2 if + there is a reloc against this symbol. */ + long indx; + + /* If we have created a TOC entry for this symbol, this is the .tc + section which holds it. */ + asection *toc_section; + + union + { + /* If we have created a TOC entry (the XCOFF_SET_TOC flag is + set), this is the offset in toc_section. */ + bfd_vma toc_offset; + + /* If the TOC entry comes from an input file, this is set to the + symbol index of the C_HIDEXT XMC_TC or XMC_TD symbol. */ + long toc_indx; + } + u; + + /* If this symbol is a function entry point which is called, this + field holds a pointer to the function descriptor. If this symbol + is a function descriptor, this field holds a pointer to the + function entry point. */ + struct xcoff_link_hash_entry *descriptor; + + /* The .loader symbol table entry, if there is one. */ + struct internal_ldsym *ldsym; + + /* If XCOFF_BUILT_LDSYM is set, this is the .loader symbol table + index. If XCOFF_BUILD_LDSYM is clear, and XCOFF_IMPORT is set, + this is the l_ifile value. */ + long ldindx; + + /* Some linker flags. */ + unsigned long flags; + + /* The storage mapping class. */ + unsigned char smclas; +}; + +/* Flags for xcoff_link_hash_entry. */ + +/* Symbol is referenced by a regular object. */ +#define XCOFF_REF_REGULAR 0x00000001 +/* Symbol is defined by a regular object. */ +#define XCOFF_DEF_REGULAR 0x00000002 +/* Symbol is defined by a dynamic object. */ +#define XCOFF_DEF_DYNAMIC 0x00000004 +/* Symbol is used in a reloc being copied into the .loader section. */ +#define XCOFF_LDREL 0x00000008 +/* Symbol is the entry point. */ +#define XCOFF_ENTRY 0x00000010 +/* Symbol is for a function and is the target of a relocation. + The relocation may or may not be a branch-type relocation. */ +#define XCOFF_CALLED 0x00000020 +/* Symbol needs the TOC entry filled in. */ +#define XCOFF_SET_TOC 0x00000040 +/* Symbol is implicitly or explicitly imported. */ +#define XCOFF_IMPORT 0x00000080 +/* Symbol is explicitly exported. */ +#define XCOFF_EXPORT 0x00000100 +/* Symbol has been processed by xcoff_build_ldsyms. */ +#define XCOFF_BUILT_LDSYM 0x00000200 +/* Symbol is mentioned by a section which was not garbage collected. */ +#define XCOFF_MARK 0x00000400 +/* Symbol size is recorded in size_list list from hash table. */ +#define XCOFF_HAS_SIZE 0x00000800 +/* Symbol is a function descriptor. */ +#define XCOFF_DESCRIPTOR 0x00001000 +/* Multiple definitions have been for the symbol. */ +#define XCOFF_MULTIPLY_DEFINED 0x00002000 +/* Symbol is the __rtinit symbol. */ +#define XCOFF_RTINIT 0x00004000 +/* Symbol is an imported 32 bit syscall. */ +#define XCOFF_SYSCALL32 0x00008000 +/* Symbol is an imported 64 bit syscall. */ +#define XCOFF_SYSCALL64 0x00010000 +/* Symbol was not explicitly defined by the time it was marked. */ +#define XCOFF_WAS_UNDEFINED 0x00020000 +/* We have assigned an output XCOFF entry to this symbol. */ +#define XCOFF_ALLOCATED 0x00040000 + +/* The XCOFF linker hash table. */ + +#define XCOFF_NUMBER_OF_SPECIAL_SECTIONS 6 +#define XCOFF_SPECIAL_SECTION_TEXT 0 +#define XCOFF_SPECIAL_SECTION_ETEXT 1 +#define XCOFF_SPECIAL_SECTION_DATA 2 +#define XCOFF_SPECIAL_SECTION_EDATA 3 +#define XCOFF_SPECIAL_SECTION_END 4 +#define XCOFF_SPECIAL_SECTION_END2 5 + +/* These flags indicate which of -bexpall and -bexpfull are in effect. */ +#define XCOFF_EXPALL 1 +#define XCOFF_EXPFULL 2 + +/* This structure is used to pass information through + xcoff_link_hash_traverse. */ + +struct xcoff_loader_info +{ + /* Set if a problem occurred. */ + bfd_boolean failed; + + /* Output BFD. */ + bfd *output_bfd; + + /* Link information structure. */ + struct bfd_link_info *info; + + /* A mask of XCOFF_EXPALL and XCOFF_EXPFULL flags. */ + unsigned int auto_export_flags; + + /* Number of ldsym structures. */ + size_t ldsym_count; + + /* Size of string table. */ + size_t string_size; + + /* String table. */ + char *strings; + + /* Allocated size of string table. */ + size_t string_alc; +}; + +/* In case we're on a 32-bit machine, construct a 64-bit "-1" value + from smaller values. Start with zero, widen, *then* decrement. */ +#define MINUS_ONE (((bfd_vma) 0) - 1) + +/* __rtinit, from /usr/include/rtinit.h. */ +struct __rtinit +{ + /* Pointer to runtime linker. + XXX: Is the parameter really void? */ + int (*rtl) (void); + + /* Offset to array of init functions, 0 if none. */ + int init_offset; + + /* Offset to array of fini functions, 0 if none. */ + int fini_offset; + + /* Size of __RTINIT_DESCRIPTOR. This value should be used instead of + sizeof(__RTINIT_DESCRIPTOR). */ + int __rtinit_descriptor_size; +}; + +#define RTINIT_DESCRIPTOR_SIZE (12) + +struct __rtinit_descriptor +{ + /* Init/fini function. */ + int f; + + /* Offset, relative to the start of the __rtinit symbol, to name of the + function. */ + + int name_offset; + + /* Flags */ + unsigned char flags; +}; + +/* Archive */ + +#define XCOFFARMAG "\012" +#define XCOFFARMAGBIG "\012" +#define SXCOFFARMAG 8 + +/* The size of the ascii archive elements */ +#define XCOFFARMAG_ELEMENT_SIZE 12 +#define XCOFFARMAGBIG_ELEMENT_SIZE 20 + +/* This terminates an XCOFF archive member name. */ + +#define XCOFFARFMAG "`\012" +#define SXCOFFARFMAG 2 + +/* XCOFF archives start with this (printable) structure. */ + +struct xcoff_ar_file_hdr +{ + /* Magic string. */ + char magic[SXCOFFARMAG]; + + /* Offset of the member table (decimal ASCII string). */ + char memoff[XCOFFARMAG_ELEMENT_SIZE]; + + /* Offset of the global symbol table (decimal ASCII string). */ + char symoff[XCOFFARMAG_ELEMENT_SIZE]; + + /* Offset of the first member in the archive (decimal ASCII string). */ + char firstmemoff[XCOFFARMAG_ELEMENT_SIZE]; + + /* Offset of the last member in the archive (decimal ASCII string). */ + char lastmemoff[XCOFFARMAG_ELEMENT_SIZE]; + + /* Offset of the first member on the free list (decimal ASCII + string). */ + char freeoff[XCOFFARMAG_ELEMENT_SIZE]; +}; + +#define SIZEOF_AR_FILE_HDR (SXCOFFARMAG + 5 * XCOFFARMAG_ELEMENT_SIZE) + +/* This is the equivalent data structure for the big archive format. */ + +struct xcoff_ar_file_hdr_big +{ + /* Magic string. */ + char magic[SXCOFFARMAG]; + + /* Offset of the member table (decimal ASCII string). */ + char memoff[XCOFFARMAGBIG_ELEMENT_SIZE]; + + /* Offset of the global symbol table for 32-bit objects (decimal ASCII + string). */ + char symoff[XCOFFARMAGBIG_ELEMENT_SIZE]; + + /* Offset of the global symbol table for 64-bit objects (decimal ASCII + string). */ + char symoff64[XCOFFARMAGBIG_ELEMENT_SIZE]; + + /* Offset of the first member in the archive (decimal ASCII string). */ + char firstmemoff[XCOFFARMAGBIG_ELEMENT_SIZE]; + + /* Offset of the last member in the archive (decimal ASCII string). */ + char lastmemoff[XCOFFARMAGBIG_ELEMENT_SIZE]; + + /* Offset of the first member on the free list (decimal ASCII + string). */ + char freeoff[XCOFFARMAGBIG_ELEMENT_SIZE]; +}; + +#define SIZEOF_AR_FILE_HDR_BIG (SXCOFFARMAG + 6 * XCOFFARMAGBIG_ELEMENT_SIZE) + +/* Each XCOFF archive member starts with this (printable) structure. */ + +struct xcoff_ar_hdr +{ + /* File size not including the header (decimal ASCII string). */ + char size[XCOFFARMAG_ELEMENT_SIZE]; + + /* File offset of next archive member (decimal ASCII string). */ + char nextoff[XCOFFARMAG_ELEMENT_SIZE]; + + /* File offset of previous archive member (decimal ASCII string). */ + char prevoff[XCOFFARMAG_ELEMENT_SIZE]; + + /* File mtime (decimal ASCII string). */ + char date[12]; + + /* File UID (decimal ASCII string). */ + char uid[12]; + + /* File GID (decimal ASCII string). */ + char gid[12]; + + /* File mode (octal ASCII string). */ + char mode[12]; + + /* Length of file name (decimal ASCII string). */ + char namlen[4]; + + /* This structure is followed by the file name. The length of the + name is given in the namlen field. If the length of the name is + odd, the name is followed by a null byte. The name and optional + null byte are followed by XCOFFARFMAG, which is not included in + namlen. The contents of the archive member follow; the number of + bytes is given in the size field. */ +}; + +#define SIZEOF_AR_HDR (3 * XCOFFARMAG_ELEMENT_SIZE + 4 * 12 + 4) + +/* The equivalent for the big archive format. */ + +struct xcoff_ar_hdr_big +{ + /* File size not including the header (decimal ASCII string). */ + char size[XCOFFARMAGBIG_ELEMENT_SIZE]; + + /* File offset of next archive member (decimal ASCII string). */ + char nextoff[XCOFFARMAGBIG_ELEMENT_SIZE]; + + /* File offset of previous archive member (decimal ASCII string). */ + char prevoff[XCOFFARMAGBIG_ELEMENT_SIZE]; + + /* File mtime (decimal ASCII string). */ + char date[12]; + + /* File UID (decimal ASCII string). */ + char uid[12]; + + /* File GID (decimal ASCII string). */ + char gid[12]; + + /* File mode (octal ASCII string). */ + char mode[12]; + + /* Length of file name (decimal ASCII string). */ + char namlen[4]; + + /* This structure is followed by the file name. The length of the + name is given in the namlen field. If the length of the name is + odd, the name is followed by a null byte. The name and optional + null byte are followed by XCOFFARFMAG, which is not included in + namlen. The contents of the archive member follow; the number of + bytes is given in the size field. */ +}; + +#define SIZEOF_AR_HDR_BIG (3 * XCOFFARMAGBIG_ELEMENT_SIZE + 4 * 12 + 4) + +/* We often have to distinguish between the old and big file format. + Make it a bit cleaner. We can use `xcoff_ardata' here because the + `hdr' member has the same size and position in both formats. + is the default format, return TRUE even when xcoff_ardata is + NULL. */ +#ifndef SMALL_ARCHIVE +/* Creates big archives by default */ +#define xcoff_big_format_p(abfd) \ + ((NULL != bfd_ardata (abfd) && NULL == xcoff_ardata (abfd)) || \ + ((NULL != bfd_ardata (abfd)) && \ + (NULL != xcoff_ardata (abfd)) && \ + (xcoff_ardata (abfd)->magic[1] == 'b'))) +#else +/* Creates small archives by default. */ +#define xcoff_big_format_p(abfd) \ + (((NULL != bfd_ardata (abfd)) && \ + (NULL != xcoff_ardata (abfd)) && \ + (xcoff_ardata (abfd)->magic[1] == 'b'))) +#endif + +/* We store a copy of the xcoff_ar_file_hdr in the tdata field of the + artdata structure. Similar for the big archive. */ +#define xcoff_ardata(abfd) \ + ((struct xcoff_ar_file_hdr *) bfd_ardata (abfd)->tdata) +#define xcoff_ardata_big(abfd) \ + ((struct xcoff_ar_file_hdr_big *) bfd_ardata (abfd)->tdata) + +/* We store a copy of the xcoff_ar_hdr in the arelt_data field of an + archive element. Similar for the big archive. */ +#define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data)) +#define arch_xhdr(bfd) \ + ((struct xcoff_ar_hdr *) arch_eltdata (bfd)->arch_header) +#define arch_xhdr_big(bfd) \ + ((struct xcoff_ar_hdr_big *) arch_eltdata (bfd)->arch_header) + +/* True if symbols of class CLASS are external. */ +#define EXTERN_SYM_P(CLASS) \ + ((CLASS) == C_EXT || (CLASS) == C_AIX_WEAKEXT) + +#endif /* _INTERNAL_XCOFF_H */ diff --git a/support/sdbinutils/include/coff/z80.h b/support/sdbinutils/include/coff/z80.h new file mode 100644 index 0000000..5d70593 --- /dev/null +++ b/support/sdbinutils/include/coff/z80.h @@ -0,0 +1,60 @@ +/* coff information for Zilog Z80 + Copyright (C) 2005-2018 Free Software Foundation, Inc. + Contributed by Arnold Metselaar + + 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, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#define L_LNNO_SIZE 4 +#include "coff/external.h" + +/* z80 backend does not use dots in section names. */ +#undef _TEXT +#define _TEXT "text" +#undef _DATA +#define _DATA "data" +#undef _BSS +#define _BSS "bss" + +/* Type of cpu is stored in flags. */ +#define F_MACHMASK 0xF000 + +/* Z80 COFF encodes the section alignment in the section header flags */ +#define COFF_ALIGN_IN_SECTION_HEADER 1 +#define COFF_ALIGN_IN_S_FLAGS 1 +#define F_ALGNMASK 0x0F00 +/* requires a power-of-two argument */ +#define COFF_ENCODE_ALIGNMENT(S,X) ((S).s_flags |= (((unsigned)(X)&0xF)<<8)) +/* result is a power of two */ +#define COFF_DECODE_ALIGNMENT(X) (((X)>>8)&0xF) + +#define Z80MAGIC 0x805A + +#define Z80BADMAG(x) (((x).f_magic != Z80MAGIC)) + +/* Relocation directives. */ + +/* This format actually has more bits than we need. */ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_offset[4]; + char r_type[2]; + char r_stuff[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 16 diff --git a/support/sdbinutils/include/coff/z8k.h b/support/sdbinutils/include/coff/z8k.h new file mode 100644 index 0000000..29cb6cc --- /dev/null +++ b/support/sdbinutils/include/coff/z8k.h @@ -0,0 +1,49 @@ +/* coff information for Zilog Z800N + + Copyright (C) 2001-2018 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#define L_LNNO_SIZE 4 +#include "coff/external.h" + +/* Type of cpu is stored in flags */ +#define F_Z8001 0x1000 +#define F_Z8002 0x2000 +#define F_MACHMASK 0xf000 + +#define Z8KMAGIC 0x8000 + +#define Z8KBADMAG(x) (((x).f_magic != Z8KMAGIC)) + +/********************** RELOCATION DIRECTIVES **********************/ + +/* The external reloc has an offset field, because some of the reloc + types on the z8k don't have room in the instruction for the entire + offset - eg with segments. */ + +struct external_reloc +{ + char r_vaddr[4]; + char r_symndx[4]; + char r_offset[4]; + char r_type[2]; + char r_stuff[2]; +}; + +#define RELOC struct external_reloc +#define RELSZ 16 + diff --git a/support/sdbinutils/include/demangle.h b/support/sdbinutils/include/demangle.h new file mode 100644 index 0000000..b8d57cf --- /dev/null +++ b/support/sdbinutils/include/demangle.h @@ -0,0 +1,723 @@ +/* Defs for interface to demanglers. + Copyright (C) 1992-2018 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + In addition to the permissions in the GNU Library General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Library Public License restrictions do apply in other + respects; for example, they cover modification of the file, and + distribution when not linked into a combined executable.) + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library 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. */ + + +#if !defined (DEMANGLE_H) +#define DEMANGLE_H + +#include "libiberty.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Options passed to cplus_demangle (in 2nd parameter). */ + +#define DMGL_NO_OPTS 0 /* For readability... */ +#define DMGL_PARAMS (1 << 0) /* Include function args */ +#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ +#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */ +#define DMGL_VERBOSE (1 << 3) /* Include implementation details. */ +#define DMGL_TYPES (1 << 4) /* Also try to demangle type encodings. */ +#define DMGL_RET_POSTFIX (1 << 5) /* Print function return types (when + present) after function signature. + It applies only to the toplevel + function type. */ +#define DMGL_RET_DROP (1 << 6) /* Suppress printing function return + types, even if present. It applies + only to the toplevel function type. + */ + +#define DMGL_AUTO (1 << 8) +#define DMGL_GNU (1 << 9) +#define DMGL_LUCID (1 << 10) +#define DMGL_ARM (1 << 11) +#define DMGL_HP (1 << 12) /* For the HP aCC compiler; + same as ARM except for + template arguments, etc. */ +#define DMGL_EDG (1 << 13) +#define DMGL_GNU_V3 (1 << 14) +#define DMGL_GNAT (1 << 15) +#define DMGL_DLANG (1 << 16) +#define DMGL_RUST (1 << 17) /* Rust wraps GNU_V3 style mangling. */ + +/* If none of these are set, use 'current_demangling_style' as the default. */ +#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT|DMGL_DLANG|DMGL_RUST) + +/* Enumeration of possible demangling styles. + + Lucid and ARM styles are still kept logically distinct, even though + they now both behave identically. The resulting style is actual the + union of both. I.E. either style recognizes both "__pt__" and "__rf__" + for operator "->", even though the first is lucid style and the second + is ARM style. (FIXME?) */ + +extern enum demangling_styles +{ + no_demangling = -1, + unknown_demangling = 0, + auto_demangling = DMGL_AUTO, + gnu_demangling = DMGL_GNU, + lucid_demangling = DMGL_LUCID, + arm_demangling = DMGL_ARM, + hp_demangling = DMGL_HP, + edg_demangling = DMGL_EDG, + gnu_v3_demangling = DMGL_GNU_V3, + java_demangling = DMGL_JAVA, + gnat_demangling = DMGL_GNAT, + dlang_demangling = DMGL_DLANG, + rust_demangling = DMGL_RUST +} current_demangling_style; + +/* Define string names for the various demangling styles. */ + +#define NO_DEMANGLING_STYLE_STRING "none" +#define AUTO_DEMANGLING_STYLE_STRING "auto" +#define GNU_DEMANGLING_STYLE_STRING "gnu" +#define LUCID_DEMANGLING_STYLE_STRING "lucid" +#define ARM_DEMANGLING_STYLE_STRING "arm" +#define HP_DEMANGLING_STYLE_STRING "hp" +#define EDG_DEMANGLING_STYLE_STRING "edg" +#define GNU_V3_DEMANGLING_STYLE_STRING "gnu-v3" +#define JAVA_DEMANGLING_STYLE_STRING "java" +#define GNAT_DEMANGLING_STYLE_STRING "gnat" +#define DLANG_DEMANGLING_STYLE_STRING "dlang" +#define RUST_DEMANGLING_STYLE_STRING "rust" + +/* Some macros to test what demangling style is active. */ + +#define CURRENT_DEMANGLING_STYLE current_demangling_style +#define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO) +#define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU) +#define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID) +#define ARM_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_ARM) +#define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP) +#define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG) +#define GNU_V3_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_V3) +#define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA) +#define GNAT_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNAT) +#define DLANG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_DLANG) +#define RUST_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_RUST) + +/* Provide information about the available demangle styles. This code is + pulled from gdb into libiberty because it is useful to binutils also. */ + +extern const struct demangler_engine +{ + const char *const demangling_style_name; + const enum demangling_styles demangling_style; + const char *const demangling_style_doc; +} libiberty_demanglers[]; + +extern char * +cplus_demangle (const char *mangled, int options); + +extern int +cplus_demangle_opname (const char *opname, char *result, int options); + +extern const char * +cplus_mangle_opname (const char *opname, int options); + +/* Note: This sets global state. FIXME if you care about multi-threading. */ + +extern void +set_cplus_marker_for_demangling (int ch); + +extern enum demangling_styles +cplus_demangle_set_style (enum demangling_styles style); + +extern enum demangling_styles +cplus_demangle_name_to_style (const char *name); + +/* Callback typedef for allocation-less demangler interfaces. */ +typedef void (*demangle_callbackref) (const char *, size_t, void *); + +/* V3 ABI demangling entry points, defined in cp-demangle.c. Callback + variants return non-zero on success, zero on error. char* variants + return a string allocated by malloc on success, NULL on error. */ +extern int +cplus_demangle_v3_callback (const char *mangled, int options, + demangle_callbackref callback, void *opaque); + +extern char* +cplus_demangle_v3 (const char *mangled, int options); + +extern int +java_demangle_v3_callback (const char *mangled, + demangle_callbackref callback, void *opaque); + +extern char* +java_demangle_v3 (const char *mangled); + +char * +ada_demangle (const char *mangled, int options); + +extern char * +dlang_demangle (const char *mangled, int options); + +/* Returns non-zero iff MANGLED is a rust mangled symbol. MANGLED must + already have been demangled through cplus_demangle_v3. If this function + returns non-zero then MANGLED can be demangled (in-place) using + RUST_DEMANGLE_SYM. */ +extern int +rust_is_mangled (const char *mangled); + +/* Demangles SYM (in-place) if RUST_IS_MANGLED returned non-zero for SYM. + If RUST_IS_MANGLED returned zero for SYM then RUST_DEMANGLE_SYM might + replace characters that cannot be demangled with '?' and might truncate + SYM. After calling RUST_DEMANGLE_SYM SYM might be shorter, but never + larger. */ +extern void +rust_demangle_sym (char *sym); + +/* Demangles MANGLED if it was GNU_V3 and then RUST mangled, otherwise + returns NULL. Uses CPLUS_DEMANGLE_V3, RUST_IS_MANGLED and + RUST_DEMANGLE_SYM. Returns a new string that is owned by the caller. */ +extern char * +rust_demangle (const char *mangled, int options); + +enum gnu_v3_ctor_kinds { + gnu_v3_complete_object_ctor = 1, + gnu_v3_base_object_ctor, + gnu_v3_complete_object_allocating_ctor, + /* These are not part of the V3 ABI. Unified constructors are generated + as a speed-for-space optimization when the -fdeclone-ctor-dtor option + is used, and are always internal symbols. */ + gnu_v3_unified_ctor, + gnu_v3_object_ctor_group +}; + +/* Return non-zero iff NAME is the mangled form of a constructor name + in the G++ V3 ABI demangling style. Specifically, return an `enum + gnu_v3_ctor_kinds' value indicating what kind of constructor + it is. */ +extern enum gnu_v3_ctor_kinds + is_gnu_v3_mangled_ctor (const char *name); + + +enum gnu_v3_dtor_kinds { + gnu_v3_deleting_dtor = 1, + gnu_v3_complete_object_dtor, + gnu_v3_base_object_dtor, + /* These are not part of the V3 ABI. Unified destructors are generated + as a speed-for-space optimization when the -fdeclone-ctor-dtor option + is used, and are always internal symbols. */ + gnu_v3_unified_dtor, + gnu_v3_object_dtor_group +}; + +/* Return non-zero iff NAME is the mangled form of a destructor name + in the G++ V3 ABI demangling style. Specifically, return an `enum + gnu_v3_dtor_kinds' value, indicating what kind of destructor + it is. */ +extern enum gnu_v3_dtor_kinds + is_gnu_v3_mangled_dtor (const char *name); + +/* The V3 demangler works in two passes. The first pass builds a tree + representation of the mangled name, and the second pass turns the + tree representation into a demangled string. Here we define an + interface to permit a caller to build their own tree + representation, which they can pass to the demangler to get a + demangled string. This can be used to canonicalize user input into + something which the demangler might output. It could also be used + by other demanglers in the future. */ + +/* These are the component types which may be found in the tree. Many + component types have one or two subtrees, referred to as left and + right (a component type with only one subtree puts it in the left + subtree). */ + +enum demangle_component_type +{ + /* A name, with a length and a pointer to a string. */ + DEMANGLE_COMPONENT_NAME, + /* A qualified name. The left subtree is a class or namespace or + some such thing, and the right subtree is a name qualified by + that class. */ + DEMANGLE_COMPONENT_QUAL_NAME, + /* A local name. The left subtree describes a function, and the + right subtree is a name which is local to that function. */ + DEMANGLE_COMPONENT_LOCAL_NAME, + /* A typed name. The left subtree is a name, and the right subtree + describes that name as a function. */ + DEMANGLE_COMPONENT_TYPED_NAME, + /* A template. The left subtree is a template name, and the right + subtree is a template argument list. */ + DEMANGLE_COMPONENT_TEMPLATE, + /* A template parameter. This holds a number, which is the template + parameter index. */ + DEMANGLE_COMPONENT_TEMPLATE_PARAM, + /* A function parameter. This holds a number, which is the index. */ + DEMANGLE_COMPONENT_FUNCTION_PARAM, + /* A constructor. This holds a name and the kind of + constructor. */ + DEMANGLE_COMPONENT_CTOR, + /* A destructor. This holds a name and the kind of destructor. */ + DEMANGLE_COMPONENT_DTOR, + /* A vtable. This has one subtree, the type for which this is a + vtable. */ + DEMANGLE_COMPONENT_VTABLE, + /* A VTT structure. This has one subtree, the type for which this + is a VTT. */ + DEMANGLE_COMPONENT_VTT, + /* A construction vtable. The left subtree is the type for which + this is a vtable, and the right subtree is the derived type for + which this vtable is built. */ + DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE, + /* A typeinfo structure. This has one subtree, the type for which + this is the tpeinfo structure. */ + DEMANGLE_COMPONENT_TYPEINFO, + /* A typeinfo name. This has one subtree, the type for which this + is the typeinfo name. */ + DEMANGLE_COMPONENT_TYPEINFO_NAME, + /* A typeinfo function. This has one subtree, the type for which + this is the tpyeinfo function. */ + DEMANGLE_COMPONENT_TYPEINFO_FN, + /* A thunk. This has one subtree, the name for which this is a + thunk. */ + DEMANGLE_COMPONENT_THUNK, + /* A virtual thunk. This has one subtree, the name for which this + is a virtual thunk. */ + DEMANGLE_COMPONENT_VIRTUAL_THUNK, + /* A covariant thunk. This has one subtree, the name for which this + is a covariant thunk. */ + DEMANGLE_COMPONENT_COVARIANT_THUNK, + /* A Java class. This has one subtree, the type. */ + DEMANGLE_COMPONENT_JAVA_CLASS, + /* A guard variable. This has one subtree, the name for which this + is a guard variable. */ + DEMANGLE_COMPONENT_GUARD, + /* The init and wrapper functions for C++11 thread_local variables. */ + DEMANGLE_COMPONENT_TLS_INIT, + DEMANGLE_COMPONENT_TLS_WRAPPER, + /* A reference temporary. This has one subtree, the name for which + this is a temporary. */ + DEMANGLE_COMPONENT_REFTEMP, + /* A hidden alias. This has one subtree, the encoding for which it + is providing alternative linkage. */ + DEMANGLE_COMPONENT_HIDDEN_ALIAS, + /* A standard substitution. This holds the name of the + substitution. */ + DEMANGLE_COMPONENT_SUB_STD, + /* The restrict qualifier. The one subtree is the type which is + being qualified. */ + DEMANGLE_COMPONENT_RESTRICT, + /* The volatile qualifier. The one subtree is the type which is + being qualified. */ + DEMANGLE_COMPONENT_VOLATILE, + /* The const qualifier. The one subtree is the type which is being + qualified. */ + DEMANGLE_COMPONENT_CONST, + /* The restrict qualifier modifying a member function. The one + subtree is the type which is being qualified. */ + DEMANGLE_COMPONENT_RESTRICT_THIS, + /* The volatile qualifier modifying a member function. The one + subtree is the type which is being qualified. */ + DEMANGLE_COMPONENT_VOLATILE_THIS, + /* The const qualifier modifying a member function. The one subtree + is the type which is being qualified. */ + DEMANGLE_COMPONENT_CONST_THIS, + /* C++11 A reference modifying a member function. The one subtree is the + type which is being referenced. */ + DEMANGLE_COMPONENT_REFERENCE_THIS, + /* C++11: An rvalue reference modifying a member function. The one + subtree is the type which is being referenced. */ + DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS, + /* A vendor qualifier. The left subtree is the type which is being + qualified, and the right subtree is the name of the + qualifier. */ + DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL, + /* A pointer. The one subtree is the type which is being pointed + to. */ + DEMANGLE_COMPONENT_POINTER, + /* A reference. The one subtree is the type which is being + referenced. */ + DEMANGLE_COMPONENT_REFERENCE, + /* C++0x: An rvalue reference. The one subtree is the type which is + being referenced. */ + DEMANGLE_COMPONENT_RVALUE_REFERENCE, + /* A complex type. The one subtree is the base type. */ + DEMANGLE_COMPONENT_COMPLEX, + /* An imaginary type. The one subtree is the base type. */ + DEMANGLE_COMPONENT_IMAGINARY, + /* A builtin type. This holds the builtin type information. */ + DEMANGLE_COMPONENT_BUILTIN_TYPE, + /* A vendor's builtin type. This holds the name of the type. */ + DEMANGLE_COMPONENT_VENDOR_TYPE, + /* A function type. The left subtree is the return type. The right + subtree is a list of ARGLIST nodes. Either or both may be + NULL. */ + DEMANGLE_COMPONENT_FUNCTION_TYPE, + /* An array type. The left subtree is the dimension, which may be + NULL, or a string (represented as DEMANGLE_COMPONENT_NAME), or an + expression. The right subtree is the element type. */ + DEMANGLE_COMPONENT_ARRAY_TYPE, + /* A pointer to member type. The left subtree is the class type, + and the right subtree is the member type. CV-qualifiers appear + on the latter. */ + DEMANGLE_COMPONENT_PTRMEM_TYPE, + /* A fixed-point type. */ + DEMANGLE_COMPONENT_FIXED_TYPE, + /* A vector type. The left subtree is the number of elements, + the right subtree is the element type. */ + DEMANGLE_COMPONENT_VECTOR_TYPE, + /* An argument list. The left subtree is the current argument, and + the right subtree is either NULL or another ARGLIST node. */ + DEMANGLE_COMPONENT_ARGLIST, + /* A template argument list. The left subtree is the current + template argument, and the right subtree is either NULL or + another TEMPLATE_ARGLIST node. */ + DEMANGLE_COMPONENT_TEMPLATE_ARGLIST, + /* An initializer list. The left subtree is either an explicit type or + NULL, and the right subtree is a DEMANGLE_COMPONENT_ARGLIST. */ + DEMANGLE_COMPONENT_INITIALIZER_LIST, + /* An operator. This holds information about a standard + operator. */ + DEMANGLE_COMPONENT_OPERATOR, + /* An extended operator. This holds the number of arguments, and + the name of the extended operator. */ + DEMANGLE_COMPONENT_EXTENDED_OPERATOR, + /* A typecast, represented as a unary operator. The one subtree is + the type to which the argument should be cast. */ + DEMANGLE_COMPONENT_CAST, + /* A conversion operator, represented as a unary operator. The one + subtree is the type to which the argument should be converted + to. */ + DEMANGLE_COMPONENT_CONVERSION, + /* A nullary expression. The left subtree is the operator. */ + DEMANGLE_COMPONENT_NULLARY, + /* A unary expression. The left subtree is the operator, and the + right subtree is the single argument. */ + DEMANGLE_COMPONENT_UNARY, + /* A binary expression. The left subtree is the operator, and the + right subtree is a BINARY_ARGS. */ + DEMANGLE_COMPONENT_BINARY, + /* Arguments to a binary expression. The left subtree is the first + argument, and the right subtree is the second argument. */ + DEMANGLE_COMPONENT_BINARY_ARGS, + /* A trinary expression. The left subtree is the operator, and the + right subtree is a TRINARY_ARG1. */ + DEMANGLE_COMPONENT_TRINARY, + /* Arguments to a trinary expression. The left subtree is the first + argument, and the right subtree is a TRINARY_ARG2. */ + DEMANGLE_COMPONENT_TRINARY_ARG1, + /* More arguments to a trinary expression. The left subtree is the + second argument, and the right subtree is the third argument. */ + DEMANGLE_COMPONENT_TRINARY_ARG2, + /* A literal. The left subtree is the type, and the right subtree + is the value, represented as a DEMANGLE_COMPONENT_NAME. */ + DEMANGLE_COMPONENT_LITERAL, + /* A negative literal. Like LITERAL, but the value is negated. + This is a minor hack: the NAME used for LITERAL points directly + to the mangled string, but since negative numbers are mangled + using 'n' instead of '-', we want a way to indicate a negative + number which involves neither modifying the mangled string nor + allocating a new copy of the literal in memory. */ + DEMANGLE_COMPONENT_LITERAL_NEG, + /* A libgcj compiled resource. The left subtree is the name of the + resource. */ + DEMANGLE_COMPONENT_JAVA_RESOURCE, + /* A name formed by the concatenation of two parts. The left + subtree is the first part and the right subtree the second. */ + DEMANGLE_COMPONENT_COMPOUND_NAME, + /* A name formed by a single character. */ + DEMANGLE_COMPONENT_CHARACTER, + /* A number. */ + DEMANGLE_COMPONENT_NUMBER, + /* A decltype type. */ + DEMANGLE_COMPONENT_DECLTYPE, + /* Global constructors keyed to name. */ + DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS, + /* Global destructors keyed to name. */ + DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS, + /* A lambda closure type. */ + DEMANGLE_COMPONENT_LAMBDA, + /* A default argument scope. */ + DEMANGLE_COMPONENT_DEFAULT_ARG, + /* An unnamed type. */ + DEMANGLE_COMPONENT_UNNAMED_TYPE, + /* A transactional clone. This has one subtree, the encoding for + which it is providing alternative linkage. */ + DEMANGLE_COMPONENT_TRANSACTION_CLONE, + /* A non-transactional clone entry point. In the i386/x86_64 abi, + the unmangled symbol of a tm_callable becomes a thunk and the + non-transactional function version is mangled thus. */ + DEMANGLE_COMPONENT_NONTRANSACTION_CLONE, + /* A pack expansion. */ + DEMANGLE_COMPONENT_PACK_EXPANSION, + /* A name with an ABI tag. */ + DEMANGLE_COMPONENT_TAGGED_NAME, + /* A transaction-safe function type. */ + DEMANGLE_COMPONENT_TRANSACTION_SAFE, + /* A cloned function. */ + DEMANGLE_COMPONENT_CLONE, + DEMANGLE_COMPONENT_NOEXCEPT, + DEMANGLE_COMPONENT_THROW_SPEC +}; + +/* Types which are only used internally. */ + +struct demangle_operator_info; +struct demangle_builtin_type_info; + +/* A node in the tree representation is an instance of a struct + demangle_component. Note that the field names of the struct are + not well protected against macros defined by the file including + this one. We can fix this if it ever becomes a problem. */ + +struct demangle_component +{ + /* The type of this component. */ + enum demangle_component_type type; + + /* Guard against recursive component printing. + Initialize to zero. Private to d_print_comp. + All other fields are final after initialization. */ + int d_printing; + + union + { + /* For DEMANGLE_COMPONENT_NAME. */ + struct + { + /* A pointer to the name (which need not NULL terminated) and + its length. */ + const char *s; + int len; + } s_name; + + /* For DEMANGLE_COMPONENT_OPERATOR. */ + struct + { + /* Operator. */ + const struct demangle_operator_info *op; + } s_operator; + + /* For DEMANGLE_COMPONENT_EXTENDED_OPERATOR. */ + struct + { + /* Number of arguments. */ + int args; + /* Name. */ + struct demangle_component *name; + } s_extended_operator; + + /* For DEMANGLE_COMPONENT_FIXED_TYPE. */ + struct + { + /* The length, indicated by a C integer type name. */ + struct demangle_component *length; + /* _Accum or _Fract? */ + short accum; + /* Saturating or not? */ + short sat; + } s_fixed; + + /* For DEMANGLE_COMPONENT_CTOR. */ + struct + { + /* Kind of constructor. */ + enum gnu_v3_ctor_kinds kind; + /* Name. */ + struct demangle_component *name; + } s_ctor; + + /* For DEMANGLE_COMPONENT_DTOR. */ + struct + { + /* Kind of destructor. */ + enum gnu_v3_dtor_kinds kind; + /* Name. */ + struct demangle_component *name; + } s_dtor; + + /* For DEMANGLE_COMPONENT_BUILTIN_TYPE. */ + struct + { + /* Builtin type. */ + const struct demangle_builtin_type_info *type; + } s_builtin; + + /* For DEMANGLE_COMPONENT_SUB_STD. */ + struct + { + /* Standard substitution string. */ + const char* string; + /* Length of string. */ + int len; + } s_string; + + /* For DEMANGLE_COMPONENT_*_PARAM. */ + struct + { + /* Parameter index. */ + long number; + } s_number; + + /* For DEMANGLE_COMPONENT_CHARACTER. */ + struct + { + int character; + } s_character; + + /* For other types. */ + struct + { + /* Left (or only) subtree. */ + struct demangle_component *left; + /* Right subtree. */ + struct demangle_component *right; + } s_binary; + + struct + { + /* subtree, same place as d_left. */ + struct demangle_component *sub; + /* integer. */ + int num; + } s_unary_num; + + } u; +}; + +/* People building mangled trees are expected to allocate instances of + struct demangle_component themselves. They can then call one of + the following functions to fill them in. */ + +/* Fill in most component types with a left subtree and a right + subtree. Returns non-zero on success, zero on failure, such as an + unrecognized or inappropriate component type. */ + +extern int +cplus_demangle_fill_component (struct demangle_component *fill, + enum demangle_component_type, + struct demangle_component *left, + struct demangle_component *right); + +/* Fill in a DEMANGLE_COMPONENT_NAME. Returns non-zero on success, + zero for bad arguments. */ + +extern int +cplus_demangle_fill_name (struct demangle_component *fill, + const char *, int); + +/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE, using the name of the + builtin type (e.g., "int", etc.). Returns non-zero on success, + zero if the type is not recognized. */ + +extern int +cplus_demangle_fill_builtin_type (struct demangle_component *fill, + const char *type_name); + +/* Fill in a DEMANGLE_COMPONENT_OPERATOR, using the name of the + operator and the number of arguments which it takes (the latter is + used to disambiguate operators which can be both binary and unary, + such as '-'). Returns non-zero on success, zero if the operator is + not recognized. */ + +extern int +cplus_demangle_fill_operator (struct demangle_component *fill, + const char *opname, int args); + +/* Fill in a DEMANGLE_COMPONENT_EXTENDED_OPERATOR, providing the + number of arguments and the name. Returns non-zero on success, + zero for bad arguments. */ + +extern int +cplus_demangle_fill_extended_operator (struct demangle_component *fill, + int numargs, + struct demangle_component *nm); + +/* Fill in a DEMANGLE_COMPONENT_CTOR. Returns non-zero on success, + zero for bad arguments. */ + +extern int +cplus_demangle_fill_ctor (struct demangle_component *fill, + enum gnu_v3_ctor_kinds kind, + struct demangle_component *name); + +/* Fill in a DEMANGLE_COMPONENT_DTOR. Returns non-zero on success, + zero for bad arguments. */ + +extern int +cplus_demangle_fill_dtor (struct demangle_component *fill, + enum gnu_v3_dtor_kinds kind, + struct demangle_component *name); + +/* This function translates a mangled name into a struct + demangle_component tree. The first argument is the mangled name. + The second argument is DMGL_* options. This returns a pointer to a + tree on success, or NULL on failure. On success, the third + argument is set to a block of memory allocated by malloc. This + block should be passed to free when the tree is no longer + needed. */ + +extern struct demangle_component * +cplus_demangle_v3_components (const char *mangled, int options, void **mem); + +/* This function takes a struct demangle_component tree and returns + the corresponding demangled string. The first argument is DMGL_* + options. The second is the tree to demangle. The third is a guess + at the length of the demangled string, used to initially allocate + the return buffer. The fourth is a pointer to a size_t. On + success, this function returns a buffer allocated by malloc(), and + sets the size_t pointed to by the fourth argument to the size of + the allocated buffer (not the length of the returned string). On + failure, this function returns NULL, and sets the size_t pointed to + by the fourth argument to 0 for an invalid tree, or to 1 for a + memory allocation error. */ + +extern char * +cplus_demangle_print (int options, + struct demangle_component *tree, + int estimated_length, + size_t *p_allocated_size); + +/* This function takes a struct demangle_component tree and passes back + a demangled string in one or more calls to a callback function. + The first argument is DMGL_* options. The second is the tree to + demangle. The third is a pointer to a callback function; on each call + this receives an element of the demangled string, its length, and an + opaque value. The fourth is the opaque value passed to the callback. + The callback is called once or more to return the full demangled + string. The demangled element string is always nul-terminated, though + its length is also provided for convenience. In contrast to + cplus_demangle_print(), this function does not allocate heap memory + to grow output strings (except perhaps where alloca() is implemented + by malloc()), and so is normally safe for use where the heap has been + corrupted. On success, this function returns 1; on failure, 0. */ + +extern int +cplus_demangle_print_callback (int options, + struct demangle_component *tree, + demangle_callbackref callback, void *opaque); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* DEMANGLE_H */ diff --git a/support/sdbinutils/include/dis-asm.h b/support/sdbinutils/include/dis-asm.h new file mode 100644 index 0000000..eebdaf8 --- /dev/null +++ b/support/sdbinutils/include/dis-asm.h @@ -0,0 +1,354 @@ +/* Interface between the opcode library and its callers. + + Copyright (C) 1999-2018 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 "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 options + and their descriptions from the target to the generic GDB functions that + set and display them. */ + +typedef struct +{ + const char **name; + const char **description; +} disasm_options_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_sh (bfd_vma, disassemble_info *); +extern int print_insn_sh64x_media (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_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 void disassemble_init_powerpc (struct disassemble_info *); +extern void disassemble_init_s390 (struct disassemble_info *); +extern void disassemble_init_wasm32 (struct disassemble_info *); +extern const disasm_options_t *disassembler_options_powerpc (void); +extern const disasm_options_t *disassembler_options_arm (void); +extern const disasm_options_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) */ diff --git a/support/sdbinutils/include/dwarf2.def b/support/sdbinutils/include/dwarf2.def new file mode 100644 index 0000000..3becd7f --- /dev/null +++ b/support/sdbinutils/include/dwarf2.def @@ -0,0 +1,799 @@ +/* -*- c -*- + Declarations and definitions of codes relating to the DWARF2 and + DWARF3 symbolic debugging information formats. + Copyright (C) 1992-2018 Free Software Foundation, Inc. + + Written by Gary Funck (gary@intrepid.com) The Ada Joint Program + Office (AJPO), Florida State University and Silicon Graphics Inc. + provided support for this effort -- June 21, 1995. + + Derived from the DWARF 1 implementation written by Ron Guilmette + (rfg@netcom.com), November 1990. + + This file is part of GCC. + + GCC 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. + + GCC 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. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +/* This file is derived from the DWARF specification (a public document) + Revision 2.0.0 (July 27, 1993) developed by the UNIX International + Programming Languages Special Interest Group (UI/PLSIG) and distributed + by UNIX International. Copies of this specification are available from + UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054. + + This file also now contains definitions from the DWARF 3 specification + published Dec 20, 2005, available from: http://dwarf.freestandards.org. + + This file also now contains definitions from the DWARF 4 + specification, available from: http://dwarfstd.org/ */ + +/* This file declares various DWARF-related constants using a set of + macros which can be redefined by the including file. + + The macros are in sections. Each section corresponds to a single + set of DWARF constants and has a corresponding key. The key is + used in all the macro names. + + The sections are TAG (for DW_TAG_ constants), FORM (DW_FORM_), AT + (DW_AT_), OP (DW_OP_), ATE (DW_ATE_), and CFA (DW_CFA_). + + Using TAG as an example, the following macros may be used for each + key: + + DW_FIRST_TAG(name, value) - Introduce the first DW_TAG constant. + + DW_TAG(name, value) - Define a subsequent constant. + + DW_TAG_DUP(name, value) - Define a subsequent constant whose value + is a duplicate of some other constant. Not all keys use the _DUP + macro form. If more than one name shares a value, then the base + (DW_TAG) form will be the preferred name and DW_TAG_DUP will hold + any alternate names. + + DW_END_TAG - Invoked at the end of the DW_TAG constants. */ + +DW_FIRST_TAG (DW_TAG_padding, 0x00) +DW_TAG (DW_TAG_array_type, 0x01) +DW_TAG (DW_TAG_class_type, 0x02) +DW_TAG (DW_TAG_entry_point, 0x03) +DW_TAG (DW_TAG_enumeration_type, 0x04) +DW_TAG (DW_TAG_formal_parameter, 0x05) +DW_TAG (DW_TAG_imported_declaration, 0x08) +DW_TAG (DW_TAG_label, 0x0a) +DW_TAG (DW_TAG_lexical_block, 0x0b) +DW_TAG (DW_TAG_member, 0x0d) +DW_TAG (DW_TAG_pointer_type, 0x0f) +DW_TAG (DW_TAG_reference_type, 0x10) +DW_TAG (DW_TAG_compile_unit, 0x11) +DW_TAG (DW_TAG_string_type, 0x12) +DW_TAG (DW_TAG_structure_type, 0x13) +DW_TAG (DW_TAG_subroutine_type, 0x15) +DW_TAG (DW_TAG_typedef, 0x16) +DW_TAG (DW_TAG_union_type, 0x17) +DW_TAG (DW_TAG_unspecified_parameters, 0x18) +DW_TAG (DW_TAG_variant, 0x19) +DW_TAG (DW_TAG_common_block, 0x1a) +DW_TAG (DW_TAG_common_inclusion, 0x1b) +DW_TAG (DW_TAG_inheritance, 0x1c) +DW_TAG (DW_TAG_inlined_subroutine, 0x1d) +DW_TAG (DW_TAG_module, 0x1e) +DW_TAG (DW_TAG_ptr_to_member_type, 0x1f) +DW_TAG (DW_TAG_set_type, 0x20) +DW_TAG (DW_TAG_subrange_type, 0x21) +DW_TAG (DW_TAG_with_stmt, 0x22) +DW_TAG (DW_TAG_access_declaration, 0x23) +DW_TAG (DW_TAG_base_type, 0x24) +DW_TAG (DW_TAG_catch_block, 0x25) +DW_TAG (DW_TAG_const_type, 0x26) +DW_TAG (DW_TAG_constant, 0x27) +DW_TAG (DW_TAG_enumerator, 0x28) +DW_TAG (DW_TAG_file_type, 0x29) +DW_TAG (DW_TAG_friend, 0x2a) +DW_TAG (DW_TAG_namelist, 0x2b) +DW_TAG (DW_TAG_namelist_item, 0x2c) +DW_TAG (DW_TAG_packed_type, 0x2d) +DW_TAG (DW_TAG_subprogram, 0x2e) +DW_TAG (DW_TAG_template_type_param, 0x2f) +DW_TAG (DW_TAG_template_value_param, 0x30) +DW_TAG (DW_TAG_thrown_type, 0x31) +DW_TAG (DW_TAG_try_block, 0x32) +DW_TAG (DW_TAG_variant_part, 0x33) +DW_TAG (DW_TAG_variable, 0x34) +DW_TAG (DW_TAG_volatile_type, 0x35) +/* DWARF 3. */ +DW_TAG (DW_TAG_dwarf_procedure, 0x36) +DW_TAG (DW_TAG_restrict_type, 0x37) +DW_TAG (DW_TAG_interface_type, 0x38) +DW_TAG (DW_TAG_namespace, 0x39) +DW_TAG (DW_TAG_imported_module, 0x3a) +DW_TAG (DW_TAG_unspecified_type, 0x3b) +DW_TAG (DW_TAG_partial_unit, 0x3c) +DW_TAG (DW_TAG_imported_unit, 0x3d) +DW_TAG (DW_TAG_condition, 0x3f) +DW_TAG (DW_TAG_shared_type, 0x40) +/* DWARF 4. */ +DW_TAG (DW_TAG_type_unit, 0x41) +DW_TAG (DW_TAG_rvalue_reference_type, 0x42) +DW_TAG (DW_TAG_template_alias, 0x43) +/* DWARF 5. */ +DW_TAG (DW_TAG_coarray_type, 0x44) +DW_TAG (DW_TAG_generic_subrange, 0x45) +DW_TAG (DW_TAG_dynamic_type, 0x46) +DW_TAG (DW_TAG_atomic_type, 0x47) +DW_TAG (DW_TAG_call_site, 0x48) +DW_TAG (DW_TAG_call_site_parameter, 0x49) +DW_TAG (DW_TAG_skeleton_unit, 0x4a) +DW_TAG (DW_TAG_immutable_type, 0x4b) + +DW_TAG_DUP (DW_TAG_lo_user, 0x4080) +DW_TAG_DUP (DW_TAG_hi_user, 0xffff) + +/* SGI/MIPS Extensions. */ +DW_TAG (DW_TAG_MIPS_loop, 0x4081) + +/* HP extensions. See: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz . */ +DW_TAG (DW_TAG_HP_array_descriptor, 0x4090) +DW_TAG (DW_TAG_HP_Bliss_field, 0x4091) +DW_TAG (DW_TAG_HP_Bliss_field_set, 0x4092) + +/* GNU extensions. */ +DW_TAG (DW_TAG_format_label, 0x4101) /* For FORTRAN 77 and Fortran 90. */ +DW_TAG (DW_TAG_function_template, 0x4102) /* For C++. */ +DW_TAG (DW_TAG_class_template, 0x4103) /* For C++. */ +DW_TAG (DW_TAG_GNU_BINCL, 0x4104) +DW_TAG (DW_TAG_GNU_EINCL, 0x4105) +/* Template template parameter. + See http://gcc.gnu.org/wiki/TemplateParmsDwarf . */ +DW_TAG (DW_TAG_GNU_template_template_param, 0x4106) + +/* Template parameter pack extension, specified at + http://wiki.dwarfstd.org/index.php?title=C%2B%2B0x:_Variadic_templates + The values of these two TAGS are in the DW_TAG_GNU_* space until the tags + are properly part of DWARF 5. */ +DW_TAG (DW_TAG_GNU_template_parameter_pack, 0x4107) +DW_TAG (DW_TAG_GNU_formal_parameter_pack, 0x4108) +/* The GNU call site extension, specified at + http://www.dwarfstd.org/ShowIssue.php?issue=100909.2&type=open . + The values of these two TAGS are in the DW_TAG_GNU_* space until the tags + are properly part of DWARF 5. */ +DW_TAG (DW_TAG_GNU_call_site, 0x4109) +DW_TAG (DW_TAG_GNU_call_site_parameter, 0x410a) +/* Extensions for UPC. See: http://dwarfstd.org/doc/DWARF4.pdf. */ +DW_TAG (DW_TAG_upc_shared_type, 0x8765) +DW_TAG (DW_TAG_upc_strict_type, 0x8766) +DW_TAG (DW_TAG_upc_relaxed_type, 0x8767) +/* PGI (STMicroelectronics) extensions. No documentation available. */ +DW_TAG (DW_TAG_PGI_kanji_type, 0xA000) +DW_TAG (DW_TAG_PGI_interface_block, 0xA020) +DW_END_TAG + +DW_FIRST_FORM (DW_FORM_addr, 0x01) +DW_FORM (DW_FORM_block2, 0x03) +DW_FORM (DW_FORM_block4, 0x04) +DW_FORM (DW_FORM_data2, 0x05) +DW_FORM (DW_FORM_data4, 0x06) +DW_FORM (DW_FORM_data8, 0x07) +DW_FORM (DW_FORM_string, 0x08) +DW_FORM (DW_FORM_block, 0x09) +DW_FORM (DW_FORM_block1, 0x0a) +DW_FORM (DW_FORM_data1, 0x0b) +DW_FORM (DW_FORM_flag, 0x0c) +DW_FORM (DW_FORM_sdata, 0x0d) +DW_FORM (DW_FORM_strp, 0x0e) +DW_FORM (DW_FORM_udata, 0x0f) +DW_FORM (DW_FORM_ref_addr, 0x10) +DW_FORM (DW_FORM_ref1, 0x11) +DW_FORM (DW_FORM_ref2, 0x12) +DW_FORM (DW_FORM_ref4, 0x13) +DW_FORM (DW_FORM_ref8, 0x14) +DW_FORM (DW_FORM_ref_udata, 0x15) +DW_FORM (DW_FORM_indirect, 0x16) +/* DWARF 4. */ +DW_FORM (DW_FORM_sec_offset, 0x17) +DW_FORM (DW_FORM_exprloc, 0x18) +DW_FORM (DW_FORM_flag_present, 0x19) +DW_FORM (DW_FORM_ref_sig8, 0x20) +/* DWARF 5. */ +DW_FORM (DW_FORM_strx, 0x1a) +DW_FORM (DW_FORM_addrx, 0x1b) +DW_FORM (DW_FORM_ref_sup4, 0x1c) +DW_FORM (DW_FORM_strp_sup, 0x1d) +DW_FORM (DW_FORM_data16, 0x1e) +DW_FORM (DW_FORM_line_strp, 0x1f) +DW_FORM (DW_FORM_implicit_const, 0x21) +DW_FORM (DW_FORM_loclistx, 0x22) +DW_FORM (DW_FORM_rnglistx, 0x23) +DW_FORM (DW_FORM_ref_sup8, 0x24) +/* Extensions for Fission. See http://gcc.gnu.org/wiki/DebugFission. */ +DW_FORM (DW_FORM_GNU_addr_index, 0x1f01) +DW_FORM (DW_FORM_GNU_str_index, 0x1f02) +/* Extensions for DWZ multifile. + See http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open . */ +DW_FORM (DW_FORM_GNU_ref_alt, 0x1f20) +DW_FORM (DW_FORM_GNU_strp_alt, 0x1f21) +DW_END_FORM + +DW_FIRST_AT (DW_AT_sibling, 0x01) +DW_AT (DW_AT_location, 0x02) +DW_AT (DW_AT_name, 0x03) +DW_AT (DW_AT_ordering, 0x09) +DW_AT (DW_AT_subscr_data, 0x0a) +DW_AT (DW_AT_byte_size, 0x0b) +DW_AT (DW_AT_bit_offset, 0x0c) +DW_AT (DW_AT_bit_size, 0x0d) +DW_AT (DW_AT_element_list, 0x0f) +DW_AT (DW_AT_stmt_list, 0x10) +DW_AT (DW_AT_low_pc, 0x11) +DW_AT (DW_AT_high_pc, 0x12) +DW_AT (DW_AT_language, 0x13) +DW_AT (DW_AT_member, 0x14) +DW_AT (DW_AT_discr, 0x15) +DW_AT (DW_AT_discr_value, 0x16) +DW_AT (DW_AT_visibility, 0x17) +DW_AT (DW_AT_import, 0x18) +DW_AT (DW_AT_string_length, 0x19) +DW_AT (DW_AT_common_reference, 0x1a) +DW_AT (DW_AT_comp_dir, 0x1b) +DW_AT (DW_AT_const_value, 0x1c) +DW_AT (DW_AT_containing_type, 0x1d) +DW_AT (DW_AT_default_value, 0x1e) +DW_AT (DW_AT_inline, 0x20) +DW_AT (DW_AT_is_optional, 0x21) +DW_AT (DW_AT_lower_bound, 0x22) +DW_AT (DW_AT_producer, 0x25) +DW_AT (DW_AT_prototyped, 0x27) +DW_AT (DW_AT_return_addr, 0x2a) +DW_AT (DW_AT_start_scope, 0x2c) +DW_AT (DW_AT_bit_stride, 0x2e) +DW_AT (DW_AT_upper_bound, 0x2f) +DW_AT (DW_AT_abstract_origin, 0x31) +DW_AT (DW_AT_accessibility, 0x32) +DW_AT (DW_AT_address_class, 0x33) +DW_AT (DW_AT_artificial, 0x34) +DW_AT (DW_AT_base_types, 0x35) +DW_AT (DW_AT_calling_convention, 0x36) +DW_AT (DW_AT_count, 0x37) +DW_AT (DW_AT_data_member_location, 0x38) +DW_AT (DW_AT_decl_column, 0x39) +DW_AT (DW_AT_decl_file, 0x3a) +DW_AT (DW_AT_decl_line, 0x3b) +DW_AT (DW_AT_declaration, 0x3c) +DW_AT (DW_AT_discr_list, 0x3d) +DW_AT (DW_AT_encoding, 0x3e) +DW_AT (DW_AT_external, 0x3f) +DW_AT (DW_AT_frame_base, 0x40) +DW_AT (DW_AT_friend, 0x41) +DW_AT (DW_AT_identifier_case, 0x42) +DW_AT (DW_AT_macro_info, 0x43) +DW_AT (DW_AT_namelist_items, 0x44) +DW_AT (DW_AT_priority, 0x45) +DW_AT (DW_AT_segment, 0x46) +DW_AT (DW_AT_specification, 0x47) +DW_AT (DW_AT_static_link, 0x48) +DW_AT (DW_AT_type, 0x49) +DW_AT (DW_AT_use_location, 0x4a) +DW_AT (DW_AT_variable_parameter, 0x4b) +DW_AT (DW_AT_virtuality, 0x4c) +DW_AT (DW_AT_vtable_elem_location, 0x4d) +/* DWARF 3 values. */ +DW_AT (DW_AT_allocated, 0x4e) +DW_AT (DW_AT_associated, 0x4f) +DW_AT (DW_AT_data_location, 0x50) +DW_AT (DW_AT_byte_stride, 0x51) +DW_AT (DW_AT_entry_pc, 0x52) +DW_AT (DW_AT_use_UTF8, 0x53) +DW_AT (DW_AT_extension, 0x54) +DW_AT (DW_AT_ranges, 0x55) +DW_AT (DW_AT_trampoline, 0x56) +DW_AT (DW_AT_call_column, 0x57) +DW_AT (DW_AT_call_file, 0x58) +DW_AT (DW_AT_call_line, 0x59) +DW_AT (DW_AT_description, 0x5a) +DW_AT (DW_AT_binary_scale, 0x5b) +DW_AT (DW_AT_decimal_scale, 0x5c) +DW_AT (DW_AT_small, 0x5d) +DW_AT (DW_AT_decimal_sign, 0x5e) +DW_AT (DW_AT_digit_count, 0x5f) +DW_AT (DW_AT_picture_string, 0x60) +DW_AT (DW_AT_mutable, 0x61) +DW_AT (DW_AT_threads_scaled, 0x62) +DW_AT (DW_AT_explicit, 0x63) +DW_AT (DW_AT_object_pointer, 0x64) +DW_AT (DW_AT_endianity, 0x65) +DW_AT (DW_AT_elemental, 0x66) +DW_AT (DW_AT_pure, 0x67) +DW_AT (DW_AT_recursive, 0x68) +/* DWARF 4. */ +DW_AT (DW_AT_signature, 0x69) +DW_AT (DW_AT_main_subprogram, 0x6a) +DW_AT (DW_AT_data_bit_offset, 0x6b) +DW_AT (DW_AT_const_expr, 0x6c) +DW_AT (DW_AT_enum_class, 0x6d) +DW_AT (DW_AT_linkage_name, 0x6e) +/* DWARF 5. */ +DW_AT (DW_AT_string_length_bit_size, 0x6f) +DW_AT (DW_AT_string_length_byte_size, 0x70) +DW_AT (DW_AT_rank, 0x71) +DW_AT (DW_AT_str_offsets_base, 0x72) +DW_AT (DW_AT_addr_base, 0x73) +DW_AT (DW_AT_rnglists_base, 0x74) +DW_AT (DW_AT_dwo_name, 0x76) +DW_AT (DW_AT_reference, 0x77) +DW_AT (DW_AT_rvalue_reference, 0x78) +DW_AT (DW_AT_macros, 0x79) +DW_AT (DW_AT_call_all_calls, 0x7a) +DW_AT (DW_AT_call_all_source_calls, 0x7b) +DW_AT (DW_AT_call_all_tail_calls, 0x7c) +DW_AT (DW_AT_call_return_pc, 0x7d) +DW_AT (DW_AT_call_value, 0x7e) +DW_AT (DW_AT_call_origin, 0x7f) +DW_AT (DW_AT_call_parameter, 0x80) +DW_AT (DW_AT_call_pc, 0x81) +DW_AT (DW_AT_call_tail_call, 0x82) +DW_AT (DW_AT_call_target, 0x83) +DW_AT (DW_AT_call_target_clobbered, 0x84) +DW_AT (DW_AT_call_data_location, 0x85) +DW_AT (DW_AT_call_data_value, 0x86) +DW_AT (DW_AT_noreturn, 0x87) +DW_AT (DW_AT_alignment, 0x88) +DW_AT (DW_AT_export_symbols, 0x89) +DW_AT (DW_AT_deleted, 0x8a) +DW_AT (DW_AT_defaulted, 0x8b) +DW_AT (DW_AT_loclists_base, 0x8c) + +DW_AT_DUP (DW_AT_lo_user, 0x2000) /* Implementation-defined range start. */ +DW_AT_DUP (DW_AT_hi_user, 0x3fff) /* Implementation-defined range end. */ + +/* SGI/MIPS extensions. */ +DW_AT (DW_AT_MIPS_fde, 0x2001) +DW_AT (DW_AT_MIPS_loop_begin, 0x2002) +DW_AT (DW_AT_MIPS_tail_loop_begin, 0x2003) +DW_AT (DW_AT_MIPS_epilog_begin, 0x2004) +DW_AT (DW_AT_MIPS_loop_unroll_factor, 0x2005) +DW_AT (DW_AT_MIPS_software_pipeline_depth, 0x2006) +DW_AT (DW_AT_MIPS_linkage_name, 0x2007) +DW_AT (DW_AT_MIPS_stride, 0x2008) +DW_AT (DW_AT_MIPS_abstract_name, 0x2009) +DW_AT (DW_AT_MIPS_clone_origin, 0x200a) +DW_AT (DW_AT_MIPS_has_inlines, 0x200b) +/* HP extensions. */ +DW_AT (DW_AT_HP_block_index, 0x2000) +DW_AT_DUP (DW_AT_HP_unmodifiable, 0x2001) /* Same as DW_AT_MIPS_fde. */ +DW_AT_DUP (DW_AT_HP_prologue, 0x2005) /* Same as DW_AT_MIPS_loop_unroll. */ +DW_AT_DUP (DW_AT_HP_epilogue, 0x2008) /* Same as DW_AT_MIPS_stride. */ +DW_AT (DW_AT_HP_actuals_stmt_list, 0x2010) +DW_AT (DW_AT_HP_proc_per_section, 0x2011) +DW_AT (DW_AT_HP_raw_data_ptr, 0x2012) +DW_AT (DW_AT_HP_pass_by_reference, 0x2013) +DW_AT (DW_AT_HP_opt_level, 0x2014) +DW_AT (DW_AT_HP_prof_version_id, 0x2015) +DW_AT (DW_AT_HP_opt_flags, 0x2016) +DW_AT (DW_AT_HP_cold_region_low_pc, 0x2017) +DW_AT (DW_AT_HP_cold_region_high_pc, 0x2018) +DW_AT (DW_AT_HP_all_variables_modifiable, 0x2019) +DW_AT (DW_AT_HP_linkage_name, 0x201a) +DW_AT (DW_AT_HP_prof_flags, 0x201b) /* In comp unit of procs_info for -g. */ +DW_AT (DW_AT_HP_unit_name, 0x201f) +DW_AT (DW_AT_HP_unit_size, 0x2020) +DW_AT (DW_AT_HP_widened_byte_size, 0x2021) +DW_AT (DW_AT_HP_definition_points, 0x2022) +DW_AT (DW_AT_HP_default_location, 0x2023) +DW_AT (DW_AT_HP_is_result_param, 0x2029) + +/* GNU extensions. */ +DW_AT (DW_AT_sf_names, 0x2101) +DW_AT (DW_AT_src_info, 0x2102) +DW_AT (DW_AT_mac_info, 0x2103) +DW_AT (DW_AT_src_coords, 0x2104) +DW_AT (DW_AT_body_begin, 0x2105) +DW_AT (DW_AT_body_end, 0x2106) +DW_AT (DW_AT_GNU_vector, 0x2107) +/* Thread-safety annotations. + See http://gcc.gnu.org/wiki/ThreadSafetyAnnotation . */ +DW_AT (DW_AT_GNU_guarded_by, 0x2108) +DW_AT (DW_AT_GNU_pt_guarded_by, 0x2109) +DW_AT (DW_AT_GNU_guarded, 0x210a) +DW_AT (DW_AT_GNU_pt_guarded, 0x210b) +DW_AT (DW_AT_GNU_locks_excluded, 0x210c) +DW_AT (DW_AT_GNU_exclusive_locks_required, 0x210d) +DW_AT (DW_AT_GNU_shared_locks_required, 0x210e) +/* One-definition rule violation detection. + See http://gcc.gnu.org/wiki/DwarfSeparateTypeInfo . */ +DW_AT (DW_AT_GNU_odr_signature, 0x210f) +/* Template template argument name. + See http://gcc.gnu.org/wiki/TemplateParmsDwarf . */ +DW_AT (DW_AT_GNU_template_name, 0x2110) +/* The GNU call site extension. + See http://www.dwarfstd.org/ShowIssue.php?issue=100909.2&type=open . */ +DW_AT (DW_AT_GNU_call_site_value, 0x2111) +DW_AT (DW_AT_GNU_call_site_data_value, 0x2112) +DW_AT (DW_AT_GNU_call_site_target, 0x2113) +DW_AT (DW_AT_GNU_call_site_target_clobbered, 0x2114) +DW_AT (DW_AT_GNU_tail_call, 0x2115) +DW_AT (DW_AT_GNU_all_tail_call_sites, 0x2116) +DW_AT (DW_AT_GNU_all_call_sites, 0x2117) +DW_AT (DW_AT_GNU_all_source_call_sites, 0x2118) +/* Section offset into .debug_macro section. */ +DW_AT (DW_AT_GNU_macros, 0x2119) +/* Attribute for C++ deleted special member functions (= delete;). */ +DW_AT (DW_AT_GNU_deleted, 0x211a) +/* Extensions for Fission. See http://gcc.gnu.org/wiki/DebugFission. */ +DW_AT (DW_AT_GNU_dwo_name, 0x2130) +DW_AT (DW_AT_GNU_dwo_id, 0x2131) +DW_AT (DW_AT_GNU_ranges_base, 0x2132) +DW_AT (DW_AT_GNU_addr_base, 0x2133) +DW_AT (DW_AT_GNU_pubnames, 0x2134) +DW_AT (DW_AT_GNU_pubtypes, 0x2135) +/* Attribute for discriminator. + See http://gcc.gnu.org/wiki/Discriminator */ +DW_AT (DW_AT_GNU_discriminator, 0x2136) +DW_AT (DW_AT_GNU_locviews, 0x2137) +DW_AT (DW_AT_GNU_entry_view, 0x2138) +/* VMS extensions. */ +DW_AT (DW_AT_VMS_rtnbeg_pd_address, 0x2201) +/* GNAT extensions. */ +/* GNAT descriptive type. + See http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type . */ +DW_AT (DW_AT_use_GNAT_descriptive_type, 0x2301) +DW_AT (DW_AT_GNAT_descriptive_type, 0x2302) +/* Rational constant extension. + See https://gcc.gnu.org/wiki/DW_AT_GNU_numerator_denominator . */ +DW_TAG (DW_AT_GNU_numerator, 0x2303) +DW_TAG (DW_AT_GNU_denominator, 0x2304) +/* Biased integer extension. + See https://gcc.gnu.org/wiki/DW_AT_GNU_bias . */ +DW_TAG (DW_AT_GNU_bias, 0x2305) +/* UPC extension. */ +DW_AT (DW_AT_upc_threads_scaled, 0x3210) +/* PGI (STMicroelectronics) extensions. */ +DW_AT (DW_AT_PGI_lbase, 0x3a00) +DW_AT (DW_AT_PGI_soffset, 0x3a01) +DW_AT (DW_AT_PGI_lstride, 0x3a02) +/* Apple extensions. */ +DW_AT (DW_AT_APPLE_optimized, 0x3fe1) +DW_AT (DW_AT_APPLE_flags, 0x3fe2) +DW_AT (DW_AT_APPLE_isa, 0x3fe3) +DW_AT (DW_AT_APPLE_block, 0x3fe4) +DW_AT (DW_AT_APPLE_major_runtime_vers, 0x3fe5) +DW_AT (DW_AT_APPLE_runtime_class, 0x3fe6) +DW_AT (DW_AT_APPLE_omit_frame_ptr, 0x3fe7) +DW_AT (DW_AT_APPLE_property_name, 0x3fe8) +DW_AT (DW_AT_APPLE_property_getter, 0x3fe9) +DW_AT (DW_AT_APPLE_property_setter, 0x3fea) +DW_AT (DW_AT_APPLE_property_attribute, 0x3feb) +DW_AT (DW_AT_APPLE_objc_complete_type, 0x3fec) +DW_AT (DW_AT_APPLE_property, 0x3fed) +DW_END_AT + +DW_FIRST_OP (DW_OP_addr, 0x03) +DW_OP (DW_OP_deref, 0x06) +DW_OP (DW_OP_const1u, 0x08) +DW_OP (DW_OP_const1s, 0x09) +DW_OP (DW_OP_const2u, 0x0a) +DW_OP (DW_OP_const2s, 0x0b) +DW_OP (DW_OP_const4u, 0x0c) +DW_OP (DW_OP_const4s, 0x0d) +DW_OP (DW_OP_const8u, 0x0e) +DW_OP (DW_OP_const8s, 0x0f) +DW_OP (DW_OP_constu, 0x10) +DW_OP (DW_OP_consts, 0x11) +DW_OP (DW_OP_dup, 0x12) +DW_OP (DW_OP_drop, 0x13) +DW_OP (DW_OP_over, 0x14) +DW_OP (DW_OP_pick, 0x15) +DW_OP (DW_OP_swap, 0x16) +DW_OP (DW_OP_rot, 0x17) +DW_OP (DW_OP_xderef, 0x18) +DW_OP (DW_OP_abs, 0x19) +DW_OP (DW_OP_and, 0x1a) +DW_OP (DW_OP_div, 0x1b) +DW_OP (DW_OP_minus, 0x1c) +DW_OP (DW_OP_mod, 0x1d) +DW_OP (DW_OP_mul, 0x1e) +DW_OP (DW_OP_neg, 0x1f) +DW_OP (DW_OP_not, 0x20) +DW_OP (DW_OP_or, 0x21) +DW_OP (DW_OP_plus, 0x22) +DW_OP (DW_OP_plus_uconst, 0x23) +DW_OP (DW_OP_shl, 0x24) +DW_OP (DW_OP_shr, 0x25) +DW_OP (DW_OP_shra, 0x26) +DW_OP (DW_OP_xor, 0x27) +DW_OP (DW_OP_bra, 0x28) +DW_OP (DW_OP_eq, 0x29) +DW_OP (DW_OP_ge, 0x2a) +DW_OP (DW_OP_gt, 0x2b) +DW_OP (DW_OP_le, 0x2c) +DW_OP (DW_OP_lt, 0x2d) +DW_OP (DW_OP_ne, 0x2e) +DW_OP (DW_OP_skip, 0x2f) +DW_OP (DW_OP_lit0, 0x30) +DW_OP (DW_OP_lit1, 0x31) +DW_OP (DW_OP_lit2, 0x32) +DW_OP (DW_OP_lit3, 0x33) +DW_OP (DW_OP_lit4, 0x34) +DW_OP (DW_OP_lit5, 0x35) +DW_OP (DW_OP_lit6, 0x36) +DW_OP (DW_OP_lit7, 0x37) +DW_OP (DW_OP_lit8, 0x38) +DW_OP (DW_OP_lit9, 0x39) +DW_OP (DW_OP_lit10, 0x3a) +DW_OP (DW_OP_lit11, 0x3b) +DW_OP (DW_OP_lit12, 0x3c) +DW_OP (DW_OP_lit13, 0x3d) +DW_OP (DW_OP_lit14, 0x3e) +DW_OP (DW_OP_lit15, 0x3f) +DW_OP (DW_OP_lit16, 0x40) +DW_OP (DW_OP_lit17, 0x41) +DW_OP (DW_OP_lit18, 0x42) +DW_OP (DW_OP_lit19, 0x43) +DW_OP (DW_OP_lit20, 0x44) +DW_OP (DW_OP_lit21, 0x45) +DW_OP (DW_OP_lit22, 0x46) +DW_OP (DW_OP_lit23, 0x47) +DW_OP (DW_OP_lit24, 0x48) +DW_OP (DW_OP_lit25, 0x49) +DW_OP (DW_OP_lit26, 0x4a) +DW_OP (DW_OP_lit27, 0x4b) +DW_OP (DW_OP_lit28, 0x4c) +DW_OP (DW_OP_lit29, 0x4d) +DW_OP (DW_OP_lit30, 0x4e) +DW_OP (DW_OP_lit31, 0x4f) +DW_OP (DW_OP_reg0, 0x50) +DW_OP (DW_OP_reg1, 0x51) +DW_OP (DW_OP_reg2, 0x52) +DW_OP (DW_OP_reg3, 0x53) +DW_OP (DW_OP_reg4, 0x54) +DW_OP (DW_OP_reg5, 0x55) +DW_OP (DW_OP_reg6, 0x56) +DW_OP (DW_OP_reg7, 0x57) +DW_OP (DW_OP_reg8, 0x58) +DW_OP (DW_OP_reg9, 0x59) +DW_OP (DW_OP_reg10, 0x5a) +DW_OP (DW_OP_reg11, 0x5b) +DW_OP (DW_OP_reg12, 0x5c) +DW_OP (DW_OP_reg13, 0x5d) +DW_OP (DW_OP_reg14, 0x5e) +DW_OP (DW_OP_reg15, 0x5f) +DW_OP (DW_OP_reg16, 0x60) +DW_OP (DW_OP_reg17, 0x61) +DW_OP (DW_OP_reg18, 0x62) +DW_OP (DW_OP_reg19, 0x63) +DW_OP (DW_OP_reg20, 0x64) +DW_OP (DW_OP_reg21, 0x65) +DW_OP (DW_OP_reg22, 0x66) +DW_OP (DW_OP_reg23, 0x67) +DW_OP (DW_OP_reg24, 0x68) +DW_OP (DW_OP_reg25, 0x69) +DW_OP (DW_OP_reg26, 0x6a) +DW_OP (DW_OP_reg27, 0x6b) +DW_OP (DW_OP_reg28, 0x6c) +DW_OP (DW_OP_reg29, 0x6d) +DW_OP (DW_OP_reg30, 0x6e) +DW_OP (DW_OP_reg31, 0x6f) +DW_OP (DW_OP_breg0, 0x70) +DW_OP (DW_OP_breg1, 0x71) +DW_OP (DW_OP_breg2, 0x72) +DW_OP (DW_OP_breg3, 0x73) +DW_OP (DW_OP_breg4, 0x74) +DW_OP (DW_OP_breg5, 0x75) +DW_OP (DW_OP_breg6, 0x76) +DW_OP (DW_OP_breg7, 0x77) +DW_OP (DW_OP_breg8, 0x78) +DW_OP (DW_OP_breg9, 0x79) +DW_OP (DW_OP_breg10, 0x7a) +DW_OP (DW_OP_breg11, 0x7b) +DW_OP (DW_OP_breg12, 0x7c) +DW_OP (DW_OP_breg13, 0x7d) +DW_OP (DW_OP_breg14, 0x7e) +DW_OP (DW_OP_breg15, 0x7f) +DW_OP (DW_OP_breg16, 0x80) +DW_OP (DW_OP_breg17, 0x81) +DW_OP (DW_OP_breg18, 0x82) +DW_OP (DW_OP_breg19, 0x83) +DW_OP (DW_OP_breg20, 0x84) +DW_OP (DW_OP_breg21, 0x85) +DW_OP (DW_OP_breg22, 0x86) +DW_OP (DW_OP_breg23, 0x87) +DW_OP (DW_OP_breg24, 0x88) +DW_OP (DW_OP_breg25, 0x89) +DW_OP (DW_OP_breg26, 0x8a) +DW_OP (DW_OP_breg27, 0x8b) +DW_OP (DW_OP_breg28, 0x8c) +DW_OP (DW_OP_breg29, 0x8d) +DW_OP (DW_OP_breg30, 0x8e) +DW_OP (DW_OP_breg31, 0x8f) +DW_OP (DW_OP_regx, 0x90) +DW_OP (DW_OP_fbreg, 0x91) +DW_OP (DW_OP_bregx, 0x92) +DW_OP (DW_OP_piece, 0x93) +DW_OP (DW_OP_deref_size, 0x94) +DW_OP (DW_OP_xderef_size, 0x95) +DW_OP (DW_OP_nop, 0x96) +/* DWARF 3 extensions. */ +DW_OP (DW_OP_push_object_address, 0x97) +DW_OP (DW_OP_call2, 0x98) +DW_OP (DW_OP_call4, 0x99) +DW_OP (DW_OP_call_ref, 0x9a) +DW_OP (DW_OP_form_tls_address, 0x9b) +DW_OP (DW_OP_call_frame_cfa, 0x9c) +DW_OP (DW_OP_bit_piece, 0x9d) + +/* DWARF 4 extensions. */ +DW_OP (DW_OP_implicit_value, 0x9e) +DW_OP (DW_OP_stack_value, 0x9f) + +/* DWARF 5 extensions. */ +DW_OP (DW_OP_implicit_pointer, 0xa0) +DW_OP (DW_OP_addrx, 0xa1) +DW_OP (DW_OP_constx, 0xa2) +DW_OP (DW_OP_entry_value, 0xa3) +DW_OP (DW_OP_const_type, 0xa4) +DW_OP (DW_OP_regval_type, 0xa5) +DW_OP (DW_OP_deref_type, 0xa6) +DW_OP (DW_OP_xderef_type, 0xa7) +DW_OP (DW_OP_convert, 0xa8) +DW_OP (DW_OP_reinterpret, 0xa9) + +DW_OP_DUP (DW_OP_lo_user, 0xe0) /* Implementation-defined range start. */ +DW_OP_DUP (DW_OP_hi_user, 0xff) /* Implementation-defined range end. */ + +/* GNU extensions. */ +DW_OP (DW_OP_GNU_push_tls_address, 0xe0) +/* The following is for marking variables that are uninitialized. */ +DW_OP (DW_OP_GNU_uninit, 0xf0) +DW_OP (DW_OP_GNU_encoded_addr, 0xf1) +/* The GNU implicit pointer extension. + See http://www.dwarfstd.org/ShowIssue.php?issue=100831.1&type=open . */ +DW_OP (DW_OP_GNU_implicit_pointer, 0xf2) +/* The GNU entry value extension. + See http://www.dwarfstd.org/ShowIssue.php?issue=100909.1&type=open . */ +DW_OP (DW_OP_GNU_entry_value, 0xf3) +/* The GNU typed stack extension. + See http://www.dwarfstd.org/doc/040408.1.html . */ +DW_OP (DW_OP_GNU_const_type, 0xf4) +DW_OP (DW_OP_GNU_regval_type, 0xf5) +DW_OP (DW_OP_GNU_deref_type, 0xf6) +DW_OP (DW_OP_GNU_convert, 0xf7) +DW_OP (DW_OP_GNU_reinterpret, 0xf9) +/* The GNU parameter ref extension. */ +DW_OP (DW_OP_GNU_parameter_ref, 0xfa) +/* Extensions for Fission. See http://gcc.gnu.org/wiki/DebugFission. */ +DW_OP (DW_OP_GNU_addr_index, 0xfb) +DW_OP (DW_OP_GNU_const_index, 0xfc) +/* The GNU variable value extension. + See http://dwarfstd.org/ShowIssue.php?issue=161109.2 . */ +DW_OP (DW_OP_GNU_variable_value, 0xfd) +/* HP extensions. */ +DW_OP_DUP (DW_OP_HP_unknown, 0xe0) /* Ouch, the same as GNU_push_tls_address. */ +DW_OP (DW_OP_HP_is_value, 0xe1) +DW_OP (DW_OP_HP_fltconst4, 0xe2) +DW_OP (DW_OP_HP_fltconst8, 0xe3) +DW_OP (DW_OP_HP_mod_range, 0xe4) +DW_OP (DW_OP_HP_unmod_range, 0xe5) +DW_OP (DW_OP_HP_tls, 0xe6) +/* PGI (STMicroelectronics) extensions. */ +DW_OP (DW_OP_PGI_omp_thread_num, 0xf8) +/* AARCH64 extensions. + DW_OP_AARCH64_operation takes one mandatory unsigned LEB128 operand. + Bits[6:0] of this operand is the action code, all others bits are initialized + to 0 except explicitly documented for one action. Please refer AArch64 DWARF + ABI documentation for details. */ +DW_OP (DW_OP_AARCH64_operation, 0xea) +DW_END_OP + +DW_FIRST_ATE (DW_ATE_void, 0x0) +DW_ATE (DW_ATE_address, 0x1) +DW_ATE (DW_ATE_boolean, 0x2) +DW_ATE (DW_ATE_complex_float, 0x3) +DW_ATE (DW_ATE_float, 0x4) +DW_ATE (DW_ATE_signed, 0x5) +DW_ATE (DW_ATE_signed_char, 0x6) +DW_ATE (DW_ATE_unsigned, 0x7) +DW_ATE (DW_ATE_unsigned_char, 0x8) +/* DWARF 3. */ +DW_ATE (DW_ATE_imaginary_float, 0x9) +DW_ATE (DW_ATE_packed_decimal, 0xa) +DW_ATE (DW_ATE_numeric_string, 0xb) +DW_ATE (DW_ATE_edited, 0xc) +DW_ATE (DW_ATE_signed_fixed, 0xd) +DW_ATE (DW_ATE_unsigned_fixed, 0xe) +DW_ATE (DW_ATE_decimal_float, 0xf) +/* DWARF 4. */ +DW_ATE (DW_ATE_UTF, 0x10) +/* DWARF 5. */ +DW_ATE (DW_ATE_UCS, 0x11) +DW_ATE (DW_ATE_ASCII, 0x12) + +DW_ATE_DUP (DW_ATE_lo_user, 0x80) +DW_ATE_DUP (DW_ATE_hi_user, 0xff) + +/* HP extensions. */ +DW_ATE (DW_ATE_HP_float80, 0x80) /* Floating-point (80 bit). */ +DW_ATE (DW_ATE_HP_complex_float80, 0x81) /* Complex floating-point (80 bit). */ +DW_ATE (DW_ATE_HP_float128, 0x82) /* Floating-point (128 bit). */ +DW_ATE (DW_ATE_HP_complex_float128, 0x83) /* Complex fp (128 bit). */ +DW_ATE (DW_ATE_HP_floathpintel, 0x84) /* Floating-point (82 bit IA64). */ +DW_ATE (DW_ATE_HP_imaginary_float80, 0x85) +DW_ATE (DW_ATE_HP_imaginary_float128, 0x86) +DW_ATE (DW_ATE_HP_VAX_float, 0x88) /* F or G floating. */ +DW_ATE (DW_ATE_HP_VAX_float_d, 0x89) /* D floating. */ +DW_ATE (DW_ATE_HP_packed_decimal, 0x8a) /* Cobol. */ +DW_ATE (DW_ATE_HP_zoned_decimal, 0x8b) /* Cobol. */ +DW_ATE (DW_ATE_HP_edited, 0x8c) /* Cobol. */ +DW_ATE (DW_ATE_HP_signed_fixed, 0x8d) /* Cobol. */ +DW_ATE (DW_ATE_HP_unsigned_fixed, 0x8e) /* Cobol. */ +DW_ATE (DW_ATE_HP_VAX_complex_float, 0x8f) /* F or G floating complex. */ +DW_ATE (DW_ATE_HP_VAX_complex_float_d, 0x90) /* D floating complex. */ + +DW_END_ATE + +DW_FIRST_CFA (DW_CFA_advance_loc, 0x40) +DW_CFA (DW_CFA_offset, 0x80) +DW_CFA (DW_CFA_restore, 0xc0) +DW_CFA (DW_CFA_nop, 0x00) +DW_CFA (DW_CFA_set_loc, 0x01) +DW_CFA (DW_CFA_advance_loc1, 0x02) +DW_CFA (DW_CFA_advance_loc2, 0x03) +DW_CFA (DW_CFA_advance_loc4, 0x04) +DW_CFA (DW_CFA_offset_extended, 0x05) +DW_CFA (DW_CFA_restore_extended, 0x06) +DW_CFA (DW_CFA_undefined, 0x07) +DW_CFA (DW_CFA_same_value, 0x08) +DW_CFA (DW_CFA_register, 0x09) +DW_CFA (DW_CFA_remember_state, 0x0a) +DW_CFA (DW_CFA_restore_state, 0x0b) +DW_CFA (DW_CFA_def_cfa, 0x0c) +DW_CFA (DW_CFA_def_cfa_register, 0x0d) +DW_CFA (DW_CFA_def_cfa_offset, 0x0e) +/* DWARF 3. */ +DW_CFA (DW_CFA_def_cfa_expression, 0x0f) +DW_CFA (DW_CFA_expression, 0x10) +DW_CFA (DW_CFA_offset_extended_sf, 0x11) +DW_CFA (DW_CFA_def_cfa_sf, 0x12) +DW_CFA (DW_CFA_def_cfa_offset_sf, 0x13) +DW_CFA (DW_CFA_val_offset, 0x14) +DW_CFA (DW_CFA_val_offset_sf, 0x15) +DW_CFA (DW_CFA_val_expression, 0x16) + +DW_CFA (DW_CFA_lo_user, 0x1c) +DW_CFA (DW_CFA_hi_user, 0x3f) + +/* SGI/MIPS specific. */ +DW_CFA (DW_CFA_MIPS_advance_loc8, 0x1d) +/* GNU extensions. + NOTE: DW_CFA_GNU_window_save is multiplexed on Sparc and AArch64. */ +DW_CFA (DW_CFA_GNU_window_save, 0x2d) +DW_CFA_DUP (DW_CFA_AARCH64_negate_ra_state, 0x2d) +DW_CFA (DW_CFA_GNU_args_size, 0x2e) +DW_CFA (DW_CFA_GNU_negative_offset_extended, 0x2f) + +DW_END_CFA + +/* Index attributes in the Abbreviations Table. */ +DW_FIRST_IDX (DW_IDX_compile_unit, 1) +DW_IDX (DW_IDX_type_unit, 2) +DW_IDX (DW_IDX_die_offset, 3) +DW_IDX (DW_IDX_parent, 4) +DW_IDX (DW_IDX_type_hash, 5) +DW_IDX_DUP (DW_IDX_lo_user, 0x2000) +DW_IDX (DW_IDX_hi_user, 0x3fff) +DW_IDX (DW_IDX_GNU_internal, 0x2000) +DW_IDX (DW_IDX_GNU_external, 0x2001) +DW_END_IDX diff --git a/support/sdbinutils/include/dwarf2.h b/support/sdbinutils/include/dwarf2.h new file mode 100644 index 0000000..cf0039a --- /dev/null +++ b/support/sdbinutils/include/dwarf2.h @@ -0,0 +1,542 @@ +/* Declarations and definitions of codes relating to the DWARF2 and + DWARF3 symbolic debugging information formats. + Copyright (C) 1992-2018 Free Software Foundation, Inc. + + Written by Gary Funck (gary@intrepid.com) The Ada Joint Program + Office (AJPO), Florida State University and Silicon Graphics Inc. + provided support for this effort -- June 21, 1995. + + Derived from the DWARF 1 implementation written by Ron Guilmette + (rfg@netcom.com), November 1990. + + This file is part of GCC. + + GCC 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. + + GCC 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. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +/* This file is derived from the DWARF specification (a public document) + Revision 2.0.0 (July 27, 1993) developed by the UNIX International + Programming Languages Special Interest Group (UI/PLSIG) and distributed + by UNIX International. Copies of this specification are available from + UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054. + + This file also now contains definitions from the DWARF 3 specification + published Dec 20, 2005, available from: http://dwarf.freestandards.org. */ + +#ifndef _DWARF2_H +#define _DWARF2_H + +#define DW_TAG(name, value) , name = value +#define DW_TAG_DUP(name, value) , name = value +#define DW_FORM(name, value) , name = value +#define DW_AT(name, value) , name = value +#define DW_AT_DUP(name, value) , name = value +#define DW_OP(name, value) , name = value +#define DW_OP_DUP(name, value) , name = value +#define DW_ATE(name, value) , name = value +#define DW_ATE_DUP(name, value) , name = value +#define DW_CFA(name, value) , name = value +#define DW_CFA_DUP(name, value) , name = value +#define DW_IDX(name, value) , name = value +#define DW_IDX_DUP(name, value) , name = value + +#define DW_FIRST_TAG(name, value) enum dwarf_tag { \ + name = value +#define DW_END_TAG }; +#define DW_FIRST_FORM(name, value) enum dwarf_form { \ + name = value +#define DW_END_FORM }; +#define DW_FIRST_AT(name, value) enum dwarf_attribute { \ + name = value +#define DW_END_AT }; +#define DW_FIRST_OP(name, value) enum dwarf_location_atom { \ + name = value +#define DW_END_OP }; +#define DW_FIRST_ATE(name, value) enum dwarf_type { \ + name = value +#define DW_END_ATE }; +#define DW_FIRST_CFA(name, value) enum dwarf_call_frame_info { \ + name = value +#define DW_END_CFA }; +#define DW_FIRST_IDX(name, value) enum dwarf_name_index_attribute { \ + name = value +#define DW_END_IDX }; + +#include "dwarf2.def" + +#undef DW_FIRST_TAG +#undef DW_END_TAG +#undef DW_FIRST_FORM +#undef DW_END_FORM +#undef DW_FIRST_AT +#undef DW_END_AT +#undef DW_FIRST_OP +#undef DW_END_OP +#undef DW_FIRST_ATE +#undef DW_END_ATE +#undef DW_FIRST_CFA +#undef DW_END_CFA +#undef DW_FIRST_IDX +#undef DW_END_IDX + +#undef DW_TAG +#undef DW_TAG_DUP +#undef DW_FORM +#undef DW_AT +#undef DW_AT_DUP +#undef DW_OP +#undef DW_OP_DUP +#undef DW_ATE +#undef DW_ATE_DUP +#undef DW_CFA +#undef DW_CFA_DUP +#undef DW_IDX +#undef DW_IDX_DUP + +/* Flag that tells whether entry has a child or not. */ +#define DW_children_no 0 +#define DW_children_yes 1 + +#define DW_AT_stride_size DW_AT_bit_stride /* Note: The use of DW_AT_stride_size is deprecated. */ +#define DW_AT_stride DW_AT_byte_stride /* Note: The use of DW_AT_stride is deprecated. */ + +/* Decimal sign encodings. */ +enum dwarf_decimal_sign_encoding + { + /* DWARF 3. */ + DW_DS_unsigned = 0x01, + DW_DS_leading_overpunch = 0x02, + DW_DS_trailing_overpunch = 0x03, + DW_DS_leading_separate = 0x04, + DW_DS_trailing_separate = 0x05 + }; + +/* Endianity encodings. */ +enum dwarf_endianity_encoding + { + /* DWARF 3. */ + DW_END_default = 0x00, + DW_END_big = 0x01, + DW_END_little = 0x02, + + DW_END_lo_user = 0x40, + DW_END_hi_user = 0xff + }; + +/* Array ordering names and codes. */ +enum dwarf_array_dim_ordering + { + DW_ORD_row_major = 0, + DW_ORD_col_major = 1 + }; + +/* Access attribute. */ +enum dwarf_access_attribute + { + DW_ACCESS_public = 1, + DW_ACCESS_protected = 2, + DW_ACCESS_private = 3 + }; + +/* Visibility. */ +enum dwarf_visibility_attribute + { + DW_VIS_local = 1, + DW_VIS_exported = 2, + DW_VIS_qualified = 3 + }; + +/* Virtuality. */ +enum dwarf_virtuality_attribute + { + DW_VIRTUALITY_none = 0, + DW_VIRTUALITY_virtual = 1, + DW_VIRTUALITY_pure_virtual = 2 + }; + +/* Case sensitivity. */ +enum dwarf_id_case + { + DW_ID_case_sensitive = 0, + DW_ID_up_case = 1, + DW_ID_down_case = 2, + DW_ID_case_insensitive = 3 + }; + +/* Calling convention. */ +enum dwarf_calling_convention + { + DW_CC_normal = 0x1, + DW_CC_program = 0x2, + DW_CC_nocall = 0x3, + + /* DWARF 5. */ + DW_CC_pass_by_reference = 0x4, + DW_CC_pass_by_value = 0x5, + + DW_CC_lo_user = 0x40, + DW_CC_hi_user = 0xff, + + DW_CC_GNU_renesas_sh = 0x40, + DW_CC_GNU_borland_fastcall_i386 = 0x41, + + /* This DW_CC_ value is not currently generated by any toolchain. It is + used internally to GDB to indicate OpenCL C functions that have been + compiled with the IBM XL C for OpenCL compiler and use a non-platform + calling convention for passing OpenCL C vector types. This value may + be changed freely as long as it does not conflict with any other DW_CC_ + value defined here. */ + DW_CC_GDB_IBM_OpenCL = 0xff + }; + +/* Inline attribute. */ +enum dwarf_inline_attribute + { + DW_INL_not_inlined = 0, + DW_INL_inlined = 1, + DW_INL_declared_not_inlined = 2, + DW_INL_declared_inlined = 3 + }; + +/* Discriminant lists. */ +enum dwarf_discrim_list + { + DW_DSC_label = 0, + DW_DSC_range = 1 + }; + +/* Line number opcodes. */ +enum dwarf_line_number_ops + { + DW_LNS_extended_op = 0, + DW_LNS_copy = 1, + DW_LNS_advance_pc = 2, + DW_LNS_advance_line = 3, + DW_LNS_set_file = 4, + DW_LNS_set_column = 5, + DW_LNS_negate_stmt = 6, + DW_LNS_set_basic_block = 7, + DW_LNS_const_add_pc = 8, + DW_LNS_fixed_advance_pc = 9, + /* DWARF 3. */ + DW_LNS_set_prologue_end = 10, + DW_LNS_set_epilogue_begin = 11, + DW_LNS_set_isa = 12 + }; + +/* Line number extended opcodes. */ +enum dwarf_line_number_x_ops + { + DW_LNE_end_sequence = 1, + DW_LNE_set_address = 2, + DW_LNE_define_file = 3, + DW_LNE_set_discriminator = 4, + /* HP extensions. */ + DW_LNE_HP_negate_is_UV_update = 0x11, + DW_LNE_HP_push_context = 0x12, + DW_LNE_HP_pop_context = 0x13, + DW_LNE_HP_set_file_line_column = 0x14, + DW_LNE_HP_set_routine_name = 0x15, + DW_LNE_HP_set_sequence = 0x16, + DW_LNE_HP_negate_post_semantics = 0x17, + DW_LNE_HP_negate_function_exit = 0x18, + DW_LNE_HP_negate_front_end_logical = 0x19, + DW_LNE_HP_define_proc = 0x20, + DW_LNE_HP_source_file_correlation = 0x80, + + DW_LNE_lo_user = 0x80, + DW_LNE_hi_user = 0xff + }; + +/* Sub-opcodes for DW_LNE_HP_source_file_correlation. */ +enum dwarf_line_number_hp_sfc_ops + { + DW_LNE_HP_SFC_formfeed = 1, + DW_LNE_HP_SFC_set_listing_line = 2, + DW_LNE_HP_SFC_associate = 3 + }; + +/* Content type codes in line table directory_entry_format + and file_name_entry_format sequences. */ +enum dwarf_line_number_content_type + { + DW_LNCT_path = 0x1, + DW_LNCT_directory_index = 0x2, + DW_LNCT_timestamp = 0x3, + DW_LNCT_size = 0x4, + DW_LNCT_MD5 = 0x5, + DW_LNCT_lo_user = 0x2000, + DW_LNCT_hi_user = 0x3fff + }; + +/* Type codes for location list entries. */ +enum dwarf_location_list_entry_type + { + DW_LLE_end_of_list = 0x00, + DW_LLE_base_addressx = 0x01, + DW_LLE_startx_endx = 0x02, + DW_LLE_startx_length = 0x03, + DW_LLE_offset_pair = 0x04, + DW_LLE_default_location = 0x05, + DW_LLE_base_address = 0x06, + DW_LLE_start_end = 0x07, + DW_LLE_start_length = 0x08, + + /* + has the proposal for now; only available to list members. + + A (possibly updated) copy of the proposal is available at + . */ + DW_LLE_GNU_view_pair = 0x09, +#define DW_LLE_view_pair DW_LLE_GNU_view_pair + + /* Former extension for Fission. + See http://gcc.gnu.org/wiki/DebugFission. */ + DW_LLE_GNU_end_of_list_entry = 0x00, + DW_LLE_GNU_base_address_selection_entry = 0x01, + DW_LLE_GNU_start_end_entry = 0x02, + DW_LLE_GNU_start_length_entry = 0x03 + }; + +#define DW_CIE_ID 0xffffffff +#define DW64_CIE_ID 0xffffffffffffffffULL +#define DW_CIE_VERSION 1 + +#define DW_CFA_extended 0 + +#define DW_CHILDREN_no 0x00 +#define DW_CHILDREN_yes 0x01 + +#define DW_ADDR_none 0 + +/* Source language names and codes. */ +enum dwarf_source_language + { + DW_LANG_C89 = 0x0001, + DW_LANG_C = 0x0002, + DW_LANG_Ada83 = 0x0003, + DW_LANG_C_plus_plus = 0x0004, + DW_LANG_Cobol74 = 0x0005, + DW_LANG_Cobol85 = 0x0006, + DW_LANG_Fortran77 = 0x0007, + DW_LANG_Fortran90 = 0x0008, + DW_LANG_Pascal83 = 0x0009, + DW_LANG_Modula2 = 0x000a, + /* DWARF 3. */ + DW_LANG_Java = 0x000b, + DW_LANG_C99 = 0x000c, + DW_LANG_Ada95 = 0x000d, + DW_LANG_Fortran95 = 0x000e, + DW_LANG_PLI = 0x000f, + DW_LANG_ObjC = 0x0010, + DW_LANG_ObjC_plus_plus = 0x0011, + DW_LANG_UPC = 0x0012, + DW_LANG_D = 0x0013, + /* DWARF 4. */ + DW_LANG_Python = 0x0014, + /* DWARF 5. */ + DW_LANG_OpenCL = 0x0015, + DW_LANG_Go = 0x0016, + DW_LANG_Modula3 = 0x0017, + DW_LANG_Haskell = 0x0018, + DW_LANG_C_plus_plus_03 = 0x0019, + DW_LANG_C_plus_plus_11 = 0x001a, + DW_LANG_OCaml = 0x001b, + DW_LANG_Rust = 0x001c, + DW_LANG_C11 = 0x001d, + DW_LANG_Swift = 0x001e, + DW_LANG_Julia = 0x001f, + DW_LANG_Dylan = 0x0020, + DW_LANG_C_plus_plus_14 = 0x0021, + DW_LANG_Fortran03 = 0x0022, + DW_LANG_Fortran08 = 0x0023, + DW_LANG_RenderScript = 0x0024, + + DW_LANG_lo_user = 0x8000, /* Implementation-defined range start. */ + DW_LANG_hi_user = 0xffff, /* Implementation-defined range start. */ + + /* MIPS. */ + DW_LANG_Mips_Assembler = 0x8001, + /* UPC. */ + DW_LANG_Upc = 0x8765, + /* HP extensions. */ + DW_LANG_HP_Bliss = 0x8003, + DW_LANG_HP_Basic91 = 0x8004, + DW_LANG_HP_Pascal91 = 0x8005, + DW_LANG_HP_IMacro = 0x8006, + DW_LANG_HP_Assembler = 0x8007, + + /* Rust extension, but replaced in DWARF 5. */ + DW_LANG_Rust_old = 0x9000 + }; + +/* Names and codes for macro information. */ +enum dwarf_macinfo_record_type + { + DW_MACINFO_define = 1, + DW_MACINFO_undef = 2, + DW_MACINFO_start_file = 3, + DW_MACINFO_end_file = 4, + DW_MACINFO_vendor_ext = 255 + }; + +/* DW_TAG_defaulted/DW_TAG_GNU_defaulted attributes. */ +enum dwarf_defaulted_attribute + { + DW_DEFAULTED_no = 0x00, + DW_DEFAULTED_in_class = 0x01, + DW_DEFAULTED_out_of_class = 0x02 + }; + +/* Names and codes for new style macro information. */ +enum dwarf_macro_record_type + { + DW_MACRO_define = 0x01, + DW_MACRO_undef = 0x02, + DW_MACRO_start_file = 0x03, + DW_MACRO_end_file = 0x04, + DW_MACRO_define_strp = 0x05, + DW_MACRO_undef_strp = 0x06, + DW_MACRO_import = 0x07, + DW_MACRO_define_sup = 0x08, + DW_MACRO_undef_sup = 0x09, + DW_MACRO_import_sup = 0x0a, + DW_MACRO_define_strx = 0x0b, + DW_MACRO_undef_strx = 0x0c, + DW_MACRO_lo_user = 0xe0, + DW_MACRO_hi_user = 0xff, + + /* Compatibility macros for the GNU .debug_macro extension. */ + DW_MACRO_GNU_define = 0x01, + DW_MACRO_GNU_undef = 0x02, + DW_MACRO_GNU_start_file = 0x03, + DW_MACRO_GNU_end_file = 0x04, + DW_MACRO_GNU_define_indirect = 0x05, + DW_MACRO_GNU_undef_indirect = 0x06, + DW_MACRO_GNU_transparent_include = 0x07, + /* Extensions for DWZ multifile. + See http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open . */ + DW_MACRO_GNU_define_indirect_alt = 0x08, + DW_MACRO_GNU_undef_indirect_alt = 0x09, + DW_MACRO_GNU_transparent_include_alt = 0x0a, + DW_MACRO_GNU_lo_user = 0xe0, + DW_MACRO_GNU_hi_user = 0xff + }; + +/* Range list entry kinds in .debug_rnglists* section. */ +enum dwarf_range_list_entry + { + DW_RLE_end_of_list = 0x00, + DW_RLE_base_addressx = 0x01, + DW_RLE_startx_endx = 0x02, + DW_RLE_startx_length = 0x03, + DW_RLE_offset_pair = 0x04, + DW_RLE_base_address = 0x05, + DW_RLE_start_end = 0x06, + DW_RLE_start_length = 0x07 + }; + +/* Unit types in unit_type unit header field. */ +enum dwarf_unit_type + { + DW_UT_compile = 0x01, + DW_UT_type = 0x02, + DW_UT_partial = 0x03, + DW_UT_skeleton = 0x04, + DW_UT_split_compile = 0x05, + DW_UT_split_type = 0x06, + DW_UT_lo_user = 0x80, + DW_UT_hi_user = 0xff + }; + +/* @@@ For use with GNU frame unwind information. */ + +#define DW_EH_PE_absptr 0x00 +#define DW_EH_PE_omit 0xff + +#define DW_EH_PE_uleb128 0x01 +#define DW_EH_PE_udata2 0x02 +#define DW_EH_PE_udata4 0x03 +#define DW_EH_PE_udata8 0x04 +#define DW_EH_PE_sleb128 0x09 +#define DW_EH_PE_sdata2 0x0A +#define DW_EH_PE_sdata4 0x0B +#define DW_EH_PE_sdata8 0x0C +#define DW_EH_PE_signed 0x08 + +#define DW_EH_PE_pcrel 0x10 +#define DW_EH_PE_textrel 0x20 +#define DW_EH_PE_datarel 0x30 +#define DW_EH_PE_funcrel 0x40 +#define DW_EH_PE_aligned 0x50 + +#define DW_EH_PE_indirect 0x80 + +/* Codes for the debug sections in a dwarf package (.dwp) file. + Extensions for Fission. See http://gcc.gnu.org/wiki/DebugFissionDWP. */ +enum dwarf_sect + { + DW_SECT_INFO = 1, + DW_SECT_TYPES = 2, + DW_SECT_ABBREV = 3, + DW_SECT_LINE = 4, + DW_SECT_LOC = 5, + DW_SECT_STR_OFFSETS = 6, + DW_SECT_MACINFO = 7, + DW_SECT_MACRO = 8, + DW_SECT_MAX = 8 + }; + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Return the name of a DW_TAG_ constant, or NULL if the value is not + recognized. */ +extern const char *get_DW_TAG_name (unsigned int tag); + +/* Return the name of a DW_AT_ constant, or NULL if the value is not + recognized. */ +extern const char *get_DW_AT_name (unsigned int attr); + +/* Return the name of a DW_FORM_ constant, or NULL if the value is not + recognized. */ +extern const char *get_DW_FORM_name (unsigned int form); + +/* Return the name of a DW_OP_ constant, or NULL if the value is not + recognized. */ +extern const char *get_DW_OP_name (unsigned int op); + +/* Return the name of a DW_ATE_ constant, or NULL if the value is not + recognized. */ +extern const char *get_DW_ATE_name (unsigned int enc); + +/* Return the name of a DW_CFA_ constant, or NULL if the value is not + recognized. */ +extern const char *get_DW_CFA_name (unsigned int opc); + +/* Return the name of a DW_IDX_ constant, or NULL if the value is not + recognized. */ +extern const char *get_DW_IDX_name (unsigned int idx); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _DWARF2_H */ diff --git a/support/sdbinutils/include/dyn-string.h b/support/sdbinutils/include/dyn-string.h new file mode 100644 index 0000000..fb2f2a7 --- /dev/null +++ b/support/sdbinutils/include/dyn-string.h @@ -0,0 +1,72 @@ +/* An abstract string datatype. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + Contributed by Mark Mitchell (mark@markmitchell.com). + +This file is part of GCC. + +GCC 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, or (at your option) +any later version. + +GCC 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 GCC; see the file COPYING. If not, write to +the Free Software Foundation, 51 Franklin Street - Fifth Floor, +Boston, MA 02110-1301, USA. */ + +#ifndef DYN_STRING_H +#define DYN_STRING_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct dyn_string +{ + int allocated; /* The amount of space allocated for the string. */ + int length; /* The actual length of the string. */ + char *s; /* The string itself, NUL-terminated. */ +}* dyn_string_t; + +/* The length STR, in bytes, not including the terminating NUL. */ +#define dyn_string_length(STR) \ + ((STR)->length) + +/* The NTBS in which the contents of STR are stored. */ +#define dyn_string_buf(STR) \ + ((STR)->s) + +/* Compare DS1 to DS2 with strcmp. */ +#define dyn_string_compare(DS1, DS2) \ + (strcmp ((DS1)->s, (DS2)->s)) + + +extern int dyn_string_init (struct dyn_string *, int); +extern dyn_string_t dyn_string_new (int); +extern void dyn_string_delete (dyn_string_t); +extern char *dyn_string_release (dyn_string_t); +extern dyn_string_t dyn_string_resize (dyn_string_t, int); +extern void dyn_string_clear (dyn_string_t); +extern int dyn_string_copy (dyn_string_t, dyn_string_t); +extern int dyn_string_copy_cstr (dyn_string_t, const char *); +extern int dyn_string_prepend (dyn_string_t, dyn_string_t); +extern int dyn_string_prepend_cstr (dyn_string_t, const char *); +extern int dyn_string_insert (dyn_string_t, int, dyn_string_t); +extern int dyn_string_insert_cstr (dyn_string_t, int, const char *); +extern int dyn_string_insert_char (dyn_string_t, int, int); +extern int dyn_string_append (dyn_string_t, dyn_string_t); +extern int dyn_string_append_cstr (dyn_string_t, const char *); +extern int dyn_string_append_char (dyn_string_t, int); +extern int dyn_string_substring (dyn_string_t, dyn_string_t, int, int); +extern int dyn_string_eq (dyn_string_t, dyn_string_t); + +#ifdef __cplusplus +} +#endif + +#endif /* !defined (DYN_STRING_H) */ diff --git a/support/sdbinutils/include/elf/ChangeLog-0415 b/support/sdbinutils/include/elf/ChangeLog-0415 new file mode 100644 index 0000000..e95e96d --- /dev/null +++ b/support/sdbinutils/include/elf/ChangeLog-0415 @@ -0,0 +1,2348 @@ +2015-12-24 Thomas Preud'homme + + * arm.h (TAG_CPU_ARCH_V8M_BASE): Declare. + +2015-12-24 Thomas Preud'homme + + * arm.h (TAG_CPU_ARCH_V8M_MAIN): Declare. + (MAX_TAG_CPU_ARCH): Define to TAG_CPU_ARCH_V8M_MAIN. + (TAG_CPU_ARCH_V4T_PLUS_V6_M): Define to unused value 15. + +2015-12-22 Mickael Guene + + * arm.h: Add arm SHF_ARM_NOREAD section flag. + +2015-12-16 Mickael Guene + + * arm.h: Add new arm relocations. + +2015-12-14 Yoshinori Sato + + * rx.h (E_FLAG_RX_V2): New RXv2 type. + +2015-12-07 Alan Modra + + * ppc64.h (R_PPC64_ENTRY): Define. + +2015-11-11 Alan Modra + Peter Bergner + + * ppc.h (R_PPC_REL16DX_HA): New reloction. + * ppc64.h (R_PPC64_REL16DX_HA): Likewise. + +2015-10-28 Cupertino Miranda + + * arc-reloc.def (ARC_32_PCREL): New definition. + (ARC_TLS_DTPOFF): Arrange it in order. + +2015-10-27 Stephen Fisher + + * common.h (NT_NETBSD_MARCH): Define. + +2015-10-22 H.J. Lu + + * x86-64.h (R_X86_64_GOTPCRELX): New. + (R_X86_64_REX_GOTPCRELX): Likewise. + +2015-10-22 H.J. Lu + + * i386.h (R_386_GOT32X): New relocation. + +2015-10-07 Cupertino Miranda + + * arc-reloc.def: Macro file with definition of all relocation + types. + * arc.h: Changed macros for the newly supported ARC cpus. Altered + enum defining the supported relocations. + * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added + macro for EM_ARC_COMPACT2. + +2015-09-22 Rainer Orth + + * common.h (DF_1_STUB, DF_1_PIE): Define. + +2015-09-21 H.J. Lu + + * external.h (Elf64_External_Chdr): Change ch_type to 4 bytes + and add ch_reserved. + +2015-08-11 Jiong Wang + + * aarch64.h (R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12): Define. + +2015-08-11 Jiong Wang + + * aarch64.h (R_AARCH64_P32_TLSLD_ADD_LO12_NC): Define. + +2015-08-11 Jiong Wang + + * aarch64.h (R_AARCH64_P32_TLSLD_ADR_PAGE21): Define. + +2015-07-16 Jiong Wang + + * aarch64.h (R_AARCH64_P32_TLSLD_ADR_PREL21): New enumeration. + +2015-07-09 Catherine Moore + + * mips.h (Val_GNU_MIPS_ABI_FP_NAN2008): New. + +2015-07-08 Pitchumani Sivanupandi + + * avr.h: Add new 32 bit PC relative relocation. + +2015-07-01 Sandra Loosemore + Cesar Philippidis + + * nios2.h (R_NIOS2_R2_S12): New. + (R_NIOS2_R2_I10_1_PCREL): New. + (R_NIOS2_R2_T1I7_1_PCREL): New. + (R_NIOS2_R2_T1I7_2): New. + (R_NIOS2_R2_T2I4): New. + (R_NIOS2_R2_T2I4_1): New. + (R_NIOS2_R2_T2I4_2): New. + (R_NIOS2_R2_X1I7_2): New. + (R_NIOS2_R2_X2L5): New. + (R_NIOS2_R2_F1I5_2): New. + (R_NIOS2_R2_L5I4X1): New. + (R_NIOS2_R2_T1X1I6): New. + (R_NIOS2_R2_T1X1I6_2): New. + (R_NIOS2_ILLEGAL): Renumber. + +2015-07-01 Sandra Loosemore + Cesar Philippidis + + * nios2.h (EF_NIOS2_ARCH_R1, EF_NIOS2_ARCH_R2): Define. + +2015-06-26 Matthew Fortune + + * mips.h (DT_MIPS_RLD_MAP_REL): New macro. + +2015-05-29 Roland McGrath + + * common.h (GNU_ABI_TAG_SYLLABLE): New macro. + (GNU_ABI_TAG_NACL): New macro. + +2015-05-12 Jiong Wang + + * aarch64.h (R_AARCH64_P32_LD32_GOTPAGE_LO14): New enumeration. + +2015-05-11 H.J. Lu + + * common.h (EM_486): Renamed to ... + (EM_IAMCU): This. + +2015-04-27 Andreas Krebbel + + * s390.h: Define Tag_GNU_S390_ABI_Vector. + +2015-04-24 Alan Modra + + * internal.h (ELF_SECTION_IN_SEGMENT_1): Ensure PT_LOAD and + similar segments only contain alloc sections. + +2015-04-24 H.J. Lu + + PR binutils/18316 + * mep.h (SEC_MEP_VLIW): Removed. + +2015-04-09 Nick Clifton + + * rx.h (E_FLAG_RX_SINSNS_SET): New bit in e_flags field. + (E_FLAG_RX_SINSNS_YES): Likewise. + (E_FLAG_RX_SINSNS_MASK): New define. + +2015-04-03 H.J. Lu + + * external.h (Elf32_External_Chdr): New. + (Elf64_External_Chdr): Likewise. + * internal.h (Elf_Internal_Chdr): Likewise. + +2015-03-26 H.J. Lu + + * common.h (ELFOSABI_CLOUDABI): New. + (SHF_COMPRESSED): Likewise. + (ELFCOMPRESS_ZLIB): Likewise. + (ELFCOMPRESS_LOOS): Likewise. + (ELFCOMPRESS_HIOS): Likewise. + (ELFCOMPRESS_LOPROC): Likewise. + (ELFCOMPRESS_HIPROC): Likewise. + +2015-03-19 Nick Clifton + + * rl78.h (E_FLAG_RL78_G10): Redefine. + (E_FLAG_RL78_CPU_MASK, E_FLAG_RL78_ANY_CPU, E_FLAG_RL78_G13 + E_FLAG_RL78_G14): New flags. + +2015-03-10 Matthew Wahab + + PR ld/16572 + * arm.h (EF_ARM_HASENTRY): Remove. + +2015-02-19 Marcus Shawcroft + + * aarch64.h (R_AARCH64_P32_TLSGD_ADR_PREL21): Add. + +2015-02-24 Nick Clifton + + * v850.h (EF_RH850_SIMD): Delete deprecated flag. + (EF_RH850_CACHE): Likewise. + (EF_RH850_MMU): Likewise. + (EF_RH850_DATA_ALIGN8): Likewise. + (SHT_RENESAS_IOP): Fix typo in name. + (SHT_RENESAS_INFO): Define. + (V850_NOTE_SECNAME): Define. + (SIZEOF_V850_NOTE): Define. + (V850_NOTE_NAME): Define. + (enum v850_notes): New enum. + (NUM_V850_NOTES): Define. + +2015-02-23 Nick Clifton + + PR 17915 + * score.h: Fix typo in license header. + +2015-02-20 Andreas Arnez + + * common.h (NT_S390_VXRS_LOW): New macro. + (NT_S390_VXRS_HIGH): Likewise. + +2015-01-28 James Bowman + + * common.h (EM_FT32): Define. + * ft32.h: New file. + +2015-01-09 Anthony Green + + * common.h (EM_MOXIE): Redefine to official number. + (EM_MOXIE_OLD): Define (from old number). + +2015-01-01 Alan Modra + + Update year range in copyright notice of all files. + +2014-12-25 Thomas Preud'homme + + * arm.h: New AEABI_FP_number_model_* and AEABI_VFP_args_* enum values. + +2014-12-06 Eric Botcazou + + * common.h (EM_VISIUM): Define. + * visium.h: New file. + +2014-11-13 H.J. Lu + + * x86-64.h (R_X86_64_GOTPLT64): Mark it obsolete. + +2014-10-30 Andrew Pinski + + * mips.h (AFL_EXT_OCTEON3): Define. + (INSN_OCTEON3, CPU_OCTEON3): Define. + +2014-10-22 Matthew Fortune + + * mips.h (AFL_ASE_MASK): Define. + +2014-10-17 Jose E. Marchesi + + * sparc.h (ELF_SPARC_HWCAP2_VIS3B): Documentation improved. + +2014-10-09 Jose E. Marchesi + + * sparc.h (Tag_GNU_Sparc_HWCAPS2): New object attribute. + (ELF_SPARC_HWCAP2_FJATHPLUS): New HWCAP2 bitmask value. + (ELF_SPARC_HWCAP2_VIS3B): Likewise. + (ELF_SPARC_HWCAP2_ADP): Likewise. + (ELF_SPARC_HWCAP2_SPARC5): Likewise. + (ELF_SPARC_HWCAP2_MWAIT): Likewise. + (ELF_SPARC_HWCAP2_XMPMUL): Likewise. + (ELF_SPARC_HWCAP2_XMONT): Likewise. + (ELF_SPARC_HWCAP2_NSEC): Likewise. + (ELF_SPARC_HWCAP2_FJATHHPC): Likewise. + (ELF_SPARC_HWCAP2_FJDES): Likewise. + (ELF_SPARC_HWCAP2_FJAES): Likewise. + +2014-10-08 Will Newton + + * aarch64.h: Sync up relocations with ABI release 1.0. + +2014-09-16 Kuan-Lin Chen + + * nds32.h: Declare new relocations. + +2014-09-15 Andrew Bennett + Matthew Fortune + + * mips.h: Add relocs: R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3, + R_MIPS_PC19_S2, R_MIPS_PCHI16 and R_MIPS_PCLO16. + (E_MIPS_ARCH_32R6): New define. + (E_MIPS_ARCH_64R6): New define. + +2014-08-26 DJ Delorie + + * rl78.h (RL78_RELAXA_MASK): New. Relax types are enums, not bits + +2014-07-29 Matthew Fortune + + * mips.h (PT_MIPS_ABIFLAGS, SHT_MIPS_ABIFLAGS): Define. + (Val_GNU_MIPS_ABI_FP_OLD_64): Rename from Val_GNU_MIPS_ABI_FP_64. + (Val_GNU_MIPS_ABI_FP_64): Redefine. + (Val_GNU_MIPS_ABI_FP_XX): Define. + (Elf_External_ABIFlags_v0, Elf_Internal_ABIFlags_v0): New structures. + (AFL_REG_NONE, AFL_REG_32, AFL_REG_64, AFL_REG_128): Define. + (AFL_ASE_DSP, AFL_ASE_DSPR2, AFL_ASE_EVA, AFL_ASE_MCU): Likewise. + (AFL_ASE_MDMX, AFL_ASE_MIPS3D, AFL_ASE_MT, AFL_ASE_SMARTMIPS): Likewise. + (AFL_ASE_VIRT, AFL_ASE_MSA, AFL_ASE_MIPS16): Likewise. + (AFL_ASE_MICROMIPS, AFL_ASE_XPA): Likewise. + (AFL_EXT_XLR, AFL_EXT_OCTEON2, AFL_EXT_OCTEONP): Likewise. + (AFL_EXT_LOONGSON_3A, AFL_EXT_OCTEON, AFL_EXT_5900): Likewise. + (AFL_EXT_4650, AFL_EXT_4010, AFL_EXT_4100, AFL_EXT_3900): Likewise. + (AFL_EXT_10000, AFL_EXT_SB1, AFL_EXT_4111, AFL_EXT_4120): Likewise. + (AFL_EXT_5400, AFL_EXT_5500, AFL_EXT_LOONGSON_2E): Likewise. + (AFL_EXT_LOONGSON_2F): Likewise. + (bfd_mips_elf_swap_abiflags_v0_in): Prototype. + (bfd_mips_elf_swap_abiflags_v0_out): Likewise. + (bfd_mips_isa_ext): Likewise. + +2014-07-07 Barney Stratford + + * avr.h: Add R_AVR_PORT5 and R_AVR_PORT6. + +2014-07-01 Barney Stratford + Senthil Kumar Selvaraj + Pitchumani Sivanupandi + Soundararajan + + * avr.h (E_AVR_MACH_AVRTINY): Define avrtiny machine number. + (R_AVR_LDS_STS_16): Define 16 bit lds/sts reloc number. + * include/opcode/avr.h (AVR_ISA_TINY): Define avrtiny specific ISA. + (AVR_ISA_2xxxa): Define ISA without LPM. + (AVR_ISA_AVRTINY): Define avrtiny arch ISA. + Add doc for contraint used in 16 bit lds/sts. + Adjust ISA group for icall, ijmp, pop and push. + Add 16 bit lds/sts encoding and update 32 bit lds/sts constraints. + +2014-04-22 Christian Svensson + + * common.h: Remove openrisc and or32 support. Add support for or1k. + * or1k.h: New file. + * openrisc.h: Delete. + * or32.h: Delete. + +2014-04-10 Senthil Kumar Selvaraj + + * avr.h: Add new DIFF relocs. + +2014-03-05 Alan Modra + + Update copyright years. + +2014-03-05 Alan Modra + + * ppc64.h (R_PPC64_REL24_NOTOC, R_PPC64_ADDR64_LOCAL): Define. + +2014-02-06 Andrew Pinski + + * mips.h (E_MIPS_MACH_OCTEON3): New machine flag. + +2014-02-03 Sandra Loosemore + + * nios2.h (R_NIOS2_GOT_LO, R_NIOS2_GOT_HA): New. + (R_NIOS2_CALL_LO, R_NIOS2_CALL_HA): New. + (R_NIOS2_ILLEGAL): Adjust. + +2014-01-30 Sandra Loosemore + + * nios2.h (elf_nios2_reloc_type): Add R_NIOS2_CALL26_NOAT. + +2014-01-30 Ulrich Weigand + + * common.h (AT_HWCAP2): Define. + +2013-12-13 Kuan-Lin Chen + Wei-Cheng Wang + + * nds32.h: New file for Andes NDS32. + +2013-12-07 Mike Frysinger + + * epiphany.h: Remove +x file mode. + +2013-11-17 H.J. Lu + + * x86-64.h: Add R_X86_64_PC32_BND and R_X86_64_PLT32_BND. + +2013-11-13 Yufeng Zhang + + * aarch64.h: Define R_AARCH64_TLS_DTPMOD64, + R_AARCH64_TLS_DTPREL64 and R_AARCH64_TLS_TPREL64; guard + R_AARCH64_TLS_DTPMOD, R_AARCH64_TLS_DTPREL and + R_AARCH64_TLS_TPREL with RELOC_MACROS_GEN_FUNC. + +2013-10-30 Alan Modra + + * ppc.h (DT_PPC_TLSOPT): Delete. + (DT_PPC_OPT, PPC_OPT_TLS): Define. + * ppc64.h (DT_PPC64_TLSOPT): Delete. + (DT_PPC64_OPT, PPC64_OPT_TLS, PPC64_OPT_MULTI_TOC): Define. + +2013-10-30 Alan Modra + + * ppc64.h (STO_PPC64_LOCAL_BIT, STO_PPC64_LOCAL_MASK): Define. + (ppc64_decode_local_entry, ppc64_encode_local_entry): New functions. + (PPC64_LOCAL_ENTRY_OFFSET, PPC64_SET_LOCAL_ENTRY_OFFSET): Define. + +2013-10-30 Alan Modra + + * ppc64.h (EF_PPC64_ABI): Define. + +2013-10-30 Alan Modra + + * ppc64.h (R_PPC64_ADDR16_HIGH, R_PPC64_ADDR16_HIGHA, + R_PPC64_TPREL16_HIGH, R_PPC64_TPREL16_HIGHA, + R_PPC64_DTPREL16_HIGH, R_PPC64_DTPREL16_HIGHA): New. + (IS_PPC64_TLS_RELOC): Match new tls relocs. + +2013-10-14 Chao-ying Fu + + * mips.h (enum): Add Tag_GNU_MIPS_ABI_MSA. + (enum): Add Val_GNU_MIPS_ABI_MSA_ANY and Val_GNU_MIPS_ABI_MSA_128. + +2013-09-17 Doug Gilmore + + * mips.h (EF_MIPS_FP64): New e_flags bit. + +2013-08-09 Nick Clifton + + * rl78.c (E_FLAG_RL78_G10): Define. + +2013-07-15 Maciej W. Rozycki + + * mips.h (Tag_GNU_MIPS_ABI_FP): Remove comment. + (Val_GNU_MIPS_ABI_FP_ANY, Val_GNU_MIPS_ABI_FP_DOUBLE, + Val_GNU_MIPS_ABI_FP_SINGLE, Val_GNU_MIPS_ABI_FP_SOFT, + Val_GNU_MIPS_ABI_FP_64): New enum. + +2013-07-12 Maciej W. Rozycki + + * mips.h (EF_MIPS_NAN2008): New macro. + +2013-07-08 Tristan Gingold + + * ia64.h (STB_VMS_WEAK, STB_VMS_SYSTEM): Add. + +2013-07-05 Andreas Krebbel + + * s390.h: Add new relocs R_390_PC12DBL, R_390_PLT12DBL, + R_390_PC24DBL, and R_390_PLT24DBL. + +2013-06-26 Yufeng Zhang + + * aarch64.h: Add ELF32 reloc codes and remove fake ELF64 ones. + +2013-06-24 Maciej W. Rozycki + + * mips.h (ELF_ST_IS_MIPS_PLT): Respect STO_MIPS16 setting. + (ELF_ST_SET_MIPS_PLT): Likewise. + +2013-06-19 Will Newton + + * aarch64.h: Remove R_AARCH64_IRELATIVE. + +2013-06-07 Will Newton + + * aarch64.h: Add R_AARCH64_IRELATIVE reloc. + +2013-06-06 Maciej W. Rozycki + + * mips.h (ELF_ST_SET_MIPS_PIC): Clear any STO_MIPS16 setting. + +2013-05-30 Paul Brook + + * mips.h (R_MIPS_EH): New. + +2013-05-28 Yufeng Zhang + + * aarch64.h (R_AARCH64_TLSDESC_LD64_PREL19): Rename to ... + (R_AARCH64_TLSDESC_LD_PREL19): ... this. + (R_AARCH64_TLSDESC_ADR_PAGE): Rename to ... + (R_AARCH64_TLSDESC_ADR_PAGE21): ... this. + +2013-05-22 H.J. Lu + + * common.h (EM_INTEL205): New. + (EM_INTEL206): Likewise. + (EM_INTEL207): Likewise. + (EM_INTEL208): Likewise. + (EM_INTEL209): Likewise. + +2013-05-06 Paul Brook + + * mips.h (R_MIPS_PC32): Update comment. + +2013-05-02 Nick Clifton + + * msp430.h: Add MSP430X relocs. + Add some more MSP430 machine numbers. + Add values used by .MSP430.attributes section. + +2013-03-21 Michael Schewe + + * h8.h: Add new reloc R_H8_DISP32A16 for relaxation of + mov @(disp:32,ERx) to mov @(disp:16,ERx). + +2013-03-08 Andreas Arnez + + * common.h (NT_S390_TDB): Define. + +2013-02-06 Sandra Loosemore + Andrew Jenner + + Based on patches from Altera Corporation. + + * nios2.h: New file. + +2013-01-24 Nick Clifton + + * v850.h: Add support for e3v5 architecture. + Reorganize processor selection macros. + +2013-01-16 H.J. Lu + + * i386.h (R_386_SIZE32): Fill it. + * x86-64.h (R_X86_64_SIZE32): Likewise. + (R_X86_64_SIZE64): Likewise. + +2013-01-10 Will Newton + + * common.h: Fix case of "Meta". + * metag.h: New file. + +2013-01-08 Yufeng Zhang + + * common.h (NT_ARM_TLS, NT_ARM_HW_BREAK, NT_ARM_HW_WATCH): New macro + definitions. + +2013-01-04 Juergen Urban + + * mips.h: Add MIPS machine variant number for r5900 which is + compatible with old Playstation 2 software. + +2012-12-11 Edgar E. Iglesias + + * microblaze.h: Add TLS relocs to START_RELOC_NUMBERS + +2012-11-16 H.J. Lu + + * common.h (DF_1_CONLFAT): Renamed to ... + (DF_1_CONFALT): This. + (DF_1_ENDFILTEE): New. + (DF_1_DISPRELDNE): Likewise. + (DF_1_DISPRELPND): Likewise. + (DF_1_NODIRECT): Likewise. + (DF_1_IGNMULDEF): Likewise. + (DF_1_NOKSYMS): Likewise. + (DF_1_NOHDR): Likewise. + (DF_1_EDITED): Likewise. + (DF_1_NORELOC): Likewise. + (DF_1_SYMINTPOSE): Likewise. + (DF_1_GLOBAUDIT): Likewise. + (DF_1_SINGLETON): Likewise. + +2012-11-09 Nick Clifton + + * rx.h (EF_RX_CPU_RX): Add comment. + (E_FLAG_RX_ABI): Define. + + * v850.h: Add RH850 ABI values. + +2012-11-08 Maciej W. Rozycki + + * mips.h (EF_MIPS_32BITMODE): Move next to lower-order bits. + +2012-11-01 Tom Tromey + + * common.h (NT_386_TLS, NT_386_IOPERM): New defines. + +2012-10-30 Steve McIntyre + + * arm.h (EF_ARM_ABI_FLOAT_SOFT): New define. + (EF_ARM_ABI_FLOAT_HARD): Likewise. + +2012-10-23 Tom Tromey + + * common.h (NT_SIGINFO, NT_FILE): New defines. + +2012-09-12 Chris Schlumberger-Socha + + * aarch64.h (R_AARCH64_GOT_LD_PREL19): New reloc. + +2012-08-27 Walter Lee + + * tilegx.h (R_TILEGX_IMM16_X0_HW0_PLT_PCREL): New relocation. + (R_TILEGX_IMM16_X1_HW0_PLT_PCREL): Ditto. + (R_TILEGX_IMM16_X0_HW1_PLT_PCREL): Ditto. + (R_TILEGX_IMM16_X1_HW1_PLT_PCREL): Ditto. + (R_TILEGX_IMM16_X0_HW2_PLT_PCREL): Ditto. + (R_TILEGX_IMM16_X1_HW2_PLT_PCREL): Ditto. + (R_TILEGX_IMM16_X0_HW3_PLT_PCREL): Ditto. + (R_TILEGX_IMM16_X1_HW3_PLT_PCREL): Ditto. + (R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL): Ditto. + (R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL): Ditto. + (R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL): Ditto. + (R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL): Ditto. + (R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL ): Ditto. + (R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): Ditto. + +2012-08-24 Matthew Gretton-Dann + + * arm.h (TAG_CPU_ARCH_V8): New define. + (MAX_TAG_CPU_ARCH): Update. + +2012-08-13 Ian Bolton + Laurent Desnogues + Jim MacArthur + Marcus Shawcroft + Nigel Stephens + Ramana Radhakrishnan + Richard Earnshaw + Sofiane Naci + Tejas Belagod + Yufeng Zhang + + * aarch64.h: New file. + * common.h (EM_res183): Rename to EM_AARCH64. + (EM_res184): Rename to EM_ARM184. + +2012-08-02 Sean Keys + + * m68hc11.h: #define E_M68HC11_NO_BANK_WARNING 0x000000200 + +2012-07-13 Andreas Krebbel + + * s390.h (START_RELOC_NUMBERS): Define R_390_IRELATIVE reloc. + +2012-06-28 Iain Sandoe + + * common.h (AT_L1I_CACHESHAPE, AT_L1D_CACHESHAPE, + AT_L2_CACHESHAPE, AT_L3_CACHESHAPE): New defines. + +2012-05-16 Georg-Johann Lay + + PR target/13503 + * avr.h (RELOC_NUMBERS): Rename R_AVR_8_HHI8 to R_AVR_8_HLO8. + +2012-05-15 James Murray + + * m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10) + R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations. + (E_M68HC11_XGATE_RAMOFFSET): Define. + +2012-05-14 James Lemke + * ppc.h (SEC_PPC_VLE): Remove. + +2012-05-14 Catherine Moore + James Lemke + + * ppc.h (R_PPC_VLE_REL8): New reloction. + (R_PPC_VLE_REL15): Likewise. + (R_PPC_VLE_REL24): Likewise. + (R_PPC_VLE_LO16A): Likewise. + (R_PPC_VLE_LO16D): Likewise. + (R_PPC_VLE_HI16A): Likewise. + (R_PPC_VLE_HI16D): Likewise. + (R_PPC_VLE_HA16A): Likewise. + (R_PPC_VLE_HA16D): Likewise. + (R_PPC_VLE_SDA21): Likewise. + (R_PPC_VLE_SDA21_LO): Likewise. + (R_PPC_VLE_SDAREL_LO16A): Likewise. + (R_PPC_VLE_SDAREL_LO16D): Likewise. + (R_PPC_VLE_SDAREL_HI16A): Likewise. + (R_PPC_VLE_SDAREL_HI16D): Likewise. + (R_PPC_VLE_SDAREL_HA16A): Likewise. + (R_PPC_VLE_SDAREL_HA16D): Likewise. + (SEC_PPC_VLE): Remove. + (PF_PPC_VLE): New program header flag. + (SHF_PPC_VLE): New section header flag. + (vle_opcodes, vle_num_opcodes): New. + (VLE_OP): New macro. + (VLE_OP_TO_SEG): New macro. + +2012-05-11 Georg-Johann Lay + + * xgate.h: Mininal file to support XGATE relocations. + +2012-04-27 David S. Miller + + * sparc.h: Add new ELF_SPARC_HWCAP_* defines for crypto, + pause, and compare-and-branch instructions. + +2012-04-12 David S. Miller + + * sparc.h (R_SPARC_WDISP10): New reloc. + +2012-03-07 Nick Clifton + + * mn10300.h (elf_mn10300_reloc_type): Add R_MN10300_TLS_GD, + R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE, + R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD, + R_MN10300_TLS_DTPOFF and R_MN10300_TLS_TPOFF. + +2012-02-25 Walter Lee + + * tilegx.h (R_TILEGX_IMM16_X0_HW1_GOT): Delete. + (R_TILEGX_IMM16_X1_HW1_GOT): Ditto. + (R_TILEGX_IMM16_X0_HW2_GOT): Ditto. + (R_TILEGX_IMM16_X1_HW2_GOT): Ditto. + (R_TILEGX_IMM16_X0_HW3_GOT): Ditto. + (R_TILEGX_IMM16_X1_HW3_GOT): Ditto. + (R_TILEGX_IMM16_X0_HW2_LAST_GOT): Ditto. + (R_TILEGX_IMM16_X1_HW2_LAST_GOT): Ditto. + (R_TILEGX_IMM16_X0_HW1_TLS_GD): Ditto. + (R_TILEGX_IMM16_X1_HW1_TLS_GD): Ditto. + (R_TILEGX_IMM16_X0_HW2_TLS_GD): Ditto. + (R_TILEGX_IMM16_X1_HW2_TLS_GD): Ditto. + (R_TILEGX_IMM16_X0_HW3_TLS_GD): Ditto. + (R_TILEGX_IMM16_X1_HW3_TLS_GD): Ditto. + (R_TILEGX_IMM16_X0_HW2_LAST_TLS_GD): Ditto. + (R_TILEGX_IMM16_X1_HW2_LAST_TLS_GD): Ditto. + (R_TILEGX_IMM16_X0_HW1_TLS_IE): Ditto. + (R_TILEGX_IMM16_X1_HW1_TLS_IE): Ditto. + (R_TILEGX_IMM16_X0_HW2_TLS_IE): Ditto. + (R_TILEGX_IMM16_X1_HW2_TLS_IE): Ditto. + (R_TILEGX_IMM16_X0_HW3_TLS_IE): Ditto. + (R_TILEGX_IMM16_X1_HW3_TLS_IE): Ditto. + (R_TILEGX_IMM16_X0_HW2_LAST_TLS_IE): Ditto. + (R_TILEGX_IMM16_X1_HW2_LAST_TLS_IE): Ditto. + (R_TILEGX_IMM16_X0_HW0_TLS_LE): New relocation. + (R_TILEGX_IMM16_X1_HW0_TLS_LE): Ditto. + (R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE): Ditto. + (R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE): Ditto. + (R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE): Ditto. + (R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE): Ditto. + (R_TILEGX_TLS_GD_CALL): Ditto. + (R_TILEGX_IMM8_X0_TLS_GD_ADD): Ditto. + (R_TILEGX_IMM8_X1_TLS_GD_ADD): Ditto. + (R_TILEGX_IMM8_Y0_TLS_GD_ADD): Ditto. + (R_TILEGX_IMM8_Y1_TLS_GD_ADD): Ditto. + (R_TILEGX_TLS_IE_LOAD): Ditto. + (R_TILEGX_IMM8_X0_TLS_ADD): Ditto. + (R_TILEGX_IMM8_X1_TLS_ADD): Ditto. + (R_TILEGX_IMM8_Y0_TLS_ADD): Ditto. + (R_TILEGX_IMM8_Y1_TLS_ADD): Ditto. + * tilepro.h (R_TILEPRO_TLS_GD_CALL): New relocation. + (R_TILEPRO_IMM8_X0_TLS_GD_ADD): Ditto. + (R_TILEPRO_IMM8_X1_TLS_GD_ADD): Ditto. + (R_TILEPRO_IMM8_Y0_TLS_GD_ADD): Ditto. + (R_TILEPRO_IMM8_Y1_TLS_GD_ADD): Ditto. + (R_TILEPRO_TLS_IE_LOAD): Ditto. + (R_TILEPRO_IMM16_X0_TLS_LE): Ditto. + (R_TILEPRO_IMM16_X1_TLS_LE): Ditto. + (R_TILEPRO_IMM16_X0_TLS_LE_LO): Ditto. + (R_TILEPRO_IMM16_X1_TLS_LE_LO): Ditto. + (R_TILEPRO_IMM16_X0_TLS_LE_HI): Ditto. + (R_TILEPRO_IMM16_X1_TLS_LE_HI): Ditto. + (R_TILEPRO_IMM16_X0_TLS_LE_HA): Ditto. + (R_TILEPRO_IMM16_X1_TLS_LE_HA): Ditto. + +2011-12-22 DJ Delorie + + * rl78.h (R_RL78_RH_RELAX, R_RL78_RH_SFR, R_RL78_RH_SADDR): New. + (RL78_RELAXA_BRA, RL78_RELAXA_ADDR16: New. + +2011-12-19 Chung-Lin Tang + + * mips.h (elf_mips_reloc_type): Add R_MIPS16_TLS_* entries. + +2011-12-06 Ulrich Weigand + + * common.h (NT_S390_LAST_BREAK): Define. + (NT_S390_SYSTEM_CALL): Likewise. + +2011-11-01 DJ Delorie + + * common.h (EM_RL78, EM_78K0R): New. + * rl78.h: New. + +2011-10-25 Joern Rennecke + + * epiphany.h: New file. + * common.h (EM_ADAPTEVA_EPIPHANY): Define. + +2011-10-10 Alan Modra + + * ppc64.h (R_PPC64_TOCSAVE): Add. + +2011-10-05 DJ Delorie + + * rx.h (E_FLAG_RX_PID): New. + +2011-09-21 David S. Miller + + * sparc.h (Tag_GNU_Sparc_HWCAPS): New object attribute. + (ELF_SPARC_HWCAP_*): New HWCAPS bitmask values. + +2011-08-12 H.J. Lu + + PR ld/13082 + * x86-64.h (R_X86_64_RELATIVE64): New. + +2011-07-24 Chao-ying Fu + Maciej W. Rozycki + + * mips.h (R_MICROMIPS_min): New relocations. + (R_MICROMIPS_26_S1): Likewise. + (R_MICROMIPS_HI16, R_MICROMIPS_LO16): Likewise. + (R_MICROMIPS_GPREL16, R_MICROMIPS_LITERAL): Likewise. + (R_MICROMIPS_GOT16, R_MICROMIPS_PC7_S1): Likewise. + (R_MICROMIPS_PC10_S1, R_MICROMIPS_PC16_S1): Likewise. + (R_MICROMIPS_CALL16, R_MICROMIPS_GOT_DISP): Likewise. + (R_MICROMIPS_GOT_PAGE, R_MICROMIPS_GOT_OFST): Likewise. + (R_MICROMIPS_GOT_HI16, R_MICROMIPS_GOT_LO16): Likewise. + (R_MICROMIPS_SUB, R_MICROMIPS_HIGHER): Likewise. + (R_MICROMIPS_HIGHEST, R_MICROMIPS_CALL_HI16): Likewise. + (R_MICROMIPS_CALL_LO16, R_MICROMIPS_SCN_DISP): Likewise. + (R_MICROMIPS_JALR, R_MICROMIPS_HI0_LO16): Likewise. + (R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM): Likewise. + (R_MICROMIPS_TLS_DTPREL_HI, R_MICROMIPS_TLS_DTPREL_LO): Likewise. + (R_MICROMIPS_TLS_GOTTPREL): Likewise. + (R_MICROMIPS_TLS_TPREL_HI16): Likewise. + (R_MICROMIPS_TLS_TPREL_LO16): Likewise. + (R_MICROMIPS_GPREL7_S2, R_MICROMIPS_PC23_S2): Likewise. + (R_MICROMIPS_max): Likewise. + (EF_MIPS_ARCH_ASE_MICROMIPS): New macro. + (STO_MIPS_ISA, STO_MIPS_FLAGS): Likewise. + (ELF_ST_IS_MIPS_PLT, ELF_ST_SET_MIPS_PLT): Likewise. + (STO_MICROMIPS): Likewise. + (ELF_ST_IS_MICROMIPS, ELF_ST_SET_MICROMIPS): Likewise. + (ELF_ST_IS_COMPRESSED): Likewise. + (STO_MIPS_PLT, STO_MIPS_PIC): Rework. + (ELF_ST_IS_MIPS_PIC, ELF_ST_SET_MIPS_PIC): Likewise. + (STO_MIPS16, ELF_ST_IS_MIPS16, ELF_ST_SET_MIPS16): Likewise. + +2011-07-22 H.J. Lu + + * common.h (EM_K1OM): New. + +2011-07-03 Samuel Thibault + Thomas Schwinge + + PR binutils/12913 + * common.h (ELFOSABI_GNU): Define, replaces... + (ELFOSABI_LINUX): ... this, kept as an alias. + (ELFOSABI_HURD): Remove. + +2011-06-15 Ulrich Weigand + + * common.h (NT_ARM_VFP): Define. + +2011-06-13 Walter Lee + + * common.h: Add EM_TILEGX. + * tilegx.h: New file. + * tilepro.h: New file. + +2011-06-09 Tristan Gingold + + * ia64.h (Elf64_External_VMS_ORIG_DYN_Note): New struct. + +2011-06-02 Nick Clifton + + * common.h: Fix spelling mistake in comment. + * reloc-macros.h: Likewise. + +2011-05-31 Paul Brook + + * arm.h (arm_st_branch_type): Add ST_BRANCH_UNKNOWN. + +2011-05-09 Paul Brook + + * tic6x.h (ELF_STRING_C6000_unwind, + ELF_STRING_C6000_unwind_info, ELF_STRING_C6000_unwind_once, + ELF_STRING_C6000_unwind_info_once): Define. + +2011-04-15 Sergio Durigan Junior + + * common.h (NT_STAPSDT): New define. + +2011-03-31 Bernd Schmidt + + * tic6x.h (R_C6000_JUMP_SPLOT, R_C6000_EHTYPE, + R_C6000_PCR_H16, R_C6000_PCR_L16): New relocs. + (SHN_TIC6X_SCOMMON): Define. + +2011-03-31 Tristan Gingold + + * ia64.h (Elf64_External_VMS_Note): New struct. + (NT_VMS_MHD, NT_VMS_LNM, NT_VMS_SRC, NT_VMS_TITLE, NT_VMS_EIDC) + (NT_VMS_FPMODE, NT_VMS_LINKTIME, NT_VMS_IMGNAM, NT_VMS_IMGID) + (NT_VMS_LINKID, NT_VMS_IMGBID, NT_VMS_GSTNAM, NT_VMS_ORIG_DYN) + (NT_VMS_PATCHTIME) New macros. + +2011-03-14 Richard Sandiford + + * arm.h (R_ARM_IRELATIVE): New relocation. + +2011-03-14 Richard Sandiford + + * internal.h (elf_internal_sym): Add st_target_internal. + * arm.h (arm_st_branch_type): New enum. + (ARM_SYM_BRANCH_TYPE): New macro. + +2011-03-10 Nick Clifton + + * common.h (EM_V850): V850s now supplied by Renesas. + +2011-02-25 Alan Modra + + PR 12516 + * internal.h (ELF_SECTION_IN_SEGMENT_1): Don't match zero size + sections at start or end of PT_DYNAMIC. + +2011-01-10 Nathan Sidwell + Glauber de Oliveira Costa + + * arm.h (R_ARM_TLS_DESC, R_ARM_TLS_GOTDESC, R_ARM_TLS_CALL, + R_ARM_TLS_DESCSEQ, T_ARM_THM_TLS_CALL, R_ARM_THM_TLS_DESCSEQ): New + relocations. + +2010-11-16 Jie Zhang + + * bfin.h (EF_BFIN_CODE_IN_L1): Define. + (EF_BFIN_DATA_IN_L1): Define. + +2010-11-11 Mingming Sun + + * mips.h (E_MIPS_MACH_LS3A): Defined. + +2010-11-02 Joseph Myers + + * tic6x-attrs.h (Tag_ABI_wchar_t, Tag_ABI_stack_align_needed, + Tag_ABI_stack_align_preserved, Tag_ABI_PID, Tag_ABI_PIC, + Tag_ABI_array_object_alignment, + Tag_ABI_array_object_align_expected, Tag_ABI_conformance): Define. + +2010-10-29 Joseph Myers + + * tic6x-attrs.h (Tag_ABI_compatibility): Define. + +2010-10-29 Bernd Schmidt + Joseph Myers + + * tic6x-attrs.h (Tag_ABI_DSBT): New. + +2010-10-21 Joseph Myers + + * tic6x-attrs.h (Tag_C6XABI_Tag_CPU_arch): Change to Tag_ISA, + value 4. + * tic6x.h (Values for Tag_C6XABI_Tag_CPU_arch): Rename for + attribute renaming. + +2010-07-23 Naveen.H.S + Ina Pandit + + * v850.h: Add support for V850E2 and V850E2V3. + (v850_reloc_type): Update the newly added relocations + +2010-07-20 Alan Modra + + * internal.h (ELF_TBSS_SPECIAL): New macro, extracted from.. + (ELF_SECTION_SIZE): ..here. + (ELF_SECTION_IN_SEGMENT_1): Add "strict" arg. + (ELF_SECTION_IN_SEGMENT_STRICT): New macro. + +2010-06-25 Alan Modra + + * ppc64.h (R_PPC64_LO_DS_OPT): Define. + +2010-06-15 Joseph Myers + + * tic6x-attrs.h: New. + * tic6x.h: Include elf/tic6x-attrs.h for attribute table. + (C6XABI_Tag_CPU_arch_none, C6XABI_Tag_CPU_arch_C62X, + C6XABI_Tag_CPU_arch_C67X, C6XABI_Tag_CPU_arch_C67XP, + C6XABI_Tag_CPU_arch_C64X, C6XABI_Tag_CPU_arch_C64XP, + C6XABI_Tag_CPU_arch_C674X): Define. + +2010-06-11 Tristan Gingold + + * ia64.h (EF_IA_64_VMS_COMCOD, EF_IA_64_VMS_COMCOD_SUCCESS) + (EF_IA_64_VMS_COMCOD_WARNING, EF_IA_64_VMS_COMCOD_ERROR) + (EF_IA_64_VMS_COMCOD_ABORT, EF_IA_64_VMS_LINKAGES): Define. + (VMS_LF_CALL_DEBUG, VMS_LF_NOP0BUFS, VMS_LF_P0IMAGE) + (VMS_LF_MKTHREADS, VMS_LF_UPCALLS, VMS_LF_IMGSTA) + (VMS_LF_INITIALIZE, VMS_LF_MAIN, VMS_LF_EXE_INIT) + (VMS_LF_TBK_IN_IMG, VMS_LF_DBG_IN_IMG, VMS_LF_TBK_IN_DSF) + (VMS_LF_DBG_IN_DSF, VMS_LF_SIGNATURES, VMS_LF_REL_SEG_OFF): Define. + (VMS_STO_VISIBILITY, VMS_ST_VISIBILITY, VMS_STO_FUNC_TYPE) + (VMS_ST_FUNC_TYPE, VMS_SFT_CODE_ADDR, VMS_SFT_SYMV_IDX) + (VMS_SFT_FD, VMS_SFT_RESERVE, VMS_STO_LINKAGE, VMS_ST_LINKAGE) + (VMS_STL_IGNORE, VMS_STL_RESERVE, VMS_STL_STD, VMS_STL_LNK): Define. + (Elf64_External_VMS_IMAGE_FIXUP): New declaration. + (Elf64_External_VMS_IMAGE_RELA): Ditto. + (R_IA64_VMS_DIR8, R_IA64_VMS_DIR16LSB, R_IA64_VMS_CALL_SIGNATURE) + (R_IA64_VMS_EXECLET_FUNC, R_IA64_VMS_EXECLET_DATA, R_IA64_VMS_FIX8) + (R_IA64_VMS_FIX16, R_IA64_VMS_FIX32, R_IA64_VMS_FIX64) + (R_IA64_VMS_FIXFD, R_IA64_VMS_ACC_LOAD, R_IA64_VMS_ACC_ADD) + (R_IA64_VMS_ACC_SUB, R_IA64_VMS_ACC_MUL, R_IA64_VMS_ACC_DIV) + (R_IA64_VMS_ACC_AND, R_IA64_VMS_ACC_IOR, R_IA64_VMS_ACC_EOR) + (R_IA64_VMS_ACC_ASH, R_IA64_VMS_ACC_STO8, R_IA64_VMS_ACC_STO16LSH) + (R_IA64_VMS_ACC_STO32LSH, R_IA64_VMS_ACC_STO64LSH): New. + +2010-05-25 Daniel Jacobowitz + Joseph Myers + Andrew Stubbs + + * sh.h (EF_SH_PIC, EF_SH_FDPIC): Define. + (R_SH_FIRST_INVALID_RELOC_6, R_SH_LAST_INVALID_RELOC_6): New. Adjust + other invalid ranges. + (R_SH_GOT20, R_SH_GOTOFF20, R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20) + (R_SH_GOTOFFFUNCDESC, R_SH_GOTOFFFUNCDESC20, R_SH_FUNCDESC) + (R_SH_FUNCDESC_VALUE): New. + +2010-05-18 H.J. Lu + + PR gas/11600 + * common.h (SHF_EXCLUDE): New. + + * i370.h (SHF_EXCLUDE): Removed. + * or32.h (SHF_EXCLUDE): Likewise. + * ppc.h (SHF_EXCLUDE): Likewise. + * sparc.h (SHF_EXCLUDE): Likewise. + +2010-04-23 Alan Modra + + * internal.h (ELF_SECTION_SIZE): Protect macro args with parentheses. + Invert logic to clarify test for .tbss. + (ELF_IS_SECTION_IN_SEGMENT): Rename to.. + (ELF_SECTION_IN_SEGMENT_1): ..this. Add check_vma param. Protect + macro args with parentheses. + (ELF_SECTION_IN_SEGMENT): Define. + (ELF_IS_SECTION_IN_SEGMENT_FILE): Delete. + (ELF_IS_SECTION_IN_SEGMENT_MEMORY): Delete. + +2010-04-15 Matthew Gretton-Dann + + * arm.h (Tag_FP_arch, Tag_ABI_align_needed, Tag_ABI_align_preserved, + Tag_FP_HP_extension): Add new ABI attribute tags. + +2010-04-15 Nick Clifton + + * alpha.h: Update copyright notice to use GPLv3. + * arc.h: Likewise. + * arm.h: Likewise. + * avr.h: Likewise. + * bfin.h: Likewise. + * common.h: Likewise. + * cr16.h: Likewise. + * cr16c.h: Likewise. + * cris.h: Likewise. + * crx.h: Likewise. + * d10v.h: Likewise. + * d30v.h: Likewise. + * dlx.h: Likewise. + * dwarf.h: Likewise. + * external.h: Likewise. + * fr30.h: Likewise. + * frv.h: Likewise. + * h8.h: Likewise. + * hppa.h: Likewise. + * i370.h: Likewise. + * i386.h: Likewise. + * i860.h: Likewise. + * i960.h: Likewise. + * ia64.h: Likewise. + * internal.h: Likewise. + * ip2k.h: Likewise. + * iq2000.h: Likewise. + * lm32.h: Likewise. + * m32c.h: Likewise. + * m32r.h: Likewise. + * m68hc11.h: Likewise. + * m68k.h: Likewise. + * mcore.h: Likewise. + * mep.h: Likewise. + * microblaze.h: Likewise. + * mips.h: Likewise. + * mmix.h: Likewise. + * mn10200.h: Likewise. + * moxie.h: Likewise. + * msp430.h: Likewise. + * mt.h: Likewise. + * openrisc.h: Likewise. + * or32.h: Likewise. + * pj.h: Likewise. + * ppc.h: Likewise. + * ppc64.h: Likewise. + * reloc-macros.h: Likewise. + * rx.h: Likewise. + * s390.h: Likewise. + * sh.h: Likewise. + * sparc.h: Likewise. + * spu.h: Likewise. + * v850.h: Likewise. + * vax.h: Likewise. + * vxworks.h: Likewise. + * x86-64.h: Likewise. + * xc16x.h: Likewise. + * xstormy16.h: Likewise. + * xtensa.h: Likewise. + +2010-04-08 David Stubbs + + * internal.h (ELF_IS_SECTION_IN_SEGMENT): PT_PHDR program headers + cannot contain any sections. + +2010-03-25 Joseph Myers + + * common.h (ELFOSABI_C6000_ELFABI, ELFOSABI_C6000_LINUX): Define. + * tic6x.h: New. + +2010-03-05 Rainer Orth + + * common.h (VER_FLG_*): Document. + (VER_FLG_INFO): Define. + +2010-02-23 Andrew Zabolotny + + PR binutils/11297 + * avr.h: (R_AVR_8): New relocation number. + +2010-02-18 Matthew Gretton-Dann + + * arm.h (Tag_MPextension_use): Renumber. + (Tag_DIV_use): Add. + (Tag_MPextension_use_legacy): Likewise. + +2010-02-09 Michael Holzheu + + * common.h (NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG, + NT_S390_CTRS and NT_S390_PREFIX): Define. + +2010-02-08 David S. Miller + + * sparc.h (R_SPARC_JMP_IREL, R_SPARC_IRELATIVE): Define. + +2010-02-02 H.J. Lu + + * common.h (NT_386_XSTATE): New. + +2010-01-21 Andreas Krebbel + + * s390.h (EF_S390_HIGH_GPRS): Added macro definition. + +2010-01-19 Daisuke Hatayama + + * common.h (PN_XNUM): Define. + +2009-12-18 Ulrich Weigand + + * common.h (NT_S390_HIGH_GPRS): Define. + +2009-12-17 Alan Modra + + * ppc.h (R_PPC_RELAX32, R_PPC_RELAX32PC, R_PPC_RELAX32_PLT, + R_PPC_RELAX32PC_PLT): Delete. + (R_PPC_RELAX, R_PPC_RELAX_PLT, R_PPC_RELAX_PLTREL24): Define. + +2009-12-03 David Daney + Adam Nemet + + * mips.h (E_MIPS_MACH_OCTEON2): New machine flag. + +2009-11-28 Joseph Myers + + * common.h (ELFOSABI_FENIXOS, EM_TI_C6000, EM_TI_C2000, + EM_TI_C5500, EM_CUDA): Define. + (EM_res140, EM_res141, EM_res142): Remove. + +2009-11-17 Paul Brook + Daniel Jacobowitz + + * arm.h (TAG_CPU_ARCH_V7E_M): Define. + +2009-09-29 DJ Delorie + + * rx.h: New file. + +2009-09-21 Alan Modra + + * ppc.h (DT_PPC_TLSOPT): Define. + * ppc64.h (DT_PPC64_TLSOPT): Define. + +2009-08-10 Daniel Gutson + + * arm.h: (SHT_ARM_DEBUGOVERLAY): New define. + (SHT_ARM_OVERLAYSECTION): New define. + +2006-08-09 Bernd Schmidt + + From Mike Frysinger + * bfin.h (R_BFIN_UNUSED, R_BFIN_PCREL5M2, R_BFIN_UNUSED1, + R_BFIN_PCREL10, R_BFIN_PCREL12_JUMP, R_BFIN_RIMM16, + R_BFIN_LUIMM16, R_BFIN_HUIMM16, R_BFIN_PCREL12_JUMP_S, + R_BFIN_PCREL24_JUMP_X, R_BFIN_PCREL24, R_BFIN_UNUSEDB, + R_BFIN_UNUSEDC, R_BFIN_PCREL24_JUMP_L, R_BFIN_PCREL24_CALL_X, + R_BFIN_VAR_EQ_SYMB, R_BFIN_BYTE_DATA, R_BFIN_BYTE2_DATA, + R_BFIN_BYTE4_DATA, R_BFIN_PCREL11, R_BFIN_PUSH, R_BFIN_CONST, + R_BFIN_ADD, R_BFIN_SUB, R_BFIN_MULT, R_BFIN_DIV, R_BFIN_MOD, + R_BFIN_LSHIFT, R_BFIN_RSHIFT, R_BFIN_AND, R_BFIN_OR, R_BFIN_XOR, + R_BFIN_LAND, R_BFIN_LOR, R_BFIN_LEN, R_BFIN_NEG, R_BFIN_COMP, + R_BFIN_PAGE, R_BFIN_HWPAGE, R_BFIN_ADDR, R_BFIN_PLTPLC, + R_BFIN_GOT, R_BFIN_MAX): Renamed from R_unused0, R_pcrel5ms, + R_unused1, R_pcrel10, R_pcrel12_jump, R_rimm16, R_luimm16, + R_huimm16, R_pcrel12_jump_s, R_pcrel24_jump_x, R_pcrel24, + R_unusedb, R_unusedc, R_pcrel24_jump_l, R_pcrel24_call_x, + R_var_eq_symb, R_byte_data, R_byte2_data, R_byte4_data, R_pcrel11, + R_push, R_const, R_add, R_sub, R_mult, R_div, R_mod, R_lshift, + R_rshift, R_and, R_or, R_xor, R_land, R_lor, R_len, R_neg, R_comp, + R_page, R_hwpage, R_addr, R_pltpc, R_got. + +2009-08-09 Michael Eager + + * common.h: Define EM_resnnn reserved values. Add EM_AVR32, + EM_STM8, EM_TILE64, EM_TILEPRO. Change EM_MICROBLAZE. + +2009-08-06 Michael Eager + + * common.h: Define EM_MICROBLAZE & EM_MICROBLAZE_OLD. + * microblaze.h: New reloc definitions. + +2009-07-30 Alan Modra + + * ppc64.h: Add R_PPC64_JMP_IREL, R_PPC64_REL16, R_PPC64_REL16_LO, + R_PPC64_REL16_HI, R_PPC64_REL16_HA. + +2009-07-25 H.J. Lu + + * common.h (EM_L1OM): New. + +2009-07-24 Trevor Smigiel + Alan Modra + + * spu.h (R_SPU_ADD_PIC): New. + +2009-07-23 Ulrich Drepper + + * common.h (STB_GNU_UNIQUE): Define. + +2009-07-10 Tom Tromey + + * dwarf2.h: Move to `..'. + +2009-07-10 H.J. Lu + + * dwarf2.h: Just include ../dwarf2.h. + +2009-07-10 Alan Modra + + * ppc.h (R_PPC_IRELATIVE): Add. + (R_PPC_RELAX32, R_PPC_RELAX32PC, + R_PPC_RELAX32_PLT, R_PPC_RELAX32PC_PLT): Renumber. + * ppc64.h (R_PPC64_IRELATIVE): Add. + +2009-07-03 Jakub Jelinek + + * dwarf2.h (enum dwarf_location_atom): Add DW_OP_implicit_value + and DW_OP_stack_value. + +2009-06-22 Alan Modra + + * ppc.h (R_PPC_RELAX*): Define as enum. + +2009-06-11 Anthony Green + + * moxie.h (R_MOXIE_PCREL10): New. + +2009-06-01 H.J. Lu + + PR ld/10205 + * i386.h (R_386_IRELATIVE): New. + * x86-64.h (R_X86_64_IRELATIVE): Likewise. + +2009-05-27 H.J. Lu + + * common.h: Update comments for dynamic tag ranges. + +2009-04-30 DJ Delorie + + * mep.h (EF_MEP_COP_*): New. + (EF_MEP_ALL_FLAGS): Add them. + +2009-04-30 Nick Clifton + + * common.h (STT_GNU_IFUNC): Define. + +2009-04-24 Cary Coutant + + * dwarf2.h (DW_LNE_set_discriminator): New enum value. + +2009-04-15 Anthony Green + + * common.h (EM_MOXIE): Define. + * moxie.h: New file. + +2009-04-07 DJ Delorie + + * mep.h (EF_MEP_CPU_C5): New. + +2009-04-01 H.J. Lu + + * common.h (EM_INTEL178): Removed. + (EM_INTEL179): Likewise. + (EM_ETPU): New. + (EM_SLE9X): Likewise. + (EM_INTEL181): Likewise. + (EM_INTEL182): Likewise. + +2009-03-31 H.J. Lu + + * common.h (EM_INTEL178): New. + (EM_INTEL179): Likewise. + (EM_INTEL180): Likewise. + +2009-03-20 Mikolaj Zalewski + + * common.h (SHT_GNU_INCREMENTAL_INPUTS): Define. + +2009-03-14 Mark Kettenis + + * common.h (NT_OPENBSD_PROCINFO, NT_OPENBSD_AUXV) + (NT_OPENBSD_REGS, NT_OPENBSD_FPREGS, NT_OPENBSD_XFPREGS) + (NT_OPENBSD_WCOOKIE): New defines. + +2009-03-16 Jan Kratochvil + + * common.h (AT_RANDOM): Define. + +2009-03-04 Alan Modra + + * ppc.h (R_PPC_TLSGD, R_PPC_TLSLD): Add new relocs. + * ppc64.h (R_PPC64_TLSGD, R_PPC64_TLSLD): Add new relocs. + +2009-03-02 Qinwei + + * score.h (RELOC_NUMBER): Add R_SCORE_IMM32. + * common.h (EM_SCORE_OLD): Define. + +2009-02-23 H.J. Lu + + * common.h (STB_LOPROC): Replace Application-specific with + Processor-specific in comments. + (STB_HIPROC): Likewise. + (STT_LOPROC): Likewise. + (STT_HIPROC): Likewise. + +2009-02-03 Sandip Matte + + * mips.h (E_MIPS_MACH_XLR): Define. + +2009-02-03 Maxim Kuvyrkov + + * m68k.h: Map TLS relocations to numbers. + +2009-01-15 Andrew Stubbs + Julian Brown + + * arm.h (TAG_CPU_ARCH_V6_M, TAG_CPU_ARCH_V6S_M): New defines. + (MAX_TAG_CPU_ARCH, TAG_CPU_ARCH_V4T_PLUS_V6_M): New defines. + (Tag_NEON_arch): Rename to Tag_Advanced_SIMD_arch to match ARM ABI + version 2.07. + (Tag_undefined39, Tag_nodefaults): New enum values. + (Tag_also_compatible_with, Tag_T2EE_use): Likewise. + (Tag_conformance, Tag_Virtualization_use): Likewise. + (Tag_undefined69, Tag_MPextension_use): Likewise. + +2009-01-15 Douglas B Rupp + + * ia64.h (SHT_IA_64_VMS_DISPLAY_NAME_INFO, EF_IA_64_ARCHVER_1): + New macros. Minor reformatting. + +2008-12-23 Jon Beniston + + * lm32.h: New file. + +2008-12-23 Nick Clifton + + * commmon.h (STT_IFUNC): Delete. + +2008-12-20 Hans-Peter Nilsson + + * cris.h (R_CRIS_32_IE): New relocation. + +2008-12-03 Nick Clifton + + * common.h (STT_IFUNC): Define. + +2008-11-27 M R Swami Reddy + + * cr16.h (R_CR16_GOT_REGREL20, R_CR16_GOTC_REGREL20 and + R_CR16_GLOB_DAT): New relocations. + +2008-11-25 Hans-Peter Nilsson + + * cris.h (R_CRIS_32_TPREL): Correct comment. + (R_CRIS_DTPMOD): Open up for use elsewhere than the fourth GOT entry. + +2008-11-18 Catherine Moore + + * arm.h (Tag_ABI_FP_16bit_format): Define. + +2008-11-14 Nathan Sidwell + + * internal.h (struct elf_segment_map): Add header_size field. + +2008-10-13 Ulrich Weigand + + * common.h (AT_BASE_PLATFORM, AT_EXECFN): Define. + +2008-10-10 Nathan Froyd + + * ppc.h: Add Tag_GNU_Power_ABI_Struct_Return. + +2008-10-04 Hans-Peter Nilsson + + * cris.h (R_CRIS_32_GOT_GD, R_CRIS_16_GOT_GD, R_CRIS_32_GD) + (R_CRIS_DTP, R_CRIS_32_DTPREL, R_CRIS_16_DTPREL, R_CRIS_DTPMOD) + (R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL, R_CRIS_32_TPREL) + (R_CRIS_16_TPREL): New relocations. + +2008-09-24 Richard Henderson + + * dwarf2.h (DW_OP_GNU_encoded_addr): New. + +2008-08-20 Bob Wilson + + * xtensa.h (R_XTENSA_TLSDESC_FN, R_XTENSA_TLSDESC_ARG) + (R_XTENSA_TLS_DTPOFF, R_XTENSA_TLS_TPOFF, R_XTENSA_TLS_FUNC) + (R_XTENSA_TLS_ARG, R_XTENSA_TLS_CALL): New. + +2008-08-08 Anatoly Sokolov + + * avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31, + E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define. + (EF_AVR_MACH): Redefine to 0x7F. + +2008-08-08 Richard Sandiford + Daniel Jacobowitz + Catherine Moore + Mark Shinwell + + * mips.h (STO_MIPS_PLT, ELF_ST_IS_MIPS_PLT, ELF_ST_SET_MIPS_PLT) + (STO_MIPS_PIC, DT_MIPS_PLTGOT, DT_MIPS_RWPLT): New macros. + +2008-08-04 Markus Weiss + + * common.h (ELFOSABI_AROS): Update comment. + +2008-07-26 Michael Eager + + * ppc.h: Add description of single-precision. + +2008-07-21 Luis Machado + + * common.h: Define NT_PPC_VSX. + +2008-07-12 Jie Zhang + + Revert + 2008-07-12 Jie Zhang + * bfin.h (EF_BFIN_CODE_IN_L1): Define. + (EF_BFIN_DATA_IN_L1): Define. + +2008-07-12 Jie Zhang + + * bfin.h (EF_BFIN_CODE_IN_L1): Define. + (EF_BFIN_DATA_IN_L1): Define. + +2008-07-10 Richard Sandiford + + * mips.h (ELF_ST_IS_MIPS16, ELF_ST_SET_MIPS16): New macros. + +2008-06-18 M R Swami Reddy + + * common.h (EM_CR16): Correct value. + (EM_CR16): Rename to EM_CR16_OLD. + +2008-06-12 DJ Delorie + + * common.h (EM_M32C_NEW): Rename to EM_M32C. + (EM_M32C): Rename to EM_M32C_OLD. + +2008-06-12 Joseph Myers + + * common.h: Update e_machine table. + +2008-06-09 Takashi Yoshii + + * sh.h (EF_SH_BFD_TABLE): Set bfd_mach_sh for EF_SH_UNKNOWN. + +2008-06-09 Joseph Myers + + * common.h: Change registry@caldera.com to registry@sco.com. + +2008-05-21 Nick Clifton + + * reloc-macros.h: Add a comment about the use of the + END_RELOC_NUMBERS symbol as a sentinel value. + +2008-05-15 Christophe Lyon + + * arm.h (END_RELOC_NUMBERS): Provide a maximum value. + +2008-04-16 David S. Miller + + * sparc.h (R_SPARC_GOTDATA_HIX22, + R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22, + R_SPARC_GOTDATA_OP_LOX10, R_SPARC_GOTDATA_OP, + R_SPARC_H34, R_SPARC_SIZE32, R_SPARC_SIZE64): New relocs. + +2008-03-24 Ian Lance Taylor + + * common.h (NT_GNU_GOLD_VERSION): Define. + +2008-03-13 Alan Modra + + * internal.h (Elf_Internal_Shdr): Change sh_link and sh_info from + unsigned long to unsigned int. Change sh_addralign to bfd_vma. + Order struct as for external version. + +2008-03-12 Alan Modra + + PR 5900 + * common.h (SHN_BAD): Delete. + (SHN_LORESERVE .. SHN_HIRESERVE): Move to.. + * external.h: ..here. + * internal.h (SHN_LORESERVE, SHN_HIRESERVE): Define. + (SHN_LOPROC, SHN_HIPROC, SHN_LOOS, SHN_HIOS): Define. + (SHN_ABS, SHN_COMMON, SHN_XINDEX, SHN_BAD): Define. + +2008-03-12 Alan Modra + + * cr16c.h (SHN_CR16C_FCOMMON): Define using SHN_LORESERVE. + (SHN_CR16C_NCOMMON): Likewise. + * hppa.h (SHN_PARISC_ANSI_COMMON): Likewise. + (SHN_PARISC_HUGE_COMMON): Likewise. + * ia64.h (SHN_IA_64_ANSI_COMMON): Likewise. + (SHN_IA_64_VMS_SYMVEC): Define using SHN_LOOS. + * m32r.h (SHN_M32R_SCOMMON): Define using SHN_LORESERVE. + * mips.h (SHN_MIPS_ACOMMON, SHN_MIPS_TEXT): Likewise. + (SHN_MIPS_DATA, SHN_MIPS_SCOMMON, SHN_MIPS_SUNDEFINED): Likewise. + * score.h (SHN_SCORE_TEXT, SHN_SCORE_DATA): Likewise. + (SHN_SCORE_SCOMMON): Likewise. + * sparc.h (SHN_BEFORE, SHN_AFTER): Likewise. + * v850.h (SHN_V850_SCOMMON, SHN_V850_TCOMMON): Likewise. + (SHN_V850_ZCOMMON): Likewise. + * x86-64.h (SHN_X86_64_LCOMMON): Likewise. + +2008-03-03 Pallavi Tambay + + * dwarf2.h: (enum dwarf_location_atom): Add new DW_OP: + DW_OP_PGI_omp_thread_num. + +2008-02-04 Adam Nemet + + * mips.h: Update copyright. + (E_MIPS_MACH_OCTEON): New macro. + +2008-01-30 Tristan Gingold + + Add OpenVMS extensions. + * ia64.h (SHF_IA_64_VMS_GLOBAL, SHF_IA_64_VMS_OVERLAID) + (SHF_IA_64_VMS_SHARED, SHF_IA_64_VMS_VECTOR) + (SHF_IA_64_VMS_ALLOC_64BIT, SHF_IA_64_VMS_PROTECTED) + (SHT_IA_64_VMS_TRACE, SHT_IA_64_VMS_TIE_SIGNATURES) + (SHT_IA_64_VMS_DEBUG, SHT_IA_64_VMS_DEBUG_STR) + (SHT_IA_64_VMS_LINKAGES, SHT_IA_64_VMS_SYMBOL_VECTOR) + (SHT_IA_64_VMS_FIXUP, DT_IA_64_VMS_SUBTYPE) + (DT_IA_64_VMS_IMGIOCNT, DT_IA_64_VMS_LNKFLAGS) + (DT_IA_64_VMS_VIR_MEM_BLK_SIZ, DT_IA_64_VMS_IDENT) + (DT_IA_64_VMS_NEEDED_IDENT, DT_IA_64_VMS_IMG_RELA_CNT) + (DT_IA_64_VMS_SEG_RELA_CNT, DT_IA_64_VMS_FIXUP_RELA_CNT) + (DT_IA_64_VMS_FIXUP_NEEDED, DT_IA_64_VMS_SYMVEC_CNT) + (DT_IA_64_VMS_XLATED, DT_IA_64_VMS_STACKSIZE) + (DT_IA_64_VMS_UNWINDSZ, DT_IA_64_VMS_UNWIND_CODSEG) + (DT_IA_64_VMS_UNWIND_INFOSEG, DT_IA_64_VMS_LINKTIME) + (DT_IA_64_VMS_SEG_NO, DT_IA_64_VMS_SYMVEC_OFFSET) + (DT_IA_64_VMS_SYMVEC_SEG, DT_IA_64_VMS_UNWIND_OFFSET) + (DT_IA_64_VMS_UNWIND_SEG, DT_IA_64_VMS_STRTAB_OFFSET) + (DT_IA_64_VMS_SYSVER_OFFSET, DT_IA_64_VMS_IMG_RELA_OFF) + (DT_IA_64_VMS_SEG_RELA_OFF, DT_IA_64_VMS_FIXUP_RELA_OFF) + (DT_IA_64_VMS_PLTGOT_OFFSET, DT_IA_64_VMS_PLTGOT_SEG) + (DT_IA_64_VMS_FPMODE, SHN_IA_64_VMS_SYMVEC): Define + +2008-01-16 Mark Kettenis + + * common.h (AT_SUN_AUXFLAGS): Define. + +2007-12-11 Daniel Jacobowitz + + * dwarf2.h (DW_AT_hi_user): Correct value. + +2007-12-07 Bob Wilson + + * xtensa.h (R_XTENSA_32_PCREL): New. + +2007-11-29 Mark Shinwell + + * mips.h (E_MIPS_MACH_LS2E): New. + (E_MIPS_MACH_LS2F): New. + +2007-11-28 Nathan Sidwell + + * internal.h (ELF_IS_SECTION_IN_SEGMENT): Adjust to cope with + segments at the end of memory. + +2007-11-17 Thiemo Seufer + + * mips.h (Tag_GNU_MIPS_ABI_FP): Mention -mips32r2 -mfp64 variant + in comment. + +2007-11-16 Nick Clifton + + * dwarf2.h: Mention the location of the DWARF3 spec on the web. + (DW_AT_stride_size): Rename to DW_AT_bit_stride. + (DW_AT_stride): Rename to DW_AT_byte_stride. + +2007-11-08 Nathan Sidwell + + * vxworks.h: New. + +2007-10-30 Nick Clifton + + * mn10300.h (R_MN10300_ALIGN): Define. + +2007-10-25 Daniel Jacobowitz + + * ppc.h (Tag_GNU_Power_ABI_Vector): New. + +2007-10-19 Nick Clifton + + * mn10300.h: Add R_MN10300_SYM_DIFF reloc. + +2007-10-18 Roland McGrath + + * common.h (NT_PPC_VMX): New macro. + +2007-10-01 M R Swami Reddy + + * cr16.h: Updated with new relocaction macros. + +2007-09-17 H.J. Lu + + PR binutils/3281 + PR binutils/5037 + * internal.h (elf_segment_map): Add p_size and p_size_valid. + (ELF_IS_SECTION_IN_SEGMENT): Allow SHF_TLS sections in + PT_GNU_RELRO segments. + +2007-09-11 Nathan Sidwell + + * m68k.h (EF_M68K_CF_ISA_C_NODIV): New. + +2007-08-25 Ulrich Weigand + + * common.h (NT_SPU): Define. + +2007-08-16 H.J. Lu + + * common.h: Revert last change. + +2007-08-16 H.J. Lu + + * common.h (PT_GNU_STACK): Renamed to ... + (PT_GNU_ATTR): This. + (PT_GNU_STACK): New. Make an alias of PT_GNU_ATTR. + +2007-07-09 Roland McGrath + + * common.h (NT_GNU_HWCAP, NT_GNU_BUILD_ID): New macros. + +2007-06-29 Joseph Myers + + * ppc.h (Tag_GNU_Power_ABI_FP): Define. + +2007-06-29 Joseph Myers + + * mips.h (Tag_GNU_MIPS_ABI_FP): Define. + +2007-06-29 Joseph Myers + + * arm.h (elf32_arm_add_eabi_attr_int, + elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat, + elf32_arm_get_eabi_attr_int, elf32_arm_set_eabi_attr_contents, + elf32_arm_eabi_attr_size, Tag_NULL, Tag_File, Tag_Section, + Tag_Symbol, Tag_compatibility): Remove. + * common.h (SHT_GNU_ATTRIBUTES): Define. + +2007-06-29 M R Swami Reddy + + * common.h (EM_CR16): New entry for CR16 cpu. + * cr16.h: New file. + +2007-06-11 Sterling Augustine + Bob Wilson + + * xtensa.h (XTENSA_PROP_INSN_NO_TRANSFORM): Renamed to... + (XTENSA_PROP_NO_TRANSFORM): ...this. + +2007-05-18 Caroline Tice + + * dwarf2.h: (enum dwarf_location_atom): Add new DW_OP, + DW_OP_GNU_uninit. + +2007-05-12 Alan Modra + + * spu.h (R_SPU_ADDR16X): Define. + (R_SPU_PPU32, R_SPU_PPU64): Renumber. + +2007-05-11 Alan Modra + + * spu.h (R_SPU_PPU32, R_SPU_PPU64): Define. + +2007-05-02 Alan Modra + + * internal.h (ELF_IS_SECTION_IN_SEGMENT): Check both file offset + and vma for appropriate sections. + +2007-04-26 Jan Beulich + + * common.h (DT_ENCODING): Correct value (back to spec mandated + value). + +2007-03-08 Alan Modra + + * v850.h (V850_OTHER_TDA_BYTE): Delete. + (V850_OTHER_SDA, V850_OTHER_ZDA, V850_OTHER_TDA): Assign bits + that don't clash with visibility bits. + +2007-03-07 Alan Modra + + * common.h (ELF_ST_VISIBILITY): Comment typo fix. + +2007-02-05 Dave Brolley + Richard Sandiford + Richard Henderson + DJ Delorie + Ben Elliston + + * mep.h: New file. + * common.h (EM_CYGNUS_MEP): Define. + +2007-02-15 Dave Brolley + + From Graydon Hoare : + * common.h (STT_RELC, STT_SRELC, R_RELC): New macros. + +2007-01-08 Kazu Hirata + + * m68k.h (EF_M68K_FIDO): New. + (EF_M68K_ARCH_MASK): OR EF_M68K_FIDO. + (EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): Remove. + +2006-12-25 Kazu Hirata + + * m68k.h (EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): New. + +2006-12-19 Kazu Hirata + + * m68k.h (EF_M68K_ARCH_MASK): New. + +2006-12-19 Nathan Sidwell + + * internal.h (struct elf_segment_map): Add p_vaddr_offset field. + +2006-12-07 Kazu Hirata + + * m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A_NODIV, + EF_M68K_ISA_A, EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B_NOUSP, + EF_M68K_ISA_B, EF_M68K_ISA_C, EF_M68K_MAC_MASK, EF_M68K_MAC, + EF_M68K_EMAC, EF_M68K_EMAC_B, EF_M68K_FLOAT): Rename to + EF_M68K_CF_ISA_MASK, EF_M68K_CF_ISA_A_NODIV, EF_M68K_CF_ISA_A, + EF_M68K_CF_ISA_A_PLUS, EF_M68K_CF_ISA_B_NOUSP, + EF_M68K_CF_ISA_B, EF_M68K_CF_ISA_C, EF_M68K_CF_MAC_MASK, + EF_M68K_CF_MAC, EF_M68K_CF_EMAC, EF_M68K_CF_EMAC_B, + EF_M68K_CF_FLOAT, respectively. + +2006-12-05 Michael Tautschnig + Nick Clifton + + * external.h (struct Elf_External_Versym): Use ATTRIBUTE_PACKED. + +2006-10-28 Richard Sandiford + + * mips.h (R_MIPS_GLOB_DAT): Define + (R_MIPS_max): Bump by 1. + +2006-10-25 Trevor Smigiel + Yukishige Shibata + Nobuhisa Fujinami + Takeaki Fukuoka + Alan Modra + + * common.h (EM_SPU): Define. + * spu.h: New file. + +2006-10-19 Mei Ligang + + * score.h (EF_SCORE_PIC): Redefine EF_SCORE_PIC as 0x80000000. + (EF_SCORE_FIXDEP): Redefine EF_SCORE_FIXDEP as 0x40000000. + (EF_SCORE_HASENTRY): Delete. + +2006-10-17 Mark Shinwell + + * arm.h: Define TAG_CPU_ARCH_* constants. + +2006-09-17 Mei Ligang + + * score.h: New file. + * common.h: Add Score machine number. + +2006-07-10 Jakub Jelinek + + * common.h (SHT_GNU_HASH, DT_GNU_HASH): Define. + +2006-05-31 H.J. Lu + + * internal.h (ELF_SECTION_SIZE): New. + (ELF_IS_SECTION_IN_SEGMENT): Likewise. + (ELF_IS_SECTION_IN_SEGMENT_FILE): Updated. + (ELF_IS_SECTION_IN_SEGMENT_MEMORY): Likewise. + +2006-05-27 H.J. Lu + + * internal.h (struct elf_segment_map): Add p_align and p_align_valid. + +2006-05-24 Carlos O'Donell + Randolph Chung + + * hppa.h (R_PARISC_TLS_GD21L, R_PARISC_TLS_GD14R, R_PARISC_TLS_GDCALL, + R_PARISC_TLS_LDM21L, R_PARISC_TLS_LDM14R, R_PARISC_TLS_LDMCALL, + R_PARISC_TLS_LDO21L, R_PARISC_TLS_LDO14R, R_PARISC_TLS_DTPMOD32, + R_PARISC_TLS_DTPMOD64, R_PARISC_TLS_DTPOFF32, R_PARISC_TLS_DTPOFF64): + New TLS relocs. + (R_PARISC_TLS_LE21L, R_PARISC_TLS_LE14R, R_PARISC_TLS_IE21L, + R_PARISC_TLS_IE14R, R_PARISC_TLS_TPREL32, R_PARISC_TLS_TPREL64): + Define TLS relocs using existing equivalents. + +2006-05-24 Bjoern Haase + + * avr.h: Add E_AVR_MACH_AVR6, R_AVR_LO8_LDI_GS and R_AVR_HI8_LDI_GS. + +2006-03-25 Bernd Schmidt + + * bfin.h (R_BFIN_GOT17M4, R_BFIN_GOTHI, R_BFIN_GOTLO, + R_BFIN_FUNCDESC, R_BFIN_FUNCDESC_GOT17M4, R_BFIN_FUNCDESC_GOTHI, + R_BFIN_FUNCDESC_GOTLO, R_BFIN_FUNCDESC_VALUE, + R_BFIN_FUNCDESC_GOTOFF17M4, R_BFIN_FUNCDESC_GOTOFFHI, + R_BFIN_FUNCDESC_GOTOFFLO, R_BFIN_GOTOFF17M4, R_BFIN_GOTOFFHI, + R_BFIN_GOTOFFLO): New relocs. + (EF_BFIN_PIC, EF_BFIN_FDPIC, EF_BFIN_PIC_FLAGS): New macros. + +2006-03-23 Michael Matz + + * x86-64.h: Add the new relocations with their official + numbers. + +2006-03-22 Richard Sandiford + Daniel Jacobowitz + Phil Edwards + Zack Weinberg + Mark Mitchell + Nathan Sidwell + + * mips.h (R_MIPS_COPY, R_MIPS_JUMP_SLOT): New relocs. + +2006-03-19 John David Anglin + + * hppa.h (SHF_HP_TLS, SHF_HP_NEAR_SHARED, SHF_HP_FAR_SHARED, + SHF_HP_COMDAT, SHF_HP_CONST, SHN_TLS_COMMON, SHN_NS_COMMON, + SHN_NS_UNDEF, SHN_FS_UNDEF, SHN_HP_EXTERN, SHN_HP_EXTHINT, + SHN_HP_UNDEF_BIND_IMM, SHT_HP_OVLBITS, SHT_HP_DLKM, SHT_HP_COMDAT, + SHT_HP_OBJDICT, SHT_HP_ANNOT, STB_HP_ALIAS): Define. + +2006-03-10 Paul Brook + + * arm.h (EF_ARM_EABI_VER5): Define. + +2006-03-06 Nathan Sidwell + + * m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A, + EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B, EF_M68K_ISA_C): Adjust. + (EF_M68K_ISA_A_NODIV, EF_M68K_ISA_B_NOUSP): New. + (EF_M68K_HW_DIV, EF_M68K_USP): Remove. + (EF_M68K_MAC, EF_M68K_EMAC, EF_M68K_FLOAT): Adjust. + (EF_M68K_EMAC_B): New. + +2006-03-03 Bjoern Haase + + * avr.h (R_AVR_MS8_LDI,R_AVR_MS8_LDI_NEG): Add. + (EF_AVR_LINKRELAX_PREPARED): Add. + +2006-03-02 Ben Elliston + + Import from the GCC tree: + 2006-03-01 Jakub Jelinek + + * dwarf2.h (DW_TAG_condition, DW_TAG_shared_type): New constants + from DWARF 3. + (DW_AT_description, DW_AT_binary_scale, DW_AT_decimal_scale, + DW_AT_small, DW_AT_decimal_sign, DW_AT_digit_count, + DW_AT_picture_string, DW_AT_mutable, DW_AT_threads_scaled, + DW_AT_explicit, DW_AT_object_pointer, DW_AT_endianity, + DW_AT_elemental, DW_AT_pure, DW_AT_recursive): New. + (DW_OP_form_tls_address, DW_OP_call_frame_cfa, DW_OP_bit_piece): New. + (DW_ATE_packed_decimal, DW_ATE_numeric_string, DW_ATE_edited, + DW_ATE_signed_fixed, DW_ATE_unsigned_fixed): New. + (DW_DS_unsigned, DW_DS_leading_overpunch, DW_DS_trailing_overpunch, + DW_DS_leading_separate, DW_DS_trailing_separate): New. + (DW_END_default, DW_END_big, DW_END_little): New. + (DW_END_lo_user, DW_END_hi_user): Define. + (DW_LNE_lo_user, DW_LNE_hi_user): Define. + (DW_CFA_val_offset, DW_CFA_val_offset_sf, DW_CFA_val_expression): New. + (DW_LANG_PLI, DW_LANG_ObjC, DW_LANG_ObjC_plus_plus, DW_LANG_UPC, + DW_LANG_D): New. + +2006-02-06 Steve Ellcey + + * ia64.h (SHF_IA_64_HP_TLS): New. + +2006-02-24 DJ Delorie + + * m32c.h: Add relax relocs. + +2006-02-17 Shrirang Khisti + Anil Paranjape + Shilin Shakti + + * common.h (EM_XC16X): New entry for xc16x cpu. + Sort other EM_* numbers into numerical order. + * xc16x.h: New file. + +2006-02-10 H.J. Lu + + PR binutils/2258 + * internal.h (ELF_IS_SECTION_IN_SEGMENT_FILE): New. + (ELF_IS_SECTION_IN_SEGMENT_MEMORY): Likewise. + +2006-02-07 Nathan Sidwell + + * m68k.h (EF_CPU32, EF_M68000, EF_CFV4E): Rename to ... + (EF_M68K_CPU32, EF_M68K_M68000, EF_M68K_CFV4E): ... here. + (EF_M68K_ISA_MASK, EF_M68K_ISA_A, EF_M68K_M68K_ISA_A_PLUS, + EF_M68K_ISA_B, EF_M68K_HW_DIV, EF_M68K_MAC_MASK, EF_M68K_MAC, + EF_M68K_EMAC, EF_M68K_USP, EF_M68K_FLOAT): New. + +2006-02-06 Steve Ellcey + + * ia64.h (SHF_IA_64_HP_TLS): New. + +2006-01-18 Alexandre Oliva + + Introduce TLS descriptors for i386 and x86_64. + * common.h (DT_TLSDESC_GOT, DT_TLSDESC_PLT): New. + * i386.h (R_386_TLS_GOTDESC, R_386_TLS_DESC_CALL, R_386_TLS_DESC): + New. + * x86-64.h (R_X86_64_GOTPC32_TLSDESC, R_X86_64_TLSDESC_CALL, + R_X86_64_TLSDESC): New. + +2006-01-09 Mike Frysinger : + + * common.h (EM_ALTERA_NIOS2, EM_NIOS32) Define. + +2005-12-16 Nathan Sidwell + + Second part of ms1 to mt renaming. + * common.h (EM_MT): Renamed. + * mt.h: Rename relocs, cpu & other defines. + +2005-12-12 Nathan Sidwell + + * mt.h: Renamed from ms1.h + +2005-12-12 Paul Brook + + * arm.h (elf32_arm_get_eabi_attr_int): Add prototype. + +2005-11-11 Nick Clifton + + PR 1150 + * mips.h (STO_OPTIONAL): Define. + (ELF_MIPS_IS_OPTIONAL): Define. + +2005-11-07 Nathan Sidwell + + Add ms2. + * ms1.h (EF_MS1_CPU_MS2): New. + +2005-11-06 John David Anglin + + * hppa.h (R_PARISC_DIR64WR, R_PARISC_DIR64DR): Remove relocs. + +2005-09-30 Catherine Moore + + * bfin.h: New file. + * common.h (EM_BLACKFIN): Define. + +2005-10-08 Paul Brook + + * arm.h: Add prototypes for BFD object attribute routines. + +2005-09-09 Richard Earnshaw + + * arm.h (SHT_ARM_PREEMPTMAP, SHT_ARM_ATTRIBUTES): New defines. + +2005-08-09 John David Anglin + + * hppa.h (SHT_PARISC_DLKM, SHF_PARISC_WEAKORDER, PT_PARISC_WEAKORDER): + New defines. + +2005-08-04 John David Anglin + + * hppa.h (PF_HP_CODE, PF_HP_MODIFY, PF_HP_LAZYSWAP): Revise defines. + (PF_HP_CODE_DEPR, PF_HP_MODIFY_DEPR, PF_HP_LAZYSWAP_DEPR): New + deprecated defines. + (DT_HP_EPLTREL, DT_HP_EPLTRELSZ, DT_HP_FILTERED, DT_HP_FILTER_TLS, + DT_HP_COMPAT_FILTERED, DT_HP_LAZYLOAD, DT_HP_BIND_NOW_COUNT, DT_PLT, + DT_PLT_SIZE, DT_DLT, DT_DLT_SIZE, DT_HP_BIND_DEPTH_FIRST, DT_HP_GST, + DT_HP_SHLIB_FIXED, DT_HP_MERGE_SHLIB_SEG, DT_HP_NODELETE, DT_HP_GROUP, + DT_HP_PROTECT_LINKAGE_TABLE, PT_HP_OPT_ANNOT, PT_HP_HSL_ANNOT, + PT_HP_STACK, PT_HP_CORE_UTSNAME, NT_HP_COMPILER, NT_HP_COPYRIGHT, + NT_HP_VERSION, NT_HP_SRCFILE_INFO, NT_HP_LINKER, NT_HP_INSTRUMENTED, + NT_HP_UX_OPTIONS): Define. + +2005-07-25 DJ Delorie + + * m32c.h: Add R_M32C_8, R_M32C_LO16, R_M32C_HI8, and R_M32C_HI16. + +2005-07-25 Jan Hubicka + + * x86-64.h (SHN_X86_64_LCOMMON): New. + (SHF_X86_64_LARGE): New. + +2005-07-20 Kazuhiro Inaoka + + * m32r.h (R_M32R_REL32): Added. + +2005-07-18 Ben Elliston + + * dwarf2.h (enum dwarf_type): Remove DW_AT_GNU_decimal_float. + Replace with DW_ATE_decimal_float (now in DWARF 3). + +2005-07-14 Jim Blandy + + Add support for Renesas M32C and M16C. + * common.h (EM_M32C): New machine number. + * m32c.h: New file. + +2005-06-17 Jakub Jelinek + + * external.h (GRP_ENTRY_SIZE): Define. + +2005-06-17 Jan Beulich + + * x86-64.h (elf_x86_64_reloc_type): Adjust comment for + R_X86_64_GOTPCREL. Add R_X86_64_PC64, R_X86_64_GOTOFF64, and + R_X86_64_GOTPC32. + +2005-06-07 Aldy Hernandez + Michael Snyder + Stan Cox + + * common.h (EM_MS1): Define. + + * ms1.h: New file. + +2005-05-31 Richard Henderson + + * alpha.h (LITUSE_ALPHA_JSRDIRECT): New. + +2005-05-29 Richard Henderson + + * alpha.h (DT_ALPHA_PLTRO): New. + +2005-05-19 Ben Elliston + + * dwarf2.h (enum dwarf_type): Assign DW_ATE_GNU_decimal_float from + the user-defined encoding space pending inclusion in the standard. + +2005-05-18 Zack Weinberg + + * arm.h: Make all #ifndef OLD_ARM_ABI blocks + unconditional, delete all #ifdef OLD_ARM_ABI blocks. + +2005-05-17 Zack Weinberg + + * arm.h: Import complete list of official relocation names + and numbers from AAELF. Define FAKE_RELOCs for old names. + Remove a few old names no longer used anywhere. + +2005-05-14 Alan Modra + + * ppc.h (DT_PPC_GOT): Rename from DT_PPC_GLINK. + +2005-05-11 Alan Modra + + * ppc.h (R_PPC_RELAX32, R_PPC_RELAX32PC, R_PPC_RELAX32_PLT, + R_PPC_RELAX32PC_PLT) Adjust. + (R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI, R_PPC_REL16_HA): Define. + (DT_PPC_GLINK): Define. + +2005-05-10 Nick Clifton + + * Update the address and phone number of the FSF organization in + the GPL notices in the following files: + alpha.h, arc.h, arm.h, avr.h, common.h, cr16c.h, cris.h, crx.h, + d10v.h, d30v.h, dlx.h, dwarf.h, dwarf2.h, external.h, fr30.h, + frv.h, h8.h, hppa.h, i370.h, i386.h, i860.h, i960.h, ia64.h, + internal.h, ip2k.h, iq2000.h, m32r.h, m68hc11.h, m68k.h, mcore.h, + mips.h, mmix.h, mn10200.h, mn10300.h, msp430.h, openrisc.h, + or32.h, pj.h, ppc.h, ppc64.h, reloc-macros.h, s390.h, sh.h, + sparc.h, v850.h, vax.h, x86-64.h, xstormy16.h, xtensa.h + +2005-04-13 H.J. Lu + + Moved from ../ChangeLog + + 2004-10-27 Richard Earnshaw + * arm.h: Add R_ARM_CALL and R_ARM_JUMP32. + + 2004-10-12 Paul Brook + * arm.h (EF_ARM_EABI_VER4): Define. + + 2004-10-08 Daniel Jacobowitz + + * common.h (PT_SUNW_EH_FRAME): Define. + * x86-64.h (SHT_X86_64_UNWIND): Define. + + 2004-10-07 Bob Wilson + * xtensa.h (R_XTENSA_DIFF8, R_XTENSA_DIFF16, R_XTENSA_DIFF32, + R_XTENSA_SLOT*_OP, R_XTENSA_SLOT*_ALT): New relocations. + (XTENSA_PROP_SEC_NAME): Define. + (property_table_entry): Add flags field. + (XTENSA_PROP_*, GET_XTENSA_PROP_*, SET_XTENSA_PROP_*): Define. + + 2004-09-17 Paul Brook + * arm.h: Remove R_ARM_STKCHK and R_ARM_THM_STKCHK. + Add R_ARM_TARGET2, R_ARM_PREL31, R_ARM_GOT_ABS, R_ARM_GOT_PREL, + R_ARM_GOT_BREL12, R_ARM_GOTOFF12 and R_ARM_GOTRELAX. + + 2004-09-13 Paul Brook + * arm.h: Rename RELABS to TARGET1. + + 2004-05-11 Jakub Jelinek + * common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments. + (PT_GNU_RELRO): Define. + +2005-03-29 Daniel Jacobowitz + Phil Blundell + + * arm.h: Add TLS relocations. + +2005-03-23 Ben Elliston + + * dwarf.h: Merge with GCC's dwarf.h. + +2005-03-18 C Jaipraash + + * m68k.h (EF_CFV4E): Define. + +2005-03-17 Paul Brook + Dan Jacobowitz + Mark Mitchell + + * arm.h (PT_ARM_EXIDX): Define. + +2005-03-02 Daniel Jacobowitz + Joseph Myers + + * mips.h: Define MIPS TLS relocations. + +2005-02-15 Nigel Stephens + Maciej W. Rozycki + + * mips.h (R_MIPS16_GOT16): New reloc code. + (R_MIPS16_CALL16): Likewise. + (R_MIPS16_HI16): Likewise. + (R_MIPS16_LO16): Likewise. + (R_MIPS16_min): New fake reloc code. + (R_MIPS16_max): Likewise. + +2005-02-11 Maciej W. Rozycki + + * mips.h (R_MIPS_max): Use FAKE_RELOC to define. + +2005-01-25 Alexandre Oliva + + 2004-12-10 Alexandre Oliva + * frv.h: Add R_FRV_TLSMOFF. + 2004-11-10 Alexandre Oliva + * frv.h: Add TLS relocations. + +2005-01-17 Nick Clifton + + * sh.h (EF_SH2A_SH4_NOFPU, EF_SH2A_SH3_NOFPU, EF_SH2A_SH4, + EF_SH2A_SH3E): New flags. + (EF_SH_BFD_TABLE): Add these new flags to the table. + +2005-01-12 Alan Modra + + * ppc.h (R_PPC_RELAX32_PLT, R_PPC_RELAX32PC_PLT): Define. + (R_PPC_RELAX32, R_PPC_RELAX32PC): Adjust value. + +2004-12-22 Klaus Rudolph + + * avr.h (R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW): New relocs. + +2004-12-16 Richard Sandiford + + * v850.h (R_V850_LO16_SPLIT_OFFSET): New reloc. + +2004-12-09 Ian Lance Taylor + + * mips.h (E_MIPS_MACH_9000): Define. + +2004-11-04 Hans-Peter Nilsson + + * cris.h (EF_CRIS_VARIANT_MASK, EF_CRIS_VARIANT_ANY_V0_V10) + (EF_CRIS_VARIANT_V32, EF_CRIS_VARIANT_COMMON_V10_V32): New + macros. + +2004-10-06 Eric Christopher + + * dwarf2.h: Sync with gcc dwarf2.h. Fix typo. + +2004-10-01 Paul Brook + + * arm.h (SHT_ARM_EXIDX): Define. + (ELF_STRING_ARM_unwind, ELF_STRING_ARM_unwind, + ELF_STRING_ARM_unwind_once, ELF_STRING_ARM_unwind_info_once): + Define. + +2004-08-25 Dmitry Diky + + * msp430.h: Add new relocs. + +2004-08-12 H.J. Lu + + * i386.h (R_386_USED_BY_INTEL_200): New. + +2004-07-29 Alexandre Oliva + + Introduce SH2a support. + 2004-02-18 Corinna Vinschen + * sh.h (EF_SH2A_NOFPU): New. + 2003-12-01 Michael Snyder + * sh.h (EF_SH2A): New. + +2004-07-27 Tomer Levi + + * crx.h: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16, + BFD_RELOC_CRX_SWITCH32. + +2004-07-06 Tomer Levi + + * common.h (EM_CRX): Define. + * crx.h: New file. + +2004-06-25 Kazuhiro Inaoka + + * m32r.h: Add defintions of R_M32R_GOTOFF_HI_ULO, + R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO. + +2004-06-19 Alan Modra + + * common.h (ELF64_R_INFO): Warning fix. + +2004-06-14 Chris Demetriou + + * mips.h (R_MIPS_PC32): Add back (undoing removal on 2004-04-24), + with an updated comment. + +2004-05-28 Andrew Stubbs + + * sh.h (EF_SH_HAS_DSP): Remove. + (EF_SH_HAS_FP): Remove. + (EF_SH_MERGE_MACH): Remove. + (EF_SH4_NOFPU): Convert to decimal. + (EF_SH4A_NOFPU): Likewise. + (EF_SH4_NOMMU_NOFPU): Likewise. + (EF_SH3_NOMMU): Add new macro. + (EF_SH_BFD_TABLE): Likewise. + (sh_find_elf_flags): Add prototype. + (sh_elf_get_flags_from_mach): Likewise. + +2004-04-24 Chris Demetriou + + * mips.h (R_MIPS_PC32, R_MIPS_PC64, R_MIPS_GNU_REL_LO16) + (R_MIPS_GNU_REL_HI16): Remove. + (R_MIPS_GNU_REL16_S2): Update comment. + +2004-30-30 Galit Heller + Tomer Levi + + * common.h (EM_CR): Define. + * cr16c.h: New file. + +2004-03-23 Paul Brook + + * arm.h (EF_ERM_BE8, EF_ARM_LE8, EF_ARM_EABI_VER3): Add. + +2003-03-03 Andrew Stubbs + + * sh.h: Add EF_SH4_NOMMU_NOFPU. + +2004-03-01 Richard Sandiford + + * frv.h (EF_FRV_CPU_FR405, EF_FRV_CPU_FR450): Define. + +2004-01-28 Roland McGrath + + * common.h (AT_SECURE): New macro. + +2004-01-21 Roland McGrath + + * common.h (AT_SUN_UID, AT_SUN_RUID, AT_SUN_GID): New macros. + (AT_SUN_RGID, AT_SUN_LDELF, AT_SUN_LDSHDR, AT_SUN_LDNAME, + AT_SUN_LPAGESZ, AT_SUN_PLATFORM, AT_SUN_HWCAP, AT_SUN_IFLUSH, + AT_SUN_CPU, AT_SUN_EMUL_ENTRY, AT_SUN_EMUL_EXECFD, + AT_SUN_EXECNAME) AT_SUN_MMU, AT_SUN_LDDATA): Likewise. + +2004-01-17 Mark Kettenis + + * common.h (NT_OPENBSD_IDENT): Define. + +2004-01-06 Alexandre Oliva + + 2003-09-18 Alexandre Oliva + * frv.h (EF_FRV_FDPIC): New macro. + (EF_FRV_PIC_FLAGS): Adjust. + 2003-08-08 Alexandre Oliva + * frv.h (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12, + R_FRV_FUNCDESC_GOTOFFLO, R_FRV_FUNCDESC_GOTOFFHI, R_FRV_GOTOFF12, + R_FRV_GOTOFFLO, R_FRV_GOTOFFHI): New. + 2003-08-04 Alexandre Oliva + * frv.h (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO, R_FRV_FUNCDESC, + R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI, R_FRV_FUNCDESC_GOTLO): + New. + + +For older changes see ChangeLog-9103 + +Copyright (C) 2004-2015 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/support/sdbinutils/include/elf/ChangeLog-9103 b/support/sdbinutils/include/elf/ChangeLog-9103 new file mode 100644 index 0000000..6746d0a --- /dev/null +++ b/support/sdbinutils/include/elf/ChangeLog-9103 @@ -0,0 +1,1957 @@ +2005-04-13 H.J. Lu + + Moved from ../ChangeLog + + 2003-10-14 Bob Wilson + * xtensa.h: Formatting. Fix comments about property section + names for linkonce sections. + + 2003-05-23 Jakub Jelinek + * common.h (PT_GNU_STACK): Define. + + 2003-01-25 Jakub Jelinek + * sparc.h: Add TLS relocs. Move R_SPARC_REV32 to 252. + + 2002-09-26 Jakub Jelinek + * x86-64.h: Add TLS relocs. + + 2002-09-19 Jakub Jelinek + * i386.h (R_386_TLS_TPOFF, R_386_TLS_IE, R_386_TLS_GOTIE): + Define. + + 2002-07-10 Jakub Jelinek + * common.h (SHT_GNU_LIBLIST, DT_GNU_PRELINKED, + DT_GNU_CONFLICT*, DT_GNU_LIBLIST*): Define. + + 2002-05-31 Michal Ludvig + * dwarf2.h (DW_CFA_low_user, DW_CFA_high_user): Renamed + to DW_CFA_lo_user, DW_CFA_hi_user respectively. + + 2002-05-23 Jakub Jelinek + * common.h (PT_TLS, SHF_TLS, STT_TLS, DF_STATIC_TLS): Define. + * ia64.h (R_IA64_LTOFF_TPREL22): Renamed from R_IA64_LTOFF_TP22. + * i386.h: Add TLS relocs. + +2003-12-19 Kazuhiro Inaoka + + * m32r.h : Added m32r-linux and PIC support. Add new ABI that + uses RELA. + (R_M32R_16_RELA, R_M32R_32_RELA, R_M32R_24_RELA, + R_M32R_10_PCREL_RELA, R_M32R_18_PCREL_RELA, + R_M32R_26_PCREL_RELA, R_M32R_HI16_ULO_RELA, + R_M32R_HI16_SLO_RELA, R_M32R_LO16_RELA, + R_M32R_SDA16_RELA, R_M32R_RELA_GNU_VTINHERIT, + R_M32R_RELA_GNU_VTENTRY, R_M32R_GOT24, + R_M32R_26_PLTREL, R_M32R_COPY, R_M32R_GLOB_DAT, + R_M32R_JMP_SLOT, R_M32R_RELATIVE, R_M32R_GOTOFF, + R_M32R_GOTPC24, R_M32R_GOT16_HI_ULO, + R_M32R_GOT16_HI_SLO, R_M32R_GOT16_LO, + R_M32R_GOTPC_HI_ULO, R_M32R_GOTPC_HI_SLO, + R_M32R_GOTPC_LO): New relocs. + +2003-12-06 Alan Modra + + From Jan Beulich + * common.h (DT_HIOS): Correct value. + +2003-12-03 Kazuhiro Inaoka + + * m32r.h: Add new machine type m32r2 and instruction modes. + +2003-11-06 Alan Modra + + * ppc.h (R_PPC_RELAX32PC): Define. + +2003-10-22 Alexandre Oliva , + Michael Snyder + + * sh.h (EF_SH4A, EF_SH4AL_DSP, EF_SH4_NOFPU, EF_SH4A_NOFPU): New. + (EF_SH_MERGE_MACH): Combine them. + +2003-10-18 Hans-Peter Nilsson + + * mmix.h (R_MMIX_PUSHJ_STUBBABLE): New reloc number. + (_bfd_mmix_before_linker_allocation): Rename from + _bfd_mmix_prepare_linker_allocated_gregs. + (_bfd_mmix_after_linker_allocation): Rename from + _bfd_mmix_finalize_linker_allocated_gregs. + +2003-10-06 Dave Brolley + + * frv.h (EF_FRV_CPU_FR550): New macro. + +2003-09-30 Chris Demetriou + + * mips.h (E_MIPS_ARCH_64R2): New define. + +2003-09-23 DJ Delorie + + * sh.h (R_SH_SWITCH8, R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY, + R_SH_LOOP_START,R_SH_LOOP_END): Move to "reserved" spaces. + (R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U, + R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U, + R_SH_PSHA, R_SH_PSHL): New. + +2003-09-11 James Cownie + + * dwarf2.h: Add HP dwarf extensions from their hacked gdb + header files (ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz). + +2003-09-04 Nick Clifton + + * v850.h (E_V850E1_ARCH): Define. + +2003-08-21 James Cownie + + * dwarf2.h: Add PGI dwarf extensions. + +2003-08-08 Dmitry Diky + + * msp430.h: Add xW42 and xE42 parts. Sort MPU list according to + gcc order. + +2003-08-07 Alan Modra + + * reloc-macros.h (START_RELOC_NUMBERS) : Remove PARAMS macro. Use + C90 function definition. Formatting. + (RELOC_NUMBER): Remove !__STDC__ code. + +2003-07-28 Eric Christopher + + * ppc.h (R_PPC_RELAX32): New. Fake relocation. + +2003-07-25 H.J. Lu + + * v850.h (SHF_V850_GPREL): New. + (SHF_V850_EPREL): Likewise. + (SHF_V850_R0REL): Likewise. + +2003-07-09 Alexandre Oliva + + 2001-05-16 Alexandre Oliva + * mn10300.h: Introduce GOTPC16, GOTOFF24, GOTOFF16 and + PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32. + Renumbered all relocs. + 2001-04-12 Alexandre Oliva + * mn10300.h (R_MN10300_GOTPC, R_MN10300_GOTOFF, + R_MN10300_PLT32, R_MN10300_GOT32, R_MN10300_GOT24, + R_MN10300_GOT16, R_MN10300_COPY, R_MN10300_GLOB_DAT, + R_MN10300_JMP_SLOT, R_MN10300_RELATIVE): New relocs. + +2003-07-09 Alexandre Oliva + + 2000-04-01 Alexandre Oliva + * mn10300.h (E_MN10300_MACH_AM33_2): Renamed from + E_MN10300_MACH_AM332. + 2000-03-31 Alexandre Oliva + * mn10300.h (E_MN10300_MACH_AM332): Defined. + +2003-07-01 Martin Schwidefsky + + * s390.h (elf_s390_reloc_type): Add long displacement relocations + R_390_20, R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20. + +2003-06-29 Andreas Jaeger + + * mmix.h: Convert to ISO C90 prototypes. + * mips.h: Likewise. + +2003-06-13 Robert Millan + + * common.h (GNU_ABI_TAG_NETBSD): New tag. + (GNU_ABI_TAG_FREEBSD): New tag. + +2003-06-10 Richard Sandiford + + * h8.h (E_H8_MACH_H8300SXN): New flag. + +2003-06-03 Nick Clifton + + * v850.h (R_V850_32): Rename to R_V850_ABS32. + Add R_V850_REL32. + +2003-05-15 Roland McGrath + + * common.h (NT_AUXV, AT_*): New macros. + * external.h (Elf32_External_Auxv, Elf64_External_Auxv): New types. + * internal.h (Elf_Internal_Auxv): New type. + +2003-05-14 Michael Snyder + From Bernd Schmidt + * h8.h (E_H8_MACH_H8300SX): New. + +2003-04-24 Dhananjay Deshpande + + * h8.h (E_H8_MACH_H8300HN, E_H8_MACH_H8300SN): New + +2003-04-23 J"orn Rennecke + + * common.h (EM_SH): Amend comment to refer to SuperH. + +2003-04-22 Kazuhiro Inaoka + + * common.h: Replace references to Mitsubishi M32R with + references to Renesas M32R. + +2003-04-15 Rohit Kumar Srivastava + + * common.h: Replace occurrances of 'Hitachi' with 'Renesas'. + +2003-04-01 Bob Wilson + + * common.h (EM_XTENSA_OLD): Define. + * xtensa.h: New file. + +2003-04-01 Nick Clifton + + * arm.h (ARM_NOTE_SECTION): Include .gnu in the string. + +2003-03-25 Stan Cox + Nick Clifton + + Contribute support for Intel's iWMMXt chip - an ARM variant: + + * arm.h (ARM_NOTE_SECTION): Define. + +2003-03-03 J"orn Rennecke + + * sh.h (EF_SH_MERGE_MACH): Make sure SH2E & SH3/SH3E merge to SH3E, + and SH2E & SH4 merge to SH4, not SH2E. + +2003-02-21 Ian Wienand + + * ia64.h (SHT_IA_64_LOPSREG, SHT_IA_64_HIPSREG, + SHT_IA_64_PRIORITY_INIT): Define. + +2003-02-18 Alan Modra + + * ppc64.h (IS_PPC64_TLS_RELOC): Rename from IS_TLS_RELOC. + + * ppc.h: Replace DTPMOD64, TPREL64, DTPREL64 with DTPMOD32 etc. + (IS_PPC_TLS_RELOC): Define. + +2003-02-10 Nick Clifton + + * arm.h (EF_ARM_MAVERICK_FLOAT): Define. + +2003-02-05 Alan Modra + + * ppc.h: Add TLS relocs. Format. + * ppc64.h: Likewise. + +2003-01-27 Alexandre Oliva + + * mips.h (EF_MIPS_XGOT): Define. + +2003-01-24 Martin Schwidefsky + + * s390.h: Add s390 TLS relocations. + +2003-01-23 Nick Clifton + + * Add sh2e support: + + 2002-04-02 Alexandre Oliva + + * sh.h (EF_SH_MERGE_MACH): Handle SH2E. + + 2002-04-02 Elena Zannoni + + * sh.h (EF_SH2E): New. + +2003-01-23 Alan Modra + + * sh.h: Split out various bits to bfd/elf32-sh64.h. + +2003-01-20 Martin Schwidefsky + + * s390.h: Rename R_390_GOTOFF to R_390_GOTOFF32. Add new gotoff, + gotplt and pltoff relocations. + +2003-01-17 Alan Modra + + * common.h: Formatting, typo fixes. + (DT_ENCODING): Correct value. + +2003-01-17 Fabio Alemagna + + * common.h (ELFOSABI_AROS): Define. + (ELFOSABI_OPENVMS): Likewise. + (ELFOSABI_NSK): Likewise. + +2003-01-16 Alan Modra + + * ppc.h: Split out ppc64 definitions to.. + * pcc64.h: ..here. New file. + (R_PPC64_REL30): Rename from R_PPC64_ADDR30. + +2003-01-13 Dmitry Diky + + * elf/common.h (EM_MSP430): Change e_machine value to officially + assigned. + +2003-01-02 Ben Elliston + + * common.h (EM_IQ2000): Define. + * iq2000.h: New file. + +2002-12-30 Chris Demetriou + + * mips.h (E_MIPS_ARCH_32R2): New define. + +2002-12-24 Dmitry Diky + + * common.h: Define msp430 machine numbers. + * msp430.h: New file. Define msp430 relocs. + +2002-12-20 DJ Delorie + + * xstormy16.h: Add XSTORMY16_12. + +2002-12-16 Andrew MacLeod + + * xstormy16.h (START_RELOC_NUMBERS) Add relocation numbers + for R_XSTORMY16_LO16 and R_XSTORMY16_HI16. + +2002-12-10 James Cownie + + * dwarf2.h (DW_TAG_upc_shared_type, DW_TAG_upc_strict_type, + DW_TAG_upc_relaxed_type, DW_AT_upc_threads_scaled, DW_LANG_Upc): + Define. + +2002-12-01 Stephane Carrez + + * m68hc11.h (EF_M68HC12_MACH, EF_M68HCS12_MACH): Define. + (EF_M68HC11_MACH_MASK, EF_M68HC11_MACH): Define. + (EF_M68HC11_MERGE_MACH, EF_M68HC11_CAN_MERGE_MACH): Define. + +2002-11-30 Alan Modra + + * mmix.h: Replace boolean with bfd_boolean. + * sh.h: Likewise. + +2002-11-28 Alan Modra + + * internal.h (elf32_internal_ehdr, Elf32_Internal_Ehdr, + elf64_internal_ehdr, Elf64_Internal_Ehdr, elf32_internal_phdr, + Elf32_Internal_Phdr, elf64_internal_phdr, Elf64_Internal_Phdr, + elf32_internal_shdr, Elf32_Internal_Shdr, elf64_internal_shdr, + Elf64_Internal_Shdr, elf32_internal_sym, elf64_internal_sym, + Elf32_Internal_Sym, Elf64_Internal_Sym, Elf32_Internal_Note, + elf32_internal_note, elf32_internal_rel, Elf32_Internal_Rel, + elf64_internal_rel, Elf64_Internal_Rel, elf32_internal_rela, + elf64_internal_rela, Elf32_Internal_Rela, Elf64_Internal_Rela, + elf32_internal_dyn, elf64_internal_dyn, Elf32_Internal_Dyn, + Elf64_Internal_Dyn, elf32_internal_verdef, elf64_internal_verdef, + elf32_internal_verdaux, elf64_internal_verdaux, elf32_internal_verneed, + elf64_internal_verneed, elf32_internal_vernaux, elf64_internal_vernaux, + elf32_internal_versym, elf64_internal_versym, Elf32_Internal_Verdef, + Elf64_Internal_Verdef, Elf32_Internal_Verdaux, Elf64_Internal_Verdaux, + Elf32_Internal_Verneed, Elf64_Internal_Verneed, Elf32_Internal_Vernaux, + Elf64_Internal_Vernaux, Elf32_Internal_Versym, Elf64_Internal_Versym, + Elf32_Internal_Syminfo, Elf64_Internal_Syminfo): Delete. + (Elf_Internal_Rel): Delete. + +2002-10-11 Kaz Kojima + + * sh.h: Add SH TLS relocs. + +2002-09-30 Gavin Romig-Koch + Ken Raeburn + Aldy Hernandez + Eric Christopher + Richard Sandiford + + * mips.h (E_MIPS_MACH_4120, E_MIPS_MACH_5400, E_MIPS_MACH_5500): New. + +2002-09-12 Roland McGrath + + * dwarf2.h: Updates from GCC version of thie file: + (enum dwarf_location_atom): DW_OP_calli -> DW_OP_call_ref. + Add DW_OP_GNU_push_tls_address. + (DW_OP_lo_user): Change to 0xe0. + +2002-08-28 Catherine Moore + + * v850.h (R_V850_LONGCALL, R_V850_ALIGN, + R_V850_LONGJUMP): New relocations. + +2002-08-15 Alan Modra + + * i370.h: Define relocs using reloc-macros.h. + +2002-08-13 Stephane Carrez + + * m68hc11.h (E_M68HC12_BANKS, E_M68HC11_I32, E_M68HC11_F64, + EF_M68HC11_ABI): Define for ABI specification. + (STO_M68HC12_FAR, STO_M68HC12_INTERRUPT): Symbol flags for + linker and debugger. + (R_M68HC11_24, R_M68HC11_LO16, R_M68HC11_PAGE): New relocs. + (R_M68HC11_RL_JUMP, R_M68HC11_RL_GROUP): New reloc for linker + relaxation. + +2002-07-15 Denis Chertykov + Frank Ch. Eigler + Ben Elliston + Alan Lehotsky + John Healy + Graham Stott + Jeff Johnston + + * common.h (EM_IP2K): New macro. + (EM_IP2K_OLD): New macro. + * ip2k.h: New file. + +2002-07-01 Matt Thomas + + * vax.h: Rename EF_* to EF_VAX_*. + +2002-06-18 Dave Brolley + + From Catherine Moore, Michael Meissner, Dave Brolley: + * common.h (EM_CYGNUS_FRV): New macro. + * frv.h: New file. + +2002-06-06 Lars Brinkhoff + + * common.h: Change registry@sco.com to registry@caldera.com. + (EM_PDP10, EM_PDP11): Define. + +2002-06-04 Jason Thorpe + + * sh.h (_bfd_sh64_crange_qsort_cmpb, _bfd_sh64_crange_qsort_cmpl) + (_bfd_sh64_crange_bsearch_cmpb, _bfd_sh64_crange_bsearch_cmpl): New + prototypes. + +2002-06-01 Richard Henderson + + * alpha.h (LITUSE_ALPHA_ADDR, LITUSE_ALPHA_BASE, LITUSE_ALPHA_BYTOFF, + LITUSE_ALPHA_JSR, LITUSE_ALPHA_TLSGD, LITUSE_ALPHA_TLSLDM): New. + +2002-05-30 Richard Henderson + + * alpha.h (R_ALPHA_TLSGD, R_ALPHA_TLSLDM, R_ALPHA_DTPMOD64, + R_ALPHA_GOTDTPREL, R_ALPHA_DTPREL64, R_ALPHA_DTPRELHI, + R_ALPHA_DTPRELLO, R_ALPHA_DTPREL16, R_ALPHA_GOTTPREL, R_ALPHA_TPREL64, + R_ALPHA_TPRELHI, R_ALPHA_TPRELLO, R_ALPHA_TPREL16): New. + +2002-05-29 Matt Thomas + + * vax.h: New file + +2002-05-28 Kuang Hwa Lin + + * common.h (EM_DLX): Define. + * dlx.h: New file. + +2002-05-08 Jason Thorpe + + * common.h (NT_GNU_ABI_TAG): Define. + (GNU_ABI_TAG_LINUX): Define. + (GNU_ABI_TAG_HURD): Define. + (GNU_ABI_TAG_SOLARIS): Define. + (NT_NETBSD_IDENT): Define. + (NT_FREEBSD_ABI_TAG): Define. + +2002-04-24 Elena Zannoni + + * dwarf2.h: Add DW_AT_GNU_vector. + +2002-02-13 Matt Fredette + + * m68k.h (EF_M68000): Define. + +2002-02-12 Alan Modra + + * ppc.h (DT_PPC64_OPD, DT_PPC64_OPDSZ): Define. + +2002-02-09 Richard Henderson + + * alpha.h (R_ALPHA_BRSGP): New. + +2002-02-08 Alexandre Oliva + + Contribute sh64-elf. + 2002-01-23 Alexandre Oliva + * sh.h (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16, + R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16, + R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16, + R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16, + R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16, + R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16, + R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16, + R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, + R_SH_GOTPLT10BY8, R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, + R_SH_RELATIVE64): New relocs. + (R_SH_FIRST_INVALID_RELOC_4): Adjust. + 2001-05-16 Alexandre Oliva + * sh.h: Renumbered and renamed some SH5 relocations to match + official numbers and names; moved unmaching ones to the range + 0xf2-0xff. + 2001-01-06 Hans-Peter Nilsson + * sh.h (sh64_get_contents_type): Declare. + (sh64_address_is_shmedia): Likewise. + 2000-12-30 Hans-Peter Nilsson + * sh.h (sh64_elf_crange): New type. + (struct sh64_section_data): New. + (sh64_elf_section_data): New macro. + (EF_SH5): Rename back from EF_SH64. + 2000-12-18 Hans-Peter Nilsson + * sh.h (SHF_SH5_ISA32_MIXED, SHT_SH5_CR_SORTED, + SH64_CRANGES_SECTION_NAME, SH64_CRANGE_SIZE, + SH64_CRANGE_CR_ADDR_OFFSET, SH64_CRANGE_CR_SIZE_OFFSET, + SH64_CRANGE_CR_TYPE_OFFSET): New macros. + 2000-12-12 Hans-Peter Nilsson + * sh.h (EF_SH64): Don't define EF_SH64_ABI64. + 2000-11-27 Hans-Peter Nilsson + * sh.h (EF_SH64_32BIT_ABI, EF_SH64_64BIT_ABI): Delete. + (EF_SH64_ABI64): New. + 2000-11-23 Hans-Peter Nilsson + * sh.h (EF_SH64): Rename from EF_SH5. + (EF_SH64_32BIT_ABI): New. + (EF_SH64_64BIT_ABI): New. + (R_SH_PT_16, R_SH_SHMEDIA_CODE + R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2, + R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16, + R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16, + R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL, + R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL): New + relocs. + 2000-09-01 Ben Elliston + * sh.h (EF_SH5): Define. + +2002-02-01 Hans-Peter Nilsson + + * mmix.h: Tweak comments. + (MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME): New. + [BFD_ARCH_SIZE] (_bfd_mmix_prepare_linker_allocated_gregs, + _bfd_mmix_finalize_linker_allocated_gregs, + _bfd_mmix_check_all_relocs): Provide prototypes. + +2002-01-31 Ivan Guzvinec + + * or32.h: New file. + * common.h: Add support for or32 targets. + +2002-01-28 Jason Merrill + + * dwarf2.h: Sync with gcc version. + +2002-01-16 Alan Modra + + * ppc.h (DT_PPC64_GLINK): Define. + +2002-01-15 Richard Earnshaw + + * arm.h (F_VFP_FLOAT, EF_ARM_VFP_FLOAT): Define. + +2002-01-09 Jason Thorpe + + * common.h: Update copyright years. + (NT_NETBSDCORE_PROCINFO): Define. + (NT_NETBSDCORE_FIRSTMACH): Define. + +2002-01-06 Steve Ellcey + + * ia64.h (ELF_STRING_ia64_unwind_hdr): New Macro for HP-UX. + (SHT_IA_64_HP_OPT_ANOT): Ditto + (PT_IA_64_HP_OPT_ANOT): Ditto + (PT_IA_64_HP_HSL_ANOT): Ditto + (PT_IA_64_HP_STACK): Ditto + (SHN_IA_64_ANSI_COMMON): Ditto + +2001-12-17 Alan Modra + + * external.h (Elf_External_Sym_Shndx): Declare. + * internal.h (struct elf_internal_sym ): Make it an + unsigned int. + * common.h (SHN_BAD): Define. + +2001-12-13 Jakub Jelinek + + * common.h (PT_GNU_EH_FRAME): Define. + +2001-12-11 Alan Modra + + * common.h (SHN_XINDEX): Comment typo fix. + * internal.h (Elf_Internal_Ehdr): Change existing "unsigned short" + size, count and index fields to "unsigned int". + +2001-12-07 Geoffrey Keating + Richard Henderson + + * common.h (EM_XSTORMY16): Define. + * xstormy16.h: New file. + +2001-11-15 Alan Modra + + * common.h (NT_ARCH): Define. Remove incorrect comment. + +2001-11-11 Geoffrey Keating + + * dwarf2.h (dwarf_line_number_ops): Add DWARF 3 opcodes. + +2001-10-30 Hans-Peter Nilsson + + * mmix.h: New file. + +2001-10-23 Alan Modra + + * internal.h: White space changes to keep lines under 80 chars. + +2001-10-16 Jeff Holcomb + + * internal.h (elf_internal_shdr): Make contents a unsigned char *. + +2001-09-18 Alan Modra + + * internal.h (elf_internal_rela): Make r_addend a bfd_vma. + +2001-09-13 Alexandre Oliva + + * common.h (EM_OPENRISC_OLD): Renamed the old EM_OPENRISC entry. + +2001-09-12 Alexandre Oliva + + * common.h (EM_AVR_OLD): Renamed from... + (EM_AVR): this, redefined as in the current ELF standard. + (EM_PJ_OLD): Renamed from... + (EM_PJ): this, redefined as in the current ELF standard. + (EM_R30, EM_D10V, EM_D30V, EM_V850, EM_M32R, EM_MN10300, + EM_MN10200, EM_OPENRISC, EM_ARC_A5, EM_XTENSA): Defined as in + the current ELF standard. + (EM_CYGNUS_ARC): Removed, unused for a long time. + +2001-09-04 Richard Henderson + + * alpha.h (R_ALPHA_OP*, R_ALPHA_IMMED*, R_ALPHA_GPVALUE): Remove. + (R_ALPHA_GPREL16): Rename from R_ALPHA_IMMED_GP_16. + +2001-08-30 Eric Christopher + + * mips.h: Remove E_MIPS_MACH_MIPS32_4K. + +2001-08-29 Jeff Law + + * h8.h (EF_H8_MACH): New mask for encoded machine type. + (E_H8_MACH_H8300, E_H8_MACH_H8300H, E_H8_MACH_H8300S): New + machine types. + +2001-08-26 J"orn Rennecke + + * h8.h: New file. + +2001-08-27 Staffan Ulfberg + + * ppc.h: Add relocs from the 64-bit PowerPC ELF ABI revision 1.2. + +2001-06-30 Daniel Berlin + + * dwarf2.h: Remerge with gcc version, + including all new DWARF 2.1 extensions. + +2001-06-29 James Cownie + + * dwarf2.h: Add DWARF 2.1 attribues. + +2001-06-15 Per Bothner + + * dwarf2.h: Partial merge with gcc version. + (enum dwarf_descrim_list): Fix typo -> dwarf_discrim_list. + (DW_LANG_Java): Use value from dwarf 2.1 draft (also used in gcc). + +2001-05-15 Ralf Baechle + + * common.h: Remove definition of EM_MIPS_RS4_BE. The constant was + never in active use and is used otherwise by the ABI. + +2001-05-11 Jakub Jelinek + + * ia64.h (ELF_STRING_ia64_unwind_once): Define. + (ELF_STRING_ia64_unwind_info_once): Define. + +2001-05-07 Thiemo Seufer + + * external.h: Fix typo. + * mips.h: Add/Extend many comments with reference to the MIPS ELF64 + spec v. 2.4, available at e.g. + ftp://oss.sgi.com/pub/linux/mips/doc/ABI/ELF64.ps. + (EF_MIPS_UCODE): Define. + (EF_MIPS_OPTIONS_FIRST): Define. + (EF_MIPS_ARCH_ASE): Define. + (EF_MIPS_ARCH_ASE_MDMX): Define. + (EF_MIPS_ARCH_ASE_M16): Define. + (SHF_MIPS_ADDR): Renamed SHF_MIPS_ADDR32. + (SHF_MIPS_STRING): Renamed SHF_MIPS_ADDR64. + (SHF_MIPS_NODUPES): Define. + (ELF64_MIPS_R_SSYM): New MIPS ELF 64 relocation info access macro. + (ELF64_MIPS_R_TYPE3): Likewise. + (ELF64_MIPS_R_TYPE2): Likewise. + (ELF64_MIPS_R_TYPE): Likewise. + (OHW_R10KLDL): Define. + +2001-04-24 Todd Fries + + * sparc.h: Fix typo. + +2001-04-20 Johan Rydberg + + * openrisc.h: New file. + * common.h (EM_OPENRISC): New constant. + +2001-04-23 Bo Thorsen + + * x86-64.h: Add vtable support. + +2001-03-23 Nick Clifton + + * mips.h: Remove extraneous whitespace. + +2001-03-22 Hans-Peter Nilsson + + * cris.h: Add leading comment about PC-relative location. + (R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE, + R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT, + R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL): + New relocs. + +2001-02-27 Philip Blundell + + * arm.h: Add new definitions from ARM document SWS ESPC 0003 B-01. + (EF_PIC, et al.): Rename to EF_ARM_xx. + +2001-02-09 Martin Schwidefsky + + * common.h: Add linux target for S/390. + * s390.h: New file. + +2001-01-11 Peter Targett + + * arc.h (E_ARC_MACH_ARC5, E_ARC_MACH_ARC6, E_ARC_MACH_ARC7, + E_ARC_MACH_ARC8): New definitions for cpu types. + + * common.h (EM_ARC): Change comment. + +2000-12-12 Nick Clifton + + * mips.h: Fix formatting. + +2000-12-11 Jeffrey A Law (law@cygnus.com) + + * hppa.h (DT_HP_*): Define relative to OLD_DT_LOOS for hpux + compatibility. + +2000-10-16 Chris Demetriou + + * mips.h (E_MIPS_ARCH_32): New constant. + (E_MIPS_MACH_MIPS32, E_MIPS_MACH_MIPS32_4K): Replace the + former with the latter. + + * mips.h (E_MIPS_ARCH_5, E_MIPS_ARCH_64): New definitions. + + * mips.h (E_MIPS_MACH_SB1): New constant. + +2000-11-30 Jan Hubicka + + * common.h (EM_X86_64): New macro. + * x86-64.h: New file. + +2000-11-27 Hans-Peter Nilsson + + * common.h (e_machine numbers): Clarify comments to describe how + EM_* constants are assigned. Move EM_PJ from official section to + ad-hoc section. + (EM_CRIS): Correct comment to match official description. + (EM_MMIX): Ditto. + +2000-11-22 Nick Clifton + + * common.h (EM_JAVELIN): New machine number. + (EM_FIREPATH): New machine number. + (EM_ZSP): New machine number. + (EM_MMIX): New machine number. + (EM_HUANY): New machine number. + (EM_PRISM): New machine number. + (SHT_GROUP): New section type. + (SHT_SYMTAB_SHNDX): New section type. + (SHF_GROUP): New section flag. + (SHN_XINDEX): New section index. + (GRP_COMDAT): New section group flag. + +2000-11-20 H.J. Lu + + * common.h (ELFOSABI_MONTEREY): Renamed to ... + (ELFOSABI_AIX): This. + +2000-11-16 Richard Henderson + + Update relocations per August psABI docs. + * ia64.h (R_IA64_SEGBASE): Remove. + (R_IA64_LTV*): Renumber to 0x74 to 0x77. + (R_IA64_EPLTMSB, R_IA64_EPLTLSB): Remove. + (R_IA64_TPREL14, R_IA64_TPREL64I): New. + (R_IA64_DTPMOD*): New. + (R_IA64_DTPREL*): New. + +2000-09-29 Hans-Peter Nilsson + + * cris.h (EF_CRIS_UNDERSCORE): New. + +2000-09-27 Alan Modra + + * hppa.h (R_PARISC_DIR14F): Add. + +2000-09-14 Alexandre Oliva + + * sh.h (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT, + R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): Change + numbers to the range from 160 to 167. + (R_SH_FIRST_INVALID_RELOC): Adjust. + (R_SH_FIRST_INVALID_RELOC_2, R_SH_LAST_INVALID_RELOC_2): + New relocs to fill in the gap. + +2000-09-13 Anders Norlander + + * mips.h (E_MIPS_MACH_4K): New define. + +2000-09-05 Alan Modra + + * hppa.h: Fix a comment. + (R_PARISC_PCREL12F): Define. + (R_PARISC_GNU_VTENTRY): Define. + (R_PARISC_GNU_VTINHERIT): Define. + +2000-09-01 Alexandre Oliva + + * sh.h (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT, + R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New relocs. + (R_SH_FIRST_INVALID_RELOC): Adjust. + +2000-08-14 Jim Wilson + + * ia64.h (EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, + EF_IA_64_NOFUNCDESC_CONS_GP, EF_IA_64_ABSOLUTE): Define. + +2000-08-07 Nick Clifton + + * ppc.h: Remove spurious CYGNUS LOCAL comments. + * v850.h: Likewise. + +2000-07-22 Jason Eckhardt + + * i860.h: New file. + (elf_i860_reloc_type): Defined ELF32 i860 relocations. + +2000-07-20 Hans-Peter Nilsson + + common.h (EM_CRIS): New machine number. + cris.h: New file. + +2000-07-19 H.J. Lu + + * common.h (DF_1_NODEFLIB): Renamed from DF_1_NODEPLIB. + +2000-07-19 H.J. Lu + + * common.h (DT_CHECKSUM): Set to 0x6ffffdf8. + (DTF_1_CONFEXP): It is 0x00000002 as suspected. + +2000-07-19 H.J. Lu + + * common.h (DT_FEATURE): Renamed from DT_FEATURE_1. + (DT_CONFIG): New. From Solaris 8. + (DT_DEPAUDIT): Likewise. + (DT_AUDIT): Likewise. + (DT_PLTPAD): Likewise. + (DT_MOVETAB): Likewise. + (DF_1_NODEPLIB): Likewise. + (DF_1_NODUMP): Likewise. + (DF_1_CONLFAT): Likewise. + (DT_CHECKSUM): Likewise. FIXME. Check the value on Solaris 8. + (DTF_1_CONFEXP): Likewise. + +2000-07-18 H.J. Lu + + * common.h (DT_FLAGS_1): Renamed from DT_1_FLAGS. + +2000-07-12 Alan Modra + + * internal.h (struct elf_internal_sym): Update comment for st_other. + +2000-07-10 Alan Modra + + * hppa.h: Add comments to all the relocs. + +2000-06-26 Marek Michalkiewicz + + * avr.h (E_AVR_MACH_AVR5): Define. + +2000-06-18 Stephane Carrez + + * m68hc11.h: New file, definitions for the Motorola 68hc11. + +2000-06-06 Alan Modra + + * reloc-macros.h (START_RELOC_NUMBERS): Don't define initial dummy + -1 valued enum. + (RELOC_NUMBER, FAKE_RELOC, EMPTY_RELOC): Append rather than + prepend comma. + (END_RELOC_NUMBERS): Give macro an arg to define as last enum. + + * alpha.h (R_ALPHA_max): Define via END_RELOC_NUMBERS rather than + with EMPTY_RELOC. + * arc.h (R_ARC_max): Likewise. + * avr.h (R_AVR_max): Likewise. + * fr30.h (R_FR30_max): Likewise. + * hppa.h (R_PARISC_UNIMPLEMENTED): Likewise. + * i960.h (R_960_max): Likewise. + * m32r.h (R_M32R_max): Likewise. + * m68k.h (R_68K_max): Likewise. + * mcore.h (R_MCORE_max): Likewise. + * mn10300.h (R_MN10300_MAX): Likewise. + * pj.h (R_PJ_max): Likewise. + * ppc.h (R_PPC_max): Likewise. + * sh.h (R_SH_max): Likewise. + * sparc.h (R_SPARC_max): Likewise. + * v850.h (R_V850_max): Likewise. + + * arm.h (R_ARM_max): Define via END_RELOC_NUMBERS. + * d10v.h (R_D10V_max): Likewise. + * d30v.h (R_D30V_max): Likewise. + * ia64.h (R_IA64_max): Likewise. + * mips.h (R_MIPS_maxext): Likewise. + * mn10200.h (R_MN10200_max): Likewise. + + * i386.h (R_386_max): Remove old RELOC_NUMBER definition, and + define via END_RELOC_NUMBERS. + +2000-06-03 Alan Modra + + * reloc-macros.h (START_RELOC_NUMBERS): Fix name clash for + !__STDC__ case. + (RELOC_NUMBER): Use ansi stringify if ALMOST_STDC defined. + +2000-05-22 Richard Henderson + + * ia64.h (R_IA64_PCREL60B, R_IA64_PCREL21BI): New. + (R_IA64_PCREL22, R_IA64_PCREL64I): New. + +2000-05-02 H.J. Lu + + * common.h (ELFOSABI_NONE): Renamed from ELFOSABI_SYSV. + (ELFOSABI_MODESTO): Defined. + (ELFOSABI_OPENBSD): Likewise. + +2000-04-21 Richard Henderson + David Mosberger + + * ia64.h: New file. + +2000-04-14 H.J. Lu + + * common.h (ELFOSABI_TRUE64): Renamed to ELFOSABI_TRU64. + +2000-04-14 H.J. Lu + + * common.h (ELFOSABI_NETBSD): Defined. + (ELFOSABI_HURD): Likewise. + (ELFOSABI_SOLARIS): Likewise. + (ELFOSABI_MONTEREY): Likewise. + (ELFOSABI_IRIX): Likewise. + (ELFOSABI_FREEBSD): Likewise. + (ELFOSABI_TRUE64): Likewise. + +2000-04-07 Nick Clifton + + * arm-oabi.h: Delete. + * arm.h: Merge in definitions of old reloc numbers from + arm-oabi.h. + +2000-04-06 Nick Clifton + + * arm.h (EF_ARM_SYMSARESORTED): Define. + (EF_ARM_EABIMASK): Define. + (EF_ARM_EABI_VERSION): Define. + (EF_ARM_EABI_UNKNOWN): Define. + (EF_ARM_EABI_VER1): Define. + (PF_ARM_PI): Define. + (PF_ARM_ABS): Define. + +2000-04-05 J"orn Rennecke + + * sh.h (R_SH_LOOP_START, R_SH_LOOP_END): New RELOC_NUMBERs. + +2000-03-27 Denis Chertykov + + * avr.h: New file. AVR ELF support for BFD. + * common.h: Add AVR magic number. + +2000-03-10 Geoffrey Keating + + * mips.h: Add R_MIPS_GNU_REL_HI16, R_MIPS_GNU_REL_LO16, + R_MIPS_GNU_REL16_S2, R_MIPS_PC64 and R_MIPS_PC32 relocation + numbers. + +2000-02-23 Linas Vepstas + + * i370.h: New file. + +2000-02-22 Nick Clifton + + * common.h (ELF_ST_OTHER): Remove definition. + (ELF32_ST_OTHER): Remove definition. + (ELF64_ST_OTHER): Remove definition. + +2000-02-22 H.J. Lu + + * common.h (ELFOSABI_LINUX): Define. + +2000-02-17 J"orn Rennecke + + * sh.h: (EF_SH_MACH_MASK, EF_SH_UNKNOWN, EF_SH1, EF_SH2): New macros. + (EF_SH3, EF_SH_HAS_DSP, EF_SH_DSP, EF_SH3_DSP): Likewise. + (EF_SH_HAS_FP, EF_SH3E, EF_SH4, EF_SH_MERGE_MACH): Likewise. + +2000-02-03 H.J. Lu + + * arm-oabi.h: Duplicate changes made to arm.h on Jan. 27, + 2000 by Thomas de Lellis . + +2000-01-27 Thomas de Lellis + + * arm.h (STT_ARM_TFUNC): Define in terms of STT_LOPROC. + (STT_ARM_16BIT): New flag. Denotes a label that was defined in + Thumb block but was does not identify a function. + +2000-01-20 Nick Clifton + + * common.h (EM_MCORE): Fix spelling of Motorola. + * mcore.h (EM_MCORE): Fix spelling of Motorola. + +2000-01-13 Nick Clifton + + * common.h (EM_S370): Change comment - this is now the IBM + System/370. + (EM_IA_64): Change comment - this is now the IA-64. + +2000-01-11 Nick Clifton + + * common.h (DT_ENCODING): Fix definition of this value. + (DT_LOOS): Fix definition of this value. + (DT_HIOS): Fix definition of this value. + (OLD_DT_LOOS): Value of DT_LOOS before Oct 4, 1999 draft + of ELF spec changed it. + (OLD_DT_HIOS): Value of DT_HIOS before Oct 4, 1999 draft + of ELF spec changed it. + +2000-01-10 Egor Duda + + * common.h (NT_WIN32PSTATUS): Define. (cygwin elf core dumps). + +1999-12-28 Nick Clifton + + * mips.h (STO_*): Redefine in terms of STV_* values now in + common.h. + +1999-12-27 Nick Clifton + + * common.h: Upgrade to match Oct4, 1999 Draft ELF ABI Spec. + (EM_MIPS_RS3_LE): New machine number. + (EM_RCE): New machine number. + (EM_MMA): New machine number. + (EM_PCP): New machine number. + (EM_NCPU): New machine number. + (EM_NDR1): New machine number. + (EM_STARCORE): New machine number. + (EM_ME16): New machine number. + (EM_ST100): New machine number. + (EM_TINYJ): New machine number. + (EM_FX66): New machine number. + (EM_ST9PLUS): New machine number. + (EM_ST7): New machine number. + (EM_68HC16): New machine number. + (EM_68HC11): New machine number. + (EM_68HC08): New machine number. + (EM_68HC05): New machine number. + (EM_SVX): New machine number. + (EM_VAX): New machine number. + (PF_MASKOS): Change value. + (SHT_INIT_ARRAY): New value for sh_type field. + (SHT_FINI_ARRAY): New value for sh_type field. + (SHT_PREINIT_ARRAY): New value for sh_type field. + (SHT_HIUSER): Change value. + (SHF_MERGE): New valye for sh_flags field. + (SHF_STRINGS): New valye for sh_flags field. + (SHF_INFO_LINK): New valye for sh_flags field. + (SHF_OS_NONCONFORMING): New valye for sh_flags field. + (SHF_MASKOS): Change value. + (ELF_ST_VISIBILITY): New macro. + (ELF_ST_OTHER): New macro. + (STT_COMMON): New symbol type. + (STV_DEFAULT): Value for symbol visibility. + (STV_INTERNAL): Value for symbol visibility. + (STV_HIDDEN): Value for symbol visibility. + (STV_PROTECTED): Value for symbol visibility. + (DT_RUNPATH): New dynamic section tag. + (DT_FLAGS): New dynamic section tag. + (DT_ENCODING): New dynamic section tag. + (DT_PREINIT_ARRAY): New dynamic section tag. + (DT_PREINIT_ARRAYSZ): New dynamic section tag. + (DT_LOPROC): New dynamic section tag index. + (DT_HIPROC): New dynamic section tag index. + (DF_ORIGIN): Value for dynamic section flag. + (DF_SYMBOLIC): Value for dynamic section flag. + (DF_TEXTREL): Value for dynamic section flag. + (DF_BIND_NOW): Value for dynamic section flag. + +1999-12-09 Fred Fish + + * i960.h (reloc-macros.h): Include using relative dir elf/. + * i386.h (reloc-macros.h): Include using relative dir elf/. + * hppa.h (reloc-macros.h): Include using relative dir elf/. + +1999-12-07 Jim Blandy + + * common.h (NT_PRXFPREG): New definition. + +Wed Dec 1 03:02:15 1999 Jeffrey A Law (law@cygnus.com) + + * mn10300.h (E_MN10300_MACH_AM33): Define. + +Mon Oct 11 22:42:37 1999 Jeffrey A Law (law@cygnus.com) + + * hppa.h (PF_HP_PAGE_SIZE): Define. + (PF_HP_FAR_SHARED, PF_HP_NEAR_SHARED, PF_HP_CODE): Likewise. + (PF_HP_MODIFY, PF_HP_LAZYSWAP, PF_HP_SBP): Likewise. + +Mon Oct 4 17:42:38 1999 Doug Evans + + * m32r.h (E_M32RX_ARCH): Define. + +1999-09-15 Ulrich Drepper + + * hppa.h: Add DT_HP_GST_SIZE, DT_HP_GST_VERSION, and DT_HP_GST_HASHVAL. + +1999-09-04 Steve Chamberlain + + * pj.h: New file. + * common.h (EM_PJ): Define. + +1999-09-02 Ulrich Drepper + + * hppa.h: Add HPUX specific symbol type definitions. + + * hppa.h: Add HPUX specific dynamic and program header table + specific definitions. + +1999-08-31 Scott Bambrough + + * common.h (NT_TASKSTRUCT): Define. + +1999-07-16 Jakub Jelinek + + * sparc.h (EF_SPARC_SUN_US3): Define in Cheetah extensions + flag (as per SCD2.4.1). + +1999-07-16 Jakub Jelinek + + * sparc.h (ELF64_R_TYPE_DATA): Only use ELF64_R_TYPE bits, not + ELF64_R_SYM bits. + +1999-06-21 Philip Blundell + + * arm.h (EF_SOFT_FLOAT, F_SOFT_FLOAT): Define. + +1999-07-13 Andreas Schwab + + * m68k.h (EF_CPU32): Move definition inside multiple inclusion + guard. + +1999-07-08 Richard Henderson + + * sparc.h (ELF64_R_TYPE_DATA): Sign extend the value. + (ELF64_R_TYPE_INFO): Mask out all but low 24 bits of data. + (DT_SPARC_PLTFMT): Delete. + Based on a patch from Jakub Jelinek. + +Mon Jun 21 16:36:02 1999 Jeffrey A Law (law@cygnus.com) + + * hppa.h (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type. + +1999-06-10 Jakub Jelinek + + * sparc.h (R_SPARC_max_std): Define. + +Wed Jun 9 15:16:34 1999 Jeffrey A Law (law@cygnus.com) + + * hppa.h: Update with various changes from newest PA ELF + specifications. + +1999-06-03 Ian Lance Taylor + + * common.h (EM_PPC64): Define. + +1999-06-02 Stu Grossman + + * dwarf.h: Add LANG_JAVA. + * dwarf2.h: Add DW_LANG_Java. + +1999-05-29 Nick Clifton + + * common.h (ELFOSABI_ARM): Define. + +1999-05-28 Nick Clifton + + * reloc-macros.h: Update comment. + +1999-05-28 Ian Lance Taylor + + * i960.h: New file. + +1999-05-16 Nick Clifton + + * mcore.h (R_MCORE_COPY): Define. + (R_MCORE_GLOB_DAT): Define. + (R_MCORE_JUMP_SLOT): Define. + +1999-05-15 Nick Clifton + + * mcore.h (R_MCORE_RELATIVE): Define. + +1999-05-05 Catherine Moore + + * m68k.h (EF_CPU32): Define. + +1999-04-21 Nick Clifton + + * reloc-macros.h (START_RELOC_NUMBERS): Prepend an underscore to + fake reloc entry name (if possible), in order to avoid conflicts + with typedefs of the same name. + +1999-04-16 Gavin Romig-Koch + + * mips.h (EF_MIPS_32BITMODE): New. + +1999-04-08 Nick Clifton + + * mcore.h: New header file. Defines for Motorola's MCore + processor. + +1999-04-08 Nick Clifton + + * common.h: Add new constants defined in: "System V Application + Binary Interface - DRAFT - April 29, 1998" found at the web site: + http://www.sco.com/developer/gabi/contents.html + + (EM_MMA): Removed. Replaced with EM_MCORE as Motorolla own this + value. + +1999-03-31 Nick Clifton + + * reloc-macros.h: Fixed to not generate an enum with a trailing + comma. + +1999-03-16 Gavin Romig-Koch + + * mips.h (E_MIPS_MACH_5000): New. + +1999-03-10 Ulrich Drepper + + * common.h: Add definitions for a few more Solaris ELF extensions. + +Thu Feb 18 18:58:26 1999 Ian Lance Taylor + + * external.h: Only use attribute if __GNUC__ is defined. + +1999-02-17 Nick Clifton + + Patch submitted by: Scott Bambrough + + * external.h: struct Elf_External_Versym must be packed on + ARM. Code uses sizeof(Elf_External_Versym) and assumes it is + equal to sizeof(char[2]). Reported by Jim Pick + +1999-02-02 Nick Clifton + + * dwarf2.h (DWARF2_External_ARange): New structure. + (DWARF2_Internal_ARange): New structure. + +Mon Feb 1 11:33:56 1999 Catherine Moore + + * arm.h: Renumber relocs to conform to standard. + (EF_NEW_ABI): Define. + (EF_OLD_ABI): Define. + * arm-oabi.h: New file. + +1999-01-28 Nick Clifton + + * fr30.h: Add R_FR30_GNU_VT{INHERIT,ENTRY} relocs. + +1999-01-27 Nick Clifton + + * dwarf2.h: Add typedefs for structures found in dwarf2 sections. + +1998-12-16 Gavin Romig-Koch + + * mips.h (E_MIPS_MACH_4111): New. + +1998-12-15 Gavin Romig-Koch + + * mips.h (EF_MIPS_ABI,E_MIPS_ABI_O32,E_MIPS_ABI_O64, + E_MIPS_ABI_EABI32,E_MIPS_ABI_EABI64): + +1998-12-03 Nick Clifton + + * fr30.h: Add R_FR30_48 reloc. + +1998-12-02 Ulrich Drepper + + * mips.h: Add external data type for conflict section. + + * mips.h: Add more LL_* options from Irix 6.5. + + * mips.h: Add R_MIPS_JALR and adjust R_MIPS_max appropriately. + +Mon Nov 30 15:25:58 1998 J"orn Rennecke + + * sh.h (elf_sh_reloc_type): Add R_SH_FIRST_INVALID_RELOC, + R_SH_LAST_INVALID_RELOC, R_SH_SWITCH8 and R_SH_max. + +Tue Nov 10 15:12:28 1998 Nick Clifton + + * common.h (EM_CYGNUS_FR30): Reduce to a 16 bit value. + +Tue Nov 10 15:17:28 1998 Catherine Moore + + * d10v.h: Add vtable relocs. + +Wed Nov 4 15:56:50 1998 Nick Clifton + + * common.h (EM_CYGNUS_FR30): New machine number. + + * fr30.h: New file: Definitions for the FR30. + +Fri Oct 30 11:54:15 1998 Catherine Moore + + From Philip Blundell : + * arm.h (R_ARM_COPY, et al.): New relocs, used by Linux for PIC. + (EF_ALIGN8): New flag. + +Tue Oct 20 11:19:50 1998 Ian Lance Taylor + + * common.h (NT_LWPSTATUS): Close comment accidentally left open. + +Mon Oct 19 20:24:11 1998 Catherine Moore + + * sh.h: Add vtable relocs. + +Mon Oct 19 01:44:42 1998 Felix Lee + + * common.h (NT_PSTATUS, NT_FPREGS, NT_PSINFO, + NT_LWPSTATUS,NT_LWPSINFO): added. + * internal.h (Elf_Internal_Note): new structure members. + +Fri Oct 16 14:11:25 1998 Catherine Moore + + * m32r.h: Add vtable relocs. + +Tue Oct 6 09:22:22 1998 Catherine Moore + + * sparc.h: Add vtable relocs. + +Mon Oct 5 09:39:22 1998 Catherine Moore + + * v850.h: Add vtable relocs. + +Sun Oct 4 21:17:51 1998 Ian Lance Taylor + + * i386.h (R_386_max): Change from 252 to 24. + +Mon Sep 21 12:24:44 1998 Catherine Moore + + * i386.h: Change vtable reloc numbers. + +Sun Sep 20 00:54:22 1998 Andreas Schwab + + * m68k.h: Add vtable relocs and R_68K_max. + +Tue Sep 15 09:56:49 CDT 1998 Catherine Moore + + * arm.h: Add vtable relocs. + +Mon Aug 31 11:25:27 1998 Catherine Moore + + * arm.h: Define STT_ARM_TFUNC. Remove ST_THUMB_xxxx + definitions. + +Sat Aug 29 22:25:51 1998 Richard Henderson + + * i386.h: Add vtable relocs. + +1998-08-25 16:42 Ulrich Drepper + + * common.h: Add SYMINFO_* macros to access Elf*_Syminfo information. + + * external.h: Add Elf_External_Syminfo definition. + + * internal.h: Add Elf_Internal_Syminfo, Elf32_Internal_Syminfo, + and Elf64_Syminfo definitions. + +Sun Aug 9 20:26:49 CDT 1998 Catherine Moore + + * arm.h: Add ST_THUMB definitions. + +Wed Aug 5 15:52:35 1998 Nick Clifton + + * arm.h: Add ELF header flags to specify compile time optins: + EF_INTERWORK: New flag. + EF_APCS_26: New flag. + EF_APCS_FLOAT: New flag. + EF_PIC: New flag. + +1998-07-31 21:28 Ulrich Drepper + + * mips.h: Add missing RHF_* constants. + +Fri Jul 31 10:01:40 1998 Catherine Moore + + * arm.h: Add R_ARM_THM_PC9 relocation. + +1998-07-30 16:25 Ulrich Drepper + + * common.h: Add new DT_* entries and there flag macros from Solaris. + +Tue Jul 28 18:14:07 1998 Stan Cox + + * sparc.h: (R_SPARC_REV32): Added for little endian data e.g. sparc 86x. + +Fri Jul 24 11:22:06 1998 Jeffrey A Law (law@cygnus.com) + + * mn10300.h: Add R_MN10300_24 relocation. + +1998-07-24 Ulrich Drepper + + * mips.h: Add MIPS64 relocation names and values. + +Wed Jul 22 19:29:00 Catherine Moore + + * arm.h: Rename relocations. + +1998-07-22 Ulrich Drepper + + * ppc.h: Define enum as elf_ppc_reloc_type. + +Wed Jul 22 16:22:11 1998 Nick Clifton + + * reloc-macros.h: New file. Provides relocation macros: + START_RELOC_NUMBERS, RELOC_NUMBER, FAKE_RELOC, EMPTY_RELOC and + END_RELOC_NUMBERS used by other elf header files. + + * alpha.h: Use reloc-macros.h. + * arc.h: Use reloc-macros.h. + * arm.h: Use reloc-macros.h. + * d10v.h: Use reloc-macros.h. + * d30v.h: Use reloc-macros.h. + * hppa.h: Use reloc-macros.h. + * i386.h: Use reloc-macros.h. + * m32r.h: Use reloc-macros.h. + * m68k.h: Use reloc-macros.h. + * mips.h: Use reloc-macros.h. + * mn10200.h: Use reloc-macros.h. + * mn10300.h: Use reloc-macros.h. + * ppc.h: Use reloc-macros.h. + * sh.h: Use reloc-macros.h. + * sparc.h: Use reloc-macros.h. + * v850.h: Use reloc-macros.h. + +1998-07-22 13:07 Ulrich Drepper + + * mn10300.h: Rewrite relocation definition using macros. + * mips.h: Likewise. + * ppc.h: Likewise. + * alpha.h: Likewise. + * arm.h: Likewise. + * d10v.h: Likewise. + * d30v.h: Likewise. + * m32r.h: Likewise. + * m68k.h: Likewise. + * mn10200.h: Likewise. + * sh.h: Likewise. + * sparc.h: Likewise. + +1998-07-21 13:07 Ulrich Drepper + + * arm.h: New file. + * d10v.h: New file. + * d30v.h: New file. + * i386.h: New file. + * m68k.h: New file. + * mn10200.h: New file. + * sh.h: New file. + + * mips.h: Add R_MIPS_* and SHT_MIPS_* entries. + + * mn10300.h: Add R_MN10300_* entries. + + * ppc.h: Add R_PPC_* entries. + +1998-07-20 07:11 Ulrich Drepper + + * mips.h: Add ODK_*, OEX_*, OPAD_*, OHW_*, and OGP_* constants. + Define Elf32_External_Lib. + +1998-07-19 15:24 Ulrich Drepper + + * mips.h (PT_MIPS_OPTIONS): New symbol. + Add lots of DT_MIPS_* symbols. + +Fri Jun 26 10:46:35 1998 Jeffrey A Law (law@cygnus.com) + + * mn10300.h: New file. + +Thu Jun 18 19:27:56 1998 Nick Clifton + + * common.h (EM_960, EM_V800, EM_FR20, EM_RH32, EM_MMA, + EM_OLD_ALPHA): Add these constants. + +Thu Jun 11 17:59:01 1998 Nick Clifton + + * common.h (EM_486, EM_S370): Add these constants. + +Tue Jun 9 09:35:29 1998 Nick Clifton + + * common.h (EM_ARM): Add this constant. + +Wed May 6 09:45:30 1998 Gavin Koch + + * mips.h (EF_MIPS_MACH,E_MIPS_MACH_*): Added. + +Sat Apr 25 18:35:06 1998 Richard Henderson + + * alpha.h (STO_ALPHA_NOPV, STO_ALPHA_STD_GPLOAD): New. + +Wed Apr 15 15:42:45 1998 Richard Henderson + + * common.h (EM_SPARC64): Move and rename to EM_OLD_SPARCV9. + (EM_SPARCV9): New. This is the official ABI name and number. + +Sat Feb 28 17:04:41 1998 Richard Henderson + + * alpha.h (EF_ALPHA_32BIT, EF_ALPHA_CANRELAX): New. + +Mon Dec 15 15:07:49 1997 Nick Clifton + + * m32r.h (EF_M32R_ARCH, E_M32R_ARCH): New flags to + specify machine architecture. + +Fri Dec 5 11:20:08 1997 Nick Clifton + + * v850.h: New constants: SHN_V850_SCOMMON, SHN_V850_TCOMMON, + SHN_V850_ZCOMMON, SHT_V850_SCOMMON, SHT_V850_TCOMMON, + SHT_V850_ZCOMMON to handle v850 common sections. + enum reloc_type renamed to v850_reloc_type to avoid name + conflict. + +Thu Oct 23 13:55:24 1997 Richard Henderson + + * sparc.h (enum elf_sparc_reloc_type): Add UA64 & UA16. + +Thu Oct 23 00:42:04 1997 Richard Henderson + + * sparc.h (DT_SPARC_REGISTER): New macro. + (DT_SPARC_PLTFMT): In support of old sparc64-linux .plts; will + go away soon. + +Tue Sep 30 13:26:58 1997 Doug Evans + + * sparc.h (EF_SPARC_HAL_R1, EF_SPARC_EXT_MASK): New macros. + (EF_SPARCV9_{MM,TSO,PSO,RMO}): New macros. + (SHN_BEFORE,SHN_AFTER): New macros. + (SHF_EXCLUDE,SHF_ORDERED): New macros. + (STT_REGISTER): New macro. + (R_SPARC_GLOB_JMP): Deleted, but slot reserved. + (R_SPARC_{DISP64,PLT64,HIX22,LOX10}): New relocations. + (R_SPARC_{H44,M44,L44,REGISTER}): New relocations. + (ELF64_R_TYPE_{DATA,ID,INFO}): New macros. + +Wed Sep 17 16:41:42 1997 Nick Clifton + + * v850.h: Add R_V850_CALLT_6_7_OFFSET and R_V850_CALLT_16_16_OFFSET. + +Tue Sep 16 14:16:17 1997 Nick Clifton + + * v850.h (reloc_type): Add R_V850_TDA_16_16_OFFSET. + +Wed Sep 3 15:11:14 1997 Richard Henderson + + * mips.h: Correct typo in comment. + +Wed Sep 3 11:25:57 1997 Nick Clifton + + * v850.h (reloc_type): Remove R_V850_16_PCREL. + +Tue Sep 2 17:41:05 1997 Nick Clifton + + * common.h: Remove magic number for V850E. + * common.h: Remove magic number for V850EA. + * v850.h: Add new flags for e_flags field in elf header. + +Mon Aug 25 16:06:47 1997 Nick Clifton + + * common.h (EM_CYGNUS_V850E): backend magic number for v850e. + * common.h (EM_CYGNUS_V850EA): backend magic number for v850ea. + +Mon Aug 18 11:05:23 1997 Nick Clifton + + * v850.h (reloc_type): Add 16 bit PC relative relocation. + +Fri Aug 15 05:10:09 1997 Doug Evans + + * arc.h (enum reloc): Move here from elf32-arc.c. + +Fri Aug 8 17:05:29 1997 Doug Evans + + * arc.h: New file. + * common.h (EM_CYGNUS_ARC): Define. + +Mon Jun 16 14:46:12 1997 Ian Lance Taylor + + * internal.h (Elf_Internal_Ehdr): Change e_phoff and e_shoff from + bfd_signed_vma to bfd_size_type, as they are not signed. + +Wed Mar 5 15:35:26 1997 Doug Evans + + * m32r.h (SHF_M32R_CAN_RELAX): Define. + +Mon Feb 24 17:49:01 1997 Ian Lance Taylor + + * external.h: Dump the 32/64 bit specific forms of the version + structures, and just define them as size independent. + + * common.h (VERSYM_HIDDEN, VERSYM_VERSION): Define. + +Fri Feb 21 13:00:34 1997 Doug Evans + + * m32r.h (enum reloc_type): Add R_M32R_SDA16. + (SHN_M32R_SCOMMON): Define. + +Wed Feb 19 15:35:31 1997 Ian Lance Taylor + + From Eric Youngdale : + * external.h, internal.h, common.h: Added new structures and + definitions for ELF versions. + +Tue Feb 18 17:40:36 1997 Martin M. Hunt + + * common.h (EM_CYGNUS_D30V): Define. + +Mon Jan 27 11:54:44 1997 Doug Evans + + * m32r.h (enum reloc_type): Add R_M32R_HI16_[SU]LO,R_M32R_LO16. + +Fri Jan 3 11:32:51 1997 Michael Meissner + + * v850.h (V850_OTHER_{TDA_BYTE,ERROR}): New bits for the st_other + field. + (SHN_V850_*): Remove v850 specific section indexes, which are not + needed. + (enum reloc_type): Move the v850 relocations here from + elf32-v850.c + +Thu Jan 2 19:30:23 1997 Michael Meissner + + * v850.h: New file, provide V850 specific definitions. + +Tue Dec 31 14:44:32 1996 Ian Lance Taylor + + * common.h (DT_AUXILIARY): Define. + (DT_FILTER): Define. + +Wed Dec 4 05:03:37 1996 Jason Merrill + + * dwarf2.h: Update. + +Tue Nov 26 10:44:47 1996 Ian Lance Taylor + + * mips.h (STO_MIPS16): Define. + +Tue Nov 12 15:45:42 1996 Martin M. Hunt + + * d10v.h: Remove empty file. + +Tue Oct 8 11:31:24 1996 Ian Lance Taylor + + * mips.h (EF_MIPS_ABI2): Define. + +Thu Oct 3 10:01:40 1996 Jeffrey A Law (law@cygnus.com) + + * common.h: Break mn10x00 support into mn10200 and mn10300. + +Wed Oct 2 21:26:43 1996 Jeffrey A Law (law@cygnus.com) + + * common.h (EM_CYGNUS_MN10x00): Define. + +Mon Sep 23 09:18:04 1996 Doug Evans + + * m32r.h: New file. + +Fri Aug 30 17:06:21 1996 Ian Lance Taylor + + * common.h (EM_SH): Define. + +Tue Aug 20 14:47:54 1996 J.T. Conklin + + * common.h (EM_CYGNUS_V850): Define. + +Mon Aug 19 10:59:10 1996 Doug Evans + + * common.h (EM_CYGNUS_M32R): Define. + +Mon Jul 22 18:59:55 1996 Ian Lance Taylor + + * mips.h (SHT_MIPS_IFACE, SHT_MIPS_CONTENT): Define. + (SHT_MIPS_SYMBOL_LIB): Define. + (SHF_MIPS_MERGE, SHF_MIPS_ADDR32, SHF_MIPS_ADDR64): Define. + (SHF_MIPS_NOSTRIP, SHF_MIPS_LOCAL, SHF_MIPS_NAMES): Define. + +Thu Jul 18 19:12:15 1996 Stan Shebs + + * dwarf2.h: New file. + +Jul 18 13:20:39 1996 Martin M. Hunt + + * common.h (EM_CYGNUS_D10V): Define. + * d10v.h: New file. + +Fri Jun 21 12:33:24 1996 Richard Henderson + + * alpha.h: New file. + * common.h (EM_ALPHA): Define. + +Fri May 31 17:28:05 1996 Ian Lance Taylor + + * mips.h (Elf_External_Options, Elf_Internal_Options): Define. + (bfd_mips_elf_swap_options_in): Declare. + (bfd_mips_elf_swap_options_out): Declare. + (ODK_*): Define. + (Elf64_External_RegInfo, Elf64_Internal_RegInfo): Define. + (bfd_mips_elf64_swap_reginfo_in): Declare. + (bfd_mips_elf64_swap_reginfo_out): Declare. + +Thu May 30 12:35:57 1996 Ian Lance Taylor + + * mips.h (E_MIPS_ARCH_4): Define. + +Wed May 29 15:35:33 1996 Ian Lance Taylor + + * mips.h (Elf64_Mips_External_Rel): Define. + (Elf64_Mips_Internal_Rel): Define. + (Elf64_Mips_External_Rela, Elf64_Mips_Internal_Rela): Define. + (RSS_*): Define. + +Mon Apr 22 18:26:30 1996 Doug Evans + + * sparc.h (R_SPARC_[56]): Always define. + +Mon Feb 19 01:55:56 1996 Doug Evans + + * sparc.h (R_SPARC_{PLT32,HIPLT22,LOPLT10,PCPLT32,PCPLT22, + PCPLT10,5,6}): Don't define ifdef SPARC64_OLD_RELOCS. + +Tue Feb 6 11:33:58 1996 Doug Evans + + * sparc.h (enum sparc_elf_reloc_type): Define. + +Wed Jan 17 09:09:16 1996 Doug Evans + + * common.h: Define EM_SPARC32PLUS. + * sparc.h: New file. + +Thu Jan 11 16:27:34 1996 Michael Meissner + + * ppc.h (SHF_EXCLUDE, SHT_ORDERED): New fields from the abi. + +Thu Nov 30 16:47:18 1995 Ian Lance Taylor + + * internal.h (struct elf_segment_map): Add includes_filehdr and + includes_phdrs fields. + +Tue Nov 28 16:58:10 1995 Ian Lance Taylor + + * internal.h (struct elf_segment_map): Define. + +Tue Oct 31 15:19:36 1995 Fred Fish + + * common.h, dwarf.h, external.h, hppa.h, internal.h, + mips.h, ppc.h: Protect against multiple inclusions. + +Thu Sep 21 13:51:58 1995 Michael Meissner + + * ppc.h (EF_PPC_RELOCATABLE_LIB): Add new flag bit. + +Fri Sep 1 15:32:17 1995 Kazumoto Kojima + + * mips.h: Add some definitions used on Irix 5. + +Tue Jun 20 10:18:28 1995 Jeff Law (law@snake.cs.utah.edu) + + * hppa.h (CPU_PA_RISC1_0): Protect from redefinitions. + (CPU_PA_RISC1_1): Likewise. + +Wed Mar 8 18:14:37 1995 Michael Meissner + + * ppc.h: New file for PowerPC support. + +Tue Feb 14 13:59:13 1995 Michael Meissner + + * common.h (EM_PPC): Use offical value of 20, not 17. + (EM_PPC_OLD): Define this to be the old value of EM_PPC. + +Tue Jan 24 09:40:59 1995 Michael Meissner + + * common.h (EM_PPC): New macro, PowerPC machine id. + +Tue Jan 17 10:51:38 1995 Ian Lance Taylor + + * mips.h (SHT_MIPS_MSYM, SHT_MIPS_DWARF, SHT_MIPS_EVENTS): Define. + +Mon Oct 17 13:43:59 1994 Ian Lance Taylor + + * internal.h (Elf_Internal_Shdr): Remove rawdata and size fields. + Add bfd_section field. + +Tue May 24 16:11:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * mips.h (Elf32_External_gptab): Define. + +Mon May 16 13:22:04 1994 Jeff Law (law@snake.cs.utah.edu) + + * common.h (EM_HPPA): Delete. + (EM_PARISC): Add. + * hppa.h: New file. + +Mon May 9 13:27:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * common.h (SHN_LORESERVE): Rename from SHN_LORESERV. + (ELF32_R_TYPE, ELF32_R_INFO): Don't rely on size of unsigned char. + (ELF64_R_TYPE): Don't rely on size of unsigned long. + +Mon Apr 25 15:53:09 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * internal.h (Elf_Internal_Shdr): Use PTR, not void *. + +Fri Mar 11 00:34:59 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * mips.h (SHN_MIPS_TEXT, SHN_MIPS_DATA): Define. + +Sat Mar 5 14:08:54 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * internal.h: Remove Elf32_*, Elf64_* typedefs. These names + cause conflicts with system headers, e.g. link.h in gdb/solib.c. + Combine 32- and 64-bit versions of *_Internal_Dyn. + * common.h: Replace uses of Elf64_Word, Elf64_Xword typedefs + by their expansion. + * mips.h: Replace uses of Elf32_Word, Elf32_Sword, Elf32_Addr + typedefs by their expansion. Add DT_MIPS_RLD_MAP definition. + +Fri Feb 18 10:39:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * common.h (EM_CYGNUS_POWERPC): Define. This may be temporary, + depending upon how quickly I can find a real PowerPC ABI. + +Mon Feb 7 08:27:13 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * internal.h: Change HOST_64_BIT to BFD_HOST_64_BIT. + +Wed Feb 2 14:12:18 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * common.h: Add comments regarding value of EM_HPPA and how to + pick an unofficial value. + +Wed Nov 17 17:14:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * mips.h (SHT_MIPS_OPTIONS): Define. + +Mon Nov 8 17:57:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * mips.h: Added some more MIPS ABI macro definitions. + +Wed Nov 3 22:07:17 1993 Ken Raeburn (raeburn@rtl.cygnus.com) + + * common.h (EM_MIPS_RS4_BE): New macro. + +Tue Oct 12 07:28:18 1993 Ian Lance Taylor (ian@cygnus.com) + + * mips.h: New file. MIPS ABI specific information. + +Mon Jun 21 13:13:43 1993 Ken Raeburn (raeburn@poseidon.cygnus.com) + + * internal.h: Combined 32- and 64-bit versions of all structures + except *_Internal_Dyn. This will simply the assembler interface, + and some bfd code. + +Tue May 25 02:00:16 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * external.h, internal.h, common.h: Added 64-bit versions of some + structures and macros. Renamed old versions to put "32" in the + name. Some are unchanged. + +Thu Apr 29 12:12:20 1993 Ken Raeburn (raeburn@deneb.cygnus.com) + + * common.h (EM_HPPA, NT_VERSION, STN_UNDEF, DT_*): New macros. + * external.h (Elf_External_Dyn): New type. + + * internal.h (Elf_Intenral_Shdr): New field `size'. + (Elf_Internal_Dyn): New type. + +Tue Apr 20 16:03:45 1993 Fred Fish (fnf@cygnus.com) + + * dwarf.h (LANG_CHILL): Change value to one randomly picked in + the user defined range, to reduce probability of collisions. + +Sun Nov 15 09:34:02 1992 Fred Fish (fnf@cygnus.com) + + * dwarf.h (AT_src_coords): Whitespace change only. + * dwarf.h (AT_body_begin, AT_body_end, LANG_MODULA2): + Add from latest gcc. + * dwarf.h (LANG_CHILL): Add as GNU extension. + +Sat Aug 1 13:46:53 1992 Fred Fish (fnf@cygnus.com) + + * dwarf.h: Replace with current version from gcc distribution. + +Fri Jun 19 19:05:09 1992 John Gilmore (gnu at cygnus.com) + + * internal.h: Add real struct tags to all the Type_Defs, so they + can be used in prototypes where the Type_Defs are not known. + +Fri Apr 3 20:58:58 1992 Mark Eichin (eichin at cygnus.com) + + * common.h: added ELF_R_{SYM,TYPE,INFO} for handling relocation + info + added EM_MIPS, and corrected value of EM_860 based on System V ABI + manual. + + * external.h: added Elf_External_{Rel,Rela}. + + * internal.h: added Elf_Internal_{Rel,Rela}. + added rawdata to Elf_Internal_Shdr. + +Sat Nov 30 20:43:59 1991 Steve Chamberlain (sac at rtl.cygnus.com) + + * common.h, dwarf.h, external.h, internal.h, ChangeLog; moved from + ../elf- + + +Copyright (C) 1991-2003 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/support/sdbinutils/include/elf/aarch64.h b/support/sdbinutils/include/elf/aarch64.h new file mode 100644 index 0000000..4900fc5 --- /dev/null +++ b/support/sdbinutils/include/elf/aarch64.h @@ -0,0 +1,427 @@ +/* AArch64 ELF support for BFD. + + Copyright (C) 2009-2018 Free Software Foundation, Inc. + Contributed by ARM Ltd. + + This file is part of GNU Binutils. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the license, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING3. If not, + see . */ + +#ifndef _ELF_AARCH64_H +#define _ELF_AARCH64_H + +#include "elf/reloc-macros.h" + +/* Processor specific program header types. */ +#define PT_AARCH64_ARCHEXT (PT_LOPROC + 0) + +/* Additional section types. */ +#define SHT_AARCH64_ATTRIBUTES 0x70000003 /* Section holds attributes. */ + +/* AArch64-specific values for sh_flags. */ +#define SHF_ENTRYSECT 0x10000000 /* Section contains an + entry point. */ +#define SHF_COMDEF 0x80000000 /* Section may be multiply defined + in the input to a link step. */ + +/* Relocation types. */ + +START_RELOC_NUMBERS (elf_aarch64_reloc_type) + +/* Null relocations. */ +RELOC_NUMBER (R_AARCH64_NONE, 0) /* No reloc */ + +/* Basic data relocations. */ + +/* .word: (S+A) */ +RELOC_NUMBER (R_AARCH64_P32_ABS32, 1) + +/* .half: (S+A) */ +RELOC_NUMBER (R_AARCH64_P32_ABS16, 2) + +/* .word: (S+A-P) */ +RELOC_NUMBER (R_AARCH64_P32_PREL32, 3) + +/* .half: (S+A-P) */ +RELOC_NUMBER (R_AARCH64_P32_PREL16, 4) + +/* Group relocations to create a 16, 32, 48 or 64 bit + unsigned data or abs address inline. */ + +/* MOV[ZK]: ((S+A) >> 0) & 0xffff */ +RELOC_NUMBER (R_AARCH64_P32_MOVW_UABS_G0, 5) + +/* MOV[ZK]: ((S+A) >> 0) & 0xffff */ +RELOC_NUMBER (R_AARCH64_P32_MOVW_UABS_G0_NC, 6) + +/* MOV[ZK]: ((S+A) >> 16) & 0xffff */ +RELOC_NUMBER (R_AARCH64_P32_MOVW_UABS_G1, 7) + +/* Group relocations to create high part of a 16, 32, 48 or 64 bit + signed data or abs address inline. Will change instruction + to MOVN or MOVZ depending on sign of calculated value. */ + +/* MOV[ZN]: ((S+A) >> 0) & 0xffff */ +RELOC_NUMBER (R_AARCH64_P32_MOVW_SABS_G0, 8) + +/* Relocations to generate 19, 21 and 33 bit PC-relative load/store + addresses: PG(x) is (x & ~0xfff). */ + +/* LD-lit: ((S+A-P) >> 2) & 0x7ffff */ +RELOC_NUMBER (R_AARCH64_P32_LD_PREL_LO19, 9) + +/* ADR: (S+A-P) & 0x1fffff */ +RELOC_NUMBER (R_AARCH64_P32_ADR_PREL_LO21, 10) + +/* ADRH: ((PG(S+A)-PG(P)) >> 12) & 0x1fffff */ +RELOC_NUMBER (R_AARCH64_P32_ADR_PREL_PG_HI21, 11) + +/* ADD: (S+A) & 0xfff */ +RELOC_NUMBER (R_AARCH64_P32_ADD_ABS_LO12_NC, 12) + +/* LD/ST8: (S+A) & 0xfff */ +RELOC_NUMBER (R_AARCH64_P32_LDST8_ABS_LO12_NC, 13) + +/* LD/ST16: (S+A) & 0xffe */ +RELOC_NUMBER (R_AARCH64_P32_LDST16_ABS_LO12_NC, 14) + +/* LD/ST32: (S+A) & 0xffc */ +RELOC_NUMBER (R_AARCH64_P32_LDST32_ABS_LO12_NC, 15) + +/* LD/ST64: (S+A) & 0xff8 */ +RELOC_NUMBER (R_AARCH64_P32_LDST64_ABS_LO12_NC, 16) + +/* LD/ST128: (S+A) & 0xff0 */ +RELOC_NUMBER (R_AARCH64_P32_LDST128_ABS_LO12_NC, 17) + +/* Relocations for control-flow instructions. */ + +/* TBZ/NZ: ((S+A-P) >> 2) & 0x3fff. */ +RELOC_NUMBER (R_AARCH64_P32_TSTBR14, 18) + +/* B.cond: ((S+A-P) >> 2) & 0x7ffff. */ +RELOC_NUMBER (R_AARCH64_P32_CONDBR19, 19) + +/* B: ((S+A-P) >> 2) & 0x3ffffff. */ +RELOC_NUMBER (R_AARCH64_P32_JUMP26, 20) + +/* BL: ((S+A-P) >> 2) & 0x3ffffff. */ +RELOC_NUMBER (R_AARCH64_P32_CALL26, 21) + + +RELOC_NUMBER (R_AARCH64_P32_GOT_LD_PREL19, 25) +RELOC_NUMBER (R_AARCH64_P32_ADR_GOT_PAGE, 26) +RELOC_NUMBER (R_AARCH64_P32_LD32_GOT_LO12_NC, 27) +RELOC_NUMBER (R_AARCH64_P32_LD32_GOTPAGE_LO14, 28) + +RELOC_NUMBER (R_AARCH64_P32_TLSGD_ADR_PREL21, 80) +RELOC_NUMBER (R_AARCH64_P32_TLSGD_ADR_PAGE21, 81) +RELOC_NUMBER (R_AARCH64_P32_TLSGD_ADD_LO12_NC, 82) +RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADR_PREL21, 83) +RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADR_PAGE21, 84) +RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADD_LO12_NC, 85) +RELOC_NUMBER (R_AARCH64_P32_TLSLD_MOVW_DTPREL_G1, 87) +RELOC_NUMBER (R_AARCH64_P32_TLSLD_MOVW_DTPREL_G0, 88) +RELOC_NUMBER (R_AARCH64_P32_TLSLD_MOVW_DTPREL_G0_NC, 89) +RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADD_DTPREL_HI12, 90) +RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12, 91) +RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12_NC, 92) +RELOC_NUMBER (R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21, 103) +RELOC_NUMBER (R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC, 104) +RELOC_NUMBER (R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19, 105) +RELOC_NUMBER (R_AARCH64_P32_TLSLE_MOVW_TPREL_G1, 106) +RELOC_NUMBER (R_AARCH64_P32_TLSLE_MOVW_TPREL_G0, 107) +RELOC_NUMBER (R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC, 108) +RELOC_NUMBER (R_AARCH64_P32_TLSLE_ADD_TPREL_HI12, 109) +RELOC_NUMBER (R_AARCH64_P32_TLSLE_ADD_TPREL_LO12, 110) +RELOC_NUMBER (R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC, 111) + +RELOC_NUMBER (R_AARCH64_P32_TLSDESC_LD_PREL19, 122) +RELOC_NUMBER (R_AARCH64_P32_TLSDESC_ADR_PREL21, 123) +RELOC_NUMBER (R_AARCH64_P32_TLSDESC_ADR_PAGE21, 124) +RELOC_NUMBER (R_AARCH64_P32_TLSDESC_LD32_LO12_NC, 125) +RELOC_NUMBER (R_AARCH64_P32_TLSDESC_ADD_LO12_NC, 126) +RELOC_NUMBER (R_AARCH64_P32_TLSDESC_CALL, 127) + +/* Dynamic relocations */ + +/* Copy symbol at runtime. */ +RELOC_NUMBER (R_AARCH64_P32_COPY, 180) + +/* Create GOT entry. */ +RELOC_NUMBER (R_AARCH64_P32_GLOB_DAT, 181) + + /* Create PLT entry. */ +RELOC_NUMBER (R_AARCH64_P32_JUMP_SLOT, 182) + +/* Adjust by program base. */ +RELOC_NUMBER (R_AARCH64_P32_RELATIVE, 183) +RELOC_NUMBER (R_AARCH64_P32_TLS_DTPMOD, 184) +RELOC_NUMBER (R_AARCH64_P32_TLS_DTPREL, 185) +RELOC_NUMBER (R_AARCH64_P32_TLS_TPREL, 186) +RELOC_NUMBER (R_AARCH64_P32_TLSDESC, 187) +RELOC_NUMBER (R_AARCH64_P32_IRELATIVE, 188) + +RELOC_NUMBER (R_AARCH64_NULL, 256) /* No reloc */ + +/* Basic data relocations. */ + +/* .xword: (S+A) */ +RELOC_NUMBER (R_AARCH64_ABS64, 257) + +/* .word: (S+A) */ +RELOC_NUMBER (R_AARCH64_ABS32, 258) + +/* .half: (S+A) */ +RELOC_NUMBER (R_AARCH64_ABS16, 259) + +/* .xword: (S+A-P) */ +RELOC_NUMBER (R_AARCH64_PREL64, 260) + +/* .word: (S+A-P) */ +RELOC_NUMBER (R_AARCH64_PREL32, 261) + +/* .half: (S+A-P) */ +RELOC_NUMBER (R_AARCH64_PREL16, 262) + +/* Group relocations to create a 16, 32, 48 or 64 bit + unsigned data or abs address inline. */ + +/* MOV[ZK]: ((S+A) >> 0) & 0xffff */ +RELOC_NUMBER (R_AARCH64_MOVW_UABS_G0, 263) + +/* MOV[ZK]: ((S+A) >> 0) & 0xffff */ +RELOC_NUMBER (R_AARCH64_MOVW_UABS_G0_NC, 264) + +/* MOV[ZK]: ((S+A) >> 16) & 0xffff */ +RELOC_NUMBER (R_AARCH64_MOVW_UABS_G1, 265) + +/* MOV[ZK]: ((S+A) >> 16) & 0xffff */ +RELOC_NUMBER (R_AARCH64_MOVW_UABS_G1_NC, 266) + +/* MOV[ZK]: ((S+A) >> 32) & 0xffff */ +RELOC_NUMBER (R_AARCH64_MOVW_UABS_G2, 267) + +/* MOV[ZK]: ((S+A) >> 32) & 0xffff */ +RELOC_NUMBER (R_AARCH64_MOVW_UABS_G2_NC, 268) + +/* MOV[ZK]: ((S+A) >> 48) & 0xffff */ +RELOC_NUMBER (R_AARCH64_MOVW_UABS_G3, 269) + +/* Group relocations to create high part of a 16, 32, 48 or 64 bit + signed data or abs address inline. Will change instruction + to MOVN or MOVZ depending on sign of calculated value. */ + +/* MOV[ZN]: ((S+A) >> 0) & 0xffff */ +RELOC_NUMBER (R_AARCH64_MOVW_SABS_G0, 270) + +/* MOV[ZN]: ((S+A) >> 16) & 0xffff */ +RELOC_NUMBER (R_AARCH64_MOVW_SABS_G1, 271) + +/* MOV[ZN]: ((S+A) >> 32) & 0xffff */ +RELOC_NUMBER (R_AARCH64_MOVW_SABS_G2, 272) + +/* Relocations to generate 19, 21 and 33 bit PC-relative load/store + addresses: PG(x) is (x & ~0xfff). */ + +/* LD-lit: ((S+A-P) >> 2) & 0x7ffff */ +RELOC_NUMBER (R_AARCH64_LD_PREL_LO19, 273) + +/* ADR: (S+A-P) & 0x1fffff */ +RELOC_NUMBER (R_AARCH64_ADR_PREL_LO21, 274) + +/* ADRH: ((PG(S+A)-PG(P)) >> 12) & 0x1fffff */ +RELOC_NUMBER (R_AARCH64_ADR_PREL_PG_HI21, 275) + +/* ADRH: ((PG(S+A)-PG(P)) >> 12) & 0x1fffff */ +RELOC_NUMBER (R_AARCH64_ADR_PREL_PG_HI21_NC, 276) + +/* ADD: (S+A) & 0xfff */ +RELOC_NUMBER (R_AARCH64_ADD_ABS_LO12_NC, 277) + +/* LD/ST8: (S+A) & 0xfff */ +RELOC_NUMBER (R_AARCH64_LDST8_ABS_LO12_NC, 278) + +/* Relocations for control-flow instructions. */ + +/* TBZ/NZ: ((S+A-P) >> 2) & 0x3fff. */ +RELOC_NUMBER (R_AARCH64_TSTBR14, 279) + +/* B.cond: ((S+A-P) >> 2) & 0x7ffff. */ +RELOC_NUMBER (R_AARCH64_CONDBR19, 280) + +/* 281 unused */ + +/* B: ((S+A-P) >> 2) & 0x3ffffff. */ +RELOC_NUMBER (R_AARCH64_JUMP26, 282) + +/* BL: ((S+A-P) >> 2) & 0x3ffffff. */ +RELOC_NUMBER (R_AARCH64_CALL26, 283) + +/* LD/ST16: (S+A) & 0xffe */ +RELOC_NUMBER (R_AARCH64_LDST16_ABS_LO12_NC, 284) + +/* LD/ST32: (S+A) & 0xffc */ +RELOC_NUMBER (R_AARCH64_LDST32_ABS_LO12_NC, 285) + +/* LD/ST64: (S+A) & 0xff8 */ +RELOC_NUMBER (R_AARCH64_LDST64_ABS_LO12_NC, 286) + +/* Group relocations to create a 16, 32, 48, or 64 bit PC-relative + offset inline. */ + +RELOC_NUMBER (R_AARCH64_MOVW_PREL_G0, 287) +RELOC_NUMBER (R_AARCH64_MOVW_PREL_G0_NC, 288) +RELOC_NUMBER (R_AARCH64_MOVW_PREL_G1, 289) +RELOC_NUMBER (R_AARCH64_MOVW_PREL_G1_NC, 290) +RELOC_NUMBER (R_AARCH64_MOVW_PREL_G2, 291) +RELOC_NUMBER (R_AARCH64_MOVW_PREL_G2_NC, 292) +RELOC_NUMBER (R_AARCH64_MOVW_PREL_G3, 293) + +/* LD/ST128: (S+A) & 0xff0 */ +RELOC_NUMBER (R_AARCH64_LDST128_ABS_LO12_NC, 299) + +/* Group relocations to create a 16, 32, 48, or 64 bit GOT-relative + offset inline. */ + +RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G0, 300) +RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G0_NC, 301) +RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G1, 302) +RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G1_NC, 303) +RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G2, 304) +RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G2_NC, 305) +RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G3, 306) + +/* GOT-relative data relocations. */ + +RELOC_NUMBER (R_AARCH64_GOTREL64, 307) +RELOC_NUMBER (R_AARCH64_GOTREL32, 308) + +/* GOT-relative instruction relocations. */ + +RELOC_NUMBER (R_AARCH64_GOT_LD_PREL19, 309) +RELOC_NUMBER (R_AARCH64_LD64_GOTOFF_LO15, 310) +RELOC_NUMBER (R_AARCH64_ADR_GOT_PAGE, 311) +RELOC_NUMBER (R_AARCH64_LD64_GOT_LO12_NC, 312) +RELOC_NUMBER (R_AARCH64_LD64_GOTPAGE_LO15, 313) + +/* General Dynamic TLS relocations. */ + +RELOC_NUMBER (R_AARCH64_TLSGD_ADR_PREL21, 512) +RELOC_NUMBER (R_AARCH64_TLSGD_ADR_PAGE21, 513) +RELOC_NUMBER (R_AARCH64_TLSGD_ADD_LO12_NC, 514) +RELOC_NUMBER (R_AARCH64_TLSGD_MOVW_G1, 515) +RELOC_NUMBER (R_AARCH64_TLSGD_MOVW_G0_NC, 516) + +/* Local Dynamic TLS relocations. */ + +RELOC_NUMBER (R_AARCH64_TLSLD_ADR_PREL21, 517) +RELOC_NUMBER (R_AARCH64_TLSLD_ADR_PAGE21, 518) +RELOC_NUMBER (R_AARCH64_TLSLD_ADD_LO12_NC, 519) +RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_G1, 520) +RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_G0_NC, 521) +RELOC_NUMBER (R_AARCH64_TLSLD_LD_PREL19, 522) +RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_DTPREL_G2, 523) +RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_DTPREL_G1, 524) +RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, 525) +RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_DTPREL_G0, 526) +RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, 527) +RELOC_NUMBER (R_AARCH64_TLSLD_ADD_DTPREL_HI12, 528) +RELOC_NUMBER (R_AARCH64_TLSLD_ADD_DTPREL_LO12, 529) +RELOC_NUMBER (R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, 530) +RELOC_NUMBER (R_AARCH64_TLSLD_LDST8_DTPREL_LO12, 531) +RELOC_NUMBER (R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, 532) +RELOC_NUMBER (R_AARCH64_TLSLD_LDST16_DTPREL_LO12, 533) +RELOC_NUMBER (R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, 534) +RELOC_NUMBER (R_AARCH64_TLSLD_LDST32_DTPREL_LO12, 535) +RELOC_NUMBER (R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, 536) +RELOC_NUMBER (R_AARCH64_TLSLD_LDST64_DTPREL_LO12, 537) +RELOC_NUMBER (R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC, 538) + +/* Initial Exec TLS relocations. */ + +RELOC_NUMBER (R_AARCH64_TLSIE_MOVW_GOTTPREL_G1, 539) +RELOC_NUMBER (R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, 540) +RELOC_NUMBER (R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, 541) +RELOC_NUMBER (R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, 542) +RELOC_NUMBER (R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, 543) + +/* Local Exec TLS relocations. */ + +RELOC_NUMBER (R_AARCH64_TLSLE_MOVW_TPREL_G2, 544) +RELOC_NUMBER (R_AARCH64_TLSLE_MOVW_TPREL_G1, 545) +RELOC_NUMBER (R_AARCH64_TLSLE_MOVW_TPREL_G1_NC, 546) +RELOC_NUMBER (R_AARCH64_TLSLE_MOVW_TPREL_G0, 547) +RELOC_NUMBER (R_AARCH64_TLSLE_MOVW_TPREL_G0_NC, 548) +RELOC_NUMBER (R_AARCH64_TLSLE_ADD_TPREL_HI12, 549) +RELOC_NUMBER (R_AARCH64_TLSLE_ADD_TPREL_LO12, 550) +RELOC_NUMBER (R_AARCH64_TLSLE_ADD_TPREL_LO12_NC, 551) +RELOC_NUMBER (R_AARCH64_TLSLE_LDST8_TPREL_LO12, 552) +RELOC_NUMBER (R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, 553) +RELOC_NUMBER (R_AARCH64_TLSLE_LDST16_TPREL_LO12, 554) +RELOC_NUMBER (R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, 555) +RELOC_NUMBER (R_AARCH64_TLSLE_LDST32_TPREL_LO12, 556) +RELOC_NUMBER (R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, 557) +RELOC_NUMBER (R_AARCH64_TLSLE_LDST64_TPREL_LO12, 558) +RELOC_NUMBER (R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, 559) + +/* TLS descriptor relocations. */ + +RELOC_NUMBER (R_AARCH64_TLSDESC_LD_PREL19, 560) +RELOC_NUMBER (R_AARCH64_TLSDESC_ADR_PREL21, 561) +RELOC_NUMBER (R_AARCH64_TLSDESC_ADR_PAGE21, 562) +RELOC_NUMBER (R_AARCH64_TLSDESC_LD64_LO12, 563) +RELOC_NUMBER (R_AARCH64_TLSDESC_ADD_LO12, 564) +RELOC_NUMBER (R_AARCH64_TLSDESC_OFF_G1, 565) +RELOC_NUMBER (R_AARCH64_TLSDESC_OFF_G0_NC, 566) +RELOC_NUMBER (R_AARCH64_TLSDESC_LDR, 567) +RELOC_NUMBER (R_AARCH64_TLSDESC_ADD, 568) +RELOC_NUMBER (R_AARCH64_TLSDESC_CALL, 569) + +RELOC_NUMBER (R_AARCH64_TLSLE_LDST128_TPREL_LO12, 570) +RELOC_NUMBER (R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC, 571) +RELOC_NUMBER (R_AARCH64_TLSLD_LDST128_DTPREL_LO12, 572) +RELOC_NUMBER (R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC, 573) + +/* Dynamic relocations */ + +/* Copy symbol at runtime. */ +RELOC_NUMBER (R_AARCH64_COPY, 1024) + +/* Create GOT entry. */ +RELOC_NUMBER (R_AARCH64_GLOB_DAT, 1025) + + /* Create PLT entry. */ +RELOC_NUMBER (R_AARCH64_JUMP_SLOT, 1026) + +/* Adjust by program base. */ +RELOC_NUMBER (R_AARCH64_RELATIVE, 1027) +RELOC_NUMBER (R_AARCH64_TLS_DTPMOD64, 1028) +RELOC_NUMBER (R_AARCH64_TLS_DTPREL64, 1029) +RELOC_NUMBER (R_AARCH64_TLS_TPREL64, 1030) +/* Aliasing relocs are guarded by RELOC_MACROS_GEN_FUNC + so that readelf.c won't generate duplicated case + statements. */ +#ifndef RELOC_MACROS_GEN_FUNC +RELOC_NUMBER (R_AARCH64_TLS_DTPMOD, 1028) +RELOC_NUMBER (R_AARCH64_TLS_DTPREL, 1029) +RELOC_NUMBER (R_AARCH64_TLS_TPREL, 1030) +#endif +RELOC_NUMBER (R_AARCH64_TLSDESC, 1031) +RELOC_NUMBER (R_AARCH64_IRELATIVE, 1032) + +END_RELOC_NUMBERS (R_AARCH64_end) + +#endif /* _ELF_AARCH64_H */ diff --git a/support/sdbinutils/include/elf/alpha.h b/support/sdbinutils/include/elf/alpha.h new file mode 100644 index 0000000..73c79e6 --- /dev/null +++ b/support/sdbinutils/include/elf/alpha.h @@ -0,0 +1,131 @@ +/* ALPHA ELF support for BFD. + Copyright (C) 1996-2018 Free Software Foundation, Inc. + + By Eric Youngdale, . No processor supplement available + for this platform. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file holds definitions specific to the ALPHA ELF ABI. Note + that most of this is not actually implemented by BFD. */ + +#ifndef _ELF_ALPHA_H +#define _ELF_ALPHA_H + +/* Processor specific flags for the ELF header e_flags field. */ + +/* All addresses must be below 2GB. */ +#define EF_ALPHA_32BIT 0x00000001 + +/* All relocations needed for relaxation with code movement are present. */ +#define EF_ALPHA_CANRELAX 0x00000002 + +/* Processor specific section flags. */ + +/* This section must be in the global data area. */ +#define SHF_ALPHA_GPREL 0x10000000 + +/* Section contains some sort of debugging information. The exact + format is unspecified. It's probably ECOFF symbols. */ +#define SHT_ALPHA_DEBUG 0x70000001 + +/* Section contains register usage information. */ +#define SHT_ALPHA_REGINFO 0x70000002 + +/* A section of type SHT_MIPS_REGINFO contains the following + structure. */ +typedef struct +{ + /* Mask of general purpose registers used. */ + unsigned long ri_gprmask; + /* Mask of co-processor registers used. */ + unsigned long ri_cprmask[4]; + /* GP register value for this object file. */ + long ri_gp_value; +} Elf64_RegInfo; + +/* Special values for the st_other field in the symbol table. */ + +#define STO_ALPHA_NOPV 0x80 +#define STO_ALPHA_STD_GPLOAD 0x88 + +/* Special values for Elf64_Dyn tag. */ +#define DT_ALPHA_PLTRO DT_LOPROC + +#include "elf/reloc-macros.h" + +/* Alpha relocs. */ +START_RELOC_NUMBERS (elf_alpha_reloc_type) + RELOC_NUMBER (R_ALPHA_NONE, 0) /* No reloc */ + RELOC_NUMBER (R_ALPHA_REFLONG, 1) /* Direct 32 bit */ + RELOC_NUMBER (R_ALPHA_REFQUAD, 2) /* Direct 64 bit */ + RELOC_NUMBER (R_ALPHA_GPREL32, 3) /* GP relative 32 bit */ + RELOC_NUMBER (R_ALPHA_LITERAL, 4) /* GP relative 16 bit w/optimization */ + RELOC_NUMBER (R_ALPHA_LITUSE, 5) /* Optimization hint for LITERAL */ + RELOC_NUMBER (R_ALPHA_GPDISP, 6) /* Add displacement to GP */ + RELOC_NUMBER (R_ALPHA_BRADDR, 7) /* PC+4 relative 23 bit shifted */ + RELOC_NUMBER (R_ALPHA_HINT, 8) /* PC+4 relative 16 bit shifted */ + RELOC_NUMBER (R_ALPHA_SREL16, 9) /* PC relative 16 bit */ + RELOC_NUMBER (R_ALPHA_SREL32, 10) /* PC relative 32 bit */ + RELOC_NUMBER (R_ALPHA_SREL64, 11) /* PC relative 64 bit */ + + /* Skip 12 - 16; deprecated ECOFF relocs. */ + + RELOC_NUMBER (R_ALPHA_GPRELHIGH, 17) /* GP relative 32 bit, high 16 bits */ + RELOC_NUMBER (R_ALPHA_GPRELLOW, 18) /* GP relative 32 bit, low 16 bits */ + RELOC_NUMBER (R_ALPHA_GPREL16, 19) /* GP relative 16 bit */ + + /* Skip 20 - 23; deprecated ECOFF relocs. */ + + /* These relocations are specific to shared libraries. */ + RELOC_NUMBER (R_ALPHA_COPY, 24) /* Copy symbol at runtime */ + RELOC_NUMBER (R_ALPHA_GLOB_DAT, 25) /* Create GOT entry */ + RELOC_NUMBER (R_ALPHA_JMP_SLOT, 26) /* Create PLT entry */ + RELOC_NUMBER (R_ALPHA_RELATIVE, 27) /* Adjust by program base */ + + /* Like BRADDR, but assert that the source and target object file + share the same GP value, and adjust the target address for + STO_ALPHA_STD_GPLOAD. */ + RELOC_NUMBER (R_ALPHA_BRSGP, 28) + + /* Thread-Local Storage. */ + RELOC_NUMBER (R_ALPHA_TLSGD, 29) + RELOC_NUMBER (R_ALPHA_TLSLDM, 30) + RELOC_NUMBER (R_ALPHA_DTPMOD64, 31) + RELOC_NUMBER (R_ALPHA_GOTDTPREL, 32) + RELOC_NUMBER (R_ALPHA_DTPREL64, 33) + RELOC_NUMBER (R_ALPHA_DTPRELHI, 34) + RELOC_NUMBER (R_ALPHA_DTPRELLO, 35) + RELOC_NUMBER (R_ALPHA_DTPREL16, 36) + RELOC_NUMBER (R_ALPHA_GOTTPREL, 37) + RELOC_NUMBER (R_ALPHA_TPREL64, 38) + RELOC_NUMBER (R_ALPHA_TPRELHI, 39) + RELOC_NUMBER (R_ALPHA_TPRELLO, 40) + RELOC_NUMBER (R_ALPHA_TPREL16, 41) + +END_RELOC_NUMBERS (R_ALPHA_max) + +#define LITUSE_ALPHA_ADDR 0 +#define LITUSE_ALPHA_BASE 1 +#define LITUSE_ALPHA_BYTOFF 2 +#define LITUSE_ALPHA_JSR 3 +#define LITUSE_ALPHA_TLSGD 4 +#define LITUSE_ALPHA_TLSLDM 5 +#define LITUSE_ALPHA_JSRDIRECT 6 + +#endif /* _ELF_ALPHA_H */ diff --git a/support/sdbinutils/include/elf/arc-cpu.def b/support/sdbinutils/include/elf/arc-cpu.def new file mode 100644 index 0000000..e2f7014 --- /dev/null +++ b/support/sdbinutils/include/elf/arc-cpu.def @@ -0,0 +1,49 @@ +/* ARC processor types + Copyright (C) 2017-2018 Free Software Foundation, Inc. + + This file is part of GAS, the GNU Assembler. + + GAS is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + GAS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + + +ARC_CPU_TYPE_A7xx (arc700, 0x00), +ARC_CPU_TYPE_A7xx (nps400, NPS400), + +ARC_CPU_TYPE_AV2EM (arcem, 0x00), +ARC_CPU_TYPE_AV2EM (em, 0x00), +ARC_CPU_TYPE_AV2EM (em4, CD), +ARC_CPU_TYPE_AV2EM (em4_dmips, CD), +ARC_CPU_TYPE_AV2EM (em4_fpus, CD), +ARC_CPU_TYPE_AV2EM (em4_fpuda, CD | DPA), +ARC_CPU_TYPE_AV2EM (quarkse_em, CD | SPX | DPX), + +ARC_CPU_TYPE_AV2HS (archs, CD), +ARC_CPU_TYPE_AV2HS (hs, CD), +ARC_CPU_TYPE_AV2HS (hs34, CD), +ARC_CPU_TYPE_AV2HS (hs38, CD), +ARC_CPU_TYPE_AV2HS (hs38_linux, CD), + +ARC_CPU_TYPE_A6xx (arc600, 0x00), +ARC_CPU_TYPE_A6xx (arc600_norm, 0x00), +ARC_CPU_TYPE_A6xx (arc600_mul64, 0x00), +ARC_CPU_TYPE_A6xx (arc600_mul32x16, 0x00), +ARC_CPU_TYPE_A6xx (arc601, 0x00), +ARC_CPU_TYPE_A6xx (arc601_norm, 0x00), +ARC_CPU_TYPE_A6xx (arc601_mul64, 0x00), +ARC_CPU_TYPE_A6xx (arc601_mul32x16, 0x00), + +ARC_CPU_TYPE_NONE + diff --git a/support/sdbinutils/include/elf/arc-reloc.def b/support/sdbinutils/include/elf/arc-reloc.def new file mode 100644 index 0000000..a6db724 --- /dev/null +++ b/support/sdbinutils/include/elf/arc-reloc.def @@ -0,0 +1,513 @@ +/* ARC relocation types + Copyright (C) 2015-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + GAS/GDB is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + GAS/GDB is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GAS or GDB; see the file COPYING3. If not, write to + the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + + +ARC_RELOC_HOWTO(ARC_NONE, 0, \ + 2, \ + 32, \ + replace_none, \ + bitfield, \ + 0) + +ARC_RELOC_HOWTO(ARC_8, 1, \ + 0, \ + 8, \ + replace_bits8, \ + bitfield, \ + ( S + A )) + +ARC_RELOC_HOWTO(ARC_16, 2, \ + 1, \ + 16, \ + replace_bits16, \ + bitfield, \ + ( S + A )) + +ARC_RELOC_HOWTO(ARC_24, 3, \ + 2, \ + 24, \ + replace_bits24, \ + bitfield, \ + ( S + A )) + +ARC_RELOC_HOWTO(ARC_32, 4, \ + 2, \ + 32, \ + replace_word32, \ + bitfield, \ + ( S + A )) + +ARC_RELOC_HOWTO(ARC_N8, 8, \ + 0, \ + 8, \ + replace_bits8, \ + bitfield, \ + ( A - S )) + +ARC_RELOC_HOWTO(ARC_N16, 9, \ + 1, \ + 16, \ + replace_bits16, \ + bitfield, \ + ( A - S )) + +ARC_RELOC_HOWTO(ARC_N24, 10, \ + 2, \ + 24, \ + replace_bits24, \ + bitfield, \ + ( A - S )) + +ARC_RELOC_HOWTO(ARC_N32, 11, \ + 2, \ + 32, \ + replace_word32, \ + bitfield, \ + ( A - S )) + +ARC_RELOC_HOWTO(ARC_SDA, 12, \ + 2, \ + 9, \ + replace_disp9, \ + bitfield, \ + ( ME ( ( ( S + A ) - _SDA_BASE_ ) ) )) + +ARC_RELOC_HOWTO(ARC_SECTOFF, 13, \ + 2, \ + 32, \ + replace_word32, \ + bitfield, \ + ( ( S - SECTSTART ) + A )) + +ARC_RELOC_HOWTO(ARC_S21H_PCREL, 14, \ + 2, \ + 20, \ + replace_disp21h, \ + signed, \ + ( ME ( ( ( ( S + A ) - P ) >> 1 ) ) )) + +ARC_RELOC_HOWTO(ARC_S21W_PCREL, 15, \ + 2, \ + 19, \ + replace_disp21w, \ + signed, \ + ( ME ( ( ( ( S + A ) - P ) >> 2 ) ) )) + +ARC_RELOC_HOWTO(ARC_S25H_PCREL, 16, \ + 2, \ + 24, \ + replace_disp25h, \ + signed, \ + ( ME ( ( ( ( S + A ) - P ) >> 1 ) ) )) + +ARC_RELOC_HOWTO(ARC_S25W_PCREL, 17, \ + 2, \ + 23, \ + replace_disp25w, \ + signed, \ + ( ME ( ( ( ( S + A ) - P ) >> 2 ) ) )) + +ARC_RELOC_HOWTO(ARC_SDA32, 18, \ + 2, \ + 32, \ + replace_word32, \ + signed, \ + ( ( ( S + A ) - _SDA_BASE_ ) )) + +ARC_RELOC_HOWTO(ARC_SDA_LDST, 19, \ + 2, \ + 9, \ + replace_disp9ls, \ + signed, \ + ( ME ( ( ( S + A ) - _SDA_BASE_ ) ) )) + +ARC_RELOC_HOWTO(ARC_SDA_LDST1, 20, \ + 2, \ + 9, \ + replace_disp9ls, \ + signed, \ + ( ME ( ( ( ( S + A ) - _SDA_BASE_ ) >> 1 ) ) )) + +ARC_RELOC_HOWTO(ARC_SDA_LDST2, 21, \ + 2, \ + 9, \ + replace_disp9ls, \ + signed, \ + ( ME ( ( ( ( S + A ) - _SDA_BASE_ ) >> 2 ) ) )) + +ARC_RELOC_HOWTO(ARC_SDA16_LD, 22, \ + 1, \ + 9, \ + replace_disp9s, \ + signed, \ + ( ( S + A ) - _SDA_BASE_ )) + +ARC_RELOC_HOWTO(ARC_SDA16_LD1, 23, \ + 1, \ + 9, \ + replace_disp9s, \ + signed, \ + ( ( ( S + A ) - _SDA_BASE_ ) >> 1 )) + +ARC_RELOC_HOWTO(ARC_SDA16_LD2, 24, \ + 1, \ + 9, \ + replace_disp9s, \ + signed, \ + ( ( ( S + A ) - _SDA_BASE_ ) >> 2 )) + +ARC_RELOC_HOWTO(ARC_S13_PCREL, 25, \ + 1, \ + 11, \ + replace_disp13s, \ + signed, \ + ( ( ( S + A ) - P ) >> 2 )) + +ARC_RELOC_HOWTO(ARC_W, 26, \ + 2, \ + 32, \ + replace_word32, \ + bitfield, \ + ( ( S + A ) & ( ~3 ) )) + +ARC_RELOC_HOWTO(ARC_32_ME, 27, \ + 2, \ + 32, \ + replace_limm, \ + signed, \ + ( ME ( ( S + A ) ) )) + +ARC_RELOC_HOWTO(ARC_32_ME_S, 105, \ + 2, \ + 32, \ + replace_limms, \ + signed, \ + ( ME ( ( S + A ) ) )) + +ARC_RELOC_HOWTO(ARC_N32_ME, 28, \ + 2, \ + 32, \ + replace_word32, \ + bitfield, \ + ( ME ( ( A - S ) ) )) + +ARC_RELOC_HOWTO(ARC_SECTOFF_ME, 29, \ + 2, \ + 32, \ + replace_word32, \ + bitfield, \ + ( ME ( ( ( S - SECTSTART ) + A ) ) )) + +ARC_RELOC_HOWTO(ARC_SDA32_ME, 30, \ + 2, \ + 32, \ + replace_limm, \ + signed, \ + ( ME ( ( ( S + A ) - _SDA_BASE_ ) ) )) + +ARC_RELOC_HOWTO(ARC_W_ME, 31, \ + 2, \ + 32, \ + replace_word32, \ + bitfield, \ + ( ME ( ( ( S + A ) & ( ~3 ) ) ) )) + +ARC_RELOC_HOWTO(AC_SECTOFF_U8, 35, \ + 2, \ + 9, \ + replace_disp9ls, \ + bitfield, \ + ( ME ( ( ( S + A ) - SECTSTART ) ) )) + +ARC_RELOC_HOWTO(AC_SECTOFF_U8_1, 36, \ + 2, \ + 9, \ + replace_disp9ls, \ + bitfield, \ + ( ME ( ( ( ( S + A ) - SECTSTART ) >> 1 ) ) )) + +ARC_RELOC_HOWTO(AC_SECTOFF_U8_2, 37, \ + 2, \ + 9, \ + replace_disp9ls, \ + bitfield, \ + ( ME ( ( ( ( S + A ) - SECTSTART ) >> 2 ) ) )) + +ARC_RELOC_HOWTO(AC_SECTOFF_S9, 38, \ + 2, \ + 9, \ + replace_disp9ls, \ + bitfield, \ + ( ME ( ( ( ( S + A ) - SECTSTART ) - 256 ) ) )) + +ARC_RELOC_HOWTO(AC_SECTOFF_S9_1, 39, \ + 2, \ + 9, \ + replace_disp9ls, \ + bitfield, \ + ( ME ( ( ( ( ( S + A ) - SECTSTART ) - 256 ) >> 1 ) ) )) + +ARC_RELOC_HOWTO(AC_SECTOFF_S9_2, 40, \ + 2, \ + 9, \ + replace_disp9ls, \ + bitfield, \ + ( ME ( ( ( ( ( S + A ) - SECTSTART ) - 256 ) >> 2 ) ) )) + +ARC_RELOC_HOWTO(ARC_SECTOFF_ME_1, 41, \ + 2, \ + 32, \ + replace_word32, \ + bitfield, \ + ( ME ( ( ( ( S - SECTSTART ) + A ) >> 1 ) ) )) + +ARC_RELOC_HOWTO(ARC_SECTOFF_ME_2, 42, \ + 2, \ + 32, \ + replace_word32, \ + bitfield, \ + ( ME ( ( ( ( S - SECTSTART ) + A ) >> 2 ) ) )) + +ARC_RELOC_HOWTO(ARC_SECTOFF_1, 43, \ + 2, \ + 32, \ + replace_word32, \ + bitfield, \ + ( ( ( S - SECTSTART ) + A ) >> 1 )) + +ARC_RELOC_HOWTO(ARC_SECTOFF_2, 44, \ + 2, \ + 32, \ + replace_word32, \ + bitfield, \ + ( ( ( S - SECTSTART ) + A ) >> 2 )) + +ARC_RELOC_HOWTO(ARC_SDA_12, 45, \ + 2, \ + 12, \ + replace_disp12s, \ + signed, \ + ( ME ( ( ( S + A ) - _SDA_BASE_ ) ) )) + +ARC_RELOC_HOWTO(ARC_SDA16_ST2, 48, \ + 1, \ + 9, \ + replace_disp9s1, \ + signed, \ + ( ( ( S + A ) - _SDA_BASE_ ) >> 2 )) + +ARC_RELOC_HOWTO(ARC_32_PCREL, 49, \ + 2, \ + 32, \ + replace_word32, \ + signed, \ + ( ( S + A ) - PDATA )) + +ARC_RELOC_HOWTO(ARC_PC32, 50, \ + 2, \ + 32, \ + replace_word32, \ + signed, \ + ( ME ( ( ( S + A ) - P ) ) )) + +ARC_RELOC_HOWTO(ARC_GOT32, 59, \ + 2, \ + 32, \ + replace_word32, \ + dont, \ + ( G + A )) + +ARC_RELOC_HOWTO(ARC_GOTPC32, 51, \ + 2, \ + 32, \ + replace_word32, \ + signed, \ + ( ME ( ( ( ( GOT + G ) + A ) - P ) ) )) + +ARC_RELOC_HOWTO(ARC_PLT32, 52, \ + 2, \ + 32, \ + replace_word32, \ + signed, \ + ( ME ( ( ( L + A ) - P ) ) )) + +ARC_RELOC_HOWTO(ARC_COPY, 53, \ + 2, \ + 0, \ + replace_none, \ + signed, \ + none) + +ARC_RELOC_HOWTO(ARC_GLOB_DAT, 54, \ + 2, \ + 32, \ + replace_word32, \ + signed, \ + S) + +ARC_RELOC_HOWTO(ARC_JMP_SLOT, 55, \ + 2, \ + 32, \ + replace_word32, \ + signed, \ + ( ME ( S ) )) + +ARC_RELOC_HOWTO(ARC_RELATIVE, 56, \ + 2, \ + 32, \ + replace_word32, \ + signed, \ + ( ME ( ( B + A ) ) )) + +ARC_RELOC_HOWTO(ARC_GOTOFF, 57, \ + 2, \ + 32, \ + replace_word32, \ + signed, \ + ( ME ( ( ( S + A ) - GOT ) ) )) + +ARC_RELOC_HOWTO(ARC_GOTPC, 58, \ + 2, \ + 32, \ + replace_word32, \ + signed, \ + ( ME ( ( GOT_BEGIN - P ) ) )) + +ARC_RELOC_HOWTO(ARC_S21W_PCREL_PLT, 60, \ + 2, \ + 19, \ + replace_disp21w, \ + signed, \ + ( ME ( ( ( ( L + A ) - P ) >> 2 ) ) )) + +ARC_RELOC_HOWTO(ARC_S25H_PCREL_PLT, 61, \ + 2, \ + 24, \ + replace_disp25h, \ + signed, \ + ( ME ( ( ( ( L + A ) - P ) >> 1 ) ) )) + +ARC_RELOC_HOWTO(ARC_JLI_SECTOFF, 63, \ + 1, \ + 10, \ + replace_jli, \ + bitfield, \ + ( ( S - JLI ) >> 2)) + +ARC_RELOC_HOWTO(ARC_TLS_DTPMOD, 66, \ + 2, \ + 32, \ + replace_word32, \ + dont, \ + 0) + +ARC_RELOC_HOWTO(ARC_TLS_TPOFF, 68, \ + 2, \ + 32, \ + replace_word32, \ + dont, \ + 0) + +ARC_RELOC_HOWTO(ARC_TLS_GD_GOT, 69, \ + 2, \ + 32, \ + replace_word32, \ + dont, \ + ( ME ( ( ( G + GOT ) - P ) ) )) + +ARC_RELOC_HOWTO(ARC_TLS_GD_LD, 70, \ + 2, \ + 0, \ + replace_none, \ + dont, \ + 0) + +ARC_RELOC_HOWTO(ARC_TLS_GD_CALL, 71, \ + 2, \ + 32, \ + replace_word32, \ + dont, \ + 0) + +ARC_RELOC_HOWTO(ARC_TLS_IE_GOT, 72, \ + 2, \ + 32, \ + replace_word32, \ + dont, \ + ( ME ( ( ( G + GOT ) - P ) ) )) + +ARC_RELOC_HOWTO(ARC_TLS_DTPOFF, 67, \ + 2, \ + 32, \ + replace_word32, \ + dont, \ + ( ME ( S - SECTSTART ) + A )) + +ARC_RELOC_HOWTO(ARC_TLS_DTPOFF_S9, 73, \ + 2, \ + 32, \ + replace_word32, \ + dont, \ + ( ME ( ( S - TLS_REL ) ) )) + +ARC_RELOC_HOWTO(ARC_TLS_LE_S9, 74, \ + 2, \ + 32, \ + replace_word32, \ + dont, \ + ( ME ( ( ( S + TCB_SIZE ) - TLS_REL ) ) )) + +ARC_RELOC_HOWTO(ARC_TLS_LE_32, 75, \ + 2, \ + 32, \ + replace_word32, \ + dont, \ + ( ME ( ( ( ( S + A ) + TCB_SIZE ) - TLS_REL ) ) )) + +ARC_RELOC_HOWTO(ARC_S25W_PCREL_PLT, 76, \ + 2, \ + 23, \ + replace_disp25w, \ + signed, \ + ( ME ( ( ( ( L + A ) - P ) >> 2 ) ) )) + +ARC_RELOC_HOWTO(ARC_S21H_PCREL_PLT, 77, \ + 2, \ + 20, \ + replace_disp21h, \ + signed, \ + ( ME ( ( ( ( L + A ) - P ) >> 1 ) ) )) + +ARC_RELOC_HOWTO(ARC_NPS_CMEM16, 78, \ + 2, \ + 16, \ + replace_bits16, \ + dont, \ + ( ME ( S + A ))) diff --git a/support/sdbinutils/include/elf/arc.h b/support/sdbinutils/include/elf/arc.h new file mode 100644 index 0000000..85617fc --- /dev/null +++ b/support/sdbinutils/include/elf/arc.h @@ -0,0 +1,96 @@ +/* ARC ELF support for BFD. + Copyright (C) 1995-2018 Free Software Foundation, Inc. + Contributed by Doug Evans, (dje@cygnus.com) + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file holds definitions specific to the ARC ELF ABI. */ + +#ifndef _ELF_ARC_H +#define _ELF_ARC_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ + +#define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \ + RELOC_NUMBER(R_##TYPE, VALUE) + +START_RELOC_NUMBERS (elf_arc_reloc_type) +#include "arc-reloc.def" +END_RELOC_NUMBERS (R_ARC_max) + +#undef ARC_RELOC_HOWTO + +/* Processor specific flags for the ELF header e_flags field. */ + +#define EF_ARC_MACH_MSK 0x000000ff +#define EF_ARC_OSABI_MSK 0x00000f00 +#define EF_ARC_ALL_MSK (EF_ARC_MACH_MSK | EF_ARC_OSABI_MSK) + +/* Various CPU types. These numbers are exposed in the ELF header flags + (e_flags field), and so must never change. */ +#define E_ARC_MACH_ARC600 0x00000002 +#define E_ARC_MACH_ARC601 0x00000004 +#define E_ARC_MACH_ARC700 0x00000003 +#define EF_ARC_CPU_ARCV2EM 0x00000005 +#define EF_ARC_CPU_ARCV2HS 0x00000006 + +/* ARC Linux specific ABIs. */ +#define E_ARC_OSABI_ORIG 0x00000000 /* MUST be 0 for back-compat. */ +#define E_ARC_OSABI_V2 0x00000200 +#define E_ARC_OSABI_V3 0x00000300 +#define E_ARC_OSABI_V4 0x00000400 +#define E_ARC_OSABI_CURRENT E_ARC_OSABI_V4 +/* Leave bits 0xf0 alone in case we ever have more than 16 cpu types. */ + +/* File contains position independent code. */ + +#define EF_ARC_PIC 0x00000100 + +/* Additional section types. */ +#define SHT_ARC_ATTRIBUTES 0x70000001 /* Section holds attributes. */ + +/* ARC ABI object attributes. */ +enum { + /* 0-3 are generic. */ + Tag_ARC_PCS_config = 4, + Tag_ARC_CPU_base, + Tag_ARC_CPU_variation, + Tag_ARC_CPU_name, + Tag_ARC_ABI_rf16, + Tag_ARC_ABI_osver, + Tag_ARC_ABI_sda, + Tag_ARC_ABI_pic, + Tag_ARC_ABI_tls, + Tag_ARC_ABI_enumsize, + Tag_ARC_ABI_exceptions, + Tag_ARC_ABI_double_size, + Tag_ARC_ISA_config, + Tag_ARC_ISA_apex, + Tag_ARC_ISA_mpy_option +}; + +/* Values for the Tag_ARC_cpu_base attribute. */ +#define TAG_CPU_NONE 0 +#define TAG_CPU_ARC6xx 1 +#define TAG_CPU_ARC7xx 2 +#define TAG_CPU_ARCEM 3 +#define TAG_CPU_ARCHS 4 + +#endif /* _ELF_ARC_H */ diff --git a/support/sdbinutils/include/elf/arm.h b/support/sdbinutils/include/elf/arm.h new file mode 100644 index 0000000..fb9c5f6 --- /dev/null +++ b/support/sdbinutils/include/elf/arm.h @@ -0,0 +1,395 @@ +/* ARM ELF support for BFD. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_ARM_H +#define _ELF_ARM_H + +#include "elf/reloc-macros.h" + +/* Processor specific flags for the ELF header e_flags field. */ +#define EF_ARM_RELEXEC 0x01 +#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 /* 8-bit structure alignment is in use. */ +#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 + +/* Frame unwind information */ +#define PT_ARM_EXIDX (PT_LOPROC + 1) + +/* Other constants defined in the ARM ELF spec. version B-01. */ +#define EF_ARM_SYMSARESORTED 0x04 /* NB conflicts with EF_INTERWORK. */ +#define EF_ARM_DYNSYMSUSESEGIDX 0x08 /* NB conflicts with EF_APCS26. */ +#define EF_ARM_MAPSYMSFIRST 0x10 /* NB conflicts with EF_APCS_FLOAT. */ +#define EF_ARM_EABIMASK 0xFF000000 + +/* New constants defined in the ARM ELF spec. version XXX. + Only valid in conjunction with EF_ARM_EABI_VER5. */ +#define EF_ARM_ABI_FLOAT_SOFT 0x200 /* NB conflicts with EF_ARM_SOFT_FLOAT. */ +#define EF_ARM_ABI_FLOAT_HARD 0x400 /* NB conflicts with EF_ARM_VFP_FLOAT. */ + +/* Constants defined in AAELF. */ +#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 + +/* Local aliases for some flags to match names used by COFF port. */ +#define F_INTERWORK EF_ARM_INTERWORK +#define F_APCS26 EF_ARM_APCS_26 +#define F_APCS_FLOAT EF_ARM_APCS_FLOAT +#define F_PIC EF_ARM_PIC +#define F_SOFT_FLOAT EF_ARM_SOFT_FLOAT +#define F_VFP_FLOAT EF_ARM_VFP_FLOAT + +/* Additional symbol types for Thumb. */ +#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ +#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ + +/* Additional section types. */ +#define SHT_ARM_EXIDX 0x70000001 /* Section holds ARM unwind info. */ +#define SHT_ARM_PREEMPTMAP 0x70000002 /* Section pre-emption details. */ +#define SHT_ARM_ATTRIBUTES 0x70000003 /* Section holds attributes. */ +#define SHT_ARM_DEBUGOVERLAY 0x70000004 /* Section holds overlay debug info. */ +#define SHT_ARM_OVERLAYSECTION 0x70000005 /* Section holds GDB and overlay integration info. */ + +/* ARM-specific values for sh_flags. */ +#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point. */ +#define SHF_ARM_PURECODE 0x20000000 /* Section contains only code and no data. */ +#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step. */ + +/* ARM-specific program header flags. */ +#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base. */ +#define PF_ARM_PI 0x20000000 /* Segment is position-independent. */ +#define PF_ARM_ABS 0x40000000 /* Segment must be loaded at its base address. */ + +/* Values for the Tag_CPU_arch EABI attribute. */ +#define TAG_CPU_ARCH_PRE_V4 0 +#define TAG_CPU_ARCH_V4 1 +#define TAG_CPU_ARCH_V4T 2 +#define TAG_CPU_ARCH_V5T 3 +#define TAG_CPU_ARCH_V5TE 4 +#define TAG_CPU_ARCH_V5TEJ 5 +#define TAG_CPU_ARCH_V6 6 +#define TAG_CPU_ARCH_V6KZ 7 +#define TAG_CPU_ARCH_V6T2 8 +#define TAG_CPU_ARCH_V6K 9 +#define TAG_CPU_ARCH_V7 10 +#define TAG_CPU_ARCH_V6_M 11 +#define TAG_CPU_ARCH_V6S_M 12 +#define TAG_CPU_ARCH_V7E_M 13 +#define TAG_CPU_ARCH_V8 14 +#define TAG_CPU_ARCH_V8R 15 +#define TAG_CPU_ARCH_V8M_BASE 16 +#define TAG_CPU_ARCH_V8M_MAIN 17 +#define MAX_TAG_CPU_ARCH TAG_CPU_ARCH_V8M_MAIN +/* Pseudo-architecture to allow objects to be compatible with the subset of + armv4t and armv6-m. This value should never be stored in object files. */ +#define TAG_CPU_ARCH_V4T_PLUS_V6_M (MAX_TAG_CPU_ARCH + 1) + +/* Relocation types. */ + +START_RELOC_NUMBERS (elf_arm_reloc_type) +/* AAELF official names and numbers. */ + RELOC_NUMBER (R_ARM_NONE, 0) + RELOC_NUMBER (R_ARM_PC24, 1) /* deprecated */ + RELOC_NUMBER (R_ARM_ABS32, 2) + RELOC_NUMBER (R_ARM_REL32, 3) + RELOC_NUMBER (R_ARM_LDR_PC_G0, 4) + RELOC_NUMBER (R_ARM_ABS16, 5) + RELOC_NUMBER (R_ARM_ABS12, 6) + RELOC_NUMBER (R_ARM_THM_ABS5, 7) + RELOC_NUMBER (R_ARM_ABS8, 8) + RELOC_NUMBER (R_ARM_SBREL32, 9) + RELOC_NUMBER (R_ARM_THM_CALL, 10) + RELOC_NUMBER (R_ARM_THM_PC8, 11) + RELOC_NUMBER (R_ARM_BREL_ADJ, 12) + RELOC_NUMBER (R_ARM_TLS_DESC, 13) + RELOC_NUMBER (R_ARM_THM_SWI8, 14) /* obsolete */ + RELOC_NUMBER (R_ARM_XPC25, 15) /* obsolete */ + RELOC_NUMBER (R_ARM_THM_XPC22, 16) /* obsolete */ + RELOC_NUMBER (R_ARM_TLS_DTPMOD32, 17) + RELOC_NUMBER (R_ARM_TLS_DTPOFF32, 18) + RELOC_NUMBER (R_ARM_TLS_TPOFF32, 19) + RELOC_NUMBER (R_ARM_COPY, 20) /* Copy symbol at runtime. */ + RELOC_NUMBER (R_ARM_GLOB_DAT, 21) /* Create GOT entry. */ + RELOC_NUMBER (R_ARM_JUMP_SLOT, 22) /* Create PLT entry. */ + RELOC_NUMBER (R_ARM_RELATIVE, 23) /* Adjust by program base. */ + RELOC_NUMBER (R_ARM_GOTOFF32, 24) /* 32 bit offset to GOT. */ + RELOC_NUMBER (R_ARM_BASE_PREL, 25) /* 32 bit PC relative offset to GOT. */ + RELOC_NUMBER (R_ARM_GOT_BREL, 26) /* 32 bit GOT entry. */ + RELOC_NUMBER (R_ARM_PLT32, 27) /* deprecated - 32 bit PLT address. */ + RELOC_NUMBER (R_ARM_CALL, 28) + RELOC_NUMBER (R_ARM_JUMP24, 29) + RELOC_NUMBER (R_ARM_THM_JUMP24, 30) + RELOC_NUMBER (R_ARM_BASE_ABS, 31) + RELOC_NUMBER (R_ARM_ALU_PCREL7_0, 32) /* obsolete */ + RELOC_NUMBER (R_ARM_ALU_PCREL15_8, 33) /* obsolete */ + RELOC_NUMBER (R_ARM_ALU_PCREL23_15, 34) /* obsolete */ + RELOC_NUMBER (R_ARM_LDR_SBREL_11_0, 35) /* deprecated, should have _NC suffix */ + RELOC_NUMBER (R_ARM_ALU_SBREL_19_12, 36) /* deprecated, should have _NC suffix */ + RELOC_NUMBER (R_ARM_ALU_SBREL_27_20, 37) /* deprecated, should have _CK suffix */ + RELOC_NUMBER (R_ARM_TARGET1, 38) + RELOC_NUMBER (R_ARM_SBREL31, 39) /* deprecated */ + RELOC_NUMBER (R_ARM_V4BX, 40) + RELOC_NUMBER (R_ARM_TARGET2, 41) + RELOC_NUMBER (R_ARM_PREL31, 42) + RELOC_NUMBER (R_ARM_MOVW_ABS_NC, 43) + RELOC_NUMBER (R_ARM_MOVT_ABS, 44) + RELOC_NUMBER (R_ARM_MOVW_PREL_NC, 45) + RELOC_NUMBER (R_ARM_MOVT_PREL, 46) + RELOC_NUMBER (R_ARM_THM_MOVW_ABS_NC, 47) + RELOC_NUMBER (R_ARM_THM_MOVT_ABS, 48) + RELOC_NUMBER (R_ARM_THM_MOVW_PREL_NC, 49) + RELOC_NUMBER (R_ARM_THM_MOVT_PREL, 50) + RELOC_NUMBER (R_ARM_THM_JUMP19, 51) + RELOC_NUMBER (R_ARM_THM_JUMP6, 52) + RELOC_NUMBER (R_ARM_THM_ALU_PREL_11_0, 53) + RELOC_NUMBER (R_ARM_THM_PC12, 54) + RELOC_NUMBER (R_ARM_ABS32_NOI, 55) + RELOC_NUMBER (R_ARM_REL32_NOI, 56) + RELOC_NUMBER (R_ARM_ALU_PC_G0_NC, 57) + RELOC_NUMBER (R_ARM_ALU_PC_G0, 58) + RELOC_NUMBER (R_ARM_ALU_PC_G1_NC, 59) + RELOC_NUMBER (R_ARM_ALU_PC_G1, 60) + RELOC_NUMBER (R_ARM_ALU_PC_G2, 61) + RELOC_NUMBER (R_ARM_LDR_PC_G1, 62) + RELOC_NUMBER (R_ARM_LDR_PC_G2, 63) + RELOC_NUMBER (R_ARM_LDRS_PC_G0, 64) + RELOC_NUMBER (R_ARM_LDRS_PC_G1, 65) + RELOC_NUMBER (R_ARM_LDRS_PC_G2, 66) + RELOC_NUMBER (R_ARM_LDC_PC_G0, 67) + RELOC_NUMBER (R_ARM_LDC_PC_G1, 68) + RELOC_NUMBER (R_ARM_LDC_PC_G2, 69) + RELOC_NUMBER (R_ARM_ALU_SB_G0_NC, 70) + RELOC_NUMBER (R_ARM_ALU_SB_G0, 71) + RELOC_NUMBER (R_ARM_ALU_SB_G1_NC, 72) + RELOC_NUMBER (R_ARM_ALU_SB_G1, 73) + RELOC_NUMBER (R_ARM_ALU_SB_G2, 74) + RELOC_NUMBER (R_ARM_LDR_SB_G0, 75) + RELOC_NUMBER (R_ARM_LDR_SB_G1, 76) + RELOC_NUMBER (R_ARM_LDR_SB_G2, 77) + RELOC_NUMBER (R_ARM_LDRS_SB_G0, 78) + RELOC_NUMBER (R_ARM_LDRS_SB_G1, 79) + RELOC_NUMBER (R_ARM_LDRS_SB_G2, 80) + RELOC_NUMBER (R_ARM_LDC_SB_G0, 81) + RELOC_NUMBER (R_ARM_LDC_SB_G1, 82) + RELOC_NUMBER (R_ARM_LDC_SB_G2, 83) + RELOC_NUMBER (R_ARM_MOVW_BREL_NC, 84) + RELOC_NUMBER (R_ARM_MOVT_BREL, 85) + RELOC_NUMBER (R_ARM_MOVW_BREL, 86) + RELOC_NUMBER (R_ARM_THM_MOVW_BREL_NC, 87) + RELOC_NUMBER (R_ARM_THM_MOVT_BREL, 88) + RELOC_NUMBER (R_ARM_THM_MOVW_BREL, 89) + RELOC_NUMBER (R_ARM_TLS_GOTDESC, 90) + RELOC_NUMBER (R_ARM_TLS_CALL, 91) + RELOC_NUMBER (R_ARM_TLS_DESCSEQ, 92) + RELOC_NUMBER (R_ARM_THM_TLS_CALL, 93) + RELOC_NUMBER (R_ARM_PLT32_ABS, 94) + RELOC_NUMBER (R_ARM_GOT_ABS, 95) + RELOC_NUMBER (R_ARM_GOT_PREL, 96) + RELOC_NUMBER (R_ARM_GOT_BREL12, 97) + RELOC_NUMBER (R_ARM_GOTOFF12, 98) + RELOC_NUMBER (R_ARM_GOTRELAX, 99) + RELOC_NUMBER (R_ARM_GNU_VTENTRY, 100) /* deprecated - old C++ abi */ + RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 101) /* deprecated - old C++ abi */ + RELOC_NUMBER (R_ARM_THM_JUMP11, 102) + RELOC_NUMBER (R_ARM_THM_JUMP8, 103) + RELOC_NUMBER (R_ARM_TLS_GD32, 104) + RELOC_NUMBER (R_ARM_TLS_LDM32, 105) + RELOC_NUMBER (R_ARM_TLS_LDO32, 106) + RELOC_NUMBER (R_ARM_TLS_IE32, 107) + RELOC_NUMBER (R_ARM_TLS_LE32, 108) + RELOC_NUMBER (R_ARM_TLS_LDO12, 109) + RELOC_NUMBER (R_ARM_TLS_LE12, 110) + RELOC_NUMBER (R_ARM_TLS_IE12GP, 111) + /* 112 - 127 private range */ + RELOC_NUMBER (R_ARM_ME_TOO, 128) /* obsolete */ + RELOC_NUMBER (R_ARM_THM_TLS_DESCSEQ ,129) + + RELOC_NUMBER (R_ARM_THM_ALU_ABS_G0_NC,132) + RELOC_NUMBER (R_ARM_THM_ALU_ABS_G1_NC,133) + RELOC_NUMBER (R_ARM_THM_ALU_ABS_G2_NC,134) + RELOC_NUMBER (R_ARM_THM_ALU_ABS_G3_NC,135) + + RELOC_NUMBER (R_ARM_IRELATIVE, 160) + + /* Extensions? R=read-only? */ + RELOC_NUMBER (R_ARM_RXPC25, 249) + RELOC_NUMBER (R_ARM_RSBREL32, 250) + RELOC_NUMBER (R_ARM_THM_RPC22, 251) + RELOC_NUMBER (R_ARM_RREL32, 252) + RELOC_NUMBER (R_ARM_RABS32, 253) + RELOC_NUMBER (R_ARM_RPC24, 254) + RELOC_NUMBER (R_ARM_RBASE, 255) + + /* Unofficial names for some of the relocs. */ + FAKE_RELOC (R_ARM_GOTOFF, R_ARM_GOTOFF32) /* 32 bit offset to GOT. */ + FAKE_RELOC (R_ARM_THM_PC22, R_ARM_THM_CALL) + FAKE_RELOC (R_ARM_THM_PC11, R_ARM_THM_JUMP11) + FAKE_RELOC (R_ARM_THM_PC9, R_ARM_THM_JUMP8) + + /* Relocs with both a different name, and (apparently) different meaning in + GNU usage. */ + FAKE_RELOC (R_ARM_GOTPC, R_ARM_BASE_PREL) /* 32 bit PC relative offset to GOT. */ + FAKE_RELOC (R_ARM_GOT32, R_ARM_GOT_BREL) /* 32 bit GOT entry. */ + FAKE_RELOC (R_ARM_ROSEGREL32, R_ARM_SBREL31) /* ??? */ + FAKE_RELOC (R_ARM_AMP_VCALL9, R_ARM_BREL_ADJ) /* Thumb-something. Not used. */ + +END_RELOC_NUMBERS (R_ARM_max = 256) + +#ifdef BFD_ARCH_SIZE +/* EABI object attributes. */ + +enum +{ + /* 0-3 are generic. */ + Tag_CPU_raw_name = 4, + Tag_CPU_name, + Tag_CPU_arch, + Tag_CPU_arch_profile, + Tag_ARM_ISA_use, + Tag_THUMB_ISA_use, + Tag_FP_arch, + Tag_WMMX_arch, + Tag_Advanced_SIMD_arch, + Tag_PCS_config, + Tag_ABI_PCS_R9_use, + Tag_ABI_PCS_RW_data, + Tag_ABI_PCS_RO_data, + Tag_ABI_PCS_GOT_use, + Tag_ABI_PCS_wchar_t, + Tag_ABI_FP_rounding, + Tag_ABI_FP_denormal, + Tag_ABI_FP_exceptions, + Tag_ABI_FP_user_exceptions, + Tag_ABI_FP_number_model, + Tag_ABI_align_needed, + Tag_ABI_align_preserved, + Tag_ABI_enum_size, + Tag_ABI_HardFP_use, + Tag_ABI_VFP_args, + Tag_ABI_WMMX_args, + Tag_ABI_optimization_goals, + Tag_ABI_FP_optimization_goals, + /* 32 is generic (Tag_compatibility). */ + Tag_undefined33 = 33, + Tag_CPU_unaligned_access, + Tag_undefined35, + Tag_FP_HP_extension, + Tag_undefined37, + Tag_ABI_FP_16bit_format, + Tag_undefined39, + Tag_undefined40, + Tag_undefined41, + Tag_MPextension_use, + Tag_undefined_43, + Tag_DIV_use, + Tag_DSP_extension = 46, + Tag_nodefaults = 64, + Tag_also_compatible_with, + Tag_T2EE_use, + Tag_conformance, + Tag_Virtualization_use, + Tag_undefined69, + Tag_MPextension_use_legacy, + + /* The following tags are legacy names for other tags. */ + Tag_VFP_arch = Tag_FP_arch, + Tag_ABI_align8_needed = Tag_ABI_align_needed, + Tag_ABI_align8_preserved = Tag_ABI_align_preserved, + Tag_VFP_HP_extension = Tag_FP_HP_extension +}; + +/* Values for Tag_ABI_FP_number_model. */ +enum +{ + AEABI_FP_number_model_none = 0, + AEABI_FP_number_model_ieee754_number = 1, + AEABI_FP_number_model_rtabi = 2, + AEABI_FP_number_model_ieee754_all = 3 +}; + +/* Values for Tag_ABI_VFP_args. */ +enum +{ + AEABI_VFP_args_base = 0, + AEABI_VFP_args_vfp = 1, + AEABI_VFP_args_toolchain = 2, + AEABI_VFP_args_compatible = 3 +}; +#endif + +/* The name of the note section used to identify arm variants. */ +#define ARM_NOTE_SECTION ".note.gnu.arm.ident" + +/* Special section names. */ +#define ELF_STRING_ARM_unwind ".ARM.exidx" +#define ELF_STRING_ARM_unwind_info ".ARM.extab" +#define ELF_STRING_ARM_unwind_once ".gnu.linkonce.armexidx." +#define ELF_STRING_ARM_unwind_info_once ".gnu.linkonce.armextab." + +enum arm_st_branch_type { + ST_BRANCH_TO_ARM, + ST_BRANCH_TO_THUMB, + ST_BRANCH_LONG, + ST_BRANCH_UNKNOWN, + ST_BRANCH_ENUM_SIZE +}; + +#define NUM_ENUM_ARM_ST_BRANCH_TYPE_BITS 2 +#define ENUM_ARM_ST_BRANCH_TYPE_BITMASK \ + ((1 << NUM_ENUM_ARM_ST_BRANCH_TYPE_BITS) - 1) + +#define ARM_GET_SYM_BRANCH_TYPE(STI) \ + ((enum arm_st_branch_type) ((STI) & ENUM_ARM_ST_BRANCH_TYPE_BITMASK)) +#ifdef BFD_ASSERT +#define ARM_SET_SYM_BRANCH_TYPE(STI, TYPE) \ + do { \ + BFD_ASSERT (TYPE <= ST_BRANCH_ENUM_SIZE); \ + BFD_ASSERT ((1 << NUM_ENUM_ARM_ST_BRANCH_TYPE_BITS) \ + >= ST_BRANCH_ENUM_SIZE); \ + (STI) = (((STI) & ~ENUM_ARM_ST_BRANCH_TYPE_BITMASK) \ + | ((TYPE) & ENUM_ARM_ST_BRANCH_TYPE_BITMASK)); \ + } while (0) +#else +#define ARM_SET_SYM_BRANCH_TYPE(STI, TYPE) \ + (STI) = (((STI) & ~ENUM_ARM_ST_BRANCH_TYPE_BITMASK) \ + | ((TYPE) & ENUM_ARM_ST_BRANCH_TYPE_BITMASK)) +#endif + +/* Get or set whether a symbol is a special symbol of an entry function of CMSE + secure code. */ +#define ARM_GET_SYM_CMSE_SPCL(SYM_TARGET_INTERNAL) \ + (((SYM_TARGET_INTERNAL) >> 2) & 1) +#define ARM_SET_SYM_CMSE_SPCL(SYM_TARGET_INTERNAL) \ + (SYM_TARGET_INTERNAL) |= 4 + +#endif /* _ELF_ARM_H */ diff --git a/support/sdbinutils/include/elf/avr.h b/support/sdbinutils/include/elf/avr.h new file mode 100644 index 0000000..8a4845b --- /dev/null +++ b/support/sdbinutils/include/elf/avr.h @@ -0,0 +1,93 @@ +/* AVR ELF support for BFD. + Copyright (C) 1999-2018 Free Software Foundation, Inc. + Contributed by Denis Chertykov + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_AVR_H +#define _ELF_AVR_H + +#include "elf/reloc-macros.h" + +/* Processor specific flags for the ELF header e_flags field. */ +#define EF_AVR_MACH 0x7F + +/* If bit #7 is set, it is assumed that the elf file uses local symbols + as reference for the relocations so that linker relaxation is possible. */ +#define EF_AVR_LINKRELAX_PREPARED 0x80 + +#define E_AVR_MACH_AVR1 1 +#define E_AVR_MACH_AVR2 2 +#define E_AVR_MACH_AVR25 25 +#define E_AVR_MACH_AVR3 3 +#define E_AVR_MACH_AVR31 31 +#define E_AVR_MACH_AVR35 35 +#define E_AVR_MACH_AVR4 4 +#define E_AVR_MACH_AVR5 5 +#define E_AVR_MACH_AVR51 51 +#define E_AVR_MACH_AVR6 6 +#define E_AVR_MACH_AVRTINY 100 +#define E_AVR_MACH_XMEGA1 101 +#define E_AVR_MACH_XMEGA2 102 +#define E_AVR_MACH_XMEGA3 103 +#define E_AVR_MACH_XMEGA4 104 +#define E_AVR_MACH_XMEGA5 105 +#define E_AVR_MACH_XMEGA6 106 +#define E_AVR_MACH_XMEGA7 107 + +/* Relocations. */ +START_RELOC_NUMBERS (elf_avr_reloc_type) + RELOC_NUMBER (R_AVR_NONE, 0) + RELOC_NUMBER (R_AVR_32, 1) + RELOC_NUMBER (R_AVR_7_PCREL, 2) + RELOC_NUMBER (R_AVR_13_PCREL, 3) + RELOC_NUMBER (R_AVR_16, 4) + RELOC_NUMBER (R_AVR_16_PM, 5) + RELOC_NUMBER (R_AVR_LO8_LDI, 6) + RELOC_NUMBER (R_AVR_HI8_LDI, 7) + RELOC_NUMBER (R_AVR_HH8_LDI, 8) + RELOC_NUMBER (R_AVR_LO8_LDI_NEG, 9) + RELOC_NUMBER (R_AVR_HI8_LDI_NEG, 10) + RELOC_NUMBER (R_AVR_HH8_LDI_NEG, 11) + RELOC_NUMBER (R_AVR_LO8_LDI_PM, 12) + RELOC_NUMBER (R_AVR_HI8_LDI_PM, 13) + RELOC_NUMBER (R_AVR_HH8_LDI_PM, 14) + RELOC_NUMBER (R_AVR_LO8_LDI_PM_NEG, 15) + RELOC_NUMBER (R_AVR_HI8_LDI_PM_NEG, 16) + RELOC_NUMBER (R_AVR_HH8_LDI_PM_NEG, 17) + RELOC_NUMBER (R_AVR_CALL, 18) + RELOC_NUMBER (R_AVR_LDI, 19) + RELOC_NUMBER (R_AVR_6, 20) + RELOC_NUMBER (R_AVR_6_ADIW, 21) + RELOC_NUMBER (R_AVR_MS8_LDI, 22) + RELOC_NUMBER (R_AVR_MS8_LDI_NEG, 23) + RELOC_NUMBER (R_AVR_LO8_LDI_GS, 24) + RELOC_NUMBER (R_AVR_HI8_LDI_GS, 25) + RELOC_NUMBER (R_AVR_8, 26) + RELOC_NUMBER (R_AVR_8_LO8, 27) + RELOC_NUMBER (R_AVR_8_HI8, 28) + RELOC_NUMBER (R_AVR_8_HLO8, 29) + RELOC_NUMBER (R_AVR_DIFF8, 30) + RELOC_NUMBER (R_AVR_DIFF16, 31) + RELOC_NUMBER (R_AVR_DIFF32, 32) + RELOC_NUMBER (R_AVR_LDS_STS_16, 33) + RELOC_NUMBER (R_AVR_PORT6, 34) + RELOC_NUMBER (R_AVR_PORT5, 35) + RELOC_NUMBER (R_AVR_32_PCREL, 36) +END_RELOC_NUMBERS (R_AVR_max) + +#endif /* _ELF_AVR_H */ diff --git a/support/sdbinutils/include/elf/bfin.h b/support/sdbinutils/include/elf/bfin.h new file mode 100644 index 0000000..2615e81 --- /dev/null +++ b/support/sdbinutils/include/elf/bfin.h @@ -0,0 +1,95 @@ +/* Blackfin ELF support for BFD. + Copyright (C) 2005-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_BFIN_H +#define _ELF_BFIN_H + +#include "elf/reloc-macros.h" + +START_RELOC_NUMBERS (elf_bfin_reloc_type) + RELOC_NUMBER (R_BFIN_UNUSED0, 0x00) /* relocation type 0 is not defined */ + RELOC_NUMBER (R_BFIN_PCREL5M2, 0x01) /* LSETUP part a */ + RELOC_NUMBER (R_BFIN_UNUSED1, 0x02) /* relocation type 2 is not defined */ + RELOC_NUMBER (R_BFIN_PCREL10, 0x03) /* type 3, 0x00) if cc jump */ + RELOC_NUMBER (R_BFIN_PCREL12_JUMP, 0x04) /* type 4, 0x00) jump */ + RELOC_NUMBER (R_BFIN_RIMM16, 0x05) /* type 0x5, 0x00) rN = */ + RELOC_NUMBER (R_BFIN_LUIMM16, 0x06) /* # 0x6, 0x00) preg.l= Load imm 16 to lower half */ + RELOC_NUMBER (R_BFIN_HUIMM16, 0x07) /* # 0x7, 0x00) preg.h= Load imm 16 to upper half */ + RELOC_NUMBER (R_BFIN_PCREL12_JUMP_S, 0x08) /* # 0x8 jump.s */ + RELOC_NUMBER (R_BFIN_PCREL24_JUMP_X, 0x09) /* # 0x9 jump.x */ + RELOC_NUMBER (R_BFIN_PCREL24, 0x0a) /* # 0xa call , 0x00) not expandable */ + RELOC_NUMBER (R_BFIN_UNUSEDB, 0x0b) /* # 0xb not generated */ + RELOC_NUMBER (R_BFIN_UNUSEDC, 0x0c) /* # 0xc not used */ + RELOC_NUMBER (R_BFIN_PCREL24_JUMP_L, 0x0d) /* 0xd jump.l */ + RELOC_NUMBER (R_BFIN_PCREL24_CALL_X, 0x0e) /* 0xE, 0x00) call.x if is above 24 bit limit call through P1 */ + RELOC_NUMBER (R_BFIN_VAR_EQ_SYMB, 0x0f) /* 0xf, 0x00) linker should treat it same as 0x12 */ + RELOC_NUMBER (R_BFIN_BYTE_DATA, 0x10) /* 0x10, 0x00) .byte var = symbol */ + RELOC_NUMBER (R_BFIN_BYTE2_DATA, 0x11) /* 0x11, 0x00) .byte2 var = symbol */ + RELOC_NUMBER (R_BFIN_BYTE4_DATA, 0x12) /* 0x12, 0x00) .byte4 var = symbol and .var var=symbol */ + RELOC_NUMBER (R_BFIN_PCREL11, 0x13) /* 0x13, 0x00) lsetup part b */ + RELOC_NUMBER (R_BFIN_GOT17M4, 0x14) + RELOC_NUMBER (R_BFIN_GOTHI, 0x15) + RELOC_NUMBER (R_BFIN_GOTLO, 0x16) + RELOC_NUMBER (R_BFIN_FUNCDESC, 0x17) + RELOC_NUMBER (R_BFIN_FUNCDESC_GOT17M4, 0x18) + RELOC_NUMBER (R_BFIN_FUNCDESC_GOTHI, 0x19) + RELOC_NUMBER (R_BFIN_FUNCDESC_GOTLO, 0x1a) + RELOC_NUMBER (R_BFIN_FUNCDESC_VALUE, 0x1b) + RELOC_NUMBER (R_BFIN_FUNCDESC_GOTOFF17M4, 0x1c) + RELOC_NUMBER (R_BFIN_FUNCDESC_GOTOFFHI, 0x1d) + RELOC_NUMBER (R_BFIN_FUNCDESC_GOTOFFLO, 0x1e) + RELOC_NUMBER (R_BFIN_GOTOFF17M4, 0x1f) + RELOC_NUMBER (R_BFIN_GOTOFFHI, 0x20) + RELOC_NUMBER (R_BFIN_GOTOFFLO, 0x21) + + RELOC_NUMBER (R_BFIN_PUSH, 0xE0) + RELOC_NUMBER (R_BFIN_CONST, 0xE1) + RELOC_NUMBER (R_BFIN_ADD, 0xE2) + RELOC_NUMBER (R_BFIN_SUB, 0xE3) + RELOC_NUMBER (R_BFIN_MULT, 0xE4) + RELOC_NUMBER (R_BFIN_DIV, 0xE5) + RELOC_NUMBER (R_BFIN_MOD, 0xE6) + RELOC_NUMBER (R_BFIN_LSHIFT, 0xE7) + RELOC_NUMBER (R_BFIN_RSHIFT, 0xE8) + RELOC_NUMBER (R_BFIN_AND, 0xE9) + RELOC_NUMBER (R_BFIN_OR, 0xEA) + RELOC_NUMBER (R_BFIN_XOR, 0xEB) + RELOC_NUMBER (R_BFIN_LAND, 0xEC) + RELOC_NUMBER (R_BFIN_LOR, 0xED) + RELOC_NUMBER (R_BFIN_LEN, 0xEE) + RELOC_NUMBER (R_BFIN_NEG, 0xEF) + RELOC_NUMBER (R_BFIN_COMP, 0xF0) + RELOC_NUMBER (R_BFIN_PAGE, 0xF1) + RELOC_NUMBER (R_BFIN_HWPAGE, 0xF2) + RELOC_NUMBER (R_BFIN_ADDR, 0xF3) + RELOC_NUMBER (R_BFIN_PLTPC, 0x40) /* PLT gnu only relocation */ + RELOC_NUMBER (R_BFIN_GOT, 0x41) /* GOT gnu only relocation */ + RELOC_NUMBER (R_BFIN_GNU_VTINHERIT, 0x42) /* C++, gnu only */ + RELOC_NUMBER (R_BFIN_GNU_VTENTRY, 0x43) /* C++, gnu only */ +END_RELOC_NUMBERS (R_BFIN_max) + +/* Processor specific flags for the ELF header e_flags field. */ +#define EF_BFIN_PIC 0x00000001 /* -fpic */ +#define EF_BFIN_FDPIC 0x00000002 /* -mfdpic */ + +#define EF_BFIN_CODE_IN_L1 0x00000010 /* --code-in-l1 */ +#define EF_BFIN_DATA_IN_L1 0x00000020 /* --data-in-l1 */ + +#define EF_BFIN_PIC_FLAGS (EF_BFIN_PIC | EF_BFIN_FDPIC) +#endif /* _ELF_BFIN_H */ diff --git a/support/sdbinutils/include/elf/common.h b/support/sdbinutils/include/elf/common.h new file mode 100644 index 0000000..61a1ca7 --- /dev/null +++ b/support/sdbinutils/include/elf/common.h @@ -0,0 +1,1172 @@ +/* ELF support for BFD. + Copyright (C) 1991-2018 Free Software Foundation, Inc. + + Written by Fred Fish @ Cygnus Support, from information published + in "UNIX System V Release 4, Programmers Guide: ANSI C and + Programming Support Tools". + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file is part of ELF support for BFD, and contains the portions + that are common to both the internal and external representations. + For example, ELFMAG0 is the byte 0x7F in both the internal (in-memory) + and external (in-file) representations. */ + +#ifndef _ELF_COMMON_H +#define _ELF_COMMON_H + +/* Fields in e_ident[]. */ + +#define EI_MAG0 0 /* File identification byte 0 index */ +#define ELFMAG0 0x7F /* Magic number byte 0 */ + +#define EI_MAG1 1 /* File identification byte 1 index */ +#define ELFMAG1 'E' /* Magic number byte 1 */ + +#define EI_MAG2 2 /* File identification byte 2 index */ +#define ELFMAG2 'L' /* Magic number byte 2 */ + +#define EI_MAG3 3 /* File identification byte 3 index */ +#define ELFMAG3 'F' /* Magic number byte 3 */ + +#define EI_CLASS 4 /* File class */ +#define ELFCLASSNONE 0 /* Invalid class */ +#define ELFCLASS32 1 /* 32-bit objects */ +#define ELFCLASS64 2 /* 64-bit objects */ + +#define EI_DATA 5 /* Data encoding */ +#define ELFDATANONE 0 /* Invalid data encoding */ +#define ELFDATA2LSB 1 /* 2's complement, little endian */ +#define ELFDATA2MSB 2 /* 2's complement, big endian */ + +#define EI_VERSION 6 /* File version */ + +#define EI_OSABI 7 /* Operating System/ABI indication */ +#define ELFOSABI_NONE 0 /* UNIX System V ABI */ +#define ELFOSABI_HPUX 1 /* HP-UX operating system */ +#define ELFOSABI_NETBSD 2 /* NetBSD */ +#define ELFOSABI_GNU 3 /* GNU */ +#define ELFOSABI_LINUX 3 /* Alias for ELFOSABI_GNU */ +#define ELFOSABI_SOLARIS 6 /* Solaris */ +#define ELFOSABI_AIX 7 /* AIX */ +#define ELFOSABI_IRIX 8 /* IRIX */ +#define ELFOSABI_FREEBSD 9 /* FreeBSD */ +#define ELFOSABI_TRU64 10 /* TRU64 UNIX */ +#define ELFOSABI_MODESTO 11 /* Novell Modesto */ +#define ELFOSABI_OPENBSD 12 /* OpenBSD */ +#define ELFOSABI_OPENVMS 13 /* OpenVMS */ +#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */ +#define ELFOSABI_AROS 15 /* AROS */ +#define ELFOSABI_FENIXOS 16 /* FenixOS */ +#define ELFOSABI_CLOUDABI 17 /* Nuxi CloudABI */ +#define ELFOSABI_OPENVOS 18 /* Stratus Technologies OpenVOS */ + +#define ELFOSABI_C6000_ELFABI 64 /* Bare-metal TMS320C6000 */ +#define ELFOSABI_C6000_LINUX 65 /* Linux TMS320C6000 */ +#define ELFOSABI_ARM 97 /* ARM */ +#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ + +#define EI_ABIVERSION 8 /* ABI version */ + +#define EI_PAD 9 /* Start of padding bytes */ + + +/* Values for e_type, which identifies the object file type. */ + +#define ET_NONE 0 /* No file type */ +#define ET_REL 1 /* Relocatable file */ +#define ET_EXEC 2 /* Executable file */ +#define ET_DYN 3 /* Shared object file */ +#define ET_CORE 4 /* Core file */ +#define ET_LOOS 0xFE00 /* Operating system-specific */ +#define ET_HIOS 0xFEFF /* Operating system-specific */ +#define ET_LOPROC 0xFF00 /* Processor-specific */ +#define ET_HIPROC 0xFFFF /* Processor-specific */ + +/* Values for e_machine, which identifies the architecture. These numbers + are officially assigned by registry@sco.com. See below for a list of + ad-hoc numbers used during initial development. */ + +#define EM_NONE 0 /* No machine */ +#define EM_M32 1 /* AT&T WE 32100 */ +#define EM_SPARC 2 /* SUN SPARC */ +#define EM_386 3 /* Intel 80386 */ +#define EM_68K 4 /* Motorola m68k family */ +#define EM_88K 5 /* Motorola m88k family */ +#define EM_IAMCU 6 /* Intel MCU */ +#define EM_860 7 /* Intel 80860 */ +#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */ +#define EM_S370 9 /* IBM System/370 */ +#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian (Oct 4 1999 Draft). Deprecated. */ +#define EM_OLD_SPARCV9 11 /* Old version of Sparc v9, from before the ABI. Deprecated. */ +#define EM_res011 11 /* Reserved */ +#define EM_res012 12 /* Reserved */ +#define EM_res013 13 /* Reserved */ +#define EM_res014 14 /* Reserved */ +#define EM_PARISC 15 /* HPPA */ +#define EM_res016 16 /* Reserved */ +#define EM_PPC_OLD 17 /* Old version of PowerPC. Deprecated. */ +#define EM_VPP550 17 /* Fujitsu VPP500 */ +#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ +#define EM_960 19 /* Intel 80960 */ +#define EM_PPC 20 /* PowerPC */ +#define EM_PPC64 21 /* 64-bit PowerPC */ +#define EM_S390 22 /* IBM S/390 */ +#define EM_SPU 23 /* Sony/Toshiba/IBM SPU */ +#define EM_res024 24 /* Reserved */ +#define EM_res025 25 /* Reserved */ +#define EM_res026 26 /* Reserved */ +#define EM_res027 27 /* Reserved */ +#define EM_res028 28 /* Reserved */ +#define EM_res029 29 /* Reserved */ +#define EM_res030 30 /* Reserved */ +#define EM_res031 31 /* Reserved */ +#define EM_res032 32 /* Reserved */ +#define EM_res033 33 /* Reserved */ +#define EM_res034 34 /* Reserved */ +#define EM_res035 35 /* Reserved */ +#define EM_V800 36 /* NEC V800 series */ +#define EM_FR20 37 /* Fujitsu FR20 */ +#define EM_RH32 38 /* TRW RH32 */ +#define EM_MCORE 39 /* Motorola M*Core */ /* May also be taken by Fujitsu MMA */ +#define EM_RCE 39 /* Old name for MCore */ +#define EM_ARM 40 /* ARM */ +#define EM_OLD_ALPHA 41 /* Digital Alpha */ +#define EM_SH 42 /* Renesas (formerly Hitachi) / SuperH SH */ +#define EM_SPARCV9 43 /* SPARC v9 64-bit */ +#define EM_TRICORE 44 /* Siemens Tricore embedded processor */ +#define EM_ARC 45 /* ARC Cores */ +#define EM_H8_300 46 /* Renesas (formerly Hitachi) H8/300 */ +#define EM_H8_300H 47 /* Renesas (formerly Hitachi) H8/300H */ +#define EM_H8S 48 /* Renesas (formerly Hitachi) H8S */ +#define EM_H8_500 49 /* Renesas (formerly Hitachi) H8/500 */ +#define EM_IA_64 50 /* Intel IA-64 Processor */ +#define EM_MIPS_X 51 /* Stanford MIPS-X */ +#define EM_COLDFIRE 52 /* Motorola Coldfire */ +#define EM_68HC12 53 /* Motorola M68HC12 */ +#define EM_MMA 54 /* Fujitsu Multimedia Accelerator */ +#define EM_PCP 55 /* Siemens PCP */ +#define EM_NCPU 56 /* Sony nCPU embedded RISC processor */ +#define EM_NDR1 57 /* Denso NDR1 microprocessor */ +#define EM_STARCORE 58 /* Motorola Star*Core processor */ +#define EM_ME16 59 /* Toyota ME16 processor */ +#define EM_ST100 60 /* STMicroelectronics ST100 processor */ +#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor */ +#define EM_X86_64 62 /* Advanced Micro Devices X86-64 processor */ +#define EM_PDSP 63 /* Sony DSP Processor */ +#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */ +#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */ +#define EM_FX66 66 /* Siemens FX66 microcontroller */ +#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */ +#define EM_ST7 68 /* STMicroelectronics ST7 8-bit microcontroller */ +#define EM_68HC16 69 /* Motorola MC68HC16 Microcontroller */ +#define EM_68HC11 70 /* Motorola MC68HC11 Microcontroller */ +#define EM_68HC08 71 /* Motorola MC68HC08 Microcontroller */ +#define EM_68HC05 72 /* Motorola MC68HC05 Microcontroller */ +#define EM_SVX 73 /* Silicon Graphics SVx */ +#define EM_ST19 74 /* STMicroelectronics ST19 8-bit cpu */ +#define EM_VAX 75 /* Digital VAX */ +#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ +#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded cpu */ +#define EM_FIREPATH 78 /* Element 14 64-bit DSP processor */ +#define EM_ZSP 79 /* LSI Logic's 16-bit DSP processor */ +#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */ +#define EM_HUANY 81 /* Harvard's machine-independent format */ +#define EM_PRISM 82 /* SiTera Prism */ +#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */ +#define EM_FR30 84 /* Fujitsu FR30 */ +#define EM_D10V 85 /* Mitsubishi D10V */ +#define EM_D30V 86 /* Mitsubishi D30V */ +#define EM_V850 87 /* Renesas V850 (formerly NEC V850) */ +#define EM_M32R 88 /* Renesas M32R (formerly Mitsubishi M32R) */ +#define EM_MN10300 89 /* Matsushita MN10300 */ +#define EM_MN10200 90 /* Matsushita MN10200 */ +#define EM_PJ 91 /* picoJava */ +#define EM_OR1K 92 /* OpenRISC 1000 32-bit embedded processor */ +#define EM_ARC_COMPACT 93 /* ARC International ARCompact processor */ +#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ +#define EM_SCORE_OLD 95 /* Old Sunplus S+core7 backend magic number. Written in the absence of an ABI. */ +#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */ +#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */ +#define EM_NS32K 97 /* National Semiconductor 32000 series */ +#define EM_TPC 98 /* Tenor Network TPC processor */ +#define EM_PJ_OLD 99 /* Old value for picoJava. Deprecated. */ +#define EM_SNP1K 99 /* Trebia SNP 1000 processor */ +#define EM_ST200 100 /* STMicroelectronics ST200 microcontroller */ +#define EM_IP2K 101 /* Ubicom IP2022 micro controller */ +#define EM_MAX 102 /* MAX Processor */ +#define EM_CR 103 /* National Semiconductor CompactRISC */ +#define EM_F2MC16 104 /* Fujitsu F2MC16 */ +#define EM_MSP430 105 /* TI msp430 micro controller */ +#define EM_BLACKFIN 106 /* ADI Blackfin */ +#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */ +#define EM_SEP 108 /* Sharp embedded microprocessor */ +#define EM_ARCA 109 /* Arca RISC Microprocessor */ +#define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */ +#define EM_EXCESS 111 /* eXcess: 16/32/64-bit configurable embedded CPU */ +#define EM_DXP 112 /* Icera Semiconductor Inc. Deep Execution Processor */ +#define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */ +#define EM_CRX 114 /* National Semiconductor CRX */ +#define EM_CR16_OLD 115 /* Old, value for National Semiconductor CompactRISC. Deprecated. */ +#define EM_XGATE 115 /* Motorola XGATE embedded processor */ +#define EM_C166 116 /* Infineon C16x/XC16x processor */ +#define EM_M16C 117 /* Renesas M16C series microprocessors */ +#define EM_DSPIC30F 118 /* Microchip Technology dsPIC30F Digital Signal Controller */ +#define EM_CE 119 /* Freescale Communication Engine RISC core */ +#define EM_M32C 120 /* Renesas M32C series microprocessors */ +#define EM_res121 121 /* Reserved */ +#define EM_res122 122 /* Reserved */ +#define EM_res123 123 /* Reserved */ +#define EM_res124 124 /* Reserved */ +#define EM_res125 125 /* Reserved */ +#define EM_res126 126 /* Reserved */ +#define EM_res127 127 /* Reserved */ +#define EM_res128 128 /* Reserved */ +#define EM_res129 129 /* Reserved */ +#define EM_res130 130 /* Reserved */ +#define EM_TSK3000 131 /* Altium TSK3000 core */ +#define EM_RS08 132 /* Freescale RS08 embedded processor */ +#define EM_res133 133 /* Reserved */ +#define EM_ECOG2 134 /* Cyan Technology eCOG2 microprocessor */ +#define EM_SCORE 135 /* Sunplus Score */ +#define EM_SCORE7 135 /* Sunplus S+core7 RISC processor */ +#define EM_DSP24 136 /* New Japan Radio (NJR) 24-bit DSP Processor */ +#define EM_VIDEOCORE3 137 /* Broadcom VideoCore III processor */ +#define EM_LATTICEMICO32 138 /* RISC processor for Lattice FPGA architecture */ +#define EM_SE_C17 139 /* Seiko Epson C17 family */ +#define EM_TI_C6000 140 /* Texas Instruments TMS320C6000 DSP family */ +#define EM_TI_C2000 141 /* Texas Instruments TMS320C2000 DSP family */ +#define EM_TI_C5500 142 /* Texas Instruments TMS320C55x DSP family */ +#define EM_res143 143 /* Reserved */ +#define EM_TI_PRU 144 /* Texas Instruments Programmable Realtime Unit */ +#define EM_res145 145 /* Reserved */ +#define EM_res146 146 /* Reserved */ +#define EM_res147 147 /* Reserved */ +#define EM_res148 148 /* Reserved */ +#define EM_res149 149 /* Reserved */ +#define EM_res150 150 /* Reserved */ +#define EM_res151 151 /* Reserved */ +#define EM_res152 152 /* Reserved */ +#define EM_res153 153 /* Reserved */ +#define EM_res154 154 /* Reserved */ +#define EM_res155 155 /* Reserved */ +#define EM_res156 156 /* Reserved */ +#define EM_res157 157 /* Reserved */ +#define EM_res158 158 /* Reserved */ +#define EM_res159 159 /* Reserved */ +#define EM_MMDSP_PLUS 160 /* STMicroelectronics 64bit VLIW Data Signal Processor */ +#define EM_CYPRESS_M8C 161 /* Cypress M8C microprocessor */ +#define EM_R32C 162 /* Renesas R32C series microprocessors */ +#define EM_TRIMEDIA 163 /* NXP Semiconductors TriMedia architecture family */ +#define EM_QDSP6 164 /* QUALCOMM DSP6 Processor */ +#define EM_8051 165 /* Intel 8051 and variants */ +#define EM_STXP7X 166 /* STMicroelectronics STxP7x family */ +#define EM_NDS32 167 /* Andes Technology compact code size embedded RISC processor family */ +#define EM_ECOG1 168 /* Cyan Technology eCOG1X family */ +#define EM_ECOG1X 168 /* Cyan Technology eCOG1X family */ +#define EM_MAXQ30 169 /* Dallas Semiconductor MAXQ30 Core Micro-controllers */ +#define EM_XIMO16 170 /* New Japan Radio (NJR) 16-bit DSP Processor */ +#define EM_MANIK 171 /* M2000 Reconfigurable RISC Microprocessor */ +#define EM_CRAYNV2 172 /* Cray Inc. NV2 vector architecture */ +#define EM_RX 173 /* Renesas RX family */ +#define EM_METAG 174 /* Imagination Technologies Meta processor architecture */ +#define EM_MCST_ELBRUS 175 /* MCST Elbrus general purpose hardware architecture */ +#define EM_ECOG16 176 /* Cyan Technology eCOG16 family */ +#define EM_CR16 177 /* National Semiconductor CompactRISC 16-bit processor */ +#define EM_ETPU 178 /* Freescale Extended Time Processing Unit */ +#define EM_SLE9X 179 /* Infineon Technologies SLE9X core */ +#define EM_L1OM 180 /* Intel L1OM */ +#define EM_K1OM 181 /* Intel K1OM */ +#define EM_INTEL182 182 /* Reserved by Intel */ +#define EM_AARCH64 183 /* ARM 64-bit architecture */ +#define EM_ARM184 184 /* Reserved by ARM */ +#define EM_AVR32 185 /* Atmel Corporation 32-bit microprocessor family */ +#define EM_STM8 186 /* STMicroeletronics STM8 8-bit microcontroller */ +#define EM_TILE64 187 /* Tilera TILE64 multicore architecture family */ +#define EM_TILEPRO 188 /* Tilera TILEPro multicore architecture family */ +#define EM_MICROBLAZE 189 /* Xilinx MicroBlaze 32-bit RISC soft processor core */ +#define EM_CUDA 190 /* NVIDIA CUDA architecture */ +#define EM_TILEGX 191 /* Tilera TILE-Gx multicore architecture family */ +#define EM_CLOUDSHIELD 192 /* CloudShield architecture family */ +#define EM_COREA_1ST 193 /* KIPO-KAIST Core-A 1st generation processor family */ +#define EM_COREA_2ND 194 /* KIPO-KAIST Core-A 2nd generation processor family */ +#define EM_ARC_COMPACT2 195 /* Synopsys ARCompact V2 */ +#define EM_OPEN8 196 /* Open8 8-bit RISC soft processor core */ +#define EM_RL78 197 /* Renesas RL78 family. */ +#define EM_VIDEOCORE5 198 /* Broadcom VideoCore V processor */ +#define EM_78K0R 199 /* Renesas 78K0R. */ +#define EM_56800EX 200 /* Freescale 56800EX Digital Signal Controller (DSC) */ +#define EM_BA1 201 /* Beyond BA1 CPU architecture */ +#define EM_BA2 202 /* Beyond BA2 CPU architecture */ +#define EM_XCORE 203 /* XMOS xCORE processor family */ +#define EM_MCHP_PIC 204 /* Microchip 8-bit PIC(r) family */ +#define EM_INTEL205 205 /* Reserved by Intel */ +#define EM_INTEL206 206 /* Reserved by Intel */ +#define EM_INTEL207 207 /* Reserved by Intel */ +#define EM_INTEL208 208 /* Reserved by Intel */ +#define EM_INTEL209 209 /* Reserved by Intel */ +#define EM_KM32 210 /* KM211 KM32 32-bit processor */ +#define EM_KMX32 211 /* KM211 KMX32 32-bit processor */ +#define EM_KMX16 212 /* KM211 KMX16 16-bit processor */ +#define EM_KMX8 213 /* KM211 KMX8 8-bit processor */ +#define EM_KVARC 214 /* KM211 KVARC processor */ +#define EM_CDP 215 /* Paneve CDP architecture family */ +#define EM_COGE 216 /* Cognitive Smart Memory Processor */ +#define EM_COOL 217 /* Bluechip Systems CoolEngine */ +#define EM_NORC 218 /* Nanoradio Optimized RISC */ +#define EM_CSR_KALIMBA 219 /* CSR Kalimba architecture family */ +#define EM_Z80 220 /* Zilog Z80 */ +#define EM_VISIUM 221 /* Controls and Data Services VISIUMcore processor */ +#define EM_FT32 222 /* FTDI Chip FT32 high performance 32-bit RISC architecture */ +#define EM_MOXIE 223 /* Moxie processor family */ +#define EM_AMDGPU 224 /* AMD GPU architecture */ +#define EM_RISCV 243 /* RISC-V */ +#define EM_LANAI 244 /* Lanai 32-bit processor. */ +#define EM_BPF 247 /* Linux BPF – in-kernel virtual machine. */ + +/* If it is necessary to assign new unofficial EM_* values, please pick large + random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision + with official or non-GNU unofficial values. + + NOTE: Do not just increment the most recent number by one. + Somebody else somewhere will do exactly the same thing, and you + will have a collision. Instead, pick a random number. + + Normally, each entity or maintainer responsible for a machine with an + unofficial e_machine number should eventually ask registry@sco.com for + an officially blessed number to be added to the list above. */ + +/* AVR magic number. Written in the absense of an ABI. */ +#define EM_AVR_OLD 0x1057 + +/* MSP430 magic number. Written in the absense of everything. */ +#define EM_MSP430_OLD 0x1059 + +/* Morpho MT. Written in the absense of an ABI. */ +#define EM_MT 0x2530 + +/* FR30 magic number - no EABI available. */ +#define EM_CYGNUS_FR30 0x3330 + +/* Unofficial value for Web Assembly binaries, as used by LLVM. */ +#define EM_WEBASSEMBLY 0x4157 + +/* DLX magic number. Written in the absense of an ABI. */ +#define EM_DLX 0x5aa5 + +/* FRV magic number - no EABI available??. */ +#define EM_CYGNUS_FRV 0x5441 + +/* Infineon Technologies 16-bit microcontroller with C166-V2 core. */ +#define EM_XC16X 0x4688 + +/* D10V backend magic number. Written in the absence of an ABI. */ +#define EM_CYGNUS_D10V 0x7650 + +/* D30V backend magic number. Written in the absence of an ABI. */ +#define EM_CYGNUS_D30V 0x7676 + +/* Ubicom IP2xxx; Written in the absense of an ABI. */ +#define EM_IP2K_OLD 0x8217 + +/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */ +#define EM_CYGNUS_POWERPC 0x9025 + +/* Alpha backend magic number. Written in the absence of an ABI. */ +#define EM_ALPHA 0x9026 + +/* Cygnus M32R ELF backend. Written in the absence of an ABI. */ +#define EM_CYGNUS_M32R 0x9041 + +/* V850 backend magic number. Written in the absense of an ABI. */ +#define EM_CYGNUS_V850 0x9080 + +/* old S/390 backend magic number. Written in the absence of an ABI. */ +#define EM_S390_OLD 0xa390 + +/* Old, unofficial value for Xtensa. */ +#define EM_XTENSA_OLD 0xabc7 + +#define EM_XSTORMY16 0xad45 + +/* mn10200 and mn10300 backend magic numbers. + Written in the absense of an ABI. */ +#define EM_CYGNUS_MN10300 0xbeef +#define EM_CYGNUS_MN10200 0xdead + +/* Renesas M32C and M16C. */ +#define EM_M32C_OLD 0xFEB0 + +/* Vitesse IQ2000. */ +#define EM_IQ2000 0xFEBA + +/* NIOS magic number - no EABI available. */ +#define EM_NIOS32 0xFEBB + +#define EM_CYGNUS_MEP 0xF00D /* Toshiba MeP */ + +/* Old, unofficial value for Moxie. */ +#define EM_MOXIE_OLD 0xFEED + +#define EM_MICROBLAZE_OLD 0xbaab /* Old MicroBlaze */ + +#define EM_ADAPTEVA_EPIPHANY 0x1223 /* Adapteva's Epiphany architecture. */ + +/* Old constant that might be in use by some software. */ +#define EM_OPENRISC EM_OR1K + +/* See the above comment before you add a new EM_* value here. */ + +/* Values for e_version. */ + +#define EV_NONE 0 /* Invalid ELF version */ +#define EV_CURRENT 1 /* Current version */ + +/* Value for e_phnum. */ +#define PN_XNUM 0xffff /* Extended numbering */ + +/* Values for program header, p_type field. */ + +#define PT_NULL 0 /* Program header table entry unused */ +#define PT_LOAD 1 /* Loadable program segment */ +#define PT_DYNAMIC 2 /* Dynamic linking information */ +#define PT_INTERP 3 /* Program interpreter */ +#define PT_NOTE 4 /* Auxiliary information */ +#define PT_SHLIB 5 /* Reserved, unspecified semantics */ +#define PT_PHDR 6 /* Entry for header table itself */ +#define PT_TLS 7 /* Thread local storage segment */ +#define PT_LOOS 0x60000000 /* OS-specific */ +#define PT_HIOS 0x6fffffff /* OS-specific */ +#define PT_LOPROC 0x70000000 /* Processor-specific */ +#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */ + +#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) /* Frame unwind information */ +#define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */ +#define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */ +#define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */ + +/* Mbind segments */ +#define PT_GNU_MBIND_NUM 4096 +#define PT_GNU_MBIND_LO (PT_LOOS + 0x474e555) +#define PT_GNU_MBIND_HI (PT_GNU_MBIND_LO + PT_GNU_MBIND_NUM - 1) + +/* Program segment permissions, in program header p_flags field. */ + +#define PF_X (1 << 0) /* Segment is executable */ +#define PF_W (1 << 1) /* Segment is writable */ +#define PF_R (1 << 2) /* Segment is readable */ +/* #define PF_MASKOS 0x0F000000 *//* OS-specific reserved bits */ +#define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */ +#define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */ + +/* Values for section header, sh_type field. */ + +#define SHT_NULL 0 /* Section header table entry unused */ +#define SHT_PROGBITS 1 /* Program specific (private) data */ +#define SHT_SYMTAB 2 /* Link editing symbol table */ +#define SHT_STRTAB 3 /* A string table */ +#define SHT_RELA 4 /* Relocation entries with addends */ +#define SHT_HASH 5 /* A symbol hash table */ +#define SHT_DYNAMIC 6 /* Information for dynamic linking */ +#define SHT_NOTE 7 /* Information that marks file */ +#define SHT_NOBITS 8 /* Section occupies no space in file */ +#define SHT_REL 9 /* Relocation entries, no addends */ +#define SHT_SHLIB 10 /* Reserved, unspecified semantics */ +#define SHT_DYNSYM 11 /* Dynamic linking symbol table */ + +#define SHT_INIT_ARRAY 14 /* Array of ptrs to init functions */ +#define SHT_FINI_ARRAY 15 /* Array of ptrs to finish functions */ +#define SHT_PREINIT_ARRAY 16 /* Array of ptrs to pre-init funcs */ +#define SHT_GROUP 17 /* Section contains a section group */ +#define SHT_SYMTAB_SHNDX 18 /* Indicies for SHN_XINDEX entries */ + +#define SHT_LOOS 0x60000000 /* First of OS specific semantics */ +#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ + +#define SHT_GNU_INCREMENTAL_INPUTS 0x6fff4700 /* incremental build data */ +#define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes */ +#define SHT_GNU_HASH 0x6ffffff6 /* GNU style symbol hash table */ +#define SHT_GNU_LIBLIST 0x6ffffff7 /* List of prelink dependencies */ + +/* The next three section types are defined by Solaris, and are named + SHT_SUNW*. We use them in GNU code, so we also define SHT_GNU* + versions. */ +#define SHT_SUNW_verdef 0x6ffffffd /* Versions defined by file */ +#define SHT_SUNW_verneed 0x6ffffffe /* Versions needed by file */ +#define SHT_SUNW_versym 0x6fffffff /* Symbol versions */ + +#define SHT_GNU_verdef SHT_SUNW_verdef +#define SHT_GNU_verneed SHT_SUNW_verneed +#define SHT_GNU_versym SHT_SUNW_versym + +#define SHT_LOPROC 0x70000000 /* Processor-specific semantics, lo */ +#define SHT_HIPROC 0x7FFFFFFF /* Processor-specific semantics, hi */ +#define SHT_LOUSER 0x80000000 /* Application-specific semantics */ +/* #define SHT_HIUSER 0x8FFFFFFF *//* Application-specific semantics */ +#define SHT_HIUSER 0xFFFFFFFF /* New value, defined in Oct 4, 1999 Draft */ + +/* Values for section header, sh_flags field. */ + +#define SHF_WRITE (1 << 0) /* Writable data during execution */ +#define SHF_ALLOC (1 << 1) /* Occupies memory during execution */ +#define SHF_EXECINSTR (1 << 2) /* Executable machine instructions */ +#define SHF_MERGE (1 << 4) /* Data in this section can be merged */ +#define SHF_STRINGS (1 << 5) /* Contains null terminated character strings */ +#define SHF_INFO_LINK (1 << 6) /* sh_info holds section header table index */ +#define SHF_LINK_ORDER (1 << 7) /* Preserve section ordering when linking */ +#define SHF_OS_NONCONFORMING (1 << 8) /* OS specific processing required */ +#define SHF_GROUP (1 << 9) /* Member of a section group */ +#define SHF_TLS (1 << 10) /* Thread local storage section */ +#define SHF_COMPRESSED (1 << 11) /* Section with compressed data */ + +/* #define SHF_MASKOS 0x0F000000 *//* OS-specific semantics */ +#define SHF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */ +#define SHF_GNU_BUILD_NOTE (1 << 20) /* Section contains GNU BUILD ATTRIBUTE notes. */ +#define SHF_MASKPROC 0xF0000000 /* Processor-specific semantics */ + +/* This used to be implemented as a processor specific section flag. + We just make it generic. */ +#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude + this section from executable + and shared library that it + builds when those objects + are not to be further + relocated. */ + +#define SHF_GNU_MBIND 0x01000000 /* Mbind section. */ + +/* Compression types. */ +#define ELFCOMPRESS_ZLIB 1 /* Compressed with zlib. */ +#define ELFCOMPRESS_LOOS 0x60000000 /* OS-specific semantics, lo */ +#define ELFCOMPRESS_HIOS 0x6FFFFFFF /* OS-specific semantics, hi */ +#define ELFCOMPRESS_LOPROC 0x70000000 /* Processor-specific semantics, lo */ +#define ELFCOMPRESS_HIPROC 0x7FFFFFFF /* Processor-specific semantics, hi */ + +/* Values of note segment descriptor types for core files. */ + +#define NT_PRSTATUS 1 /* Contains copy of prstatus struct */ +#define NT_FPREGSET 2 /* Contains copy of fpregset struct */ +#define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */ +#define NT_TASKSTRUCT 4 /* Contains copy of task struct */ +#define NT_AUXV 6 /* Contains copy of Elfxx_auxv_t */ +#define NT_PRXFPREG 0x46e62b7f /* Contains a user_xfpregs_struct; */ + /* note name must be "LINUX". */ +#define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */ + /* note name must be "LINUX". */ +#define NT_PPC_VSX 0x102 /* PowerPC VSX registers */ + /* note name must be "LINUX". */ +#define NT_PPC_TAR 0x103 /* PowerPC Target Address Register */ + /* note name must be "LINUX". */ +#define NT_PPC_PPR 0x104 /* PowerPC Program Priority Register */ + /* note name must be "LINUX". */ +#define NT_PPC_DSCR 0x105 /* PowerPC Data Stream Control Register */ + /* note name must be "LINUX". */ +#define NT_PPC_EBB 0x106 /* PowerPC Event Based Branch Registers */ + /* note name must be "LINUX". */ +#define NT_PPC_PMU 0x107 /* PowerPC Performance Monitor Registers */ + /* note name must be "LINUX". */ +#define NT_PPC_TM_CGPR 0x108 /* PowerPC TM checkpointed GPR Registers */ + /* note name must be "LINUX". */ +#define NT_PPC_TM_CFPR 0x109 /* PowerPC TM checkpointed FPR Registers */ + /* note name must be "LINUX". */ +#define NT_PPC_TM_CVMX 0x10a /* PowerPC TM checkpointed VMX Registers */ + /* note name must be "LINUX". */ +#define NT_PPC_TM_CVSX 0x10b /* PowerPC TM checkpointed VSX Registers */ + /* note name must be "LINUX". */ +#define NT_PPC_TM_SPR 0x10c /* PowerPC TM Special Purpose Registers */ + /* note name must be "LINUX". */ +#define NT_PPC_TM_CTAR 0x10d /* PowerPC TM checkpointed TAR */ + /* note name must be "LINUX". */ +#define NT_PPC_TM_CPPR 0x10e /* PowerPC TM checkpointed PPR */ + /* note name must be "LINUX". */ +#define NT_PPC_TM_CDSCR 0x10f /* PowerPC TM checkpointed Data SCR */ + /* note name must be "LINUX". */ +#define NT_386_TLS 0x200 /* x86 TLS information */ + /* note name must be "LINUX". */ +#define NT_386_IOPERM 0x201 /* x86 io permissions */ + /* note name must be "LINUX". */ +#define NT_X86_XSTATE 0x202 /* x86 XSAVE extended state */ + /* note name must be "LINUX". */ +#define NT_S390_HIGH_GPRS 0x300 /* S/390 upper halves of GPRs */ + /* note name must be "LINUX". */ +#define NT_S390_TIMER 0x301 /* S390 timer */ + /* note name must be "LINUX". */ +#define NT_S390_TODCMP 0x302 /* S390 TOD clock comparator */ + /* note name must be "LINUX". */ +#define NT_S390_TODPREG 0x303 /* S390 TOD programmable register */ + /* note name must be "LINUX". */ +#define NT_S390_CTRS 0x304 /* S390 control registers */ + /* note name must be "LINUX". */ +#define NT_S390_PREFIX 0x305 /* S390 prefix register */ + /* note name must be "LINUX". */ +#define NT_S390_LAST_BREAK 0x306 /* S390 breaking event address */ + /* note name must be "LINUX". */ +#define NT_S390_SYSTEM_CALL 0x307 /* S390 system call restart data */ + /* note name must be "LINUX". */ +#define NT_S390_TDB 0x308 /* S390 transaction diagnostic block */ + /* note name must be "LINUX". */ +#define NT_S390_VXRS_LOW 0x309 /* S390 vector registers 0-15 upper half */ + /* note name must be "LINUX". */ +#define NT_S390_VXRS_HIGH 0x30a /* S390 vector registers 16-31 */ + /* note name must be "LINUX". */ +#define NT_S390_GS_CB 0x30b /* s390 guarded storage registers */ + /* note name must be "LINUX". */ +#define NT_S390_GS_BC 0x30c /* s390 guarded storage broadcast control block */ + /* note name must be "LINUX". */ +#define NT_ARM_VFP 0x400 /* ARM VFP registers */ +/* The following definitions should really use NT_AARCH_..., but defined + this way for compatibility with Linux. */ +#define NT_ARM_TLS 0x401 /* AArch TLS registers */ + /* note name must be "LINUX". */ +#define NT_ARM_HW_BREAK 0x402 /* AArch hardware breakpoint registers */ + /* note name must be "LINUX". */ +#define NT_ARM_HW_WATCH 0x403 /* AArch hardware watchpoint registers */ + /* note name must be "LINUX". */ +#define NT_ARM_SVE 0x405 /* AArch SVE registers. */ + /* note name must be "LINUX". */ +#define NT_SIGINFO 0x53494749 /* Fields of siginfo_t. */ +#define NT_FILE 0x46494c45 /* Description of mapped files. */ + +/* Note segments for core files on dir-style procfs systems. */ + +#define NT_PSTATUS 10 /* Has a struct pstatus */ +#define NT_FPREGS 12 /* Has a struct fpregset */ +#define NT_PSINFO 13 /* Has a struct psinfo */ +#define NT_LWPSTATUS 16 /* Has a struct lwpstatus_t */ +#define NT_LWPSINFO 17 /* Has a struct lwpsinfo_t */ +#define NT_WIN32PSTATUS 18 /* Has a struct win32_pstatus */ + +/* Note segment for SystemTap probes. */ +#define NT_STAPSDT 3 + +/* Note segments for core files on FreeBSD systems. Note name is + "FreeBSD". */ + +#define NT_FREEBSD_THRMISC 7 /* Thread miscellaneous info. */ +#define NT_FREEBSD_PROCSTAT_PROC 8 /* Procstat proc data. */ +#define NT_FREEBSD_PROCSTAT_FILES 9 /* Procstat files data. */ +#define NT_FREEBSD_PROCSTAT_VMMAP 10 /* Procstat vmmap data. */ +#define NT_FREEBSD_PROCSTAT_GROUPS 11 /* Procstat groups data. */ +#define NT_FREEBSD_PROCSTAT_UMASK 12 /* Procstat umask data. */ +#define NT_FREEBSD_PROCSTAT_RLIMIT 13 /* Procstat rlimit data. */ +#define NT_FREEBSD_PROCSTAT_OSREL 14 /* Procstat osreldate data. */ +#define NT_FREEBSD_PROCSTAT_PSSTRINGS 15 /* Procstat ps_strings data. */ +#define NT_FREEBSD_PROCSTAT_AUXV 16 /* Procstat auxv data. */ +#define NT_FREEBSD_PTLWPINFO 17 /* Thread ptrace miscellaneous info. */ + +/* Note segments for core files on NetBSD systems. Note name + must start with "NetBSD-CORE". */ + +#define NT_NETBSDCORE_PROCINFO 1 /* Has a struct procinfo */ +#define NT_NETBSDCORE_FIRSTMACH 32 /* start of machdep note types */ + + +/* Note segments for core files on OpenBSD systems. Note name is + "OpenBSD". */ + +#define NT_OPENBSD_PROCINFO 10 +#define NT_OPENBSD_AUXV 11 +#define NT_OPENBSD_REGS 20 +#define NT_OPENBSD_FPREGS 21 +#define NT_OPENBSD_XFPREGS 22 +#define NT_OPENBSD_WCOOKIE 23 + + +/* Note segments for core files on SPU systems. Note name + must start with "SPU/". */ + +#define NT_SPU 1 + +/* Values of note segment descriptor types for object files. */ + +#define NT_VERSION 1 /* Contains a version string. */ +#define NT_ARCH 2 /* Contains an architecture string. */ + +/* Values for notes in non-core files using name "GNU". */ + +#define NT_GNU_ABI_TAG 1 +#define NT_GNU_HWCAP 2 /* Used by ld.so and kernel vDSO. */ +#define NT_GNU_BUILD_ID 3 /* Generated by ld --build-id. */ +#define NT_GNU_GOLD_VERSION 4 /* Generated by gold. */ +#define NT_GNU_PROPERTY_TYPE_0 5 /* Generated by gcc. */ + +#define NT_GNU_BUILD_ATTRIBUTE_OPEN 0x100 +#define NT_GNU_BUILD_ATTRIBUTE_FUNC 0x101 + +#define GNU_BUILD_ATTRIBUTE_TYPE_NUMERIC '*' +#define GNU_BUILD_ATTRIBUTE_TYPE_STRING '$' +#define GNU_BUILD_ATTRIBUTE_TYPE_BOOL_TRUE '+' +#define GNU_BUILD_ATTRIBUTE_TYPE_BOOL_FALSE '!' + +#define GNU_BUILD_ATTRIBUTE_VERSION 1 +#define GNU_BUILD_ATTRIBUTE_STACK_PROT 2 +#define GNU_BUILD_ATTRIBUTE_RELRO 3 +#define GNU_BUILD_ATTRIBUTE_STACK_SIZE 4 +#define GNU_BUILD_ATTRIBUTE_TOOL 5 +#define GNU_BUILD_ATTRIBUTE_ABI 6 +#define GNU_BUILD_ATTRIBUTE_PIC 7 +#define GNU_BUILD_ATTRIBUTE_SHORT_ENUM 8 + +#define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property" +#define GNU_BUILD_ATTRS_SECTION_NAME ".gnu.build.attributes" + +/* Values used in GNU .note.gnu.property notes (NT_GNU_PROPERTY_TYPE_0). */ +#define GNU_PROPERTY_STACK_SIZE 1 +#define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2 + +/* Processor-specific semantics, lo */ +#define GNU_PROPERTY_LOPROC 0xc0000000 +/* Processor-specific semantics, hi */ +#define GNU_PROPERTY_HIPROC 0xdfffffff +/* Application-specific semantics, lo */ +#define GNU_PROPERTY_LOUSER 0xe0000000 +/* Application-specific semantics, hi */ +#define GNU_PROPERTY_HIUSER 0xffffffff + +#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000 +#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001 +#define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002 + +#define GNU_PROPERTY_X86_ISA_1_486 (1U << 0) +#define GNU_PROPERTY_X86_ISA_1_586 (1U << 1) +#define GNU_PROPERTY_X86_ISA_1_686 (1U << 2) +#define GNU_PROPERTY_X86_ISA_1_SSE (1U << 3) +#define GNU_PROPERTY_X86_ISA_1_SSE2 (1U << 4) +#define GNU_PROPERTY_X86_ISA_1_SSE3 (1U << 5) +#define GNU_PROPERTY_X86_ISA_1_SSSE3 (1U << 6) +#define GNU_PROPERTY_X86_ISA_1_SSE4_1 (1U << 7) +#define GNU_PROPERTY_X86_ISA_1_SSE4_2 (1U << 8) +#define GNU_PROPERTY_X86_ISA_1_AVX (1U << 9) +#define GNU_PROPERTY_X86_ISA_1_AVX2 (1U << 10) +#define GNU_PROPERTY_X86_ISA_1_AVX512F (1U << 11) +#define GNU_PROPERTY_X86_ISA_1_AVX512CD (1U << 12) +#define GNU_PROPERTY_X86_ISA_1_AVX512ER (1U << 13) +#define GNU_PROPERTY_X86_ISA_1_AVX512PF (1U << 14) +#define GNU_PROPERTY_X86_ISA_1_AVX512VL (1U << 15) +#define GNU_PROPERTY_X86_ISA_1_AVX512DQ (1U << 16) +#define GNU_PROPERTY_X86_ISA_1_AVX512BW (1U << 17) + +#define GNU_PROPERTY_X86_FEATURE_1_IBT (1U << 0) +#define GNU_PROPERTY_X86_FEATURE_1_SHSTK (1U << 1) + +/* Values used in GNU .note.ABI-tag notes (NT_GNU_ABI_TAG). */ +#define GNU_ABI_TAG_LINUX 0 +#define GNU_ABI_TAG_HURD 1 +#define GNU_ABI_TAG_SOLARIS 2 +#define GNU_ABI_TAG_FREEBSD 3 +#define GNU_ABI_TAG_NETBSD 4 +#define GNU_ABI_TAG_SYLLABLE 5 +#define GNU_ABI_TAG_NACL 6 + +/* Values for NetBSD .note.netbsd.ident notes. Note name is "NetBSD". */ + +#define NT_NETBSD_IDENT 1 +#define NT_NETBSD_MARCH 5 + +/* Values for OpenBSD .note.openbsd.ident notes. Note name is "OpenBSD". */ + +#define NT_OPENBSD_IDENT 1 + +/* Values for FreeBSD .note.ABI-tag notes. Note name is "FreeBSD". */ + +#define NT_FREEBSD_ABI_TAG 1 + +/* These three macros disassemble and assemble a symbol table st_info field, + which contains the symbol binding and symbol type. The STB_ and STT_ + defines identify the binding and type. */ + +#define ELF_ST_BIND(val) (((unsigned int)(val)) >> 4) +#define ELF_ST_TYPE(val) ((val) & 0xF) +#define ELF_ST_INFO(bind,type) (((bind) << 4) + ((type) & 0xF)) + +/* The 64bit and 32bit versions of these macros are identical, but + the ELF spec defines them, so here they are. */ +#define ELF32_ST_BIND ELF_ST_BIND +#define ELF32_ST_TYPE ELF_ST_TYPE +#define ELF32_ST_INFO ELF_ST_INFO +#define ELF64_ST_BIND ELF_ST_BIND +#define ELF64_ST_TYPE ELF_ST_TYPE +#define ELF64_ST_INFO ELF_ST_INFO + +/* This macro disassembles and assembles a symbol's visibility into + the st_other field. The STV_ defines specify the actual visibility. */ + +#define ELF_ST_VISIBILITY(v) ((v) & 0x3) +/* The remaining bits in the st_other field are not currently used. + They should be set to zero. */ + +#define ELF32_ST_VISIBILITY ELF_ST_VISIBILITY +#define ELF64_ST_VISIBILITY ELF_ST_VISIBILITY + + +#define STN_UNDEF 0 /* Undefined symbol index */ + +#define STB_LOCAL 0 /* Symbol not visible outside obj */ +#define STB_GLOBAL 1 /* Symbol visible outside obj */ +#define STB_WEAK 2 /* Like globals, lower precedence */ +#define STB_LOOS 10 /* OS-specific semantics */ +#define STB_GNU_UNIQUE 10 /* Symbol is unique in namespace */ +#define STB_HIOS 12 /* OS-specific semantics */ +#define STB_LOPROC 13 /* Processor-specific semantics */ +#define STB_HIPROC 15 /* Processor-specific semantics */ + +#define STT_NOTYPE 0 /* Symbol type is unspecified */ +#define STT_OBJECT 1 /* Symbol is a data object */ +#define STT_FUNC 2 /* Symbol is a code object */ +#define STT_SECTION 3 /* Symbol associated with a section */ +#define STT_FILE 4 /* Symbol gives a file name */ +#define STT_COMMON 5 /* An uninitialised common block */ +#define STT_TLS 6 /* Thread local data object */ +#define STT_RELC 8 /* Complex relocation expression */ +#define STT_SRELC 9 /* Signed Complex relocation expression */ +#define STT_LOOS 10 /* OS-specific semantics */ +#define STT_GNU_IFUNC 10 /* Symbol is an indirect code object */ +#define STT_HIOS 12 /* OS-specific semantics */ +#define STT_LOPROC 13 /* Processor-specific semantics */ +#define STT_HIPROC 15 /* Processor-specific semantics */ + +/* The following constants control how a symbol may be accessed once it has + become part of an executable or shared library. */ + +#define STV_DEFAULT 0 /* Visibility is specified by binding type */ +#define STV_INTERNAL 1 /* OS specific version of STV_HIDDEN */ +#define STV_HIDDEN 2 /* Can only be seen inside currect component */ +#define STV_PROTECTED 3 /* Treat as STB_LOCAL inside current component */ + +/* Relocation info handling macros. */ + +#define ELF32_R_SYM(i) ((i) >> 8) +#define ELF32_R_TYPE(i) ((i) & 0xff) +#define ELF32_R_INFO(s,t) (((s) << 8) + ((t) & 0xff)) + +#define ELF64_R_SYM(i) ((i) >> 32) +#define ELF64_R_TYPE(i) ((i) & 0xffffffff) +#define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 31 << 1) + (bfd_vma) (t)) + +/* Dynamic section tags. */ + +#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 + +/* Note, the Oct 4, 1999 draft of the ELF ABI changed the values + for DT_LOOS and DT_HIOS. Some implementations however, use + values outside of the new range (see below). */ +#define OLD_DT_LOOS 0x60000000 +#define DT_LOOS 0x6000000d +#define DT_HIOS 0x6ffff000 +#define OLD_DT_HIOS 0x6fffffff + +#define DT_LOPROC 0x70000000 +#define DT_HIPROC 0x7fffffff + +/* The next 2 dynamic tag ranges, integer value range (DT_VALRNGLO to + DT_VALRNGHI) and virtual address range (DT_ADDRRNGLO to DT_ADDRRNGHI), + are used on Solaris. We support them everywhere. Note these values + lie outside of the (new) range for OS specific values. This is a + deliberate special case and we maintain it for backwards compatability. + */ +#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 0x6ffffdfc +#define DT_POSFLAG_1 0x6ffffdfd +#define DT_SYMINSZ 0x6ffffdfe +#define DT_SYMINENT 0x6ffffdff +#define DT_VALRNGHI 0x6ffffdff + +#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_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 + +/* This tag is a GNU extension to the Solaris version scheme. */ +#define DT_VERSYM 0x6ffffff0 + +#define DT_LOPROC 0x70000000 +#define DT_HIPROC 0x7fffffff + +/* These section tags are used on Solaris. We support them + everywhere, and hope they do not conflict. */ + +#define DT_AUXILIARY 0x7ffffffd +#define DT_USED 0x7ffffffe +#define DT_FILTER 0x7fffffff + + +/* Values used in DT_FEATURE .dynamic entry. */ +#define DTF_1_PARINIT 0x00000001 +/* From + + http://docs.sun.com:80/ab2/coll.45.13/LLM/@Ab2PageView/21165?Ab2Lang=C&Ab2Enc=iso-8859-1 + + DTF_1_CONFEXP is the same as DTF_1_PARINIT. It is a typo. The value + defined here is the same as the one in on Solaris 8. */ +#define DTF_1_CONFEXP 0x00000002 + +/* Flag values used in the DT_POSFLAG_1 .dynamic entry. */ +#define DF_P1_LAZYLOAD 0x00000001 +#define DF_P1_GROUPPERM 0x00000002 + +/* Flag value in in the DT_FLAGS_1 .dynamic entry. */ +#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 + +/* Flag values for the DT_FLAGS entry. */ +#define DF_ORIGIN (1 << 0) +#define DF_SYMBOLIC (1 << 1) +#define DF_TEXTREL (1 << 2) +#define DF_BIND_NOW (1 << 3) +#define DF_STATIC_TLS (1 << 4) + +/* These constants are used for the version number of a Elf32_Verdef + structure. */ + +#define VER_DEF_NONE 0 +#define VER_DEF_CURRENT 1 + +/* These constants appear in the vd_flags field of a Elf32_Verdef + structure. + + Cf. the Solaris Linker and Libraries Guide, Ch. 7, Object File Format, + Versioning Sections, for a description: + + http://docs.sun.com/app/docs/doc/819-0690/chapter6-93046?l=en&a=view */ + +#define VER_FLG_BASE 0x1 +#define VER_FLG_WEAK 0x2 +#define VER_FLG_INFO 0x4 + +/* These special constants can be found in an Elf32_Versym field. */ + +#define VER_NDX_LOCAL 0 +#define VER_NDX_GLOBAL 1 + +/* These constants are used for the version number of a Elf32_Verneed + structure. */ + +#define VER_NEED_NONE 0 +#define VER_NEED_CURRENT 1 + +/* This flag appears in a Versym structure. It means that the symbol + is hidden, and is only visible with an explicit version number. + This is a GNU extension. */ + +#define VERSYM_HIDDEN 0x8000 + +/* This is the mask for the rest of the Versym information. */ + +#define VERSYM_VERSION 0x7fff + +/* This is a special token which appears as part of a symbol name. It + indictes that the rest of the name is actually the name of a + version node, and is not part of the actual name. This is a GNU + extension. For example, the symbol name `stat@ver2' is taken to + mean the symbol `stat' in version `ver2'. */ + +#define ELF_VER_CHR '@' + +/* Possible values for si_boundto. */ + +#define SYMINFO_BT_SELF 0xffff /* Symbol bound to self */ +#define SYMINFO_BT_PARENT 0xfffe /* Symbol bound to parent */ +#define SYMINFO_BT_LOWRESERVE 0xff00 /* Beginning of reserved entries */ + +/* Possible bitmasks for si_flags. */ + +#define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */ +#define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */ +#define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */ +#define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy loaded */ + +/* Syminfo version values. */ + +#define SYMINFO_NONE 0 +#define SYMINFO_CURRENT 1 +#define SYMINFO_NUM 2 + +/* Section Group Flags. */ + +#define GRP_COMDAT 0x1 /* A COMDAT group */ +#define GRP_MASKOS 0x0ff00000 /* Bits in this range reserved for OS specific use. */ +#define GRP_MASKPROC 0xf0000000 /* Bits in this range reserved for processor use. */ + +/* Auxv a_type values. */ + +#define AT_NULL 0 /* End of vector */ +#define AT_IGNORE 1 /* Entry should be ignored */ +#define AT_EXECFD 2 /* File descriptor of program */ +#define AT_PHDR 3 /* Program headers for program */ +#define AT_PHENT 4 /* Size of program header entry */ +#define AT_PHNUM 5 /* Number of program headers */ +#define AT_PAGESZ 6 /* System page size */ +#define AT_BASE 7 /* Base address of interpreter */ +#define AT_FLAGS 8 /* Flags */ +#define AT_ENTRY 9 /* Entry point of program */ +#define AT_NOTELF 10 /* Program is not ELF */ +#define AT_UID 11 /* Real uid */ +#define AT_EUID 12 /* Effective uid */ +#define AT_GID 13 /* Real gid */ +#define AT_EGID 14 /* Effective gid */ +#define AT_CLKTCK 17 /* Frequency of times() */ +#define AT_PLATFORM 15 /* String identifying platform. */ +#define AT_HWCAP 16 /* Machine dependent hints about + processor capabilities. */ +#define AT_FPUCW 18 /* Used FPU control word. */ +#define AT_DCACHEBSIZE 19 /* Data cache block size. */ +#define AT_ICACHEBSIZE 20 /* Instruction cache block size. */ +#define AT_UCACHEBSIZE 21 /* Unified cache block size. */ +#define AT_IGNOREPPC 22 /* Entry should be ignored */ +#define AT_SECURE 23 /* Boolean, was exec setuid-like? */ +#define AT_BASE_PLATFORM 24 /* String identifying real platform, + may differ from AT_PLATFORM. */ +#define AT_RANDOM 25 /* Address of 16 random bytes. */ +#define AT_HWCAP2 26 /* Extension of AT_HWCAP. */ +#define AT_EXECFN 31 /* Filename of executable. */ +/* Pointer to the global system page used for system calls and other + nice things. */ +#define AT_SYSINFO 32 +#define AT_SYSINFO_EHDR 33 /* Pointer to ELF header of system-supplied DSO. */ + +/* More complete cache descriptions than AT_[DIU]CACHEBSIZE. If the + value is -1, then the cache doesn't exist. Otherwise: + + bit 0-3: Cache set-associativity; 0 means fully associative. + bit 4-7: Log2 of cacheline size. + bit 8-31: Size of the entire cache >> 8. */ + +#define AT_L1I_CACHESHAPE 34 +#define AT_L1D_CACHESHAPE 35 +#define AT_L2_CACHESHAPE 36 +#define AT_L3_CACHESHAPE 37 + +#define AT_FREEBSD_EXECPATH 15 /* Path to the executable. */ +#define AT_FREEBSD_CANARY 16 /* Canary for SSP. */ +#define AT_FREEBSD_CANARYLEN 17 /* Length of the canary. */ +#define AT_FREEBSD_OSRELDATE 18 /* OSRELDATE. */ +#define AT_FREEBSD_NCPUS 19 /* Number of CPUs. */ +#define AT_FREEBSD_PAGESIZES 20 /* Pagesizes. */ +#define AT_FREEBSD_PAGESIZESLEN 21 /* Number of pagesizes. */ +#define AT_FREEBSD_TIMEKEEP 22 /* Pointer to timehands. */ +#define AT_FREEBSD_STACKPROT 23 /* Initial stack protection. */ +#define AT_FREEBSD_EHDRFLAGS 24 /* e_flags field from ELF header. */ +#define AT_FREEBSD_HWCAP 25 /* CPU feature flags. */ + +#define AT_SUN_UID 2000 /* Effective user ID. */ +#define AT_SUN_RUID 2001 /* Real user ID. */ +#define AT_SUN_GID 2002 /* Effective group ID. */ +#define AT_SUN_RGID 2003 /* Real group ID. */ +#define AT_SUN_LDELF 2004 /* Dynamic linker's ELF header. */ +#define AT_SUN_LDSHDR 2005 /* Dynamic linker's section headers. */ +#define AT_SUN_LDNAME 2006 /* String giving name of dynamic linker. */ +#define AT_SUN_LPAGESZ 2007 /* Large pagesize. */ +#define AT_SUN_PLATFORM 2008 /* Platform name string. */ +#undef AT_SUN_HWCAP +#define AT_SUN_HWCAP 2009 /* Machine dependent hints about + processor capabilities. */ +#define AT_SUN_IFLUSH 2010 /* Should flush icache? */ +#define AT_SUN_CPU 2011 /* CPU name string. */ +#define AT_SUN_EMUL_ENTRY 2012 /* COFF entry point address. */ +#define AT_SUN_EMUL_EXECFD 2013 /* COFF executable file descriptor. */ +#define AT_SUN_EXECNAME 2014 /* Canonicalized file name given to execve. */ +#define AT_SUN_MMU 2015 /* String for name of MMU module. */ +#define AT_SUN_LDDATA 2016 /* Dynamic linker's data segment address. */ +#define AT_SUN_AUXFLAGS 2017 /* AF_SUN_ flags passed from the kernel. */ + + +#endif /* _ELF_COMMON_H */ diff --git a/support/sdbinutils/include/elf/cr16.h b/support/sdbinutils/include/elf/cr16.h new file mode 100644 index 0000000..f6aac1f --- /dev/null +++ b/support/sdbinutils/include/elf/cr16.h @@ -0,0 +1,62 @@ +/* CR16 ELF support for BFD. + Copyright (C) 2007-2018 Free Software Foundation, Inc. + Contributed by M R Swami Reddy. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_CR16_H +#define _ELF_CR16_H + +#include "elf/reloc-macros.h" + +/* Creating indices for reloc_map_index array. */ +START_RELOC_NUMBERS(elf_cr16_reloc_type) + RELOC_NUMBER (R_CR16_NONE, 0) + RELOC_NUMBER (R_CR16_NUM8, 1) + RELOC_NUMBER (R_CR16_NUM16, 2) + RELOC_NUMBER (R_CR16_NUM32, 3) + RELOC_NUMBER (R_CR16_NUM32a, 4) + RELOC_NUMBER (R_CR16_REGREL4, 5) + RELOC_NUMBER (R_CR16_REGREL4a, 6) + RELOC_NUMBER (R_CR16_REGREL14, 7) + RELOC_NUMBER (R_CR16_REGREL14a, 8) + RELOC_NUMBER (R_CR16_REGREL16, 9) + RELOC_NUMBER (R_CR16_REGREL20, 10) + RELOC_NUMBER (R_CR16_REGREL20a, 11) + RELOC_NUMBER (R_CR16_ABS20, 12) + RELOC_NUMBER (R_CR16_ABS24, 13) + RELOC_NUMBER (R_CR16_IMM4, 14) + RELOC_NUMBER (R_CR16_IMM8, 15) + RELOC_NUMBER (R_CR16_IMM16, 16) + RELOC_NUMBER (R_CR16_IMM20, 17) + RELOC_NUMBER (R_CR16_IMM24, 18) + RELOC_NUMBER (R_CR16_IMM32, 19) + RELOC_NUMBER (R_CR16_IMM32a, 20) + RELOC_NUMBER (R_CR16_DISP4, 21) + RELOC_NUMBER (R_CR16_DISP8, 22) + RELOC_NUMBER (R_CR16_DISP16, 23) + RELOC_NUMBER (R_CR16_DISP24, 24) + RELOC_NUMBER (R_CR16_DISP24a, 25) + RELOC_NUMBER (R_CR16_SWITCH8, 26) + RELOC_NUMBER (R_CR16_SWITCH16, 27) + RELOC_NUMBER (R_CR16_SWITCH32, 28) + RELOC_NUMBER (R_CR16_GOT_REGREL20, 29) + RELOC_NUMBER (R_CR16_GOTC_REGREL20, 30) + RELOC_NUMBER (R_CR16_GLOB_DAT, 31) +END_RELOC_NUMBERS(R_CR16_MAX) + +#endif /* _ELF_CR16_H */ diff --git a/support/sdbinutils/include/elf/cr16c.h b/support/sdbinutils/include/elf/cr16c.h new file mode 100644 index 0000000..9aa07da --- /dev/null +++ b/support/sdbinutils/include/elf/cr16c.h @@ -0,0 +1,258 @@ +/* CR16C ELF support for BFD. + Copyright (C) 2004-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_CR16C_H +#define _ELF_CR16C_H + +#include "bfd.h" +#include "elf/reloc-macros.h" + +/* Creating indices for reloc_map_index array. */ +START_RELOC_NUMBERS (elf_cr16c_reloc_type) + RELOC_NUMBER (RINDEX_16C_NUM08, 0) + RELOC_NUMBER (RINDEX_16C_NUM08_C, 1) + RELOC_NUMBER (RINDEX_16C_NUM16, 2) + RELOC_NUMBER (RINDEX_16C_NUM16_C, 3) + RELOC_NUMBER (RINDEX_16C_NUM32, 4) + RELOC_NUMBER (RINDEX_16C_NUM32_C, 5) + RELOC_NUMBER (RINDEX_16C_DISP04, 6) + RELOC_NUMBER (RINDEX_16C_DISP04_C, 7) + RELOC_NUMBER (RINDEX_16C_DISP08, 8) + RELOC_NUMBER (RINDEX_16C_DISP08_C, 9) + RELOC_NUMBER (RINDEX_16C_DISP16, 10) + RELOC_NUMBER (RINDEX_16C_DISP16_C, 11) + RELOC_NUMBER (RINDEX_16C_DISP24, 12) + RELOC_NUMBER (RINDEX_16C_DISP24_C, 13) + RELOC_NUMBER (RINDEX_16C_DISP24a, 14) + RELOC_NUMBER (RINDEX_16C_DISP24a_C, 15) + RELOC_NUMBER (RINDEX_16C_REG04, 16) + RELOC_NUMBER (RINDEX_16C_REG04_C, 17) + RELOC_NUMBER (RINDEX_16C_REG04a, 18) + RELOC_NUMBER (RINDEX_16C_REG04a_C, 19) + RELOC_NUMBER (RINDEX_16C_REG14, 20) + RELOC_NUMBER (RINDEX_16C_REG14_C, 21) + RELOC_NUMBER (RINDEX_16C_REG16, 22) + RELOC_NUMBER (RINDEX_16C_REG16_C, 23) + RELOC_NUMBER (RINDEX_16C_REG20, 24) + RELOC_NUMBER (RINDEX_16C_REG20_C, 25) + RELOC_NUMBER (RINDEX_16C_ABS20, 26) + RELOC_NUMBER (RINDEX_16C_ABS20_C, 27) + RELOC_NUMBER (RINDEX_16C_ABS24, 28) + RELOC_NUMBER (RINDEX_16C_ABS24_C, 29) + RELOC_NUMBER (RINDEX_16C_IMM04, 30) + RELOC_NUMBER (RINDEX_16C_IMM04_C, 31) + RELOC_NUMBER (RINDEX_16C_IMM16, 32) + RELOC_NUMBER (RINDEX_16C_IMM16_C, 33) + RELOC_NUMBER (RINDEX_16C_IMM20, 34) + RELOC_NUMBER (RINDEX_16C_IMM20_C, 35) + RELOC_NUMBER (RINDEX_16C_IMM24, 36) + RELOC_NUMBER (RINDEX_16C_IMM24_C, 37) + RELOC_NUMBER (RINDEX_16C_IMM32, 38) + RELOC_NUMBER (RINDEX_16C_IMM32_C, 39) +END_RELOC_NUMBERS (RINDEX_16C_MAX) + +/* CR16C Relocation Types ('cr_reloc_type' entry in the reloc_map structure). + The relocation constant name is determined as follows : + + R_16C_[_C] + + Where : + + is one of the following: + NUM - R_NUMBER mnemonic, + DISP - R_16C_DISPL mnemonic, + REG - R_16C_REGREL mnemonic, + ABS - R_16C_ABS mnemonic, + IMM - R_16C_IMMED mnemonic, + stands for R_S_16C_ + _C means 'code label' and is only added when R_ADDRTYPE subfield + is of type R_CODE_ADDR. */ + +/* The table below shows what the hex digits in the definition of the + relocation type constants correspond to. + ------------------------------------------------------------------ + R_SIZESP R_FORMAT R_RELTO R_ADDRTYPE + ------------------------------------------------------------------ */ +/* R_S_16C_08 R_NUMBER R_ABS R_ADDRESS */ +#define R_16C_NUM08 0X0001 + +/* R_S_16C_08 R_NUMBER R_ABS R_CODE_ADDR */ +#define R_16C_NUM08_C 0X0006 + +/* R_S_16C_16 R_NUMBER R_ABS R_ADDRESS */ +#define R_16C_NUM16 0X1001 + +/* R_S_16C_16 R_NUMBER R_ABS R_CODE_ADDR */ +#define R_16C_NUM16_C 0X1006 + +/* R_S_16C_32 R_NUMBER R_ABS R_ADDRESS */ +#define R_16C_NUM32 0X2001 + +/* R_S_16C_32 R_NUMBER R_ABS R_CODE_ADDR */ +#define R_16C_NUM32_C 0X2006 + +/* R_S_16C_04 R_16C_DISPL R_PCREL R_ADDRESS */ +#define R_16C_DISP04 0X5411 + +/* R_S_16C_04 R_16C_DISPL R_PCREL R_CODE_ADDR */ +#define R_16C_DISP04_C 0X5416 + +/* R_S_16C_08 R_16C_DISPL R_PCREL R_ADDRESS */ +#define R_16C_DISP08 0X0411 + +/* R_S_16C_08 R_16C_DISPL R_PCREL R_CODE_ADDR */ +#define R_16C_DISP08_C 0X0416 + +/* R_S_16C_16 R_16C_DISPL R_PCREL R_ADDRESS */ +#define R_16C_DISP16 0X1411 + +/* R_S_16C_16 R_16C_DISPL R_PCREL R_CODE_ADDR */ +#define R_16C_DISP16_C 0X1416 + +/* R_S_16C_24 R_16C_DISPL R_PCREL R_ADDRESS */ +#define R_16C_DISP24 0X7411 + +/* R_S_16C_24 R_16C_DISPL R_PCREL R_CODE_ADDR */ +#define R_16C_DISP24_C 0X7416 + +/* R_S_16C_24a R_16C_DISPL R_PCREL R_ADDRESS */ +#define R_16C_DISP24a 0X6411 + +/* R_S_16C_24a R_16C_DISPL R_PCREL R_CODE_ADDR */ +#define R_16C_DISP24a_C 0X6416 + +/* R_S_16C_04 R_16C_REGREL R_ABS R_ADDRESS */ +#define R_16C_REG04 0X5201 + +/* R_S_16C_04 R_16C_REGREL R_ABS R_CODE_ADDR */ +#define R_16C_REG04_C 0X5206 + +/* R_S_16C_04_a R_16C_REGREL R_ABS R_ADDRESS */ +#define R_16C_REG04a 0X4201 + +/* R_S_16C_04_a R_16C_REGREL R_ABS R_CODE_ADDR */ +#define R_16C_REG04a_C 0X4206 + +/* R_S_16C_14 R_16C_REGREL R_ABS R_ADDRESS */ +#define R_16C_REG14 0X3201 + +/* R_S_16C_14 R_16C_REGREL R_ABS R_CODE_ADDR */ +#define R_16C_REG14_C 0X3206 + +/* R_S_16C_16 R_16C_REGREL R_ABS R_ADDRESS */ +#define R_16C_REG16 0X1201 + +/* R_S_16C_16 R_16C_REGREL R_ABS R_CODE_ADDR */ +#define R_16C_REG16_C 0X1206 + +/* R_S_16C_20 R_16C_REGREL R_ABS R_ADDRESS */ +#define R_16C_REG20 0X8201 + +/* R_S_16C_20 R_16C_REGREL R_ABS R_CODE_ADDR */ +#define R_16C_REG20_C 0X8206 + +/* R_S_16C_20 R_16C_ABS R_ABS R_ADDRESS */ +#define R_16C_ABS20 0X8101 + +/* R_S_16C_20 R_16C_ABS R_ABS R_CODE_ADDR */ +#define R_16C_ABS20_C 0X8106 + +/* R_S_16C_24 R_16C_ABS R_ABS R_ADDRESS */ +#define R_16C_ABS24 0X7101 + +/* R_S_16C_24 R_16C_ABS R_ABS R_CODE_ADDR */ +#define R_16C_ABS24_C 0X7106 + +/* R_S_16C_04 R_16C_IMMED R_ABS R_ADDRESS */ +#define R_16C_IMM04 0X5301 + +/* R_S_16C_04 R_16C_IMMED R_ABS R_CODE_ADDR */ +#define R_16C_IMM04_C 0X5306 + +/* R_S_16C_16 R_16C_IMMED R_ABS R_ADDRESS */ +#define R_16C_IMM16 0X1301 + +/* R_S_16C_16 R_16C_IMMED R_ABS R_CODE_ADDR */ +#define R_16C_IMM16_C 0X1306 + +/* R_S_16C_20 R_16C_IMMED R_ABS R_ADDRESS */ +#define R_16C_IMM20 0X8301 + +/* R_S_16C_20 R_16C_IMMED R_ABS R_CODE_ADDR */ +#define R_16C_IMM20_C 0X8306 + +/* R_S_16C_24 R_16C_IMMED R_ABS R_ADDRESS */ +#define R_16C_IMM24 0X7301 + +/* R_S_16C_24 R_16C_IMMED R_ABS R_CODE_ADDR */ +#define R_16C_IMM24_C 0X7306 + +/* R_S_16C_32 R_16C_IMMED R_ABS R_ADDRESS */ +#define R_16C_IMM32 0X2301 + +/* R_S_16C_32 R_16C_IMMED R_ABS R_CODE_ADDR */ +#define R_16C_IMM32_C 0X2306 + + +/* Relocation item type. */ +#define R_ADDRTYPE 0x000f +#define R_ADDRESS 0x0001 /* Take address of symbol. */ +#define R_CODE_ADDR 0x0006 /* Take address of symbol divided by 2. */ + +/* Relocation action. */ +#define R_RELTO 0x00f0 +#define R_ABS 0x0000 /* Keep symbol's address as such. */ +#define R_PCREL 0x0010 /* Subtract the pc address of hole. */ + +/* Relocation item data format. */ +#define R_FORMAT 0x0f00 +#define R_NUMBER 0x0000 /* Retain as two's complement value. */ +#define R_16C_DISPL 0x0400 /* CR16C displacement type. */ +#define R_16C_ABS 0x0100 /* CR16C absolute type. */ +#define R_16C_REGREL 0x0200 /* CR16C register-relative type. */ +#define R_16C_IMMED 0x0300 /* CR16C immediate type. */ + +/* Relocation item size. */ +#define R_SIZESP 0xf000 +#define R_S_16C_04 0x5000 +#define R_S_16C_04_a 0x4000 +#define R_S_16C_08 0x0000 +#define R_S_16C_14 0x3000 +#define R_S_16C_16 0x1000 +#define R_S_16C_20 0x8000 +#define R_S_16C_24_a 0x6000 +#define R_S_16C_24 0x7000 +#define R_S_16C_32 0x2000 + + +/* Processor specific section indices. These sections do not actually + exist. Symbols with a st_shndx field corresponding to one of these + values have a special meaning. */ + +/* Far common symbol. */ +#define SHN_CR16C_FCOMMON SHN_LORESERVE +#define SHN_CR16C_NCOMMON (SHN_LORESERVE + 1) + +typedef struct reloc_map +{ + unsigned short cr_reloc_type; /* CR relocation type. */ + bfd_reloc_code_real_type bfd_reloc_enum; /* BFD relocation enum. */ +} RELOC_MAP; + +#endif /* _ELF_CR16C_H */ diff --git a/support/sdbinutils/include/elf/cris.h b/support/sdbinutils/include/elf/cris.h new file mode 100644 index 0000000..d07b7d6 --- /dev/null +++ b/support/sdbinutils/include/elf/cris.h @@ -0,0 +1,193 @@ +/* CRIS ELF support for BFD. + Copyright (C) 2000-2018 Free Software Foundation, Inc. + Contributed by Axis Communications AB, Lund, Sweden. + Written by Hans-Peter Nilsson. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_CRIS_H +#define _ELF_CRIS_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_cris_reloc_type) + RELOC_NUMBER (R_CRIS_NONE, 0) + RELOC_NUMBER (R_CRIS_8, 1) + RELOC_NUMBER (R_CRIS_16, 2) + RELOC_NUMBER (R_CRIS_32, 3) + + /* The "PC" position is the location right after the relocation. */ + RELOC_NUMBER (R_CRIS_8_PCREL, 4) + RELOC_NUMBER (R_CRIS_16_PCREL, 5) + RELOC_NUMBER (R_CRIS_32_PCREL, 6) + + RELOC_NUMBER (R_CRIS_GNU_VTINHERIT, 7) + RELOC_NUMBER (R_CRIS_GNU_VTENTRY, 8) + + /* Copy contents at dynlinking. Generated by the linker. + The BFD equivalent is BFD_RELOC_CRIS_COPY. */ + RELOC_NUMBER (R_CRIS_COPY, 9) + + /* Create GOT entry. Generated by the linker. + The BFD equivalent is BFD_RELOC_CRIS_GLOB_DAT. */ + RELOC_NUMBER (R_CRIS_GLOB_DAT, 10) + + /* Create PLT entry. Generated by the linker. + The BFD equivalent is BFD_RELOC_CRIS_JUMP_SLOT. */ + RELOC_NUMBER (R_CRIS_JUMP_SLOT, 11) + + /* Adjust by program base. Generated by the linker. + The BFD equivalent is BFD_RELOC_CRIS_RELATIVE. */ + RELOC_NUMBER (R_CRIS_RELATIVE, 12) + + /* A 16-bit offset to entry in GOT and request to create GOT entry for + that symbol. + The BFD equivalent is BFD_RELOC_CRIS_16_GOT. */ + RELOC_NUMBER (R_CRIS_16_GOT, 13) + + /* A 32-bit offset to entry in GOT and request to create GOT entry for + that symbol. + The BFD equivalent is BFD_RELOC_CRIS_32_GOT. */ + RELOC_NUMBER (R_CRIS_32_GOT, 14) + + /* A 16-bit offset to entry in PLT part of GOT and request to create PLT + entry for that symbol. + The BFD equivalent is BFD_RELOC_CRIS_16_GOTPLT. */ + RELOC_NUMBER (R_CRIS_16_GOTPLT, 15) + + /* A 32-bit offset to entry in PLT part of GOT and request to create PLT + entry for that symbol. + The BFD equivalent is BFD_RELOC_CRIS_32_GOTPLT. */ + RELOC_NUMBER (R_CRIS_32_GOTPLT, 16) + + /* A 32-bit offset from GOT to (local) symbol: no GOT entry should be + necessary. + The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */ + RELOC_NUMBER (R_CRIS_32_GOTREL, 17) + + /* A 32-bit offset from GOT to entry for this symbol in PLT and request + to create PLT entry for symbol. + The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */ + RELOC_NUMBER (R_CRIS_32_PLT_GOTREL, 18) + + /* A 32-bit offset from location after this relocation (addend specifies + offset) to entry for this symbol in PLT and request to create PLT + entry for symbol. + The BFD equivalent is BFD_RELOC_CRIS_32_PLT_PCREL. */ + RELOC_NUMBER (R_CRIS_32_PLT_PCREL, 19) + + /* An assembler-generated-only relocation, instructing the linker to + reserve two GOT slots, carrying the R_CRIS_DTP relocation for the + symbol (pointing to the first slot, the relocation fills in + both). The value is a 32-bit-value, relative to the start of the + GOT. Assembly syntax: "sym:GDGOTREL". */ + RELOC_NUMBER (R_CRIS_32_GOT_GD, 20) + + /* Similar to R_CRIS_32_GOT_GD, but the value is a 16-bit unsigned + number, limiting access to 65536/4 global symbols per module (or + 65536/8 thread variables; loosely speaking G*4+T*8 < 65536, where + T is the number of thread variables and G is the number of other + external global variables and functions). Assembly syntax: + "sym:GDGOTREL16". */ + RELOC_NUMBER (R_CRIS_16_GOT_GD, 21) + + /* Similar to R_CRIS_32_GOT_GD, but the value is the absolute + address of the GOT entry. Disallowed in DSOs created with + -shared. Assembly syntax: "sym:GD". */ + RELOC_NUMBER (R_CRIS_32_GD, 22) + + /* A linker-generated-only relocation, instructing the dynamic + linker to fill in the module ID and module-relative-TLS-block + offset of the symbol in question, used for GOT entries. Note + that this relocation instructs to fill in two 32-bit values. */ + RELOC_NUMBER (R_CRIS_DTP, 23) + + /* An assembler-generated-only relocation, instructing the linker to + reserve the first two GOT slots, and attach the R_CRIS_DTPMOD + relocation(*) for the module to the first slot, the second + containing zero. The value is 32 bits, the offset from the start + of the TLS block of the module to the thread-local symbol + mentioned in the relocation. This relocation must only be applied + to module-local symbols. Assembly syntax: "expr:DTPREL". */ + RELOC_NUMBER (R_CRIS_32_DTPREL, 24) + + /* Similar to R_CRIS_32_DTPREL, but the value is a 16-bit signed + number, limiting the size of thread-variables of the DSO to 32768 + bytes. (Note: matches both model 1 and 2 and allows use of addo.w + as the instruction where this relocation is used.) Assembly + syntax: "expr:DTPREL16". */ + RELOC_NUMBER (R_CRIS_16_DTPREL, 25) + + /* An assembler-generated-only relocation, instructing the linker to + reserve a GOT slot and attach the R_CRIS_32_TPREL relocation for + the symbol in question. The value is 32 bits, which is the + GOT-relative offset of the slot. Assembly syntax: + "sym:TPOFFGOT". */ + RELOC_NUMBER (R_CRIS_32_GOT_TPREL, 26) + + /* Similar to R_CRIS_32_TPREL, but the value is a 16-bit positive + number, limiting the number of thread- and global variables of + the DSO to 32768/4. Assembly syntax: "sym:TPOFFGOT16". */ + RELOC_NUMBER (R_CRIS_16_GOT_TPREL, 27) + + /* An assembler- and linker-generated relocation, instructing to + resolve the symbol in question yielding the TLS offset of the + thread variable, relative to the global TLS block. Not allowed + as input when generating a DSO. Assembly syntax: + "expr:TPOFF". */ + RELOC_NUMBER (R_CRIS_32_TPREL, 28) + + /* Similar to R_CRIS_32_TPREL, but only applicable to executables + compiled with -msmall-tls. Not allowed in a DSO. The value is a + 16-bit signed number, limiting the size of thread-variables of + the executable to 32768 bytes. (Note: being signed makes it match + both model 1 and 2 and allows use of addo.w as the instruction + where this relocation is applied.) Assembly syntax: + "expr:TPOFF16". */ + RELOC_NUMBER (R_CRIS_16_TPREL, 29) + + /* A linker-generated-only relocation, instructing the dynamic + linker to fill in the current module ID, used for GOT entries + (usually the fourth one). */ + RELOC_NUMBER (R_CRIS_DTPMOD, 30) + + /* Similar to R_CRIS_32_GOT_TPREL, but the value is the absolute + address of the GOT entry. Disallowed in DSOs created with + -shared. Assembly syntax: "sym:IE". */ + RELOC_NUMBER (R_CRIS_32_IE, 31) + + /* No other relocs must be visible outside the assembler. */ + +END_RELOC_NUMBERS (R_CRIS_max) + +/* User symbols in this file have a leading underscore. */ +#define EF_CRIS_UNDERSCORE 0x00000001 + +/* This is a mask for different incompatible machine variants. */ +#define EF_CRIS_VARIANT_MASK 0x0000000e + +/* Variant 0; may contain v0..10 object. */ +#define EF_CRIS_VARIANT_ANY_V0_V10 0x00000000 + +/* Variant 1; contains v32 object. */ +#define EF_CRIS_VARIANT_V32 0x00000002 + +/* Variant 2; contains object compatible with v32 and v10. */ +#define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004 + +#endif /* _ELF_CRIS_H */ diff --git a/support/sdbinutils/include/elf/crx.h b/support/sdbinutils/include/elf/crx.h new file mode 100644 index 0000000..7fb107b --- /dev/null +++ b/support/sdbinutils/include/elf/crx.h @@ -0,0 +1,53 @@ +/* CRX ELF support for BFD. + Copyright (C) 2004-2018 Free Software Foundation, Inc. + Contributed by Tomer Levi, NSC, Israel. + Originally written for GAS 2.12 by Tomer Levi, NSC, Israel. + Updates, BFDizing, GNUifying and ELF support by Tomer Levi. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_CRX_H +#define _ELF_CRX_H + +#include "elf/reloc-macros.h" + +/* Creating indices for reloc_map_index array. */ +START_RELOC_NUMBERS(elf_crx_reloc_type) + RELOC_NUMBER (R_CRX_NONE, 0) + RELOC_NUMBER (R_CRX_REL4, 1) + RELOC_NUMBER (R_CRX_REL8, 2) + RELOC_NUMBER (R_CRX_REL8_CMP, 3) + RELOC_NUMBER (R_CRX_REL16, 4) + RELOC_NUMBER (R_CRX_REL24, 5) + RELOC_NUMBER (R_CRX_REL32, 6) + RELOC_NUMBER (R_CRX_REGREL12, 7) + RELOC_NUMBER (R_CRX_REGREL22, 8) + RELOC_NUMBER (R_CRX_REGREL28, 9) + RELOC_NUMBER (R_CRX_REGREL32, 10) + RELOC_NUMBER (R_CRX_ABS16, 11) + RELOC_NUMBER (R_CRX_ABS32, 12) + RELOC_NUMBER (R_CRX_NUM8, 13) + RELOC_NUMBER (R_CRX_NUM16, 14) + RELOC_NUMBER (R_CRX_NUM32, 15) + RELOC_NUMBER (R_CRX_IMM16, 16) + RELOC_NUMBER (R_CRX_IMM32, 17) + RELOC_NUMBER (R_CRX_SWITCH8, 18) + RELOC_NUMBER (R_CRX_SWITCH16, 19) + RELOC_NUMBER (R_CRX_SWITCH32, 20) +END_RELOC_NUMBERS(R_CRX_MAX) + +#endif /* _ELF_CRX_H */ diff --git a/support/sdbinutils/include/elf/d10v.h b/support/sdbinutils/include/elf/d10v.h new file mode 100644 index 0000000..6acdcc5 --- /dev/null +++ b/support/sdbinutils/include/elf/d10v.h @@ -0,0 +1,38 @@ +/* d10v ELF support for BFD. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_D10V_H +#define _ELF_D10V_H + +#include "elf/reloc-macros.h" + +/* Relocation types. */ +START_RELOC_NUMBERS (elf_d10v_reloc_type) + RELOC_NUMBER (R_D10V_NONE, 0) + RELOC_NUMBER (R_D10V_10_PCREL_R, 1) + RELOC_NUMBER (R_D10V_10_PCREL_L, 2) + RELOC_NUMBER (R_D10V_16, 3) + RELOC_NUMBER (R_D10V_18, 4) + RELOC_NUMBER (R_D10V_18_PCREL, 5) + RELOC_NUMBER (R_D10V_32, 6) + RELOC_NUMBER (R_D10V_GNU_VTINHERIT, 7) + RELOC_NUMBER (R_D10V_GNU_VTENTRY, 8) +END_RELOC_NUMBERS (R_D10V_max) + +#endif diff --git a/support/sdbinutils/include/elf/d30v.h b/support/sdbinutils/include/elf/d30v.h new file mode 100644 index 0000000..ff2e582 --- /dev/null +++ b/support/sdbinutils/include/elf/d30v.h @@ -0,0 +1,42 @@ +/* d30v ELF support for BFD. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_D30V_H +#define _ELF_D30V_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_d30v_reloc_type) + RELOC_NUMBER (R_D30V_NONE, 0) + RELOC_NUMBER (R_D30V_6, 1) + RELOC_NUMBER (R_D30V_9_PCREL, 2) + RELOC_NUMBER (R_D30V_9_PCREL_R, 3) + RELOC_NUMBER (R_D30V_15, 4) + RELOC_NUMBER (R_D30V_15_PCREL, 5) + RELOC_NUMBER (R_D30V_15_PCREL_R, 6) + RELOC_NUMBER (R_D30V_21, 7) + RELOC_NUMBER (R_D30V_21_PCREL, 8) + RELOC_NUMBER (R_D30V_21_PCREL_R, 9) + RELOC_NUMBER (R_D30V_32, 10) + RELOC_NUMBER (R_D30V_32_PCREL, 11) + RELOC_NUMBER (R_D30V_32_NORMAL, 12) +END_RELOC_NUMBERS (R_D30V_max) + +#endif diff --git a/support/sdbinutils/include/elf/dlx.h b/support/sdbinutils/include/elf/dlx.h new file mode 100644 index 0000000..98fdf52 --- /dev/null +++ b/support/sdbinutils/include/elf/dlx.h @@ -0,0 +1,61 @@ +/* DLX support for BFD. + Copyright (C) 2002-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_DLX_H +#define _ELF_DLX_H + +#include "elf/reloc-macros.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if 0 +START_RELOC_NUMBERS (elf_dlx_reloc_type) + RELOC_NUMBER (R_DLX_NONE, 0) + RELOC_NUMBER (R_DLX_RELOC_16, 1) + RELOC_NUMBER (R_DLX_RELOC_26, 2) + RELOC_NUMBER (R_DLX_RELOC_32, 3) + RELOC_NUMBER (R_DLX_GNU_VTINHERIT, 4) + RELOC_NUMBER (R_DLX_GNU_VTENTRY, 5) + RELOC_NUMBER (R_DLX_RELOC_16_HI, 6) + RELOC_NUMBER (R_DLX_RELOC_16_LO, 7) + RELOC_NUMBER (R_DLX_RELOC_16_PCREL, 8) + RELOC_NUMBER (R_DLX_RELOC_26_PCREL, 9) +END_RELOC_NUMBERS (R_DLX_max) +#else +START_RELOC_NUMBERS (elf_dlx_reloc_type) + RELOC_NUMBER (R_DLX_NONE, 0) + RELOC_NUMBER (R_DLX_RELOC_8, 1) + RELOC_NUMBER (R_DLX_RELOC_16, 2) + RELOC_NUMBER (R_DLX_RELOC_32, 3) + RELOC_NUMBER (R_DLX_GNU_VTINHERIT, 4) + RELOC_NUMBER (R_DLX_GNU_VTENTRY, 5) + RELOC_NUMBER (R_DLX_RELOC_16_HI, 6) + RELOC_NUMBER (R_DLX_RELOC_16_LO, 7) + RELOC_NUMBER (R_DLX_RELOC_16_PCREL, 8) + RELOC_NUMBER (R_DLX_RELOC_26_PCREL, 9) +END_RELOC_NUMBERS (R_DLX_max) +#endif /* 0 */ + +#ifdef __cplusplus + } +#endif + +#endif /* _ELF_DLX_H */ diff --git a/support/sdbinutils/include/elf/dwarf.h b/support/sdbinutils/include/elf/dwarf.h new file mode 100644 index 0000000..d02becd --- /dev/null +++ b/support/sdbinutils/include/elf/dwarf.h @@ -0,0 +1,323 @@ +/* Declarations and definitions of codes relating to the DWARF symbolic + debugging information format. + + Written by Ron Guilmette (rfg@netcom.com) + + Copyright (C) 1992-2018 Free Software Foundation, Inc. + + This file is part of both GCC and the BFD 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 GCC; see the file COPYING3. If not, write to the Free + Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +/* This file is derived from the DWARF specification (a public document) + Revision 1.0.1 (April 8, 1992) developed by the UNIX International + Programming Languages Special Interest Group (UI/PLSIG) and distributed + by UNIX International. Copies of this specification are available from + UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054. */ + +#ifndef _ELF_DWARF_H +#define _ELF_DWARF_H + +/* Tag names and codes. */ + +enum dwarf_tag { + TAG_padding = 0x0000, + TAG_array_type = 0x0001, + TAG_class_type = 0x0002, + TAG_entry_point = 0x0003, + TAG_enumeration_type = 0x0004, + TAG_formal_parameter = 0x0005, + TAG_global_subroutine = 0x0006, + TAG_global_variable = 0x0007, + /* 0x0008 -- reserved */ + /* 0x0009 -- reserved */ + TAG_label = 0x000a, + TAG_lexical_block = 0x000b, + TAG_local_variable = 0x000c, + TAG_member = 0x000d, + /* 0x000e -- reserved */ + TAG_pointer_type = 0x000f, + TAG_reference_type = 0x0010, + TAG_compile_unit = 0x0011, + TAG_string_type = 0x0012, + TAG_structure_type = 0x0013, + TAG_subroutine = 0x0014, + TAG_subroutine_type = 0x0015, + TAG_typedef = 0x0016, + TAG_union_type = 0x0017, + TAG_unspecified_parameters = 0x0018, + TAG_variant = 0x0019, + TAG_common_block = 0x001a, + TAG_common_inclusion = 0x001b, + TAG_inheritance = 0x001c, + TAG_inlined_subroutine = 0x001d, + TAG_module = 0x001e, + TAG_ptr_to_member_type = 0x001f, + TAG_set_type = 0x0020, + TAG_subrange_type = 0x0021, + TAG_with_stmt = 0x0022, + + /* GNU extensions */ + + TAG_format_label = 0x8000, /* for FORTRAN 77 and Fortran 90 */ + TAG_namelist = 0x8001, /* For Fortran 90 */ + TAG_function_template = 0x8002, /* for C++ */ + TAG_class_template = 0x8003 /* for C++ */ +}; + +#define TAG_lo_user 0x8000 /* implementation-defined range start */ +#define TAG_hi_user 0xffff /* implementation-defined range end */ +#define TAG_source_file TAG_compile_unit /* for backward compatibility */ + +/* Form names and codes. */ + +enum dwarf_form { + FORM_ADDR = 0x1, + FORM_REF = 0x2, + FORM_BLOCK2 = 0x3, + FORM_BLOCK4 = 0x4, + FORM_DATA2 = 0x5, + FORM_DATA4 = 0x6, + FORM_DATA8 = 0x7, + FORM_STRING = 0x8 +}; + +/* Attribute names and codes. */ + +enum dwarf_attribute { + AT_sibling = (0x0010|FORM_REF), + AT_location = (0x0020|FORM_BLOCK2), + AT_name = (0x0030|FORM_STRING), + AT_fund_type = (0x0050|FORM_DATA2), + AT_mod_fund_type = (0x0060|FORM_BLOCK2), + AT_user_def_type = (0x0070|FORM_REF), + AT_mod_u_d_type = (0x0080|FORM_BLOCK2), + AT_ordering = (0x0090|FORM_DATA2), + AT_subscr_data = (0x00a0|FORM_BLOCK2), + AT_byte_size = (0x00b0|FORM_DATA4), + AT_bit_offset = (0x00c0|FORM_DATA2), + AT_bit_size = (0x00d0|FORM_DATA4), + /* (0x00e0|FORM_xxxx) -- reserved */ + AT_element_list = (0x00f0|FORM_BLOCK4), + AT_stmt_list = (0x0100|FORM_DATA4), + AT_low_pc = (0x0110|FORM_ADDR), + AT_high_pc = (0x0120|FORM_ADDR), + AT_language = (0x0130|FORM_DATA4), + AT_member = (0x0140|FORM_REF), + AT_discr = (0x0150|FORM_REF), + AT_discr_value = (0x0160|FORM_BLOCK2), + /* (0x0170|FORM_xxxx) -- reserved */ + /* (0x0180|FORM_xxxx) -- reserved */ + AT_string_length = (0x0190|FORM_BLOCK2), + AT_common_reference = (0x01a0|FORM_REF), + AT_comp_dir = (0x01b0|FORM_STRING), + AT_const_value_string = (0x01c0|FORM_STRING), + AT_const_value_data2 = (0x01c0|FORM_DATA2), + AT_const_value_data4 = (0x01c0|FORM_DATA4), + AT_const_value_data8 = (0x01c0|FORM_DATA8), + AT_const_value_block2 = (0x01c0|FORM_BLOCK2), + AT_const_value_block4 = (0x01c0|FORM_BLOCK4), + AT_containing_type = (0x01d0|FORM_REF), + AT_default_value_addr = (0x01e0|FORM_ADDR), + AT_default_value_data2 = (0x01e0|FORM_DATA2), + AT_default_value_data4 = (0x01e0|FORM_DATA4), + AT_default_value_data8 = (0x01e0|FORM_DATA8), + AT_default_value_string = (0x01e0|FORM_STRING), + AT_friends = (0x01f0|FORM_BLOCK2), + AT_inline = (0x0200|FORM_STRING), + AT_is_optional = (0x0210|FORM_STRING), + AT_lower_bound_ref = (0x0220|FORM_REF), + AT_lower_bound_data2 = (0x0220|FORM_DATA2), + AT_lower_bound_data4 = (0x0220|FORM_DATA4), + AT_lower_bound_data8 = (0x0220|FORM_DATA8), + AT_private = (0x0240|FORM_STRING), + AT_producer = (0x0250|FORM_STRING), + AT_program = (0x0230|FORM_STRING), + AT_protected = (0x0260|FORM_STRING), + AT_prototyped = (0x0270|FORM_STRING), + AT_public = (0x0280|FORM_STRING), + AT_pure_virtual = (0x0290|FORM_STRING), + AT_return_addr = (0x02a0|FORM_BLOCK2), + AT_abstract_origin = (0x02b0|FORM_REF), + AT_start_scope = (0x02c0|FORM_DATA4), + AT_stride_size = (0x02e0|FORM_DATA4), + AT_upper_bound_ref = (0x02f0|FORM_REF), + AT_upper_bound_data2 = (0x02f0|FORM_DATA2), + AT_upper_bound_data4 = (0x02f0|FORM_DATA4), + AT_upper_bound_data8 = (0x02f0|FORM_DATA8), + AT_virtual = (0x0300|FORM_STRING), + + /* GNU extensions. */ + + AT_sf_names = (0x8000|FORM_DATA4), + AT_src_info = (0x8010|FORM_DATA4), + AT_mac_info = (0x8020|FORM_DATA4), + AT_src_coords = (0x8030|FORM_DATA4), + AT_body_begin = (0x8040|FORM_ADDR), + AT_body_end = (0x8050|FORM_ADDR) +}; + +#define AT_lo_user 0x2000 /* implementation-defined range start */ +#define AT_hi_user 0x3ff0 /* implementation-defined range end */ + +/* Location atom names and codes. */ + +enum dwarf_location_atom { + OP_REG = 0x01, + OP_BASEREG = 0x02, + OP_ADDR = 0x03, + OP_CONST = 0x04, + OP_DEREF2 = 0x05, + OP_DEREF4 = 0x06, + OP_ADD = 0x07, + + /* GNU extensions. */ + + OP_MULT = 0x80 +}; + +#define OP_LO_USER 0x80 /* implementation-defined range start */ +#define OP_HI_USER 0xff /* implementation-defined range end */ + +/* Fundamental type names and codes. */ + +enum dwarf_fundamental_type { + FT_char = 0x0001, + FT_signed_char = 0x0002, + FT_unsigned_char = 0x0003, + FT_short = 0x0004, + FT_signed_short = 0x0005, + FT_unsigned_short = 0x0006, + FT_integer = 0x0007, + FT_signed_integer = 0x0008, + FT_unsigned_integer = 0x0009, + FT_long = 0x000a, + FT_signed_long = 0x000b, + FT_unsigned_long = 0x000c, + FT_pointer = 0x000d, /* an alias for (void *) */ + FT_float = 0x000e, + FT_dbl_prec_float = 0x000f, + FT_ext_prec_float = 0x0010, /* breaks "classic" svr4 SDB */ + FT_complex = 0x0011, /* breaks "classic" svr4 SDB */ + FT_dbl_prec_complex = 0x0012, /* breaks "classic" svr4 SDB */ + /* 0x0013 -- reserved */ + FT_void = 0x0014, + FT_boolean = 0x0015, /* breaks "classic" svr4 SDB */ + FT_ext_prec_complex = 0x0016, /* breaks "classic" svr4 SDB */ + FT_label = 0x0017, + + /* GNU extensions + The low order byte must indicate the size (in bytes) for the type. + All of these types will probably break "classic" svr4 SDB. */ + + FT_long_long = 0x8008, + FT_signed_long_long = 0x8108, + FT_unsigned_long_long = 0x8208, + + FT_int8 = 0x9001, + FT_signed_int8 = 0x9101, + FT_unsigned_int8 = 0x9201, + FT_int16 = 0x9302, + FT_signed_int16 = 0x9402, + FT_unsigned_int16 = 0x9502, + FT_int32 = 0x9604, + FT_signed_int32 = 0x9704, + FT_unsigned_int32 = 0x9804, + FT_int64 = 0x9908, + FT_signed_int64 = 0x9a08, + FT_unsigned_int64 = 0x9b08, + FT_int128 = 0x9c10, + FT_signed_int128 = 0x9d10, + FT_unsigned_int128 = 0x9e10, + + FT_real32 = 0xa004, + FT_real64 = 0xa108, + FT_real96 = 0xa20c, + FT_real128 = 0xa310 +}; + +#define FT_lo_user 0x8000 /* implementation-defined range start */ +#define FT_hi_user 0xffff /* implementation defined range end */ + +/* Type modifier names and codes. */ + +enum dwarf_type_modifier { + MOD_pointer_to = 0x01, + MOD_reference_to = 0x02, + MOD_const = 0x03, + MOD_volatile = 0x04 +}; + +#define MOD_lo_user 0x80 /* implementation-defined range start */ +#define MOD_hi_user 0xff /* implementation-defined range end */ + +/* Array ordering names and codes. */ + +enum dwarf_array_dim_ordering { + ORD_row_major = 0, + ORD_col_major = 1 +}; + +/* Array subscript format names and codes. */ + +enum dwarf_subscr_data_formats { + FMT_FT_C_C = 0x0, + FMT_FT_C_X = 0x1, + FMT_FT_X_C = 0x2, + FMT_FT_X_X = 0x3, + FMT_UT_C_C = 0x4, + FMT_UT_C_X = 0x5, + FMT_UT_X_C = 0x6, + FMT_UT_X_X = 0x7, + FMT_ET = 0x8 +}; + +/* Derived from above for ease of use. */ + +#define FMT_CODE(_FUNDAMENTAL_TYPE_P, _LB_CONST_P, _UB_CONST_P) \ + (((_FUNDAMENTAL_TYPE_P) ? 0 : 4) \ + | ((_LB_CONST_P) ? 0 : 2) \ + | ((_UB_CONST_P) ? 0 : 1)) + +/* Source language names and codes. */ + +enum dwarf_source_language { + LANG_C89 = 0x00000001, + LANG_C = 0x00000002, + LANG_ADA83 = 0x00000003, + LANG_C_PLUS_PLUS = 0x00000004, + LANG_COBOL74 = 0x00000005, + LANG_COBOL85 = 0x00000006, + LANG_FORTRAN77 = 0x00000007, + LANG_FORTRAN90 = 0x00000008, + LANG_PASCAL83 = 0x00000009, + LANG_MODULA2 = 0x0000000a, + LANG_JAVA = 0x0000000b +}; + +#define LANG_lo_user 0x00008000 /* implementation-defined range start */ +#define LANG_hi_user 0x0000ffff /* implementation-defined range end */ + +/* Names and codes for GNU "macinfo" extension. */ + +enum dwarf_macinfo_record_type { + MACINFO_start = 's', + MACINFO_resume = 'r', + MACINFO_define = 'd', + MACINFO_undef = 'u' +}; + +#endif /* _ELF_DWARF_H */ diff --git a/support/sdbinutils/include/elf/epiphany.h b/support/sdbinutils/include/elf/epiphany.h new file mode 100755 index 0000000..ccfe107 --- /dev/null +++ b/support/sdbinutils/include/elf/epiphany.h @@ -0,0 +1,59 @@ +/* Adapteva EPIPHANY ELF support for BFD. + Copyright (C) 2009-2018 Free Software Foundation, Inc. + Contributed by Embecosm on behalf of Adapteva, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_EPIPHANY_H +#define _ELF_EPIPHANY_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_epiphany_reloc_type) + RELOC_NUMBER (R_EPIPHANY_NONE, 0) + + /* Absolute address relocations. */ + RELOC_NUMBER (R_EPIPHANY_8, 1) + RELOC_NUMBER (R_EPIPHANY_16, 2) + RELOC_NUMBER (R_EPIPHANY_32, 3) + + /* PC-relative relocations. */ + RELOC_NUMBER (R_EPIPHANY_8_PCREL, 4) + RELOC_NUMBER (R_EPIPHANY_16_PCREL,5) + RELOC_NUMBER (R_EPIPHANY_32_PCREL,6) + + /* special forms for 8/24 bit branch displacements. */ + RELOC_NUMBER (R_EPIPHANY_SIMM8, 7) + RELOC_NUMBER (R_EPIPHANY_SIMM24, 8) + + /* HIGH and LOW relocations taking part of a 32 bit address and + depositing it into the IMM16 field of a destination. */ + RELOC_NUMBER (R_EPIPHANY_HIGH, 9) + RELOC_NUMBER (R_EPIPHANY_LOW,10) + + /* 11 bit signed immediate value. */ + RELOC_NUMBER (R_EPIPHANY_SIMM11, 11) + /* 11 bit magnitude addressing displacement. */ + RELOC_NUMBER (R_EPIPHANY_IMM11, 12) + + /* 8 bit immediate for MOV.S R,IMM8. */ + RELOC_NUMBER (R_EPIPHANY_IMM8, 13) + +END_RELOC_NUMBERS(R_EPIPHANY_max) + +#endif /* _ELF_EPIPHANY_H */ diff --git a/support/sdbinutils/include/elf/external.h b/support/sdbinutils/include/elf/external.h new file mode 100644 index 0000000..7aece98 --- /dev/null +++ b/support/sdbinutils/include/elf/external.h @@ -0,0 +1,318 @@ +/* ELF support for BFD. + Copyright (C) 1991-2018 Free Software Foundation, Inc. + + Written by Fred Fish @ Cygnus Support, from information published + in "UNIX System V Release 4, Programmers Guide: ANSI C and + Programming Support Tools". + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file is part of ELF support for BFD, and contains the portions + that describe how ELF is represented externally by the BFD library. + I.E. it describes the in-file representation of ELF. It requires + the elf/common.h file which contains the portions that are common to + both the internal and external representations. */ + +/* The 64-bit stuff is kind of random. Perhaps someone will publish a + spec someday. */ + +#ifndef _ELF_EXTERNAL_H +#define _ELF_EXTERNAL_H + +/* Special section indices, which may show up in st_shndx fields, among + other places. */ + +#define SHN_LORESERVE 0xFF00 /* Begin range of reserved indices */ +#define SHN_LOPROC 0xFF00 /* Begin range of appl-specific */ +#define SHN_HIPROC 0xFF1F /* End range of appl-specific */ +#define SHN_LOOS 0xFF20 /* OS specific semantics, lo */ +#define SHN_HIOS 0xFF3F /* OS specific semantics, hi */ +#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */ +#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */ +#define SHN_XINDEX 0xFFFF /* Section index is held elsewhere */ +#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */ + +/* ELF Header (32-bit implementations) */ + +typedef struct { + unsigned char e_ident[16]; /* ELF "magic number" */ + unsigned char e_type[2]; /* Identifies object file type */ + unsigned char e_machine[2]; /* Specifies required architecture */ + unsigned char e_version[4]; /* Identifies object file version */ + unsigned char e_entry[4]; /* Entry point virtual address */ + unsigned char e_phoff[4]; /* Program header table file offset */ + unsigned char e_shoff[4]; /* Section header table file offset */ + unsigned char e_flags[4]; /* Processor-specific flags */ + unsigned char e_ehsize[2]; /* ELF header size in bytes */ + unsigned char e_phentsize[2]; /* Program header table entry size */ + unsigned char e_phnum[2]; /* Program header table entry count */ + unsigned char e_shentsize[2]; /* Section header table entry size */ + unsigned char e_shnum[2]; /* Section header table entry count */ + unsigned char e_shstrndx[2]; /* Section header string table index */ +} Elf32_External_Ehdr; + +typedef struct { + unsigned char e_ident[16]; /* ELF "magic number" */ + unsigned char e_type[2]; /* Identifies object file type */ + unsigned char e_machine[2]; /* Specifies required architecture */ + unsigned char e_version[4]; /* Identifies object file version */ + unsigned char e_entry[8]; /* Entry point virtual address */ + unsigned char e_phoff[8]; /* Program header table file offset */ + unsigned char e_shoff[8]; /* Section header table file offset */ + unsigned char e_flags[4]; /* Processor-specific flags */ + unsigned char e_ehsize[2]; /* ELF header size in bytes */ + unsigned char e_phentsize[2]; /* Program header table entry size */ + unsigned char e_phnum[2]; /* Program header table entry count */ + unsigned char e_shentsize[2]; /* Section header table entry size */ + unsigned char e_shnum[2]; /* Section header table entry count */ + unsigned char e_shstrndx[2]; /* Section header string table index */ +} Elf64_External_Ehdr; + +/* Program header */ + +typedef struct { + unsigned char p_type[4]; /* Identifies program segment type */ + unsigned char p_offset[4]; /* Segment file offset */ + unsigned char p_vaddr[4]; /* Segment virtual address */ + unsigned char p_paddr[4]; /* Segment physical address */ + unsigned char p_filesz[4]; /* Segment size in file */ + unsigned char p_memsz[4]; /* Segment size in memory */ + unsigned char p_flags[4]; /* Segment flags */ + unsigned char p_align[4]; /* Segment alignment, file & memory */ +} Elf32_External_Phdr; + +typedef struct { + unsigned char p_type[4]; /* Identifies program segment type */ + unsigned char p_flags[4]; /* Segment flags */ + unsigned char p_offset[8]; /* Segment file offset */ + unsigned char p_vaddr[8]; /* Segment virtual address */ + unsigned char p_paddr[8]; /* Segment physical address */ + unsigned char p_filesz[8]; /* Segment size in file */ + unsigned char p_memsz[8]; /* Segment size in memory */ + unsigned char p_align[8]; /* Segment alignment, file & memory */ +} Elf64_External_Phdr; + +/* Section header */ + +typedef struct { + unsigned char sh_name[4]; /* Section name, index in string tbl */ + unsigned char sh_type[4]; /* Type of section */ + unsigned char sh_flags[4]; /* Miscellaneous section attributes */ + unsigned char sh_addr[4]; /* Section virtual addr at execution */ + unsigned char sh_offset[4]; /* Section file offset */ + unsigned char sh_size[4]; /* Size of section in bytes */ + unsigned char sh_link[4]; /* Index of another section */ + unsigned char sh_info[4]; /* Additional section information */ + unsigned char sh_addralign[4]; /* Section alignment */ + unsigned char sh_entsize[4]; /* Entry size if section holds table */ +} Elf32_External_Shdr; + +typedef struct { + unsigned char sh_name[4]; /* Section name, index in string tbl */ + unsigned char sh_type[4]; /* Type of section */ + unsigned char sh_flags[8]; /* Miscellaneous section attributes */ + unsigned char sh_addr[8]; /* Section virtual addr at execution */ + unsigned char sh_offset[8]; /* Section file offset */ + unsigned char sh_size[8]; /* Size of section in bytes */ + unsigned char sh_link[4]; /* Index of another section */ + unsigned char sh_info[4]; /* Additional section information */ + unsigned char sh_addralign[8]; /* Section alignment */ + unsigned char sh_entsize[8]; /* Entry size if section holds table */ +} Elf64_External_Shdr; + +/* Compression header */ + +typedef struct { + unsigned char ch_type[4]; /* Type of compression */ + unsigned char ch_size[4]; /* Size of uncompressed data in bytes */ + unsigned char ch_addralign[4]; /* Alignment of uncompressed data */ +} Elf32_External_Chdr; + +typedef struct { + unsigned char ch_type[4]; /* Type of compression */ + unsigned char ch_reserved[4]; /* Padding */ + unsigned char ch_size[8]; /* Size of uncompressed data in bytes */ + unsigned char ch_addralign[8]; /* Alignment of uncompressed data */ +} Elf64_External_Chdr; + +/* Symbol table entry */ + +typedef struct { + unsigned char st_name[4]; /* Symbol name, index in string tbl */ + unsigned char st_value[4]; /* Value of the symbol */ + unsigned char st_size[4]; /* Associated symbol size */ + unsigned char st_info[1]; /* Type and binding attributes */ + unsigned char st_other[1]; /* No defined meaning, 0 */ + unsigned char st_shndx[2]; /* Associated section index */ +} Elf32_External_Sym; + +typedef struct { + unsigned char st_name[4]; /* Symbol name, index in string tbl */ + unsigned char st_info[1]; /* Type and binding attributes */ + unsigned char st_other[1]; /* No defined meaning, 0 */ + unsigned char st_shndx[2]; /* Associated section index */ + unsigned char st_value[8]; /* Value of the symbol */ + unsigned char st_size[8]; /* Associated symbol size */ +} Elf64_External_Sym; + +typedef struct { + unsigned char est_shndx[4]; /* Section index */ +} Elf_External_Sym_Shndx; + +/* Note segments */ + +typedef struct { + unsigned char namesz[4]; /* Size of entry's owner string */ + unsigned char descsz[4]; /* Size of the note descriptor */ + unsigned char type[4]; /* Interpretation of the descriptor */ + char name[1]; /* Start of the name+desc data */ +} Elf_External_Note; + +/* 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. */ +#define ELF_ALIGN_UP(addr, boundary) \ + (((bfd_vma) (addr) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary) -1)) + +/* Compute the offset of the note descriptor from size of note entry's + owner string and note alignment. */ +#define ELF_NOTE_DESC_OFFSET(namesz, align) \ + ELF_ALIGN_UP (offsetof (Elf_External_Note, name) + (namesz), (align)) + +/* Compute the offset of the next note entry from size of note entry's + owner string, size of the note descriptor and note alignment. */ +#define ELF_NOTE_NEXT_OFFSET(namesz, descsz, align) \ + ELF_ALIGN_UP (ELF_NOTE_DESC_OFFSET ((namesz), (align)) + (descsz), \ + (align)) + +/* Relocation Entries */ +typedef struct { + unsigned char r_offset[4]; /* Location at which to apply the action */ + unsigned char r_info[4]; /* index and type of relocation */ +} Elf32_External_Rel; + +typedef struct { + unsigned char r_offset[4]; /* Location at which to apply the action */ + unsigned char r_info[4]; /* index and type of relocation */ + unsigned char r_addend[4]; /* Constant addend used to compute value */ +} Elf32_External_Rela; + +typedef struct { + unsigned char r_offset[8]; /* Location at which to apply the action */ + unsigned char r_info[8]; /* index and type of relocation */ +} Elf64_External_Rel; + +typedef struct { + unsigned char r_offset[8]; /* Location at which to apply the action */ + unsigned char r_info[8]; /* index and type of relocation */ + unsigned char r_addend[8]; /* Constant addend used to compute value */ +} Elf64_External_Rela; + +/* dynamic section structure */ + +typedef struct { + unsigned char d_tag[4]; /* entry tag value */ + union { + unsigned char d_val[4]; + unsigned char d_ptr[4]; + } d_un; +} Elf32_External_Dyn; + +typedef struct { + unsigned char d_tag[8]; /* entry tag value */ + union { + unsigned char d_val[8]; + unsigned char d_ptr[8]; + } d_un; +} Elf64_External_Dyn; + +/* The version structures are currently size independent. They are + named without a 32 or 64. If that ever changes, these structures + will need to be renamed. */ + +/* This structure appears in a SHT_GNU_verdef section. */ + +typedef struct { + unsigned char vd_version[2]; + unsigned char vd_flags[2]; + unsigned char vd_ndx[2]; + unsigned char vd_cnt[2]; + unsigned char vd_hash[4]; + unsigned char vd_aux[4]; + unsigned char vd_next[4]; +} Elf_External_Verdef; + +/* This structure appears in a SHT_GNU_verdef section. */ + +typedef struct { + unsigned char vda_name[4]; + unsigned char vda_next[4]; +} Elf_External_Verdaux; + +/* This structure appears in a SHT_GNU_verneed section. */ + +typedef struct { + unsigned char vn_version[2]; + unsigned char vn_cnt[2]; + unsigned char vn_file[4]; + unsigned char vn_aux[4]; + unsigned char vn_next[4]; +} Elf_External_Verneed; + +/* This structure appears in a SHT_GNU_verneed section. */ + +typedef struct { + unsigned char vna_hash[4]; + unsigned char vna_flags[2]; + unsigned char vna_other[2]; + unsigned char vna_name[4]; + unsigned char vna_next[4]; +} Elf_External_Vernaux; + +/* This structure appears in a SHT_GNU_versym section. This is not a + standard ELF structure; ELF just uses Elf32_Half. */ + +typedef struct { + unsigned char vs_vers[2]; +} ATTRIBUTE_PACKED Elf_External_Versym; + +/* Structure for syminfo section. */ +typedef struct +{ + unsigned char si_boundto[2]; + unsigned char si_flags[2]; +} Elf_External_Syminfo; + + +/* This structure appears on the stack and in NT_AUXV core file notes. */ +typedef struct +{ + unsigned char a_type[4]; + unsigned char a_val[4]; +} Elf32_External_Auxv; + +typedef struct +{ + unsigned char a_type[8]; + unsigned char a_val[8]; +} Elf64_External_Auxv; + +/* Size of SHT_GROUP section entry. */ + +#define GRP_ENTRY_SIZE 4 + +#endif /* _ELF_EXTERNAL_H */ diff --git a/support/sdbinutils/include/elf/fr30.h b/support/sdbinutils/include/elf/fr30.h new file mode 100644 index 0000000..a9036d7 --- /dev/null +++ b/support/sdbinutils/include/elf/fr30.h @@ -0,0 +1,42 @@ +/* FR30 ELF support for BFD. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_FR30_H +#define _ELF_FR30_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_fr30_reloc_type) + RELOC_NUMBER (R_FR30_NONE, 0) + RELOC_NUMBER (R_FR30_8, 1) + RELOC_NUMBER (R_FR30_20, 2) + RELOC_NUMBER (R_FR30_32, 3) + RELOC_NUMBER (R_FR30_48, 4) + RELOC_NUMBER (R_FR30_6_IN_4, 5) + RELOC_NUMBER (R_FR30_8_IN_8, 6) + RELOC_NUMBER (R_FR30_9_IN_8, 7) + RELOC_NUMBER (R_FR30_10_IN_8, 8) + RELOC_NUMBER (R_FR30_9_PCREL, 9) + RELOC_NUMBER (R_FR30_12_PCREL, 10) + RELOC_NUMBER (R_FR30_GNU_VTINHERIT, 11) + RELOC_NUMBER (R_FR30_GNU_VTENTRY, 12) +END_RELOC_NUMBERS (R_FR30_max) + +#endif /* _ELF_FR30_H */ diff --git a/support/sdbinutils/include/elf/frv.h b/support/sdbinutils/include/elf/frv.h new file mode 100644 index 0000000..de927dc --- /dev/null +++ b/support/sdbinutils/include/elf/frv.h @@ -0,0 +1,130 @@ +/* FRV ELF support for BFD. + Copyright (C) 2002-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_FRV_H +#define _ELF_FRV_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_frv_reloc_type) + RELOC_NUMBER (R_FRV_NONE, 0) + RELOC_NUMBER (R_FRV_32, 1) + RELOC_NUMBER (R_FRV_LABEL16, 2) + RELOC_NUMBER (R_FRV_LABEL24, 3) + RELOC_NUMBER (R_FRV_LO16, 4) + RELOC_NUMBER (R_FRV_HI16, 5) + RELOC_NUMBER (R_FRV_GPREL12, 6) + RELOC_NUMBER (R_FRV_GPRELU12, 7) + RELOC_NUMBER (R_FRV_GPREL32, 8) + RELOC_NUMBER (R_FRV_GPRELHI, 9) + RELOC_NUMBER (R_FRV_GPRELLO, 10) + RELOC_NUMBER (R_FRV_GOT12, 11) + RELOC_NUMBER (R_FRV_GOTHI, 12) + RELOC_NUMBER (R_FRV_GOTLO, 13) + RELOC_NUMBER (R_FRV_FUNCDESC, 14) + RELOC_NUMBER (R_FRV_FUNCDESC_GOT12, 15) + RELOC_NUMBER (R_FRV_FUNCDESC_GOTHI, 16) + RELOC_NUMBER (R_FRV_FUNCDESC_GOTLO, 17) + RELOC_NUMBER (R_FRV_FUNCDESC_VALUE, 18) + RELOC_NUMBER (R_FRV_FUNCDESC_GOTOFF12, 19) + RELOC_NUMBER (R_FRV_FUNCDESC_GOTOFFHI, 20) + RELOC_NUMBER (R_FRV_FUNCDESC_GOTOFFLO, 21) + RELOC_NUMBER (R_FRV_GOTOFF12, 22) + RELOC_NUMBER (R_FRV_GOTOFFHI, 23) + RELOC_NUMBER (R_FRV_GOTOFFLO, 24) + RELOC_NUMBER (R_FRV_GETTLSOFF, 25) + RELOC_NUMBER (R_FRV_TLSDESC_VALUE, 26) + RELOC_NUMBER (R_FRV_GOTTLSDESC12, 27) + RELOC_NUMBER (R_FRV_GOTTLSDESCHI, 28) + RELOC_NUMBER (R_FRV_GOTTLSDESCLO, 29) + RELOC_NUMBER (R_FRV_TLSMOFF12, 30) + RELOC_NUMBER (R_FRV_TLSMOFFHI, 31) + RELOC_NUMBER (R_FRV_TLSMOFFLO, 32) + RELOC_NUMBER (R_FRV_GOTTLSOFF12, 33) + RELOC_NUMBER (R_FRV_GOTTLSOFFHI, 34) + RELOC_NUMBER (R_FRV_GOTTLSOFFLO, 35) + RELOC_NUMBER (R_FRV_TLSOFF, 36) + RELOC_NUMBER (R_FRV_TLSDESC_RELAX, 37) + RELOC_NUMBER (R_FRV_GETTLSOFF_RELAX, 38) + RELOC_NUMBER (R_FRV_TLSOFF_RELAX, 39) + RELOC_NUMBER (R_FRV_TLSMOFF, 40) + RELOC_NUMBER (R_FRV_GNU_VTINHERIT, 200) + RELOC_NUMBER (R_FRV_GNU_VTENTRY, 201) +END_RELOC_NUMBERS(R_FRV_max) + +/* Processor specific flags for the ELF header e_flags field. */ + /* gpr support */ +#define EF_FRV_GPR_MASK 0x00000003 /* mask for # of gprs */ +#define EF_FRV_GPR_32 0x00000001 /* -mgpr-32 */ +#define EF_FRV_GPR_64 0x00000002 /* -mgpr-64 */ + + /* fpr support */ +#define EF_FRV_FPR_MASK 0x0000000c /* mask for # of fprs */ +#define EF_FRV_FPR_32 0x00000004 /* -mfpr-32 */ +#define EF_FRV_FPR_64 0x00000008 /* -mfpr-64 */ +#define EF_FRV_FPR_NONE 0x0000000c /* -msoft-float */ + + /* double word support */ +#define EF_FRV_DWORD_MASK 0x00000030 /* mask for dword support */ +#define EF_FRV_DWORD_YES 0x00000010 /* use double word insns */ +#define EF_FRV_DWORD_NO 0x00000020 /* don't use double word insn*/ + +#define EF_FRV_DOUBLE 0x00000040 /* -mdouble */ +#define EF_FRV_MEDIA 0x00000080 /* -mmedia */ + +#define EF_FRV_PIC 0x00000100 /* -fpic */ +#define EF_FRV_NON_PIC_RELOCS 0x00000200 /* used non pic safe relocs */ + +#define EF_FRV_MULADD 0x00000400 /* -mmuladd */ +#define EF_FRV_BIGPIC 0x00000800 /* -fPIC */ +#define EF_FRV_LIBPIC 0x00001000 /* -mlibrary-pic */ +#define EF_FRV_G0 0x00002000 /* -G 0, no small data ptr */ +#define EF_FRV_NOPACK 0x00004000 /* -mnopack */ +#define EF_FRV_FDPIC 0x00008000 /* -mfdpic */ + +#define EF_FRV_CPU_MASK 0xff000000 /* specific cpu bits */ +#define EF_FRV_CPU_GENERIC 0x00000000 /* generic FRV */ +#define EF_FRV_CPU_FR500 0x01000000 /* FRV500 */ +#define EF_FRV_CPU_FR300 0x02000000 /* FRV300 */ +#define EF_FRV_CPU_SIMPLE 0x03000000 /* SIMPLE */ +#define EF_FRV_CPU_TOMCAT 0x04000000 /* Tomcat, FR500 prototype */ +#define EF_FRV_CPU_FR400 0x05000000 /* FRV400 */ +#define EF_FRV_CPU_FR550 0x06000000 /* FRV550 */ +#define EF_FRV_CPU_FR405 0x07000000 +#define EF_FRV_CPU_FR450 0x08000000 + + /* Mask of PIC related bits */ +#define EF_FRV_PIC_FLAGS (EF_FRV_PIC | EF_FRV_LIBPIC | EF_FRV_BIGPIC \ + | EF_FRV_FDPIC) + + /* Mask of all flags */ +#define EF_FRV_ALL_FLAGS (EF_FRV_GPR_MASK | \ + EF_FRV_FPR_MASK | \ + EF_FRV_DWORD_MASK | \ + EF_FRV_DOUBLE | \ + EF_FRV_MEDIA | \ + EF_FRV_PIC_FLAGS | \ + EF_FRV_NON_PIC_RELOCS | \ + EF_FRV_MULADD | \ + EF_FRV_G0 | \ + EF_FRV_NOPACK | \ + EF_FRV_CPU_MASK) + +#endif /* _ELF_FRV_H */ diff --git a/support/sdbinutils/include/elf/ft32.h b/support/sdbinutils/include/elf/ft32.h new file mode 100644 index 0000000..d1eed72 --- /dev/null +++ b/support/sdbinutils/include/elf/ft32.h @@ -0,0 +1,42 @@ +/* ft32 ELF support for BFD. + Copyright (C) 2009-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_FT32_H +#define _ELF_FT32_H + +#include "elf/reloc-macros.h" + +/* Relocation types. */ +START_RELOC_NUMBERS (elf_ft32_reloc_type) + RELOC_NUMBER (R_FT32_NONE, 0) + RELOC_NUMBER (R_FT32_32, 1) + RELOC_NUMBER (R_FT32_16, 2) + RELOC_NUMBER (R_FT32_8, 3) + RELOC_NUMBER (R_FT32_10, 4) + RELOC_NUMBER (R_FT32_20, 5) + RELOC_NUMBER (R_FT32_17, 6) + RELOC_NUMBER (R_FT32_18, 7) + RELOC_NUMBER (R_FT32_RELAX, 8) + RELOC_NUMBER (R_FT32_SC0, 9) + RELOC_NUMBER (R_FT32_SC1, 10) + RELOC_NUMBER (R_FT32_15, 11) + RELOC_NUMBER (R_FT32_DIFF32, 12) +END_RELOC_NUMBERS (R_FT32_max) + +#endif /* _ELF_FT32_H */ diff --git a/support/sdbinutils/include/elf/h8.h b/support/sdbinutils/include/elf/h8.h new file mode 100644 index 0000000..e98f1ff --- /dev/null +++ b/support/sdbinutils/include/elf/h8.h @@ -0,0 +1,101 @@ +/* H8300/h8500 ELF support for BFD. + Copyright (C) 2001-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_H8_H +#define _ELF_H8_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +/* Relocations 59..64 are GNU extensions. */ +START_RELOC_NUMBERS (elf_h8_reloc_type) + RELOC_NUMBER (R_H8_NONE, 0) + RELOC_NUMBER (R_H8_DIR32, 1) + RELOC_NUMBER (R_H8_DIR32_28, 2) + RELOC_NUMBER (R_H8_DIR32_24, 3) + RELOC_NUMBER (R_H8_DIR32_16, 4) + RELOC_NUMBER (R_H8_DIR32U, 6) + RELOC_NUMBER (R_H8_DIR32U_28, 7) + RELOC_NUMBER (R_H8_DIR32U_24, 8) + RELOC_NUMBER (R_H8_DIR32U_20, 9) + RELOC_NUMBER (R_H8_DIR32U_16, 10) + RELOC_NUMBER (R_H8_DIR24, 11) + RELOC_NUMBER (R_H8_DIR24_20, 12) + RELOC_NUMBER (R_H8_DIR24_16, 13) + RELOC_NUMBER (R_H8_DIR24U, 14) + RELOC_NUMBER (R_H8_DIR24U_20, 15) + RELOC_NUMBER (R_H8_DIR24U_16, 16) + RELOC_NUMBER (R_H8_DIR16, 17) + RELOC_NUMBER (R_H8_DIR16U, 18) + RELOC_NUMBER (R_H8_DIR16S_32, 19) + RELOC_NUMBER (R_H8_DIR16S_28, 20) + RELOC_NUMBER (R_H8_DIR16S_24, 21) + RELOC_NUMBER (R_H8_DIR16S_20, 22) + RELOC_NUMBER (R_H8_DIR16S, 23) + RELOC_NUMBER (R_H8_DIR8, 24) + RELOC_NUMBER (R_H8_DIR8U, 25) + RELOC_NUMBER (R_H8_DIR8Z_32, 26) + RELOC_NUMBER (R_H8_DIR8Z_28, 27) + RELOC_NUMBER (R_H8_DIR8Z_24, 28) + RELOC_NUMBER (R_H8_DIR8Z_20, 29) + RELOC_NUMBER (R_H8_DIR8Z_16, 30) + RELOC_NUMBER (R_H8_PCREL16, 31) + RELOC_NUMBER (R_H8_PCREL8, 32) + RELOC_NUMBER (R_H8_BPOS, 33) + FAKE_RELOC (R_H8_FIRST_INVALID_DIR_RELOC, 34) + FAKE_RELOC (R_H8_LAST_INVALID_DIR_RELOC, 58) + RELOC_NUMBER (R_H8_DIR16A8, 59) + RELOC_NUMBER (R_H8_DIR16R8, 60) + RELOC_NUMBER (R_H8_DIR24A8, 61) + RELOC_NUMBER (R_H8_DIR24R8, 62) + RELOC_NUMBER (R_H8_DIR32A16, 63) + RELOC_NUMBER (R_H8_DISP32A16, 64) + RELOC_NUMBER (R_H8_ABS32, 65) + RELOC_NUMBER (R_H8_ABS32A16, 127) + RELOC_NUMBER (R_H8_SYM, 128) + RELOC_NUMBER (R_H8_OPneg, 129) + RELOC_NUMBER (R_H8_OPadd, 130) + RELOC_NUMBER (R_H8_OPsub, 131) + RELOC_NUMBER (R_H8_OPmul, 132) + RELOC_NUMBER (R_H8_OPdiv, 133) + RELOC_NUMBER (R_H8_OPshla, 134) + RELOC_NUMBER (R_H8_OPshra, 135) + RELOC_NUMBER (R_H8_OPsctsize, 136) + RELOC_NUMBER (R_H8_OPhword, 137) + RELOC_NUMBER (R_H8_OPlword, 138) + RELOC_NUMBER (R_H8_OPhigh, 139) + RELOC_NUMBER (R_H8_OPlow, 140) + RELOC_NUMBER (R_H8_OPscttop, 141) +END_RELOC_NUMBERS (R_H8_max) + +/* Machine variant if we know it. This field was invented at Cygnus, + but it is hoped that other vendors will adopt it. If some standard + is developed, this code should be changed to follow it. */ + +#define EF_H8_MACH 0x00FF0000 + +#define E_H8_MACH_H8300 0x00800000 +#define E_H8_MACH_H8300H 0x00810000 +#define E_H8_MACH_H8300S 0x00820000 +#define E_H8_MACH_H8300HN 0x00830000 +#define E_H8_MACH_H8300SN 0x00840000 +#define E_H8_MACH_H8300SX 0x00850000 +#define E_H8_MACH_H8300SXN 0x00860000 + +#endif diff --git a/support/sdbinutils/include/elf/hppa.h b/support/sdbinutils/include/elf/hppa.h new file mode 100644 index 0000000..975f32f --- /dev/null +++ b/support/sdbinutils/include/elf/hppa.h @@ -0,0 +1,634 @@ +/* HPPA ELF support for BFD. + Copyright (C) 1993-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file holds definitions specific to the HPPA ELF ABI. Note + that most of this is not actually implemented by BFD. */ + +#ifndef _ELF_HPPA_H +#define _ELF_HPPA_H + +/* Processor specific flags for the ELF header e_flags field. */ + +/* Trap null address dereferences. */ +#define EF_PARISC_TRAPNIL 0x00010000 + +/* .PARISC.archext section is present. */ +#define EF_PARISC_EXT 0x00020000 + +/* Program expects little-endian mode. */ +#define EF_PARISC_LSB 0x00040000 + +/* Program expects wide mode. */ +#define EF_PARISC_WIDE 0x00080000 + +/* Do not allow kernel-assisted branch prediction. */ +#define EF_PARISC_NO_KABP 0x00100000 + +/* Allow lazy swap for dynamically allocated program segments. */ +#define EF_PARISC_LAZYSWAP 0x00400000 + +/* Architecture version */ +#define EF_PARISC_ARCH 0x0000ffff + +#define EFA_PARISC_1_0 0x020b +#define EFA_PARISC_1_1 0x0210 +#define EFA_PARISC_2_0 0x0214 + +/* Special section indices. */ +/* A symbol that has been declared as a tentative definition in an ANSI C + compilation. */ +#define SHN_PARISC_ANSI_COMMON SHN_LORESERVE + +/* A symbol that has been declared as a common block using the + huge memory model. */ +#define SHN_PARISC_HUGE_COMMON (SHN_LORESERVE + 1) + +/* Processor specific section types. */ + +/* Section contains product specific extension bits. */ +#define SHT_PARISC_EXT 0x70000000 + +/* Section contains unwind table entries. */ +#define SHT_PARISC_UNWIND 0x70000001 + +/* Section contains debug information for optimized code. */ +#define SHT_PARISC_DOC 0x70000002 + +/* Section contains code annotations. */ +#define SHT_PARISC_ANNOT 0x70000003 + +/* DLKM special section. */ +#define SHT_PARISC_DLKM 0x70000004 + +/* These are strictly for compatibility with the older elf32-hppa + implementation. Hopefully we can eliminate them in the future. */ +/* Optional section holding argument location/relocation info. */ +#define SHT_PARISC_SYMEXTN SHT_LOPROC + 8 + +/* Option section for linker stubs. */ +#define SHT_PARISC_STUBS SHT_LOPROC + 9 + +/* Processor specific section flags. */ + +/* Section contains code compiled for static branch prediction. */ +#define SHF_PARISC_SBP 0x80000000 + +/* Section should be allocated from from GP. */ +#define SHF_PARISC_HUGE 0x40000000 + +/* Section should go near GP. */ +#define SHF_PARISC_SHORT 0x20000000 + +/* Section is weak ordered. */ +#define SHF_PARISC_WEAKORDER 0x10000000 + +/* Identifies the entry point of a millicode routine. */ +#define STT_PARISC_MILLI 13 + +/* ELF/HPPA relocation types */ + +/* Note: PA-ELF is defined to use only RELA relocations. */ +#include "elf/reloc-macros.h" + +START_RELOC_NUMBERS (elf_hppa_reloc_type) +RELOC_NUMBER (R_PARISC_NONE, 0) /* No reloc */ + +/* Data / Inst. Format Relocation Expression */ + +RELOC_NUMBER (R_PARISC_DIR32, 1) +/* 32-bit word symbol + addend */ + +RELOC_NUMBER (R_PARISC_DIR21L, 2) +/* long immediate (7) LR(symbol, addend) */ + +RELOC_NUMBER (R_PARISC_DIR17R, 3) +/* branch external (19) RR(symbol, addend) */ + +RELOC_NUMBER (R_PARISC_DIR17F, 4) +/* branch external (19) symbol + addend */ + +RELOC_NUMBER (R_PARISC_DIR14R, 6) +/* load/store (1) RR(symbol, addend) */ + +RELOC_NUMBER (R_PARISC_DIR14F, 7) +/* load/store (1) symbol, addend */ + +/* PC-relative relocation types + Typically used for calls. + Note PCREL17C and PCREL17F differ only in overflow handling. + PCREL17C never reports a relocation error. + + When supporting argument relocations, function calls must be + accompanied by parameter relocation information. This information is + carried in the ten high-order bits of the addend field. The remaining + 22 bits of the addend field are sign-extended to form the Addend. + + Note the code to build argument relocations depends on the + addend being zero. A consequence of this limitation is GAS + can not perform relocation reductions for function symbols. */ + +RELOC_NUMBER (R_PARISC_PCREL12F, 8) +/* op & branch (17) symbol - PC - 8 + addend */ + +RELOC_NUMBER (R_PARISC_PCREL32, 9) +/* 32-bit word symbol - PC - 8 + addend */ + +RELOC_NUMBER (R_PARISC_PCREL21L, 10) +/* long immediate (7) L(symbol - PC - 8 + addend) */ + +RELOC_NUMBER (R_PARISC_PCREL17R, 11) +/* branch external (19) R(symbol - PC - 8 + addend) */ + +RELOC_NUMBER (R_PARISC_PCREL17F, 12) +/* branch (20) symbol - PC - 8 + addend */ + +RELOC_NUMBER (R_PARISC_PCREL17C, 13) +/* branch (20) symbol - PC - 8 + addend */ + +RELOC_NUMBER (R_PARISC_PCREL14R, 14) +/* load/store (1) R(symbol - PC - 8 + addend) */ + +RELOC_NUMBER (R_PARISC_PCREL14F, 15) +/* load/store (1) symbol - PC - 8 + addend */ + + +/* DP-relative relocation types. */ +RELOC_NUMBER (R_PARISC_DPREL21L, 18) +/* long immediate (7) LR(symbol - GP, addend) */ + +RELOC_NUMBER (R_PARISC_DPREL14WR, 19) +/* load/store mod. comp. (2) RR(symbol - GP, addend) */ + +RELOC_NUMBER (R_PARISC_DPREL14DR, 20) +/* load/store doubleword (3) RR(symbol - GP, addend) */ + +RELOC_NUMBER (R_PARISC_DPREL14R, 22) +/* load/store (1) RR(symbol - GP, addend) */ + +RELOC_NUMBER (R_PARISC_DPREL14F, 23) +/* load/store (1) symbol - GP + addend */ + + +/* Data linkage table (DLT) relocation types + + SOM DLT_REL fixup requests are used to for static data references + from position-independent code within shared libraries. They are + similar to the GOT relocation types in some SVR4 implementations. */ + +RELOC_NUMBER (R_PARISC_DLTREL21L, 26) +/* long immediate (7) LR(symbol - GP, addend) */ + +RELOC_NUMBER (R_PARISC_DLTREL14R, 30) +/* load/store (1) RR(symbol - GP, addend) */ + +RELOC_NUMBER (R_PARISC_DLTREL14F, 31) +/* load/store (1) symbol - GP + addend */ + + +/* DLT indirect relocation types */ +RELOC_NUMBER (R_PARISC_DLTIND21L, 34) +/* long immediate (7) L(ltoff(symbol + addend)) */ + +RELOC_NUMBER (R_PARISC_DLTIND14R, 38) +/* load/store (1) R(ltoff(symbol + addend)) */ + +RELOC_NUMBER (R_PARISC_DLTIND14F, 39) +/* load/store (1) ltoff(symbol + addend) */ + + +/* Base relative relocation types. Ugh. These imply lots of state */ +RELOC_NUMBER (R_PARISC_SETBASE, 40) +/* none no reloc; base := sym */ + +RELOC_NUMBER (R_PARISC_SECREL32, 41) +/* 32-bit word symbol - SECT + addend */ + +RELOC_NUMBER (R_PARISC_BASEREL21L, 42) +/* long immediate (7) LR(symbol - base, addend) */ + +RELOC_NUMBER (R_PARISC_BASEREL17R, 43) +/* branch external (19) RR(symbol - base, addend) */ + +RELOC_NUMBER (R_PARISC_BASEREL17F, 44) +/* branch external (19) symbol - base + addend */ + +RELOC_NUMBER (R_PARISC_BASEREL14R, 46) +/* load/store (1) RR(symbol - base, addend) */ + +RELOC_NUMBER (R_PARISC_BASEREL14F, 47) +/* load/store (1) symbol - base, addend */ + + +/* Segment relative relocation types. */ +RELOC_NUMBER (R_PARISC_SEGBASE, 48) +/* none no relocation; SB := sym */ + +RELOC_NUMBER (R_PARISC_SEGREL32, 49) +/* 32-bit word symbol - SB + addend */ + + +/* Offsets from the PLT. */ +RELOC_NUMBER (R_PARISC_PLTOFF21L, 50) +/* long immediate (7) LR(pltoff(symbol), addend) */ + +RELOC_NUMBER (R_PARISC_PLTOFF14R, 54) +/* load/store (1) RR(pltoff(symbol), addend) */ + +RELOC_NUMBER (R_PARISC_PLTOFF14F, 55) +/* load/store (1) pltoff(symbol) + addend */ + + +RELOC_NUMBER (R_PARISC_LTOFF_FPTR32, 57) +/* 32-bit word ltoff(fptr(symbol+addend)) */ + +RELOC_NUMBER (R_PARISC_LTOFF_FPTR21L, 58) +/* long immediate (7) L(ltoff(fptr(symbol+addend))) */ + +RELOC_NUMBER (R_PARISC_LTOFF_FPTR14R, 62) +/* load/store (1) R(ltoff(fptr(symbol+addend))) */ + + +RELOC_NUMBER (R_PARISC_FPTR64, 64) +/* 64-bit doubleword fptr(symbol+addend) */ + + +/* Plabel relocation types. */ +RELOC_NUMBER (R_PARISC_PLABEL32, 65) +/* 32-bit word fptr(symbol) */ + +RELOC_NUMBER (R_PARISC_PLABEL21L, 66) +/* long immediate (7) L(fptr(symbol)) */ + +RELOC_NUMBER (R_PARISC_PLABEL14R, 70) +/* load/store (1) R(fptr(symbol)) */ + + +/* PCREL relocations. */ +RELOC_NUMBER (R_PARISC_PCREL64, 72) +/* 64-bit doubleword symbol - PC - 8 + addend */ + +RELOC_NUMBER (R_PARISC_PCREL22C, 73) +/* branch & link (21) symbol - PC - 8 + addend */ + +RELOC_NUMBER (R_PARISC_PCREL22F, 74) +/* branch & link (21) symbol - PC - 8 + addend */ + +RELOC_NUMBER (R_PARISC_PCREL14WR, 75) +/* load/store mod. comp. (2) R(symbol - PC - 8 + addend) */ + +RELOC_NUMBER (R_PARISC_PCREL14DR, 76) +/* load/store doubleword (3) R(symbol - PC - 8 + addend) */ + +RELOC_NUMBER (R_PARISC_PCREL16F, 77) +/* load/store (1) symbol - PC - 8 + addend */ + +RELOC_NUMBER (R_PARISC_PCREL16WF, 78) +/* load/store mod. comp. (2) symbol - PC - 8 + addend */ + +RELOC_NUMBER (R_PARISC_PCREL16DF, 79) +/* load/store doubleword (3) symbol - PC - 8 + addend */ + + +RELOC_NUMBER (R_PARISC_DIR64, 80) +/* 64-bit doubleword symbol + addend */ + +RELOC_NUMBER (R_PARISC_DIR14WR, 83) +/* load/store mod. comp. (2) RR(symbol, addend) */ + +RELOC_NUMBER (R_PARISC_DIR14DR, 84) +/* load/store doubleword (3) RR(symbol, addend) */ + +RELOC_NUMBER (R_PARISC_DIR16F, 85) +/* load/store (1) symbol + addend */ + +RELOC_NUMBER (R_PARISC_DIR16WF, 86) +/* load/store mod. comp. (2) symbol + addend */ + +RELOC_NUMBER (R_PARISC_DIR16DF, 87) +/* load/store doubleword (3) symbol + addend */ + +RELOC_NUMBER (R_PARISC_GPREL64, 88) +/* 64-bit doubleword symbol - GP + addend */ + +RELOC_NUMBER (R_PARISC_DLTREL14WR, 91) +/* load/store mod. comp. (2) RR(symbol - GP, addend) */ + +RELOC_NUMBER (R_PARISC_DLTREL14DR, 92) +/* load/store doubleword (3) RR(symbol - GP, addend) */ + +RELOC_NUMBER (R_PARISC_GPREL16F, 93) +/* load/store (1) symbol - GP + addend */ + +RELOC_NUMBER (R_PARISC_GPREL16WF, 94) +/* load/store mod. comp. (2) symbol - GP + addend */ + +RELOC_NUMBER (R_PARISC_GPREL16DF, 95) +/* load/store doubleword (3) symbol - GP + addend */ + + +RELOC_NUMBER (R_PARISC_LTOFF64, 96) +/* 64-bit doubleword ltoff(symbol + addend) */ + +RELOC_NUMBER (R_PARISC_DLTIND14WR, 99) +/* load/store mod. comp. (2) R(ltoff(symbol + addend)) */ + +RELOC_NUMBER (R_PARISC_DLTIND14DR, 100) +/* load/store doubleword (3) R(ltoff(symbol + addend)) */ + +RELOC_NUMBER (R_PARISC_LTOFF16F, 101) +/* load/store (1) ltoff(symbol + addend) */ + +RELOC_NUMBER (R_PARISC_LTOFF16WF, 102) +/* load/store mod. comp. (2) ltoff(symbol + addend) */ + +RELOC_NUMBER (R_PARISC_LTOFF16DF, 103) +/* load/store doubleword (3) ltoff(symbol + addend) */ + + +RELOC_NUMBER (R_PARISC_SECREL64, 104) +/* 64-bit doubleword symbol - SECT + addend */ + +RELOC_NUMBER (R_PARISC_BASEREL14WR, 107) +/* load/store mod. comp. (2) RR(symbol - base, addend) */ + +RELOC_NUMBER (R_PARISC_BASEREL14DR, 108) +/* load/store doubleword (3) RR(symbol - base, addend) */ + + +RELOC_NUMBER (R_PARISC_SEGREL64, 112) +/* 64-bit doubleword symbol - SB + addend */ + +RELOC_NUMBER (R_PARISC_PLTOFF14WR, 115) +/* load/store mod. comp. (2) RR(pltoff(symbol), addend) */ + +RELOC_NUMBER (R_PARISC_PLTOFF14DR, 116) +/* load/store doubleword (3) RR(pltoff(symbol), addend) */ + +RELOC_NUMBER (R_PARISC_PLTOFF16F, 117) +/* load/store (1) pltoff(symbol) + addend */ + +RELOC_NUMBER (R_PARISC_PLTOFF16WF, 118) +/* load/store mod. comp. (2) pltoff(symbol) + addend */ + +RELOC_NUMBER (R_PARISC_PLTOFF16DF, 119) +/* load/store doubleword (3) pltoff(symbol) + addend */ + + +RELOC_NUMBER (R_PARISC_LTOFF_FPTR64, 120) +/* 64-bit doubleword ltoff(fptr(symbol+addend)) */ + +RELOC_NUMBER (R_PARISC_LTOFF_FPTR14WR, 123) +/* load/store mod. comp. (2) R(ltoff(fptr(symbol+addend))) */ + +RELOC_NUMBER (R_PARISC_LTOFF_FPTR14DR, 124) +/* load/store doubleword (3) R(ltoff(fptr(symbol+addend))) */ + +RELOC_NUMBER (R_PARISC_LTOFF_FPTR16F, 125) +/* load/store (1) ltoff(fptr(symbol+addend)) */ + +RELOC_NUMBER (R_PARISC_LTOFF_FPTR16WF, 126) +/* load/store mod. comp. (2) ltoff(fptr(symbol+addend)) */ + +RELOC_NUMBER (R_PARISC_LTOFF_FPTR16DF, 127) +/* load/store doubleword (3) ltoff(fptr(symbol+addend)) */ + + +RELOC_NUMBER (R_PARISC_COPY, 128) +/* data Dynamic relocations only */ + +RELOC_NUMBER (R_PARISC_IPLT, 129) +/* plt */ + +RELOC_NUMBER (R_PARISC_EPLT, 130) +/* plt */ + + +RELOC_NUMBER (R_PARISC_TPREL32, 153) +/* 32-bit word symbol - TP + addend */ + +RELOC_NUMBER (R_PARISC_TPREL21L, 154) +/* long immediate (7) LR(symbol - TP, addend) */ + +RELOC_NUMBER (R_PARISC_TPREL14R, 158) +/* load/store (1) RR(symbol - TP, addend) */ + + +RELOC_NUMBER (R_PARISC_LTOFF_TP21L, 162) +/* long immediate (7) L(ltoff(symbol - TP + addend)) */ + +RELOC_NUMBER (R_PARISC_LTOFF_TP14R, 166) +/* load/store (1) R(ltoff(symbol - TP + addend)) */ + +RELOC_NUMBER (R_PARISC_LTOFF_TP14F, 167) +/* load/store (1) ltoff(symbol - TP + addend) */ + + +RELOC_NUMBER (R_PARISC_TPREL64, 216) +/* 64-bit word symbol - TP + addend */ + +RELOC_NUMBER (R_PARISC_TPREL14WR, 219) +/* load/store mod. comp. (2) RR(symbol - TP, addend) */ + +RELOC_NUMBER (R_PARISC_TPREL14DR, 220) +/* load/store doubleword (3) RR(symbol - TP, addend) */ + +RELOC_NUMBER (R_PARISC_TPREL16F, 221) +/* load/store (1) symbol - TP + addend */ + +RELOC_NUMBER (R_PARISC_TPREL16WF, 222) +/* load/store mod. comp. (2) symbol - TP + addend */ + +RELOC_NUMBER (R_PARISC_TPREL16DF, 223) +/* load/store doubleword (3) symbol - TP + addend */ + + +RELOC_NUMBER (R_PARISC_LTOFF_TP64, 224) +/* 64-bit doubleword ltoff(symbol - TP + addend) */ + +RELOC_NUMBER (R_PARISC_LTOFF_TP14WR, 227) +/* load/store mod. comp. (2) R(ltoff(symbol - TP + addend)) */ + +RELOC_NUMBER (R_PARISC_LTOFF_TP14DR, 228) +/* load/store doubleword (3) R(ltoff(symbol - TP + addend)) */ + +RELOC_NUMBER (R_PARISC_LTOFF_TP16F, 229) +/* load/store (1) ltoff(symbol - TP + addend) */ + +RELOC_NUMBER (R_PARISC_LTOFF_TP16WF, 230) +/* load/store mod. comp. (2) ltoff(symbol - TP + addend) */ + +RELOC_NUMBER (R_PARISC_LTOFF_TP16DF, 231) +/* load/store doubleword (3) ltoff(symbol - TP + addend) */ + +RELOC_NUMBER (R_PARISC_GNU_VTENTRY, 232) +RELOC_NUMBER (R_PARISC_GNU_VTINHERIT, 233) + +RELOC_NUMBER (R_PARISC_TLS_GD21L, 234) +RELOC_NUMBER (R_PARISC_TLS_GD14R, 235) +RELOC_NUMBER (R_PARISC_TLS_GDCALL, 236) +RELOC_NUMBER (R_PARISC_TLS_LDM21L, 237) +RELOC_NUMBER (R_PARISC_TLS_LDM14R, 238) +RELOC_NUMBER (R_PARISC_TLS_LDMCALL, 239) +RELOC_NUMBER (R_PARISC_TLS_LDO21L, 240) +RELOC_NUMBER (R_PARISC_TLS_LDO14R, 241) +RELOC_NUMBER (R_PARISC_TLS_DTPMOD32, 242) +RELOC_NUMBER (R_PARISC_TLS_DTPMOD64, 243) +RELOC_NUMBER (R_PARISC_TLS_DTPOFF32, 244) +RELOC_NUMBER (R_PARISC_TLS_DTPOFF64, 245) + +END_RELOC_NUMBERS (R_PARISC_UNIMPLEMENTED) + +#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 + +#ifndef RELOC_MACROS_GEN_FUNC +typedef enum elf_hppa_reloc_type elf_hppa_reloc_type; +#endif + +#define PT_PARISC_ARCHEXT 0x70000000 +#define PT_PARISC_UNWIND 0x70000001 +#define PT_PARISC_WEAKORDER 0x70000002 + +/* Flag bits in sh_flags of ElfXX_Shdr. */ +#define SHF_HP_TLS 0x01000000 +#define SHF_HP_NEAR_SHARED 0x02000000 +#define SHF_HP_FAR_SHARED 0x04000000 +#define SHF_HP_COMDAT 0x08000000 +#define SHF_HP_CONST 0x00800000 + +/* Reserved section header indices. */ +#define SHN_TLS_COMMON (SHN_LOOS + 0x0) +#define SHN_NS_COMMON (SHN_LOOS + 0x1) +#define SHN_FS_COMMON (SHN_LOOS + 0x2) +#define SHN_NS_UNDEF (SHN_LOOS + 0x3) +#define SHN_FS_UNDEF (SHN_LOOS + 0x4) +#define SHN_HP_EXTERN (SHN_LOOS + 0x5) +#define SHN_HP_EXTHINT (SHN_LOOS + 0x6) +#define SHN_HP_UNDEF_BIND_IMM (SHN_LOOS + 0x7) + +/* Values of sh_type in ElfXX_Shdr. */ +#define SHT_HP_OVLBITS (SHT_LOOS + 0x0) +#define SHT_HP_DLKM (SHT_LOOS + 0x1) +#define SHT_HP_COMDAT (SHT_LOOS + 0x2) +#define SHT_HP_OBJDICT (SHT_LOOS + 0x3) +#define SHT_HP_ANNOT (SHT_LOOS + 0x4) + +/* Flag bits in p_flags of ElfXX_Phdr. */ +#define PF_HP_CODE 0x00040000 +#define PF_HP_MODIFY 0x00080000 +#define PF_HP_PAGE_SIZE 0x00100000 +#define PF_HP_FAR_SHARED 0x00200000 +#define PF_HP_NEAR_SHARED 0x00400000 +#define PF_HP_LAZYSWAP 0x00800000 +#define PF_HP_CODE_DEPR 0x01000000 +#define PF_HP_MODIFY_DEPR 0x02000000 +#define PF_HP_LAZYSWAP_DEPR 0x04000000 +#define PF_PARISC_SBP 0x08000000 +#define PF_HP_SBP 0x08000000 + + +/* Processor specific dynamic array tags. */ + +/* Arggh. HP's tools define these symbols based on the + old value of DT_LOOS. So we must do the same to be + compatible. */ +#define DT_HP_LOAD_MAP (OLD_DT_LOOS + 0x0) +#define DT_HP_DLD_FLAGS (OLD_DT_LOOS + 0x1) +#define DT_HP_DLD_HOOK (OLD_DT_LOOS + 0x2) +#define DT_HP_UX10_INIT (OLD_DT_LOOS + 0x3) +#define DT_HP_UX10_INITSZ (OLD_DT_LOOS + 0x4) +#define DT_HP_PREINIT (OLD_DT_LOOS + 0x5) +#define DT_HP_PREINITSZ (OLD_DT_LOOS + 0x6) +#define DT_HP_NEEDED (OLD_DT_LOOS + 0x7) +#define DT_HP_TIME_STAMP (OLD_DT_LOOS + 0x8) +#define DT_HP_CHECKSUM (OLD_DT_LOOS + 0x9) +#define DT_HP_GST_SIZE (OLD_DT_LOOS + 0xa) +#define DT_HP_GST_VERSION (OLD_DT_LOOS + 0xb) +#define DT_HP_GST_HASHVAL (OLD_DT_LOOS + 0xc) +#define DT_HP_EPLTREL (OLD_DT_LOOS + 0xd) +#define DT_HP_EPLTRELSZ (OLD_DT_LOOS + 0xe) +#define DT_HP_FILTERED (OLD_DT_LOOS + 0xf) +#define DT_HP_FILTER_TLS (OLD_DT_LOOS + 0x10) +#define DT_HP_COMPAT_FILTERED (OLD_DT_LOOS + 0x11) +#define DT_HP_LAZYLOAD (OLD_DT_LOOS + 0x12) +#define DT_HP_BIND_NOW_COUNT (OLD_DT_LOOS + 0x13) +#define DT_PLT (OLD_DT_LOOS + 0x14) +#define DT_PLT_SIZE (OLD_DT_LOOS + 0x15) +#define DT_DLT (OLD_DT_LOOS + 0x16) +#define DT_DLT_SIZE (OLD_DT_LOOS + 0x17) + +/* Values for DT_HP_DLD_FLAGS. */ +#define DT_HP_DEBUG_PRIVATE 0x00001 /* Map text private */ +#define DT_HP_DEBUG_CALLBACK 0x00002 /* Callback */ +#define DT_HP_DEBUG_CALLBACK_BOR 0x00004 /* BOR callback */ +#define DT_HP_NO_ENVVAR 0x00008 /* No env var */ +#define DT_HP_BIND_NOW 0x00010 /* Bind now */ +#define DT_HP_BIND_NONFATAL 0x00020 /* Bind non-fatal */ +#define DT_HP_BIND_VERBOSE 0x00040 /* Bind verbose */ +#define DT_HP_BIND_RESTRICTED 0x00080 /* Bind restricted */ +#define DT_HP_BIND_SYMBOLIC 0x00100 /* Bind symbolic */ +#define DT_HP_RPATH_FIRST 0x00200 /* RPATH first */ +#define DT_HP_BIND_DEPTH_FIRST 0x00400 /* Bind depth-first */ +#define DT_HP_GST 0x00800 /* Dld global sym table */ +#define DT_HP_SHLIB_FIXED 0x01000 /* shared vtable support */ +#define DT_HP_MERGE_SHLIB_SEG 0x02000 /* merge shlib data segs */ +#define DT_HP_NODELETE 0x04000 /* never unload */ +#define DT_HP_GROUP 0x08000 /* bind only within group */ +#define DT_HP_PROTECT_LINKAGE_TABLE 0x10000 /* protected linkage table */ + +/* Program header extensions. */ +#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_HP_CORE_UTSNAME (PT_LOOS + 0x15) + +/* Binding information. */ +#define STB_HP_ALIAS (STB_LOOS + 0x0) + +/* Additional symbol types. */ +#define STT_HP_OPAQUE (STT_LOOS + 0x1) +#define STT_HP_STUB (STT_LOOS + 0x2) + +/* Note types. */ +#define NT_HP_COMPILER 1 +#define NT_HP_COPYRIGHT 2 +#define NT_HP_VERSION 3 +#define NT_HP_SRCFILE_INFO 4 +#define NT_HP_LINKER 5 +#define NT_HP_INSTRUMENTED 6 +#define NT_HP_UX_OPTIONS 7 + +#endif /* _ELF_HPPA_H */ diff --git a/support/sdbinutils/include/elf/i370.h b/support/sdbinutils/include/elf/i370.h new file mode 100644 index 0000000..01df196 --- /dev/null +++ b/support/sdbinutils/include/elf/i370.h @@ -0,0 +1,61 @@ +/* i370 ELF support for BFD. + Copyright (C) 2000-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file holds definitions specific to the i370 ELF ABI. Note + that most of this is not actually implemented by BFD. */ + +#ifndef _ELF_I370_H +#define _ELF_I370_H + +#include "elf/reloc-macros.h" + +/* Processor specific section headers, sh_type field */ + +#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \ + entries in this section \ + based on the address \ + specified in the associated \ + symbol table entry. */ + +#define EF_I370_RELOCATABLE 0x00010000 /* i370 -mrelocatable flag */ +#define EF_I370_RELOCATABLE_LIB 0x00008000 /* i370 -mrelocatable-lib flag */ + +/* i370 relocations + Note that there is really just one relocation that we currently + support (and only one that we seem to need, at the moment), and + that is the 31-bit address relocation. Note that the 370/390 + only supports a 31-bit (2GB) address space. */ + +START_RELOC_NUMBERS (i370_reloc_type) + RELOC_NUMBER (R_I370_NONE, 0) + RELOC_NUMBER (R_I370_ADDR31, 1) + RELOC_NUMBER (R_I370_ADDR32, 2) + RELOC_NUMBER (R_I370_ADDR16, 3) + RELOC_NUMBER (R_I370_REL31, 4) + RELOC_NUMBER (R_I370_REL32, 5) + RELOC_NUMBER (R_I370_ADDR12, 6) + RELOC_NUMBER (R_I370_REL12, 7) + RELOC_NUMBER (R_I370_ADDR8, 8) + RELOC_NUMBER (R_I370_REL8, 9) + RELOC_NUMBER (R_I370_COPY, 10) + RELOC_NUMBER (R_I370_RELATIVE, 11) +END_RELOC_NUMBERS (R_I370_max) + +#endif /* _ELF_I370_H */ diff --git a/support/sdbinutils/include/elf/i386.h b/support/sdbinutils/include/elf/i386.h new file mode 100644 index 0000000..9d80aa8 --- /dev/null +++ b/support/sdbinutils/include/elf/i386.h @@ -0,0 +1,80 @@ +/* ix86 ELF support for BFD. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_I386_H +#define _ELF_I386_H + +#include "elf/reloc-macros.h" + +START_RELOC_NUMBERS (elf_i386_reloc_type) + RELOC_NUMBER (R_386_NONE, 0) /* No reloc */ + RELOC_NUMBER (R_386_32, 1) /* Direct 32 bit */ + RELOC_NUMBER (R_386_PC32, 2) /* PC relative 32 bit */ + RELOC_NUMBER (R_386_GOT32, 3) /* 32 bit GOT entry */ + RELOC_NUMBER (R_386_PLT32, 4) /* 32 bit PLT address */ + RELOC_NUMBER (R_386_COPY, 5) /* Copy symbol at runtime */ + RELOC_NUMBER (R_386_GLOB_DAT, 6) /* Create GOT entry */ + RELOC_NUMBER (R_386_JUMP_SLOT, 7) /* Create PLT entry */ + RELOC_NUMBER (R_386_RELATIVE, 8) /* Adjust by program base */ + RELOC_NUMBER (R_386_GOTOFF, 9) /* 32 bit offset to GOT */ + RELOC_NUMBER (R_386_GOTPC, 10) /* 32 bit PC relative offset to GOT */ + RELOC_NUMBER (R_386_32PLT, 11) /* Used by Sun */ + FAKE_RELOC (FIRST_INVALID_RELOC, 12) + FAKE_RELOC (LAST_INVALID_RELOC, 13) + RELOC_NUMBER (R_386_TLS_TPOFF,14) + RELOC_NUMBER (R_386_TLS_IE, 15) + RELOC_NUMBER (R_386_TLS_GOTIE,16) + RELOC_NUMBER (R_386_TLS_LE, 17) + RELOC_NUMBER (R_386_TLS_GD, 18) + RELOC_NUMBER (R_386_TLS_LDM, 19) + RELOC_NUMBER (R_386_16, 20) + RELOC_NUMBER (R_386_PC16, 21) + RELOC_NUMBER (R_386_8, 22) + RELOC_NUMBER (R_386_PC8, 23) + RELOC_NUMBER (R_386_TLS_GD_32, 24) + RELOC_NUMBER (R_386_TLS_GD_PUSH, 25) + RELOC_NUMBER (R_386_TLS_GD_CALL, 26) + RELOC_NUMBER (R_386_TLS_GD_POP, 27) + RELOC_NUMBER (R_386_TLS_LDM_32, 28) + RELOC_NUMBER (R_386_TLS_LDM_PUSH, 29) + RELOC_NUMBER (R_386_TLS_LDM_CALL, 30) + RELOC_NUMBER (R_386_TLS_LDM_POP, 31) + RELOC_NUMBER (R_386_TLS_LDO_32, 32) + RELOC_NUMBER (R_386_TLS_IE_32, 33) + RELOC_NUMBER (R_386_TLS_LE_32, 34) + RELOC_NUMBER (R_386_TLS_DTPMOD32, 35) + RELOC_NUMBER (R_386_TLS_DTPOFF32, 36) + RELOC_NUMBER (R_386_TLS_TPOFF32, 37) + RELOC_NUMBER (R_386_SIZE32, 38) /* 32-bit symbol size */ + RELOC_NUMBER (R_386_TLS_GOTDESC, 39) + RELOC_NUMBER (R_386_TLS_DESC_CALL,40) + RELOC_NUMBER (R_386_TLS_DESC, 41) + RELOC_NUMBER (R_386_IRELATIVE, 42) /* Adjust indirectly by program base */ + /* Load from 32 bit GOT entry, relaxable. */ + RELOC_NUMBER (R_386_GOT32X, 43) + + /* Used by Intel. */ + RELOC_NUMBER (R_386_USED_BY_INTEL_200, 200) + + /* These are GNU extensions to enable C++ vtable garbage collection. */ + RELOC_NUMBER (R_386_GNU_VTINHERIT, 250) + RELOC_NUMBER (R_386_GNU_VTENTRY, 251) +END_RELOC_NUMBERS (R_386_max) + +#endif diff --git a/support/sdbinutils/include/elf/i860.h b/support/sdbinutils/include/elf/i860.h new file mode 100644 index 0000000..7762c1d --- /dev/null +++ b/support/sdbinutils/include/elf/i860.h @@ -0,0 +1,66 @@ +/* i860 ELF support for BFD. + Copyright (C) 2000-2018 Free Software Foundation, Inc. + + Contributed by Jason Eckhardt . + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_I860_H +#define _ELF_I860_H + +/* Note: i860 ELF is defined to use only RELA relocations. */ + +#include "elf/reloc-macros.h" + +START_RELOC_NUMBERS (elf_i860_reloc_type) + RELOC_NUMBER (R_860_NONE, 0x00) /* No reloc */ + RELOC_NUMBER (R_860_32, 0x01) /* S+A */ + RELOC_NUMBER (R_860_COPY, 0x02) /* No calculation */ + RELOC_NUMBER (R_860_GLOB_DAT, 0x03) /* S, Create GOT entry */ + RELOC_NUMBER (R_860_JUMP_SLOT, 0x04) /* S+A, Create PLT entry */ + RELOC_NUMBER (R_860_RELATIVE, 0x05) /* B+A, Adj by program base */ + RELOC_NUMBER (R_860_PC26, 0x30) /* (S+A-P) >> 2 */ + RELOC_NUMBER (R_860_PLT26, 0x31) /* (L+A-P) >> 2 */ + RELOC_NUMBER (R_860_PC16, 0x32) /* (S+A-P) >> 2 */ + RELOC_NUMBER (R_860_LOW0, 0x40) /* S+A */ + RELOC_NUMBER (R_860_SPLIT0, 0x42) /* S+A */ + RELOC_NUMBER (R_860_LOW1, 0x44) /* S+A */ + RELOC_NUMBER (R_860_SPLIT1, 0x46) /* S+A */ + RELOC_NUMBER (R_860_LOW2, 0x48) /* S+A */ + RELOC_NUMBER (R_860_SPLIT2, 0x4A) /* S+A */ + RELOC_NUMBER (R_860_LOW3, 0x4C) /* S+A */ + RELOC_NUMBER (R_860_LOGOT0, 0x50) /* G */ + RELOC_NUMBER (R_860_SPGOT0, 0x52) /* G */ + RELOC_NUMBER (R_860_LOGOT1, 0x54) /* G */ + RELOC_NUMBER (R_860_SPGOT1, 0x56) /* G */ + RELOC_NUMBER (R_860_LOGOTOFF0, 0x60) /* O */ + RELOC_NUMBER (R_860_SPGOTOFF0, 0x62) /* O */ + RELOC_NUMBER (R_860_LOGOTOFF1, 0x64) /* O */ + RELOC_NUMBER (R_860_SPGOTOFF1, 0x66) /* O */ + RELOC_NUMBER (R_860_LOGOTOFF2, 0x68) /* O */ + RELOC_NUMBER (R_860_LOGOTOFF3, 0x6C) /* O */ + RELOC_NUMBER (R_860_LOPC, 0x70) /* (S+A-P) >> 2 */ + RELOC_NUMBER (R_860_HIGHADJ, 0x80) /* hiadj(S+A) */ + RELOC_NUMBER (R_860_HAGOT, 0x90) /* hiadj(G) */ + RELOC_NUMBER (R_860_HAGOTOFF, 0xA0) /* hiadj(O) */ + RELOC_NUMBER (R_860_HAPC, 0xB0) /* hiadj((S+A-P) >> 2) */ + RELOC_NUMBER (R_860_HIGH, 0xC0) /* (S+A) >> 16 */ + RELOC_NUMBER (R_860_HIGOT, 0xD0) /* G >> 16 */ + RELOC_NUMBER (R_860_HIGOTOFF, 0xE0) /* O */ +END_RELOC_NUMBERS (R_860_max) + +#endif diff --git a/support/sdbinutils/include/elf/i960.h b/support/sdbinutils/include/elf/i960.h new file mode 100644 index 0000000..1b9a587 --- /dev/null +++ b/support/sdbinutils/include/elf/i960.h @@ -0,0 +1,37 @@ +/* Intel 960 ELF support for BFD. + Copyright (C) 1999-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_I960_H +#define _ELF_I960_H + +#include "elf/reloc-macros.h" + + +START_RELOC_NUMBERS (elf_i960_reloc_type) + RELOC_NUMBER (R_960_NONE, 0) + RELOC_NUMBER (R_960_12, 1) + RELOC_NUMBER (R_960_32, 2) + RELOC_NUMBER (R_960_IP24, 3) + RELOC_NUMBER (R_960_SUB, 4) + RELOC_NUMBER (R_960_OPTCALL, 5) + RELOC_NUMBER (R_960_OPTCALLX, 6) + RELOC_NUMBER (R_960_OPTCALLXA, 7) +END_RELOC_NUMBERS (R_960_max) + +#endif /* _ELF_I960_H */ diff --git a/support/sdbinutils/include/elf/ia64.h b/support/sdbinutils/include/elf/ia64.h new file mode 100644 index 0000000..d14aa7d --- /dev/null +++ b/support/sdbinutils/include/elf/ia64.h @@ -0,0 +1,415 @@ +/* IA-64 ELF support for BFD. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + Contributed by David Mosberger-Tang + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef _ELF_IA64_H +#define _ELF_IA64_H + +/* Bits in the e_flags field of the Elf64_Ehdr: */ + +#define EF_IA_64_MASKOS 0x0000000f /* OS-specific flags. */ +#define EF_IA_64_ARCH 0xff000000 /* Arch. version mask. */ +#define EF_IA_64_ARCHVER_1 (1 << 24) /* Arch. version level 1 compat. */ + +/* ??? These four definitions are not part of the SVR4 ABI. + They were present in David's initial code drop, so it is probable + that they are used by HP/UX. */ +#define EF_IA_64_TRAPNIL (1 << 0) /* Trap NIL pointer dereferences. */ +#define EF_IA_64_EXT (1 << 2) /* Program uses arch. extensions. */ +#define EF_IA_64_BE (1 << 3) /* PSR BE bit set (big-endian). */ +#define EFA_IA_64_EAS2_3 0x23000000 /* IA64 EAS 2.3. */ + +#define EF_IA_64_ABI64 (1 << 4) /* 64-bit ABI. */ +/* Not used yet. */ +#define EF_IA_64_REDUCEDFP (1 << 5) /* Only FP6-FP11 used. */ +#define EF_IA_64_CONS_GP (1 << 6) /* gp as program wide constant. */ +#define EF_IA_64_NOFUNCDESC_CONS_GP (1 << 7) /* And no function descriptors. */ +/* Not used yet. */ +#define EF_IA_64_ABSOLUTE (1 << 8) /* Load at absolute addresses. */ + +/* OpenVMS speficic. */ +#define EF_IA_64_VMS_COMCOD 0x03 /* Completion code. */ +#define EF_IA_64_VMS_COMCOD_SUCCESS 0 +#define EF_IA_64_VMS_COMCOD_WARNING 1 +#define EF_IA_64_VMS_COMCOD_ERROR 2 +#define EF_IA_64_VMS_COMCOD_ABORT 3 +#define EF_IA_64_VMS_LINKAGES 0x04 /* Contains VMS linkages info. */ + +#define ELF_STRING_ia64_archext ".IA_64.archext" +#define ELF_STRING_ia64_pltoff ".IA_64.pltoff" +#define ELF_STRING_ia64_unwind ".IA_64.unwind" +#define ELF_STRING_ia64_unwind_info ".IA_64.unwind_info" +#define ELF_STRING_ia64_unwind_once ".gnu.linkonce.ia64unw." +#define ELF_STRING_ia64_unwind_info_once ".gnu.linkonce.ia64unwi." +/* .IA_64.unwind_hdr is only used by HP-UX. */ +#define ELF_STRING_ia64_unwind_hdr ".IA_64.unwind_hdr" + +/* Bits in the sh_flags field of Elf64_Shdr: */ + +#define SHF_IA_64_SHORT 0x10000000 /* Section near gp. */ +#define SHF_IA_64_NORECOV 0x20000000 /* Spec insns w/o recovery. */ + +#define SHF_IA_64_HP_TLS 0x01000000 /* HP specific TLS flag. */ + +#define SHF_IA_64_VMS_GLOBAL 0x0100000000ULL /* Global for clustering. */ +#define SHF_IA_64_VMS_OVERLAID 0x0200000000ULL /* To be overlaid. */ +#define SHF_IA_64_VMS_SHARED 0x0400000000ULL /* Shared btw processes. */ +#define SHF_IA_64_VMS_VECTOR 0x0800000000ULL /* Priv change mode vect. */ +#define SHF_IA_64_VMS_ALLOC_64BIT 0x1000000000ULL /* Allocate beyond 2GB. */ +#define SHF_IA_64_VMS_PROTECTED 0x2000000000ULL /* Export from sharable. */ + +/* Possible values for sh_type in Elf64_Shdr: */ + +#define SHT_IA_64_EXT (SHT_LOPROC + 0) /* Extension bits. */ +#define SHT_IA_64_UNWIND (SHT_LOPROC + 1) /* Unwind bits. */ +#define SHT_IA_64_LOPSREG (SHT_LOPROC + 0x8000000) +/* ABI says (SHT_LOPROC + 0xfffffff) but I think it's a typo -- this makes sense. */ +#define SHT_IA_64_HIPSREG (SHT_LOPROC + 0x8ffffff) +#define SHT_IA_64_PRIORITY_INIT (SHT_LOPROC + 0x9000000) + +/* SHT_IA_64_HP_OPT_ANOT is only generated by HPUX compilers for its + optimization annotation section. GCC does not generate it but we + want readelf to know what they are. Do not use two capital Ns in + annotate or sed will turn it into 32 or 64 during the build. */ +#define SHT_IA_64_HP_OPT_ANOT 0x60000004 + +/* OpenVMS section types. */ +/* The section contains PC-to-source correlation information for use by the + VMS RTL's traceback facility. */ +#define SHT_IA_64_VMS_TRACE 0x60000000 +/* The section contains routine signature information for use by the + translated image executive. */ +#define SHT_IA_64_VMS_TIE_SIGNATURES 0x60000001 +/* The section contains dwarf-3 information. */ +#define SHT_IA_64_VMS_DEBUG 0x60000002 +/* The section contains the dwarf-3 string table. */ +#define SHT_IA_64_VMS_DEBUG_STR 0x60000003 +/* The section contains linkage information to perform consistency checking + accross object modules. */ +#define SHT_IA_64_VMS_LINKAGES 0x60000004 +/* The section allows the symbol vector in an image to be location through + the section table. */ +#define SHT_IA_64_VMS_SYMBOL_VECTOR 0x60000005 +/* The section contains inter-image fixups. */ +#define SHT_IA_64_VMS_FIXUP 0x60000006 +/* The section contains unmangled name info. */ +#define SHT_IA_64_VMS_DISPLAY_NAME_INFO 0x60000007 + +/* Bits in the p_flags field of Elf64_Phdr: */ + +#define PF_IA_64_NORECOV 0x80000000 + +/* Possible values for p_type in Elf64_Phdr: */ + +#define PT_IA_64_ARCHEXT (PT_LOPROC + 0) /* Arch extension bits, */ +#define PT_IA_64_UNWIND (PT_LOPROC + 1) /* IA64 unwind bits. */ + +/* HP-UX specific values for p_type in Elf64_Phdr. + These values are currently just used to make + readelf more usable on HP-UX. */ + +#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) + +/* Possible values for d_tag in Elf64_Dyn: */ + +#define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0) + +/* VMS specific values for d_tag in Elf64_Dyn: */ + +#define DT_IA_64_VMS_SUBTYPE (DT_LOOS + 0) +#define DT_IA_64_VMS_IMGIOCNT (DT_LOOS + 2) +#define DT_IA_64_VMS_LNKFLAGS (DT_LOOS + 8) +#define DT_IA_64_VMS_VIR_MEM_BLK_SIZ (DT_LOOS + 10) +#define DT_IA_64_VMS_IDENT (DT_LOOS + 12) +#define DT_IA_64_VMS_NEEDED_IDENT (DT_LOOS + 16) +#define DT_IA_64_VMS_IMG_RELA_CNT (DT_LOOS + 18) +#define DT_IA_64_VMS_SEG_RELA_CNT (DT_LOOS + 20) +#define DT_IA_64_VMS_FIXUP_RELA_CNT (DT_LOOS + 22) +#define DT_IA_64_VMS_FIXUP_NEEDED (DT_LOOS + 24) +#define DT_IA_64_VMS_SYMVEC_CNT (DT_LOOS + 26) +#define DT_IA_64_VMS_XLATED (DT_LOOS + 30) +#define DT_IA_64_VMS_STACKSIZE (DT_LOOS + 32) +#define DT_IA_64_VMS_UNWINDSZ (DT_LOOS + 34) +#define DT_IA_64_VMS_UNWIND_CODSEG (DT_LOOS + 36) +#define DT_IA_64_VMS_UNWIND_INFOSEG (DT_LOOS + 38) +#define DT_IA_64_VMS_LINKTIME (DT_LOOS + 40) +#define DT_IA_64_VMS_SEG_NO (DT_LOOS + 42) +#define DT_IA_64_VMS_SYMVEC_OFFSET (DT_LOOS + 44) +#define DT_IA_64_VMS_SYMVEC_SEG (DT_LOOS + 46) +#define DT_IA_64_VMS_UNWIND_OFFSET (DT_LOOS + 48) +#define DT_IA_64_VMS_UNWIND_SEG (DT_LOOS + 50) +#define DT_IA_64_VMS_STRTAB_OFFSET (DT_LOOS + 52) +#define DT_IA_64_VMS_SYSVER_OFFSET (DT_LOOS + 54) +#define DT_IA_64_VMS_IMG_RELA_OFF (DT_LOOS + 56) +#define DT_IA_64_VMS_SEG_RELA_OFF (DT_LOOS + 58) +#define DT_IA_64_VMS_FIXUP_RELA_OFF (DT_LOOS + 60) +#define DT_IA_64_VMS_PLTGOT_OFFSET (DT_LOOS + 62) +#define DT_IA_64_VMS_PLTGOT_SEG (DT_LOOS + 64) +#define DT_IA_64_VMS_FPMODE (DT_LOOS + 66) + +/* Values for DT_IA_64_LNKFLAGS. */ +#define VMS_LF_CALL_DEBUG 0x0001 /* Activate and call the debugger. */ +#define VMS_LF_NOP0BUFS 0x0002 /* RMS use of P0 for i/o disabled. */ +#define VMS_LF_P0IMAGE 0x0004 /* Image in P0 space only. */ +#define VMS_LF_MKTHREADS 0x0008 /* Multiple kernel threads enabled. */ +#define VMS_LF_UPCALLS 0x0010 /* Upcalls enabled. */ +#define VMS_LF_IMGSTA 0x0020 /* Use SYS$IMGSTA. */ +#define VMS_LF_INITIALIZE 0x0040 /* Image uses tfradr2. */ +#define VMS_LF_MAIN 0x0080 /* Image uses tfradr3. */ +#define VMS_LF_EXE_INIT 0x0200 /* Image uses tfradr4. */ +#define VMS_LF_TBK_IN_IMG 0x0400 /* Traceback records in image. */ +#define VMS_LF_DBG_IN_IMG 0x0800 /* Debug records in image. */ +#define VMS_LF_TBK_IN_DSF 0x1000 /* Traceback records in DSF. */ +#define VMS_LF_DBG_IN_DSF 0x2000 /* Debug records in DSF. */ +#define VMS_LF_SIGNATURES 0x4000 /* Signatures present. */ +#define VMS_LF_REL_SEG_OFF 0x8000 /* Maintain relative pos of seg. */ + +/* This section only used by HP-UX, The HP linker gives weak symbols + precedence over regular common symbols. We want common to override + weak. Using this common instead of SHN_COMMON does that. */ +#define SHN_IA_64_ANSI_COMMON SHN_LORESERVE + +/* This section is only used by OpenVMS. Symbol is defined in the symbol + vector (only possible for image files). */ +#define SHN_IA_64_VMS_SYMVEC SHN_LOOS + +/* OpenVMS IA64-specific symbol attributes. */ +#define VMS_STO_VISIBILITY 3 /* Alias of the standard field. */ +#define VMS_ST_VISIBILITY(o) ((o) & VMS_STO_VISIBILITY) +#define VMS_STO_FUNC_TYPE 0x30 /* Function type. */ +#define VMS_ST_FUNC_TYPE(o) (((o) & VMS_STO_FUNC_TYPE) >> 4) +# define VMS_SFT_CODE_ADDR 0 /* Symbol value is a code address. */ +# define VMS_SFT_SYMV_IDX 1 /* Symbol value is a symbol vector index. */ +# define VMS_SFT_FD 2 /* Symbol value is a function descriptor. */ +# define VMS_SFT_RESERVE 3 /* Reserved. */ +#define VMS_STO_LINKAGE 0xc0 +#define VMS_ST_LINKAGE(o) (((o) & VMS_STO_LINKAGE) >> 6) +# define VMS_STL_IGNORE 0 /* No associated linkage. */ +# define VMS_STL_RESERVE 1 +# define VMS_STL_STD 2 /* Standard linkage with return value. */ +# define VMS_STL_LNK 3 /* Explicit represented in .vms_linkages. */ + +/* OpenVMS specific symbol binding values. */ +#define STB_VMS_WEAK 11 /* VMS weak symbol. */ +#define STB_VMS_SYSTEM 12 /* System symbol. */ + +/* OpenVMS specific fixup and relocation structures. */ + +typedef struct +{ + unsigned char fixup_offset[8]; + unsigned char type[4]; + unsigned char fixup_seg[4]; + unsigned char addend[8]; + unsigned char symvec_index[4]; + unsigned char data_type[4]; +} Elf64_External_VMS_IMAGE_FIXUP; + +typedef struct +{ + unsigned char rela_offset[8]; + unsigned char type[4]; + unsigned char rela_seg[4]; + unsigned char addend[8]; + unsigned char sym_offset[8]; + unsigned char sym_seg[4]; + unsigned char fill_1[4]; +} Elf64_External_VMS_IMAGE_RELA; + +/* Note segments. VMS is special as it uses 64-bit entries. */ + +typedef struct { + unsigned char namesz[8]; /* Size of entry's owner string */ + unsigned char descsz[8]; /* Size of the note descriptor */ + unsigned char type[8]; /* Interpretation of the descriptor */ + char name[1]; /* Start of the name+desc data */ +} Elf64_External_VMS_Note; + +#define NT_VMS_MHD 1 /* Object module name, version, and date/time. */ +#define NT_VMS_LNM 2 /* Language processor name. */ +#define NT_VMS_SRC 3 /* Source files. */ +#define NT_VMS_TITLE 4 /* Title text. */ +#define NT_VMS_EIDC 5 /* Entity ident consistency check. */ +#define NT_VMS_FPMODE 6 /* Whole program floating-point mode. */ +#define NT_VMS_LINKTIME 101 /* Date/time image was linked. */ +#define NT_VMS_IMGNAM 102 /* Image name string. */ +#define NT_VMS_IMGID 103 /* Image ident string. */ +#define NT_VMS_LINKID 104 /* Linker ident string. */ +#define NT_VMS_IMGBID 105 /* Image build ident string. */ +#define NT_VMS_GSTNAM 106 /* Global Symbol Table Name. */ +#define NT_VMS_ORIG_DYN 107 /* Original setting of dynamic data. */ +#define NT_VMS_PATCHTIME 108 /* Date/time of last patch. */ + +/* Corresponding data for NT_VMS_ORIG_DYM. */ + +typedef struct { + unsigned char major_id[4]; /* Should be 1. */ + unsigned char minor_id[4]; /* Should be 3. */ + unsigned char manipulation_date[8]; /* Original NT_VMS_LNKTIME. */ + unsigned char link_flags[8]; /* Original NT_VMS_LNKFLAGS. */ + unsigned char elf_flags[4]; /* Original ehdr flags. */ + unsigned char _pad[4]; + unsigned char imgid[1]; /* Original NT_VMS_IMGID. */ +} Elf64_External_VMS_ORIG_DYN_Note; + +/* IA64-specific relocation types: */ + +/* Relocs apply to specific instructions within a bundle. The least + significant 2 bits of the address indicate which instruction in the + bundle the reloc refers to (0=first slot, 1=second slow, 2=third + slot, 3=undefined) and the remaining bits give the address of the + bundle (16 byte aligned). + + The top 5 bits of the reloc code specifies the expression type, the + low 3 bits the format of the data word being relocated. */ + +#include "elf/reloc-macros.h" + +START_RELOC_NUMBERS (elf_ia64_reloc_type) + RELOC_NUMBER (R_IA64_NONE, 0x00) /* none */ + + RELOC_NUMBER (R_IA64_IMM14, 0x21) /* symbol + addend, add imm14 */ + RELOC_NUMBER (R_IA64_IMM22, 0x22) /* symbol + addend, add imm22 */ + RELOC_NUMBER (R_IA64_IMM64, 0x23) /* symbol + addend, mov imm64 */ + RELOC_NUMBER (R_IA64_DIR32MSB, 0x24) /* symbol + addend, data4 MSB */ + RELOC_NUMBER (R_IA64_DIR32LSB, 0x25) /* symbol + addend, data4 LSB */ + RELOC_NUMBER (R_IA64_DIR64MSB, 0x26) /* symbol + addend, data8 MSB */ + RELOC_NUMBER (R_IA64_DIR64LSB, 0x27) /* symbol + addend, data8 LSB */ + + RELOC_NUMBER (R_IA64_GPREL22, 0x2a) /* @gprel(sym+add), add imm22 */ + RELOC_NUMBER (R_IA64_GPREL64I, 0x2b) /* @gprel(sym+add), mov imm64 */ + RELOC_NUMBER (R_IA64_GPREL32MSB, 0x2c) /* @gprel(sym+add), data4 MSB */ + RELOC_NUMBER (R_IA64_GPREL32LSB, 0x2d) /* @gprel(sym+add), data4 LSB */ + RELOC_NUMBER (R_IA64_GPREL64MSB, 0x2e) /* @gprel(sym+add), data8 MSB */ + RELOC_NUMBER (R_IA64_GPREL64LSB, 0x2f) /* @gprel(sym+add), data8 LSB */ + + RELOC_NUMBER (R_IA64_LTOFF22, 0x32) /* @ltoff(sym+add), add imm22 */ + RELOC_NUMBER (R_IA64_LTOFF64I, 0x33) /* @ltoff(sym+add), mov imm64 */ + + RELOC_NUMBER (R_IA64_PLTOFF22, 0x3a) /* @pltoff(sym+add), add imm22 */ + RELOC_NUMBER (R_IA64_PLTOFF64I, 0x3b) /* @pltoff(sym+add), mov imm64 */ + RELOC_NUMBER (R_IA64_PLTOFF64MSB, 0x3e) /* @pltoff(sym+add), data8 MSB */ + RELOC_NUMBER (R_IA64_PLTOFF64LSB, 0x3f) /* @pltoff(sym+add), data8 LSB */ + + RELOC_NUMBER (R_IA64_FPTR64I, 0x43) /* @fptr(sym+add), mov imm64 */ + RELOC_NUMBER (R_IA64_FPTR32MSB, 0x44) /* @fptr(sym+add), data4 MSB */ + RELOC_NUMBER (R_IA64_FPTR32LSB, 0x45) /* @fptr(sym+add), data4 LSB */ + RELOC_NUMBER (R_IA64_FPTR64MSB, 0x46) /* @fptr(sym+add), data8 MSB */ + RELOC_NUMBER (R_IA64_FPTR64LSB, 0x47) /* @fptr(sym+add), data8 LSB */ + + RELOC_NUMBER (R_IA64_PCREL60B, 0x48) /* @pcrel(sym+add), brl */ + RELOC_NUMBER (R_IA64_PCREL21B, 0x49) /* @pcrel(sym+add), ptb, call */ + RELOC_NUMBER (R_IA64_PCREL21M, 0x4a) /* @pcrel(sym+add), chk.s */ + RELOC_NUMBER (R_IA64_PCREL21F, 0x4b) /* @pcrel(sym+add), fchkf */ + RELOC_NUMBER (R_IA64_PCREL32MSB, 0x4c) /* @pcrel(sym+add), data4 MSB */ + RELOC_NUMBER (R_IA64_PCREL32LSB, 0x4d) /* @pcrel(sym+add), data4 LSB */ + RELOC_NUMBER (R_IA64_PCREL64MSB, 0x4e) /* @pcrel(sym+add), data8 MSB */ + RELOC_NUMBER (R_IA64_PCREL64LSB, 0x4f) /* @pcrel(sym+add), data8 LSB */ + + RELOC_NUMBER (R_IA64_LTOFF_FPTR22, 0x52) /* @ltoff(@fptr(s+a)), imm22 */ + RELOC_NUMBER (R_IA64_LTOFF_FPTR64I, 0x53) /* @ltoff(@fptr(s+a)), imm64 */ + RELOC_NUMBER (R_IA64_LTOFF_FPTR32MSB, 0x54) /* @ltoff(@fptr(s+a)), 4 MSB */ + RELOC_NUMBER (R_IA64_LTOFF_FPTR32LSB, 0x55) /* @ltoff(@fptr(s+a)), 4 LSB */ + RELOC_NUMBER (R_IA64_LTOFF_FPTR64MSB, 0x56) /* @ltoff(@fptr(s+a)), 8 MSB */ + RELOC_NUMBER (R_IA64_LTOFF_FPTR64LSB, 0x57) /* @ltoff(@fptr(s+a)), 8 LSB */ + + RELOC_NUMBER (R_IA64_SEGREL32MSB, 0x5c) /* @segrel(sym+add), data4 MSB */ + RELOC_NUMBER (R_IA64_SEGREL32LSB, 0x5d) /* @segrel(sym+add), data4 LSB */ + RELOC_NUMBER (R_IA64_SEGREL64MSB, 0x5e) /* @segrel(sym+add), data8 MSB */ + RELOC_NUMBER (R_IA64_SEGREL64LSB, 0x5f) /* @segrel(sym+add), data8 LSB */ + + RELOC_NUMBER (R_IA64_SECREL32MSB, 0x64) /* @secrel(sym+add), data4 MSB */ + RELOC_NUMBER (R_IA64_SECREL32LSB, 0x65) /* @secrel(sym+add), data4 LSB */ + RELOC_NUMBER (R_IA64_SECREL64MSB, 0x66) /* @secrel(sym+add), data8 MSB */ + RELOC_NUMBER (R_IA64_SECREL64LSB, 0x67) /* @secrel(sym+add), data8 LSB */ + + RELOC_NUMBER (R_IA64_REL32MSB, 0x6c) /* data 4 + REL */ + RELOC_NUMBER (R_IA64_REL32LSB, 0x6d) /* data 4 + REL */ + RELOC_NUMBER (R_IA64_REL64MSB, 0x6e) /* data 8 + REL */ + RELOC_NUMBER (R_IA64_REL64LSB, 0x6f) /* data 8 + REL */ + + RELOC_NUMBER (R_IA64_LTV32MSB, 0x74) /* symbol + addend, data4 MSB */ + RELOC_NUMBER (R_IA64_LTV32LSB, 0x75) /* symbol + addend, data4 LSB */ + RELOC_NUMBER (R_IA64_LTV64MSB, 0x76) /* symbol + addend, data8 MSB */ + RELOC_NUMBER (R_IA64_LTV64LSB, 0x77) /* symbol + addend, data8 LSB */ + + RELOC_NUMBER (R_IA64_PCREL21BI, 0x79) /* @pcrel(sym+add), ptb, call */ + RELOC_NUMBER (R_IA64_PCREL22, 0x7a) /* @pcrel(sym+add), imm22 */ + RELOC_NUMBER (R_IA64_PCREL64I, 0x7b) /* @pcrel(sym+add), imm64 */ + + RELOC_NUMBER (R_IA64_IPLTMSB, 0x80) /* dynamic reloc, imported PLT, MSB */ + RELOC_NUMBER (R_IA64_IPLTLSB, 0x81) /* dynamic reloc, imported PLT, LSB */ + RELOC_NUMBER (R_IA64_COPY, 0x84) /* dynamic reloc, data copy */ + RELOC_NUMBER (R_IA64_LTOFF22X, 0x86) /* LTOFF22, relaxable. */ + RELOC_NUMBER (R_IA64_LDXMOV, 0x87) /* Use of LTOFF22X. */ + + RELOC_NUMBER (R_IA64_TPREL14, 0x91) /* @tprel(sym+add), add imm14 */ + RELOC_NUMBER (R_IA64_TPREL22, 0x92) /* @tprel(sym+add), add imm22 */ + RELOC_NUMBER (R_IA64_TPREL64I, 0x93) /* @tprel(sym+add), add imm64 */ + RELOC_NUMBER (R_IA64_TPREL64MSB, 0x96) /* @tprel(sym+add), data8 MSB */ + RELOC_NUMBER (R_IA64_TPREL64LSB, 0x97) /* @tprel(sym+add), data8 LSB */ + + RELOC_NUMBER (R_IA64_LTOFF_TPREL22, 0x9a) /* @ltoff(@tprel(s+a)), add imm22 */ + + RELOC_NUMBER (R_IA64_DTPMOD64MSB, 0xa6) /* @dtpmod(sym+add), data8 MSB */ + RELOC_NUMBER (R_IA64_DTPMOD64LSB, 0xa7) /* @dtpmod(sym+add), data8 LSB */ + RELOC_NUMBER (R_IA64_LTOFF_DTPMOD22, 0xaa) /* @ltoff(@dtpmod(s+a)), imm22 */ + + RELOC_NUMBER (R_IA64_DTPREL14, 0xb1) /* @dtprel(sym+add), imm14 */ + RELOC_NUMBER (R_IA64_DTPREL22, 0xb2) /* @dtprel(sym+add), imm22 */ + RELOC_NUMBER (R_IA64_DTPREL64I, 0xb3) /* @dtprel(sym+add), imm64 */ + RELOC_NUMBER (R_IA64_DTPREL32MSB, 0xb4) /* @dtprel(sym+add), data4 MSB */ + RELOC_NUMBER (R_IA64_DTPREL32LSB, 0xb5) /* @dtprel(sym+add), data4 LSB */ + RELOC_NUMBER (R_IA64_DTPREL64MSB, 0xb6) /* @dtprel(sym+add), data8 MSB */ + RELOC_NUMBER (R_IA64_DTPREL64LSB, 0xb7) /* @dtprel(sym+add), data8 LSB */ + + RELOC_NUMBER (R_IA64_LTOFF_DTPREL22, 0xba) /* @ltoff(@dtprel(s+a)), imm22 */ + + FAKE_RELOC (R_IA64_MAX_RELOC_CODE, 0xba) + + /* OpenVMS specific relocs. */ + RELOC_NUMBER (R_IA64_VMS_DIR8, 0x70000000) /* S + A */ + RELOC_NUMBER (R_IA64_VMS_DIR16LSB, 0x70000001) /* S + A */ + RELOC_NUMBER (R_IA64_VMS_CALL_SIGNATURE, 0x70000002) + RELOC_NUMBER (R_IA64_VMS_EXECLET_FUNC, 0x70000003) + RELOC_NUMBER (R_IA64_VMS_EXECLET_DATA, 0x70000004) + RELOC_NUMBER (R_IA64_VMS_FIX8, 0x70000005) /* S + A */ + RELOC_NUMBER (R_IA64_VMS_FIX16, 0x70000006) /* S + A */ + RELOC_NUMBER (R_IA64_VMS_FIX32, 0x70000007) /* S + A */ + RELOC_NUMBER (R_IA64_VMS_FIX64, 0x70000008) /* S + A */ + RELOC_NUMBER (R_IA64_VMS_FIXFD, 0x70000009) + RELOC_NUMBER (R_IA64_VMS_ACC_LOAD, 0x7000000a) /* ACC = S + A */ + RELOC_NUMBER (R_IA64_VMS_ACC_ADD, 0x7000000b) /* ACC += S + A */ + RELOC_NUMBER (R_IA64_VMS_ACC_SUB, 0x7000000c) /* ACC -= S + A */ + RELOC_NUMBER (R_IA64_VMS_ACC_MUL, 0x7000000d) /* ACC *= S + A */ + RELOC_NUMBER (R_IA64_VMS_ACC_DIV, 0x7000000e) /* ACC /= S + A */ + RELOC_NUMBER (R_IA64_VMS_ACC_AND, 0x7000000f) /* ACC &= S + A */ + RELOC_NUMBER (R_IA64_VMS_ACC_IOR, 0x70000010) /* ACC |= S + A */ + RELOC_NUMBER (R_IA64_VMS_ACC_EOR, 0x70000011) /* ACC ^= S + A */ + RELOC_NUMBER (R_IA64_VMS_ACC_ASH, 0x70000012) /* ACC >>= S + A */ + RELOC_NUMBER (R_IA64_VMS_ACC_STO8, 0x70000014) /* ACC */ + RELOC_NUMBER (R_IA64_VMS_ACC_STO16LSH, 0x70000015) /* ACC */ + RELOC_NUMBER (R_IA64_VMS_ACC_STO32LSH, 0x70000016) /* ACC */ + RELOC_NUMBER (R_IA64_VMS_ACC_STO64LSH, 0x70000017) /* ACC */ +END_RELOC_NUMBERS (R_IA64_max) + +#endif /* _ELF_IA64_H */ diff --git a/support/sdbinutils/include/elf/internal.h b/support/sdbinutils/include/elf/internal.h new file mode 100644 index 0000000..05f9fab --- /dev/null +++ b/support/sdbinutils/include/elf/internal.h @@ -0,0 +1,374 @@ +/* ELF support for BFD. + Copyright (C) 1991-2018 Free Software Foundation, Inc. + + Written by Fred Fish @ Cygnus Support, from information published + in "UNIX System V Release 4, Programmers Guide: ANSI C and + Programming Support Tools". + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file is part of ELF support for BFD, and contains the portions + that describe how ELF is represented internally in the BFD library. + I.E. it describes the in-memory representation of ELF. It requires + the elf-common.h file which contains the portions that are common to + both the internal and external representations. */ + +/* NOTE that these structures are not kept in the same order as they appear + in the object file. In some cases they've been reordered for more optimal + packing under various circumstances. */ + +#ifndef _ELF_INTERNAL_H +#define _ELF_INTERNAL_H + +/* Special section indices, which may show up in st_shndx fields, among + other places. */ + +#undef SHN_UNDEF +#undef SHN_LORESERVE +#undef SHN_LOPROC +#undef SHN_HIPROC +#undef SHN_LOOS +#undef SHN_HIOS +#undef SHN_ABS +#undef SHN_COMMON +#undef SHN_XINDEX +#undef SHN_HIRESERVE +#define SHN_UNDEF 0 /* Undefined section reference */ +#define SHN_LORESERVE (-0x100u) /* Begin range of reserved indices */ +#define SHN_LOPROC (-0x100u) /* Begin range of appl-specific */ +#define SHN_HIPROC (-0xE1u) /* End range of appl-specific */ +#define SHN_LOOS (-0xE0u) /* OS specific semantics, lo */ +#define SHN_HIOS (-0xC1u) /* OS specific semantics, hi */ +#define SHN_ABS (-0xFu) /* Associated symbol is absolute */ +#define SHN_COMMON (-0xEu) /* Associated symbol is in common */ +#define SHN_XINDEX (-0x1u) /* Section index is held elsewhere */ +#define SHN_HIRESERVE (-0x1u) /* End range of reserved indices */ +#define SHN_BAD (-0x101u) /* Used internally by bfd */ + +/* ELF Header */ + +#define EI_NIDENT 16 /* Size of e_ident[] */ + +typedef struct elf_internal_ehdr { + unsigned char e_ident[EI_NIDENT]; /* ELF "magic number" */ + bfd_vma e_entry; /* Entry point virtual address */ + bfd_size_type e_phoff; /* Program header table file offset */ + bfd_size_type e_shoff; /* Section header table file offset */ + unsigned long e_version; /* Identifies object file version */ + unsigned long e_flags; /* Processor-specific flags */ + unsigned short e_type; /* Identifies object file type */ + unsigned short e_machine; /* Specifies required architecture */ + unsigned int e_ehsize; /* ELF header size in bytes */ + unsigned int e_phentsize; /* Program header table entry size */ + unsigned int e_phnum; /* Program header table entry count */ + unsigned int e_shentsize; /* Section header table entry size */ + unsigned int e_shnum; /* Section header table entry count */ + unsigned int e_shstrndx; /* Section header string table index */ +} Elf_Internal_Ehdr; + +/* Program header */ + +struct elf_internal_phdr { + unsigned long p_type; /* Identifies program segment type */ + unsigned long p_flags; /* Segment flags */ + bfd_vma p_offset; /* Segment file offset */ + bfd_vma p_vaddr; /* Segment virtual address */ + bfd_vma p_paddr; /* Segment physical address */ + bfd_vma p_filesz; /* Segment size in file */ + bfd_vma p_memsz; /* Segment size in memory */ + bfd_vma p_align; /* Segment alignment, file & memory */ +}; + +typedef struct elf_internal_phdr Elf_Internal_Phdr; + +/* Section header */ + +typedef struct elf_internal_shdr { + unsigned int sh_name; /* Section name, index in string tbl */ + unsigned int sh_type; /* Type of section */ + bfd_vma sh_flags; /* Miscellaneous section attributes */ + bfd_vma sh_addr; /* Section virtual addr at execution */ + file_ptr sh_offset; /* Section file offset */ + bfd_size_type sh_size; /* Size of section in bytes */ + unsigned int sh_link; /* Index of another section */ + unsigned int sh_info; /* Additional section information */ + bfd_vma sh_addralign; /* Section alignment */ + bfd_size_type sh_entsize; /* Entry size if section holds table */ + + /* The internal rep also has some cached info associated with it. */ + asection * bfd_section; /* Associated BFD section. */ + unsigned char *contents; /* Section contents. */ +} Elf_Internal_Shdr; + +/* Compression header */ + +typedef struct elf_internal_chdr { + unsigned int ch_type; /* Type of compression */ + bfd_size_type ch_size; /* Size of uncompressed data in bytes */ + bfd_vma ch_addralign; /* Alignment of uncompressed data */ +} Elf_Internal_Chdr; + +/* Symbol table entry */ + +struct elf_internal_sym { + bfd_vma st_value; /* Value of the symbol */ + bfd_vma st_size; /* Associated symbol size */ + unsigned long st_name; /* Symbol name, index in string tbl */ + unsigned char st_info; /* Type and binding attributes */ + unsigned char st_other; /* Visibilty, and target specific */ + unsigned char st_target_internal; /* Internal-only information */ + unsigned int st_shndx; /* Associated section index */ +}; + +typedef struct elf_internal_sym Elf_Internal_Sym; + +/* Note segments */ + +typedef struct elf_internal_note { + unsigned long namesz; /* Size of entry's owner string */ + unsigned long descsz; /* Size of the note descriptor */ + unsigned long type; /* Interpretation of the descriptor */ + char * namedata; /* Start of the name+desc data */ + char * descdata; /* Start of the desc data */ + bfd_vma descpos; /* File offset of the descdata */ +} Elf_Internal_Note; + +/* Relocation Entries */ + +typedef struct elf_internal_rela { + bfd_vma r_offset; /* Location at which to apply the action */ + bfd_vma r_info; /* Index and Type of relocation */ + bfd_vma r_addend; /* Constant addend used to compute value */ +} Elf_Internal_Rela; + +/* dynamic section structure */ + +typedef struct elf_internal_dyn { + /* This needs to support 64-bit values in elf64. */ + bfd_vma d_tag; /* entry tag value */ + union { + /* This needs to support 64-bit values in elf64. */ + bfd_vma d_val; + bfd_vma d_ptr; + } d_un; +} Elf_Internal_Dyn; + +/* This structure appears in a SHT_GNU_verdef section. */ + +typedef struct elf_internal_verdef { + unsigned short vd_version; /* Version number of structure. */ + unsigned short vd_flags; /* Flags (VER_FLG_*). */ + unsigned short vd_ndx; /* Version index. */ + unsigned short vd_cnt; /* Number of verdaux entries. */ + unsigned long vd_hash; /* Hash of name. */ + unsigned long vd_aux; /* Offset to verdaux entries. */ + unsigned long vd_next; /* Offset to next verdef. */ + + /* These fields are set up when BFD reads in the structure. FIXME: + It would be cleaner to store these in a different structure. */ + bfd *vd_bfd; /* BFD. */ + const char *vd_nodename; /* Version name. */ + struct elf_internal_verdef *vd_nextdef; /* vd_next as pointer. */ + struct elf_internal_verdaux *vd_auxptr; /* vd_aux as pointer. */ + unsigned int vd_exp_refno; /* Used by the linker. */ +} Elf_Internal_Verdef; + +/* This structure appears in a SHT_GNU_verdef section. */ + +typedef struct elf_internal_verdaux { + unsigned long vda_name; /* String table offset of name. */ + unsigned long vda_next; /* Offset to next verdaux. */ + + /* These fields are set up when BFD reads in the structure. FIXME: + It would be cleaner to store these in a different structure. */ + const char *vda_nodename; /* vda_name as pointer. */ + struct elf_internal_verdaux *vda_nextptr; /* vda_next as pointer. */ +} Elf_Internal_Verdaux; + +/* This structure appears in a SHT_GNU_verneed section. */ + +typedef struct elf_internal_verneed { + unsigned short vn_version; /* Version number of structure. */ + unsigned short vn_cnt; /* Number of vernaux entries. */ + unsigned long vn_file; /* String table offset of library name. */ + unsigned long vn_aux; /* Offset to vernaux entries. */ + unsigned long vn_next; /* Offset to next verneed. */ + + /* These fields are set up when BFD reads in the structure. FIXME: + It would be cleaner to store these in a different structure. */ + bfd *vn_bfd; /* BFD. */ + const char *vn_filename; /* vn_file as pointer. */ + struct elf_internal_vernaux *vn_auxptr; /* vn_aux as pointer. */ + struct elf_internal_verneed *vn_nextref; /* vn_nextref as pointer. */ +} Elf_Internal_Verneed; + +/* This structure appears in a SHT_GNU_verneed section. */ + +typedef struct elf_internal_vernaux { + unsigned long vna_hash; /* Hash of dependency name. */ + unsigned short vna_flags; /* Flags (VER_FLG_*). */ + unsigned short vna_other; /* Unused. */ + unsigned long vna_name; /* String table offset to version name. */ + unsigned long vna_next; /* Offset to next vernaux. */ + + /* These fields are set up when BFD reads in the structure. FIXME: + It would be cleaner to store these in a different structure. */ + const char *vna_nodename; /* vna_name as pointer. */ + struct elf_internal_vernaux *vna_nextptr; /* vna_next as pointer. */ +} Elf_Internal_Vernaux; + +/* This structure appears in a SHT_GNU_versym section. This is not a + standard ELF structure; ELF just uses Elf32_Half. */ + +typedef struct elf_internal_versym { + unsigned short vs_vers; +} Elf_Internal_Versym; + +/* Structure for syminfo section. */ +typedef struct +{ + unsigned short int si_boundto; + unsigned short int si_flags; +} Elf_Internal_Syminfo; + +/* This structure appears on the stack and in NT_AUXV core file notes. */ +typedef struct +{ + bfd_vma a_type; + bfd_vma a_val; +} Elf_Internal_Auxv; + + +/* This structure is used to describe how sections should be assigned + to program segments. */ + +struct elf_segment_map +{ + /* Next program segment. */ + struct elf_segment_map *next; + /* Program segment type. */ + unsigned long p_type; + /* Program segment flags. */ + unsigned long p_flags; + /* Program segment physical address. */ + bfd_vma p_paddr; + /* Program segment virtual address offset from section vma. */ + bfd_vma p_vaddr_offset; + /* Program segment alignment. */ + bfd_vma p_align; + /* Segment size in file and memory */ + bfd_vma p_size; + /* Required size of filehdr + phdrs, if non-zero */ + bfd_vma header_size; + /* Whether the p_flags field is valid; if not, the flags are based + on the section flags. */ + unsigned int p_flags_valid : 1; + /* Whether the p_paddr field is valid; if not, the physical address + is based on the section lma values. */ + unsigned int p_paddr_valid : 1; + /* Whether the p_align field is valid; if not, PT_LOAD segment + alignment is based on the default maximum page size. */ + unsigned int p_align_valid : 1; + /* Whether the p_size field is valid; if not, the size are based + on the section sizes. */ + unsigned int p_size_valid : 1; + /* Whether this segment includes the file header. */ + unsigned int includes_filehdr : 1; + /* Whether this segment includes the program headers. */ + unsigned int includes_phdrs : 1; + /* Number of sections (may be 0). */ + unsigned int count; + /* Sections. Actual number of elements is in count field. */ + asection *sections[1]; +}; + +/* .tbss is special. It doesn't contribute memory space to normal + segments and it doesn't take file space in normal segments. */ +#define ELF_TBSS_SPECIAL(sec_hdr, segment) \ + (((sec_hdr)->sh_flags & SHF_TLS) != 0 \ + && (sec_hdr)->sh_type == SHT_NOBITS \ + && (segment)->p_type != PT_TLS) + +#define ELF_SECTION_SIZE(sec_hdr, segment) \ + (ELF_TBSS_SPECIAL(sec_hdr, segment) ? 0 : (sec_hdr)->sh_size) + +/* Decide if the section SEC_HDR is in SEGMENT. If CHECK_VMA, then + VMAs are checked for alloc sections. If STRICT, then a zero size + section won't match at the end of a segment, unless the segment + is also zero size. Regardless of STRICT and CHECK_VMA, zero size + sections won't match at the start or end of PT_DYNAMIC, unless + PT_DYNAMIC is itself zero sized. */ +#define ELF_SECTION_IN_SEGMENT_1(sec_hdr, segment, check_vma, strict) \ + ((/* Only PT_LOAD, PT_GNU_RELRO and PT_TLS segments can contain \ + SHF_TLS sections. */ \ + ((((sec_hdr)->sh_flags & SHF_TLS) != 0) \ + && ((segment)->p_type == PT_TLS \ + || (segment)->p_type == PT_GNU_RELRO \ + || (segment)->p_type == PT_LOAD)) \ + /* PT_TLS segment contains only SHF_TLS sections, PT_PHDR no \ + sections at all. */ \ + || (((sec_hdr)->sh_flags & SHF_TLS) == 0 \ + && (segment)->p_type != PT_TLS \ + && (segment)->p_type != PT_PHDR)) \ + /* PT_LOAD and similar segments only have SHF_ALLOC sections. */ \ + && !(((sec_hdr)->sh_flags & SHF_ALLOC) == 0 \ + && ((segment)->p_type == PT_LOAD \ + || (segment)->p_type == PT_DYNAMIC \ + || (segment)->p_type == PT_GNU_EH_FRAME \ + || (segment)->p_type == PT_GNU_RELRO \ + || (segment)->p_type == PT_GNU_STACK)) \ + /* Any section besides one of type SHT_NOBITS must have file \ + offsets within the segment. */ \ + && ((sec_hdr)->sh_type == SHT_NOBITS \ + || ((bfd_vma) (sec_hdr)->sh_offset >= (segment)->p_offset \ + && (!(strict) \ + || ((sec_hdr)->sh_offset - (segment)->p_offset \ + <= (segment)->p_filesz - 1)) \ + && (((sec_hdr)->sh_offset - (segment)->p_offset \ + + ELF_SECTION_SIZE(sec_hdr, segment)) \ + <= (segment)->p_filesz))) \ + /* SHF_ALLOC sections must have VMAs within the segment. */ \ + && (!(check_vma) \ + || ((sec_hdr)->sh_flags & SHF_ALLOC) == 0 \ + || ((sec_hdr)->sh_addr >= (segment)->p_vaddr \ + && (!(strict) \ + || ((sec_hdr)->sh_addr - (segment)->p_vaddr \ + <= (segment)->p_memsz - 1)) \ + && (((sec_hdr)->sh_addr - (segment)->p_vaddr \ + + ELF_SECTION_SIZE(sec_hdr, segment)) \ + <= (segment)->p_memsz))) \ + /* No zero size sections at start or end of PT_DYNAMIC. */ \ + && ((segment)->p_type != PT_DYNAMIC \ + || (sec_hdr)->sh_size != 0 \ + || (segment)->p_memsz == 0 \ + || (((sec_hdr)->sh_type == SHT_NOBITS \ + || ((bfd_vma) (sec_hdr)->sh_offset > (segment)->p_offset \ + && ((sec_hdr)->sh_offset - (segment)->p_offset \ + < (segment)->p_filesz))) \ + && (((sec_hdr)->sh_flags & SHF_ALLOC) == 0 \ + || ((sec_hdr)->sh_addr > (segment)->p_vaddr \ + && ((sec_hdr)->sh_addr - (segment)->p_vaddr \ + < (segment)->p_memsz)))))) + +#define ELF_SECTION_IN_SEGMENT(sec_hdr, segment) \ + (ELF_SECTION_IN_SEGMENT_1 (sec_hdr, segment, 1, 0)) + +#define ELF_SECTION_IN_SEGMENT_STRICT(sec_hdr, segment) \ + (ELF_SECTION_IN_SEGMENT_1 (sec_hdr, segment, 1, 1)) + +#endif /* _ELF_INTERNAL_H */ diff --git a/support/sdbinutils/include/elf/ip2k.h b/support/sdbinutils/include/elf/ip2k.h new file mode 100644 index 0000000..63620b8 --- /dev/null +++ b/support/sdbinutils/include/elf/ip2k.h @@ -0,0 +1,62 @@ +/* IP2xxx ELF support for BFD. + Copyright (C) 2000-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_IP2K_H +#define _ELF_IP2K_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_ip2k_reloc_type) + RELOC_NUMBER (R_IP2K_NONE, 0) + RELOC_NUMBER (R_IP2K_16, 1) + RELOC_NUMBER (R_IP2K_32, 2) + RELOC_NUMBER (R_IP2K_FR9, 3) + RELOC_NUMBER (R_IP2K_BANK, 4) + RELOC_NUMBER (R_IP2K_ADDR16CJP, 5) + RELOC_NUMBER (R_IP2K_PAGE3, 6) + RELOC_NUMBER (R_IP2K_LO8DATA, 7) + RELOC_NUMBER (R_IP2K_HI8DATA, 8) + RELOC_NUMBER (R_IP2K_LO8INSN, 9) + RELOC_NUMBER (R_IP2K_HI8INSN, 10) + RELOC_NUMBER (R_IP2K_PC_SKIP, 11) + RELOC_NUMBER (R_IP2K_TEXT, 12) + RELOC_NUMBER (R_IP2K_FR_OFFSET, 13) + RELOC_NUMBER (R_IP2K_EX8DATA, 14) +END_RELOC_NUMBERS(R_IP2K_max) + + +/* Define the data & instruction memory discriminator. In a linked + executable, an symbol should be deemed to point to an instruction + if ((address & IP2K_INSN_MASK) == IP2K_INSN_VALUE), and similarly + for the data space. See also `ld/emulparams/elf32ip2k.sh'. */ +/* ??? Consider extending the _MASK values to include all the + intermediate bits that must be zero due to the limited physical + memory size on the IP2K. */ + +#define IP2K_DATA_MASK 0xff000000 +#define IP2K_DATA_VALUE 0x01000000 +#define IP2K_INSN_MASK 0xff000000 +#define IP2K_INSN_VALUE 0x02000000 + +/* The location of the memory mapped hardware stack. */ +#define IP2K_STACK_VALUE 0x0f000000 +#define IP2K_STACK_SIZE 0x20 + +#endif /* _ELF_IP2K_H */ diff --git a/support/sdbinutils/include/elf/iq2000.h b/support/sdbinutils/include/elf/iq2000.h new file mode 100644 index 0000000..79128b0 --- /dev/null +++ b/support/sdbinutils/include/elf/iq2000.h @@ -0,0 +1,58 @@ +/* IQ2000 ELF support for BFD. + Copyright (C) 2002-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_IQ2000_H +#define _ELF_IQ2000_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_iq2000_reloc_type) + RELOC_NUMBER (R_IQ2000_NONE, 0) + RELOC_NUMBER (R_IQ2000_16, 1) + RELOC_NUMBER (R_IQ2000_32, 2) + RELOC_NUMBER (R_IQ2000_26, 3) + RELOC_NUMBER (R_IQ2000_PC16, 4) + RELOC_NUMBER (R_IQ2000_HI16, 5) + RELOC_NUMBER (R_IQ2000_LO16, 6) + RELOC_NUMBER (R_IQ2000_OFFSET_16, 7) + RELOC_NUMBER (R_IQ2000_OFFSET_21, 8) + RELOC_NUMBER (R_IQ2000_UHI16, 9) + RELOC_NUMBER (R_IQ2000_32_DEBUG, 10) + RELOC_NUMBER (R_IQ2000_GNU_VTINHERIT, 200) + RELOC_NUMBER (R_IQ2000_GNU_VTENTRY, 201) +END_RELOC_NUMBERS(R_IQ2000_max) + +#define EF_IQ2000_CPU_IQ2000 0x00000001 /* default */ +#define EF_IQ2000_CPU_IQ10 0x00000002 /* IQ10 */ +#define EF_IQ2000_CPU_MASK 0x00000003 /* specific cpu bits */ +#define EF_IQ2000_ALL_FLAGS (EF_IQ2000_CPU_MASK) + +/* Define the data & instruction memory discriminator. In a linked + executable, an symbol should be deemed to point to an instruction + if ((address & IQ2000_INSN_MASK) == IQ2000_INSN_VALUE), and similarly + for the data space. */ + +#define IQ2000_DATA_MASK 0x80000000 +#define IQ2000_DATA_VALUE 0x00000000 +#define IQ2000_INSN_MASK 0x80000000 +#define IQ2000_INSN_VALUE 0x80000000 + + +#endif /* _ELF_IQ2000_H */ diff --git a/support/sdbinutils/include/elf/lm32.h b/support/sdbinutils/include/elf/lm32.h new file mode 100644 index 0000000..1702f0c --- /dev/null +++ b/support/sdbinutils/include/elf/lm32.h @@ -0,0 +1,56 @@ +/* Lattice Mico32 ELF support for BFD. + Copyright (C) 2008-2018 Free Software Foundation, Inc. + Contributed by Jon Beniston + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_LM32_H +#define _ELF_LM32_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_lm32_reloc_type) + RELOC_NUMBER (R_LM32_NONE, 0) + RELOC_NUMBER (R_LM32_8, 1) + RELOC_NUMBER (R_LM32_16, 2) + RELOC_NUMBER (R_LM32_32, 3) + RELOC_NUMBER (R_LM32_HI16, 4) + RELOC_NUMBER (R_LM32_LO16, 5) + RELOC_NUMBER (R_LM32_GPREL16, 6) + RELOC_NUMBER (R_LM32_CALL, 7) + RELOC_NUMBER (R_LM32_BRANCH, 8) + RELOC_NUMBER (R_LM32_GNU_VTINHERIT, 9) + RELOC_NUMBER (R_LM32_GNU_VTENTRY, 10) + RELOC_NUMBER (R_LM32_16_GOT, 11) + RELOC_NUMBER (R_LM32_GOTOFF_HI16, 12) + RELOC_NUMBER (R_LM32_GOTOFF_LO16, 13) + RELOC_NUMBER (R_LM32_COPY, 14) + RELOC_NUMBER (R_LM32_GLOB_DAT, 15) + RELOC_NUMBER (R_LM32_JMP_SLOT, 16) + RELOC_NUMBER (R_LM32_RELATIVE, 17) +END_RELOC_NUMBERS (R_LM32_max) + +/* Processor specific flags for the ELF header e_flags field. */ + +#define EF_LM32_MACH 0x00000001 + +/* Various CPU types. */ + +#define E_LM32_MACH 0x1 + +#endif /* _ELF_LM32_H */ diff --git a/support/sdbinutils/include/elf/m32c.h b/support/sdbinutils/include/elf/m32c.h new file mode 100644 index 0000000..ec7d109 --- /dev/null +++ b/support/sdbinutils/include/elf/m32c.h @@ -0,0 +1,67 @@ +/* M32C ELF support for BFD. + Copyright (C) 2004-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_M32C_H +#define _ELF_M32C_H + +#include "elf/reloc-macros.h" + + /* Relocations. */ + START_RELOC_NUMBERS (elf_m32c_reloc_type) + RELOC_NUMBER (R_M32C_NONE, 0) + RELOC_NUMBER (R_M32C_16, 1) + RELOC_NUMBER (R_M32C_24, 2) + RELOC_NUMBER (R_M32C_32, 3) + RELOC_NUMBER (R_M32C_8_PCREL, 4) + RELOC_NUMBER (R_M32C_16_PCREL, 5) + + /* 8 bit unsigned address, used for dsp8[a0] etc */ + RELOC_NUMBER (R_M32C_8, 6) + /* Bits 0..15 of an address, for SMOVF's A0, A1A0, etc. */ + RELOC_NUMBER (R_M32C_LO16, 7) + /* Bits 16..23 of an address, for SMOVF's R1H etc. */ + RELOC_NUMBER (R_M32C_HI8, 8) + /* Bits 16..31 of an address, for LDE's A1A0 etc. */ + RELOC_NUMBER (R_M32C_HI16, 9) + + /* These are relocs we need when relaxing. */ + /* Marks various jump opcodes. */ + RELOC_NUMBER (R_M32C_RL_JUMP, 10) + /* Marks standard one-address form. */ + RELOC_NUMBER (R_M32C_RL_1ADDR, 11) + /* Marks standard two-address form. */ + RELOC_NUMBER (R_M32C_RL_2ADDR, 12) + + END_RELOC_NUMBERS (R_M32C_max) + +#define EF_M32C_CPU_M16C 0x00000075 /* default */ +#define EF_M32C_CPU_M32C 0x00000078 /* m32c */ +#define EF_M32C_CPU_MASK 0x0000007F /* specific cpu bits */ +#define EF_M32C_ALL_FLAGS (EF_M32C_CPU_MASK) + +/* Define the data & instruction memory discriminator. In a linked + executable, an symbol should be deemed to point to an instruction + if ((address & M16C_INSN_MASK) == M16C_INSN_VALUE), and similarly + for the data space. See also `ld/emulparams/elf32m32c.sh'. */ +#define M32C_DATA_MASK 0xffc00000 +#define M32C_DATA_VALUE 0x00000000 +#define M32C_INSN_MASK 0xffc00000 +#define M32C_INSN_VALUE 0x00400000 + +#endif /* _ELF_M32C_H */ diff --git a/support/sdbinutils/include/elf/m32r.h b/support/sdbinutils/include/elf/m32r.h new file mode 100644 index 0000000..68e7df8 --- /dev/null +++ b/support/sdbinutils/include/elf/m32r.h @@ -0,0 +1,122 @@ +/* M32R ELF support for BFD. + Copyright (C) 1996-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_M32R_H +#define _ELF_M32R_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_m32r_reloc_type) + RELOC_NUMBER (R_M32R_NONE, 0) + /* REL relocations */ + RELOC_NUMBER (R_M32R_16, 1) /* For backwards compatibility. */ + RELOC_NUMBER (R_M32R_32, 2) /* For backwards compatibility. */ + RELOC_NUMBER (R_M32R_24, 3) /* For backwards compatibility. */ + RELOC_NUMBER (R_M32R_10_PCREL, 4) /* For backwards compatibility. */ + RELOC_NUMBER (R_M32R_18_PCREL, 5) /* For backwards compatibility. */ + RELOC_NUMBER (R_M32R_26_PCREL, 6) /* For backwards compatibility. */ + RELOC_NUMBER (R_M32R_HI16_ULO, 7) /* For backwards compatibility. */ + RELOC_NUMBER (R_M32R_HI16_SLO, 8) /* For backwards compatibility. */ + RELOC_NUMBER (R_M32R_LO16, 9) /* For backwards compatibility. */ + RELOC_NUMBER (R_M32R_SDA16, 10) /* For backwards compatibility. */ + RELOC_NUMBER (R_M32R_GNU_VTINHERIT, 11)/* For backwards compatibility. */ + RELOC_NUMBER (R_M32R_GNU_VTENTRY, 12) /* For backwards compatibility. */ + + /* RELA relocations */ + RELOC_NUMBER (R_M32R_16_RELA, 33) + RELOC_NUMBER (R_M32R_32_RELA, 34) + RELOC_NUMBER (R_M32R_24_RELA, 35) + RELOC_NUMBER (R_M32R_10_PCREL_RELA, 36) + RELOC_NUMBER (R_M32R_18_PCREL_RELA, 37) + RELOC_NUMBER (R_M32R_26_PCREL_RELA, 38) + RELOC_NUMBER (R_M32R_HI16_ULO_RELA, 39) + RELOC_NUMBER (R_M32R_HI16_SLO_RELA, 40) + RELOC_NUMBER (R_M32R_LO16_RELA, 41) + RELOC_NUMBER (R_M32R_SDA16_RELA, 42) + RELOC_NUMBER (R_M32R_RELA_GNU_VTINHERIT, 43) + RELOC_NUMBER (R_M32R_RELA_GNU_VTENTRY, 44) + + RELOC_NUMBER (R_M32R_REL32, 45) + + RELOC_NUMBER (R_M32R_GOT24, 48) + RELOC_NUMBER (R_M32R_26_PLTREL, 49) + RELOC_NUMBER (R_M32R_COPY, 50) + RELOC_NUMBER (R_M32R_GLOB_DAT, 51) + RELOC_NUMBER (R_M32R_JMP_SLOT, 52) + RELOC_NUMBER (R_M32R_RELATIVE, 53) + RELOC_NUMBER (R_M32R_GOTOFF, 54) + RELOC_NUMBER (R_M32R_GOTPC24, 55) + RELOC_NUMBER (R_M32R_GOT16_HI_ULO, 56) + RELOC_NUMBER (R_M32R_GOT16_HI_SLO, 57) + RELOC_NUMBER (R_M32R_GOT16_LO, 58) + RELOC_NUMBER (R_M32R_GOTPC_HI_ULO, 59) + RELOC_NUMBER (R_M32R_GOTPC_HI_SLO, 60) + RELOC_NUMBER (R_M32R_GOTPC_LO, 61) + RELOC_NUMBER (R_M32R_GOTOFF_HI_ULO, 62) + RELOC_NUMBER (R_M32R_GOTOFF_HI_SLO, 63) + RELOC_NUMBER (R_M32R_GOTOFF_LO, 64) + +END_RELOC_NUMBERS (R_M32R_max) + +/* Processor specific section indices. These sections do not actually + exist. Symbols with a st_shndx field corresponding to one of these + values have a special meaning. */ + +/* Small common symbol. */ +#define SHN_M32R_SCOMMON SHN_LORESERVE + +/* Processor specific section flags. */ + +/* This section contains sufficient relocs to be relaxed. + When relaxing, even relocs of branch instructions the assembler could + complete must be present because relaxing may cause the branch target to + move. */ +#define SHF_M32R_CAN_RELAX 0x10000000 + +/* Processor specific flags for the ELF header e_flags field. */ + +/* Two bit m32r architecture field. */ +#define EF_M32R_ARCH 0x30000000 + +/* m32r code. */ +#define E_M32R_ARCH 0x00000000 +/* m32rx code. */ +#define E_M32RX_ARCH 0x10000000 +/* m32r2 code. */ +#define E_M32R2_ARCH 0x20000000 + +/* 12 bit m32r new instructions field. */ +#define EF_M32R_INST 0x0FFF0000 +/* Parallel instructions. */ +#define E_M32R_HAS_PARALLEL 0x00010000 +/* Hidden instructions for m32rx: + jc, jnc, macwhi-a, macwlo-a, mulwhi-a, mulwlo-a, sth+, shb+, sat, pcmpbz, + sc, snc. */ +#define E_M32R_HAS_HIDDEN_INST 0x00020000 +/* New bit instructions: + clrpsw, setpsw, bset, bclr, btst. */ +#define E_M32R_HAS_BIT_INST 0x00040000 +/* Floating point instructions. */ +#define E_M32R_HAS_FLOAT_INST 0x00080000 + +/* 4 bit m32r ignore to check field. */ +#define EF_M32R_IGNORE 0x0000000F + +#endif diff --git a/support/sdbinutils/include/elf/m68hc11.h b/support/sdbinutils/include/elf/m68hc11.h new file mode 100644 index 0000000..bb191ef --- /dev/null +++ b/support/sdbinutils/include/elf/m68hc11.h @@ -0,0 +1,107 @@ +/* m68hc11 & m68hc12 ELF support for BFD. + Copyright (C) 1999-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_M68HC11_H +#define _ELF_M68HC11_H + +#include "elf/reloc-macros.h" + +/* Relocation types. */ +START_RELOC_NUMBERS (elf_m68hc11_reloc_type) + RELOC_NUMBER (R_M68HC11_NONE, 0) + RELOC_NUMBER (R_M68HC11_8, 1) + RELOC_NUMBER (R_M68HC11_HI8, 2) + RELOC_NUMBER (R_M68HC11_LO8, 3) + RELOC_NUMBER (R_M68HC11_PCREL_8, 4) + RELOC_NUMBER (R_M68HC11_16, 5) + RELOC_NUMBER (R_M68HC11_32, 6) + RELOC_NUMBER (R_M68HC11_3B, 7) + RELOC_NUMBER (R_M68HC11_PCREL_16, 8) + + /* These are GNU extensions to enable C++ vtable garbage collection. */ + RELOC_NUMBER (R_M68HC11_GNU_VTINHERIT, 9) + RELOC_NUMBER (R_M68HC11_GNU_VTENTRY, 10) + + RELOC_NUMBER (R_M68HC11_24, 11) + RELOC_NUMBER (R_M68HC11_LO16, 12) + RELOC_NUMBER (R_M68HC11_PAGE, 13) + + RELOC_NUMBER (R_M68HC12_16B, 15) + RELOC_NUMBER (R_M68HC12_PCREL_9, 16) + RELOC_NUMBER (R_M68HC12_PCREL_10, 17) + RELOC_NUMBER (R_M68HC12_HI8XG, 18) + RELOC_NUMBER (R_M68HC12_LO8XG, 19) + + /* GNU extension for linker relaxation. + Mark beginning of a jump instruction (any form). */ + RELOC_NUMBER (R_M68HC11_RL_JUMP, 20) + + /* Mark beginning of Gcc relaxation group instruction. */ + RELOC_NUMBER (R_M68HC11_RL_GROUP, 21) +END_RELOC_NUMBERS (R_M68HC11_max) + +/* Processor specific flags for the ELF header e_flags field. */ + +/* ABI identification. */ +#define EF_M68HC11_ABI 0x00000000F + +/* Integers are 32-bit long. */ +#define E_M68HC11_I32 0x000000001 + +/* Doubles are 64-bit long. */ +#define E_M68HC11_F64 0x000000002 + +/* Uses 68HC12 memory banks. */ +#define E_M68HC12_BANKS 0x000000004 + +/* XGATE ram offsetting. */ +#define E_M68HC11_XGATE_RAMOFFSET 0x000000100 + +/* Suppress warnings */ +#define E_M68HC11_NO_BANK_WARNING 0x000000200 + +#define EF_M68HC11_MACH_MASK 0xF0 +#define EF_M68HC11_GENERIC 0x00 /* Generic 68HC12/backward compatibility. */ +#define EF_M68HC12_MACH 0x10 /* 68HC12 microcontroller. */ +#define EF_M68HCS12_MACH 0x20 /* 68HCS12 microcontroller. */ +#define EF_M68HC11_MACH(mach) ((mach) & EF_M68HC11_MACH_MASK) + +/* True if we can merge machines. A generic HC12 can work on any proc + but once we have specific code, merge is not possible. */ +#define EF_M68HC11_CAN_MERGE_MACH(mach1, mach2) \ + ((EF_M68HC11_MACH (mach1) == EF_M68HC11_MACH (mach2)) \ + || (EF_M68HC11_MACH (mach1) == EF_M68HC11_GENERIC) \ + || (EF_M68HC11_MACH (mach2) == EF_M68HC11_GENERIC)) + +#define EF_M68HC11_MERGE_MACH(mach1, mach2) \ + (((EF_M68HC11_MACH (mach1) == EF_M68HC11_MACH (mach2)) \ + || (EF_M68HC11_MACH (mach1) == EF_M68HC11_GENERIC)) ? \ + EF_M68HC11_MACH (mach2) : EF_M68HC11_MACH (mach1)) + + +/* Special values for the st_other field in the symbol table. These + are used for 68HC12 to identify far functions (must be called with + 'call' and returns with 'rtc'). */ +#define STO_M68HC12_FAR 0x80 + +/* Identify interrupt handlers. This is used by the debugger to + correctly compute the stack frame. */ +#define STO_M68HC12_INTERRUPT 0x40 + +#endif diff --git a/support/sdbinutils/include/elf/m68k.h b/support/sdbinutils/include/elf/m68k.h new file mode 100644 index 0000000..31a4cc9 --- /dev/null +++ b/support/sdbinutils/include/elf/m68k.h @@ -0,0 +1,101 @@ +/* MC68k ELF support for BFD. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_M68K_H +#define _ELF_M68K_H + +#include "elf/reloc-macros.h" + +/* Relocation types. */ +START_RELOC_NUMBERS (elf_m68k_reloc_type) + RELOC_NUMBER (R_68K_NONE, 0) /* No reloc */ + RELOC_NUMBER (R_68K_32, 1) /* Direct 32 bit */ + RELOC_NUMBER (R_68K_16, 2) /* Direct 16 bit */ + RELOC_NUMBER (R_68K_8, 3) /* Direct 8 bit */ + RELOC_NUMBER (R_68K_PC32, 4) /* PC relative 32 bit */ + RELOC_NUMBER (R_68K_PC16, 5) /* PC relative 16 bit */ + RELOC_NUMBER (R_68K_PC8, 6) /* PC relative 8 bit */ + RELOC_NUMBER (R_68K_GOT32, 7) /* 32 bit PC relative GOT entry */ + RELOC_NUMBER (R_68K_GOT16, 8) /* 16 bit PC relative GOT entry */ + RELOC_NUMBER (R_68K_GOT8, 9) /* 8 bit PC relative GOT entry */ + RELOC_NUMBER (R_68K_GOT32O, 10) /* 32 bit GOT offset */ + RELOC_NUMBER (R_68K_GOT16O, 11) /* 16 bit GOT offset */ + RELOC_NUMBER (R_68K_GOT8O, 12) /* 8 bit GOT offset */ + RELOC_NUMBER (R_68K_PLT32, 13) /* 32 bit PC relative PLT address */ + RELOC_NUMBER (R_68K_PLT16, 14) /* 16 bit PC relative PLT address */ + RELOC_NUMBER (R_68K_PLT8, 15) /* 8 bit PC relative PLT address */ + RELOC_NUMBER (R_68K_PLT32O, 16) /* 32 bit PLT offset */ + RELOC_NUMBER (R_68K_PLT16O, 17) /* 16 bit PLT offset */ + RELOC_NUMBER (R_68K_PLT8O, 18) /* 8 bit PLT offset */ + RELOC_NUMBER (R_68K_COPY, 19) /* Copy symbol at runtime */ + RELOC_NUMBER (R_68K_GLOB_DAT, 20) /* Create GOT entry */ + RELOC_NUMBER (R_68K_JMP_SLOT, 21) /* Create PLT entry */ + RELOC_NUMBER (R_68K_RELATIVE, 22) /* Adjust by program base */ + /* These are GNU extensions to enable C++ vtable garbage collection. */ + RELOC_NUMBER (R_68K_GNU_VTINHERIT, 23) + RELOC_NUMBER (R_68K_GNU_VTENTRY, 24) + /* TLS static relocations. */ + RELOC_NUMBER (R_68K_TLS_GD32, 25) + RELOC_NUMBER (R_68K_TLS_GD16, 26) + RELOC_NUMBER (R_68K_TLS_GD8, 27) + RELOC_NUMBER (R_68K_TLS_LDM32, 28) + RELOC_NUMBER (R_68K_TLS_LDM16, 29) + RELOC_NUMBER (R_68K_TLS_LDM8, 30) + RELOC_NUMBER (R_68K_TLS_LDO32, 31) + RELOC_NUMBER (R_68K_TLS_LDO16, 32) + RELOC_NUMBER (R_68K_TLS_LDO8, 33) + RELOC_NUMBER (R_68K_TLS_IE32, 34) + RELOC_NUMBER (R_68K_TLS_IE16, 35) + RELOC_NUMBER (R_68K_TLS_IE8, 36) + RELOC_NUMBER (R_68K_TLS_LE32, 37) + RELOC_NUMBER (R_68K_TLS_LE16, 38) + RELOC_NUMBER (R_68K_TLS_LE8, 39) + RELOC_NUMBER (R_68K_TLS_DTPMOD32, 40) + RELOC_NUMBER (R_68K_TLS_DTPREL32, 41) + RELOC_NUMBER (R_68K_TLS_TPREL32, 42) +END_RELOC_NUMBERS (R_68K_max) + +/* We use the top 24 bits to encode information about the + architecture variant. */ +#define EF_M68K_CPU32 0x00810000 +#define EF_M68K_M68000 0x01000000 +#define EF_M68K_CFV4E 0x00008000 +#define EF_M68K_FIDO 0x02000000 +#define EF_M68K_ARCH_MASK \ + (EF_M68K_M68000 | EF_M68K_CPU32 | EF_M68K_CFV4E | EF_M68K_FIDO) + +/* We use the bottom 8 bits to encode information about the + coldfire variant. If we use any of these bits, the top 24 bits are + either 0 or EF_M68K_CFV4E. */ +#define EF_M68K_CF_ISA_MASK 0x0F /* Which ISA */ +#define EF_M68K_CF_ISA_A_NODIV 0x01 /* ISA A except for div */ +#define EF_M68K_CF_ISA_A 0x02 +#define EF_M68K_CF_ISA_A_PLUS 0x03 +#define EF_M68K_CF_ISA_B_NOUSP 0x04 /* ISA_B except for USP */ +#define EF_M68K_CF_ISA_B 0x05 +#define EF_M68K_CF_ISA_C 0x06 +#define EF_M68K_CF_ISA_C_NODIV 0x07 /* ISA C except for div */ +#define EF_M68K_CF_MAC_MASK 0x30 +#define EF_M68K_CF_MAC 0x10 /* MAC */ +#define EF_M68K_CF_EMAC 0x20 /* EMAC */ +#define EF_M68K_CF_EMAC_B 0x30 /* EMAC_B */ +#define EF_M68K_CF_FLOAT 0x40 /* Has float insns */ +#define EF_M68K_CF_MASK 0xFF + +#endif diff --git a/support/sdbinutils/include/elf/mcore.h b/support/sdbinutils/include/elf/mcore.h new file mode 100644 index 0000000..567665d --- /dev/null +++ b/support/sdbinutils/include/elf/mcore.h @@ -0,0 +1,47 @@ +/* Motorola MCore support for BFD. + Copyright (C) 1995-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file holds definitions specific to the MCore ELF ABI. */ +#ifndef _ELF_MORE_H +#define _ELF_MORE_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_mcore_reloc_type) + RELOC_NUMBER (R_MCORE_NONE, 0) + RELOC_NUMBER (R_MCORE_ADDR32, 1) + RELOC_NUMBER (R_MCORE_PCRELIMM8BY4, 2) + RELOC_NUMBER (R_MCORE_PCRELIMM11BY2, 3) + RELOC_NUMBER (R_MCORE_PCRELIMM4BY2, 4) + RELOC_NUMBER (R_MCORE_PCREL32, 5) + RELOC_NUMBER (R_MCORE_PCRELJSR_IMM11BY2, 6) + RELOC_NUMBER (R_MCORE_GNU_VTINHERIT, 7) + RELOC_NUMBER (R_MCORE_GNU_VTENTRY, 8) + RELOC_NUMBER (R_MCORE_RELATIVE, 9) + RELOC_NUMBER (R_MCORE_COPY, 10) + RELOC_NUMBER (R_MCORE_GLOB_DAT, 11) + RELOC_NUMBER (R_MCORE_JUMP_SLOT, 12) +END_RELOC_NUMBERS (R_MCORE_max) + +/* Section Attributes. */ +#define SHF_MCORE_NOREAD 0x80000000 + +#endif /* _ELF_MCORE_H */ diff --git a/support/sdbinutils/include/elf/mep.h b/support/sdbinutils/include/elf/mep.h new file mode 100644 index 0000000..79cc63c --- /dev/null +++ b/support/sdbinutils/include/elf/mep.h @@ -0,0 +1,90 @@ +/* Toshiba MeP ELF support for BFD. + Copyright (C) 2001-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_MEP_H +#define _ELF_MEP_H + +/* Bits in the sh_flags field of Elf32_Shdr: */ + +#define SHF_MEP_VLIW 0x10000000 /* contains vliw code */ + +#include "elf/reloc-macros.h" + +/* Note: The comments in this file are used by bfd/mep-relocs.pl to + build parts of bfd/elf32-mep.c. */ + +/* Relocations. */ +START_RELOC_NUMBERS (elf_mep_reloc_type) + + /* These two must appear first so that they are not processed by bfd/mep-relocs.pl. */ + RELOC_NUMBER (R_MEP_NONE, 0) + RELOC_NUMBER (R_RELC, 1) + + RELOC_NUMBER (R_MEP_8, 2) /* 7654 3210 U */ + RELOC_NUMBER (R_MEP_16, 3) /* fedc ba98 7654 3210 U */ + RELOC_NUMBER (R_MEP_32, 4) /* vuts rqpo nmlk jihg fedc ba98 7654 3210 U */ + + RELOC_NUMBER (R_MEP_PCREL8A2, 5) /* ---- ---- 7654 321- S PC-REL */ + RELOC_NUMBER (R_MEP_PCREL12A2, 6) /* ---- ba98 7654 321- S PC-REL */ + RELOC_NUMBER (R_MEP_PCREL17A2, 7) /* ---- ---- ---- ---- gfed cba9 8765 4321 S PC-REL */ + RELOC_NUMBER (R_MEP_PCREL24A2, 8) /* ---- -765 4321 ---- nmlk jihg fedc ba98 S PC-REL */ + RELOC_NUMBER (R_MEP_PCABS24A2, 9) /* ---- -765 4321 ---- nmlk jihg fedc ba98 U */ + + RELOC_NUMBER (R_MEP_LOW16, 10) /* ---- ---- ---- ---- fedc ba98 7654 3210 U no-overflow */ + RELOC_NUMBER (R_MEP_HI16U, 11) /* ---- ---- ---- ---- vuts rqpo nmlk jihg U no-overflow */ + RELOC_NUMBER (R_MEP_HI16S, 12) /* ---- ---- ---- ---- vuts rqpo nmlk jihg S no-overflow */ + RELOC_NUMBER (R_MEP_GPREL, 13) /* ---- ---- ---- ---- fedc ba98 7654 3210 S GP-REL*/ + RELOC_NUMBER (R_MEP_TPREL, 14) /* ---- ---- ---- ---- fedc ba98 7654 3210 S TP-REL*/ + + RELOC_NUMBER (R_MEP_TPREL7, 15) /* ---- ---- -654 3210 U TP-REL */ + RELOC_NUMBER (R_MEP_TPREL7A2, 16) /* ---- ---- -654 321- U TP-REL */ + RELOC_NUMBER (R_MEP_TPREL7A4, 17) /* ---- ---- -654 32-- U TP-REL */ + + RELOC_NUMBER (R_MEP_UIMM24, 18) /* ---- ---- 7654 3210 nmlk jihg fedc ba98 U */ + RELOC_NUMBER (R_MEP_ADDR24A4, 19) /* ---- ---- 7654 32-- nmlk jihg fedc ba98 U */ + + RELOC_NUMBER (R_MEP_GNU_VTINHERIT, 20) /* ---- ---- ---- ---- U no-overflow */ + RELOC_NUMBER (R_MEP_GNU_VTENTRY, 21) /* ---- ---- ---- ---- U no-overflow */ + +END_RELOC_NUMBERS(R_MEP_max) + +#define EF_MEP_CPU_MASK 0xff000000 /* specific cpu bits */ +#define EF_MEP_CPU_MEP 0x00000000 /* generic MEP */ +#define EF_MEP_CPU_C2 0x01000000 /* MEP c2 */ +#define EF_MEP_CPU_C3 0x02000000 /* MEP c3 */ +#define EF_MEP_CPU_C4 0x04000000 /* MEP c4 */ +/* 5..7 are reseved */ +#define EF_MEP_CPU_C5 0x08000000 /* MEP c5 */ +#define EF_MEP_CPU_H1 0x10000000 /* MEP h1 */ + +#define EF_MEP_COP_MASK 0x00ff0000 +#define EF_MEP_COP_NONE 0x00000000 +#define EF_MEP_COP_AVC 0x00010000 +#define EF_MEP_COP_AVC2 0x00020000 +#define EF_MEP_COP_FMAX 0x00030000 +/* 4..5 are reserved. */ +#define EF_MEP_COP_IVC2 0x00060000 + +#define EF_MEP_LIBRARY 0x00000100 /* Built as a library */ + +#define EF_MEP_INDEX_MASK 0x000000ff /* Configuration index */ + +#define EF_MEP_ALL_FLAGS 0xffff01ff + +#endif /* _ELF_MEP_H */ diff --git a/support/sdbinutils/include/elf/metag.h b/support/sdbinutils/include/elf/metag.h new file mode 100644 index 0000000..f769f97 --- /dev/null +++ b/support/sdbinutils/include/elf/metag.h @@ -0,0 +1,91 @@ +/* Meta ELF support for BFD. + Copyright (C) 2013-2018 Free Software Foundation, Inc. + Contributed by Imagination Technologies Ltd. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_METAG_H +#define _ELF_METAG_H + +#include "elf/reloc-macros.h" + +/* Relocation types. */ + +START_RELOC_NUMBERS (elf_metag_reloc_type) + RELOC_NUMBER (R_METAG_HIADDR16, 0) + RELOC_NUMBER (R_METAG_LOADDR16, 1) + RELOC_NUMBER (R_METAG_ADDR32, 2) + RELOC_NUMBER (R_METAG_NONE, 3) + RELOC_NUMBER (R_METAG_RELBRANCH, 4) + RELOC_NUMBER (R_METAG_GETSETOFF, 5) + + /* Backward compatability */ + RELOC_NUMBER (R_METAG_REG32OP1, 6) + RELOC_NUMBER (R_METAG_REG32OP2, 7) + RELOC_NUMBER (R_METAG_REG32OP3, 8) + RELOC_NUMBER (R_METAG_REG16OP1, 9) + RELOC_NUMBER (R_METAG_REG16OP2, 10) + RELOC_NUMBER (R_METAG_REG16OP3, 11) + RELOC_NUMBER (R_METAG_REG32OP4, 12) + + RELOC_NUMBER (R_METAG_HIOG, 13) + RELOC_NUMBER (R_METAG_LOOG, 14) + + RELOC_NUMBER (R_METAG_REL8, 15) + RELOC_NUMBER (R_METAG_REL16, 16) + + /* GNU */ + RELOC_NUMBER (R_METAG_GNU_VTINHERIT,30) + RELOC_NUMBER (R_METAG_GNU_VTENTRY, 31) + + /* PIC relocations */ + RELOC_NUMBER (R_METAG_HI16_GOTOFF, 32) + RELOC_NUMBER (R_METAG_LO16_GOTOFF, 33) + RELOC_NUMBER (R_METAG_GETSET_GOTOFF,34) + RELOC_NUMBER (R_METAG_GETSET_GOT, 35) + RELOC_NUMBER (R_METAG_HI16_GOTPC, 36) + RELOC_NUMBER (R_METAG_LO16_GOTPC, 37) + RELOC_NUMBER (R_METAG_HI16_PLT, 38) + RELOC_NUMBER (R_METAG_LO16_PLT, 39) + RELOC_NUMBER (R_METAG_RELBRANCH_PLT,40) + RELOC_NUMBER (R_METAG_GOTOFF, 41) + RELOC_NUMBER (R_METAG_PLT, 42) + RELOC_NUMBER (R_METAG_COPY, 43) + RELOC_NUMBER (R_METAG_JMP_SLOT, 44) + RELOC_NUMBER (R_METAG_RELATIVE, 45) + RELOC_NUMBER (R_METAG_GLOB_DAT, 46) + + /* TLS relocations */ + RELOC_NUMBER (R_METAG_TLS_GD, 47) + RELOC_NUMBER (R_METAG_TLS_LDM, 48) + RELOC_NUMBER (R_METAG_TLS_LDO_HI16, 49) + RELOC_NUMBER (R_METAG_TLS_LDO_LO16, 50) + RELOC_NUMBER (R_METAG_TLS_LDO, 51) + RELOC_NUMBER (R_METAG_TLS_IE, 52) + RELOC_NUMBER (R_METAG_TLS_IENONPIC, 53) + RELOC_NUMBER (R_METAG_TLS_IENONPIC_HI16,54) + RELOC_NUMBER (R_METAG_TLS_IENONPIC_LO16,55) + RELOC_NUMBER (R_METAG_TLS_TPOFF, 56) + RELOC_NUMBER (R_METAG_TLS_DTPMOD, 57) + RELOC_NUMBER (R_METAG_TLS_DTPOFF, 58) + RELOC_NUMBER (R_METAG_TLS_LE, 59) + RELOC_NUMBER (R_METAG_TLS_LE_HI16, 60) + RELOC_NUMBER (R_METAG_TLS_LE_LO16, 61) + +END_RELOC_NUMBERS (R_METAG_MAX) + +#endif /* _ELF_METAG_H */ diff --git a/support/sdbinutils/include/elf/microblaze.h b/support/sdbinutils/include/elf/microblaze.h new file mode 100644 index 0000000..ae98099 --- /dev/null +++ b/support/sdbinutils/include/elf/microblaze.h @@ -0,0 +1,71 @@ +/* Xilinx MicroBlaze support for BFD. + + Copyright (C) 2009-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +/* This file holds definitions specific to the MICROBLAZE ELF ABI. */ + +#ifndef _ELF_MICROBLAZE_H +#define _ELF_MICROBLAZE_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_microblaze_reloc_type) + RELOC_NUMBER (R_MICROBLAZE_NONE, 0) + RELOC_NUMBER (R_MICROBLAZE_32, 1) + RELOC_NUMBER (R_MICROBLAZE_32_PCREL, 2) + RELOC_NUMBER (R_MICROBLAZE_64_PCREL, 3) + RELOC_NUMBER (R_MICROBLAZE_32_PCREL_LO, 4) + RELOC_NUMBER (R_MICROBLAZE_64, 5) + RELOC_NUMBER (R_MICROBLAZE_32_LO, 6) + RELOC_NUMBER (R_MICROBLAZE_SRO32, 7) + RELOC_NUMBER (R_MICROBLAZE_SRW32, 8) + RELOC_NUMBER (R_MICROBLAZE_64_NONE, 9) + RELOC_NUMBER (R_MICROBLAZE_32_SYM_OP_SYM, 10) + RELOC_NUMBER (R_MICROBLAZE_GNU_VTINHERIT, 11) + RELOC_NUMBER (R_MICROBLAZE_GNU_VTENTRY, 12) + RELOC_NUMBER (R_MICROBLAZE_GOTPC_64, 13) /* PC-relative GOT offset. */ + RELOC_NUMBER (R_MICROBLAZE_GOT_64, 14) /* GOT entry offset. */ + RELOC_NUMBER (R_MICROBLAZE_PLT_64, 15) /* PLT offset (PC-relative). */ + RELOC_NUMBER (R_MICROBLAZE_REL, 16) /* Adjust by program base. */ + RELOC_NUMBER (R_MICROBLAZE_JUMP_SLOT, 17) /* Create PLT entry. */ + RELOC_NUMBER (R_MICROBLAZE_GLOB_DAT, 18) /* Create GOT entry. */ + RELOC_NUMBER (R_MICROBLAZE_GOTOFF_64, 19) /* Offset relative to GOT. */ + RELOC_NUMBER (R_MICROBLAZE_GOTOFF_32, 20) /* Offset relative to GOT. */ + RELOC_NUMBER (R_MICROBLAZE_COPY, 21) /* Runtime copy. */ + RELOC_NUMBER (R_MICROBLAZE_TLS, 22) /* TLS Reloc */ + RELOC_NUMBER (R_MICROBLAZE_TLSGD, 23) /* TLS General Dynamic */ + RELOC_NUMBER (R_MICROBLAZE_TLSLD, 24) /* TLS Local Dynamic */ + RELOC_NUMBER (R_MICROBLAZE_TLSDTPMOD32, 25) /* TLS Module ID */ + RELOC_NUMBER (R_MICROBLAZE_TLSDTPREL32, 26) /* TLS Offset Within TLS Block */ + RELOC_NUMBER (R_MICROBLAZE_TLSDTPREL64, 27) /* TLS Offset Within TLS Block */ + RELOC_NUMBER (R_MICROBLAZE_TLSGOTTPREL32, 28) /* TLS Offset From Thread Pointer */ + RELOC_NUMBER (R_MICROBLAZE_TLSTPREL32, 29) /* TLS Offset From Thread Pointer */ + +END_RELOC_NUMBERS (R_MICROBLAZE_max) + +/* Global base address names. */ +#define RO_SDA_ANCHOR_NAME "_SDA2_BASE_" +#define RW_SDA_ANCHOR_NAME "_SDA_BASE_" + +/* Section Attributes. */ +#define SHF_MICROBLAZE_NOREAD 0x80000000 + +#endif /* _ELF_MICROBLAZE_H */ diff --git a/support/sdbinutils/include/elf/mips.h b/support/sdbinutils/include/elf/mips.h new file mode 100644 index 0000000..9de0b4e --- /dev/null +++ b/support/sdbinutils/include/elf/mips.h @@ -0,0 +1,1327 @@ +/* MIPS ELF support for BFD. + Copyright (C) 1993-2018 Free Software Foundation, Inc. + + By Ian Lance Taylor, Cygnus Support, , from + information in the System V Application Binary Interface, MIPS + Processor Supplement. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file holds definitions specific to the MIPS ELF ABI. Note + that most of this is not actually implemented by BFD. */ + +#ifndef _ELF_MIPS_H +#define _ELF_MIPS_H + +#include "elf/reloc-macros.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Relocation types. */ +START_RELOC_NUMBERS (elf_mips_reloc_type) + RELOC_NUMBER (R_MIPS_NONE, 0) + RELOC_NUMBER (R_MIPS_16, 1) + RELOC_NUMBER (R_MIPS_32, 2) /* In Elf 64: alias R_MIPS_ADD */ + RELOC_NUMBER (R_MIPS_REL32, 3) /* In Elf 64: alias R_MIPS_REL */ + RELOC_NUMBER (R_MIPS_26, 4) + RELOC_NUMBER (R_MIPS_HI16, 5) + RELOC_NUMBER (R_MIPS_LO16, 6) + RELOC_NUMBER (R_MIPS_GPREL16, 7) /* In Elf 64: alias R_MIPS_GPREL */ + RELOC_NUMBER (R_MIPS_LITERAL, 8) + RELOC_NUMBER (R_MIPS_GOT16, 9) /* In Elf 64: alias R_MIPS_GOT */ + RELOC_NUMBER (R_MIPS_PC16, 10) + RELOC_NUMBER (R_MIPS_CALL16, 11) /* In Elf 64: alias R_MIPS_CALL */ + RELOC_NUMBER (R_MIPS_GPREL32, 12) + /* The remaining relocs are defined on Irix, although they are not + in the MIPS ELF ABI. */ + RELOC_NUMBER (R_MIPS_UNUSED1, 13) + RELOC_NUMBER (R_MIPS_UNUSED2, 14) + RELOC_NUMBER (R_MIPS_UNUSED3, 15) + RELOC_NUMBER (R_MIPS_SHIFT5, 16) + RELOC_NUMBER (R_MIPS_SHIFT6, 17) + RELOC_NUMBER (R_MIPS_64, 18) + RELOC_NUMBER (R_MIPS_GOT_DISP, 19) + RELOC_NUMBER (R_MIPS_GOT_PAGE, 20) + RELOC_NUMBER (R_MIPS_GOT_OFST, 21) + RELOC_NUMBER (R_MIPS_GOT_HI16, 22) + RELOC_NUMBER (R_MIPS_GOT_LO16, 23) + RELOC_NUMBER (R_MIPS_SUB, 24) + RELOC_NUMBER (R_MIPS_INSERT_A, 25) + RELOC_NUMBER (R_MIPS_INSERT_B, 26) + RELOC_NUMBER (R_MIPS_DELETE, 27) + RELOC_NUMBER (R_MIPS_HIGHER, 28) + RELOC_NUMBER (R_MIPS_HIGHEST, 29) + RELOC_NUMBER (R_MIPS_CALL_HI16, 30) + RELOC_NUMBER (R_MIPS_CALL_LO16, 31) + RELOC_NUMBER (R_MIPS_SCN_DISP, 32) + RELOC_NUMBER (R_MIPS_REL16, 33) + RELOC_NUMBER (R_MIPS_ADD_IMMEDIATE, 34) + RELOC_NUMBER (R_MIPS_PJUMP, 35) + RELOC_NUMBER (R_MIPS_RELGOT, 36) + RELOC_NUMBER (R_MIPS_JALR, 37) + /* TLS relocations. */ + RELOC_NUMBER (R_MIPS_TLS_DTPMOD32, 38) + RELOC_NUMBER (R_MIPS_TLS_DTPREL32, 39) + RELOC_NUMBER (R_MIPS_TLS_DTPMOD64, 40) + RELOC_NUMBER (R_MIPS_TLS_DTPREL64, 41) + RELOC_NUMBER (R_MIPS_TLS_GD, 42) + RELOC_NUMBER (R_MIPS_TLS_LDM, 43) + RELOC_NUMBER (R_MIPS_TLS_DTPREL_HI16, 44) + RELOC_NUMBER (R_MIPS_TLS_DTPREL_LO16, 45) + RELOC_NUMBER (R_MIPS_TLS_GOTTPREL, 46) + RELOC_NUMBER (R_MIPS_TLS_TPREL32, 47) + RELOC_NUMBER (R_MIPS_TLS_TPREL64, 48) + RELOC_NUMBER (R_MIPS_TLS_TPREL_HI16, 49) + RELOC_NUMBER (R_MIPS_TLS_TPREL_LO16, 50) + RELOC_NUMBER (R_MIPS_GLOB_DAT, 51) + /* Space to grow */ + RELOC_NUMBER (R_MIPS_PC21_S2, 60) + RELOC_NUMBER (R_MIPS_PC26_S2, 61) + RELOC_NUMBER (R_MIPS_PC18_S3, 62) + RELOC_NUMBER (R_MIPS_PC19_S2, 63) + RELOC_NUMBER (R_MIPS_PCHI16, 64) + RELOC_NUMBER (R_MIPS_PCLO16, 65) + FAKE_RELOC (R_MIPS_max, 66) + /* These relocs are used for the mips16. */ + FAKE_RELOC (R_MIPS16_min, 100) + RELOC_NUMBER (R_MIPS16_26, 100) + RELOC_NUMBER (R_MIPS16_GPREL, 101) + RELOC_NUMBER (R_MIPS16_GOT16, 102) + RELOC_NUMBER (R_MIPS16_CALL16, 103) + RELOC_NUMBER (R_MIPS16_HI16, 104) + RELOC_NUMBER (R_MIPS16_LO16, 105) + RELOC_NUMBER (R_MIPS16_TLS_GD, 106) + RELOC_NUMBER (R_MIPS16_TLS_LDM, 107) + RELOC_NUMBER (R_MIPS16_TLS_DTPREL_HI16, 108) + RELOC_NUMBER (R_MIPS16_TLS_DTPREL_LO16, 109) + RELOC_NUMBER (R_MIPS16_TLS_GOTTPREL, 110) + RELOC_NUMBER (R_MIPS16_TLS_TPREL_HI16, 111) + RELOC_NUMBER (R_MIPS16_TLS_TPREL_LO16, 112) + RELOC_NUMBER (R_MIPS16_PC16_S1, 113) + FAKE_RELOC (R_MIPS16_max, 114) + /* These relocations are specific to VxWorks. */ + RELOC_NUMBER (R_MIPS_COPY, 126) + RELOC_NUMBER (R_MIPS_JUMP_SLOT, 127) + + /* These relocations are specific to microMIPS. */ + FAKE_RELOC (R_MICROMIPS_min, 130) + RELOC_NUMBER (R_MICROMIPS_26_S1, 133) + RELOC_NUMBER (R_MICROMIPS_HI16, 134) + RELOC_NUMBER (R_MICROMIPS_LO16, 135) + RELOC_NUMBER (R_MICROMIPS_GPREL16, 136) /* In Elf 64: + alias R_MICROMIPS_GPREL */ + RELOC_NUMBER (R_MICROMIPS_LITERAL, 137) + RELOC_NUMBER (R_MICROMIPS_GOT16, 138) /* In Elf 64: + alias R_MICROMIPS_GOT */ + RELOC_NUMBER (R_MICROMIPS_PC7_S1, 139) + RELOC_NUMBER (R_MICROMIPS_PC10_S1, 140) + RELOC_NUMBER (R_MICROMIPS_PC16_S1, 141) + RELOC_NUMBER (R_MICROMIPS_CALL16, 142) /* In Elf 64: + alias R_MICROMIPS_CALL */ + RELOC_NUMBER (R_MICROMIPS_GOT_DISP, 145) + RELOC_NUMBER (R_MICROMIPS_GOT_PAGE, 146) + RELOC_NUMBER (R_MICROMIPS_GOT_OFST, 147) + RELOC_NUMBER (R_MICROMIPS_GOT_HI16, 148) + RELOC_NUMBER (R_MICROMIPS_GOT_LO16, 149) + RELOC_NUMBER (R_MICROMIPS_SUB, 150) + RELOC_NUMBER (R_MICROMIPS_HIGHER, 151) + RELOC_NUMBER (R_MICROMIPS_HIGHEST, 152) + RELOC_NUMBER (R_MICROMIPS_CALL_HI16, 153) + RELOC_NUMBER (R_MICROMIPS_CALL_LO16, 154) + RELOC_NUMBER (R_MICROMIPS_SCN_DISP, 155) + RELOC_NUMBER (R_MICROMIPS_JALR, 156) + RELOC_NUMBER (R_MICROMIPS_HI0_LO16, 157) + /* TLS relocations. */ + RELOC_NUMBER (R_MICROMIPS_TLS_GD, 162) + RELOC_NUMBER (R_MICROMIPS_TLS_LDM, 163) + RELOC_NUMBER (R_MICROMIPS_TLS_DTPREL_HI16, 164) + RELOC_NUMBER (R_MICROMIPS_TLS_DTPREL_LO16, 165) + RELOC_NUMBER (R_MICROMIPS_TLS_GOTTPREL, 166) + RELOC_NUMBER (R_MICROMIPS_TLS_TPREL_HI16, 169) + RELOC_NUMBER (R_MICROMIPS_TLS_TPREL_LO16, 170) + /* microMIPS GP- and PC-relative relocations. */ + RELOC_NUMBER (R_MICROMIPS_GPREL7_S2, 172) + RELOC_NUMBER (R_MICROMIPS_PC23_S2, 173) + FAKE_RELOC (R_MICROMIPS_max, 174) + + /* This was a GNU extension used by embedded-PIC. It was co-opted by + mips-linux for exception-handling data. GCC stopped using it in + May, 2004, then started using it again for compact unwind tables. */ + RELOC_NUMBER (R_MIPS_PC32, 248) + RELOC_NUMBER (R_MIPS_EH, 249) + /* FIXME: this relocation is used internally by gas. */ + RELOC_NUMBER (R_MIPS_GNU_REL16_S2, 250) + /* These are GNU extensions to enable C++ vtable garbage collection. */ + RELOC_NUMBER (R_MIPS_GNU_VTINHERIT, 253) + RELOC_NUMBER (R_MIPS_GNU_VTENTRY, 254) +END_RELOC_NUMBERS (R_MIPS_maxext) + +/* Processor specific flags for the ELF header e_flags field. */ + +/* At least one .noreorder directive appears in the source. */ +#define EF_MIPS_NOREORDER 0x00000001 + +/* File contains position independent code. */ +#define EF_MIPS_PIC 0x00000002 + +/* Code in file uses the standard calling sequence for calling + position independent code. */ +#define EF_MIPS_CPIC 0x00000004 + +/* ??? Unknown flag, set in IRIX 6's BSDdup2.o in libbsd.a. */ +#define EF_MIPS_XGOT 0x00000008 + +/* Code in file uses UCODE (obsolete) */ +#define EF_MIPS_UCODE 0x00000010 + +/* Code in file uses new ABI (-n32 on Irix 6). */ +#define EF_MIPS_ABI2 0x00000020 + +/* Process the .MIPS.options section first by ld */ +#define EF_MIPS_OPTIONS_FIRST 0x00000080 + +/* Indicates code compiled for a 64-bit machine in 32-bit mode + (regs are 32-bits wide). */ +#define EF_MIPS_32BITMODE 0x00000100 + +/* 32-bit machine but FP registers are 64 bit (-mfp64). */ +#define EF_MIPS_FP64 0x00000200 + +/* Code in file uses the IEEE 754-2008 NaN encoding convention. */ +#define EF_MIPS_NAN2008 0x00000400 + +/* Architectural Extensions used by this file */ +#define EF_MIPS_ARCH_ASE 0x0f000000 + +/* Use MDMX multimedia extensions */ +#define EF_MIPS_ARCH_ASE_MDMX 0x08000000 + +/* Use MIPS-16 ISA extensions */ +#define EF_MIPS_ARCH_ASE_M16 0x04000000 + +/* Use MICROMIPS ISA extensions. */ +#define EF_MIPS_ARCH_ASE_MICROMIPS 0x02000000 + +/* Four bit MIPS architecture field. */ +#define EF_MIPS_ARCH 0xf0000000 + +/* -mips1 code. */ +#define E_MIPS_ARCH_1 0x00000000 + +/* -mips2 code. */ +#define E_MIPS_ARCH_2 0x10000000 + +/* -mips3 code. */ +#define E_MIPS_ARCH_3 0x20000000 + +/* -mips4 code. */ +#define E_MIPS_ARCH_4 0x30000000 + +/* -mips5 code. */ +#define E_MIPS_ARCH_5 0x40000000 + +/* -mips32 code. */ +#define E_MIPS_ARCH_32 0x50000000 + +/* -mips64 code. */ +#define E_MIPS_ARCH_64 0x60000000 + +/* -mips32r2 code. */ +#define E_MIPS_ARCH_32R2 0x70000000 + +/* -mips64r2 code. */ +#define E_MIPS_ARCH_64R2 0x80000000 + +/* -mips32r6 code. */ +#define E_MIPS_ARCH_32R6 0x90000000 + +/* -mips64r6 code. */ +#define E_MIPS_ARCH_64R6 0xa0000000 + +/* The ABI of the file. Also see EF_MIPS_ABI2 above. */ +#define EF_MIPS_ABI 0x0000F000 + +/* The original o32 abi. */ +#define E_MIPS_ABI_O32 0x00001000 + +/* O32 extended to work on 64 bit architectures */ +#define E_MIPS_ABI_O64 0x00002000 + +/* EABI in 32 bit mode */ +#define E_MIPS_ABI_EABI32 0x00003000 + +/* EABI in 64 bit mode */ +#define E_MIPS_ABI_EABI64 0x00004000 + + +/* Machine variant if we know it. This field was invented at Cygnus, + but it is hoped that other vendors will adopt it. If some standard + is developed, this code should be changed to follow it. */ + +#define EF_MIPS_MACH 0x00FF0000 + +/* Cygnus is choosing values between 80 and 9F; + 00 - 7F should be left for a future standard; + the rest are open. */ + +#define E_MIPS_MACH_3900 0x00810000 +#define E_MIPS_MACH_4010 0x00820000 +#define E_MIPS_MACH_4100 0x00830000 +#define E_MIPS_MACH_4650 0x00850000 +#define E_MIPS_MACH_4120 0x00870000 +#define E_MIPS_MACH_4111 0x00880000 +#define E_MIPS_MACH_SB1 0x008a0000 +#define E_MIPS_MACH_OCTEON 0x008b0000 +#define E_MIPS_MACH_XLR 0x008c0000 +#define E_MIPS_MACH_OCTEON2 0x008d0000 +#define E_MIPS_MACH_OCTEON3 0x008e0000 +#define E_MIPS_MACH_5400 0x00910000 +#define E_MIPS_MACH_5900 0x00920000 +#define E_MIPS_MACH_IAMR2 0x00930000 +#define E_MIPS_MACH_5500 0x00980000 +#define E_MIPS_MACH_9000 0x00990000 +#define E_MIPS_MACH_LS2E 0x00A00000 +#define E_MIPS_MACH_LS2F 0x00A10000 +#define E_MIPS_MACH_LS3A 0x00A20000 + +/* Processor specific section indices. These sections do not actually + exist. Symbols with a st_shndx field corresponding to one of these + values have a special meaning. */ + +/* Defined and allocated common symbol. Value is virtual address. If + relocated, alignment must be preserved. */ +#define SHN_MIPS_ACOMMON SHN_LORESERVE + +/* Defined and allocated text symbol. Value is virtual address. + Occur in the dynamic symbol table of Alpha OSF/1 and Irix 5 executables. */ +#define SHN_MIPS_TEXT (SHN_LORESERVE + 1) + +/* Defined and allocated data symbol. Value is virtual address. + Occur in the dynamic symbol table of Alpha OSF/1 and Irix 5 executables. */ +#define SHN_MIPS_DATA (SHN_LORESERVE + 2) + +/* Small common symbol. */ +#define SHN_MIPS_SCOMMON (SHN_LORESERVE + 3) + +/* Small undefined symbol. */ +#define SHN_MIPS_SUNDEFINED (SHN_LORESERVE + 4) + +/* Processor specific section types. */ + +/* Section contains the set of dynamic shared objects used when + statically linking. */ +#define SHT_MIPS_LIBLIST 0x70000000 + +/* I'm not sure what this is, but it's used on Irix 5. */ +#define SHT_MIPS_MSYM 0x70000001 + +/* Section contains list of symbols whose definitions conflict with + symbols defined in shared objects. */ +#define SHT_MIPS_CONFLICT 0x70000002 + +/* Section contains the global pointer table. */ +#define SHT_MIPS_GPTAB 0x70000003 + +/* Section contains microcode information. The exact format is + unspecified. */ +#define SHT_MIPS_UCODE 0x70000004 + +/* Section contains some sort of debugging information. The exact + format is unspecified. It's probably ECOFF symbols. */ +#define SHT_MIPS_DEBUG 0x70000005 + +/* Section contains register usage information. */ +#define SHT_MIPS_REGINFO 0x70000006 + +/* ??? */ +#define SHT_MIPS_PACKAGE 0x70000007 + +/* ??? */ +#define SHT_MIPS_PACKSYM 0x70000008 + +/* ??? */ +#define SHT_MIPS_RELD 0x70000009 + +/* Section contains interface information. */ +#define SHT_MIPS_IFACE 0x7000000b + +/* Section contains description of contents of another section. */ +#define SHT_MIPS_CONTENT 0x7000000c + +/* Section contains miscellaneous options. */ +#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 + +/* Delta C++: symbol table */ +#define SHT_MIPS_DELTASYM 0x7000001b + +/* Delta C++: instance table */ +#define SHT_MIPS_DELTAINST 0x7000001c + +/* Delta C++: class table */ +#define SHT_MIPS_DELTACLASS 0x7000001d + +/* DWARF debugging section. */ +#define SHT_MIPS_DWARF 0x7000001e + +/* Delta C++: declarations */ +#define SHT_MIPS_DELTADECL 0x7000001f + +/* List of libraries the binary depends on. Includes a time stamp, version + number. */ +#define SHT_MIPS_SYMBOL_LIB 0x70000020 + +/* Events section. */ +#define SHT_MIPS_EVENTS 0x70000021 + +/* ??? */ +#define SHT_MIPS_TRANSLATE 0x70000022 + +/* Special pixie sections */ +#define SHT_MIPS_PIXIE 0x70000023 + +/* Address translation table (for debug info) */ +#define SHT_MIPS_XLATE 0x70000024 + +/* SGI internal address translation table (for debug info) */ +#define SHT_MIPS_XLATE_DEBUG 0x70000025 + +/* Intermediate code */ +#define SHT_MIPS_WHIRL 0x70000026 + +/* C++ exception handling region info */ +#define SHT_MIPS_EH_REGION 0x70000027 + +/* Obsolete address translation table (for debug info) */ +#define SHT_MIPS_XLATE_OLD 0x70000028 + +/* Runtime procedure descriptor table exception information (ucode) ??? */ +#define SHT_MIPS_PDR_EXCEPTION 0x70000029 + +/* ABI related flags section. */ +#define SHT_MIPS_ABIFLAGS 0x7000002a + +/* A section of type SHT_MIPS_LIBLIST contains an array of the + following structure. The sh_link field is the section index of the + string table. The sh_info field is the number of entries in the + section. */ +typedef struct +{ + /* String table index for name of shared object. */ + unsigned long l_name; + /* Time stamp. */ + unsigned long l_time_stamp; + /* Checksum of symbol names and common sizes. */ + unsigned long l_checksum; + /* String table index for version. */ + unsigned long l_version; + /* Flags. */ + unsigned long l_flags; +} Elf32_Lib; + +/* The external version of Elf32_Lib. */ +typedef struct +{ + unsigned char l_name[4]; + unsigned char l_time_stamp[4]; + unsigned char l_checksum[4]; + unsigned char l_version[4]; + unsigned char l_flags[4]; +} Elf32_External_Lib; + +/* The l_flags field of an Elf32_Lib structure may contain the + following flags. */ + +/* Require an exact match at runtime. */ +#define LL_EXACT_MATCH 0x00000001 + +/* Ignore version incompatibilities at runtime. */ +#define LL_IGNORE_INT_VER 0x00000002 + +/* Require matching minor version number. */ +#define LL_REQUIRE_MINOR 0x00000004 + +/* ??? */ +#define LL_EXPORTS 0x00000008 + +/* Delay loading of this library until really needed. */ +#define LL_DELAY_LOAD 0x00000010 + +/* ??? Delta C++ stuff ??? */ +#define LL_DELTA 0x00000020 + + +/* A section of type SHT_MIPS_CONFLICT is an array of indices into the + .dynsym section. Each element has the following type. */ +typedef unsigned long Elf32_Conflict; +typedef unsigned char Elf32_External_Conflict[4]; + +typedef unsigned long Elf64_Conflict; +typedef unsigned char Elf64_External_Conflict[8]; + +/* A section of type SHT_MIPS_GPTAB contains information about how + much GP space would be required for different -G arguments. This + information is only used so that the linker can provide informative + suggestions as to the best -G value to use. The sh_info field is + the index of the section for which this information applies. The + contents of the section are an array of the following union. The + first element uses the gt_header field. The remaining elements use + the gt_entry field. */ +typedef union +{ + struct + { + /* -G value actually used for this object file. */ + unsigned long gt_current_g_value; + /* Unused. */ + unsigned long gt_unused; + } gt_header; + struct + { + /* If this -G argument has been used... */ + unsigned long gt_g_value; + /* ...this many GP section bytes would be required. */ + unsigned long gt_bytes; + } gt_entry; +} Elf32_gptab; + +/* The external version of Elf32_gptab. */ + +typedef union +{ + struct + { + unsigned char gt_current_g_value[4]; + unsigned char gt_unused[4]; + } gt_header; + struct + { + unsigned char gt_g_value[4]; + unsigned char gt_bytes[4]; + } gt_entry; +} Elf32_External_gptab; + +/* A section of type SHT_MIPS_REGINFO contains the following + structure. */ +typedef struct +{ + /* Mask of general purpose registers used. */ + unsigned long ri_gprmask; + /* Mask of co-processor registers used. */ + unsigned long ri_cprmask[4]; + /* GP register value for this object file. */ + long ri_gp_value; +} Elf32_RegInfo; + +/* The external version of the Elf_RegInfo structure. */ +typedef struct +{ + unsigned char ri_gprmask[4]; + unsigned char ri_cprmask[4][4]; + unsigned char ri_gp_value[4]; +} Elf32_External_RegInfo; + +/* MIPS ELF .reginfo swapping routines. */ +extern void bfd_mips_elf32_swap_reginfo_in + (bfd *, const Elf32_External_RegInfo *, Elf32_RegInfo *); +extern void bfd_mips_elf32_swap_reginfo_out + (bfd *, const Elf32_RegInfo *, Elf32_External_RegInfo *); + +/* Processor specific section flags. */ + +/* This section must be in the global data area. */ +#define SHF_MIPS_GPREL 0x10000000 + +/* This section should be merged. */ +#define SHF_MIPS_MERGE 0x20000000 + +/* This section contains address data of size implied by section + element size. */ +#define SHF_MIPS_ADDR 0x40000000 + +/* This section contains string data. */ +#define SHF_MIPS_STRING 0x80000000 + +/* This section may not be stripped. */ +#define SHF_MIPS_NOSTRIP 0x08000000 + +/* This section is local to threads. */ +#define SHF_MIPS_LOCAL 0x04000000 + +/* Linker should generate implicit weak names for this section. */ +#define SHF_MIPS_NAMES 0x02000000 + +/* Section contais text/data which may be replicated in other sections. + Linker should retain only one copy. */ +#define SHF_MIPS_NODUPES 0x01000000 + +/* Processor specific program header types. */ + +/* Register usage information. Identifies one .reginfo section. */ +#define PT_MIPS_REGINFO 0x70000000 + +/* Runtime procedure table. */ +#define PT_MIPS_RTPROC 0x70000001 + +/* .MIPS.options section. */ +#define PT_MIPS_OPTIONS 0x70000002 + +/* Records ABI related flags. */ +#define PT_MIPS_ABIFLAGS 0x70000003 + +/* Processor specific dynamic array tags. */ + +/* 32 bit version number for runtime linker interface. */ +#define DT_MIPS_RLD_VERSION 0x70000001 + +/* Time stamp. */ +#define DT_MIPS_TIME_STAMP 0x70000002 + +/* Checksum of external strings and common sizes. */ +#define DT_MIPS_ICHECKSUM 0x70000003 + +/* Index of version string in string table. */ +#define DT_MIPS_IVERSION 0x70000004 + +/* 32 bits of flags. */ +#define DT_MIPS_FLAGS 0x70000005 + +/* Base address of the segment. */ +#define DT_MIPS_BASE_ADDRESS 0x70000006 + +/* ??? */ +#define DT_MIPS_MSYM 0x70000007 + +/* Address of .conflict section. */ +#define DT_MIPS_CONFLICT 0x70000008 + +/* Address of .liblist section. */ +#define DT_MIPS_LIBLIST 0x70000009 + +/* Number of local global offset table entries. */ +#define DT_MIPS_LOCAL_GOTNO 0x7000000a + +/* Number of entries in the .conflict section. */ +#define DT_MIPS_CONFLICTNO 0x7000000b + +/* Number of entries in the .liblist section. */ +#define DT_MIPS_LIBLISTNO 0x70000010 + +/* Number of entries in the .dynsym section. */ +#define DT_MIPS_SYMTABNO 0x70000011 + +/* Index of first external dynamic symbol not referenced locally. */ +#define DT_MIPS_UNREFEXTNO 0x70000012 + +/* Index of first dynamic symbol in global offset table. */ +#define DT_MIPS_GOTSYM 0x70000013 + +/* Number of page table entries in global offset table. */ +#define DT_MIPS_HIPAGENO 0x70000014 + +/* Address of run time loader map, used for debugging. */ +#define DT_MIPS_RLD_MAP 0x70000016 + +/* Delta C++ class definition. */ +#define DT_MIPS_DELTA_CLASS 0x70000017 + +/* Number of entries in DT_MIPS_DELTA_CLASS. */ +#define DT_MIPS_DELTA_CLASS_NO 0x70000018 + +/* Delta C++ class instances. */ +#define DT_MIPS_DELTA_INSTANCE 0x70000019 + +/* Number of entries in DT_MIPS_DELTA_INSTANCE. */ +#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a + +/* Delta relocations. */ +#define DT_MIPS_DELTA_RELOC 0x7000001b + +/* Number of entries in DT_MIPS_DELTA_RELOC. */ +#define DT_MIPS_DELTA_RELOC_NO 0x7000001c + +/* Delta symbols that Delta relocations refer to. */ +#define DT_MIPS_DELTA_SYM 0x7000001d + +/* Number of entries in DT_MIPS_DELTA_SYM. */ +#define DT_MIPS_DELTA_SYM_NO 0x7000001e + +/* Delta symbols that hold class declarations. */ +#define DT_MIPS_DELTA_CLASSSYM 0x70000020 + +/* Number of entries in DT_MIPS_DELTA_CLASSSYM. */ +#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 + +/* Flags indicating information about C++ flavor. */ +#define DT_MIPS_CXX_FLAGS 0x70000022 + +/* Pixie information (???). */ +#define DT_MIPS_PIXIE_INIT 0x70000023 + +/* Address of .MIPS.symlib */ +#define DT_MIPS_SYMBOL_LIB 0x70000024 + +/* The GOT index of the first PTE for a segment */ +#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025 + +/* The GOT index of the first PTE for a local symbol */ +#define DT_MIPS_LOCAL_GOTIDX 0x70000026 + +/* The GOT index of the first PTE for a hidden symbol */ +#define DT_MIPS_HIDDEN_GOTIDX 0x70000027 + +/* The GOT index of the first PTE for a protected symbol */ +#define DT_MIPS_PROTECTED_GOTIDX 0x70000028 + +/* Address of `.MIPS.options'. */ +#define DT_MIPS_OPTIONS 0x70000029 + +/* Address of `.interface'. */ +#define DT_MIPS_INTERFACE 0x7000002a + +/* ??? */ +#define DT_MIPS_DYNSTR_ALIGN 0x7000002b + +/* Size of the .interface section. */ +#define DT_MIPS_INTERFACE_SIZE 0x7000002c + +/* Size of rld_text_resolve function stored in the GOT. */ +#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d + +/* Default suffix of DSO to be added by rld on dlopen() calls. */ +#define DT_MIPS_PERF_SUFFIX 0x7000002e + +/* Size of compact relocation section (O32). */ +#define DT_MIPS_COMPACT_SIZE 0x7000002f + +/* GP value for auxiliary GOTs. */ +#define DT_MIPS_GP_VALUE 0x70000030 + +/* Address of auxiliary .dynamic. */ +#define DT_MIPS_AUX_DYNAMIC 0x70000031 + +/* Address of the base of the PLTGOT. */ +#define DT_MIPS_PLTGOT 0x70000032 + +/* Points to the base of a writable PLT. */ +#define DT_MIPS_RWPLT 0x70000034 + +/* Relative offset of run time loader map, used for debugging. */ +#define DT_MIPS_RLD_MAP_REL 0x70000035 + +/* Flags which may appear in a DT_MIPS_FLAGS entry. */ + +/* No flags. */ +#define RHF_NONE 0x00000000 + +/* Uses shortcut pointers. */ +#define RHF_QUICKSTART 0x00000001 + +/* Hash size is not a power of two. */ +#define RHF_NOTPOT 0x00000002 + +/* Ignore LD_LIBRARY_PATH. */ +#define RHS_NO_LIBRARY_REPLACEMENT 0x00000004 + +/* DSO address may not be relocated. */ +#define RHF_NO_MOVE 0x00000008 + +/* SGI specific features. */ +#define RHF_SGI_ONLY 0x00000010 + +/* Guarantee that .init will finish executing before any non-init + code in DSO is called. */ +#define RHF_GUARANTEE_INIT 0x00000020 + +/* Contains Delta C++ code. */ +#define RHF_DELTA_C_PLUS_PLUS 0x00000040 + +/* Guarantee that .init will start executing before any non-init + code in DSO is called. */ +#define RHF_GUARANTEE_START_INIT 0x00000080 + +/* Generated by pixie. */ +#define RHF_PIXIE 0x00000100 + +/* Delay-load DSO by default. */ +#define RHF_DEFAULT_DELAY_LOAD 0x00000200 + +/* Object may be requickstarted */ +#define RHF_REQUICKSTART 0x00000400 + +/* Object has been requickstarted */ +#define RHF_REQUICKSTARTED 0x00000800 + +/* Generated by cord. */ +#define RHF_CORD 0x00001000 + +/* Object contains no unresolved undef symbols. */ +#define RHF_NO_UNRES_UNDEF 0x00002000 + +/* Symbol table is in a safe order. */ +#define RHF_RLD_ORDER_SAFE 0x00004000 + +/* Special values for the st_other field in the symbol table. These + are used in an Irix 5 dynamic symbol table. */ + +#define STO_DEFAULT STV_DEFAULT +#define STO_INTERNAL STV_INTERNAL +#define STO_HIDDEN STV_HIDDEN +#define STO_PROTECTED STV_PROTECTED + +/* Two topmost bits denote the MIPS ISA for .text symbols: + + 00 -- standard MIPS code, + + 10 -- microMIPS code, + + 11 -- MIPS16 code; requires the following two bits to be set too. + Note that one of the MIPS16 bits overlaps with STO_MIPS_PIC. See below + for details. */ +#define STO_MIPS_ISA (3 << 6) + +/* The mask spanning the rest of MIPS psABI flags. At most one is expected + to be set except for STO_MIPS16. */ +#define STO_MIPS_FLAGS (~(STO_MIPS_ISA | ELF_ST_VISIBILITY (-1))) + +/* The MIPS psABI was updated in 2008 with support for PLTs and copy + relocs. There are therefore two types of nonzero SHN_UNDEF functions: + PLT entries and traditional MIPS lazy binding stubs. We mark the former + with STO_MIPS_PLT to distinguish them from the latter. */ +#define STO_MIPS_PLT 0x8 +#define ELF_ST_IS_MIPS_PLT(other) \ + ((ELF_ST_IS_MIPS16 (other) \ + ? ((other) & (~STO_MIPS16 & STO_MIPS_FLAGS)) \ + : ((other) & STO_MIPS_FLAGS)) == STO_MIPS_PLT) +#define ELF_ST_SET_MIPS_PLT(other) \ + ((ELF_ST_IS_MIPS16 (other) \ + ? ((other) & (STO_MIPS16 | ~STO_MIPS_FLAGS)) \ + : ((other) & ~STO_MIPS_FLAGS)) | STO_MIPS_PLT) + +/* This value is used to mark PIC functions in an object that mixes + PIC and non-PIC. Note that this bit overlaps with STO_MIPS16, + although MIPS16 symbols are never considered to be MIPS_PIC. */ +#define STO_MIPS_PIC 0x20 +#define ELF_ST_IS_MIPS_PIC(other) (((other) & STO_MIPS_FLAGS) == STO_MIPS_PIC) +#define ELF_ST_SET_MIPS_PIC(other) \ + ((ELF_ST_IS_MIPS16 (other) \ + ? ((other) & ~(STO_MIPS16 | STO_MIPS_FLAGS)) \ + : ((other) & ~STO_MIPS_FLAGS)) | STO_MIPS_PIC) + +/* This value is used for a mips16 .text symbol. */ +#define STO_MIPS16 0xf0 +#define ELF_ST_IS_MIPS16(other) (((other) & STO_MIPS16) == STO_MIPS16) +#define ELF_ST_SET_MIPS16(other) ((other) | STO_MIPS16) + +/* This value is used for a microMIPS .text symbol. To distinguish from + STO_MIPS16, we set top two bits to be 10 to denote STO_MICROMIPS. The + mask is STO_MIPS_ISA. */ +#define STO_MICROMIPS (2 << 6) +#define ELF_ST_IS_MICROMIPS(other) (((other) & STO_MIPS_ISA) == STO_MICROMIPS) +#define ELF_ST_SET_MICROMIPS(other) (((other) & ~STO_MIPS_ISA) | STO_MICROMIPS) + +/* Whether code compression (either of the MIPS16 or the microMIPS ASEs) + has been indicated for a .text symbol. */ +#define ELF_ST_IS_COMPRESSED(other) \ + (ELF_ST_IS_MIPS16 (other) || ELF_ST_IS_MICROMIPS (other)) + +/* This bit is used on Irix to indicate a symbol whose definition + is optional - if, at final link time, it cannot be found, no + error message should be produced. */ +#define STO_OPTIONAL (1 << 2) +/* A macro to examine the STO_OPTIONAL bit. */ +#define ELF_MIPS_IS_OPTIONAL(other) ((other) & STO_OPTIONAL) + +/* The 64-bit MIPS ELF ABI uses an unusual reloc format. Each + relocation entry specifies up to three actual relocations, all at + the same address. The first relocation which required a symbol + uses the symbol in the r_sym field. The second relocation which + requires a symbol uses the symbol in the r_ssym field. If all + three relocations require a symbol, the third one uses a zero + value. */ + +/* An entry in a 64 bit SHT_REL section. */ + +typedef struct +{ + /* Address of relocation. */ + unsigned char r_offset[8]; + /* Symbol index. */ + unsigned char r_sym[4]; + /* Special symbol. */ + unsigned char r_ssym[1]; + /* Third relocation. */ + unsigned char r_type3[1]; + /* Second relocation. */ + unsigned char r_type2[1]; + /* First relocation. */ + unsigned char r_type[1]; +} Elf64_Mips_External_Rel; + +typedef struct +{ + /* Address of relocation. */ + bfd_vma r_offset; + /* Symbol index. */ + unsigned long r_sym; + /* Special symbol. */ + unsigned char r_ssym; + /* Third relocation. */ + unsigned char r_type3; + /* Second relocation. */ + unsigned char r_type2; + /* First relocation. */ + unsigned char r_type; +} Elf64_Mips_Internal_Rel; + +/* An entry in a 64 bit SHT_RELA section. */ + +typedef struct +{ + /* Address of relocation. */ + unsigned char r_offset[8]; + /* Symbol index. */ + unsigned char r_sym[4]; + /* Special symbol. */ + unsigned char r_ssym[1]; + /* Third relocation. */ + unsigned char r_type3[1]; + /* Second relocation. */ + unsigned char r_type2[1]; + /* First relocation. */ + unsigned char r_type[1]; + /* Addend. */ + unsigned char r_addend[8]; +} Elf64_Mips_External_Rela; + +typedef struct +{ + /* Address of relocation. */ + bfd_vma r_offset; + /* Symbol index. */ + unsigned long r_sym; + /* Special symbol. */ + unsigned char r_ssym; + /* Third relocation. */ + unsigned char r_type3; + /* Second relocation. */ + unsigned char r_type2; + /* First relocation. */ + unsigned char r_type; + /* Addend. */ + bfd_signed_vma r_addend; +} Elf64_Mips_Internal_Rela; + +/* MIPS ELF 64 relocation info access macros. */ +#define ELF64_MIPS_R_SSYM(i) (((i) >> 24) & 0xff) +#define ELF64_MIPS_R_TYPE3(i) (((i) >> 16) & 0xff) +#define ELF64_MIPS_R_TYPE2(i) (((i) >> 8) & 0xff) +#define ELF64_MIPS_R_TYPE(i) ((i) & 0xff) + +/* Values found in the r_ssym field of a relocation entry. */ + +/* No relocation. */ +#define RSS_UNDEF 0 + +/* Value of GP. */ +#define RSS_GP 1 + +/* Value of GP in object being relocated. */ +#define RSS_GP0 2 + +/* Address of location being relocated. */ +#define RSS_LOC 3 + +/* A SHT_MIPS_OPTIONS section contains a series of options, each of + which starts with this header. */ + +typedef struct +{ + /* Type of option. */ + unsigned char kind[1]; + /* Size of option descriptor, including header. */ + unsigned char size[1]; + /* Section index of affected section, or 0 for global option. */ + unsigned char section[2]; + /* Information specific to this kind of option. */ + unsigned char info[4]; +} Elf_External_Options; + +typedef struct +{ + /* Type of option. */ + unsigned char kind; + /* Size of option descriptor, including header. */ + unsigned char size; + /* Section index of affected section, or 0 for global option. */ + unsigned short section; + /* Information specific to this kind of option. */ + unsigned long info; +} Elf_Internal_Options; + +/* MIPS ELF option header swapping routines. */ +extern void bfd_mips_elf_swap_options_in + (bfd *, const Elf_External_Options *, Elf_Internal_Options *); +extern void bfd_mips_elf_swap_options_out + (bfd *, const Elf_Internal_Options *, Elf_External_Options *); + +/* Values which may appear in the kind field of an Elf_Options + structure. */ + +/* Undefined. */ +#define ODK_NULL 0 + +/* Register usage and GP value. */ +#define ODK_REGINFO 1 + +/* Exception processing information. */ +#define ODK_EXCEPTIONS 2 + +/* Section padding information. */ +#define ODK_PAD 3 + +/* Hardware workarounds performed. */ +#define ODK_HWPATCH 4 + +/* Fill value used by the linker. */ +#define ODK_FILL 5 + +/* Reserved space for desktop tools. */ +#define ODK_TAGS 6 + +/* Hardware workarounds, AND bits when merging. */ +#define ODK_HWAND 7 + +/* Hardware workarounds, OR bits when merging. */ +#define ODK_HWOR 8 + +/* GP group to use for text/data sections. */ +#define ODK_GP_GROUP 9 + +/* ID information. */ +#define ODK_IDENT 10 + +/* In the 32 bit ABI, an ODK_REGINFO option is just a Elf32_RegInfo + structure. In the 64 bit ABI, it is the following structure. The + info field of the options header is not used. */ + +typedef struct +{ + /* Mask of general purpose registers used. */ + unsigned char ri_gprmask[4]; + /* Padding. */ + unsigned char ri_pad[4]; + /* Mask of co-processor registers used. */ + unsigned char ri_cprmask[4][4]; + /* GP register value for this object file. */ + unsigned char ri_gp_value[8]; +} Elf64_External_RegInfo; + +typedef struct +{ + /* Mask of general purpose registers used. */ + unsigned long ri_gprmask; + /* Padding. */ + unsigned long ri_pad; + /* Mask of co-processor registers used. */ + unsigned long ri_cprmask[4]; + /* GP register value for this object file. */ + bfd_vma ri_gp_value; +} Elf64_Internal_RegInfo; + +/* ABI Flags structure version 0. */ + +typedef struct +{ + /* Version of flags structure. */ + unsigned char version[2]; + /* The level of the ISA: 1-5, 32, 64. */ + unsigned char isa_level[1]; + /* The revision of ISA: 0 for MIPS V and below, 1-n otherwise. */ + unsigned char isa_rev[1]; + /* The size of general purpose registers. */ + unsigned char gpr_size[1]; + /* The size of co-processor 1 registers. */ + unsigned char cpr1_size[1]; + /* The size of co-processor 2 registers. */ + unsigned char cpr2_size[1]; + /* The floating-point ABI. */ + unsigned char fp_abi[1]; + /* Processor-specific extension. */ + unsigned char isa_ext[4]; + /* Mask of ASEs used. */ + unsigned char ases[4]; + /* Mask of general flags. */ + unsigned char flags1[4]; + unsigned char flags2[4]; +} Elf_External_ABIFlags_v0; + +typedef struct elf_internal_abiflags_v0 +{ + /* Version of flags structure. */ + unsigned short version; + /* The level of the ISA: 1-5, 32, 64. */ + unsigned char isa_level; + /* The revision of ISA: 0 for MIPS V and below, 1-n otherwise. */ + unsigned char isa_rev; + /* The size of general purpose registers. */ + unsigned char gpr_size; + /* The size of co-processor 1 registers. */ + unsigned char cpr1_size; + /* The size of co-processor 2 registers. */ + unsigned char cpr2_size; + /* The floating-point ABI. */ + unsigned char fp_abi; + /* Processor-specific extension. */ + unsigned long isa_ext; + /* Mask of ASEs used. */ + unsigned long ases; + /* Mask of general flags. */ + unsigned long flags1; + unsigned long flags2; +} Elf_Internal_ABIFlags_v0; + +typedef struct +{ + /* The hash value computed from the name of the corresponding + dynamic symbol. */ + unsigned char ms_hash_value[4]; + /* Contains both the dynamic relocation index and the symbol flags + field. The macros ELF32_MS_REL_INDEX and ELF32_MS_FLAGS are used + to access the individual values. The dynamic relocation index + identifies the first entry in the .rel.dyn section that + references the dynamic symbol corresponding to this msym entry. + If the index is 0, no dynamic relocations are associated with the + symbol. The symbol flags field is reserved for future use. */ + unsigned char ms_info[4]; +} Elf32_External_Msym; + +typedef struct +{ + /* The hash value computed from the name of the corresponding + dynamic symbol. */ + unsigned long ms_hash_value; + /* Contains both the dynamic relocation index and the symbol flags + field. The macros ELF32_MS_REL_INDEX and ELF32_MS_FLAGS are used + to access the individual values. The dynamic relocation index + identifies the first entry in the .rel.dyn section that + references the dynamic symbol corresponding to this msym entry. + If the index is 0, no dynamic relocations are associated with the + symbol. The symbol flags field is reserved for future use. */ + unsigned long ms_info; +} Elf32_Internal_Msym; + +#define ELF32_MS_REL_INDEX(i) ((i) >> 8) +#define ELF32_MS_FLAGS(i) (i) & 0xff) +#define ELF32_MS_INFO(r, f) (((r) << 8) + ((f) & 0xff)) + +/* MIPS ELF reginfo swapping routines. */ +extern void bfd_mips_elf64_swap_reginfo_in + (bfd *, const Elf64_External_RegInfo *, Elf64_Internal_RegInfo *); +extern void bfd_mips_elf64_swap_reginfo_out + (bfd *, const Elf64_Internal_RegInfo *, Elf64_External_RegInfo *); + +/* MIPS ELF flags swapping routines. */ +extern void bfd_mips_elf_swap_abiflags_v0_in + (bfd *, const Elf_External_ABIFlags_v0 *, Elf_Internal_ABIFlags_v0 *); +extern void bfd_mips_elf_swap_abiflags_v0_out + (bfd *, const Elf_Internal_ABIFlags_v0 *, Elf_External_ABIFlags_v0 *); + +/* Masks for the info work of an ODK_EXCEPTIONS descriptor. */ +#define OEX_FPU_MIN 0x1f /* FPEs which must be enabled. */ +#define OEX_FPU_MAX 0x1f00 /* FPEs which may be enabled. */ +#define OEX_PAGE0 0x10000 /* Page zero must be mapped. */ +#define OEX_SMM 0x20000 /* Force sequential memory mode. */ +#define OEX_FPDBUG 0x40000 /* Force precise floating-point + exceptions (debug mode). */ +#define OEX_DISMISS 0x80000 /* Dismiss invalid address faults. */ + +/* Masks of the FP exceptions for OEX_FPU_MIN and OEX_FPU_MAX. */ +#define OEX_FPU_INVAL 0x10 /* Invalid operation exception. */ +#define OEX_FPU_DIV0 0x08 /* Division by zero exception. */ +#define OEX_FPU_OFLO 0x04 /* Overflow exception. */ +#define OEX_FPU_UFLO 0x02 /* Underflow exception. */ +#define OEX_FPU_INEX 0x01 /* Inexact exception. */ + +/* Masks for the info word of an ODK_PAD descriptor. */ +#define OPAD_PREFIX 0x01 +#define OPAD_POSTFIX 0x02 +#define OPAD_SYMBOL 0x04 + +/* Masks for the info word of an ODK_HWPATCH descriptor. */ +#define OHW_R4KEOP 0x00000001 /* R4000 end-of-page patch. */ +#define OHW_R8KPFETCH 0x00000002 /* May need R8000 prefetch patch. */ +#define OHW_R5KEOP 0x00000004 /* R5000 end-of-page patch. */ +#define OHW_R5KCVTL 0x00000008 /* R5000 cvt.[ds].l bug + (clean == 1). */ +#define OHW_R10KLDL 0x00000010 /* Needs R10K misaligned + load patch. */ + +/* Masks for the info word of an ODK_IDENT/ODK_GP_GROUP descriptor. */ +#define OGP_GROUP 0x0000ffff /* GP group number. */ +#define OGP_SELF 0xffff0000 /* Self-contained GP groups. */ + +/* Masks for the info word of an ODK_HWAND/ODK_HWOR descriptor. */ +#define OHWA0_R4KEOP_CHECKED 0x00000001 +#define OHWA0_R4KEOP_CLEAN 0x00000002 + +/* Values for the xxx_size bytes of an ABI flags structure. */ + +#define AFL_REG_NONE 0x00 /* No registers. */ +#define AFL_REG_32 0x01 /* 32-bit registers. */ +#define AFL_REG_64 0x02 /* 64-bit registers. */ +#define AFL_REG_128 0x03 /* 128-bit registers. */ + +/* Masks for the ases word of an ABI flags structure. */ + +#define AFL_ASE_DSP 0x00000001 /* DSP ASE. */ +#define AFL_ASE_DSPR2 0x00000002 /* DSP R2 ASE. */ +#define AFL_ASE_EVA 0x00000004 /* Enhanced VA Scheme. */ +#define AFL_ASE_MCU 0x00000008 /* MCU (MicroController) ASE. */ +#define AFL_ASE_MDMX 0x00000010 /* MDMX ASE. */ +#define AFL_ASE_MIPS3D 0x00000020 /* MIPS-3D ASE. */ +#define AFL_ASE_MT 0x00000040 /* MT ASE. */ +#define AFL_ASE_SMARTMIPS 0x00000080 /* SmartMIPS ASE. */ +#define AFL_ASE_VIRT 0x00000100 /* VZ ASE. */ +#define AFL_ASE_MSA 0x00000200 /* MSA ASE. */ +#define AFL_ASE_MIPS16 0x00000400 /* MIPS16 ASE. */ +#define AFL_ASE_MICROMIPS 0x00000800 /* MICROMIPS ASE. */ +#define AFL_ASE_XPA 0x00001000 /* XPA ASE. */ +#define AFL_ASE_DSPR3 0x00002000 /* DSP R3 ASE. */ +#define AFL_ASE_MIPS16E2 0x00004000 /* MIPS16e2 ASE. */ +#define AFL_ASE_MASK 0x00007fff /* All ASEs. */ + +/* Values for the isa_ext word of an ABI flags structure. */ + +#define AFL_EXT_XLR 1 /* RMI Xlr instruction. */ +#define AFL_EXT_OCTEON2 2 /* Cavium Networks Octeon2. */ +#define AFL_EXT_OCTEONP 3 /* Cavium Networks OcteonP. */ +#define AFL_EXT_LOONGSON_3A 4 /* Loongson 3A. */ +#define AFL_EXT_OCTEON 5 /* Cavium Networks Octeon. */ +#define AFL_EXT_5900 6 /* MIPS R5900 instruction. */ +#define AFL_EXT_4650 7 /* MIPS R4650 instruction. */ +#define AFL_EXT_4010 8 /* LSI R4010 instruction. */ +#define AFL_EXT_4100 9 /* NEC VR4100 instruction. */ +#define AFL_EXT_3900 10 /* Toshiba R3900 instruction. */ +#define AFL_EXT_10000 11 /* MIPS R10000 instruction. */ +#define AFL_EXT_SB1 12 /* Broadcom SB-1 instruction. */ +#define AFL_EXT_4111 13 /* NEC VR4111/VR4181 instruction. */ +#define AFL_EXT_4120 14 /* NEC VR4120 instruction. */ +#define AFL_EXT_5400 15 /* NEC VR5400 instruction. */ +#define AFL_EXT_5500 16 /* NEC VR5500 instruction. */ +#define AFL_EXT_LOONGSON_2E 17 /* ST Microelectronics Loongson 2E. */ +#define AFL_EXT_LOONGSON_2F 18 /* ST Microelectronics Loongson 2F. */ +#define AFL_EXT_OCTEON3 19 /* Cavium Networks Octeon3. */ +#define AFL_EXT_INTERAPTIV_MR2 20 /* Imagination interAptiv MR2. */ + +/* Masks for the flags1 word of an ABI flags structure. */ +#define AFL_FLAGS1_ODDSPREG 1 /* Uses odd single-precision registers. */ + +extern unsigned int bfd_mips_isa_ext (bfd *); + + +/* Object attribute tags. */ +enum +{ + /* 0-3 are generic. */ + + /* Floating-point ABI used by this object file. */ + Tag_GNU_MIPS_ABI_FP = 4, + + /* MSA ABI used by this object file. */ + Tag_GNU_MIPS_ABI_MSA = 8, +}; + +/* Object attribute values. */ +enum +{ + /* Values defined for Tag_GNU_MIPS_ABI_FP. */ + + /* Not tagged or not using any ABIs affected by the differences. */ + Val_GNU_MIPS_ABI_FP_ANY = 0, + + /* Using hard-float -mdouble-float. */ + Val_GNU_MIPS_ABI_FP_DOUBLE = 1, + + /* Using hard-float -msingle-float. */ + Val_GNU_MIPS_ABI_FP_SINGLE = 2, + + /* Using soft-float. */ + Val_GNU_MIPS_ABI_FP_SOFT = 3, + + /* Using -mips32r2 -mfp64. */ + Val_GNU_MIPS_ABI_FP_OLD_64 = 4, + + /* Using -mfpxx */ + Val_GNU_MIPS_ABI_FP_XX = 5, + + /* Using -mips32r2 -mfp64. */ + Val_GNU_MIPS_ABI_FP_64 = 6, + + /* Using -mips32r2 -mfp64 -mno-odd-spreg. */ + Val_GNU_MIPS_ABI_FP_64A = 7, + + /* This is reserved for backward-compatibility with an earlier + implementation of the MIPS NaN2008 functionality. */ + Val_GNU_MIPS_ABI_FP_NAN2008 = 8, + + /* Values defined for Tag_GNU_MIPS_ABI_MSA. */ + + /* Not tagged or not using any ABIs affected by the differences. */ + Val_GNU_MIPS_ABI_MSA_ANY = 0, + + /* Using 128-bit MSA. */ + Val_GNU_MIPS_ABI_MSA_128 = 1, +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _ELF_MIPS_H */ diff --git a/support/sdbinutils/include/elf/mmix.h b/support/sdbinutils/include/elf/mmix.h new file mode 100644 index 0000000..e8ca137 --- /dev/null +++ b/support/sdbinutils/include/elf/mmix.h @@ -0,0 +1,173 @@ +/* MMIX support for BFD. + Copyright (C) 2001-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file holds definitions specific to the MMIX ELF ABI. */ + +#ifndef ELF_MMIX_H +#define ELF_MMIX_H + +#include "elf/reloc-macros.h" + +/* Relocations. See the reloc table in bfd/elf64-mmix.c for details. */ +START_RELOC_NUMBERS (elf_mmix_reloc_type) + RELOC_NUMBER (R_MMIX_NONE, 0) + + /* Standard absolute relocations. */ + RELOC_NUMBER (R_MMIX_8, 1) + RELOC_NUMBER (R_MMIX_16, 2) + RELOC_NUMBER (R_MMIX_24, 3) + RELOC_NUMBER (R_MMIX_32, 4) + RELOC_NUMBER (R_MMIX_64, 5) + + /* Standard relative relocations. */ + RELOC_NUMBER (R_MMIX_PC_8, 6) + RELOC_NUMBER (R_MMIX_PC_16, 7) + RELOC_NUMBER (R_MMIX_PC_24, 8) + RELOC_NUMBER (R_MMIX_PC_32, 9) + RELOC_NUMBER (R_MMIX_PC_64, 10) + + /* GNU extensions for C++ vtables. */ + RELOC_NUMBER (R_MMIX_GNU_VTINHERIT, 11) + RELOC_NUMBER (R_MMIX_GNU_VTENTRY, 12) + + /* A GETA instruction. */ + RELOC_NUMBER (R_MMIX_GETA, 13) + RELOC_NUMBER (R_MMIX_GETA_1, 14) + RELOC_NUMBER (R_MMIX_GETA_2, 15) + RELOC_NUMBER (R_MMIX_GETA_3, 16) + + /* A conditional branch instruction. */ + RELOC_NUMBER (R_MMIX_CBRANCH, 17) + RELOC_NUMBER (R_MMIX_CBRANCH_J, 18) + RELOC_NUMBER (R_MMIX_CBRANCH_1, 19) + RELOC_NUMBER (R_MMIX_CBRANCH_2, 20) + RELOC_NUMBER (R_MMIX_CBRANCH_3, 21) + + /* A PUSHJ instruction. */ + RELOC_NUMBER (R_MMIX_PUSHJ, 22) + RELOC_NUMBER (R_MMIX_PUSHJ_1, 23) + RELOC_NUMBER (R_MMIX_PUSHJ_2, 24) + RELOC_NUMBER (R_MMIX_PUSHJ_3, 25) + + /* A JMP instruction. */ + RELOC_NUMBER (R_MMIX_JMP, 26) + RELOC_NUMBER (R_MMIX_JMP_1, 27) + RELOC_NUMBER (R_MMIX_JMP_2, 28) + RELOC_NUMBER (R_MMIX_JMP_3, 29) + + /* A relative address such as in a GETA or a branch. */ + RELOC_NUMBER (R_MMIX_ADDR19, 30) + + /* A relative address such as in a JMP (only). */ + RELOC_NUMBER (R_MMIX_ADDR27, 31) + + /* A general register or a number 0..255. */ + RELOC_NUMBER (R_MMIX_REG_OR_BYTE, 32) + + /* A general register. */ + RELOC_NUMBER (R_MMIX_REG, 33) + + /* A global register and an offset, the global register (allocated at + link time) contents plus the offset made equivalent to the relocation + expression at link time. The relocation must point at the Y field of + an instruction. */ + RELOC_NUMBER (R_MMIX_BASE_PLUS_OFFSET, 34) + + /* A LOCAL assertion. */ + RELOC_NUMBER (R_MMIX_LOCAL, 35) + + /* A PUSHJ instruction, generating a stub if it does not reach. */ + RELOC_NUMBER (R_MMIX_PUSHJ_STUBBABLE, 36) +END_RELOC_NUMBERS (R_MMIX_max) + + +/* Section Attributes. */ +/* A section containing necessary information for relaxation. */ +#define SHF_MMIX_CANRELAX 0x80000000 + +/* Symbol attributes. */ +/* A symbol with this section-index is a register. */ +#define SHN_REGISTER SHN_LOPROC + +/* This section holds contents for each initialized register, at VMA + regno*8. A symbol relative to this section will be transformed to an + absolute symbol with the value corresponding to the register number at + final link time. A symbol with a value outside the inclusive range + 32*8 .. 254*8 is an error. It is highly recommended to only use an + upper bound of 253*8 or lower as specified in the (currently + unspecified) ABI. */ +#define MMIX_REG_CONTENTS_SECTION_NAME ".MMIX.reg_contents" + +/* At link time, a section by this name is created, expected to be + included in MMIX_REG_CONTENTS_SECTION_NAME in the output. */ +#define MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME \ + ".MMIX.reg_contents.linker_allocated" + +/* This is a faked section holding symbols with SHN_REGISTER. Don't + confuse it with MMIX_REG_CONTENTS_SECTION_NAME; this one has no + contents, just values. It is an error for a value in this section to + be outside the range 32..255 and it must never become an actual section + in an object file. */ +#define MMIX_REG_SECTION_NAME "*REG*" + +/* Appended with a number N=0..65535, this is a representation of the + mmixal "BSPEC N" ... "ESPEC" directive pair; the contents go into an + ELF section by name ".MMIX.spec_data.N". */ +#define MMIX_OTHER_SPEC_SECTION_PREFIX ".MMIX.spec_data." + +/* A section SECNAME is noted to start at "__.MMIX.start.SECNAME" by the + presence of this symbol. Currently only implemented for ".text" + through the symbol "__.MMIX.start..text". */ +#define MMIX_LOC_SECTION_START_SYMBOL_PREFIX "__.MMIX.start." + +/* This symbol is always a function. */ +#define MMIX_START_SYMBOL_NAME "Main" + + +/* We smuggle in a few MMO specifics here. We don't make a specific MMO + file, since we can't reasonably support MMO without ELF; we have to + include this file anyway. */ + +#define MMO_TEXT_SECTION_NAME ".text" +#define MMO_DATA_SECTION_NAME ".data" + +/* A definition for the flags we put in spec data in files. A copy of our + own of some flags to keep immune to BFD flag changes. See section.c of + 2001-07-18 for flag documentation. */ +#define MMO_SEC_ALLOC 0x001 +#define MMO_SEC_LOAD 0x002 +#define MMO_SEC_RELOC 0x004 +#define MMO_SEC_READONLY 0x010 +#define MMO_SEC_CODE 0x020 +#define MMO_SEC_DATA 0x040 +#define MMO_SEC_NEVER_LOAD 0x400 +#define MMO_SEC_IS_COMMON 0x8000 +#define MMO_SEC_DEBUGGING 0x10000 + +#ifdef BFD_ARCH_SIZE +extern bfd_boolean _bfd_mmix_before_linker_allocation + (bfd *, struct bfd_link_info *); +extern bfd_boolean _bfd_mmix_after_linker_allocation + (bfd *, struct bfd_link_info *); +extern bfd_boolean _bfd_mmix_check_all_relocs + (bfd *, struct bfd_link_info *); +#endif + +#endif /* ELF_MMIX_H */ diff --git a/support/sdbinutils/include/elf/mn10200.h b/support/sdbinutils/include/elf/mn10200.h new file mode 100644 index 0000000..6d8277e --- /dev/null +++ b/support/sdbinutils/include/elf/mn10200.h @@ -0,0 +1,40 @@ +/* MN10200 ELF support for BFD. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file holds definitions specific to the MN10200 ELF ABI. */ + +#ifndef _ELF_MN10200_H +#define _ELF_MN10200_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_mn10200_reloc_type) + RELOC_NUMBER (R_MN10200_NONE, 0) + RELOC_NUMBER (R_MN10200_32, 1) + RELOC_NUMBER (R_MN10200_16, 2) + RELOC_NUMBER (R_MN10200_8, 3) + RELOC_NUMBER (R_MN10200_24, 4) + RELOC_NUMBER (R_MN10200_PCREL8, 5) + RELOC_NUMBER (R_MN10200_PCREL16, 6) + RELOC_NUMBER (R_MN10200_PCREL24, 7) +END_RELOC_NUMBERS (R_MN10200_max) + +#endif /* _ELF_MN10200_H */ diff --git a/support/sdbinutils/include/elf/mn10300.h b/support/sdbinutils/include/elf/mn10300.h new file mode 100644 index 0000000..26f4f0c --- /dev/null +++ b/support/sdbinutils/include/elf/mn10300.h @@ -0,0 +1,80 @@ +/* MN10300 ELF support for BFD. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file holds definitions specific to the MN10300 ELF ABI. */ + +#ifndef _ELF_MN10300_H +#define _ELF_MN10300_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_mn10300_reloc_type) + RELOC_NUMBER (R_MN10300_NONE, 0) + RELOC_NUMBER (R_MN10300_32, 1) + RELOC_NUMBER (R_MN10300_16, 2) + RELOC_NUMBER (R_MN10300_8, 3) + RELOC_NUMBER (R_MN10300_PCREL32, 4) + RELOC_NUMBER (R_MN10300_PCREL16, 5) + RELOC_NUMBER (R_MN10300_PCREL8, 6) + RELOC_NUMBER (R_MN10300_GNU_VTINHERIT, 7) + RELOC_NUMBER (R_MN10300_GNU_VTENTRY, 8) + RELOC_NUMBER (R_MN10300_24, 9) + RELOC_NUMBER (R_MN10300_GOTPC32, 10) + RELOC_NUMBER (R_MN10300_GOTPC16, 11) + RELOC_NUMBER (R_MN10300_GOTOFF32, 12) + RELOC_NUMBER (R_MN10300_GOTOFF24, 13) + RELOC_NUMBER (R_MN10300_GOTOFF16, 14) + RELOC_NUMBER (R_MN10300_PLT32, 15) + RELOC_NUMBER (R_MN10300_PLT16, 16) + RELOC_NUMBER (R_MN10300_GOT32, 17) + RELOC_NUMBER (R_MN10300_GOT24, 18) + RELOC_NUMBER (R_MN10300_GOT16, 19) + RELOC_NUMBER (R_MN10300_COPY, 20) + RELOC_NUMBER (R_MN10300_GLOB_DAT, 21) + RELOC_NUMBER (R_MN10300_JMP_SLOT, 22) + RELOC_NUMBER (R_MN10300_RELATIVE, 23) + RELOC_NUMBER (R_MN10300_TLS_GD, 24) + RELOC_NUMBER (R_MN10300_TLS_LD, 25) + RELOC_NUMBER (R_MN10300_TLS_LDO, 26) + RELOC_NUMBER (R_MN10300_TLS_GOTIE, 27) + RELOC_NUMBER (R_MN10300_TLS_IE, 28) + RELOC_NUMBER (R_MN10300_TLS_LE, 29) + RELOC_NUMBER (R_MN10300_TLS_DTPMOD, 30) + RELOC_NUMBER (R_MN10300_TLS_DTPOFF, 31) + RELOC_NUMBER (R_MN10300_TLS_TPOFF, 32) + RELOC_NUMBER (R_MN10300_SYM_DIFF, 33) + RELOC_NUMBER (R_MN10300_ALIGN, 34) +END_RELOC_NUMBERS (R_MN10300_MAX) + +/* Machine variant if we know it. This field was invented at Cygnus, + but it is hoped that other vendors will adopt it. If some standard + is developed, this code should be changed to follow it. */ + +#define EF_MN10300_MACH 0x00FF0000 + +/* Cygnus is choosing values between 80 and 9F; + 00 - 7F should be left for a future standard; + the rest are open. */ + +#define E_MN10300_MACH_MN10300 0x00810000 +#define E_MN10300_MACH_AM33 0x00820000 +#define E_MN10300_MACH_AM33_2 0x00830000 +#endif /* _ELF_MN10300_H */ diff --git a/support/sdbinutils/include/elf/moxie.h b/support/sdbinutils/include/elf/moxie.h new file mode 100644 index 0000000..e1162c3 --- /dev/null +++ b/support/sdbinutils/include/elf/moxie.h @@ -0,0 +1,32 @@ +/* moxie ELF support for BFD. + Copyright (C) 2009-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_MOXIE_H +#define _ELF_MOXIE_H + +#include "elf/reloc-macros.h" + +/* Relocation types. */ +START_RELOC_NUMBERS (elf_moxie_reloc_type) + RELOC_NUMBER (R_MOXIE_NONE, 0) + RELOC_NUMBER (R_MOXIE_32, 1) + RELOC_NUMBER (R_MOXIE_PCREL10, 2) +END_RELOC_NUMBERS (R_MOXIE_max) + +#endif /* _ELF_MOXIE_H */ diff --git a/support/sdbinutils/include/elf/msp430.h b/support/sdbinutils/include/elf/msp430.h new file mode 100644 index 0000000..5cd03c0 --- /dev/null +++ b/support/sdbinutils/include/elf/msp430.h @@ -0,0 +1,101 @@ +/* MSP430 ELF support for BFD. + Copyright (C) 2002-2018 Free Software Foundation, Inc. + Contributed by Dmitry Diky + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_MSP430_H +#define _ELF_MSP430_H + +#include "elf/reloc-macros.h" + +/* Processor specific flags for the ELF header e_flags field. */ +#define EF_MSP430_MACH 0xff + +#define E_MSP430_MACH_MSP430x11 11 +#define E_MSP430_MACH_MSP430x11x1 110 +#define E_MSP430_MACH_MSP430x12 12 +#define E_MSP430_MACH_MSP430x13 13 +#define E_MSP430_MACH_MSP430x14 14 +#define E_MSP430_MACH_MSP430x15 15 +#define E_MSP430_MACH_MSP430x16 16 +#define E_MSP430_MACH_MSP430x20 20 +#define E_MSP430_MACH_MSP430x22 22 +#define E_MSP430_MACH_MSP430x23 23 +#define E_MSP430_MACH_MSP430x24 24 +#define E_MSP430_MACH_MSP430x26 26 +#define E_MSP430_MACH_MSP430x31 31 +#define E_MSP430_MACH_MSP430x32 32 +#define E_MSP430_MACH_MSP430x33 33 +#define E_MSP430_MACH_MSP430x41 41 +#define E_MSP430_MACH_MSP430x42 42 +#define E_MSP430_MACH_MSP430x43 43 +#define E_MSP430_MACH_MSP430x44 44 +#define E_MSP430_MACH_MSP430X 45 +#define E_MSP430_MACH_MSP430x46 46 +#define E_MSP430_MACH_MSP430x47 47 +#define E_MSP430_MACH_MSP430x54 54 + +#define SHT_MSP430_ATTRIBUTES 0x70000003 /* Section holds ABI attributes. */ +#define SHT_MSP430_SEC_FLAGS 0x7f000005 /* Holds TI compiler's section flags. */ +#define SHT_MSP430_SYM_ALIASES 0x7f000006 /* Holds TI compiler's symbol aliases. */ + +/* Tag values for an attribute section. */ +#define OFBA_MSPABI_Tag_ISA 4 +#define OFBA_MSPABI_Tag_Code_Model 6 +#define OFBA_MSPABI_Tag_Data_Model 8 + +/* Relocations. */ +START_RELOC_NUMBERS (elf_msp430_reloc_type) + RELOC_NUMBER (R_MSP430_NONE, 0) + RELOC_NUMBER (R_MSP430_32, 1) + RELOC_NUMBER (R_MSP430_10_PCREL, 2) + RELOC_NUMBER (R_MSP430_16, 3) + RELOC_NUMBER (R_MSP430_16_PCREL, 4) + RELOC_NUMBER (R_MSP430_16_BYTE, 5) + RELOC_NUMBER (R_MSP430_16_PCREL_BYTE, 6) + RELOC_NUMBER (R_MSP430_2X_PCREL, 7) + RELOC_NUMBER (R_MSP430_RL_PCREL, 8) + RELOC_NUMBER (R_MSP430_8, 9) + RELOC_NUMBER (R_MSP430_SYM_DIFF, 10) +END_RELOC_NUMBERS (R_MSP430_max) + +START_RELOC_NUMBERS (elf_msp430x_reloc_type) + RELOC_NUMBER (R_MSP430_ABS32, 1) /* aka R_MSP430_32 */ + RELOC_NUMBER (R_MSP430_ABS16, 2) /* aka R_MSP430_16 */ + RELOC_NUMBER (R_MSP430_ABS8, 3) + RELOC_NUMBER (R_MSP430_PCR16, 4) /* aka R_MSP430_16_PCREL */ + RELOC_NUMBER (R_MSP430X_PCR20_EXT_SRC, 5) + RELOC_NUMBER (R_MSP430X_PCR20_EXT_DST, 6) + RELOC_NUMBER (R_MSP430X_PCR20_EXT_ODST, 7) + RELOC_NUMBER (R_MSP430X_ABS20_EXT_SRC, 8) + RELOC_NUMBER (R_MSP430X_ABS20_EXT_DST, 9) + RELOC_NUMBER (R_MSP430X_ABS20_EXT_ODST, 10) + RELOC_NUMBER (R_MSP430X_ABS20_ADR_SRC, 11) + RELOC_NUMBER (R_MSP430X_ABS20_ADR_DST, 12) + RELOC_NUMBER (R_MSP430X_PCR16, 13) /* Like R_MSP430_PCR16 but with overflow checking. */ + RELOC_NUMBER (R_MSP430X_PCR20_CALL, 14) + RELOC_NUMBER (R_MSP430X_ABS16, 15) /* Like R_MSP430_ABS16 but with overflow checking. */ + RELOC_NUMBER (R_MSP430_ABS_HI16, 16) + RELOC_NUMBER (R_MSP430_PREL31, 17) + RELOC_NUMBER (R_MSP430_EHTYPE, 18) /* Mentioned in ABI. */ + RELOC_NUMBER (R_MSP430X_10_PCREL, 19) /* Red Hat invention. Used for Jump instructions. */ + RELOC_NUMBER (R_MSP430X_2X_PCREL, 20) /* Red Hat invention. Used for relaxing jumps. */ + RELOC_NUMBER (R_MSP430X_SYM_DIFF, 21) /* Red Hat invention. Used for relaxing debug info. */ +END_RELOC_NUMBERS (R_MSP430x_max) + +#endif /* _ELF_MSP430_H */ diff --git a/support/sdbinutils/include/elf/mt.h b/support/sdbinutils/include/elf/mt.h new file mode 100644 index 0000000..53fecb0 --- /dev/null +++ b/support/sdbinutils/include/elf/mt.h @@ -0,0 +1,46 @@ +/* MS1 ELF support for BFD. + Copyright (C) 2000-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_MT_H +#define _ELF_MT_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_mt_reloc_type) + RELOC_NUMBER (R_MT_NONE, 0) + RELOC_NUMBER (R_MT_16, 1) + RELOC_NUMBER (R_MT_32, 2) + RELOC_NUMBER (R_MT_32_PCREL, 3) + RELOC_NUMBER (R_MT_PC16, 4) + RELOC_NUMBER (R_MT_HI16, 5) + RELOC_NUMBER (R_MT_LO16, 6) +END_RELOC_NUMBERS(R_MT_max) + +#define EF_MT_CPU_MRISC 0x00000001 /* default */ +#define EF_MT_CPU_MRISC2 0x00000002 /* MRISC2 */ +#define EF_MT_CPU_MS2 0x00000003 /* MS2 */ +#define EF_MT_CPU_MASK 0x00000003 /* specific cpu bits */ +#define EF_MT_ALL_FLAGS (EF_MT_CPU_MASK) + +/* The location of the memory mapped hardware stack. */ +#define MT_STACK_VALUE 0x0f000000 +#define MT_STACK_SIZE 0x20 + +#endif /* _ELF_MT_H */ diff --git a/support/sdbinutils/include/elf/nds32.h b/support/sdbinutils/include/elf/nds32.h new file mode 100644 index 0000000..1b3a321 --- /dev/null +++ b/support/sdbinutils/include/elf/nds32.h @@ -0,0 +1,299 @@ +/* NDS32 ELF support for BFD. + Copyright (C) 2012-2018 Free Software Foundation, Inc. + Contributed by Andes Technology Corporation. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#ifndef _ELF_NDS32_H +#define _ELF_NDS32_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_nds32_reloc_type) + RELOC_NUMBER (R_NDS32_NONE, 0) + /* REL relocations. */ + RELOC_NUMBER (R_NDS32_16, 1) + RELOC_NUMBER (R_NDS32_32, 2) + RELOC_NUMBER (R_NDS32_20, 3) + RELOC_NUMBER (R_NDS32_9_PCREL, 4) + RELOC_NUMBER (R_NDS32_15_PCREL, 5) + RELOC_NUMBER (R_NDS32_17_PCREL, 6) + RELOC_NUMBER (R_NDS32_25_PCREL, 7) + RELOC_NUMBER (R_NDS32_HI20, 8) + RELOC_NUMBER (R_NDS32_LO12S3, 9) + RELOC_NUMBER (R_NDS32_LO12S2, 10) + RELOC_NUMBER (R_NDS32_LO12S1, 11) + RELOC_NUMBER (R_NDS32_LO12S0, 12) + RELOC_NUMBER (R_NDS32_SDA15S3, 13) + RELOC_NUMBER (R_NDS32_SDA15S2, 14) + RELOC_NUMBER (R_NDS32_SDA15S1, 15) + RELOC_NUMBER (R_NDS32_SDA15S0, 16) + RELOC_NUMBER (R_NDS32_GNU_VTINHERIT, 17) + RELOC_NUMBER (R_NDS32_GNU_VTENTRY, 18) + + /* RELA relocations. */ + RELOC_NUMBER (R_NDS32_16_RELA, 19) + RELOC_NUMBER (R_NDS32_32_RELA, 20) + RELOC_NUMBER (R_NDS32_20_RELA, 21) + RELOC_NUMBER (R_NDS32_9_PCREL_RELA, 22) + RELOC_NUMBER (R_NDS32_15_PCREL_RELA, 23) + RELOC_NUMBER (R_NDS32_17_PCREL_RELA, 24) + RELOC_NUMBER (R_NDS32_25_PCREL_RELA, 25) + RELOC_NUMBER (R_NDS32_HI20_RELA, 26) + RELOC_NUMBER (R_NDS32_LO12S3_RELA, 27) + RELOC_NUMBER (R_NDS32_LO12S2_RELA, 28) + RELOC_NUMBER (R_NDS32_LO12S1_RELA, 29) + RELOC_NUMBER (R_NDS32_LO12S0_RELA, 30) + RELOC_NUMBER (R_NDS32_SDA15S3_RELA, 31) + RELOC_NUMBER (R_NDS32_SDA15S2_RELA, 32) + RELOC_NUMBER (R_NDS32_SDA15S1_RELA, 33) + RELOC_NUMBER (R_NDS32_SDA15S0_RELA, 34) + RELOC_NUMBER (R_NDS32_RELA_GNU_VTINHERIT, 35) + RELOC_NUMBER (R_NDS32_RELA_GNU_VTENTRY, 36) + + RELOC_NUMBER (R_NDS32_GOT20, 37) + RELOC_NUMBER (R_NDS32_25_PLTREL, 38) + RELOC_NUMBER (R_NDS32_COPY, 39) + RELOC_NUMBER (R_NDS32_GLOB_DAT, 40) + RELOC_NUMBER (R_NDS32_JMP_SLOT, 41) + RELOC_NUMBER (R_NDS32_RELATIVE, 42) + RELOC_NUMBER (R_NDS32_GOTOFF, 43) + RELOC_NUMBER (R_NDS32_GOTPC20, 44) + RELOC_NUMBER (R_NDS32_GOT_HI20, 45) + RELOC_NUMBER (R_NDS32_GOT_LO12, 46) + RELOC_NUMBER (R_NDS32_GOTPC_HI20, 47) + RELOC_NUMBER (R_NDS32_GOTPC_LO12, 48) + RELOC_NUMBER (R_NDS32_GOTOFF_HI20, 49) + RELOC_NUMBER (R_NDS32_GOTOFF_LO12, 50) + RELOC_NUMBER (R_NDS32_INSN16, 51) + RELOC_NUMBER (R_NDS32_LABEL, 52) + RELOC_NUMBER (R_NDS32_LONGCALL1, 53) + RELOC_NUMBER (R_NDS32_LONGCALL2, 54) + RELOC_NUMBER (R_NDS32_LONGCALL3, 55) + RELOC_NUMBER (R_NDS32_LONGJUMP1, 56) + RELOC_NUMBER (R_NDS32_LONGJUMP2, 57) + RELOC_NUMBER (R_NDS32_LONGJUMP3, 58) + RELOC_NUMBER (R_NDS32_LOADSTORE, 59) + RELOC_NUMBER (R_NDS32_9_FIXED_RELA, 60) + RELOC_NUMBER (R_NDS32_15_FIXED_RELA, 61) + RELOC_NUMBER (R_NDS32_17_FIXED_RELA, 62) + RELOC_NUMBER (R_NDS32_25_FIXED_RELA, 63) + RELOC_NUMBER (R_NDS32_PLTREL_HI20, 64) /* This is obsoleted. */ + RELOC_NUMBER (R_NDS32_PLTREL_LO12, 65) /* This is obsoleted. */ + RELOC_NUMBER (R_NDS32_PLT_GOTREL_HI20, 66) + RELOC_NUMBER (R_NDS32_PLT_GOTREL_LO12, 67) + RELOC_NUMBER (R_NDS32_SDA12S2_DP_RELA, 68) + RELOC_NUMBER (R_NDS32_SDA12S2_SP_RELA, 69) + RELOC_NUMBER (R_NDS32_LO12S2_DP_RELA, 70) + RELOC_NUMBER (R_NDS32_LO12S2_SP_RELA, 71) + RELOC_NUMBER (R_NDS32_LO12S0_ORI_RELA, 72) + RELOC_NUMBER (R_NDS32_SDA16S3_RELA, 73) + RELOC_NUMBER (R_NDS32_SDA17S2_RELA, 74) + RELOC_NUMBER (R_NDS32_SDA18S1_RELA, 75) + RELOC_NUMBER (R_NDS32_SDA19S0_RELA, 76) + RELOC_NUMBER (R_NDS32_DWARF2_OP1_RELA, 77) + RELOC_NUMBER (R_NDS32_DWARF2_OP2_RELA, 78) + RELOC_NUMBER (R_NDS32_DWARF2_LEB_RELA, 79) + RELOC_NUMBER (R_NDS32_UPDATE_TA_RELA, 80) /* This is obsoleted. */ + RELOC_NUMBER (R_NDS32_9_PLTREL, 81) + RELOC_NUMBER (R_NDS32_PLT_GOTREL_LO20, 82) + RELOC_NUMBER (R_NDS32_PLT_GOTREL_LO15, 83) + RELOC_NUMBER (R_NDS32_PLT_GOTREL_LO19, 84) + RELOC_NUMBER (R_NDS32_GOT_LO15, 85) + RELOC_NUMBER (R_NDS32_GOT_LO19, 86) + RELOC_NUMBER (R_NDS32_GOTOFF_LO15, 87) + RELOC_NUMBER (R_NDS32_GOTOFF_LO19, 88) + RELOC_NUMBER (R_NDS32_GOT15S2_RELA, 89) + RELOC_NUMBER (R_NDS32_GOT17S2_RELA, 90) + RELOC_NUMBER (R_NDS32_5_RELA, 91) + RELOC_NUMBER (R_NDS32_10_UPCREL_RELA, 92) /* This is obsoleted. */ + RELOC_NUMBER (R_NDS32_SDA_FP7U2_RELA, 93) + RELOC_NUMBER (R_NDS32_WORD_9_PCREL_RELA, 94) + RELOC_NUMBER (R_NDS32_25_ABS_RELA, 95) + RELOC_NUMBER (R_NDS32_17IFC_PCREL_RELA, 96) + RELOC_NUMBER (R_NDS32_10IFCU_PCREL_RELA, 97) + RELOC_NUMBER (R_NDS32_TLS_LE_HI20, 98) + RELOC_NUMBER (R_NDS32_TLS_LE_LO12, 99) + RELOC_NUMBER (R_NDS32_TLS_IE_HI20, 100) + RELOC_NUMBER (R_NDS32_TLS_IE_LO12S2, 101) + RELOC_NUMBER (R_NDS32_TLS_TPOFF, 102) + RELOC_NUMBER (R_NDS32_TLS_LE_20, 103) + RELOC_NUMBER (R_NDS32_TLS_LE_15S0, 104) + RELOC_NUMBER (R_NDS32_TLS_LE_15S1, 105) + RELOC_NUMBER (R_NDS32_TLS_LE_15S2, 106) + RELOC_NUMBER (R_NDS32_LONGCALL4, 107) + RELOC_NUMBER (R_NDS32_LONGCALL5, 108) + RELOC_NUMBER (R_NDS32_LONGCALL6, 109) + RELOC_NUMBER (R_NDS32_LONGJUMP4, 110) + RELOC_NUMBER (R_NDS32_LONGJUMP5, 111) + RELOC_NUMBER (R_NDS32_LONGJUMP6, 112) + RELOC_NUMBER (R_NDS32_LONGJUMP7, 113) + + RELOC_NUMBER (R_NDS32_RELAX_ENTRY, 192) + RELOC_NUMBER (R_NDS32_GOT_SUFF, 193) + RELOC_NUMBER (R_NDS32_GOTOFF_SUFF, 194) + RELOC_NUMBER (R_NDS32_PLT_GOT_SUFF, 195) + RELOC_NUMBER (R_NDS32_MULCALL_SUFF, 196) /* This is obsoleted. */ + RELOC_NUMBER (R_NDS32_PTR, 197) + RELOC_NUMBER (R_NDS32_PTR_COUNT, 198) + RELOC_NUMBER (R_NDS32_PTR_RESOLVED, 199) + RELOC_NUMBER (R_NDS32_PLTBLOCK, 200) /* This is obsoleted. */ + RELOC_NUMBER (R_NDS32_RELAX_REGION_BEGIN, 201) + RELOC_NUMBER (R_NDS32_RELAX_REGION_END, 202) + RELOC_NUMBER (R_NDS32_MINUEND, 203) + RELOC_NUMBER (R_NDS32_SUBTRAHEND, 204) + RELOC_NUMBER (R_NDS32_DIFF8, 205) + RELOC_NUMBER (R_NDS32_DIFF16, 206) + RELOC_NUMBER (R_NDS32_DIFF32, 207) + RELOC_NUMBER (R_NDS32_DIFF_ULEB128, 208) + RELOC_NUMBER (R_NDS32_DATA, 209) + RELOC_NUMBER (R_NDS32_TRAN, 210) + RELOC_NUMBER (R_NDS32_TLS_LE_ADD, 211) + RELOC_NUMBER (R_NDS32_TLS_LE_LS, 212) + RELOC_NUMBER (R_NDS32_EMPTY, 213) + +END_RELOC_NUMBERS (R_NDS32_max) + +/* Processor specific section indices. These sections do not actually + exist. Symbols with a st_shndx field corresponding to one of these + values have a special meaning. */ + +/* Processor specific flags for the ELF header e_flags field. + + 31 28 27 8 7 4 3 0 + --------------------------------------------- + | ARCH | CONFUGURAION FIELD | ABI | ELF_VER | + --------------------------------------------- */ + +/* Architechure definition. */ + +/* 4-bit (b31-b28) nds32 architecture field. + We can have up to 15 architectures; 0000 is for unknown. */ +#define EF_NDS_ARCH 0xF0000000 +#define EF_NDS_ARCH_SHIFT 28 +/* There could be more architectures. For now, only n1 and n1h. */ +#define E_NDS_ARCH_STAR_RESERVED 0x00000000 +#define E_NDS_ARCH_STAR_V1_0 0x10000000 +#define E_NDS_ARCH_STAR_V2_0 0x20000000 +#define E_NDS_ARCH_STAR_V3_0 0x30000000 +#define E_NDS_ARCH_STAR_V3_M 0x40000000 +#define E_NDS_ARCH_STAR_V0_9 0x90000000 /* Obsoleted. */ +/* n1 code. */ +#define E_N1_ARCH E_NDS_ARCH_STAR_V0_9 +/* n1h code. */ +#define E_N1H_ARCH E_NDS_ARCH_STAR_V1_0 + + +/* Configuration field definitioans. */ +#define EF_NDS_INST 0x0FFFFF00 + +/* E_NDS_ARCH_STAR_V1_0 configuration fields. + + E_NDS_ARCH_STAR_V2_0 configuration fields. + These are discarded in v2. + * E_NDS32_HAS_MFUSR_PC_INST 0x00000100 + * E_NDS32_HAS_DIV_INST 0x00002000 + * E_NDS32_HAS_NO_MAC_INST 0x00100000 + These are added in v2. + * E_NDS32_HAS_DIV_DX_INST 0x00002000 + * E_NDS32_HAS_MAC_DX_INST 0x00100000 */ + +/* MFUSR rt, PC and correct ISYNC, MSYNC instructions. + Old N1213HC has no such instructions. */ +#define E_NDS32_HAS_MFUSR_PC_INST 0x00000100 /* Reclaimed. */ +#define E_NDS32_HAS_EX9_INST 0x00000100 /* v3, ELF 1.4. */ +/* C/C++ performance extension instructions. */ +#define E_NDS32_HAS_EXT_INST 0x00000200 +/* Performance extension set II instructions. */ +#define E_NDS32_HAS_EXT2_INST 0x00000400 +/* Single precision Floating point processor instructions. */ +#define E_NDS32_HAS_FPU_INST 0x00000800 +/* Audio instructions with 32-bit audio dx.lo register. */ +#define E_NDS32_HAS_AUDIO_INST 0x00001000 +/* DIV instructions. */ +#define E_NDS32_HAS_DIV_INST 0x00002000 /* Reclaimed. */ +/* DIV instructions using d0/d1. */ +#define E_NDS32_HAS_DIV_DX_INST 0x00002000 /* v2. */ +/* 16-bit instructions. */ +#define E_NDS32_HAS_16BIT_INST 0x00004000 /* Reclaimed. */ +#define E_NDS32_HAS_IFC_INST 0x00004000 /* v3, ELF 1.4. */ +/* String operation instructions. */ +#define E_NDS32_HAS_STRING_INST 0x00008000 +/* Reduced register file. */ +#define E_NDS32_HAS_REDUCED_REGS 0x00010000 +/* Video instructions. */ +#define E_NDS32_HAS_VIDEO_INST 0x00020000 /* Reclaimed. */ +#define E_NDS32_HAS_SATURATION_INST 0x00020000 /* v3, ELF 1.4. */ +/* Encription instructions. */ +#define E_NDS32_HAS_ENCRIPT_INST 0x00040000 +/* Doulbe Precision Floating point processor instructions. */ +#define E_NDS32_HAS_FPU_DP_INST 0x00080000 +/* No MAC instruction used. */ +#define E_NDS32_HAS_NO_MAC_INST 0x00100000 /* Reclaimed when V2/V3. */ +/* MAC instruction using d0/d1. */ +#define E_NDS32_HAS_MAC_DX_INST 0x00100000 /* v2. */ +/* L2 cache instruction. */ +#define E_NDS32_HAS_L2C_INST 0x00200000 +/* FPU registers configuration when FPU SP/DP presents; 0x00c00000. */ +#define E_NDS32_FPU_REG_CONF_SHIFT 22 +#define E_NDS32_FPU_REG_CONF (0x3 << E_NDS32_FPU_REG_CONF_SHIFT) +#define E_NDS32_FPU_REG_8SP_4DP 0x0 +#define E_NDS32_FPU_REG_16SP_8DP 0x1 +#define E_NDS32_FPU_REG_32SP_16DP 0x2 +#define E_NDS32_FPU_REG_32SP_32DP 0x3 +/* FPU MAC instruction used. */ +#define E_NDS32_HAS_FPU_MAC_INST 0x01000000 +/* <<>>. */ +#define E_NDS32_NULL 0x02000000 +/* PIC enabled. */ +#define E_NDS32_HAS_PIC 0x04000000 +/* Use custom section. */ +#define E_NDS32_HAS_CUSTOM_SEC 0x08000000 + +/* 4-bit for ABI signature, allow up to 16 ABIs + 0: for OLD ABI V0, phase out + 1: for V1 , starting with V0 toolchain + 2: for V2 + 3: for V2FP (fs0, fs1 as function parameter) + 4: for AABI */ +/* Only old N1213HC use V0. + New ABI is used due to return register is changed to r0 from r5. */ +#define EF_NDS_ABI 0x000000F0 +#define EF_NDS_ABI_SHIFT 4 +#define E_NDS_ABI_V0 0x00000000 +#define E_NDS_ABI_V1 0x00000010 +#define E_NDS_ABI_V2 0x00000020 +#define E_NDS_ABI_V2FP 0x00000030 +#define E_NDS_ABI_AABI 0x00000040 +#define E_NDS_ABI_V2FP_PLUS 0x00000050 + +/* This flag signifies the version of Andes ELF. + Some more information may exist somewhere which is TBD. */ +#define EF_NDS32_ELF_VERSION 0x0000000F +#define EF_NDS32_ELF_VERSION_SHIFT 0 + +/* Andes ELF Version 1.3 and before. */ +#define E_NDS32_ELF_VER_1_2 0x0 +/* Andes ELF Version 1.31. */ +#define E_NDS32_ELF_VER_1_3 0x1 +/* Andes ELF Version 1.4. Change the way we fix .debug_* and .gcc_except_table. + Change three bit for EX9, IFC and SAT. */ +#define E_NDS32_ELF_VER_1_4 0x2 + +#endif diff --git a/support/sdbinutils/include/elf/nios2.h b/support/sdbinutils/include/elf/nios2.h new file mode 100644 index 0000000..c34cf2a --- /dev/null +++ b/support/sdbinutils/include/elf/nios2.h @@ -0,0 +1,120 @@ +/* Altera Nios II ELF support for BFD. + Copyright (C) 2012-2018 Free Software Foundation, Inc. + Contributed by Nigel Gray (ngray@altera.com). + Contributed by Mentor Graphics, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + + +/* This file holds definitions specific to the Altera Nios II ELF ABI. Note + that most of this is not actually implemented by BFD. */ + +#ifndef _ELF_NIOS2_H +#define _ELF_NIOS2_H + +#include "elf/reloc-macros.h" + +/* The order of these numbers must match the order in + the elf_nios2_howto_table_rel table for the lookup + function to work properly. */ + +START_RELOC_NUMBERS (elf_nios2_reloc_type) + /* Relocs used by both R1 and R2, with different howtos to match + the respective encodings. */ + RELOC_NUMBER (R_NIOS2_NONE, 0) + RELOC_NUMBER (R_NIOS2_S16, 1) + RELOC_NUMBER (R_NIOS2_U16, 2) + RELOC_NUMBER (R_NIOS2_PCREL16, 3) + RELOC_NUMBER (R_NIOS2_CALL26, 4) + RELOC_NUMBER (R_NIOS2_IMM5, 5) + RELOC_NUMBER (R_NIOS2_CACHE_OPX, 6) + RELOC_NUMBER (R_NIOS2_IMM6, 7) + RELOC_NUMBER (R_NIOS2_IMM8, 8) + RELOC_NUMBER (R_NIOS2_HI16, 9) + RELOC_NUMBER (R_NIOS2_LO16, 10) + RELOC_NUMBER (R_NIOS2_HIADJ16, 11) + RELOC_NUMBER (R_NIOS2_BFD_RELOC_32, 12) + RELOC_NUMBER (R_NIOS2_BFD_RELOC_16, 13) + RELOC_NUMBER (R_NIOS2_BFD_RELOC_8, 14) + RELOC_NUMBER (R_NIOS2_GPREL, 15) + RELOC_NUMBER (R_NIOS2_GNU_VTINHERIT, 16) + RELOC_NUMBER (R_NIOS2_GNU_VTENTRY, 17) + RELOC_NUMBER (R_NIOS2_UJMP, 18) + RELOC_NUMBER (R_NIOS2_CJMP, 19) + RELOC_NUMBER (R_NIOS2_CALLR, 20) + RELOC_NUMBER (R_NIOS2_ALIGN, 21) + RELOC_NUMBER (R_NIOS2_GOT16, 22) + RELOC_NUMBER (R_NIOS2_CALL16, 23) + RELOC_NUMBER (R_NIOS2_GOTOFF_LO, 24) + RELOC_NUMBER (R_NIOS2_GOTOFF_HA, 25) + RELOC_NUMBER (R_NIOS2_PCREL_LO, 26) + RELOC_NUMBER (R_NIOS2_PCREL_HA, 27) + RELOC_NUMBER (R_NIOS2_TLS_GD16, 28) + RELOC_NUMBER (R_NIOS2_TLS_LDM16, 29) + RELOC_NUMBER (R_NIOS2_TLS_LDO16, 30) + RELOC_NUMBER (R_NIOS2_TLS_IE16, 31) + RELOC_NUMBER (R_NIOS2_TLS_LE16, 32) + RELOC_NUMBER (R_NIOS2_TLS_DTPMOD, 33) + RELOC_NUMBER (R_NIOS2_TLS_DTPREL, 34) + RELOC_NUMBER (R_NIOS2_TLS_TPREL, 35) + RELOC_NUMBER (R_NIOS2_COPY, 36) + RELOC_NUMBER (R_NIOS2_GLOB_DAT, 37) + RELOC_NUMBER (R_NIOS2_JUMP_SLOT, 38) + RELOC_NUMBER (R_NIOS2_RELATIVE, 39) + RELOC_NUMBER (R_NIOS2_GOTOFF, 40) + RELOC_NUMBER (R_NIOS2_CALL26_NOAT, 41) + RELOC_NUMBER (R_NIOS2_GOT_LO, 42) + RELOC_NUMBER (R_NIOS2_GOT_HA, 43) + RELOC_NUMBER (R_NIOS2_CALL_LO, 44) + RELOC_NUMBER (R_NIOS2_CALL_HA, 45) + + /* Relocs specific to R2. */ + RELOC_NUMBER (R_NIOS2_R2_S12, 64) + RELOC_NUMBER (R_NIOS2_R2_I10_1_PCREL, 65) + RELOC_NUMBER (R_NIOS2_R2_T1I7_1_PCREL, 66) + RELOC_NUMBER (R_NIOS2_R2_T1I7_2, 67) + RELOC_NUMBER (R_NIOS2_R2_T2I4, 68) + RELOC_NUMBER (R_NIOS2_R2_T2I4_1, 69) + RELOC_NUMBER (R_NIOS2_R2_T2I4_2, 70) + RELOC_NUMBER (R_NIOS2_R2_X1I7_2, 71) + RELOC_NUMBER (R_NIOS2_R2_X2L5, 72) + RELOC_NUMBER (R_NIOS2_R2_F1I5_2, 73) + RELOC_NUMBER (R_NIOS2_R2_L5I4X1, 74) + RELOC_NUMBER (R_NIOS2_R2_T1X1I6, 75) + RELOC_NUMBER (R_NIOS2_R2_T1X1I6_2, 76) + + /* Last reloc. */ + RELOC_NUMBER (R_NIOS2_ILLEGAL, 77) +END_RELOC_NUMBERS (R_NIOS2_maxext) + +/* Processor-specific section flags. */ + +/* This is used to mark gp-relative sections. */ +#define SHF_NIOS2_GPREL 0x10000000 + +/* Processor-specific dynamic array tags. */ + +/* Address of _gp. */ +#define DT_NIOS2_GP 0x70000002 + +/* Processor specific flags for the Elf header e_flags field. */ + +#define EF_NIOS2_ARCH_R1 0x00000000 +#define EF_NIOS2_ARCH_R2 0x00000001 + +#endif /* _ELF_NIOS2_H */ diff --git a/support/sdbinutils/include/elf/or1k.h b/support/sdbinutils/include/elf/or1k.h new file mode 100644 index 0000000..0c5e15b --- /dev/null +++ b/support/sdbinutils/include/elf/or1k.h @@ -0,0 +1,65 @@ +/* Or1k ELF support for BFD. + Copyright (C) 2001-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see */ + +#ifndef _ELF_OR1K_H +#define _ELF_OR1K_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_or1k_reloc_type) + RELOC_NUMBER (R_OR1K_NONE, 0) + RELOC_NUMBER (R_OR1K_32, 1) + RELOC_NUMBER (R_OR1K_16, 2) + RELOC_NUMBER (R_OR1K_8, 3) + RELOC_NUMBER (R_OR1K_LO_16_IN_INSN, 4) + RELOC_NUMBER (R_OR1K_HI_16_IN_INSN, 5) + RELOC_NUMBER (R_OR1K_INSN_REL_26, 6) + RELOC_NUMBER (R_OR1K_GNU_VTENTRY, 7) + RELOC_NUMBER (R_OR1K_GNU_VTINHERIT, 8) + RELOC_NUMBER (R_OR1K_32_PCREL, 9) + RELOC_NUMBER (R_OR1K_16_PCREL, 10) + RELOC_NUMBER (R_OR1K_8_PCREL, 11) + RELOC_NUMBER (R_OR1K_GOTPC_HI16, 12) + RELOC_NUMBER (R_OR1K_GOTPC_LO16, 13) + RELOC_NUMBER (R_OR1K_GOT16, 14) + RELOC_NUMBER (R_OR1K_PLT26, 15) + RELOC_NUMBER (R_OR1K_GOTOFF_HI16, 16) + RELOC_NUMBER (R_OR1K_GOTOFF_LO16, 17) + RELOC_NUMBER (R_OR1K_COPY, 18) + RELOC_NUMBER (R_OR1K_GLOB_DAT, 19) + RELOC_NUMBER (R_OR1K_JMP_SLOT, 20) + RELOC_NUMBER (R_OR1K_RELATIVE, 21) + RELOC_NUMBER (R_OR1K_TLS_GD_HI16, 22) + RELOC_NUMBER (R_OR1K_TLS_GD_LO16, 23) + RELOC_NUMBER (R_OR1K_TLS_LDM_HI16, 24) + RELOC_NUMBER (R_OR1K_TLS_LDM_LO16, 25) + RELOC_NUMBER (R_OR1K_TLS_LDO_HI16, 26) + RELOC_NUMBER (R_OR1K_TLS_LDO_LO16, 27) + RELOC_NUMBER (R_OR1K_TLS_IE_HI16, 28) + RELOC_NUMBER (R_OR1K_TLS_IE_LO16, 29) + RELOC_NUMBER (R_OR1K_TLS_LE_HI16, 30) + RELOC_NUMBER (R_OR1K_TLS_LE_LO16, 31) + RELOC_NUMBER (R_OR1K_TLS_TPOFF, 32) + RELOC_NUMBER (R_OR1K_TLS_DTPOFF, 33) + RELOC_NUMBER (R_OR1K_TLS_DTPMOD, 34) +END_RELOC_NUMBERS (R_OR1K_max) + +#define EF_OR1K_NODELAY (1UL << 0) + +#endif /* _ELF_OR1K_H */ diff --git a/support/sdbinutils/include/elf/pj.h b/support/sdbinutils/include/elf/pj.h new file mode 100644 index 0000000..1188798 --- /dev/null +++ b/support/sdbinutils/include/elf/pj.h @@ -0,0 +1,44 @@ +/* picoJava ELF support for BFD. + Copyright (C) 1999-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_PJ_H +#define _ELF_PJ_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ + +START_RELOC_NUMBERS (elf_pj_reloc_type) + RELOC_NUMBER (R_PJ_NONE, 0) + RELOC_NUMBER (R_PJ_DATA_DIR32, 1) + RELOC_NUMBER (R_PJ_CODE_REL32, 2) + RELOC_NUMBER (R_PJ_CODE_REL16, 3) + RELOC_NUMBER (R_PJ_CODE_DIR32, 6) + RELOC_NUMBER (R_PJ_CODE_DIR16, 7) + RELOC_NUMBER (R_PJ_CODE_LO16, 13) + RELOC_NUMBER (R_PJ_CODE_HI16, 14) + RELOC_NUMBER (R_PJ_GNU_VTINHERIT, 15) + RELOC_NUMBER (R_PJ_GNU_VTENTRY, 16) +END_RELOC_NUMBERS (R_PJ_max) + +#define EF_PICOJAVA_ARCH 0x0000000f +#define EF_PICOJAVA_NEWCALLS 0x00000010 +#define EF_PICOJAVA_GNUCALLS 0x00000020 /* The (currently) non standard GNU calling convention */ + +#endif diff --git a/support/sdbinutils/include/elf/ppc.h b/support/sdbinutils/include/elf/ppc.h new file mode 100644 index 0000000..3de200c --- /dev/null +++ b/support/sdbinutils/include/elf/ppc.h @@ -0,0 +1,251 @@ +/* PPC ELF support for BFD. + Copyright (C) 1995-2018 Free Software Foundation, Inc. + + By Michael Meissner, Cygnus Support, , + from information in the System V Application Binary Interface, + PowerPC Processor Supplement and the PowerPC Embedded Application + Binary Interface (eabi). + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* This file holds definitions specific to the PPC ELF ABI. Note + that most of this is not actually implemented by BFD. */ + +#ifndef _ELF_PPC_H +#define _ELF_PPC_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_ppc_reloc_type) + RELOC_NUMBER (R_PPC_NONE, 0) + RELOC_NUMBER (R_PPC_ADDR32, 1) + RELOC_NUMBER (R_PPC_ADDR24, 2) + RELOC_NUMBER (R_PPC_ADDR16, 3) + RELOC_NUMBER (R_PPC_ADDR16_LO, 4) + RELOC_NUMBER (R_PPC_ADDR16_HI, 5) + RELOC_NUMBER (R_PPC_ADDR16_HA, 6) + RELOC_NUMBER (R_PPC_ADDR14, 7) + RELOC_NUMBER (R_PPC_ADDR14_BRTAKEN, 8) + RELOC_NUMBER (R_PPC_ADDR14_BRNTAKEN, 9) + RELOC_NUMBER (R_PPC_REL24, 10) + RELOC_NUMBER (R_PPC_REL14, 11) + RELOC_NUMBER (R_PPC_REL14_BRTAKEN, 12) + RELOC_NUMBER (R_PPC_REL14_BRNTAKEN, 13) + RELOC_NUMBER (R_PPC_GOT16, 14) + RELOC_NUMBER (R_PPC_GOT16_LO, 15) + RELOC_NUMBER (R_PPC_GOT16_HI, 16) + RELOC_NUMBER (R_PPC_GOT16_HA, 17) + RELOC_NUMBER (R_PPC_PLTREL24, 18) + RELOC_NUMBER (R_PPC_COPY, 19) + RELOC_NUMBER (R_PPC_GLOB_DAT, 20) + RELOC_NUMBER (R_PPC_JMP_SLOT, 21) + RELOC_NUMBER (R_PPC_RELATIVE, 22) + RELOC_NUMBER (R_PPC_LOCAL24PC, 23) + RELOC_NUMBER (R_PPC_UADDR32, 24) + RELOC_NUMBER (R_PPC_UADDR16, 25) + RELOC_NUMBER (R_PPC_REL32, 26) + RELOC_NUMBER (R_PPC_PLT32, 27) + RELOC_NUMBER (R_PPC_PLTREL32, 28) + RELOC_NUMBER (R_PPC_PLT16_LO, 29) + RELOC_NUMBER (R_PPC_PLT16_HI, 30) + RELOC_NUMBER (R_PPC_PLT16_HA, 31) + RELOC_NUMBER (R_PPC_SDAREL16, 32) + RELOC_NUMBER (R_PPC_SECTOFF, 33) + RELOC_NUMBER (R_PPC_SECTOFF_LO, 34) + RELOC_NUMBER (R_PPC_SECTOFF_HI, 35) + RELOC_NUMBER (R_PPC_SECTOFF_HA, 36) + RELOC_NUMBER (R_PPC_ADDR30, 37) + +#ifndef RELOC_MACROS_GEN_FUNC +/* Relocations only used internally by ld. If you need to use these + reloc numbers, you can change them to some other unused value + without affecting the ABI. They will never appear in object files. */ + RELOC_NUMBER (R_PPC_RELAX, 48) + RELOC_NUMBER (R_PPC_RELAX_PLT, 49) + RELOC_NUMBER (R_PPC_RELAX_PLTREL24, 50) +/* Reloc only used internally by gas. As above, value is unimportant. */ + RELOC_NUMBER (R_PPC_16DX_HA, 51) +#endif + + /* Relocs added to support TLS. */ + RELOC_NUMBER (R_PPC_TLS, 67) + RELOC_NUMBER (R_PPC_DTPMOD32, 68) + RELOC_NUMBER (R_PPC_TPREL16, 69) + RELOC_NUMBER (R_PPC_TPREL16_LO, 70) + RELOC_NUMBER (R_PPC_TPREL16_HI, 71) + RELOC_NUMBER (R_PPC_TPREL16_HA, 72) + RELOC_NUMBER (R_PPC_TPREL32, 73) + RELOC_NUMBER (R_PPC_DTPREL16, 74) + RELOC_NUMBER (R_PPC_DTPREL16_LO, 75) + RELOC_NUMBER (R_PPC_DTPREL16_HI, 76) + RELOC_NUMBER (R_PPC_DTPREL16_HA, 77) + RELOC_NUMBER (R_PPC_DTPREL32, 78) + RELOC_NUMBER (R_PPC_GOT_TLSGD16, 79) + RELOC_NUMBER (R_PPC_GOT_TLSGD16_LO, 80) + RELOC_NUMBER (R_PPC_GOT_TLSGD16_HI, 81) + RELOC_NUMBER (R_PPC_GOT_TLSGD16_HA, 82) + RELOC_NUMBER (R_PPC_GOT_TLSLD16, 83) + RELOC_NUMBER (R_PPC_GOT_TLSLD16_LO, 84) + RELOC_NUMBER (R_PPC_GOT_TLSLD16_HI, 85) + RELOC_NUMBER (R_PPC_GOT_TLSLD16_HA, 86) + RELOC_NUMBER (R_PPC_GOT_TPREL16, 87) + RELOC_NUMBER (R_PPC_GOT_TPREL16_LO, 88) + RELOC_NUMBER (R_PPC_GOT_TPREL16_HI, 89) + RELOC_NUMBER (R_PPC_GOT_TPREL16_HA, 90) + RELOC_NUMBER (R_PPC_GOT_DTPREL16, 91) + RELOC_NUMBER (R_PPC_GOT_DTPREL16_LO, 92) + RELOC_NUMBER (R_PPC_GOT_DTPREL16_HI, 93) + RELOC_NUMBER (R_PPC_GOT_DTPREL16_HA, 94) + RELOC_NUMBER (R_PPC_TLSGD, 95) + RELOC_NUMBER (R_PPC_TLSLD, 96) + +/* The remaining relocs are from the Embedded ELF ABI, and are not + in the SVR4 ELF ABI. */ + RELOC_NUMBER (R_PPC_EMB_NADDR32, 101) + RELOC_NUMBER (R_PPC_EMB_NADDR16, 102) + RELOC_NUMBER (R_PPC_EMB_NADDR16_LO, 103) + RELOC_NUMBER (R_PPC_EMB_NADDR16_HI, 104) + RELOC_NUMBER (R_PPC_EMB_NADDR16_HA, 105) + RELOC_NUMBER (R_PPC_EMB_SDAI16, 106) + RELOC_NUMBER (R_PPC_EMB_SDA2I16, 107) + RELOC_NUMBER (R_PPC_EMB_SDA2REL, 108) + RELOC_NUMBER (R_PPC_EMB_SDA21, 109) + RELOC_NUMBER (R_PPC_EMB_MRKREF, 110) + RELOC_NUMBER (R_PPC_EMB_RELSEC16, 111) + RELOC_NUMBER (R_PPC_EMB_RELST_LO, 112) + RELOC_NUMBER (R_PPC_EMB_RELST_HI, 113) + RELOC_NUMBER (R_PPC_EMB_RELST_HA, 114) + RELOC_NUMBER (R_PPC_EMB_BIT_FLD, 115) + RELOC_NUMBER (R_PPC_EMB_RELSDA, 116) + +/* PowerPC VLE relocations. */ + RELOC_NUMBER (R_PPC_VLE_REL8, 216) + RELOC_NUMBER (R_PPC_VLE_REL15, 217) + RELOC_NUMBER (R_PPC_VLE_REL24, 218) + RELOC_NUMBER (R_PPC_VLE_LO16A, 219) + RELOC_NUMBER (R_PPC_VLE_LO16D, 220) + RELOC_NUMBER (R_PPC_VLE_HI16A, 221) + RELOC_NUMBER (R_PPC_VLE_HI16D, 222) + RELOC_NUMBER (R_PPC_VLE_HA16A, 223) + RELOC_NUMBER (R_PPC_VLE_HA16D, 224) + RELOC_NUMBER (R_PPC_VLE_SDA21, 225) + RELOC_NUMBER (R_PPC_VLE_SDA21_LO, 226) + RELOC_NUMBER (R_PPC_VLE_SDAREL_LO16A, 227) + RELOC_NUMBER (R_PPC_VLE_SDAREL_LO16D, 228) + RELOC_NUMBER (R_PPC_VLE_SDAREL_HI16A, 229) + RELOC_NUMBER (R_PPC_VLE_SDAREL_HI16D, 230) + RELOC_NUMBER (R_PPC_VLE_SDAREL_HA16A, 231) + RELOC_NUMBER (R_PPC_VLE_SDAREL_HA16D, 232) + RELOC_NUMBER (R_PPC_VLE_ADDR20, 233) + +/* Power9 split rel16 for addpcis. */ + RELOC_NUMBER (R_PPC_REL16DX_HA, 246) + +/* Support STT_GNU_IFUNC plt calls. */ + RELOC_NUMBER (R_PPC_IRELATIVE, 248) + +/* These are GNU extensions used in PIC code sequences. */ + RELOC_NUMBER (R_PPC_REL16, 249) + RELOC_NUMBER (R_PPC_REL16_LO, 250) + RELOC_NUMBER (R_PPC_REL16_HI, 251) + RELOC_NUMBER (R_PPC_REL16_HA, 252) + +/* These are GNU extensions to enable C++ vtable garbage collection. */ + RELOC_NUMBER (R_PPC_GNU_VTINHERIT, 253) + RELOC_NUMBER (R_PPC_GNU_VTENTRY, 254) + +/* This is a phony reloc to handle any old fashioned TOC16 references + that may still be in object files. */ + RELOC_NUMBER (R_PPC_TOC16, 255) + +END_RELOC_NUMBERS (R_PPC_max) + +#define IS_PPC_TLS_RELOC(R) \ + ((R) >= R_PPC_TLS && (R) <= R_PPC_GOT_DTPREL16_HA) + +/* Specify the value of _GLOBAL_OFFSET_TABLE_. */ +#define DT_PPC_GOT (DT_LOPROC) + +/* Specify that tls descriptors should be optimized. */ +#define DT_PPC_OPT (DT_LOPROC + 1) +#define PPC_OPT_TLS 1 + +/* Processor specific flags for the ELF header e_flags field. */ + +#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag. */ + +#define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag. */ +#define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib flag. */ + +/* Processor specific program headers, p_flags field. */ +#define PF_PPC_VLE 0x10000000 /* PowerPC VLE. */ + +/* Processor specific section headers, sh_flags field. */ +#define SHF_PPC_VLE 0x10000000 /* PowerPC VLE text section. */ + +/* Processor specific section headers, sh_type field. */ + +#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \ + entries in this section \ + based on the address \ + specified in the associated \ + symbol table entry. */ + +/* APUinfo note section. */ +#define APUINFO_SECTION_NAME ".PPC.EMB.apuinfo" +#define APUINFO_LABEL "APUinfo" + +#define PPC_APUINFO_ISEL 0x40 +#define PPC_APUINFO_PMR 0x41 +#define PPC_APUINFO_RFMCI 0x42 +#define PPC_APUINFO_CACHELCK 0x43 +#define PPC_APUINFO_SPE 0x100 +#define PPC_APUINFO_EFS 0x101 +#define PPC_APUINFO_BRLOCK 0x102 +#define PPC_APUINFO_VLE 0x104 + +/* Object attribute tags. */ +enum +{ + /* 0-3 are generic. */ + + /* FP ABI, low 2 bits: + 1 for double precision hard-float, + 2 for soft-float, + 3 for single precision hard-float. + 0 for not tagged or not using any ABIs affected by the differences. + Next 2 bits: + 1 for ibm long double + 2 for 64-bit long double + 3 for IEEE long double. + 0 for not tagged or not using any ABIs affected by the differences. */ + Tag_GNU_Power_ABI_FP = 4, + + /* Value 1 for general purpose registers only, 2 for AltiVec + registers, 3 for SPE registers; 0 for not tagged or not using any + ABIs affected by the differences. */ + Tag_GNU_Power_ABI_Vector = 8, + + /* Value 1 for ABIs using r3/r4 for returning structures <= 8 bytes, + 2 for ABIs using memory; 0 for not tagged or not using any ABIs + affected by the differences. */ + Tag_GNU_Power_ABI_Struct_Return = 12 +}; + +#endif /* _ELF_PPC_H */ diff --git a/support/sdbinutils/include/elf/ppc64.h b/support/sdbinutils/include/elf/ppc64.h new file mode 100644 index 0000000..04a7432 --- /dev/null +++ b/support/sdbinutils/include/elf/ppc64.h @@ -0,0 +1,256 @@ +/* PPC64 ELF support for BFD. + Copyright (C) 2003-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef _ELF_PPC64_H +#define _ELF_PPC64_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_ppc64_reloc_type) + RELOC_NUMBER (R_PPC64_NONE, 0) + RELOC_NUMBER (R_PPC64_ADDR32, 1) + RELOC_NUMBER (R_PPC64_ADDR24, 2) + RELOC_NUMBER (R_PPC64_ADDR16, 3) + RELOC_NUMBER (R_PPC64_ADDR16_LO, 4) + RELOC_NUMBER (R_PPC64_ADDR16_HI, 5) + RELOC_NUMBER (R_PPC64_ADDR16_HA, 6) + RELOC_NUMBER (R_PPC64_ADDR14, 7) + RELOC_NUMBER (R_PPC64_ADDR14_BRTAKEN, 8) + RELOC_NUMBER (R_PPC64_ADDR14_BRNTAKEN, 9) + RELOC_NUMBER (R_PPC64_REL24, 10) + RELOC_NUMBER (R_PPC64_REL14, 11) + RELOC_NUMBER (R_PPC64_REL14_BRTAKEN, 12) + RELOC_NUMBER (R_PPC64_REL14_BRNTAKEN, 13) + RELOC_NUMBER (R_PPC64_GOT16, 14) + RELOC_NUMBER (R_PPC64_GOT16_LO, 15) + RELOC_NUMBER (R_PPC64_GOT16_HI, 16) + RELOC_NUMBER (R_PPC64_GOT16_HA, 17) + /* 18 unused. 32-bit reloc is R_PPC_PLTREL24. */ + RELOC_NUMBER (R_PPC64_COPY, 19) + RELOC_NUMBER (R_PPC64_GLOB_DAT, 20) + RELOC_NUMBER (R_PPC64_JMP_SLOT, 21) + RELOC_NUMBER (R_PPC64_RELATIVE, 22) + /* 23 unused. 32-bit reloc is R_PPC_LOCAL24PC. */ + RELOC_NUMBER (R_PPC64_UADDR32, 24) + RELOC_NUMBER (R_PPC64_UADDR16, 25) + RELOC_NUMBER (R_PPC64_REL32, 26) + RELOC_NUMBER (R_PPC64_PLT32, 27) + RELOC_NUMBER (R_PPC64_PLTREL32, 28) + RELOC_NUMBER (R_PPC64_PLT16_LO, 29) + RELOC_NUMBER (R_PPC64_PLT16_HI, 30) + RELOC_NUMBER (R_PPC64_PLT16_HA, 31) + /* 32 unused. 32-bit reloc is R_PPC_SDAREL16. */ + RELOC_NUMBER (R_PPC64_SECTOFF, 33) + RELOC_NUMBER (R_PPC64_SECTOFF_LO, 34) + RELOC_NUMBER (R_PPC64_SECTOFF_HI, 35) + RELOC_NUMBER (R_PPC64_SECTOFF_HA, 36) + RELOC_NUMBER (R_PPC64_REL30, 37) + RELOC_NUMBER (R_PPC64_ADDR64, 38) + RELOC_NUMBER (R_PPC64_ADDR16_HIGHER, 39) + RELOC_NUMBER (R_PPC64_ADDR16_HIGHERA, 40) + RELOC_NUMBER (R_PPC64_ADDR16_HIGHEST, 41) + RELOC_NUMBER (R_PPC64_ADDR16_HIGHESTA, 42) + RELOC_NUMBER (R_PPC64_UADDR64, 43) + RELOC_NUMBER (R_PPC64_REL64, 44) + RELOC_NUMBER (R_PPC64_PLT64, 45) + RELOC_NUMBER (R_PPC64_PLTREL64, 46) + RELOC_NUMBER (R_PPC64_TOC16, 47) + RELOC_NUMBER (R_PPC64_TOC16_LO, 48) + RELOC_NUMBER (R_PPC64_TOC16_HI, 49) + RELOC_NUMBER (R_PPC64_TOC16_HA, 50) + RELOC_NUMBER (R_PPC64_TOC, 51) + RELOC_NUMBER (R_PPC64_PLTGOT16, 52) + RELOC_NUMBER (R_PPC64_PLTGOT16_LO, 53) + RELOC_NUMBER (R_PPC64_PLTGOT16_HI, 54) + RELOC_NUMBER (R_PPC64_PLTGOT16_HA, 55) + + /* The following relocs were added in the 64-bit PowerPC ELF ABI + revision 1.2. */ + RELOC_NUMBER (R_PPC64_ADDR16_DS, 56) + RELOC_NUMBER (R_PPC64_ADDR16_LO_DS, 57) + RELOC_NUMBER (R_PPC64_GOT16_DS, 58) + RELOC_NUMBER (R_PPC64_GOT16_LO_DS, 59) + RELOC_NUMBER (R_PPC64_PLT16_LO_DS, 60) + RELOC_NUMBER (R_PPC64_SECTOFF_DS, 61) + RELOC_NUMBER (R_PPC64_SECTOFF_LO_DS, 62) + RELOC_NUMBER (R_PPC64_TOC16_DS, 63) + RELOC_NUMBER (R_PPC64_TOC16_LO_DS, 64) + RELOC_NUMBER (R_PPC64_PLTGOT16_DS, 65) + RELOC_NUMBER (R_PPC64_PLTGOT16_LO_DS, 66) + + /* Relocs added to support TLS. PowerPC64 ELF ABI revision 1.5. */ + RELOC_NUMBER (R_PPC64_TLS, 67) + RELOC_NUMBER (R_PPC64_DTPMOD64, 68) + RELOC_NUMBER (R_PPC64_TPREL16, 69) + RELOC_NUMBER (R_PPC64_TPREL16_LO, 70) + RELOC_NUMBER (R_PPC64_TPREL16_HI, 71) + RELOC_NUMBER (R_PPC64_TPREL16_HA, 72) + RELOC_NUMBER (R_PPC64_TPREL64, 73) + RELOC_NUMBER (R_PPC64_DTPREL16, 74) + RELOC_NUMBER (R_PPC64_DTPREL16_LO, 75) + RELOC_NUMBER (R_PPC64_DTPREL16_HI, 76) + RELOC_NUMBER (R_PPC64_DTPREL16_HA, 77) + RELOC_NUMBER (R_PPC64_DTPREL64, 78) + RELOC_NUMBER (R_PPC64_GOT_TLSGD16, 79) + RELOC_NUMBER (R_PPC64_GOT_TLSGD16_LO, 80) + RELOC_NUMBER (R_PPC64_GOT_TLSGD16_HI, 81) + RELOC_NUMBER (R_PPC64_GOT_TLSGD16_HA, 82) + RELOC_NUMBER (R_PPC64_GOT_TLSLD16, 83) + RELOC_NUMBER (R_PPC64_GOT_TLSLD16_LO, 84) + RELOC_NUMBER (R_PPC64_GOT_TLSLD16_HI, 85) + RELOC_NUMBER (R_PPC64_GOT_TLSLD16_HA, 86) + RELOC_NUMBER (R_PPC64_GOT_TPREL16_DS, 87) + RELOC_NUMBER (R_PPC64_GOT_TPREL16_LO_DS, 88) + RELOC_NUMBER (R_PPC64_GOT_TPREL16_HI, 89) + RELOC_NUMBER (R_PPC64_GOT_TPREL16_HA, 90) + RELOC_NUMBER (R_PPC64_GOT_DTPREL16_DS, 91) + RELOC_NUMBER (R_PPC64_GOT_DTPREL16_LO_DS, 92) + RELOC_NUMBER (R_PPC64_GOT_DTPREL16_HI, 93) + RELOC_NUMBER (R_PPC64_GOT_DTPREL16_HA, 94) + RELOC_NUMBER (R_PPC64_TPREL16_DS, 95) + RELOC_NUMBER (R_PPC64_TPREL16_LO_DS, 96) + RELOC_NUMBER (R_PPC64_TPREL16_HIGHER, 97) + RELOC_NUMBER (R_PPC64_TPREL16_HIGHERA, 98) + RELOC_NUMBER (R_PPC64_TPREL16_HIGHEST, 99) + RELOC_NUMBER (R_PPC64_TPREL16_HIGHESTA, 100) + RELOC_NUMBER (R_PPC64_DTPREL16_DS, 101) + RELOC_NUMBER (R_PPC64_DTPREL16_LO_DS, 102) + RELOC_NUMBER (R_PPC64_DTPREL16_HIGHER, 103) + RELOC_NUMBER (R_PPC64_DTPREL16_HIGHERA, 104) + RELOC_NUMBER (R_PPC64_DTPREL16_HIGHEST, 105) + RELOC_NUMBER (R_PPC64_DTPREL16_HIGHESTA, 106) + RELOC_NUMBER (R_PPC64_TLSGD, 107) + RELOC_NUMBER (R_PPC64_TLSLD, 108) + RELOC_NUMBER (R_PPC64_TOCSAVE, 109) + +/* Added when HA and HI relocs were changed to report overflows. */ + RELOC_NUMBER (R_PPC64_ADDR16_HIGH, 110) + RELOC_NUMBER (R_PPC64_ADDR16_HIGHA, 111) + RELOC_NUMBER (R_PPC64_TPREL16_HIGH, 112) + RELOC_NUMBER (R_PPC64_TPREL16_HIGHA, 113) + RELOC_NUMBER (R_PPC64_DTPREL16_HIGH, 114) + RELOC_NUMBER (R_PPC64_DTPREL16_HIGHA, 115) + +/* Added for ELFv2. */ + RELOC_NUMBER (R_PPC64_REL24_NOTOC, 116) + RELOC_NUMBER (R_PPC64_ADDR64_LOCAL, 117) + RELOC_NUMBER (R_PPC64_ENTRY, 118) + +#ifndef RELOC_MACROS_GEN_FUNC +/* Relocation only used internally by ld. If you need to use these + reloc numbers, you can change them to some other unused value + without affecting the ABI. They will never appear in object files. */ + RELOC_NUMBER (R_PPC64_LO_DS_OPT, 128) +/* Reloc only used internally by gas. As above, value is unimportant. */ + RELOC_NUMBER (R_PPC64_16DX_HA, 129) +#endif + +/* Power9 split rel16 for addpcis. */ + RELOC_NUMBER (R_PPC64_REL16DX_HA, 246) + +/* Support STT_GNU_IFUNC plt calls. */ + RELOC_NUMBER (R_PPC64_JMP_IREL, 247) + RELOC_NUMBER (R_PPC64_IRELATIVE, 248) + +/* These are GNU extensions used in PIC code sequences. */ + RELOC_NUMBER (R_PPC64_REL16, 249) + RELOC_NUMBER (R_PPC64_REL16_LO, 250) + RELOC_NUMBER (R_PPC64_REL16_HI, 251) + RELOC_NUMBER (R_PPC64_REL16_HA, 252) + + /* These are GNU extensions to enable C++ vtable garbage collection. */ + RELOC_NUMBER (R_PPC64_GNU_VTINHERIT, 253) + RELOC_NUMBER (R_PPC64_GNU_VTENTRY, 254) + +END_RELOC_NUMBERS (R_PPC64_max) + +#define IS_PPC64_TLS_RELOC(R) \ + (((R) >= R_PPC64_TLS && (R) <= R_PPC64_DTPREL16_HIGHESTA) \ + || ((R) >= R_PPC64_TPREL16_HIGH && (R) <= R_PPC64_DTPREL16_HIGHA)) + + +/* e_flags bits specifying ABI. + 1 for original function descriptor using ABI, + 2 for revised ABI without function descriptors, + 0 for unspecified or not using any features affected by the differences. */ +#define EF_PPC64_ABI 3 + +/* The ELFv2 ABI uses three bits in the symbol st_other field of a + function definition to specify the number of instructions between a + function's global entry point and local entry point. + The global entry point is used when it is necessary to set up the + toc pointer (r2) for the function. Callers must enter the global + entry point with r12 set to the global entry point address. On + return from the function, r2 may have a different value to that + which it had on entry. + The local entry point is used when r2 is known to already be valid + for the function. There is no requirement on r12 when using the + local entry point, and on return r2 will contain the same value as + at entry. + A value of zero in these bits means that the function has a single + entry point with no requirement on r12 or r2, and that on return r2 + will contain the same value as at entry. + Values of one and seven are reserved. */ +#define STO_PPC64_LOCAL_BIT 5 +#define STO_PPC64_LOCAL_MASK (7 << STO_PPC64_LOCAL_BIT) + +// 3 bit other field to bytes. +static inline unsigned int +ppc64_decode_local_entry(unsigned int other) +{ + return ((1 << other) >> 2) << 2; +} + +// bytes to field value. +static inline unsigned int +ppc64_encode_local_entry(unsigned int val) +{ + return (val >= 4 * 4 + ? (val >= 8 * 4 + ? (val >= 16 * 4 ? 6 : 5) + : 4) + : (val >= 2 * 4 + ? 3 + : (val >= 1 * 4 ? 2 : 0))); +} + +/* st_other to number of bytes. */ +#define PPC64_LOCAL_ENTRY_OFFSET(other) \ + ppc64_decode_local_entry (((other) & STO_PPC64_LOCAL_MASK) \ + >> STO_PPC64_LOCAL_BIT) +/* number of bytes to st_other. */ +#define PPC64_SET_LOCAL_ENTRY_OFFSET(val) \ + ppc64_encode_local_entry (val) << STO_PPC64_LOCAL_BIT + +/* Specify the start of the .glink section. */ +#define DT_PPC64_GLINK DT_LOPROC + +/* Specify the start and size of the .opd section. */ +#define DT_PPC64_OPD (DT_LOPROC + 1) +#define DT_PPC64_OPDSZ (DT_LOPROC + 2) + +/* Specify whether various optimisations are possible. */ +#define DT_PPC64_OPT (DT_LOPROC + 3) +#define PPC64_OPT_TLS 1 +#define PPC64_OPT_MULTI_TOC 2 +#define PPC64_OPT_LOCALENTRY 4 + +#endif /* _ELF_PPC64_H */ diff --git a/support/sdbinutils/include/elf/pru.h b/support/sdbinutils/include/elf/pru.h new file mode 100644 index 0000000..9cc85c3 --- /dev/null +++ b/support/sdbinutils/include/elf/pru.h @@ -0,0 +1,55 @@ +/* TI PRU ELF support for BFD. + Copyright (C) 2014-2018 Free Software Foundation, Inc. + Contributed by Dimitar Dimitrov + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + + +/* This file holds definitions specific to the TI PRU ELF ABI. Note + that most of this is not actually implemented by BFD. */ + +#ifndef _ELF_PRU_H +#define _ELF_PRU_H + +#include "elf/reloc-macros.h" + +START_RELOC_NUMBERS (elf_pru_reloc_type) + RELOC_NUMBER (R_PRU_NONE, 0) + RELOC_NUMBER (R_PRU_16_PMEM, 5) + RELOC_NUMBER (R_PRU_U16_PMEMIMM, 6) + RELOC_NUMBER (R_PRU_BFD_RELOC_16, 8) + RELOC_NUMBER (R_PRU_U16, 9) + RELOC_NUMBER (R_PRU_32_PMEM, 10) + RELOC_NUMBER (R_PRU_BFD_RELOC_32, 11) + RELOC_NUMBER (R_PRU_S10_PCREL, 14) + RELOC_NUMBER (R_PRU_U8_PCREL, 15) + RELOC_NUMBER (R_PRU_LDI32, 18) + + /* Extensions required by GCC, or simply nice to have. */ + RELOC_NUMBER (R_PRU_GNU_BFD_RELOC_8, 64) + RELOC_NUMBER (R_PRU_GNU_DIFF8, 65) + RELOC_NUMBER (R_PRU_GNU_DIFF16, 66) + RELOC_NUMBER (R_PRU_GNU_DIFF32, 67) + RELOC_NUMBER (R_PRU_GNU_DIFF16_PMEM, 68) + RELOC_NUMBER (R_PRU_GNU_DIFF32_PMEM, 69) + RELOC_NUMBER (R_PRU_ILLEGAL, 70) +END_RELOC_NUMBERS (R_PRU_maxext) + +/* Processor-specific section flags. */ + +#endif /* _ELF_PRU_H */ diff --git a/support/sdbinutils/include/elf/reloc-macros.h b/support/sdbinutils/include/elf/reloc-macros.h new file mode 100644 index 0000000..1f82051 --- /dev/null +++ b/support/sdbinutils/include/elf/reloc-macros.h @@ -0,0 +1,129 @@ +/* Generic relocation support for BFD. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* These macros are used by the various *.h target specific header + files to either generate an enum containing all the known relocations + for that target, or if RELOC_MACROS_GEN_FUNC is defined, a recognition + function is generated instead. (This is used by binutils/readelf.c) + + Given a header file like this: + + START_RELOC_NUMBERS (foo) + RELOC_NUMBER (R_foo_NONE, 0) + RELOC_NUMBER (R_foo_32, 1) + EMPTY_RELOC (R_foo_good) + FAKE_RELOC (R_foo_illegal, 9) + END_RELOC_NUMBERS (R_foo_count) + + Then the following will be produced by default (ie if + RELOC_MACROS_GEN_FUNC is *not* defined). + + enum foo + { + R_foo_NONE = 0, + R_foo_32 = 1, + R_foo_good, + R_foo_illegal = 9, + R_foo_count + }; + + Note: The value of the symbol defined in the END_RELOC_NUMBERS + macro (R_foo_count in the case of the example above) will be + set to the value of the whichever *_RELOC macro precedes it plus + one. Therefore if you intend to use the symbol as a sentinel for + the highest valid macro value you should make sure that the + preceding *_RELOC macro is the highest valid number. ie a + declaration like this: + + START_RELOC_NUMBERS (foo) + RELOC_NUMBER (R_foo_NONE, 0) + RELOC_NUMBER (R_foo_32, 1) + FAKE_RELOC (R_foo_illegal, 9) + FAKE_RELOC (R_foo_synonym, 0) + END_RELOC_NUMBERS (R_foo_count) + + will result in R_foo_count having a value of 1 (R_foo_synonym + 1) + rather than 10 or 2 as might be expected. + + Alternatively you can assign a value to END_RELOC_NUMBERS symbol + explicitly, like this: + + START_RELOC_NUMBERS (foo) + RELOC_NUMBER (R_foo_NONE, 0) + RELOC_NUMBER (R_foo_32, 1) + FAKE_RELOC (R_foo_illegal, 9) + FAKE_RELOC (R_foo_synonym, 0) + END_RELOC_NUMBERS (R_foo_count = 2) + + If RELOC_MACROS_GEN_FUNC *is* defined, then instead the + following function will be generated: + + static const char *foo (unsigned long rtype); + static const char * + foo (unsigned long rtype) + { + switch (rtype) + { + case 0: return "R_foo_NONE"; + case 1: return "R_foo_32"; + default: return NULL; + } + } + */ + +#ifndef _RELOC_MACROS_H +#define _RELOC_MACROS_H + +#ifdef RELOC_MACROS_GEN_FUNC + +/* This function takes the relocation number and returns the + string version name of the name of that relocation. If + the relocation is not recognised, NULL is returned. */ + +#define START_RELOC_NUMBERS(name) \ +static const char *name (unsigned long rtype); \ +static const char * \ +name (unsigned long rtype) \ +{ \ + switch (rtype) \ + { + +#define RELOC_NUMBER(name, number) \ + case number: return #name; + +#define FAKE_RELOC(name, number) +#define EMPTY_RELOC(name) + +#define END_RELOC_NUMBERS(name) \ + default: return NULL; \ + } \ +} + + +#else /* Default to generating enum. */ + +#define START_RELOC_NUMBERS(name) enum name { +#define RELOC_NUMBER(name, number) name = number, +#define FAKE_RELOC(name, number) name = number, +#define EMPTY_RELOC(name) name, +#define END_RELOC_NUMBERS(name) name }; + +#endif + +#endif /* _RELOC_MACROS_H */ diff --git a/support/sdbinutils/include/elf/riscv.h b/support/sdbinutils/include/elf/riscv.h new file mode 100644 index 0000000..defbbf4 --- /dev/null +++ b/support/sdbinutils/include/elf/riscv.h @@ -0,0 +1,116 @@ +/* RISC-V ELF support for BFD. + Copyright (C) 2011-2018 Free Software Foundation, Inc. + + Contributed by Andrew Waterman (andrew@sifive.com). + Based on MIPS ELF support for BFD, by Ian Lance Taylor. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING3. If not, + see . */ + +/* This file holds definitions specific to the RISCV ELF ABI. Note + that most of this is not actually implemented by BFD. */ + +#ifndef _ELF_RISCV_H +#define _ELF_RISCV_H + +#include "elf/reloc-macros.h" +#include "libiberty.h" + +/* Relocation types. */ +START_RELOC_NUMBERS (elf_riscv_reloc_type) + /* Relocation types used by the dynamic linker. */ + RELOC_NUMBER (R_RISCV_NONE, 0) + RELOC_NUMBER (R_RISCV_32, 1) + RELOC_NUMBER (R_RISCV_64, 2) + RELOC_NUMBER (R_RISCV_RELATIVE, 3) + RELOC_NUMBER (R_RISCV_COPY, 4) + RELOC_NUMBER (R_RISCV_JUMP_SLOT, 5) + RELOC_NUMBER (R_RISCV_TLS_DTPMOD32, 6) + RELOC_NUMBER (R_RISCV_TLS_DTPMOD64, 7) + RELOC_NUMBER (R_RISCV_TLS_DTPREL32, 8) + RELOC_NUMBER (R_RISCV_TLS_DTPREL64, 9) + RELOC_NUMBER (R_RISCV_TLS_TPREL32, 10) + RELOC_NUMBER (R_RISCV_TLS_TPREL64, 11) + + /* Relocation types not used by the dynamic linker. */ + RELOC_NUMBER (R_RISCV_BRANCH, 16) + RELOC_NUMBER (R_RISCV_JAL, 17) + RELOC_NUMBER (R_RISCV_CALL, 18) + RELOC_NUMBER (R_RISCV_CALL_PLT, 19) + RELOC_NUMBER (R_RISCV_GOT_HI20, 20) + RELOC_NUMBER (R_RISCV_TLS_GOT_HI20, 21) + RELOC_NUMBER (R_RISCV_TLS_GD_HI20, 22) + RELOC_NUMBER (R_RISCV_PCREL_HI20, 23) + RELOC_NUMBER (R_RISCV_PCREL_LO12_I, 24) + RELOC_NUMBER (R_RISCV_PCREL_LO12_S, 25) + RELOC_NUMBER (R_RISCV_HI20, 26) + RELOC_NUMBER (R_RISCV_LO12_I, 27) + RELOC_NUMBER (R_RISCV_LO12_S, 28) + RELOC_NUMBER (R_RISCV_TPREL_HI20, 29) + RELOC_NUMBER (R_RISCV_TPREL_LO12_I, 30) + RELOC_NUMBER (R_RISCV_TPREL_LO12_S, 31) + RELOC_NUMBER (R_RISCV_TPREL_ADD, 32) + RELOC_NUMBER (R_RISCV_ADD8, 33) + RELOC_NUMBER (R_RISCV_ADD16, 34) + RELOC_NUMBER (R_RISCV_ADD32, 35) + RELOC_NUMBER (R_RISCV_ADD64, 36) + RELOC_NUMBER (R_RISCV_SUB8, 37) + RELOC_NUMBER (R_RISCV_SUB16, 38) + RELOC_NUMBER (R_RISCV_SUB32, 39) + RELOC_NUMBER (R_RISCV_SUB64, 40) + RELOC_NUMBER (R_RISCV_GNU_VTINHERIT, 41) + RELOC_NUMBER (R_RISCV_GNU_VTENTRY, 42) + RELOC_NUMBER (R_RISCV_ALIGN, 43) + RELOC_NUMBER (R_RISCV_RVC_BRANCH, 44) + RELOC_NUMBER (R_RISCV_RVC_JUMP, 45) + RELOC_NUMBER (R_RISCV_RVC_LUI, 46) + RELOC_NUMBER (R_RISCV_GPREL_I, 47) + RELOC_NUMBER (R_RISCV_GPREL_S, 48) + RELOC_NUMBER (R_RISCV_TPREL_I, 49) + RELOC_NUMBER (R_RISCV_TPREL_S, 50) + RELOC_NUMBER (R_RISCV_RELAX, 51) + RELOC_NUMBER (R_RISCV_SUB6, 52) + RELOC_NUMBER (R_RISCV_SET6, 53) + RELOC_NUMBER (R_RISCV_SET8, 54) + RELOC_NUMBER (R_RISCV_SET16, 55) + RELOC_NUMBER (R_RISCV_SET32, 56) + RELOC_NUMBER (R_RISCV_32_PCREL, 57) +END_RELOC_NUMBERS (R_RISCV_max) + +/* Processor specific flags for the ELF header e_flags field. */ + +/* File may contain compressed instructions. */ +#define EF_RISCV_RVC 0x0001 + +/* Which floating-point ABI a file uses. */ +#define EF_RISCV_FLOAT_ABI 0x0006 + +/* File uses the soft-float ABI. */ +#define EF_RISCV_FLOAT_ABI_SOFT 0x0000 + +/* File uses the single-float ABI. */ +#define EF_RISCV_FLOAT_ABI_SINGLE 0x0002 + +/* File uses the double-float ABI. */ +#define EF_RISCV_FLOAT_ABI_DOUBLE 0x0004 + +/* File uses the quad-float ABI. */ +#define EF_RISCV_FLOAT_ABI_QUAD 0x0006 + +/* The name of the global pointer symbol. */ +#define RISCV_GP_SYMBOL "__global_pointer$" + +#endif /* _ELF_RISCV_H */ diff --git a/support/sdbinutils/include/elf/rl78.h b/support/sdbinutils/include/elf/rl78.h new file mode 100644 index 0000000..ad55d6b --- /dev/null +++ b/support/sdbinutils/include/elf/rl78.h @@ -0,0 +1,125 @@ +/* RL78 ELF support for BFD. + Copyright (C) 2008-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_RL78_H +#define _ELF_RL78_H + +#include "elf/reloc-macros.h" + +/* Note that there are a few internal relocation types used by the + linker to do link-time relaxation. If you update this file, please + check elf32-rl78.c to see if any of the internal relocations need to + be, er, relocated. */ + +/* Preliminary relocations. */ +START_RELOC_NUMBERS (elf_rl78_reloc_type) + + RELOC_NUMBER (R_RL78_NONE, 0x00) + /* These are for data, and are bi-endian. */ + RELOC_NUMBER (R_RL78_DIR32, 0x01) /* Was: R_RL78_32. */ + RELOC_NUMBER (R_RL78_DIR24S, 0x02) /* Was: R_RL78_24. */ + RELOC_NUMBER (R_RL78_DIR16, 0x03) + RELOC_NUMBER (R_RL78_DIR16U, 0x04) /* Was: R_RL78_16_UNS. */ + RELOC_NUMBER (R_RL78_DIR16S, 0x05) /* Was: R_RL78_16. */ + RELOC_NUMBER (R_RL78_DIR8, 0x06) + RELOC_NUMBER (R_RL78_DIR8U, 0x07) /* Was: R_RL78_8_UNS. */ + RELOC_NUMBER (R_RL78_DIR8S, 0x08) /* Was: R_RL78_8. */ + + /* Signed pc-relative values. */ + RELOC_NUMBER (R_RL78_DIR24S_PCREL, 0x09) /* Was: R_RL78_24_PCREL. */ + RELOC_NUMBER (R_RL78_DIR16S_PCREL, 0x0a) /* Was: R_RL78_16_PCREL. */ + RELOC_NUMBER (R_RL78_DIR8S_PCREL, 0x0b) /* Was: R_RL78_8_PCREL. */ + + /* These are for fields in the instructions. */ + RELOC_NUMBER (R_RL78_DIR16UL, 0x0c) + RELOC_NUMBER (R_RL78_DIR16UW, 0x0d) + RELOC_NUMBER (R_RL78_DIR8UL, 0x0e) + RELOC_NUMBER (R_RL78_DIR8UW, 0x0f) + RELOC_NUMBER (R_RL78_DIR32_REV, 0x10) + RELOC_NUMBER (R_RL78_DIR16_REV, 0x11) + RELOC_NUMBER (R_RL78_DIR3U_PCREL, 0x12) + + /* These are extensions added by Red Hat. */ + RELOC_NUMBER (R_RL78_RH_RELAX, 0x2d) /* Marks opcodes suitable for linker relaxation. */ + RELOC_NUMBER (R_RL78_RH_SFR, 0x2e) /* SFR addresses - internal use only. */ + RELOC_NUMBER (R_RL78_RH_SADDR, 0x2f) /* SADDR addresses - internal use only.. */ + + /* These are for complex relocs. */ + RELOC_NUMBER (R_RL78_ABS32, 0x41) + RELOC_NUMBER (R_RL78_ABS24S, 0x42) + RELOC_NUMBER (R_RL78_ABS16, 0x43) + RELOC_NUMBER (R_RL78_ABS16U, 0x44) + RELOC_NUMBER (R_RL78_ABS16S, 0x45) + RELOC_NUMBER (R_RL78_ABS8, 0x46) + RELOC_NUMBER (R_RL78_ABS8U, 0x47) + RELOC_NUMBER (R_RL78_ABS8S, 0x48) + RELOC_NUMBER (R_RL78_ABS24S_PCREL, 0x49) + RELOC_NUMBER (R_RL78_ABS16S_PCREL, 0x4a) + RELOC_NUMBER (R_RL78_ABS8S_PCREL, 0x4b) + RELOC_NUMBER (R_RL78_ABS16UL, 0x4c) + RELOC_NUMBER (R_RL78_ABS16UW, 0x4d) + RELOC_NUMBER (R_RL78_ABS8UL, 0x4e) + RELOC_NUMBER (R_RL78_ABS8UW, 0x4f) + RELOC_NUMBER (R_RL78_ABS32_REV, 0x50) + RELOC_NUMBER (R_RL78_ABS16_REV, 0x51) + + RELOC_NUMBER (R_RL78_SYM, 0x80) + RELOC_NUMBER (R_RL78_OPneg, 0x81) + RELOC_NUMBER (R_RL78_OPadd, 0x82) + RELOC_NUMBER (R_RL78_OPsub, 0x83) + RELOC_NUMBER (R_RL78_OPmul, 0x84) + RELOC_NUMBER (R_RL78_OPdiv, 0x85) + RELOC_NUMBER (R_RL78_OPshla, 0x86) + RELOC_NUMBER (R_RL78_OPshra, 0x87) + RELOC_NUMBER (R_RL78_OPsctsize, 0x88) + RELOC_NUMBER (R_RL78_OPscttop, 0x8d) + RELOC_NUMBER (R_RL78_OPand, 0x90) + RELOC_NUMBER (R_RL78_OPor, 0x91) + RELOC_NUMBER (R_RL78_OPxor, 0x92) + RELOC_NUMBER (R_RL78_OPnot, 0x93) + RELOC_NUMBER (R_RL78_OPmod, 0x94) + RELOC_NUMBER (R_RL78_OPromtop, 0x95) + RELOC_NUMBER (R_RL78_OPramtop, 0x96) + +END_RELOC_NUMBERS (R_RL78_max) + +#define EF_RL78_CPU_RL78 0x00000079 /* FIXME: correct value? */ +#define EF_RL78_CPU_MASK 0x0000007F /* specific cpu bits. */ +#define EF_RL78_ALL_FLAGS (EF_RL78_CPU_MASK) + +/* Values for the e_flags field in the ELF header. */ +#define E_FLAG_RL78_64BIT_DOUBLES (1 << 0) +#define E_FLAG_RL78_DSP (1 << 1) /* Defined in the RL78 CPU Object file specification, but not explained. */ +#define E_FLAG_RL78_CPU_MASK 0x0c +#define E_FLAG_RL78_ANY_CPU 0x00 /* CPU not specified. Assume no CPU specific code usage. */ +#define E_FLAG_RL78_G10 0x04 /* CPU is missing register banks 1-3, so uses different ABI. */ +#define E_FLAG_RL78_G13 0x08 /* CPU uses a peripheral for multiply/divide. */ +#define E_FLAG_RL78_G14 0x0c /* CPU has multiply/divide instructions. */ + +/* These define the addend field of R_RL78_RH_RELAX relocations. */ +#define RL78_RELAXA_MASK 0x000000f0 /* Mask for relax types */ +#define RL78_RELAXA_BRA 0x00000010 /* Any type of branch (must be decoded). */ +#define RL78_RELAXA_ADDR16 0x00000020 /* addr16->sfr/saddr opportunity */ +#define RL78_RELAXA_RNUM 0x0000000f /* Number of associated relocations. */ +/* These mark the place where alignment is requested, and the place where the filler bytes end. */ +#define RL78_RELAXA_ALIGN 0x10000000 /* Start alignment; the remaining bits are the alignment value. */ +#define RL78_RELAXA_ELIGN 0x20000000 /* End alignment; the remaining bits are the alignment value. */ +#define RL78_RELAXA_ANUM 0x00ffffff /* Alignment amount, in bytes (i.e. .balign). */ + +#endif /* _ELF_RL78_H */ diff --git a/support/sdbinutils/include/elf/rx.h b/support/sdbinutils/include/elf/rx.h new file mode 100644 index 0000000..c449cdc --- /dev/null +++ b/support/sdbinutils/include/elf/rx.h @@ -0,0 +1,141 @@ +/* RX ELF support for BFD. + Copyright (C) 2008-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_RX_H +#define _ELF_RX_H + +#include "elf/reloc-macros.h" + +/* Note that there are a few internal relocation types used by the + linker to do link-time relaxation. If you update this file, please + check elf32-rx.c to see if any of the internal relocations need to + be, er, relocated. */ + +/* Preliminary relocations. */ +START_RELOC_NUMBERS (elf_rx_reloc_type) + + RELOC_NUMBER (R_RX_NONE, 0x00) + /* These are for data, and are bi-endian. */ + RELOC_NUMBER (R_RX_DIR32, 0x01) /* Was: R_RX_32. */ + RELOC_NUMBER (R_RX_DIR24S, 0x02) /* Was: R_RX_24. */ + RELOC_NUMBER (R_RX_DIR16, 0x03) + RELOC_NUMBER (R_RX_DIR16U, 0x04) /* Was: R_RX_16_UNS. */ + RELOC_NUMBER (R_RX_DIR16S, 0x05) /* Was: R_RX_16. */ + RELOC_NUMBER (R_RX_DIR8, 0x06) + RELOC_NUMBER (R_RX_DIR8U, 0x07) /* Was: R_RX_8_UNS. */ + RELOC_NUMBER (R_RX_DIR8S, 0x08) /* Was: R_RX_8. */ + + /* Signed pc-relative values. */ + RELOC_NUMBER (R_RX_DIR24S_PCREL, 0x09) /* Was: R_RX_24_PCREL. */ + RELOC_NUMBER (R_RX_DIR16S_PCREL, 0x0a) /* Was: R_RX_16_PCREL. */ + RELOC_NUMBER (R_RX_DIR8S_PCREL, 0x0b) /* Was: R_RX_8_PCREL. */ + + /* These are for fields in the instructions. */ + RELOC_NUMBER (R_RX_DIR16UL, 0x0c) + RELOC_NUMBER (R_RX_DIR16UW, 0x0d) + RELOC_NUMBER (R_RX_DIR8UL, 0x0e) + RELOC_NUMBER (R_RX_DIR8UW, 0x0f) + RELOC_NUMBER (R_RX_DIR32_REV, 0x10) + RELOC_NUMBER (R_RX_DIR16_REV, 0x11) + RELOC_NUMBER (R_RX_DIR3U_PCREL, 0x12) + + /* These are extensions added by Red Hat. */ + RELOC_NUMBER (R_RX_RH_3_PCREL, 0x20) /* Like R_RX_DIR8S_PCREL but only 3-bits. */ + RELOC_NUMBER (R_RX_RH_16_OP, 0x21) /* Like R_RX_DIR16 but for opcodes - always big endian. */ + RELOC_NUMBER (R_RX_RH_24_OP, 0x22) /* Like R_RX_DIR24S but for opcodes - always big endian. */ + RELOC_NUMBER (R_RX_RH_32_OP, 0x23) /* Like R_RX_DIR32 but for opcodes - always big endian. */ + RELOC_NUMBER (R_RX_RH_24_UNS, 0x24) /* Like R_RX_DIR24S but for unsigned values. */ + RELOC_NUMBER (R_RX_RH_8_NEG, 0x25) /* Like R_RX_DIR8 but -x is stored. */ + RELOC_NUMBER (R_RX_RH_16_NEG, 0x26) /* Like R_RX_DIR16 but -x is stored. */ + RELOC_NUMBER (R_RX_RH_24_NEG, 0x27) /* Like R_RX_DIR24S but -x is stored. */ + RELOC_NUMBER (R_RX_RH_32_NEG, 0x28) /* Like R_RX_DIR32 but -x is stored. */ + RELOC_NUMBER (R_RX_RH_DIFF, 0x29) /* Subtract from a previous relocation. */ + RELOC_NUMBER (R_RX_RH_GPRELB, 0x2a) /* Byte value, relative to __gp. */ + RELOC_NUMBER (R_RX_RH_GPRELW, 0x2b) /* Word value, relative to __gp. */ + RELOC_NUMBER (R_RX_RH_GPRELL, 0x2c) /* Long value, relative to __gp. */ + RELOC_NUMBER (R_RX_RH_RELAX, 0x2d) /* Marks opcodes suitable for linker relaxation. */ + + /* These are for complex relocs. */ + RELOC_NUMBER (R_RX_ABS32, 0x41) + RELOC_NUMBER (R_RX_ABS24S, 0x42) + RELOC_NUMBER (R_RX_ABS16, 0x43) + RELOC_NUMBER (R_RX_ABS16U, 0x44) + RELOC_NUMBER (R_RX_ABS16S, 0x45) + RELOC_NUMBER (R_RX_ABS8, 0x46) + RELOC_NUMBER (R_RX_ABS8U, 0x47) + RELOC_NUMBER (R_RX_ABS8S, 0x48) + RELOC_NUMBER (R_RX_ABS24S_PCREL, 0x49) + RELOC_NUMBER (R_RX_ABS16S_PCREL, 0x4a) + RELOC_NUMBER (R_RX_ABS8S_PCREL, 0x4b) + RELOC_NUMBER (R_RX_ABS16UL, 0x4c) + RELOC_NUMBER (R_RX_ABS16UW, 0x4d) + RELOC_NUMBER (R_RX_ABS8UL, 0x4e) + RELOC_NUMBER (R_RX_ABS8UW, 0x4f) + RELOC_NUMBER (R_RX_ABS32_REV, 0x50) + RELOC_NUMBER (R_RX_ABS16_REV, 0x51) + + RELOC_NUMBER (R_RX_SYM, 0x80) + RELOC_NUMBER (R_RX_OPneg, 0x81) + RELOC_NUMBER (R_RX_OPadd, 0x82) + RELOC_NUMBER (R_RX_OPsub, 0x83) + RELOC_NUMBER (R_RX_OPmul, 0x84) + RELOC_NUMBER (R_RX_OPdiv, 0x85) + RELOC_NUMBER (R_RX_OPshla, 0x86) + RELOC_NUMBER (R_RX_OPshra, 0x87) + RELOC_NUMBER (R_RX_OPsctsize, 0x88) + RELOC_NUMBER (R_RX_OPscttop, 0x8d) + RELOC_NUMBER (R_RX_OPand, 0x90) + RELOC_NUMBER (R_RX_OPor, 0x91) + RELOC_NUMBER (R_RX_OPxor, 0x92) + RELOC_NUMBER (R_RX_OPnot, 0x93) + RELOC_NUMBER (R_RX_OPmod, 0x94) + RELOC_NUMBER (R_RX_OPromtop, 0x95) + RELOC_NUMBER (R_RX_OPramtop, 0x96) + +END_RELOC_NUMBERS (R_RX_max) + +#define EF_RX_CPU_RX 0x00000079 /* FIXME: this collides with the E_FLAG_RX_... values below. */ +#define EF_RX_CPU_MASK 0x0000007F /* specific cpu bits. */ +#define EF_RX_ALL_FLAGS (EF_RX_CPU_MASK) + +/* Values for the e_flags field in the ELF header. */ +#define E_FLAG_RX_64BIT_DOUBLES (1 << 0) +#define E_FLAG_RX_DSP (1 << 1) /* Defined in the RX CPU Object file specification, but not explained. */ +#define E_FLAG_RX_PID (1 << 2) /* Unofficial - DJ */ +#define E_FLAG_RX_ABI (1 << 3) /* Binary passes stacked arguments using natural alignment. Unofficial - NC. */ +#define E_FLAG_RX_SINSNS_SET (1 << 6) /* Set if bit-5 is significant. */ +#define E_FLAG_RX_SINSNS_YES (1 << 7) /* Set if string instructions are used in the binary. */ +#define E_FLAG_RX_SINSNS_NO 0 /* Bit-5 if this binary must not be linked with a string instruction using binary. */ +#define E_FLAG_RX_SINSNS_MASK (3 << 6) /* Mask of bits used to determine string instruction use. */ +#define E_FLAG_RX_V2 (1 << 8) /* RX v2 instructions */ + +/* These define the addend field of R_RX_RH_RELAX relocations. */ +#define RX_RELAXA_IMM6 0x00000010 /* Imm8/16/24/32 at bit offset 6. */ +#define RX_RELAXA_IMM12 0x00000020 /* Imm8/16/24/32 at bit offset 12. */ +#define RX_RELAXA_DSP4 0x00000040 /* Dsp0/8/16 at bit offset 4. */ +#define RX_RELAXA_DSP6 0x00000080 /* Dsp0/8/16 at bit offset 6. */ +#define RX_RELAXA_DSP14 0x00000100 /* Dsp0/8/16 at bit offset 14. */ +#define RX_RELAXA_BRA 0x00000200 /* Any type of branch (must be decoded). */ +#define RX_RELAXA_RNUM 0x0000000f /* Number of associated relocations. */ +/* These mark the place where alignment is requested, and the place where the filler bytes end. */ +#define RX_RELAXA_ALIGN 0x10000000 /* Start alignment; the remaining bits are the alignment value. */ +#define RX_RELAXA_ELIGN 0x20000000 /* End alignment; the remaining bits are the alignment value. */ +#define RX_RELAXA_ANUM 0x00ffffff /* Alignment amount, in bytes (i.e. .balign). */ + +#endif /* _ELF_RX_H */ diff --git a/support/sdbinutils/include/elf/s390.h b/support/sdbinutils/include/elf/s390.h new file mode 100644 index 0000000..303282d --- /dev/null +++ b/support/sdbinutils/include/elf/s390.h @@ -0,0 +1,148 @@ +/* 390 ELF support for BFD. + Copyright (C) 2000-2018 Free Software Foundation, Inc. + Contributed by Carl B. Pedersen and Martin Schwidefsky. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#ifndef _ELF_390_H +#define _ELF_390_H + +/* Processor specific flags for the ELF header e_flags field. */ + +/* Symbol types. */ + +#define STACK_REG 15 /* Global Stack reg */ +#define BACKL_REG 14 /* Global Backlink reg */ +#define BASE_REG 13 /* Global Base reg */ +#define GOT_REG 12 /* Holds addr of GOT */ + +#include "elf/reloc-macros.h" + +/* Processor specific flags for the ELF header e_flags field. */ + +#define EF_S390_HIGH_GPRS 0x00000001 + +/* Request 4k page table size. */ +#define PT_S390_PGSTE (PT_LOPROC + 0) + +/* Relocation types. */ + +START_RELOC_NUMBERS (elf_s390_reloc_type) + RELOC_NUMBER (R_390_NONE, 0) /* No reloc. */ + RELOC_NUMBER (R_390_8, 1) /* Direct 8 bit. */ + RELOC_NUMBER (R_390_12, 2) /* Direct 12 bit. */ + RELOC_NUMBER (R_390_16, 3) /* Direct 16 bit. */ + RELOC_NUMBER (R_390_32, 4) /* Direct 32 bit. */ + RELOC_NUMBER (R_390_PC32, 5) /* PC relative 32 bit. */ + RELOC_NUMBER (R_390_GOT12, 6) /* 12 bit GOT offset. */ + RELOC_NUMBER (R_390_GOT32, 7) /* 32 bit GOT offset. */ + RELOC_NUMBER (R_390_PLT32, 8) /* 32 bit PC relative PLT address. */ + RELOC_NUMBER (R_390_COPY, 9) /* Copy symbol at runtime. */ + RELOC_NUMBER (R_390_GLOB_DAT, 10) /* Create GOT entry. */ + RELOC_NUMBER (R_390_JMP_SLOT, 11) /* Create PLT entry. */ + RELOC_NUMBER (R_390_RELATIVE, 12) /* Adjust by program base. */ + RELOC_NUMBER (R_390_GOTOFF32, 13) /* 32 bit offset to GOT. */ + RELOC_NUMBER (R_390_GOTPC, 14) /* 32 bit PC relative offset to GOT. */ + RELOC_NUMBER (R_390_GOT16, 15) /* 16 bit GOT offset. */ + RELOC_NUMBER (R_390_PC16, 16) /* PC relative 16 bit. */ + RELOC_NUMBER (R_390_PC12DBL, 62) /* PC relative 12 bit shifted by 1. */ + RELOC_NUMBER (R_390_PLT12DBL, 63) /* 12 bit PC rel. PLT shifted by 1. */ + RELOC_NUMBER (R_390_PC16DBL, 17) /* PC relative 16 bit shifted by 1. */ + RELOC_NUMBER (R_390_PLT16DBL, 18) /* 16 bit PC rel. PLT shifted by 1. */ + RELOC_NUMBER (R_390_PC24DBL, 64) /* PC relative 24 bit shifted by 1. */ + RELOC_NUMBER (R_390_PLT24DBL, 65) /* 24 bit PC rel. PLT shifted by 1. */ + RELOC_NUMBER (R_390_PC32DBL, 19) /* PC relative 32 bit shifted by 1. */ + RELOC_NUMBER (R_390_PLT32DBL, 20) /* 32 bit PC rel. PLT shifted by 1. */ + RELOC_NUMBER (R_390_GOTPCDBL, 21) /* 32 bit PC rel. GOT shifted by 1. */ + RELOC_NUMBER (R_390_64, 22) /* Direct 64 bit. */ + RELOC_NUMBER (R_390_PC64, 23) /* PC relative 64 bit. */ + RELOC_NUMBER (R_390_GOT64, 24) /* 64 bit GOT offset. */ + RELOC_NUMBER (R_390_PLT64, 25) /* 64 bit PC relative PLT address. */ + RELOC_NUMBER (R_390_GOTENT, 26) /* 32 bit PC rel. to GOT entry >> 1. */ + RELOC_NUMBER (R_390_GOTOFF16, 27) /* 16 bit offset to GOT. */ + RELOC_NUMBER (R_390_GOTOFF64, 28) /* 64 bit offset to GOT. */ + RELOC_NUMBER (R_390_GOTPLT12, 29) /* 12 bit offset to jump slot. */ + RELOC_NUMBER (R_390_GOTPLT16, 30) /* 16 bit offset to jump slot. */ + RELOC_NUMBER (R_390_GOTPLT32, 31) /* 32 bit offset to jump slot. */ + RELOC_NUMBER (R_390_GOTPLT64, 32) /* 64 bit offset to jump slot. */ + RELOC_NUMBER (R_390_GOTPLTENT, 33) /* 32 bit rel. offset to jump slot. */ + RELOC_NUMBER (R_390_PLTOFF16, 34) /* 16 bit offset from GOT to PLT. */ + RELOC_NUMBER (R_390_PLTOFF32, 35) /* 32 bit offset from GOT to PLT. */ + RELOC_NUMBER (R_390_PLTOFF64, 36) /* 16 bit offset from GOT to PLT. */ + RELOC_NUMBER (R_390_TLS_LOAD, 37) /* Tag for load insn in TLS code. */ + RELOC_NUMBER (R_390_TLS_GDCALL, 38) /* Tag for function call in general + dynamic TLS code. */ + RELOC_NUMBER (R_390_TLS_LDCALL, 39) /* Tag for function call in local + dynamic TLS code. */ + RELOC_NUMBER (R_390_TLS_GD32, 40) /* Direct 32 bit for general dynamic + thread local data. */ + RELOC_NUMBER (R_390_TLS_GD64, 41) /* Direct 64 bit for general dynamic + thread local data. */ + RELOC_NUMBER (R_390_TLS_GOTIE12, 42)/* 12 bit GOT offset for static TLS + block offset. */ + RELOC_NUMBER (R_390_TLS_GOTIE32, 43)/* 32 bit GOT offset for static TLS + block offset. */ + RELOC_NUMBER (R_390_TLS_GOTIE64, 44)/* 64 bit GOT offset for static TLS + block offset. */ + RELOC_NUMBER (R_390_TLS_LDM32, 45) /* Direct 32 bit for local dynamic + thread local data in LD code. */ + RELOC_NUMBER (R_390_TLS_LDM64, 46) /* Direct 64 bit for local dynamic + thread local data in LD code. */ + RELOC_NUMBER (R_390_TLS_IE32, 47) /* 32 bit address of GOT entry for + negated static TLS block offset. */ + RELOC_NUMBER (R_390_TLS_IE64, 48) /* 64 bit address of GOT entry for + negated static TLS block offset. */ + RELOC_NUMBER (R_390_TLS_IEENT, 49) /* 32 bit rel. offset to GOT entry for + negated static TLS block offset. */ + RELOC_NUMBER (R_390_TLS_LE32, 50) /* 32 bit negated offset relative to + static TLS block. */ + RELOC_NUMBER (R_390_TLS_LE64, 51) /* 64 bit negated offset relative to + static TLS block. */ + RELOC_NUMBER (R_390_TLS_LDO32, 52) /* 32 bit offset relative to TLS + block. */ + RELOC_NUMBER (R_390_TLS_LDO64, 53) /* 64 bit offset relative to TLS + block. */ + RELOC_NUMBER (R_390_TLS_DTPMOD, 54) /* ID of module containing symbol. */ + RELOC_NUMBER (R_390_TLS_DTPOFF, 55) /* Offset in TLS block. */ + RELOC_NUMBER (R_390_TLS_TPOFF, 56) /* Negate offset in static TLS + block. */ + RELOC_NUMBER (R_390_20, 57) /* Direct 20 bit. */ + RELOC_NUMBER (R_390_GOT20, 58) /* 20 bit GOT offset. */ + RELOC_NUMBER (R_390_GOTPLT20, 59) /* 20 bit offset to jump slot. */ + RELOC_NUMBER (R_390_TLS_GOTIE20, 60)/* 20 bit GOT offset for statis TLS + block offset. */ + RELOC_NUMBER (R_390_IRELATIVE, 61) /* IFUNC relocation. */ + /* These are GNU extensions to enable C++ vtable garbage collection. */ + RELOC_NUMBER (R_390_GNU_VTINHERIT, 250) + RELOC_NUMBER (R_390_GNU_VTENTRY, 251) +END_RELOC_NUMBERS (R_390_max) + +/* Object attribute tags. */ +enum +{ + /* 0-3 are generic. */ + /* 4 is reserved for the FP ABI. */ + + /* Vector ABI: + 0 = not affected by the vector ABI, or not tagged. + 1 = software vector ABI being used + 2 = hardware vector ABI being used. */ + Tag_GNU_S390_ABI_Vector = 8, +}; + +#endif /* _ELF_390_H */ diff --git a/support/sdbinutils/include/elf/score.h b/support/sdbinutils/include/elf/score.h new file mode 100644 index 0000000..b6ec77e --- /dev/null +++ b/support/sdbinutils/include/elf/score.h @@ -0,0 +1,131 @@ +/* Score ELF support for BFD. + Copyright (C) 2006-2018 Free Software Foundation, Inc. + Contributed by + Brain.lin (brain.lin@sunplusct.com) + Mei Ligang (ligang@sunnorth.com.cn) + Pei-Lin Tsai (pltsai@sunplus.com) + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef _ELF_SCORE_H +#define _ELF_SCORE_H + +#include "elf/reloc-macros.h" + +#define SCORE_SIMULATOR_ACTIVE 1 +#define OPC_PTMASK 0xc0000000 /* Parity-bit Mask. */ +#define OPC16_PTMASK 0x00008000 +/* The parity-bit denotes. */ +#define OPC_32 0xc0000000 /* Denotes 32b instruction, (default). */ +#define OPC_16 0x00000000 /* Denotes 16b instruction. */ +#define OPC_PE 0x8000 /* Denotes parallel-execution instructions. */ +#define GP_DISP_LABEL "_gp_disp" + +/* Processor specific flags for the ELF header e_flags field: */ +#define EF_SCORE_MACH 0xffff0000 +#define EF_OMIT_PIC_FIXDD 0x0fff0000 +#define E_SCORE_MACH_SCORE3 0x00030000 +#define E_SCORE_MACH_SCORE7 0x00070000 + +/* File contains position independent code. */ +#define EF_SCORE_PIC 0x80000000 + +/* Fix data dependency. */ +#define EF_SCORE_FIXDEP 0x40000000 + +/* Defined and allocated common symbol. Value is virtual address. If + relocated, alignment must be preserved. */ +#define SHN_SCORE_TEXT (SHN_LORESERVE + 1) +#define SHN_SCORE_DATA (SHN_LORESERVE + 2) +/* Small common symbol. */ +#define SHN_SCORE_SCOMMON (SHN_LORESERVE + 3) + +/* Processor specific section flags. */ + +/* This section must be in the global data area. */ +#define SHF_SCORE_GPREL 0x10000000 + +/* This section should be merged. */ +#define SHF_SCORE_MERGE 0x20000000 + +/* This section contains address data of size implied by section + element size. */ +#define SHF_SCORE_ADDR 0x40000000 + +/* This section contains string data. */ +#define SHF_SCORE_STRING 0x80000000 + +/* This section may not be stripped. */ +#define SHF_SCORE_NOSTRIP 0x08000000 + +/* This section is local to threads. */ +#define SHF_SCORE_LOCAL 0x04000000 + +/* Linker should generate implicit weak names for this section. */ +#define SHF_SCORE_NAMES 0x02000000 + +/* Section contais text/data which may be replicated in other sections. + Linker should retain only one copy. */ +#define SHF_SCORE_NODUPES 0x01000000 + +/* Processor specific dynamic array tags. */ + +/* Base address of the segment. */ +#define DT_SCORE_BASE_ADDRESS 0x70000001 +/* Number of local global offset table entries. */ +#define DT_SCORE_LOCAL_GOTNO 0x70000002 +/* Number of entries in the .dynsym section. */ +#define DT_SCORE_SYMTABNO 0x70000003 +/* Index of first dynamic symbol in global offset table. */ +#define DT_SCORE_GOTSYM 0x70000004 +/* Index of first external dynamic symbol not referenced locally. */ +#define DT_SCORE_UNREFEXTNO 0x70000005 +/* Number of page table entries in global offset table. */ +#define DT_SCORE_HIPAGENO 0x70000006 + + +/* Processor specific section types. */ + + +/* Relocation types. */ +START_RELOC_NUMBERS (elf_score_reloc_type) + RELOC_NUMBER (R_SCORE_NONE, 0) + RELOC_NUMBER (R_SCORE_HI16, 1) + RELOC_NUMBER (R_SCORE_LO16, 2) + RELOC_NUMBER (R_SCORE_BCMP, 3) + RELOC_NUMBER (R_SCORE_24, 4) + RELOC_NUMBER (R_SCORE_PC19, 5) + RELOC_NUMBER (R_SCORE16_11, 6) + RELOC_NUMBER (R_SCORE16_PC8, 7) + RELOC_NUMBER (R_SCORE_ABS32, 8) + RELOC_NUMBER (R_SCORE_ABS16, 9) + RELOC_NUMBER (R_SCORE_DUMMY2, 10) + RELOC_NUMBER (R_SCORE_GP15, 11) + RELOC_NUMBER (R_SCORE_GNU_VTINHERIT, 12) + RELOC_NUMBER (R_SCORE_GNU_VTENTRY, 13) + RELOC_NUMBER (R_SCORE_GOT15, 14) + RELOC_NUMBER (R_SCORE_GOT_LO16, 15) + RELOC_NUMBER (R_SCORE_CALL15, 16) + RELOC_NUMBER (R_SCORE_GPREL32, 17) + RELOC_NUMBER (R_SCORE_REL32, 18) + RELOC_NUMBER (R_SCORE_DUMMY_HI16, 19) + RELOC_NUMBER (R_SCORE_IMM30, 20) + RELOC_NUMBER (R_SCORE_IMM32, 21) +END_RELOC_NUMBERS (R_SCORE_max) + +#endif /* _ELF_SCORE_H */ diff --git a/support/sdbinutils/include/elf/sh.h b/support/sdbinutils/include/elf/sh.h new file mode 100644 index 0000000..d60d879 --- /dev/null +++ b/support/sdbinutils/include/elf/sh.h @@ -0,0 +1,257 @@ +/* SH ELF support for BFD. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_SH_H +#define _ELF_SH_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Processor specific flags for the ELF header e_flags field. */ + +#define EF_SH_MACH_MASK 0x1f +#define EF_SH_UNKNOWN 0 /* For backwards compatibility. */ +#define EF_SH1 1 +#define EF_SH2 2 +#define EF_SH3 3 +#define EF_SH_DSP 4 +#define EF_SH3_DSP 5 +#define EF_SH4AL_DSP 6 +#define EF_SH3E 8 +#define EF_SH4 9 +#define EF_SH2E 11 +#define EF_SH4A 12 +#define EF_SH2A 13 + +#define EF_SH4_NOFPU 16 +#define EF_SH4A_NOFPU 17 +#define EF_SH4_NOMMU_NOFPU 18 +#define EF_SH2A_NOFPU 19 +#define EF_SH3_NOMMU 20 + +#define EF_SH2A_SH4_NOFPU 21 +#define EF_SH2A_SH3_NOFPU 22 +#define EF_SH2A_SH4 23 +#define EF_SH2A_SH3E 24 + +/* This one can only mix in objects from other EF_SH5 objects. */ +#define EF_SH5 10 + +/* Define the mapping from ELF to bfd mach numbers. + bfd_mach_* are defined in bfd_in2.h (generated from + archures.c). */ +#define EF_SH_BFD_TABLE \ +/* EF_SH_UNKNOWN */ bfd_mach_sh , \ +/* EF_SH1 */ bfd_mach_sh , \ +/* EF_SH2 */ bfd_mach_sh2 , \ +/* EF_SH3 */ bfd_mach_sh3 , \ +/* EF_SH_DSP */ bfd_mach_sh_dsp , \ +/* EF_SH3_DSP */ bfd_mach_sh3_dsp , \ +/* EF_SHAL_DSP */ bfd_mach_sh4al_dsp , \ +/* 7 */ 0, \ +/* EF_SH3E */ bfd_mach_sh3e , \ +/* EF_SH4 */ bfd_mach_sh4 , \ +/* EF_SH5 */ 0, \ +/* EF_SH2E */ bfd_mach_sh2e , \ +/* EF_SH4A */ bfd_mach_sh4a , \ +/* EF_SH2A */ bfd_mach_sh2a , \ +/* 14, 15 */ 0, 0, \ +/* EF_SH4_NOFPU */ bfd_mach_sh4_nofpu , \ +/* EF_SH4A_NOFPU */ bfd_mach_sh4a_nofpu , \ +/* EF_SH4_NOMMU_NOFPU */ bfd_mach_sh4_nommu_nofpu, \ +/* EF_SH2A_NOFPU */ bfd_mach_sh2a_nofpu , \ +/* EF_SH3_NOMMU */ bfd_mach_sh3_nommu , \ +/* EF_SH2A_SH4_NOFPU */ bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu, \ +/* EF_SH2A_SH3_NOFPU */ bfd_mach_sh2a_nofpu_or_sh3_nommu, \ +/* EF_SH2A_SH4 */ bfd_mach_sh2a_or_sh4 , \ +/* EF_SH2A_SH3E */ bfd_mach_sh2a_or_sh3e + +/* Convert arch_sh* into EF_SH*. */ +int sh_find_elf_flags (unsigned int arch_set); + +/* Convert bfd_mach_* into EF_SH*. */ +int sh_elf_get_flags_from_mach (unsigned long mach); + +/* Other e_flags bits. */ + +#define EF_SH_PIC 0x100 /* Segments of an FDPIC binary may + be relocated independently. */ +#define EF_SH_FDPIC 0x8000 /* Uses the FDPIC ABI. */ + +/* Flags for the st_other symbol field. + Keep away from the STV_ visibility flags (bit 0..1). */ + +/* A reference to this symbol should by default add 1. */ +#define STO_SH5_ISA32 (1 << 2) + +/* Section contains only SHmedia code (no SHcompact code). */ +#define SHF_SH5_ISA32 0x40000000 + +/* Section contains both SHmedia and SHcompact code, and possibly also + constants. */ +#define SHF_SH5_ISA32_MIXED 0x20000000 + +/* If applied to a .cranges section, marks that the section is sorted by + increasing cr_addr values. */ +#define SHT_SH5_CR_SORTED 0x80000001 + +/* Symbol should be handled as DataLabel (attached to global SHN_UNDEF + symbols). */ +#define STT_DATALABEL STT_LOPROC + +#include "elf/reloc-macros.h" + +/* Relocations. */ +/* Relocations 10-32 and 128-255 are GNU extensions. + 25..32 and 10 are used for relaxation. */ +START_RELOC_NUMBERS (elf_sh_reloc_type) + RELOC_NUMBER (R_SH_NONE, 0) + RELOC_NUMBER (R_SH_DIR32, 1) + RELOC_NUMBER (R_SH_REL32, 2) + RELOC_NUMBER (R_SH_DIR8WPN, 3) + RELOC_NUMBER (R_SH_IND12W, 4) + RELOC_NUMBER (R_SH_DIR8WPL, 5) + RELOC_NUMBER (R_SH_DIR8WPZ, 6) + RELOC_NUMBER (R_SH_DIR8BP, 7) + RELOC_NUMBER (R_SH_DIR8W, 8) + RELOC_NUMBER (R_SH_DIR8L, 9) + + RELOC_NUMBER (R_SH_LOOP_START, 10) + RELOC_NUMBER (R_SH_LOOP_END, 11) + + FAKE_RELOC (R_SH_FIRST_INVALID_RELOC, 12) + FAKE_RELOC (R_SH_LAST_INVALID_RELOC, 21) + + RELOC_NUMBER (R_SH_GNU_VTINHERIT, 22) + RELOC_NUMBER (R_SH_GNU_VTENTRY, 23) + RELOC_NUMBER (R_SH_SWITCH8, 24) + RELOC_NUMBER (R_SH_SWITCH16, 25) + RELOC_NUMBER (R_SH_SWITCH32, 26) + RELOC_NUMBER (R_SH_USES, 27) + RELOC_NUMBER (R_SH_COUNT, 28) + RELOC_NUMBER (R_SH_ALIGN, 29) + RELOC_NUMBER (R_SH_CODE, 30) + RELOC_NUMBER (R_SH_DATA, 31) + RELOC_NUMBER (R_SH_LABEL, 32) + + RELOC_NUMBER (R_SH_DIR16, 33) + RELOC_NUMBER (R_SH_DIR8, 34) + RELOC_NUMBER (R_SH_DIR8UL, 35) + RELOC_NUMBER (R_SH_DIR8UW, 36) + RELOC_NUMBER (R_SH_DIR8U, 37) + RELOC_NUMBER (R_SH_DIR8SW, 38) + RELOC_NUMBER (R_SH_DIR8S, 39) + RELOC_NUMBER (R_SH_DIR4UL, 40) + RELOC_NUMBER (R_SH_DIR4UW, 41) + RELOC_NUMBER (R_SH_DIR4U, 42) + RELOC_NUMBER (R_SH_PSHA, 43) + RELOC_NUMBER (R_SH_PSHL, 44) + RELOC_NUMBER (R_SH_DIR5U, 45) + RELOC_NUMBER (R_SH_DIR6U, 46) + RELOC_NUMBER (R_SH_DIR6S, 47) + RELOC_NUMBER (R_SH_DIR10S, 48) + RELOC_NUMBER (R_SH_DIR10SW, 49) + RELOC_NUMBER (R_SH_DIR10SL, 50) + RELOC_NUMBER (R_SH_DIR10SQ, 51) + FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_2, 52) + FAKE_RELOC (R_SH_LAST_INVALID_RELOC_2, 52) + RELOC_NUMBER (R_SH_DIR16S, 53) + FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_3, 54) + FAKE_RELOC (R_SH_LAST_INVALID_RELOC_3, 143) + RELOC_NUMBER (R_SH_TLS_GD_32, 144) + RELOC_NUMBER (R_SH_TLS_LD_32, 145) + RELOC_NUMBER (R_SH_TLS_LDO_32, 146) + RELOC_NUMBER (R_SH_TLS_IE_32, 147) + RELOC_NUMBER (R_SH_TLS_LE_32, 148) + RELOC_NUMBER (R_SH_TLS_DTPMOD32, 149) + RELOC_NUMBER (R_SH_TLS_DTPOFF32, 150) + RELOC_NUMBER (R_SH_TLS_TPOFF32, 151) + FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_4, 152) + FAKE_RELOC (R_SH_LAST_INVALID_RELOC_4, 159) + RELOC_NUMBER (R_SH_GOT32, 160) + RELOC_NUMBER (R_SH_PLT32, 161) + RELOC_NUMBER (R_SH_COPY, 162) + RELOC_NUMBER (R_SH_GLOB_DAT, 163) + RELOC_NUMBER (R_SH_JMP_SLOT, 164) + RELOC_NUMBER (R_SH_RELATIVE, 165) + RELOC_NUMBER (R_SH_GOTOFF, 166) + RELOC_NUMBER (R_SH_GOTPC, 167) + RELOC_NUMBER (R_SH_GOTPLT32, 168) + RELOC_NUMBER (R_SH_GOT_LOW16, 169) + RELOC_NUMBER (R_SH_GOT_MEDLOW16, 170) + RELOC_NUMBER (R_SH_GOT_MEDHI16, 171) + RELOC_NUMBER (R_SH_GOT_HI16, 172) + RELOC_NUMBER (R_SH_GOTPLT_LOW16, 173) + RELOC_NUMBER (R_SH_GOTPLT_MEDLOW16, 174) + RELOC_NUMBER (R_SH_GOTPLT_MEDHI16, 175) + RELOC_NUMBER (R_SH_GOTPLT_HI16, 176) + RELOC_NUMBER (R_SH_PLT_LOW16, 177) + RELOC_NUMBER (R_SH_PLT_MEDLOW16, 178) + RELOC_NUMBER (R_SH_PLT_MEDHI16, 179) + RELOC_NUMBER (R_SH_PLT_HI16, 180) + RELOC_NUMBER (R_SH_GOTOFF_LOW16, 181) + RELOC_NUMBER (R_SH_GOTOFF_MEDLOW16, 182) + RELOC_NUMBER (R_SH_GOTOFF_MEDHI16, 183) + RELOC_NUMBER (R_SH_GOTOFF_HI16, 184) + RELOC_NUMBER (R_SH_GOTPC_LOW16, 185) + RELOC_NUMBER (R_SH_GOTPC_MEDLOW16, 186) + RELOC_NUMBER (R_SH_GOTPC_MEDHI16, 187) + RELOC_NUMBER (R_SH_GOTPC_HI16, 188) + RELOC_NUMBER (R_SH_GOT10BY4, 189) + RELOC_NUMBER (R_SH_GOTPLT10BY4, 190) + RELOC_NUMBER (R_SH_GOT10BY8, 191) + RELOC_NUMBER (R_SH_GOTPLT10BY8, 192) + RELOC_NUMBER (R_SH_COPY64, 193) + RELOC_NUMBER (R_SH_GLOB_DAT64, 194) + RELOC_NUMBER (R_SH_JMP_SLOT64, 195) + RELOC_NUMBER (R_SH_RELATIVE64, 196) + FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_5, 197) + FAKE_RELOC (R_SH_LAST_INVALID_RELOC_5, 200) + RELOC_NUMBER (R_SH_GOT20, 201) + RELOC_NUMBER (R_SH_GOTOFF20, 202) + RELOC_NUMBER (R_SH_GOTFUNCDESC, 203) + RELOC_NUMBER (R_SH_GOTFUNCDESC20, 204) + RELOC_NUMBER (R_SH_GOTOFFFUNCDESC, 205) + RELOC_NUMBER (R_SH_GOTOFFFUNCDESC20, 206) + RELOC_NUMBER (R_SH_FUNCDESC, 207) + RELOC_NUMBER (R_SH_FUNCDESC_VALUE, 208) + FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_6, 209) + FAKE_RELOC (R_SH_LAST_INVALID_RELOC_6, 241) + RELOC_NUMBER (R_SH_SHMEDIA_CODE, 242) + RELOC_NUMBER (R_SH_PT_16, 243) + RELOC_NUMBER (R_SH_IMMS16, 244) + RELOC_NUMBER (R_SH_IMMU16, 245) + RELOC_NUMBER (R_SH_IMM_LOW16, 246) + RELOC_NUMBER (R_SH_IMM_LOW16_PCREL, 247) + RELOC_NUMBER (R_SH_IMM_MEDLOW16, 248) + RELOC_NUMBER (R_SH_IMM_MEDLOW16_PCREL, 249) + RELOC_NUMBER (R_SH_IMM_MEDHI16, 250) + RELOC_NUMBER (R_SH_IMM_MEDHI16_PCREL, 251) + RELOC_NUMBER (R_SH_IMM_HI16, 252) + RELOC_NUMBER (R_SH_IMM_HI16_PCREL, 253) + RELOC_NUMBER (R_SH_64, 254) + RELOC_NUMBER (R_SH_64_PCREL, 255) +END_RELOC_NUMBERS (R_SH_max) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/support/sdbinutils/include/elf/sparc.h b/support/sdbinutils/include/elf/sparc.h new file mode 100644 index 0000000..d4625ff --- /dev/null +++ b/support/sdbinutils/include/elf/sparc.h @@ -0,0 +1,261 @@ +/* SPARC ELF support for BFD. + Copyright (C) 1996-2018 Free Software Foundation, Inc. + By Doug Evans, 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 _ELF_SPARC_H +#define _ELF_SPARC_H + +/* Processor specific flags for the ELF header e_flags field. */ + +/* These are defined by Sun. */ + +#define EF_SPARC_32PLUS_MASK 0xffff00 /* bits indicating V8+ type */ +#define EF_SPARC_32PLUS 0x000100 /* generic V8+ features */ +#define EF_SPARC_SUN_US1 0x000200 /* Sun UltraSPARC1 extensions */ +#define EF_SPARC_HAL_R1 0x000400 /* HAL R1 extensions */ +#define EF_SPARC_SUN_US3 0x000800 /* Sun UltraSPARCIII extensions */ + +#define EF_SPARC_LEDATA 0x800000 /* little endian data */ + +/* This name is used in the V9 ABI. */ +#define EF_SPARC_EXT_MASK 0xffff00 /* reserved for vendor extensions */ + +/* V9 memory models */ +#define EF_SPARCV9_MM 0x3 /* memory model mask */ +#define EF_SPARCV9_TSO 0x0 /* total store ordering */ +#define EF_SPARCV9_PSO 0x1 /* partial store ordering */ +#define EF_SPARCV9_RMO 0x2 /* relaxed store ordering */ + +/* Section indices. */ + +#define SHN_BEFORE SHN_LORESERVE /* Used with SHF_ORDERED and... */ +#define SHN_AFTER (SHN_LORESERVE + 1) /* SHF_LINK_ORDER section flags. */ + +/* Section flags. */ + +#define SHF_ORDERED 0x40000000 /* treat sh_link,sh_info specially */ + +/* Symbol types. */ + +#define STT_REGISTER 13 /* global reg reserved to app. */ + +#include "elf/reloc-macros.h" + +/* Relocation types. */ +START_RELOC_NUMBERS (elf_sparc_reloc_type) + RELOC_NUMBER (R_SPARC_NONE, 0) + RELOC_NUMBER (R_SPARC_8, 1) + RELOC_NUMBER (R_SPARC_16, 2) + RELOC_NUMBER (R_SPARC_32, 3) + RELOC_NUMBER (R_SPARC_DISP8, 4) + RELOC_NUMBER (R_SPARC_DISP16, 5) + RELOC_NUMBER (R_SPARC_DISP32, 6) + RELOC_NUMBER (R_SPARC_WDISP30, 7) + RELOC_NUMBER (R_SPARC_WDISP22, 8) + RELOC_NUMBER (R_SPARC_HI22, 9) + RELOC_NUMBER (R_SPARC_22, 10) + RELOC_NUMBER (R_SPARC_13, 11) + RELOC_NUMBER (R_SPARC_LO10, 12) + RELOC_NUMBER (R_SPARC_GOT10, 13) + RELOC_NUMBER (R_SPARC_GOT13, 14) + RELOC_NUMBER (R_SPARC_GOT22, 15) + RELOC_NUMBER (R_SPARC_PC10, 16) + RELOC_NUMBER (R_SPARC_PC22, 17) + RELOC_NUMBER (R_SPARC_WPLT30, 18) + RELOC_NUMBER (R_SPARC_COPY, 19) + RELOC_NUMBER (R_SPARC_GLOB_DAT, 20) + RELOC_NUMBER (R_SPARC_JMP_SLOT, 21) + RELOC_NUMBER (R_SPARC_RELATIVE, 22) + RELOC_NUMBER (R_SPARC_UA32, 23) + + /* ??? These 6 relocs are new but not currently used. For binary + compatibility in the sparc64-elf toolchain, we leave them out. + A non-binary upward compatible change is expected for sparc64-elf. */ +#ifndef SPARC64_OLD_RELOCS + /* ??? New relocs on the UltraSPARC. Not sure what they're for yet. */ + RELOC_NUMBER (R_SPARC_PLT32, 24) + RELOC_NUMBER (R_SPARC_HIPLT22, 25) + RELOC_NUMBER (R_SPARC_LOPLT10, 26) + RELOC_NUMBER (R_SPARC_PCPLT32, 27) + RELOC_NUMBER (R_SPARC_PCPLT22, 28) + RELOC_NUMBER (R_SPARC_PCPLT10, 29) +#endif + + /* v9 relocs */ + RELOC_NUMBER (R_SPARC_10, 30) + RELOC_NUMBER (R_SPARC_11, 31) + RELOC_NUMBER (R_SPARC_64, 32) + RELOC_NUMBER (R_SPARC_OLO10, 33) + RELOC_NUMBER (R_SPARC_HH22, 34) + RELOC_NUMBER (R_SPARC_HM10, 35) + RELOC_NUMBER (R_SPARC_LM22, 36) + RELOC_NUMBER (R_SPARC_PC_HH22, 37) + RELOC_NUMBER (R_SPARC_PC_HM10, 38) + RELOC_NUMBER (R_SPARC_PC_LM22, 39) + RELOC_NUMBER (R_SPARC_WDISP16, 40) + RELOC_NUMBER (R_SPARC_WDISP19, 41) + RELOC_NUMBER (R_SPARC_UNUSED_42, 42) + RELOC_NUMBER (R_SPARC_7, 43) + RELOC_NUMBER (R_SPARC_5, 44) + RELOC_NUMBER (R_SPARC_6, 45) + RELOC_NUMBER (R_SPARC_DISP64, 46) + RELOC_NUMBER (R_SPARC_PLT64, 47) + RELOC_NUMBER (R_SPARC_HIX22, 48) + RELOC_NUMBER (R_SPARC_LOX10, 49) + RELOC_NUMBER (R_SPARC_H44, 50) + RELOC_NUMBER (R_SPARC_M44, 51) + RELOC_NUMBER (R_SPARC_L44, 52) + RELOC_NUMBER (R_SPARC_REGISTER, 53) + RELOC_NUMBER (R_SPARC_UA64, 54) + RELOC_NUMBER (R_SPARC_UA16, 55) + + RELOC_NUMBER (R_SPARC_TLS_GD_HI22, 56) + RELOC_NUMBER (R_SPARC_TLS_GD_LO10, 57) + RELOC_NUMBER (R_SPARC_TLS_GD_ADD, 58) + RELOC_NUMBER (R_SPARC_TLS_GD_CALL, 59) + RELOC_NUMBER (R_SPARC_TLS_LDM_HI22, 60) + RELOC_NUMBER (R_SPARC_TLS_LDM_LO10, 61) + RELOC_NUMBER (R_SPARC_TLS_LDM_ADD, 62) + RELOC_NUMBER (R_SPARC_TLS_LDM_CALL, 63) + RELOC_NUMBER (R_SPARC_TLS_LDO_HIX22, 64) + RELOC_NUMBER (R_SPARC_TLS_LDO_LOX10, 65) + RELOC_NUMBER (R_SPARC_TLS_LDO_ADD, 66) + RELOC_NUMBER (R_SPARC_TLS_IE_HI22, 67) + RELOC_NUMBER (R_SPARC_TLS_IE_LO10, 68) + RELOC_NUMBER (R_SPARC_TLS_IE_LD, 69) + RELOC_NUMBER (R_SPARC_TLS_IE_LDX, 70) + RELOC_NUMBER (R_SPARC_TLS_IE_ADD, 71) + RELOC_NUMBER (R_SPARC_TLS_LE_HIX22, 72) + RELOC_NUMBER (R_SPARC_TLS_LE_LOX10, 73) + RELOC_NUMBER (R_SPARC_TLS_DTPMOD32, 74) + RELOC_NUMBER (R_SPARC_TLS_DTPMOD64, 75) + RELOC_NUMBER (R_SPARC_TLS_DTPOFF32, 76) + RELOC_NUMBER (R_SPARC_TLS_DTPOFF64, 77) + RELOC_NUMBER (R_SPARC_TLS_TPOFF32, 78) + RELOC_NUMBER (R_SPARC_TLS_TPOFF64, 79) + + RELOC_NUMBER (R_SPARC_GOTDATA_HIX22, 80) + RELOC_NUMBER (R_SPARC_GOTDATA_LOX10, 81) + RELOC_NUMBER (R_SPARC_GOTDATA_OP_HIX22, 82) + RELOC_NUMBER (R_SPARC_GOTDATA_OP_LOX10, 83) + RELOC_NUMBER (R_SPARC_GOTDATA_OP, 84) + + RELOC_NUMBER (R_SPARC_H34, 85) + RELOC_NUMBER (R_SPARC_SIZE32, 86) + RELOC_NUMBER (R_SPARC_SIZE64, 87) + RELOC_NUMBER (R_SPARC_WDISP10, 88) + + EMPTY_RELOC (R_SPARC_max_std) + + RELOC_NUMBER (R_SPARC_JMP_IREL, 248) + RELOC_NUMBER (R_SPARC_IRELATIVE, 249) + RELOC_NUMBER (R_SPARC_GNU_VTINHERIT, 250) + RELOC_NUMBER (R_SPARC_GNU_VTENTRY, 251) + RELOC_NUMBER (R_SPARC_REV32, 252) + +END_RELOC_NUMBERS (R_SPARC_max) + +/* Relocation macros. */ + +#define ELF64_R_TYPE_DATA(info) \ + (((bfd_signed_vma)(ELF64_R_TYPE(info) >> 8) ^ 0x800000) - 0x800000) +#define ELF64_R_TYPE_ID(info) \ + ((info) & 0xff) +#define ELF64_R_TYPE_INFO(data, type) \ + (((bfd_vma) ((data) & 0xffffff) << 8) | (bfd_vma) (type)) + +/* Values for Elf64_Dyn.d_tag. */ + +#define DT_SPARC_REGISTER 0x70000001 + +/* Object attribute tags. */ +enum +{ + /* 0-3 are generic. */ + Tag_GNU_Sparc_HWCAPS = 4, + Tag_GNU_Sparc_HWCAPS2 = 8 +}; + +/* Generally speaking the ELF_SPARC_HWCAP_* and ELF_SPARC_HWCAP2_* + values match the AV_SPARC_* and AV2_SPARC_* bits respectively. + + However Solaris 11 introduced a backwards-incompatible change + deprecating the RANDOM, TRANS and ASI_CACHE_SPARING bits in the + AT_SUNW_CAP_HW1 flags, reusing the bits for the unrelated hwcaps + FJATHHPC, FJDES and FJAES respectively. In GNU/Linux we opted to + keep the old hwcaps in Tag_GNU_Sparc_HWCAPS and allocate bits for + FJATHHPC, FJDES and JFAES in Tag_GNU_Sparc_HWCAPS2. */ + +#define ELF_SPARC_HWCAP_MUL32 0x00000001 /* umul/umulcc/smul/smulcc insns */ +#define ELF_SPARC_HWCAP_DIV32 0x00000002 /* udiv/udivcc/sdiv/sdivcc insns */ +#define ELF_SPARC_HWCAP_FSMULD 0x00000004 /* 'fsmuld' insn */ +#define ELF_SPARC_HWCAP_V8PLUS 0x00000008 /* v9 insns available to 32bit */ +#define ELF_SPARC_HWCAP_POPC 0x00000010 /* 'popc' insn */ +#define ELF_SPARC_HWCAP_VIS 0x00000020 /* VIS insns */ +#define ELF_SPARC_HWCAP_VIS2 0x00000040 /* VIS2 insns */ +#define ELF_SPARC_HWCAP_ASI_BLK_INIT \ + 0x00000080 /* block init ASIs */ +#define ELF_SPARC_HWCAP_FMAF 0x00000100 /* fused multiply-add */ +#define ELF_SPARC_HWCAP_VIS3 0x00000400 /* VIS3 insns */ +#define ELF_SPARC_HWCAP_HPC 0x00000800 /* HPC insns */ +#define ELF_SPARC_HWCAP_RANDOM 0x00001000 /* 'random' insn */ +#define ELF_SPARC_HWCAP_TRANS 0x00002000 /* transaction insns */ +#define ELF_SPARC_HWCAP_FJFMAU 0x00004000 /* unfused multiply-add */ +#define ELF_SPARC_HWCAP_IMA 0x00008000 /* integer multiply-add */ +#define ELF_SPARC_HWCAP_ASI_CACHE_SPARING \ + 0x00010000 /* cache sparing ASIs */ +#define ELF_SPARC_HWCAP_AES 0x00020000 /* AES crypto insns */ +#define ELF_SPARC_HWCAP_DES 0x00040000 /* DES crypto insns */ +#define ELF_SPARC_HWCAP_KASUMI 0x00080000 /* KASUMI crypto insns */ +#define ELF_SPARC_HWCAP_CAMELLIA \ + 0x00100000 /* CAMELLIA crypto insns */ +#define ELF_SPARC_HWCAP_MD5 0x00200000 /* MD5 hashing insns */ +#define ELF_SPARC_HWCAP_SHA1 0x00400000 /* SHA1 hashing insns */ +#define ELF_SPARC_HWCAP_SHA256 0x00800000 /* SHA256 hashing insns */ +#define ELF_SPARC_HWCAP_SHA512 0x01000000 /* SHA512 hashing insns */ +#define ELF_SPARC_HWCAP_MPMUL 0x02000000 /* Multiple Precision Multiply */ +#define ELF_SPARC_HWCAP_MONT 0x04000000 /* Montgomery Mult/Sqrt */ +#define ELF_SPARC_HWCAP_PAUSE 0x08000000 /* Pause insn */ +#define ELF_SPARC_HWCAP_CBCOND 0x10000000 /* Compare and Branch insns */ +#define ELF_SPARC_HWCAP_CRC32C 0x20000000 /* CRC32C insn */ + +#define ELF_SPARC_HWCAP2_FJATHPLUS 0x00000001 /* Fujitsu Athena+ */ +#define ELF_SPARC_HWCAP2_VIS3B 0x00000002 /* Subset of VIS3 present on sparc64 X+ */ +#define ELF_SPARC_HWCAP2_ADP 0x00000004 /* Application Data Protection */ +#define ELF_SPARC_HWCAP2_SPARC5 0x00000008 /* The 29 new fp and sub instructions */ +#define ELF_SPARC_HWCAP2_MWAIT 0x00000010 /* mwait instruction and load/monitor ASIs */ +#define ELF_SPARC_HWCAP2_XMPMUL 0x00000020 /* XOR multiple precision multiply */ +#define ELF_SPARC_HWCAP2_XMONT 0x00000040 /* XOR Montgomery mult/sqr instructions */ +#define ELF_SPARC_HWCAP2_NSEC \ + 0x00000080 /* pause insn with support for nsec timings */ +#define ELF_SPARC_HWCAP2_FJATHHPC 0x00001000 /* Fujitsu HPC instrs */ +#define ELF_SPARC_HWCAP2_FJDES 0x00002000 /* Fujitsu DES instrs */ +#define ELF_SPARC_HWCAP2_FJAES 0x00010000 /* Fujitsu AES instrs */ + +#define ELF_SPARC_HWCAP2_SPARC6 0x00020000 /* OSA2017 new instructions */ +#define ELF_SPARC_HWCAP2_ONADDSUB 0x00040000 /* Oracle Number add/subtract */ +#define ELF_SPARC_HWCAP2_ONMUL 0x00080000 /* Oracle Number multiply */ +#define ELF_SPARC_HWCAP2_ONDIV 0x00100000 /* Oracle Number divide */ +#define ELF_SPARC_HWCAP2_DICTUNP 0x00200000 /* Dictionary unpack instruction */ +#define ELF_SPARC_HWCAP2_FPCMPSHL 0x00400000 /* Partition compare with shifted result */ +#define ELF_SPARC_HWCAP2_RLE 0x00800000 /* Run-length encoded burst and length */ +#define ELF_SPARC_HWCAP2_SHA3 0x01000000 /* SHA3 instruction */ + +#endif /* _ELF_SPARC_H */ diff --git a/support/sdbinutils/include/elf/spu.h b/support/sdbinutils/include/elf/spu.h new file mode 100644 index 0000000..66ae6c0 --- /dev/null +++ b/support/sdbinutils/include/elf/spu.h @@ -0,0 +1,61 @@ +/* SPU ELF support for BFD. + + Copyright (C) 2006-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_SPU_H +#define _ELF_SPU_H + +#include "elf/reloc-macros.h" + +/* elf32-spu.c depends on these being consecutive. */ +START_RELOC_NUMBERS (elf_spu_reloc_type) + RELOC_NUMBER (R_SPU_NONE, 0) + RELOC_NUMBER (R_SPU_ADDR10, 1) + RELOC_NUMBER (R_SPU_ADDR16, 2) + RELOC_NUMBER (R_SPU_ADDR16_HI, 3) + RELOC_NUMBER (R_SPU_ADDR16_LO, 4) + RELOC_NUMBER (R_SPU_ADDR18, 5) + RELOC_NUMBER (R_SPU_ADDR32, 6) + RELOC_NUMBER (R_SPU_REL16, 7) + RELOC_NUMBER (R_SPU_ADDR7, 8) + RELOC_NUMBER (R_SPU_REL9, 9) + RELOC_NUMBER (R_SPU_REL9I, 10) + RELOC_NUMBER (R_SPU_ADDR10I, 11) + RELOC_NUMBER (R_SPU_ADDR16I, 12) + RELOC_NUMBER (R_SPU_REL32, 13) + RELOC_NUMBER (R_SPU_ADDR16X, 14) + RELOC_NUMBER (R_SPU_PPU32, 15) + RELOC_NUMBER (R_SPU_PPU64, 16) + RELOC_NUMBER (R_SPU_ADD_PIC, 17) +END_RELOC_NUMBERS (R_SPU_max) + +/* Program header extensions */ + +/* Mark a PT_LOAD segment as containing an overlay which should not + initially be loaded. */ +#define PF_OVERLAY (1 << 27) + +/* SPU Dynamic Object Information. */ +#define PT_SPU_INFO 0x70000000 + +/* SPU plugin information */ +#define SPU_PLUGIN_NAME "SPUNAME" +#define SPU_PTNOTE_SPUNAME ".note.spu_name" + +#endif /* _ELF_SPU_H */ diff --git a/support/sdbinutils/include/elf/tic6x-attrs.h b/support/sdbinutils/include/elf/tic6x-attrs.h new file mode 100644 index 0000000..ffe2845 --- /dev/null +++ b/support/sdbinutils/include/elf/tic6x-attrs.h @@ -0,0 +1,34 @@ +/* TI C6X ELF attributes. + Copyright (C) 2010-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* Define the TAG macro before including this file; it takes a tag + name and value. */ + +TAG(Tag_ISA, 4) +TAG(Tag_ABI_wchar_t, 6) +TAG(Tag_ABI_stack_align_needed, 8) +TAG(Tag_ABI_stack_align_preserved, 10) +TAG(Tag_ABI_DSBT, 12) +TAG(Tag_ABI_PID, 14) +TAG(Tag_ABI_PIC, 16) +TAG(Tag_ABI_array_object_alignment, 18) +TAG(Tag_ABI_array_object_align_expected, 20) +TAG(Tag_ABI_compatibility, 32) +TAG(Tag_ABI_conformance, 67) diff --git a/support/sdbinutils/include/elf/tic6x.h b/support/sdbinutils/include/elf/tic6x.h new file mode 100644 index 0000000..9d0c034 --- /dev/null +++ b/support/sdbinutils/include/elf/tic6x.h @@ -0,0 +1,166 @@ +/* TI C6X ELF support for BFD. + Copyright (C) 2010-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef _ELF_TIC6X_H +#define _ELF_TIC6X_H + +#include "elf/reloc-macros.h" + +/* Relocation types. */ +START_RELOC_NUMBERS (elf_tic6x_reloc_type) + RELOC_NUMBER (R_C6000_NONE, 0) + RELOC_NUMBER (R_C6000_ABS32, 1) + RELOC_NUMBER (R_C6000_ABS16, 2) + RELOC_NUMBER (R_C6000_ABS8, 3) + RELOC_NUMBER (R_C6000_PCR_S21, 4) + RELOC_NUMBER (R_C6000_PCR_S12, 5) + RELOC_NUMBER (R_C6000_PCR_S10, 6) + RELOC_NUMBER (R_C6000_PCR_S7, 7) + RELOC_NUMBER (R_C6000_ABS_S16, 8) + RELOC_NUMBER (R_C6000_ABS_L16, 9) + RELOC_NUMBER (R_C6000_ABS_H16, 10) + RELOC_NUMBER (R_C6000_SBR_U15_B, 11) + RELOC_NUMBER (R_C6000_SBR_U15_H, 12) + RELOC_NUMBER (R_C6000_SBR_U15_W, 13) + RELOC_NUMBER (R_C6000_SBR_S16, 14) + RELOC_NUMBER (R_C6000_SBR_L16_B, 15) + RELOC_NUMBER (R_C6000_SBR_L16_H, 16) + RELOC_NUMBER (R_C6000_SBR_L16_W, 17) + RELOC_NUMBER (R_C6000_SBR_H16_B, 18) + RELOC_NUMBER (R_C6000_SBR_H16_H, 19) + RELOC_NUMBER (R_C6000_SBR_H16_W, 20) + RELOC_NUMBER (R_C6000_SBR_GOT_U15_W, 21) + RELOC_NUMBER (R_C6000_SBR_GOT_L16_W, 22) + RELOC_NUMBER (R_C6000_SBR_GOT_H16_W, 23) + RELOC_NUMBER (R_C6000_DSBT_INDEX, 24) + RELOC_NUMBER (R_C6000_PREL31, 25) + RELOC_NUMBER (R_C6000_COPY, 26) + RELOC_NUMBER (R_C6000_JUMP_SLOT, 27) + RELOC_NUMBER (R_C6000_EHTYPE, 28) + RELOC_NUMBER (R_C6000_PCR_H16, 29) + RELOC_NUMBER (R_C6000_PCR_L16, 30) + RELOC_NUMBER (R_C6000_ALIGN, 253) + RELOC_NUMBER (R_C6000_FPHEAD, 254) + RELOC_NUMBER (R_C6000_NOCMP, 255) +END_RELOC_NUMBERS (R_TIC6X_max) + +/* Processor-specific flags. */ + +/* File contains static relocation information. */ +#define EF_C6000_REL 0x1 + +/* Processor-specific section types. */ + +/* Unwind function table for stack unwinding. */ +#define SHT_C6000_UNWIND 0x70000001 + +/* DLL dynamic linking pre-emption map. */ +#define SHT_C6000_PREEMPTMAP 0x70000002 + +/* Object file compatibility attributes. */ +#define SHT_C6000_ATTRIBUTES 0x70000003 + +/* Intermediate code for link-time optimization. */ +#define SHT_TI_ICODE 0x7F000000 + +/* Symbolic cross reference information. */ +#define SHT_TI_XREF 0x7F000001 + +/* Reserved. */ +#define SHT_TI_HANDLER 0x7F000002 + +/* Compressed data for initializing C variables. */ +#define SHT_TI_INITINFO 0x7F000003 + +/* Extended program header attributes. */ +#define SHT_TI_PHATTRS 0x7F000004 + +/* Processor specific section indices. These sections do not actually + exist. Symbols with a st_shndx field corresponding to one of these + values have a special meaning. */ + +/* Small data area common symbol. */ +#define SHN_TIC6X_SCOMMON SHN_LORESERVE + +/* Processor-specific segment types. */ + +/* Extended Segment Attributes. */ +#define PT_C6000_PHATTR 0x70000000 + +/* Processor-specific dynamic tags. */ + +/* Undocumented. */ +#define DT_C6000_GSYM_OFFSET 0x6000000D + +/* Undocumented. */ +#define DT_C6000_GSTR_OFFSET 0x6000000F + +/* Statically linked base address of data segment. */ +#define DT_C6000_DSBT_BASE 0x70000000 + +/* Number of entries in this module's DSBT. */ +#define DT_C6000_DSBT_SIZE 0x70000001 + +/* Undocumented. */ +#define DT_C6000_PREEMPTMAP 0x70000002 + +/* The hard-coded DSBT index for this module, if any. */ +#define DT_C6000_DSBT_INDEX 0x70000003 + +/* Extended program header attributes. */ + +/* Terminate a segment. */ +#define PHA_NULL 0x0 + +/* Segment's address bound to the final address. */ +#define PHA_BOUND 0x1 + +/* Segment cannot be further relocated. */ +#define PHA_READONLY 0x2 + +/* Build attributes. */ +enum + { +#define TAG(tag, value) tag = value, +#include "elf/tic6x-attrs.h" +#undef TAG + Tag_C6XABI_last + }; + +/* Values for Tag_ISA. GNU-specific names; the ABI does not specify + names for these values. */ +enum + { + C6XABI_Tag_ISA_none = 0, + C6XABI_Tag_ISA_C62X = 1, + C6XABI_Tag_ISA_C67X = 3, + C6XABI_Tag_ISA_C67XP = 4, + C6XABI_Tag_ISA_C64X = 6, + C6XABI_Tag_ISA_C64XP = 7, + C6XABI_Tag_ISA_C674X = 8 + }; + +/* Special section names. */ +#define ELF_STRING_C6000_unwind ".c6xabi.exidx" +#define ELF_STRING_C6000_unwind_info ".c6xabi.extab" +#define ELF_STRING_C6000_unwind_once ".gnu.linkonce.c6xabi.exidx." +#define ELF_STRING_C6000_unwind_info_once ".gnu.linkonce.c6xabi.extab." + +#endif /* _ELF_TIC6X_H */ diff --git a/support/sdbinutils/include/elf/tilegx.h b/support/sdbinutils/include/elf/tilegx.h new file mode 100644 index 0000000..b96d724 --- /dev/null +++ b/support/sdbinutils/include/elf/tilegx.h @@ -0,0 +1,176 @@ +/* TILE-Gx ELF support for BFD. + Copyright (C) 2011-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef _ELF_TILEGX_H +#define _ELF_TILEGX_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_tilegx_reloc_type) + RELOC_NUMBER (R_TILEGX_NONE, 0) + + /* Standard relocations */ + RELOC_NUMBER (R_TILEGX_64, 1) + RELOC_NUMBER (R_TILEGX_32, 2) + RELOC_NUMBER (R_TILEGX_16, 3) + RELOC_NUMBER (R_TILEGX_8, 4) + RELOC_NUMBER (R_TILEGX_64_PCREL, 5) + RELOC_NUMBER (R_TILEGX_32_PCREL, 6) + RELOC_NUMBER (R_TILEGX_16_PCREL, 7) + RELOC_NUMBER (R_TILEGX_8_PCREL, 8) + + /* Custom relocations */ + + RELOC_NUMBER (R_TILEGX_HW0, 9) + RELOC_NUMBER (R_TILEGX_HW1, 10) + RELOC_NUMBER (R_TILEGX_HW2, 11) + RELOC_NUMBER (R_TILEGX_HW3, 12) + RELOC_NUMBER (R_TILEGX_HW0_LAST, 13) + RELOC_NUMBER (R_TILEGX_HW1_LAST, 14) + RELOC_NUMBER (R_TILEGX_HW2_LAST, 15) + + RELOC_NUMBER (R_TILEGX_COPY, 16) + RELOC_NUMBER (R_TILEGX_GLOB_DAT, 17) + RELOC_NUMBER (R_TILEGX_JMP_SLOT, 18) + RELOC_NUMBER (R_TILEGX_RELATIVE, 19) + + /* Branch/jump offsets */ + RELOC_NUMBER (R_TILEGX_BROFF_X1, 20) + RELOC_NUMBER (R_TILEGX_JUMPOFF_X1, 21) + RELOC_NUMBER (R_TILEGX_JUMPOFF_X1_PLT, 22) + + /* Immediate operands. */ + RELOC_NUMBER (R_TILEGX_IMM8_X0, 23) + RELOC_NUMBER (R_TILEGX_IMM8_Y0, 24) + RELOC_NUMBER (R_TILEGX_IMM8_X1, 25) + RELOC_NUMBER (R_TILEGX_IMM8_Y1, 26) + RELOC_NUMBER (R_TILEGX_DEST_IMM8_X1, 27) + RELOC_NUMBER (R_TILEGX_MT_IMM14_X1, 28) + RELOC_NUMBER (R_TILEGX_MF_IMM14_X1, 29) + RELOC_NUMBER (R_TILEGX_MMSTART_X0, 30) + RELOC_NUMBER (R_TILEGX_MMEND_X0, 31) + RELOC_NUMBER (R_TILEGX_SHAMT_X0, 32) + RELOC_NUMBER (R_TILEGX_SHAMT_X1, 33) + RELOC_NUMBER (R_TILEGX_SHAMT_Y0, 34) + RELOC_NUMBER (R_TILEGX_SHAMT_Y1, 35) + + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0, 36) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0, 37) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1, 38) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1, 39) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW2, 40) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW2, 41) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW3, 42) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW3, 43) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_LAST, 44) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_LAST, 45) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_LAST, 46) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_LAST, 47) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW2_LAST, 48) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW2_LAST, 49) + + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_PCREL, 50) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_PCREL, 51) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_PCREL, 52) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_PCREL, 53) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW2_PCREL, 54) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW2_PCREL, 55) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW3_PCREL, 56) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW3_PCREL, 57) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_LAST_PCREL, 58) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_LAST_PCREL, 59) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_LAST_PCREL, 60) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_LAST_PCREL, 61) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW2_LAST_PCREL, 62) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW2_LAST_PCREL, 63) + + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_GOT, 64) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_GOT, 65) + + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_PLT_PCREL, 66) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_PLT_PCREL, 67) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_PLT_PCREL, 68) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_PLT_PCREL, 69) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW2_PLT_PCREL, 70) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW2_PLT_PCREL, 71) + + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_LAST_GOT, 72) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_LAST_GOT, 73) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_LAST_GOT, 74) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_LAST_GOT, 75) + + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW3_PLT_PCREL, 76) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW3_PLT_PCREL, 77) + + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_TLS_GD, 78) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_TLS_GD, 79) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_TLS_LE, 80) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_TLS_LE, 81) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE, 82) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE, 83) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE, 84) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE, 85) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD, 86) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD, 87) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD, 88) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD, 89) + /* Relocs 90-91 are currently not defined. */ + + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_TLS_IE, 92) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_TLS_IE, 93) + + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL, 94) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL, 95) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL, 96) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL, 97) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL, 98) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL, 99) + + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE, 100) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE, 101) + RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE, 102) + RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE, 103) + /* Relocs 104-105 are currently not defined. */ + + RELOC_NUMBER (R_TILEGX_TLS_DTPMOD64, 106) + RELOC_NUMBER (R_TILEGX_TLS_DTPOFF64, 107) + RELOC_NUMBER (R_TILEGX_TLS_TPOFF64, 108) + RELOC_NUMBER (R_TILEGX_TLS_DTPMOD32, 109) + RELOC_NUMBER (R_TILEGX_TLS_DTPOFF32, 110) + RELOC_NUMBER (R_TILEGX_TLS_TPOFF32, 111) + + RELOC_NUMBER (R_TILEGX_TLS_GD_CALL, 112) + RELOC_NUMBER (R_TILEGX_IMM8_X0_TLS_GD_ADD, 113) + RELOC_NUMBER (R_TILEGX_IMM8_X1_TLS_GD_ADD, 114) + RELOC_NUMBER (R_TILEGX_IMM8_Y0_TLS_GD_ADD, 115) + RELOC_NUMBER (R_TILEGX_IMM8_Y1_TLS_GD_ADD, 116) + RELOC_NUMBER (R_TILEGX_TLS_IE_LOAD, 117) + RELOC_NUMBER (R_TILEGX_IMM8_X0_TLS_ADD, 118) + RELOC_NUMBER (R_TILEGX_IMM8_X1_TLS_ADD, 119) + RELOC_NUMBER (R_TILEGX_IMM8_Y0_TLS_ADD, 120) + RELOC_NUMBER (R_TILEGX_IMM8_Y1_TLS_ADD, 121) + +/* These are GNU extensions to enable C++ vtable garbage collection. */ + RELOC_NUMBER (R_TILEGX_GNU_VTINHERIT, 128) + RELOC_NUMBER (R_TILEGX_GNU_VTENTRY, 129) +END_RELOC_NUMBERS (R_TILEGX_max) + +#endif /* _ELF_TILEGX_H */ diff --git a/support/sdbinutils/include/elf/tilepro.h b/support/sdbinutils/include/elf/tilepro.h new file mode 100644 index 0000000..f7ee3c1 --- /dev/null +++ b/support/sdbinutils/include/elf/tilepro.h @@ -0,0 +1,144 @@ +/* TILEPro ELF support for BFD. + Copyright (C) 2011-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef _ELF_TILEPRO_H +#define _ELF_TILEPRO_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_tilepro_reloc_type) + RELOC_NUMBER (R_TILEPRO_NONE, 0) + + /* Standard relocations */ + RELOC_NUMBER (R_TILEPRO_32, 1) + RELOC_NUMBER (R_TILEPRO_16, 2) + RELOC_NUMBER (R_TILEPRO_8, 3) + RELOC_NUMBER (R_TILEPRO_32_PCREL, 4) + RELOC_NUMBER (R_TILEPRO_16_PCREL, 5) + RELOC_NUMBER (R_TILEPRO_8_PCREL, 6) + + RELOC_NUMBER (R_TILEPRO_LO16, 7) + RELOC_NUMBER (R_TILEPRO_HI16, 8) + RELOC_NUMBER (R_TILEPRO_HA16, 9) + + RELOC_NUMBER (R_TILEPRO_COPY, 10) + RELOC_NUMBER (R_TILEPRO_GLOB_DAT, 11) + RELOC_NUMBER (R_TILEPRO_JMP_SLOT, 12) + RELOC_NUMBER (R_TILEPRO_RELATIVE, 13) + + /* Branch/jump offsets */ + RELOC_NUMBER (R_TILEPRO_BROFF_X1, 14) + RELOC_NUMBER (R_TILEPRO_JOFFLONG_X1, 15) + RELOC_NUMBER (R_TILEPRO_JOFFLONG_X1_PLT, 16) + + /* Immediate operands. */ + RELOC_NUMBER (R_TILEPRO_IMM8_X0, 17) + RELOC_NUMBER (R_TILEPRO_IMM8_Y0, 18) + RELOC_NUMBER (R_TILEPRO_IMM8_X1, 19) + RELOC_NUMBER (R_TILEPRO_IMM8_Y1, 20) + RELOC_NUMBER (R_TILEPRO_MT_IMM15_X1, 21) + RELOC_NUMBER (R_TILEPRO_MF_IMM15_X1, 22) + + RELOC_NUMBER (R_TILEPRO_IMM16_X0, 23) + RELOC_NUMBER (R_TILEPRO_IMM16_X1, 24) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_LO, 25) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_LO, 26) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_HI, 27) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_HI, 28) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_HA, 29) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_HA, 30) + + RELOC_NUMBER (R_TILEPRO_IMM16_X0_PCREL, 31) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_PCREL, 32) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_LO_PCREL, 33) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_LO_PCREL, 34) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_HI_PCREL, 35) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_HI_PCREL, 36) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_HA_PCREL, 37) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_HA_PCREL, 38) + + RELOC_NUMBER (R_TILEPRO_IMM16_X0_GOT, 39) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_GOT, 40) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_GOT_LO, 41) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_GOT_LO, 42) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_GOT_HI, 43) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_GOT_HI, 44) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_GOT_HA, 45) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_GOT_HA, 46) + + RELOC_NUMBER (R_TILEPRO_MMSTART_X0, 47) + RELOC_NUMBER (R_TILEPRO_MMEND_X0, 48) + RELOC_NUMBER (R_TILEPRO_MMSTART_X1, 49) + RELOC_NUMBER (R_TILEPRO_MMEND_X1, 50) + + RELOC_NUMBER (R_TILEPRO_SHAMT_X0, 51) + RELOC_NUMBER (R_TILEPRO_SHAMT_X1, 52) + RELOC_NUMBER (R_TILEPRO_SHAMT_Y0, 53) + RELOC_NUMBER (R_TILEPRO_SHAMT_Y1, 54) + + RELOC_NUMBER (R_TILEPRO_DEST_IMM8_X1, 55) + + /* Relocs 56-59 are currently not defined. */ + + RELOC_NUMBER (R_TILEPRO_TLS_GD_CALL, 60) + RELOC_NUMBER (R_TILEPRO_IMM8_X0_TLS_GD_ADD, 61) + RELOC_NUMBER (R_TILEPRO_IMM8_X1_TLS_GD_ADD, 62) + RELOC_NUMBER (R_TILEPRO_IMM8_Y0_TLS_GD_ADD, 63) + RELOC_NUMBER (R_TILEPRO_IMM8_Y1_TLS_GD_ADD, 64) + RELOC_NUMBER (R_TILEPRO_TLS_IE_LOAD, 65) + + RELOC_NUMBER (R_TILEPRO_IMM16_X0_TLS_GD, 66) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_TLS_GD, 67) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_TLS_GD_LO, 68) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_TLS_GD_LO, 69) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_TLS_GD_HI, 70) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_TLS_GD_HI, 71) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_TLS_GD_HA, 72) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_TLS_GD_HA, 73) + + RELOC_NUMBER (R_TILEPRO_IMM16_X0_TLS_IE, 74) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_TLS_IE, 75) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_TLS_IE_LO, 76) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_TLS_IE_LO, 77) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_TLS_IE_HI, 78) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_TLS_IE_HI, 79) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_TLS_IE_HA, 80) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_TLS_IE_HA, 81) + + RELOC_NUMBER (R_TILEPRO_TLS_DTPMOD32, 82) + RELOC_NUMBER (R_TILEPRO_TLS_DTPOFF32, 83) + RELOC_NUMBER (R_TILEPRO_TLS_TPOFF32, 84) + + RELOC_NUMBER (R_TILEPRO_IMM16_X0_TLS_LE, 85) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_TLS_LE, 86) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_TLS_LE_LO, 87) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_TLS_LE_LO, 88) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_TLS_LE_HI, 89) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_TLS_LE_HI, 90) + RELOC_NUMBER (R_TILEPRO_IMM16_X0_TLS_LE_HA, 91) + RELOC_NUMBER (R_TILEPRO_IMM16_X1_TLS_LE_HA, 92) + +/* These are GNU extensions to enable C++ vtable garbage collection. */ + RELOC_NUMBER (R_TILEPRO_GNU_VTINHERIT, 128) + RELOC_NUMBER (R_TILEPRO_GNU_VTENTRY, 129) +END_RELOC_NUMBERS (R_TILEPRO_max) + +#endif /* _ELF_TILEPRO_H */ diff --git a/support/sdbinutils/include/elf/v850.h b/support/sdbinutils/include/elf/v850.h new file mode 100644 index 0000000..5c245e3 --- /dev/null +++ b/support/sdbinutils/include/elf/v850.h @@ -0,0 +1,329 @@ +/* V850 ELF support for BFD. + Copyright (C) 1997-2018 Free Software Foundation, Inc. + Created by Michael Meissner, 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. */ + +/* This file holds definitions specific to the MIPS ELF ABI. Note + that most of this is not actually implemented by BFD. */ + +#ifndef _ELF_V850_H +#define _ELF_V850_H + +/* Processor specific flags for the ELF header e_flags field. */ + +/* Four bit V850 architecture field. */ +#define EF_V850_ARCH 0xf0000000 + +/* v850 code. */ +#define E_V850_ARCH 0x00000000 + +/* v850e code. */ +#define E_V850E_ARCH 0x10000000 + +/* v850e1 code. */ +#define E_V850E1_ARCH 0x20000000 + +/* v850e2 code. */ +#define E_V850E2_ARCH 0x30000000 + +/* v850e2v3 code. */ +#define E_V850E2V3_ARCH 0x40000000 + +/* v850e3v5 code. */ +#define E_V850E3V5_ARCH 0x60000000 + +/* Flags for the st_other field. */ +#define V850_OTHER_SDA 0x10 /* Symbol had SDA relocations. */ +#define V850_OTHER_ZDA 0x20 /* Symbol had ZDA relocations. */ +#define V850_OTHER_TDA 0x40 /* Symbol had TDA relocations. */ +#define V850_OTHER_ERROR 0x80 /* Symbol had an error reported. */ + +/* V850 relocations. */ +#include "elf/reloc-macros.h" + +START_RELOC_NUMBERS (v850_reloc_type) + RELOC_NUMBER (R_V850_NONE, 0) + RELOC_NUMBER (R_V850_9_PCREL, 1) + RELOC_NUMBER (R_V850_22_PCREL, 2) + RELOC_NUMBER (R_V850_HI16_S, 3) + RELOC_NUMBER (R_V850_HI16, 4) + RELOC_NUMBER (R_V850_LO16, 5) + RELOC_NUMBER (R_V850_ABS32, 6) + RELOC_NUMBER (R_V850_16, 7) + RELOC_NUMBER (R_V850_8, 8) + RELOC_NUMBER( R_V850_SDA_16_16_OFFSET, 9) /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */ + RELOC_NUMBER( R_V850_SDA_15_16_OFFSET, 10) /* For ld.w, ld.h, ld.hu, st.w, st.h */ + RELOC_NUMBER( R_V850_ZDA_16_16_OFFSET, 11) /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */ + RELOC_NUMBER( R_V850_ZDA_15_16_OFFSET, 12) /* For ld.w, ld.h, ld.hu, st.w, st.h */ + RELOC_NUMBER( R_V850_TDA_6_8_OFFSET, 13) /* For sst.w, sld.w */ + RELOC_NUMBER( R_V850_TDA_7_8_OFFSET, 14) /* For sst.h, sld.h */ + RELOC_NUMBER( R_V850_TDA_7_7_OFFSET, 15) /* For sst.b, sld.b */ + RELOC_NUMBER( R_V850_TDA_16_16_OFFSET, 16) /* For set1, clr1, not1, tst1, movea, movhi */ + RELOC_NUMBER( R_V850_TDA_4_5_OFFSET, 17) /* For sld.hu */ + RELOC_NUMBER( R_V850_TDA_4_4_OFFSET, 18) /* For sld.bu */ + RELOC_NUMBER( R_V850_SDA_16_16_SPLIT_OFFSET, 19) /* For ld.bu */ + RELOC_NUMBER( R_V850_ZDA_16_16_SPLIT_OFFSET, 20) /* For ld.bu */ + RELOC_NUMBER( R_V850_CALLT_6_7_OFFSET, 21) /* For callt */ + RELOC_NUMBER( R_V850_CALLT_16_16_OFFSET, 22) /* For callt */ + RELOC_NUMBER (R_V850_GNU_VTINHERIT, 23) + RELOC_NUMBER (R_V850_GNU_VTENTRY, 24) + RELOC_NUMBER (R_V850_LONGCALL, 25) + RELOC_NUMBER (R_V850_LONGJUMP, 26) + RELOC_NUMBER (R_V850_ALIGN, 27) + RELOC_NUMBER (R_V850_REL32, 28) + RELOC_NUMBER (R_V850_LO16_SPLIT_OFFSET, 29) /* For ld.bu */ + RELOC_NUMBER (R_V850_16_PCREL, 30) /* For loop */ + RELOC_NUMBER (R_V850_17_PCREL, 31) /* For br */ + RELOC_NUMBER (R_V850_23, 32) /* For 23bit ld.[w,h,hu,b,bu],st.[w,h,b] */ + RELOC_NUMBER (R_V850_32_PCREL, 33) /* For jr32, jarl32 */ + RELOC_NUMBER (R_V850_32_ABS, 34) /* For jmp32 */ + RELOC_NUMBER (R_V850_16_SPLIT_OFFSET, 35) /* For ld.bu */ + RELOC_NUMBER (R_V850_16_S1, 36) /* For ld.w, ld.h st.w st.h */ + RELOC_NUMBER (R_V850_LO16_S1, 37) /* For ld.w, ld.h st.w st.h */ + RELOC_NUMBER (R_V850_CALLT_15_16_OFFSET, 38) /* For ld.w, ld.h, ld.hu, st.w, st.h */ + RELOC_NUMBER (R_V850_32_GOTPCREL, 39) /* GLOBAL_OFFSET_TABLE from pc */ + RELOC_NUMBER (R_V850_16_GOT, 40) /* GOT ENTRY from gp */ + RELOC_NUMBER (R_V850_32_GOT, 41) + RELOC_NUMBER (R_V850_22_PLT, 42) /* For jr */ + RELOC_NUMBER (R_V850_32_PLT, 43) /* For jr32 */ + RELOC_NUMBER (R_V850_COPY, 44) + RELOC_NUMBER (R_V850_GLOB_DAT, 45) + RELOC_NUMBER (R_V850_JMP_SLOT, 46) + RELOC_NUMBER (R_V850_RELATIVE, 47) + RELOC_NUMBER (R_V850_16_GOTOFF, 48) /* From gp */ + RELOC_NUMBER (R_V850_32_GOTOFF, 49) + RELOC_NUMBER (R_V850_CODE, 50) + RELOC_NUMBER (R_V850_DATA, 51) /* For loop */ + +END_RELOC_NUMBERS (R_V850_max) + + +/* Processor specific section indices. These sections do not actually + exist. Symbols with a st_shndx field corresponding to one of these + values have a special meaning. */ + +/* Small data area common symbol. */ +#define SHN_V850_SCOMMON SHN_LORESERVE + +/* Tiny data area common symbol. */ +#define SHN_V850_TCOMMON (SHN_LORESERVE + 1) + +/* Zero data area common symbol. */ +#define SHN_V850_ZCOMMON (SHN_LORESERVE + 2) + + +/* Processor specific section types. */ + +/* Section contains the .scommon data. */ +#define SHT_V850_SCOMMON 0x70000000 + +/* Section contains the .scommon data. */ +#define SHT_V850_TCOMMON 0x70000001 + +/* Section contains the .scommon data. */ +#define SHT_V850_ZCOMMON 0x70000002 + +/* Processor specific section flags. */ + +/* This section must be in the small data area (pointed to by GP). */ +#define SHF_V850_GPREL 0x10000000 + +/* This section must be in the tiny data area (pointed to by EP). */ +#define SHF_V850_EPREL 0x20000000 + +/* This section must be in the zero data area (pointed to by R0). */ +#define SHF_V850_R0REL 0x40000000 + +/* Alternative versions of the above definitions, as specified by the RH850 ABI. */ + +#define EF_RH850_ABI 0xF0000000 + +#define EF_V800_850E3 0x00100000 + +#define EF_RH850_FPU_DOUBLE 0x00000001 /* sizeof(double) == 8. */ +#define EF_RH850_FPU_SINGLE 0x00000002 /* sizeof(double) == 4. */ +#define EF_RH850_REGMODE22 0x00000020 /* Registers r15-r24 (inclusive) are not used. */ +#define EF_RH850_REGMODE32 0x00000040 +#define EF_RH850_GP_FIX 0x00000100 /* r4 is fixed. */ +#define EF_RH850_GP_NOFIX 0x00000200 /* r4 is callee save. */ +#define EF_RH850_EP_FIX 0x00000400 /* r30 is fixed. */ +#define EF_RH850_EP_NOFIX 0x00000800 /* r30 is callee save. */ +#define EF_RH850_TP_FIX 0x00001000 /* r5 is fixed. */ +#define EF_RH850_TP_NOFIX 0x00002000 /* r5 is callee save. */ +#define EF_RH850_REG2_RESERVE 0x00004000 /* r2 is fixed. */ +#define EF_RH850_REG2_NORESERVE 0x00008000 /* r2 is callee saved. */ + +#define SHT_RENESAS_IOP SHT_LOUSER /* Used by Renesas linker. */ + +#define SHF_RENESAS_ABS 0x80000000 /* Absolute section. */ +#define SHF_GHS_ABS 0x00000400 /* Use unknown. */ + +#define STT_RENESAS_ENTRY 14 /* Set for functions called at reset time. */ + +START_RELOC_NUMBERS (v800_reloc_type) + + RELOC_NUMBER (R_V800_NONE, 0x00) + RELOC_NUMBER (R_V810_NONE, 0x30) + RELOC_NUMBER (R_V810_BYTE, 0x31) + RELOC_NUMBER (R_V810_HWORD, 0x32) + RELOC_NUMBER (R_V810_WORD, 0x33) + RELOC_NUMBER (R_V810_WLO, 0x34) + RELOC_NUMBER (R_V810_WHI, 0x35) + RELOC_NUMBER (R_V810_WHI1, 0x36) + RELOC_NUMBER (R_V810_GPBYTE, 0x37) + RELOC_NUMBER (R_V810_GPHWORD, 0x38) + RELOC_NUMBER (R_V810_GPWORD, 0x39) + RELOC_NUMBER (R_V810_GPWLO, 0x3a) + RELOC_NUMBER (R_V810_GPWHI, 0x3b) + RELOC_NUMBER (R_V810_GPWHI1, 0x3c) + RELOC_NUMBER (R_V850_HWLO, 0x3d) + FAKE_RELOC (R_V810_reserved1, 0x3e) + RELOC_NUMBER (R_V850_EP7BIT, 0x3f) + RELOC_NUMBER (R_V850_EPHBYTE, 0x40) + RELOC_NUMBER (R_V850_EPWBYTE, 0x41) + RELOC_NUMBER (R_V850_REGHWLO, 0x42) + FAKE_RELOC (R_V810_reserved2, 0x43) + RELOC_NUMBER (R_V850_GPHWLO, 0x44) + FAKE_RELOC (R_V810_reserved3, 0x45) + RELOC_NUMBER (R_V850_PCR22, 0x46) + RELOC_NUMBER (R_V850_BLO, 0x47) + RELOC_NUMBER (R_V850_EP4BIT, 0x48) + RELOC_NUMBER (R_V850_EP5BIT, 0x49) + RELOC_NUMBER (R_V850_REGBLO, 0x4a) + RELOC_NUMBER (R_V850_GPBLO, 0x4b) + RELOC_NUMBER (R_V810_WLO_1, 0x4c) + RELOC_NUMBER (R_V810_GPWLO_1, 0x4d) + RELOC_NUMBER (R_V850_BLO_1, 0x4e) + RELOC_NUMBER (R_V850_HWLO_1, 0x4f) + FAKE_RELOC (R_V810_reserved4, 0x50) + RELOC_NUMBER (R_V850_GPBLO_1, 0x51) + RELOC_NUMBER (R_V850_GPHWLO_1, 0x52) + FAKE_RELOC (R_V810_reserved5, 0x53) + RELOC_NUMBER (R_V850_EPBLO, 0x54) + RELOC_NUMBER (R_V850_EPHWLO, 0x55) + FAKE_RELOC (R_V810_reserved6, 0x56) + RELOC_NUMBER (R_V850_EPWLO_N, 0x57) + RELOC_NUMBER (R_V850_PC32, 0x58) + RELOC_NUMBER (R_V850_W23BIT, 0x59) + RELOC_NUMBER (R_V850_GPW23BIT, 0x5a) + RELOC_NUMBER (R_V850_EPW23BIT, 0x5b) + RELOC_NUMBER (R_V850_B23BIT, 0x5c) + RELOC_NUMBER (R_V850_GPB23BIT, 0x5d) + RELOC_NUMBER (R_V850_EPB23BIT, 0x5e) + RELOC_NUMBER (R_V850_PC16U, 0x5f) + RELOC_NUMBER (R_V850_PC17, 0x60) + RELOC_NUMBER (R_V850_DW8, 0x61) + RELOC_NUMBER (R_V850_GPDW8, 0x62) + RELOC_NUMBER (R_V850_EPDW8, 0x63) + RELOC_NUMBER (R_V850_PC9, 0x64) + RELOC_NUMBER (R_V810_REGBYTE, 0x65) + RELOC_NUMBER (R_V810_REGHWORD, 0x66) + RELOC_NUMBER (R_V810_REGWORD, 0x67) + RELOC_NUMBER (R_V810_REGWLO, 0x68) + RELOC_NUMBER (R_V810_REGWHI, 0x69) + RELOC_NUMBER (R_V810_REGWHI1, 0x6a) + RELOC_NUMBER (R_V850_REGW23BIT, 0x6b) + RELOC_NUMBER (R_V850_REGB23BIT, 0x6c) + RELOC_NUMBER (R_V850_REGDW8, 0x6d) + RELOC_NUMBER (R_V810_EPBYTE, 0x6e) + RELOC_NUMBER (R_V810_EPHWORD, 0x6f) + RELOC_NUMBER (R_V810_EPWORD, 0x70) + RELOC_NUMBER (R_V850_WLO23, 0x71) + RELOC_NUMBER (R_V850_WORD_E, 0x72) + RELOC_NUMBER (R_V850_REGWORD_E, 0x73) + RELOC_NUMBER (R_V850_WORD, 0x74) + RELOC_NUMBER (R_V850_GPWORD, 0x75) + RELOC_NUMBER (R_V850_REGWORD, 0x76) + RELOC_NUMBER (R_V850_EPWORD, 0x77) + RELOC_NUMBER (R_V810_TPBYTE, 0x78) + RELOC_NUMBER (R_V810_TPHWORD, 0x79) + RELOC_NUMBER (R_V810_TPWORD, 0x7a) + RELOC_NUMBER (R_V810_TPWLO, 0x7b) + RELOC_NUMBER (R_V810_TPWHI, 0x7c) + RELOC_NUMBER (R_V810_TPWHI1, 0x7d) + RELOC_NUMBER (R_V850_TPHWLO, 0x7e) + RELOC_NUMBER (R_V850_TPBLO, 0x7f) + RELOC_NUMBER (R_V810_TPWLO_1, 0x80) + RELOC_NUMBER (R_V850_TPBLO_1, 0x81) + RELOC_NUMBER (R_V850_TPHWLO_1, 0x82) + RELOC_NUMBER (R_V850_TP23BIT, 0x83) + RELOC_NUMBER (R_V850_TPW23BIT, 0x84) + RELOC_NUMBER (R_V850_TPDW8, 0x85) + +/* These are defined by the RH850 ABI, but not used. */ + RELOC_NUMBER (R_V810_ABS32, 0xa0) + RELOC_NUMBER (R_V850_SYM, 0xe0) + RELOC_NUMBER (R_V850_OPadd, 0xe1) + RELOC_NUMBER (R_V850_OPsub, 0xe2) + RELOC_NUMBER (R_V850_OPsctsize, 0xe3) + RELOC_NUMBER (R_V850_OPscttop, 0xe4) + +END_RELOC_NUMBERS (R_V800_max) + +/* Type for Renesas note sections. NB/ This is in application space + rather than processor space as it refers to the requirements of the + binary concerned. A given processor may be able to handle multiple + different types of application. */ +#define SHT_RENESAS_INFO 0xa0000000 + +/* Contents of a Renesas note entry: + + namesz +------------------+ + | 4 | "REL\0" + descsz +------------------+ + | 4 | Currently 4byte only + type +------------------+ + | ID | + name +------------------+ + | REL\0 | + desc +------------------+ + | Value | + +------------------+ */ + +#define V850_NOTE_SECNAME ".note.renesas" +#define SIZEOF_V850_NOTE 20 +#define V850_NOTE_NAME "REL" + +enum v850_notes +{ + V850_NOTE_ALIGNMENT = 1, /* Alignment of 8-byte entities. */ +#define EF_RH850_DATA_ALIGN4 0x0001 /* Aligned to 4-byte bounadries. */ +#define EF_RH850_DATA_ALIGN8 0x0002 /* Aligned to 8-byte bounadries. */ + + V850_NOTE_DATA_SIZE = 2, /* Sizeof double and long double. */ +#define EF_RH850_DOUBLE32 0x0001 /* 32-bits in size. */ +#define EF_RH850_DOUBLE64 0x0002 /* 64-bits in size. */ + + V850_NOTE_FPU_INFO = 3, /* Defined if extended floating point insns are used. */ +#define EF_RH850_FPU20 0x0001 /* Set if [N]]M{ADD|SUB}F.S are used. */ +#define EF_RH850_FPU30 0x0002 /* Set if ADSF.D or ADDF.D is used. */ + + V850_NOTE_SIMD_INFO = 4, +#define EF_RH850_SIMD 0x0001 + + V850_NOTE_CACHE_INFO = 5, +#define EF_RH850_CACHE 0x0001 + + V850_NOTE_MMU_INFO = 6 +#define EF_RH850_MMU 0x0001 +}; + +#define NUM_V850_NOTES V850_NOTE_MMU_INFO + +#endif /* _ELF_V850_H */ diff --git a/support/sdbinutils/include/elf/vax.h b/support/sdbinutils/include/elf/vax.h new file mode 100644 index 0000000..cee5c1f --- /dev/null +++ b/support/sdbinutils/include/elf/vax.h @@ -0,0 +1,51 @@ +/* VAX ELF support for BFD. + Copyright (C) 2002-2018 Free Software Foundation, Inc. + Contributed by Matt Thomas . + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_VAX_H +#define _ELF_VAX_H + +#include "elf/reloc-macros.h" + +/* Relocation types. */ +START_RELOC_NUMBERS (elf_vax_reloc_type) + RELOC_NUMBER (R_VAX_NONE, 0) /* No reloc */ + RELOC_NUMBER (R_VAX_32, 1) /* Direct 32 bit */ + RELOC_NUMBER (R_VAX_16, 2) /* Direct 16 bit */ + RELOC_NUMBER (R_VAX_8, 3) /* Direct 8 bit */ + RELOC_NUMBER (R_VAX_PC32, 4) /* PC relative 32 bit */ + RELOC_NUMBER (R_VAX_PC16, 5) /* PC relative 16 bit */ + RELOC_NUMBER (R_VAX_PC8, 6) /* PC relative 8 bit */ + RELOC_NUMBER (R_VAX_GOT32, 7) /* 32 bit PC relative GOT entry */ + RELOC_NUMBER (R_VAX_PLT32, 13) /* 32 bit PC relative PLT address */ + RELOC_NUMBER (R_VAX_COPY, 19) /* Copy symbol at runtime */ + RELOC_NUMBER (R_VAX_GLOB_DAT, 20) /* Create GOT entry */ + RELOC_NUMBER (R_VAX_JMP_SLOT, 21) /* Create PLT entry */ + RELOC_NUMBER (R_VAX_RELATIVE, 22) /* Adjust by program base */ + /* These are GNU extensions to enable C++ vtable garbage collection. */ + RELOC_NUMBER (R_VAX_GNU_VTINHERIT, 23) + RELOC_NUMBER (R_VAX_GNU_VTENTRY, 24) +END_RELOC_NUMBERS (R_VAX_max) + +/* Processor specific flags for the ELF header e_flags field. */ +#define EF_VAX_NONPIC 0x0001 /* Object contains non-PIC code */ +#define EF_VAX_DFLOAT 0x0100 /* Object contains D-Float insn. */ +#define EF_VAX_GFLOAT 0x0200 /* Object contains G-Float insn. */ + +#endif diff --git a/support/sdbinutils/include/elf/visium.h b/support/sdbinutils/include/elf/visium.h new file mode 100644 index 0000000..ade07b5 --- /dev/null +++ b/support/sdbinutils/include/elf/visium.h @@ -0,0 +1,51 @@ +/* Visium ELF support for BFD. + + Copyright (C) 2002-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_VISIUM_H +#define _ELF_VISIUM_H + +#include "elf/reloc-macros.h" + +/* Processor specific flags for the ELF header e_flags field. */ +#define EF_VISIUM_ARCH_MCM 0x01 +#define EF_VISIUM_ARCH_MCM24 0x02 +#define EF_VISIUM_ARCH_GR6 0x04 + +/* Relocations. */ +START_RELOC_NUMBERS (elf_visium_reloc_type) + RELOC_NUMBER (R_VISIUM_NONE, 0) + RELOC_NUMBER (R_VISIUM_8, 1) + RELOC_NUMBER (R_VISIUM_16, 2) + RELOC_NUMBER (R_VISIUM_32, 3) + RELOC_NUMBER (R_VISIUM_8_PCREL, 4) + RELOC_NUMBER (R_VISIUM_16_PCREL, 5) + RELOC_NUMBER (R_VISIUM_32_PCREL, 6) + RELOC_NUMBER (R_VISIUM_PC16, 7) + RELOC_NUMBER (R_VISIUM_HI16, 8) + RELOC_NUMBER (R_VISIUM_LO16, 9) + RELOC_NUMBER (R_VISIUM_IM16, 10) + RELOC_NUMBER (R_VISIUM_HI16_PCREL, 11) + RELOC_NUMBER (R_VISIUM_LO16_PCREL, 12) + RELOC_NUMBER (R_VISIUM_IM16_PCREL, 13) + RELOC_NUMBER (R_VISIUM_GNU_VTINHERIT, 200) + RELOC_NUMBER (R_VISIUM_GNU_VTENTRY, 201) +END_RELOC_NUMBERS(R_VISIUM_max) + +#endif /* _ELF_VISIUM_H */ diff --git a/support/sdbinutils/include/elf/vxworks.h b/support/sdbinutils/include/elf/vxworks.h new file mode 100644 index 0000000..2c7d288 --- /dev/null +++ b/support/sdbinutils/include/elf/vxworks.h @@ -0,0 +1,32 @@ +/* VxWorks ELF support for BFD. + Copyright (C) 2007-2018 Free Software Foundation, Inc. + + Contributed by Nathan Sidwell + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef _ELF_VXWORKS_H +#define _ELF_VXWORKS_H + +#define DT_VX_WRS_TLS_DATA_START 0x60000010 +#define DT_VX_WRS_TLS_DATA_SIZE 0x60000011 +#define DT_VX_WRS_TLS_DATA_ALIGN 0x60000015 +#define DT_VX_WRS_TLS_VARS_START 0x60000012 +#define DT_VX_WRS_TLS_VARS_SIZE 0x60000013 + +#endif /* _ELF_VXWORKS_H */ diff --git a/support/sdbinutils/include/elf/wasm32.h b/support/sdbinutils/include/elf/wasm32.h new file mode 100644 index 0000000..76d1fad --- /dev/null +++ b/support/sdbinutils/include/elf/wasm32.h @@ -0,0 +1,30 @@ +/* ELF support for BFD for the WebAssembly target + Copyright (C) 2017-2018 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, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_WASM32_H +#define _ELF_WASM32_H + +#include "elf/reloc-macros.h" + +/* Relocation types. */ + +START_RELOC_NUMBERS (elf_wasm32_reloc_type) + RELOC_NUMBER (R_WASM32_NONE, 0) + RELOC_NUMBER (R_WASM32_32, 1) +END_RELOC_NUMBERS (R_WASM32_max = 1) + +#endif /* _ELF_WASM32_H */ diff --git a/support/sdbinutils/include/elf/x86-64.h b/support/sdbinutils/include/elf/x86-64.h new file mode 100644 index 0000000..8d364ab --- /dev/null +++ b/support/sdbinutils/include/elf/x86-64.h @@ -0,0 +1,98 @@ +/* x86_64 ELF support for BFD. + Copyright (C) 2000-2018 Free Software Foundation, Inc. + Contributed by Jan Hubicka + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_X86_64_H +#define _ELF_X86_64_H + +#include "elf/reloc-macros.h" + +START_RELOC_NUMBERS (elf_x86_64_reloc_type) + RELOC_NUMBER (R_X86_64_NONE, 0) /* No reloc */ + RELOC_NUMBER (R_X86_64_64, 1) /* Direct 64 bit */ + RELOC_NUMBER (R_X86_64_PC32, 2) /* PC relative 32 bit signed */ + RELOC_NUMBER (R_X86_64_GOT32, 3) /* 32 bit GOT entry */ + RELOC_NUMBER (R_X86_64_PLT32, 4) /* 32 bit PLT address */ + RELOC_NUMBER (R_X86_64_COPY, 5) /* Copy symbol at runtime */ + RELOC_NUMBER (R_X86_64_GLOB_DAT, 6) /* Create GOT entry */ + RELOC_NUMBER (R_X86_64_JUMP_SLOT,7) /* Create PLT entry */ + RELOC_NUMBER (R_X86_64_RELATIVE, 8) /* Adjust by program base */ + RELOC_NUMBER (R_X86_64_GOTPCREL, 9) /* 32 bit signed pc relative + offset to GOT entry */ + RELOC_NUMBER (R_X86_64_32, 10) /* Direct 32 bit zero extended */ + RELOC_NUMBER (R_X86_64_32S, 11) /* Direct 32 bit sign extended */ + RELOC_NUMBER (R_X86_64_16, 12) /* Direct 16 bit zero extended */ + RELOC_NUMBER (R_X86_64_PC16, 13) /* 16 bit sign extended pc relative*/ + RELOC_NUMBER (R_X86_64_8, 14) /* Direct 8 bit sign extended */ + RELOC_NUMBER (R_X86_64_PC8, 15) /* 8 bit sign extended pc relative*/ + RELOC_NUMBER (R_X86_64_DTPMOD64, 16) /* ID of module containing symbol */ + RELOC_NUMBER (R_X86_64_DTPOFF64, 17) /* Offset in TLS block */ + RELOC_NUMBER (R_X86_64_TPOFF64, 18) /* Offset in initial TLS block */ + RELOC_NUMBER (R_X86_64_TLSGD, 19) /* PC relative offset to GD GOT block */ + RELOC_NUMBER (R_X86_64_TLSLD, 20) /* PC relative offset to LD GOT block */ + RELOC_NUMBER (R_X86_64_DTPOFF32, 21) /* Offset in TLS block */ + RELOC_NUMBER (R_X86_64_GOTTPOFF, 22) /* PC relative offset to IE GOT entry */ + RELOC_NUMBER (R_X86_64_TPOFF32, 23) /* Offset in initial TLS block */ + RELOC_NUMBER (R_X86_64_PC64, 24) /* PC relative 64 bit */ + RELOC_NUMBER (R_X86_64_GOTOFF64, 25) /* 64 bit offset to GOT */ + RELOC_NUMBER (R_X86_64_GOTPC32, 26) /* 32 bit signed pc relative + offset to GOT */ + RELOC_NUMBER (R_X86_64_GOT64, 27) /* 64 bit GOT entry offset */ + RELOC_NUMBER (R_X86_64_GOTPCREL64, 28) /* 64 bit signed pc relative + offset to GOT entry */ + RELOC_NUMBER (R_X86_64_GOTPC64, 29) /* 64 bit signed pc relative + offset to GOT */ + RELOC_NUMBER (R_X86_64_GOTPLT64, 30) /* Obsolete. The same as GOT64. */ + RELOC_NUMBER (R_X86_64_PLTOFF64, 31) /* 64 bit GOT relative offset + to PLT entry */ + RELOC_NUMBER (R_X86_64_SIZE32, 32) /* 32-bit symbol size */ + RELOC_NUMBER (R_X86_64_SIZE64, 33) /* 64-bit symbol size */ + RELOC_NUMBER (R_X86_64_GOTPC32_TLSDESC, 34) + /* 32 bit signed pc relative + offset to TLS descriptor + in the GOT. */ + RELOC_NUMBER (R_X86_64_TLSDESC_CALL, 35) /* Relaxable call through TLS + descriptor. */ + RELOC_NUMBER (R_X86_64_TLSDESC, 36) /* 2x64-bit TLS descriptor. */ + RELOC_NUMBER (R_X86_64_IRELATIVE, 37) /* Adjust indirectly by program base */ + RELOC_NUMBER (R_X86_64_RELATIVE64, 38) /* 64bit adjust by program base */ + RELOC_NUMBER (R_X86_64_PC32_BND, 39) /* PC relative 32 bit + signed with BND prefix */ + RELOC_NUMBER (R_X86_64_PLT32_BND, 40) /* 32 bit PLT address with + BND prefix */ + /* Load from 32 bit signed pc relative offset to GOT entry without + REX prefix, relaxable. */ + RELOC_NUMBER (R_X86_64_GOTPCRELX, 41) + /* Load from 32 bit signed pc relative offset to GOT entry with + REX prefix, relaxable. */ + RELOC_NUMBER (R_X86_64_REX_GOTPCRELX, 42) + RELOC_NUMBER (R_X86_64_GNU_VTINHERIT, 250) /* GNU C++ hack */ + RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251) /* GNU C++ hack */ +END_RELOC_NUMBERS (R_X86_64_max) + +/* Processor specific section types. */ + +#define SHT_X86_64_UNWIND 0x70000001 /* unwind information */ + +/* Like SHN_COMMON but the symbol will be allocated in the .lbss + section. */ +#define SHN_X86_64_LCOMMON (SHN_LORESERVE + 2) + +#define SHF_X86_64_LARGE 0x10000000 +#endif diff --git a/support/sdbinutils/include/elf/xc16x.h b/support/sdbinutils/include/elf/xc16x.h new file mode 100644 index 0000000..be24748 --- /dev/null +++ b/support/sdbinutils/include/elf/xc16x.h @@ -0,0 +1,40 @@ +/* Infineon XC16X ELF support for BFD. + Copyright (C) 2006-2018 Free Software Foundation, Inc. + Contributed by KPIT Cummins Infosystems + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_XC16X_H +#define _ELF_XC16X_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_xc16x_reloc_type) + RELOC_NUMBER (R_XC16X_NONE, 0) + RELOC_NUMBER (R_XC16X_ABS_8, 1) + RELOC_NUMBER (R_XC16X_ABS_16, 2) + RELOC_NUMBER (R_XC16X_ABS_32, 3) + RELOC_NUMBER (R_XC16X_8_PCREL, 4) + RELOC_NUMBER (R_XC16X_PAG, 5) + RELOC_NUMBER (R_XC16X_POF, 6) + RELOC_NUMBER (R_XC16X_SEG, 7) + RELOC_NUMBER (R_XC16X_SOF, 8) + +END_RELOC_NUMBERS (R_XC16X_max) + +#endif /* _ELF_XC16X_H */ diff --git a/support/sdbinutils/include/elf/xgate.h b/support/sdbinutils/include/elf/xgate.h new file mode 100644 index 0000000..90e5679 --- /dev/null +++ b/support/sdbinutils/include/elf/xgate.h @@ -0,0 +1,77 @@ +/* XGATE ELF support for BFD. + Copyright (C) 2010-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 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 _ELF_XGATE_H +#define _ELF_XGATE_H + +#include "elf/reloc-macros.h" + +/* Relocation types. */ +START_RELOC_NUMBERS (elf_xgate_reloc_type) + RELOC_NUMBER (R_XGATE_NONE, 0) + RELOC_NUMBER (R_XGATE_8, 1) + RELOC_NUMBER (R_XGATE_PCREL_8, 2) + RELOC_NUMBER (R_XGATE_16, 3) + RELOC_NUMBER (R_XGATE_32, 4) + RELOC_NUMBER (R_XGATE_PCREL_16, 5) + /* These are GNU extensions to enable C++ vtable garbage collection. */ + RELOC_NUMBER (R_XGATE_GNU_VTINHERIT, 6) + RELOC_NUMBER (R_XGATE_GNU_VTENTRY, 7) + + RELOC_NUMBER (R_XGATE_24, 8) + RELOC_NUMBER (R_XGATE_LO16, 9) + RELOC_NUMBER (R_XGATE_GPAGE, 10) + RELOC_NUMBER (R_XGATE_PCREL_9, 11) + RELOC_NUMBER (R_XGATE_PCREL_10, 12) + RELOC_NUMBER (R_XGATE_IMM8_LO, 13) + RELOC_NUMBER (R_XGATE_IMM8_HI, 14) + RELOC_NUMBER (R_XGATE_IMM3, 15) + RELOC_NUMBER (R_XGATE_IMM4, 16) + RELOC_NUMBER (R_XGATE_IMM5, 17) + + /* GNU extension for linker relaxation. + Mark beginning of a jump instruction (any form). */ + RELOC_NUMBER (R_XGATE_RL_JUMP, 18) + + /* Mark beginning of Gcc relaxation group instruction. */ + RELOC_NUMBER (R_XGATE_RL_GROUP, 19) +END_RELOC_NUMBERS (R_XGATE_max) + +/* Processor specific flags for the ELF header e_flags field. */ + +/* ABI identification. */ +#define EF_XGATE_ABI 0x00000000F + +/* Integers are 32-bit long. */ +#define E_XGATE_I32 0x000000001 + +/* Doubles are 64-bit long. */ +#define E_XGATE_F64 0x000000002 + +#define EF_XGATE_MACH_MASK 0xF0 + +#define EF_XGATE_MACH 0x80 /* XGATE microcontroller. */ + +#define E_M68HCS12X_GLOBAL 0x100 + +/* Identify interrupt handlers. This is used by the debugger to + correctly compute the stack frame. */ +#define STO_XGATE_INTERRUPT 0x40 + +#endif diff --git a/support/sdbinutils/include/elf/xstormy16.h b/support/sdbinutils/include/elf/xstormy16.h new file mode 100644 index 0000000..da6cd5f --- /dev/null +++ b/support/sdbinutils/include/elf/xstormy16.h @@ -0,0 +1,57 @@ +/* XSTORMY16 ELF support for BFD. + Copyright (C) 2001-2018 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _ELF_XSTORMY16_H +#define _ELF_XSTORMY16_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_xstormy16_reloc_type) + RELOC_NUMBER (R_XSTORMY16_NONE, 0) + + RELOC_NUMBER (R_XSTORMY16_32, 1) + RELOC_NUMBER (R_XSTORMY16_16, 2) + RELOC_NUMBER (R_XSTORMY16_8, 3) + RELOC_NUMBER (R_XSTORMY16_PC32, 4) + RELOC_NUMBER (R_XSTORMY16_PC16, 5) + RELOC_NUMBER (R_XSTORMY16_PC8, 6) + + RELOC_NUMBER (R_XSTORMY16_REL_12, 7) + RELOC_NUMBER (R_XSTORMY16_24, 8) + RELOC_NUMBER (R_XSTORMY16_FPTR16, 9) + + RELOC_NUMBER (R_XSTORMY16_LO16, 10) + RELOC_NUMBER (R_XSTORMY16_HI16, 11) + RELOC_NUMBER (R_XSTORMY16_12, 12) + + RELOC_NUMBER (R_XSTORMY16_GNU_VTINHERIT, 128) + RELOC_NUMBER (R_XSTORMY16_GNU_VTENTRY, 129) +END_RELOC_NUMBERS (R_XSTORMY16_max) + +/* Define the data & instruction memory discriminator. In a linked + executable, an symbol should be deemed to point to an instruction + if ((address & XSTORMY16_INSN_MASK) == XSTORMY16_INSN_VALUE), and similarly + for the data space. See also `ld/emulparams/elf32xstormy16.sh'. */ +#define XSTORMY16_DATA_MASK 0xffc00000 +#define XSTORMY16_DATA_VALUE 0x00000000 +#define XSTORMY16_INSN_MASK 0xffc00000 +#define XSTORMY16_INSN_VALUE 0x00400000 + +#endif /* _ELF_XSTORMY16_H */ diff --git a/support/sdbinutils/include/elf/xtensa.h b/support/sdbinutils/include/elf/xtensa.h new file mode 100644 index 0000000..6278e21 --- /dev/null +++ b/support/sdbinutils/include/elf/xtensa.h @@ -0,0 +1,218 @@ +/* Xtensa ELF support for BFD. + Copyright (C) 2003-2018 Free Software Foundation, Inc. + Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, + USA. */ + +/* This file holds definitions specific to the Xtensa ELF ABI. */ + +#ifndef _ELF_XTENSA_H +#define _ELF_XTENSA_H + +#include "elf/reloc-macros.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Relocations. */ +START_RELOC_NUMBERS (elf_xtensa_reloc_type) + RELOC_NUMBER (R_XTENSA_NONE, 0) + RELOC_NUMBER (R_XTENSA_32, 1) + RELOC_NUMBER (R_XTENSA_RTLD, 2) + RELOC_NUMBER (R_XTENSA_GLOB_DAT, 3) + RELOC_NUMBER (R_XTENSA_JMP_SLOT, 4) + RELOC_NUMBER (R_XTENSA_RELATIVE, 5) + RELOC_NUMBER (R_XTENSA_PLT, 6) + RELOC_NUMBER (R_XTENSA_OP0, 8) + RELOC_NUMBER (R_XTENSA_OP1, 9) + RELOC_NUMBER (R_XTENSA_OP2, 10) + RELOC_NUMBER (R_XTENSA_ASM_EXPAND, 11) + RELOC_NUMBER (R_XTENSA_ASM_SIMPLIFY, 12) + RELOC_NUMBER (R_XTENSA_32_PCREL, 14) + RELOC_NUMBER (R_XTENSA_GNU_VTINHERIT, 15) + RELOC_NUMBER (R_XTENSA_GNU_VTENTRY, 16) + RELOC_NUMBER (R_XTENSA_DIFF8, 17) + RELOC_NUMBER (R_XTENSA_DIFF16, 18) + RELOC_NUMBER (R_XTENSA_DIFF32, 19) + RELOC_NUMBER (R_XTENSA_SLOT0_OP, 20) + RELOC_NUMBER (R_XTENSA_SLOT1_OP, 21) + RELOC_NUMBER (R_XTENSA_SLOT2_OP, 22) + RELOC_NUMBER (R_XTENSA_SLOT3_OP, 23) + RELOC_NUMBER (R_XTENSA_SLOT4_OP, 24) + RELOC_NUMBER (R_XTENSA_SLOT5_OP, 25) + RELOC_NUMBER (R_XTENSA_SLOT6_OP, 26) + RELOC_NUMBER (R_XTENSA_SLOT7_OP, 27) + RELOC_NUMBER (R_XTENSA_SLOT8_OP, 28) + RELOC_NUMBER (R_XTENSA_SLOT9_OP, 29) + RELOC_NUMBER (R_XTENSA_SLOT10_OP, 30) + RELOC_NUMBER (R_XTENSA_SLOT11_OP, 31) + RELOC_NUMBER (R_XTENSA_SLOT12_OP, 32) + RELOC_NUMBER (R_XTENSA_SLOT13_OP, 33) + RELOC_NUMBER (R_XTENSA_SLOT14_OP, 34) + RELOC_NUMBER (R_XTENSA_SLOT0_ALT, 35) + RELOC_NUMBER (R_XTENSA_SLOT1_ALT, 36) + RELOC_NUMBER (R_XTENSA_SLOT2_ALT, 37) + RELOC_NUMBER (R_XTENSA_SLOT3_ALT, 38) + RELOC_NUMBER (R_XTENSA_SLOT4_ALT, 39) + RELOC_NUMBER (R_XTENSA_SLOT5_ALT, 40) + RELOC_NUMBER (R_XTENSA_SLOT6_ALT, 41) + RELOC_NUMBER (R_XTENSA_SLOT7_ALT, 42) + RELOC_NUMBER (R_XTENSA_SLOT8_ALT, 43) + RELOC_NUMBER (R_XTENSA_SLOT9_ALT, 44) + RELOC_NUMBER (R_XTENSA_SLOT10_ALT, 45) + RELOC_NUMBER (R_XTENSA_SLOT11_ALT, 46) + RELOC_NUMBER (R_XTENSA_SLOT12_ALT, 47) + RELOC_NUMBER (R_XTENSA_SLOT13_ALT, 48) + RELOC_NUMBER (R_XTENSA_SLOT14_ALT, 49) + RELOC_NUMBER (R_XTENSA_TLSDESC_FN, 50) + RELOC_NUMBER (R_XTENSA_TLSDESC_ARG, 51) + RELOC_NUMBER (R_XTENSA_TLS_DTPOFF, 52) + RELOC_NUMBER (R_XTENSA_TLS_TPOFF, 53) + RELOC_NUMBER (R_XTENSA_TLS_FUNC, 54) + RELOC_NUMBER (R_XTENSA_TLS_ARG, 55) + RELOC_NUMBER (R_XTENSA_TLS_CALL, 56) +END_RELOC_NUMBERS (R_XTENSA_max) + +/* Processor-specific flags for the ELF header e_flags field. */ + +/* Four-bit Xtensa machine type field. */ +#define EF_XTENSA_MACH 0x0000000f + +/* Various CPU types. */ +#define E_XTENSA_MACH 0x00000000 + +/* Leave bits 0xf0 alone in case we ever have more than 16 cpu types. + Highly unlikely, but what the heck. */ + +#define EF_XTENSA_XT_INSN 0x00000100 +#define EF_XTENSA_XT_LIT 0x00000200 + + +/* Processor-specific dynamic array tags. */ + +/* Offset of the table that records the GOT location(s). */ +#define DT_XTENSA_GOT_LOC_OFF 0x70000000 + +/* Number of entries in the GOT location table. */ +#define DT_XTENSA_GOT_LOC_SZ 0x70000001 + + +/* Definitions for instruction and literal property tables. The + tables for ".gnu.linkonce.*" sections are placed in the following + sections: + + instruction tables: .gnu.linkonce.x.* + literal tables: .gnu.linkonce.p.* +*/ + +#define XTENSA_INSN_SEC_NAME ".xt.insn" +#define XTENSA_LIT_SEC_NAME ".xt.lit" +#define XTENSA_PROP_SEC_NAME ".xt.prop" + +typedef struct property_table_entry_t +{ + bfd_vma address; + bfd_vma size; + flagword flags; +} property_table_entry; + +/* Flags in the property tables to specify whether blocks of memory are + literals, instructions, data, or unreachable. For instructions, + blocks that begin loop targets and branch targets are designated. + Blocks that do not allow density instructions, instruction reordering + or transformation are also specified. Finally, for branch targets, + branch target alignment priority is included. Alignment of the next + block is specified in the current block and the size of the current + block does not include any fill required to align to the next + block. */ + +#define XTENSA_PROP_LITERAL 0x00000001 +#define XTENSA_PROP_INSN 0x00000002 +#define XTENSA_PROP_DATA 0x00000004 +#define XTENSA_PROP_UNREACHABLE 0x00000008 +/* Instruction-only properties at beginning of code. */ +#define XTENSA_PROP_INSN_LOOP_TARGET 0x00000010 +#define XTENSA_PROP_INSN_BRANCH_TARGET 0x00000020 +/* Instruction-only properties about code. */ +#define XTENSA_PROP_INSN_NO_DENSITY 0x00000040 +#define XTENSA_PROP_INSN_NO_REORDER 0x00000080 +/* Historically, NO_TRANSFORM was a property of instructions, + but it should apply to literals under certain circumstances. */ +#define XTENSA_PROP_NO_TRANSFORM 0x00000100 + +/* Branch target alignment information. This transmits information + to the linker optimization about the priority of aligning a + particular block for branch target alignment: None, low priority, + high priority, or required. These only need to be checked in + instruction blocks marked as XTENSA_PROP_INSN_BRANCH_TARGET. + Common usage is: + + switch (GET_XTENSA_PROP_BT_ALIGN(flags)) + case XTENSA_PROP_BT_ALIGN_NONE: + case XTENSA_PROP_BT_ALIGN_LOW: + case XTENSA_PROP_BT_ALIGN_HIGH: + case XTENSA_PROP_BT_ALIGN_REQUIRE: +*/ +#define XTENSA_PROP_BT_ALIGN_MASK 0x00000600 + +/* No branch target alignment. */ +#define XTENSA_PROP_BT_ALIGN_NONE 0x0 +/* Low priority branch target alignment. */ +#define XTENSA_PROP_BT_ALIGN_LOW 0x1 +/* High priority branch target alignment. */ +#define XTENSA_PROP_BT_ALIGN_HIGH 0x2 +/* Required branch target alignment. */ +#define XTENSA_PROP_BT_ALIGN_REQUIRE 0x3 + +#define GET_XTENSA_PROP_BT_ALIGN(flag) \ + (((unsigned)((flag) & (XTENSA_PROP_BT_ALIGN_MASK))) >> 9) +#define SET_XTENSA_PROP_BT_ALIGN(flag, align) \ + (((flag) & (~XTENSA_PROP_BT_ALIGN_MASK)) | \ + (((align) << 9) & XTENSA_PROP_BT_ALIGN_MASK)) + +/* Alignment is specified in the block BEFORE the one that needs + alignment. Up to 5 bits. Use GET_XTENSA_PROP_ALIGNMENT(flags) to + get the required alignment specified as a power of 2. Use + SET_XTENSA_PROP_ALIGNMENT(flags, pow2) to set the required + alignment. Be careful of side effects since the SET will evaluate + flags twice. Also, note that the SIZE of a block in the property + table does not include the alignment size, so the alignment fill + must be calculated to determine if two blocks are contiguous. + TEXT_ALIGN is not currently implemented but is a placeholder for a + possible future implementation. */ + +#define XTENSA_PROP_ALIGN 0x00000800 + +#define XTENSA_PROP_ALIGNMENT_MASK 0x0001f000 + +#define GET_XTENSA_PROP_ALIGNMENT(flag) \ + (((unsigned)((flag) & (XTENSA_PROP_ALIGNMENT_MASK))) >> 12) +#define SET_XTENSA_PROP_ALIGNMENT(flag, align) \ + (((flag) & (~XTENSA_PROP_ALIGNMENT_MASK)) | \ + (((align) << 12) & XTENSA_PROP_ALIGNMENT_MASK)) + +#define XTENSA_PROP_INSN_ABSLIT 0x00020000 + +extern asection *xtensa_make_property_section (asection *, const char *); + +#ifdef __cplusplus +} +#endif + +#endif /* _ELF_XTENSA_H */ diff --git a/support/sdbinutils/include/environ.h b/support/sdbinutils/include/environ.h new file mode 100644 index 0000000..73ada48 --- /dev/null +++ b/support/sdbinutils/include/environ.h @@ -0,0 +1,35 @@ +/* Declare the environ system variable. + Copyright (C) 2015-2018 Free Software Foundation, Inc. + +This file is part of the libiberty library. +Libiberty is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +Libiberty 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with libiberty; see the file COPYING.LIB. If not, +write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, +Boston, MA 02110-1301, USA. */ + +/* On OSX, the environ variable can be used directly in the code of an + executable, but cannot be used in the code of a shared library (such as + GCC's liblto_plugin, which links in libiberty code). Instead, the + function _NSGetEnviron can be called to get the address of environ. */ + +#ifndef HAVE_ENVIRON_DECL +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron ()) +# else +# ifndef environ +extern char **environ; +# endif +# endif +# define HAVE_ENVIRON_DECL +#endif diff --git a/support/sdbinutils/include/fibheap.h b/support/sdbinutils/include/fibheap.h new file mode 100644 index 0000000..9fc6dcd --- /dev/null +++ b/support/sdbinutils/include/fibheap.h @@ -0,0 +1,94 @@ +/* A Fibonacci heap datatype. + Copyright (C) 1998-2018 Free Software Foundation, Inc. + Contributed by Daniel Berlin (dan@cgsoftware.com). + +This file is part of GCC. + +GCC 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, or (at your option) +any later version. + +GCC 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 GCC; see the file COPYING. If not, write to +the Free Software Foundation, 51 Franklin Street - Fifth Floor, +Boston, MA 02110-1301, USA. */ + +/* Fibonacci heaps are somewhat complex, but, there's an article in + DDJ that explains them pretty well: + + http://www.ddj.com/articles/1997/9701/9701o/9701o.htm?topic=algoritms + + Introduction to algorithms by Corman and Rivest also goes over them. + + The original paper that introduced them is "Fibonacci heaps and their + uses in improved network optimization algorithms" by Tarjan and + Fredman (JACM 34(3), July 1987). + + Amortized and real worst case time for operations: + + ExtractMin: O(lg n) amortized. O(n) worst case. + DecreaseKey: O(1) amortized. O(lg n) worst case. + Insert: O(2) amortized. O(1) actual. + Union: O(1) amortized. O(1) actual. */ + +#ifndef _FIBHEAP_H_ +#define _FIBHEAP_H_ + +#include "ansidecl.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef long fibheapkey_t; + +typedef struct fibheap +{ + size_t nodes; + struct fibnode *min; + struct fibnode *root; +} *fibheap_t; + +typedef struct fibnode +{ + struct fibnode *parent; + struct fibnode *child; + struct fibnode *left; + struct fibnode *right; + fibheapkey_t key; + void *data; +#if defined (__GNUC__) && (!defined (SIZEOF_INT) || SIZEOF_INT < 4) + __extension__ unsigned long int degree : 31; + __extension__ unsigned long int mark : 1; +#else + unsigned int degree : 31; + unsigned int mark : 1; +#endif +} *fibnode_t; + +extern fibheap_t fibheap_new (void); +extern fibnode_t fibheap_insert (fibheap_t, fibheapkey_t, void *); +extern int fibheap_empty (fibheap_t); +extern fibheapkey_t fibheap_min_key (fibheap_t); +extern fibheapkey_t fibheap_replace_key (fibheap_t, fibnode_t, + fibheapkey_t); +extern void *fibheap_replace_key_data (fibheap_t, fibnode_t, + fibheapkey_t, void *); +extern void *fibheap_extract_min (fibheap_t); +extern void *fibheap_min (fibheap_t); +extern void *fibheap_replace_data (fibheap_t, fibnode_t, void *); +extern void *fibheap_delete_node (fibheap_t, fibnode_t); +extern void fibheap_delete (fibheap_t); +extern fibheap_t fibheap_union (fibheap_t, fibheap_t); + +#ifdef __cplusplus +} +#endif + +#endif /* _FIBHEAP_H_ */ diff --git a/support/sdbinutils/include/filenames.h b/support/sdbinutils/include/filenames.h new file mode 100644 index 0000000..6164048 --- /dev/null +++ b/support/sdbinutils/include/filenames.h @@ -0,0 +1,99 @@ +/* Macros for taking apart, interpreting and processing file names. + + These are here because some non-Posix (a.k.a. DOSish) systems have + drive letter brain-damage at the beginning of an absolute file name, + use forward- and back-slash in path names interchangeably, and + some of them have case-insensitive file names. + + Copyright (C) 2000-2018 Free Software Foundation, Inc. + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 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 FILENAMES_H +#define FILENAMES_H + +#include "hashtab.h" /* for hashval_t */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) +# ifndef HAVE_DOS_BASED_FILE_SYSTEM +# define HAVE_DOS_BASED_FILE_SYSTEM 1 +# endif +# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM +# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 +# endif +# define HAS_DRIVE_SPEC(f) HAS_DOS_DRIVE_SPEC (f) +# define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) +# define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) +#else /* not DOSish */ +# if defined(__APPLE__) +# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM +# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 +# endif +# endif /* __APPLE__ */ +# define HAS_DRIVE_SPEC(f) (0) +# define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) +# define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) +#endif + +#define IS_DIR_SEPARATOR_1(dos_based, c) \ + (((c) == '/') \ + || (((c) == '\\') && (dos_based))) + +#define HAS_DRIVE_SPEC_1(dos_based, f) \ + ((f)[0] && ((f)[1] == ':') && (dos_based)) + +/* Remove the drive spec from F, assuming HAS_DRIVE_SPEC (f). + The result is a pointer to the remainder of F. */ +#define STRIP_DRIVE_SPEC(f) ((f) + 2) + +#define IS_DOS_DIR_SEPARATOR(c) IS_DIR_SEPARATOR_1 (1, c) +#define IS_DOS_ABSOLUTE_PATH(f) IS_ABSOLUTE_PATH_1 (1, f) +#define HAS_DOS_DRIVE_SPEC(f) HAS_DRIVE_SPEC_1 (1, f) + +#define IS_UNIX_DIR_SEPARATOR(c) IS_DIR_SEPARATOR_1 (0, c) +#define IS_UNIX_ABSOLUTE_PATH(f) IS_ABSOLUTE_PATH_1 (0, f) + +/* Note that when DOS_BASED is true, IS_ABSOLUTE_PATH accepts d:foo as + well, although it is only semi-absolute. This is because the users + of IS_ABSOLUTE_PATH want to know whether to prepend the current + working directory to a file name, which should not be done with a + name like d:foo. */ +#define IS_ABSOLUTE_PATH_1(dos_based, f) \ + (IS_DIR_SEPARATOR_1 (dos_based, (f)[0]) \ + || HAS_DRIVE_SPEC_1 (dos_based, f)) + +extern int filename_cmp (const char *s1, const char *s2); +#define FILENAME_CMP(s1, s2) filename_cmp(s1, s2) + +extern int filename_ncmp (const char *s1, const char *s2, + size_t n); + +extern hashval_t filename_hash (const void *s); + +extern int filename_eq (const void *s1, const void *s2); + +extern int canonical_filename_eq (const char *a, const char *b); + +#ifdef __cplusplus +} +#endif + +#endif /* FILENAMES_H */ diff --git a/support/sdbinutils/include/floatformat.h b/support/sdbinutils/include/floatformat.h new file mode 100644 index 0000000..9108b69 --- /dev/null +++ b/support/sdbinutils/include/floatformat.h @@ -0,0 +1,159 @@ +/* IEEE floating point support declarations, for GDB, the GNU Debugger. + Copyright (C) 1991-2018 Free Software Foundation, Inc. + +This file is part of GDB. + +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. */ + +#if !defined (FLOATFORMAT_H) +#define FLOATFORMAT_H 1 + +#include "ansidecl.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* A floatformat consists of a sign bit, an exponent and a mantissa. Once the + bytes are concatenated according to the byteorder flag, then each of those + fields is contiguous. We number the bits with 0 being the most significant + (i.e. BITS_BIG_ENDIAN type numbering), and specify which bits each field + contains with the *_start and *_len fields. */ + +/* What is the order of the bytes? */ + +enum floatformat_byteorders { + /* Standard little endian byte order. + EX: 1.2345678e10 => 00 00 80 c5 e0 fe 06 42 */ + floatformat_little, + + /* Standard big endian byte order. + EX: 1.2345678e10 => 42 06 fe e0 c5 80 00 00 */ + floatformat_big, + + /* Little endian byte order but big endian word order. + EX: 1.2345678e10 => e0 fe 06 42 00 00 80 c5 */ + floatformat_littlebyte_bigword, + + /* VAX byte order. Little endian byte order with 16-bit words. The + following example is an illustration of the byte order only; VAX + doesn't have a fully IEEE compliant floating-point format. + EX: 1.2345678e10 => 80 c5 00 00 06 42 e0 fe */ + floatformat_vax +}; + +enum floatformat_intbit { floatformat_intbit_yes, floatformat_intbit_no }; + +struct floatformat +{ + enum floatformat_byteorders byteorder; + unsigned int totalsize; /* Total size of number in bits */ + + /* Sign bit is always one bit long. 1 means negative, 0 means positive. */ + unsigned int sign_start; + + unsigned int exp_start; + unsigned int exp_len; + /* Bias added to a "true" exponent to form the biased exponent. It + is intentionally signed as, otherwize, -exp_bias can turn into a + very large number (e.g., given the exp_bias of 0x3fff and a 64 + bit long, the equation (long)(1 - exp_bias) evaluates to + 4294950914) instead of -16382). */ + int exp_bias; + /* Exponent value which indicates NaN. This is the actual value stored in + the float, not adjusted by the exp_bias. This usually consists of all + one bits. */ + unsigned int exp_nan; + + unsigned int man_start; + unsigned int man_len; + + /* Is the integer bit explicit or implicit? */ + enum floatformat_intbit intbit; + + /* Internal name for debugging. */ + const char *name; + + /* Validator method. */ + int (*is_valid) (const struct floatformat *fmt, const void *from); + + /* Is the format actually the sum of two smaller floating point + formats (IBM long double, as described in + gcc/config/rs6000/darwin-ldouble-format)? If so, this is the + smaller format in question, and the fields sign_start through + intbit describe the first half. If not, this is NULL. */ + const struct floatformat *split_half; +}; + +/* floatformats for IEEE single and double, big and little endian. */ + +extern const struct floatformat floatformat_ieee_half_big; +extern const struct floatformat floatformat_ieee_half_little; +extern const struct floatformat floatformat_ieee_single_big; +extern const struct floatformat floatformat_ieee_single_little; +extern const struct floatformat floatformat_ieee_double_big; +extern const struct floatformat floatformat_ieee_double_little; + +/* floatformat for ARM IEEE double, little endian bytes and big endian words */ + +extern const struct floatformat floatformat_ieee_double_littlebyte_bigword; + +/* floatformats for VAX. */ + +extern const struct floatformat floatformat_vax_f; +extern const struct floatformat floatformat_vax_d; +extern const struct floatformat floatformat_vax_g; + +/* floatformats for various extendeds. */ + +extern const struct floatformat floatformat_i387_ext; +extern const struct floatformat floatformat_m68881_ext; +extern const struct floatformat floatformat_i960_ext; +extern const struct floatformat floatformat_m88110_ext; +extern const struct floatformat floatformat_m88110_harris_ext; +extern const struct floatformat floatformat_arm_ext_big; +extern const struct floatformat floatformat_arm_ext_littlebyte_bigword; +/* IA-64 Floating Point register spilt into memory. */ +extern const struct floatformat floatformat_ia64_spill_big; +extern const struct floatformat floatformat_ia64_spill_little; +extern const struct floatformat floatformat_ia64_quad_big; +extern const struct floatformat floatformat_ia64_quad_little; +/* IBM long double (double+double). */ +extern const struct floatformat floatformat_ibm_long_double_big; +extern const struct floatformat floatformat_ibm_long_double_little; + +/* Convert from FMT to a double. + FROM is the address of the extended float. + Store the double in *TO. */ + +extern void +floatformat_to_double (const struct floatformat *, const void *, double *); + +/* The converse: convert the double *FROM to FMT + and store where TO points. */ + +extern void +floatformat_from_double (const struct floatformat *, const double *, void *); + +/* Return non-zero iff the data at FROM is a valid number in format FMT. */ + +extern int +floatformat_is_valid (const struct floatformat *fmt, const void *from); + +#ifdef __cplusplus +} +#endif + +#endif /* defined (FLOATFORMAT_H) */ diff --git a/support/sdbinutils/include/fnmatch.h b/support/sdbinutils/include/fnmatch.h new file mode 100644 index 0000000..280b39e --- /dev/null +++ b/support/sdbinutils/include/fnmatch.h @@ -0,0 +1,70 @@ +/* Copyright (C) 1991-2018 Free Software Foundation, Inc. + +NOTE: The canonical source of this file is maintained with the GNU C Library. +Bugs can be reported to bug-glibc@prep.ai.mit.edu. + +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, 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, 51 Franklin Street - Fifth Floor, +Boston, MA 02110-1301, USA. */ + +#ifndef _FNMATCH_H + +#define _FNMATCH_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined (__cplusplus) || (defined (__STDC__) && __STDC__) +#undef __P +#define __P(args) args +#else /* Not C++ or ANSI C. */ +#undef __P +#define __P(args) () +/* We can get away without defining `const' here only because in this file + it is used only inside the prototype for `fnmatch', which is elided in + non-ANSI C where `const' is problematical. */ +#endif /* C++ or ANSI C. */ + + +/* We #undef these before defining them because some losing systems + (HP-UX A.08.07 for example) define these in . */ +#undef FNM_PATHNAME +#undef FNM_NOESCAPE +#undef FNM_PERIOD + +/* Bits set in the FLAGS argument to `fnmatch'. */ +#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ +#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ +#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ + +#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE) +#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ +#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ +#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ +#endif + +/* Value returned by `fnmatch' if STRING does not match PATTERN. */ +#define FNM_NOMATCH 1 + +/* Match STRING against the filename pattern PATTERN, + returning zero if it matches, FNM_NOMATCH if not. */ +extern int fnmatch __P ((const char *__pattern, const char *__string, + int __flags)); + +#ifdef __cplusplus +} +#endif + +#endif /* fnmatch.h */ diff --git a/support/sdbinutils/include/fopen-bin.h b/support/sdbinutils/include/fopen-bin.h new file mode 100644 index 0000000..9621393 --- /dev/null +++ b/support/sdbinutils/include/fopen-bin.h @@ -0,0 +1,44 @@ +/* Macros for the 'type' part of an fopen, freopen or fdopen. + + [Update] + + This version is for "binary" systems, where text and binary files are + different. An example is Mess-Dose. Many Unix systems could also + cope with a "b" in the string, indicating binary files, but some reject this + (and thereby don't conform to ANSI C, but what else is new?). + + Copyright (C) 1996-2018 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* This file is designed for inclusion by host-dependent .h files. No + user application should include it directly, since that would make + the application unable to be configured for both "same" and "binary" + variant systems. */ + +#define FOPEN_RB "rb" +#define FOPEN_WB "wb" +#define FOPEN_AB "ab" +#define FOPEN_RUB "r+b" +#define FOPEN_WUB "w+b" +#define FOPEN_AUB "a+b" + +#define FOPEN_RT "r" +#define FOPEN_WT "w" +#define FOPEN_AT "a" +#define FOPEN_RUT "r+" +#define FOPEN_WUT "w+" +#define FOPEN_AUT "a+" diff --git a/support/sdbinutils/include/fopen-same.h b/support/sdbinutils/include/fopen-same.h new file mode 100644 index 0000000..562cd72 --- /dev/null +++ b/support/sdbinutils/include/fopen-same.h @@ -0,0 +1,44 @@ +/* Macros for the 'type' part of an fopen, freopen or fdopen. + + [Update] + + This version is for "same" systems, where text and binary files are + the same. An example is Unix. Many Unix systems could also add a + "b" to the string, indicating binary files, but some reject this + (and thereby don't conform to ANSI C, but what else is new?). + + Copyright (C) 1996-2018 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* This file is designed for inclusion by host-dependent .h files. No + user application should include it directly, since that would make + the application unable to be configured for both "same" and "binary" + variant systems. */ + +#define FOPEN_RB "r" +#define FOPEN_WB "w" +#define FOPEN_AB "a" +#define FOPEN_RUB "r+" +#define FOPEN_WUB "w+" +#define FOPEN_AUB "a+" + +#define FOPEN_RT "r" +#define FOPEN_WT "w" +#define FOPEN_AT "a" +#define FOPEN_RUT "r+" +#define FOPEN_WUT "w+" +#define FOPEN_AUT "a+" diff --git a/support/sdbinutils/include/fopen-vms.h b/support/sdbinutils/include/fopen-vms.h new file mode 100644 index 0000000..5414c0d --- /dev/null +++ b/support/sdbinutils/include/fopen-vms.h @@ -0,0 +1,42 @@ +/* Macros for the 'type' part of an fopen, freopen or fdopen. + + [Update] + + This version is for VMS systems, where text and binary files are + different. + + Copyright (C) 1996-2018 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* This file is designed for inclusion by host-dependent .h files. No + user application should include it directly, since that would make + the application unable to be configured for both "same" and "binary" + variant systems. */ + +#define FOPEN_RB "rb,rfm=udf,rat=none" +#define FOPEN_WB "wb,rfm=udf,rat=none" +#define FOPEN_AB "ab,rfm=udf,rat=none" +#define FOPEN_RUB "r+b,rfm=udf,rat=none" +#define FOPEN_WUB "w+b,rfm=udf,rat=none" +#define FOPEN_AUB "a+b,rfm=udf,rat=none" + +#define FOPEN_RT "r" +#define FOPEN_WT "w" +#define FOPEN_AT "a" +#define FOPEN_RUT "r+" +#define FOPEN_WUT "w+" +#define FOPEN_AUT "a+" diff --git a/support/sdbinutils/include/gcc-c-fe.def b/support/sdbinutils/include/gcc-c-fe.def new file mode 100644 index 0000000..73aa50f --- /dev/null +++ b/support/sdbinutils/include/gcc-c-fe.def @@ -0,0 +1,222 @@ +/* Interface between GCC C FE and GDB -*- c -*- + + Copyright (C) 2014-2018 Free Software Foundation, Inc. + + This file is part of GCC. + + 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 . */ + + + +/* Create a new "decl" in GCC. A decl is a declaration, basically a + kind of symbol. + + NAME is the name of the new symbol. SYM_KIND is the kind of + symbol being requested. SYM_TYPE is the new symbol's C type; + except for labels, where this is not meaningful and should be + zero. If SUBSTITUTION_NAME is not NULL, then a reference to this + decl in the source will later be substituted with a dereference + of a variable of the given name. Otherwise, for symbols having + an address (e.g., functions), ADDRESS is the address. FILENAME + and LINE_NUMBER refer to the symbol's source location. If this + is not known, FILENAME can be NULL and LINE_NUMBER can be 0. + This function returns the new decl. */ + +GCC_METHOD7 (gcc_decl, build_decl, + const char *, /* Argument NAME. */ + enum gcc_c_symbol_kind, /* Argument SYM_KIND. */ + gcc_type, /* Argument SYM_TYPE. */ + const char *, /* Argument SUBSTITUTION_NAME. */ + gcc_address, /* Argument ADDRESS. */ + const char *, /* Argument FILENAME. */ + unsigned int) /* Argument LINE_NUMBER. */ + +/* Insert a GCC decl into the symbol table. DECL is the decl to + insert. IS_GLOBAL is true if this is an outermost binding, and + false if it is a possibly-shadowing binding. */ + +GCC_METHOD2 (int /* bool */, bind, + gcc_decl, /* Argument DECL. */ + int /* bool */) /* Argument IS_GLOBAL. */ + +/* Insert a tagged type into the symbol table. NAME is the tag name + of the type and TAGGED_TYPE is the type itself. TAGGED_TYPE must + be either a struct, union, or enum type, as these are the only + types that have tags. FILENAME and LINE_NUMBER refer to the type's + source location. If this is not known, FILENAME can be NULL and + LINE_NUMBER can be 0. */ + +GCC_METHOD4 (int /* bool */, tagbind, + const char *, /* Argument NAME. */ + gcc_type, /* Argument TAGGED_TYPE. */ + const char *, /* Argument FILENAME. */ + unsigned int) /* Argument LINE_NUMBER. */ + +/* Return the type of a pointer to a given base type. */ + +GCC_METHOD1 (gcc_type, build_pointer_type, + gcc_type) /* Argument BASE_TYPE. */ + +/* Create a new 'struct' type. Initially it has no fields. */ + +GCC_METHOD0 (gcc_type, build_record_type) + +/* Create a new 'union' type. Initially it has no fields. */ + +GCC_METHOD0 (gcc_type, build_union_type) + +/* Add a field to a struct or union type. FIELD_NAME is the field's + name. FIELD_TYPE is the type of the field. BITSIZE and BITPOS + indicate where in the struct the field occurs. */ + +GCC_METHOD5 (int /* bool */, build_add_field, + gcc_type, /* Argument RECORD_OR_UNION_TYPE. */ + const char *, /* Argument FIELD_NAME. */ + gcc_type, /* Argument FIELD_TYPE. */ + unsigned long, /* Argument BITSIZE. */ + unsigned long) /* Argument BITPOS. */ + +/* After all the fields have been added to a struct or union, the + struct or union type must be "finished". This does some final + cleanups in GCC. */ + +GCC_METHOD2 (int /* bool */, finish_record_or_union, + gcc_type, /* Argument RECORD_OR_UNION_TYPE. */ + unsigned long) /* Argument SIZE_IN_BYTES. */ + +/* Create a new 'enum' type. The new type initially has no + associated constants. */ + +GCC_METHOD1 (gcc_type, build_enum_type, + gcc_type) /* Argument UNDERLYING_INT_TYPE. */ + +/* Add a new constant to an enum type. NAME is the constant's + name and VALUE is its value. */ + +GCC_METHOD3 (int /* bool */, build_add_enum_constant, + gcc_type, /* Argument ENUM_TYPE. */ + const char *, /* Argument NAME. */ + unsigned long) /* Argument VALUE. */ + +/* After all the constants have been added to an enum, the type must + be "finished". This does some final cleanups in GCC. */ + +GCC_METHOD1 (int /* bool */, finish_enum_type, + gcc_type) /* Argument ENUM_TYPE. */ + +/* Create a new function type. RETURN_TYPE is the type returned by + the function, and ARGUMENT_TYPES is a vector, of length NARGS, of + the argument types. IS_VARARGS is true if the function is + varargs. */ + +GCC_METHOD3 (gcc_type, build_function_type, + gcc_type, /* Argument RETURN_TYPE. */ + const struct gcc_type_array *, /* Argument ARGUMENT_TYPES. */ + int /* bool */) /* Argument IS_VARARGS. */ + +/* Return an integer type with the given properties. + Deprecated in v1, use int_type instead. */ + +GCC_METHOD2 (gcc_type, int_type_v0, + int /* bool */, /* Argument IS_UNSIGNED. */ + unsigned long) /* Argument SIZE_IN_BYTES. */ + +/* Return a floating point type with the given properties. + Deprecated in v1, use float_type instead. */ + +GCC_METHOD1 (gcc_type, float_type_v0, + unsigned long) /* Argument SIZE_IN_BYTES. */ + +/* Return the 'void' type. */ + +GCC_METHOD0 (gcc_type, void_type) + +/* Return the 'bool' type. */ + +GCC_METHOD0 (gcc_type, bool_type) + +/* Create a new array type. If NUM_ELEMENTS is -1, then the array + is assumed to have an unknown length. */ + +GCC_METHOD2 (gcc_type, build_array_type, + gcc_type, /* Argument ELEMENT_TYPE. */ + int) /* Argument NUM_ELEMENTS. */ + +/* Create a new variably-sized array type. UPPER_BOUND_NAME is the + name of a local variable that holds the upper bound of the array; + it is one less than the array size. */ + +GCC_METHOD2 (gcc_type, build_vla_array_type, + gcc_type, /* Argument ELEMENT_TYPE. */ + const char *) /* Argument UPPER_BOUND_NAME. */ + +/* Return a qualified variant of a given base type. QUALIFIERS says + which qualifiers to use; it is composed of or'd together + constants from 'enum gcc_qualifiers'. */ + +GCC_METHOD2 (gcc_type, build_qualified_type, + gcc_type, /* Argument UNQUALIFIED_TYPE. */ + enum gcc_qualifiers) /* Argument QUALIFIERS. */ + +/* Build a complex type given its element type. */ + +GCC_METHOD1 (gcc_type, build_complex_type, + gcc_type) /* Argument ELEMENT_TYPE. */ + +/* Build a vector type given its element type and number of + elements. */ + +GCC_METHOD2 (gcc_type, build_vector_type, + gcc_type, /* Argument ELEMENT_TYPE. */ + int) /* Argument NUM_ELEMENTS. */ + +/* Build a constant. NAME is the constant's name and VALUE is its + value. FILENAME and LINE_NUMBER refer to the type's source + location. If this is not known, FILENAME can be NULL and + LINE_NUMBER can be 0. */ + +GCC_METHOD5 (int /* bool */, build_constant, + gcc_type, /* Argument TYPE. */ + const char *, /* Argument NAME. */ + unsigned long, /* Argument VALUE. */ + const char *, /* Argument FILENAME. */ + unsigned int) /* Argument LINE_NUMBER. */ + +/* Emit an error and return an error type object. */ + +GCC_METHOD1 (gcc_type, error, + const char *) /* Argument MESSAGE. */ + +/* Return an integer type with the given properties. If BUILTIN_NAME + is non-NULL, it must name a builtin integral type with the given + signedness and size, and that is the type that will be returned. */ + +GCC_METHOD3 (gcc_type, int_type, + int /* bool */, /* Argument IS_UNSIGNED. */ + unsigned long, /* Argument SIZE_IN_BYTES. */ + const char *) /* Argument BUILTIN_NAME. */ + +/* Return the 'char' type, a distinct type from both 'signed char' and + 'unsigned char' returned by int_type. */ + +GCC_METHOD0 (gcc_type, char_type) + +/* Return a floating point type with the given properties. If BUILTIN_NAME + is non-NULL, it must name a builtin integral type with the given + signedness and size, and that is the type that will be returned. */ + +GCC_METHOD2 (gcc_type, float_type, + unsigned long, /* Argument SIZE_IN_BYTES. */ + const char *) /* Argument BUILTIN_NAME. */ + diff --git a/support/sdbinutils/include/gcc-c-interface.h b/support/sdbinutils/include/gcc-c-interface.h new file mode 100644 index 0000000..d14472a --- /dev/null +++ b/support/sdbinutils/include/gcc-c-interface.h @@ -0,0 +1,211 @@ +/* Interface between GCC C FE and GDB + + Copyright (C) 2014-2018 Free Software Foundation, Inc. + + This file is part of GCC. + + 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 GCC_C_INTERFACE_H +#define GCC_C_INTERFACE_H + +#include "gcc-interface.h" + +/* This header defines the interface to the GCC API. It must be both + valid C and valid C++, because it is included by both programs. */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declaration. */ + +struct gcc_c_context; + +/* + * Definitions and declarations for the C front end. + */ + +/* Defined versions of the C front-end API. */ + +enum gcc_c_api_version +{ + GCC_C_FE_VERSION_0 = 0, + + /* Added char_type. Added new version of int_type and float_type, + deprecated int_type_v0 and float_type_v0. */ + GCC_C_FE_VERSION_1 = 1 +}; + +/* Qualifiers. */ + +enum gcc_qualifiers +{ + GCC_QUALIFIER_CONST = 1, + GCC_QUALIFIER_VOLATILE = 2, + GCC_QUALIFIER_RESTRICT = 4 +}; + +/* This enumerates the kinds of decls that GDB can create. */ + +enum gcc_c_symbol_kind +{ + /* A function. */ + + GCC_C_SYMBOL_FUNCTION, + + /* A variable. */ + + GCC_C_SYMBOL_VARIABLE, + + /* A typedef. */ + + GCC_C_SYMBOL_TYPEDEF, + + /* A label. */ + + GCC_C_SYMBOL_LABEL +}; + +/* This enumerates the types of symbols that GCC might request from + GDB. */ + +enum gcc_c_oracle_request +{ + /* An ordinary symbol -- a variable, function, typedef, or enum + constant. */ + + GCC_C_ORACLE_SYMBOL, + + /* A struct, union, or enum tag. */ + + GCC_C_ORACLE_TAG, + + /* A label. */ + + GCC_C_ORACLE_LABEL +}; + +/* The type of the function called by GCC to ask GDB for a symbol's + definition. DATUM is an arbitrary value supplied when the oracle + function is registered. CONTEXT is the GCC context in which the + request is being made. REQUEST specifies what sort of symbol is + being requested, and IDENTIFIER is the name of the symbol. */ + +typedef void gcc_c_oracle_function (void *datum, + struct gcc_c_context *context, + enum gcc_c_oracle_request request, + const char *identifier); + +/* The type of the function called by GCC to ask GDB for a symbol's + address. This should return 0 if the address is not known. */ + +typedef gcc_address gcc_c_symbol_address_function (void *datum, + struct gcc_c_context *ctxt, + const char *identifier); + +/* The vtable used by the C front end. */ + +struct gcc_c_fe_vtable +{ + /* The version of the C interface. The value is one of the + gcc_c_api_version constants. */ + + unsigned int c_version; + + /* Set the callbacks for this context. + + The binding oracle is called whenever the C parser needs to look + up a symbol. This gives the caller a chance to lazily + instantiate symbols using other parts of the gcc_c_fe_interface + API. + + The address oracle is called whenever the C parser needs to look + up a symbol. This is only called for symbols not provided by the + symbol oracle -- that is, just built-in functions where GCC + provides the declaration. + + DATUM is an arbitrary piece of data that is passed back verbatim + to the callbacks in requests. */ + + void (*set_callbacks) (struct gcc_c_context *self, + gcc_c_oracle_function *binding_oracle, + gcc_c_symbol_address_function *address_oracle, + void *datum); + +#define GCC_METHOD0(R, N) \ + R (*N) (struct gcc_c_context *); +#define GCC_METHOD1(R, N, A) \ + R (*N) (struct gcc_c_context *, A); +#define GCC_METHOD2(R, N, A, B) \ + R (*N) (struct gcc_c_context *, A, B); +#define GCC_METHOD3(R, N, A, B, C) \ + R (*N) (struct gcc_c_context *, A, B, C); +#define GCC_METHOD4(R, N, A, B, C, D) \ + R (*N) (struct gcc_c_context *, A, B, C, D); +#define GCC_METHOD5(R, N, A, B, C, D, E) \ + R (*N) (struct gcc_c_context *, A, B, C, D, E); +#define GCC_METHOD7(R, N, A, B, C, D, E, F, G) \ + R (*N) (struct gcc_c_context *, A, B, C, D, E, F, G); + +#include "gcc-c-fe.def" + +#undef GCC_METHOD0 +#undef GCC_METHOD1 +#undef GCC_METHOD2 +#undef GCC_METHOD3 +#undef GCC_METHOD4 +#undef GCC_METHOD5 +#undef GCC_METHOD7 + +}; + +/* The C front end object. */ + +struct gcc_c_context +{ + /* Base class. */ + + struct gcc_base_context base; + + /* Our vtable. This is a separate field because this is simpler + than implementing a vtable inheritance scheme in C. */ + + const struct gcc_c_fe_vtable *c_ops; +}; + +/* The name of the .so that the compiler builds. We dlopen this + later. */ + +#define GCC_C_FE_LIBCC libcc1.so + +/* The compiler exports a single initialization function. This macro + holds its name as a symbol. */ + +#define GCC_C_FE_CONTEXT gcc_c_fe_context + +/* The type of the initialization function. The caller passes in the + desired base version and desired C-specific version. If the + request can be satisfied, a compatible gcc_context object will be + returned. Otherwise, the function returns NULL. */ + +typedef struct gcc_c_context *gcc_c_fe_context_function + (enum gcc_base_api_version, + enum gcc_c_api_version); + +#ifdef __cplusplus +} +#endif + +#endif /* GCC_C_INTERFACE_H */ diff --git a/support/sdbinutils/include/gcc-cp-fe.def b/support/sdbinutils/include/gcc-cp-fe.def new file mode 100644 index 0000000..dd564e5 --- /dev/null +++ b/support/sdbinutils/include/gcc-cp-fe.def @@ -0,0 +1,1050 @@ +/* Interface between GCC C++ FE and GDB -*- c -*- + + Copyright (C) 2014-2018 Free Software Foundation, Inc. + + This file is part of GCC. + + 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 . */ + + + +/* Push namespace NAME as the current binding level, to which + newly-introduced decls will be bound. An empty string identifies + the global namespace, whereas NULL identifies an anonymous + namespace. A namespace named NAME is created in the current scope, + if needed. + + If the newly-created namespace is to be an inline namespace, see + make_namespace_inline. */ + +GCC_METHOD1 (int /* bool */, push_namespace, + const char *) /* Argument NAME. */ + +/* Push TYPE as the current binding level, making its members visible + for name lookup. The current scope before the call must be the + scope in which the class was declared. This should be used if the + definition of a class is already finished, but one wishes to define + a nested class, or to enter the scope of one of its member + functions. */ + +GCC_METHOD1 (int /* bool */, push_class, + gcc_type) /* Argument TYPE. */ + +/* Push FUNCTION_DECL as the current (empty) binding level (see + reactivate_decl). The current enclosing scope before the call must + be the scope in which the function was declared. */ + +GCC_METHOD1 (int /* bool */, push_function, + gcc_decl) /* Argument FUNCTION_DECL. */ + +/* Make DECL visible (again?) within SCOPE. When SCOPE is NULL, it + means the current scope; if it is not NULL, it must name a function + that is currently active, even if not at the top of the binding + chain. + + This function can be used to make e.g. a global function or + variable visible in a namespace or local scope (overriding another + enclosing definition of the same name), but its most common + expected use of this primitive, that gives it its name, is to make + declarations visible again after reentering a function scope, + because when a function is entered with push_function, that does + NOT make any of the declarations nested in it visible for name + lookup. + + There is a reason/excuse for that: unlike namespaces and classes, + G++ doesn't ever have to reenter function scopes, so its name + resolution infrastructure is not prepared to do that. But wait, + there is also a good use for this apparent limitation: a function + may contain multiple scopes (blocks), and the name may be bound to + different symbols in each of these scopes. With this interface, as + we reenter a function scope, we may choose which symbols to make + visible for the code snippet, or, if there could be template + functions in local scopes, for unresolved names in nested template + class default arguments, or in nested template function signatures. + + As for making a local declaration visible for the code snippet, + there are two possibilities: a) introduce it upfront, while + entering the scope for the user expression (see the enter_scope + callback, called by g++ when encountering the push_user_expression + pragma), which might save some scope switching and reactivate_decl + (though this can't be helped if some declarations have to be + introduced and discarded, because of multiple definitions of the + same name in different scopes within a function: they have to be + defined in discriminator order); or b) introduce it when its name + is looked up, entering the scope, introducing the declaration, + leaving the scope, and then reactivating the declaration in its + local scope. + + Here's some more detail on how reactivate_decl works. Say there's + a function foo whose body looks like this: + + { + { +// point 1 + class c {} o __attribute__ ((__used__)); // c , o + } + struct c { + void f() { +// point 2 + } + } o __attribute__ ((__used__)); // c_0, o_0 + { + class c {} p __attribute__ ((__used__)); // c_1, p +// point 3 + o.f(); + } + } + + When we are about to define class c at point 1, we enter the + function foo scope, and since no symbols are visible at point 1, we + proceed to declare class c. We may then define the class right + away, or, if we leave the function scope, and we later wish to + define it, or to define object o, we can reenter the scope and just + use the previously-obtained gcc_decl to define the class, without + having to reactivate the declaration. + + Now, if we are to set up the binding context for point 2, we have + to define c_0::f, and in order to do so, we have to declare and + define c_0. Before we can declare c_0, we MUST at least declare c. + + As a general rule, before we can declare or define any local name + with a discriminator, we have to at least declare any other + occurrences of the same name in the same enclosing entity with + lower or absent discriminator. + + So, we declare c, then we leave the function scope and reenter it + so as to declare c_0 (also with name "c", which is why we have to + leave and reenter the function scope, otherwise we would get an + error because of the duplicate definition; g++ will assign a + discriminator because it still remembers there was an earlier + declaration of c_0 within the function, it's just no longer in + scope), then we can define c_0, including its member function f. + + Likewise, if we wish to define o_0, we have to define o first. If + we wish to declare (and maybe then define) c_1, we have to at least + declare (c and then) c_0 first. + + Then, as we set up the binding context to compile a code snippet at + point 3, we may choose to activate c_1, o_0 and p upfront, + declaring and discarding c, c_0 and o, and then reentering the + funciton scope to declare c_1, o_0 and p; or we can wait for oracle + lookups of c, o or p. If c is looked up, and the debugger resolves + c in the scope to c_1, it is expected to enter the function scope + from the top level, declare c, leave it, reenter it, declare c_0, + leave it, reenter it, declare c_1, leave it, and then reactivate + c_1 in the function scope. If c_1 is needed as a complete type, + the definition may be given right after the declaration, or the + scope will have to be reentered in order to define the class. + +. If the code snippet is at point 2, we don't need to (re)activate + any declaration: nothing from any local scope is visible. Just + entering the scope of the class containing member function f + reactivates the names of its members, including the class name + itself. */ + +GCC_METHOD2 (int /* bool */, reactivate_decl, + gcc_decl, /* Argument DECL. */ + gcc_decl) /* Argument SCOPE. */ + +/* Pop the namespace last entered with push_namespace, or class last + entered with push_class, or function last entered with + push_function, restoring the binding level in effect before the + matching push_* call. */ + +GCC_METHOD0 (int /* bool */, pop_binding_level) + +/* Return the NAMESPACE_DECL, TYPE_DECL or FUNCTION_DECL of the + binding level that would be popped by pop_scope. */ + +GCC_METHOD0 (gcc_decl, get_current_binding_level_decl) + +/* Make the current binding level an inline namespace. It must be a + namespace to begin with. It is safe to call this more than once + for the same namespace, but after the first call, subsequent ones + will not return a success status. */ + +GCC_METHOD0 (int /* bool */, make_namespace_inline) + +/* Add USED_NS to the namespaces used by the current binding level. + Use get_current_binding_level_decl to obtain USED_NS's + gcc_decl. */ + +GCC_METHOD1 (int /* bool */, add_using_namespace, + gcc_decl) /* Argument USED_NS. */ + +/* Introduce a namespace alias declaration, as in: + + namespace foo = [... ::] bar; + + After this call, namespace TARGET will be visible as ALIAS within + the current namespace. Get the declaration for TARGET by calling + get_current_binding_level_decl after pushing into it. */ + +GCC_METHOD2 (int /* bool */, add_namespace_alias, + const char *, /* Argument ALIAS. */ + gcc_decl) /* Argument TARGET. */ + +/* Introduce a using declaration, as in: + + using foo::bar; + + The TARGET decl names the qualifying scope (foo:: above) and the + identifier (bar), but that does not mean that only TARGET will be + brought into the current scope: all bindings of TARGET's identifier + in the qualifying scope will be brought in. + + FLAGS should specify GCC_CP_SYMBOL_USING. If the current scope is + a class scope, visibility flags must be supplied. + + Even when TARGET is template dependent, we don't need to specify + whether or not it is a typename: the supplied declaration (that + could be a template-dependent type converted to declaration by + get_type_decl) indicates so. */ + +GCC_METHOD2 (int /* bool */, add_using_decl, + enum gcc_cp_symbol_kind, /* Argument FLAGS. */ + gcc_decl) /* Argument TARGET. */ + +/* Create a new "decl" in GCC, and bind it in the current binding + level. A decl is a declaration, basically a kind of symbol. + + NAME is the name of the new symbol. SYM_KIND is the kind of + symbol being requested. SYM_TYPE is the new symbol's C++ type; + except for labels, where this is not meaningful and should be + zero. If SUBSTITUTION_NAME is not NULL, then a reference to this + decl in the source will later be substituted with a dereference + of a variable of the given name. Otherwise, for symbols having + an address (e.g., functions), ADDRESS is the address. FILENAME + and LINE_NUMBER refer to the symbol's source location. If this + is not known, FILENAME can be NULL and LINE_NUMBER can be 0. + This function returns the new decl. + + Use this function to register typedefs, functions and variables to + namespace and local binding levels, and typedefs, member functions + (static or not), and static data members to class binding levels. + Class members must have their access controls specified with + GCC_CP_ACCESS_* flags in SYM_KIND. + + Note that, since access controls are disabled, we have no means to + express private, protected and public. + + There are various flags that can be set in SYM_KIND to specify + additional semantics. Look for GCC_CP_FLAGs in the definition of + enum gcc_cp_symbol_kind in gcc-cp-interface.h. + + In order to define member functions, pass GCC_CP_SYMBOL_FUNCTION in + SYM_KIND, and a function_type for static member functions or a + method type for non-static member functions, including constructors + and destructors. Use build_function_type to create a function + type; for a method type, start by creating a function type without + any compiler-introduced artificial arguments (the implicit this + pointer, and the __in_chrg added to constructors and destructors, + and __vtt_parm added to the former), and then use build_method_type + to create the method type out of the class type and the function + type. + + For operator functions, set GCC_CP_FLAG_SPECIAL_FUNCTION in + SYM_KIND, in addition to any other applicable flags, and pass as + NAME a string starting with the two-character mangling for operator + name: "ps" for unary plus, "mL" for multiply and assign, *=; etc. + Use "cv" for type converstion operators (the target type portion + may be omitted, as it is taken from the return type in SYM_TYPE). + For operator"", use "li" followed by the identifier (the mangled + name mandates digits specifying the length of the identifier; if + present, they determine the end of the identifier, otherwise, the + identifier extents to the end of the string, so that "li3_Kme" and + "li_Km" are equivalent). + + Constructors and destructors need special care, because for each + constructor and destructor there may be multiple clones defined + internally by the compiler. With build_decl, you can introduce the + base declaration of a constructor or a destructor, setting + GCC_CP_FLAG_SPECIAL_FUNCTION the flag and using names starting with + capital "C" or "D", respectively, followed by a digit (see below), + a blank, or NUL ('\0'). DO NOT supply an ADDRESS or a + SUBSTITUTION_NAME to build_decl, it would be meaningless (and + rejected) for the base declaration; use define_cdtor_clone to + introduce the address of each clone. For constructor templates, + declare the template with build_decl, and then, for each + specialization, introduce it with + build_function_template_specialization, and then define the + addresses of each of its clones with define_cdtor_clone. + + NAMEs for GCC_CP_FLAG_SPECIAL_FUNCTION: + + NAME meaning + C? constructor base declaration (? may be 1, 2, 4, blank or NUL) + D? destructor base declaration (? may be 0, 1, 2, 4, blank or NUL) + nw operator new + na operator new[] + dl operator delete + da operator delete[] + ps operator + (unary) + ng operator - (unary) + ad operator & (unary) + de operator * (unary) + co operator ~ + pl operator + + mi operator - + ml operator * + dv operator / + rm operator % + an operator & + or operator | + eo operator ^ + aS operator = + pL operator += + mI operator -= + mL operator *= + dV operator /= + rM operator %= + aN operator &= + oR operator |= + eO operator ^= + ls operator << + rs operator >> + lS operator <<= + rS operator >>= + eq operator == + ne operator != + lt operator < + gt operator > + le operator <= + ge operator >= + nt operator ! + aa operator && + oo operator || + pp operator ++ + mm operator -- + cm operator , + pm operator ->* + pt operator -> + cl operator () + ix operator [] + qu operator ? + cv operator (conversion operator) + li operator "" + + FIXME: How about attributes? */ + +GCC_METHOD7 (gcc_decl, build_decl, + const char *, /* Argument NAME. */ + enum gcc_cp_symbol_kind, /* Argument SYM_KIND. */ + gcc_type, /* Argument SYM_TYPE. */ + const char *, /* Argument SUBSTITUTION_NAME. */ + gcc_address, /* Argument ADDRESS. */ + const char *, /* Argument FILENAME. */ + unsigned int) /* Argument LINE_NUMBER. */ + +/* Supply the ADDRESS of one of the multiple clones of constructor or + destructor CDTOR. The clone is specified by NAME, using the + following name mangling conventions: + + C1 in-charge constructor + C2 not-in-charge constructor + C4 unified constructor + D0 deleting destructor + D1 in-charge destructor + D2 not-in-charge destructor + D4 unified destructor + + The following information is not necessary to use the API. + + C1 initializes an instance of the class (rather than of derived + classes), including virtual base classes, whereas C2 initializes a + sub-object (of the given class type) of an instance of some derived + class (or a full object that doesn't have any virtual base + classes). + + D0 and D1 destruct an instance of the class, including virtual base + classes, but only the former calls operator delete to release the + object's storage at the end; D2 destructs a sub-object (of the + given class type) of an instance of a derived class (or a full + object that doesn't have any virtual base classes). + + The [CD]4 manglings (and symbol definitions) are non-standard, but + GCC uses them in some cases: rather than assuming they are + in-charge or not-in-charge, they test the implicit argument that + the others ignore to tell how to behave. These are used instead of + cloning when we just can't use aliases. */ + +GCC_METHOD3 (gcc_decl, define_cdtor_clone, + const char *, /* Argument NAME. */ + gcc_decl, /* Argument CDTOR. */ + gcc_address) /* Argument ADDRESS. */ + +/* Return the type associated with the given declaration. This is + most useful to obtain the type associated with a forward-declared + class, because it is the gcc_type, rather than the gcc_decl, that + has to be used to build other types, but build_decl returns a + gcc_decl rather than a gcc_type. This call can in theory be used + to obtain the type from any other declaration; it is supposed to + return the same type that was supplied when the declaration was + created. */ + +GCC_METHOD1 (gcc_type, get_decl_type, + gcc_decl) /* Argument DECL. */ + +/* Return the declaration for a type. */ + +GCC_METHOD1 (gcc_decl, get_type_decl, + gcc_type) /* Argument TYPE. */ + +/* Declare DECL as a friend of the current class scope, if TYPE is + NULL, or of TYPE itself otherwise. DECL may be a function or a + class, be they template generics, template specializations or not + templates. TYPE must be a class type (not a template generic). + + The add_friend call cannot introduce a declaration; even if the + friend is first declared as a friend in the source code, the + declaration belongs in the enclosing namespace, so it must be + introduced in that namespace, and the resulting declaration can + then be made a friend. + + DECL cannot, however, be a member of a template class generic, + because we have no means to introduce their declarations. This + interface has no notion of definitions for template generics. As a + consequence, users of this interface must introduce each friend + template member specialization separately, i.e., instead of: + + template friend struct X::M; + + they must be declared as if they were: + + friend struct X::M; + friend struct X::M; + ... for each specialization of X. + + + Specializations of a template can have each others' members as + friends: + + template class foo { + int f(); + template friend int foo::f(); + }; + + It wouldn't always be possible to define all specializations of a + template class before introducing the friend declarations in their + expanded, per-specialization form. + + In order to simplify such friend declarations, and to enable + incremental friend declarations as template specializations are + introduced, add_friend can be called after the befriending class is + fully defined, passing it a non-NULL TYPE argument naming the + befriending class type. */ + +GCC_METHOD2 (int /* bool */, add_friend, + gcc_decl, /* Argument DECL. */ + gcc_type) /* Argument TYPE. */ + +/* Return the type of a pointer to a given base type. */ + +GCC_METHOD1 (gcc_type, build_pointer_type, + gcc_type) /* Argument BASE_TYPE. */ + +/* Return the type of a reference to a given base type. */ + +GCC_METHOD2 (gcc_type, build_reference_type, + gcc_type, /* Argument BASE_TYPE. */ + enum gcc_cp_ref_qualifiers) /* Argument RQUALS. */ + +/* Create a new pointer-to-member type. MEMBER_TYPE is the data + member type, while CLASS_TYPE is the class type containing the data + member. For pointers to member functions, MEMBER_TYPE must be a + method type, and CLASS_TYPE must be specified even though it might + be possible to extract it from the method type. */ + +GCC_METHOD2 (gcc_type, build_pointer_to_member_type, + gcc_type, /* Argument CLASS_TYPE. */ + gcc_type) /* Argument MEMBER_TYPE. */ + +/* Start a template parameter list scope and enters it, so that + subsequent build_type_template_parameter and + build_value_template_parameter calls create template parameters in + the list. The list is closed by a build_decl call with + GCC_CP_SYMBOL_FUNCTION or GCC_CP_SYMBOL_CLASS, that, when the scope + is a template parameter list, declares a template function or a + template class with the then-closed parameter list. The scope in + which the new declaration is to be introduced by build_decl must be + entered before calling start_template_decl, and build_decl returns + to that scope, from the template parameter list scope, before + introducing the declaration. */ + +GCC_METHOD0 (int /* bool */, start_template_decl) + +/* Build a typename template-parameter (e.g., the T in template + ). Either PACK_P should be nonzero, to indicate an + argument pack (the last argument in a variadic template argument + list, as in template ), or DEFAULT_TYPE may be + non-NULL to set the default type argument (e.g. X) for the template + parameter. FILENAME and LINE_NUMBER may specify the source + location in which the template parameter was declared. */ + +GCC_METHOD5 (gcc_type, build_type_template_parameter, + const char *, /* Argument ID. */ + int /* bool */, /* Argument PACK_P. */ + gcc_type, /* Argument DEFAULT_TYPE. */ + const char *, /* Argument FILENAME. */ + unsigned int) /* Argument LINE_NUMBER. */ + +/* Build a template template-parameter (e.g., the T in template +