aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--COPYING.LIBGLOSS237
-rw-r--r--COPYING.NEWLIB319
-rw-r--r--ChangeLog55
-rw-r--r--Makefile.def3
-rw-r--r--Makefile.in3159
-rw-r--r--Makefile.tpl16
-rw-r--r--bfd/ChangeLog855
-rw-r--r--bfd/Makefile.am55
-rw-r--r--bfd/Makefile.in55
-rw-r--r--bfd/archive.c34
-rw-r--r--bfd/archive64.c30
-rw-r--r--bfd/archures.c8
-rw-r--r--bfd/bfd-in.h30
-rw-r--r--bfd/bfd-in2.h90
-rw-r--r--bfd/bfd.c51
-rw-r--r--bfd/coff-arm.c2
-rw-r--r--bfd/coff-maxq.c83
-rw-r--r--bfd/coff-ppc.c2
-rw-r--r--bfd/coff-stgo32.c4
-rw-r--r--bfd/coff-x86_64.c768
-rw-r--r--bfd/coffcode.h53
-rw-r--r--bfd/cofflink.c16
-rw-r--r--bfd/config.bfd63
-rwxr-xr-xbfd/configure7
-rw-r--r--bfd/configure.in7
-rw-r--r--bfd/cpu-arm.c18
-rw-r--r--bfd/cpu-i960.c28
-rw-r--r--bfd/cpu-score.c51
-rw-r--r--bfd/cpu-spu.c54
-rw-r--r--bfd/dwarf2.c43
-rw-r--r--bfd/ecoff.c2
-rw-r--r--bfd/elf-bfd.h54
-rw-r--r--bfd/elf-eh-frame.c102
-rw-r--r--bfd/elf-m10300.c80
-rw-r--r--bfd/elf.c314
-rw-r--r--bfd/elf32-arm.c465
-rw-r--r--bfd/elf32-avr.c44
-rw-r--r--bfd/elf32-bfin.c52
-rw-r--r--bfd/elf32-cr16c.c51
-rw-r--r--bfd/elf32-cris.c87
-rw-r--r--bfd/elf32-crx.c46
-rw-r--r--bfd/elf32-d10v.c51
-rw-r--r--bfd/elf32-fr30.c66
-rw-r--r--bfd/elf32-frv.c63
-rw-r--r--bfd/elf32-h8300.c45
-rw-r--r--bfd/elf32-hppa.c64
-rw-r--r--bfd/elf32-i370.c21
-rw-r--r--bfd/elf32-i386.c63
-rw-r--r--bfd/elf32-ip2k.c51
-rw-r--r--bfd/elf32-iq2000.c65
-rw-r--r--bfd/elf32-m32c.c62
-rw-r--r--bfd/elf32-m32r.c42
-rw-r--r--bfd/elf32-m68hc11.c14
-rw-r--r--bfd/elf32-m68hc12.c15
-rw-r--r--bfd/elf32-m68hc1x.c42
-rw-r--r--bfd/elf32-m68hc1x.h10
-rw-r--r--bfd/elf32-m68k.c85
-rw-r--r--bfd/elf32-mcore.c52
-rw-r--r--bfd/elf32-mips.c16
-rw-r--r--bfd/elf32-msp430.c47
-rw-r--r--bfd/elf32-mt.c55
-rw-r--r--bfd/elf32-openrisc.c51
-rw-r--r--bfd/elf32-ppc.c93
-rw-r--r--bfd/elf32-s390.c82
-rw-r--r--bfd/elf32-score.c3836
-rw-r--r--bfd/elf32-sh-symbian.c12
-rw-r--r--bfd/elf32-sh.c61
-rw-r--r--bfd/elf32-sh64.c8
-rw-r--r--bfd/elf32-sparc.c1
-rw-r--r--bfd/elf32-spu.c1749
-rw-r--r--bfd/elf32-spu.h51
-rw-r--r--bfd/elf32-v850.c92
-rw-r--r--bfd/elf32-vax.c66
-rw-r--r--bfd/elf32-xstormy16.c61
-rw-r--r--bfd/elf32-xtensa.c141
-rw-r--r--bfd/elf64-alpha.c14
-rw-r--r--bfd/elf64-hppa.c30
-rw-r--r--bfd/elf64-mips.c31
-rw-r--r--bfd/elf64-mmix.c65
-rw-r--r--bfd/elf64-ppc.c321
-rw-r--r--bfd/elf64-s390.c85
-rw-r--r--bfd/elf64-sh64.c68
-rw-r--r--bfd/elf64-sparc.c32
-rw-r--r--bfd/elf64-x86-64.c86
-rw-r--r--bfd/elfcode.h5
-rw-r--r--bfd/elflink.c238
-rw-r--r--bfd/elfn32-mips.c31
-rw-r--r--bfd/elfxx-ia64.c43
-rw-r--r--bfd/elfxx-mips.c415
-rw-r--r--bfd/elfxx-sparc.c60
-rw-r--r--bfd/elfxx-target.h7
-rw-r--r--bfd/hpux-core.c2
-rw-r--r--bfd/i386linux.c9
-rw-r--r--bfd/ieee.c4
-rw-r--r--bfd/libbfd-in.h8
-rw-r--r--bfd/libbfd.h31
-rw-r--r--bfd/libpei.h42
-rw-r--r--bfd/linker.c77
-rw-r--r--bfd/m68klinux.c9
-rw-r--r--bfd/merge.c2
-rw-r--r--bfd/mmo.c4
-rw-r--r--bfd/nlmcode.h24
-rw-r--r--bfd/osf-core.c2
-rw-r--r--bfd/pe-arm-wince.c26
-rw-r--r--bfd/pe-i386.c6
-rw-r--r--bfd/pe-x86_64.c53
-rw-r--r--bfd/peXXigen.c141
-rw-r--r--bfd/pef.c2
-rw-r--r--bfd/pei-arm-wince.c26
-rw-r--r--bfd/pei-i386.c6
-rw-r--r--bfd/pei-x86_64.c54
-rw-r--r--bfd/peicode.h43
-rw-r--r--bfd/po/BLD-POTFILES.in1
-rw-r--r--bfd/po/SRC-POTFILES.in9
-rw-r--r--bfd/reloc.c131
-rw-r--r--bfd/section.c4
-rw-r--r--bfd/som.c6
-rw-r--r--bfd/sparclinux.c39
-rw-r--r--bfd/stabs.c14
-rw-r--r--bfd/targets.c24
-rw-r--r--bfd/version.h2
-rw-r--r--bfd/vms-hdr.c10
-rwxr-xr-xconfig.guess11
-rwxr-xr-xconfig.sub16
-rw-r--r--config/ChangeLog34
-rw-r--r--config/multi.m465
-rw-r--r--config/tls.m45
-rwxr-xr-xconfigure330
-rw-r--r--configure.in64
-rw-r--r--gdb/ChangeLog545
-rw-r--r--gdb/ChangeLog-20041
-rw-r--r--gdb/Makefile.in55
-rw-r--r--gdb/NEWS7
-rw-r--r--gdb/ada-lex.l62
-rw-r--r--gdb/arch-utils.c136
-rw-r--r--gdb/arch-utils.h13
-rw-r--r--gdb/arm-tdep.c3
-rw-r--r--gdb/blockframe.c11
-rw-r--r--gdb/breakpoint.c19
-rw-r--r--gdb/cli/cli-cmds.c5
-rw-r--r--gdb/cli/cli-cmds.h6
-rw-r--r--gdb/cli/cli-decode.c93
-rw-r--r--gdb/cli/cli-setshow.c7
-rw-r--r--gdb/command.h2
-rw-r--r--gdb/config/xtensa/xtensa.mt2
-rw-r--r--gdb/configure.host3
-rw-r--r--gdb/configure.tgt3
-rw-r--r--gdb/defs.h2
-rw-r--r--gdb/doc/ChangeLog117
-rw-r--r--gdb/doc/gdb.texinfo626
-rw-r--r--gdb/doc/gdbint.texinfo315
-rw-r--r--gdb/doc/stabs.texinfo71
-rw-r--r--gdb/dwarf2loc.c93
-rw-r--r--gdb/dwarf2read.c56
-rw-r--r--gdb/eval.c15
-rw-r--r--gdb/exceptions.h3
-rw-r--r--gdb/exec.c2
-rw-r--r--gdb/expprint.c25
-rw-r--r--gdb/expression.h8
-rw-r--r--gdb/fork-child.c2
-rw-r--r--gdb/frame.c136
-rw-r--r--gdb/frame.h48
-rw-r--r--gdb/gcore.c41
-rw-r--r--gdb/gdb_expat.h35
-rw-r--r--gdb/gdbarch.c10
-rw-r--r--gdb/gdbarch.h3
-rwxr-xr-xgdb/gdbarch.sh13
-rw-r--r--gdb/gdbcmd.h4
-rw-r--r--gdb/gdbserver/ChangeLog44
-rw-r--r--gdb/gdbserver/acinclude.m420
-rw-r--r--gdb/gdbserver/config.in3
-rwxr-xr-xgdb/gdbserver/configure4576
-rw-r--r--gdb/gdbserver/configure.ac5
-rw-r--r--gdb/gdbserver/configure.srv4
-rw-r--r--gdb/gdbserver/inferiors.c16
-rw-r--r--gdb/gdbserver/linux-low.c57
-rw-r--r--gdb/gdbserver/linux-low.h14
-rw-r--r--gdb/gdbserver/linux-s390-low.c18
-rw-r--r--gdb/gdbserver/remote-utils.c54
-rw-r--r--gdb/gdbserver/server.c63
-rw-r--r--gdb/gdbserver/server.h2
-rw-r--r--gdb/gdbserver/target.h9
-rw-r--r--gdb/gdbserver/thread-db.c28
-rw-r--r--gdb/infcall.c3
-rw-r--r--gdb/infcmd.c13
-rw-r--r--gdb/inferior.h2
-rw-r--r--gdb/infrun.c25
-rw-r--r--gdb/interps.c4
-rw-r--r--gdb/linux-fork.c9
-rw-r--r--gdb/linux-nat.c1
-rw-r--r--gdb/linux-thread-db.c7
-rw-r--r--gdb/m32c-tdep.c6
-rw-r--r--gdb/m68k-tdep.c6
-rw-r--r--gdb/memattr.c307
-rw-r--r--gdb/memattr.h31
-rw-r--r--gdb/memory-map.c274
-rw-r--r--gdb/memory-map.h34
-rw-r--r--gdb/mi/mi-cmd-stack.c4
-rw-r--r--gdb/minsyms.c4
-rw-r--r--gdb/monitor.c2
-rw-r--r--gdb/p-valprint.c2
-rw-r--r--gdb/parse.c36
-rw-r--r--gdb/parser-defs.h2
-rw-r--r--gdb/ppc-linux-tdep.c16
-rw-r--r--gdb/printcmd.c5
-rw-r--r--gdb/remote-sds.c7
-rw-r--r--gdb/remote-sim.c22
-rw-r--r--gdb/remote.c552
-rw-r--r--gdb/ser-mingw.c52
-rw-r--r--gdb/serial.c5
-rw-r--r--gdb/solib-svr4.c77
-rw-r--r--gdb/solib.c36
-rw-r--r--gdb/somread.c15
-rw-r--r--gdb/sparc-tdep.c2
-rw-r--r--gdb/stack.c26
-rw-r--r--gdb/symfile.c125
-rw-r--r--gdb/symtab.c65
-rw-r--r--gdb/symtab.h2
-rw-r--r--gdb/target-memory.c437
-rw-r--r--gdb/target.c246
-rw-r--r--gdb/target.h129
-rw-r--r--gdb/testsuite/ChangeLog126
-rw-r--r--gdb/testsuite/config/abug.exp20
-rw-r--r--gdb/testsuite/config/cpu32bug.exp20
-rw-r--r--gdb/testsuite/config/est.exp20
-rw-r--r--gdb/testsuite/config/hmsirom.exp (renamed from gdb/testsuite/gdb.threads/tls-nodebug.exp)38
-rw-r--r--gdb/testsuite/config/nind.exp46
-rw-r--r--gdb/testsuite/gdb.ada/array_return/p.adb17
-rw-r--r--gdb/testsuite/gdb.ada/array_return/pck.adb17
-rw-r--r--gdb/testsuite/gdb.ada/array_return/pck.ads17
-rw-r--r--gdb/testsuite/gdb.ada/arrayidx.exp18
-rw-r--r--gdb/testsuite/gdb.ada/exec_changed/first.adb17
-rw-r--r--gdb/testsuite/gdb.ada/exec_changed/second.adb17
-rw-r--r--gdb/testsuite/gdb.ada/watch_arg.exp61
-rw-r--r--gdb/testsuite/gdb.ada/watch_arg/watch.adb31
-rw-r--r--gdb/testsuite/gdb.base/annota1.exp3
-rw-r--r--gdb/testsuite/gdb.base/args.c2
-rw-r--r--gdb/testsuite/gdb.base/args.exp77
-rw-r--r--gdb/testsuite/gdb.base/completion.exp4
-rw-r--r--gdb/testsuite/gdb.base/constvars.c4
-rw-r--r--gdb/testsuite/gdb.base/help.exp166
-rw-r--r--gdb/testsuite/gdb.base/maint.exp27
-rw-r--r--gdb/testsuite/gdb.base/multi-forks.exp13
-rw-r--r--gdb/testsuite/gdb.base/sepdebug.exp33
-rw-r--r--gdb/testsuite/gdb.base/sepsymtab.c23
-rw-r--r--gdb/testsuite/gdb.base/sepsymtab.exp53
-rw-r--r--gdb/testsuite/gdb.base/subst.exp149
-rw-r--r--gdb/testsuite/gdb.cp/call-c-1.c21
-rw-r--r--gdb/testsuite/gdb.cp/call-c.cc29
-rw-r--r--gdb/testsuite/gdb.cp/call-c.exp47
-rw-r--r--gdb/testsuite/gdb.cp/maint.exp14
-rw-r--r--gdb/testsuite/gdb.mi/mi-basics.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-file.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-stack.exp8
-rw-r--r--gdb/testsuite/gdb.mi/mi2-basics.exp2
-rw-r--r--gdb/testsuite/gdb.stabs/weird.exp5
-rw-r--r--gdb/testsuite/gdb.threads/manythreads.c9
-rw-r--r--gdb/testsuite/gdb.threads/manythreads.exp4
-rw-r--r--gdb/testsuite/gdb.threads/tls-nodebug.c10
-rw-r--r--gdb/testsuite/gdb.trace/tracecmd.exp106
-rw-r--r--gdb/testsuite/lib/gdb.exp115
-rw-r--r--gdb/testsuite/lib/gdbserver-support.exp17
-rw-r--r--gdb/tui/tui-source.c8
-rw-r--r--gdb/utils.c250
-rw-r--r--gdb/valops.c11
-rw-r--r--gdb/vec.c120
-rw-r--r--gdb/vec.h1000
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/xml-support.c145
-rw-r--r--gdb/xml-support.h45
-rw-r--r--gdb/xtensa-config.c563
-rw-r--r--gdb/xtensa-tdep.c1739
-rw-r--r--gdb/xtensa-tdep.h298
-rw-r--r--include/ChangeLog31
-rw-r--r--include/bfdlink.h18
-rw-r--r--include/coff/ChangeLog20
-rw-r--r--include/coff/external.h18
-rw-r--r--include/coff/internal.h37
-rw-r--r--include/coff/pe.h16
-rw-r--r--include/coff/x86_64.h54
-rw-r--r--include/dis-asm.h89
-rw-r--r--include/elf/ChangeLog25
-rw-r--r--include/elf/arm.h13
-rw-r--r--include/elf/common.h2
-rw-r--r--include/elf/mips.h3
-rw-r--r--include/elf/score.h123
-rw-r--r--include/elf/spu.h57
-rw-r--r--include/opcode/ChangeLog652
-rw-r--r--include/opcode/arm.h3
-rw-r--r--include/opcode/i386.h114
-rw-r--r--include/opcode/ppc.h2
-rw-r--r--include/opcode/score-datadep.h282
-rw-r--r--include/opcode/score-inst.h507
-rw-r--r--include/opcode/spu-insns.h410
-rw-r--r--include/opcode/spu.h126
-rw-r--r--intl/ChangeLog16
-rw-r--r--intl/Makefile.in4
-rw-r--r--intl/dgettext.c5
-rw-r--r--intl/dngettext.c5
-rw-r--r--libiberty/ChangeLog64
-rw-r--r--libiberty/Makefile.in8
-rw-r--r--libiberty/bcopy.c4
-rwxr-xr-xlibiberty/configure202
-rw-r--r--libiberty/configure.ac49
-rw-r--r--libiberty/cp-demangle.c2
-rw-r--r--libiberty/floatformat.c109
-rw-r--r--libiberty/pex-win32.c25
-rw-r--r--libiberty/pexecute.txh2
-rw-r--r--libiberty/testsuite/Makefile.in2
-rw-r--r--libiberty/testsuite/demangle-expected5
-rw-r--r--opcodes/ChangeLog169
-rw-r--r--opcodes/Makefile.am560
-rw-r--r--opcodes/Makefile.in560
-rw-r--r--opcodes/arm-dis.c215
-rwxr-xr-xopcodes/configure9
-rw-r--r--opcodes/configure.in4
-rw-r--r--opcodes/cris-dis.c10
-rw-r--r--opcodes/disassemble.c17
-rw-r--r--opcodes/h8300-dis.c10
-rw-r--r--opcodes/i386-dis.c297
-rw-r--r--opcodes/ia64-gen.c48
-rw-r--r--opcodes/mips-dis.c2
-rw-r--r--opcodes/po/POTFILES.in4
-rw-r--r--opcodes/ppc-dis.c4
-rw-r--r--opcodes/ppc-opc.c282
-rw-r--r--opcodes/score-dis.c504
-rw-r--r--opcodes/score-opc.h487
-rw-r--r--opcodes/sh-dis.c4
-rw-r--r--opcodes/spu-dis.c260
-rw-r--r--opcodes/spu-opc.c44
-rw-r--r--readline/ChangeLog.gdb10
-rw-r--r--readline/Makefile.in1
-rw-r--r--readline/callback.c1
-rw-r--r--readline/terminal.c4
-rw-r--r--sim/ChangeLog34
-rw-r--r--sim/MAINTAINERS1
-rw-r--r--sim/common/ChangeLog22
-rw-r--r--sim/common/gentmap.c1
-rw-r--r--sim/common/sim-base.h4
-rw-r--r--sim/common/sim-fpu.c4
-rw-r--r--sim/common/sim-profile.c3
-rw-r--r--sim/cris/config.in108
-rwxr-xr-xsim/cris/configure4
-rw-r--r--sim/cris/configure.ac2
-rw-r--r--sim/cris/cris-sim.h3
-rw-r--r--sim/cris/sim-if.c30
-rw-r--r--sim/cris/traps.c331
-rw-r--r--sim/mips/ChangeLog25
-rw-r--r--sim/mips/Makefile.in11
-rw-r--r--sim/mips/configure.ac4
-rw-r--r--sim/mips/dsp.igen4
-rw-r--r--sim/mips/m16e.igen264
-rw-r--r--sim/mips/mips.igen6
-rw-r--r--sim/mips/sim-main.h1
-rw-r--r--sim/mips/smartmips.igen123
-rw-r--r--sim/testsuite/ChangeLog30
-rw-r--r--sim/testsuite/sim/cris/asm/option3.ms7
-rw-r--r--sim/testsuite/sim/cris/asm/option4.ms7
-rw-r--r--sim/testsuite/sim/cris/c/clone5.c5
-rw-r--r--sim/testsuite/sim/cris/c/clone6.c8
-rw-r--r--sim/testsuite/sim/cris/c/fcntl1.c7
-rw-r--r--sim/testsuite/sim/cris/c/fcntl2.c8
-rw-r--r--sim/testsuite/sim/cris/c/mprotect1.c5
-rw-r--r--sim/testsuite/sim/cris/c/mprotect2.c8
-rw-r--r--sim/testsuite/sim/cris/c/pipe2.c35
-rw-r--r--sim/testsuite/sim/cris/c/readlink11.c9
-rw-r--r--sim/testsuite/sim/cris/c/readlink2.c11
-rw-r--r--sim/testsuite/sim/cris/c/rtsigprocmask1.c10
-rw-r--r--sim/testsuite/sim/cris/c/rtsigprocmask2.c9
-rw-r--r--sim/testsuite/sim/cris/c/rtsigsuspend1.c5
-rw-r--r--sim/testsuite/sim/cris/c/rtsigsuspend2.c8
-rw-r--r--sim/testsuite/sim/cris/c/sig13.c8
-rw-r--r--sim/testsuite/sim/cris/c/sig7.c7
-rw-r--r--sim/testsuite/sim/cris/c/sigreturn1.c5
-rw-r--r--sim/testsuite/sim/cris/c/sigreturn2.c7
-rw-r--r--sim/testsuite/sim/cris/c/sigreturn3.c8
-rw-r--r--sim/testsuite/sim/cris/c/sigreturn4.c9
-rw-r--r--sim/testsuite/sim/cris/c/syscall1.c5
-rw-r--r--sim/testsuite/sim/cris/c/syscall2.c7
-rw-r--r--sim/testsuite/sim/cris/c/syscall3.c9
-rw-r--r--sim/testsuite/sim/cris/c/syscall4.c9
-rw-r--r--sim/testsuite/sim/cris/c/syscall5.c9
-rw-r--r--sim/testsuite/sim/cris/c/syscall6.c9
-rw-r--r--sim/testsuite/sim/cris/c/syscall7.c8
-rw-r--r--sim/testsuite/sim/cris/c/syscall8.c8
-rw-r--r--sim/testsuite/sim/cris/c/sysctl2.c5
-rw-r--r--sim/testsuite/sim/cris/c/sysctl3.c8
-rw-r--r--sim/testsuite/sim/mips/ChangeLog10
-rw-r--r--sim/testsuite/sim/mips/basic.exp26
-rw-r--r--sim/testsuite/sim/mips/testutils.inc2
390 files changed, 8515 insertions, 32697 deletions
diff --git a/COPYING.LIBGLOSS b/COPYING.LIBGLOSS
index 896b84b..d6f99e5 100644
--- a/COPYING.LIBGLOSS
+++ b/COPYING.LIBGLOSS
@@ -1,50 +1,101 @@
The libgloss subdirectory is a collection of software from several sources.
+Each have their own copyrights embedded in each file that they concern.
-Each file may have its own copyright/license that is embedded in the source
-file. Unless otherwise noted in the body of the source file(s), the following copyright
-notices will apply to the contents of the libgloss subdirectory:
+(1) University of California, Berkeley
-(1) Red Hat Incorporated
+[1a]
-Copyright (c) 1994-2006 Red Hat, Inc. All rights reserved.
+Copyright (c) 1990 The Regents of the University of California.
+All rights reserved.
-This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute
-it subject to the terms and conditions of the BSD License. This program is distributed in the hope that
-it will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the implied warranties
-of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. A copy of this license is
-available at http://www.opensource.org/licenses. Any Red Hat trademarks that are incorporated in
-the source code or documentation are not subject to the BSD License and may only be used or
-replicated with the express permission of Red Hat, Inc.
+Redistribution and use in source and binary forms are permitted
+provided that the above copyright notice and this paragraph are
+duplicated in all such forms and that any documentation,
+and other materials related to such distribution and use
+acknowledge that the software was developed
+by the University of California, Berkeley. The name of the
+University may not be used to endorse or promote products derived
+from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-(2) University of California, Berkeley
+[1b]
-Copyright (c) 1981-2000 The Regents of the University of California.
+Copyright (c) 1991, 2000 The Regents of the University of California.
All rights reserved.
-Redistribution and use in source and binary forms, with or without modification, are permitted provided
-that the following conditions are met:
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+[1c]
+
+Copyright (c) 1991, 1998, 2001 The Regents of the University of California.
+All rights reserved.
- * Redistributions of source code must retain the above copyright notice, this list of
- conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of
- conditions and the following disclaimer in the documentation and/or other materials
- provided with the distribution.
- * Neither the name of the University nor the names of its contributors may be used to
- endorse or promote products derived from this software without specific prior
- written permission.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. [rescinded 22 July 1999]
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
-OF SUCH DAMAGE.
-
-(3) DJ Delorie
+-------------------------------------------------------------
+ Please note that in some of the above alternate licenses, there is a
+ statement regarding that acknowledgement must be made in any
+ advertising materials for products using the code. This restriction
+ no longer applies due to the following license change:
+
+ ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
+
+ In some cases the defunct clause has been removed in modified newlib code and
+ in some cases, the clause has been left as-is.
+-------------------------------------------------------------
+
+(2) DJ Delorie
Copyright (C) 1993 DJ Delorie
All rights reserved.
@@ -56,7 +107,7 @@ duplicated in all such forms.
This file is distributed WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-(4) GPL (fr30 directory only)
+(3) GPL (fr30 directory only)
Copyright (C) 1998 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
@@ -78,7 +129,7 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
-(5) Advanced Micro Devices
+(4) Advanced Micro Devices
Copyright 1989, 1990 Advanced Micro Devices, Inc.
@@ -104,7 +155,7 @@ Mail Stop 573
Austin, TX 78741
800-292-9263
-(6) Array Technology Corporation and MIPS (mips/lsi33k-stub.h)
+(5) Array Technology Corporation and MIPS (mips/lsi33k-stub.h)
COPYRIGHT (C) 1991, 1992 ARRAY TECHNOLOGY CORPORATION
All Rights Reserved
@@ -115,8 +166,9 @@ disclosure is subject to the terms of a separate license agreement.
Copyright 1985 by MIPS Computer Systems, Inc.
-(7) University of Utah and the Computer Systems Laboratory (CSL)
- [applies only to hppa*-*-pro* targets]
+(6) University of Utah and the Computer Systems Laboratory (CSL)
+ [applies only to hppa*-*-pro* targets]
+
Copyright (c) 1990,1994 The University of Utah and
the Computer Systems Laboratory (CSL). All rights reserved.
@@ -135,22 +187,22 @@ ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
CSL requests users of this software to return to csl-dist@cs.utah.edu any
improvements that they make and grant CSL redistribution rights.
-(8) Sun Microsystems
+(7) Sun Microsystems
Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
Developed at SunPro, a Sun Microsystems, Inc. business.
Permission to use, copy, modify, and distribute this
-software is freely granted, provided that this notice is preserved.
+software is freely granted, provided that this notice
+is preserved.
-(9) Hewlett Packard
+(8) Hewlett Packard
(c) Copyright 1986 HEWLETT-PACKARD COMPANY
To anyone who acknowledges that this file is provided "AS IS"
without any express or implied warranty:
-
-permission to use, copy, modify, and distribute this file
+ permission to use, copy, modify, and distribute this file
for any purpose is hereby granted without fee, provided that
the above copyright notice and this notice appears in all
copies, and that the name of Hewlett-Packard Company not be
@@ -159,7 +211,7 @@ of the software without specific, written prior permission.
Hewlett-Packard Company makes no representations about the
suitability of this software for any purpose.
-(10) Hans-Peter Nilsson
+(9) Hans-Peter Nilsson
Copyright (C) 2001 Hans-Peter Nilsson
@@ -172,33 +224,74 @@ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.
-(11) IBM Corp. spu processor (only spu-* targets)
+(10) No Copyright
+
+THIS SOFTWARE IS NOT COPYRIGHTED
-(C) Copyright IBM Corp. 2005, 2006
+(11) Cygnus Support / Cygnus Solutions
+Copyright (c) 1995, 1996, 1997, 1998, 1999 Cygnus Support
+
+The authors hereby grant permission to use, copy, modify, distribute,
+and license this software and its documentation for any purpose, provided
+that existing copyright notices are retained in all copies and that this
+notice is included verbatim in any distributions. No written agreement,
+license, or royalty fee is required for any of the authorized uses.
+Modifications to this software may be copyrighted by their authors
+and need not follow the licensing terms described here, provided that
+the new terms are clearly indicated on the first page of each file where
+they apply.
+
+---------------------------------------------------------------
+ Please note that the copyright above may be used with the name
+ Cygnus Solutions instead of Cygnus Support. Both names should
+ be considered interchangeable. These copyrights are now owned
+ by Red Hat Incorporated.
+---------------------------------------------------------------
+
+(12) Red Hat Incorporated
+
+Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+
+The authors hereby grant permission to use, copy, modify, distribute,
+and license this software and its documentation for any purpose, provided
+that existing copyright notices are retained in all copies and that this
+notice is included verbatim in any distributions. No written agreement,
+license, or royalty fee is required for any of the authorized uses.
+Modifications to this software may be copyrighted by their authors
+and need not follow the licensing terms described here, provided that
+the new terms are clearly indicated on the first page of each file where
+they apply.
+
+(13) Default copyright
+
+Unless otherwise stated in each remaining libgloss file, the remaining
+files in the libgloss subdirectory are governed by the following copyright.
+
+Copyright (c) 1994, 1997, 2001, 2002 Red Hat Incorporated.
All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
- * Neither the name of IBM nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ The name of Red Hat Incorporated may not be used to endorse
+ or promote products derived from this software without specific
+ prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL RED HAT INCORPORATED BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/COPYING.NEWLIB b/COPYING.NEWLIB
index 36920a0..141ca01 100644
--- a/COPYING.NEWLIB
+++ b/COPYING.NEWLIB
@@ -1,50 +1,197 @@
The newlib subdirectory is a collection of software from several sources.
-
Each file may have its own copyright/license that is embedded in the source
-file. Unless otherwise noted in the body of the source file(s), the following copyright
-notices will apply to the contents of the newlib subdirectory:
+file.
-(1) Red Hat Incorporated
+This list documents those licenses which are more restrictive than
+a BSD-like license or require the copyright notice
+to be duplicated in documentation and/or other materials associated with
+the distribution. Certain licenses documented here only apply to
+specific targets. Certain clauses only apply if you are building the
+code as part of your binary.
-Copyright (c) 1994-2006 Red Hat, Inc. All rights reserved.
+Note that this list may omit certain licenses that
+only pertain to the copying/modifying of the individual source code.
+If you are distributing the source code, then you do not need to
+worry about these omitted licenses, so long as you do not modify the
+copyright information already in place.
-This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute
-it subject to the terms and conditions of the BSD License. This program is distributed in the hope that
-it will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the implied warranties
-of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. A copy of this license is
-available at http://www.opensource.org/licenses. Any Red Hat trademarks that are incorporated in
-the source code or documentation are not subject to the BSD License and may only be used or
-replicated with the express permission of Red Hat, Inc.
+(1) University of California, Berkeley
-(2) University of California, Berkeley
+[1a]
-Copyright (c) 1981-2000 The Regents of the University of California.
+Copyright (c) 1990 The Regents of the University of California.
All rights reserved.
-Redistribution and use in source and binary forms, with or without modification, are permitted provided
-that the following conditions are met:
+Redistribution and use in source and binary forms are permitted
+provided that the above copyright notice and this paragraph are
+duplicated in all such forms and that any documentation,
+and other materials related to such distribution and use
+acknowledge that the software was developed
+by the University of California, Berkeley. The name of the
+University may not be used to endorse or promote products derived
+from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+[1b]
- * Redistributions of source code must retain the above copyright notice, this list of
- conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of
- conditions and the following disclaimer in the documentation and/or other materials
- provided with the distribution.
- * Neither the name of the University nor the names of its contributors may be used to
- endorse or promote products derived from this software without specific prior
- written permission.
+Copyright (c) 1990 The Regents of the University of California.
+All rights reserved.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
-OF SUCH DAMAGE.
-
-(3) David M. Gay (AT&T 1991, Lucent 1998)
+Redistribution and use in source and binary forms are permitted
+provided that the above copyright notice and this paragraph are
+duplicated in all such forms and that any documentation,
+advertising materials, and other materials related to such
+distribution and use acknowledge that the software was developed
+by the University of California, Berkeley. The name of the
+University may not be used to endorse or promote products derived
+from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+[1c]
+
+Copyright (c) 1981, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
+The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+[1d]
+
+Copyright (c) 1988, 1990, 1993 Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+[1e]
+
+Copyright (c) 1982, 1986, 1989, 1991, 1993, 1994
+The Regents of the University of California. All rights reserved.
+(c) UNIX System Laboratories, Inc.
+All or some portions of this file are derived from material licensed
+to the University of California by American Telephone and Telegraph
+Co. or Unix System Laboratories, Inc. and are reproduced herein with
+the permission of UNIX System Laboratories, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+[1f]
+
+Copyright (c) 1987, 1988, 2000 Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms are permitted
+provided that: (1) source distributions retain this entire copyright
+notice and comment, and (2) distributions including binaries display
+the following acknowledgement: ``This product includes software
+developed by the University of California, Berkeley and its contributors''
+in the documentation or other materials provided with the distribution
+and in all advertising materials mentioning features or use of this
+software. Neither the name of the University nor the names of its
+contributors may be used to endorse or promote products derived
+from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+-------------------------------------------------------------
+ Please note that in some of the above alternate licenses, there is a
+ statement regarding that acknowledgement must be made in any
+ advertising materials for products using the code. This restriction
+ no longer applies due to the following license change:
+
+ ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
+
+ In some cases the defunct clause has been removed in modified newlib code and
+ in some cases, the clause has been left as-is.
+-------------------------------------------------------------
+
+(2) Cygwin (cygwin targets only)
+
+Copyright 2001 Red Hat, Inc.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details.
+
+(3) David M. Gay at AT&T
The author of this software is David M. Gay.
@@ -61,33 +208,6 @@ WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY
REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
--------------------------------------------------------------------
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998-2001 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-
(4) Advanced Micro Devices
Copyright 1989, 1990 Advanced Micro Devices, Inc.
@@ -133,7 +253,8 @@ Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
Developed at SunPro, a Sun Microsystems, Inc. business.
Permission to use, copy, modify, and distribute this
-software is freely granted, provided that this notice is preserved.
+software is freely granted, provided that this notice
+is preserved.
(8) Hewlett Packard
@@ -214,7 +335,8 @@ provided this notice is not removed or altered. All other rights are
reserved by SuperH.
SUPERH MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO
-THIS SOFTWARE. IN NO EVENT SHALL SUPERH BE LIABLE FOR INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH OR ARISING FROM
+THIS SOFTWARE. IN NO EVENT SHALL SUPERH BE LIABLE FOR INDIRECT, SPECIAL,
+INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH OR ARISING FROM
THE FURNISHING, PERFORMANCE, OR USE OF THIS SOFTWARE.
So that all may benefit from your experience, please report any problems
@@ -229,7 +351,7 @@ USA
(13) Royal Institute of Technology
-Copyright (c) 1999 Kungliga Tekniska Högskolan
+Copyright (c) 1999 Kungliga Tekniska Högskolan
(Royal Institute of Technology, Stockholm, Sweden).
All rights reserved.
@@ -408,7 +530,8 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-(20) DJ Delorie (i386)
+(20) DJ Delorie (i386)
+
Copyright (C) 1991 DJ Delorie
All rights reserved.
@@ -421,7 +544,8 @@ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(21) Free Software Foundation LGPL License (*-linux* targets only)
- Copyright (C) 1990-1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1990-1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997.
@@ -448,7 +572,8 @@ 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
of the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+
+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.
@@ -573,7 +698,7 @@ SUCH DAMAGE.
iconv (Charset Conversion Library) v2.0
-(28) Artem Bityuckiy (--enable-newlib-iconv)
+(27) Artem Bityuckiy (--enable-newlib-iconv)
Copyright (c) 2003, Artem B. Bityuckiy, SoftMine Corporation.
Rights transferred to Franklin Electronic Publishers.
@@ -599,37 +724,37 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-(29) IBM, Sony, Toshiba (only spu-* targets)
+(28) Red Hat Incorporated
- (C) Copyright 2001,2006,
- International Business Machines Corporation,
- Sony Computer Entertainment, Incorporated,
- Toshiba Corporation,
+Unless otherwise stated in each remaining newlib file, the remaining
+files in the newlib subdirectory default to the following copyright.
+It should be noted that Red Hat Incorporated now owns copyrights
+belonging to Cygnus Solutions and Cygnus Support.
- All rights reserved.
+Copyright (c) 1994, 1997, 2001, 2002, 2003, 2004, 2005 Red Hat Incorporated.
+All rights reserved.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the names of the copyright holders nor the names of their
- contributors may be used to endorse or promote products derived from this
- software without specific prior written permission.
+ Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
+ Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ The name of Red Hat Incorporated may not be used to endorse
+ or promote products derived from this software without specific
+ prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL RED HAT INCORPORATED BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/ChangeLog b/ChangeLog
index 07e0770..ab436ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,58 +1,3 @@
-2006-11-14 DJ Delorie <dj@redhat.com>
-
- * Makefile.tpl (clean-stage*): Sync with GCC (clean).
- * Makefile.in: Sync with GCC.
- * configure.in: Sync with GCC (mpfr, gmp).
- * configure: Sync with GCC.
-
-2006-11-08 Jie Zhang <jie.zhang@analog.com>
-
- * configure.in: Remove target-libgloss from noconfigdirs for
- bfin-*-*.
- * configure: Regenerated.
-
-2006-10-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * COPYING.NEWLIB: Add spu license.
- * COPYING.LIBGLOSS: Ditto.
-
-2006-10-17 Brooks Moses <bmoses@stanford.edu>
-
- * Makefile.def: Added pdf target handling.
- * Makefile.tpl: Added pdf target handling.
- * Makefile.in: Regenerated.
-
-2006-10-11 Jeff Johnston <jjohnstn@redhat.com>
-
- * COPYING.NEWLIB: Updated.
- * COPYING.LIBGLOSS: Ditto.
-
-2006-09-27 Dave Brolley <brolley@redhat.com>
-
- * configure.in (RUNTEST): Look for 'runtest' in the source tree by using
- $s instead of $r.
- * configure: Regenerated.
-
-2006-09-26 Ben Elliston <bje@au.ibm.com>
-
- * config.sub, config.guess: Update from upstream sources.
-
-2006-09-20 Thiemo Seufer <ths@mips.com>
-
- * configure.in: Remove redundant handling of mips*-dec-bsd*. Likewise
- for mipstx39-*-*. Disable libgloss for mips64*-*-linux*.
- * configure: Regenerate.
-
-2006-08-30 Corinna Vinschen <corinna@vinschen.de>
-
- * configure.in: Never build newlib for a Mingw host.
- Never build newlib as Mingw target library.
- Test the existence of winsup/cygwin for building a Cygwin newlib,
- rather than just winsup.
- Add winsup/mingw and winsup/w32api paths to FLAGS_FOR_TARGET if
- building a Mingw target.
- * configure: Regenerate.
-
2006-08-15 Thiemo Seufer <ths@mips.com>
Nigel Stephens <nigel@mips.com>
David Ung <davidu@mips.com>
diff --git a/Makefile.def b/Makefile.def
index 9b5fc5a..e365d8a 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -54,7 +54,6 @@ host_modules= { module= find; };
host_modules= { module= fixincludes;
missing= info;
missing= dvi;
- missing= pdf;
missing= TAGS;
missing= install-info;
missing= installcheck; };
@@ -148,8 +147,6 @@ recursive_targets = { make_target= info;
depend=configure; };
recursive_targets = { make_target= dvi;
depend=configure; };
-recursive_targets = { make_target= pdf;
- depend=configure; };
recursive_targets = { make_target= html;
depend=configure; };
recursive_targets = { make_target= TAGS;
diff --git a/Makefile.in b/Makefile.in
index f95803c..85c4013 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -997,109 +997,6 @@ dvi-target: maybe-dvi-target-rda
dvi-target: maybe-dvi-target-libada
dvi-target: maybe-dvi-target-libgomp
-.PHONY: do-pdf
-do-pdf:
- @: $(MAKE); $(unstage)
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) pdf-host \
- pdf-target
-
-
-.PHONY: pdf-host
-
-pdf-host: maybe-pdf-ash
-pdf-host: maybe-pdf-autoconf
-pdf-host: maybe-pdf-automake
-pdf-host: maybe-pdf-bash
-pdf-host: maybe-pdf-bfd
-pdf-host: maybe-pdf-opcodes
-pdf-host: maybe-pdf-binutils
-pdf-host: maybe-pdf-bison
-pdf-host: maybe-pdf-byacc
-pdf-host: maybe-pdf-bzip2
-pdf-host: maybe-pdf-dejagnu
-pdf-host: maybe-pdf-diff
-pdf-host: maybe-pdf-dosutils
-pdf-host: maybe-pdf-etc
-pdf-host: maybe-pdf-fastjar
-pdf-host: maybe-pdf-fileutils
-pdf-host: maybe-pdf-findutils
-pdf-host: maybe-pdf-find
-pdf-host: maybe-pdf-fixincludes
-pdf-host: maybe-pdf-flex
-pdf-host: maybe-pdf-gas
-pdf-host: maybe-pdf-gcc
-pdf-host: maybe-pdf-gawk
-pdf-host: maybe-pdf-gettext
-pdf-host: maybe-pdf-gnuserv
-pdf-host: maybe-pdf-gprof
-pdf-host: maybe-pdf-gzip
-pdf-host: maybe-pdf-hello
-pdf-host: maybe-pdf-indent
-pdf-host: maybe-pdf-intl
-pdf-host: maybe-pdf-tcl
-pdf-host: maybe-pdf-itcl
-pdf-host: maybe-pdf-ld
-pdf-host: maybe-pdf-libcpp
-pdf-host: maybe-pdf-libdecnumber
-pdf-host: maybe-pdf-libgui
-pdf-host: maybe-pdf-libiberty
-pdf-host: maybe-pdf-libtool
-pdf-host: maybe-pdf-m4
-pdf-host: maybe-pdf-make
-pdf-host: maybe-pdf-mmalloc
-pdf-host: maybe-pdf-patch
-pdf-host: maybe-pdf-perl
-pdf-host: maybe-pdf-prms
-pdf-host: maybe-pdf-rcs
-pdf-host: maybe-pdf-readline
-pdf-host: maybe-pdf-release
-pdf-host: maybe-pdf-recode
-pdf-host: maybe-pdf-sed
-pdf-host: maybe-pdf-send-pr
-pdf-host: maybe-pdf-shellutils
-pdf-host: maybe-pdf-sid
-pdf-host: maybe-pdf-sim
-pdf-host: maybe-pdf-tar
-pdf-host: maybe-pdf-texinfo
-pdf-host: maybe-pdf-textutils
-pdf-host: maybe-pdf-time
-pdf-host: maybe-pdf-uudecode
-pdf-host: maybe-pdf-wdiff
-pdf-host: maybe-pdf-zip
-pdf-host: maybe-pdf-zlib
-pdf-host: maybe-pdf-gdb
-pdf-host: maybe-pdf-expect
-pdf-host: maybe-pdf-guile
-pdf-host: maybe-pdf-tk
-pdf-host: maybe-pdf-libtermcap
-pdf-host: maybe-pdf-utils
-pdf-host: maybe-pdf-gnattools
-
-.PHONY: pdf-target
-
-pdf-target: maybe-pdf-target-libstdc++-v3
-pdf-target: maybe-pdf-target-libmudflap
-pdf-target: maybe-pdf-target-libssp
-pdf-target: maybe-pdf-target-newlib
-pdf-target: maybe-pdf-target-libgfortran
-pdf-target: maybe-pdf-target-libobjc
-pdf-target: maybe-pdf-target-libtermcap
-pdf-target: maybe-pdf-target-winsup
-pdf-target: maybe-pdf-target-libgloss
-pdf-target: maybe-pdf-target-libiberty
-pdf-target: maybe-pdf-target-gperf
-pdf-target: maybe-pdf-target-examples
-pdf-target: maybe-pdf-target-libffi
-pdf-target: maybe-pdf-target-libjava
-pdf-target: maybe-pdf-target-zlib
-pdf-target: maybe-pdf-target-boehm-gc
-pdf-target: maybe-pdf-target-qthreads
-pdf-target: maybe-pdf-target-rda
-pdf-target: maybe-pdf-target-libada
-pdf-target: maybe-pdf-target-libgomp
-
.PHONY: do-html
do-html:
@: $(MAKE); $(unstage)
@@ -2030,13 +1927,12 @@ maintainer-clean-target: maybe-maintainer-clean-target-libgomp
# Here are the targets which correspond to the do-X targets.
-.PHONY: info installcheck dvi pdf html install-info install-html
+.PHONY: info installcheck dvi html install-info install-html
.PHONY: clean distclean mostlyclean maintainer-clean realclean
.PHONY: local-clean local-distclean local-maintainer-clean
info: do-info
installcheck: do-installcheck
dvi: do-dvi
-pdf: do-pdf
html: do-html
# Make sure makeinfo is built before we do a `make info', if we're
@@ -2915,7 +2811,7 @@ install-ash: installdirs
@endif ash
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-ash info-ash
maybe-info-ash:
@@ -2969,32 +2865,6 @@ dvi-ash: \
@endif ash
-.PHONY: maybe-pdf-ash pdf-ash
-maybe-pdf-ash:
-@if ash
-maybe-pdf-ash: pdf-ash
-
-pdf-ash: \
- configure-ash
- @: $(MAKE); $(unstage)
- @[ -f ./ash/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in ash" ; \
- (cd $(HOST_SUBDIR)/ash && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif ash
-
.PHONY: maybe-html-ash html-ash
maybe-html-ash:
@if ash
@@ -3311,7 +3181,7 @@ install-autoconf: installdirs
@endif autoconf
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-autoconf info-autoconf
maybe-info-autoconf:
@@ -3365,32 +3235,6 @@ dvi-autoconf: \
@endif autoconf
-.PHONY: maybe-pdf-autoconf pdf-autoconf
-maybe-pdf-autoconf:
-@if autoconf
-maybe-pdf-autoconf: pdf-autoconf
-
-pdf-autoconf: \
- configure-autoconf
- @: $(MAKE); $(unstage)
- @[ -f ./autoconf/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in autoconf" ; \
- (cd $(HOST_SUBDIR)/autoconf && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif autoconf
-
.PHONY: maybe-html-autoconf html-autoconf
maybe-html-autoconf:
@if autoconf
@@ -3707,7 +3551,7 @@ install-automake: installdirs
@endif automake
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-automake info-automake
maybe-info-automake:
@@ -3761,32 +3605,6 @@ dvi-automake: \
@endif automake
-.PHONY: maybe-pdf-automake pdf-automake
-maybe-pdf-automake:
-@if automake
-maybe-pdf-automake: pdf-automake
-
-pdf-automake: \
- configure-automake
- @: $(MAKE); $(unstage)
- @[ -f ./automake/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in automake" ; \
- (cd $(HOST_SUBDIR)/automake && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif automake
-
.PHONY: maybe-html-automake html-automake
maybe-html-automake:
@if automake
@@ -4103,7 +3921,7 @@ install-bash: installdirs
@endif bash
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-bash info-bash
maybe-info-bash:
@@ -4157,32 +3975,6 @@ dvi-bash: \
@endif bash
-.PHONY: maybe-pdf-bash pdf-bash
-maybe-pdf-bash:
-@if bash
-maybe-pdf-bash: pdf-bash
-
-pdf-bash: \
- configure-bash
- @: $(MAKE); $(unstage)
- @[ -f ./bash/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in bash" ; \
- (cd $(HOST_SUBDIR)/bash && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif bash
-
.PHONY: maybe-html-bash html-bash
maybe-html-bash:
@if bash
@@ -4470,7 +4262,7 @@ configure-stage1-bfd:
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) $${srcdiroption} \
\
- --disable-intermodule --enable-checking --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif bfd-bootstrap
.PHONY: configure-stage2-bfd maybe-configure-stage2-bfd
@@ -4655,12 +4447,9 @@ all-stage1-bfd: configure-stage1-bfd
maybe-clean-stage1-bfd: clean-stage1-bfd
clean-stage1: clean-stage1-bfd
clean-stage1-bfd:
- @if [ $(current_stage) = stage1 ]; then \
- [ -f $(HOST_SUBDIR)/bfd/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage1-bfd/Makefile ] || exit 0; \
- $(MAKE) stage1-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-bfd/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
@@ -4688,12 +4477,9 @@ all-stage2-bfd: configure-stage2-bfd
maybe-clean-stage2-bfd: clean-stage2-bfd
clean-stage2: clean-stage2-bfd
clean-stage2-bfd:
- @if [ $(current_stage) = stage2 ]; then \
- [ -f $(HOST_SUBDIR)/bfd/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage2-bfd/Makefile ] || exit 0; \
- $(MAKE) stage2-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-bfd/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -4722,12 +4508,9 @@ all-stage3-bfd: configure-stage3-bfd
maybe-clean-stage3-bfd: clean-stage3-bfd
clean-stage3: clean-stage3-bfd
clean-stage3-bfd:
- @if [ $(current_stage) = stage3 ]; then \
- [ -f $(HOST_SUBDIR)/bfd/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage3-bfd/Makefile ] || exit 0; \
- $(MAKE) stage3-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-bfd/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -4756,12 +4539,9 @@ all-stage4-bfd: configure-stage4-bfd
maybe-clean-stage4-bfd: clean-stage4-bfd
clean-stage4: clean-stage4-bfd
clean-stage4-bfd:
- @if [ $(current_stage) = stage4 ]; then \
- [ -f $(HOST_SUBDIR)/bfd/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage4-bfd/Makefile ] || exit 0; \
- $(MAKE) stage4-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-bfd/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -4790,12 +4570,9 @@ all-stageprofile-bfd: configure-stageprofile-bfd
maybe-clean-stageprofile-bfd: clean-stageprofile-bfd
clean-stageprofile: clean-stageprofile-bfd
clean-stageprofile-bfd:
- @if [ $(current_stage) = stageprofile ]; then \
- [ -f $(HOST_SUBDIR)/bfd/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stageprofile-bfd/Makefile ] || exit 0; \
- $(MAKE) stageprofile-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-bfd/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -4824,12 +4601,9 @@ all-stagefeedback-bfd: configure-stagefeedback-bfd
maybe-clean-stagefeedback-bfd: clean-stagefeedback-bfd
clean-stagefeedback: clean-stagefeedback-bfd
clean-stagefeedback-bfd:
- @if [ $(current_stage) = stagefeedback ]; then \
- [ -f $(HOST_SUBDIR)/bfd/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stagefeedback-bfd/Makefile ] || exit 0; \
- $(MAKE) stagefeedback-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-bfd/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -4870,7 +4644,7 @@ install-bfd: installdirs
@endif bfd
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-bfd info-bfd
maybe-info-bfd:
@@ -4922,31 +4696,6 @@ dvi-bfd: \
@endif bfd
-.PHONY: maybe-pdf-bfd pdf-bfd
-maybe-pdf-bfd:
-@if bfd
-maybe-pdf-bfd: pdf-bfd
-
-pdf-bfd: \
- configure-bfd
- @[ -f ./bfd/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in bfd" ; \
- (cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif bfd
-
.PHONY: maybe-html-bfd html-bfd
maybe-html-bfd:
@if bfd
@@ -5225,7 +4974,7 @@ configure-stage1-opcodes:
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) $${srcdiroption} \
\
- --disable-intermodule --enable-checking --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif opcodes-bootstrap
.PHONY: configure-stage2-opcodes maybe-configure-stage2-opcodes
@@ -5410,12 +5159,9 @@ all-stage1-opcodes: configure-stage1-opcodes
maybe-clean-stage1-opcodes: clean-stage1-opcodes
clean-stage1: clean-stage1-opcodes
clean-stage1-opcodes:
- @if [ $(current_stage) = stage1 ]; then \
- [ -f $(HOST_SUBDIR)/opcodes/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage1-opcodes/Makefile ] || exit 0; \
- $(MAKE) stage1-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-opcodes/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
@@ -5443,12 +5189,9 @@ all-stage2-opcodes: configure-stage2-opcodes
maybe-clean-stage2-opcodes: clean-stage2-opcodes
clean-stage2: clean-stage2-opcodes
clean-stage2-opcodes:
- @if [ $(current_stage) = stage2 ]; then \
- [ -f $(HOST_SUBDIR)/opcodes/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage2-opcodes/Makefile ] || exit 0; \
- $(MAKE) stage2-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-opcodes/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -5477,12 +5220,9 @@ all-stage3-opcodes: configure-stage3-opcodes
maybe-clean-stage3-opcodes: clean-stage3-opcodes
clean-stage3: clean-stage3-opcodes
clean-stage3-opcodes:
- @if [ $(current_stage) = stage3 ]; then \
- [ -f $(HOST_SUBDIR)/opcodes/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage3-opcodes/Makefile ] || exit 0; \
- $(MAKE) stage3-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-opcodes/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -5511,12 +5251,9 @@ all-stage4-opcodes: configure-stage4-opcodes
maybe-clean-stage4-opcodes: clean-stage4-opcodes
clean-stage4: clean-stage4-opcodes
clean-stage4-opcodes:
- @if [ $(current_stage) = stage4 ]; then \
- [ -f $(HOST_SUBDIR)/opcodes/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage4-opcodes/Makefile ] || exit 0; \
- $(MAKE) stage4-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-opcodes/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -5545,12 +5282,9 @@ all-stageprofile-opcodes: configure-stageprofile-opcodes
maybe-clean-stageprofile-opcodes: clean-stageprofile-opcodes
clean-stageprofile: clean-stageprofile-opcodes
clean-stageprofile-opcodes:
- @if [ $(current_stage) = stageprofile ]; then \
- [ -f $(HOST_SUBDIR)/opcodes/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stageprofile-opcodes/Makefile ] || exit 0; \
- $(MAKE) stageprofile-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-opcodes/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -5579,12 +5313,9 @@ all-stagefeedback-opcodes: configure-stagefeedback-opcodes
maybe-clean-stagefeedback-opcodes: clean-stagefeedback-opcodes
clean-stagefeedback: clean-stagefeedback-opcodes
clean-stagefeedback-opcodes:
- @if [ $(current_stage) = stagefeedback ]; then \
- [ -f $(HOST_SUBDIR)/opcodes/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stagefeedback-opcodes/Makefile ] || exit 0; \
- $(MAKE) stagefeedback-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-opcodes/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -5625,7 +5356,7 @@ install-opcodes: installdirs
@endif opcodes
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-opcodes info-opcodes
maybe-info-opcodes:
@@ -5677,31 +5408,6 @@ dvi-opcodes: \
@endif opcodes
-.PHONY: maybe-pdf-opcodes pdf-opcodes
-maybe-pdf-opcodes:
-@if opcodes
-maybe-pdf-opcodes: pdf-opcodes
-
-pdf-opcodes: \
- configure-opcodes
- @[ -f ./opcodes/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in opcodes" ; \
- (cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif opcodes
-
.PHONY: maybe-html-opcodes html-opcodes
maybe-html-opcodes:
@if opcodes
@@ -5980,7 +5686,7 @@ configure-stage1-binutils:
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) $${srcdiroption} \
\
- --disable-intermodule --enable-checking --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif binutils-bootstrap
.PHONY: configure-stage2-binutils maybe-configure-stage2-binutils
@@ -6165,12 +5871,9 @@ all-stage1-binutils: configure-stage1-binutils
maybe-clean-stage1-binutils: clean-stage1-binutils
clean-stage1: clean-stage1-binutils
clean-stage1-binutils:
- @if [ $(current_stage) = stage1 ]; then \
- [ -f $(HOST_SUBDIR)/binutils/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage1-binutils/Makefile ] || exit 0; \
- $(MAKE) stage1-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-binutils/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
@@ -6198,12 +5901,9 @@ all-stage2-binutils: configure-stage2-binutils
maybe-clean-stage2-binutils: clean-stage2-binutils
clean-stage2: clean-stage2-binutils
clean-stage2-binutils:
- @if [ $(current_stage) = stage2 ]; then \
- [ -f $(HOST_SUBDIR)/binutils/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage2-binutils/Makefile ] || exit 0; \
- $(MAKE) stage2-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-binutils/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -6232,12 +5932,9 @@ all-stage3-binutils: configure-stage3-binutils
maybe-clean-stage3-binutils: clean-stage3-binutils
clean-stage3: clean-stage3-binutils
clean-stage3-binutils:
- @if [ $(current_stage) = stage3 ]; then \
- [ -f $(HOST_SUBDIR)/binutils/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage3-binutils/Makefile ] || exit 0; \
- $(MAKE) stage3-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-binutils/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -6266,12 +5963,9 @@ all-stage4-binutils: configure-stage4-binutils
maybe-clean-stage4-binutils: clean-stage4-binutils
clean-stage4: clean-stage4-binutils
clean-stage4-binutils:
- @if [ $(current_stage) = stage4 ]; then \
- [ -f $(HOST_SUBDIR)/binutils/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage4-binutils/Makefile ] || exit 0; \
- $(MAKE) stage4-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-binutils/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -6300,12 +5994,9 @@ all-stageprofile-binutils: configure-stageprofile-binutils
maybe-clean-stageprofile-binutils: clean-stageprofile-binutils
clean-stageprofile: clean-stageprofile-binutils
clean-stageprofile-binutils:
- @if [ $(current_stage) = stageprofile ]; then \
- [ -f $(HOST_SUBDIR)/binutils/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stageprofile-binutils/Makefile ] || exit 0; \
- $(MAKE) stageprofile-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-binutils/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -6334,12 +6025,9 @@ all-stagefeedback-binutils: configure-stagefeedback-binutils
maybe-clean-stagefeedback-binutils: clean-stagefeedback-binutils
clean-stagefeedback: clean-stagefeedback-binutils
clean-stagefeedback-binutils:
- @if [ $(current_stage) = stagefeedback ]; then \
- [ -f $(HOST_SUBDIR)/binutils/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stagefeedback-binutils/Makefile ] || exit 0; \
- $(MAKE) stagefeedback-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-binutils/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -6380,7 +6068,7 @@ install-binutils: installdirs
@endif binutils
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-binutils info-binutils
maybe-info-binutils:
@@ -6432,31 +6120,6 @@ dvi-binutils: \
@endif binutils
-.PHONY: maybe-pdf-binutils pdf-binutils
-maybe-pdf-binutils:
-@if binutils
-maybe-pdf-binutils: pdf-binutils
-
-pdf-binutils: \
- configure-binutils
- @[ -f ./binutils/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in binutils" ; \
- (cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif binutils
-
.PHONY: maybe-html-binutils html-binutils
maybe-html-binutils:
@if binutils
@@ -6767,7 +6430,7 @@ install-bison: installdirs
@endif bison
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-bison info-bison
maybe-info-bison:
@@ -6821,32 +6484,6 @@ dvi-bison: \
@endif bison
-.PHONY: maybe-pdf-bison pdf-bison
-maybe-pdf-bison:
-@if bison
-maybe-pdf-bison: pdf-bison
-
-pdf-bison: \
- configure-bison
- @: $(MAKE); $(unstage)
- @[ -f ./bison/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in bison" ; \
- (cd $(HOST_SUBDIR)/bison && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif bison
-
.PHONY: maybe-html-bison html-bison
maybe-html-bison:
@if bison
@@ -7166,7 +6803,7 @@ install-byacc: installdirs
@endif byacc
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-byacc info-byacc
maybe-info-byacc:
@@ -7220,32 +6857,6 @@ dvi-byacc: \
@endif byacc
-.PHONY: maybe-pdf-byacc pdf-byacc
-maybe-pdf-byacc:
-@if byacc
-maybe-pdf-byacc: pdf-byacc
-
-pdf-byacc: \
- configure-byacc
- @: $(MAKE); $(unstage)
- @[ -f ./byacc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in byacc" ; \
- (cd $(HOST_SUBDIR)/byacc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif byacc
-
.PHONY: maybe-html-byacc html-byacc
maybe-html-byacc:
@if byacc
@@ -7562,7 +7173,7 @@ install-bzip2: installdirs
@endif bzip2
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-bzip2 info-bzip2
maybe-info-bzip2:
@@ -7616,32 +7227,6 @@ dvi-bzip2: \
@endif bzip2
-.PHONY: maybe-pdf-bzip2 pdf-bzip2
-maybe-pdf-bzip2:
-@if bzip2
-maybe-pdf-bzip2: pdf-bzip2
-
-pdf-bzip2: \
- configure-bzip2
- @: $(MAKE); $(unstage)
- @[ -f ./bzip2/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in bzip2" ; \
- (cd $(HOST_SUBDIR)/bzip2 && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif bzip2
-
.PHONY: maybe-html-bzip2 html-bzip2
maybe-html-bzip2:
@if bzip2
@@ -7958,7 +7543,7 @@ install-dejagnu: installdirs
@endif dejagnu
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-dejagnu info-dejagnu
maybe-info-dejagnu:
@@ -8012,32 +7597,6 @@ dvi-dejagnu: \
@endif dejagnu
-.PHONY: maybe-pdf-dejagnu pdf-dejagnu
-maybe-pdf-dejagnu:
-@if dejagnu
-maybe-pdf-dejagnu: pdf-dejagnu
-
-pdf-dejagnu: \
- configure-dejagnu
- @: $(MAKE); $(unstage)
- @[ -f ./dejagnu/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in dejagnu" ; \
- (cd $(HOST_SUBDIR)/dejagnu && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif dejagnu
-
.PHONY: maybe-html-dejagnu html-dejagnu
maybe-html-dejagnu:
@if dejagnu
@@ -8354,7 +7913,7 @@ install-diff: installdirs
@endif diff
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-diff info-diff
maybe-info-diff:
@@ -8408,32 +7967,6 @@ dvi-diff: \
@endif diff
-.PHONY: maybe-pdf-diff pdf-diff
-maybe-pdf-diff:
-@if diff
-maybe-pdf-diff: pdf-diff
-
-pdf-diff: \
- configure-diff
- @: $(MAKE); $(unstage)
- @[ -f ./diff/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in diff" ; \
- (cd $(HOST_SUBDIR)/diff && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif diff
-
.PHONY: maybe-html-diff html-diff
maybe-html-diff:
@if diff
@@ -8744,7 +8277,7 @@ install-dosutils: installdirs
@endif dosutils
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-dosutils info-dosutils
maybe-info-dosutils:
@@ -8798,32 +8331,6 @@ dvi-dosutils: \
@endif dosutils
-.PHONY: maybe-pdf-dosutils pdf-dosutils
-maybe-pdf-dosutils:
-@if dosutils
-maybe-pdf-dosutils: pdf-dosutils
-
-pdf-dosutils: \
- configure-dosutils
- @: $(MAKE); $(unstage)
- @[ -f ./dosutils/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in dosutils" ; \
- (cd $(HOST_SUBDIR)/dosutils && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif dosutils
-
.PHONY: maybe-html-dosutils html-dosutils
maybe-html-dosutils:
@if dosutils
@@ -9140,7 +8647,7 @@ install-etc: installdirs
@endif etc
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-etc info-etc
maybe-info-etc:
@@ -9194,32 +8701,6 @@ dvi-etc: \
@endif etc
-.PHONY: maybe-pdf-etc pdf-etc
-maybe-pdf-etc:
-@if etc
-maybe-pdf-etc: pdf-etc
-
-pdf-etc: \
- configure-etc
- @: $(MAKE); $(unstage)
- @[ -f ./etc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in etc" ; \
- (cd $(HOST_SUBDIR)/etc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif etc
-
.PHONY: maybe-html-etc html-etc
maybe-html-etc:
@if etc
@@ -9539,7 +9020,7 @@ install-fastjar: installdirs
@endif fastjar
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-fastjar info-fastjar
maybe-info-fastjar:
@@ -9593,32 +9074,6 @@ dvi-fastjar: \
@endif fastjar
-.PHONY: maybe-pdf-fastjar pdf-fastjar
-maybe-pdf-fastjar:
-@if fastjar
-maybe-pdf-fastjar: pdf-fastjar
-
-pdf-fastjar: \
- configure-fastjar
- @: $(MAKE); $(unstage)
- @[ -f ./fastjar/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in fastjar" ; \
- (cd $(HOST_SUBDIR)/fastjar && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif fastjar
-
.PHONY: maybe-html-fastjar html-fastjar
maybe-html-fastjar:
@if fastjar
@@ -9935,7 +9390,7 @@ install-fileutils: installdirs
@endif fileutils
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-fileutils info-fileutils
maybe-info-fileutils:
@@ -9989,32 +9444,6 @@ dvi-fileutils: \
@endif fileutils
-.PHONY: maybe-pdf-fileutils pdf-fileutils
-maybe-pdf-fileutils:
-@if fileutils
-maybe-pdf-fileutils: pdf-fileutils
-
-pdf-fileutils: \
- configure-fileutils
- @: $(MAKE); $(unstage)
- @[ -f ./fileutils/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in fileutils" ; \
- (cd $(HOST_SUBDIR)/fileutils && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif fileutils
-
.PHONY: maybe-html-fileutils html-fileutils
maybe-html-fileutils:
@if fileutils
@@ -10331,7 +9760,7 @@ install-findutils: installdirs
@endif findutils
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-findutils info-findutils
maybe-info-findutils:
@@ -10385,32 +9814,6 @@ dvi-findutils: \
@endif findutils
-.PHONY: maybe-pdf-findutils pdf-findutils
-maybe-pdf-findutils:
-@if findutils
-maybe-pdf-findutils: pdf-findutils
-
-pdf-findutils: \
- configure-findutils
- @: $(MAKE); $(unstage)
- @[ -f ./findutils/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in findutils" ; \
- (cd $(HOST_SUBDIR)/findutils && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif findutils
-
.PHONY: maybe-html-findutils html-findutils
maybe-html-findutils:
@if findutils
@@ -10727,7 +10130,7 @@ install-find: installdirs
@endif find
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-find info-find
maybe-info-find:
@@ -10781,32 +10184,6 @@ dvi-find: \
@endif find
-.PHONY: maybe-pdf-find pdf-find
-maybe-pdf-find:
-@if find
-maybe-pdf-find: pdf-find
-
-pdf-find: \
- configure-find
- @: $(MAKE); $(unstage)
- @[ -f ./find/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in find" ; \
- (cd $(HOST_SUBDIR)/find && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif find
-
.PHONY: maybe-html-find html-find
maybe-html-find:
@if find
@@ -11123,7 +10500,7 @@ install-fixincludes: installdirs
@endif fixincludes
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-fixincludes info-fixincludes
maybe-info-fixincludes:
@@ -11145,16 +10522,6 @@ dvi-fixincludes:
@endif fixincludes
-.PHONY: maybe-pdf-fixincludes pdf-fixincludes
-maybe-pdf-fixincludes:
-@if fixincludes
-maybe-pdf-fixincludes: pdf-fixincludes
-
-# fixincludes doesn't support pdf.
-pdf-fixincludes:
-
-@endif fixincludes
-
.PHONY: maybe-html-fixincludes html-fixincludes
maybe-html-fixincludes:
@if fixincludes
@@ -11425,7 +10792,7 @@ install-flex: installdirs
@endif flex
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-flex info-flex
maybe-info-flex:
@@ -11479,32 +10846,6 @@ dvi-flex: \
@endif flex
-.PHONY: maybe-pdf-flex pdf-flex
-maybe-pdf-flex:
-@if flex
-maybe-pdf-flex: pdf-flex
-
-pdf-flex: \
- configure-flex
- @: $(MAKE); $(unstage)
- @[ -f ./flex/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in flex" ; \
- (cd $(HOST_SUBDIR)/flex && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif flex
-
.PHONY: maybe-html-flex html-flex
maybe-html-flex:
@if flex
@@ -11792,7 +11133,7 @@ configure-stage1-gas:
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) $${srcdiroption} \
\
- --disable-intermodule --enable-checking --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif gas-bootstrap
.PHONY: configure-stage2-gas maybe-configure-stage2-gas
@@ -11977,12 +11318,9 @@ all-stage1-gas: configure-stage1-gas
maybe-clean-stage1-gas: clean-stage1-gas
clean-stage1: clean-stage1-gas
clean-stage1-gas:
- @if [ $(current_stage) = stage1 ]; then \
- [ -f $(HOST_SUBDIR)/gas/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage1-gas/Makefile ] || exit 0; \
- $(MAKE) stage1-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-gas/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
@@ -12010,12 +11348,9 @@ all-stage2-gas: configure-stage2-gas
maybe-clean-stage2-gas: clean-stage2-gas
clean-stage2: clean-stage2-gas
clean-stage2-gas:
- @if [ $(current_stage) = stage2 ]; then \
- [ -f $(HOST_SUBDIR)/gas/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage2-gas/Makefile ] || exit 0; \
- $(MAKE) stage2-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-gas/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -12044,12 +11379,9 @@ all-stage3-gas: configure-stage3-gas
maybe-clean-stage3-gas: clean-stage3-gas
clean-stage3: clean-stage3-gas
clean-stage3-gas:
- @if [ $(current_stage) = stage3 ]; then \
- [ -f $(HOST_SUBDIR)/gas/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage3-gas/Makefile ] || exit 0; \
- $(MAKE) stage3-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-gas/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -12078,12 +11410,9 @@ all-stage4-gas: configure-stage4-gas
maybe-clean-stage4-gas: clean-stage4-gas
clean-stage4: clean-stage4-gas
clean-stage4-gas:
- @if [ $(current_stage) = stage4 ]; then \
- [ -f $(HOST_SUBDIR)/gas/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage4-gas/Makefile ] || exit 0; \
- $(MAKE) stage4-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-gas/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -12112,12 +11441,9 @@ all-stageprofile-gas: configure-stageprofile-gas
maybe-clean-stageprofile-gas: clean-stageprofile-gas
clean-stageprofile: clean-stageprofile-gas
clean-stageprofile-gas:
- @if [ $(current_stage) = stageprofile ]; then \
- [ -f $(HOST_SUBDIR)/gas/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stageprofile-gas/Makefile ] || exit 0; \
- $(MAKE) stageprofile-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-gas/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -12146,12 +11472,9 @@ all-stagefeedback-gas: configure-stagefeedback-gas
maybe-clean-stagefeedback-gas: clean-stagefeedback-gas
clean-stagefeedback: clean-stagefeedback-gas
clean-stagefeedback-gas:
- @if [ $(current_stage) = stagefeedback ]; then \
- [ -f $(HOST_SUBDIR)/gas/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stagefeedback-gas/Makefile ] || exit 0; \
- $(MAKE) stagefeedback-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-gas/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -12192,7 +11515,7 @@ install-gas: installdirs
@endif gas
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gas info-gas
maybe-info-gas:
@@ -12244,31 +11567,6 @@ dvi-gas: \
@endif gas
-.PHONY: maybe-pdf-gas pdf-gas
-maybe-pdf-gas:
-@if gas
-maybe-pdf-gas: pdf-gas
-
-pdf-gas: \
- configure-gas
- @[ -f ./gas/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in gas" ; \
- (cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif gas
-
.PHONY: maybe-html-gas html-gas
maybe-html-gas:
@if gas
@@ -12547,7 +11845,7 @@ configure-stage1-gcc:
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) $${srcdiroption} \
\
- --disable-intermodule --enable-checking --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif gcc-bootstrap
.PHONY: configure-stage2-gcc maybe-configure-stage2-gcc
@@ -12732,12 +12030,9 @@ all-stage1-gcc: configure-stage1-gcc
maybe-clean-stage1-gcc: clean-stage1-gcc
clean-stage1: clean-stage1-gcc
clean-stage1-gcc:
- @if [ $(current_stage) = stage1 ]; then \
- [ -f $(HOST_SUBDIR)/gcc/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage1-gcc/Makefile ] || exit 0; \
- $(MAKE) stage1-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-gcc/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" $(EXTRA_GCC_FLAGS) clean
@@ -12765,12 +12060,9 @@ all-stage2-gcc: configure-stage2-gcc
maybe-clean-stage2-gcc: clean-stage2-gcc
clean-stage2: clean-stage2-gcc
clean-stage2-gcc:
- @if [ $(current_stage) = stage2 ]; then \
- [ -f $(HOST_SUBDIR)/gcc/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage2-gcc/Makefile ] || exit 0; \
- $(MAKE) stage2-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-gcc/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -12799,12 +12091,9 @@ all-stage3-gcc: configure-stage3-gcc
maybe-clean-stage3-gcc: clean-stage3-gcc
clean-stage3: clean-stage3-gcc
clean-stage3-gcc:
- @if [ $(current_stage) = stage3 ]; then \
- [ -f $(HOST_SUBDIR)/gcc/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage3-gcc/Makefile ] || exit 0; \
- $(MAKE) stage3-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-gcc/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -12833,12 +12122,9 @@ all-stage4-gcc: configure-stage4-gcc
maybe-clean-stage4-gcc: clean-stage4-gcc
clean-stage4: clean-stage4-gcc
clean-stage4-gcc:
- @if [ $(current_stage) = stage4 ]; then \
- [ -f $(HOST_SUBDIR)/gcc/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage4-gcc/Makefile ] || exit 0; \
- $(MAKE) stage4-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-gcc/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -12867,12 +12153,9 @@ all-stageprofile-gcc: configure-stageprofile-gcc
maybe-clean-stageprofile-gcc: clean-stageprofile-gcc
clean-stageprofile: clean-stageprofile-gcc
clean-stageprofile-gcc:
- @if [ $(current_stage) = stageprofile ]; then \
- [ -f $(HOST_SUBDIR)/gcc/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stageprofile-gcc/Makefile ] || exit 0; \
- $(MAKE) stageprofile-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-gcc/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -12901,12 +12184,9 @@ all-stagefeedback-gcc: configure-stagefeedback-gcc
maybe-clean-stagefeedback-gcc: clean-stagefeedback-gcc
clean-stagefeedback: clean-stagefeedback-gcc
clean-stagefeedback-gcc:
- @if [ $(current_stage) = stagefeedback ]; then \
- [ -f $(HOST_SUBDIR)/gcc/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stagefeedback-gcc/Makefile ] || exit 0; \
- $(MAKE) stagefeedback-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-gcc/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -12947,7 +12227,7 @@ install-gcc: installdirs
@endif gcc
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gcc info-gcc
maybe-info-gcc:
@@ -12999,31 +12279,6 @@ dvi-gcc: \
@endif gcc
-.PHONY: maybe-pdf-gcc pdf-gcc
-maybe-pdf-gcc:
-@if gcc
-maybe-pdf-gcc: pdf-gcc
-
-pdf-gcc: \
- configure-gcc
- @[ -f ./gcc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in gcc" ; \
- (cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif gcc
-
.PHONY: maybe-html-gcc html-gcc
maybe-html-gcc:
@if gcc
@@ -13331,7 +12586,7 @@ install-gawk: installdirs
@endif gawk
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gawk info-gawk
maybe-info-gawk:
@@ -13385,32 +12640,6 @@ dvi-gawk: \
@endif gawk
-.PHONY: maybe-pdf-gawk pdf-gawk
-maybe-pdf-gawk:
-@if gawk
-maybe-pdf-gawk: pdf-gawk
-
-pdf-gawk: \
- configure-gawk
- @: $(MAKE); $(unstage)
- @[ -f ./gawk/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in gawk" ; \
- (cd $(HOST_SUBDIR)/gawk && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif gawk
-
.PHONY: maybe-html-gawk html-gawk
maybe-html-gawk:
@if gawk
@@ -13727,7 +12956,7 @@ install-gettext: installdirs
@endif gettext
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gettext info-gettext
maybe-info-gettext:
@@ -13781,32 +13010,6 @@ dvi-gettext: \
@endif gettext
-.PHONY: maybe-pdf-gettext pdf-gettext
-maybe-pdf-gettext:
-@if gettext
-maybe-pdf-gettext: pdf-gettext
-
-pdf-gettext: \
- configure-gettext
- @: $(MAKE); $(unstage)
- @[ -f ./gettext/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in gettext" ; \
- (cd $(HOST_SUBDIR)/gettext && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif gettext
-
.PHONY: maybe-html-gettext html-gettext
maybe-html-gettext:
@if gettext
@@ -14123,7 +13326,7 @@ install-gnuserv: installdirs
@endif gnuserv
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gnuserv info-gnuserv
maybe-info-gnuserv:
@@ -14177,32 +13380,6 @@ dvi-gnuserv: \
@endif gnuserv
-.PHONY: maybe-pdf-gnuserv pdf-gnuserv
-maybe-pdf-gnuserv:
-@if gnuserv
-maybe-pdf-gnuserv: pdf-gnuserv
-
-pdf-gnuserv: \
- configure-gnuserv
- @: $(MAKE); $(unstage)
- @[ -f ./gnuserv/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in gnuserv" ; \
- (cd $(HOST_SUBDIR)/gnuserv && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif gnuserv
-
.PHONY: maybe-html-gnuserv html-gnuserv
maybe-html-gnuserv:
@if gnuserv
@@ -14519,7 +13696,7 @@ install-gprof: installdirs
@endif gprof
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gprof info-gprof
maybe-info-gprof:
@@ -14573,32 +13750,6 @@ dvi-gprof: \
@endif gprof
-.PHONY: maybe-pdf-gprof pdf-gprof
-maybe-pdf-gprof:
-@if gprof
-maybe-pdf-gprof: pdf-gprof
-
-pdf-gprof: \
- configure-gprof
- @: $(MAKE); $(unstage)
- @[ -f ./gprof/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in gprof" ; \
- (cd $(HOST_SUBDIR)/gprof && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif gprof
-
.PHONY: maybe-html-gprof html-gprof
maybe-html-gprof:
@if gprof
@@ -14915,7 +14066,7 @@ install-gzip: installdirs
@endif gzip
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gzip info-gzip
maybe-info-gzip:
@@ -14969,32 +14120,6 @@ dvi-gzip: \
@endif gzip
-.PHONY: maybe-pdf-gzip pdf-gzip
-maybe-pdf-gzip:
-@if gzip
-maybe-pdf-gzip: pdf-gzip
-
-pdf-gzip: \
- configure-gzip
- @: $(MAKE); $(unstage)
- @[ -f ./gzip/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in gzip" ; \
- (cd $(HOST_SUBDIR)/gzip && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif gzip
-
.PHONY: maybe-html-gzip html-gzip
maybe-html-gzip:
@if gzip
@@ -15311,7 +14436,7 @@ install-hello: installdirs
@endif hello
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-hello info-hello
maybe-info-hello:
@@ -15365,32 +14490,6 @@ dvi-hello: \
@endif hello
-.PHONY: maybe-pdf-hello pdf-hello
-maybe-pdf-hello:
-@if hello
-maybe-pdf-hello: pdf-hello
-
-pdf-hello: \
- configure-hello
- @: $(MAKE); $(unstage)
- @[ -f ./hello/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in hello" ; \
- (cd $(HOST_SUBDIR)/hello && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif hello
-
.PHONY: maybe-html-hello html-hello
maybe-html-hello:
@if hello
@@ -15707,7 +14806,7 @@ install-indent: installdirs
@endif indent
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-indent info-indent
maybe-info-indent:
@@ -15761,32 +14860,6 @@ dvi-indent: \
@endif indent
-.PHONY: maybe-pdf-indent pdf-indent
-maybe-pdf-indent:
-@if indent
-maybe-pdf-indent: pdf-indent
-
-pdf-indent: \
- configure-indent
- @: $(MAKE); $(unstage)
- @[ -f ./indent/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in indent" ; \
- (cd $(HOST_SUBDIR)/indent && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif indent
-
.PHONY: maybe-html-indent html-indent
maybe-html-indent:
@if indent
@@ -16074,7 +15147,7 @@ configure-stage1-intl:
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) $${srcdiroption} \
\
- --disable-intermodule --enable-checking --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif intl-bootstrap
.PHONY: configure-stage2-intl maybe-configure-stage2-intl
@@ -16259,12 +15332,9 @@ all-stage1-intl: configure-stage1-intl
maybe-clean-stage1-intl: clean-stage1-intl
clean-stage1: clean-stage1-intl
clean-stage1-intl:
- @if [ $(current_stage) = stage1 ]; then \
- [ -f $(HOST_SUBDIR)/intl/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage1-intl/Makefile ] || exit 0; \
- $(MAKE) stage1-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-intl/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
@@ -16292,12 +15362,9 @@ all-stage2-intl: configure-stage2-intl
maybe-clean-stage2-intl: clean-stage2-intl
clean-stage2: clean-stage2-intl
clean-stage2-intl:
- @if [ $(current_stage) = stage2 ]; then \
- [ -f $(HOST_SUBDIR)/intl/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage2-intl/Makefile ] || exit 0; \
- $(MAKE) stage2-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-intl/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -16326,12 +15393,9 @@ all-stage3-intl: configure-stage3-intl
maybe-clean-stage3-intl: clean-stage3-intl
clean-stage3: clean-stage3-intl
clean-stage3-intl:
- @if [ $(current_stage) = stage3 ]; then \
- [ -f $(HOST_SUBDIR)/intl/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage3-intl/Makefile ] || exit 0; \
- $(MAKE) stage3-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-intl/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -16360,12 +15424,9 @@ all-stage4-intl: configure-stage4-intl
maybe-clean-stage4-intl: clean-stage4-intl
clean-stage4: clean-stage4-intl
clean-stage4-intl:
- @if [ $(current_stage) = stage4 ]; then \
- [ -f $(HOST_SUBDIR)/intl/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage4-intl/Makefile ] || exit 0; \
- $(MAKE) stage4-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-intl/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -16394,12 +15455,9 @@ all-stageprofile-intl: configure-stageprofile-intl
maybe-clean-stageprofile-intl: clean-stageprofile-intl
clean-stageprofile: clean-stageprofile-intl
clean-stageprofile-intl:
- @if [ $(current_stage) = stageprofile ]; then \
- [ -f $(HOST_SUBDIR)/intl/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stageprofile-intl/Makefile ] || exit 0; \
- $(MAKE) stageprofile-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-intl/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -16428,12 +15486,9 @@ all-stagefeedback-intl: configure-stagefeedback-intl
maybe-clean-stagefeedback-intl: clean-stagefeedback-intl
clean-stagefeedback: clean-stagefeedback-intl
clean-stagefeedback-intl:
- @if [ $(current_stage) = stagefeedback ]; then \
- [ -f $(HOST_SUBDIR)/intl/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stagefeedback-intl/Makefile ] || exit 0; \
- $(MAKE) stagefeedback-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-intl/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -16474,7 +15529,7 @@ install-intl: installdirs
@endif intl
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-intl info-intl
maybe-info-intl:
@@ -16526,31 +15581,6 @@ dvi-intl: \
@endif intl
-.PHONY: maybe-pdf-intl pdf-intl
-maybe-pdf-intl:
-@if intl
-maybe-pdf-intl: pdf-intl
-
-pdf-intl: \
- configure-intl
- @[ -f ./intl/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in intl" ; \
- (cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif intl
-
.PHONY: maybe-html-intl html-intl
maybe-html-intl:
@if intl
@@ -16858,7 +15888,7 @@ install-tcl: installdirs
@endif tcl
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-tcl info-tcl
maybe-info-tcl:
@@ -16912,32 +15942,6 @@ dvi-tcl: \
@endif tcl
-.PHONY: maybe-pdf-tcl pdf-tcl
-maybe-pdf-tcl:
-@if tcl
-maybe-pdf-tcl: pdf-tcl
-
-pdf-tcl: \
- configure-tcl
- @: $(MAKE); $(unstage)
- @[ -f ./tcl/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in tcl" ; \
- (cd $(HOST_SUBDIR)/tcl && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif tcl
-
.PHONY: maybe-html-tcl html-tcl
maybe-html-tcl:
@if tcl
@@ -17239,7 +16243,7 @@ install-itcl: installdirs
@endif itcl
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-itcl info-itcl
maybe-info-itcl:
@@ -17293,32 +16297,6 @@ dvi-itcl: \
@endif itcl
-.PHONY: maybe-pdf-itcl pdf-itcl
-maybe-pdf-itcl:
-@if itcl
-maybe-pdf-itcl: pdf-itcl
-
-pdf-itcl: \
- configure-itcl
- @: $(MAKE); $(unstage)
- @[ -f ./itcl/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in itcl" ; \
- (cd $(HOST_SUBDIR)/itcl && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif itcl
-
.PHONY: maybe-html-itcl html-itcl
maybe-html-itcl:
@if itcl
@@ -17606,7 +16584,7 @@ configure-stage1-ld:
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) $${srcdiroption} \
\
- --disable-intermodule --enable-checking --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif ld-bootstrap
.PHONY: configure-stage2-ld maybe-configure-stage2-ld
@@ -17791,12 +16769,9 @@ all-stage1-ld: configure-stage1-ld
maybe-clean-stage1-ld: clean-stage1-ld
clean-stage1: clean-stage1-ld
clean-stage1-ld:
- @if [ $(current_stage) = stage1 ]; then \
- [ -f $(HOST_SUBDIR)/ld/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage1-ld/Makefile ] || exit 0; \
- $(MAKE) stage1-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-ld/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
@@ -17824,12 +16799,9 @@ all-stage2-ld: configure-stage2-ld
maybe-clean-stage2-ld: clean-stage2-ld
clean-stage2: clean-stage2-ld
clean-stage2-ld:
- @if [ $(current_stage) = stage2 ]; then \
- [ -f $(HOST_SUBDIR)/ld/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage2-ld/Makefile ] || exit 0; \
- $(MAKE) stage2-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-ld/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -17858,12 +16830,9 @@ all-stage3-ld: configure-stage3-ld
maybe-clean-stage3-ld: clean-stage3-ld
clean-stage3: clean-stage3-ld
clean-stage3-ld:
- @if [ $(current_stage) = stage3 ]; then \
- [ -f $(HOST_SUBDIR)/ld/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage3-ld/Makefile ] || exit 0; \
- $(MAKE) stage3-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-ld/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -17892,12 +16861,9 @@ all-stage4-ld: configure-stage4-ld
maybe-clean-stage4-ld: clean-stage4-ld
clean-stage4: clean-stage4-ld
clean-stage4-ld:
- @if [ $(current_stage) = stage4 ]; then \
- [ -f $(HOST_SUBDIR)/ld/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage4-ld/Makefile ] || exit 0; \
- $(MAKE) stage4-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-ld/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -17926,12 +16892,9 @@ all-stageprofile-ld: configure-stageprofile-ld
maybe-clean-stageprofile-ld: clean-stageprofile-ld
clean-stageprofile: clean-stageprofile-ld
clean-stageprofile-ld:
- @if [ $(current_stage) = stageprofile ]; then \
- [ -f $(HOST_SUBDIR)/ld/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stageprofile-ld/Makefile ] || exit 0; \
- $(MAKE) stageprofile-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-ld/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -17960,12 +16923,9 @@ all-stagefeedback-ld: configure-stagefeedback-ld
maybe-clean-stagefeedback-ld: clean-stagefeedback-ld
clean-stagefeedback: clean-stagefeedback-ld
clean-stagefeedback-ld:
- @if [ $(current_stage) = stagefeedback ]; then \
- [ -f $(HOST_SUBDIR)/ld/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stagefeedback-ld/Makefile ] || exit 0; \
- $(MAKE) stagefeedback-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-ld/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -18006,7 +16966,7 @@ install-ld: installdirs
@endif ld
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-ld info-ld
maybe-info-ld:
@@ -18058,31 +17018,6 @@ dvi-ld: \
@endif ld
-.PHONY: maybe-pdf-ld pdf-ld
-maybe-pdf-ld:
-@if ld
-maybe-pdf-ld: pdf-ld
-
-pdf-ld: \
- configure-ld
- @[ -f ./ld/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in ld" ; \
- (cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif ld
-
.PHONY: maybe-html-ld html-ld
maybe-html-ld:
@if ld
@@ -18361,7 +17296,7 @@ configure-stage1-libcpp:
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) $${srcdiroption} \
\
- --disable-intermodule --enable-checking --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif libcpp-bootstrap
.PHONY: configure-stage2-libcpp maybe-configure-stage2-libcpp
@@ -18546,12 +17481,9 @@ all-stage1-libcpp: configure-stage1-libcpp
maybe-clean-stage1-libcpp: clean-stage1-libcpp
clean-stage1: clean-stage1-libcpp
clean-stage1-libcpp:
- @if [ $(current_stage) = stage1 ]; then \
- [ -f $(HOST_SUBDIR)/libcpp/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage1-libcpp/Makefile ] || exit 0; \
- $(MAKE) stage1-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-libcpp/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
@@ -18579,12 +17511,9 @@ all-stage2-libcpp: configure-stage2-libcpp
maybe-clean-stage2-libcpp: clean-stage2-libcpp
clean-stage2: clean-stage2-libcpp
clean-stage2-libcpp:
- @if [ $(current_stage) = stage2 ]; then \
- [ -f $(HOST_SUBDIR)/libcpp/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage2-libcpp/Makefile ] || exit 0; \
- $(MAKE) stage2-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-libcpp/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -18613,12 +17542,9 @@ all-stage3-libcpp: configure-stage3-libcpp
maybe-clean-stage3-libcpp: clean-stage3-libcpp
clean-stage3: clean-stage3-libcpp
clean-stage3-libcpp:
- @if [ $(current_stage) = stage3 ]; then \
- [ -f $(HOST_SUBDIR)/libcpp/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage3-libcpp/Makefile ] || exit 0; \
- $(MAKE) stage3-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-libcpp/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -18647,12 +17573,9 @@ all-stage4-libcpp: configure-stage4-libcpp
maybe-clean-stage4-libcpp: clean-stage4-libcpp
clean-stage4: clean-stage4-libcpp
clean-stage4-libcpp:
- @if [ $(current_stage) = stage4 ]; then \
- [ -f $(HOST_SUBDIR)/libcpp/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage4-libcpp/Makefile ] || exit 0; \
- $(MAKE) stage4-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-libcpp/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -18681,12 +17604,9 @@ all-stageprofile-libcpp: configure-stageprofile-libcpp
maybe-clean-stageprofile-libcpp: clean-stageprofile-libcpp
clean-stageprofile: clean-stageprofile-libcpp
clean-stageprofile-libcpp:
- @if [ $(current_stage) = stageprofile ]; then \
- [ -f $(HOST_SUBDIR)/libcpp/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stageprofile-libcpp/Makefile ] || exit 0; \
- $(MAKE) stageprofile-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-libcpp/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -18715,12 +17635,9 @@ all-stagefeedback-libcpp: configure-stagefeedback-libcpp
maybe-clean-stagefeedback-libcpp: clean-stagefeedback-libcpp
clean-stagefeedback: clean-stagefeedback-libcpp
clean-stagefeedback-libcpp:
- @if [ $(current_stage) = stagefeedback ]; then \
- [ -f $(HOST_SUBDIR)/libcpp/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stagefeedback-libcpp/Makefile ] || exit 0; \
- $(MAKE) stagefeedback-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-libcpp/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -18761,7 +17678,7 @@ install-libcpp: installdirs
@endif libcpp
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-libcpp info-libcpp
maybe-info-libcpp:
@@ -18813,31 +17730,6 @@ dvi-libcpp: \
@endif libcpp
-.PHONY: maybe-pdf-libcpp pdf-libcpp
-maybe-pdf-libcpp:
-@if libcpp
-maybe-pdf-libcpp: pdf-libcpp
-
-pdf-libcpp: \
- configure-libcpp
- @[ -f ./libcpp/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in libcpp" ; \
- (cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif libcpp
-
.PHONY: maybe-html-libcpp html-libcpp
maybe-html-libcpp:
@if libcpp
@@ -19116,7 +18008,7 @@ configure-stage1-libdecnumber:
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) $${srcdiroption} \
\
- --disable-intermodule --enable-checking --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif libdecnumber-bootstrap
.PHONY: configure-stage2-libdecnumber maybe-configure-stage2-libdecnumber
@@ -19301,12 +18193,9 @@ all-stage1-libdecnumber: configure-stage1-libdecnumber
maybe-clean-stage1-libdecnumber: clean-stage1-libdecnumber
clean-stage1: clean-stage1-libdecnumber
clean-stage1-libdecnumber:
- @if [ $(current_stage) = stage1 ]; then \
- [ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage1-libdecnumber/Makefile ] || exit 0; \
- $(MAKE) stage1-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-libdecnumber/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
@@ -19334,12 +18223,9 @@ all-stage2-libdecnumber: configure-stage2-libdecnumber
maybe-clean-stage2-libdecnumber: clean-stage2-libdecnumber
clean-stage2: clean-stage2-libdecnumber
clean-stage2-libdecnumber:
- @if [ $(current_stage) = stage2 ]; then \
- [ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage2-libdecnumber/Makefile ] || exit 0; \
- $(MAKE) stage2-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-libdecnumber/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -19368,12 +18254,9 @@ all-stage3-libdecnumber: configure-stage3-libdecnumber
maybe-clean-stage3-libdecnumber: clean-stage3-libdecnumber
clean-stage3: clean-stage3-libdecnumber
clean-stage3-libdecnumber:
- @if [ $(current_stage) = stage3 ]; then \
- [ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage3-libdecnumber/Makefile ] || exit 0; \
- $(MAKE) stage3-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-libdecnumber/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -19402,12 +18285,9 @@ all-stage4-libdecnumber: configure-stage4-libdecnumber
maybe-clean-stage4-libdecnumber: clean-stage4-libdecnumber
clean-stage4: clean-stage4-libdecnumber
clean-stage4-libdecnumber:
- @if [ $(current_stage) = stage4 ]; then \
- [ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage4-libdecnumber/Makefile ] || exit 0; \
- $(MAKE) stage4-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-libdecnumber/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -19436,12 +18316,9 @@ all-stageprofile-libdecnumber: configure-stageprofile-libdecnumber
maybe-clean-stageprofile-libdecnumber: clean-stageprofile-libdecnumber
clean-stageprofile: clean-stageprofile-libdecnumber
clean-stageprofile-libdecnumber:
- @if [ $(current_stage) = stageprofile ]; then \
- [ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stageprofile-libdecnumber/Makefile ] || exit 0; \
- $(MAKE) stageprofile-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-libdecnumber/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -19470,12 +18347,9 @@ all-stagefeedback-libdecnumber: configure-stagefeedback-libdecnumber
maybe-clean-stagefeedback-libdecnumber: clean-stagefeedback-libdecnumber
clean-stagefeedback: clean-stagefeedback-libdecnumber
clean-stagefeedback-libdecnumber:
- @if [ $(current_stage) = stagefeedback ]; then \
- [ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stagefeedback-libdecnumber/Makefile ] || exit 0; \
- $(MAKE) stagefeedback-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-libdecnumber/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -19516,7 +18390,7 @@ install-libdecnumber: installdirs
@endif libdecnumber
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-libdecnumber info-libdecnumber
maybe-info-libdecnumber:
@@ -19568,31 +18442,6 @@ dvi-libdecnumber: \
@endif libdecnumber
-.PHONY: maybe-pdf-libdecnumber pdf-libdecnumber
-maybe-pdf-libdecnumber:
-@if libdecnumber
-maybe-pdf-libdecnumber: pdf-libdecnumber
-
-pdf-libdecnumber: \
- configure-libdecnumber
- @[ -f ./libdecnumber/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in libdecnumber" ; \
- (cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif libdecnumber
-
.PHONY: maybe-html-libdecnumber html-libdecnumber
maybe-html-libdecnumber:
@if libdecnumber
@@ -19900,7 +18749,7 @@ install-libgui: installdirs
@endif libgui
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-libgui info-libgui
maybe-info-libgui:
@@ -19954,32 +18803,6 @@ dvi-libgui: \
@endif libgui
-.PHONY: maybe-pdf-libgui pdf-libgui
-maybe-pdf-libgui:
-@if libgui
-maybe-pdf-libgui: pdf-libgui
-
-pdf-libgui: \
- configure-libgui
- @: $(MAKE); $(unstage)
- @[ -f ./libgui/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in libgui" ; \
- (cd $(HOST_SUBDIR)/libgui && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif libgui
-
.PHONY: maybe-html-libgui html-libgui
maybe-html-libgui:
@if libgui
@@ -20267,7 +19090,7 @@ configure-stage1-libiberty:
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) $${srcdiroption} \
\
- --disable-intermodule --enable-checking --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif libiberty-bootstrap
.PHONY: configure-stage2-libiberty maybe-configure-stage2-libiberty
@@ -20452,12 +19275,9 @@ all-stage1-libiberty: configure-stage1-libiberty
maybe-clean-stage1-libiberty: clean-stage1-libiberty
clean-stage1: clean-stage1-libiberty
clean-stage1-libiberty:
- @if [ $(current_stage) = stage1 ]; then \
- [ -f $(HOST_SUBDIR)/libiberty/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage1-libiberty/Makefile ] || exit 0; \
- $(MAKE) stage1-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-libiberty/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
@@ -20485,12 +19305,9 @@ all-stage2-libiberty: configure-stage2-libiberty
maybe-clean-stage2-libiberty: clean-stage2-libiberty
clean-stage2: clean-stage2-libiberty
clean-stage2-libiberty:
- @if [ $(current_stage) = stage2 ]; then \
- [ -f $(HOST_SUBDIR)/libiberty/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage2-libiberty/Makefile ] || exit 0; \
- $(MAKE) stage2-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-libiberty/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -20519,12 +19336,9 @@ all-stage3-libiberty: configure-stage3-libiberty
maybe-clean-stage3-libiberty: clean-stage3-libiberty
clean-stage3: clean-stage3-libiberty
clean-stage3-libiberty:
- @if [ $(current_stage) = stage3 ]; then \
- [ -f $(HOST_SUBDIR)/libiberty/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage3-libiberty/Makefile ] || exit 0; \
- $(MAKE) stage3-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-libiberty/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -20553,12 +19367,9 @@ all-stage4-libiberty: configure-stage4-libiberty
maybe-clean-stage4-libiberty: clean-stage4-libiberty
clean-stage4: clean-stage4-libiberty
clean-stage4-libiberty:
- @if [ $(current_stage) = stage4 ]; then \
- [ -f $(HOST_SUBDIR)/libiberty/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage4-libiberty/Makefile ] || exit 0; \
- $(MAKE) stage4-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-libiberty/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -20587,12 +19398,9 @@ all-stageprofile-libiberty: configure-stageprofile-libiberty
maybe-clean-stageprofile-libiberty: clean-stageprofile-libiberty
clean-stageprofile: clean-stageprofile-libiberty
clean-stageprofile-libiberty:
- @if [ $(current_stage) = stageprofile ]; then \
- [ -f $(HOST_SUBDIR)/libiberty/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stageprofile-libiberty/Makefile ] || exit 0; \
- $(MAKE) stageprofile-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-libiberty/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -20621,12 +19429,9 @@ all-stagefeedback-libiberty: configure-stagefeedback-libiberty
maybe-clean-stagefeedback-libiberty: clean-stagefeedback-libiberty
clean-stagefeedback: clean-stagefeedback-libiberty
clean-stagefeedback-libiberty:
- @if [ $(current_stage) = stagefeedback ]; then \
- [ -f $(HOST_SUBDIR)/libiberty/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stagefeedback-libiberty/Makefile ] || exit 0; \
- $(MAKE) stagefeedback-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-libiberty/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -20667,7 +19472,7 @@ install-libiberty: installdirs
@endif libiberty
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-libiberty info-libiberty
maybe-info-libiberty:
@@ -20719,31 +19524,6 @@ dvi-libiberty: \
@endif libiberty
-.PHONY: maybe-pdf-libiberty pdf-libiberty
-maybe-pdf-libiberty:
-@if libiberty
-maybe-pdf-libiberty: pdf-libiberty
-
-pdf-libiberty: \
- configure-libiberty
- @[ -f ./libiberty/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in libiberty" ; \
- (cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif libiberty
-
.PHONY: maybe-html-libiberty html-libiberty
maybe-html-libiberty:
@if libiberty
@@ -21051,7 +19831,7 @@ install-libtool: installdirs
@endif libtool
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-libtool info-libtool
maybe-info-libtool:
@@ -21105,32 +19885,6 @@ dvi-libtool: \
@endif libtool
-.PHONY: maybe-pdf-libtool pdf-libtool
-maybe-pdf-libtool:
-@if libtool
-maybe-pdf-libtool: pdf-libtool
-
-pdf-libtool: \
- configure-libtool
- @: $(MAKE); $(unstage)
- @[ -f ./libtool/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in libtool" ; \
- (cd $(HOST_SUBDIR)/libtool && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif libtool
-
.PHONY: maybe-html-libtool html-libtool
maybe-html-libtool:
@if libtool
@@ -21447,7 +20201,7 @@ install-m4: installdirs
@endif m4
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-m4 info-m4
maybe-info-m4:
@@ -21501,32 +20255,6 @@ dvi-m4: \
@endif m4
-.PHONY: maybe-pdf-m4 pdf-m4
-maybe-pdf-m4:
-@if m4
-maybe-pdf-m4: pdf-m4
-
-pdf-m4: \
- configure-m4
- @: $(MAKE); $(unstage)
- @[ -f ./m4/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in m4" ; \
- (cd $(HOST_SUBDIR)/m4 && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif m4
-
.PHONY: maybe-html-m4 html-m4
maybe-html-m4:
@if m4
@@ -21843,7 +20571,7 @@ install-make: installdirs
@endif make
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-make info-make
maybe-info-make:
@@ -21897,32 +20625,6 @@ dvi-make: \
@endif make
-.PHONY: maybe-pdf-make pdf-make
-maybe-pdf-make:
-@if make
-maybe-pdf-make: pdf-make
-
-pdf-make: \
- configure-make
- @: $(MAKE); $(unstage)
- @[ -f ./make/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in make" ; \
- (cd $(HOST_SUBDIR)/make && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif make
-
.PHONY: maybe-html-make html-make
maybe-html-make:
@if make
@@ -22233,7 +20935,7 @@ install-mmalloc: installdirs
@endif mmalloc
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-mmalloc info-mmalloc
maybe-info-mmalloc:
@@ -22287,32 +20989,6 @@ dvi-mmalloc: \
@endif mmalloc
-.PHONY: maybe-pdf-mmalloc pdf-mmalloc
-maybe-pdf-mmalloc:
-@if mmalloc
-maybe-pdf-mmalloc: pdf-mmalloc
-
-pdf-mmalloc: \
- configure-mmalloc
- @: $(MAKE); $(unstage)
- @[ -f ./mmalloc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in mmalloc" ; \
- (cd $(HOST_SUBDIR)/mmalloc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif mmalloc
-
.PHONY: maybe-html-mmalloc html-mmalloc
maybe-html-mmalloc:
@if mmalloc
@@ -22629,7 +21305,7 @@ install-patch: installdirs
@endif patch
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-patch info-patch
maybe-info-patch:
@@ -22683,32 +21359,6 @@ dvi-patch: \
@endif patch
-.PHONY: maybe-pdf-patch pdf-patch
-maybe-pdf-patch:
-@if patch
-maybe-pdf-patch: pdf-patch
-
-pdf-patch: \
- configure-patch
- @: $(MAKE); $(unstage)
- @[ -f ./patch/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in patch" ; \
- (cd $(HOST_SUBDIR)/patch && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif patch
-
.PHONY: maybe-html-patch html-patch
maybe-html-patch:
@if patch
@@ -23025,7 +21675,7 @@ install-perl: installdirs
@endif perl
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-perl info-perl
maybe-info-perl:
@@ -23079,32 +21729,6 @@ dvi-perl: \
@endif perl
-.PHONY: maybe-pdf-perl pdf-perl
-maybe-pdf-perl:
-@if perl
-maybe-pdf-perl: pdf-perl
-
-pdf-perl: \
- configure-perl
- @: $(MAKE); $(unstage)
- @[ -f ./perl/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in perl" ; \
- (cd $(HOST_SUBDIR)/perl && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif perl
-
.PHONY: maybe-html-perl html-perl
maybe-html-perl:
@if perl
@@ -23421,7 +22045,7 @@ install-prms: installdirs
@endif prms
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-prms info-prms
maybe-info-prms:
@@ -23475,32 +22099,6 @@ dvi-prms: \
@endif prms
-.PHONY: maybe-pdf-prms pdf-prms
-maybe-pdf-prms:
-@if prms
-maybe-pdf-prms: pdf-prms
-
-pdf-prms: \
- configure-prms
- @: $(MAKE); $(unstage)
- @[ -f ./prms/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in prms" ; \
- (cd $(HOST_SUBDIR)/prms && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif prms
-
.PHONY: maybe-html-prms html-prms
maybe-html-prms:
@if prms
@@ -23817,7 +22415,7 @@ install-rcs: installdirs
@endif rcs
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-rcs info-rcs
maybe-info-rcs:
@@ -23871,32 +22469,6 @@ dvi-rcs: \
@endif rcs
-.PHONY: maybe-pdf-rcs pdf-rcs
-maybe-pdf-rcs:
-@if rcs
-maybe-pdf-rcs: pdf-rcs
-
-pdf-rcs: \
- configure-rcs
- @: $(MAKE); $(unstage)
- @[ -f ./rcs/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in rcs" ; \
- (cd $(HOST_SUBDIR)/rcs && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif rcs
-
.PHONY: maybe-html-rcs html-rcs
maybe-html-rcs:
@if rcs
@@ -24213,7 +22785,7 @@ install-readline: installdirs
@endif readline
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-readline info-readline
maybe-info-readline:
@@ -24267,32 +22839,6 @@ dvi-readline: \
@endif readline
-.PHONY: maybe-pdf-readline pdf-readline
-maybe-pdf-readline:
-@if readline
-maybe-pdf-readline: pdf-readline
-
-pdf-readline: \
- configure-readline
- @: $(MAKE); $(unstage)
- @[ -f ./readline/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in readline" ; \
- (cd $(HOST_SUBDIR)/readline && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif readline
-
.PHONY: maybe-html-readline html-readline
maybe-html-readline:
@if readline
@@ -24597,7 +23143,7 @@ install-release:
@endif release
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-release info-release
maybe-info-release:
@@ -24651,32 +23197,6 @@ dvi-release: \
@endif release
-.PHONY: maybe-pdf-release pdf-release
-maybe-pdf-release:
-@if release
-maybe-pdf-release: pdf-release
-
-pdf-release: \
- configure-release
- @: $(MAKE); $(unstage)
- @[ -f ./release/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in release" ; \
- (cd $(HOST_SUBDIR)/release && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif release
-
.PHONY: maybe-html-release html-release
maybe-html-release:
@if release
@@ -24993,7 +23513,7 @@ install-recode: installdirs
@endif recode
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-recode info-recode
maybe-info-recode:
@@ -25047,32 +23567,6 @@ dvi-recode: \
@endif recode
-.PHONY: maybe-pdf-recode pdf-recode
-maybe-pdf-recode:
-@if recode
-maybe-pdf-recode: pdf-recode
-
-pdf-recode: \
- configure-recode
- @: $(MAKE); $(unstage)
- @[ -f ./recode/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in recode" ; \
- (cd $(HOST_SUBDIR)/recode && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif recode
-
.PHONY: maybe-html-recode html-recode
maybe-html-recode:
@if recode
@@ -25389,7 +23883,7 @@ install-sed: installdirs
@endif sed
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-sed info-sed
maybe-info-sed:
@@ -25443,32 +23937,6 @@ dvi-sed: \
@endif sed
-.PHONY: maybe-pdf-sed pdf-sed
-maybe-pdf-sed:
-@if sed
-maybe-pdf-sed: pdf-sed
-
-pdf-sed: \
- configure-sed
- @: $(MAKE); $(unstage)
- @[ -f ./sed/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in sed" ; \
- (cd $(HOST_SUBDIR)/sed && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif sed
-
.PHONY: maybe-html-sed html-sed
maybe-html-sed:
@if sed
@@ -25785,7 +24253,7 @@ install-send-pr: installdirs
@endif send-pr
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-send-pr info-send-pr
maybe-info-send-pr:
@@ -25839,32 +24307,6 @@ dvi-send-pr: \
@endif send-pr
-.PHONY: maybe-pdf-send-pr pdf-send-pr
-maybe-pdf-send-pr:
-@if send-pr
-maybe-pdf-send-pr: pdf-send-pr
-
-pdf-send-pr: \
- configure-send-pr
- @: $(MAKE); $(unstage)
- @[ -f ./send-pr/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in send-pr" ; \
- (cd $(HOST_SUBDIR)/send-pr && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif send-pr
-
.PHONY: maybe-html-send-pr html-send-pr
maybe-html-send-pr:
@if send-pr
@@ -26181,7 +24623,7 @@ install-shellutils: installdirs
@endif shellutils
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-shellutils info-shellutils
maybe-info-shellutils:
@@ -26235,32 +24677,6 @@ dvi-shellutils: \
@endif shellutils
-.PHONY: maybe-pdf-shellutils pdf-shellutils
-maybe-pdf-shellutils:
-@if shellutils
-maybe-pdf-shellutils: pdf-shellutils
-
-pdf-shellutils: \
- configure-shellutils
- @: $(MAKE); $(unstage)
- @[ -f ./shellutils/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in shellutils" ; \
- (cd $(HOST_SUBDIR)/shellutils && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif shellutils
-
.PHONY: maybe-html-shellutils html-shellutils
maybe-html-shellutils:
@if shellutils
@@ -26577,7 +24993,7 @@ install-sid: installdirs
@endif sid
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-sid info-sid
maybe-info-sid:
@@ -26631,32 +25047,6 @@ dvi-sid: \
@endif sid
-.PHONY: maybe-pdf-sid pdf-sid
-maybe-pdf-sid:
-@if sid
-maybe-pdf-sid: pdf-sid
-
-pdf-sid: \
- configure-sid
- @: $(MAKE); $(unstage)
- @[ -f ./sid/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in sid" ; \
- (cd $(HOST_SUBDIR)/sid && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif sid
-
.PHONY: maybe-html-sid html-sid
maybe-html-sid:
@if sid
@@ -26973,7 +25363,7 @@ install-sim: installdirs
@endif sim
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-sim info-sim
maybe-info-sim:
@@ -27027,32 +25417,6 @@ dvi-sim: \
@endif sim
-.PHONY: maybe-pdf-sim pdf-sim
-maybe-pdf-sim:
-@if sim
-maybe-pdf-sim: pdf-sim
-
-pdf-sim: \
- configure-sim
- @: $(MAKE); $(unstage)
- @[ -f ./sim/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in sim" ; \
- (cd $(HOST_SUBDIR)/sim && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif sim
-
.PHONY: maybe-html-sim html-sim
maybe-html-sim:
@if sim
@@ -27369,7 +25733,7 @@ install-tar: installdirs
@endif tar
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-tar info-tar
maybe-info-tar:
@@ -27423,32 +25787,6 @@ dvi-tar: \
@endif tar
-.PHONY: maybe-pdf-tar pdf-tar
-maybe-pdf-tar:
-@if tar
-maybe-pdf-tar: pdf-tar
-
-pdf-tar: \
- configure-tar
- @: $(MAKE); $(unstage)
- @[ -f ./tar/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in tar" ; \
- (cd $(HOST_SUBDIR)/tar && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif tar
-
.PHONY: maybe-html-tar html-tar
maybe-html-tar:
@if tar
@@ -27759,7 +26097,7 @@ install-texinfo:
@endif texinfo
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-texinfo info-texinfo
maybe-info-texinfo:
@@ -27813,32 +26151,6 @@ dvi-texinfo: \
@endif texinfo
-.PHONY: maybe-pdf-texinfo pdf-texinfo
-maybe-pdf-texinfo:
-@if texinfo
-maybe-pdf-texinfo: pdf-texinfo
-
-pdf-texinfo: \
- configure-texinfo
- @: $(MAKE); $(unstage)
- @[ -f ./texinfo/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in texinfo" ; \
- (cd $(HOST_SUBDIR)/texinfo && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif texinfo
-
.PHONY: maybe-html-texinfo html-texinfo
maybe-html-texinfo:
@if texinfo
@@ -28155,7 +26467,7 @@ install-textutils: installdirs
@endif textutils
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-textutils info-textutils
maybe-info-textutils:
@@ -28209,32 +26521,6 @@ dvi-textutils: \
@endif textutils
-.PHONY: maybe-pdf-textutils pdf-textutils
-maybe-pdf-textutils:
-@if textutils
-maybe-pdf-textutils: pdf-textutils
-
-pdf-textutils: \
- configure-textutils
- @: $(MAKE); $(unstage)
- @[ -f ./textutils/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in textutils" ; \
- (cd $(HOST_SUBDIR)/textutils && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif textutils
-
.PHONY: maybe-html-textutils html-textutils
maybe-html-textutils:
@if textutils
@@ -28551,7 +26837,7 @@ install-time: installdirs
@endif time
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-time info-time
maybe-info-time:
@@ -28605,32 +26891,6 @@ dvi-time: \
@endif time
-.PHONY: maybe-pdf-time pdf-time
-maybe-pdf-time:
-@if time
-maybe-pdf-time: pdf-time
-
-pdf-time: \
- configure-time
- @: $(MAKE); $(unstage)
- @[ -f ./time/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in time" ; \
- (cd $(HOST_SUBDIR)/time && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif time
-
.PHONY: maybe-html-time html-time
maybe-html-time:
@if time
@@ -28947,7 +27207,7 @@ install-uudecode: installdirs
@endif uudecode
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-uudecode info-uudecode
maybe-info-uudecode:
@@ -29001,32 +27261,6 @@ dvi-uudecode: \
@endif uudecode
-.PHONY: maybe-pdf-uudecode pdf-uudecode
-maybe-pdf-uudecode:
-@if uudecode
-maybe-pdf-uudecode: pdf-uudecode
-
-pdf-uudecode: \
- configure-uudecode
- @: $(MAKE); $(unstage)
- @[ -f ./uudecode/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in uudecode" ; \
- (cd $(HOST_SUBDIR)/uudecode && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif uudecode
-
.PHONY: maybe-html-uudecode html-uudecode
maybe-html-uudecode:
@if uudecode
@@ -29343,7 +27577,7 @@ install-wdiff: installdirs
@endif wdiff
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-wdiff info-wdiff
maybe-info-wdiff:
@@ -29397,32 +27631,6 @@ dvi-wdiff: \
@endif wdiff
-.PHONY: maybe-pdf-wdiff pdf-wdiff
-maybe-pdf-wdiff:
-@if wdiff
-maybe-pdf-wdiff: pdf-wdiff
-
-pdf-wdiff: \
- configure-wdiff
- @: $(MAKE); $(unstage)
- @[ -f ./wdiff/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in wdiff" ; \
- (cd $(HOST_SUBDIR)/wdiff && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif wdiff
-
.PHONY: maybe-html-wdiff html-wdiff
maybe-html-wdiff:
@if wdiff
@@ -29742,7 +27950,7 @@ install-zip: installdirs
@endif zip
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-zip info-zip
maybe-info-zip:
@@ -29796,32 +28004,6 @@ dvi-zip: \
@endif zip
-.PHONY: maybe-pdf-zip pdf-zip
-maybe-pdf-zip:
-@if zip
-maybe-pdf-zip: pdf-zip
-
-pdf-zip: \
- configure-zip
- @: $(MAKE); $(unstage)
- @[ -f ./zip/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in zip" ; \
- (cd $(HOST_SUBDIR)/zip && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif zip
-
.PHONY: maybe-html-zip html-zip
maybe-html-zip:
@if zip
@@ -30109,7 +28291,7 @@ configure-stage1-zlib:
$(SHELL) $${libsrcdir}/configure \
$(HOST_CONFIGARGS) $${srcdiroption} \
\
- --disable-intermodule --enable-checking --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif zlib-bootstrap
.PHONY: configure-stage2-zlib maybe-configure-stage2-zlib
@@ -30294,12 +28476,9 @@ all-stage1-zlib: configure-stage1-zlib
maybe-clean-stage1-zlib: clean-stage1-zlib
clean-stage1: clean-stage1-zlib
clean-stage1-zlib:
- @if [ $(current_stage) = stage1 ]; then \
- [ -f $(HOST_SUBDIR)/zlib/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage1-zlib/Makefile ] || exit 0; \
- $(MAKE) stage1-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-zlib/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
@@ -30327,12 +28506,9 @@ all-stage2-zlib: configure-stage2-zlib
maybe-clean-stage2-zlib: clean-stage2-zlib
clean-stage2: clean-stage2-zlib
clean-stage2-zlib:
- @if [ $(current_stage) = stage2 ]; then \
- [ -f $(HOST_SUBDIR)/zlib/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage2-zlib/Makefile ] || exit 0; \
- $(MAKE) stage2-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-zlib/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -30361,12 +28537,9 @@ all-stage3-zlib: configure-stage3-zlib
maybe-clean-stage3-zlib: clean-stage3-zlib
clean-stage3: clean-stage3-zlib
clean-stage3-zlib:
- @if [ $(current_stage) = stage3 ]; then \
- [ -f $(HOST_SUBDIR)/zlib/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage3-zlib/Makefile ] || exit 0; \
- $(MAKE) stage3-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-zlib/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -30395,12 +28568,9 @@ all-stage4-zlib: configure-stage4-zlib
maybe-clean-stage4-zlib: clean-stage4-zlib
clean-stage4: clean-stage4-zlib
clean-stage4-zlib:
- @if [ $(current_stage) = stage4 ]; then \
- [ -f $(HOST_SUBDIR)/zlib/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage4-zlib/Makefile ] || exit 0; \
- $(MAKE) stage4-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-zlib/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -30429,12 +28599,9 @@ all-stageprofile-zlib: configure-stageprofile-zlib
maybe-clean-stageprofile-zlib: clean-stageprofile-zlib
clean-stageprofile: clean-stageprofile-zlib
clean-stageprofile-zlib:
- @if [ $(current_stage) = stageprofile ]; then \
- [ -f $(HOST_SUBDIR)/zlib/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stageprofile-zlib/Makefile ] || exit 0; \
- $(MAKE) stageprofile-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-zlib/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -30463,12 +28630,9 @@ all-stagefeedback-zlib: configure-stagefeedback-zlib
maybe-clean-stagefeedback-zlib: clean-stagefeedback-zlib
clean-stagefeedback: clean-stagefeedback-zlib
clean-stagefeedback-zlib:
- @if [ $(current_stage) = stagefeedback ]; then \
- [ -f $(HOST_SUBDIR)/zlib/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stagefeedback-zlib/Makefile ] || exit 0; \
- $(MAKE) stagefeedback-start; \
- fi; \
+ @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-zlib/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
@@ -30497,7 +28661,7 @@ install-zlib:
@endif zlib
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-zlib info-zlib
maybe-info-zlib:
@@ -30549,31 +28713,6 @@ dvi-zlib: \
@endif zlib
-.PHONY: maybe-pdf-zlib pdf-zlib
-maybe-pdf-zlib:
-@if zlib
-maybe-pdf-zlib: pdf-zlib
-
-pdf-zlib: \
- configure-zlib
- @[ -f ./zlib/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in zlib" ; \
- (cd $(HOST_SUBDIR)/zlib && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif zlib
-
.PHONY: maybe-html-zlib html-zlib
maybe-html-zlib:
@if zlib
@@ -30881,7 +29020,7 @@ install-gdb: installdirs
@endif gdb
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gdb info-gdb
maybe-info-gdb:
@@ -30935,32 +29074,6 @@ dvi-gdb: \
@endif gdb
-.PHONY: maybe-pdf-gdb pdf-gdb
-maybe-pdf-gdb:
-@if gdb
-maybe-pdf-gdb: pdf-gdb
-
-pdf-gdb: \
- configure-gdb
- @: $(MAKE); $(unstage)
- @[ -f ./gdb/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in gdb" ; \
- (cd $(HOST_SUBDIR)/gdb && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif gdb
-
.PHONY: maybe-html-gdb html-gdb
maybe-html-gdb:
@if gdb
@@ -31277,7 +29390,7 @@ install-expect: installdirs
@endif expect
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-expect info-expect
maybe-info-expect:
@@ -31331,32 +29444,6 @@ dvi-expect: \
@endif expect
-.PHONY: maybe-pdf-expect pdf-expect
-maybe-pdf-expect:
-@if expect
-maybe-pdf-expect: pdf-expect
-
-pdf-expect: \
- configure-expect
- @: $(MAKE); $(unstage)
- @[ -f ./expect/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in expect" ; \
- (cd $(HOST_SUBDIR)/expect && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif expect
-
.PHONY: maybe-html-expect html-expect
maybe-html-expect:
@if expect
@@ -31673,7 +29760,7 @@ install-guile: installdirs
@endif guile
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-guile info-guile
maybe-info-guile:
@@ -31727,32 +29814,6 @@ dvi-guile: \
@endif guile
-.PHONY: maybe-pdf-guile pdf-guile
-maybe-pdf-guile:
-@if guile
-maybe-pdf-guile: pdf-guile
-
-pdf-guile: \
- configure-guile
- @: $(MAKE); $(unstage)
- @[ -f ./guile/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in guile" ; \
- (cd $(HOST_SUBDIR)/guile && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif guile
-
.PHONY: maybe-html-guile html-guile
maybe-html-guile:
@if guile
@@ -32069,7 +30130,7 @@ install-tk: installdirs
@endif tk
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-tk info-tk
maybe-info-tk:
@@ -32123,32 +30184,6 @@ dvi-tk: \
@endif tk
-.PHONY: maybe-pdf-tk pdf-tk
-maybe-pdf-tk:
-@if tk
-maybe-pdf-tk: pdf-tk
-
-pdf-tk: \
- configure-tk
- @: $(MAKE); $(unstage)
- @[ -f ./tk/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in tk" ; \
- (cd $(HOST_SUBDIR)/tk && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif tk
-
.PHONY: maybe-html-tk html-tk
maybe-html-tk:
@if tk
@@ -32459,7 +30494,7 @@ install-libtermcap: installdirs
@endif libtermcap
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-libtermcap info-libtermcap
maybe-info-libtermcap:
@@ -32513,32 +30548,6 @@ dvi-libtermcap: \
@endif libtermcap
-.PHONY: maybe-pdf-libtermcap pdf-libtermcap
-maybe-pdf-libtermcap:
-@if libtermcap
-maybe-pdf-libtermcap: pdf-libtermcap
-
-pdf-libtermcap: \
- configure-libtermcap
- @: $(MAKE); $(unstage)
- @[ -f ./libtermcap/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in libtermcap" ; \
- (cd $(HOST_SUBDIR)/libtermcap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif libtermcap
-
.PHONY: maybe-html-libtermcap html-libtermcap
maybe-html-libtermcap:
@if libtermcap
@@ -32789,7 +30798,7 @@ install-utils: installdirs
@endif utils
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-utils info-utils
maybe-info-utils:
@@ -32843,32 +30852,6 @@ dvi-utils: \
@endif utils
-.PHONY: maybe-pdf-utils pdf-utils
-maybe-pdf-utils:
-@if utils
-maybe-pdf-utils: pdf-utils
-
-pdf-utils: \
- configure-utils
- @: $(MAKE); $(unstage)
- @[ -f ./utils/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in utils" ; \
- (cd $(HOST_SUBDIR)/utils && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif utils
-
.PHONY: maybe-html-utils html-utils
maybe-html-utils:
@if utils
@@ -33185,7 +31168,7 @@ install-gnattools: installdirs
@endif gnattools
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-gnattools info-gnattools
maybe-info-gnattools:
@@ -33239,32 +31222,6 @@ dvi-gnattools: \
@endif gnattools
-.PHONY: maybe-pdf-gnattools pdf-gnattools
-maybe-pdf-gnattools:
-@if gnattools
-maybe-pdf-gnattools: pdf-gnattools
-
-pdf-gnattools: \
- configure-gnattools
- @: $(MAKE); $(unstage)
- @[ -f ./gnattools/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in gnattools" ; \
- (cd $(HOST_SUBDIR)/gnattools && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif gnattools
-
.PHONY: maybe-html-gnattools html-gnattools
maybe-html-gnattools:
@if gnattools
@@ -33603,7 +31560,7 @@ install-target-libstdc++-v3: installdirs
@endif target-libstdc++-v3
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libstdc++-v3 info-target-libstdc++-v3
maybe-info-target-libstdc++-v3:
@@ -33657,32 +31614,6 @@ dvi-target-libstdc++-v3: \
@endif target-libstdc++-v3
-.PHONY: maybe-pdf-target-libstdc++-v3 pdf-target-libstdc++-v3
-maybe-pdf-target-libstdc++-v3:
-@if target-libstdc++-v3
-maybe-pdf-target-libstdc++-v3: pdf-target-libstdc++-v3
-
-pdf-target-libstdc++-v3: \
- configure-target-libstdc++-v3
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libstdc++-v3" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-libstdc++-v3
-
.PHONY: maybe-html-target-libstdc++-v3 html-target-libstdc++-v3
maybe-html-target-libstdc++-v3:
@if target-libstdc++-v3
@@ -34016,7 +31947,7 @@ install-target-libmudflap: installdirs
@endif target-libmudflap
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libmudflap info-target-libmudflap
maybe-info-target-libmudflap:
@@ -34070,32 +32001,6 @@ dvi-target-libmudflap: \
@endif target-libmudflap
-.PHONY: maybe-pdf-target-libmudflap pdf-target-libmudflap
-maybe-pdf-target-libmudflap:
-@if target-libmudflap
-maybe-pdf-target-libmudflap: pdf-target-libmudflap
-
-pdf-target-libmudflap: \
- configure-target-libmudflap
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-libmudflap
-
.PHONY: maybe-html-target-libmudflap html-target-libmudflap
maybe-html-target-libmudflap:
@if target-libmudflap
@@ -34429,7 +32334,7 @@ install-target-libssp: installdirs
@endif target-libssp
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libssp info-target-libssp
maybe-info-target-libssp:
@@ -34483,32 +32388,6 @@ dvi-target-libssp: \
@endif target-libssp
-.PHONY: maybe-pdf-target-libssp pdf-target-libssp
-maybe-pdf-target-libssp:
-@if target-libssp
-maybe-pdf-target-libssp: pdf-target-libssp
-
-pdf-target-libssp: \
- configure-target-libssp
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libssp" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libssp && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-libssp
-
.PHONY: maybe-html-target-libssp html-target-libssp
maybe-html-target-libssp:
@if target-libssp
@@ -34842,7 +32721,7 @@ install-target-newlib: installdirs
@endif target-newlib
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-newlib info-target-newlib
maybe-info-target-newlib:
@@ -34896,32 +32775,6 @@ dvi-target-newlib: \
@endif target-newlib
-.PHONY: maybe-pdf-target-newlib pdf-target-newlib
-maybe-pdf-target-newlib:
-@if target-newlib
-maybe-pdf-target-newlib: pdf-target-newlib
-
-pdf-target-newlib: \
- configure-target-newlib
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/newlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/newlib && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-newlib
-
.PHONY: maybe-html-target-newlib html-target-newlib
maybe-html-target-newlib:
@if target-newlib
@@ -35255,7 +33108,7 @@ install-target-libgfortran: installdirs
@endif target-libgfortran
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libgfortran info-target-libgfortran
maybe-info-target-libgfortran:
@@ -35309,32 +33162,6 @@ dvi-target-libgfortran: \
@endif target-libgfortran
-.PHONY: maybe-pdf-target-libgfortran pdf-target-libgfortran
-maybe-pdf-target-libgfortran:
-@if target-libgfortran
-maybe-pdf-target-libgfortran: pdf-target-libgfortran
-
-pdf-target-libgfortran: \
- configure-target-libgfortran
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libgfortran" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libgfortran && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-libgfortran
-
.PHONY: maybe-html-target-libgfortran html-target-libgfortran
maybe-html-target-libgfortran:
@if target-libgfortran
@@ -35668,7 +33495,7 @@ install-target-libobjc: installdirs
@endif target-libobjc
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libobjc info-target-libobjc
maybe-info-target-libobjc:
@@ -35722,32 +33549,6 @@ dvi-target-libobjc: \
@endif target-libobjc
-.PHONY: maybe-pdf-target-libobjc pdf-target-libobjc
-maybe-pdf-target-libobjc:
-@if target-libobjc
-maybe-pdf-target-libobjc: pdf-target-libobjc
-
-pdf-target-libobjc: \
- configure-target-libobjc
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libobjc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libobjc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-libobjc
-
.PHONY: maybe-html-target-libobjc html-target-libobjc
maybe-html-target-libobjc:
@if target-libobjc
@@ -36076,7 +33877,7 @@ install-target-libtermcap: installdirs
@endif target-libtermcap
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libtermcap info-target-libtermcap
maybe-info-target-libtermcap:
@@ -36130,32 +33931,6 @@ dvi-target-libtermcap: \
@endif target-libtermcap
-.PHONY: maybe-pdf-target-libtermcap pdf-target-libtermcap
-maybe-pdf-target-libtermcap:
-@if target-libtermcap
-maybe-pdf-target-libtermcap: pdf-target-libtermcap
-
-pdf-target-libtermcap: \
- configure-target-libtermcap
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libtermcap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libtermcap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-libtermcap
-
.PHONY: maybe-html-target-libtermcap html-target-libtermcap
maybe-html-target-libtermcap:
@if target-libtermcap
@@ -36429,7 +34204,7 @@ install-target-winsup: installdirs
@endif target-winsup
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-winsup info-target-winsup
maybe-info-target-winsup:
@@ -36483,32 +34258,6 @@ dvi-target-winsup: \
@endif target-winsup
-.PHONY: maybe-pdf-target-winsup pdf-target-winsup
-maybe-pdf-target-winsup:
-@if target-winsup
-maybe-pdf-target-winsup: pdf-target-winsup
-
-pdf-target-winsup: \
- configure-target-winsup
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/winsup" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/winsup && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-winsup
-
.PHONY: maybe-html-target-winsup html-target-winsup
maybe-html-target-winsup:
@if target-winsup
@@ -36837,7 +34586,7 @@ install-target-libgloss: installdirs
@endif target-libgloss
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libgloss info-target-libgloss
maybe-info-target-libgloss:
@@ -36891,32 +34640,6 @@ dvi-target-libgloss: \
@endif target-libgloss
-.PHONY: maybe-pdf-target-libgloss pdf-target-libgloss
-maybe-pdf-target-libgloss:
-@if target-libgloss
-maybe-pdf-target-libgloss: pdf-target-libgloss
-
-pdf-target-libgloss: \
- configure-target-libgloss
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libgloss" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libgloss && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-libgloss
-
.PHONY: maybe-html-target-libgloss html-target-libgloss
maybe-html-target-libgloss:
@if target-libgloss
@@ -37250,7 +34973,7 @@ install-target-libiberty: installdirs
@endif target-libiberty
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libiberty info-target-libiberty
maybe-info-target-libiberty:
@@ -37304,32 +35027,6 @@ dvi-target-libiberty: \
@endif target-libiberty
-.PHONY: maybe-pdf-target-libiberty pdf-target-libiberty
-maybe-pdf-target-libiberty:
-@if target-libiberty
-maybe-pdf-target-libiberty: pdf-target-libiberty
-
-pdf-target-libiberty: \
- configure-target-libiberty
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-libiberty
-
.PHONY: maybe-html-target-libiberty html-target-libiberty
maybe-html-target-libiberty:
@if target-libiberty
@@ -37663,7 +35360,7 @@ install-target-gperf: installdirs
@endif target-gperf
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-gperf info-target-gperf
maybe-info-target-gperf:
@@ -37717,32 +35414,6 @@ dvi-target-gperf: \
@endif target-gperf
-.PHONY: maybe-pdf-target-gperf pdf-target-gperf
-maybe-pdf-target-gperf:
-@if target-gperf
-maybe-pdf-target-gperf: pdf-target-gperf
-
-pdf-target-gperf: \
- configure-target-gperf
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/gperf" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/gperf && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-gperf
-
.PHONY: maybe-html-target-gperf html-target-gperf
maybe-html-target-gperf:
@if target-gperf
@@ -38066,7 +35737,7 @@ install-target-examples:
@endif target-examples
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-examples info-target-examples
maybe-info-target-examples:
@@ -38120,32 +35791,6 @@ dvi-target-examples: \
@endif target-examples
-.PHONY: maybe-pdf-target-examples pdf-target-examples
-maybe-pdf-target-examples:
-@if target-examples
-maybe-pdf-target-examples: pdf-target-examples
-
-pdf-target-examples: \
- configure-target-examples
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/examples" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/examples && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-examples
-
.PHONY: maybe-html-target-examples html-target-examples
maybe-html-target-examples:
@if target-examples
@@ -38479,7 +36124,7 @@ install-target-libffi: installdirs
@endif target-libffi
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libffi info-target-libffi
maybe-info-target-libffi:
@@ -38533,32 +36178,6 @@ dvi-target-libffi: \
@endif target-libffi
-.PHONY: maybe-pdf-target-libffi pdf-target-libffi
-maybe-pdf-target-libffi:
-@if target-libffi
-maybe-pdf-target-libffi: pdf-target-libffi
-
-pdf-target-libffi: \
- configure-target-libffi
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libffi" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libffi && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-libffi
-
.PHONY: maybe-html-target-libffi html-target-libffi
maybe-html-target-libffi:
@if target-libffi
@@ -38892,7 +36511,7 @@ install-target-libjava: installdirs
@endif target-libjava
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libjava info-target-libjava
maybe-info-target-libjava:
@@ -38946,32 +36565,6 @@ dvi-target-libjava: \
@endif target-libjava
-.PHONY: maybe-pdf-target-libjava pdf-target-libjava
-maybe-pdf-target-libjava:
-@if target-libjava
-maybe-pdf-target-libjava: pdf-target-libjava
-
-pdf-target-libjava: \
- configure-target-libjava
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libjava" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libjava && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-libjava
-
.PHONY: maybe-html-target-libjava html-target-libjava
maybe-html-target-libjava:
@if target-libjava
@@ -39305,7 +36898,7 @@ install-target-zlib: installdirs
@endif target-zlib
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-zlib info-target-zlib
maybe-info-target-zlib:
@@ -39359,32 +36952,6 @@ dvi-target-zlib: \
@endif target-zlib
-.PHONY: maybe-pdf-target-zlib pdf-target-zlib
-maybe-pdf-target-zlib:
-@if target-zlib
-maybe-pdf-target-zlib: pdf-target-zlib
-
-pdf-target-zlib: \
- configure-target-zlib
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/zlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/zlib && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-zlib
-
.PHONY: maybe-html-target-zlib html-target-zlib
maybe-html-target-zlib:
@if target-zlib
@@ -39718,7 +37285,7 @@ install-target-boehm-gc: installdirs
@endif target-boehm-gc
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-boehm-gc info-target-boehm-gc
maybe-info-target-boehm-gc:
@@ -39772,32 +37339,6 @@ dvi-target-boehm-gc: \
@endif target-boehm-gc
-.PHONY: maybe-pdf-target-boehm-gc pdf-target-boehm-gc
-maybe-pdf-target-boehm-gc:
-@if target-boehm-gc
-maybe-pdf-target-boehm-gc: pdf-target-boehm-gc
-
-pdf-target-boehm-gc: \
- configure-target-boehm-gc
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/boehm-gc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/boehm-gc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-boehm-gc
-
.PHONY: maybe-html-target-boehm-gc html-target-boehm-gc
maybe-html-target-boehm-gc:
@if target-boehm-gc
@@ -40131,7 +37672,7 @@ install-target-qthreads: installdirs
@endif target-qthreads
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-qthreads info-target-qthreads
maybe-info-target-qthreads:
@@ -40185,32 +37726,6 @@ dvi-target-qthreads: \
@endif target-qthreads
-.PHONY: maybe-pdf-target-qthreads pdf-target-qthreads
-maybe-pdf-target-qthreads:
-@if target-qthreads
-maybe-pdf-target-qthreads: pdf-target-qthreads
-
-pdf-target-qthreads: \
- configure-target-qthreads
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/qthreads" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/qthreads && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-qthreads
-
.PHONY: maybe-html-target-qthreads html-target-qthreads
maybe-html-target-qthreads:
@if target-qthreads
@@ -40544,7 +38059,7 @@ install-target-rda: installdirs
@endif target-rda
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-rda info-target-rda
maybe-info-target-rda:
@@ -40598,32 +38113,6 @@ dvi-target-rda: \
@endif target-rda
-.PHONY: maybe-pdf-target-rda pdf-target-rda
-maybe-pdf-target-rda:
-@if target-rda
-maybe-pdf-target-rda: pdf-target-rda
-
-pdf-target-rda: \
- configure-target-rda
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/rda" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/rda && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-rda
-
.PHONY: maybe-html-target-rda html-target-rda
maybe-html-target-rda:
@if target-rda
@@ -40957,7 +38446,7 @@ install-target-libada: installdirs
@endif target-libada
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libada info-target-libada
maybe-info-target-libada:
@@ -41011,32 +38500,6 @@ dvi-target-libada: \
@endif target-libada
-.PHONY: maybe-pdf-target-libada pdf-target-libada
-maybe-pdf-target-libada:
-@if target-libada
-maybe-pdf-target-libada: pdf-target-libada
-
-pdf-target-libada: \
- configure-target-libada
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libada" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libada && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-libada
-
.PHONY: maybe-html-target-libada html-target-libada
maybe-html-target-libada:
@if target-libada
@@ -41370,7 +38833,7 @@ install-target-libgomp: installdirs
@endif target-libgomp
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libgomp info-target-libgomp
maybe-info-target-libgomp:
@@ -41424,32 +38887,6 @@ dvi-target-libgomp: \
@endif target-libgomp
-.PHONY: maybe-pdf-target-libgomp pdf-target-libgomp
-maybe-pdf-target-libgomp:
-@if target-libgomp
-maybe-pdf-target-libgomp: pdf-target-libgomp
-
-pdf-target-libgomp: \
- configure-target-libgomp
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libgomp" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libgomp && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- pdf) \
- || exit 1
-
-@endif target-libgomp
-
.PHONY: maybe-html-target-libgomp html-target-libgomp
maybe-html-target-libgomp:
@if target-libgomp
diff --git a/Makefile.tpl b/Makefile.tpl
index 5ce38ab..0825a1e 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -537,13 +537,12 @@ do-[+make_target+]:
# Here are the targets which correspond to the do-X targets.
-.PHONY: info installcheck dvi pdf html install-info install-html
+.PHONY: info installcheck dvi html install-info install-html
.PHONY: clean distclean mostlyclean maintainer-clean realclean
.PHONY: local-clean local-distclean local-maintainer-clean
info: do-info
installcheck: do-installcheck
dvi: do-dvi
-pdf: do-pdf
html: do-html
# Make sure makeinfo is built before we do a `make info', if we're
@@ -854,12 +853,9 @@ all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
maybe-clean-stage[+id+]-[+prefix+][+module+]: clean-stage[+id+]-[+prefix+][+module+]
clean-stage[+id+]: clean-stage[+id+]-[+prefix+][+module+]
clean-stage[+id+]-[+prefix+][+module+]:
- @if [ $(current_stage) = stage[+id+] ]; then \
- [ -f [+subdir+]/[+module+]/Makefile ] || exit 0; \
- else \
- [ -f [+subdir+]/stage[+id+]-[+module+]/Makefile ] || exit 0; \
- $(MAKE) stage[+id+]-start; \
- fi; \
+ @[ -f [+subdir+]/[+module+]/Makefile ] || [ -f [+subdir+]/stage[+id+]-[+module+]/Makefile ] \
+ || exit 0 ; \
+ [ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start; \
cd [+subdir+]/[+module+] && \
$(MAKE) [+args+] [+ IF prev +] \
[+poststage1_args+] [+ ENDIF prev +] \
@@ -940,7 +936,7 @@ install-[+module+]: installdirs
[+ ENDIF no_install +]
@endif [+module+]
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
[+ FOR recursive_targets +]
.PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
maybe-[+make_target+]-[+module+]:
@@ -1048,7 +1044,7 @@ ENDIF raw_cxx +]
[+ ENDIF no_install +]
@endif target-[+module+]
-# Other targets (info, dvi, pdf, etc.)
+# Other targets (info, dvi, etc.)
[+ FOR recursive_targets +]
.PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
maybe-[+make_target+]-target-[+module+]:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 3463f57..e032bb6 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,804 +1,3 @@
-2006-11-13 Daniel Jacobowitz <dan@codesourcery.com>
-
- * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
- prototype.
- (bfd_elf32_arm_set_byteswap_code): New prototype.
- * bfd-in2.h: Regenerate.
- * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Don't take
- byteswap_code as an argument. Revert 2006-11-01 change.
- (bfd_elf32_arm_set_byteswap_code): New.
- (elf32_arm_size_dynamic_sections): Call
- bfd_elf32_arm_process_before_allocation.
-
-2006-11-10 Thiemo Seufer <ths@mips.com>
-
- * config.bfd (mips*el-sde-elf*, mips*-sde-elf*): Drop ECOFF support
- for SDE configs.
-
-2006-11-10 Nick Clifton <nickc@redhat.com>
-
- * config.bfd: Move previously obsoleted targets to the REMOVED
- list.
- Add maxq-*-coff to the obsolete list.
-
-2006-11-10 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * pe-arm-wince.c (LOCAL_LABEL_PREFIX): Define as ".".
- * pei-arm-wince.c (LOCAL_LABEL_PREFIX): Likewise.
- * coff-arm.c (LOCAL_LABEL_PREFIX): Only define if not defined before.
-
-2006-11-07 Daniel Jacobowitz <dan@codesourcery.com>
-
- * elf32-arm.c (find_thumb_glue): Add ERROR_MESSAGE argument; set it
- on error.
- (find_arm_glue): Likewise.
- (elf32_thumb_to_arm_stub, elf32_arm_create_thumb_stub)
- (elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate): Add
- ERROR_MESSAGE argument and pass it through.
- (elf32_arm_to_thumb_export_stub): Update.
- (elf32_arm_relocate_section): Use ERROR_MESSAGE and reloc_dangerous.
-
-2006-11-07 Alan Modra <amodra@bigpond.net.au>
-
- * elf64-ppc.c (enum _ppc64_sec_type): New.
- (struct _ppc64_elf_section_data): Move "t_symndx" into opd union,
- and rename fields. Add sec_type and has_14bit_branch.
- (struct ppc_link_hash_table): Remove has_14bit_branch.
- (get_opd_info, get_tls_mask, ppc64_elf_edit_opd): Adjust.
- (ppc64_elf_relocate_section): Likewise.
- (ppc64_elf_check_relocs): Likewise. Set per-section has_14bit_branch.
- (ppc64_elf_size_stubs): Don't set default group size here.
- (group_sections): Instead do so here, and group sections using
- their individual requirements.
-
-2006-11-07 Alan Modra <amodra@bigpond.net.au>
-
- * elf64-ppc.c (struct ppc64_elf_obj_tdata): Remove "has_dotsym"
- and union.
- (struct ppc_link_hash_entry): Add "next_dot_sym".
- (struct ppc_link_hash_table): Add "dot_syms".
- (link_hash_newfunc): Make list of syms starting with a dot.
- (ppc_get_stub_entry, adjust_opd_syms): Adjust.
- (ppc64_elf_add_symbol_hook): Don't set has_dotsym.
- (struct add_symbol_adjust_data): Delete.
- (add_symbol_adjust): Simplify params and return.
- (ppc64_elf_check_directives): Just process the "dot_syms" lists,
- not all syms.
-
-2006-11-02 Daniel Jacobowitz <dan@codesourcery.com>
-
- * libbfd-in.h (_bfd_clear_contents): New prototype.
- * reloc.c (_bfd_clear_contents): New.
- * libbfd.h: Regenerated.
-
- * elf32-arm.c (elf32_arm_final_link_relocate): Use
- _bfd_clear_contents.
- * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
- * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
- * elf32-i386.c (elf_i386_relocate_section): Likewise.
- * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
- * elf32-s390.c (elf_s390_relocate_section): Likewise.
- * elf32-sh.c (sh_elf_relocate_section): Likewise.
- * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
- * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
- * elf64-s390.c (elf_s390_relocate_section): Likewise.
- * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
- * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
-
- * elfxx-ia64.c (elfNN_ia64_relocate_section): Set value to
- zero for discarded symbols.
- * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
-
-2006-11-01 Thiemo Seufer <ths@mips.com>
- David Ung <davidu@mips.com>
-
- * elf-bfd.h (local_call_stubs): New member.
- * elfxx-mips.c (FN_STUB_P, CALL_STUB_P, CALL_FP_STUB_P): New macros.
- (mips_elf_calculate_relocation): Handle local mips16 call stubs.
- (mips16_stub_section_p): Rename from mips_elf_stub_section_p, use
- the new stub macros.
- (_bfd_mips_elf_check_relocs): Handle call stubs for code which
- mixes mips16 and mips32 functions. Use mips16_stub_section_p. Mark
- used stubs with SEC_KEEP. Use the new stub macros.
-
-2006-11-01 Alan Modra <amodra@bigpond.net.au>
-
- * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Correct
- check for PLT usage.
-
-2006-11-01 Daniel Jacobowitz <dan@codesourcery.com>
-
- * elfxx-mips.c (mips_elf_merge_gots): Always use maxcnt.
-
-2006-10-31 Alan Modra <amodra@bigpond.net.au>
-
- * elf.c (elfcore_write_note): Pad note descriptor to 4-byte
- boundary. Tidy. Comment.
-
-2006-10-30 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3111
- * elf-bfd.h (elf_obj_tdata): Add symbuf.
- (_bfd_elf_section_already_linked): Add struct bfd_link_info *.
- (_bfd_elf_check_kept_section): Likewise.
- (bfd_elf_match_symbols_in_sections): Likewise.
-
- * elf.c (assign_section_numbers): Updated to add
- struct bfd_link_info *.
- (bfd_elf_match_symbols_in_sections): Updated. Cache symbol
- buffer if info->reduce_memory_overheads is false.
-
- * elflink.c (match_group_member): Updated to add
- struct bfd_link_info *.
- (_bfd_elf_check_kept_section): Likewise.
- (elf_link_input_bfd): Likewise.
- (_bfd_elf_section_already_linked): Likewise.
- (bfd_elf_final_link): Free symbol buffer if
- info->reduce_memory_overheads is false.
-
- * libbfd-in.h (_bfd_nolink_section_already_linked): Add
- struct bfd_link_info *.
- (_bfd_generic_section_already_linked): Likewise.
- * libbfd.h: Regenerated.
-
- * linker.c (bfd_section_already_linked): Add
- struct bfd_link_info *.
- (_bfd_generic_section_already_linked): Likewise.
- * targets.c (bfd_target): Add struct bfd_link_info * to
- _section_already_linked.
- * bfd-in2.h: Regenerated.
-
-2006-10-30 Alan Modra <amodra@bigpond.net.au>
-
- * bfd.c (bfd_error_type): Add bfd_error_on_input.
- (input_bfd, input_error): New static vars.
- (bfd_set_error): Handle bfd_error_on_input.
- (bfd_errmsg): Likewise.
- (bfd_perror): Simplify.
- * archive.c (_bfd_write_archive_contents): Report errors on input.
- * bfd-in2.h: Regenerate.
-
-2006-10-30 Alan Modra <amodra@bigpond.net.au>
-
- * elf.c (elfcore_write_note): Pad to 4-byte boundary.
-
-2006-10-28 Richard Sandiford <richard@codesourcery.com>
-
- * elf32-mips.c (elf_mips_howto_table_rel): Add R_MIPS_GLOB_DAT.
- * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
- (elf_mips_howto_table_rela): Likewise.
- * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
- (mips_elf64_howto_table_rela): Likewise.
-
-2006-10-26 H.J. Lu <hongjiu.lu@intel.com>
-
- * elf.c (_bfd_elf_init_private_section_data): Assert output
- section ELF type instead of check if it is SHT_NULL. Copy
- OS/PROC specific flags from input section to output section.
-
-2006-10-27 Alan Modra <amodra@bigpond.net.au>
-
- * section.c (SEC_KEEP): Update comment.
- * bfd-in2.h: Regenerate.
- * elflink.c (bfd_elf_gc_sections): Ignore SEC_EXCLUDE sections.
- * merge.c (_bfd_merge_sections): Set SEC_KEEP on excluded sections.
- * stabs.c (_bfd_discard_section_stabs): Likewise.
- (_bfd_link_section_stabs): Likewise. Simplify abs_section check.
-
-2006-10-26 Ben Elliston <bje@au.ibm.com>
-
- * reloc.c (_bfd_relocate_contents): Remove explicit case 0.
-
- * elf.c (bfd_section_from_shdr): Remove extraneous breaks.
- * targets.c (find_target): Remove extraneous break.
-
-2006-10-26 Ben Elliston <bje@au.ibm.com>
-
- * coff-maxq.c (coff_maxq20_reloc): Remove unused variable `howto'.
- (struct maxq_reloc_map): Unused; remove.
- (maxq_reloc_map): Likewise.
- (maxq_reloc_type_lookup): Remove loop over maxq_reloc_map.
-
-2006-10-26 Ben Elliston <bje@au.ibm.com>
-
- * elf.c (bfd_elf_set_dyn_lib_class): Change second argument type
- from int to enum dynamic_lib_link_class lib_class.
- * bfd-in.h (bfd_elf_set_dyn_lib_class): Likewise.
- * bfd-in2.h: Regenerate.
-
-2006-10-25 Alan Modra <amodra@bigpond.net.au>
- Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
- Yukishige Shibata <shibata@rd.scei.sony.co.jp>
- Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
- Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
-
- * cpu-spu.c: New file.
- * elf32-spu.c: New file.
- * elf32-spu.h: New file.
- * archures.c: Add SPU support.
- * config.bfd: Likewise.
- * configure.in: Likewise.
- * reloc.c: Likewise.
- * targets.c: Likewise.
- * Makefile.am: Likewise. Run "make dep-am".
- * libbfd.h: Regenerate.
- * bfd-in2.h: Regenerate.
- * Makefile.in: Regenerate.
- * configure: Regenerate.
- * po/SRC-POTFILES.in: Regenerate.
-
-2006-10-23 Alan Modra <amodra@bigpond.net.au>
-
- * elf64-ppc.c (ppc64_elf_edit_opd): Clarify comment.
-
-2006-10-23 Alan Modra <amodra@bigpond.net.au>
-
- * elf32-score.c: Formatting.
- (elf_backend_omit_section_dynsym): Define.
- (score_elf_create_dynamic_relocation): Remove code copied from mips.
- Don't use section syms in dynamic relocs. Remove unused param.
- (score_elf_final_link_relocate): Remove unused param.
-
-2006-10-23 Alan Modra <amodra@bigpond.net.au>
-
- * linker.c (fix_syms): Choose best of previous and next
- section based on section flags and vma.
-
-2006-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
-
- * elf32-sh64.c (sh64_elf_merge_symbol_attribute): Do merging
- only when the non visibility part of st_other is non-zero.
- * elf64-sh64.c (sh64_elf64_merge_symbol_attribute): Likewise.
-
-2006-10-20 Richard Sandiford <richard@codesourcery.com>
-
- * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't extend
- PT_DYNAMIC on GNU/Linux targets.
-
-2006-10-20 Richard Sandiford <richard@codesourcery.com>
-
- * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Make the
- size of .rel.dyn reflect the value of DT_RELSZ.
-
-2006-10-20 Richard Sandiford <richard@codesourcery.com>
-
- * elfxx-mips.c (_bfd_mips_elf_additional_program_headers): Allocate
- a PT_NULL header for dynamic objects.
- (_bfd_mips_elf_modify_segment_map): Add it.
-
-2006-10-19 Mei Ligang <ligang@sunnorth.com.cn>
-
- * elf32-score.c (score_elf_rel_dyn_section): Replace
- bfd_make_section with bfd_make_section_with_flags.
- (_bfd_score_elf_create_dynamic_sections): Ditto.
- (score_elf_create_got_section): Ditto.
- (score_elf_final_link_relocate): Delete referrence to
- EF_SCORE_HASENTRY.
-
-2006-10-19 Richard Sandiford <richard@codesourcery.com>
-
- * elfxx-mips.c (sort_dynamic_relocs): Sort relocations against the
- same symbol by increasing r_offset.
- (sort_dynamic_relocs_64): Likewise. Fix comparisons between very
- large and very small symbol indexes.
-
-2006-10-19 Richard Sandiford <richard@codesourcery.com>
-
- * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG
- and DT_MIPS_RLD_MAP tags for position-independent executables.
- Do not add DT_DEBUG to shared libraries for any MIPS target.
-
-2006-10-18 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3290
- * elflink.c (elf_link_add_object_symbols): Hide definitions in
- debug sections.
-
-2006-10-19 Alan Modra <amodra@bigpond.net.au>
-
- * elf32-arm.c (bfd_elf32_arm_allocate_interworking_sect): Check,
- don't set, glue section size.
- (record_arm_to_thumb_glue): Set glue section size here.
- (record_thumb_to_arm_glue): Likewise.
- (bfd_elf32_arm_add_glue_sections_to_bfd): Formatting.
- (bfd_elf32_arm_process_before_allocation): Ignore exluded sections.
-
-2006-10-18 Roy Marples <uberlord@gentoo.org>
-
- * elf64-sparc.c: Add FreeBSD support.
- (elf64_sparc_fbsd_post_process_headers): New function.
- * targets.c (_bfd_target_vector): Add bfd_elf64_sparc_freebsd_vec.
- * config.bfd (sparc64-*-freebsd*): Set targ_defvec to bfd_elf64_sparc_freebsd_vec.
- * configure.in: Add entry for bfd_elf64_sparc_freebsd_vec.
- * configure: Regenerate.
-
-2006-10-17 Mark Shinwell <shinwell@codesourcery.com>
-
- * elf32-arm.c (elf32_arm_final_link_relocate): Add support for
- R_ARM_MOVW_BREL_NC, R_ARM_MOVW_BREL, R_ARM_MOVT_BREL,
- R_ARM_THM_MOVW_BREL_NC, R_ARM_THM_MOVW_BREL and
- R_ARM_THM_MOVT_BREL relocations.
-
-2006-10-17 Mark Shinwell <shinwell@codesourcery.com>
-
- * elf32-arm.c (elf32_arm_howto_table_1): Change offset for
- R_THM_CALL to 25 and remove FIXME comment.
- (using_thumb2): New function.
- (elf32_arm_final_link_relocate): Cope with Thumb-2 BL encoding.
-
-2006-10-17 Mark Shinwell <shinwell@codesourcery.com>
-
- * elf32-arm.c (elf32_arm_final_link_relocate): Add cases
- for R_ARM_ABS32_NOI and R_ARM_REL32_NOI.
- (elf32_arm_gc_sweep_hook): Likewise.
- (elf32_arm_check_relocs): Likewise.
- (allocate_dynrelocs): Likewise.
-
-2006-10-17 Alan Modra <amodra@bigpond.net.au>
-
- * elf-bfd.h (struct elf_link_hash_table): Reorder. Add
- text_index_section and data_index_section.
- (struct elf_backend_data): Add elf_backend_init_index_section.
- (_bfd_elf_init_1_index_section): Declare.
- (_bfd_elf_init_2_index_sections): Declare.
- * elfxx-target.h (elf_backend_init_index_section): Define.
- (elfNN_bed): Init new field.
- * elflink.c (_bfd_elf_link_omit_section_dynsym): Keep first tls
- section and text_index_section plus data_index_section.
- (_bfd_elf_link_renumber_dynsyms): Clear dynindx on omitted sections.
- (_bfd_elf_init_1_index_section): New function.
- (_bfd_elf_init_2_index_sections): New function.
- (bfd_elf_size_dynsym_hash_dynstr): Call elf_backend_init_index_section.
- (elf_link_input_bfd): When emitting relocs, use text_index_section
- and data_index_section for removed sections.
- * elf-m10300.c (elf_backend_omit_section_dynsym): Define.
- * elf32-i386.c: Likewise.
- * elf32-m32r.c: Likewise.
- * elf32-sh.c: Likewise.
- * elf32-xstormy16.c: Likewise.
- * elf32-xtensa.c: Likewise.
- * elf64-alpha.c: Likewise.
- * elf64-hppa.c: Likewise.
- * elf64-mmix.c: Likewise.
- * elf64-sh64.c: Likewise.
- * elfxx-ia64.c: Likewise.
- * elf32-arm.c (elf32_arm_final_link_relocate): Use text_index_section
- and data_index_section sym for relocs against sections with no dynamic
- section sym.
- (elf_backend_init_index_section): Define.
- * elf32-cris.c: Similarly.
- * elf32-hppa.c: Similarly.
- * elf32-i370.c: Similarly.
- * elf32-m68k.c: Similarly.
- * elf32-mips.c: Similarly.
- * elf32-ppc.c: Similarly.
- * elf32-s390.c: Similarly.
- * elf32-sparc.c: Similarly.
- * elf32-vax.c: Similarly.
- * elf64-mips.c: Similarly.
- * elf64-ppc.c: Similarly.
- * elf64-s390.c: Similarly.
- * elf64-sparc.c: Similarly.
- * elf64-x86-64.c: Similarly.
- * elfn32-mips.c: Similarly.
- * elfxx-mips.c: Similarly.
- * elfxx-sparc.c: Similarly.
- * linker.c (fix_syms): Base symbols in removed sections on
- previous section in preference to using absolute section.
-
-2006-10-16 Andreas Schwab <schwab@suse.de>
-
- * elfxx-ia64.c (addend_compare): Properly compute return value.
-
-2006-10-15 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3314
- * elf.c (assign_file_positions_for_non_load_sections): Don't
- page align empty SHF_ALLOC sections.
-
-2006-10-13 Jakub Jelinek <jakub@redhat.com>
-
- * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections): Set
- .plt sh_entsize to 0 if plt header size isn't multiple of
- plt entry size or for 32-bit which adds a nop insn at the
- end of the .plt section.
-
-2006-10-12 Bob Wilson <bob.wilson@acm.org>
-
- * elf32-xtensa.c (elf_xtensa_action_discarded): New.
- (elf_backend_action_discarded): Define.
-
-2006-10-11 Bob Wilson <bob.wilson@acm.org>
-
- * elf32-xtensa.c (elf_xtensa_relocate_section): Return after
- unresolvable relocation error.
- (elf_xtensa_finish_dynamic_symbol): Set value of undefined, weak
- symbols to zero.
-
-2006-10-10 Bob Wilson <bob.wilson@acm.org>
-
- * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Add DT_DEBUG
- for PIE executables.
-
-2006-10-03 Jakub Jelinek <jakub@redhat.com>
-
- * elf-bfd.h (struct eh_cie_fde): Add set_loc pointer.
- * elf-eh-frame.c (skip_cfa_op): Fix handling of DW_CFA_advance_loc.
- Handle DW_CFA_{remember,restore}_state, DW_CFA_GNU_window_save,
- DW_CFA_val_{offset{,_sf},expression}.
- (skip_non_nops): Record number of DW_CFA_set_loc ops.
- (_bfd_elf_discard_section_eh_frame): Require skip_non_nops recognizes
- all ops. If there are any DW_CFA_set_loc ops and they are pcrel
- or going to be pcrel, compute set_loc array.
- (_bfd_elf_eh_frame_section_offset): If make_relative, kill relocations
- against DW_CFA_set_loc operands.
- (_bfd_elf_write_section_eh_frame): Handle DW_CFA_set_loc adjusting.
-
-2006-10-02 Daniel Jacobowitz <dan@codesourcery.com>
-
- * elflink.c (_bfd_elf_merge_symbol): Discard references to TLS
- symbols from the --just-syms file.
-
-2006-10-01 Alan Modra <amodra@bigpond.net.au>
-
- * elf64-ppc.c (ppc64_elf_build_stubs): Test glink size for
- existence of PLT.
-
-2006-09-29 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3283
- * elf64-x86-64.c (elf64_x86_64_relocate_section): Don't ignore
- relocation overflow on branches to undefweaks.
-
-2006-09-29 Alan Modra <amodra@bigpond.net.au>
-
- * po/BLD-POTFILES.in: Regenerate.
- * po/SRC-POTFILES.in: Regenerate.
-
-2006-09-29 Danny Smith <dannysmith@users.sourceforge.net>
-
- PR 3276
- * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
- alignment for .data$, .rdata$ and .text$ sections so that sse
- and sse2 code will work for linkonce sections too.
- * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
-
-2006-09-28 Alan Modra <amodra@bigpond.net.au>
-
- * elflink.c (_bfd_elf_gc_mark_hook): New function.
- * elf-bfd.h (_bfd_elf_gc_mark_hook): Declare.
- * elfxx-target.h (elf_backend_gc_mark_hook): Default to above.
- * elf-m10300.c (mn10300_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
- * elf32-arm.c (elf32_arm_gc_mark_hook): Likewise.
- * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
- * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
- * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
- * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
- * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
- * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
- * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
- * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
- * elf32-score.c (_bfd_score_elf_gc_mark_hook): Likewise.
- * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
- * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
- * elf32-xtensa.c (elf_xtensa_gc_mark_hook): Likewise.
- * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
- * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
- * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
- * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
- * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise.
- * elf32-bfin.c (bfin_gc_mark_hook): Likewise.
- (bfinfdpic_gc_sweep_hook): Delete.
- (elf_backend_gc_sweep_hook): Don't define for elf32-bfinfdpic.
- * elf32-d10v.c (elf32_d10v_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
- (elf32_d10v_gc_sweep_hook): Delete.
- (elf_backend_gc_sweep_hook): Don't define.
- * elf32-fr30.c (fr30_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
- (fr30_elf_gc_sweep_hook): Delete.
- (elf_backend_gc_sweep_hook): Don't define.
- * elf32-frv.c (elf32_frv_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
- (elf32_frv_gc_sweep_hook): Delete.
- (elf_backend_gc_sweep_hook): Don't define.
- * elf32-iq2000.c (iq2000_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
- (iq2000_elf_gc_sweep_hook): Delete.
- (elf_backend_gc_sweep_hook): Don't define.
- * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Use
- _bfd_elf_gc_mark_hook.
- (openrisc_elf_gc_sweep_hook): Delete.
- (elf_backend_gc_sweep_hook): Don't define.
- * elf32-v850.c (v850_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
- (v850_elf_gc_sweep_hook): Delete.
- (elf_backend_gc_sweep_hook): Don't define.
- * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Use
- _bfd_elf_gc_mark_hook.
- (xstormy16_elf_gc_sweep_hook): Delete.
- (elf_backend_gc_sweep_hook): Don't define.
- * elf64-sh64.c (sh_elf64_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
- (sh_elf64_gc_sweep_hook): Delete.
- (elf_backend_gc_sweep_hook): Don't define.
- * elf32-avr.c (elf32_avr_gc_mark_hook): Delete.
- (elf32_avr_gc_sweep_hook): Delete.
- (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
- * elf32-cr16c.c (elf32_cr16c_gc_mark_hook): Delete.
- (elf32_cr16c_gc_sweep_hook): Delete.
- (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
- * elf32-crx.c (elf32_crx_gc_mark_hook): Delete.
- (elf32_crx_gc_sweep_hook): Delete.
- (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
- * elf32-h8300.c (elf32_h8_gc_mark_hook): Delete.
- (elf32_h8_gc_sweep_hook): Delete.
- (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
- * elf32-ip2k.c (ip2k_elf_gc_mark_hook): Delete.
- (ip2k_elf_gc_sweep_hook): Delete.
- (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
- * elf32-m32c.c (m32c_elf_gc_mark_hook, m32c_elf_gc_sweep_hook): Delete.
- (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
- * elf32-m68hc11.c (elf_backend_gc_mark_hook): Don't define.
- (elf_backend_gc_sweep_hook): Don't define.
- * elf32-m68hc12.c (elf_backend_gc_mark_hook): Don't define.
- (elf_backend_gc_sweep_hook): Don't define.
- * elf32-m68hc1x.c (elf32_m68hc11_gc_mark_hook): Delete.
- (elf32_m68hc11_gc_sweep_hook): Delete.
- * elf32-m68hc1x.h (elf32_m68hc11_gc_mark_hook): Delete.
- (elf32_m68hc11_gc_sweep_hook): Delete.
- * elf32-msp430.c (elf32_msp430_gc_mark_hook): Delete.
- (elf32_msp430_gc_sweep_hook): Delete.
- (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
- * elf32-mt.c (mt_elf_gc_mark_hook, mt_elf_gc_sweep_hook): Delete.
- (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
-
-2006-09-25 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * bfd-in.h (CONST_STRNCPY) : Delete.
- (LITSTRCPY) : New.
- (LITMEMCPY) : New.
- * bfd-in2.h : Regenerate.
- * elflink.c (bfd_elf_gc_sections) : Use LITMEMCPY. Don't manually
- calculate string lengths.
- * nlmcode.h (nlm_swap_auxiliary_headers_in) : Use LITMEMCPY.
-
-2006-09-26 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3223
- PR ld/3267
- * elf.c (assign_file_positions_for_non_load_sections): Don't
- warn zero size allocated sections.
-
-2006-09-27 Alan Modra <amodra@bigpond.net.au>
-
- * elf32-score.c (_bfd_score_elf_relocate_section): Move assignment
- to "name" so that compiler realizes it is never uninitialized.
- Use bfd_elf_sym_name.
-
-2006-09-26 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/3262
- * elf.c (rewrite_elf_program_header): Use bfd_zalloc instead of
- bfd_alloc to allocate segment map.
- (copy_elf_program_header): Likewise.
-
-2006-09-26 Mark Shinwell <shinwell@codesourcery.com>
- Joseph Myers <joseph@codesourcery.com>
- Ian Lance Taylor <ian@wasabisystems.com>
- Ben Elliston <bje@wasabisystems.com>
-
- * archures.c: Add definition for bfd_mach_arm_iWMMXt2.
- * cpu-arm.c (processors): Add bfd_mach_arm_iWMMXt2.
- (arch_info_struct, bfd_arm_update_notes): Likewise.
- (architectures): Likewise.
- (bfd_arm_merge_machines): Check for iWMMXt2.
- * bfd-in2.h: Rebuild.
-
-2006-09-24 H.J. Lu <hongjiu.lu@intel.com>
-
- * configure: Regenerated.
-
-2006-09-22 Alan Modra <amodra@bigpond.net.au>
-
- * elfcode.h (elf_swap_symbol_in): Return bfd_boolean. Don't abort
- on error.
- * elf-bfd.h (elf_size_info <swap_symbol_in>): Adjust decl.
- (bfd_elf32_swap_symbol_in, bfd_elf64_swap_symbol_in): Likewise.
- * elf.c (bfd_elf_get_elf_syms): Test return of swap_symbol_in,
- and report error.
- * elf32-arm.c (elf32_arm_swap_symbol_in): Return bfd_boolean.
-
-2006-09-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * elf32-s390.c (elf_s390_relocate_section): Remove check for code
- section in LD to LE linker relaxation for R_390_TLS_LDO32.
- * elf64-s390.c (elf_s390_relocate_section): Likewise for
- R_390_TLS_LDO64.
-
-2006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
-
- * configure.in: Added new target-vectors x86_64coff_vec,
- x86_64pe_vec, and x86_64pei_vec.
- * configure: Regenerate.
- * config.bfd: Adjusted x86_64 target architecture detection.
- * bfd.c: Add for new target "coff-x86-64"
- (bfd_get_sign_extend): Add target vector idents for pe-x86-64. and pei-x86-64.
- * coff-x86_64.c: Add new file for x86_64 (AMD64) coff support.
- * libpei.h: Adjustments for COFF_WITH_pex64.
- * coffcode.h: Add for new target machine, architecture, signature, and internal
- signature handler.
- * Makefile.am: Add new files to target-all and define make-rule for pex64igen.c
- * Makefile.in: Regenerate.
- * pe-x86_64.c: Add for new target "pe-x86-64".
- * pei-x86_64.c: Add for new target "pei-x86-64".
- * peicode.h: Adjusts for new targets.
- (coff_swap_filehdr_out): Set for this target to
- _bfd_pex64_only_swap_filehdr_out.
- (SIZEOF_IDATA4): Define it as 8 byte size for this target.
- (SIZEOF_IDATA5): Define it as 8 byte size for this target.
- (jump_table jtab): Add for AMD64MAGIC.
- (pe_ILF_build_a_bfd): Adjusts for new size of SIZEOF_IDATA4 and SIZE_IDATA5.
- (pe_ILF_object_p): Add coff image-file signature to internal
- signature translation.
- * peXXigen.c: Adjust proper include of target coff-header and
- introduced target specific code
- (COFF_WITH_pex64): New macro for this target.
- (pe_print_idata): New dumping method for import section of PE+ files.
- * targets.c: Add new target vectors declarations for x86_64 coff targets.
- * coffcode.h: Support code to support the x86_64 PE magic number.
- * coff-x86_64.c: New file.
-
-2006-09-17 Hans-Peter Nilsson <hp@axis.com>
-
- * elf.c (special_sections_s): Revert last STRING_COMMA_LEN change
- for .stabstr entry, explain why.
-
-2006-09-17 Anton Blanchard <anton@samba.org>
- Alan Modra <amodra@bigpond.net.au>
-
- * dwarf2.c (concat_filename): Apply DW_AT_comp_dir if dir table
- entry isn't absolute.
-
-2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
-
- * cpu-score.c: New file.
- * elf32-score.c: New file.
- * config.bfd: Add Score target.
- * Makefile.am: Add Score files.
- * Makefile.in: Regenerate.
- * archures.c: Add Score architecture.
- * reloc.c: Add Score relocs.
- * targets.c: Add Score target vectors.
- * bfd-in2.h: Regenerate.
- * libbfd.h: Regenerate.
- * configure.in: Add Score target.
- * configure: Regenerate.
-
-2006-09-16 Nick Clifton <nickc@redhat.com>
- Pedro Alves <pedro_alves@portugalmail.pt>
-
- * bfd-in.h (STRING_AND_COMMA): New macro. Takes one constant
- string as its argument and emits the string followed by a comma
- and then the length of the string.
- (CONST_STRNEQ): New macro. Checks to see if a variable string
- has a constant string as its initial characters.
- (CONST_STRNCPY): New macro. Copies a constant string to the start
- of a variable string.
- * bfd-in2.h: Regenerate.
- * archive.c: Make use of the new macros.
- * archive64.c: Likewise.
- * bfd.c: Likewise.
- * coff-ppc.c: Likewise.
- * coff-stgo32.c: Likewise.
- * coffcode.h: Likewise.
- * cofflink.c: Likewise.
- * cpu-i960.c: Likewise.
- * dwarf2.c: Likewise.
- * ecoff.c: Likewise.
- * elf-m10300.c: Likewise.
- * elf.c: Likewise.
- * elf32-arm.c: Likewise.
- * elf32-bfin.c: Likewise.
- * elf32-cris.c: Likewise.
- * elf32-hppa.c: Likewise.
- * elf32-i370.c: Likewise.
- * elf32-i386.c: Likewise.
- * elf32-iq2000.c: Likewise.
- * elf32-m32r.c: Likewise.
- * elf32-m68hc11.c: Likewise.
- * elf32-m68hc12.c: Likewise.
- * elf32-m68k.c: Likewise.
- * elf32-mcore.c: Likewise.
- * elf32-ppc.c: Likewise.
- * elf32-s390.c: Likewise.
- * elf32-sh-symbian.c: Likewise.
- * elf32-sh.c: Likewise.
- * elf32-sh64.c: Likewise.
- * elf32-v850.c: Likewise.
- * elf32-vax.c: Likewise.
- * elf32-xtensa.c: Likewise.
- * elf64-alpha.c: Likewise.
- * elf64-hppa.c: Likewise.
- * elf64-mmix.c: Likewise.
- * elf64-ppc.c: Likewise.
- * elf64-s390.c: Likewise.
- * elf64-sh64.c: Likewise.
- * elf64-x86-64.c: Likewise.
- * elflink.c: Likewise.
- * elfxx-ia64.c: Likewise.
- * elfxx-mips.c: Likewise.
- * elfxx-sparc.c: Likewise.
- * hpux-core.c: Likewise.
- * i386linux.c: Likewise.
- * ieee.c: Likewise.
- * libpei.h: Likewise.
- * linker.c: Likewise.
- * m68klinux.c: Likewise.
- * mmo.c: Likewise.
- * nlmcode.h: Likewise.
- * osf-core.c: Likewise.
- * pef.c: Likewise.
- * som.c: Likewise.
- * sparclinux.c: Likewise.
- * vms-hdr.c: Likewise.
-
-2006-09-14 Alan Modra <amodra@bigpond.net.au>
-
- PR 3181
- * elf.c (_bfd_elf_copy_private_header_data): Fix group members
- that have had their SHT_GROUP section removed.
-
-2006-09-12 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3197
- * elflink.c (elf_link_output_extsym): Compute bucket only if
- needed.
-
-2006-09-10 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/3186
- * elf.c (_bfd_elf_make_section_from_shdr): Correct length of
- "gnu.linkonce.wi.".
-
-2006-09-08 Vladimir Prus <vladimir@codesourcery.com>
-
- * elf32-arm.c (elf32_arm_swap_symbol_out): Remove
- unconditional setting of low bit for Thumb symbol
- mistakenly left behind after check for external
- symbols was added. Fix comment typo.
-
-2006-09-07 H.J. Lu <hongjiu.lu@intel.com>
-
- * elf-bfd.h (elf_link_hash_entry): Add a dynamic field.
- (bfd_elf_link_mark_dynamic_symbol): New.
- (SYMBOLIC_BIND): New.
-
- * elf32-i386.c (elf_i386_check_relocs): Replace info->symbolic
- with SYMBOLIC_BIND (info, h).
- (elf_i386_relocate_section): Likewise.
- * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
- (elf64_x86_64_relocate_section): Likewise.
- * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
-
- * elflink.c (bfd_elf_link_mark_dynamic_symbol): New.
- (bfd_elf_record_link_assignment): Call
- bfd_elf_link_mark_dynamic_symbol on new entry.
- (_bfd_elf_merge_symbol): Likewise.
- (_bfd_elf_export_symbol): Return if the symbol isn't exported.
- (_bfd_elf_fix_symbol_flags): Replace info->symbolic with
- SYMBOLIC_BIND (info, h).
- (_bfd_elf_dynamic_symbol_p): Likewise.
- (_bfd_elf_symbol_refs_local_p): Likewise.
- (bfd_elf_size_dynamic_sections): Updated.
-
-2006-09-05 Bibo Mao <bibo.mao@intel.com>
-
- PR binutils/3171
- * coffcode.h (coff_write_object_contents): Set the optional
- header magic number to PE32PMAGIC instead of ZMAGIC for ia64.
-
-2006-09-04 Mark Shinwell <shinwell@codesourcery.com>
-
- * elf32-arm.c (elf32_arm_howto_table_1): Adjust entries for
- R_ARM_THM_ALU_PREL_11_0 and R_ARM_THM_PC12 relocations.
- (elf32_arm_final_link_relocate): Handle R_ARM_THM_ALU_PREL_11_0
- and R_ARM_THM_PC12 relocations.
-
2006-08-24 Bob Wilson <bob.wilson@acm.org>
* elf32-xtensa.c (xtensa_get_property_section_name): Delete.
@@ -840,7 +39,7 @@
* pe-arm.c: Remove ARM_WINCE block. Rename
bfd_arm_pe_allocate_interworking_sections,
bfd_arm_pe_get_bfd_for_interworking, and
- bfd_arm_pe_process_before_allocation to
+ bfd_arm_pe_process_before_allocation to
bfd_armpe_allocate_interworking_sections,
bfd_armpe_get_bfd_for_interworking, and
bfd_armpe_process_before_allocation. Move them before
@@ -887,7 +86,7 @@
segment alignment to 1.
2006-08-15 Thiemo Seufer <ths@mips.com>
- Nigel Stephens <nigel@mips.com>
+ Nigel Stephens <nigel@mips.com>
* elf32-mips.c, elf64-mips.c, elfn32-mips.c
(elf_backend_merge_symbol_attribute): Define.
@@ -896,8 +95,8 @@
* elfxx-mips.c (_bfd_mips_elf_merge_symbol_attribute): New function.
2006-08-15 Thiemo Seufer <ths@mips.com>
- Nigel Stephens <nigel@mips.com>
- David Ung <davidu@mips.com>
+ Nigel Stephens <nigel@mips.com>
+ David Ung <davidu@mips.com>
* config.bfd: Add configurations for mips*el-sde-elf* and
mips*-sde-elf*.
@@ -1723,7 +922,7 @@
2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
Randolph Chung <tausq@debian.org>
-
+
* elf-hppa.h (reloc_hppa_howto_table): Check bitfield for
TPREL21L/TPREL14R relocations. Handle LTOFF_TP14R relocations.
Add handling for TLS relocations.
@@ -1738,7 +937,7 @@
(elf32_hppa_copy_indirect_symbol): Copy TLS information.
(elf32_hppa_check_relocs): Call elf32_hppa_optimized_tls_reloc.
Handle TLS relocs.
- (elf32_hppa_gc_sweep_hook): Likewise.
+ (elf32_hppa_gc_sweep_hook): Likewise.
(allocate_dynrelocs): Handle TLS relocs.
(elf32_hppa_size_dynamic_sections): Count space required by TLS
relocs. Use hh_name macro.
@@ -1752,13 +951,13 @@
hh_name and eh_name macros.
(elf32_hppa_reloc_type_clas): Handle TLS relocs.
-2006-05-24 Bjoern Haase <bjoern.m.haase@web.de>
+2006-05-24 Bjoern Haase <bjoern.m.haase@web.de>
- * archures.c: Add bfd_mach_avr6.
+ * archures.c: Add bfd_mach_avr6.
* cpu-avr.c: Likewise.
* reloc.c (BFD_RELOC_AVR_LO8_LDI_GS, BFD_RELOC_AVR_HI8_LDI_GS):
New relocations.
- * libbfd.h: Regenerate.
+ * libbfd.h: Regenerate.
* bfd-in2.h:Regenerate.
* elf32-avr.h: New file. Protoypes for functions accessed from ld.
* elf32-avr.c: Add elf32-avr.h to include list.
@@ -1774,10 +973,10 @@
(debug_relax, debug_stubs): Add new global variables controlling
debugging printout to stdout.
(avr_pc_wrap_around): Change the type to bfd_vma.
- (avr_replace_call_ret_sequences): Add a new variable controling
+ (avr_replace_call_ret_sequences): Add a new variable controling
linkrelax optimizations.
(avr_stub_is_required_for_16_bit_reloc): New function.
- (avr_final_link_relocate):
+ (avr_final_link_relocate):
Add linker hash table to parameter list. Use stub addr. if necessary.
(elf32_avr_relocate_section):
Add linker hashtable to parameter list of avr_final_link_relocate.
@@ -1786,7 +985,7 @@
(elf32_avr_relax_delete_bytes):
Iterate over all sections of a bfd when adjusting relocs addends.
(elf32_avr_relax_section):
- Evaluate avr_replace_call_ret_sequences and recalculate the size of
+ Evaluate avr_replace_call_ret_sequences and recalculate the size of
stub section.
(avr_stub_name): New function.
(avr_get_stub_entry): New function.
@@ -1895,7 +1094,7 @@
decode errors. Replace call to insn_decode_len with inline code.
Use can_narrow_instruction and can_widen_instruction. Handle errors
from call to xtensa_opcode_is_loop.
- (relax_section): Adjust calls to narrow_instruction and
+ (relax_section): Adjust calls to narrow_instruction and
widen_instruction.
2006-05-15 Alan Modra <amodra@bigpond.net.au>
@@ -1953,7 +1152,7 @@
* elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Remove unused
local variable `dynobj'.
-
+
2006-05-05 Bjoern Haase <bjoern.m.haase@web.de>
* elf32-avr.c (elf32_avr_relax_delete_bytes): Iterate over all
@@ -2740,7 +1939,7 @@
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Iterate over all
in_list elements, not just the first.
-
+
2006-03-14 Richard Sandiford <richard@codesourcery.com>
* elf32-mips.c (mips_elf_adjust_addend): New function, mostly split
@@ -2861,7 +2060,7 @@
mismatch.
(elf32_m68k_print_private_bfd_data): Adjust.
* ieee.c (ieee_write_processor): Adjust.
-
+
2006-03-06 Alan Modra <amodra@bigpond.net.au>
* dwarf2.c: Formatting.
@@ -2892,7 +2091,7 @@
2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
* elf32-avr.c (avr_reloc_map): Insert BFD_RELOC_AVR_MS8_LDI
- and R_AVR_MS8_LDI
+ and R_AVR_MS8_LDI
(bfd_elf_avr_final_write_processing): Set
EF_AVR_LINKRELAX_PREPARED in e_flags field.
(elf32_avr_relax_section): New function.
@@ -2976,7 +2175,7 @@
(allocate_dynrelocs): Likewise.
(elf_i386_size_dynamic_sections): Likewise.
(elf_i386_relocate_section): Likewise.
-
+
2006-02-27 Jakub Jelinek <jakub@redhat.com>
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle S flag.
@@ -3028,7 +2227,7 @@
* elf32-ppc.c (ppc_elf_link_hash_table): Remove hplt.
(ppc_elf_size_dynamic_sections): Use the generic ELF hplt fields.
(ppc_elf_finish_dynamic_symbol): Likewise.
-
+
2006-02-24 DJ Delorie <dj@redhat.com>
* elf32-m32c.c (m32c_elf_howto_table): Add relaxation relocs.
@@ -3046,7 +2245,7 @@
* reloc.c: Add m32c relax relocs.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
-
+
2006-02-24 H.J. Lu <hongjiu.lu@intel.com>
PR ld/2218
@@ -3096,12 +2295,12 @@
* elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
- Anil Paranjape <anilp1@kpitcummins.com>
- Shilin Shakti <shilins@kpitcummins.com>
+ Anil Paranjape <anilp1@kpitcummins.com>
+ Shilin Shakti <shilins@kpitcummins.com>
- * Makefile.am: Add xc16x related entry
- * Makefile.in: Regenerate
- * archures.c: Add bfd_xc16x_arch
+ * Makefile.am: Add xc16x related entry
+ * Makefile.in: Regenerate
+ * archures.c: Add bfd_xc16x_arch
* bfd-in2.h: Regenerate
* config.bfd: Add xc16x-*-elf
* configure.in: Add bfd_elf32_xc16x_vec
@@ -3110,7 +2309,7 @@
* cpu-xc16x.c: New file
* reloc.c: Add new relocations specific to xc16x:
BFD_RELOC_XC16X_PAG, BFD_RELOC_XC16X_POF, BFD_RELOC_XC16X_SEG,
- BFD_RELOC_XC16X_SOF
+ BFD_RELOC_XC16X_SOF
* elf32-xc16x.c: New file.
2006-02-17 Alan Modra <amodra@bigpond.net.au>
@@ -3202,7 +2401,7 @@
2006-02-05 Arnold Metselaar <arnold.metselaar@planet.nl>
- * coff-z80.c (r_imm24): New howto.
+ * coff-z80.c (r_imm24): New howto.
(rtype2howto): New case R_IMM24.
(coff_z80_reloc_type_lookup): New case BFD_RELOC_24.
(extra_case): Use bfd_get_8 for R_IMM8, new case R_IMM24.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 435b30b..27c2c06 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -103,10 +103,8 @@ ALL_MACHINES = \
cpu-powerpc.lo \
cpu-rs6000.lo \
cpu-s390.lo \
- cpu-score.lo \
cpu-sh.lo \
cpu-sparc.lo \
- cpu-spu.lo \
cpu-tic30.lo \
cpu-tic4x.lo \
cpu-tic54x.lo \
@@ -167,10 +165,8 @@ ALL_MACHINES_CFILES = \
cpu-powerpc.c \
cpu-rs6000.c \
cpu-s390.c \
- cpu-score.c \
cpu-sh.c \
cpu-sparc.c \
- cpu-spu.c \
cpu-tic30.c \
cpu-tic4x.c \
cpu-tic54x.c \
@@ -275,14 +271,12 @@ BFD32_BACKENDS = \
elf32-pj.lo \
elf32-ppc.lo \
elf32-s390.lo \
- elf32-score.lo \
elf32-sh.lo \
elf32-sh-symbian.lo \
elf32-sh64.lo \
elf32-sh64-com.lo \
elfxx-sparc.lo \
elf32-sparc.lo \
- elf32-spu.lo \
elf32-v850.lo \
elf32-vax.lo \
elf32-xstormy16.lo \
@@ -453,12 +447,10 @@ BFD32_BACKENDS_CFILES = \
elf32-sh64.c \
elf32-sh64-com.c \
elf32-s390.c \
- elf32-score.c \
elf32-sh.c \
elf32-sh-symbian.c \
elfxx-sparc.c \
elf32-sparc.c \
- elf32-spu.c \
elf32-v850.c \
elf32-vax.c \
elf32-xstormy16.c \
@@ -567,11 +559,7 @@ BFD64_BACKENDS = \
mmo.lo \
nlm32-alpha.lo \
nlm64.lo \
- coff-x86_64.lo \
- pe-x86_64.lo \
- pei-x86_64.lo \
- pepigen.lo \
- pex64igen.lo
+ pepigen.lo
BFD64_BACKENDS_CFILES = \
aix5ppc-core.c \
@@ -594,10 +582,7 @@ BFD64_BACKENDS_CFILES = \
elf64.c \
mmo.c \
nlm32-alpha.c \
- nlm64.c \
- coff-x86_64.c \
- pe-x86_64.c \
- pei-x86_64.c
+ nlm64.c
OPTIONAL_BACKENDS = \
aix386-core.lo \
@@ -647,7 +632,7 @@ SOURCE_CFILES = \
$(OPTIONAL_BACKENDS_CFILES)
BUILD_CFILES = \
- elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c
+ elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
@@ -805,11 +790,6 @@ pepigen.c : peXXigen.c
sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
mv -f pepigen.new pepigen.c
-pex64igen.c: peXXigen.c
- rm -f pex64igen.c
- sed -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new
- mv -f pex64igen.new pex64igen.c
-
BFD_H_DEPS= $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
LOCAL_H_DEPS= libbfd.h sysdep.h config.h
$(BFD32_LIBS) \
@@ -1079,11 +1059,9 @@ cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h
cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
-cpu-score.lo: cpu-score.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(srcdir)/../opcodes/sh-opc.h
cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
-cpu-spu.lo: cpu-spu.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-tic4x.lo: cpu-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
@@ -1462,11 +1440,6 @@ elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-score.lo: elf32-score.c $(INCDIR)/filenames.h \
- $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf-vxworks.h \
@@ -1488,10 +1461,6 @@ elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/sparc.h \
elfxx-sparc.h elf-vxworks.h elf32-target.h
-elf32-spu.lo: elf32-spu.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/spu.h \
- $(INCDIR)/elf/reloc-macros.h elf32-spu.h elf32-target.h
elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h \
@@ -1855,21 +1824,6 @@ nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \
nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
$(INCDIR)/nlm/external.h
-coff-x86_64.lo: coff-x86_64.c $(INCDIR)/filenames.h \
- $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \
- coffswap.h
-pe-x86_64.lo: pe-x86_64.c $(INCDIR)/filenames.h coff-x86_64.c \
- $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \
- peicode.h libpei.h
-pei-x86_64.lo: pei-x86_64.c $(INCDIR)/filenames.h coff-x86_64.c \
- $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \
- peicode.h libpei.h
aix386-core.lo: aix386-core.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h
@@ -1898,7 +1852,4 @@ peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
pepigen.lo: pepigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
-pex64igen.lo: pex64igen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 5bde689..46673b6 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -334,10 +334,8 @@ ALL_MACHINES = \
cpu-powerpc.lo \
cpu-rs6000.lo \
cpu-s390.lo \
- cpu-score.lo \
cpu-sh.lo \
cpu-sparc.lo \
- cpu-spu.lo \
cpu-tic30.lo \
cpu-tic4x.lo \
cpu-tic54x.lo \
@@ -398,10 +396,8 @@ ALL_MACHINES_CFILES = \
cpu-powerpc.c \
cpu-rs6000.c \
cpu-s390.c \
- cpu-score.c \
cpu-sh.c \
cpu-sparc.c \
- cpu-spu.c \
cpu-tic30.c \
cpu-tic4x.c \
cpu-tic54x.c \
@@ -507,14 +503,12 @@ BFD32_BACKENDS = \
elf32-pj.lo \
elf32-ppc.lo \
elf32-s390.lo \
- elf32-score.lo \
elf32-sh.lo \
elf32-sh-symbian.lo \
elf32-sh64.lo \
elf32-sh64-com.lo \
elfxx-sparc.lo \
elf32-sparc.lo \
- elf32-spu.lo \
elf32-v850.lo \
elf32-vax.lo \
elf32-xstormy16.lo \
@@ -685,12 +679,10 @@ BFD32_BACKENDS_CFILES = \
elf32-sh64.c \
elf32-sh64-com.c \
elf32-s390.c \
- elf32-score.c \
elf32-sh.c \
elf32-sh-symbian.c \
elfxx-sparc.c \
elf32-sparc.c \
- elf32-spu.c \
elf32-v850.c \
elf32-vax.c \
elf32-xstormy16.c \
@@ -800,11 +792,7 @@ BFD64_BACKENDS = \
mmo.lo \
nlm32-alpha.lo \
nlm64.lo \
- coff-x86_64.lo \
- pe-x86_64.lo \
- pei-x86_64.lo \
- pepigen.lo \
- pex64igen.lo
+ pepigen.lo
BFD64_BACKENDS_CFILES = \
aix5ppc-core.c \
@@ -827,10 +815,7 @@ BFD64_BACKENDS_CFILES = \
elf64.c \
mmo.c \
nlm32-alpha.c \
- nlm64.c \
- coff-x86_64.c \
- pe-x86_64.c \
- pei-x86_64.c
+ nlm64.c
OPTIONAL_BACKENDS = \
aix386-core.lo \
@@ -881,7 +866,7 @@ SOURCE_CFILES = \
$(OPTIONAL_BACKENDS_CFILES)
BUILD_CFILES = \
- elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c
+ elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
SOURCE_HFILES = \
@@ -1383,11 +1368,6 @@ pepigen.c : peXXigen.c
rm -f pepigen.c
sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
mv -f pepigen.new pepigen.c
-
-pex64igen.c: peXXigen.c
- rm -f pex64igen.c
- sed -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new
- mv -f pex64igen.new pex64igen.c
$(BFD32_LIBS) \
$(BFD64_LIBS) \
$(ALL_MACHINES) \
@@ -1640,11 +1620,9 @@ cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h
cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
-cpu-score.lo: cpu-score.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(srcdir)/../opcodes/sh-opc.h
cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
-cpu-spu.lo: cpu-spu.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-tic4x.lo: cpu-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
@@ -2023,11 +2001,6 @@ elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-score.lo: elf32-score.c $(INCDIR)/filenames.h \
- $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf-vxworks.h \
@@ -2049,10 +2022,6 @@ elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/sparc.h \
elfxx-sparc.h elf-vxworks.h elf32-target.h
-elf32-spu.lo: elf32-spu.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/spu.h \
- $(INCDIR)/elf/reloc-macros.h elf32-spu.h elf32-target.h
elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h \
@@ -2416,21 +2385,6 @@ nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \
nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
$(INCDIR)/nlm/external.h
-coff-x86_64.lo: coff-x86_64.c $(INCDIR)/filenames.h \
- $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \
- coffswap.h
-pe-x86_64.lo: pe-x86_64.c $(INCDIR)/filenames.h coff-x86_64.c \
- $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \
- peicode.h libpei.h
-pei-x86_64.lo: pei-x86_64.c $(INCDIR)/filenames.h coff-x86_64.c \
- $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \
- peicode.h libpei.h
aix386-core.lo: aix386-core.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h
@@ -2459,9 +2413,6 @@ peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
pepigen.lo: pepigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
-pex64igen.lo: pex64igen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/bfd/archive.c b/bfd/archive.c
index 22261ac..24bb048 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -1,6 +1,6 @@
/* BFD back-end for archive files (libraries).
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault.
@@ -912,12 +912,12 @@ bfd_slurp_armap (bfd *abfd)
if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return FALSE;
- if (CONST_STRNEQ (nextname, "__.SYMDEF ")
- || CONST_STRNEQ (nextname, "__.SYMDEF/ ")) /* Old Linux archives. */
+ if (!strncmp (nextname, "__.SYMDEF ", 16)
+ || !strncmp (nextname, "__.SYMDEF/ ", 16)) /* old Linux archives */
return do_slurp_bsd_armap (abfd);
- else if (CONST_STRNEQ (nextname, "/ "))
+ else if (!strncmp (nextname, "/ ", 16))
return do_slurp_coff_armap (abfd);
- else if (CONST_STRNEQ (nextname, "/SYM64/ "))
+ else if (!strncmp (nextname, "/SYM64/ ", 16))
{
/* 64bit ELF (Irix 6) archive. */
#ifdef BFD64
@@ -963,11 +963,11 @@ bfd_slurp_bsd_armap_f2 (bfd *abfd)
if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return FALSE;
- if (CONST_STRNEQ (nextname, "__.SYMDEF ")
- || CONST_STRNEQ (nextname, "__.SYMDEF/ ")) /* Old Linux archives. */
+ if (!strncmp (nextname, "__.SYMDEF ", 16)
+ || !strncmp (nextname, "__.SYMDEF/ ", 16)) /* Old Linux archives. */
return do_slurp_bsd_armap (abfd);
- if (! CONST_STRNEQ (nextname, "/ "))
+ if (strncmp (nextname, "/ ", 16))
{
bfd_has_map (abfd) = FALSE;
return TRUE;
@@ -1063,8 +1063,8 @@ _bfd_slurp_extended_name_table (bfd *abfd)
if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return FALSE;
- if (! CONST_STRNEQ (nextname, "ARFILENAMES/ ")
- && ! CONST_STRNEQ (nextname, "// "))
+ if (strncmp (nextname, "ARFILENAMES/ ", 16) != 0 &&
+ strncmp (nextname, "// ", 16) != 0)
{
bfd_ardata (abfd)->extended_names = NULL;
bfd_ardata (abfd)->extended_names_size = 0;
@@ -1647,14 +1647,14 @@ _bfd_write_archive_contents (bfd *arch)
if (bfd_write_p (current))
{
bfd_set_error (bfd_error_invalid_operation);
- goto input_err;
+ return FALSE;
}
if (!current->arelt_data)
{
current->arelt_data =
bfd_ar_hdr_from_filesystem (arch, current->filename, current);
if (!current->arelt_data)
- goto input_err;
+ return FALSE;
/* Put in the file name. */
BFD_SEND (arch, _bfd_truncate_arname,
@@ -1716,7 +1716,7 @@ _bfd_write_archive_contents (bfd *arch)
!= sizeof (*hdr))
return FALSE;
if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0)
- goto input_err;
+ return FALSE;
while (remaining)
{
unsigned int amt = DEFAULT_BUFFERSIZE;
@@ -1726,8 +1726,8 @@ _bfd_write_archive_contents (bfd *arch)
if (bfd_bread (buffer, amt, current) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_file_truncated);
- goto input_err;
+ bfd_set_error (bfd_error_malformed_archive);
+ return FALSE;
}
if (bfd_bwrite (buffer, amt, arch) != amt)
return FALSE;
@@ -1760,10 +1760,6 @@ _bfd_write_archive_contents (bfd *arch)
}
return TRUE;
-
- input_err:
- bfd_set_error (bfd_error_on_input, current, bfd_get_error ());
- return FALSE;
}
/* Note that the namidx for the first symbol is 0. */
diff --git a/bfd/archive64.c b/bfd/archive64.c
index 4fc8b85..3b28f85 100644
--- a/bfd/archive64.c
+++ b/bfd/archive64.c
@@ -1,25 +1,25 @@
/* MIPS-specific support for 64-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Ian Lance Taylor, Cygnus Support
Linker support added by Mark Mitchell, CodeSourcery, LLC.
<mark@codesourcery.com>
- This file is part of BFD, the Binary File Descriptor library.
+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 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.
+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. */
+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 supports the 64-bit (MIPS) ELF archives. */
@@ -65,10 +65,10 @@ bfd_elf64_archive_slurp_armap (bfd *abfd)
return FALSE;
/* Archives with traditional armaps are still permitted. */
- if (CONST_STRNEQ (nextname, "/ "))
+ if (strncmp (nextname, "/ ", 16) == 0)
return bfd_slurp_armap (abfd);
- if (! CONST_STRNEQ (nextname, "/SYM64/ "))
+ if (strncmp (nextname, "/SYM64/ ", 16) != 0)
{
bfd_has_map (abfd) = FALSE;
return TRUE;
diff --git a/bfd/archures.c b/bfd/archures.c
index 5029cb0..9776c44 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -136,8 +136,6 @@ DESCRIPTION
.{* Nonzero if MACH is a 64 bit sparc architecture. *}
.#define bfd_mach_sparc_64bit_p(mach) \
. ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
-. bfd_arch_spu, {* PowerPC SPU *}
-.#define bfd_mach_spu 256
. bfd_arch_mips, {* MIPS Rxxxx *}
.#define bfd_mach_mips3000 3000
.#define bfd_mach_mips3900 3900
@@ -275,7 +273,6 @@ DESCRIPTION
.#define bfd_mach_arm_XScale 10
.#define bfd_mach_arm_ep9312 11
.#define bfd_mach_arm_iWMMXt 12
-.#define bfd_mach_arm_iWMMXt2 13
. bfd_arch_ns32k, {* National Semiconductors ns32000 *}
. bfd_arch_w65, {* WDC 65816 *}
. bfd_arch_tic30, {* Texas Instruments TMS320C30 *}
@@ -351,7 +348,6 @@ DESCRIPTION
. bfd_arch_s390, {* IBM s390 *}
.#define bfd_mach_s390_31 31
.#define bfd_mach_s390_64 64
-. bfd_arch_score, {* Sunplus score *}
. bfd_arch_openrisc, {* OpenRISC *}
. bfd_arch_mmix, {* Donald Knuth's educational processor. *}
. bfd_arch_xstormy16,
@@ -470,10 +466,8 @@ extern const bfd_arch_info_type bfd_powerpc_archs[];
#define bfd_powerpc_arch bfd_powerpc_archs[0]
extern const bfd_arch_info_type bfd_rs6000_arch;
extern const bfd_arch_info_type bfd_s390_arch;
-extern const bfd_arch_info_type bfd_score_arch;
extern const bfd_arch_info_type bfd_sh_arch;
extern const bfd_arch_info_type bfd_sparc_arch;
-extern const bfd_arch_info_type bfd_spu_arch;
extern const bfd_arch_info_type bfd_tic30_arch;
extern const bfd_arch_info_type bfd_tic4x_arch;
extern const bfd_arch_info_type bfd_tic54x_arch;
@@ -537,10 +531,8 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_powerpc_arch,
&bfd_rs6000_arch,
&bfd_s390_arch,
- &bfd_score_arch,
&bfd_sh_arch,
&bfd_sparc_arch,
- &bfd_spu_arch,
&bfd_tic30_arch,
&bfd_tic4x_arch,
&bfd_tic54x_arch,
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index e671ee7..6ceb0db 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -43,30 +43,6 @@ extern "C" {
#endif
#endif
-/* This is a utility macro to handle the situation where the code
- wants to place a constant string into the code, followed by a
- comma and then the length of the string. Doing this by hand
- is error prone, so using this macro is safer. The macro will
- also safely handle the case where a NULL is passed as the arg. */
-#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0)
-/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
- to create the arguments to another macro, since the preprocessor
- will mis-count the number of arguments to the outer macro (by not
- evaluating STRING_COMMA_LEN and so missing the comma). This is a
- problem for example when trying to use STRING_COMMA_LEN to build
- the arguments to the strncmp() macro. Hence this alternative
- definition of strncmp is provided here.
-
- Note - these macros do NOT work if STR2 is not a constant string. */
-#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
- /* strcpy() can have a similar problem, but since we know we are
- copying a constant string, we can use memcpy which will be faster
- since there is no need to check for a NUL byte inside STR. We
- can also save time if we do not need to copy the terminating NUL. */
-#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
-#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
-
-
/* The word size used by BFD on the host. This may be 64 with a 32
bit target if the host is 64 bit, or if other 64 bit targets have
been selected with --enable-targets, or if --enable-64-bit-bfd. */
@@ -686,7 +662,7 @@ extern void bfd_elf_set_dt_needed_name
extern const char *bfd_elf_get_dt_soname
(bfd *);
extern void bfd_elf_set_dyn_lib_class
- (bfd *, enum dynamic_lib_link_class);
+ (bfd *, int);
extern int bfd_elf_get_dyn_lib_class
(bfd *);
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
@@ -868,7 +844,7 @@ extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
(struct bfd_link_info *);
extern bfd_boolean bfd_elf32_arm_process_before_allocation
- (bfd *, struct bfd_link_info *);
+ (bfd *, struct bfd_link_info *, int);
void bfd_elf32_arm_set_target_relocs
(struct bfd_link_info *, int, char *, int, int);
@@ -887,8 +863,6 @@ extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
extern bfd_boolean bfd_is_arm_special_symbol_name
(const char * name, int type);
-extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int);
-
/* ARM Note section processing. */
extern bfd_boolean bfd_arm_merge_machines
(bfd *, bfd *);
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 8f2af8b..b75c8e2 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -50,30 +50,6 @@ extern "C" {
#endif
#endif
-/* This is a utility macro to handle the situation where the code
- wants to place a constant string into the code, followed by a
- comma and then the length of the string. Doing this by hand
- is error prone, so using this macro is safer. The macro will
- also safely handle the case where a NULL is passed as the arg. */
-#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0)
-/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
- to create the arguments to another macro, since the preprocessor
- will mis-count the number of arguments to the outer macro (by not
- evaluating STRING_COMMA_LEN and so missing the comma). This is a
- problem for example when trying to use STRING_COMMA_LEN to build
- the arguments to the strncmp() macro. Hence this alternative
- definition of strncmp is provided here.
-
- Note - these macros do NOT work if STR2 is not a constant string. */
-#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
- /* strcpy() can have a similar problem, but since we know we are
- copying a constant string, we can use memcpy which will be faster
- since there is no need to check for a NUL byte inside STR. We
- can also save time if we do not need to copy the terminating NUL. */
-#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
-#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
-
-
/* The word size used by BFD on the host. This may be 64 with a 32
bit target if the host is 64 bit, or if other 64 bit targets have
been selected with --enable-targets, or if --enable-64-bit-bfd. */
@@ -693,7 +669,7 @@ extern void bfd_elf_set_dt_needed_name
extern const char *bfd_elf_get_dt_soname
(bfd *);
extern void bfd_elf_set_dyn_lib_class
- (bfd *, enum dynamic_lib_link_class);
+ (bfd *, int);
extern int bfd_elf_get_dyn_lib_class
(bfd *);
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
@@ -875,7 +851,7 @@ extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
(struct bfd_link_info *);
extern bfd_boolean bfd_elf32_arm_process_before_allocation
- (bfd *, struct bfd_link_info *);
+ (bfd *, struct bfd_link_info *, int);
void bfd_elf32_arm_set_target_relocs
(struct bfd_link_info *, int, char *, int, int);
@@ -894,8 +870,6 @@ extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
extern bfd_boolean bfd_is_arm_special_symbol_name
(const char * name, int type);
-extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int);
-
/* ARM Note section processing. */
extern bfd_boolean bfd_arm_merge_machines
(bfd *, bfd *);
@@ -1257,9 +1231,7 @@ typedef struct bfd_section
else up the line will take care of it later. */
#define SEC_LINKER_CREATED 0x200000
- /* This section should not be subject to garbage collection.
- Also set to inform the linker that this section should not be
- listed in the link map as discarded. */
+ /* This section should not be subject to garbage collection. */
#define SEC_KEEP 0x400000
/* This section contains "short" data, and should be placed
@@ -1765,8 +1737,6 @@ enum bfd_architecture
/* Nonzero if MACH is a 64 bit sparc architecture. */
#define bfd_mach_sparc_64bit_p(mach) \
((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
- bfd_arch_spu, /* PowerPC SPU */
-#define bfd_mach_spu 256
bfd_arch_mips, /* MIPS Rxxxx */
#define bfd_mach_mips3000 3000
#define bfd_mach_mips3900 3900
@@ -1904,7 +1874,6 @@ enum bfd_architecture
#define bfd_mach_arm_XScale 10
#define bfd_mach_arm_ep9312 11
#define bfd_mach_arm_iWMMXt 12
-#define bfd_mach_arm_iWMMXt2 13
bfd_arch_ns32k, /* National Semiconductors ns32000 */
bfd_arch_w65, /* WDC 65816 */
bfd_arch_tic30, /* Texas Instruments TMS320C30 */
@@ -1980,7 +1949,6 @@ enum bfd_architecture
bfd_arch_s390, /* IBM s390 */
#define bfd_mach_s390_31 31
#define bfd_mach_s390_64 64
- bfd_arch_score, /* Sunplus score */
bfd_arch_openrisc, /* OpenRISC */
bfd_arch_mmix, /* Donald Knuth's educational processor. */
bfd_arch_xstormy16,
@@ -2458,20 +2426,6 @@ relocation types already defined. */
BFD_RELOC_SPARC_TLS_TPOFF32,
BFD_RELOC_SPARC_TLS_TPOFF64,
-/* SPU Relocations. */
- BFD_RELOC_SPU_IMM7,
- BFD_RELOC_SPU_IMM8,
- BFD_RELOC_SPU_IMM10,
- BFD_RELOC_SPU_IMM10W,
- BFD_RELOC_SPU_IMM16,
- BFD_RELOC_SPU_IMM16W,
- BFD_RELOC_SPU_IMM18,
- BFD_RELOC_SPU_PCREL9a,
- BFD_RELOC_SPU_PCREL9b,
- BFD_RELOC_SPU_PCREL16,
- BFD_RELOC_SPU_LO16,
- BFD_RELOC_SPU_HI16,
-
/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
"addend" in some special way.
For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
@@ -3787,31 +3741,6 @@ instructions */
BFD_RELOC_390_GOTPLT20,
BFD_RELOC_390_TLS_GOTIE20,
-/* Score relocations */
- BFD_RELOC_SCORE_DUMMY1,
-
-/* Low 16 bit for load/store */
- BFD_RELOC_SCORE_GPREL15,
-
-/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_DUMMY2,
- BFD_RELOC_SCORE_JMP,
-
-/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE_BRANCH,
-
-/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE16_JMP,
-
-/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */
- BFD_RELOC_SCORE16_BRANCH,
-
-/* Undocumented Score relocs */
- BFD_RELOC_SCORE_GOT15,
- BFD_RELOC_SCORE_GOT_LO16,
- BFD_RELOC_SCORE_CALL15,
- BFD_RELOC_SCORE_DUMMY_HI16,
-
/* Scenix IP2K - 9-bit register number / data address */
BFD_RELOC_IP2K_FR9,
@@ -4647,14 +4576,13 @@ typedef enum bfd_error
bfd_error_bad_value,
bfd_error_file_truncated,
bfd_error_file_too_big,
- bfd_error_on_input,
bfd_error_invalid_error_code
}
bfd_error_type;
bfd_error_type bfd_get_error (void);
-void bfd_set_error (bfd_error_type error_tag, ...);
+void bfd_set_error (bfd_error_type error_tag);
const char *bfd_errmsg (bfd_error_type error_tag);
@@ -5203,8 +5131,7 @@ typedef struct bfd_target
/* Check if SEC has been already linked during a reloceatable or
final link. */
- void (*_section_already_linked) (bfd *, struct bfd_section *,
- struct bfd_link_info *);
+ void (*_section_already_linked) (bfd *, struct bfd_section *);
/* Routines to handle dynamic symbols and relocs. */
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
@@ -5264,11 +5191,10 @@ bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
#define bfd_link_split_section(abfd, sec) \
BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
-void bfd_section_already_linked (bfd *abfd, asection *sec,
- struct bfd_link_info *info);
+void bfd_section_already_linked (bfd *abfd, asection *sec);
-#define bfd_section_already_linked(abfd, sec, info) \
- BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
+#define bfd_section_already_linked(abfd, sec) \
+ BFD_SEND (abfd, _section_already_linked, (abfd, sec))
/* Extracted from simple.c. */
bfd_byte *bfd_simple_get_relocated_section_contents
diff --git a/bfd/bfd.c b/bfd/bfd.c
index b970141..13fbf93 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -271,7 +271,6 @@ CODE_FRAGMENT
. bfd_error_bad_value,
. bfd_error_file_truncated,
. bfd_error_file_too_big,
-. bfd_error_on_input,
. bfd_error_invalid_error_code
.}
.bfd_error_type;
@@ -279,8 +278,6 @@ CODE_FRAGMENT
*/
static bfd_error_type bfd_error = bfd_error_no_error;
-static bfd *input_bfd = NULL;
-static bfd_error_type input_error = bfd_error_no_error;
const char *const bfd_errmsgs[] =
{
@@ -303,7 +300,6 @@ const char *const bfd_errmsgs[] =
N_("Bad value"),
N_("File truncated"),
N_("File too big"),
- N_("Error reading %s: %s"),
N_("#<Invalid error code>")
};
@@ -329,32 +325,16 @@ FUNCTION
bfd_set_error
SYNOPSIS
- void bfd_set_error (bfd_error_type error_tag, ...);
+ void bfd_set_error (bfd_error_type error_tag);
DESCRIPTION
Set the BFD error condition to be @var{error_tag}.
- If @var{error_tag} is bfd_error_on_input, then this function
- takes two more parameters, the input bfd where the error
- occurred, and the bfd_error_type error.
*/
void
-bfd_set_error (bfd_error_type error_tag, ...)
+bfd_set_error (bfd_error_type error_tag)
{
bfd_error = error_tag;
- if (error_tag == bfd_error_on_input)
- {
- /* This is an error that occurred during bfd_close when
- writing an archive, but on one of the input files. */
- va_list ap;
-
- va_start (ap, error_tag);
- input_bfd = va_arg (ap, bfd *);
- input_error = va_arg (ap, int);
- if (input_error >= bfd_error_on_input)
- abort ();
- va_end (ap);
- }
}
/*
@@ -375,19 +355,6 @@ bfd_errmsg (bfd_error_type error_tag)
#ifndef errno
extern int errno;
#endif
- if (error_tag == bfd_error_on_input)
- {
- char *buf;
- const char *msg = bfd_errmsg (input_error);
-
- if (asprintf (&buf, _(bfd_errmsgs [error_tag]), input_bfd->filename, msg)
- != -1)
- return buf;
-
- /* Ick, what to do on out of memory? */
- return msg;
- }
-
if (error_tag == bfd_error_system_call)
return xstrerror (errno);
@@ -415,10 +382,16 @@ DESCRIPTION
void
bfd_perror (const char *message)
{
- if (message == NULL || *message == '\0')
- fprintf (stderr, "%s\n", bfd_errmsg (bfd_get_error ()));
+ if (bfd_get_error () == bfd_error_system_call)
+ /* Must be a system error then. */
+ perror ((char *) message);
else
- fprintf (stderr, "%s: %s\n", message, bfd_errmsg (bfd_get_error ()));
+ {
+ if (message == NULL || *message == '\0')
+ fprintf (stderr, "%s\n", bfd_errmsg (bfd_get_error ()));
+ else
+ fprintf (stderr, "%s: %s\n", message, bfd_errmsg (bfd_get_error ()));
+ }
}
/*
@@ -908,7 +881,7 @@ bfd_get_sign_extend_vma (bfd *abfd)
no place to store this information in the COFF back end.
Should enough other COFF targets add support for DWARF2,
a place will have to be found. Until then, this hack will do. */
- if (CONST_STRNEQ (name, "coff-go32")
+ if (strncmp (name, "coff-go32", sizeof ("coff-go32") - 1) == 0
|| strcmp (name, "pe-i386") == 0
|| strcmp (name, "pei-i386") == 0
|| strcmp (name, "pe-arm-wince-little") == 0
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index 5984894..40420fa 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -2424,9 +2424,7 @@ Warning: Clearing the interworking flag of %B because non-interworking code in %
/* Note: the definitions here of LOCAL_LABEL_PREFIX and USER_LABEL_PREIFX
*must* match the definitions in gcc/config/arm/{coff|semi|aout}.h. */
-#ifndef LOCAL_LABEL_PREFIX
#define LOCAL_LABEL_PREFIX ""
-#endif
#ifndef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX "_"
#endif
diff --git a/bfd/coff-maxq.c b/bfd/coff-maxq.c
index 58f9297..6414cb9 100644
--- a/bfd/coff-maxq.c
+++ b/bfd/coff-maxq.c
@@ -82,6 +82,7 @@ coff_maxq20_reloc (bfd * abfd,
bfd * output_bfd ATTRIBUTE_UNUSED,
char ** error_message ATTRIBUTE_UNUSED)
{
+ reloc_howto_type *howto = NULL;
unsigned char *addr = NULL;
unsigned long x = 0;
long call_addr = 0;
@@ -95,6 +96,7 @@ coff_maxq20_reloc (bfd * abfd,
if (data && reloc_entry)
{
+ howto = reloc_entry->howto;
addr = (unsigned char *) data + reloc_entry->address;
call_addr = call_addr - call_addr;
call_addr = get_symbol_value (symbol_in);
@@ -372,39 +374,66 @@ static reloc_howto_type howto_table[] =
EMPTY_HOWTO (10),
};
+/* Map BFD reloc types to MAXQ COFF reloc types. */
+
+typedef struct maxq_reloc_map
+{
+ bfd_reloc_code_real_type bfd_reloc_val;
+ unsigned int maxq_reloc_val;
+ reloc_howto_type * table;
+}
+reloc_map;
+
+static const reloc_map maxq_reloc_map[] =
+{
+ {BFD_RELOC_16_PCREL_S2, SHORT_JUMP, howto_table},
+ {BFD_RELOC_16, LONG_JUMP, howto_table},
+};
+
static reloc_howto_type *
maxq_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
bfd_reloc_code_real_type code)
{
- switch (code)
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE (maxq_reloc_map); i++)
{
- /* SHORT JUMP */
- case BFD_RELOC_16_PCREL_S2:
- return howto_table + 3;
-
- /* INTERSEGMENT JUMP */
- case BFD_RELOC_24:
- return howto_table + 4;
-
- /* BYTE RELOC */
- case BFD_RELOC_8:
- return howto_table + 7;
-
- /* WORD RELOC */
- case BFD_RELOC_16:
- return howto_table + 5;
-
- /* LONG RELOC */
- case BFD_RELOC_32:
- return howto_table + 2;
-
- /* LONG JUMP */
- case BFD_RELOC_14:
- return howto_table + 6;
-
- default:
- return NULL;
+ const reloc_map *entry;
+
+ entry = maxq_reloc_map + i;
+
+ switch (code)
+ {
+ /* SHORT JUMP */
+ case BFD_RELOC_16_PCREL_S2:
+ return howto_table + 3;
+
+ /* INTERSEGMENT JUMP */
+ case BFD_RELOC_24:
+ return howto_table + 4;
+
+ /* BYTE RELOC */
+ case BFD_RELOC_8:
+ return howto_table + 7;
+
+ /* WORD RELOC */
+ case BFD_RELOC_16:
+ return howto_table + 5;
+
+ /* LONG RELOC */
+ case BFD_RELOC_32:
+ return howto_table + 2;
+
+ /* LONG JUMP */
+ case BFD_RELOC_14:
+ return howto_table + 6;
+
+ default:
+ return NULL;
+ }
}
+
+ return NULL;
}
#define coff_bfd_reloc_type_lookup maxq_reloc_type_lookup
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c
index 0ef3785..b442793 100644
--- a/bfd/coff-ppc.c
+++ b/bfd/coff-ppc.c
@@ -1332,7 +1332,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
DUMP_RELOC2 (howto->name, rel);
- if (CONST_STRNEQ (input_section->name, ".idata$2") && first_thunk_address == 0)
+ if (strncmp(".idata$2",input_section->name,8) == 0 && first_thunk_address == 0)
{
/* Set magic values. */
int idata5offset;
diff --git a/bfd/coff-stgo32.c b/bfd/coff-stgo32.c
index 61f18f0..3c5fdbb 100644
--- a/bfd/coff-stgo32.c
+++ b/bfd/coff-stgo32.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel 386 COFF files (DJGPP variant with a stub).
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Robert Hoehne.
This file is part of BFD, the Binary File Descriptor library.
@@ -354,7 +354,7 @@ create_go32_stub (abfd)
close (f);
goto stub_end;
}
- if (! CONST_STRNEQ (magic, "go32stub"))
+ if (memcmp (magic, "go32stub", 8) != 0)
{
close (f);
goto stub_end;
diff --git a/bfd/coff-x86_64.c b/bfd/coff-x86_64.c
deleted file mode 100644
index 772e1eb..0000000
--- a/bfd/coff-x86_64.c
+++ /dev/null
@@ -1,768 +0,0 @@
-/* BFD back-end for AMD 64 COFF files.
- Copyright 2006 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.
-
- Written by Kai Tietz, OneVision Software GmbH&CoKg. */
-
-#ifndef COFF_WITH_pex64
-#define COFF_WITH_pex64
-#endif
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "libbfd.h"
-#include "coff/x86_64.h"
-#include "coff/internal.h"
-#include "coff/pe.h"
-#include "libcoff.h"
-#include "libiberty.h"
-
-#define BADMAG(x) AMD64BADMAG(x)
-
-#ifdef COFF_WITH_pex64
-# undef AOUTSZ
-# define AOUTSZ PEPAOUTSZ
-# define PEAOUTHDR PEPAOUTHDR
-#endif
-
-#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
-
-/* The page size is a guess based on ELF. */
-
-#define COFF_PAGE_SIZE 0x1000
-
-/* For some reason when using AMD COFF the value stored in the .text
- section for a reference to a common symbol is the value itself plus
- any desired offset. Ian Taylor, Cygnus Support. */
-
-/* If we are producing relocatable output, we need to do some
- adjustments to the object file that are not done by the
- bfd_perform_relocation function. This function is called by every
- reloc type to make any required adjustments. */
-
-static bfd_reloc_status_type
-coff_amd64_reloc (bfd *abfd,
- arelent *reloc_entry,
- asymbol *symbol,
- void * data,
- asection *input_section ATTRIBUTE_UNUSED,
- bfd *output_bfd,
- char **error_message ATTRIBUTE_UNUSED)
-{
- symvalue diff;
-
-#if !defined(COFF_WITH_PE)
- if (output_bfd == NULL)
- return bfd_reloc_continue;
-#endif
-
- if (bfd_is_com_section (symbol->section))
- {
-#if !defined(COFF_WITH_PE)
- /* We are relocating a common symbol. The current value in the
- object file is ORIG + OFFSET, where ORIG is the value of the
- common symbol as seen by the object file when it was compiled
- (this may be zero if the symbol was undefined) and OFFSET is
- the offset into the common symbol (normally zero, but may be
- non-zero when referring to a field in a common structure).
- ORIG is the negative of reloc_entry->addend, which is set by
- the CALC_ADDEND macro below. We want to replace the value in
- the object file with NEW + OFFSET, where NEW is the value of
- the common symbol which we are going to put in the final
- object file. NEW is symbol->value. */
- diff = symbol->value + reloc_entry->addend;
-#else
- /* In PE mode, we do not offset the common symbol. */
- diff = reloc_entry->addend;
-#endif
- }
- else
- {
- /* For some reason bfd_perform_relocation always effectively
- ignores the addend for a COFF target when producing
- relocatable output. This seems to be always wrong for 386
- COFF, so we handle the addend here instead. */
-#if defined(COFF_WITH_PE)
- if (output_bfd == NULL)
- {
- reloc_howto_type *howto = reloc_entry->howto;
-
- /* Although PC relative relocations are very similar between
- PE and non-PE formats, but they are off by 1 << howto->size
- bytes. For the external relocation, PE is very different
- from others. See md_apply_fix3 () in gas/config/tc-amd64.c.
- When we link PE and non-PE object files together to
- generate a non-PE executable, we have to compensate it
- here. */
- if(howto->pc_relative && howto->pcrel_offset)
- diff = -(1 << howto->size);
- else if(symbol->flags & BSF_WEAK)
- diff = reloc_entry->addend - symbol->value;
- else
- diff = -reloc_entry->addend;
- }
- else
-#endif
- diff = reloc_entry->addend;
- }
-
-#if defined(COFF_WITH_PE)
- /* FIXME: How should this case be handled? */
- if (reloc_entry->howto->type == R_AMD64_IMAGEBASE
- && output_bfd != NULL
- && bfd_get_flavour (output_bfd) == bfd_target_coff_flavour)
- diff -= pe_data (output_bfd)->pe_opthdr.ImageBase;
-#endif
-
-#define DOIT(x) \
- x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
-
- if (diff != 0)
- {
- reloc_howto_type *howto = reloc_entry->howto;
- unsigned char *addr = (unsigned char *) data + reloc_entry->address;
-
- switch (howto->size)
- {
- case 0:
- {
- char x = bfd_get_8 (abfd, addr);
- DOIT (x);
- bfd_put_8 (abfd, x, addr);
- }
- break;
-
- case 1:
- {
- short x = bfd_get_16 (abfd, addr);
- DOIT (x);
- bfd_put_16 (abfd, (bfd_vma) x, addr);
- }
- break;
-
- case 2:
- {
- long x = bfd_get_32 (abfd, addr);
- DOIT (x);
- bfd_put_32 (abfd, (bfd_vma) x, addr);
- }
- break;
- case 4:
- {
- long long x = bfd_get_64 (abfd, addr);
- DOIT (x);
- bfd_put_64 (abfd, (bfd_vma) x, addr);
- }
- break;
-
- default:
- abort ();
- }
- }
-
- /* Now let bfd_perform_relocation finish everything up. */
- return bfd_reloc_continue;
-}
-
-#if defined(COFF_WITH_PE)
-/* Return TRUE if this relocation should appear in the output .reloc
- section. */
-
-static bfd_boolean
-in_reloc_p (bfd *abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto)
-{
- return ! howto->pc_relative && howto->type != R_AMD64_IMAGEBASE;
-}
-#endif /* COFF_WITH_PE */
-
-#ifndef PCRELOFFSET
-#define PCRELOFFSET TRUE
-#endif
-
-static reloc_howto_type howto_table[] =
-{
- EMPTY_HOWTO (0),
- HOWTO (R_AMD64_DIR64, /* type 1*/
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long, 4 = long long) */
- 64, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "R_X86_64_64", /* name */
- TRUE, /* partial_inplace */
- 0xffffffffffffffffll, /* src_mask */
- 0xffffffffffffffffll, /* dst_mask */
- TRUE), /* pcrel_offset */
- HOWTO (R_AMD64_DIR32, /* type 2 */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "R_X86_64_32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
- /* PE IMAGE_REL_AMD64_ADDR32NB relocation (3). */
- HOWTO (R_AMD64_IMAGEBASE, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "rva32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
- /* 32-bit longword PC relative relocation (4). */
- HOWTO (R_AMD64_PCRLONG, /* type 4 */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "R_X86_64_PC32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- PCRELOFFSET), /* pcrel_offset */
-
- HOWTO (R_AMD64_PCRLONG_1, /* type 5 */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "DISP32+1", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_AMD64_PCRLONG_2, /* type 6 */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "DISP32+2", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_AMD64_PCRLONG_3, /* type 7 */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "DISP32+3", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_AMD64_PCRLONG_4, /* type 8 */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "DISP32+4", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- PCRELOFFSET), /* pcrel_offset */
- HOWTO (R_AMD64_PCRLONG_5, /* type 9 */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "DISP32+5", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- PCRELOFFSET), /* pcrel_offset */
- EMPTY_HOWTO (10), /* R_AMD64_SECTION 10 */
-#if defined(COFF_WITH_PE)
- /* 32-bit longword section relative relocation (11). */
- HOWTO (R_AMD64_SECREL, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "secrel32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-#else
- EMPTY_HOWTO (11),
-#endif
- EMPTY_HOWTO (12),
- EMPTY_HOWTO (13),
-#ifndef DONT_EXTEND_AMD64
- HOWTO (R_AMD64_PCRQUAD,
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "R_X86_64_PC64", /* name */
- TRUE, /* partial_inplace */
- 0xffffffffffffffffll, /* src_mask */
- 0xffffffffffffffffll, /* dst_mask */
- PCRELOFFSET), /* pcrel_offset */
-#else
- EMPTY_HOWTO (14),
-#endif
- /* Byte relocation (15). */
- HOWTO (R_RELBYTE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "R_X86_64_8", /* name */
- TRUE, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
- PCRELOFFSET), /* pcrel_offset */
- /* 16-bit word relocation (16). */
- HOWTO (R_RELWORD, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "R_X86_64_16", /* name */
- TRUE, /* partial_inplace */
- 0x0000ffff, /* src_mask */
- 0x0000ffff, /* dst_mask */
- PCRELOFFSET), /* pcrel_offset */
- /* 32-bit longword relocation (17). */
- HOWTO (R_RELLONG, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "R_X86_64_32S", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- PCRELOFFSET), /* pcrel_offset */
- /* Byte PC relative relocation (18). */
- HOWTO (R_PCRBYTE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "R_X86_64_PC8", /* name */
- TRUE, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
- PCRELOFFSET), /* pcrel_offset */
- /* 16-bit word PC relative relocation (19). */
- HOWTO (R_PCRWORD, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "R_X86_64_PC16", /* name */
- TRUE, /* partial_inplace */
- 0x0000ffff, /* src_mask */
- 0x0000ffff, /* dst_mask */
- PCRELOFFSET), /* pcrel_offset */
- /* 32-bit longword PC relative relocation (20). */
- HOWTO (R_PCRLONG, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- coff_amd64_reloc, /* special_function */
- "R_X86_64_PC32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- PCRELOFFSET) /* pcrel_offset */
-};
-
-/* Turn a howto into a reloc nunmber */
-
-#define SELECT_RELOC(x,howto) { x.r_type = howto->type; }
-#define I386 1 /* Customize coffcode.h */
-#define AMD64 1
-
-#define RTYPE2HOWTO(cache_ptr, dst) \
- ((cache_ptr)->howto = \
- ((dst)->r_type < ARRAY_SIZE (howto_table)) \
- ? howto_table + (dst)->r_type \
- : NULL)
-
-/* For 386 COFF a STYP_NOLOAD | STYP_BSS section is part of a shared
- library. On some other COFF targets STYP_BSS is normally
- STYP_NOLOAD. */
-#define BSS_NOLOAD_IS_SHARED_LIBRARY
-
-/* Compute the addend of a reloc. If the reloc is to a common symbol,
- the object file contains the value of the common symbol. By the
- time this is called, the linker may be using a different symbol
- from a different object file with a different value. Therefore, we
- hack wildly to locate the original symbol from this file so that we
- can make the correct adjustment. This macro sets coffsym to the
- symbol from the original file, and uses it to set the addend value
- correctly. If this is not a common symbol, the usual addend
- calculation is done, except that an additional tweak is needed for
- PC relative relocs.
- FIXME: This macro refers to symbols and asect; these are from the
- calling function, not the macro arguments. */
-
-#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \
- { \
- coff_symbol_type *coffsym = NULL; \
- \
- if (ptr && bfd_asymbol_bfd (ptr) != abfd) \
- coffsym = (obj_symbols (abfd) \
- + (cache_ptr->sym_ptr_ptr - symbols)); \
- else if (ptr) \
- coffsym = coff_symbol_from (abfd, ptr); \
- \
- if (coffsym != NULL \
- && coffsym->native->u.syment.n_scnum == 0) \
- cache_ptr->addend = - coffsym->native->u.syment.n_value; \
- else if (ptr && bfd_asymbol_bfd (ptr) == abfd \
- && ptr->section != NULL) \
- cache_ptr->addend = - (ptr->section->vma + ptr->value); \
- else \
- cache_ptr->addend = 0; \
- if (ptr && howto_table[reloc.r_type].pc_relative) \
- cache_ptr->addend += asect->vma; \
- }
-
-/* We use the special COFF backend linker. For normal AMD64 COFF, we
- can use the generic relocate_section routine. For PE, we need our
- own routine. */
-
-#if !defined(COFF_WITH_PE)
-
-#define coff_relocate_section _bfd_coff_generic_relocate_section
-
-#else /* COFF_WITH_PE */
-
-/* The PE relocate section routine. The only difference between this
- and the regular routine is that we don't want to do anything for a
- relocatable link. */
-
-static bfd_boolean
-coff_pe_amd64_relocate_section (bfd *output_bfd,
- struct bfd_link_info *info,
- bfd *input_bfd,
- asection *input_section,
- bfd_byte *contents,
- struct internal_reloc *relocs,
- struct internal_syment *syms,
- asection **sections)
-{
- if (info->relocatable)
- return TRUE;
-
- return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,input_section, contents,relocs, syms, sections);
-}
-
-#define coff_relocate_section coff_pe_amd64_relocate_section
-
-#endif /* COFF_WITH_PE */
-
-/* Convert an rtype to howto for the COFF backend linker. */
-
-static reloc_howto_type *
-coff_amd64_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
- asection *sec,
- struct internal_reloc *rel,
- struct coff_link_hash_entry *h,
- struct internal_syment *sym,
- bfd_vma *addendp)
-{
- reloc_howto_type *howto;
-
- if (rel->r_type > ARRAY_SIZE (howto_table))
- {
- bfd_set_error (bfd_error_bad_value);
- return NULL;
- }
- if (rel->r_type >= R_AMD64_PCRLONG_1 && rel->r_type <= R_AMD64_PCRLONG_5)
- {
- rel->r_vaddr += (bfd_vma)(rel->r_type-R_AMD64_PCRLONG);
- rel->r_type = R_AMD64_PCRLONG;
- }
- howto = howto_table + rel->r_type;
-
-#if defined(COFF_WITH_PE)
- /* Cancel out code in _bfd_coff_generic_relocate_section. */
- *addendp = 0;
-#endif
-
- if (howto->pc_relative)
- *addendp += sec->vma;
-
- if (sym != NULL && sym->n_scnum == 0 && sym->n_value != 0)
- {
- /* This is a common symbol. The section contents include the
- size (sym->n_value) as an addend. The relocate_section
- function will be adding in the final value of the symbol. We
- need to subtract out the current size in order to get the
- correct result. */
- BFD_ASSERT (h != NULL);
-
-#if !defined(COFF_WITH_PE)
- /* I think we *do* want to bypass this. If we don't, I have
- seen some data parameters get the wrong relocation address.
- If I link two versions with and without this section bypassed
- and then do a binary comparison, the addresses which are
- different can be looked up in the map. The case in which
- this section has been bypassed has addresses which correspond
- to values I can find in the map. */
- *addendp -= sym->n_value;
-#endif
- }
-
-#if !defined(COFF_WITH_PE)
- /* If the output symbol is common (in which case this must be a
- relocatable link), we need to add in the final size of the
- common symbol. */
- if (h != NULL && h->root.type == bfd_link_hash_common)
- *addendp += h->root.u.c.size;
-#endif
-
-#if defined(COFF_WITH_PE)
- if (howto->pc_relative)
- {
- *addendp -= 4;
-
- /* If the symbol is defined, then the generic code is going to
- add back the symbol value in order to cancel out an
- adjustment it made to the addend. However, we set the addend
- to 0 at the start of this function. We need to adjust here,
- to avoid the adjustment the generic code will make. FIXME:
- This is getting a bit hackish. */
- if (sym != NULL && sym->n_scnum != 0)
- *addendp -= sym->n_value;
- }
-
- if (rel->r_type == R_AMD64_IMAGEBASE
- && (bfd_get_flavour (sec->output_section->owner) == bfd_target_coff_flavour))
- *addendp -= pe_data (sec->output_section->owner)->pe_opthdr.ImageBase;
-
- if (rel->r_type == R_AMD64_SECREL)
- {
- bfd_vma osect_vma;
-
- if (h && (h->type == bfd_link_hash_defined || h->type == bfd_link_hash_defweak))
- osect_vma = h->root.u.def.section->output_section->vma;
- else
- {
- asection *sec;
- int i;
-
- /* Sigh, the only way to get the section to offset against
- is to find it the hard way. */
- for (sec = abfd->sections, i = 1; i < sym->n_scnum; i++)
- sec = sec->next;
-
- osect_vma = sec->output_section->vma;
- }
-
- *addendp -= osect_vma;
- }
-#endif
-
- return howto;
-}
-
-#define coff_bfd_reloc_type_lookup coff_amd64_reloc_type_lookup
-
-static reloc_howto_type *
-coff_amd64_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, bfd_reloc_code_real_type code)
-{
- switch (code)
- {
- case BFD_RELOC_RVA:
- return howto_table + R_AMD64_IMAGEBASE;
- case BFD_RELOC_32:
- return howto_table + R_AMD64_DIR32;
- case BFD_RELOC_64:
- return howto_table + R_AMD64_DIR64;
- case BFD_RELOC_64_PCREL:
-#ifndef DONT_EXTEND_AMD64
- return howto_table + R_AMD64_PCRQUAD;
-#else
- /* Fall through. */
-#endif
- case BFD_RELOC_32_PCREL:
- return howto_table + R_AMD64_PCRLONG;
- case BFD_RELOC_X86_64_32S:
- return howto_table + R_RELLONG;
- case BFD_RELOC_16:
- return howto_table + R_RELWORD;
- case BFD_RELOC_16_PCREL:
- return howto_table + R_PCRWORD;
- case BFD_RELOC_8:
- return howto_table + R_RELBYTE;
- case BFD_RELOC_8_PCREL:
- return howto_table + R_PCRBYTE;
-#if defined(COFF_WITH_PE)
- case BFD_RELOC_32_SECREL:
- return howto_table + R_AMD64_SECREL;
-#endif
- default:
- BFD_FAIL ();
- return 0;
- }
-}
-
-#define coff_rtype_to_howto coff_amd64_rtype_to_howto
-
-#ifdef TARGET_UNDERSCORE
-
-/* If amd64 gcc uses underscores for symbol names, then it does not use
- a leading dot for local labels, so if TARGET_UNDERSCORE is defined
- we treat all symbols starting with L as local. */
-
-static bfd_boolean
-coff_amd64_is_local_label_name (bfd *abfd, const char *name)
-{
- if (name[0] == 'L')
- return TRUE;
-
- return _bfd_coff_is_local_label_name (abfd, name);
-}
-
-#define coff_bfd_is_local_label_name coff_amd64_is_local_label_name
-
-#endif /* TARGET_UNDERSCORE */
-
-#include "coffcode.h"
-
-#ifdef PE
-#define amd64coff_object_p pe_bfd_object_p
-#else
-#define amd64coff_object_p coff_object_p
-#endif
-
-const bfd_target
-#ifdef TARGET_SYM
- TARGET_SYM =
-#else
- x86_64coff_vec =
-#endif
-{
-#ifdef TARGET_NAME
- TARGET_NAME,
-#else
- "coff-x86-64", /* Name. */
-#endif
- bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* Data byte order is little. */
- BFD_ENDIAN_LITTLE, /* Header byte order is little. */
-
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* Section flags. */
-#if defined(COFF_WITH_PE)
- | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY
-#endif
- | SEC_CODE | SEC_DATA),
-
-#ifdef TARGET_UNDERSCORE
- TARGET_UNDERSCORE, /* Leading underscore. */
-#else
- 0, /* Leading underscore. */
-#endif
- '/', /* Ar_pad_char. */
- 15, /* Ar_max_namelen. */
-
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data. */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Hdrs. */
-
- /* Note that we allow an object file to be treated as a core file as well. */
- { _bfd_dummy_target, amd64coff_object_p, /* BFD_check_format. */
- bfd_generic_archive_p, amd64coff_object_p },
- { bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format. */
- bfd_false },
- { bfd_false, coff_write_object_contents, /* bfd_write_contents. */
- _bfd_write_archive_contents, bfd_false },
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- NULL,
-
- COFF_SWAP_TABLE
-};
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index bc5c72e..badb214 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -427,7 +427,7 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags)
styp_flags = STYP_LIT;
#endif /* _LIT */
}
- else if (CONST_STRNEQ (sec_name, DOT_DEBUG))
+ else if (!strncmp (sec_name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1))
{
/* Handle the XCOFF debug section and DWARF2 debug sections. */
if (!sec_name[6])
@@ -435,12 +435,12 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags)
else
styp_flags = STYP_DEBUG_INFO;
}
- else if (CONST_STRNEQ (sec_name, ".stab"))
+ else if (!strncmp (sec_name, ".stab", 5))
{
styp_flags = STYP_DEBUG_INFO;
}
#ifdef COFF_LONG_SECTION_NAMES
- else if (CONST_STRNEQ (sec_name, GNU_LINKONCE_WI))
+ else if (!strncmp (sec_name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1))
{
styp_flags = STYP_DEBUG_INFO;
}
@@ -529,8 +529,8 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags)
but there are more IMAGE_SCN_* flags. */
/* FIXME: There is no gas syntax to specify the debug section flag. */
- if (CONST_STRNEQ (sec_name, DOT_DEBUG)
- || CONST_STRNEQ (sec_name, GNU_LINKONCE_WI))
+ if (strncmp (sec_name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1) == 0
+ || strncmp (sec_name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1) == 0)
sec_flags = SEC_DEBUGGING;
/* skip LOAD */
@@ -674,14 +674,14 @@ styp_to_sec_flags (bfd *abfd ATTRIBUTE_UNUSED,
#endif
sec_flags |= SEC_ALLOC;
}
- else if (CONST_STRNEQ (name, DOT_DEBUG)
+ else if (strncmp (name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1) == 0
#ifdef _COMMENT
|| strcmp (name, _COMMENT) == 0
#endif
#ifdef COFF_LONG_SECTION_NAMES
- || CONST_STRNEQ (name, GNU_LINKONCE_WI)
+ || strncmp (name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1) == 0
#endif
- || CONST_STRNEQ (name, ".stab"))
+ || strncmp (name, ".stab", 5) == 0)
{
#ifdef COFF_PAGE_SIZE
sec_flags |= SEC_DEBUGGING;
@@ -715,7 +715,7 @@ styp_to_sec_flags (bfd *abfd ATTRIBUTE_UNUSED,
The symbols will be defined as weak, so that multiple definitions
are permitted. The GNU linker extension is to actually discard
all but one of the sections. */
- if (CONST_STRNEQ (name, ".gnu.linkonce"))
+ if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
sec_flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
#endif
@@ -1071,7 +1071,7 @@ styp_to_sec_flags (bfd *abfd,
/* The MS PE spec sets the DISCARDABLE flag on .reloc sections
but we do not want them to be labelled as debug section, since
then strip would remove them. */
- if (! CONST_STRNEQ (name, ".reloc"))
+ if (strncmp (name, ".reloc", sizeof ".reloc" - 1) != 0)
sec_flags |= SEC_DEBUGGING;
break;
case IMAGE_SCN_MEM_SHARED:
@@ -1126,7 +1126,7 @@ styp_to_sec_flags (bfd *abfd,
The symbols will be defined as weak, so that multiple definitions
are permitted. The GNU linker extension is to actually discard
all but one of the sections. */
- if (CONST_STRNEQ (name, ".gnu.linkonce"))
+ if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
sec_flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
#endif
@@ -1882,17 +1882,11 @@ coff_set_arch_mach_hook (bfd *abfd, void * filehdr)
#ifdef I386MAGIC
case I386MAGIC:
case I386PTXMAGIC:
- case I386AIXMAGIC: /* Danbury PS/2 AIX C Compiler. */
- case LYNXCOFFMAGIC: /* Shadows the m68k Lynx number below, sigh. */
+ case I386AIXMAGIC: /* Danbury PS/2 AIX C Compiler */
+ case LYNXCOFFMAGIC: /* shadows the m68k Lynx number below, sigh */
arch = bfd_arch_i386;
break;
#endif
-#ifdef AMD64MAGIC
- case AMD64MAGIC:
- arch = bfd_arch_i386;
- machine = bfd_mach_x86_64;
- break;
-#endif
#ifdef IA64MAGIC
case IA64MAGIC:
arch = bfd_arch_ia64;
@@ -2727,18 +2721,13 @@ coff_set_flags (bfd * abfd,
return TRUE;
#endif
-#if defined(I386MAGIC) || defined(AMD64MAGIC)
+#ifdef I386MAGIC
case bfd_arch_i386:
-#if defined(I386MAGIC)
*magicp = I386MAGIC;
-#endif
-#if defined LYNXOS
+#ifdef LYNXOS
/* Just overwrite the usual value if we're doing Lynx. */
*magicp = LYNXCOFFMAGIC;
#endif
-#if defined AMD64MAGIC
- *magicp = AMD64MAGIC;
-#endif
return TRUE;
#endif
@@ -3770,7 +3759,6 @@ coff_write_object_contents (bfd * abfd)
internal_f.f_flags |= IMAGE_FILE_LARGE_ADDRESS_AWARE;
#endif
-#ifndef COFF_WITH_pex64
#ifdef COFF_WITH_PE
internal_f.f_flags |= IMAGE_FILE_32BIT_MACHINE;
#else
@@ -3779,7 +3767,6 @@ coff_write_object_contents (bfd * abfd)
else
internal_f.f_flags |= F_AR32W;
#endif
-#endif
#ifdef TI_TARGET_ID
/* Target id is used in TI COFF v1 and later; COFF0 won't use this field,
@@ -3873,18 +3860,16 @@ coff_write_object_contents (bfd * abfd)
#if defined(I386)
#define __A_MAGIC_SET__
-#if defined LYNXOS
+#if defined(LYNXOS)
internal_a.magic = LYNXCOFFMAGIC;
-#elif defined AMD64
- internal_a.magic = IMAGE_NT_OPTIONAL_HDR64_MAGIC;
-#else
+#else /* LYNXOS */
internal_a.magic = ZMAGIC;
-#endif
+#endif /* LYNXOS */
#endif /* I386 */
#if defined(IA64)
#define __A_MAGIC_SET__
- internal_a.magic = PE32PMAGIC;
+ internal_a.magic = ZMAGIC;
#endif /* IA64 */
#if defined(SPARC)
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index fd4b3fe..40f5a70 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -232,7 +232,7 @@ coff_link_check_ar_symbols (bfd *abfd,
/* Auto import. */
if (!h
&& info->pei386_auto_import
- && CONST_STRNEQ (name, "__imp_"))
+ && !strncmp (name,"__imp_", 6))
h = bfd_link_hash_lookup (info->hash, name + 6, FALSE, FALSE, TRUE);
/* We are only interested in symbols that are currently
@@ -439,7 +439,7 @@ coff_link_add_symbols (bfd *abfd,
|| classification == COFF_SYMBOL_PE_SECTION)
&& coff_section_data (abfd, section) != NULL
&& coff_section_data (abfd, section)->comdat != NULL
- && CONST_STRNEQ (name, "??_")
+ && strncmp (name, "??_", 3) == 0
&& strcmp (name, coff_section_data (abfd, section)->comdat->name) == 0)
{
if (*sym_hash == NULL)
@@ -583,7 +583,7 @@ coff_link_add_symbols (bfd *abfd,
asection *stab;
for (stab = abfd->sections; stab; stab = stab->next)
- if (CONST_STRNEQ (stab->name, ".stab")
+ if (strncmp (".stab", stab->name, 5) == 0
&& (!stab->name[5]
|| (stab->name[5] == '.' && ISDIGIT (stab->name[6]))))
{
@@ -1232,7 +1232,7 @@ process_embedded_commands (bfd *output_bfd,
s++;
continue;
}
- if (CONST_STRNEQ (s, "-attr"))
+ if (strncmp (s, "-attr", 5) == 0)
{
char *name;
char *attribs;
@@ -1272,11 +1272,11 @@ process_embedded_commands (bfd *output_bfd,
asec->flags |= SEC_READONLY;
}
}
- else if (CONST_STRNEQ (s, "-heap"))
- s = dores_com (s + 5, output_bfd, 1);
+ else if (strncmp (s,"-heap", 5) == 0)
+ s = dores_com (s+5, output_bfd, 1);
- else if (CONST_STRNEQ (s, "-stack"))
- s = dores_com (s + 6, output_bfd, 0);
+ else if (strncmp (s,"-stack", 6) == 0)
+ s = dores_com (s+6, output_bfd, 0);
else
s++;
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 9b81db7..22a7a11 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -31,7 +31,12 @@ targ_underscore=no
# Catch obsolete configurations.
case $targ in
- maxq-*-coff | \
+ m68*-apple-aux* | \
+ m68*-apollo-* | \
+ m68*-bull-sysv* | \
+ m68*-*-rtemscoff* | \
+ i960-*-rtems* | \
+ or32-*-rtems* | \
null)
if test "x$enable_obsolete" != xyes; then
echo "*** Configuration $targ is obsolete." >&2
@@ -43,12 +48,6 @@ case $targ in
esac
case $targ in
- m68*-apple-aux* | \
- m68*-apollo-* | \
- m68*-bull-sysv* | \
- m68*-*-rtemscoff* | \
- i960-*-rtems* | \
- or32-*-rtems* | \
m68*-*-lynxos* | \
sparc-*-lynxos* | \
vax-*-vms* | \
@@ -96,11 +95,10 @@ rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
s390*) targ_archs=bfd_s390_arch ;;
sh*) targ_archs=bfd_sh_arch ;;
sparc*) targ_archs=bfd_sparc_arch ;;
-spu*) targ_archs=bfd_spu_arch ;;
strongarm*) targ_archs=bfd_arm_arch ;;
thumb*) targ_archs=bfd_arm_arch ;;
v850*) targ_archs=bfd_v850_arch ;;
-x86_64*) targ_archs=bfd_i386_arch ;;
+x86_64) targ_archs=bfd_i386_arch ;;
xscale*) targ_archs=bfd_arm_arch ;;
xtensa*) targ_archs=bfd_xtensa_arch ;;
z80|r800) targ_archs=bfd_z80_arch ;;
@@ -184,11 +182,7 @@ case "${targ}" in
targ_selvecs="bfd_elf64_ia64_hpux_big_vec"
want64=true
;;
- sparc64-*-freebsd* | sparc64-*-kfreebsd*-gnu)
- targ_defvec=bfd_elf64_sparc_freebsd_vec
- targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
- ;;
- sparc64-*-netbsd* | sparc64-*-openbsd*)
+ sparc64-*-freebsd* | sparc64-*-netbsd* | sparc64-*-openbsd* | sparc64-*-kfreebsd*-gnu)
targ_defvec=bfd_elf64_sparc_vec
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
want64=true
@@ -584,12 +578,6 @@ case "${targ}" in
targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
want64=true
;;
- x86_64-*-mingw64*)
- targ_defvec=x86_64pe_vec
- targ_selvecs="x86_64pe_vec x86_64pei_vec x86_64coff_vec bfd_elf64_x86_64_vec"
- want64=true
- targ_underscore=yes
- ;;
#endif
i[3-7]86-*-lynxos*)
targ_defvec=bfd_elf32_i386_vec
@@ -668,7 +656,7 @@ case "${targ}" in
targ_selvecs="b_out_vec_big_host icoff_little_vec icoff_big_vec ieee_vec"
targ_underscore=yes
;;
- i960-*-vxworks5.* | i960-*-coff* | i960-*-sysv*)
+ i960-*-vxworks5.* | i960-*-coff* | i960-*-sysv* | i960-*-rtems*)
targ_defvec=icoff_little_vec
targ_selvecs="icoff_big_vec b_out_vec_little_host b_out_vec_big_host ieee_vec"
targ_underscore=yes
@@ -699,14 +687,17 @@ case "${targ}" in
targ_defvec=bfd_elf32_m32rlelin_vec
targ_selvecs="bfd_elf32_m32rlin_vec bfd_elf32_m32rlelin_vec"
;;
+
m32r*-*-linux*)
targ_defvec=bfd_elf32_m32rlin_vec
targ_selvecs="bfd_elf32_m32rlin_vec bfd_elf32_m32rlelin_vec"
;;
+
m32r*le-*-*)
targ_defvec=bfd_elf32_m32rle_vec
targ_selvecs="bfd_elf32_m32r_vec bfd_elf32_m32rle_vec"
;;
+
m32r-*-*)
targ_defvec=bfd_elf32_m32r_vec
;;
@@ -720,6 +711,13 @@ case "${targ}" in
targ_selvecs="bfd_elf32_m68hc11_vec bfd_elf32_m68hc12_vec"
;;
+ m68*-apollo-*)
+ targ_defvec=apollocoff_vec
+ ;;
+ m68*-bull-sysv*)
+ targ_defvec=m68kcoffun_vec
+ targ_underscore=yes
+ ;;
m68*-motorola-sysv*)
targ_defvec=m68ksysvcoff_vec
;;
@@ -735,6 +733,10 @@ case "${targ}" in
targ_selvecs="cisco_core_big_vec ieee_vec"
targ_underscore=yes
;;
+ m68*-*-rtemscoff*)
+ targ_defvec=m68kcoff_vec
+ targ_selvecs="m68kcoff_vec versados_vec ieee_vec aout0_big_vec"
+ ;;
m68*-*-elf* | m68*-*-sysv4* | m68*-*-uclinux*)
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs="m68kcoff_vec ieee_vec"
@@ -798,6 +800,9 @@ case "${targ}" in
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs=m68kcoff_vec
;;
+ m68*-apple-aux*)
+ targ_defvec=m68kaux_coff_vec
+ ;;
m68*-*-psos*)
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs=ieee_vec
@@ -895,12 +900,12 @@ case "${targ}" in
#endif
mips*el-sde-elf*)
targ_defvec=bfd_elf32_tradlittlemips_vec
- targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
+ targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
want64=true
;;
mips*-sde-elf*)
targ_defvec=bfd_elf32_tradbigmips_vec
- targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
+ targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
want64=true
;;
mips*el-*-elf* | mips*el-*-vxworks* | mips*-*-chorus*)
@@ -989,7 +994,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_openrisc_vec
;;
- or32-*-coff)
+ or32-*-coff | or32-*-rtems* )
targ_defvec=or32coff_big_vec
targ_underscore=yes
;;
@@ -1138,11 +1143,6 @@ case "${targ}" in
;;
#endif
- score*-*-elf*)
- targ_defvec=bfd_elf32_bigscore_vec
- targ_selvecs=bfd_elf32_littlescore_vec
- ;;
-
#ifdef BFD64
sh64l*-*-elf*)
targ_defvec=bfd_elf32_sh64l_vec
@@ -1367,11 +1367,6 @@ case "${targ}" in
targ_underscore=yes
;;
- spu-*-elf)
- targ_defvec=bfd_elf32_spu_vec
- targ_selvecs="bfd_elf32_powerpc_vec bfd_elf64_powerpc_vec"
- ;;
-
#if HAVE_host_aout_vec
tahoe-*-*)
targ_defvec=host_aout_vec
diff --git a/bfd/configure b/bfd/configure
index bc138ff..c7d5a43 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -10873,8 +10873,6 @@ do
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
- bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;;
- bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;;
# FIXME: We include cofflink.lo not because it's needed for
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
# which needs it but does not list it. Should be fixed in right place.
@@ -10895,7 +10893,6 @@ do
bfd_elf32_shvxworks_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_sparc_vxworks_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
- bfd_elf32_spu_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
@@ -10927,7 +10924,6 @@ do
bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
- bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
@@ -10953,7 +10949,6 @@ do
i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
- x86_64coff_vec) tb="$tb coff-x86_64.lo cofflink.lo"; target_size=64 ;;
i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
@@ -10965,8 +10960,6 @@ do
i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
- x86_64pe_vec) tb="$tb pe-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;;
- x86_64pei_vec) tb="$tb pei-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;;
i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
diff --git a/bfd/configure.in b/bfd/configure.in
index fa0d50f..95b126a 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -663,8 +663,6 @@ do
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
- bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;;
- bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;;
# FIXME: We include cofflink.lo not because it's needed for
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
# which needs it but does not list it. Should be fixed in right place.
@@ -685,7 +683,6 @@ do
bfd_elf32_shvxworks_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_sparc_vxworks_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
- bfd_elf32_spu_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
@@ -717,7 +714,6 @@ do
bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
- bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
@@ -743,7 +739,6 @@ do
i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
- x86_64coff_vec) tb="$tb coff-x86_64.lo cofflink.lo"; target_size=64 ;;
i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
@@ -755,8 +750,6 @@ do
i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
- x86_64pe_vec) tb="$tb pe-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;;
- x86_64pei_vec) tb="$tb pei-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;;
i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
diff --git a/bfd/cpu-arm.c b/bfd/cpu-arm.c
index 52c359b..5c89296 100644
--- a/bfd/cpu-arm.c
+++ b/bfd/cpu-arm.c
@@ -92,8 +92,7 @@ processors[] =
{ bfd_mach_arm_4, "strongarm1100" },
{ bfd_mach_arm_XScale, "xscale" },
{ bfd_mach_arm_ep9312, "ep9312" },
- { bfd_mach_arm_iWMMXt, "iwmmxt" },
- { bfd_mach_arm_iWMMXt2, "iwmmxt2" }
+ { bfd_mach_arm_iWMMXt, "iwmmxt" }
};
static bfd_boolean
@@ -138,8 +137,7 @@ static const bfd_arch_info_type arch_info_struct[] =
N (bfd_mach_arm_5TE, "armv5te", FALSE, & arch_info_struct[9]),
N (bfd_mach_arm_XScale, "xscale", FALSE, & arch_info_struct[10]),
N (bfd_mach_arm_ep9312, "ep9312", FALSE, & arch_info_struct[11]),
- N (bfd_mach_arm_iWMMXt, "iwmmxt", FALSE, & arch_info_struct[12]),
- N (bfd_mach_arm_iWMMXt2, "iwmmxt2", FALSE, NULL)
+ N (bfd_mach_arm_iWMMXt,"iwmmxt", FALSE, NULL)
};
const bfd_arch_info_type bfd_arm_arch =
@@ -181,9 +179,7 @@ bfd_arm_merge_machines (bfd *ibfd, bfd *obfd)
Intel XScale binary, since these architecture have co-processors which
will not both be present on the same physical hardware. */
else if (in == bfd_mach_arm_ep9312
- && (out == bfd_mach_arm_XScale
- || out == bfd_mach_arm_iWMMXt
- || out == bfd_mach_arm_iWMMXt2))
+ && (out == bfd_mach_arm_XScale || out == bfd_mach_arm_iWMMXt))
{
_bfd_error_handler (_("\
ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
@@ -192,9 +188,7 @@ ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
return FALSE;
}
else if (out == bfd_mach_arm_ep9312
- && (in == bfd_mach_arm_XScale
- || in == bfd_mach_arm_iWMMXt
- || in == bfd_mach_arm_iWMMXt2))
+ && (in == bfd_mach_arm_XScale || in == bfd_mach_arm_iWMMXt))
{
_bfd_error_handler (_("\
ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
@@ -315,7 +309,6 @@ bfd_arm_update_notes (bfd *abfd, const char *note_section)
case bfd_mach_arm_XScale: expected = "XScale"; break;
case bfd_mach_arm_ep9312: expected = "ep9312"; break;
case bfd_mach_arm_iWMMXt: expected = "iWMMXt"; break;
- case bfd_mach_arm_iWMMXt2: expected = "iWMMXt2"; break;
}
if (strcmp (arch_string, expected) != 0)
@@ -362,8 +355,7 @@ architectures[] =
{ "armv5te", bfd_mach_arm_5TE },
{ "XScale", bfd_mach_arm_XScale },
{ "ep9312", bfd_mach_arm_ep9312 },
- { "iWMMXt", bfd_mach_arm_iWMMXt },
- { "iWMMXt2", bfd_mach_arm_iWMMXt2 }
+ { "iWMMXt", bfd_mach_arm_iWMMXt }
};
/* Extract the machine number stored in a note section. */
diff --git a/bfd/cpu-i960.c b/bfd/cpu-i960.c
index e7ccd46..7a9be7c 100644
--- a/bfd/cpu-i960.c
+++ b/bfd/cpu-i960.c
@@ -1,23 +1,23 @@
/* BFD library support routines for the i960 architecture.
- Copyright 1990, 1991, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2006
+ Copyright 1990, 1991, 1993, 1994, 1996, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
- This file is part of BFD, the Binary File Descriptor library.
+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 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.
+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. */
+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 "bfd.h"
#include "sysdep.h"
@@ -57,7 +57,7 @@ scan_960_mach (ap, string)
}
/* In some bfds the cpu-id is written as "80960KA", "80960KB",
"80960CA" or "80960MC". */
- else if (CONST_STRNEQ (string, "80960"))
+ else if (strncmp ("80960", string, 5) == 0)
{
string += 5;
diff --git a/bfd/cpu-score.c b/bfd/cpu-score.c
deleted file mode 100644
index c910817..0000000
--- a/bfd/cpu-score.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* BFD support for the score processor
- Copyright 2006 Free Software Foundation, Inc.
- Contributed by
- 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 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "libbfd.h"
-
-const bfd_arch_info_type
-bfd_score_arch =
-{
- 32, /* There's 32 bits_per_word. */
- 32, /* There's 32 bits_per_address. */
- 8, /* There's 8 bits_per_byte. */
- bfd_arch_score, /* One of enum bfd_architecture, defined
- in archures.c and provided in
- generated header files. */
- 0, /* Only 1 machine, but #255 for
- historical reasons. */
- "score", /* The arch_name. */
- "score", /* The printable name is the same. */
- 4, /* Section alignment power; each section
- is aligned to (only) 2^4 bytes. */
- TRUE, /* This is the default "machine", since
- there's only one. */
- bfd_default_compatible, /* A default function for testing
- "machine" compatibility of two
- bfd_arch_info_type. */
- bfd_default_scan, /* Check if an bfd_arch_info_type is a
- match. */
- NULL /* Pointer to next bfd_arch_info_type in
- the same family. */
-};
diff --git a/bfd/cpu-spu.c b/bfd/cpu-spu.c
deleted file mode 100644
index 25127f4..0000000
--- a/bfd/cpu-spu.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright 2006 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. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "libbfd.h"
-
-
-static const bfd_arch_info_type *
-spu_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b)
-{
- BFD_ASSERT (a->arch == bfd_arch_spu);
- switch (b->arch)
- {
- default:
- return NULL;
- case bfd_arch_spu:
- return bfd_default_compatible (a, b);
- }
- /*NOTREACHED*/
-}
-
-const bfd_arch_info_type bfd_spu_arch[] =
-{
- {
- 32, /* 32 bits in a word */
- 32, /* 32 bits in an address */
- 8, /* 8 bits in a byte */
- bfd_arch_spu, /* architecture */
- bfd_mach_spu, /* machine */
- "spu", /* architecture name */
- "spu:256K", /* printable name */
- 3, /* aligned power */
- TRUE, /* the default machine for the architecture */
- spu_compatible, /* the spu is only compatible with itself, see above */
- bfd_default_scan,
- 0, /* next -- there are none! */
- }
-};
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 059e903..b55f2fa 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -874,45 +874,24 @@ concat_filename (struct line_info_table *table, unsigned int file)
filename = table->files[file - 1].name;
- if (!IS_ABSOLUTE_PATH (filename))
+ if (! IS_ABSOLUTE_PATH (filename))
{
- char *dirname = NULL;
- char *subdirname = NULL;
- char *name;
- size_t len;
+ char *dirname = (table->files[file - 1].dir
+ ? table->dirs[table->files[file - 1].dir - 1]
+ : table->comp_dir);
- if (table->files[file - 1].dir)
- subdirname = table->dirs[table->files[file - 1].dir - 1];
-
- if (!subdirname || !IS_ABSOLUTE_PATH (subdirname))
- dirname = table->comp_dir;
-
- if (!dirname)
+ /* Not all tools set DW_AT_comp_dir, so dirname may be unknown.
+ The best we can do is return the filename part. */
+ if (dirname != NULL)
{
- dirname = subdirname;
- subdirname = NULL;
- }
+ unsigned int len = strlen (dirname) + strlen (filename) + 2;
+ char * name;
- if (!dirname)
- return strdup (filename);
-
- len = strlen (dirname) + strlen (filename) + 2;
-
- if (subdirname)
- {
- len += strlen (subdirname) + 1;
- name = bfd_malloc (len);
- if (name)
- sprintf (name, "%s/%s/%s", dirname, subdirname, filename);
- }
- else
- {
name = bfd_malloc (len);
if (name)
sprintf (name, "%s/%s", dirname, filename);
+ return name;
}
-
- return name;
}
return strdup (filename);
@@ -2202,7 +2181,7 @@ find_debug_info (bfd *abfd, asection *after_sec)
if (strcmp (msec->name, DWARF2_DEBUG_INFO) == 0)
return msec;
- if (CONST_STRNEQ (msec->name, GNU_LINKONCE_INFO))
+ if (strncmp (msec->name, GNU_LINKONCE_INFO, strlen (GNU_LINKONCE_INFO)) == 0)
return msec;
msec = msec->next;
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index eef59dc..386227b 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -2861,7 +2861,7 @@ _bfd_ecoff_slurp_armap (bfd *abfd)
bfd_slurp_armap, but that seems inappropriate since no other
target uses this format. Instead, we check directly for a COFF
armap. */
- if (CONST_STRNEQ (nextname, "/ "))
+ if (strneq (nextname, "/ ", 16))
return bfd_slurp_armap (abfd);
/* See if the first element is an armap. */
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 4a7c0c8..e7d3b18 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -155,8 +155,6 @@ struct elf_link_hash_entry
unsigned int hidden : 1;
/* Symbol was forced to local scope due to a version script file. */
unsigned int forced_local : 1;
- /* Symbol was forced to be dynamic due to a version script file. */
- unsigned int dynamic : 1;
/* Symbol was marked during garbage collection. */
unsigned int mark : 1;
/* Symbol is referenced by a non-GOT/non-PLT relocation. This is
@@ -304,7 +302,6 @@ struct eh_cie_fde
unsigned int make_lsda_relative : 1;
unsigned int need_lsda_relative : 1;
unsigned int per_encoding_relative : 1;
- unsigned int *set_loc;
};
struct eh_frame_sec_info
@@ -345,10 +342,6 @@ struct elf_link_hash_table
when linking against or generating a shared object. */
bfd_boolean dynamic_sections_created;
- /* True if this target has relocatable executables, so needs dynamic
- section symbols. */
- bfd_boolean is_relocatable_executable;
-
/* The BFD used to hold special sections created by the linker.
This will be the first BFD found which requires these sections to
be created. */
@@ -382,12 +375,6 @@ struct elf_link_hash_table
included in the link. */
struct bfd_link_needed_list *needed;
- /* Sections in the output bfd that provides a section symbol
- to be used by relocations emitted against local symbols.
- Most targets will not use data_index_section. */
- asection *text_index_section;
- asection *data_index_section;
-
/* The _GLOBAL_OFFSET_TABLE_ symbol. */
struct elf_link_hash_entry *hgot;
@@ -416,6 +403,10 @@ struct elf_link_hash_table
/* A linked list of BFD's loaded in the link. */
struct elf_link_loaded_list *loaded;
+
+ /* True if this target has relocatable executables, so needs dynamic
+ section symbols. */
+ bfd_boolean is_relocatable_executable;
};
/* Look up an entry in an ELF linker hash table. */
@@ -475,7 +466,7 @@ struct elf_size_info {
(*write_shdrs_and_ehdr) (bfd *);
void (*write_relocs)
(bfd *, asection *, void *);
- bfd_boolean (*swap_symbol_in)
+ void (*swap_symbol_in)
(bfd *, const void *, const void *, Elf_Internal_Sym *);
void (*swap_symbol_out)
(bfd *, const Elf_Internal_Sym *, void *, void *);
@@ -772,11 +763,6 @@ struct elf_backend_data
bfd_boolean (*elf_backend_size_dynamic_sections)
(bfd *output_bfd, struct bfd_link_info *info);
- /* Set TEXT_INDEX_SECTION and DATA_INDEX_SECTION, the output sections
- we keep to use as a base for relocs and symbols. */
- void (*elf_backend_init_index_section)
- (bfd *output_bfd, struct bfd_link_info *info);
-
/* The RELOCATE_SECTION function is called by the ELF backend linker
to handle the relocations for a section.
@@ -1353,7 +1339,6 @@ struct elf_obj_tdata
MIPS ELF linker. FIXME: We should figure out some way to only
include this field for a MIPS ELF target. */
asection **local_stubs;
- asection **local_call_stubs;
/* Used to determine if PT_GNU_EH_FRAME segment header should be
created. */
@@ -1405,9 +1390,6 @@ struct elf_obj_tdata
/* Used to determine if the e_flags field has been initialized */
bfd_boolean flags_init;
-
- /* Symbol buffer. */
- Elf_Internal_Sym *symbuf;
};
#define elf_tdata(bfd) ((bfd) -> tdata.elf_obj_data)
@@ -1542,11 +1524,11 @@ extern bfd_boolean _bfd_elf_match_sections_by_type
extern bfd_boolean bfd_elf_is_group_section
(bfd *, const struct bfd_section *);
extern void _bfd_elf_section_already_linked
- (bfd *, struct bfd_section *, struct bfd_link_info *);
+ (bfd *, struct bfd_section *);
extern void bfd_elf_set_group_contents
(bfd *, asection *, void *);
extern asection *_bfd_elf_check_kept_section
- (asection *, struct bfd_link_info *);
+ (asection *);
extern void _bfd_elf_link_just_syms
(asection *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_copy_private_header_data
@@ -1712,10 +1694,6 @@ extern bfd_boolean _bfd_elf_create_got_section
(bfd *, struct bfd_link_info *);
extern struct elf_link_hash_entry *_bfd_elf_define_linkage_sym
(bfd *, struct bfd_link_info *, asection *, const char *);
-extern void _bfd_elf_init_1_index_section
- (bfd *, struct bfd_link_info *);
-extern void _bfd_elf_init_2_index_sections
- (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elfcore_make_pseudosection
(bfd *, char *, size_t, ufile_ptr);
@@ -1748,7 +1726,7 @@ extern bfd_boolean _bfd_elf_symbol_refs_local_p
(struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean);
extern bfd_boolean bfd_elf_match_symbols_in_sections
- (asection *, asection *, struct bfd_link_info *);
+ (asection *sec1, asection *sec2);
extern bfd_boolean _bfd_elf_setup_sections
(bfd *);
@@ -1764,7 +1742,7 @@ extern int bfd_elf32_core_file_failing_signal
extern bfd_boolean bfd_elf32_core_file_matches_executable_p
(bfd *, bfd *);
-extern bfd_boolean bfd_elf32_swap_symbol_in
+extern void bfd_elf32_swap_symbol_in
(bfd *, const void *, const void *, Elf_Internal_Sym *);
extern void bfd_elf32_swap_symbol_out
(bfd *, const Elf_Internal_Sym *, void *, void *);
@@ -1806,7 +1784,7 @@ extern int bfd_elf64_core_file_failing_signal
extern bfd_boolean bfd_elf64_core_file_matches_executable_p
(bfd *, bfd *);
-extern bfd_boolean bfd_elf64_swap_symbol_in
+extern void bfd_elf64_swap_symbol_in
(bfd *, const void *, const void *, Elf_Internal_Sym *);
extern void bfd_elf64_swap_symbol_out
(bfd *, const Elf_Internal_Sym *, void *, void *);
@@ -1850,9 +1828,6 @@ extern bfd_boolean bfd_elf_link_record_dynamic_symbol
extern int bfd_elf_link_record_local_dynamic_symbol
(struct bfd_link_info *, bfd *, long);
-extern void bfd_elf_link_mark_dynamic_symbol
- (struct bfd_link_info *, struct elf_link_hash_entry *);
-
extern bfd_boolean _bfd_elf_close_and_cleanup
(bfd *);
@@ -1887,10 +1862,6 @@ extern bfd_boolean bfd_elf_gc_record_vtinherit
extern bfd_boolean bfd_elf_gc_record_vtentry
(bfd *, asection *, struct elf_link_hash_entry *, bfd_vma);
-extern asection *_bfd_elf_gc_mark_hook
- (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *);
-
extern bfd_boolean _bfd_elf_gc_mark
(struct bfd_link_info *, asection *,
asection * (*) (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
@@ -2009,9 +1980,4 @@ extern bfd_boolean _sh_elf_set_mach_from_flags
} \
while (0)
-/* Will a symbol be bound to the the definition within the shared
- library, if any. */
-#define SYMBOLIC_BIND(INFO, H) \
- ((INFO)->symbolic || ((INFO)->dynamic && !(H)->dynamic))
-
#endif /* _LIBELF_H_ */
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 859f534..91596df 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -273,14 +273,11 @@ skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width)
if (!read_byte (iter, end, &op))
return FALSE;
- switch (op & 0xc0 ? op & 0xc0 : op)
+ switch (op & 0x80 ? op & 0xc0 : op)
{
case DW_CFA_nop:
case DW_CFA_advance_loc:
case DW_CFA_restore:
- case DW_CFA_remember_state:
- case DW_CFA_restore_state:
- case DW_CFA_GNU_window_save:
/* No arguments. */
return TRUE;
@@ -295,8 +292,6 @@ skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width)
/* One leb128 argument. */
return skip_leb128 (iter, end);
- case DW_CFA_val_offset:
- case DW_CFA_val_offset_sf:
case DW_CFA_offset_extended:
case DW_CFA_register:
case DW_CFA_def_cfa:
@@ -313,7 +308,6 @@ skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width)
&& skip_bytes (iter, end, length));
case DW_CFA_expression:
- case DW_CFA_val_expression:
/* A leb128 followed by a variable-length argument. */
return (skip_leb128 (iter, end)
&& read_uleb128 (iter, end, &length)
@@ -345,8 +339,7 @@ skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width)
ENCODED_PTR_WIDTH is as for skip_cfa_op. */
static bfd_byte *
-skip_non_nops (bfd_byte *buf, bfd_byte *end, unsigned int encoded_ptr_width,
- unsigned int *set_loc_count)
+skip_non_nops (bfd_byte *buf, bfd_byte *end, unsigned int encoded_ptr_width)
{
bfd_byte *last;
@@ -356,8 +349,6 @@ skip_non_nops (bfd_byte *buf, bfd_byte *end, unsigned int encoded_ptr_width,
buf++;
else
{
- if (*buf == DW_CFA_set_loc)
- ++*set_loc_count;
if (!skip_cfa_op (&buf, end, encoded_ptr_width))
return 0;
last = buf;
@@ -462,9 +453,8 @@ _bfd_elf_discard_section_eh_frame
for (;;)
{
char *aug;
- bfd_byte *start, *end, *insns, *insns_end;
+ bfd_byte *start, *end, *insns;
bfd_size_type length;
- unsigned int set_loc_count;
if (sec_info->count == sec_info->alloced)
{
@@ -568,7 +558,6 @@ _bfd_elf_discard_section_eh_frame
cie_usage_count = 0;
memset (&cie, 0, sizeof (cie));
cie.hdr = hdr;
- start = buf;
REQUIRE (read_byte (&buf, end, &cie.version));
/* Cannot handle unknown versions. */
@@ -786,38 +775,11 @@ _bfd_elf_discard_section_eh_frame
/* Try to interpret the CFA instructions and find the first
padding nop. Shrink this_inf's size so that it doesn't
- include the padding. */
+ including the padding. */
length = get_DW_EH_PE_width (cie.fde_encoding, ptr_size);
- set_loc_count = 0;
- insns_end = skip_non_nops (insns, end, length, &set_loc_count);
- /* If we don't understand the CFA instructions, we can't know
- what needs to be adjusted there. */
- if (insns_end == NULL
- /* For the time being we don't support DW_CFA_set_loc in
- CIE instructions. */
- || (set_loc_count && this_inf->cie))
- goto free_no_table;
- this_inf->size -= end - insns_end;
- if (set_loc_count
- && ((cie.fde_encoding & 0xf0) == DW_EH_PE_pcrel
- || cie.make_relative))
- {
- unsigned int cnt;
- bfd_byte *p;
-
- this_inf->set_loc = bfd_malloc ((set_loc_count + 1)
- * sizeof (unsigned int));
- REQUIRE (this_inf->set_loc);
- this_inf->set_loc[0] = set_loc_count;
- p = insns;
- cnt = 0;
- while (p < end)
- {
- if (*p == DW_CFA_set_loc)
- this_inf->set_loc[++cnt] = p + 1 - start;
- REQUIRE (skip_cfa_op (&p, end, length));
- }
- }
+ insns = skip_non_nops (insns, end, length);
+ if (insns != 0)
+ this_inf->size -= end - insns;
this_inf->fde_encoding = cie.fde_encoding;
this_inf->lsda_encoding = cie.lsda_encoding;
@@ -1003,23 +965,6 @@ _bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED,
return (bfd_vma) -2;
}
- /* If converting to DW_EH_PE_pcrel, there will be no need for run-time
- relocation against DW_CFA_set_loc's arguments. */
- if (sec_info->entry[mid].set_loc
- && (sec_info->entry[mid].cie
- ? sec_info->entry[mid].make_relative
- : sec_info->entry[mid].cie_inf->make_relative)
- && (offset >= sec_info->entry[mid].offset + 8
- + sec_info->entry[mid].set_loc[1]))
- {
- unsigned int cnt;
-
- for (cnt = 1; cnt <= sec_info->entry[mid].set_loc[0]; cnt++)
- if (offset == sec_info->entry[mid].offset + 8
- + sec_info->entry[mid].set_loc[cnt])
- return (bfd_vma) -2;
- }
-
if (hdr_info->offsets_adjusted)
offset -= sec->output_offset;
/* Any new augmentation bytes go before the first relocation. */
@@ -1244,7 +1189,6 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
/* FDE */
bfd_vma value, address;
unsigned int width;
- bfd_byte *start;
/* Skip length. */
buf += 4;
@@ -1281,8 +1225,6 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
write_value (abfd, buf, value, width);
}
- start = buf;
-
if (hdr_info)
{
hdr_info->array[hdr_info->array_count].initial_loc = address;
@@ -1315,36 +1257,6 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
memmove (buf + 1, buf, end - buf);
*buf = 0;
}
-
- if (ent->set_loc)
- {
- /* Adjust DW_CFA_set_loc. */
- unsigned int cnt, width;
- bfd_vma new_offset;
-
- width = get_DW_EH_PE_width (ent->fde_encoding, ptr_size);
- new_offset = ent->new_offset + 8
- + extra_augmentation_string_bytes (ent)
- + extra_augmentation_data_bytes (ent);
-
- for (cnt = 1; cnt <= ent->set_loc[0]; cnt++)
- {
- bfd_vma value;
- buf = start + ent->set_loc[cnt];
-
- value = read_value (abfd, buf, width,
- get_DW_EH_PE_signed (ent->fde_encoding));
- if (!value)
- continue;
-
- if ((ent->fde_encoding & 0xf0) == DW_EH_PE_pcrel)
- value += ent->offset + 8 - new_offset;
- if (ent->cie_inf->make_relative)
- value -= sec->output_section->vma + new_offset
- + ent->set_loc[cnt];
- write_value (abfd, buf, value, width);
- }
- }
}
}
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index 7a72925..a8f4836 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -2,21 +2,21 @@
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
- This file is part of BFD, the Binary File Descriptor library.
+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 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.
+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. */
+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 "bfd.h"
#include "sysdep.h"
@@ -134,6 +134,9 @@ static void mn10300_info_to_howto
static bfd_boolean mn10300_elf_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
+static asection *mn10300_elf_gc_mark_hook
+ PARAMS ((asection *, struct bfd_link_info *info, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
static bfd_boolean mn10300_elf_relax_delete_bytes
PARAMS ((bfd *, asection *, bfd_vma, int));
static bfd_boolean mn10300_elf_symbol_address_p
@@ -883,7 +886,7 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
name + 5) == 0);
@@ -919,21 +922,40 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
relocation. */
static asection *
-mn10300_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
+mn10300_elf_gc_mark_hook (sec, info, rel, h, sym)
+ asection *sec;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_MN10300_GNU_VTINHERIT:
- case R_MN10300_GNU_VTENTRY:
- return NULL;
- }
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_MN10300_GNU_VTINHERIT:
+ case R_MN10300_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ return NULL;
}
/* Perform a relocation as part of a final link. */
@@ -1014,7 +1036,7 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (input_bfd,
input_section),
name + 5) == 0);
@@ -4288,7 +4310,7 @@ _bfd_mn10300_elf_size_dynamic_sections (output_bfd, info)
/* Remember whether there is a PLT. */
plt = s->size != 0;
}
- else if (CONST_STRNEQ (name, ".rela"))
+ else if (strncmp (name, ".rela", 5) == 0)
{
if (s->size != 0)
{
@@ -4321,7 +4343,7 @@ _bfd_mn10300_elf_size_dynamic_sections (output_bfd, info)
s->reloc_count = 0;
}
}
- else if (! CONST_STRNEQ (name, ".got")
+ else if (strncmp (name, ".got", 4) != 0
&& strcmp (name, ".dynbss") != 0)
/* It's not one of our sections, so don't allocate space. */
continue;
@@ -4756,8 +4778,6 @@ _bfd_mn10300_elf_reloc_type_class (const Elf_Internal_Rela *rela)
_bfd_mn10300_elf_adjust_dynamic_symbol
#define elf_backend_size_dynamic_sections \
_bfd_mn10300_elf_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define elf_backend_finish_dynamic_symbol \
_bfd_mn10300_elf_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections \
diff --git a/bfd/elf.c b/bfd/elf.c
index 9550ab1..8dd94e3 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -400,15 +400,7 @@ bfd_elf_get_elf_syms (bfd *ibfd,
for (esym = extsym_buf, isym = intsym_buf, shndx = extshndx_buf;
isym < isymend;
esym += extsym_size, isym++, shndx = shndx != NULL ? shndx + 1 : NULL)
- if (!(*bed->s->swap_symbol_in) (ibfd, esym, shndx, isym))
- {
- symoffset += (esym - (bfd_byte *) extsym_buf) / extsym_size;
- (*_bfd_error_handler) (_("%B symbol number %lu references "
- "nonexistent SHT_SYMTAB_SHNDX section"),
- ibfd, (unsigned long) symoffset);
- intsym_buf = NULL;
- goto out;
- }
+ (*bed->s->swap_symbol_in) (ibfd, esym, shndx, isym);
out:
if (alloc_ext != NULL)
@@ -824,22 +816,22 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
int len;
} debug_sections [] =
{
- { STRING_COMMA_LEN ("debug") }, /* 'd' */
+ { "debug", 5 }, /* 'd' */
{ NULL, 0 }, /* 'e' */
{ NULL, 0 }, /* 'f' */
- { STRING_COMMA_LEN ("gnu.linkonce.wi.") }, /* 'g' */
+ { "gnu.linkonce.wi.", 17 }, /* 'g' */
{ NULL, 0 }, /* 'h' */
{ NULL, 0 }, /* 'i' */
{ NULL, 0 }, /* 'j' */
{ NULL, 0 }, /* 'k' */
- { STRING_COMMA_LEN ("line") }, /* 'l' */
+ { "line", 4 }, /* 'l' */
{ NULL, 0 }, /* 'm' */
{ NULL, 0 }, /* 'n' */
{ NULL, 0 }, /* 'o' */
{ NULL, 0 }, /* 'p' */
{ NULL, 0 }, /* 'q' */
{ NULL, 0 }, /* 'r' */
- { STRING_COMMA_LEN ("stab") } /* 's' */
+ { "stab", 4 } /* 's' */
};
if (name [0] == '.')
@@ -860,7 +852,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
The symbols will be defined as weak, so that multiple definitions
are permitted. The GNU linker extension is to actually discard
all but one of the sections. */
- if (CONST_STRNEQ (name, ".gnu.linkonce")
+ if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0
&& elf_next_in_group (newsect) == NULL)
flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
@@ -1668,7 +1660,7 @@ bfd_elf_get_dyn_lib_class (bfd *abfd)
}
void
-bfd_elf_set_dyn_lib_class (bfd *abfd, enum dynamic_lib_link_class lib_class)
+bfd_elf_set_dyn_lib_class (bfd *abfd, int lib_class)
{
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
&& bfd_get_format (abfd) == bfd_object)
@@ -2126,11 +2118,13 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
abfd->flags |= HAS_RELOC;
return TRUE;
}
+ break;
case SHT_GNU_verdef:
elf_dynverdef (abfd) = shindex;
elf_tdata (abfd)->dynverdef_hdr = *hdr;
return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
+ break;
case SHT_GNU_versym:
if (hdr->sh_entsize != sizeof (Elf_External_Versym))
@@ -2287,111 +2281,109 @@ bfd_section_from_elf_index (bfd *abfd, unsigned int index)
static const struct bfd_elf_special_section special_sections_b[] =
{
- { STRING_COMMA_LEN (".bss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, 0, 0, 0 }
+ { ".bss", 4, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_c[] =
{
- { STRING_COMMA_LEN (".comment"), 0, SHT_PROGBITS, 0 },
- { NULL, 0, 0, 0, 0 }
+ { ".comment", 8, 0, SHT_PROGBITS, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_d[] =
{
- { STRING_COMMA_LEN (".data"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".data1"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".debug"), 0, SHT_PROGBITS, 0 },
- { STRING_COMMA_LEN (".debug_line"), 0, SHT_PROGBITS, 0 },
- { STRING_COMMA_LEN (".debug_info"), 0, SHT_PROGBITS, 0 },
- { STRING_COMMA_LEN (".debug_abbrev"), 0, SHT_PROGBITS, 0 },
- { STRING_COMMA_LEN (".debug_aranges"), 0, SHT_PROGBITS, 0 },
- { STRING_COMMA_LEN (".dynamic"), 0, SHT_DYNAMIC, SHF_ALLOC },
- { STRING_COMMA_LEN (".dynstr"), 0, SHT_STRTAB, SHF_ALLOC },
- { STRING_COMMA_LEN (".dynsym"), 0, SHT_DYNSYM, SHF_ALLOC },
- { NULL, 0, 0, 0, 0 }
+ { ".data", 5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".data1", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".debug", 6, 0, SHT_PROGBITS, 0 },
+ { ".debug_line", 11, 0, SHT_PROGBITS, 0 },
+ { ".debug_info", 11, 0, SHT_PROGBITS, 0 },
+ { ".debug_abbrev", 13, 0, SHT_PROGBITS, 0 },
+ { ".debug_aranges", 14, 0, SHT_PROGBITS, 0 },
+ { ".dynamic", 8, 0, SHT_DYNAMIC, SHF_ALLOC },
+ { ".dynstr", 7, 0, SHT_STRTAB, SHF_ALLOC },
+ { ".dynsym", 7, 0, SHT_DYNSYM, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_f[] =
{
- { STRING_COMMA_LEN (".fini"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { STRING_COMMA_LEN (".fini_array"), 0, SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, 0, 0, 0 }
+ { ".fini", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { ".fini_array", 11, 0, SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_g[] =
{
- { STRING_COMMA_LEN (".gnu.linkonce.b"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".got"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".gnu.version"), 0, SHT_GNU_versym, 0 },
- { STRING_COMMA_LEN (".gnu.version_d"), 0, SHT_GNU_verdef, 0 },
- { STRING_COMMA_LEN (".gnu.version_r"), 0, SHT_GNU_verneed, 0 },
- { STRING_COMMA_LEN (".gnu.liblist"), 0, SHT_GNU_LIBLIST, SHF_ALLOC },
- { STRING_COMMA_LEN (".gnu.conflict"), 0, SHT_RELA, SHF_ALLOC },
- { STRING_COMMA_LEN (".gnu.hash"), 0, SHT_GNU_HASH, SHF_ALLOC },
- { NULL, 0, 0, 0, 0 }
+ { ".gnu.linkonce.b",15, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".got", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".gnu.version", 12, 0, SHT_GNU_versym, 0 },
+ { ".gnu.version_d", 14, 0, SHT_GNU_verdef, 0 },
+ { ".gnu.version_r", 14, 0, SHT_GNU_verneed, 0 },
+ { ".gnu.liblist", 12, 0, SHT_GNU_LIBLIST, SHF_ALLOC },
+ { ".gnu.conflict", 13, 0, SHT_RELA, SHF_ALLOC },
+ { ".gnu.hash", 9, 0, SHT_GNU_HASH, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_h[] =
{
- { STRING_COMMA_LEN (".hash"), 0, SHT_HASH, SHF_ALLOC },
- { NULL, 0, 0, 0, 0 }
+ { ".hash", 5, 0, SHT_HASH, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_i[] =
{
- { STRING_COMMA_LEN (".init"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { STRING_COMMA_LEN (".init_array"), 0, SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".interp"), 0, SHT_PROGBITS, 0 },
- { NULL, 0, 0, 0, 0 }
+ { ".init", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { ".init_array", 11, 0, SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE },
+ { ".interp", 7, 0, SHT_PROGBITS, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_l[] =
{
- { STRING_COMMA_LEN (".line"), 0, SHT_PROGBITS, 0 },
- { NULL, 0, 0, 0, 0 }
+ { ".line", 5, 0, SHT_PROGBITS, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_n[] =
{
- { STRING_COMMA_LEN (".note.GNU-stack"), 0, SHT_PROGBITS, 0 },
- { STRING_COMMA_LEN (".note"), -1, SHT_NOTE, 0 },
- { NULL, 0, 0, 0, 0 }
+ { ".note.GNU-stack",15, 0, SHT_PROGBITS, 0 },
+ { ".note", 5, -1, SHT_NOTE, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_p[] =
{
- { STRING_COMMA_LEN (".preinit_array"), 0, SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".plt"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { NULL, 0, 0, 0, 0 }
+ { ".preinit_array", 14, 0, SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE },
+ { ".plt", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_r[] =
{
- { STRING_COMMA_LEN (".rodata"), -2, SHT_PROGBITS, SHF_ALLOC },
- { STRING_COMMA_LEN (".rodata1"), 0, SHT_PROGBITS, SHF_ALLOC },
- { STRING_COMMA_LEN (".rela"), -1, SHT_RELA, 0 },
- { STRING_COMMA_LEN (".rel"), -1, SHT_REL, 0 },
- { NULL, 0, 0, 0, 0 }
+ { ".rodata", 7, -2, SHT_PROGBITS, SHF_ALLOC },
+ { ".rodata1", 8, 0, SHT_PROGBITS, SHF_ALLOC },
+ { ".rela", 5, -1, SHT_RELA, 0 },
+ { ".rel", 4, -1, SHT_REL, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_s[] =
{
- { STRING_COMMA_LEN (".shstrtab"), 0, SHT_STRTAB, 0 },
- { STRING_COMMA_LEN (".strtab"), 0, SHT_STRTAB, 0 },
- { STRING_COMMA_LEN (".symtab"), 0, SHT_SYMTAB, 0 },
- /* See struct bfd_elf_special_section declaration for the semantics of
- this special case where .prefix_length != strlen (.prefix). */
- { ".stabstr", 5, 3, SHT_STRTAB, 0 },
- { NULL, 0, 0, 0, 0 }
+ { ".shstrtab", 9, 0, SHT_STRTAB, 0 },
+ { ".strtab", 7, 0, SHT_STRTAB, 0 },
+ { ".symtab", 7, 0, SHT_SYMTAB, 0 },
+ { ".stabstr", 5, 3, SHT_STRTAB, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_t[] =
{
- { STRING_COMMA_LEN (".text"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { STRING_COMMA_LEN (".tbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
- { STRING_COMMA_LEN (".tdata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
- { NULL, 0, 0, 0, 0 }
+ { ".text", 5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { ".tbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
+ { ".tdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section *special_sections[] =
@@ -3173,7 +3165,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
s, s->owner);
/* Point to the kept section if it has the same
size as the discarded one. */
- kept = _bfd_elf_check_kept_section (s, link_info);
+ kept = _bfd_elf_check_kept_section (s);
if (kept == NULL)
{
bfd_set_error (bfd_error_bad_value);
@@ -3246,7 +3238,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
string section. We look for a section with the same name
but without the trailing ``str'', and set its sh_link
field to point to this section. */
- if (CONST_STRNEQ (sec->name, ".stab")
+ if (strncmp (sec->name, ".stab", sizeof ".stab" - 1) == 0
&& strcmp (sec->name + strlen (sec->name) - 3, "str") == 0)
{
size_t len;
@@ -3654,7 +3646,7 @@ get_program_header_size (bfd *abfd, struct bfd_link_info *info)
for (s = abfd->sections; s != NULL; s = s->next)
{
if ((s->flags & SEC_LOAD) != 0
- && CONST_STRNEQ (s->name, ".note"))
+ && strncmp (s->name, ".note", 5) == 0)
{
/* We need a PT_NOTE segment. */
++segs;
@@ -4036,7 +4028,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
for (s = abfd->sections; s != NULL; s = s->next)
{
if ((s->flags & SEC_LOAD) != 0
- && CONST_STRNEQ (s->name, ".note"))
+ && strncmp (s->name, ".note", 5) == 0)
{
amt = sizeof (struct elf_segment_map);
m = bfd_zalloc (abfd, amt);
@@ -4660,15 +4652,13 @@ assign_file_positions_for_non_load_sections (bfd *abfd,
hdr->sh_offset = hdr->bfd_section->filepos;
else if ((hdr->sh_flags & SHF_ALLOC) != 0)
{
- if (hdr->sh_size != 0)
- ((*_bfd_error_handler)
- (_("%B: warning: allocated section `%s' not in segment"),
- abfd,
- (hdr->bfd_section == NULL
- ? "*unknown*"
- : hdr->bfd_section->name)));
- /* We don't need to page align empty sections. */
- if ((abfd->flags & D_PAGED) != 0 && hdr->sh_size != 0)
+ ((*_bfd_error_handler)
+ (_("%B: warning: allocated section `%s' not in segment"),
+ abfd,
+ (hdr->bfd_section == NULL
+ ? "*unknown*"
+ : hdr->bfd_section->name)));
+ if ((abfd->flags & D_PAGED) != 0)
off += vma_page_aligned_bias (hdr->sh_addr, off,
bed->maxpagesize);
else
@@ -5401,7 +5391,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
all of the sections we have selected. */
amt = sizeof (struct elf_segment_map);
amt += ((bfd_size_type) section_count - 1) * sizeof (asection *);
- map = bfd_zalloc (obfd, amt);
+ map = bfd_alloc (obfd, amt);
if (map == NULL)
return FALSE;
@@ -5796,7 +5786,7 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd)
amt = sizeof (struct elf_segment_map);
if (section_count != 0)
amt += ((bfd_size_type) section_count - 1) * sizeof (asection *);
- map = bfd_zalloc (obfd, amt);
+ map = bfd_alloc (obfd, amt);
if (map == NULL)
return FALSE;
@@ -5950,17 +5940,9 @@ _bfd_elf_init_private_section_data (bfd *ibfd,
output BFD section flags have been set to something different.
elf_fake_sections will set ELF section type based on BFD
section flags. */
- if (osec->flags == isec->flags || !osec->flags)
- {
- BFD_ASSERT (osec->flags == isec->flags
- || (!osec->flags
- && elf_section_type (osec) == SHT_NULL));
- elf_section_type (osec) = elf_section_type (isec);
- }
-
- /* FIXME: Is this correct for all OS/PROC specific flags? */
- elf_section_flags (osec) |= (elf_section_flags (isec)
- & (SHF_MASKOS | SHF_MASKPROC));
+ if (osec->flags == isec->flags
+ || (osec->flags == 0 && elf_section_type (osec) == SHT_NULL))
+ elf_section_type (osec) = elf_section_type (isec);
/* Set things up for objcopy and relocatable link. The output
SHT_GROUP section will have its elf_next_in_group pointing back
@@ -6030,8 +6012,6 @@ _bfd_elf_copy_private_section_data (bfd *ibfd,
bfd_boolean
_bfd_elf_copy_private_header_data (bfd *ibfd, bfd *obfd)
{
- asection *isec;
-
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
return TRUE;
@@ -6047,27 +6027,6 @@ _bfd_elf_copy_private_header_data (bfd *ibfd, bfd *obfd)
return FALSE;
}
- /* _bfd_elf_copy_private_section_data copied over the SHF_GROUP flag
- but this might be wrong if we deleted the group section. */
- for (isec = ibfd->sections; isec != NULL; isec = isec->next)
- if (elf_section_type (isec) == SHT_GROUP
- && isec->output_section == NULL)
- {
- asection *first = elf_next_in_group (isec);
- asection *s = first;
- while (s != NULL)
- {
- if (s->output_section != NULL)
- {
- elf_section_flags (s->output_section) &= ~SHF_GROUP;
- elf_group_name (s->output_section) = NULL;
- }
- s = elf_next_in_group (s);
- if (s == first)
- break;
- }
- }
-
return TRUE;
}
@@ -8088,42 +8047,45 @@ elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note)
/* Function: elfcore_write_note
Inputs:
- buffer to hold note, and current size of buffer
+ buffer to hold note
name of note
type of note
data for note
size of data for note
- Writes note to end of buffer. ELF64 notes are written exactly as
- for ELF32, despite the current (as of 2006) ELF gabi specifying
- that they ought to have 8-byte namesz and descsz field, and have
- 8-byte alignment. Other writers, eg. Linux kernel, do the same.
-
Return:
- Pointer to realloc'd buffer, *BUFSIZ updated. */
+ End of buffer containing note. */
char *
-elfcore_write_note (bfd *abfd,
+elfcore_write_note (bfd *abfd,
char *buf,
- int *bufsiz,
+ int *bufsiz,
const char *name,
- int type,
+ int type,
const void *input,
- int size)
+ int size)
{
Elf_External_Note *xnp;
size_t namesz;
+ size_t pad;
size_t newspace;
- char *dest;
+ char *p, *dest;
namesz = 0;
+ pad = 0;
if (name != NULL)
- namesz = strlen (name) + 1;
+ {
+ const struct elf_backend_data *bed;
+
+ namesz = strlen (name) + 1;
+ bed = get_elf_backend_data (abfd);
+ pad = -namesz & ((1 << bed->s->log_file_align) - 1);
+ }
- newspace = 12 + ((namesz + 3) & -4) + ((size + 3) & -4);
+ newspace = 12 + namesz + pad + size;
- buf = realloc (buf, *bufsiz + newspace);
- dest = buf + *bufsiz;
+ p = realloc (buf, *bufsiz + newspace);
+ dest = p + *bufsiz;
*bufsiz += newspace;
xnp = (Elf_External_Note *) dest;
H_PUT_32 (abfd, namesz, xnp->namesz);
@@ -8134,20 +8096,14 @@ elfcore_write_note (bfd *abfd,
{
memcpy (dest, name, namesz);
dest += namesz;
- while (namesz & 3)
+ while (pad != 0)
{
*dest++ = '\0';
- ++namesz;
+ --pad;
}
}
memcpy (dest, input, size);
- dest += size;
- while (size & 3)
- {
- *dest++ = '\0';
- ++size;
- }
- return buf;
+ return p;
}
#if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T)
@@ -8312,12 +8268,12 @@ elfcore_read_notes (bfd *abfd, file_ptr offset, bfd_size_type size)
in.descdata = in.namedata + BFD_ALIGN (in.namesz, 4);
in.descpos = offset + (in.descdata - buf);
- if (CONST_STRNEQ (in.namedata, "NetBSD-CORE"))
+ if (strncmp (in.namedata, "NetBSD-CORE", 11) == 0)
{
if (! elfcore_grok_netbsd_note (abfd, &in))
goto error;
}
- else if (CONST_STRNEQ (in.namedata, "QNX"))
+ else if (strncmp (in.namedata, "QNX", 3) == 0)
{
if (! elfcore_grok_nto_note (abfd, &in))
goto error;
@@ -8677,8 +8633,7 @@ elf_sym_name_compare (const void *arg1, const void *arg2)
symbols. */
bfd_boolean
-bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2,
- struct bfd_link_info *info)
+bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2)
{
bfd *bfd1, *bfd2;
const struct elf_backend_data *bed1, *bed2;
@@ -8697,8 +8652,10 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2,
/* If both are .gnu.linkonce sections, they have to have the same
section name. */
- if (CONST_STRNEQ (sec1->name, ".gnu.linkonce")
- && CONST_STRNEQ (sec2->name, ".gnu.linkonce"))
+ if (strncmp (sec1->name, ".gnu.linkonce",
+ sizeof ".gnu.linkonce" - 1) == 0
+ && strncmp (sec2->name, ".gnu.linkonce",
+ sizeof ".gnu.linkonce" - 1) == 0)
return strcmp (sec1->name + sizeof ".gnu.linkonce",
sec2->name + sizeof ".gnu.linkonce") == 0;
@@ -8734,37 +8691,21 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2,
if (symcount1 == 0 || symcount2 == 0)
return FALSE;
- result = FALSE;
- isymbuf1 = elf_tdata (bfd1)->symbuf;
- isymbuf2 = elf_tdata (bfd2)->symbuf;
+ isymbuf1 = bfd_elf_get_elf_syms (bfd1, hdr1, symcount1, 0,
+ NULL, NULL, NULL);
+ isymbuf2 = bfd_elf_get_elf_syms (bfd2, hdr2, symcount2, 0,
+ NULL, NULL, NULL);
- if (isymbuf1 == NULL)
- {
- isymbuf1 = bfd_elf_get_elf_syms (bfd1, hdr1, symcount1, 0,
- NULL, NULL, NULL);
- if (isymbuf1 == NULL)
- goto done;
- /* Sort symbols by binding and section. Global definitions are at
- the beginning. */
- qsort (isymbuf1, symcount1, sizeof (Elf_Internal_Sym),
- elf_sort_elf_symbol);
- if (!info->reduce_memory_overheads)
- elf_tdata (bfd1)->symbuf = isymbuf1;
- }
+ result = FALSE;
+ if (isymbuf1 == NULL || isymbuf2 == NULL)
+ goto done;
- if (isymbuf2 == NULL)
- {
- isymbuf2 = bfd_elf_get_elf_syms (bfd2, hdr2, symcount2, 0,
- NULL, NULL, NULL);
- if (isymbuf2 == NULL)
- goto done;
- /* Sort symbols by binding and section. Global definitions are at
- the beginning. */
- qsort (isymbuf2, symcount2, sizeof (Elf_Internal_Sym),
- elf_sort_elf_symbol);
- if (!info->reduce_memory_overheads)
- elf_tdata (bfd2)->symbuf = isymbuf2;
- }
+ /* Sort symbols by binding and section. Global definitions are at
+ the beginning. */
+ qsort (isymbuf1, symcount1, sizeof (Elf_Internal_Sym),
+ elf_sort_elf_symbol);
+ qsort (isymbuf2, symcount2, sizeof (Elf_Internal_Sym),
+ elf_sort_elf_symbol);
/* Count definitions in the section. */
count1 = 0;
@@ -8848,13 +8789,10 @@ done:
free (symtable1);
if (symtable2)
free (symtable2);
- if (info->reduce_memory_overheads)
- {
- if (isymbuf1)
- free (isymbuf1);
- if (isymbuf2)
- free (isymbuf2);
- }
+ if (isymbuf1)
+ free (isymbuf1);
+ if (isymbuf2)
+ free (isymbuf2);
return result;
}
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index dc784db..1631149 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -217,10 +217,11 @@ static reloc_howto_type elf32_arm_howto_table_1[] =
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
+ /* FIXME: Has two more bits of offset in Thumb32. */
HOWTO (R_ARM_THM_CALL, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 25, /* bitsize */
+ 23, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
@@ -834,12 +835,12 @@ static reloc_howto_type elf32_arm_howto_table_1[] =
13, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
+ complain_overflow_signed,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_ALU_PREL_11_0",/* name */
FALSE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0x040070ff, /* src_mask */
+ 0x040070ff, /* dst_mask */
TRUE), /* pcrel_offset */
HOWTO (R_ARM_THM_PC12, /* type */
@@ -848,12 +849,12 @@ static reloc_howto_type elf32_arm_howto_table_1[] =
13, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
+ complain_overflow_signed,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_PC12", /* name */
FALSE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0x040070ff, /* src_mask */
+ 0x040070ff, /* dst_mask */
TRUE), /* pcrel_offset */
HOWTO (R_ARM_ABS32_NOI, /* type */
@@ -2220,9 +2221,9 @@ reloc_section_p (struct elf32_arm_link_hash_table *htab,
const char *name, asection *s)
{
if (htab->use_rel)
- return CONST_STRNEQ (name, ".rel") && strcmp (s->name, name + 4) == 0;
+ return strncmp (name, ".rel", 4) == 0 && strcmp (s->name, name + 4) == 0;
else
- return CONST_STRNEQ (name, ".rela") && strcmp (s->name, name + 5) == 0;
+ return strncmp (name, ".rela", 5) == 0 && strcmp (s->name, name + 5) == 0;
}
/* Create .got, .gotplt, and .rel(a).got sections in DYNOBJ, and set up
@@ -2429,7 +2430,7 @@ elf32_arm_link_hash_table_create (bfd *abfd)
static struct elf_link_hash_entry *
find_thumb_glue (struct bfd_link_info *link_info,
const char *name,
- char **error_message)
+ bfd *input_bfd)
{
char *tmp_name;
struct elf_link_hash_entry *hash;
@@ -2449,8 +2450,9 @@ find_thumb_glue (struct bfd_link_info *link_info,
(&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE);
if (hash == NULL)
- asprintf (error_message, _("unable to find THUMB glue '%s' for '%s'"),
- tmp_name, name);
+ /* xgettext:c-format */
+ (*_bfd_error_handler) (_("%B: unable to find THUMB glue '%s' for `%s'"),
+ input_bfd, tmp_name, name);
free (tmp_name);
@@ -2462,7 +2464,7 @@ find_thumb_glue (struct bfd_link_info *link_info,
static struct elf_link_hash_entry *
find_arm_glue (struct bfd_link_info *link_info,
const char *name,
- char **error_message)
+ bfd *input_bfd)
{
char *tmp_name;
struct elf_link_hash_entry *myh;
@@ -2482,8 +2484,9 @@ find_arm_glue (struct bfd_link_info *link_info,
(&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE);
if (myh == NULL)
- asprintf (error_message, _("unable to find ARM glue '%s' for '%s'"),
- tmp_name, name);
+ /* xgettext:c-format */
+ (*_bfd_error_handler) (_("%B: unable to find ARM glue '%s' for `%s'"),
+ input_bfd, tmp_name, name);
free (tmp_name);
@@ -2563,7 +2566,7 @@ bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info * info)
foo = bfd_alloc (globals->bfd_of_glue_owner, globals->arm_glue_size);
- BFD_ASSERT (s->size == globals->arm_glue_size);
+ s->size = globals->arm_glue_size;
s->contents = foo;
}
@@ -2578,7 +2581,7 @@ bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info * info)
foo = bfd_alloc (globals->bfd_of_glue_owner, globals->thumb_glue_size);
- BFD_ASSERT (s->size == globals->thumb_glue_size);
+ s->size = globals->thumb_glue_size;
s->contents = foo;
}
@@ -2598,7 +2601,6 @@ record_arm_to_thumb_glue (struct bfd_link_info * link_info,
struct bfd_link_hash_entry * bh;
struct elf32_arm_link_hash_table * globals;
bfd_vma val;
- bfd_size_type size;
globals = elf32_arm_hash_table (link_info);
@@ -2642,12 +2644,9 @@ record_arm_to_thumb_glue (struct bfd_link_info * link_info,
free (tmp_name);
if ((link_info->shared || globals->root.is_relocatable_executable))
- size = ARM2THUMB_PIC_GLUE_SIZE;
+ globals->arm_glue_size += ARM2THUMB_PIC_GLUE_SIZE;
else
- size = ARM2THUMB_STATIC_GLUE_SIZE;
-
- s->size += size;
- globals->arm_glue_size += size;
+ globals->arm_glue_size += ARM2THUMB_STATIC_GLUE_SIZE;
return myh;
}
@@ -2723,7 +2722,6 @@ record_thumb_to_arm_glue (struct bfd_link_info *link_info,
free (tmp_name);
- s->size += THUMB2ARM_GLUE_SIZE;
hash_table->thumb_glue_size += THUMB2ARM_GLUE_SIZE;
return;
@@ -2751,8 +2749,7 @@ bfd_elf32_arm_add_glue_sections_to_bfd (bfd *abfd,
/* Note: we do not include the flag SEC_LINKER_CREATED, as this
will prevent elf_link_input_bfd() from processing the contents
of this section. */
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_CODE | SEC_READONLY);
+ flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY;
sec = bfd_make_section_with_flags (abfd,
ARM2THUMB_GLUE_SECTION_NAME,
@@ -2771,8 +2768,8 @@ bfd_elf32_arm_add_glue_sections_to_bfd (bfd *abfd,
if (sec == NULL)
{
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_CODE | SEC_READONLY);
+ flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_CODE | SEC_READONLY;
sec = bfd_make_section_with_flags (abfd,
THUMB2ARM_GLUE_SECTION_NAME,
@@ -2826,7 +2823,8 @@ static void check_use_blx(struct elf32_arm_link_hash_table *globals)
bfd_boolean
bfd_elf32_arm_process_before_allocation (bfd *abfd,
- struct bfd_link_info *link_info)
+ struct bfd_link_info *link_info,
+ int byteswap_code)
{
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *internal_relocs = NULL;
@@ -2849,12 +2847,13 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd,
BFD_ASSERT (globals != NULL);
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
- if (globals->byteswap_code && !bfd_big_endian (abfd))
+ if (byteswap_code && !bfd_big_endian (abfd))
{
_bfd_error_handler (_("%B: BE8 images only valid in big-endian mode."),
abfd);
return FALSE;
}
+ globals->byteswap_code = byteswap_code;
/* Rummage around all the relocs and map the glue vectors. */
sec = abfd->sections;
@@ -2867,9 +2866,6 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd,
if (sec->reloc_count == 0)
continue;
- if ((sec->flags & SEC_EXCLUDE) != 0)
- continue;
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
/* Load the relocs. */
@@ -3112,8 +3108,7 @@ elf32_thumb_to_arm_stub (struct bfd_link_info * info,
asection * sym_sec,
bfd_vma offset,
bfd_signed_vma addend,
- bfd_vma val,
- char **error_message)
+ bfd_vma val)
{
asection * s = 0;
bfd_vma my_offset;
@@ -3122,7 +3117,7 @@ elf32_thumb_to_arm_stub (struct bfd_link_info * info,
struct elf_link_hash_entry * myh;
struct elf32_arm_link_hash_table * globals;
- myh = find_thumb_glue (info, name, error_message);
+ myh = find_thumb_glue (info, name, input_bfd);
if (myh == NULL)
return FALSE;
@@ -3217,15 +3212,14 @@ elf32_arm_create_thumb_stub (struct bfd_link_info * info,
bfd * output_bfd,
asection * sym_sec,
bfd_vma val,
- asection *s,
- char **error_message)
+ asection *s)
{
bfd_vma my_offset;
long int ret_offset;
struct elf_link_hash_entry * myh;
struct elf32_arm_link_hash_table * globals;
- myh = find_arm_glue (info, name, error_message);
+ myh = find_arm_glue (info, name, input_bfd);
if (myh == NULL)
return NULL;
@@ -3303,8 +3297,7 @@ elf32_arm_to_thumb_stub (struct bfd_link_info * info,
asection * sym_sec,
bfd_vma offset,
bfd_signed_vma addend,
- bfd_vma val,
- char **error_message)
+ bfd_vma val)
{
unsigned long int tmp;
bfd_vma my_offset;
@@ -3325,7 +3318,7 @@ elf32_arm_to_thumb_stub (struct bfd_link_info * info,
BFD_ASSERT (s->output_section != NULL);
myh = elf32_arm_create_thumb_stub (info, name, input_bfd, output_bfd,
- sym_sec, val, s, error_message);
+ sym_sec, val, s);
if (!myh)
return FALSE;
@@ -3361,7 +3354,6 @@ elf32_arm_to_thumb_export_stub (struct elf_link_hash_entry *h, void * inf)
struct elf32_arm_link_hash_table * globals;
asection *sec;
bfd_vma val;
- char *error_message;
eh = elf32_arm_hash_entry(h);
/* Allocate stubs for exported Thumb functions on v4t. */
@@ -3384,8 +3376,7 @@ elf32_arm_to_thumb_export_stub (struct elf_link_hash_entry *h, void * inf)
+ sec->output_section->vma;
myh = elf32_arm_create_thumb_stub (info, h->root.root.string,
h->root.u.def.section->owner,
- globals->obfd, sec, val, s,
- &error_message);
+ globals->obfd, sec, val, s);
BFD_ASSERT (myh);
return TRUE;
}
@@ -3543,14 +3534,6 @@ identify_add_or_sub(bfd_vma insn)
return 0;
}
-/* Determine if we're dealing with a Thumb-2 object. */
-
-static int using_thumb2 (struct elf32_arm_link_hash_table *globals)
-{
- int arch = elf32_arm_get_eabi_attr_int (globals->obfd, Tag_CPU_arch);
- return arch == TAG_CPU_ARCH_V6T2 || arch >= TAG_CPU_ARCH_V7;
-}
-
/* Perform a relocation as part of a final link. */
static bfd_reloc_status_type
@@ -3566,8 +3549,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
const char * sym_name,
int sym_flags,
struct elf_link_hash_entry * h,
- bfd_boolean * unresolved_reloc_p,
- char **error_message)
+ bfd_boolean * unresolved_reloc_p)
{
unsigned long r_type = howto->type;
unsigned long r_symndx;
@@ -3644,9 +3626,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
case R_ARM_PC24:
case R_ARM_ABS32:
- case R_ARM_ABS32_NOI:
case R_ARM_REL32:
- case R_ARM_REL32_NOI:
case R_ARM_CALL:
case R_ARM_JUMP24:
case R_ARM_XPC25:
@@ -3656,17 +3636,13 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
from removed linkonce sections, or sections discarded by
a linker script. */
if (r_symndx == 0)
- {
- _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
- return bfd_reloc_ok;
- }
+ return bfd_reloc_ok;
/* Handle relocations which should use the PLT entry. ABS32/REL32
will use the symbol's value, which may point to a PLT entry, but we
don't need to handle that here. If we created a PLT entry, all
branches in this object should go to it. */
- if ((r_type != R_ARM_ABS32 && r_type != R_ARM_REL32
- && r_type != R_ARM_ABS32_NOI && r_type != R_ARM_REL32_NOI)
+ if ((r_type != R_ARM_ABS32 && r_type != R_ARM_REL32)
&& h != NULL
&& splt != NULL
&& h->plt.offset != (bfd_vma) -1)
@@ -3690,7 +3666,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
run time. */
if ((info->shared || globals->root.is_relocatable_executable)
&& (input_section->flags & SEC_ALLOC)
- && ((r_type != R_ARM_REL32 && r_type != R_ARM_REL32_NOI)
+ && (r_type != R_ARM_REL32
|| !SYMBOL_CALLS_LOCAL (info, h))
&& (h == NULL
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
@@ -3755,8 +3731,6 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
value |= 1;
if (globals->symbian_p)
{
- asection *osec;
-
/* On Symbian OS, the data segment and text segement
can be relocated independently. Therefore, we
must indicate the segment to which this
@@ -3764,27 +3738,11 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
use any symbol in the right segment; we just use
the section symbol as it is convenient. (We
cannot use the symbol given by "h" directly as it
- will not appear in the dynamic symbol table.)
-
- Note that the dynamic linker ignores the section
- symbol value, so we don't subtract osec->vma
- from the emitted reloc addend. */
+ will not appear in the dynamic symbol table.) */
if (sym_sec)
- osec = sym_sec->output_section;
+ symbol = elf_section_data (sym_sec->output_section)->dynindx;
else
- osec = input_section->output_section;
- symbol = elf_section_data (osec)->dynindx;
- if (symbol == 0)
- {
- struct elf_link_hash_table *htab = elf_hash_table (info);
-
- if ((osec->flags & SEC_READONLY) == 0
- && htab->data_index_section != NULL)
- osec = htab->data_index_section;
- else
- osec = htab->text_index_section;
- symbol = elf_section_data (osec)->dynindx;
- }
+ symbol = elf_section_data (input_section->output_section)->dynindx;
BFD_ASSERT (symbol != 0);
}
else
@@ -3839,14 +3797,11 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
/* Check for Arm calling Thumb function. */
if (sym_flags == STT_ARM_TFUNC)
{
- if (elf32_arm_to_thumb_stub (info, sym_name, input_bfd,
- output_bfd, input_section,
- hit_data, sym_sec, rel->r_offset,
- signed_addend, value,
- error_message))
- return bfd_reloc_ok;
- else
- return bfd_reloc_dangerous;
+ elf32_arm_to_thumb_stub (info, sym_name, input_bfd,
+ output_bfd, input_section,
+ hit_data, sym_sec, rel->r_offset,
+ signed_addend, value);
+ return bfd_reloc_ok;
}
}
@@ -3925,10 +3880,6 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
value |= 1;
break;
- case R_ARM_ABS32_NOI:
- value += addend;
- break;
-
case R_ARM_REL32:
value += addend;
if (sym_flags == STT_ARM_TFUNC)
@@ -3937,12 +3888,6 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
+ input_section->output_offset + rel->r_offset);
break;
- case R_ARM_REL32_NOI:
- value += addend;
- value -= (input_section->output_section->vma
- + input_section->output_offset + rel->r_offset);
- break;
-
case R_ARM_PREL31:
value -= (input_section->output_section->vma
+ input_section->output_offset + rel->r_offset);
@@ -4000,113 +3945,27 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
bfd_put_16 (input_bfd, value, hit_data);
return bfd_reloc_ok;
- case R_ARM_THM_ALU_PREL_11_0:
- /* Corresponds to: addw.w reg, pc, #offset (and similarly for subw). */
- {
- bfd_vma insn;
- bfd_signed_vma relocation;
-
- insn = (bfd_get_16 (input_bfd, hit_data) << 16)
- | bfd_get_16 (input_bfd, hit_data + 2);
-
- if (globals->use_rel)
- {
- signed_addend = (insn & 0xff) | ((insn & 0x7000) >> 4)
- | ((insn & (1 << 26)) >> 15);
- if (insn & 0xf00000)
- signed_addend = -signed_addend;
- }
-
- relocation = value + signed_addend;
- relocation -= (input_section->output_section->vma
- + input_section->output_offset
- + rel->r_offset);
-
- value = abs (relocation);
-
- if (value >= 0x1000)
- return bfd_reloc_overflow;
-
- insn = (insn & 0xfb0f8f00) | (value & 0xff)
- | ((value & 0x700) << 4)
- | ((value & 0x800) << 15);
- if (relocation < 0)
- insn |= 0xa00000;
-
- bfd_put_16 (input_bfd, insn >> 16, hit_data);
- bfd_put_16 (input_bfd, insn & 0xffff, hit_data + 2);
-
- return bfd_reloc_ok;
- }
-
- case R_ARM_THM_PC12:
- /* Corresponds to: ldr.w reg, [pc, #offset]. */
- {
- bfd_vma insn;
- bfd_signed_vma relocation;
-
- insn = (bfd_get_16 (input_bfd, hit_data) << 16)
- | bfd_get_16 (input_bfd, hit_data + 2);
-
- if (globals->use_rel)
- {
- signed_addend = insn & 0xfff;
- if (!(insn & (1 << 23)))
- signed_addend = -signed_addend;
- }
-
- relocation = value + signed_addend;
- relocation -= (input_section->output_section->vma
- + input_section->output_offset
- + rel->r_offset);
-
- value = abs (relocation);
-
- if (value >= 0x1000)
- return bfd_reloc_overflow;
-
- insn = (insn & 0xff7ff000) | value;
- if (relocation >= 0)
- insn |= (1 << 23);
-
- bfd_put_16 (input_bfd, insn >> 16, hit_data);
- bfd_put_16 (input_bfd, insn & 0xffff, hit_data + 2);
-
- return bfd_reloc_ok;
- }
-
case R_ARM_THM_XPC22:
case R_ARM_THM_CALL:
/* Thumb BL (branch long instruction). */
{
bfd_vma relocation;
- bfd_vma reloc_sign;
bfd_boolean overflow = FALSE;
bfd_vma upper_insn = bfd_get_16 (input_bfd, hit_data);
bfd_vma lower_insn = bfd_get_16 (input_bfd, hit_data + 2);
- bfd_signed_vma reloc_signed_max;
- bfd_signed_vma reloc_signed_min;
+ bfd_signed_vma reloc_signed_max = ((1 << (howto->bitsize - 1)) - 1) >> howto->rightshift;
+ bfd_signed_vma reloc_signed_min = ~ reloc_signed_max;
bfd_vma check;
bfd_signed_vma signed_check;
- int bitsize;
- int thumb2 = using_thumb2 (globals);
- /* Fetch the addend. We use the Thumb-2 encoding (backwards compatible
- with Thumb-1) involving the J1 and J2 bits. */
+ /* Need to refetch the addend and squish the two 11 bit pieces
+ together. */
if (globals->use_rel)
{
- bfd_vma s = (upper_insn & (1 << 10)) >> 10;
- bfd_vma upper = upper_insn & 0x3ff;
- bfd_vma lower = lower_insn & 0x7ff;
- bfd_vma j1 = (lower_insn & (1 << 13)) >> 13;
- bfd_vma j2 = (lower_insn & (1 << 11)) >> 11;
- bfd_vma i1 = j1 ^ s ? 0 : 1;
- bfd_vma i2 = j2 ^ s ? 0 : 1;
-
- addend = (i1 << 23) | (i2 << 22) | (upper << 12) | (lower << 1);
- /* Sign extend. */
- addend = (addend | ((s ? 0 : 1) << 24)) - (1 << 24);
-
+ bfd_vma upper = upper_insn & 0x7ff;
+ bfd_vma lower = lower_insn & 0x7ff;
+ upper = (upper ^ 0x400) - 0x400; /* Sign extend. */
+ addend = (upper << 12) | (lower << 1);
signed_addend = addend;
}
@@ -4138,8 +3997,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
}
else if (elf32_thumb_to_arm_stub
(info, sym_name, input_bfd, output_bfd, input_section,
- hit_data, sym_sec, rel->r_offset, signed_addend, value,
- error_message))
+ hit_data, sym_sec, rel->r_offset, signed_addend, value))
return bfd_reloc_ok;
else
return bfd_reloc_dangerous;
@@ -4184,15 +4042,6 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
else
signed_check = check | ~((bfd_vma) -1 >> howto->rightshift);
- /* Calculate the permissable maximum and minimum values for
- this relocation according to whether we're relocating for
- Thumb-2 or not. */
- bitsize = howto->bitsize;
- if (!thumb2)
- bitsize -= 2;
- reloc_signed_max = ((1 << (bitsize - 1)) - 1) >> howto->rightshift;
- reloc_signed_min = ~reloc_signed_max;
-
/* Assumes two's complement. */
if (signed_check > reloc_signed_max || signed_check < reloc_signed_min)
overflow = TRUE;
@@ -4204,17 +4053,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
1 of the base address. */
relocation = (relocation + 2) & ~ 3;
- /* Put RELOCATION back into the insn. Assumes two's complement.
- We use the Thumb-2 encoding, which is safe even if dealing with
- a Thumb-1 instruction by virtue of our overflow check above. */
- reloc_sign = (signed_check < 0) ? 1 : 0;
- upper_insn = (upper_insn & ~(bfd_vma) 0x7ff)
- | ((relocation >> 12) & 0x3ff)
- | (reloc_sign << 10);
- lower_insn = (lower_insn & ~(bfd_vma) 0x2fff)
- | (((!((relocation >> 23) & 1)) ^ reloc_sign) << 13)
- | (((!((relocation >> 22) & 1)) ^ reloc_sign) << 11)
- | ((relocation >> 1) & 0x7ff);
+ /* Put RELOCATION back into the insn. */
+ upper_insn = (upper_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 12) & 0x7ff);
+ lower_insn = (lower_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 1) & 0x7ff);
/* Put the relocated value back in the object file: */
bfd_put_16 (input_bfd, upper_insn, hit_data);
@@ -4850,13 +4691,6 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
case R_ARM_MOVT_ABS:
case R_ARM_MOVW_PREL_NC:
case R_ARM_MOVT_PREL:
- /* Until we properly support segment-base-relative addressing then
- we assume the segment base to be zero, as for the group relocations.
- Thus R_ARM_MOVW_BREL_NC has the same semantics as R_ARM_MOVW_ABS_NC
- and R_ARM_MOVT_BREL has the same semantics as R_ARM_MOVT_ABS. */
- case R_ARM_MOVW_BREL_NC:
- case R_ARM_MOVW_BREL:
- case R_ARM_MOVT_BREL:
{
bfd_vma insn = bfd_get_32 (input_bfd, hit_data);
@@ -4865,21 +4699,15 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
addend = ((insn >> 4) & 0xf000) | (insn & 0xfff);
signed_addend = (addend ^ 0x10000) - 0x10000;
}
-
value += signed_addend;
+ if (sym_flags == STT_ARM_TFUNC)
+ value |= 1;
if (r_type == R_ARM_MOVW_PREL_NC || r_type == R_ARM_MOVT_PREL)
value -= (input_section->output_section->vma
+ input_section->output_offset + rel->r_offset);
- if (r_type == R_ARM_MOVW_BREL && value >= 0x10000)
- return bfd_reloc_overflow;
-
- if (sym_flags == STT_ARM_TFUNC)
- value |= 1;
-
- if (r_type == R_ARM_MOVT_ABS || r_type == R_ARM_MOVT_PREL
- || r_type == R_ARM_MOVT_BREL)
+ if (r_type == R_ARM_MOVT_ABS || r_type == R_ARM_MOVT_PREL)
value >>= 16;
insn &= 0xfff0f000;
@@ -4893,14 +4721,6 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
case R_ARM_THM_MOVT_ABS:
case R_ARM_THM_MOVW_PREL_NC:
case R_ARM_THM_MOVT_PREL:
- /* Until we properly support segment-base-relative addressing then
- we assume the segment base to be zero, as for the above relocations.
- Thus R_ARM_THM_MOVW_BREL_NC has the same semantics as
- R_ARM_THM_MOVW_ABS_NC and R_ARM_THM_MOVT_BREL has the same semantics
- as R_ARM_THM_MOVT_ABS. */
- case R_ARM_THM_MOVW_BREL_NC:
- case R_ARM_THM_MOVW_BREL:
- case R_ARM_THM_MOVT_BREL:
{
bfd_vma insn;
@@ -4915,21 +4735,15 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
| (insn & 0x00ff);
signed_addend = (addend ^ 0x10000) - 0x10000;
}
-
value += signed_addend;
+ if (sym_flags == STT_ARM_TFUNC)
+ value |= 1;
if (r_type == R_ARM_THM_MOVW_PREL_NC || r_type == R_ARM_THM_MOVT_PREL)
value -= (input_section->output_section->vma
+ input_section->output_offset + rel->r_offset);
- if (r_type == R_ARM_THM_MOVW_BREL && value >= 0x10000)
- return bfd_reloc_overflow;
-
- if (sym_flags == STT_ARM_TFUNC)
- value |= 1;
-
- if (r_type == R_ARM_THM_MOVT_ABS || r_type == R_ARM_THM_MOVT_PREL
- || r_type == R_ARM_THM_MOVT_BREL)
+ if (r_type == R_ARM_THM_MOVT_ABS || r_type == R_ARM_THM_MOVT_PREL)
value >>= 16;
insn &= 0xfbf08f00;
@@ -5650,7 +5464,6 @@ elf32_arm_relocate_section (bfd * output_bfd,
arelent bfd_reloc;
char sym_type;
bfd_boolean unresolved_reloc = FALSE;
- char *error_message = NULL;
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
@@ -5784,7 +5597,7 @@ elf32_arm_relocate_section (bfd * output_bfd,
relocation, info, sec, name,
(h ? ELF_ST_TYPE (h->type) :
ELF_ST_TYPE (sym->st_info)), h,
- &unresolved_reloc, &error_message);
+ &unresolved_reloc);
/* Dynamic relocs are not propagated for SEC_DEBUGGING sections
because such sections are not SEC_ALLOC and thus ld.so will
@@ -5805,6 +5618,8 @@ elf32_arm_relocate_section (bfd * output_bfd,
if (r != bfd_reloc_ok)
{
+ const char * msg = (const char *) 0;
+
switch (r)
{
case bfd_reloc_overflow:
@@ -5828,25 +5643,24 @@ elf32_arm_relocate_section (bfd * output_bfd,
break;
case bfd_reloc_outofrange:
- error_message = _("out of range");
+ msg = _("internal error: out of range error");
goto common_error;
case bfd_reloc_notsupported:
- error_message = _("unsupported relocation");
+ msg = _("internal error: unsupported relocation error");
goto common_error;
case bfd_reloc_dangerous:
- /* error_message should already be set. */
+ msg = _("internal error: dangerous error");
goto common_error;
default:
- error_message = _("unknown error");
+ msg = _("internal error: unknown error");
/* fall through */
common_error:
- BFD_ASSERT (error_message != NULL);
- if (!((*info->callbacks->reloc_dangerous)
- (info, error_message, input_bfd, input_section,
+ if (!((*info->callbacks->warning)
+ (info, msg, name, input_bfd, input_section,
rel->r_offset)))
return FALSE;
break;
@@ -6800,21 +6614,39 @@ elf32_arm_get_symbol_type (Elf_Internal_Sym * elf_sym, int type)
}
static asection *
-elf32_arm_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
+elf32_arm_gc_mark_hook (asection * sec,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela * rel,
+ struct elf_link_hash_entry * h,
+ Elf_Internal_Sym * sym)
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
{
case R_ARM_GNU_VTINHERIT:
case R_ARM_GNU_VTENTRY:
- return NULL;
- }
+ break;
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
}
/* Update the got entry reference counts for the section being removed. */
@@ -6880,9 +6712,7 @@ elf32_arm_gc_sweep_hook (bfd * abfd,
break;
case R_ARM_ABS32:
- case R_ARM_ABS32_NOI:
case R_ARM_REL32:
- case R_ARM_REL32_NOI:
case R_ARM_PC24:
case R_ARM_PLT32:
case R_ARM_CALL:
@@ -6915,17 +6745,14 @@ elf32_arm_gc_sweep_hook (bfd * abfd,
}
if (r_type == R_ARM_ABS32
- || r_type == R_ARM_REL32
- || r_type == R_ARM_ABS32_NOI
- || r_type == R_ARM_REL32_NOI)
+ || r_type == R_ARM_REL32)
{
for (pp = &eh->relocs_copied; (p = *pp) != NULL;
pp = &p->next)
if (p->section == sec)
{
p->count -= 1;
- if (ELF32_R_TYPE (rel->r_info) == R_ARM_REL32
- || ELF32_R_TYPE (rel->r_info) == R_ARM_REL32_NOI)
+ if (ELF32_R_TYPE (rel->r_info) == R_ARM_REL32)
p->pc_count -= 1;
if (p->count == 0)
*pp = p->next;
@@ -7103,9 +6930,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* Fall through */
case R_ARM_ABS32:
- case R_ARM_ABS32_NOI:
case R_ARM_REL32:
- case R_ARM_REL32_NOI:
case R_ARM_PC24:
case R_ARM_PLT32:
case R_ARM_CALL:
@@ -7136,10 +6961,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
refers to is in a different object. We can't tell for
sure yet, because something later might force the
symbol local. */
- if (r_type != R_ARM_ABS32
- && r_type != R_ARM_REL32
- && r_type != R_ARM_ABS32_NOI
- && r_type != R_ARM_REL32_NOI)
+ if (r_type != R_ARM_ABS32 && r_type != R_ARM_REL32)
h->needs_plt = 1;
/* If we create a PLT entry, this relocation will reference
@@ -7164,7 +6986,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
relocs_copied field of the hash table entry. */
if ((info->shared || htab->root.is_relocatable_executable)
&& (sec->flags & SEC_ALLOC) != 0
- && ((r_type == R_ARM_ABS32 || r_type == R_ARM_ABS32_NOI)
+ && (r_type == R_ARM_ABS32
|| (h != NULL && ! h->needs_plt
&& (! info->symbolic || ! h->def_regular))))
{
@@ -7248,7 +7070,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
p->pc_count = 0;
}
- if (r_type == R_ARM_REL32 || r_type == R_ARM_REL32_NOI)
+ if (r_type == R_ARM_REL32)
p->pc_count += 1;
p->count += 1;
}
@@ -7783,12 +7605,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
if (info->shared || htab->root.is_relocatable_executable)
{
- /* The only reloc thats uses pc_count are R_ARM_REL32 and
- R_ARM_REL32_NOI, which will appear on something like
- ".long foo - .". We want calls to protected symbols to resolve
- directly to the function rather than going via the plt. If people
- want function pointer comparisons to work as expected then they
- should avoid writing assembly like ".long foo - .". */
+ /* The only reloc that uses pc_count is R_ARM_REL32, which will
+ appear on something like ".long foo - .". We want calls to
+ protected symbols to resolve directly to the function rather
+ than going via the plt. If people want function pointer
+ comparisons to work as expected then they should avoid
+ writing assembly like ".long foo - .". */
if (SYMBOL_CALLS_LOCAL (info, h))
{
struct elf32_arm_relocs_copied **pp;
@@ -7905,16 +7727,6 @@ elf32_arm_readonly_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
return TRUE;
}
-void
-bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *info,
- int byteswap_code)
-{
- struct elf32_arm_link_hash_table *globals;
-
- globals = elf32_arm_hash_table (info);
- globals->byteswap_code = byteswap_code;
-}
-
/* Set the sizes of the dynamic sections. */
static bfd_boolean
@@ -8030,13 +7842,6 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
sym dynamic relocs. */
elf_link_hash_traverse (& htab->root, allocate_dynrelocs, info);
- /* Here we rummage through the found bfds to collect glue information. */
- for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
- if (!bfd_elf32_arm_process_before_allocation (ibfd, info))
- /* xgettext:c-format */
- _bfd_error_handler (_("Errors encountered processing file %s"),
- ibfd->filename);
-
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
memory for them. */
@@ -8058,7 +7863,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
/* Remember whether there is a PLT. */
plt = s->size != 0;
}
- else if (CONST_STRNEQ (name, ".rel"))
+ else if (strncmp (name, ".rel", 4) == 0)
{
if (s->size != 0)
{
@@ -8072,7 +7877,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
s->reloc_count = 0;
}
}
- else if (! CONST_STRNEQ (name, ".got")
+ else if (strncmp (name, ".got", 4) != 0
&& strcmp (name, ".dynbss") != 0)
{
/* It's not one of our sections, so don't allocate space. */
@@ -8689,8 +8494,7 @@ elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info
/* UnixWare sets the entsize of .plt to 4, although that doesn't
really seem like the right value. */
- if (splt->output_section->owner == output_bfd)
- elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
if (htab->vxworks_p && !info->shared && htab->splt->size > 0)
{
@@ -8801,8 +8605,12 @@ elf32_arm_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED
static bfd_boolean
is_arm_elf_unwind_section_name (bfd * abfd ATTRIBUTE_UNUSED, const char * name)
{
- return (CONST_STRNEQ (name, ELF_STRING_ARM_unwind)
- || CONST_STRNEQ (name, ELF_STRING_ARM_unwind_once));
+ size_t len1, len2;
+
+ len1 = sizeof (ELF_STRING_ARM_unwind) - 1;
+ len2 = sizeof (ELF_STRING_ARM_unwind_once) - 1;
+ return (strncmp (name, ELF_STRING_ARM_unwind, len1) == 0
+ || strncmp (name, ELF_STRING_ARM_unwind_once, len2) == 0);
}
@@ -9459,14 +9267,13 @@ elf32_arm_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
/* Mangle thumb function symbols as we read them in. */
-static bfd_boolean
+static void
elf32_arm_swap_symbol_in (bfd * abfd,
const void *psrc,
const void *pshn,
Elf_Internal_Sym *dst)
{
- if (!bfd_elf32_swap_symbol_in (abfd, psrc, pshn, dst))
- return FALSE;
+ bfd_elf32_swap_symbol_in (abfd, psrc, pshn, dst);
/* New EABI objects mark thumb function symbols by setting the low bit of
the address. Turn these into STT_ARM_TFUNC. */
@@ -9476,7 +9283,6 @@ elf32_arm_swap_symbol_in (bfd * abfd,
dst->st_info = ELF_ST_INFO (ELF_ST_BIND (dst->st_info), STT_ARM_TFUNC);
dst->st_value &= ~(bfd_vma) 1;
}
- return TRUE;
}
@@ -9504,12 +9310,14 @@ elf32_arm_swap_symbol_out (bfd *abfd,
linker will simulate the work of dynamic linker of resolving
symbols and will carry over the thumbness of found symbols to
the output symbol table. It's not clear how it happens, but
- the thumbness of undefined symbols can well be different at
+ the thumbness of underfined symbols can well be different at
runtime, and writing '1' for them will be confusing for users
and possibly for dynamic linker itself.
*/
newsym.st_value |= 1;
}
+
+ newsym.st_value |= 1;
src = &newsym;
}
@@ -9633,7 +9441,6 @@ const struct elf_size_info elf32_arm_size_info = {
#define elf_backend_finish_dynamic_sections elf32_arm_finish_dynamic_sections
#define elf_backend_link_output_symbol_hook elf32_arm_output_symbol_hook
#define elf_backend_size_dynamic_sections elf32_arm_size_dynamic_sections
-#define elf_backend_init_index_section _bfd_elf_init_2_index_sections
#define elf_backend_post_process_headers elf32_arm_post_process_headers
#define elf_backend_reloc_type_class elf32_arm_reloc_type_class
#define elf_backend_object_p elf32_arm_object_p
@@ -9776,18 +9583,18 @@ elf32_arm_symbian_special_sections[] =
the loadable read-only segment. The post-linker may wish to
refer to these sections, but they are not part of the final
program image. */
- { STRING_COMMA_LEN (".dynamic"), 0, SHT_DYNAMIC, 0 },
- { STRING_COMMA_LEN (".dynstr"), 0, SHT_STRTAB, 0 },
- { STRING_COMMA_LEN (".dynsym"), 0, SHT_DYNSYM, 0 },
- { STRING_COMMA_LEN (".got"), 0, SHT_PROGBITS, 0 },
- { STRING_COMMA_LEN (".hash"), 0, SHT_HASH, 0 },
+ { ".dynamic", 8, 0, SHT_DYNAMIC, 0 },
+ { ".dynstr", 7, 0, SHT_STRTAB, 0 },
+ { ".dynsym", 7, 0, SHT_DYNSYM, 0 },
+ { ".got", 4, 0, SHT_PROGBITS, 0 },
+ { ".hash", 5, 0, SHT_HASH, 0 },
/* These sections do not need to be writable as the SymbianOS
postlinker will arrange things so that no dynamic relocation is
required. */
- { STRING_COMMA_LEN (".init_array"), 0, SHT_INIT_ARRAY, SHF_ALLOC },
- { STRING_COMMA_LEN (".fini_array"), 0, SHT_FINI_ARRAY, SHF_ALLOC },
- { STRING_COMMA_LEN (".preinit_array"), 0, SHT_PREINIT_ARRAY, SHF_ALLOC },
- { NULL, 0, 0, 0, 0 }
+ { ".init_array", 11, 0, SHT_INIT_ARRAY, SHF_ALLOC },
+ { ".fini_array", 11, 0, SHT_FINI_ARRAY, SHF_ALLOC },
+ { ".preinit_array", 14, 0, SHT_PREINIT_ARRAY, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
static void
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 40cc083..0028871 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -688,6 +688,48 @@ avr_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
cache_ptr->howto = &elf_avr_howto_table[r_type];
}
+static asection *
+elf32_avr_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
+}
+
+static bfd_boolean
+elf32_avr_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+{
+ /* We don't use got and plt entries for avr. */
+ return TRUE;
+}
+
/* Look through the relocs for a section during the first phase.
Since we don't do .gots or .plts, we just need to consider the
virtual table relocs for gc. */
@@ -2909,6 +2951,8 @@ elf32_avr_build_stubs (struct bfd_link_info *info)
#define elf_info_to_howto avr_info_to_howto_rela
#define elf_info_to_howto_rel NULL
#define elf_backend_relocate_section elf32_avr_relocate_section
+#define elf_backend_gc_mark_hook elf32_avr_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_avr_gc_sweep_hook
#define elf_backend_check_relocs elf32_avr_check_relocs
#define elf_backend_can_gc_sections 1
#define elf_backend_rela_normal 1
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index 9ceeade..54900d0 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -3106,20 +3106,51 @@ bfin_relocate_section (bfd * output_bfd,
static asection *
bfin_gc_mark_hook (asection * sec,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Rela * rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym * sym)
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_BFIN_GNU_VTINHERIT:
- case R_BFIN_GNU_VTENTRY:
- return NULL;
- }
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+
+ case R_BFIN_GNU_VTINHERIT:
+ case R_BFIN_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ default:
+ break;
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
+}
+
+
+/* Update the got entry reference counts for the section being removed. */
+
+static bfd_boolean
+bfinfdpic_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+{
+ return TRUE;
}
/* Update the got entry reference counts for the section being removed. */
@@ -5261,7 +5292,7 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
strip = FALSE;
- if (CONST_STRNEQ (name, ".rela"))
+ if (strncmp (name, ".rela", 5) == 0)
{
if (s->size == 0)
{
@@ -5285,7 +5316,7 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
s->reloc_count = 0;
}
}
- else if (! CONST_STRNEQ (name, ".got"))
+ else if (strncmp (name, ".got", 4) != 0)
{
/* It's not one of our sections, so don't allocate space. */
continue;
@@ -5533,6 +5564,7 @@ error_return:
#define elf32_bed elf32_bfinfdpic_bed
#undef elf_backend_gc_sweep_hook
+#define elf_backend_gc_sweep_hook bfinfdpic_gc_sweep_hook
#undef elf_backend_got_header_size
#define elf_backend_got_header_size 0
diff --git a/bfd/elf32-cr16c.c b/bfd/elf32-cr16c.c
index 2ca0ad3..ec7199b 100644
--- a/bfd/elf32-cr16c.c
+++ b/bfd/elf32-cr16c.c
@@ -1,5 +1,5 @@
/* BFD back-end for National Semiconductor's CR16C ELF
- Copyright 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright 2004, 2005 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -798,6 +798,53 @@ elf32_cr16c_relocate_section (bfd *output_bfd,
return TRUE;
}
+static asection *
+elf32_cr16c_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+ }
+
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static bfd_boolean
+elf32_cr16c_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+{
+ /* We don't support garbage collection of GOT and PLT relocs yet. */
+ return TRUE;
+}
+
/* CR16C ELF uses three common sections:
One is for default common symbols (placed in usual common section).
Second is for near common symbols (placed in "ncommon" section).
@@ -944,6 +991,8 @@ elf32_cr16c_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED
#define elf_info_to_howto elf_cr16c_info_to_howto
#define elf_info_to_howto_rel elf_cr16c_info_to_howto_rel
#define elf_backend_relocate_section elf32_cr16c_relocate_section
+#define elf_backend_gc_mark_hook elf32_cr16c_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_cr16c_gc_sweep_hook
#define elf_backend_symbol_processing elf32_cr16c_symbol_processing
#define elf_backend_section_from_bfd_section elf32_cr16c_section_from_bfd_section
#define elf_backend_add_symbol_hook elf32_cr16c_add_symbol_hook
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 199ee1b..4019e34 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -51,6 +51,14 @@ static bfd_reloc_status_type cris_final_link_relocate
PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, bfd_vma));
+static bfd_boolean cris_elf_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
+
+static asection * cris_elf_gc_mark_hook
+ PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+
static bfd_boolean cris_elf_object_p PARAMS ((bfd *));
static void cris_elf_final_write_processing PARAMS ((bfd *, bfd_boolean));
@@ -1380,7 +1388,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (input_bfd,
input_section),
name + 5) == 0);
@@ -1430,12 +1438,11 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- outrel.r_addend = relocation + rel->r_addend;
-
if (r_type == R_CRIS_32)
{
relocate = TRUE;
outrel.r_info = ELF32_R_INFO (0, R_CRIS_RELATIVE);
+ outrel.r_addend = relocation + rel->r_addend;
}
else
{
@@ -1452,24 +1459,13 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
asection *osec;
- /* We are turning this relocation into one
- against a section symbol. It would be
- proper to subtract the symbol's value,
- osec->vma, from the emitted reloc addend,
- but ld.so expects buggy relocs. */
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
- if (indx == 0)
- {
- struct elf_cris_link_hash_table *htab;
- htab = elf_cris_hash_table (info);
- osec = htab->root.text_index_section;
- indx = elf_section_data (osec)->dynindx;
- }
- BFD_ASSERT (indx != 0);
+ BFD_ASSERT (indx > 0);
}
outrel.r_info = ELF32_R_INFO (indx, r_type);
+ outrel.r_addend = relocation + rel->r_addend;
}
}
@@ -1927,30 +1923,50 @@ elf_cris_finish_dynamic_sections (output_bfd, info)
relocation. */
static asection *
-cris_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
+cris_elf_gc_mark_hook (sec, info, rel, h, sym)
+ asection *sec;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_CRIS_GNU_VTINHERIT:
- case R_CRIS_GNU_VTENTRY:
- return NULL;
- }
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_CRIS_GNU_VTINHERIT:
+ case R_CRIS_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ return NULL;
}
/* Update the got entry reference counts for the section being removed. */
static bfd_boolean
-cris_elf_gc_sweep_hook (bfd *abfd,
- struct bfd_link_info *info,
- asection *sec,
- const Elf_Internal_Rela *relocs)
+cris_elf_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -2783,7 +2799,7 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
name + 5) == 0);
@@ -2946,7 +2962,7 @@ elf_cris_size_dynamic_sections (output_bfd, info)
/* Remember whether there is a PLT. */
plt = s->size != 0;
}
- else if (CONST_STRNEQ (name, ".rela"))
+ else if (strncmp (name, ".rela", 5) == 0)
{
if (s->size != 0)
{
@@ -2960,7 +2976,7 @@ elf_cris_size_dynamic_sections (output_bfd, info)
s->reloc_count = 0;
}
}
- else if (! CONST_STRNEQ (name, ".got")
+ else if (strncmp (name, ".got", 4) != 0
&& strcmp (name, ".dynbss") != 0)
{
/* It's not one of our sections, so don't allocate space. */
@@ -3402,7 +3418,6 @@ elf_cris_reloc_type_class (rela)
elf_cris_adjust_dynamic_symbol
#define elf_backend_size_dynamic_sections \
elf_cris_size_dynamic_sections
-#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_finish_dynamic_symbol \
elf_cris_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections \
diff --git a/bfd/elf32-crx.c b/bfd/elf32-crx.c
index 3d62b74..0a49885 100644
--- a/bfd/elf32-crx.c
+++ b/bfd/elf32-crx.c
@@ -1,5 +1,5 @@
/* BFD back-end for National Semiconductor's CRX ELF
- Copyright 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright 2004 Free Software Foundation, Inc.
Written by Tomer Levi, NSC, Israel.
This file is part of BFD, the Binary File Descriptor library.
@@ -38,6 +38,12 @@ static bfd_reloc_status_type crx_elf_final_link_relocate
static bfd_boolean elf32_crx_relocate_section
(bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
+static asection * elf32_crx_gc_mark_hook
+ (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *);
+static bfd_boolean elf32_crx_gc_sweep_hook
+ (bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *);
static bfd_boolean elf32_crx_relax_section
(bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
static bfd_byte * elf32_crx_get_relocated_section_contents
@@ -1291,6 +1297,42 @@ elf32_crx_relax_section (bfd *abfd, asection *sec,
return FALSE;
}
+static asection *
+elf32_crx_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
+{
+ if (h == NULL)
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ return NULL;
+ }
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static bfd_boolean
+elf32_crx_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+{
+ /* We don't support garbage collection of GOT and PLT relocs yet. */
+ return TRUE;
+}
+
/* Definitions for setting CRX target vector. */
#define TARGET_LITTLE_SYM bfd_elf32_crx_vec
#define TARGET_LITTLE_NAME "elf32-crx"
@@ -1306,6 +1348,8 @@ elf32_crx_relax_section (bfd *abfd, asection *sec,
#define bfd_elf32_bfd_relax_section elf32_crx_relax_section
#define bfd_elf32_bfd_get_relocated_section_contents \
elf32_crx_get_relocated_section_contents
+#define elf_backend_gc_mark_hook elf32_crx_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_crx_gc_sweep_hook
#define elf_backend_can_gc_sections 1
#define elf_backend_rela_normal 1
diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c
index 8d7cd94..293b141 100644
--- a/bfd/elf32-d10v.c
+++ b/bfd/elf32-d10v.c
@@ -1,5 +1,5 @@
/* D10V-specific support for 32-bit ELF
- Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by Martin Hunt (hunt@cygnus.com).
@@ -219,20 +219,48 @@ d10v_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
static asection *
elf32_d10v_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
{
case R_D10V_GNU_VTINHERIT:
case R_D10V_GNU_VTENTRY:
- return NULL;
- }
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ return NULL;
+}
+
+static bfd_boolean
+elf32_d10v_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+{
+ /* We don't use got and plt entries for d10v. */
+ return TRUE;
}
/* Look through the relocs for a section during the first phase.
@@ -469,16 +497,6 @@ elf32_d10v_relocate_section (bfd *output_bfd,
unresolved_reloc, warned);
}
- if (r_symndx == 0)
- {
- /* r_symndx will be zero only for relocs against symbols from
- removed linkonce sections, or sections discarded by a linker
- script. For these relocs, we just want the section contents
- zeroed. Avoid any special processing. */
- _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
- continue;
- }
-
if (h != NULL)
name = h->root.root.string;
else
@@ -555,6 +573,7 @@ elf32_d10v_relocate_section (bfd *output_bfd,
#define elf_backend_object_p 0
#define elf_backend_final_write_processing 0
#define elf_backend_gc_mark_hook elf32_d10v_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_d10v_gc_sweep_hook
#define elf_backend_check_relocs elf32_d10v_check_relocs
#define elf_backend_relocate_section elf32_d10v_relocate_section
#define elf_backend_can_gc_sections 1
diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c
index 945475a..e172079 100644
--- a/bfd/elf32-fr30.c
+++ b/bfd/elf32-fr30.c
@@ -1,5 +1,5 @@
/* FR30-specific support for 32-bit ELF.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -39,6 +39,12 @@ static bfd_boolean fr30_elf_relocate_section
static bfd_reloc_status_type fr30_final_link_relocate
PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, bfd_vma));
+static bfd_boolean fr30_elf_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
+static asection * fr30_elf_gc_mark_hook
+ PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
static bfd_boolean fr30_elf_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
@@ -618,21 +624,52 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation. */
static asection *
-fr30_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
+fr30_elf_gc_mark_hook (sec, info, rel, h, sym)
+ asection *sec;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym * sym;
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_FR30_GNU_VTINHERIT:
- case R_FR30_GNU_VTENTRY:
- return NULL;
- }
-
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_FR30_GNU_VTINHERIT:
+ case R_FR30_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static bfd_boolean
+fr30_elf_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+{
+ return TRUE;
}
/* Look through the relocs for a section during the first phase.
@@ -710,6 +747,7 @@ fr30_elf_check_relocs (abfd, info, sec, relocs)
#define elf_info_to_howto fr30_info_to_howto_rela
#define elf_backend_relocate_section fr30_elf_relocate_section
#define elf_backend_gc_mark_hook fr30_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook fr30_elf_gc_sweep_hook
#define elf_backend_check_relocs fr30_elf_check_relocs
#define elf_backend_can_gc_sections 1
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index 3a31243..5f83f81 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -57,6 +57,12 @@ static bfd_boolean elf32_frv_add_symbol_hook
static bfd_reloc_status_type frv_final_link_relocate
PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, bfd_vma));
+static bfd_boolean elf32_frv_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *, asection *, const
+ Elf_Internal_Rela *));
+static asection * elf32_frv_gc_mark_hook
+ PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
static bfd_boolean elf32_frv_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
@@ -4139,22 +4145,54 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
relocation. */
static asection *
-elf32_frv_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
+elf32_frv_gc_mark_hook (sec, info, rel, h, sym)
+ asection *sec;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_FRV_GNU_VTINHERIT:
- case R_FRV_GNU_VTENTRY:
- return NULL;
- }
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_FRV_GNU_VTINHERIT:
+ case R_FRV_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ default:
+ break;
+
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static bfd_boolean
+elf32_frv_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+{
+ return TRUE;
}
+
/* Hook called by the linker routine which adds symbols from an object
file. We use it to put .comm items in .scomm, and not .comm. */
@@ -6873,6 +6911,7 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
#define elf_info_to_howto frv_info_to_howto_rela
#define elf_backend_relocate_section elf32_frv_relocate_section
#define elf_backend_gc_mark_hook elf32_frv_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_frv_gc_sweep_hook
#define elf_backend_check_relocs elf32_frv_check_relocs
#define elf_backend_object_p elf32_frv_object_p
#define elf_backend_add_symbol_hook elf32_frv_add_symbol_hook
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index bae2a97..4cdf2de 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -1,5 +1,5 @@
/* BFD back-end for Renesas H8/300 ELF binaries.
- Copyright 1993, 1995, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 1993, 1995, 1998, 1999, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -42,6 +42,11 @@ static bfd_boolean elf32_h8_symbol_address_p (bfd *, asection *, bfd_vma);
static bfd_byte *elf32_h8_get_relocated_section_contents
(bfd *, struct bfd_link_info *, struct bfd_link_order *,
bfd_byte *, bfd_boolean, asymbol **);
+static asection *elf32_h8_gc_mark_hook
+ (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *);
+static bfd_boolean elf32_h8_gc_sweep_hook
+ (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
static bfd_reloc_status_type elf32_h8_final_link_relocate
(unsigned long, bfd *, bfd *, asection *,
bfd_byte *, bfd_vma, bfd_vma, bfd_vma,
@@ -1485,6 +1490,42 @@ elf32_h8_get_relocated_section_contents (bfd *output_bfd,
return NULL;
}
+static asection *
+elf32_h8_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
+{
+ if (h != NULL)
+ {
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+ return NULL;
+}
+
+static bfd_boolean
+elf32_h8_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
#define TARGET_BIG_SYM bfd_elf32_h8300_vec
#define TARGET_BIG_NAME "elf32-h8300"
@@ -1503,6 +1544,8 @@ elf32_h8_get_relocated_section_contents (bfd *output_bfd,
elf32_h8_object_p
#define bfd_elf32_bfd_merge_private_bfd_data \
elf32_h8_merge_private_bfd_data
+#define elf_backend_gc_mark_hook elf32_h8_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_h8_gc_sweep_hook
/* ??? when elf_backend_relocate_section is not defined, elf32-target.h
defaults to using _bfd_generic_link_hash_table_create, but
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index c448aac..10a1183 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -1588,20 +1588,38 @@ elf32_hppa_check_relocs (bfd *abfd,
static asection *
elf32_hppa_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Rela *rela,
struct elf_link_hash_entry *hh,
Elf_Internal_Sym *sym)
{
if (hh != NULL)
- switch ((unsigned int) ELF32_R_TYPE (rela->r_info))
- {
- case R_PARISC_GNU_VTINHERIT:
- case R_PARISC_GNU_VTENTRY:
- return NULL;
- }
+ {
+ switch ((unsigned int) ELF32_R_TYPE (rela->r_info))
+ {
+ case R_PARISC_GNU_VTINHERIT:
+ case R_PARISC_GNU_VTENTRY:
+ break;
- return _bfd_elf_gc_mark_hook (sec, info, rela, hh, sym);
+ default:
+ switch (hh->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return hh->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return hh->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
}
/* Update the got and plt entry reference counts for the section being
@@ -2424,7 +2442,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
else if (sec == htab->sgot
|| sec == htab->sdynbss)
;
- else if (CONST_STRNEQ (bfd_get_section_name (dynobj, sec), ".rela"))
+ else if (strncmp (bfd_get_section_name (dynobj, sec), ".rela", 5) == 0)
{
if (sec->size != 0)
{
@@ -3942,14 +3960,8 @@ elf32_hppa_relocate_section (bfd *output_bfd,
/* r_symndx will be zero only for relocs against symbols
from removed linkonce sections, or sections discarded by
a linker script. */
- if (r_symndx == 0)
- {
- _bfd_clear_contents (elf_hppa_howto_table + r_type, input_bfd,
- contents + rela->r_offset);
- break;
- }
-
- if ((input_section->flags & SEC_ALLOC) == 0)
+ if (r_symndx == 0
+ || (input_section->flags & SEC_ALLOC) == 0)
break;
/* The reloc types handled here and this conditional
@@ -4030,22 +4042,17 @@ elf32_hppa_relocate_section (bfd *output_bfd,
&& sym_sec->output_section != NULL
&& ! bfd_is_abs_section (sym_sec))
{
- asection *osec;
-
- osec = sym_sec->output_section;
- indx = elf_section_data (osec)->dynindx;
- if (indx == 0)
- {
- osec = htab->etab.text_index_section;
- indx = elf_section_data (osec)->dynindx;
- }
- BFD_ASSERT (indx != 0);
+ /* Skip this relocation if the output section has
+ been discarded. */
+ if (bfd_is_abs_section (sym_sec->output_section))
+ break;
+ indx = elf_section_data (sym_sec->output_section)->dynindx;
/* We are turning this relocation into one
against a section symbol, so subtract out the
output section's address but not the offset
of the input section in the output section. */
- outrel.r_addend -= osec->vma;
+ outrel.r_addend -= sym_sec->output_section->vma;
}
outrel.r_info = ELF32_R_INFO (indx, r_type);
@@ -4653,7 +4660,6 @@ elf32_hppa_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, int type)
#define elf_backend_finish_dynamic_symbol elf32_hppa_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections elf32_hppa_finish_dynamic_sections
#define elf_backend_size_dynamic_sections elf32_hppa_size_dynamic_sections
-#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_gc_mark_hook elf32_hppa_gc_mark_hook
#define elf_backend_gc_sweep_hook elf32_hppa_gc_sweep_hook
#define elf_backend_grok_prstatus elf32_hppa_grok_prstatus
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index 4930581..6a013f8 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -655,7 +655,7 @@ i370_elf_size_dynamic_sections (bfd *output_bfd,
/* Remember whether there is a PLT. */
plt = s->size != 0;
}
- else if (CONST_STRNEQ (name, ".rela"))
+ else if (strncmp (name, ".rela", 5) == 0)
{
if (s->size != 0)
{
@@ -867,7 +867,7 @@ i370_elf_check_relocs (bfd *abfd,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec), name + 5) == 0);
sreloc = bfd_get_section_by_name (dynobj, name);
@@ -1236,7 +1236,7 @@ i370_elf_relocate_section (bfd *output_bfd,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (input_bfd,
input_section),
name + 5) == 0);
@@ -1290,21 +1290,9 @@ i370_elf_relocate_section (bfd *output_bfd,
{
asection *osec;
- /* We are turning this relocation into one
- against a section symbol. It would be
- proper to subtract the symbol's value,
- osec->vma, from the emitted reloc addend,
- but ld.so expects buggy relocs. */
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
- if (indx == 0)
- {
- struct elf_link_hash_table *htab;
- htab = elf_hash_table (info);
- osec = htab->text_index_section;
- indx = elf_section_data (osec)->dynindx;
- }
- BFD_ASSERT (indx != 0);
+ BFD_ASSERT(indx > 0);
#ifdef DEBUG
if (indx <= 0)
{
@@ -1439,7 +1427,6 @@ i370_elf_post_process_headers (bfd * abfd,
link glibc's ld.so without errors. */
#define elf_backend_create_dynamic_sections i370_elf_create_dynamic_sections
#define elf_backend_size_dynamic_sections i370_elf_size_dynamic_sections
-#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_finish_dynamic_sections i370_elf_finish_dynamic_sections
#define elf_backend_fake_sections i370_elf_fake_sections
#define elf_backend_section_from_shdr i370_elf_section_from_shdr
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 7a83c73..ab02b2c 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1150,7 +1150,7 @@ elf_i386_check_relocs (bfd *abfd,
&& (sec->flags & SEC_ALLOC) != 0
&& (r_type != R_386_PC32
|| (h != NULL
- && (! SYMBOLIC_BIND (info, h)
+ && (! info->symbolic
|| h->root.type == bfd_link_hash_defweak
|| !h->def_regular))))
|| (ELIMINATE_COPY_RELOCS
@@ -1177,7 +1177,7 @@ elf_i386_check_relocs (bfd *abfd,
if (name == NULL)
return FALSE;
- if (! CONST_STRNEQ (name, ".rel")
+ if (strncmp (name, ".rel", 4) != 0
|| strcmp (bfd_get_section_name (abfd, sec),
name + 4) != 0)
{
@@ -1279,20 +1279,38 @@ elf_i386_check_relocs (bfd *abfd,
static asection *
elf_i386_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_386_GNU_VTINHERIT:
- case R_386_GNU_VTENTRY:
- return NULL;
- }
-
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_386_GNU_VTINHERIT:
+ case R_386_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
}
/* Update the got entry reference counts for the section being removed. */
@@ -2011,7 +2029,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
if (htab->elf.hplt != NULL)
strip_section = FALSE;
}
- else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rel"))
+ else if (strncmp (bfd_get_section_name (dynobj, s), ".rel", 4) == 0)
{
if (s->size != 0 && s != htab->srelplt && s != htab->srelplt2)
relocs = TRUE;
@@ -2395,12 +2413,17 @@ elf_i386_relocate_section (bfd *output_bfd,
if (r_symndx == 0)
{
- /* r_symndx will be zero only for relocs against symbols from
- removed linkonce sections, or sections discarded by a linker
- script. For these relocs, we just want the section contents
- zeroed. Avoid any special processing. */
- _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
- continue;
+ /* r_symndx will be zero only for relocs against symbols from
+ removed linkonce sections, or sections discarded by a linker
+ script. For these relocs, we just want the section contents
+ zeroed. Avoid any special processing in the switch below. */
+ r_type = R_386_NONE;
+
+ relocation = 0;
+ if (howto->pc_relative)
+ relocation = (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
}
switch (r_type)
@@ -2606,7 +2629,7 @@ elf_i386_relocate_section (bfd *output_bfd,
&& h->dynindx != -1
&& (r_type == R_386_PC32
|| !info->shared
- || !SYMBOLIC_BIND (info, h)
+ || !info->symbolic
|| !h->def_regular))
outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
else
@@ -3867,8 +3890,6 @@ elf_i386_hash_symbol (struct elf_link_hash_entry *h)
#define elf_backend_relocate_section elf_i386_relocate_section
#define elf_backend_size_dynamic_sections elf_i386_size_dynamic_sections
#define elf_backend_always_size_sections elf_i386_always_size_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define elf_backend_plt_sym_val elf_i386_plt_sym_val
#define elf_backend_hash_symbol elf_i386_hash_symbol
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index fd26188..135ef13 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -1,5 +1,5 @@
/* Ubicom IP2xxx specific support for 32-bit ELF
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1502,6 +1502,53 @@ ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
return TRUE;
}
+static asection *
+ip2k_elf_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (!(elf_bad_symtab (sec->owner)
+ && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
+ && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
+ && sym->st_shndx != SHN_COMMON))
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+ }
+ return NULL;
+}
+
+static bfd_boolean
+ip2k_elf_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+{
+ /* We don't use got and plt entries for ip2k. */
+ return TRUE;
+}
+
#define TARGET_BIG_SYM bfd_elf32_ip2k_vec
#define TARGET_BIG_NAME "elf32-ip2k"
@@ -1515,6 +1562,8 @@ ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
#define elf_backend_can_gc_sections 1
#define elf_backend_rela_normal 1
+#define elf_backend_gc_mark_hook ip2k_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook ip2k_elf_gc_sweep_hook
#define elf_backend_relocate_section ip2k_elf_relocate_section
#define elf_symbol_leading_char '_'
diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c
index 731b320..146dcaa 100644
--- a/bfd/elf32-iq2000.c
+++ b/bfd/elf32-iq2000.c
@@ -1,5 +1,5 @@
/* IQ2000-specific support for 32-bit ELF.
- Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -452,9 +452,9 @@ iq2000_elf_check_relocs (bfd *abfd,
case R_IQ2000_32:
/* For debug section, change to special harvard-aware relocations. */
- if (CONST_STRNEQ (sec->name, ".debug")
- || CONST_STRNEQ (sec->name, ".stab")
- || CONST_STRNEQ (sec->name, ".eh_frame"))
+ if (memcmp (sec->name, ".debug", 6) == 0
+ || memcmp (sec->name, ".stab", 5) == 0
+ || memcmp (sec->name, ".eh_frame", 9) == 0)
{
((Elf_Internal_Rela *) rel)->r_info
= ELF32_R_INFO (ELF32_R_SYM (rel->r_info), R_IQ2000_32_DEBUG);
@@ -642,25 +642,53 @@ iq2000_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
}
+/* Update the got entry reference counts for the section being
+ removed. */
+
+static bfd_boolean
+iq2000_elf_gc_sweep_hook (bfd * abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ asection * sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
/* Return the section that should be marked against GC for a given
relocation. */
static asection *
-iq2000_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
+iq2000_elf_gc_mark_hook (asection * sec,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela * rel,
+ struct elf_link_hash_entry * h,
+ Elf_Internal_Sym * sym)
{
- if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_IQ2000_GNU_VTINHERIT:
- case R_IQ2000_GNU_VTENTRY:
- return NULL;
- }
-
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ if (h == NULL)
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_IQ2000_GNU_VTINHERIT:
+ case R_IQ2000_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+
+ return NULL;
}
@@ -846,6 +874,7 @@ iq2000_elf_object_p (bfd *abfd)
#define elf_info_to_howto iq2000_info_to_howto_rela
#define elf_backend_relocate_section iq2000_elf_relocate_section
#define elf_backend_gc_mark_hook iq2000_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook iq2000_elf_gc_sweep_hook
#define elf_backend_check_relocs iq2000_elf_check_relocs
#define elf_backend_object_p iq2000_elf_object_p
#define elf_backend_rela_normal 1
diff --git a/bfd/elf32-m32c.c b/bfd/elf32-m32c.c
index 50538c9..69e617f 100644
--- a/bfd/elf32-m32c.c
+++ b/bfd/elf32-m32c.c
@@ -32,6 +32,10 @@ static void m32c_info_to_howto_rela
(bfd *, arelent *, Elf_Internal_Rela *);
static bfd_boolean m32c_elf_relocate_section
(bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
+static bfd_boolean m32c_elf_gc_sweep_hook
+ (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
+static asection * m32c_elf_gc_mark_hook
+ (asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *);
static bfd_boolean m32c_elf_check_relocs
(bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
static bfd_boolean m32c_elf_relax_delete_bytes (bfd *, asection *, bfd_vma, int);
@@ -568,6 +572,62 @@ m32c_elf_relocate_section
return TRUE;
}
+/* Return the section that should be marked against GC for a given
+ relocation. */
+
+static asection *
+m32c_elf_gc_mark_hook
+ (asection * sec,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela * rel,
+ struct elf_link_hash_entry * h,
+ Elf_Internal_Sym * sym)
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (!(elf_bad_symtab (sec->owner)
+ && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
+ && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
+ && sym->st_shndx != SHN_COMMON))
+ {
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+ }
+ }
+
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static bfd_boolean
+m32c_elf_gc_sweep_hook
+ (bfd * abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ asection * sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
/* We support 16-bit pointers to code above 64k by generating a thunk
below 64k containing a JMP instruction to the final address. */
@@ -1990,6 +2050,8 @@ m32c_elf_relax_delete_bytes
#define elf_info_to_howto m32c_info_to_howto_rela
#define elf_backend_object_p m32c_elf_object_p
#define elf_backend_relocate_section m32c_elf_relocate_section
+#define elf_backend_gc_mark_hook m32c_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook m32c_elf_gc_sweep_hook
#define elf_backend_check_relocs m32c_elf_check_relocs
#define elf_backend_object_p m32c_elf_object_p
#define elf_symbol_leading_char ('_')
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index 30674f3..6c42c2f 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -2309,7 +2309,7 @@ m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
/* Strip this section if we don't need it; see the
comment below. */
}
- else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
+ else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
if (s->size != 0 && s != htab->srelplt)
relocs = TRUE;
@@ -2933,7 +2933,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (input_bfd,
input_section),
name + 5) == 0);
@@ -3637,22 +3637,40 @@ m32r_elf_print_private_bfd_data (bfd *abfd, void * ptr)
static asection *
m32r_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
{
case R_M32R_GNU_VTINHERIT:
case R_M32R_GNU_VTENTRY:
case R_M32R_RELA_GNU_VTINHERIT:
case R_M32R_RELA_GNU_VTENTRY:
- return NULL;
- }
+ break;
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
}
static bfd_boolean
@@ -3972,7 +3990,7 @@ m32r_elf_check_relocs (bfd *abfd,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
name + 5) == 0);
@@ -4064,9 +4082,9 @@ m32r_elf_check_relocs (bfd *abfd,
static const struct bfd_elf_special_section m32r_elf_special_sections[] =
{
- { STRING_COMMA_LEN (".sbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".sdata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, 0, 0, 0 }
+ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
static bfd_boolean
@@ -4141,8 +4159,6 @@ m32r_elf_reloc_type_class (const Elf_Internal_Rela *rela)
#define elf_backend_create_dynamic_sections m32r_elf_create_dynamic_sections
#define bfd_elf32_bfd_link_hash_table_create m32r_elf_link_hash_table_create
#define elf_backend_size_dynamic_sections m32r_elf_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define elf_backend_finish_dynamic_sections m32r_elf_finish_dynamic_sections
#define elf_backend_adjust_dynamic_symbol m32r_elf_adjust_dynamic_symbol
#define elf_backend_finish_dynamic_symbol m32r_elf_finish_dynamic_symbol
diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c
index 116aa92..d61590f 100644
--- a/bfd/elf32-m68hc11.c
+++ b/bfd/elf32-m68hc11.c
@@ -1,5 +1,5 @@
/* Motorola 68HC11-specific support for 32-bit ELF
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by Stephane Carrez (stcarrez@nerim.fr)
(Heavily copied from the D10V port by Martin Hunt (hunt@cygnus.com))
@@ -1259,11 +1259,11 @@ m68hc11_elf_relax_delete_bytes (bfd *abfd, asection *sec,
vectors. */
static const struct bfd_elf_special_section elf32_m68hc11_special_sections[] =
{
- { STRING_COMMA_LEN (".eeprom"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".page0"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".softregs"), 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".vectors"), 0, SHT_PROGBITS, SHF_ALLOC },
- { NULL, 0, 0, 0, 0 }
+ { ".eeprom", 7, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".page0", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".softregs", 9, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".vectors", 8, 0, SHT_PROGBITS, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
#define ELF_ARCH bfd_arch_m68hc11
@@ -1276,6 +1276,8 @@ static const struct bfd_elf_special_section elf32_m68hc11_special_sections[] =
#define elf_info_to_howto 0
#define elf_info_to_howto_rel m68hc11_info_to_howto_rel
#define bfd_elf32_bfd_relax_section m68hc11_elf_relax_section
+#define elf_backend_gc_mark_hook elf32_m68hc11_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_m68hc11_gc_sweep_hook
#define elf_backend_check_relocs elf32_m68hc11_check_relocs
#define elf_backend_relocate_section elf32_m68hc11_relocate_section
#define elf_backend_add_symbol_hook elf32_m68hc11_add_symbol_hook
diff --git a/bfd/elf32-m68hc12.c b/bfd/elf32-m68hc12.c
index 310baae..b52f3ff 100644
--- a/bfd/elf32-m68hc12.c
+++ b/bfd/elf32-m68hc12.c
@@ -1,6 +1,5 @@
/* Motorola 68HC12-specific support for 32-bit ELF
- Copyright 1999, 2000, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Stephane Carrez (stcarrez@nerim.fr)
(Heavily copied from the D10V port by Martin Hunt (hunt@cygnus.com))
@@ -538,11 +537,11 @@ m68hc12_elf_set_mach_from_flags (bfd *abfd)
vectors. */
static const struct bfd_elf_special_section elf32_m68hc12_special_sections[] =
{
- { STRING_COMMA_LEN (".eeprom"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".page0"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".softregs"), 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".vectors"), 0, SHT_PROGBITS, SHF_ALLOC },
- { NULL, 0, 0, 0, 0 }
+ { ".eeprom", 7, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".page0", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".softregs", 9, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".vectors", 8, 0, SHT_PROGBITS, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
#define ELF_ARCH bfd_arch_m68hc12
@@ -554,6 +553,8 @@ static const struct bfd_elf_special_section elf32_m68hc12_special_sections[] =
#define elf_info_to_howto 0
#define elf_info_to_howto_rel m68hc11_info_to_howto_rel
+#define elf_backend_gc_mark_hook elf32_m68hc11_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_m68hc11_gc_sweep_hook
#define elf_backend_check_relocs elf32_m68hc11_check_relocs
#define elf_backend_relocate_section elf32_m68hc11_relocate_section
#define elf_backend_object_p m68hc12_elf_set_mach_from_flags
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index a8ecf59..e7fb944 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -810,6 +810,48 @@ m68hc11_elf_special_reloc (bfd *abfd ATTRIBUTE_UNUSED,
abort();
}
+asection *
+elf32_m68hc11_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
+}
+
+bfd_boolean
+elf32_m68hc11_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+{
+ /* We don't use got and plt entries for 68hc11/68hc12. */
+ return TRUE;
+}
+
/* Look through the relocs for a section during the first phase.
Since we don't do .gots or .plts, we just need to consider the
virtual table relocs for gc. */
diff --git a/bfd/elf32-m68hc1x.h b/bfd/elf32-m68hc1x.h
index 7cae2e8..402ae3e 100644
--- a/bfd/elf32-m68hc1x.h
+++ b/bfd/elf32-m68hc1x.h
@@ -1,5 +1,5 @@
/* Motorola 68HC11/68HC12-specific support for 32-bit ELF
- Copyright 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
Contributed by Stephane Carrez (stcarrez@nerim.fr)
This file is part of BFD, the Binary File Descriptor library.
@@ -159,6 +159,14 @@ bfd_reloc_status_type m68hc11_elf_special_reloc
asymbol *symbol, void *data, asection *input_section,
bfd *output_bfd, char **error_message);
+/* GC mark and sweep. */
+asection *elf32_m68hc11_gc_mark_hook
+ (asection *sec, struct bfd_link_info *info,
+ Elf_Internal_Rela *rel, struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym);
+bfd_boolean elf32_m68hc11_gc_sweep_hook
+ (bfd *abfd, struct bfd_link_info *info,
+ asection *sec, const Elf_Internal_Rela *relocs);
bfd_boolean elf32_m68hc11_check_relocs
(bfd * abfd, struct bfd_link_info * info,
asection * sec, const Elf_Internal_Rela * relocs);
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 81d219d..e8bb275 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -37,6 +37,12 @@ static struct bfd_link_hash_table *elf_m68k_link_hash_table_create
static bfd_boolean elf_m68k_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
+static asection *elf_m68k_gc_mark_hook
+ PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+static bfd_boolean elf_m68k_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
static bfd_boolean elf_m68k_adjust_dynamic_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
static bfd_boolean elf_m68k_size_dynamic_sections
@@ -858,7 +864,7 @@ elf_m68k_check_relocs (abfd, info, sec, relocs)
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
name + 5) == 0);
@@ -974,30 +980,50 @@ elf_m68k_check_relocs (abfd, info, sec, relocs)
relocation. */
static asection *
-elf_m68k_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
+elf_m68k_gc_mark_hook (sec, info, rel, h, sym)
+ asection *sec;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_68K_GNU_VTINHERIT:
- case R_68K_GNU_VTENTRY:
- return NULL;
- }
-
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_68K_GNU_VTINHERIT:
+ case R_68K_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ default:
+ break;
+
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
}
/* Update the got entry reference counts for the section being removed. */
static bfd_boolean
-elf_m68k_gc_sweep_hook (bfd *abfd,
- struct bfd_link_info *info,
- asection *sec,
- const Elf_Internal_Rela *relocs)
+elf_m68k_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *sec;
+ const Elf_Internal_Rela *relocs;
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -1376,7 +1402,7 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
/* Remember whether there is a PLT. */
plt = s->size != 0;
}
- else if (CONST_STRNEQ (name, ".rela"))
+ else if (strncmp (name, ".rela", 5) == 0)
{
if (s->size != 0)
{
@@ -1387,7 +1413,7 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
s->reloc_count = 0;
}
}
- else if (! CONST_STRNEQ (name, ".got")
+ else if (strncmp (name, ".got", 4) != 0
&& strcmp (name, ".dynbss") != 0)
{
/* It's not one of our sections, so don't allocate space. */
@@ -1833,12 +1859,11 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
/* This symbol is local, or marked to become local. */
- outrel.r_addend = relocation + rel->r_addend;
-
if (r_type == R_68K_32)
{
relocate = TRUE;
outrel.r_info = ELF32_R_INFO (0, R_68K_RELATIVE);
+ outrel.r_addend = relocation + rel->r_addend;
}
else
{
@@ -1855,24 +1880,13 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
{
asection *osec;
- /* We are turning this relocation into one
- against a section symbol. It would be
- proper to subtract the symbol's value,
- osec->vma, from the emitted reloc addend,
- but ld.so expects buggy relocs. */
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
- if (indx == 0)
- {
- struct elf_link_hash_table *htab;
- htab = elf_hash_table (info);
- osec = htab->text_index_section;
- indx = elf_section_data (osec)->dynindx;
- }
- BFD_ASSERT (indx != 0);
+ BFD_ASSERT (indx > 0);
}
outrel.r_info = ELF32_R_INFO (indx, r_type);
+ outrel.r_addend = relocation + rel->r_addend;
}
}
@@ -2430,7 +2444,6 @@ elf_m68k_plt_sym_val (bfd_vma i, const asection *plt,
elf_m68k_adjust_dynamic_symbol
#define elf_backend_size_dynamic_sections \
elf_m68k_size_dynamic_sections
-#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_relocate_section elf_m68k_relocate_section
#define elf_backend_finish_dynamic_symbol \
elf_m68k_finish_dynamic_symbol
diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c
index 9034671..ed0123d 100644
--- a/bfd/elf32-mcore.c
+++ b/bfd/elf32-mcore.c
@@ -1,5 +1,5 @@
/* Motorola MCore specific support for 32-bit ELF
- Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -526,21 +526,37 @@ mcore_elf_relocate_section (bfd * output_bfd,
relocation. */
static asection *
-mcore_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
+mcore_elf_gc_mark_hook (asection * sec,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela * rel,
+ struct elf_link_hash_entry * h,
+ Elf_Internal_Sym * sym)
{
- if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_MCORE_GNU_VTINHERIT:
- case R_MCORE_GNU_VTENTRY:
- return NULL;
- }
-
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ if (h == NULL)
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_MCORE_GNU_VTINHERIT:
+ case R_MCORE_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+
+ return NULL;
}
/* Update the got entry reference counts for the section being removed. */
@@ -621,9 +637,9 @@ mcore_elf_check_relocs (bfd * abfd,
static const struct bfd_elf_special_section mcore_elf_special_sections[]=
{
- { STRING_COMMA_LEN (".ctors"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".dtors"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, 0, 0, 0 }
+ { ".ctors", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".dtors", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
#define TARGET_BIG_SYM bfd_elf32_mcore_big_vec
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index ddad2da..1a293a0 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -700,21 +700,6 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
-
- /* 32 bit relocation with no addend. */
- HOWTO (R_MIPS_GLOB_DAT, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- _bfd_mips_elf_generic_reloc, /* special_function */
- "R_MIPS_GLOB_DAT", /* name */
- FALSE, /* partial_inplace */
- 0x0, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
};
/* The reloc used for BFD_RELOC_CTOR when doing a 64 bit link. This
@@ -1528,7 +1513,6 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
_bfd_mips_elf_always_size_sections
#define elf_backend_size_dynamic_sections \
_bfd_mips_elf_size_dynamic_sections
-#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
#define elf_backend_finish_dynamic_symbol \
_bfd_mips_elf_finish_dynamic_symbol
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
index 33e7e75..af73771 100644
--- a/bfd/elf32-msp430.c
+++ b/bfd/elf32-msp430.c
@@ -1,6 +1,5 @@
/* MSP430-specific support for 32-bit ELF
- Copyright (C) 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Dmitry Diky <diwil@mail.ru>
This file is part of BFD, the Binary File Descriptor library.
@@ -214,6 +213,48 @@ msp430_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
cache_ptr->howto = &elf_msp430_howto_table[r_type];
}
+static asection *
+elf32_msp430_gc_mark_hook (asection * sec,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela * rel,
+ struct elf_link_hash_entry * h,
+ Elf_Internal_Sym * sym)
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
+}
+
+static bfd_boolean
+elf32_msp430_gc_sweep_hook (bfd * abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ asection * sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED)
+{
+ /* We don't use got and plt entries for msp430. */
+ return TRUE;
+}
+
/* Look through the relocs for a section during the first phase.
Since we don't do .gots or .plts, we just need to consider the
virtual table relocs for gc. */
@@ -1169,6 +1210,8 @@ error_return:
#define elf_info_to_howto msp430_info_to_howto_rela
#define elf_info_to_howto_rel NULL
#define elf_backend_relocate_section elf32_msp430_relocate_section
+#define elf_backend_gc_mark_hook elf32_msp430_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_msp430_gc_sweep_hook
#define elf_backend_check_relocs elf32_msp430_check_relocs
#define elf_backend_can_gc_sections 1
#define elf_backend_final_write_processing bfd_elf_msp430_final_write_processing
diff --git a/bfd/elf32-mt.c b/bfd/elf32-mt.c
index 036b5ae..320ef1e 100644
--- a/bfd/elf32-mt.c
+++ b/bfd/elf32-mt.c
@@ -1,5 +1,5 @@
/* Morpho Technologies MT specific support for 32-bit ELF
- Copyright 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -394,6 +394,57 @@ mt_elf_relocate_section
return TRUE;
}
+/* Return the section that should be marked against GC for a given
+ relocation. */
+
+static asection *
+mt_elf_gc_mark_hook
+ (asection * sec,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela * rel ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry * h,
+ Elf_Internal_Sym * sym)
+{
+ if (h != NULL)
+ {
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ if (!(elf_bad_symtab (sec->owner)
+ && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
+ && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
+ && sym->st_shndx != SHN_COMMON))
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+ }
+
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being
+ removed. */
+
+static bfd_boolean
+mt_elf_gc_sweep_hook
+ (bfd * abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ asection * sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
/* Look through the relocs for a section during the first phase.
Since we don't do .gots or .plts, we just need to consider the
virtual table relocs for gc. */
@@ -581,6 +632,8 @@ mt_elf_print_private_bfd_data (bfd * abfd, void * ptr)
#define bfd_elf32_bfd_reloc_type_lookup mt_reloc_type_lookup
+#define elf_backend_gc_mark_hook mt_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook mt_elf_gc_sweep_hook
#define elf_backend_check_relocs mt_elf_check_relocs
#define elf_backend_object_p mt_elf_object_p
#define elf_backend_rela_normal 1
diff --git a/bfd/elf32-openrisc.c b/bfd/elf32-openrisc.c
index fbda8fb..b3d67bb 100644
--- a/bfd/elf32-openrisc.c
+++ b/bfd/elf32-openrisc.c
@@ -1,6 +1,5 @@
/* OpenRISC-specific support for 32-bit ELF.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Johan Rydberg, jrydberg@opencores.org
This file is part of BFD, the Binary File Descriptor library.
@@ -414,20 +413,47 @@ openrisc_elf_relocate_section (bfd *output_bfd,
static asection *
openrisc_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
- if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_OPENRISC_GNU_VTINHERIT:
- case R_OPENRISC_GNU_VTENTRY:
- return NULL;
- }
-
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ if (h == NULL)
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_OPENRISC_GNU_VTINHERIT:
+ case R_OPENRISC_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static bfd_boolean
+openrisc_elf_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+{
+ return TRUE;
}
/* Look through the relocs for a section during the first phase.
@@ -534,6 +560,7 @@ openrisc_elf_final_write_processing (bfd *abfd,
#define elf_info_to_howto openrisc_info_to_howto_rela
#define elf_backend_relocate_section openrisc_elf_relocate_section
#define elf_backend_gc_mark_hook openrisc_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook openrisc_elf_gc_sweep_hook
#define elf_backend_check_relocs openrisc_elf_check_relocs
#define elf_backend_can_gc_sections 1
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 281fab0..6e80a1e 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -1896,21 +1896,21 @@ ppc_elf_additional_program_headers (bfd *abfd,
static const struct bfd_elf_special_section ppc_elf_special_sections[] =
{
- { STRING_COMMA_LEN (".plt"), 0, SHT_NOBITS, SHF_ALLOC + SHF_EXECINSTR },
- { STRING_COMMA_LEN (".sbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".sbss2"), -2, SHT_PROGBITS, SHF_ALLOC },
- { STRING_COMMA_LEN (".sdata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".sdata2"), -2, SHT_PROGBITS, SHF_ALLOC },
- { STRING_COMMA_LEN (".tags"), 0, SHT_ORDERED, SHF_ALLOC },
- { STRING_COMMA_LEN (".PPC.EMB.apuinfo"), 0, SHT_NOTE, 0 },
- { STRING_COMMA_LEN (".PPC.EMB.sbss0"), 0, SHT_PROGBITS, SHF_ALLOC },
- { STRING_COMMA_LEN (".PPC.EMB.sdata0"), 0, SHT_PROGBITS, SHF_ALLOC },
- { NULL, 0, 0, 0, 0 }
+ { ".plt", 4, 0, SHT_NOBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".sbss2", 6, -2, SHT_PROGBITS, SHF_ALLOC },
+ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".sdata2", 7, -2, SHT_PROGBITS, SHF_ALLOC },
+ { ".tags", 5, 0, SHT_ORDERED, SHF_ALLOC },
+ { ".PPC.EMB.apuinfo", 16, 0, SHT_NOTE, 0 },
+ { ".PPC.EMB.sbss0", 14, 0, SHT_PROGBITS, SHF_ALLOC },
+ { ".PPC.EMB.sdata0", 15, 0, SHT_PROGBITS, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
/* This is what we want for new plt/got. */
static struct bfd_elf_special_section ppc_alt_plt =
- { STRING_COMMA_LEN (".plt"), 0, SHT_PROGBITS, SHF_ALLOC };
+ { ".plt", 4, 0, SHT_PROGBITS, SHF_ALLOC };
static const struct bfd_elf_special_section *
ppc_elf_get_sec_type_attr (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
@@ -3436,7 +3436,7 @@ ppc_elf_check_relocs (bfd *abfd,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
name + 5) == 0);
@@ -3653,20 +3653,38 @@ ppc_elf_select_plt_layout (bfd *output_bfd ATTRIBUTE_UNUSED,
static asection *
ppc_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_PPC_GNU_VTINHERIT:
- case R_PPC_GNU_VTENTRY:
- return NULL;
- }
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_PPC_GNU_VTINHERIT:
+ case R_PPC_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
}
/* Update the got, plt and dynamic reloc reference counts for the
@@ -4846,7 +4864,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
/* Strip these too. */
}
- else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
+ else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
if (s->size != 0)
{
@@ -6180,10 +6198,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
a linker script. */
dodyn:
if (r_symndx == 0)
- {
- _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
- break;
- }
+ break;
/* Fall thru. */
if ((input_section->flags & SEC_ALLOC) == 0)
@@ -6227,7 +6242,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (input_bfd,
input_section),
name + 5) == 0);
@@ -6283,14 +6298,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
but ld.so expects buggy relocs. */
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
- if (indx == 0)
- {
- osec = htab->elf.text_index_section;
- indx = elf_section_data (osec)->dynindx;
- }
- BFD_ASSERT (indx != 0);
+ BFD_ASSERT (indx > 0);
#ifdef DEBUG
- if (indx == 0)
+ if (indx <= 0)
printf ("indx=%ld section=%s flags=%08x name=%s\n",
indx, osec->name, osec->flags,
h->root.root.string);
@@ -6435,9 +6445,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
BFD_ASSERT (sec != NULL);
name = bfd_get_section_name (abfd, sec->output_section);
- if (! ((CONST_STRNEQ (name, ".sdata")
+ if (! ((strncmp (name, ".sdata", 6) == 0
&& (name[6] == 0 || name[6] == '.'))
- || (CONST_STRNEQ (name, ".sbss")
+ || (strncmp (name, ".sbss", 5) == 0
&& (name[5] == 0 || name[5] == '.'))))
{
(*_bfd_error_handler)
@@ -6463,8 +6473,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
BFD_ASSERT (sec != NULL);
name = bfd_get_section_name (abfd, sec->output_section);
- if (! (CONST_STRNEQ (name, ".sdata2")
- || CONST_STRNEQ (name, ".sbss2")))
+ if (! (strncmp (name, ".sdata2", 7) == 0
+ || strncmp (name, ".sbss2", 6) == 0))
{
(*_bfd_error_handler)
(_("%B: the target (%s) of a %s relocation is "
@@ -6495,9 +6505,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
BFD_ASSERT (sec != NULL);
name = bfd_get_section_name (abfd, sec->output_section);
- if (((CONST_STRNEQ (name, ".sdata")
+ if (((strncmp (name, ".sdata", 6) == 0
&& (name[6] == 0 || name[6] == '.'))
- || (CONST_STRNEQ (name, ".sbss")
+ || (strncmp (name, ".sbss", 5) == 0
&& (name[5] == 0 || name[5] == '.'))))
{
reg = 13;
@@ -6507,8 +6517,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
+ sh->root.u.def.section->output_section->vma);
}
- else if (CONST_STRNEQ (name, ".sdata2")
- || CONST_STRNEQ (name, ".sbss2"))
+ else if (strncmp (name, ".sdata2", 7) == 0
+ || strncmp (name, ".sbss2", 6) == 0)
{
reg = 2;
sh = htab->sdata[1].sym;
@@ -7480,7 +7490,6 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
#define elf_backend_get_sec_type_attr ppc_elf_get_sec_type_attr
#define elf_backend_plt_sym_val ppc_elf_plt_sym_val
#define elf_backend_action_discarded ppc_elf_action_discarded
-#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#include "elf32-target.h"
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 01ee6a5..e2934cf 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -46,6 +46,12 @@ static void elf_s390_copy_indirect_symbol
static bfd_boolean elf_s390_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
+static asection *elf_s390_gc_mark_hook
+ PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+static bfd_boolean elf_s390_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
struct elf_s390_link_hash_entry;
static void elf_s390_adjust_gotplt
PARAMS ((struct elf_s390_link_hash_entry *));
@@ -1267,7 +1273,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (name == NULL)
return FALSE;
- if (! CONST_STRNEQ (name, ".rela")
+ if (strncmp (name, ".rela", 5) != 0
|| strcmp (bfd_get_section_name (abfd, sec),
name + 5) != 0)
{
@@ -1373,30 +1379,50 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
relocation. */
static asection *
-elf_s390_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
+elf_s390_gc_mark_hook (sec, info, rel, h, sym)
+ asection *sec;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_390_GNU_VTINHERIT:
- case R_390_GNU_VTENTRY:
- return NULL;
- }
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_390_GNU_VTINHERIT:
+ case R_390_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+ return NULL;
}
/* Update the got entry reference counts for the section being removed. */
static bfd_boolean
-elf_s390_gc_sweep_hook (bfd *abfd,
- struct bfd_link_info *info,
- asection *sec,
- const Elf_Internal_Rela *relocs)
+elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *sec;
+ const Elf_Internal_Rela *relocs;
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -2100,7 +2126,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
/* Strip this section if we don't need it; see the
comment below. */
}
- else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
+ else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
if (s->size != 0)
relocs = TRUE;
@@ -2543,13 +2569,8 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
/* r_symndx will be zero only for relocs against symbols
from removed linkonce sections, or sections discarded by
a linker script. */
- if (r_symndx == 0)
- {
- _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
- break;
- }
-
- if ((input_section->flags & SEC_ALLOC) == 0)
+ if (r_symndx == 0
+ || (input_section->flags & SEC_ALLOC) == 0)
break;
if ((info->shared
@@ -2635,18 +2656,14 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
osec = sec->output_section;
sindx = elf_section_data (osec)->dynindx;
- if (sindx == 0)
- {
- osec = htab->elf.text_index_section;
- sindx = elf_section_data (osec)->dynindx;
- }
- BFD_ASSERT (sindx != 0);
+ BFD_ASSERT (sindx > 0);
/* We are turning this relocation into one
against a section symbol, so subtract out
the output section's address but not the
offset of the input section in the output
section. */
+
outrel.r_addend -= osec->vma;
}
outrel.r_info = ELF32_R_INFO (sindx, r_type);
@@ -2910,7 +2927,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
continue;
case R_390_TLS_LDO32:
- if (info->shared)
+ if (info->shared || (input_section->flags & SEC_CODE) == 0)
relocation -= dtpoff_base (info);
else
/* When converting LDO to LE, we must negate. */
@@ -3551,7 +3568,6 @@ elf_s390_plt_sym_val (bfd_vma i, const asection *plt,
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
#define elf_backend_relocate_section elf_s390_relocate_section
#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections
-#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
#define elf_backend_grok_prstatus elf_s390_grok_prstatus
#define elf_backend_plt_sym_val elf_s390_plt_sym_val
diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c
deleted file mode 100644
index 17c4aa9..0000000
--- a/bfd/elf32-score.c
+++ /dev/null
@@ -1,3836 +0,0 @@
-/* 32-bit ELF support for S+core.
- Copyright 2006 Free Software Foundation, Inc.
- Contributed by
- 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 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "libbfd.h"
-#include "libiberty.h"
-#include "elf-bfd.h"
-#include "elf/score.h"
-#include "elf/common.h"
-#include "elf/internal.h"
-#include "hashtab.h"
-
-
-/* Score ELF linker hash table. */
-
-struct score_elf_link_hash_table
-{
- /* The main hash table. */
- struct elf_link_hash_table root;
-};
-
-/* The SCORE ELF linker needs additional information for each symbol in
- the global hash table. */
-
-struct score_elf_link_hash_entry
-{
- struct elf_link_hash_entry root;
-
- /* Number of R_SCORE_ABS32, R_SCORE_REL32 relocs against this symbol. */
- unsigned int possibly_dynamic_relocs;
-
- /* If the R_SCORE_ABS32, R_SCORE_REL32 reloc is against a readonly section. */
- bfd_boolean readonly_reloc;
-
- /* We must not create a stub for a symbol that has relocations related to
- taking the function's address, i.e. any but R_SCORE_CALL15 ones. */
- bfd_boolean no_fn_stub;
-
- /* Are we forced local? This will only be set if we have converted
- the initial global GOT entry to a local GOT entry. */
- bfd_boolean forced_local;
-};
-
-/* Traverse a score ELF linker hash table. */
-#define score_elf_link_hash_traverse(table, func, info) \
- (elf_link_hash_traverse \
- (&(table)->root, \
- (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \
- (info)))
-
-/* Get the SCORE elf linker hash table from a link_info structure. */
-#define score_elf_hash_table(info) \
- ((struct score_elf_link_hash_table *) ((info)->hash))
-
-/* This structure is used to hold .got entries while estimating got sizes. */
-struct score_got_entry
-{
- /* The input bfd in which the symbol is defined. */
- bfd *abfd;
- /* The index of the symbol, as stored in the relocation r_info, if
- we have a local symbol; -1 otherwise. */
- long symndx;
- union
- {
- /* If abfd == NULL, an address that must be stored in the got. */
- bfd_vma address;
- /* If abfd != NULL && symndx != -1, the addend of the relocation
- that should be added to the symbol value. */
- bfd_vma addend;
- /* If abfd != NULL && symndx == -1, the hash table entry
- corresponding to a global symbol in the got (or, local, if
- h->forced_local). */
- struct score_elf_link_hash_entry *h;
- } d;
-
- /* The offset from the beginning of the .got section to the entry
- corresponding to this symbol+addend. If it's a global symbol
- whose offset is yet to be decided, it's going to be -1. */
- long gotidx;
-};
-
-/* This structure is passed to score_elf_sort_hash_table_f when sorting
- the dynamic symbols. */
-
-struct score_elf_hash_sort_data
-{
- /* The symbol in the global GOT with the lowest dynamic symbol table index. */
- struct elf_link_hash_entry *low;
- /* The least dynamic symbol table index corresponding to a symbol with a GOT entry. */
- long min_got_dynindx;
- /* The greatest dynamic symbol table index corresponding to a symbol
- with a GOT entry that is not referenced (e.g., a dynamic symbol
- with dynamic relocations pointing to it from non-primary GOTs). */
- long max_unref_got_dynindx;
- /* The greatest dynamic symbol table index not corresponding to a
- symbol without a GOT entry. */
- long max_non_got_dynindx;
-};
-
-struct score_got_info
-{
- /* The global symbol in the GOT with the lowest index in the dynamic
- symbol table. */
- struct elf_link_hash_entry *global_gotsym;
- /* The number of global .got entries. */
- unsigned int global_gotno;
- /* The number of local .got entries. */
- unsigned int local_gotno;
- /* The number of local .got entries we have used. */
- unsigned int assigned_gotno;
- /* A hash table holding members of the got. */
- struct htab *got_entries;
- /* In multi-got links, a pointer to the next got (err, rather, most
- of the time, it points to the previous got). */
- struct score_got_info *next;
-};
-
-/* A structure used to count GOT entries, for GOT entry or ELF symbol table traversal. */
-struct _score_elf_section_data
-{
- struct bfd_elf_section_data elf;
- union
- {
- struct score_got_info *got_info;
- bfd_byte *tdata;
- }
- u;
-};
-
-#define score_elf_section_data(sec) \
- ((struct _score_elf_section_data *) elf_section_data (sec))
-
-/* The size of a symbol-table entry. */
-#define SCORE_ELF_SYM_SIZE(abfd) \
- (get_elf_backend_data (abfd)->s->sizeof_sym)
-
-/* 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)
-#define MINUS_TWO (((bfd_vma)0) - 2)
-
-#define PDR_SIZE 32
-
-
-/* The number of local .got entries we reserve. */
-#define SCORE_RESERVED_GOTNO (2)
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
-
-/* The offset of $gp from the beginning of the .got section. */
-#define ELF_SCORE_GP_OFFSET(abfd) (0x3ff0)
-/* The maximum size of the GOT for it to be addressable using 15-bit offsets from $gp. */
-#define SCORE_ELF_GOT_MAX_SIZE(abfd) (ELF_SCORE_GP_OFFSET(abfd) + 0x3fff)
-
-#define SCORE_ELF_STUB_SECTION_NAME (".SCORE.stub")
-#define SCORE_FUNCTION_STUB_SIZE (16)
-
-#define STUB_LW 0xc3bcc010 /* lw r29, [r28, -0x3ff0] */
-#define STUB_MOVE 0x8363bc56 /* mv r27, r3 */
-#define STUB_LI16 0x87548000 /* ori r26, .dynsym_index */
-#define STUB_BRL 0x801dbc09 /* brl r29 */
-
-#define SCORE_ELF_GOT_SIZE(abfd) \
- (get_elf_backend_data (abfd)->s->arch_size / 8)
-
-#define SCORE_ELF_ADD_DYNAMIC_ENTRY(info, tag, val) \
- (_bfd_elf_add_dynamic_entry (info, (bfd_vma) tag, (bfd_vma) val))
-
-/* The size of an external dynamic table entry. */
-#define SCORE_ELF_DYN_SIZE(abfd) \
- (get_elf_backend_data (abfd)->s->sizeof_dyn)
-
-/* The size of an external REL relocation. */
-#define SCORE_ELF_REL_SIZE(abfd) \
- (get_elf_backend_data (abfd)->s->sizeof_rel)
-
-/* The default alignment for sections, as a power of two. */
-#define SCORE_ELF_LOG_FILE_ALIGN(abfd)\
- (get_elf_backend_data (abfd)->s->log_file_align)
-
-#ifndef NUM_ELEM
-#define NUM_ELEM(a) (sizeof (a) / (sizeof (a)[0]))
-#endif
-
-static bfd_byte *hi16_rel_addr;
-
-/* This will be used when we sort the dynamic relocation records. */
-static bfd *reldyn_sorting_bfd;
-
-/* SCORE ELF uses two common sections. One is the usual one, and the
- other is for small objects. All the small objects are kept
- together, and then referenced via the gp pointer, which yields
- faster assembler code. This is what we use for the small common
- section. This approach is copied from ecoff.c. */
-static asection score_elf_scom_section;
-static asymbol score_elf_scom_symbol;
-static asymbol *score_elf_scom_symbol_ptr;
-
-static bfd_reloc_status_type
-score_elf_hi16_reloc (bfd *abfd ATTRIBUTE_UNUSED,
- arelent *reloc_entry,
- asymbol *symbol ATTRIBUTE_UNUSED,
- void * data,
- asection *input_section ATTRIBUTE_UNUSED,
- bfd *output_bfd ATTRIBUTE_UNUSED,
- char **error_message ATTRIBUTE_UNUSED)
-{
- hi16_rel_addr = (bfd_byte *) data + reloc_entry->address;
- return bfd_reloc_ok;
-}
-
-static bfd_reloc_status_type
-score_elf_lo16_reloc (bfd *abfd,
- arelent *reloc_entry,
- asymbol *symbol ATTRIBUTE_UNUSED,
- void * data,
- asection *input_section,
- bfd *output_bfd ATTRIBUTE_UNUSED,
- char **error_message ATTRIBUTE_UNUSED)
-{
- bfd_vma addend = 0, offset = 0;
- unsigned long val;
- unsigned long hi16_offset, hi16_value, uvalue;
-
- hi16_value = bfd_get_32 (abfd, hi16_rel_addr);
- hi16_offset = ((((hi16_value >> 16) & 0x3) << 15) | (hi16_value & 0x7fff)) >> 1;
- addend = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
- offset = ((((addend >> 16) & 0x3) << 15) | (addend & 0x7fff)) >> 1;
- val = reloc_entry->addend;
- if (reloc_entry->address > input_section->size)
- return bfd_reloc_outofrange;
- uvalue = ((hi16_offset << 16) | (offset & 0xffff)) + val;
- hi16_offset = (uvalue >> 16) << 1;
- hi16_value = (hi16_value & ~0x37fff) | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000);
- bfd_put_32 (abfd, hi16_value, hi16_rel_addr);
- offset = (uvalue & 0xffff) << 1;
- addend = (addend & ~0x37fff) | (offset & 0x7fff) | ((offset << 1) & 0x30000);
- bfd_put_32 (abfd, addend, (bfd_byte *) data + reloc_entry->address);
- return bfd_reloc_ok;
-}
-
-/* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a
- dangerous relocation. */
-
-static bfd_boolean
-score_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp)
-{
- unsigned int count;
- asymbol **sym;
- unsigned int i;
-
- /* If we've already figured out what GP will be, just return it. */
- *pgp = _bfd_get_gp_value (output_bfd);
- if (*pgp)
- return TRUE;
-
- count = bfd_get_symcount (output_bfd);
- sym = bfd_get_outsymbols (output_bfd);
-
- /* The linker script will have created a symbol named `_gp' with the
- appropriate value. */
- if (sym == NULL)
- i = count;
- else
- {
- for (i = 0; i < count; i++, sym++)
- {
- const char *name;
-
- name = bfd_asymbol_name (*sym);
- if (*name == '_' && strcmp (name, "_gp") == 0)
- {
- *pgp = bfd_asymbol_value (*sym);
- _bfd_set_gp_value (output_bfd, *pgp);
- break;
- }
- }
- }
-
- if (i >= count)
- {
- /* Only get the error once. */
- *pgp = 4;
- _bfd_set_gp_value (output_bfd, *pgp);
- return FALSE;
- }
-
- return TRUE;
-}
-
-/* We have to figure out the gp value, so that we can adjust the
- symbol value correctly. We look up the symbol _gp in the output
- BFD. If we can't find it, we're stuck. We cache it in the ELF
- target data. We don't need to adjust the symbol value for an
- external symbol if we are producing relocatable output. */
-
-static bfd_reloc_status_type
-score_elf_final_gp (bfd *output_bfd,
- asymbol *symbol,
- bfd_boolean relocatable,
- char **error_message,
- bfd_vma *pgp)
-{
- if (bfd_is_und_section (symbol->section)
- && ! relocatable)
- {
- *pgp = 0;
- return bfd_reloc_undefined;
- }
-
- *pgp = _bfd_get_gp_value (output_bfd);
- if (*pgp == 0
- && (! relocatable
- || (symbol->flags & BSF_SECTION_SYM) != 0))
- {
- if (relocatable)
- {
- /* Make up a value. */
- *pgp = symbol->section->output_section->vma + 0x4000;
- _bfd_set_gp_value (output_bfd, *pgp);
- }
- else if (!score_elf_assign_gp (output_bfd, pgp))
- {
- *error_message =
- (char *) _("GP relative relocation when _gp not defined");
- return bfd_reloc_dangerous;
- }
- }
-
- return bfd_reloc_ok;
-}
-
-static bfd_reloc_status_type
-score_elf_gprel15_with_gp (bfd *abfd,
- asymbol *symbol,
- arelent *reloc_entry,
- asection *input_section,
- bfd_boolean relocateable,
- void * data,
- bfd_vma gp ATTRIBUTE_UNUSED)
-{
- bfd_vma relocation;
- unsigned long insn;
-
- if (bfd_is_com_section (symbol->section))
- relocation = 0;
- else
- relocation = symbol->value;
-
- relocation += symbol->section->output_section->vma;
- relocation += symbol->section->output_offset;
- if (reloc_entry->address > input_section->size)
- return bfd_reloc_outofrange;
-
- insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
- if (((reloc_entry->addend & 0xffffc000) != 0)
- && ((reloc_entry->addend & 0xffffc000) != 0xffffc000))
- return bfd_reloc_overflow;
-
- insn = (insn & ~0x7fff) | (reloc_entry->addend & 0x7fff);
- bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
- if (relocateable)
- reloc_entry->address += input_section->output_offset;
-
- return bfd_reloc_ok;
-}
-
-static bfd_reloc_status_type
-gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry,
- asection *input_section, bfd_boolean relocatable,
- void *data, bfd_vma gp)
-{
- bfd_vma relocation;
- bfd_vma val;
-
- if (bfd_is_com_section (symbol->section))
- relocation = 0;
- else
- relocation = symbol->value;
-
- relocation += symbol->section->output_section->vma;
- relocation += symbol->section->output_offset;
-
- if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
- return bfd_reloc_outofrange;
-
- /* Set val to the offset into the section or symbol. */
- val = reloc_entry->addend;
-
- if (reloc_entry->howto->partial_inplace)
- val += bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
-
- /* Adjust val for the final section location and GP value. If we
- are producing relocatable output, we don't want to do this for
- an external symbol. */
- if (! relocatable
- || (symbol->flags & BSF_SECTION_SYM) != 0)
- val += relocation - gp;
-
- if (reloc_entry->howto->partial_inplace)
- bfd_put_32 (abfd, val, (bfd_byte *) data + reloc_entry->address);
- else
- reloc_entry->addend = val;
-
- if (relocatable)
- reloc_entry->address += input_section->output_offset;
-
- return bfd_reloc_ok;
-}
-
-static bfd_reloc_status_type
-score_elf_gprel15_reloc (bfd *abfd,
- arelent *reloc_entry,
- asymbol *symbol,
- void * data,
- asection *input_section,
- bfd *output_bfd,
- char **error_message)
-{
- bfd_boolean relocateable;
- bfd_reloc_status_type ret;
- bfd_vma gp;
-
- if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) == 0 && reloc_entry->addend == 0)
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
- if (output_bfd != (bfd *) NULL)
- relocateable = TRUE;
- else
- {
- relocateable = FALSE;
- output_bfd = symbol->section->output_section->owner;
- }
-
- ret = score_elf_final_gp (output_bfd, symbol, relocateable, error_message, &gp);
- if (ret != bfd_reloc_ok)
- return ret;
-
- return score_elf_gprel15_with_gp (abfd, symbol, reloc_entry,
- input_section, relocateable, data, gp);
-}
-
-/* Do a R_SCORE_GPREL32 relocation. This is a 32 bit value which must
- become the offset from the gp register. */
-
-static bfd_reloc_status_type
-score_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
- void *data, asection *input_section, bfd *output_bfd,
- char **error_message)
-{
- bfd_boolean relocatable;
- bfd_reloc_status_type ret;
- bfd_vma gp;
-
- /* R_SCORE_GPREL32 relocations are defined for local symbols only. */
- if (output_bfd != NULL
- && (symbol->flags & BSF_SECTION_SYM) == 0
- && (symbol->flags & BSF_LOCAL) != 0)
- {
- *error_message = (char *)
- _("32bits gp relative relocation occurs for an external symbol");
- return bfd_reloc_outofrange;
- }
-
- if (output_bfd != NULL)
- relocatable = TRUE;
- else
- {
- relocatable = FALSE;
- output_bfd = symbol->section->output_section->owner;
- }
-
- ret = score_elf_final_gp (output_bfd, symbol, relocatable, error_message, &gp);
- if (ret != bfd_reloc_ok)
- return ret;
-
- gp = 0; /* FIXME. */
- return gprel32_with_gp (abfd, symbol, reloc_entry, input_section,
- relocatable, data, gp);
-}
-
-/* A howto special_function for R_SCORE_GOT15 relocations. This is just
- like any other 16-bit relocation when applied to global symbols, but is
- treated in the same as R_SCORE_HI16 when applied to local symbols. */
-
-static bfd_reloc_status_type
-score_elf_got15_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
- void *data, asection *input_section,
- bfd *output_bfd, char **error_message)
-{
- if ((symbol->flags & (BSF_GLOBAL | BSF_WEAK)) != 0
- || bfd_is_und_section (bfd_get_section (symbol))
- || bfd_is_com_section (bfd_get_section (symbol)))
- /* The relocation is against a global symbol. */
- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd,
- error_message);
-
- return score_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message);
-}
-
-static bfd_reloc_status_type
-score_elf_got_lo16_reloc (bfd *abfd,
- arelent *reloc_entry,
- asymbol *symbol ATTRIBUTE_UNUSED,
- void * data,
- asection *input_section,
- bfd *output_bfd ATTRIBUTE_UNUSED,
- char **error_message ATTRIBUTE_UNUSED)
-{
- bfd_vma addend = 0, offset = 0;
- unsigned long val;
- unsigned long hi16_offset, hi16_value, uvalue;
-
- hi16_value = bfd_get_32 (abfd, hi16_rel_addr);
- hi16_offset = ((((hi16_value >> 16) & 0x3) << 15) | (hi16_value & 0x7fff)) >> 1;
- addend = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
- offset = ((((addend >> 16) & 0x3) << 15) | (addend & 0x7fff)) >> 1;
- val = reloc_entry->addend;
- if (reloc_entry->address > input_section->size)
- return bfd_reloc_outofrange;
- uvalue = ((hi16_offset << 16) | (offset & 0xffff)) + val;
- hi16_offset = (uvalue >> 16) & 0x7fff;
- hi16_value = (hi16_value & ~0x37fff) | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000);
- bfd_put_32 (abfd, hi16_value, hi16_rel_addr);
- offset = (uvalue & 0xffff) << 1;
- addend = (addend & ~0x37fff) | (offset & 0x7fff) | ((offset << 1) & 0x30000);
- bfd_put_32 (abfd, addend, (bfd_byte *) data + reloc_entry->address);
- return bfd_reloc_ok;
-}
-
-static reloc_howto_type elf32_score_howto_table[] =
-{
- /* No relocation. */
- HOWTO (R_SCORE_NONE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SCORE_NONE", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* R_SCORE_HI16 */
- HOWTO (R_SCORE_HI16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 1, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- score_elf_hi16_reloc, /* special_function */
- "R_SCORE_HI16", /* name */
- TRUE, /* partial_inplace */
- 0x37fff, /* src_mask */
- 0x37fff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* R_SCORE_LO16 */
- HOWTO (R_SCORE_LO16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 1, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- score_elf_lo16_reloc, /* special_function */
- "R_SCORE_LO16", /* name */
- TRUE, /* partial_inplace */
- 0x37fff, /* src_mask */
- 0x37fff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* R_SCORE_DUMMY1 */
- HOWTO (R_SCORE_DUMMY1, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 1, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SCORE_DUMMY1", /* name */
- TRUE, /* partial_inplace */
- 0x0000ffff, /* src_mask */
- 0x0000ffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /*R_SCORE_24 */
- HOWTO (R_SCORE_24, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 24, /* bitsize */
- FALSE, /* pc_relative */
- 1, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SCORE_24", /* name */
- FALSE, /* partial_inplace */
- 0x3ff7fff, /* src_mask */
- 0x3ff7fff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /*R_SCORE_PC19 */
- HOWTO (R_SCORE_PC19, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 19, /* bitsize */
- TRUE, /* pc_relative */
- 1, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SCORE_PC19", /* name */
- FALSE, /* partial_inplace */
- 0x3ff03fe, /* src_mask */
- 0x3ff03fe, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /*R_SCORE16_11 */
- HOWTO (R_SCORE16_11, /* type */
- 1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 11, /* bitsize */
- FALSE, /* pc_relative */
- 1, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SCORE16_11", /* name */
- FALSE, /* partial_inplace */
- 0x000000ffe, /* src_mask */
- 0x000000ffe, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* R_SCORE16_PC8 */
- HOWTO (R_SCORE16_PC8, /* type */
- 1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SCORE16_PC8", /* name */
- FALSE, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* 32 bit absolute */
- HOWTO (R_SCORE_ABS32, /* type 8 */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SCORE_ABS32", /* name */
- FALSE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* 16 bit absolute */
- HOWTO (R_SCORE_ABS16, /* type 11 */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SCORE_ABS16", /* name */
- FALSE, /* partial_inplace */
- 0x0000ffff, /* src_mask */
- 0x0000ffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* R_SCORE_DUMMY2 */
- HOWTO (R_SCORE_DUMMY2, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SCORE_DUMMY2", /* name */
- TRUE, /* partial_inplace */
- 0x00007fff, /* src_mask */
- 0x00007fff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* R_SCORE_GP15 */
- HOWTO (R_SCORE_GP15, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- score_elf_gprel15_reloc,/* special_function */
- "R_SCORE_GP15", /* name */
- TRUE, /* partial_inplace */
- 0x00007fff, /* src_mask */
- 0x00007fff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* GNU extension to record C++ vtable hierarchy. */
- HOWTO (R_SCORE_GNU_VTINHERIT, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- NULL, /* special_function */
- "R_SCORE_GNU_VTINHERIT", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* GNU extension to record C++ vtable member usage */
- HOWTO (R_SCORE_GNU_VTENTRY, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- _bfd_elf_rel_vtable_reloc_fn, /* special_function */
- "R_SCORE_GNU_VTENTRY", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Reference to global offset table. */
- HOWTO (R_SCORE_GOT15, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- score_elf_got15_reloc, /* special_function */
- "R_SCORE_GOT15", /* name */
- TRUE, /* partial_inplace */
- 0x00007fff, /* src_mask */
- 0x00007fff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Low 16 bits of displacement in global offset table. */
- HOWTO (R_SCORE_GOT_LO16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 1, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- score_elf_got_lo16_reloc, /* special_function */
- "R_SCORE_GOT_LO16", /* name */
- TRUE, /* partial_inplace */
- 0x37ffe, /* src_mask */
- 0x37ffe, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* 15 bit call through global offset table. */
- HOWTO (R_SCORE_CALL15, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SCORE_CALL15", /* name */
- TRUE, /* partial_inplace */
- 0x0000ffff, /* src_mask */
- 0x0000ffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* 32 bit GP relative reference. */
- HOWTO (R_SCORE_GPREL32, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- score_elf_gprel32_reloc, /* special_function */
- "R_SCORE_GPREL32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* 32 bit symbol relative relocation. */
- HOWTO (R_SCORE_REL32, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_SCORE_REL32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* R_SCORE_DUMMY_HI16 */
- HOWTO (R_SCORE_DUMMY_HI16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 1, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- score_elf_hi16_reloc, /* special_function */
- "R_SCORE_DUMMY_HI16", /* name */
- TRUE, /* partial_inplace */
- 0x37fff, /* src_mask */
- 0x37fff, /* dst_mask */
- FALSE), /* pcrel_offset */
-};
-
-struct score_reloc_map
-{
- bfd_reloc_code_real_type bfd_reloc_val;
- unsigned char elf_reloc_val;
-};
-
-static const struct score_reloc_map elf32_score_reloc_map[] =
-{
- {BFD_RELOC_NONE, R_SCORE_NONE},
- {BFD_RELOC_HI16_S, R_SCORE_HI16},
- {BFD_RELOC_LO16, R_SCORE_LO16},
- {BFD_RELOC_SCORE_DUMMY1, R_SCORE_DUMMY1},
- {BFD_RELOC_SCORE_JMP, R_SCORE_24},
- {BFD_RELOC_SCORE_BRANCH, R_SCORE_PC19},
- {BFD_RELOC_SCORE16_JMP, R_SCORE16_11},
- {BFD_RELOC_SCORE16_BRANCH, R_SCORE16_PC8},
- {BFD_RELOC_32, R_SCORE_ABS32},
- {BFD_RELOC_16, R_SCORE_ABS16},
- {BFD_RELOC_SCORE_DUMMY2, R_SCORE_DUMMY2},
- {BFD_RELOC_SCORE_GPREL15, R_SCORE_GP15},
- {BFD_RELOC_VTABLE_INHERIT, R_SCORE_GNU_VTINHERIT},
- {BFD_RELOC_VTABLE_ENTRY, R_SCORE_GNU_VTENTRY},
- {BFD_RELOC_SCORE_GOT15, R_SCORE_GOT15},
- {BFD_RELOC_SCORE_GOT_LO16, R_SCORE_GOT_LO16},
- {BFD_RELOC_SCORE_CALL15, R_SCORE_CALL15},
- {BFD_RELOC_GPREL32, R_SCORE_GPREL32},
- {BFD_RELOC_32_PCREL, R_SCORE_REL32},
- {BFD_RELOC_SCORE_DUMMY_HI16, R_SCORE_DUMMY_HI16},
-};
-
-/* got_entries only match if they're identical, except for gotidx, so
- use all fields to compute the hash, and compare the appropriate
- union members. */
-
-static hashval_t
-score_elf_got_entry_hash (const void *entry_)
-{
- const struct score_got_entry *entry = (struct score_got_entry *)entry_;
-
- return entry->symndx
- + (!entry->abfd ? entry->d.address : entry->abfd->id);
-}
-
-static int
-score_elf_got_entry_eq (const void *entry1, const void *entry2)
-{
- const struct score_got_entry *e1 = (struct score_got_entry *)entry1;
- const struct score_got_entry *e2 = (struct score_got_entry *)entry2;
-
- return e1->abfd == e2->abfd && e1->symndx == e2->symndx
- && (! e1->abfd ? e1->d.address == e2->d.address
- : e1->symndx >= 0 ? e1->d.addend == e2->d.addend
- : e1->d.h == e2->d.h);
-}
-
-/* If H needs a GOT entry, assign it the highest available dynamic
- index. Otherwise, assign it the lowest available dynamic
- index. */
-
-static bfd_boolean
-score_elf_sort_hash_table_f (struct score_elf_link_hash_entry *h, void *data)
-{
- struct score_elf_hash_sort_data *hsd = data;
-
- if (h->root.root.type == bfd_link_hash_warning)
- h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link;
-
- /* Symbols without dynamic symbol table entries aren't interesting at all. */
- if (h->root.dynindx == -1)
- return TRUE;
-
- /* Global symbols that need GOT entries that are not explicitly
- referenced are marked with got offset 2. Those that are
- referenced get a 1, and those that don't need GOT entries get
- -1. */
- if (h->root.got.offset == 2)
- {
- if (hsd->max_unref_got_dynindx == hsd->min_got_dynindx)
- hsd->low = (struct elf_link_hash_entry *) h;
- h->root.dynindx = hsd->max_unref_got_dynindx++;
- }
- else if (h->root.got.offset != 1)
- h->root.dynindx = hsd->max_non_got_dynindx++;
- else
- {
- h->root.dynindx = --hsd->min_got_dynindx;
- hsd->low = (struct elf_link_hash_entry *) h;
- }
-
- return TRUE;
-}
-
-static asection *
-score_elf_got_section (bfd *abfd, bfd_boolean maybe_excluded)
-{
- asection *sgot = bfd_get_section_by_name (abfd, ".got");
-
- if (sgot == NULL || (! maybe_excluded && (sgot->flags & SEC_EXCLUDE) != 0))
- return NULL;
- return sgot;
-}
-
-/* Returns the GOT information associated with the link indicated by
- INFO. If SGOTP is non-NULL, it is filled in with the GOT section. */
-
-static struct score_got_info *
-score_elf_got_info (bfd *abfd, asection **sgotp)
-{
- asection *sgot;
- struct score_got_info *g;
-
- sgot = score_elf_got_section (abfd, TRUE);
- BFD_ASSERT (sgot != NULL);
- BFD_ASSERT (elf_section_data (sgot) != NULL);
- g = score_elf_section_data (sgot)->u.got_info;
- BFD_ASSERT (g != NULL);
-
- if (sgotp)
- *sgotp = sgot;
- return g;
-}
-
-/* Sort the dynamic symbol table so that symbols that need GOT entries
- appear towards the end. This reduces the amount of GOT space
- required. MAX_LOCAL is used to set the number of local symbols
- known to be in the dynamic symbol table. During
- _bfd_score_elf_size_dynamic_sections, this value is 1. Afterward, the
- section symbols are added and the count is higher. */
-
-static bfd_boolean
-score_elf_sort_hash_table (struct bfd_link_info *info,
- unsigned long max_local)
-{
- struct score_elf_hash_sort_data hsd;
- struct score_got_info *g;
- bfd *dynobj;
-
- dynobj = elf_hash_table (info)->dynobj;
-
- g = score_elf_got_info (dynobj, NULL);
-
- hsd.low = NULL;
- hsd.max_unref_got_dynindx =
- hsd.min_got_dynindx = elf_hash_table (info)->dynsymcount
- /* In the multi-got case, assigned_gotno of the master got_info
- indicate the number of entries that aren't referenced in the
- primary GOT, but that must have entries because there are
- dynamic relocations that reference it. Since they aren't
- referenced, we move them to the end of the GOT, so that they
- don't prevent other entries that are referenced from getting
- too large offsets. */
- - (g->next ? g->assigned_gotno : 0);
- hsd.max_non_got_dynindx = max_local;
- score_elf_link_hash_traverse (((struct score_elf_link_hash_table *)
- elf_hash_table (info)),
- score_elf_sort_hash_table_f,
- &hsd);
-
- /* There should have been enough room in the symbol table to
- accommodate both the GOT and non-GOT symbols. */
- BFD_ASSERT (hsd.max_non_got_dynindx <= hsd.min_got_dynindx);
- BFD_ASSERT ((unsigned long)hsd.max_unref_got_dynindx
- <= elf_hash_table (info)->dynsymcount);
-
- /* Now we know which dynamic symbol has the lowest dynamic symbol
- table index in the GOT. */
- g->global_gotsym = hsd.low;
-
- return TRUE;
-}
-
-/* Create an entry in an score ELF linker hash table. */
-
-static struct bfd_hash_entry *
-score_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
- struct bfd_hash_table *table,
- const char *string)
-{
- struct score_elf_link_hash_entry *ret = (struct score_elf_link_hash_entry *)entry;
-
- /* Allocate the structure if it has not already been allocated by a subclass. */
- if (ret == NULL)
- ret = bfd_hash_allocate (table, sizeof (struct score_elf_link_hash_entry));
- if (ret == NULL)
- return (struct bfd_hash_entry *)ret;
-
- /* Call the allocation method of the superclass. */
- ret = ((struct score_elf_link_hash_entry *)
- _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *)ret, table, string));
-
- if (ret != NULL)
- {
- ret->possibly_dynamic_relocs = 0;
- ret->readonly_reloc = FALSE;
- ret->no_fn_stub = FALSE;
- ret->forced_local = FALSE;
- }
-
- return (struct bfd_hash_entry *)ret;
-}
-
-/* Returns the first relocation of type r_type found, beginning with
- RELOCATION. RELEND is one-past-the-end of the relocation table. */
-
-static const Elf_Internal_Rela *
-score_elf_next_relocation (bfd *abfd ATTRIBUTE_UNUSED, unsigned int r_type,
- const Elf_Internal_Rela *relocation,
- const Elf_Internal_Rela *relend)
-{
- while (relocation < relend)
- {
- if (ELF32_R_TYPE (relocation->r_info) == r_type)
- return relocation;
-
- ++relocation;
- }
-
- /* We didn't find it. */
- bfd_set_error (bfd_error_bad_value);
- return NULL;
-}
-
-/* This function is called via qsort() to sort the dynamic relocation
- entries by increasing r_symndx value. */
-
-static int
-score_elf_sort_dynamic_relocs (const void *arg1, const void *arg2)
-{
- Elf_Internal_Rela int_reloc1;
- Elf_Internal_Rela int_reloc2;
-
- bfd_elf32_swap_reloc_in (reldyn_sorting_bfd, arg1, &int_reloc1);
- bfd_elf32_swap_reloc_in (reldyn_sorting_bfd, arg2, &int_reloc2);
-
- return (ELF32_R_SYM (int_reloc1.r_info) - ELF32_R_SYM (int_reloc2.r_info));
-}
-
-/* Return whether a relocation is against a local symbol. */
-
-static bfd_boolean
-score_elf_local_relocation_p (bfd *input_bfd,
- const Elf_Internal_Rela *relocation,
- asection **local_sections,
- bfd_boolean check_forced)
-{
- unsigned long r_symndx;
- Elf_Internal_Shdr *symtab_hdr;
- struct score_elf_link_hash_entry *h;
- size_t extsymoff;
-
- r_symndx = ELF32_R_SYM (relocation->r_info);
- symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
- extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info;
-
- if (r_symndx < extsymoff)
- return TRUE;
- if (elf_bad_symtab (input_bfd) && local_sections[r_symndx] != NULL)
- return TRUE;
-
- if (check_forced)
- {
- /* Look up the hash table to check whether the symbol was forced local. */
- h = (struct score_elf_link_hash_entry *)
- elf_sym_hashes (input_bfd) [r_symndx - extsymoff];
- /* Find the real hash-table entry for this symbol. */
- while (h->root.root.type == bfd_link_hash_indirect
- || h->root.root.type == bfd_link_hash_warning)
- h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link;
- if (h->root.forced_local)
- return TRUE;
- }
-
- return FALSE;
-}
-
-/* Returns the dynamic relocation section for DYNOBJ. */
-
-static asection *
-score_elf_rel_dyn_section (bfd *dynobj, bfd_boolean create_p)
-{
- static const char dname[] = ".rel.dyn";
- asection *sreloc;
-
- sreloc = bfd_get_section_by_name (dynobj, dname);
- if (sreloc == NULL && create_p)
- {
- sreloc = bfd_make_section_with_flags (dynobj, dname,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY));
- if (sreloc == NULL
- || ! bfd_set_section_alignment (dynobj, sreloc,
- SCORE_ELF_LOG_FILE_ALIGN (dynobj)))
- return NULL;
- }
- return sreloc;
-}
-
-static void
-score_elf_allocate_dynamic_relocations (bfd *abfd, unsigned int n)
-{
- asection *s;
-
- s = score_elf_rel_dyn_section (abfd, FALSE);
- BFD_ASSERT (s != NULL);
-
- if (s->size == 0)
- {
- /* Make room for a null element. */
- s->size += SCORE_ELF_REL_SIZE (abfd);
- ++s->reloc_count;
- }
- s->size += n * SCORE_ELF_REL_SIZE (abfd);
-}
-
-/* Create a rel.dyn relocation for the dynamic linker to resolve. REL
- is the original relocation, which is now being transformed into a
- dynamic relocation. The ADDENDP is adjusted if necessary; the
- caller should store the result in place of the original addend. */
-
-static bfd_boolean
-score_elf_create_dynamic_relocation (bfd *output_bfd,
- struct bfd_link_info *info,
- const Elf_Internal_Rela *rel,
- struct score_elf_link_hash_entry *h,
- bfd_vma symbol,
- bfd_vma *addendp, asection *input_section)
-{
- Elf_Internal_Rela outrel[3];
- asection *sreloc;
- bfd *dynobj;
- int r_type;
- long indx;
- bfd_boolean defined_p;
-
- r_type = ELF32_R_TYPE (rel->r_info);
- dynobj = elf_hash_table (info)->dynobj;
- sreloc = score_elf_rel_dyn_section (dynobj, FALSE);
- BFD_ASSERT (sreloc != NULL);
- BFD_ASSERT (sreloc->contents != NULL);
- BFD_ASSERT (sreloc->reloc_count * SCORE_ELF_REL_SIZE (output_bfd) < sreloc->size);
-
- outrel[0].r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section, rel[0].r_offset);
- outrel[1].r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section, rel[1].r_offset);
- outrel[2].r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section, rel[2].r_offset);
-
- if (outrel[0].r_offset == MINUS_ONE)
- /* The relocation field has been deleted. */
- return TRUE;
-
- if (outrel[0].r_offset == MINUS_TWO)
- {
- /* The relocation field has been converted into a relative value of
- some sort. Functions like _bfd_elf_write_section_eh_frame expect
- the field to be fully relocated, so add in the symbol's value. */
- *addendp += symbol;
- return TRUE;
- }
-
- /* We must now calculate the dynamic symbol table index to use
- in the relocation. */
- if (h != NULL
- && (! info->symbolic || !h->root.def_regular)
- /* h->root.dynindx may be -1 if this symbol was marked to
- become local. */
- && h->root.dynindx != -1)
- {
- indx = h->root.dynindx;
- /* ??? glibc's ld.so just adds the final GOT entry to the
- relocation field. It therefore treats relocs against
- defined symbols in the same way as relocs against
- undefined symbols. */
- defined_p = FALSE;
- }
- else
- {
- indx = 0;
- defined_p = TRUE;
- }
-
- /* If the relocation was previously an absolute relocation and
- this symbol will not be referred to by the relocation, we must
- adjust it by the value we give it in the dynamic symbol table.
- Otherwise leave the job up to the dynamic linker. */
- if (defined_p && r_type != R_SCORE_REL32)
- *addendp += symbol;
-
- /* The relocation is always an REL32 relocation because we don't
- know where the shared library will wind up at load-time. */
- outrel[0].r_info = ELF32_R_INFO ((unsigned long) indx, R_SCORE_REL32);
-
- /* For strict adherence to the ABI specification, we should
- generate a R_SCORE_64 relocation record by itself before the
- _REL32/_64 record as well, such that the addend is read in as
- a 64-bit value (REL32 is a 32-bit relocation, after all).
- However, since none of the existing ELF64 SCORE dynamic
- loaders seems to care, we don't waste space with these
- artificial relocations. If this turns out to not be true,
- score_elf_allocate_dynamic_relocations() should be tweaked so
- as to make room for a pair of dynamic relocations per
- invocation if ABI_64_P, and here we should generate an
- additional relocation record with R_SCORE_64 by itself for a
- NULL symbol before this relocation record. */
- outrel[1].r_info = ELF32_R_INFO (0, R_SCORE_NONE);
- outrel[2].r_info = ELF32_R_INFO (0, R_SCORE_NONE);
-
- /* Adjust the output offset of the relocation to reference the
- correct location in the output file. */
- outrel[0].r_offset += (input_section->output_section->vma
- + input_section->output_offset);
- outrel[1].r_offset += (input_section->output_section->vma
- + input_section->output_offset);
- outrel[2].r_offset += (input_section->output_section->vma
- + input_section->output_offset);
-
- /* Put the relocation back out. We have to use the special
- relocation outputter in the 64-bit case since the 64-bit
- relocation format is non-standard. */
- bfd_elf32_swap_reloc_out
- (output_bfd, &outrel[0],
- (sreloc->contents + sreloc->reloc_count * sizeof (Elf32_External_Rel)));
-
- /* We've now added another relocation. */
- ++sreloc->reloc_count;
-
- /* Make sure the output section is writable. The dynamic linker
- will be writing to it. */
- elf_section_data (input_section->output_section)->this_hdr.sh_flags |= SHF_WRITE;
-
- return TRUE;
-}
-
-static bfd_boolean
-score_elf_create_got_section (bfd *abfd,
- struct bfd_link_info *info,
- bfd_boolean maybe_exclude)
-{
- flagword flags;
- asection *s;
- struct elf_link_hash_entry *h;
- struct bfd_link_hash_entry *bh;
- struct score_got_info *g;
- bfd_size_type amt;
-
- /* This function may be called more than once. */
- s = score_elf_got_section (abfd, TRUE);
- if (s)
- {
- if (! maybe_exclude)
- s->flags &= ~SEC_EXCLUDE;
- return TRUE;
- }
-
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
-
- if (maybe_exclude)
- flags |= SEC_EXCLUDE;
-
- /* We have to use an alignment of 2**4 here because this is hardcoded
- in the function stub generation and in the linker script. */
- s = bfd_make_section_with_flags (abfd, ".got", flags);
- if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, 4))
- return FALSE;
-
- /* Define the symbol _GLOBAL_OFFSET_TABLE_. We don't do this in the
- linker script because we don't want to define the symbol if we
- are not creating a global offset table. */
- bh = NULL;
- if (! (_bfd_generic_link_add_one_symbol
- (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
- 0, NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh)))
- return FALSE;
-
- h = (struct elf_link_hash_entry *) bh;
- h->non_elf = 0;
- h->def_regular = 1;
- h->type = STT_OBJECT;
-
- if (info->shared && ! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
-
- amt = sizeof (struct score_got_info);
- g = bfd_alloc (abfd, amt);
- if (g == NULL)
- return FALSE;
-
- g->global_gotsym = NULL;
- g->global_gotno = 0;
-
- g->local_gotno = SCORE_RESERVED_GOTNO;
- g->assigned_gotno = SCORE_RESERVED_GOTNO;
- g->next = NULL;
-
- g->got_entries = htab_try_create (1, score_elf_got_entry_hash,
- score_elf_got_entry_eq, NULL);
- if (g->got_entries == NULL)
- return FALSE;
- score_elf_section_data (s)->u.got_info = g;
- score_elf_section_data (s)->elf.this_hdr.sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_SCORE_GPREL;
-
- return TRUE;
-}
-
-/* Calculate the %high function. */
-
-static bfd_vma
-score_elf_high (bfd_vma value)
-{
- return ((value + (bfd_vma) 0x8000) >> 16) & 0xffff;
-}
-
-/* Create a local GOT entry for VALUE. Return the index of the entry,
- or -1 if it could not be created. */
-
-static struct score_got_entry *
-score_elf_create_local_got_entry (bfd *abfd,
- bfd *ibfd ATTRIBUTE_UNUSED,
- struct score_got_info *gg,
- asection *sgot, bfd_vma value,
- unsigned long r_symndx ATTRIBUTE_UNUSED,
- struct score_elf_link_hash_entry *h ATTRIBUTE_UNUSED,
- int r_type ATTRIBUTE_UNUSED)
-{
- struct score_got_entry entry, **loc;
- struct score_got_info *g;
-
- entry.abfd = NULL;
- entry.symndx = -1;
- entry.d.address = value;
-
- g = gg;
- loc = (struct score_got_entry **) htab_find_slot (g->got_entries, &entry, INSERT);
- if (*loc)
- return *loc;
-
- entry.gotidx = SCORE_ELF_GOT_SIZE (abfd) * g->assigned_gotno++;
-
- *loc = bfd_alloc (abfd, sizeof entry);
-
- if (! *loc)
- return NULL;
-
- memcpy (*loc, &entry, sizeof entry);
-
- if (g->assigned_gotno >= g->local_gotno)
- {
- (*loc)->gotidx = -1;
- /* We didn't allocate enough space in the GOT. */
- (*_bfd_error_handler)
- (_("not enough GOT space for local GOT entries"));
- bfd_set_error (bfd_error_bad_value);
- return NULL;
- }
-
- bfd_put_32 (abfd, value, (sgot->contents + entry.gotidx));
-
- return *loc;
-}
-
-/* Find a GOT entry whose higher-order 16 bits are the same as those
- for value. Return the index into the GOT for this entry. */
-
-static bfd_vma
-score_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
- bfd_vma value, bfd_boolean external)
-{
- asection *sgot;
- struct score_got_info *g;
- struct score_got_entry *entry;
-
- if (!external)
- {
- /* Although the ABI says that it is "the high-order 16 bits" that we
- want, it is really the %high value. The complete value is
- calculated with a `addiu' of a LO16 relocation, just as with a
- HI16/LO16 pair. */
- value = score_elf_high (value) << 16;
- }
-
- g = score_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
-
- entry = score_elf_create_local_got_entry (abfd, ibfd, g, sgot, value, 0, NULL,
- R_SCORE_GOT15);
- if (entry)
- return entry->gotidx;
- else
- return MINUS_ONE;
-}
-
-static void
-_bfd_score_elf_hide_symbol (struct bfd_link_info *info,
- struct elf_link_hash_entry *entry,
- bfd_boolean force_local)
-{
- bfd *dynobj;
- asection *got;
- struct score_got_info *g;
- struct score_elf_link_hash_entry *h;
-
- h = (struct score_elf_link_hash_entry *) entry;
- if (h->forced_local)
- return;
- h->forced_local = TRUE;
-
- dynobj = elf_hash_table (info)->dynobj;
- if (dynobj != NULL && force_local)
- {
- got = score_elf_got_section (dynobj, FALSE);
- if (got == NULL)
- return;
- g = score_elf_section_data (got)->u.got_info;
-
- if (g->next)
- {
- struct score_got_entry e;
- struct score_got_info *gg = g;
-
- /* Since we're turning what used to be a global symbol into a
- local one, bump up the number of local entries of each GOT
- that had an entry for it. This will automatically decrease
- the number of global entries, since global_gotno is actually
- the upper limit of global entries. */
- e.abfd = dynobj;
- e.symndx = -1;
- e.d.h = h;
-
- for (g = g->next; g != gg; g = g->next)
- if (htab_find (g->got_entries, &e))
- {
- BFD_ASSERT (g->global_gotno > 0);
- g->local_gotno++;
- g->global_gotno--;
- }
-
- /* If this was a global symbol forced into the primary GOT, we
- no longer need an entry for it. We can't release the entry
- at this point, but we must at least stop counting it as one
- of the symbols that required a forced got entry. */
- if (h->root.got.offset == 2)
- {
- BFD_ASSERT (gg->assigned_gotno > 0);
- gg->assigned_gotno--;
- }
- }
- else if (g->global_gotno == 0 && g->global_gotsym == NULL)
- /* If we haven't got through GOT allocation yet, just bump up the
- number of local entries, as this symbol won't be counted as
- global. */
- g->local_gotno++;
- else if (h->root.got.offset == 1)
- {
- /* If we're past non-multi-GOT allocation and this symbol had
- been marked for a global got entry, give it a local entry
- instead. */
- BFD_ASSERT (g->global_gotno > 0);
- g->local_gotno++;
- g->global_gotno--;
- }
- }
-
- _bfd_elf_link_hash_hide_symbol (info, &h->root, force_local);
-}
-
-/* If H is a symbol that needs a global GOT entry, but has a dynamic
- symbol table index lower than any we've seen to date, record it for
- posterity. */
-
-static bfd_boolean
-score_elf_record_global_got_symbol (struct elf_link_hash_entry *h,
- bfd *abfd,
- struct bfd_link_info *info,
- struct score_got_info *g)
-{
- struct score_got_entry entry, **loc;
-
- /* A global symbol in the GOT must also be in the dynamic symbol table. */
- if (h->dynindx == -1)
- {
- switch (ELF_ST_VISIBILITY (h->other))
- {
- case STV_INTERNAL:
- case STV_HIDDEN:
- _bfd_score_elf_hide_symbol (info, h, TRUE);
- break;
- }
- if (!bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- entry.abfd = abfd;
- entry.symndx = -1;
- entry.d.h = (struct score_elf_link_hash_entry *)h;
-
- loc = (struct score_got_entry **)htab_find_slot (g->got_entries, &entry, INSERT);
-
- /* If we've already marked this entry as needing GOT space, we don't
- need to do it again. */
- if (*loc)
- return TRUE;
-
- *loc = bfd_alloc (abfd, sizeof entry);
- if (! *loc)
- return FALSE;
-
- entry.gotidx = -1;
-
- memcpy (*loc, &entry, sizeof (entry));
-
- if (h->got.offset != MINUS_ONE)
- return TRUE;
-
- /* By setting this to a value other than -1, we are indicating that
- there needs to be a GOT entry for H. Avoid using zero, as the
- generic ELF copy_indirect_symbol tests for <= 0. */
- h->got.offset = 1;
-
- return TRUE;
-}
-
-/* Reserve space in G for a GOT entry containing the value of symbol
- SYMNDX in input bfd ABDF, plus ADDEND. */
-
-static bfd_boolean
-score_elf_record_local_got_symbol (bfd *abfd,
- long symndx,
- bfd_vma addend,
- struct score_got_info *g)
-{
- struct score_got_entry entry, **loc;
-
- entry.abfd = abfd;
- entry.symndx = symndx;
- entry.d.addend = addend;
- loc = (struct score_got_entry **)htab_find_slot (g->got_entries, &entry, INSERT);
-
- if (*loc)
- return TRUE;
-
- entry.gotidx = g->local_gotno++;
-
- *loc = bfd_alloc (abfd, sizeof(entry));
- if (! *loc)
- return FALSE;
-
- memcpy (*loc, &entry, sizeof (entry));
-
- return TRUE;
-}
-
-/* Returns the GOT offset at which the indicated address can be found.
- If there is not yet a GOT entry for this value, create one.
- Returns -1 if no satisfactory GOT offset can be found. */
-
-static bfd_vma
-score_elf_local_got_index (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
- bfd_vma value, unsigned long r_symndx,
- struct score_elf_link_hash_entry *h, int r_type)
-{
- asection *sgot;
- struct score_got_info *g;
- struct score_got_entry *entry;
-
- g = score_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
-
- entry = score_elf_create_local_got_entry (abfd, ibfd, g, sgot, value,
- r_symndx, h, r_type);
- if (!entry)
- return MINUS_ONE;
-
- else
- return entry->gotidx;
-}
-
-/* Returns the GOT index for the global symbol indicated by H. */
-
-static bfd_vma
-score_elf_global_got_index (bfd *abfd, struct elf_link_hash_entry *h)
-{
- bfd_vma index;
- asection *sgot;
- struct score_got_info *g;
- long global_got_dynindx = 0;
-
- g = score_elf_got_info (abfd, &sgot);
- if (g->global_gotsym != NULL)
- global_got_dynindx = g->global_gotsym->dynindx;
-
- /* Once we determine the global GOT entry with the lowest dynamic
- symbol table index, we must put all dynamic symbols with greater
- indices into the GOT. That makes it easy to calculate the GOT
- offset. */
- BFD_ASSERT (h->dynindx >= global_got_dynindx);
- index = ((h->dynindx - global_got_dynindx + g->local_gotno) * SCORE_ELF_GOT_SIZE (abfd));
- BFD_ASSERT (index < sgot->size);
-
- return index;
-}
-
-/* Returns the offset for the entry at the INDEXth position in the GOT. */
-
-static bfd_vma
-score_elf_got_offset_from_index (bfd *dynobj, bfd *output_bfd,
- bfd *input_bfd ATTRIBUTE_UNUSED, bfd_vma index)
-{
- asection *sgot;
- bfd_vma gp;
- struct score_got_info *g;
-
- g = score_elf_got_info (dynobj, &sgot);
- gp = _bfd_get_gp_value (output_bfd);
-
- return sgot->output_section->vma + sgot->output_offset + index - gp;
-}
-
-/* Follow indirect and warning hash entries so that each got entry
- points to the final symbol definition. P must point to a pointer
- to the hash table we're traversing. Since this traversal may
- modify the hash table, we set this pointer to NULL to indicate
- we've made a potentially-destructive change to the hash table, so
- the traversal must be restarted. */
-static int
-score_elf_resolve_final_got_entry (void **entryp, void *p)
-{
- struct score_got_entry *entry = (struct score_got_entry *)*entryp;
- htab_t got_entries = *(htab_t *)p;
-
- if (entry->abfd != NULL && entry->symndx == -1)
- {
- struct score_elf_link_hash_entry *h = entry->d.h;
-
- while (h->root.root.type == bfd_link_hash_indirect
- || h->root.root.type == bfd_link_hash_warning)
- h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link;
-
- if (entry->d.h == h)
- return 1;
-
- entry->d.h = h;
-
- /* If we can't find this entry with the new bfd hash, re-insert
- it, and get the traversal restarted. */
- if (! htab_find (got_entries, entry))
- {
- htab_clear_slot (got_entries, entryp);
- entryp = htab_find_slot (got_entries, entry, INSERT);
- if (! *entryp)
- *entryp = entry;
- /* Abort the traversal, since the whole table may have
- moved, and leave it up to the parent to restart the
- process. */
- *(htab_t *)p = NULL;
- return 0;
- }
- /* We might want to decrement the global_gotno count, but it's
- either too early or too late for that at this point. */
- }
-
- return 1;
-}
-
-/* Turn indirect got entries in a got_entries table into their final locations. */
-static void
-score_elf_resolve_final_got_entries (struct score_got_info *g)
-{
- htab_t got_entries;
-
- do
- {
- got_entries = g->got_entries;
-
- htab_traverse (got_entries,
- score_elf_resolve_final_got_entry,
- &got_entries);
- }
- while (got_entries == NULL);
-}
-
-/* Add INCREMENT to the reloc (of type HOWTO) at ADDRESS. for -r */
-
-static void
-score_elf_add_to_rel (bfd *abfd,
- bfd_byte *address,
- reloc_howto_type *howto,
- bfd_signed_vma increment)
-{
- bfd_signed_vma addend;
- bfd_vma contents;
- unsigned long offset;
- unsigned long r_type = howto->type;
- unsigned long hi16_addend, hi16_offset, hi16_value, uvalue;
-
- contents = bfd_get_32 (abfd, address);
- /* Get the (signed) value from the instruction. */
- addend = contents & howto->src_mask;
- if (addend & ((howto->src_mask + 1) >> 1))
- {
- bfd_signed_vma mask;
-
- mask = -1;
- mask &= ~howto->src_mask;
- addend |= mask;
- }
- /* Add in the increment, (which is a byte value). */
- switch (r_type)
- {
- case R_SCORE_PC19:
- offset =
- (((contents & howto->src_mask) & 0x3ff0000) >> 6) | ((contents & howto->src_mask) & 0x3ff);
- offset += increment;
- contents =
- (contents & ~howto->
- src_mask) | (((offset << 6) & howto->src_mask) & 0x3ff0000) | (offset & 0x3ff);
- bfd_put_32 (abfd, contents, address);
- break;
- case R_SCORE_HI16:
- break;
- case R_SCORE_LO16:
- hi16_addend = bfd_get_32 (abfd, address - 4);
- hi16_offset = ((((hi16_addend >> 16) & 0x3) << 15) | (hi16_addend & 0x7fff)) >> 1;
- offset = ((((contents >> 16) & 0x3) << 15) | (contents & 0x7fff)) >> 1;
- offset = (hi16_offset << 16) | (offset & 0xffff);
- uvalue = increment + offset;
- hi16_offset = (uvalue >> 16) << 1;
- hi16_value = (hi16_addend & (~(howto->dst_mask)))
- | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000);
- bfd_put_32 (abfd, hi16_value, address - 4);
- offset = (uvalue & 0xffff) << 1;
- contents = (contents & (~(howto->dst_mask))) | (offset & 0x7fff) | ((offset << 1) & 0x30000);
- bfd_put_32 (abfd, contents, address);
- break;
- case R_SCORE_24:
- offset =
- (((contents & howto->src_mask) >> 1) & 0x1ff8000) | ((contents & howto->src_mask) & 0x7fff);
- offset += increment;
- contents =
- (contents & ~howto->
- src_mask) | (((offset << 1) & howto->src_mask) & 0x3ff0000) | (offset & 0x7fff);
- bfd_put_32 (abfd, contents, address);
- break;
- case R_SCORE16_11:
-
- contents = bfd_get_16 (abfd, address);
- offset = contents & howto->src_mask;
- offset += increment;
- contents = (contents & ~howto->src_mask) | (offset & howto->src_mask);
- bfd_put_16 (abfd, contents, address);
-
- break;
- case R_SCORE16_PC8:
-
- contents = bfd_get_16 (abfd, address);
- offset = (contents & howto->src_mask) + ((increment >> 1) & 0xff);
- contents = (contents & (~howto->src_mask)) | (offset & howto->src_mask);
- bfd_put_16 (abfd, contents, address);
-
- break;
- default:
- addend += increment;
- contents = (contents & ~howto->dst_mask) | (addend & howto->dst_mask);
- bfd_put_32 (abfd, contents, address);
- break;
- }
-}
-
-/* Perform a relocation as part of a final link. */
-
-static bfd_reloc_status_type
-score_elf_final_link_relocate (reloc_howto_type *howto,
- bfd *input_bfd,
- bfd *output_bfd,
- asection *input_section,
- bfd_byte *contents,
- Elf_Internal_Rela *rel,
- Elf_Internal_Rela *relocs,
- bfd_vma symbol,
- struct bfd_link_info *info,
- const char *sym_name ATTRIBUTE_UNUSED,
- int sym_flags ATTRIBUTE_UNUSED,
- struct score_elf_link_hash_entry *h,
- asection **local_sections,
- bfd_boolean gp_disp_p)
-{
- unsigned long r_type;
- unsigned long r_symndx;
- bfd_byte *hit_data = contents + rel->r_offset;
- bfd_vma addend;
- /* The final GP value to be used for the relocatable, executable, or
- shared object file being produced. */
- bfd_vma gp = MINUS_ONE;
- /* The place (section offset or address) of the storage unit being relocated. */
- bfd_vma rel_addr;
- /* The value of GP used to create the relocatable object. */
- bfd_vma gp0 = MINUS_ONE;
- /* The offset into the global offset table at which the address of the relocation entry
- symbol, adjusted by the addend, resides during execution. */
- bfd_vma g = MINUS_ONE;
- /* TRUE if the symbol referred to by this relocation is a local symbol. */
- bfd_boolean local_p;
- /* The eventual value we will relocate. */
- bfd_vma value = symbol;
- unsigned long hi16_addend, hi16_offset, hi16_value, uvalue, offset, abs_value = 0;
-
- if (elf_gp (output_bfd) == 0)
- {
- struct bfd_link_hash_entry *bh;
- asection *o;
-
- bh = bfd_link_hash_lookup (info->hash, "_gp", 0, 0, 1);
- if (bh != (struct bfd_link_hash_entry *)NULL && bh->type == bfd_link_hash_defined)
- elf_gp (output_bfd) = (bh->u.def.value
- + bh->u.def.section->output_section->vma
- + bh->u.def.section->output_offset);
- else if (info->relocatable)
- {
- bfd_vma lo = -1;
-
- /* Find the GP-relative section with the lowest offset. */
- for (o = output_bfd->sections; o != (asection *) NULL; o = o->next)
- if (o->vma < lo)
- lo = o->vma;
- /* And calculate GP relative to that. */
- elf_gp (output_bfd) = lo + ELF_SCORE_GP_OFFSET (input_bfd);
- }
- else
- {
- /* If the relocate_section function needs to do a reloc
- involving the GP value, it should make a reloc_dangerous
- callback to warn that GP is not defined. */
- }
- }
-
- /* Parse the relocation. */
- r_symndx = ELF32_R_SYM (rel->r_info);
- r_type = ELF32_R_TYPE (rel->r_info);
- rel_addr = (input_section->output_section->vma + input_section->output_offset + rel->r_offset);
-
- if (r_type == R_SCORE_GOT15)
- {
- const Elf_Internal_Rela *relend;
- const Elf_Internal_Rela *lo16_rel;
- const struct elf_backend_data *bed;
- bfd_vma lo_value = 0;
-
- addend = (bfd_get_32 (input_bfd, hit_data) >> howto->bitpos) & howto->src_mask;
-
- bed = get_elf_backend_data (output_bfd);
- relend = relocs + input_section->reloc_count * bed->s->int_rels_per_ext_rel;
- lo16_rel = score_elf_next_relocation (input_bfd, R_SCORE_GOT_LO16, rel, relend);
- if (lo16_rel != NULL)
- {
- lo_value = (bfd_get_32 (input_bfd, contents + lo16_rel->r_offset) >> howto->bitpos)
- & howto->src_mask;
- }
- addend = (addend << 16) + lo_value;
- }
- else
- {
- addend = (bfd_get_32 (input_bfd, hit_data) >> howto->bitpos) & howto->src_mask;
- }
-
- local_p = score_elf_local_relocation_p (input_bfd, rel, local_sections, TRUE);
-
- /* If we haven't already determined the GOT offset, or the GP value,
- and we're going to need it, get it now. */
- switch (r_type)
- {
- case R_SCORE_CALL15:
- case R_SCORE_GOT15:
- if (!local_p)
- {
- g = score_elf_global_got_index (elf_hash_table (info)->dynobj,
- (struct elf_link_hash_entry *) h);
- }
- else if (r_type == R_SCORE_GOT15 || r_type == R_SCORE_CALL15)
- {
- /* There's no need to create a local GOT entry here; the
- calculation for a local GOT15 entry does not involve G. */
- ;
- }
- else
- {
- g = score_elf_local_got_index (output_bfd, input_bfd, info,
- symbol + addend, r_symndx, h, r_type);
- if (g == MINUS_ONE)
- return bfd_reloc_outofrange;
- }
-
- /* Convert GOT indices to actual offsets. */
- g = score_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
- output_bfd, input_bfd, g);
- break;
-
- case R_SCORE_HI16:
- case R_SCORE_LO16:
- case R_SCORE_GPREL32:
- gp0 = _bfd_get_gp_value (input_bfd);
- gp = _bfd_get_gp_value (output_bfd);
- break;
-
- case R_SCORE_GP15:
- gp = _bfd_get_gp_value (output_bfd);
-
- default:
- break;
- }
-
- switch (r_type)
- {
- case R_SCORE_NONE:
- return bfd_reloc_ok;
-
- case R_SCORE_ABS32:
- case R_SCORE_REL32:
- if ((info->shared
- || (elf_hash_table (info)->dynamic_sections_created
- && h != NULL
- && h->root.def_dynamic
- && !h->root.def_regular))
- && r_symndx != 0
- && (input_section->flags & SEC_ALLOC) != 0)
- {
- /* If we're creating a shared library, or this relocation is against a symbol
- in a shared library, then we can't know where the symbol will end up.
- So, we create a relocation record in the output, and leave the job up
- to the dynamic linker. */
- value = addend;
- if (!score_elf_create_dynamic_relocation (output_bfd, info, rel, h,
- symbol, &value,
- input_section))
- return bfd_reloc_undefined;
- }
- else
- {
- if (r_type != R_SCORE_REL32)
- value = symbol + addend;
- else
- value = addend;
- }
- value &= howto->dst_mask;
- bfd_put_32 (input_bfd, value, hit_data);
- return bfd_reloc_ok;
-
- case R_SCORE_ABS16:
- value += addend;
- if ((long)value > 0x7fff || (long)value < -0x8000)
- return bfd_reloc_overflow;
- bfd_put_16 (input_bfd, value, hit_data);
- return bfd_reloc_ok;
-
- case R_SCORE_24:
- addend = bfd_get_32 (input_bfd, hit_data);
- offset = (((addend & howto->src_mask) >> 1) & 0x1ff8000) | ((addend & howto->src_mask) & 0x7fff);
- if ((offset & 0x1000000) != 0)
- offset |= 0xfe000000;
- value += offset;
- addend = (addend & ~howto->src_mask)
- | (((value << 1) & howto->src_mask) & 0x3ff0000) | (value & 0x7fff);
- bfd_put_32 (input_bfd, addend, hit_data);
- return bfd_reloc_ok;
-
- case R_SCORE_PC19:
- addend = bfd_get_32 (input_bfd, hit_data);
- offset = (((addend & howto->src_mask) & 0x3ff0000) >> 6) | ((addend & howto->src_mask) & 0x3ff);
- if ((offset & 0x80000) != 0)
- offset |= 0xfff00000;
- abs_value = value = value - rel_addr + offset;
- /* exceed 20 bit : overflow. */
- if ((abs_value & 0x80000000) == 0x80000000)
- abs_value = 0xffffffff - value + 1;
- if ((abs_value & 0xfff80000) != 0)
- return bfd_reloc_overflow;
- addend = (addend & ~howto->src_mask)
- | (((value << 6) & howto->src_mask) & 0x3ff0000) | (value & 0x3ff);
- bfd_put_32 (input_bfd, addend, hit_data);
- return bfd_reloc_ok;
-
- case R_SCORE16_11:
- addend = bfd_get_16 (input_bfd, hit_data);
- offset = addend & howto->src_mask;
- if ((offset & 0x800) != 0) /* Offset is negative. */
- offset |= 0xfffff000;
- value += offset;
- addend = (addend & ~howto->src_mask) | (value & howto->src_mask);
- bfd_put_16 (input_bfd, addend, hit_data);
- return bfd_reloc_ok;
-
- case R_SCORE16_PC8:
- addend = bfd_get_16 (input_bfd, hit_data);
- offset = (addend & howto->src_mask) << 1;
- if ((offset & 0x100) != 0) /* Offset is negative. */
- offset |= 0xfffffe00;
- abs_value = value = value - rel_addr + offset;
- /* Sign bit + exceed 9 bit. */
- if (((value & 0xffffff00) != 0) && ((value & 0xffffff00) != 0xffffff00))
- return bfd_reloc_overflow;
- value >>= 1;
- addend = (addend & ~howto->src_mask) | (value & howto->src_mask);
- bfd_put_16 (input_bfd, addend, hit_data);
- return bfd_reloc_ok;
-
- case R_SCORE_HI16:
- return bfd_reloc_ok;
-
- case R_SCORE_LO16:
- hi16_addend = bfd_get_32 (input_bfd, hit_data - 4);
- hi16_offset = ((((hi16_addend >> 16) & 0x3) << 15) | (hi16_addend & 0x7fff)) >> 1;
- addend = bfd_get_32 (input_bfd, hit_data);
- offset = ((((addend >> 16) & 0x3) << 15) | (addend & 0x7fff)) >> 1;
- offset = (hi16_offset << 16) | (offset & 0xffff);
-
- if (!gp_disp_p)
- uvalue = value + offset;
- else
- uvalue = offset + gp - rel_addr + 4;
-
- hi16_offset = (uvalue >> 16) << 1;
- hi16_value = (hi16_addend & (~(howto->dst_mask)))
- | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000);
- bfd_put_32 (input_bfd, hi16_value, hit_data - 4);
- offset = (uvalue & 0xffff) << 1;
- value = (addend & (~(howto->dst_mask))) | (offset & 0x7fff) | ((offset << 1) & 0x30000);
- bfd_put_32 (input_bfd, value, hit_data);
- return bfd_reloc_ok;
-
- case R_SCORE_GP15:
- addend = bfd_get_32 (input_bfd, hit_data);
- offset = addend & 0x7fff;
- if ((offset & 0x4000) == 0x4000)
- offset |= 0xffffc000;
- value = value + offset - gp;
- if (((value & 0xffffc000) != 0) && ((value & 0xffffc000) != 0xffffc000))
- return bfd_reloc_overflow;
- value = (addend & ~howto->src_mask) | (value & howto->src_mask);
- bfd_put_32 (input_bfd, value, hit_data);
- return bfd_reloc_ok;
-
- case R_SCORE_GOT15:
- case R_SCORE_CALL15:
- if (local_p)
- {
- bfd_boolean forced;
-
- /* The special case is when the symbol is forced to be local. We need the
- full address in the GOT since no R_SCORE_GOT_LO16 relocation follows. */
- forced = ! score_elf_local_relocation_p (input_bfd, rel,
- local_sections, FALSE);
- value = score_elf_got16_entry (output_bfd, input_bfd, info,
- symbol + addend, forced);
- if (value == MINUS_ONE)
- return bfd_reloc_outofrange;
- value = score_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
- output_bfd, input_bfd, value);
- }
- else
- {
- value = g;
- }
-
- if ((long) value > 0x3fff || (long) value < -0x4000)
- return bfd_reloc_overflow;
- bfd_put_16 (input_bfd, value, hit_data + 2);
- return bfd_reloc_ok;
-
- case R_SCORE_GPREL32:
- value = (addend + symbol - gp);
- value &= howto->dst_mask;
- bfd_put_32 (input_bfd, value, hit_data);
- return bfd_reloc_ok;
-
- case R_SCORE_GOT_LO16:
- addend = bfd_get_32 (input_bfd, hit_data);
- value = ((((addend >> 16) & 0x3) << 15) | (addend & 0x7fff)) >> 1;
- value += symbol;
- offset = (value & 0xffff) << 1;
- value = (addend & (~(howto->dst_mask))) | (offset & 0x7fff) | ((offset << 1) & 0x30000);
-
- bfd_put_32 (input_bfd, value, hit_data);
- return bfd_reloc_ok;
-
- case R_SCORE_DUMMY_HI16:
- return bfd_reloc_ok;
-
- case R_SCORE_GNU_VTINHERIT:
- case R_SCORE_GNU_VTENTRY:
- /* We don't do anything with these at present. */
- return bfd_reloc_continue;
-
- default:
- return bfd_reloc_notsupported;
- }
-}
-
-/* Score backend functions. */
-
-static void
-_bfd_score_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
- arelent *bfd_reloc,
- Elf_Internal_Rela *elf_reloc)
-{
- unsigned int r_type;
-
- r_type = ELF32_R_TYPE (elf_reloc->r_info);
- if (r_type >= NUM_ELEM (elf32_score_howto_table))
- bfd_reloc->howto = NULL;
- else
- bfd_reloc->howto = &elf32_score_howto_table[r_type];
-}
-
-/* Relocate an score ELF section. */
-
-static bfd_boolean
-_bfd_score_elf_relocate_section (bfd *output_bfd,
- struct bfd_link_info *info,
- bfd *input_bfd,
- asection *input_section,
- bfd_byte *contents,
- Elf_Internal_Rela *relocs,
- Elf_Internal_Sym *local_syms,
- asection **local_sections)
-{
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- Elf_Internal_Rela *rel;
- Elf_Internal_Rela *relend;
- const char *name;
- unsigned long offset;
- unsigned long hi16_addend, hi16_offset, hi16_value, uvalue;
- size_t extsymoff;
- bfd_boolean gp_disp_p = FALSE;
-
-#ifndef USE_REL
- if (info->relocatable)
- return TRUE;
-#endif
-
- /* Sort dynsym. */
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- bfd_size_type dynsecsymcount = 0;
- if (info->shared)
- {
- asection * p;
- const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
-
- for (p = output_bfd->sections; p ; p = p->next)
- if ((p->flags & SEC_EXCLUDE) == 0
- && (p->flags & SEC_ALLOC) != 0
- && !(*bed->elf_backend_omit_section_dynsym) (output_bfd, info, p))
- ++ dynsecsymcount;
- }
-
- if (!score_elf_sort_hash_table (info, dynsecsymcount + 1))
- return FALSE;
- }
-
- symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
- extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info;
- sym_hashes = elf_sym_hashes (input_bfd);
- rel = relocs;
- relend = relocs + input_section->reloc_count;
- for (; rel < relend; rel++)
- {
- int r_type;
- reloc_howto_type *howto;
- unsigned long r_symndx;
- Elf_Internal_Sym *sym;
- asection *sec;
- struct score_elf_link_hash_entry *h;
- bfd_vma relocation = 0;
- bfd_reloc_status_type r;
- arelent bfd_reloc;
-
- r_symndx = ELF32_R_SYM (rel->r_info);
- r_type = ELF32_R_TYPE (rel->r_info);
-
- _bfd_score_info_to_howto (input_bfd, &bfd_reloc, (Elf_Internal_Rela *) rel);
- howto = bfd_reloc.howto;
-
- if (info->relocatable)
- {
- /* This is a relocatable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sec = local_sections[r_symndx];
- score_elf_add_to_rel (input_bfd, contents + rel->r_offset,
- howto, (bfd_signed_vma) (sec->output_offset + sym->st_value));
- }
- }
- continue;
- }
-
- /* This is a final link. */
- h = NULL;
- sym = NULL;
- sec = NULL;
-
- if (r_symndx < extsymoff)
- {
- sym = local_syms + r_symndx;
- sec = local_sections[r_symndx];
- relocation = (sec->output_section->vma
- + sec->output_offset
- + sym->st_value);
- name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sec);
-
- if ((sec->flags & SEC_MERGE)
- && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- asection *msec;
- bfd_vma addend, value;
-
- switch (r_type)
- {
- case R_SCORE_HI16:
- break;
- case R_SCORE_LO16:
- hi16_addend = bfd_get_32 (input_bfd, contents + rel->r_offset - 4);
- hi16_offset = ((((hi16_addend >> 16) & 0x3) << 15) | (hi16_addend & 0x7fff)) >> 1;
- value = bfd_get_32 (input_bfd, contents + rel->r_offset);
- offset = ((((value >> 16) & 0x3) << 15) | (value & 0x7fff)) >> 1;
- addend = (hi16_offset << 16) | (offset & 0xffff);
- msec = sec;
- addend = _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend);
- addend -= relocation;
- addend += msec->output_section->vma + msec->output_offset;
- uvalue = addend;
- hi16_offset = (uvalue >> 16) << 1;
- hi16_value = (hi16_addend & (~(howto->dst_mask)))
- | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000);
- bfd_put_32 (input_bfd, hi16_value, contents + rel->r_offset - 4);
- offset = (uvalue & 0xffff) << 1;
- value = (value & (~(howto->dst_mask)))
- | (offset & 0x7fff) | ((offset << 1) & 0x30000);
- bfd_put_32 (input_bfd, value, contents + rel->r_offset);
- break;
- default:
- value = bfd_get_32 (input_bfd, contents + rel->r_offset);
- /* Get the (signed) value from the instruction. */
- addend = value & howto->src_mask;
- if (addend & ((howto->src_mask + 1) >> 1))
- {
- bfd_signed_vma mask;
-
- mask = -1;
- mask &= ~howto->src_mask;
- addend |= mask;
- }
- msec = sec;
- addend = _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend) - relocation;
- addend += msec->output_section->vma + msec->output_offset;
- value = (value & ~howto->dst_mask) | (addend & howto->dst_mask);
- bfd_put_32 (input_bfd, value, contents + rel->r_offset);
- break;
- }
- }
- }
- else
- {
- /* For global symbols we look up the symbol in the hash-table. */
- h = ((struct score_elf_link_hash_entry *)
- elf_sym_hashes (input_bfd) [r_symndx - extsymoff]);
- /* Find the real hash-table entry for this symbol. */
- while (h->root.root.type == bfd_link_hash_indirect
- || h->root.root.type == bfd_link_hash_warning)
- h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link;
-
- /* Record the name of this symbol, for our caller. */
- name = h->root.root.root.string;
-
- /* See if this is the special GP_DISP_LABEL symbol. Note that such a
- symbol must always be a global symbol. */
- if (strcmp (name, GP_DISP_LABEL) == 0)
- {
- /* Relocations against GP_DISP_LABEL are permitted only with
- R_SCORE_HI16 and R_SCORE_LO16 relocations. */
- if (r_type != R_SCORE_HI16 && r_type != R_SCORE_LO16)
- return bfd_reloc_notsupported;
-
- gp_disp_p = TRUE;
- }
-
- /* If this symbol is defined, calculate its address. Note that
- GP_DISP_LABEL is a magic symbol, always implicitly defined by the
- linker, so it's inappropriate to check to see whether or not
- its defined. */
- else if ((h->root.root.type == bfd_link_hash_defined
- || h->root.root.type == bfd_link_hash_defweak)
- && h->root.root.u.def.section)
- {
- sec = h->root.root.u.def.section;
- if (sec->output_section)
- relocation = (h->root.root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- else
- {
- relocation = h->root.root.u.def.value;
- }
- }
- else if (h->root.root.type == bfd_link_hash_undefweak)
- /* We allow relocations against undefined weak symbols, giving
- it the value zero, so that you can undefined weak functions
- and check to see if they exist by looking at their addresses. */
- relocation = 0;
- else if (info->unresolved_syms_in_objects == RM_IGNORE
- && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
- relocation = 0;
- else if (strcmp (name, "_DYNAMIC_LINK") == 0)
- {
- /* If this is a dynamic link, we should have created a _DYNAMIC_LINK symbol
- in _bfd_score_elf_create_dynamic_sections. Otherwise, we should define
- the symbol with a value of 0. */
- BFD_ASSERT (! info->shared);
- BFD_ASSERT (bfd_get_section_by_name (output_bfd, ".dynamic") == NULL);
- relocation = 0;
- }
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.root.string, input_bfd,
- input_section, rel->r_offset,
- (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
- || ELF_ST_VISIBILITY (h->root.other))))
- return bfd_reloc_undefined;
- relocation = 0;
- }
- }
-
- r = score_elf_final_link_relocate (howto, input_bfd, output_bfd,
- input_section, contents, rel, relocs,
- relocation, info, name,
- (h ? ELF_ST_TYPE ((unsigned int)h->root.root.type) :
- ELF_ST_TYPE ((unsigned int)sym->st_info)), h, local_sections,
- gp_disp_p);
-
- if (r != bfd_reloc_ok)
- {
- const char *msg = (const char *)0;
-
- switch (r)
- {
- case bfd_reloc_overflow:
- /* If the overflowing reloc was to an undefined symbol,
- we have already printed one error message and there
- is no point complaining again. */
- if (((!h) || (h->root.root.type != bfd_link_hash_undefined))
- && (!((*info->callbacks->reloc_overflow)
- (info, NULL, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset))))
- return FALSE;
- break;
- case bfd_reloc_undefined:
- if (!((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section, rel->r_offset, TRUE)))
- return FALSE;
- break;
-
- case bfd_reloc_outofrange:
- msg = _("internal error: out of range error");
- goto common_error;
-
- case bfd_reloc_notsupported:
- msg = _("internal error: unsupported relocation error");
- goto common_error;
-
- case bfd_reloc_dangerous:
- msg = _("internal error: dangerous error");
- goto common_error;
-
- default:
- msg = _("internal error: unknown error");
- /* fall through */
-
- common_error:
- if (!((*info->callbacks->warning)
- (info, msg, name, input_bfd, input_section, rel->r_offset)))
- return FALSE;
- break;
- }
- }
- }
-
- return TRUE;
-}
-
-/* Look through the relocs for a section during the first phase, and
- allocate space in the global offset table. */
-
-static bfd_boolean
-_bfd_score_elf_check_relocs (bfd *abfd,
- struct bfd_link_info *info,
- asection *sec,
- const Elf_Internal_Rela *relocs)
-{
- const char *name;
- bfd *dynobj;
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- struct score_got_info *g;
- size_t extsymoff;
- const Elf_Internal_Rela *rel;
- const Elf_Internal_Rela *rel_end;
- asection *sgot;
- asection *sreloc;
- const struct elf_backend_data *bed;
-
- if (info->relocatable)
- return TRUE;
-
- dynobj = elf_hash_table (info)->dynobj;
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (abfd);
- extsymoff = (elf_bad_symtab (abfd)) ? 0 : symtab_hdr->sh_info;
-
- name = bfd_get_section_name (abfd, sec);
-
- if (dynobj == NULL)
- {
- sgot = NULL;
- g = NULL;
- }
- else
- {
- sgot = score_elf_got_section (dynobj, FALSE);
- if (sgot == NULL)
- g = NULL;
- else
- {
- BFD_ASSERT (score_elf_section_data (sgot) != NULL);
- g = score_elf_section_data (sgot)->u.got_info;
- BFD_ASSERT (g != NULL);
- }
- }
-
- sreloc = NULL;
- bed = get_elf_backend_data (abfd);
- rel_end = relocs + sec->reloc_count * bed->s->int_rels_per_ext_rel;
- for (rel = relocs; rel < rel_end; ++rel)
- {
- unsigned long r_symndx;
- unsigned int r_type;
- struct elf_link_hash_entry *h;
-
- r_symndx = ELF32_R_SYM (rel->r_info);
- r_type = ELF32_R_TYPE (rel->r_info);
-
- if (r_symndx < extsymoff)
- {
- h = NULL;
- }
- else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
- {
- (*_bfd_error_handler) (_("%s: Malformed reloc detected for section %s"), abfd, name);
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
- else
- {
- h = sym_hashes[r_symndx - extsymoff];
-
- /* This may be an indirect symbol created because of a version. */
- if (h != NULL)
- {
- while (h->root.type == bfd_link_hash_indirect)
- h = (struct elf_link_hash_entry *)h->root.u.i.link;
- }
- }
-
- /* Some relocs require a global offset table. */
- if (dynobj == NULL || sgot == NULL)
- {
- switch (r_type)
- {
- case R_SCORE_GOT15:
- case R_SCORE_CALL15:
- if (dynobj == NULL)
- elf_hash_table (info)->dynobj = dynobj = abfd;
- if (!score_elf_create_got_section (dynobj, info, FALSE))
- return FALSE;
- g = score_elf_got_info (dynobj, &sgot);
- break;
- case R_SCORE_ABS32:
- case R_SCORE_REL32:
- if (dynobj == NULL && (info->shared || h != NULL) && (sec->flags & SEC_ALLOC) != 0)
- elf_hash_table (info)->dynobj = dynobj = abfd;
- break;
- default:
- break;
- }
- }
-
- if (!h && (r_type == R_SCORE_GOT_LO16))
- {
- if (! score_elf_record_local_got_symbol (abfd, r_symndx, rel->r_addend, g))
- return FALSE;
- }
-
- switch (r_type)
- {
- case R_SCORE_CALL15:
- if (h == NULL)
- {
- (*_bfd_error_handler)
- (_("%B: CALL15 reloc at 0x%lx not against global symbol"),
- abfd, (unsigned long) rel->r_offset);
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
- else
- {
- /* This symbol requires a global offset table entry. */
- if (! score_elf_record_global_got_symbol (h, abfd, info, g))
- return FALSE;
-
- /* We need a stub, not a plt entry for the undefined function. But we record
- it as if it needs plt. See _bfd_elf_adjust_dynamic_symbol. */
- h->needs_plt = 1;
- h->type = STT_FUNC;
- }
- break;
- case R_SCORE_GOT15:
- if (h && ! score_elf_record_global_got_symbol (h, abfd, info, g))
- return FALSE;
- break;
- case R_SCORE_ABS32:
- case R_SCORE_REL32:
- if ((info->shared || h != NULL) && (sec->flags & SEC_ALLOC) != 0)
- {
- if (sreloc == NULL)
- {
- sreloc = score_elf_rel_dyn_section (dynobj, TRUE);
- if (sreloc == NULL)
- return FALSE;
- }
-#define SCORE_READONLY_SECTION (SEC_ALLOC | SEC_LOAD | SEC_READONLY)
- if (info->shared)
- {
- /* When creating a shared object, we must copy these reloc types into
- the output file as R_SCORE_REL32 relocs. We make room for this reloc
- in the .rel.dyn reloc section. */
- score_elf_allocate_dynamic_relocations (dynobj, 1);
- if ((sec->flags & SCORE_READONLY_SECTION)
- == SCORE_READONLY_SECTION)
- /* We tell the dynamic linker that there are
- relocations against the text segment. */
- info->flags |= DF_TEXTREL;
- }
- else
- {
- struct score_elf_link_hash_entry *hscore;
-
- /* We only need to copy this reloc if the symbol is
- defined in a dynamic object. */
- hscore = (struct score_elf_link_hash_entry *)h;
- ++hscore->possibly_dynamic_relocs;
- if ((sec->flags & SCORE_READONLY_SECTION)
- == SCORE_READONLY_SECTION)
- /* We need it to tell the dynamic linker if there
- are relocations against the text segment. */
- hscore->readonly_reloc = TRUE;
- }
-
- /* Even though we don't directly need a GOT entry for this symbol,
- a symbol must have a dynamic symbol table index greater that
- DT_SCORE_GOTSYM if there are dynamic relocations against it. */
- if (h != NULL)
- {
- if (dynobj == NULL)
- elf_hash_table (info)->dynobj = dynobj = abfd;
- if (! score_elf_create_got_section (dynobj, info, TRUE))
- return FALSE;
- g = score_elf_got_info (dynobj, &sgot);
- if (! score_elf_record_global_got_symbol (h, abfd, info, g))
- return FALSE;
- }
- }
- break;
-
- /* This relocation describes the C++ object vtable hierarchy.
- Reconstruct it for later use during GC. */
- case R_SCORE_GNU_VTINHERIT:
- if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
- return FALSE;
- break;
-
- /* This relocation describes which C++ vtable entries are actually
- used. Record for later use during GC. */
- case R_SCORE_GNU_VTENTRY:
- if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
- return FALSE;
- break;
- default:
- break;
- }
-
- /* We must not create a stub for a symbol that has relocations
- related to taking the function's address. */
- switch (r_type)
- {
- default:
- if (h != NULL)
- {
- struct score_elf_link_hash_entry *sh;
-
- sh = (struct score_elf_link_hash_entry *) h;
- sh->no_fn_stub = TRUE;
- }
- break;
- case R_SCORE_CALL15:
- break;
- }
- }
-
- return TRUE;
-}
-
-static bfd_boolean
-_bfd_score_elf_add_symbol_hook (bfd *abfd,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
- Elf_Internal_Sym *sym,
- const char **namep ATTRIBUTE_UNUSED,
- flagword *flagsp ATTRIBUTE_UNUSED,
- asection **secp,
- bfd_vma *valp)
-{
- switch (sym->st_shndx)
- {
- case SHN_COMMON:
- if (sym->st_size > elf_gp_size (abfd))
- break;
- /* Fall through. */
- case SHN_SCORE_SCOMMON:
- *secp = bfd_make_section_old_way (abfd, ".scommon");
- (*secp)->flags |= SEC_IS_COMMON;
- *valp = sym->st_size;
- break;
- }
-
- return TRUE;
-}
-
-static void
-_bfd_score_elf_symbol_processing (bfd *abfd, asymbol *asym)
-{
- elf_symbol_type *elfsym;
-
- elfsym = (elf_symbol_type *) asym;
- switch (elfsym->internal_elf_sym.st_shndx)
- {
- case SHN_COMMON:
- if (asym->value > elf_gp_size (abfd))
- break;
- /* Fall through. */
- case SHN_SCORE_SCOMMON:
- if (score_elf_scom_section.name == NULL)
- {
- /* Initialize the small common section. */
- score_elf_scom_section.name = ".scommon";
- score_elf_scom_section.flags = SEC_IS_COMMON;
- score_elf_scom_section.output_section = &score_elf_scom_section;
- score_elf_scom_section.symbol = &score_elf_scom_symbol;
- score_elf_scom_section.symbol_ptr_ptr = &score_elf_scom_symbol_ptr;
- score_elf_scom_symbol.name = ".scommon";
- score_elf_scom_symbol.flags = BSF_SECTION_SYM;
- score_elf_scom_symbol.section = &score_elf_scom_section;
- score_elf_scom_symbol_ptr = &score_elf_scom_symbol;
- }
- asym->section = &score_elf_scom_section;
- asym->value = elfsym->internal_elf_sym.st_size;
- break;
- }
-}
-
-static bfd_boolean
-_bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED,
- const char *name ATTRIBUTE_UNUSED,
- Elf_Internal_Sym *sym,
- asection *input_sec,
- struct elf_link_hash_entry *h ATTRIBUTE_UNUSED)
-{
- /* If we see a common symbol, which implies a relocatable link, then
- if a symbol was small common in an input file, mark it as small
- common in the output file. */
- if (sym->st_shndx == SHN_COMMON && strcmp (input_sec->name, ".scommon") == 0)
- sym->st_shndx = SHN_SCORE_SCOMMON;
-
- return TRUE;
-}
-
-static bfd_boolean
-_bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED,
- asection *sec,
- int *retval)
-{
- if (strcmp (bfd_get_section_name (abfd, sec), ".scommon") == 0)
- {
- *retval = SHN_SCORE_SCOMMON;
- return TRUE;
- }
-
- return FALSE;
-}
-
-/* Adjust a symbol defined by a dynamic object and referenced by a
- regular object. The current definition is in some section of the
- dynamic object, but we're not including those sections. We have to
- change the definition to something the rest of the link can understand. */
-
-static bfd_boolean
-_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
- struct elf_link_hash_entry *h)
-{
- bfd *dynobj;
- struct score_elf_link_hash_entry *hscore;
- asection *s;
-
- dynobj = elf_hash_table (info)->dynobj;
-
- /* Make sure we know what is going on here. */
- BFD_ASSERT (dynobj != NULL
- && (h->needs_plt
- || h->u.weakdef != NULL
- || (h->def_dynamic && h->ref_regular && !h->def_regular)));
-
- /* If this symbol is defined in a dynamic object, we need to copy
- any R_SCORE_ABS32 or R_SCORE_REL32 relocs against it into the output
- file. */
- hscore = (struct score_elf_link_hash_entry *)h;
- if (!info->relocatable
- && hscore->possibly_dynamic_relocs != 0
- && (h->root.type == bfd_link_hash_defweak || !h->def_regular))
- {
- score_elf_allocate_dynamic_relocations (dynobj, hscore->possibly_dynamic_relocs);
- if (hscore->readonly_reloc)
- /* We tell the dynamic linker that there are relocations
- against the text segment. */
- info->flags |= DF_TEXTREL;
- }
-
- /* For a function, create a stub, if allowed. */
- if (!hscore->no_fn_stub && h->needs_plt)
- {
- if (!elf_hash_table (info)->dynamic_sections_created)
- return TRUE;
-
- /* If this symbol is not defined in a regular file, then set
- the symbol to the stub location. This is required to make
- function pointers compare as equal between the normal
- executable and the shared library. */
- if (!h->def_regular)
- {
- /* We need .stub section. */
- s = bfd_get_section_by_name (dynobj, SCORE_ELF_STUB_SECTION_NAME);
- BFD_ASSERT (s != NULL);
-
- h->root.u.def.section = s;
- h->root.u.def.value = s->size;
-
- /* XXX Write this stub address somewhere. */
- h->plt.offset = s->size;
-
- /* Make room for this stub code. */
- s->size += SCORE_FUNCTION_STUB_SIZE;
-
- /* The last half word of the stub will be filled with the index
- of this symbol in .dynsym section. */
- return TRUE;
- }
- }
- else if ((h->type == STT_FUNC) && !h->needs_plt)
- {
- /* This will set the entry for this symbol in the GOT to 0, and
- the dynamic linker will take care of this. */
- h->root.u.def.value = 0;
- return TRUE;
- }
-
- /* If this is a weak symbol, and there is a real definition, the
- processor independent code will have arranged for us to see the
- real definition first, and we can just use the same value. */
- if (h->u.weakdef != NULL)
- {
- BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined
- || h->u.weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->u.weakdef->root.u.def.section;
- h->root.u.def.value = h->u.weakdef->root.u.def.value;
- return TRUE;
- }
-
- /* This is a reference to a symbol defined by a dynamic object which
- is not a function. */
- return TRUE;
-}
-
-/* This function is called after all the input files have been read,
- and the input sections have been assigned to output sections. */
-
-static bfd_boolean
-_bfd_score_elf_always_size_sections (bfd *output_bfd,
- struct bfd_link_info *info)
-{
- bfd *dynobj;
- asection *s;
- struct score_got_info *g;
- int i;
- bfd_size_type loadable_size = 0;
- bfd_size_type local_gotno;
- bfd *sub;
-
- dynobj = elf_hash_table (info)->dynobj;
- if (dynobj == NULL)
- /* Relocatable links don't have it. */
- return TRUE;
-
- g = score_elf_got_info (dynobj, &s);
- if (s == NULL)
- return TRUE;
-
- /* Calculate the total loadable size of the output. That will give us the
- maximum number of GOT_PAGE entries required. */
- for (sub = info->input_bfds; sub; sub = sub->link_next)
- {
- asection *subsection;
-
- for (subsection = sub->sections;
- subsection;
- subsection = subsection->next)
- {
- if ((subsection->flags & SEC_ALLOC) == 0)
- continue;
- loadable_size += ((subsection->size + 0xf)
- &~ (bfd_size_type) 0xf);
- }
- }
-
- /* There has to be a global GOT entry for every symbol with
- a dynamic symbol table index of DT_SCORE_GOTSYM or
- higher. Therefore, it make sense to put those symbols
- that need GOT entries at the end of the symbol table. We
- do that here. */
- if (! score_elf_sort_hash_table (info, 1))
- return FALSE;
-
- if (g->global_gotsym != NULL)
- i = elf_hash_table (info)->dynsymcount - g->global_gotsym->dynindx;
- else
- /* If there are no global symbols, or none requiring
- relocations, then GLOBAL_GOTSYM will be NULL. */
- i = 0;
-
- /* In the worst case, we'll get one stub per dynamic symbol. */
- loadable_size += SCORE_FUNCTION_STUB_SIZE * i;
-
- /* Assume there are two loadable segments consisting of
- contiguous sections. Is 5 enough? */
- local_gotno = (loadable_size >> 16) + 5;
-
- g->local_gotno += local_gotno;
- s->size += g->local_gotno * SCORE_ELF_GOT_SIZE (output_bfd);
-
- g->global_gotno = i;
- s->size += i * SCORE_ELF_GOT_SIZE (output_bfd);
-
- score_elf_resolve_final_got_entries (g);
-
- if (s->size > SCORE_ELF_GOT_MAX_SIZE (output_bfd))
- {
- /* Fixme. Error message or Warning message should be issued here. */
- }
-
- return TRUE;
-}
-
-/* Set the sizes of the dynamic sections. */
-
-static bfd_boolean
-_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
-{
- bfd *dynobj;
- asection *s;
- bfd_boolean reltext;
-
- dynobj = elf_hash_table (info)->dynobj;
- BFD_ASSERT (dynobj != NULL);
-
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- /* Set the contents of the .interp section to the interpreter. */
- if (!info->shared)
- {
- s = bfd_get_section_by_name (dynobj, ".interp");
- BFD_ASSERT (s != NULL);
- s->size = strlen (ELF_DYNAMIC_INTERPRETER) + 1;
- s->contents = (bfd_byte *) ELF_DYNAMIC_INTERPRETER;
- }
- }
-
- /* The check_relocs and adjust_dynamic_symbol entry points have
- determined the sizes of the various dynamic sections. Allocate
- memory for them. */
- reltext = FALSE;
- for (s = dynobj->sections; s != NULL; s = s->next)
- {
- const char *name;
-
- if ((s->flags & SEC_LINKER_CREATED) == 0)
- continue;
-
- /* It's OK to base decisions on the section name, because none
- of the dynobj section names depend upon the input files. */
- name = bfd_get_section_name (dynobj, s);
-
- if (CONST_STRNEQ (name, ".rel"))
- {
- if (s->size == 0)
- {
- /* We only strip the section if the output section name
- has the same name. Otherwise, there might be several
- input sections for this output section. FIXME: This
- code is probably not needed these days anyhow, since
- the linker now does not create empty output sections. */
- if (s->output_section != NULL
- && strcmp (name,
- bfd_get_section_name (s->output_section->owner,
- s->output_section)) == 0)
- s->flags |= SEC_EXCLUDE;
- }
- else
- {
- const char *outname;
- asection *target;
-
- /* If this relocation section applies to a read only
- section, then we probably need a DT_TEXTREL entry.
- If the relocation section is .rel.dyn, we always
- assert a DT_TEXTREL entry rather than testing whether
- there exists a relocation to a read only section or
- not. */
- outname = bfd_get_section_name (output_bfd, s->output_section);
- target = bfd_get_section_by_name (output_bfd, outname + 4);
- if ((target != NULL
- && (target->flags & SEC_READONLY) != 0
- && (target->flags & SEC_ALLOC) != 0) || strcmp (outname, ".rel.dyn") == 0)
- reltext = TRUE;
-
- /* We use the reloc_count field as a counter if we need
- to copy relocs into the output file. */
- if (strcmp (name, ".rel.dyn") != 0)
- s->reloc_count = 0;
- }
- }
- else if (CONST_STRNEQ (name, ".got"))
- {
- /* _bfd_score_elf_always_size_sections() has already done
- most of the work, but some symbols may have been mapped
- to versions that we must now resolve in the got_entries
- hash tables. */
- }
- else if (strcmp (name, SCORE_ELF_STUB_SECTION_NAME) == 0)
- {
- /* IRIX rld assumes that the function stub isn't at the end
- of .text section. So put a dummy. XXX */
- s->size += SCORE_FUNCTION_STUB_SIZE;
- }
- else if (! CONST_STRNEQ (name, ".init"))
- {
- /* It's not one of our sections, so don't allocate space. */
- continue;
- }
-
- /* Allocate memory for the section contents. */
- s->contents = bfd_zalloc (dynobj, s->size);
- if (s->contents == NULL && s->size != 0)
- {
- bfd_set_error (bfd_error_no_memory);
- return FALSE;
- }
- }
-
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- /* Add some entries to the .dynamic section. We fill in the
- values later, in _bfd_score_elf_finish_dynamic_sections, but we
- must add the entries now so that we get the correct size for
- the .dynamic section. The DT_DEBUG entry is filled in by the
- dynamic linker and used by the debugger. */
-
- if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
- return FALSE;
-
- if (reltext)
- info->flags |= DF_TEXTREL;
-
- if ((info->flags & DF_TEXTREL) != 0)
- {
- if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_TEXTREL, 0))
- return FALSE;
- }
-
- if (! SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTGOT, 0))
- return FALSE;
-
- if (score_elf_rel_dyn_section (dynobj, FALSE))
- {
- if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_REL, 0))
- return FALSE;
-
- if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELSZ, 0))
- return FALSE;
-
- if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELENT, 0))
- return FALSE;
- }
-
- if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_BASE_ADDRESS, 0))
- return FALSE;
-
- if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_LOCAL_GOTNO, 0))
- return FALSE;
-
- if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_SYMTABNO, 0))
- return FALSE;
-
- if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_UNREFEXTNO, 0))
- return FALSE;
-
- if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_GOTSYM, 0))
- return FALSE;
-
- if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_HIPAGENO, 0))
- return FALSE;
- }
-
- return TRUE;
-}
-
-static bfd_boolean
-_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
-{
- struct elf_link_hash_entry *h;
- struct bfd_link_hash_entry *bh;
- flagword flags;
- asection *s;
-
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_LINKER_CREATED | SEC_READONLY);
-
- /* ABI requests the .dynamic section to be read only. */
- s = bfd_get_section_by_name (abfd, ".dynamic");
- if (s != NULL)
- {
- if (!bfd_set_section_flags (abfd, s, flags))
- return FALSE;
- }
-
- /* We need to create .got section. */
- if (!score_elf_create_got_section (abfd, info, FALSE))
- return FALSE;
-
- if (!score_elf_rel_dyn_section (elf_hash_table (info)->dynobj, TRUE))
- return FALSE;
-
- /* Create .stub section. */
- if (bfd_get_section_by_name (abfd, SCORE_ELF_STUB_SECTION_NAME) == NULL)
- {
- s = bfd_make_section_with_flags (abfd, SCORE_ELF_STUB_SECTION_NAME,
- flags | SEC_CODE);
- if (s == NULL
- || !bfd_set_section_alignment (abfd, s, 2))
-
- return FALSE;
- }
-
- if (!info->shared)
- {
- const char *name;
-
- name = "_DYNAMIC_LINK";
- bh = NULL;
- if (!(_bfd_generic_link_add_one_symbol
- (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr,
- (bfd_vma) 0, (const char *)NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh)))
- return FALSE;
-
- h = (struct elf_link_hash_entry *)bh;
- h->non_elf = 0;
- h->def_regular = 1;
- h->type = STT_SECTION;
-
- if (!bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/* Finish up dynamic symbol handling. We set the contents of various
- dynamic sections here. */
-
-static bfd_boolean
-_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd,
- struct bfd_link_info *info,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
-{
- bfd *dynobj;
- asection *sgot;
- struct score_got_info *g;
- const char *name;
-
- dynobj = elf_hash_table (info)->dynobj;
-
- if (h->plt.offset != MINUS_ONE)
- {
- asection *s;
- bfd_byte stub[SCORE_FUNCTION_STUB_SIZE];
-
- /* This symbol has a stub. Set it up. */
- BFD_ASSERT (h->dynindx != -1);
-
- s = bfd_get_section_by_name (dynobj, SCORE_ELF_STUB_SECTION_NAME);
- BFD_ASSERT (s != NULL);
-
- /* FIXME: Can h->dynindex be more than 64K? */
- if (h->dynindx & 0xffff0000)
- return FALSE;
-
- /* Fill the stub. */
- bfd_put_32 (output_bfd, STUB_LW, stub);
- bfd_put_32 (output_bfd, STUB_MOVE, stub + 4);
- bfd_put_32 (output_bfd, STUB_LI16 | (h->dynindx << 1), stub + 8);
- bfd_put_32 (output_bfd, STUB_BRL, stub + 12);
-
- BFD_ASSERT (h->plt.offset <= s->size);
- memcpy (s->contents + h->plt.offset, stub, SCORE_FUNCTION_STUB_SIZE);
-
- /* Mark the symbol as undefined. plt.offset != -1 occurs
- only for the referenced symbol. */
- sym->st_shndx = SHN_UNDEF;
-
- /* The run-time linker uses the st_value field of the symbol
- to reset the global offset table entry for this external
- to its stub address when unlinking a shared object. */
- sym->st_value = (s->output_section->vma + s->output_offset + h->plt.offset);
- }
-
- BFD_ASSERT (h->dynindx != -1 || h->forced_local);
-
- sgot = score_elf_got_section (dynobj, FALSE);
- BFD_ASSERT (sgot != NULL);
- BFD_ASSERT (score_elf_section_data (sgot) != NULL);
- g = score_elf_section_data (sgot)->u.got_info;
- BFD_ASSERT (g != NULL);
-
- /* Run through the global symbol table, creating GOT entries for all
- the symbols that need them. */
- if (g->global_gotsym != NULL && h->dynindx >= g->global_gotsym->dynindx)
- {
- bfd_vma offset;
- bfd_vma value;
-
- value = sym->st_value;
- offset = score_elf_global_got_index (dynobj, h);
- bfd_put_32 (output_bfd, value, sgot->contents + offset);
- }
-
- /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */
- name = h->root.root.string;
- if (strcmp (name, "_DYNAMIC") == 0 || strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0)
- sym->st_shndx = SHN_ABS;
- else if (strcmp (name, "_DYNAMIC_LINK") == 0)
- {
- sym->st_shndx = SHN_ABS;
- sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
- sym->st_value = 1;
- }
- else if (strcmp (name, GP_DISP_LABEL) == 0)
- {
- sym->st_shndx = SHN_ABS;
- sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
- sym->st_value = elf_gp (output_bfd);
- }
-
- return TRUE;
-}
-
-/* Finish up the dynamic sections. */
-
-static bfd_boolean
-_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd,
- struct bfd_link_info *info)
-{
- bfd *dynobj;
- asection *sdyn;
- asection *sgot;
- asection *s;
- struct score_got_info *g;
-
- dynobj = elf_hash_table (info)->dynobj;
-
- sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
-
- sgot = score_elf_got_section (dynobj, FALSE);
- if (sgot == NULL)
- g = NULL;
- else
- {
- BFD_ASSERT (score_elf_section_data (sgot) != NULL);
- g = score_elf_section_data (sgot)->u.got_info;
- BFD_ASSERT (g != NULL);
- }
-
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- bfd_byte *b;
-
- BFD_ASSERT (sdyn != NULL);
- BFD_ASSERT (g != NULL);
-
- for (b = sdyn->contents;
- b < sdyn->contents + sdyn->size;
- b += SCORE_ELF_DYN_SIZE (dynobj))
- {
- Elf_Internal_Dyn dyn;
- const char *name;
- size_t elemsize;
- bfd_boolean swap_out_p;
-
- /* Read in the current dynamic entry. */
- (*get_elf_backend_data (dynobj)->s->swap_dyn_in) (dynobj, b, &dyn);
-
- /* Assume that we're going to modify it and write it out. */
- swap_out_p = TRUE;
-
- switch (dyn.d_tag)
- {
- case DT_RELENT:
- s = score_elf_rel_dyn_section (dynobj, FALSE);
- BFD_ASSERT (s != NULL);
- dyn.d_un.d_val = SCORE_ELF_REL_SIZE (dynobj);
- break;
-
- case DT_STRSZ:
- /* Rewrite DT_STRSZ. */
- dyn.d_un.d_val = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
- break;
-
- case DT_PLTGOT:
- name = ".got";
- s = bfd_get_section_by_name (output_bfd, name);
- BFD_ASSERT (s != NULL);
- dyn.d_un.d_ptr = s->vma;
- break;
-
- case DT_SCORE_BASE_ADDRESS:
- s = output_bfd->sections;
- BFD_ASSERT (s != NULL);
- dyn.d_un.d_ptr = s->vma & ~(bfd_vma) 0xffff;
- break;
-
- case DT_SCORE_LOCAL_GOTNO:
- dyn.d_un.d_val = g->local_gotno;
- break;
-
- case DT_SCORE_UNREFEXTNO:
- /* The index into the dynamic symbol table which is the
- entry of the first external symbol that is not
- referenced within the same object. */
- dyn.d_un.d_val = bfd_count_sections (output_bfd) + 1;
- break;
-
- case DT_SCORE_GOTSYM:
- if (g->global_gotsym)
- {
- dyn.d_un.d_val = g->global_gotsym->dynindx;
- break;
- }
- /* In case if we don't have global got symbols we default
- to setting DT_SCORE_GOTSYM to the same value as
- DT_SCORE_SYMTABNO, so we just fall through. */
-
- case DT_SCORE_SYMTABNO:
- name = ".dynsym";
- elemsize = SCORE_ELF_SYM_SIZE (output_bfd);
- s = bfd_get_section_by_name (output_bfd, name);
- BFD_ASSERT (s != NULL);
-
- dyn.d_un.d_val = s->size / elemsize;
- break;
-
- case DT_SCORE_HIPAGENO:
- dyn.d_un.d_val = g->local_gotno - SCORE_RESERVED_GOTNO;
- break;
-
- default:
- swap_out_p = FALSE;
- break;
- }
-
- if (swap_out_p)
- (*get_elf_backend_data (dynobj)->s->swap_dyn_out) (dynobj, &dyn, b);
- }
- }
-
- /* The first entry of the global offset table will be filled at
- runtime. The second entry will be used by some runtime loaders.
- This isn't the case of IRIX rld. */
- if (sgot != NULL && sgot->size > 0)
- {
- bfd_put_32 (output_bfd, 0, sgot->contents);
- bfd_put_32 (output_bfd, 0x80000000, sgot->contents + SCORE_ELF_GOT_SIZE (output_bfd));
- }
-
- if (sgot != NULL)
- elf_section_data (sgot->output_section)->this_hdr.sh_entsize
- = SCORE_ELF_GOT_SIZE (output_bfd);
-
-
- /* We need to sort the entries of the dynamic relocation section. */
- s = score_elf_rel_dyn_section (dynobj, FALSE);
-
- if (s != NULL && s->size > (bfd_vma)2 * SCORE_ELF_REL_SIZE (output_bfd))
- {
- reldyn_sorting_bfd = output_bfd;
- qsort ((Elf32_External_Rel *) s->contents + 1, s->reloc_count - 1,
- sizeof (Elf32_External_Rel), score_elf_sort_dynamic_relocs);
- }
-
- return TRUE;
-}
-
-/* This function set up the ELF section header for a BFD section in preparation for writing
- it out. This is where the flags and type fields are set for unusual sections. */
-
-static bfd_boolean
-_bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
- Elf_Internal_Shdr *hdr,
- asection *sec)
-{
- const char *name;
-
- name = bfd_get_section_name (abfd, sec);
-
- if (strcmp (name, ".got") == 0
- || strcmp (name, ".srdata") == 0
- || strcmp (name, ".sdata") == 0
- || strcmp (name, ".sbss") == 0)
- hdr->sh_flags |= SHF_SCORE_GPREL;
-
- return TRUE;
-}
-
-/* This function do additional processing on the ELF section header before writing
- it out. This is used to set the flags and type fields for some sections. */
-
-/* assign_file_positions_except_relocs() check section flag and if it is allocatable,
- warning message will be issued. backend_fake_section is called before
- assign_file_positions_except_relocs(); backend_section_processing after it. so, we
- modify section flag there, but not backend_fake_section. */
-
-static bfd_boolean
-_bfd_score_elf_section_processing (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr)
-{
- if (hdr->bfd_section != NULL)
- {
- const char *name = bfd_get_section_name (abfd, hdr->bfd_section);
-
- if (strcmp (name, ".sdata") == 0)
- {
- hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_SCORE_GPREL;
- hdr->sh_type = SHT_PROGBITS;
- }
- else if (strcmp (name, ".sbss") == 0)
- {
- hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_SCORE_GPREL;
- hdr->sh_type = SHT_NOBITS;
- }
- else if (strcmp (name, ".srdata") == 0)
- {
- hdr->sh_flags |= SHF_ALLOC | SHF_SCORE_GPREL;
- hdr->sh_type = SHT_PROGBITS;
- }
- }
-
- return TRUE;
-}
-
-static bfd_boolean
-_bfd_score_elf_write_section (bfd *output_bfd, asection *sec, bfd_byte *contents)
-{
- bfd_byte *to, *from, *end;
- int i;
-
- if (strcmp (sec->name, ".pdr") != 0)
- return FALSE;
-
- if (score_elf_section_data (sec)->u.tdata == NULL)
- return FALSE;
-
- to = contents;
- end = contents + sec->size;
- for (from = contents, i = 0; from < end; from += PDR_SIZE, i++)
- {
- if ((score_elf_section_data (sec)->u.tdata)[i] == 1)
- continue;
-
- if (to != from)
- memcpy (to, from, PDR_SIZE);
-
- to += PDR_SIZE;
- }
- bfd_set_section_contents (output_bfd, sec->output_section, contents,
- (file_ptr) sec->output_offset, sec->size);
-
- return TRUE;
-}
-
-/* Copy data from a SCORE ELF indirect symbol to its direct symbol, hiding the old
- indirect symbol. Process additional relocation information. */
-
-static void
-_bfd_score_elf_copy_indirect_symbol (struct bfd_link_info *info,
- struct elf_link_hash_entry *dir,
- struct elf_link_hash_entry *ind)
-{
- struct score_elf_link_hash_entry *dirscore, *indscore;
-
- _bfd_elf_link_hash_copy_indirect (info, dir, ind);
-
- if (ind->root.type != bfd_link_hash_indirect)
- return;
-
- dirscore = (struct score_elf_link_hash_entry *) dir;
- indscore = (struct score_elf_link_hash_entry *) ind;
- dirscore->possibly_dynamic_relocs += indscore->possibly_dynamic_relocs;
-
- if (indscore->readonly_reloc)
- dirscore->readonly_reloc = TRUE;
-
- if (indscore->no_fn_stub)
- dirscore->no_fn_stub = TRUE;
-}
-
-/* Remove information about discarded functions from other sections which mention them. */
-
-static bfd_boolean
-_bfd_score_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie,
- struct bfd_link_info *info)
-{
- asection *o;
- bfd_boolean ret = FALSE;
- unsigned char *tdata;
- size_t i, skip;
-
- o = bfd_get_section_by_name (abfd, ".pdr");
- if ((!o) || (o->size == 0) || (o->size % PDR_SIZE != 0)
- || (o->output_section != NULL && bfd_is_abs_section (o->output_section)))
- return FALSE;
-
- tdata = bfd_zmalloc (o->size / PDR_SIZE);
- if (!tdata)
- return FALSE;
-
- cookie->rels = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, info->keep_memory);
- if (!cookie->rels)
- {
- free (tdata);
- return FALSE;
- }
-
- cookie->rel = cookie->rels;
- cookie->relend = cookie->rels + o->reloc_count;
-
- for (i = 0, skip = 0; i < o->size; i++)
- {
- if (bfd_elf_reloc_symbol_deleted_p (i * PDR_SIZE, cookie))
- {
- tdata[i] = 1;
- skip++;
- }
- }
-
- if (skip != 0)
- {
- score_elf_section_data (o)->u.tdata = tdata;
- o->size -= skip * PDR_SIZE;
- ret = TRUE;
- }
- else
- free (tdata);
-
- if (!info->keep_memory)
- free (cookie->rels);
-
- return ret;
-}
-
-/* Signal that discard_info() has removed the discarded relocations for this section. */
-
-static bfd_boolean
-_bfd_score_elf_ignore_discarded_relocs (asection *sec)
-{
- if (strcmp (sec->name, ".pdr") == 0)
- return TRUE;
- return FALSE;
-}
-
-/* Return the section that should be marked against GC for a given
- relocation. */
-
-static asection *
-_bfd_score_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
-{
- if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_SCORE_GNU_VTINHERIT:
- case R_SCORE_GNU_VTENTRY:
- return NULL;
- }
-
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
-}
-
-/* Support for core dump NOTE sections. */
-
-static bfd_boolean
-_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
-{
- int offset;
- unsigned int raw_size;
-
- switch (note->descsz)
- {
- default:
- return FALSE;
-
- case 148: /* Linux/Score 32-bit. */
- /* pr_cursig */
- elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
-
- /* pr_pid */
- elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
-
- /* pr_reg */
- offset = 72;
- raw_size = 72;
-
- break;
- }
-
- /* Make a ".reg/999" section. */
- return _bfd_elfcore_make_pseudosection (abfd, ".reg", raw_size, note->descpos + offset);
-}
-
-static bfd_boolean
-_bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
-{
- switch (note->descsz)
- {
- default:
- return FALSE;
-
- case 124: /* Linux/Score elf_prpsinfo. */
- elf_tdata (abfd)->core_program = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
- elf_tdata (abfd)->core_command = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
- }
-
- /* Note that for some reason, a spurious space is tacked
- onto the end of the args in some (at least one anyway)
- implementations, so strip it off if it exists. */
-
- {
- char *command = elf_tdata (abfd)->core_command;
- int n = strlen (command);
-
- if (0 < n && command[n - 1] == ' ')
- command[n - 1] = '\0';
- }
-
- return TRUE;
-}
-
-
-/* Score BFD functions. */
-
-static reloc_howto_type *
-elf32_score_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, bfd_reloc_code_real_type code)
-{
- unsigned int i;
-
- for (i = 0; i < NUM_ELEM (elf32_score_reloc_map); i++)
- if (elf32_score_reloc_map[i].bfd_reloc_val == code)
- return &elf32_score_howto_table[elf32_score_reloc_map[i].elf_reloc_val];
-
- return NULL;
-}
-
-/* Create a score elf linker hash table. */
-
-static struct bfd_link_hash_table *
-elf32_score_link_hash_table_create (bfd *abfd)
-{
- struct score_elf_link_hash_table *ret;
- bfd_size_type amt = sizeof (struct score_elf_link_hash_table);
-
- ret = bfd_malloc (amt);
- if (ret == NULL)
- return NULL;
-
- if (!_bfd_elf_link_hash_table_init (&ret->root, abfd, score_elf_link_hash_newfunc,
- sizeof (struct score_elf_link_hash_entry)))
- {
- free (ret);
- return NULL;
- }
-
- return &ret->root.root;
-}
-
-static bfd_boolean
-elf32_score_print_private_bfd_data (bfd *abfd, void * ptr)
-{
- FILE *file = (FILE *) ptr;
-
- BFD_ASSERT (abfd != NULL && ptr != NULL);
-
- /* Print normal ELF private data. */
- _bfd_elf_print_private_bfd_data (abfd, ptr);
-
- /* xgettext:c-format */
- fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
- if (elf_elfheader (abfd)->e_flags & EF_SCORE_PIC)
- {
- fprintf (file, _(" [pic]"));
- }
- if (elf_elfheader (abfd)->e_flags & EF_SCORE_FIXDEP)
- {
- fprintf (file, _(" [fix dep]"));
- }
- fputc ('\n', file);
-
- return TRUE;
-}
-
-static bfd_boolean
-elf32_score_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
-{
- flagword in_flags;
- flagword out_flags;
-
- if (!_bfd_generic_verify_endian_match (ibfd, obfd))
- return FALSE;
-
- in_flags = elf_elfheader (ibfd)->e_flags;
- out_flags = elf_elfheader (obfd)->e_flags;
-
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return TRUE;
-
- in_flags = elf_elfheader (ibfd)->e_flags;
- out_flags = elf_elfheader (obfd)->e_flags;
-
- if (! elf_flags_init (obfd))
- {
- elf_flags_init (obfd) = TRUE;
- elf_elfheader (obfd)->e_flags = in_flags;
-
- if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
- && bfd_get_arch_info (obfd)->the_default)
- {
- return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd));
- }
-
- return TRUE;
- }
-
- if (((in_flags & EF_SCORE_PIC) != 0) != ((out_flags & EF_SCORE_PIC) != 0))
- {
- (*_bfd_error_handler) (_("%B: warning: linking PIC files with non-PIC files"), ibfd);
- }
-
- /* FIXME: Maybe dependency fix compatibility should be checked here. */
-
- return TRUE;
-}
-
-static bfd_boolean
-elf32_score_new_section_hook (bfd *abfd, asection *sec)
-{
- struct _score_elf_section_data *sdata;
- bfd_size_type amt = sizeof (*sdata);
-
- sdata = bfd_zalloc (abfd, amt);
- if (sdata == NULL)
- return FALSE;
- sec->used_by_bfd = sdata;
-
- return _bfd_elf_new_section_hook (abfd, sec);
-}
-
-
-#define USE_REL 1
-#define TARGET_LITTLE_SYM bfd_elf32_littlescore_vec
-#define TARGET_LITTLE_NAME "elf32-littlescore"
-#define TARGET_BIG_SYM bfd_elf32_bigscore_vec
-#define TARGET_BIG_NAME "elf32-bigscore"
-#define ELF_ARCH bfd_arch_score
-#define ELF_MACHINE_CODE EM_SCORE
-#define ELF_MAXPAGESIZE 0x8000
-
-#define elf_info_to_howto 0
-#define elf_info_to_howto_rel _bfd_score_info_to_howto
-#define elf_backend_relocate_section _bfd_score_elf_relocate_section
-#define elf_backend_check_relocs _bfd_score_elf_check_relocs
-#define elf_backend_add_symbol_hook _bfd_score_elf_add_symbol_hook
-#define elf_backend_symbol_processing _bfd_score_elf_symbol_processing
-#define elf_backend_link_output_symbol_hook \
- _bfd_score_elf_link_output_symbol_hook
-#define elf_backend_section_from_bfd_section \
- _bfd_score_elf_section_from_bfd_section
-#define elf_backend_adjust_dynamic_symbol \
- _bfd_score_elf_adjust_dynamic_symbol
-#define elf_backend_always_size_sections \
- _bfd_score_elf_always_size_sections
-#define elf_backend_size_dynamic_sections \
- _bfd_score_elf_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
-#define elf_backend_create_dynamic_sections \
- _bfd_score_elf_create_dynamic_sections
-#define elf_backend_finish_dynamic_symbol \
- _bfd_score_elf_finish_dynamic_symbol
-#define elf_backend_finish_dynamic_sections \
- _bfd_score_elf_finish_dynamic_sections
-#define elf_backend_fake_sections _bfd_score_elf_fake_sections
-#define elf_backend_section_processing _bfd_score_elf_section_processing
-#define elf_backend_write_section _bfd_score_elf_write_section
-#define elf_backend_copy_indirect_symbol _bfd_score_elf_copy_indirect_symbol
-#define elf_backend_hide_symbol _bfd_score_elf_hide_symbol
-#define elf_backend_discard_info _bfd_score_elf_discard_info
-#define elf_backend_ignore_discarded_relocs \
- _bfd_score_elf_ignore_discarded_relocs
-#define elf_backend_gc_mark_hook _bfd_score_elf_gc_mark_hook
-#define elf_backend_grok_prstatus _bfd_score_elf_grok_prstatus
-#define elf_backend_grok_psinfo _bfd_score_elf_grok_psinfo
-#define elf_backend_can_gc_sections 1
-#define elf_backend_want_plt_sym 0
-#define elf_backend_got_header_size (4 * SCORE_RESERVED_GOTNO)
-#define elf_backend_plt_header_size 0
-#define elf_backend_collect TRUE
-#define elf_backend_type_change_ok TRUE
-
-#define bfd_elf32_bfd_reloc_type_lookup elf32_score_reloc_type_lookup
-#define bfd_elf32_bfd_link_hash_table_create elf32_score_link_hash_table_create
-#define bfd_elf32_bfd_print_private_bfd_data elf32_score_print_private_bfd_data
-#define bfd_elf32_bfd_merge_private_bfd_data elf32_score_merge_private_bfd_data
-#define bfd_elf32_new_section_hook elf32_score_new_section_hook
-
-#include "elf32-target.h"
diff --git a/bfd/elf32-sh-symbian.c b/bfd/elf32-sh-symbian.c
index 7ea9207..9ca0564 100644
--- a/bfd/elf32-sh-symbian.c
+++ b/bfd/elf32-sh-symbian.c
@@ -1,5 +1,5 @@
/* Renesas / SuperH specific support for Symbian 32-bit ELF files
- Copyright 2004, 2005, 2006
+ Copyright 2004, 2005
Free Software Foundation, Inc.
Contributed by Red Hat
@@ -225,7 +225,7 @@ sh_symbian_process_embedded_commands (struct bfd_link_info *info, bfd * abfd,
break;
case 'I':
- if (! CONST_STRNEQ (s, DIRECTIVE_IMPORT))
+ if (strncmp (s, DIRECTIVE_IMPORT, strlen (DIRECTIVE_IMPORT)))
result = FALSE;
else
{
@@ -261,9 +261,9 @@ sh_symbian_process_embedded_commands (struct bfd_link_info *info, bfd * abfd,
name_end_char = * new_name_end;
* new_name_end = 0;
- /* Check to see if 'AS '... is present. If so we have an
- IMPORT AS directive, otherwise we have an IMPORT directive. */
- if (! CONST_STRNEQ (s, DIRECTIVE_AS))
+ /* Check to see if 'AS '... is present. If se we have an IMPORT AS
+ directive, otherwise we have an IMPORT directive. */
+ if (strncmp (s, DIRECTIVE_AS, strlen (DIRECTIVE_AS)))
{
/* Skip the new-line at the end of the name. */
if (SYMBIAN_DEBUG && name_end_char != '\n')
@@ -327,7 +327,7 @@ sh_symbian_process_embedded_commands (struct bfd_link_info *info, bfd * abfd,
break;
case 'E':
- if (! CONST_STRNEQ (s, DIRECTIVE_EXPORT))
+ if (strncmp (s, DIRECTIVE_EXPORT, strlen (DIRECTIVE_EXPORT)))
result = FALSE;
else
{
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 8e53056..a410901 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -3042,7 +3042,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
/* Strip this section if we don't need it; see the
comment below. */
}
- else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
+ else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
if (s->size != 0 && s != htab->srelplt && s != htab->srelplt2)
relocs = TRUE;
@@ -3557,15 +3557,6 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
case R_SH_IMM_MEDHI16_PCREL:
case R_SH_IMM_HI16_PCREL:
#endif
- /* r_symndx will be zero only for relocs against symbols
- from removed linkonce sections, or sections discarded by
- a linker script. */
- if (r_symndx == 0)
- {
- _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
- continue;
- }
-
if (info->shared
&& (h == NULL
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
@@ -3594,7 +3585,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (input_bfd,
input_section),
name + 5) == 0);
@@ -4320,7 +4311,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (input_bfd,
input_section),
name + 5) == 0);
@@ -4524,20 +4515,42 @@ tpoff (struct bfd_link_info *info, bfd_vma address)
static asection *
sh_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel, struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_SH_GNU_VTINHERIT:
- case R_SH_GNU_VTENTRY:
- return NULL;
- }
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_SH_GNU_VTINHERIT:
+ case R_SH_GNU_VTENTRY:
+ break;
+
+ default:
+#ifdef INCLUDE_SHMEDIA
+ while (h->root.type == bfd_link_hash_indirect
+ && h->root.u.i.link)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+#endif
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
}
/* Update the got entry reference counts for the section being removed. */
@@ -5187,7 +5200,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
name + 5) == 0);
@@ -6037,8 +6050,6 @@ sh_elf_plt_sym_val (bfd_vma i, const asection *plt,
sh_elf_always_size_sections
#define elf_backend_size_dynamic_sections \
sh_elf_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define elf_backend_finish_dynamic_symbol \
sh_elf_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections \
diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c
index 9ad795e..55aa25b 100644
--- a/bfd/elf32-sh64.c
+++ b/bfd/elf32-sh64.c
@@ -742,9 +742,9 @@ static void
sh64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h,
const Elf_Internal_Sym *isym,
bfd_boolean definition,
- bfd_boolean dynamic ATTRIBUTE_UNUSED)
+ bfd_boolean dynamic)
{
- if ((isym->st_other & ~ELF_ST_VISIBILITY (-1)) != 0)
+ if (isym->st_other != 0 && dynamic)
{
unsigned char other;
@@ -759,8 +759,8 @@ sh64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h,
static const struct bfd_elf_special_section sh64_elf_special_sections[] =
{
- { STRING_COMMA_LEN (".cranges"), 0, SHT_PROGBITS, 0 },
- { NULL, 0, 0, 0, 0 }
+ { ".cranges", 8, 0, SHT_PROGBITS, 0 },
+ { NULL, 0, 0, 0, 0 }
};
#undef TARGET_BIG_SYM
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index 5f13b96..3f0c7d6 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -207,7 +207,6 @@ elf32_sparc_reloc_type_class (const Elf_Internal_Rela *rela)
#define elf_backend_gc_mark_hook _bfd_sparc_elf_gc_mark_hook
#define elf_backend_gc_sweep_hook _bfd_sparc_elf_gc_sweep_hook
#define elf_backend_plt_sym_val _bfd_sparc_elf_plt_sym_val
-#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
deleted file mode 100644
index 5eb0f05..0000000
--- a/bfd/elf32-spu.c
+++ /dev/null
@@ -1,1749 +0,0 @@
-/* SPU specific support for 32-bit ELF
-
- Copyright 2006 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. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-#include "libbfd.h"
-#include "elf-bfd.h"
-#include "elf/spu.h"
-#include "elf32-spu.h"
-
-/* We use RELA style relocs. Don't define USE_REL. */
-
-static bfd_reloc_status_type spu_elf_rel9 (bfd *, arelent *, asymbol *,
- void *, asection *,
- bfd *, char **);
-
-/* Values of type 'enum elf_spu_reloc_type' are used to index this
- array, so it must be declared in the order of that type. */
-
-static reloc_howto_type elf_howto_table[] = {
- HOWTO (R_SPU_NONE, 0, 0, 0, FALSE, 0, complain_overflow_dont,
- bfd_elf_generic_reloc, "SPU_NONE",
- FALSE, 0, 0x00000000, FALSE),
- HOWTO (R_SPU_ADDR10, 4, 2, 10, FALSE, 14, complain_overflow_bitfield,
- bfd_elf_generic_reloc, "SPU_ADDR10",
- FALSE, 0, 0x00ffc000, FALSE),
- HOWTO (R_SPU_ADDR16, 2, 2, 16, FALSE, 7, complain_overflow_bitfield,
- bfd_elf_generic_reloc, "SPU_ADDR16",
- FALSE, 0, 0x007fff80, FALSE),
- HOWTO (R_SPU_ADDR16_HI, 16, 2, 16, FALSE, 7, complain_overflow_bitfield,
- bfd_elf_generic_reloc, "SPU_ADDR16_HI",
- FALSE, 0, 0x007fff80, FALSE),
- HOWTO (R_SPU_ADDR16_LO, 0, 2, 16, FALSE, 7, complain_overflow_dont,
- bfd_elf_generic_reloc, "SPU_ADDR16_LO",
- FALSE, 0, 0x007fff80, FALSE),
- HOWTO (R_SPU_ADDR18, 0, 2, 18, FALSE, 7, complain_overflow_bitfield,
- bfd_elf_generic_reloc, "SPU_ADDR18",
- FALSE, 0, 0x01ffff80, FALSE),
- HOWTO (R_SPU_ADDR32, 0, 2, 32, FALSE, 0, complain_overflow_dont,
- bfd_elf_generic_reloc, "SPU_ADDR32",
- FALSE, 0, 0xffffffff, FALSE),
- HOWTO (R_SPU_REL16, 2, 2, 16, TRUE, 7, complain_overflow_bitfield,
- bfd_elf_generic_reloc, "SPU_REL16",
- FALSE, 0, 0x007fff80, TRUE),
- HOWTO (R_SPU_ADDR7, 0, 2, 7, FALSE, 14, complain_overflow_dont,
- bfd_elf_generic_reloc, "SPU_ADDR7",
- FALSE, 0, 0x001fc000, FALSE),
- HOWTO (R_SPU_REL9, 2, 2, 9, TRUE, 0, complain_overflow_signed,
- spu_elf_rel9, "SPU_REL9",
- FALSE, 0, 0x0180007f, TRUE),
- HOWTO (R_SPU_REL9I, 2, 2, 9, TRUE, 0, complain_overflow_signed,
- spu_elf_rel9, "SPU_REL9I",
- FALSE, 0, 0x0000c07f, TRUE),
- HOWTO (R_SPU_ADDR10I, 0, 2, 10, FALSE, 14, complain_overflow_signed,
- bfd_elf_generic_reloc, "SPU_ADDR10I",
- FALSE, 0, 0x00ffc000, FALSE),
- HOWTO (R_SPU_ADDR16I, 0, 2, 16, FALSE, 7, complain_overflow_signed,
- bfd_elf_generic_reloc, "SPU_ADDR16I",
- FALSE, 0, 0x007fff80, FALSE),
- HOWTO (R_SPU_REL32, 0, 2, 32, TRUE, 0, complain_overflow_dont,
- bfd_elf_generic_reloc, "SPU_REL32",
- FALSE, 0, 0xffffffff, TRUE),
-};
-
-static struct bfd_elf_special_section const spu_elf_special_sections[] = {
- { ".toe", 4, 0, SHT_NOBITS, SHF_ALLOC },
- { NULL, 0, 0, 0, 0 }
-};
-
-static enum elf_spu_reloc_type
-spu_elf_bfd_to_reloc_type (bfd_reloc_code_real_type code)
-{
- switch (code)
- {
- default:
- return R_SPU_NONE;
- case BFD_RELOC_SPU_IMM10W:
- return R_SPU_ADDR10;
- case BFD_RELOC_SPU_IMM16W:
- return R_SPU_ADDR16;
- case BFD_RELOC_SPU_LO16:
- return R_SPU_ADDR16_LO;
- case BFD_RELOC_SPU_HI16:
- return R_SPU_ADDR16_HI;
- case BFD_RELOC_SPU_IMM18:
- return R_SPU_ADDR18;
- case BFD_RELOC_SPU_PCREL16:
- return R_SPU_REL16;
- case BFD_RELOC_SPU_IMM7:
- return R_SPU_ADDR7;
- case BFD_RELOC_SPU_IMM8:
- return R_SPU_NONE;
- case BFD_RELOC_SPU_PCREL9a:
- return R_SPU_REL9;
- case BFD_RELOC_SPU_PCREL9b:
- return R_SPU_REL9I;
- case BFD_RELOC_SPU_IMM10:
- return R_SPU_ADDR10I;
- case BFD_RELOC_SPU_IMM16:
- return R_SPU_ADDR16I;
- case BFD_RELOC_32:
- return R_SPU_ADDR32;
- case BFD_RELOC_32_PCREL:
- return R_SPU_REL32;
- }
-}
-
-static void
-spu_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
- arelent *cache_ptr,
- Elf_Internal_Rela *dst)
-{
- enum elf_spu_reloc_type r_type;
-
- r_type = (enum elf_spu_reloc_type) ELF32_R_TYPE (dst->r_info);
- BFD_ASSERT (r_type < R_SPU_max);
- cache_ptr->howto = &elf_howto_table[(int) r_type];
-}
-
-static reloc_howto_type *
-spu_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
- bfd_reloc_code_real_type code)
-{
- return elf_howto_table + spu_elf_bfd_to_reloc_type (code);
-}
-
-/* Apply R_SPU_REL9 and R_SPU_REL9I relocs. */
-
-static bfd_reloc_status_type
-spu_elf_rel9 (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
- void *data, asection *input_section,
- bfd *output_bfd, char **error_message)
-{
- bfd_size_type octets;
- bfd_vma val;
- long insn;
-
- /* If this is a relocatable link (output_bfd test tells us), just
- call the generic function. Any adjustment will be done at final
- link time. */
- if (output_bfd != NULL)
- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message);
-
- if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
- return bfd_reloc_outofrange;
- octets = reloc_entry->address * bfd_octets_per_byte (abfd);
-
- /* Get symbol value. */
- val = 0;
- if (!bfd_is_com_section (symbol->section))
- val = symbol->value;
- if (symbol->section->output_section)
- val += symbol->section->output_section->vma;
-
- val += reloc_entry->addend;
-
- /* Make it pc-relative. */
- val -= input_section->output_section->vma + input_section->output_offset;
-
- val >>= 2;
- if (val + 256 >= 512)
- return bfd_reloc_overflow;
-
- insn = bfd_get_32 (abfd, (bfd_byte *) data + octets);
-
- /* Move two high bits of value to REL9I and REL9 position.
- The mask will take care of selecting the right field. */
- val = (val & 0x7f) | ((val & 0x180) << 7) | ((val & 0x180) << 16);
- insn &= ~reloc_entry->howto->dst_mask;
- insn |= val & reloc_entry->howto->dst_mask;
- bfd_put_32 (abfd, insn, (bfd_byte *) data + octets);
- return bfd_reloc_ok;
-}
-
-static bfd_boolean
-spu_elf_new_section_hook (bfd *abfd, asection *sec)
-{
- if (!sec->used_by_bfd)
- {
- struct _spu_elf_section_data *sdata;
-
- sdata = bfd_zalloc (abfd, sizeof (*sdata));
- if (sdata == NULL)
- return FALSE;
- sec->used_by_bfd = sdata;
- }
-
- return _bfd_elf_new_section_hook (abfd, sec);
-}
-
-/* Specially mark defined symbols named _EAR_* with BSF_KEEP so that
- strip --strip-unneeded will not remove them. */
-
-static void
-spu_elf_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym)
-{
- if (sym->name != NULL
- && sym->section != bfd_abs_section_ptr
- && strncmp (sym->name, "_EAR_", 5) == 0)
- sym->flags |= BSF_KEEP;
-}
-
-/* SPU ELF linker hash table. */
-
-struct spu_link_hash_table
-{
- struct elf_link_hash_table elf;
-
- /* The stub hash table. */
- struct bfd_hash_table stub_hash_table;
-
- /* Shortcuts to overlay sections. */
- asection *stub;
- asection *ovtab;
-
- struct elf_link_hash_entry *ovly_load;
-
- /* An array of two output sections per overlay region, chosen such that
- the first section vma is the overlay buffer vma (ie. the section has
- the lowest vma in the group that occupy the region), and the second
- section vma+size specifies the end of the region. We keep pointers
- to sections like this because section vmas may change when laying
- them out. */
- asection **ovl_region;
-
- /* Number of overlay buffers. */
- unsigned int num_buf;
-
- /* Total number of overlays. */
- unsigned int num_overlays;
-
- /* Set if we should emit symbols for stubs. */
- unsigned int emit_stub_syms:1;
-
- /* Set if we want stubs on calls out of overlay regions to
- non-overlay regions. */
- unsigned int non_overlay_stubs : 1;
-
- /* Set on error. */
- unsigned int stub_overflow : 1;
-};
-
-#define spu_hash_table(p) \
- ((struct spu_link_hash_table *) ((p)->hash))
-
-struct spu_stub_hash_entry
-{
- struct bfd_hash_entry root;
-
- /* Destination of this stub. */
- asection *target_section;
- bfd_vma target_off;
-
- /* Offset of entry in stub section. */
- bfd_vma off;
-
- /* Offset from this stub to stub that loads the overlay index. */
- bfd_vma delta;
-};
-
-/* Create an entry in a spu stub hash table. */
-
-static struct bfd_hash_entry *
-stub_hash_newfunc (struct bfd_hash_entry *entry,
- struct bfd_hash_table *table,
- const char *string)
-{
- /* Allocate the structure if it has not already been allocated by a
- subclass. */
- if (entry == NULL)
- {
- entry = bfd_hash_allocate (table, sizeof (struct spu_stub_hash_entry));
- if (entry == NULL)
- return entry;
- }
-
- /* Call the allocation method of the superclass. */
- entry = bfd_hash_newfunc (entry, table, string);
- if (entry != NULL)
- {
- struct spu_stub_hash_entry *sh = (struct spu_stub_hash_entry *) entry;
-
- sh->target_section = NULL;
- sh->target_off = 0;
- sh->off = 0;
- sh->delta = 0;
- }
-
- return entry;
-}
-
-/* Create a spu ELF linker hash table. */
-
-static struct bfd_link_hash_table *
-spu_elf_link_hash_table_create (bfd *abfd)
-{
- struct spu_link_hash_table *htab;
-
- htab = bfd_malloc (sizeof (*htab));
- if (htab == NULL)
- return NULL;
-
- if (!_bfd_elf_link_hash_table_init (&htab->elf, abfd,
- _bfd_elf_link_hash_newfunc,
- sizeof (struct elf_link_hash_entry)))
- {
- free (htab);
- return NULL;
- }
-
- /* Init the stub hash table too. */
- if (!bfd_hash_table_init (&htab->stub_hash_table, stub_hash_newfunc,
- sizeof (struct spu_stub_hash_entry)))
- return NULL;
-
- memset (&htab->stub, 0,
- sizeof (*htab) - offsetof (struct spu_link_hash_table, stub));
-
- return &htab->elf.root;
-}
-
-/* Free the derived linker hash table. */
-
-static void
-spu_elf_link_hash_table_free (struct bfd_link_hash_table *hash)
-{
- struct spu_link_hash_table *ret = (struct spu_link_hash_table *) hash;
-
- bfd_hash_table_free (&ret->stub_hash_table);
- _bfd_generic_link_hash_table_free (hash);
-}
-
-/* Find the symbol for the given R_SYMNDX in IBFD and set *HP and *SYMP
- to (hash, NULL) for global symbols, and (NULL, sym) for locals. Set
- *SYMSECP to the symbol's section. *LOCSYMSP caches local syms. */
-
-static bfd_boolean
-get_sym_h (struct elf_link_hash_entry **hp,
- Elf_Internal_Sym **symp,
- asection **symsecp,
- Elf_Internal_Sym **locsymsp,
- unsigned long r_symndx,
- bfd *ibfd)
-{
- Elf_Internal_Shdr *symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
-
- if (r_symndx >= symtab_hdr->sh_info)
- {
- struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (ibfd);
- struct elf_link_hash_entry *h;
-
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
- if (hp != NULL)
- *hp = h;
-
- if (symp != NULL)
- *symp = NULL;
-
- if (symsecp != NULL)
- {
- asection *symsec = NULL;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- symsec = h->root.u.def.section;
- *symsecp = symsec;
- }
- }
- else
- {
- Elf_Internal_Sym *sym;
- Elf_Internal_Sym *locsyms = *locsymsp;
-
- if (locsyms == NULL)
- {
- locsyms = (Elf_Internal_Sym *) symtab_hdr->contents;
- if (locsyms == NULL)
- locsyms = bfd_elf_get_elf_syms (ibfd, symtab_hdr,
- symtab_hdr->sh_info,
- 0, NULL, NULL, NULL);
- if (locsyms == NULL)
- return FALSE;
- *locsymsp = locsyms;
- }
- sym = locsyms + r_symndx;
-
- if (hp != NULL)
- *hp = NULL;
-
- if (symp != NULL)
- *symp = sym;
-
- if (symsecp != NULL)
- {
- asection *symsec = NULL;
- if ((sym->st_shndx != SHN_UNDEF
- && sym->st_shndx < SHN_LORESERVE)
- || sym->st_shndx > SHN_HIRESERVE)
- symsec = bfd_section_from_elf_index (ibfd, sym->st_shndx);
- *symsecp = symsec;
- }
- }
- return TRUE;
-}
-
-/* Build a name for an entry in the stub hash table. The input section
- id isn't really necessary but we add that in for consistency with
- ppc32 and ppc64 stub names. We can't use a local symbol name
- because ld -r might generate duplicate local symbols. */
-
-static char *
-spu_stub_name (const asection *input_sec,
- const asection *sym_sec,
- const struct elf_link_hash_entry *h,
- const Elf_Internal_Rela *rel)
-{
- char *stub_name;
- bfd_size_type len;
-
- if (h)
- {
- len = 8 + 1 + strlen (h->root.root.string) + 1 + 8 + 1;
- stub_name = bfd_malloc (len);
- if (stub_name == NULL)
- return stub_name;
-
- sprintf (stub_name, "%08x.%s+%x",
- input_sec->id & 0xffffffff,
- h->root.root.string,
- (int) rel->r_addend & 0xffffffff);
- len -= 8;
- }
- else
- {
- len = 8 + 1 + 8 + 1 + 8 + 1 + 8 + 1;
- stub_name = bfd_malloc (len);
- if (stub_name == NULL)
- return stub_name;
-
- sprintf (stub_name, "%08x.%x:%x+%x",
- input_sec->id & 0xffffffff,
- sym_sec->id & 0xffffffff,
- (int) ELF32_R_SYM (rel->r_info) & 0xffffffff,
- (int) rel->r_addend & 0xffffffff);
- len = strlen (stub_name);
- }
-
- if (stub_name[len - 2] == '+'
- && stub_name[len - 1] == '0'
- && stub_name[len] == 0)
- stub_name[len - 2] = 0;
-
- return stub_name;
-}
-
-/* Create the note section if not already present. This is done early so
- that the linker maps the sections to the right place in the output. */
-
-bfd_boolean
-spu_elf_create_sections (bfd *output_bfd, struct bfd_link_info *info)
-{
- bfd *ibfd;
-
- for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->next)
- if (bfd_get_section_by_name (ibfd, SPU_PTNOTE_SPUNAME) != NULL)
- break;
-
- if (ibfd == NULL)
- {
- /* Make SPU_PTNOTE_SPUNAME section. */
- asection *s;
- size_t name_len;
- size_t size;
- bfd_byte *data;
- flagword flags;
-
- ibfd = info->input_bfds;
- flags = SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS | SEC_IN_MEMORY;
- s = bfd_make_section_anyway_with_flags (ibfd, SPU_PTNOTE_SPUNAME, flags);
- if (s == NULL
- || !bfd_set_section_alignment (ibfd, s, 4))
- return FALSE;
-
- name_len = strlen (bfd_get_filename (output_bfd)) + 1;
- size = 12 + ((sizeof (SPU_PLUGIN_NAME) + 3) & -4);
- size += (name_len + 3) & -4;
-
- if (!bfd_set_section_size (ibfd, s, size))
- return FALSE;
-
- data = bfd_zalloc (ibfd, size);
- if (data == NULL)
- return FALSE;
-
- bfd_put_32 (ibfd, sizeof (SPU_PLUGIN_NAME), data + 0);
- bfd_put_32 (ibfd, name_len, data + 4);
- bfd_put_32 (ibfd, 1, data + 8);
- memcpy (data + 12, SPU_PLUGIN_NAME, sizeof (SPU_PLUGIN_NAME));
- memcpy (data + 12 + ((sizeof (SPU_PLUGIN_NAME) + 3) & -4),
- bfd_get_filename (output_bfd), name_len);
- s->contents = data;
- }
-
- return TRUE;
-}
-
-/* Return the section that should be marked against GC for a given
- relocation. */
-
-static asection *
-spu_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
- Elf_Internal_Rela *rel ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
-{
- if (h != NULL)
- {
- switch (h->root.type)
- {
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- return h->root.u.def.section;
-
- case bfd_link_hash_common:
- return h->root.u.c.p->section;
-
- default:
- break;
- }
- }
- else
- return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
-
- return NULL;
-}
-
-/* qsort predicate to sort sections by vma. */
-
-static int
-sort_sections (const void *a, const void *b)
-{
- const asection *const *s1 = a;
- const asection *const *s2 = b;
- bfd_signed_vma delta = (*s1)->vma - (*s2)->vma;
-
- if (delta != 0)
- return delta < 0 ? -1 : 1;
-
- return (*s1)->index - (*s2)->index;
-}
-
-/* Identify overlays in the output bfd, and number them. */
-
-bfd_boolean
-spu_elf_find_overlays (bfd *output_bfd, struct bfd_link_info *info)
-{
- struct spu_link_hash_table *htab = spu_hash_table (info);
- asection **alloc_sec;
- unsigned int i, n, ovl_index, num_buf;
- asection *s;
- bfd_vma ovl_end;
-
- if (output_bfd->section_count < 2)
- return FALSE;
-
- alloc_sec = bfd_malloc (output_bfd->section_count * sizeof (*alloc_sec));
- if (alloc_sec == NULL)
- return FALSE;
-
- /* Pick out all the alloced sections. */
- for (n = 0, s = output_bfd->sections; s != NULL; s = s->next)
- if ((s->flags & SEC_ALLOC) != 0
- && (s->flags & (SEC_LOAD | SEC_THREAD_LOCAL)) != SEC_THREAD_LOCAL
- && s->size != 0)
- alloc_sec[n++] = s;
-
- if (n == 0)
- {
- free (alloc_sec);
- return FALSE;
- }
-
- /* Sort them by vma. */
- qsort (alloc_sec, n, sizeof (*alloc_sec), sort_sections);
-
- /* Look for overlapping vmas. Any with overlap must be overlays.
- Count them. Also count the number of overlay regions and for
- each region save a section from that region with the lowest vma
- and another section with the highest end vma. */
- ovl_end = alloc_sec[0]->vma + alloc_sec[0]->size;
- for (ovl_index = 0, num_buf = 0, i = 1; i < n; i++)
- {
- s = alloc_sec[i];
- if (s->vma < ovl_end)
- {
- asection *s0 = alloc_sec[i - 1];
-
- if (spu_elf_section_data (s0)->ovl_index == 0)
- {
- spu_elf_section_data (s0)->ovl_index = ++ovl_index;
- alloc_sec[num_buf * 2] = s0;
- alloc_sec[num_buf * 2 + 1] = s0;
- num_buf++;
- }
- spu_elf_section_data (s)->ovl_index = ++ovl_index;
- if (ovl_end < s->vma + s->size)
- {
- ovl_end = s->vma + s->size;
- alloc_sec[num_buf * 2 - 1] = s;
- }
- }
- else
- ovl_end = s->vma + s->size;
- }
-
- htab->num_overlays = ovl_index;
- htab->num_buf = num_buf;
- if (ovl_index == 0)
- {
- free (alloc_sec);
- return FALSE;
- }
-
- alloc_sec = bfd_realloc (alloc_sec, num_buf * 2 * sizeof (*alloc_sec));
- if (alloc_sec == NULL)
- return FALSE;
-
- htab->ovl_region = alloc_sec;
- return TRUE;
-}
-
-/* One of these per stub. */
-#define SIZEOF_STUB1 8
-#define ILA_79 0x4200004f /* ila $79,function_address */
-#define BR 0x32000000 /* br stub2 */
-
-/* One of these per overlay. */
-#define SIZEOF_STUB2 8
-#define ILA_78 0x4200004e /* ila $78,overlay_number */
- /* br __ovly_load */
-#define NOP 0x40200000
-
-/* Return true for all relative and absolute branch and hint instructions.
- bra 00110000 0..
- brasl 00110001 0..
- br 00110010 0..
- brsl 00110011 0..
- brz 00100000 0..
- brnz 00100001 0..
- brhz 00100010 0..
- brhnz 00100011 0..
- hbra 0001000..
- hbrr 0001001.. */
-
-static bfd_boolean
-is_branch (const unsigned char *insn)
-{
- return (((insn[0] & 0xec) == 0x20 && (insn[1] & 0x80) == 0)
- || (insn[0] & 0xfc) == 0x10);
-}
-
-struct stubarr {
- struct spu_stub_hash_entry **sh;
- unsigned int count;
-};
-
-/* Called via bfd_hash_traverse to set up pointers to all symbols
- in the stub hash table. */
-
-static bfd_boolean
-populate_stubs (struct bfd_hash_entry *bh, void *inf)
-{
- struct stubarr *stubs = inf;
-
- stubs->sh[--stubs->count] = (struct spu_stub_hash_entry *) bh;
- return TRUE;
-}
-
-/* qsort predicate to sort stubs by overlay number. */
-
-static int
-sort_stubs (const void *a, const void *b)
-{
- const struct spu_stub_hash_entry *const *sa = a;
- const struct spu_stub_hash_entry *const *sb = b;
- int i;
- bfd_signed_vma d;
-
- i = spu_elf_section_data ((*sa)->target_section->output_section)->ovl_index;
- i -= spu_elf_section_data ((*sb)->target_section->output_section)->ovl_index;
- if (i != 0)
- return i;
-
- d = ((*sa)->target_section->output_section->vma
- + (*sa)->target_section->output_offset
- + (*sa)->target_off
- - (*sb)->target_section->output_section->vma
- - (*sb)->target_section->output_offset
- - (*sb)->target_off);
- if (d != 0)
- return d < 0 ? -1 : 1;
-
- /* Two functions at the same address. Aliases perhaps. */
- i = strcmp ((*sb)->root.string, (*sa)->root.string);
- BFD_ASSERT (i != 0);
- return i;
-}
-
-/* Allocate space for overlay call and return stubs. */
-
-bfd_boolean
-spu_elf_size_stubs (bfd *output_bfd,
- struct bfd_link_info *info,
- int non_overlay_stubs,
- asection **stub,
- asection **ovtab,
- asection **toe)
-{
- struct spu_link_hash_table *htab = spu_hash_table (info);
- bfd *ibfd;
- struct stubarr stubs;
- unsigned i, group;
- flagword flags;
-
- htab->non_overlay_stubs = non_overlay_stubs;
- stubs.count = 0;
- for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
- {
- extern const bfd_target bfd_elf32_spu_vec;
- Elf_Internal_Shdr *symtab_hdr;
- asection *section;
- Elf_Internal_Sym *local_syms = NULL;
-
- if (ibfd->xvec != &bfd_elf32_spu_vec)
- continue;
-
- /* We'll need the symbol table in a second. */
- symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
- if (symtab_hdr->sh_info == 0)
- continue;
-
- /* Walk over each section attached to the input bfd. */
- for (section = ibfd->sections; section != NULL; section = section->next)
- {
- Elf_Internal_Rela *internal_relocs, *irelaend, *irela;
-
- /* If there aren't any relocs, then there's nothing more to do. */
- if ((section->flags & SEC_RELOC) == 0
- || (section->flags & SEC_ALLOC) == 0
- || (section->flags & SEC_LOAD) == 0
- || section->reloc_count == 0)
- continue;
-
- /* If this section is a link-once section that will be
- discarded, then don't create any stubs. */
- if (section->output_section == NULL
- || section->output_section->owner != output_bfd)
- continue;
-
- /* Get the relocs. */
- internal_relocs
- = _bfd_elf_link_read_relocs (ibfd, section, NULL, NULL,
- info->keep_memory);
- if (internal_relocs == NULL)
- goto error_ret_free_local;
-
- /* Now examine each relocation. */
- irela = internal_relocs;
- irelaend = irela + section->reloc_count;
- for (; irela < irelaend; irela++)
- {
- enum elf_spu_reloc_type r_type;
- unsigned int r_indx;
- asection *sym_sec;
- Elf_Internal_Sym *sym;
- struct elf_link_hash_entry *h;
- char *stub_name;
- struct spu_stub_hash_entry *sh;
- unsigned int sym_type;
- enum _insn_type { non_branch, branch, call } insn_type;
-
- r_type = ELF32_R_TYPE (irela->r_info);
- r_indx = ELF32_R_SYM (irela->r_info);
-
- if (r_type >= R_SPU_max)
- {
- bfd_set_error (bfd_error_bad_value);
- goto error_ret_free_internal;
- }
-
- /* Determine the reloc target section. */
- if (!get_sym_h (&h, &sym, &sym_sec, &local_syms, r_indx, ibfd))
- goto error_ret_free_internal;
-
- if (sym_sec == NULL
- || sym_sec->output_section == NULL
- || sym_sec->output_section->owner != output_bfd)
- continue;
-
- /* Ensure no stubs for user supplied overlay manager syms. */
- if (h != NULL
- && (strcmp (h->root.root.string, "__ovly_load") == 0
- || strcmp (h->root.root.string, "__ovly_return") == 0))
- continue;
-
- insn_type = non_branch;
- if (r_type == R_SPU_REL16
- || r_type == R_SPU_ADDR16)
- {
- unsigned char insn[4];
-
- if (!bfd_get_section_contents (ibfd, section, insn,
- irela->r_offset, 4))
- goto error_ret_free_internal;
-
- if (is_branch (insn))
- {
- insn_type = branch;
- if ((insn[0] & 0xfd) == 0x31)
- insn_type = call;
- }
- }
-
- /* We are only interested in function symbols. */
- if (h != NULL)
- sym_type = h->type;
- else
- sym_type = ELF_ST_TYPE (sym->st_info);
- if (sym_type != STT_FUNC)
- {
- /* It's common for people to write assembly and forget
- to give function symbols the right type. Handle
- calls to such symbols, but warn so that (hopefully)
- people will fix their code. We need the symbol
- type to be correct to distinguish function pointer
- initialisation from other pointer initialisation. */
- if (insn_type == call)
- {
- const char *sym_name;
-
- if (h != NULL)
- sym_name = h->root.root.string;
- else
- sym_name = bfd_elf_sym_name (sym_sec->owner,
- symtab_hdr,
- sym,
- sym_sec);
-
- (*_bfd_error_handler) (_("warning: call to non-function"
- " symbol %s defined in %B"),
- sym_name, sym_sec->owner);
- }
- else
- continue;
- }
-
- /* Usually, non-overlay sections don't need stubs. */
- if (!spu_elf_section_data (sym_sec->output_section)->ovl_index
- && !non_overlay_stubs)
- continue;
-
- /* We need a reference from some other section before
- we consider that a symbol might need an overlay stub. */
- if (spu_elf_section_data (sym_sec->output_section)->ovl_index
- == spu_elf_section_data (section->output_section)->ovl_index)
- {
- /* Or we need this to *not* be a branch. ie. We are
- possibly taking the address of a function and
- passing it out somehow. */
- if (insn_type != non_branch)
- continue;
- }
-
- stub_name = spu_stub_name (section, sym_sec, h, irela);
- if (stub_name == NULL)
- goto error_ret_free_internal;
-
- sh = (struct spu_stub_hash_entry *)
- bfd_hash_lookup (&htab->stub_hash_table, stub_name,
- TRUE, FALSE);
- if (sh == NULL)
- {
- free (stub_name);
- error_ret_free_internal:
- if (elf_section_data (section)->relocs != internal_relocs)
- free (internal_relocs);
- error_ret_free_local:
- if (local_syms != NULL
- && (symtab_hdr->contents
- != (unsigned char *) local_syms))
- free (local_syms);
- return FALSE;
- }
-
- /* If this entry isn't new, we already have a stub. */
- if (sh->target_section != NULL)
- {
- free (stub_name);
- continue;
- }
-
- sh->target_section = sym_sec;
- if (h != NULL)
- sh->target_off = h->root.u.def.value;
- else
- sh->target_off = sym->st_value;
- sh->target_off += irela->r_addend;
-
- stubs.count += 1;
- }
-
- /* We're done with the internal relocs, free them. */
- if (elf_section_data (section)->relocs != internal_relocs)
- free (internal_relocs);
- }
-
- if (local_syms != NULL
- && symtab_hdr->contents != (unsigned char *) local_syms)
- {
- if (!info->keep_memory)
- free (local_syms);
- else
- symtab_hdr->contents = (unsigned char *) local_syms;
- }
- }
-
- *stub = NULL;
- if (stubs.count == 0)
- return TRUE;
-
- ibfd = info->input_bfds;
- flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY
- | SEC_HAS_CONTENTS | SEC_IN_MEMORY);
- htab->stub = bfd_make_section_anyway_with_flags (ibfd, ".stub", flags);
- *stub = htab->stub;
- if (htab->stub == NULL
- || !bfd_set_section_alignment (ibfd, htab->stub, 2))
- return FALSE;
-
- flags = (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS | SEC_IN_MEMORY);
- htab->ovtab = bfd_make_section_anyway_with_flags (ibfd, ".ovtab", flags);
- *ovtab = htab->ovtab;
- if (htab->ovtab == NULL
- || !bfd_set_section_alignment (ibfd, htab->stub, 4))
- return FALSE;
-
- *toe = bfd_make_section_anyway_with_flags (ibfd, ".toe", SEC_ALLOC);
- if (*toe == NULL
- || !bfd_set_section_alignment (ibfd, *toe, 4))
- return FALSE;
- (*toe)->size = 16;
-
- /* Retrieve all the stubs and sort. */
- stubs.sh = bfd_malloc (stubs.count * sizeof (*stubs.sh));
- if (stubs.sh == NULL)
- return FALSE;
- i = stubs.count;
- bfd_hash_traverse (&htab->stub_hash_table, populate_stubs, &stubs);
- BFD_ASSERT (stubs.count == 0);
-
- stubs.count = i;
- qsort (stubs.sh, stubs.count, sizeof (*stubs.sh), sort_stubs);
-
- /* Now that the stubs are sorted, place them in the stub section.
- Stubs are grouped per overlay
- . ila $79,func1
- . br 1f
- . ila $79,func2
- . br 1f
- .
- .
- . ila $79,funcn
- . nop
- . 1:
- . ila $78,ovl_index
- . br __ovly_load */
-
- group = 0;
- for (i = 0; i < stubs.count; i++)
- {
- if (spu_elf_section_data (stubs.sh[group]->target_section
- ->output_section)->ovl_index
- != spu_elf_section_data (stubs.sh[i]->target_section
- ->output_section)->ovl_index)
- {
- htab->stub->size += SIZEOF_STUB2;
- for (; group != i; group++)
- stubs.sh[group]->delta
- = stubs.sh[i - 1]->off - stubs.sh[group]->off;
- }
- if (group == i
- || ((stubs.sh[i - 1]->target_section->output_section->vma
- + stubs.sh[i - 1]->target_section->output_offset
- + stubs.sh[i - 1]->target_off)
- != (stubs.sh[i]->target_section->output_section->vma
- + stubs.sh[i]->target_section->output_offset
- + stubs.sh[i]->target_off)))
- {
- stubs.sh[i]->off = htab->stub->size;
- htab->stub->size += SIZEOF_STUB1;
- }
- else
- stubs.sh[i]->off = stubs.sh[i - 1]->off;
- }
- if (group != i)
- htab->stub->size += SIZEOF_STUB2;
- for (; group != i; group++)
- stubs.sh[group]->delta = stubs.sh[i - 1]->off - stubs.sh[group]->off;
-
- /* htab->ovtab consists of two arrays.
- . struct {
- . u32 vma;
- . u32 size;
- . u32 file_off;
- . u32 buf;
- . } _ovly_table[];
- .
- . struct {
- . u32 mapped;
- . } _ovly_buf_table[]; */
-
- htab->ovtab->alignment_power = 4;
- htab->ovtab->size = htab->num_overlays * 16 + htab->num_buf * 4;
-
- return TRUE;
-}
-
-/* Functions to handle embedded spu_ovl.o object. */
-
-static void *
-ovl_mgr_open (struct bfd *nbfd ATTRIBUTE_UNUSED, void *stream)
-{
- return stream;
-}
-
-static file_ptr
-ovl_mgr_pread (struct bfd *abfd ATTRIBUTE_UNUSED,
- void *stream,
- void *buf,
- file_ptr nbytes,
- file_ptr offset)
-{
- struct _ovl_stream *os;
- size_t count;
- size_t max;
-
- os = (struct _ovl_stream *) stream;
- max = (char *) os->end - (char *) os->start;
-
- if ((ufile_ptr) offset >= max)
- return 0;
-
- count = nbytes;
- if (count > max - offset)
- count = max - offset;
-
- memcpy (buf, (char *) os->start + offset, count);
- return count;
-}
-
-bfd_boolean
-spu_elf_open_builtin_lib (bfd **ovl_bfd, const struct _ovl_stream *stream)
-{
- *ovl_bfd = bfd_openr_iovec ("builtin ovl_mgr",
- "elf32-spu",
- ovl_mgr_open,
- (void *) stream,
- ovl_mgr_pread,
- NULL);
- return *ovl_bfd != NULL;
-}
-
-/* Fill in the ila and br for a stub. On the last stub for a group,
- write the stub that sets the overlay number too. */
-
-static bfd_boolean
-write_one_stub (struct bfd_hash_entry *bh, void *inf)
-{
- struct spu_stub_hash_entry *ent = (struct spu_stub_hash_entry *) bh;
- struct spu_link_hash_table *htab = inf;
- asection *sec = htab->stub;
- asection *s = ent->target_section;
- unsigned int ovl;
- bfd_vma val;
-
- val = ent->target_off + s->output_offset + s->output_section->vma;
- bfd_put_32 (sec->owner, ILA_79 + ((val << 7) & 0x01ffff80),
- sec->contents + ent->off);
- val = ent->delta + 4;
- bfd_put_32 (sec->owner, BR + ((val << 5) & 0x007fff80),
- sec->contents + ent->off + 4);
-
- /* If this is the last stub of this group, write stub2. */
- if (ent->delta == 0)
- {
- bfd_put_32 (sec->owner, NOP,
- sec->contents + ent->off + 4);
-
- ovl = spu_elf_section_data (s->output_section)->ovl_index;
- bfd_put_32 (sec->owner, ILA_78 + ((ovl << 7) & 0x01ffff80),
- sec->contents + ent->off + 8);
-
- val = (htab->ovly_load->root.u.def.section->output_section->vma
- + htab->ovly_load->root.u.def.section->output_offset
- + htab->ovly_load->root.u.def.value
- - (sec->output_section->vma
- + sec->output_offset
- + ent->off + 12));
-
- if (val + 0x20000 >= 0x40000)
- htab->stub_overflow = TRUE;
-
- bfd_put_32 (sec->owner, BR + ((val << 5) & 0x007fff80),
- sec->contents + ent->off + 12);
- }
-
- if (htab->emit_stub_syms)
- {
- struct elf_link_hash_entry *h;
- size_t len1, len2;
- char *name;
-
- len1 = sizeof ("ovl_call.") - 1;
- len2 = strlen (ent->root.string);
- name = bfd_malloc (len1 + len2 + 1);
- if (name == NULL)
- return FALSE;
- memcpy (name, ent->root.string, 9);
- memcpy (name + 9, "ovl_call.", len1);
- memcpy (name + 9 + len1, ent->root.string + 9, len2 - 9 + 1);
- h = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE);
- if (h == NULL)
- return FALSE;
- if (h->root.type == bfd_link_hash_new)
- {
- h->root.type = bfd_link_hash_defined;
- h->root.u.def.section = sec;
- h->root.u.def.value = ent->off;
- h->size = (ent->delta == 0
- ? SIZEOF_STUB1 + SIZEOF_STUB2 : SIZEOF_STUB1);
- h->type = STT_FUNC;
- h->ref_regular = 1;
- h->def_regular = 1;
- h->ref_regular_nonweak = 1;
- h->forced_local = 1;
- h->non_elf = 0;
- }
- }
-
- return TRUE;
-}
-
-/* Define an STT_OBJECT symbol. */
-
-static struct elf_link_hash_entry *
-define_ovtab_symbol (struct spu_link_hash_table *htab, const char *name)
-{
- struct elf_link_hash_entry *h;
-
- h = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE);
- if (h == NULL)
- return NULL;
-
- if (h->root.type != bfd_link_hash_defined
- || !h->def_regular)
- {
- h->root.type = bfd_link_hash_defined;
- h->root.u.def.section = htab->ovtab;
- h->type = STT_OBJECT;
- h->ref_regular = 1;
- h->def_regular = 1;
- h->ref_regular_nonweak = 1;
- h->non_elf = 0;
- }
- else
- {
- (*_bfd_error_handler) (_("%B is not allowed to define %s"),
- h->root.u.def.section->owner,
- h->root.root.string);
- bfd_set_error (bfd_error_bad_value);
- return NULL;
- }
-
- return h;
-}
-
-/* Fill in all stubs and the overlay tables. */
-
-bfd_boolean
-spu_elf_build_stubs (struct bfd_link_info *info, int emit_syms, asection *toe)
-{
- struct spu_link_hash_table *htab = spu_hash_table (info);
- struct elf_link_hash_entry *h;
- bfd_byte *p;
- asection *s;
- bfd *obfd;
- unsigned int i;
-
- htab->emit_stub_syms = emit_syms;
- htab->stub->contents = bfd_zalloc (htab->stub->owner, htab->stub->size);
- if (htab->stub->contents == NULL)
- return FALSE;
-
- h = elf_link_hash_lookup (&htab->elf, "__ovly_load", FALSE, FALSE, FALSE);
- htab->ovly_load = h;
- BFD_ASSERT (h != NULL
- && (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && h->def_regular);
-
- s = h->root.u.def.section->output_section;
- if (spu_elf_section_data (s)->ovl_index)
- {
- (*_bfd_error_handler) (_("%s in overlay section"),
- h->root.u.def.section->owner);
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- /* Write out all the stubs. */
- bfd_hash_traverse (&htab->stub_hash_table, write_one_stub, htab);
-
- if (htab->stub_overflow)
- {
- (*_bfd_error_handler) (_("overlay stub relocation overflow"));
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- htab->ovtab->contents = bfd_zalloc (htab->ovtab->owner, htab->ovtab->size);
- if (htab->ovtab->contents == NULL)
- return FALSE;
-
- /* Write out _ovly_table. */
- p = htab->ovtab->contents;
- obfd = htab->ovtab->output_section->owner;
- for (s = obfd->sections; s != NULL; s = s->next)
- {
- unsigned int ovl_index = spu_elf_section_data (s)->ovl_index;
-
- if (ovl_index != 0)
- {
- unsigned int lo, hi, mid;
- unsigned long off = (ovl_index - 1) * 16;
- bfd_put_32 (htab->ovtab->owner, s->vma, p + off);
- bfd_put_32 (htab->ovtab->owner, (s->size + 15) & -16, p + off + 4);
- /* file_off written later in spu_elf_modify_program_headers. */
-
- lo = 0;
- hi = htab->num_buf;
- while (lo < hi)
- {
- mid = (lo + hi) >> 1;
- if (htab->ovl_region[2 * mid + 1]->vma
- + htab->ovl_region[2 * mid + 1]->size <= s->vma)
- lo = mid + 1;
- else if (htab->ovl_region[2 * mid]->vma > s->vma)
- hi = mid;
- else
- {
- bfd_put_32 (htab->ovtab->owner, mid + 1, p + off + 12);
- break;
- }
- }
- BFD_ASSERT (lo < hi);
- }
- }
-
- /* Write out _ovly_buf_table. */
- p = htab->ovtab->contents + htab->num_overlays * 16;
- for (i = 0; i < htab->num_buf; i++)
- {
- bfd_put_32 (htab->ovtab->owner, 0, p);
- p += 4;
- }
-
- h = define_ovtab_symbol (htab, "_ovly_table");
- if (h == NULL)
- return FALSE;
- h->root.u.def.value = 0;
- h->size = htab->num_overlays * 16;
-
- h = define_ovtab_symbol (htab, "_ovly_table_end");
- if (h == NULL)
- return FALSE;
- h->root.u.def.value = htab->num_overlays * 16;
- h->size = 0;
-
- h = define_ovtab_symbol (htab, "_ovly_buf_table");
- if (h == NULL)
- return FALSE;
- h->root.u.def.value = htab->num_overlays * 16;
- h->size = htab->num_buf * 4;
-
- h = define_ovtab_symbol (htab, "_ovly_buf_table_end");
- if (h == NULL)
- return FALSE;
- h->root.u.def.value = htab->num_overlays * 16 + htab->num_buf * 4;
- h->size = 0;
-
- h = define_ovtab_symbol (htab, "_EAR_");
- if (h == NULL)
- return FALSE;
- h->root.u.def.section = toe;
- h->root.u.def.value = 0;
- h->size = 16;
-
- return TRUE;
-}
-
-/* Apply RELOCS to CONTENTS of INPUT_SECTION from INPUT_BFD. */
-
-static bfd_boolean
-spu_elf_relocate_section (bfd *output_bfd,
- struct bfd_link_info *info,
- bfd *input_bfd,
- asection *input_section,
- bfd_byte *contents,
- Elf_Internal_Rela *relocs,
- Elf_Internal_Sym *local_syms,
- asection **local_sections)
-{
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- Elf_Internal_Rela *rel, *relend;
- struct spu_link_hash_table *htab;
- bfd_boolean ret = TRUE;
-
- if (info->relocatable)
- return TRUE;
-
- htab = spu_hash_table (info);
- symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
- sym_hashes = (struct elf_link_hash_entry **) (elf_sym_hashes (input_bfd));
-
- rel = relocs;
- relend = relocs + input_section->reloc_count;
- for (; rel < relend; rel++)
- {
- int r_type;
- reloc_howto_type *howto;
- unsigned long r_symndx;
- Elf_Internal_Sym *sym;
- asection *sec;
- struct elf_link_hash_entry *h;
- const char *sym_name;
- bfd_vma relocation;
- bfd_vma addend;
- bfd_reloc_status_type r;
- bfd_boolean unresolved_reloc;
- bfd_boolean warned;
-
- r_symndx = ELF32_R_SYM (rel->r_info);
- r_type = ELF32_R_TYPE (rel->r_info);
- howto = elf_howto_table + r_type;
- unresolved_reloc = FALSE;
- warned = FALSE;
-
- h = NULL;
- sym = NULL;
- sec = NULL;
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- sec = local_sections[r_symndx];
- sym_name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sec);
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
- }
- else
- {
- RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
- r_symndx, symtab_hdr, sym_hashes,
- h, sec, relocation,
- unresolved_reloc, warned);
- sym_name = h->root.root.string;
- }
-
- if (unresolved_reloc)
- {
- (*_bfd_error_handler)
- (_("%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'"),
- input_bfd,
- bfd_get_section_name (input_bfd, input_section),
- (long) rel->r_offset,
- howto->name,
- sym_name);
- ret = FALSE;
- }
-
- /* If this symbol is in an overlay area, we may need to relocate
- to the overlay stub. */
- addend = rel->r_addend;
- if (sec != NULL
- && sec->output_section != NULL
- && sec->output_section->owner == output_bfd
- && (spu_elf_section_data (sec->output_section)->ovl_index != 0
- || htab->non_overlay_stubs)
- && !(sec == input_section
- && is_branch (contents + rel->r_offset)))
- {
- char *stub_name;
- struct spu_stub_hash_entry *sh;
-
- stub_name = spu_stub_name (input_section, sec, h, rel);
- if (stub_name == NULL)
- return FALSE;
-
- sh = (struct spu_stub_hash_entry *)
- bfd_hash_lookup (&htab->stub_hash_table, stub_name, FALSE, FALSE);
- if (sh != NULL)
- {
- relocation = (htab->stub->output_section->vma
- + htab->stub->output_offset
- + sh->off);
- addend = 0;
- }
- free (stub_name);
- }
-
- r = _bfd_final_link_relocate (howto,
- input_bfd,
- input_section,
- contents,
- rel->r_offset, relocation, addend);
-
- if (r != bfd_reloc_ok)
- {
- const char *msg = (const char *) 0;
-
- switch (r)
- {
- case bfd_reloc_overflow:
- if (!((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), sym_name, howto->name,
- (bfd_vma) 0, input_bfd, input_section, rel->r_offset)))
- return FALSE;
- break;
-
- case bfd_reloc_undefined:
- if (!((*info->callbacks->undefined_symbol)
- (info, sym_name, input_bfd, input_section,
- rel->r_offset, TRUE)))
- return FALSE;
- break;
-
- case bfd_reloc_outofrange:
- msg = _("internal error: out of range error");
- goto common_error;
-
- case bfd_reloc_notsupported:
- msg = _("internal error: unsupported relocation error");
- goto common_error;
-
- case bfd_reloc_dangerous:
- msg = _("internal error: dangerous error");
- goto common_error;
-
- default:
- msg = _("internal error: unknown error");
- /* fall through */
-
- common_error:
- if (!((*info->callbacks->warning)
- (info, msg, sym_name, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
- break;
- }
- }
- }
-
- return ret;
-}
-
-static int spu_plugin = 0;
-
-void
-spu_elf_plugin (int val)
-{
- spu_plugin = val;
-}
-
-/* Set ELF header e_type for plugins. */
-
-static void
-spu_elf_post_process_headers (bfd *abfd,
- struct bfd_link_info *info ATTRIBUTE_UNUSED)
-{
- if (spu_plugin)
- {
- Elf_Internal_Ehdr *i_ehdrp = elf_elfheader (abfd);
-
- i_ehdrp->e_type = ET_DYN;
- }
-}
-
-/* We may add an extra PT_LOAD segment for .toe. We also need extra
- segments for overlays. */
-
-static int
-spu_elf_additional_program_headers (bfd *abfd, struct bfd_link_info *info)
-{
- struct spu_link_hash_table *htab = spu_hash_table (info);
- int extra = htab->num_overlays;
- asection *sec;
-
- if (extra)
- ++extra;
-
- sec = bfd_get_section_by_name (abfd, ".toe");
- if (sec != NULL && (sec->flags & SEC_LOAD) != 0)
- ++extra;
-
- return extra;
-}
-
-/* Remove .toe section from other PT_LOAD segments and put it in
- a segment of its own. Put overlays in separate segments too. */
-
-static bfd_boolean
-spu_elf_modify_segment_map (bfd *abfd, struct bfd_link_info *info)
-{
- asection *toe, *s;
- struct elf_segment_map *m;
- unsigned int i;
-
- if (info == NULL)
- return TRUE;
-
- toe = bfd_get_section_by_name (abfd, ".toe");
- for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
- if (m->p_type == PT_LOAD && m->count > 1)
- for (i = 0; i < m->count; i++)
- if ((s = m->sections[i]) == toe
- || spu_elf_section_data (s)->ovl_index != 0)
- {
- struct elf_segment_map *m2;
- bfd_vma amt;
-
- if (i + 1 < m->count)
- {
- amt = sizeof (struct elf_segment_map);
- amt += (m->count - (i + 2)) * sizeof (m->sections[0]);
- m2 = bfd_zalloc (abfd, amt);
- if (m2 == NULL)
- return FALSE;
- m2->count = m->count - (i + 1);
- memcpy (m2->sections, m->sections + i + 1,
- m2->count * sizeof (m->sections[0]));
- m2->p_type = PT_LOAD;
- m2->next = m->next;
- m->next = m2;
- }
- m->count = 1;
- if (i != 0)
- {
- m->count = i;
- amt = sizeof (struct elf_segment_map);
- m2 = bfd_zalloc (abfd, amt);
- if (m2 == NULL)
- return FALSE;
- m2->p_type = PT_LOAD;
- m2->count = 1;
- m2->sections[0] = s;
- m2->next = m->next;
- m->next = m2;
- }
- break;
- }
-
- return TRUE;
-}
-
-/* Check that all loadable section VMAs lie in the range
- LO .. HI inclusive. */
-
-asection *
-spu_elf_check_vma (bfd *abfd, bfd_vma lo, bfd_vma hi)
-{
- struct elf_segment_map *m;
- unsigned int i;
-
- for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
- if (m->p_type == PT_LOAD)
- for (i = 0; i < m->count; i++)
- if (m->sections[i]->size != 0
- && (m->sections[i]->vma < lo
- || m->sections[i]->vma > hi
- || m->sections[i]->vma + m->sections[i]->size - 1 > hi))
- return m->sections[i];
-
- return NULL;
-}
-
-/* Tweak phdrs before writing them out. */
-
-static int
-spu_elf_modify_program_headers (bfd *abfd, struct bfd_link_info *info)
-{
- const struct elf_backend_data *bed;
- struct elf_obj_tdata *tdata;
- Elf_Internal_Phdr *phdr, *last;
- struct spu_link_hash_table *htab;
- unsigned int count;
- unsigned int i;
-
- if (info == NULL)
- return TRUE;
-
- bed = get_elf_backend_data (abfd);
- tdata = elf_tdata (abfd);
- phdr = tdata->phdr;
- count = tdata->program_header_size / bed->s->sizeof_phdr;
- htab = spu_hash_table (info);
- if (htab->num_overlays != 0)
- {
- struct elf_segment_map *m;
- unsigned int o;
-
- for (i = 0, m = elf_tdata (abfd)->segment_map; m; ++i, m = m->next)
- if (m->count != 0
- && (o = spu_elf_section_data (m->sections[0])->ovl_index) != 0)
- {
- /* Mark this as an overlay header. */
- phdr[i].p_flags |= PF_OVERLAY;
-
- if (htab->ovtab != NULL && htab->ovtab->size != 0)
- {
- bfd_byte *p = htab->ovtab->contents;
- unsigned int off = (o - 1) * 16 + 8;
-
- /* Write file_off into _ovly_table. */
- bfd_put_32 (htab->ovtab->owner, phdr[i].p_offset, p + off);
- }
- }
- }
-
- /* Round up p_filesz and p_memsz of PT_LOAD segments to multiples
- of 16. This should always be possible when using the standard
- linker scripts, but don't create overlapping segments if
- someone is playing games with linker scripts. */
- last = NULL;
- for (i = count; i-- != 0; )
- if (phdr[i].p_type == PT_LOAD)
- {
- unsigned adjust;
-
- adjust = -phdr[i].p_filesz & 15;
- if (adjust != 0
- && last != NULL
- && phdr[i].p_offset + phdr[i].p_filesz > last->p_offset - adjust)
- break;
-
- adjust = -phdr[i].p_memsz & 15;
- if (adjust != 0
- && last != NULL
- && phdr[i].p_filesz != 0
- && phdr[i].p_vaddr + phdr[i].p_memsz > last->p_vaddr - adjust
- && phdr[i].p_vaddr + phdr[i].p_memsz <= last->p_vaddr)
- break;
-
- if (phdr[i].p_filesz != 0)
- last = &phdr[i];
- }
-
- if (i == (unsigned int) -1)
- for (i = count; i-- != 0; )
- if (phdr[i].p_type == PT_LOAD)
- {
- unsigned adjust;
-
- adjust = -phdr[i].p_filesz & 15;
- phdr[i].p_filesz += adjust;
-
- adjust = -phdr[i].p_memsz & 15;
- phdr[i].p_memsz += adjust;
- }
-
- return TRUE;
-}
-
-/* Arrange for our linker created section to be output. */
-
-static bfd_boolean
-spu_elf_section_processing (bfd *abfd ATTRIBUTE_UNUSED,
- Elf_Internal_Shdr *i_shdrp)
-{
- asection *sec;
-
- sec = i_shdrp->bfd_section;
- if (sec != NULL
- && (sec->flags & SEC_LINKER_CREATED) != 0
- && sec->name != NULL
- && strcmp (sec->name, SPU_PTNOTE_SPUNAME) == 0)
- i_shdrp->contents = sec->contents;
-
- return TRUE;
-}
-
-#define TARGET_BIG_SYM bfd_elf32_spu_vec
-#define TARGET_BIG_NAME "elf32-spu"
-#define ELF_ARCH bfd_arch_spu
-#define ELF_MACHINE_CODE EM_SPU
-/* This matches the alignment need for DMA. */
-#define ELF_MAXPAGESIZE 0x80
-#define elf_backend_rela_normal 1
-#define elf_backend_can_gc_sections 1
-
-#define bfd_elf32_bfd_reloc_type_lookup spu_elf_reloc_type_lookup
-#define elf_info_to_howto spu_elf_info_to_howto
-#define elf_backend_gc_mark_hook spu_elf_gc_mark_hook
-#define elf_backend_relocate_section spu_elf_relocate_section
-#define elf_backend_symbol_processing spu_elf_backend_symbol_processing
-#define bfd_elf32_new_section_hook spu_elf_new_section_hook
-#define bfd_elf32_bfd_link_hash_table_create spu_elf_link_hash_table_create
-#define bfd_elf32_bfd_link_hash_table_free spu_elf_link_hash_table_free
-
-#define elf_backend_additional_program_headers spu_elf_additional_program_headers
-#define elf_backend_modify_segment_map spu_elf_modify_segment_map
-#define elf_backend_modify_program_headers spu_elf_modify_program_headers
-#define elf_backend_post_process_headers spu_elf_post_process_headers
-#define elf_backend_section_processing spu_elf_section_processing
-#define elf_backend_special_sections spu_elf_special_sections
-
-#include "elf32-target.h"
diff --git a/bfd/elf32-spu.h b/bfd/elf32-spu.h
deleted file mode 100644
index 2d6eaf3..0000000
--- a/bfd/elf32-spu.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* SPU specific support for 32-bit ELF.
-
- Copyright 2006 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* Extra info kept for SPU sections. */
-
-struct _spu_elf_section_data
-{
- struct bfd_elf_section_data elf;
-
- /* Non-zero for overlay output sections. */
- unsigned int ovl_index;
-};
-
-#define spu_elf_section_data(sec) \
- ((struct _spu_elf_section_data *) elf_section_data (sec))
-
-struct _ovl_stream
-{
- void *start;
- void *end;
-};
-
-extern void spu_elf_plugin (int);
-extern bfd_boolean spu_elf_open_builtin_lib (bfd **,
- const struct _ovl_stream *);
-extern bfd_boolean spu_elf_create_sections (bfd *,
- struct bfd_link_info *);
-extern bfd_boolean spu_elf_find_overlays (bfd *, struct bfd_link_info *);
-extern bfd_boolean spu_elf_size_stubs (bfd *, struct bfd_link_info *, int,
- asection **, asection **,
- asection **);
-extern bfd_boolean spu_elf_build_stubs (struct bfd_link_info *, int,
- asection *);
-extern asection *spu_elf_check_vma (bfd *, bfd_vma, bfd_vma);
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 8a8179f..e3f1240 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -1711,22 +1711,50 @@ v850_elf_relocate_section (bfd *output_bfd,
return TRUE;
}
+static bfd_boolean
+v850_elf_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+{
+ /* No got and plt entries for v850-elf. */
+ return TRUE;
+}
+
static asection *
v850_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
{
case R_V850_GNU_VTINHERIT:
case R_V850_GNU_VTENTRY:
- return NULL;
- }
+ break;
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
}
/* Set the right machine number. */
@@ -3000,32 +3028,33 @@ v850_elf_relax_section (bfd *abfd,
static const struct bfd_elf_special_section v850_elf_special_sections[] =
{
- { STRING_COMMA_LEN (".call_table_data"), 0, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE) },
- { STRING_COMMA_LEN (".call_table_text"), 0, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE
- + SHF_EXECINSTR) },
- { STRING_COMMA_LEN (".rosdata"), -2, SHT_PROGBITS, (SHF_ALLOC
- + SHF_V850_GPREL) },
- { STRING_COMMA_LEN (".rozdata"), -2, SHT_PROGBITS, (SHF_ALLOC
- + SHF_V850_R0REL) },
- { STRING_COMMA_LEN (".sbss"), -2, SHT_NOBITS, (SHF_ALLOC + SHF_WRITE
- + SHF_V850_GPREL) },
- { STRING_COMMA_LEN (".scommon"), -2, SHT_V850_SCOMMON, (SHF_ALLOC + SHF_WRITE
- + SHF_V850_GPREL) },
- { STRING_COMMA_LEN (".sdata"), -2, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE
- + SHF_V850_GPREL) },
- { STRING_COMMA_LEN (".tbss"), -2, SHT_NOBITS, (SHF_ALLOC + SHF_WRITE
- + SHF_V850_EPREL) },
- { STRING_COMMA_LEN (".tcommon"), -2, SHT_V850_TCOMMON, (SHF_ALLOC + SHF_WRITE
- + SHF_V850_R0REL) },
- { STRING_COMMA_LEN (".tdata"), -2, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE
- + SHF_V850_EPREL) },
- { STRING_COMMA_LEN (".zbss"), -2, SHT_NOBITS, (SHF_ALLOC + SHF_WRITE
- + SHF_V850_R0REL) },
- { STRING_COMMA_LEN (".zcommon"), -2, SHT_V850_ZCOMMON, (SHF_ALLOC + SHF_WRITE
- + SHF_V850_R0REL) },
- { STRING_COMMA_LEN (".zdata"), -2, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE
- + SHF_V850_R0REL) },
- { NULL, 0, 0, 0, 0 }
+ { ".call_table_data", 16, 0, SHT_PROGBITS, (SHF_ALLOC
+ + SHF_WRITE) },
+ { ".call_table_text", 16, 0, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_EXECINSTR) },
+ { ".rosdata", 8, -2, SHT_PROGBITS, (SHF_ALLOC
+ + SHF_V850_GPREL) },
+ { ".rozdata", 8, -2, SHT_PROGBITS, (SHF_ALLOC
+ + SHF_V850_R0REL) },
+ { ".sbss", 5, -2, SHT_NOBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_GPREL) },
+ { ".scommon", 8, -2, SHT_V850_SCOMMON, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_GPREL) },
+ { ".sdata", 6, -2, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_GPREL) },
+ { ".tbss", 5, -2, SHT_NOBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_EPREL) },
+ { ".tcommon", 8, -2, SHT_V850_TCOMMON, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_R0REL) },
+ { ".tdata", 6, -2, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_EPREL) },
+ { ".zbss", 5, -2, SHT_NOBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_R0REL) },
+ { ".zcommon", 8, -2, SHT_V850_ZCOMMON, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_R0REL) },
+ { ".zdata", 6, -2, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_R0REL) },
+ { NULL, 0, 0, 0, 0 }
};
#define TARGET_LITTLE_SYM bfd_elf32_v850_vec
@@ -3050,6 +3079,7 @@ static const struct bfd_elf_special_section v850_elf_special_sections[] =
#define elf_backend_section_from_shdr v850_elf_section_from_shdr
#define elf_backend_fake_sections v850_elf_fake_sections
#define elf_backend_gc_mark_hook v850_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook v850_elf_gc_sweep_hook
#define elf_backend_special_sections v850_elf_special_sections
#define elf_backend_can_gc_sections 1
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index 2572b68..bf481e4 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -34,6 +34,13 @@ static struct bfd_hash_entry *elf_vax_link_hash_newfunc (struct bfd_hash_entry *
static struct bfd_link_hash_table *elf_vax_link_hash_table_create (bfd *);
static bfd_boolean elf_vax_check_relocs (bfd *, struct bfd_link_info *,
asection *, const Elf_Internal_Rela *);
+static asection *elf_vax_gc_mark_hook (asection *, struct bfd_link_info *,
+ Elf_Internal_Rela *,
+ struct elf_link_hash_entry *,
+ Elf_Internal_Sym *);
+static bfd_boolean elf_vax_gc_sweep_hook (bfd *, struct bfd_link_info *,
+ asection *,
+ const Elf_Internal_Rela *);
static bfd_boolean elf_vax_adjust_dynamic_symbol (struct bfd_link_info *,
struct elf_link_hash_entry *);
static bfd_boolean elf_vax_size_dynamic_sections (bfd *, struct bfd_link_info *);
@@ -731,7 +738,7 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
name + 5) == 0);
@@ -822,20 +829,38 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
static asection *
elf_vax_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_VAX_GNU_VTINHERIT:
- case R_VAX_GNU_VTENTRY:
- return NULL;
- }
-
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_VAX_GNU_VTINHERIT:
+ case R_VAX_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ default:
+ break;
+
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
}
/* Update the got entry reference counts for the section being removed. */
@@ -1169,7 +1194,7 @@ elf_vax_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
/* Remember whether there is a PLT. */
plt = s->size != 0;
}
- else if (CONST_STRNEQ (name, ".rela"))
+ else if (strncmp (name, ".rela", 5) == 0)
{
if (s->size != 0)
{
@@ -1201,7 +1226,7 @@ elf_vax_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
s->reloc_count = 0;
}
}
- else if (! CONST_STRNEQ (name, ".got")
+ else if (strncmp (name, ".got", 4) != 0
&& strcmp (name, ".dynbss") != 0)
{
/* It's not one of our sections, so don't allocate space. */
@@ -1621,7 +1646,7 @@ elf_vax_relocate_section (bfd *output_bfd,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (input_bfd,
input_section),
name + 5) == 0);
@@ -1680,21 +1705,9 @@ elf_vax_relocate_section (bfd *output_bfd,
{
asection *osec;
- /* We are turning this relocation into one
- against a section symbol. It would be
- proper to subtract the symbol's value,
- osec->vma, from the emitted reloc addend,
- but ld.so expects buggy relocs. */
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
- if (indx == 0)
- {
- struct elf_link_hash_table *htab;
- htab = elf_hash_table (info);
- osec = htab->text_index_section;
- indx = elf_section_data (osec)->dynindx;
- }
- BFD_ASSERT (indx != 0);
+ BFD_ASSERT (indx > 0);
}
outrel.r_info = ELF32_R_INFO (indx, r_type);
@@ -2074,7 +2087,6 @@ elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
elf_vax_adjust_dynamic_symbol
#define elf_backend_size_dynamic_sections \
elf_vax_size_dynamic_sections
-#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_relocate_section elf_vax_relocate_section
#define elf_backend_finish_dynamic_symbol \
elf_vax_finish_dynamic_symbol
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index c5c88c7..1341a44 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -1,6 +1,5 @@
/* Xstormy16-specific support for 32-bit ELF.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -968,21 +967,50 @@ xstormy16_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED,
relocation. */
static asection *
-xstormy16_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
+xstormy16_elf_gc_mark_hook (asection * sec,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela * rel,
+ struct elf_link_hash_entry * h,
+ Elf_Internal_Sym * sym)
{
if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_XSTORMY16_GNU_VTINHERIT:
- case R_XSTORMY16_GNU_VTENTRY:
- return NULL;
- }
-
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_XSTORMY16_GNU_VTINHERIT:
+ case R_XSTORMY16_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static bfd_boolean
+xstormy16_elf_gc_sweep_hook (bfd * abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ asection * sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED)
+{
+ return TRUE;
}
#define ELF_ARCH bfd_arch_xstormy16
@@ -996,11 +1024,10 @@ xstormy16_elf_gc_mark_hook (asection *sec,
#define elf_info_to_howto xstormy16_info_to_howto_rela
#define elf_backend_relocate_section xstormy16_elf_relocate_section
#define elf_backend_gc_mark_hook xstormy16_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook xstormy16_elf_gc_sweep_hook
#define elf_backend_check_relocs xstormy16_elf_check_relocs
#define elf_backend_always_size_sections \
xstormy16_elf_always_size_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define elf_backend_finish_dynamic_sections \
xstormy16_elf_finish_dynamic_sections
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 59ed4ba..88365dd 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -966,20 +966,38 @@ elf_xtensa_hide_symbol (struct bfd_link_info *info,
static asection *
elf_xtensa_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
- if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_XTENSA_GNU_VTINHERIT:
- case R_XTENSA_GNU_VTENTRY:
- return NULL;
- }
+ if (h)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_XTENSA_GNU_VTINHERIT:
+ case R_XTENSA_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ return NULL;
}
@@ -1123,7 +1141,8 @@ add_extra_plt_sections (bfd *dynobj, int count)
sname = (char *) bfd_malloc (10);
sprintf (sname, ".plt.%u", chunk);
- s = bfd_make_section_with_flags (dynobj, sname, flags | SEC_CODE);
+ s = bfd_make_section_with_flags (dynobj, sname,
+ flags | SEC_CODE);
if (s == NULL
|| ! bfd_set_section_alignment (dynobj, s, 2))
return FALSE;
@@ -1390,7 +1409,7 @@ elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- if (CONST_STRNEQ (name, ".rela"))
+ if (strncmp (name, ".rela", 5) == 0)
{
if (s->size != 0)
{
@@ -1404,8 +1423,8 @@ elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
s->reloc_count = 0;
}
}
- else if (! CONST_STRNEQ (name, ".plt.")
- && ! CONST_STRNEQ (name, ".got.plt.")
+ else if (strncmp (name, ".plt.", 5) != 0
+ && strncmp (name, ".got.plt.", 9) != 0
&& strcmp (name, ".got") != 0
&& strcmp (name, ".plt") != 0
&& strcmp (name, ".got.plt") != 0
@@ -1470,7 +1489,7 @@ elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
#define add_dynamic_entry(TAG, VAL) \
_bfd_elf_add_dynamic_entry (info, TAG, VAL)
- if (info->executable)
+ if (! info->shared)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
@@ -2259,26 +2278,13 @@ elf_xtensa_relocate_section (bfd *output_bfd,
if (unresolved_reloc
&& !((input_section->flags & SEC_DEBUGGING) != 0
&& h->def_dynamic))
- {
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
- input_bfd,
- input_section,
- (long) rel->r_offset,
- howto->name,
- h->root.root.string);
- return FALSE;
- }
-
- if (r_symndx == 0)
- {
- /* r_symndx will be zero only for relocs against symbols from
- removed linkonce sections, or sections discarded by a linker
- script. For these relocs, we just want the section contents
- zeroed. Avoid any special processing. */
- _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
- continue;
- }
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
+ (long) rel->r_offset,
+ howto->name,
+ h->root.root.string);
/* There's no point in calling bfd_perform_relocation here.
Just go directly to our "special function". */
@@ -2339,17 +2345,12 @@ elf_xtensa_finish_dynamic_symbol (bfd *output_bfd ATTRIBUTE_UNUSED,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
- if (h->needs_plt && !h->def_regular)
+ if (h->needs_plt
+ && !h->def_regular)
{
/* Mark the symbol as undefined, rather than as defined in
the .plt section. Leave the value alone. */
sym->st_shndx = SHN_UNDEF;
- /* If the symbol is weak, we do need to clear the value.
- Otherwise, the PLT entry would provide a definition for
- the symbol even if the symbol wasn't defined anywhere,
- and so the symbol would never be NULL. */
- if (!h->ref_regular_nonweak)
- sym->st_value = 0;
}
/* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */
@@ -2979,19 +2980,6 @@ elf_xtensa_ignore_discarded_relocs (asection *sec)
return xtensa_is_property_section (sec);
}
-
-static unsigned int
-elf_xtensa_action_discarded (asection *sec)
-{
- if (strcmp (".xt_except_table", sec->name) == 0)
- return 0;
-
- if (strcmp (".xt_except_desc", sec->name) == 0)
- return 0;
-
- return _bfd_elf_default_action_discarded (sec);
-}
-
/* Support for core dump NOTE sections. */
@@ -8866,8 +8854,10 @@ relax_property_section (bfd *abfd,
}
is_full_prop_section =
- ( CONST_STRNEQ (sec->name, XTENSA_PROP_SEC_NAME)
- || CONST_STRNEQ (sec->name, ".gnu.linkonce.prop."));
+ ((strncmp (sec->name, XTENSA_PROP_SEC_NAME,
+ sizeof (XTENSA_PROP_SEC_NAME) - 1) == 0)
+ || (strncmp (sec->name, ".gnu.linkonce.prop.",
+ sizeof ".gnu.linkonce.prop." - 1) == 0));
if (internal_relocs)
{
@@ -9528,19 +9518,23 @@ pcrel_reloc_fits (xtensa_opcode opc,
static int linkonce_len = sizeof (".gnu.linkonce.") - 1;
+static int insn_sec_len = sizeof (XTENSA_INSN_SEC_NAME) - 1;
+static int lit_sec_len = sizeof (XTENSA_LIT_SEC_NAME) - 1;
+static int prop_sec_len = sizeof (XTENSA_PROP_SEC_NAME) - 1;
+
static bfd_boolean
xtensa_is_property_section (asection *sec)
{
- if (CONST_STRNEQ (sec->name, XTENSA_INSN_SEC_NAME)
- || CONST_STRNEQ (sec->name, XTENSA_LIT_SEC_NAME)
- || CONST_STRNEQ (sec->name, XTENSA_PROP_SEC_NAME))
+ if (strncmp (XTENSA_INSN_SEC_NAME, sec->name, insn_sec_len) == 0
+ || strncmp (XTENSA_LIT_SEC_NAME, sec->name, lit_sec_len) == 0
+ || strncmp (XTENSA_PROP_SEC_NAME, sec->name, prop_sec_len) == 0)
return TRUE;
if (strncmp (".gnu.linkonce.", sec->name, linkonce_len) == 0
- && (CONST_STRNEQ (&sec->name[linkonce_len], "x.")
- || CONST_STRNEQ (&sec->name[linkonce_len], "p.")
- || CONST_STRNEQ (&sec->name[linkonce_len], "prop.")))
+ && (strncmp (&sec->name[linkonce_len], "x.", 2) == 0
+ || strncmp (&sec->name[linkonce_len], "p.", 2) == 0
+ || strncmp (&sec->name[linkonce_len], "prop.", 5) == 0))
return TRUE;
return FALSE;
@@ -9550,7 +9544,7 @@ xtensa_is_property_section (asection *sec)
static bfd_boolean
xtensa_is_littable_section (asection *sec)
{
- if (CONST_STRNEQ (sec->name, XTENSA_LIT_SEC_NAME))
+ if (strncmp (XTENSA_LIT_SEC_NAME, sec->name, lit_sec_len) == 0)
return TRUE;
if (strncmp (".gnu.linkonce.", sec->name, linkonce_len) == 0
@@ -9652,7 +9646,7 @@ xtensa_get_property_section (asection *sec, const char *base_name)
suffix = sec->name + linkonce_len;
/* For backward compatibility, replace "t." instead of inserting
the new linkonce_kind (but not for "prop" sections). */
- if (CONST_STRNEQ (suffix, "t.") && linkonce_kind[1] == '.')
+ if (strncmp (suffix, "t.", 2) == 0 && linkonce_kind[1] == '.')
suffix += 2;
strcat (prop_sec_name + linkonce_len, suffix);
}
@@ -9686,8 +9680,10 @@ xtensa_get_property_section (asection *sec, const char *base_name)
flagword
xtensa_get_property_predef_flags (asection *sec)
{
- if (CONST_STRNEQ (sec->name, XTENSA_INSN_SEC_NAME)
- || CONST_STRNEQ (sec->name, ".gnu.linkonce.x."))
+ if (strncmp (sec->name, XTENSA_INSN_SEC_NAME,
+ sizeof (XTENSA_INSN_SEC_NAME) - 1) == 0
+ || strncmp (sec->name, ".gnu.linkonce.x.",
+ sizeof ".gnu.linkonce.x." - 1) == 0)
return (XTENSA_PROP_INSN
| XTENSA_PROP_INSN_NO_TRANSFORM
| XTENSA_PROP_INSN_NO_REORDER);
@@ -9721,7 +9717,7 @@ xtensa_callback_required_dependence (bfd *abfd,
/* ".plt*" sections have no explicit relocations but they contain L32R
instructions that reference the corresponding ".got.plt*" sections. */
if ((sec->flags & SEC_LINKER_CREATED) != 0
- && CONST_STRNEQ (sec->name, ".plt"))
+ && strncmp (sec->name, ".plt", 4) == 0)
{
asection *sgotplt;
@@ -9798,10 +9794,10 @@ xtensa_callback_required_dependence (bfd *abfd,
module loader so that the literals are not placed after the text. */
static const struct bfd_elf_special_section elf_xtensa_special_sections[] =
{
- { STRING_COMMA_LEN (".fini.literal"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { STRING_COMMA_LEN (".init.literal"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { STRING_COMMA_LEN (".literal"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { NULL, 0, 0, 0, 0 }
+ { ".fini.literal", 13, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { ".init.literal", 13, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { ".literal", 8, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { NULL, 0, 0, 0, 0 }
};
#ifndef ELF_ARCH
@@ -9854,9 +9850,6 @@ static const struct bfd_elf_special_section elf_xtensa_special_sections[] =
#define elf_backend_reloc_type_class elf_xtensa_reloc_type_class
#define elf_backend_relocate_section elf_xtensa_relocate_section
#define elf_backend_size_dynamic_sections elf_xtensa_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define elf_backend_special_sections elf_xtensa_special_sections
-#define elf_backend_action_discarded elf_xtensa_action_discarded
#include "elf32-target.h"
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 1f7e546..0823f5c 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -1901,7 +1901,7 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (rel_sec_name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (rel_sec_name, ".rela")
+ BFD_ASSERT (strncmp (rel_sec_name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
rel_sec_name+5) == 0);
}
@@ -2761,7 +2761,7 @@ elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- if (CONST_STRNEQ (name, ".rela"))
+ if (strncmp (name, ".rela", 5) == 0)
{
if (s->size != 0)
{
@@ -2773,7 +2773,7 @@ elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
s->reloc_count = 0;
}
}
- else if (! CONST_STRNEQ (name, ".got")
+ else if (strncmp (name, ".got", 4) != 0
&& strcmp (name, ".plt") != 0
&& strcmp (name, ".dynbss") != 0)
{
@@ -5148,9 +5148,9 @@ elf64_alpha_reloc_type_class (const Elf_Internal_Rela *rela)
static const struct bfd_elf_special_section elf64_alpha_special_sections[] =
{
- { STRING_COMMA_LEN (".sbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
- { STRING_COMMA_LEN (".sdata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
- { NULL, 0, 0, 0, 0 }
+ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
+ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
+ { NULL, 0, 0, 0, 0 }
};
/* ECOFF swapping routines. These are used when dealing with the
@@ -5275,8 +5275,6 @@ static const struct elf_size_info alpha_elf_size_info =
elf64_alpha_always_size_sections
#define elf_backend_size_dynamic_sections \
elf64_alpha_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define elf_backend_relocate_section \
elf64_alpha_relocate_section
#define elf_backend_finish_dynamic_symbol \
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 4b5e95d..7fcc94f 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -517,12 +517,12 @@ get_reloc_section (abfd, hppa_info, sec)
if (srel_name == NULL)
return FALSE;
- BFD_ASSERT ((CONST_STRNEQ (srel_name, ".rela")
+ BFD_ASSERT ((strncmp (srel_name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
- srel_name + 5) == 0)
- || (CONST_STRNEQ (srel_name, ".rel")
+ srel_name+5) == 0)
+ || (strncmp (srel_name, ".rel", 4) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
- srel_name + 4) == 0));
+ srel_name+4) == 0));
dynobj = hppa_info->root.dynobj;
if (!dynobj)
@@ -1713,13 +1713,13 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
plt = s->size != 0;
}
else if (strcmp (name, ".opd") == 0
- || CONST_STRNEQ (name, ".dlt")
+ || strncmp (name, ".dlt", 4) == 0
|| strcmp (name, ".stub") == 0
|| strcmp (name, ".got") == 0)
{
/* Strip this section if we don't need it; see the comment below. */
}
- else if (CONST_STRNEQ (name, ".rela"))
+ else if (strncmp (name, ".rela", 5) == 0)
{
if (s->size != 0)
{
@@ -2752,14 +2752,14 @@ elf64_hppa_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int index,
static const struct bfd_elf_special_section elf64_hppa_special_sections[] =
{
- { STRING_COMMA_LEN (".fini"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".init"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".plt"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT },
- { STRING_COMMA_LEN (".dlt"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT },
- { STRING_COMMA_LEN (".sdata"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT },
- { STRING_COMMA_LEN (".sbss"), 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT },
- { STRING_COMMA_LEN (".tbss"), 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_HP_TLS },
- { NULL, 0, 0, 0, 0 }
+ { ".fini", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".init", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".plt", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT },
+ { ".dlt", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT },
+ { ".sdata", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT },
+ { ".sbss", 5, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT },
+ { ".tbss", 5, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_HP_TLS },
+ { NULL, 0, 0, 0, 0 }
};
/* The hash bucket size is the standard one, namely 4. */
@@ -2820,8 +2820,6 @@ const struct elf_size_info hppa64_elf_size_info =
elf64_hppa_create_dynamic_sections
#define elf_backend_post_process_headers elf64_hppa_post_process_headers
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define elf_backend_adjust_dynamic_symbol \
elf64_hppa_adjust_dynamic_symbol
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index 34b02e4..09d13e8 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -789,21 +789,6 @@ static reloc_howto_type mips_elf64_howto_table_rel[] =
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
-
- /* 32 bit relocation with no addend. */
- HOWTO (R_MIPS_GLOB_DAT, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- _bfd_mips_elf_generic_reloc, /* special_function */
- "R_MIPS_GLOB_DAT", /* name */
- FALSE, /* partial_inplace */
- 0x0, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
};
/* The relocation table used for SHT_RELA sections. */
@@ -1436,21 +1421,6 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
-
- /* 32 bit relocation with no addend. */
- HOWTO (R_MIPS_GLOB_DAT, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- _bfd_mips_elf_generic_reloc, /* special_function */
- "R_MIPS_GLOB_DAT", /* name */
- FALSE, /* partial_inplace */
- 0x0, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
};
static reloc_howto_type mips16_elf64_howto_table_rel[] =
@@ -3064,7 +3034,6 @@ const struct elf_size_info mips_elf64_size_info =
_bfd_mips_elf_always_size_sections
#define elf_backend_size_dynamic_sections \
_bfd_mips_elf_size_dynamic_sections
-#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
#define elf_backend_finish_dynamic_symbol \
_bfd_mips_elf_finish_dynamic_symbol
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index e18f4a1..d8dfc56 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -187,6 +187,14 @@ static bfd_boolean mmix_elf_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+static asection * mmix_elf_gc_mark_hook
+ PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+
+static bfd_boolean mmix_elf_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
+
static bfd_reloc_status_type mmix_final_link_relocate
PARAMS ((reloc_howto_type *, asection *, bfd_byte *,
bfd_vma, bfd_signed_vma, bfd_vma, const char *, asection *));
@@ -1736,21 +1744,40 @@ mmix_final_link_relocate (howto, input_section, contents,
relocation. */
static asection *
-mmix_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
+mmix_elf_gc_mark_hook (sec, info, rel, h, sym)
+ asection *sec;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
{
if (h != NULL)
- switch (ELF64_R_TYPE (rel->r_info))
- {
- case R_MMIX_GNU_VTINHERIT:
- case R_MMIX_GNU_VTENTRY:
- return NULL;
- }
+ {
+ switch (ELF64_R_TYPE (rel->r_info))
+ {
+ case R_MMIX_GNU_VTINHERIT:
+ case R_MMIX_GNU_VTENTRY:
+ break;
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
}
/* Update relocation info for a GC-excluded section. We could supposedly
@@ -1759,10 +1786,11 @@ mmix_elf_gc_mark_hook (asection *sec,
present. Better to waste some memory and (perhaps) a little time. */
static bfd_boolean
-mmix_elf_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
- asection *sec,
- const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+mmix_elf_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
{
struct bpo_reloc_section_info *bpodata
= mmix_elf_section_data (sec)->bpo.reloc;
@@ -2165,7 +2193,8 @@ mmix_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
(*secp)->flags |= SEC_LINKER_CREATED;
}
else if ((*namep)[0] == '_' && (*namep)[1] == '_' && (*namep)[2] == '.'
- && CONST_STRNEQ (*namep, MMIX_LOC_SECTION_START_SYMBOL_PREFIX))
+ && strncmp (*namep, MMIX_LOC_SECTION_START_SYMBOL_PREFIX,
+ strlen (MMIX_LOC_SECTION_START_SYMBOL_PREFIX)) == 0)
{
/* See if we have another one. */
struct bfd_link_hash_entry *h = bfd_link_hash_lookup (info->hash,
@@ -2916,8 +2945,6 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
#define elf_backend_check_relocs mmix_elf_check_relocs
#define elf_backend_symbol_processing mmix_elf_symbol_processing
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define bfd_elf64_bfd_is_local_label_name \
mmix_elf_is_local_label_name
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 0c81e5e..4fd6bf7 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -97,7 +97,6 @@ static bfd_vma opd_entry_value
#define elf_backend_hide_symbol ppc64_elf_hide_symbol
#define elf_backend_always_size_sections ppc64_elf_func_desc_adjust
#define elf_backend_size_dynamic_sections ppc64_elf_size_dynamic_sections
-#define elf_backend_init_index_section _bfd_elf_init_2_index_sections
#define elf_backend_action_discarded ppc64_elf_action_discarded
#define elf_backend_relocate_section ppc64_elf_relocate_section
#define elf_backend_finish_dynamic_symbol ppc64_elf_finish_dynamic_symbol
@@ -2377,9 +2376,14 @@ struct ppc64_elf_obj_tdata
asection *got;
asection *relgot;
- /* Used during garbage collection. We attach global symbols defined
- on removed .opd entries to this section so that the sym is removed. */
- asection *deleted_section;
+ union {
+ /* Used during garbage collection. We attach global symbols defined
+ on removed .opd entries to this section so that the sym is removed. */
+ asection *deleted_section;
+
+ /* Used when adding symbols. */
+ bfd_boolean has_dotsym;
+ } u;
/* TLS local dynamic got entry handling. Suppose for multiple GOT
sections means we potentially need one of these for each input bfd. */
@@ -2516,19 +2520,13 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
static const struct bfd_elf_special_section ppc64_elf_special_sections[]=
{
- { STRING_COMMA_LEN (".plt"), 0, SHT_NOBITS, 0 },
- { STRING_COMMA_LEN (".sbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".sdata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".toc"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".toc1"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { STRING_COMMA_LEN (".tocbss"), 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, 0, 0, 0 }
-};
-
-enum _ppc64_sec_type {
- sec_normal = 0,
- sec_opd = 1,
- sec_toc = 2
+ { ".plt", 4, 0, SHT_NOBITS, 0 },
+ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".toc", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".toc1", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".tocbss", 7, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
struct _ppc64_elf_section_data
@@ -2539,20 +2537,14 @@ struct _ppc64_elf_section_data
union
{
/* Points to the function code section for local opd entries. */
- asection **opd_func_sec;
+ asection **func_sec;
/* After editing .opd, adjust references to opd local syms. */
- long *opd_adjust;
-
- /* An array for toc sections, indexed by offset/8.
- Specifies the relocation symbol index used at a given toc offset. */
- unsigned *t_symndx;
- } u;
-
- enum _ppc64_sec_type sec_type:2;
+ long *adjust;
+ } opd;
- /* Flag set when small branches are detected. Used to
- select suitable defaults for the stub group size. */
- unsigned int has_14bit_branch:1;
+ /* An array for toc sections, indexed by offset/8.
+ Specifies the relocation symbol index used at a given toc offset. */
+ unsigned *t_symndx;
};
#define ppc64_elf_section_data(sec) \
@@ -2580,8 +2572,8 @@ get_opd_info (asection * sec)
{
if (sec != NULL
&& ppc64_elf_section_data (sec) != NULL
- && ppc64_elf_section_data (sec)->sec_type == sec_opd)
- return ppc64_elf_section_data (sec)->u.opd_adjust;
+ && ppc64_elf_section_data (sec)->opd.adjust != NULL)
+ return ppc64_elf_section_data (sec)->opd.adjust;
return NULL;
}
@@ -3248,14 +3240,9 @@ struct ppc_link_hash_entry
{
struct elf_link_hash_entry elf;
- union {
- /* A pointer to the most recently used stub hash entry against this
- symbol. */
- struct ppc_stub_hash_entry *stub_cache;
-
- /* A pointer to the next symbol starting with a '.' */
- struct ppc_link_hash_entry *next_dot_sym;
- } u;
+ /* A pointer to the most recently used stub hash entry against this
+ symbol. */
+ struct ppc_stub_hash_entry *stub_cache;
/* Track dynamic relocs copied for this symbol. */
struct ppc_dyn_relocs *dyn_relocs;
@@ -3333,9 +3320,6 @@ struct ppc_link_hash_table
/* Highest output section index. */
int top_index;
- /* Used when adding symbols. */
- struct ppc_link_hash_entry *dot_syms;
-
/* List of input sections for each output section. */
asection **input_list;
@@ -3370,6 +3354,10 @@ struct ppc_link_hash_table
/* Set on error. */
unsigned int stub_error:1;
+ /* Flag set when small branches are detected. Used to
+ select suitable defaults for the stub group size. */
+ unsigned int has_14bit_branch:1;
+
/* Temp used by ppc64_elf_check_directives. */
unsigned int twiddled_syms:1;
@@ -3488,34 +3476,9 @@ link_hash_newfunc (struct bfd_hash_entry *entry,
{
struct ppc_link_hash_entry *eh = (struct ppc_link_hash_entry *) entry;
- memset (&eh->u.stub_cache, 0,
+ memset (&eh->stub_cache, 0,
(sizeof (struct ppc_link_hash_entry)
- - offsetof (struct ppc_link_hash_entry, u.stub_cache)));
-
- /* When making function calls, old ABI code references function entry
- points (dot symbols), while new ABI code references the function
- descriptor symbol. We need to make any combination of reference and
- definition work together, without breaking archive linking.
-
- For a defined function "foo" and an undefined call to "bar":
- An old object defines "foo" and ".foo", references ".bar" (possibly
- "bar" too).
- A new object defines "foo" and references "bar".
-
- A new object thus has no problem with its undefined symbols being
- satisfied by definitions in an old object. On the other hand, the
- old object won't have ".bar" satisfied by a new object.
-
- Keep a list of newly added dot-symbols. */
-
- if (string[0] == '.')
- {
- struct ppc_link_hash_table *htab;
-
- htab = (struct ppc_link_hash_table *) table;
- eh->u.next_dot_sym = htab->dot_syms;
- htab->dot_syms = eh;
- }
+ - offsetof (struct ppc_link_hash_entry, stub_cache)));
}
return entry;
@@ -3661,11 +3624,11 @@ ppc_get_stub_entry (const asection *input_section,
distinguish between them. */
id_sec = htab->stub_group[input_section->id].link_sec;
- if (h != NULL && h->u.stub_cache != NULL
- && h->u.stub_cache->h == h
- && h->u.stub_cache->id_sec == id_sec)
+ if (h != NULL && h->stub_cache != NULL
+ && h->stub_cache->h == h
+ && h->stub_cache->id_sec == id_sec)
{
- stub_entry = h->u.stub_cache;
+ stub_entry = h->stub_cache;
}
else
{
@@ -3678,7 +3641,7 @@ ppc_get_stub_entry (const asection *input_section,
stub_entry = ppc_stub_hash_lookup (&htab->stub_hash_table,
stub_name, FALSE, FALSE);
if (h != NULL)
- h->u.stub_cache = stub_entry;
+ h->stub_cache = stub_entry;
free (stub_name);
}
@@ -4087,14 +4050,29 @@ make_fdh (struct bfd_link_info *info,
return fdh;
}
+/* Hacks to support old ABI code.
+ When making function calls, old ABI code references function entry
+ points (dot symbols), while new ABI code references the function
+ descriptor symbol. We need to make any combination of reference and
+ definition work together, without breaking archive linking.
+
+ For a defined function "foo" and an undefined call to "bar":
+ An old object defines "foo" and ".foo", references ".bar" (possibly
+ "bar" too).
+ A new object defines "foo" and references "bar".
+
+ A new object thus has no problem with its undefined symbols being
+ satisfied by definitions in an old object. On the other hand, the
+ old object won't have ".bar" satisfied by a new object. */
+
/* Fix function descriptor symbols defined in .opd sections to be
function type. */
static bfd_boolean
-ppc64_elf_add_symbol_hook (bfd *ibfd ATTRIBUTE_UNUSED,
+ppc64_elf_add_symbol_hook (bfd *ibfd,
struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Sym *isym,
- const char **name ATTRIBUTE_UNUSED,
+ const char **name,
flagword *flags ATTRIBUTE_UNUSED,
asection **sec,
bfd_vma *value ATTRIBUTE_UNUSED)
@@ -4103,6 +4081,12 @@ ppc64_elf_add_symbol_hook (bfd *ibfd ATTRIBUTE_UNUSED,
&& strcmp (bfd_get_section_name (ibfd, *sec), ".opd") == 0)
isym->st_info = ELF_ST_INFO (ELF_ST_BIND (isym->st_info), STT_FUNC);
+ if ((*name)[0] == '.'
+ && ELF_ST_BIND (isym->st_info) == STB_GLOBAL
+ && ELF_ST_TYPE (isym->st_info) < STT_SECTION
+ && is_ppc64_elf_target (ibfd->xvec))
+ ppc64_elf_tdata (ibfd)->u.has_dotsym = 1;
+
return TRUE;
}
@@ -4151,25 +4135,35 @@ ppc64_elf_archive_symbol_lookup (bfd *abfd,
most restrictive visibility of the function descriptor and the
function entry symbol is used. */
+struct add_symbol_adjust_data
+{
+ struct bfd_link_info *info;
+ bfd_boolean ok;
+};
+
static bfd_boolean
-add_symbol_adjust (struct ppc_link_hash_entry *eh, struct bfd_link_info *info)
+add_symbol_adjust (struct elf_link_hash_entry *h, void *inf)
{
+ struct add_symbol_adjust_data *data;
struct ppc_link_hash_table *htab;
+ struct ppc_link_hash_entry *eh;
struct ppc_link_hash_entry *fdh;
- if (eh->elf.root.type == bfd_link_hash_indirect)
+ if (h->root.type == bfd_link_hash_indirect)
return TRUE;
- if (eh->elf.root.type == bfd_link_hash_warning)
- eh = (struct ppc_link_hash_entry *) eh->elf.root.u.i.link;
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
- if (eh->elf.root.root.string[0] != '.')
- abort ();
+ if (h->root.root.string[0] != '.')
+ return TRUE;
- htab = ppc_hash_table (info);
+ data = inf;
+ htab = ppc_hash_table (data->info);
+ eh = (struct ppc_link_hash_entry *) h;
fdh = get_fdh (eh, htab);
if (fdh == NULL
- && !info->relocatable
+ && !data->info->relocatable
&& (eh->elf.root.type == bfd_link_hash_undefined
|| eh->elf.root.type == bfd_link_hash_undefweak)
&& eh->elf.ref_regular)
@@ -4177,9 +4171,9 @@ add_symbol_adjust (struct ppc_link_hash_entry *eh, struct bfd_link_info *info)
/* Make an undefweak function descriptor sym, which is enough to
pull in an --as-needed shared lib, but won't cause link
errors. Archives are handled elsewhere. */
- fdh = make_fdh (info, eh);
+ fdh = make_fdh (data->info, eh);
if (fdh == NULL)
- return FALSE;
+ data->ok = FALSE;
else
fdh->elf.ref_regular = 1;
}
@@ -4205,37 +4199,26 @@ add_symbol_adjust (struct ppc_link_hash_entry *eh, struct bfd_link_info *info)
return TRUE;
}
-/* Process list of dot-symbols we made in link_hash_newfunc. */
-
static bfd_boolean
-ppc64_elf_check_directives (bfd *ibfd, struct bfd_link_info *info)
+ppc64_elf_check_directives (bfd *abfd, struct bfd_link_info *info)
{
struct ppc_link_hash_table *htab;
- struct ppc_link_hash_entry **p, *eh;
+ struct add_symbol_adjust_data data;
+
+ if (!is_ppc64_elf_target (abfd->xvec))
+ return TRUE;
+
+ if (!ppc64_elf_tdata (abfd)->u.has_dotsym)
+ return TRUE;
+ ppc64_elf_tdata (abfd)->u.deleted_section = NULL;
htab = ppc_hash_table (info);
if (!is_ppc64_elf_target (htab->elf.root.creator))
return TRUE;
- if (is_ppc64_elf_target (ibfd->xvec))
- {
- p = &htab->dot_syms;
- while ((eh = *p) != NULL)
- {
- *p = NULL;
- if (!add_symbol_adjust (eh, info))
- return FALSE;
- p = &eh->u.next_dot_sym;
- }
- }
-
- /* Clear the list for non-ppc64 input files. */
- p = &htab->dot_syms;
- while ((eh = *p) != NULL)
- {
- *p = NULL;
- p = &eh->u.next_dot_sym;
- }
+ data.info = info;
+ data.ok = TRUE;
+ elf_link_hash_traverse (&htab->elf, add_symbol_adjust, &data);
/* We need to fix the undefs list for any syms we have twiddled to
undef_weak. */
@@ -4244,7 +4227,7 @@ ppc64_elf_check_directives (bfd *ibfd, struct bfd_link_info *info)
bfd_link_repair_undef_list (&htab->elf.root);
htab->twiddled_syms = 0;
}
- return TRUE;
+ return data.ok;
}
static bfd_boolean
@@ -4381,9 +4364,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
opd_sym_map = bfd_zalloc (abfd, amt);
if (opd_sym_map == NULL)
return FALSE;
- ppc64_elf_section_data (sec)->u.opd_func_sec = opd_sym_map;
- BFD_ASSERT (ppc64_elf_section_data (sec)->sec_type == sec_normal);
- ppc64_elf_section_data (sec)->sec_type = sec_opd;
+ ppc64_elf_section_data (sec)->opd.func_sec = opd_sym_map;
}
if (htab->sfpr == NULL
@@ -4397,7 +4378,6 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
struct elf_link_hash_entry *h;
enum elf_ppc64_reloc_type r_type;
int tls_type = 0;
- struct _ppc64_elf_section_data *ppc64_sec;
r_symndx = ELF64_R_SYM (rel->r_info);
if (r_symndx < symtab_hdr->sh_info)
@@ -4579,7 +4559,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
dest = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
sec, r_symndx);
if (dest != sec)
- ppc64_elf_section_data (sec)->has_14bit_branch = 1;
+ htab->has_14bit_branch = 1;
}
/* Fall through. */
@@ -4595,7 +4575,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|| h == &htab->tls_get_addr_fd->elf)
sec->has_tls_reloc = 1;
else if (htab->tls_get_addr == NULL
- && CONST_STRNEQ (h->root.root.string, ".__tls_get_addr")
+ && !strncmp (h->root.root.string, ".__tls_get_addr", 15)
&& (h->root.root.string[15] == 0
|| h->root.root.string[15] == '@'))
{
@@ -4603,7 +4583,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
sec->has_tls_reloc = 1;
}
else if (htab->tls_get_addr_fd == NULL
- && CONST_STRNEQ (h->root.root.string, "__tls_get_addr")
+ && !strncmp (h->root.root.string, "__tls_get_addr", 14)
&& (h->root.root.string[14] == 0
|| h->root.root.string[14] == '@'))
{
@@ -4650,26 +4630,23 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
rel->r_addend, tls_type))
return FALSE;
- ppc64_sec = ppc64_elf_section_data (sec);
- if (ppc64_sec->sec_type != sec_toc)
+ if (ppc64_elf_section_data (sec)->t_symndx == NULL)
{
/* One extra to simplify get_tls_mask. */
bfd_size_type amt = sec->size * sizeof (unsigned) / 8 + 1;
- ppc64_sec->u.t_symndx = bfd_zalloc (abfd, amt);
- if (ppc64_sec->u.t_symndx == NULL)
+ ppc64_elf_section_data (sec)->t_symndx = bfd_zalloc (abfd, amt);
+ if (ppc64_elf_section_data (sec)->t_symndx == NULL)
return FALSE;
- BFD_ASSERT (ppc64_sec->sec_type == sec_normal);
- ppc64_sec->sec_type = sec_toc;
}
BFD_ASSERT (rel->r_offset % 8 == 0);
- ppc64_sec->u.t_symndx[rel->r_offset / 8] = r_symndx;
+ ppc64_elf_section_data (sec)->t_symndx[rel->r_offset / 8] = r_symndx;
/* Mark the second slot of a GD or LD entry.
-1 to indicate GD and -2 to indicate LD. */
if (tls_type == (TLS_EXPLICIT | TLS_TLS | TLS_GD))
- ppc64_sec->u.t_symndx[rel->r_offset / 8 + 1] = -1;
+ ppc64_elf_section_data (sec)->t_symndx[rel->r_offset / 8 + 1] = -1;
else if (tls_type == (TLS_EXPLICIT | TLS_TLS | TLS_LD))
- ppc64_sec->u.t_symndx[rel->r_offset / 8 + 1] = -2;
+ ppc64_elf_section_data (sec)->t_symndx[rel->r_offset / 8 + 1] = -2;
goto dodyn;
case R_PPC64_TPREL16:
@@ -4799,7 +4776,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (name == NULL)
return FALSE;
- if (! CONST_STRNEQ (name, ".rela")
+ if (strncmp (name, ".rela", 5) != 0
|| strcmp (bfd_get_section_name (abfd, sec),
name + 5) != 0)
{
@@ -6065,7 +6042,7 @@ get_tls_mask (char **tls_maskp, unsigned long *toc_symndx,
if ((*tls_maskp != NULL && **tls_maskp != 0)
|| sec == NULL
- || ppc64_elf_section_data (sec)->sec_type != sec_toc)
+ || ppc64_elf_section_data (sec)->t_symndx == NULL)
return 1;
/* Look inside a TOC section too. */
@@ -6078,8 +6055,8 @@ get_tls_mask (char **tls_maskp, unsigned long *toc_symndx,
off = sym->st_value;
off += rel->r_addend;
BFD_ASSERT (off % 8 == 0);
- r_symndx = ppc64_elf_section_data (sec)->u.t_symndx[off / 8];
- next_r = ppc64_elf_section_data (sec)->u.t_symndx[off / 8 + 1];
+ r_symndx = ppc64_elf_section_data (sec)->t_symndx[off / 8];
+ next_r = ppc64_elf_section_data (sec)->t_symndx[off / 8 + 1];
if (!get_sym_h (&h, &sym, &sec, tls_maskp, locsymsp, r_symndx, ibfd))
return 0;
if (toc_symndx != NULL)
@@ -6125,13 +6102,13 @@ adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
if (adjust == -1)
{
/* This entry has been deleted. */
- asection *dsec = ppc64_elf_tdata (sym_sec->owner)->deleted_section;
+ asection *dsec = ppc64_elf_tdata (sym_sec->owner)->u.deleted_section;
if (dsec == NULL)
{
for (dsec = sym_sec->owner->sections; dsec; dsec = dsec->next)
if (elf_discarded_section (dsec))
{
- ppc64_elf_tdata (sym_sec->owner)->deleted_section = dsec;
+ ppc64_elf_tdata (sym_sec->owner)->u.deleted_section = dsec;
break;
}
}
@@ -6320,9 +6297,7 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info,
opd_adjust = bfd_alloc (obfd, amt);
if (opd_adjust == NULL)
return FALSE;
- ppc64_elf_section_data (sec)->u.opd_adjust = opd_adjust;
- BFD_ASSERT (ppc64_elf_section_data (sec)->sec_type == sec_normal);
- ppc64_elf_section_data (sec)->sec_type = sec_opd;
+ ppc64_elf_section_data (sec)->opd.adjust = opd_adjust;
}
memset (opd_adjust, 0, amt);
@@ -6632,7 +6607,7 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info,
sec->contents = new_contents;
}
- /* Fudge the header size too, as this is used later in
+ /* Fudge the size too, as this is used later in
elf_bfd_final_link if we are emitting relocs. */
elf_section_data (sec)->rel_hdr.sh_size
= sec->reloc_count * elf_section_data (sec)->rel_hdr.sh_entsize;
@@ -7938,7 +7913,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
/* Strip this section if we don't need it; see the
comment below. */
}
- else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
+ else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
if (s->size != 0)
{
@@ -8956,29 +8931,7 @@ group_sections (struct ppc_link_hash_table *htab,
bfd_size_type stub_group_size,
bfd_boolean stubs_always_before_branch)
{
- asection **list;
- bfd_size_type stub14_group_size;
- bfd_boolean suppress_size_errors;
-
- suppress_size_errors = FALSE;
- stub14_group_size = stub_group_size;
- if (stub_group_size == 1)
- {
- /* Default values. */
- if (stubs_always_before_branch)
- {
- stub_group_size = 0x1e00000;
- stub14_group_size = 0x7800;
- }
- else
- {
- stub_group_size = 0x1c00000;
- stub14_group_size = 0x7000;
- }
- suppress_size_errors = TRUE;
- }
-
- list = htab->input_list + htab->top_index;
+ asection **list = htab->input_list + htab->top_index;
do
{
asection *tail = *list;
@@ -8992,17 +8945,15 @@ group_sections (struct ppc_link_hash_table *htab,
curr = tail;
total = tail->size;
- big_sec = total > (ppc64_elf_section_data (tail)->has_14bit_branch
- ? stub14_group_size : stub_group_size);
- if (big_sec && !suppress_size_errors)
+ big_sec = total > stub_group_size;
+ if (big_sec)
(*_bfd_error_handler) (_("%B section %A exceeds stub group size"),
tail->owner, tail);
curr_toc = htab->stub_group[tail->id].toc_off;
while ((prev = PREV_SEC (curr)) != NULL
&& ((total += curr->output_offset - prev->output_offset)
- < (ppc64_elf_section_data (prev)->has_14bit_branch
- ? stub14_group_size : stub_group_size))
+ < stub_group_size)
&& htab->stub_group[prev->id].toc_off == curr_toc)
curr = prev;
@@ -9034,8 +8985,7 @@ group_sections (struct ppc_link_hash_table *htab,
total = 0;
while (prev != NULL
&& ((total += tail->output_offset - prev->output_offset)
- < (ppc64_elf_section_data (prev)->has_14bit_branch
- ? stub14_group_size : stub_group_size))
+ < stub_group_size)
&& htab->stub_group[prev->id].toc_off == curr_toc)
{
tail = prev;
@@ -9076,6 +9026,22 @@ ppc64_elf_size_stubs (bfd *output_bfd,
stub_group_size = -group_size;
else
stub_group_size = group_size;
+ if (stub_group_size == 1)
+ {
+ /* Default values. */
+ if (stubs_always_before_branch)
+ {
+ stub_group_size = 0x1e00000;
+ if (htab->has_14bit_branch)
+ stub_group_size = 0x7800;
+ }
+ else
+ {
+ stub_group_size = 0x1c00000;
+ if (htab->has_14bit_branch)
+ stub_group_size = 0x7000;
+ }
+ }
group_sections (htab, stub_group_size, stubs_always_before_branch);
@@ -9485,7 +9451,7 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
stub_sec->size = 0;
}
- if (htab->glink != NULL && htab->glink->size != 0)
+ if (htab->plt != NULL)
{
unsigned int indx;
bfd_vma plt0;
@@ -9746,7 +9712,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
TOCstart = elf_gp (output_bfd);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
- is_opd = ppc64_elf_section_data (input_section)->sec_type == sec_opd;
+ is_opd = ppc64_elf_section_data (input_section)->opd.adjust != NULL;
rel = relocs;
relend = relocs + input_section->reloc_count;
@@ -10761,11 +10727,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
a linker script. */
dodyn:
if (r_symndx == 0)
- {
- _bfd_clear_contents (ppc64_elf_howto_table[r_type], input_bfd,
- contents + rel->r_offset);
- break;
- }
+ break;
/* Fall thru. */
dodyn2:
@@ -10878,17 +10840,6 @@ ppc64_elf_relocate_section (bfd *output_bfd,
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
- if (indx == 0)
- {
- if ((osec->flags & SEC_READONLY) == 0
- && htab->elf.data_index_section != NULL)
- osec = htab->elf.data_index_section;
- else
- osec = htab->elf.text_index_section;
- indx = elf_section_data (osec)->dynindx;
- }
- BFD_ASSERT (indx != 0);
-
/* We are turning this relocation into one
against a section symbol, so subtract out
the output section's address but not the
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 443f325..72d8432 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -46,6 +46,12 @@ static void elf_s390_copy_indirect_symbol
static bfd_boolean elf_s390_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
+static asection *elf_s390_gc_mark_hook
+ PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+static bfd_boolean elf_s390_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
struct elf_s390_link_hash_entry;
static void elf_s390_adjust_gotplt
PARAMS ((struct elf_s390_link_hash_entry *));
@@ -1232,7 +1238,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (name == NULL)
return FALSE;
- if (! CONST_STRNEQ (name, ".rela")
+ if (strncmp (name, ".rela", 5) != 0
|| strcmp (bfd_get_section_name (abfd, sec),
name + 5) != 0)
{
@@ -1339,30 +1345,50 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
relocation. */
static asection *
-elf_s390_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
+elf_s390_gc_mark_hook (sec, info, rel, h, sym)
+ asection *sec;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
{
if (h != NULL)
- switch (ELF64_R_TYPE (rel->r_info))
- {
- case R_390_GNU_VTINHERIT:
- case R_390_GNU_VTENTRY:
- return NULL;
- }
-
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ {
+ switch (ELF64_R_TYPE (rel->r_info))
+ {
+ case R_390_GNU_VTINHERIT:
+ case R_390_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
}
/* Update the got entry reference counts for the section being removed. */
static bfd_boolean
-elf_s390_gc_sweep_hook (bfd *abfd,
- struct bfd_link_info *info,
- asection *sec,
- const Elf_Internal_Rela *relocs)
+elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *sec;
+ const Elf_Internal_Rela *relocs;
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -2072,7 +2098,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
/* Strip this section if we don't need it; see the
comment below. */
}
- else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
+ else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
if (s->size != 0 && s != htab->srelplt)
relocs = TRUE;
@@ -2522,13 +2548,8 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
/* r_symndx will be zero only for relocs against symbols
from removed linkonce sections, or sections discarded by
a linker script. */
- if (r_symndx == 0)
- {
- _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
- break;
- }
-
- if ((input_section->flags & SEC_ALLOC) == 0)
+ if (r_symndx == 0
+ || (input_section->flags & SEC_ALLOC) == 0)
break;
if ((info->shared
@@ -2616,19 +2637,14 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
osec = sec->output_section;
sindx = elf_section_data (osec)->dynindx;
-
- if (sindx == 0)
- {
- osec = htab->elf.text_index_section;
- sindx = elf_section_data (osec)->dynindx;
- }
- BFD_ASSERT (sindx != 0);
+ BFD_ASSERT (sindx > 0);
/* We are turning this relocation into one
against a section symbol, so subtract out
the output section's address but not the
offset of the input section in the output
section. */
+
outrel.r_addend -= osec->vma;
}
outrel.r_info = ELF64_R_INFO (sindx, r_type);
@@ -2893,7 +2909,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
continue;
case R_390_TLS_LDO64:
- if (info->shared)
+ if (info->shared || (input_section->flags & SEC_CODE) == 0)
relocation -= dtpoff_base (info);
else
/* When converting LDO to LE, we must negate. */
@@ -3459,7 +3475,6 @@ const struct elf_size_info s390_elf64_size_info =
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
#define elf_backend_relocate_section elf_s390_relocate_section
#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections
-#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
#define elf_backend_plt_sym_val elf_s390_plt_sym_val
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index 731995f..4d6d8d5 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -1709,7 +1709,7 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (input_bfd,
input_section),
name + 5) == 0);
@@ -2366,20 +2366,53 @@ sh_elf64_merge_private_data (bfd *ibfd, bfd *obfd)
static asection *
sh_elf64_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- switch (ELF64_R_TYPE (rel->r_info))
- {
- case R_SH_GNU_VTINHERIT:
- case R_SH_GNU_VTENTRY:
- return NULL;
- }
+ {
+ switch (ELF64_R_TYPE (rel->r_info))
+ {
+ case R_SH_GNU_VTINHERIT:
+ case R_SH_GNU_VTENTRY:
+ break;
+
+ default:
+ while (h->root.type == bfd_link_hash_indirect
+ && h->root.u.i.link)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static bfd_boolean
+sh_elf64_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+{
+ /* No got and plt entries for 64-bit SH at present. */
+ return TRUE;
}
/* Look through the relocs for a section during the first phase.
@@ -2698,7 +2731,7 @@ sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
name + 5) == 0);
@@ -3558,7 +3591,7 @@ sh64_elf64_size_dynamic_sections (bfd *output_bfd,
/* Remember whether there is a PLT. */
plt = s->size != 0;
}
- else if (CONST_STRNEQ (name, ".rela"))
+ else if (strncmp (name, ".rela", 5) == 0)
{
if (s->size != 0)
{
@@ -3591,7 +3624,7 @@ sh64_elf64_size_dynamic_sections (bfd *output_bfd,
s->reloc_count = 0;
}
}
- else if (! CONST_STRNEQ (name, ".got")
+ else if (strncmp (name, ".got", 4) != 0
&& strcmp (name, ".dynbss") != 0)
{
/* It's not one of our sections, so don't allocate space. */
@@ -4020,9 +4053,9 @@ static void
sh64_elf64_merge_symbol_attribute (struct elf_link_hash_entry *h,
const Elf_Internal_Sym *isym,
bfd_boolean definition,
- bfd_boolean dynamic ATTRIBUTE_UNUSED)
+ bfd_boolean dynamic)
{
- if ((isym->st_other & ~ELF_ST_VISIBILITY (-1)) != 0)
+ if (isym->st_other != 0 && dynamic)
{
unsigned char other;
@@ -4037,8 +4070,8 @@ sh64_elf64_merge_symbol_attribute (struct elf_link_hash_entry *h,
static const struct bfd_elf_special_section sh64_elf64_special_sections[]=
{
- { STRING_COMMA_LEN (".cranges"), 0, SHT_PROGBITS, 0 },
- { NULL, 0, 0, 0, 0 }
+ { ".cranges", 8, 0, SHT_PROGBITS, 0 },
+ { NULL, 0, 0, 0, 0 }
};
#define TARGET_BIG_SYM bfd_elf64_sh64_vec
@@ -4069,6 +4102,7 @@ static const struct bfd_elf_special_section sh64_elf64_special_sections[]=
#define elf_backend_fake_sections sh64_elf64_fake_sections
#define elf_backend_gc_mark_hook sh_elf64_gc_mark_hook
+#define elf_backend_gc_sweep_hook sh_elf64_gc_sweep_hook
#define elf_backend_check_relocs sh_elf64_check_relocs
#define elf_backend_can_gc_sections 1
@@ -4094,8 +4128,6 @@ static const struct bfd_elf_special_section sh64_elf64_special_sections[]=
sh64_elf64_adjust_dynamic_symbol
#define elf_backend_size_dynamic_sections \
sh64_elf64_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define elf_backend_finish_dynamic_symbol \
sh64_elf64_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections \
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 0eefc95..5c928e2 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -889,8 +889,6 @@ const struct elf_size_info elf64_sparc_size_info =
_bfd_sparc_elf_gc_mark_hook
#define elf_backend_gc_sweep_hook \
_bfd_sparc_elf_gc_sweep_hook
-#define elf_backend_init_index_section \
- _bfd_elf_init_1_index_section
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1
@@ -904,33 +902,3 @@ const struct elf_size_info elf64_sparc_size_info =
#define elf_backend_plt_alignment 8
#include "elf64-target.h"
-
-/* FreeBSD support */
-#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM bfd_elf64_sparc_freebsd_vec
-#undef TARGET_BIG_NAME
-#define TARGET_BIG_NAME "elf64-sparc-freebsd"
-
-/* The kernel recognizes executables as valid only if they carry a
- "FreeBSD" label in the ELF header. So we put this label on all
- executables and (for simplicity) also all other object files. */
-
-static void
-elf64_sparc_fbsd_post_process_headers (bfd *abfd,
- struct bfd_link_info *info ATTRIBUTE_UNUSED)
-{
- Elf_Internal_Ehdr *i_ehdrp; /* ELF file header, internal form. */
-
- i_ehdrp = elf_elfheader (abfd);
-
- /* Put an ABI label supported by FreeBSD >= 4.1 */
- i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
-}
-
-#undef elf_backend_post_process_headers
-#define elf_backend_post_process_headers elf64_sparc_fbsd_post_process_headers
-#undef elf64_bed
-#define elf64_bed elf64_sparc_fbsd_bed
-
-#include "elf64-target.h"
-
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index b6c973f..34fde96 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -997,7 +997,7 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
&& (r_type != R_X86_64_PC32)
&& (r_type != R_X86_64_PC64))
|| (h != NULL
- && (! SYMBOLIC_BIND (info, h)
+ && (! info->symbolic
|| h->root.type == bfd_link_hash_defweak
|| !h->def_regular))))
|| (ELIMINATE_COPY_RELOCS
@@ -1025,7 +1025,7 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (name == NULL)
return FALSE;
- if (! CONST_STRNEQ (name, ".rela")
+ if (strncmp (name, ".rela", 5) != 0
|| strcmp (bfd_get_section_name (abfd, sec),
name + 5) != 0)
{
@@ -1134,20 +1134,38 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
static asection *
elf64_x86_64_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- switch (ELF64_R_TYPE (rel->r_info))
- {
- case R_X86_64_GNU_VTINHERIT:
- case R_X86_64_GNU_VTENTRY:
- return NULL;
- }
-
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ {
+ switch (ELF64_R_TYPE (rel->r_info))
+ {
+ case R_X86_64_GNU_VTINHERIT:
+ case R_X86_64_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
}
/* Update the got entry reference counts for the section being removed. */
@@ -1865,7 +1883,7 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
/* Strip this section if we don't need it; see the
comment below. */
}
- else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
+ else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
if (s->size != 0 && s != htab->srelplt)
relocs = TRUE;
@@ -2370,13 +2388,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* r_symndx will be zero only for relocs against symbols
from removed linkonce sections, or sections discarded by
a linker script. */
- if (r_symndx == 0)
- {
- _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
- break;
- }
-
- if ((input_section->flags & SEC_ALLOC) == 0)
+ if (r_symndx == 0
+ || (input_section->flags & SEC_ALLOC) == 0)
break;
if ((info->shared
@@ -2432,7 +2445,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|| r_type == R_X86_64_PC32
|| r_type == R_X86_64_PC64
|| !info->shared
- || !SYMBOLIC_BIND (info, h)
+ || !info->symbolic
|| !h->def_regular))
{
outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
@@ -2462,19 +2475,9 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
asection *osec;
- /* We are turning this relocation into one
- against a section symbol. It would be
- proper to subtract the symbol's value,
- osec->vma, from the emitted reloc addend,
- but ld.so expects buggy relocs. */
osec = sec->output_section;
sindx = elf_section_data (osec)->dynindx;
- if (sindx == 0)
- {
- asection *oi = htab->elf.text_index_section;
- sindx = elf_section_data (oi)->dynindx;
- }
- BFD_ASSERT (sindx != 0);
+ BFD_ASSERT (sindx > 0);
}
outrel.r_info = ELF64_R_INFO (sindx, r_type);
@@ -3032,6 +3035,12 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (r == bfd_reloc_overflow)
{
+ if (h != NULL
+ && h->root.type == bfd_link_hash_undefweak
+ && howto->pc_relative)
+ /* Ignore reloc overflow on branches to undefweak syms. */
+ continue;
+
if (! ((*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section,
@@ -3627,13 +3636,13 @@ elf64_x86_64_hash_symbol (struct elf_link_hash_entry *h)
static const struct bfd_elf_special_section
elf64_x86_64_special_sections[]=
{
- { STRING_COMMA_LEN (".gnu.linkonce.lb"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_X86_64_LARGE},
- { STRING_COMMA_LEN (".gnu.linkonce.lr"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_X86_64_LARGE},
- { STRING_COMMA_LEN (".gnu.linkonce.lt"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR + SHF_X86_64_LARGE},
- { STRING_COMMA_LEN (".lbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_X86_64_LARGE},
- { STRING_COMMA_LEN (".ldata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_X86_64_LARGE},
- { STRING_COMMA_LEN (".lrodata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_X86_64_LARGE},
- { NULL, 0, 0, 0, 0 }
+ { ".gnu.linkonce.lb", 16, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_X86_64_LARGE},
+ { ".gnu.linkonce.lr", 16, -2, SHT_PROGBITS, SHF_ALLOC + SHF_X86_64_LARGE},
+ { ".gnu.linkonce.lt", 16, -2, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR + SHF_X86_64_LARGE},
+ { ".lbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_X86_64_LARGE},
+ { ".ldata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_X86_64_LARGE},
+ { ".lrodata", 8, -2, SHT_PROGBITS, SHF_ALLOC + SHF_X86_64_LARGE},
+ { NULL, 0, 0, 0, 0 }
};
#define TARGET_LITTLE_SYM bfd_elf64_x86_64_vec
@@ -3672,7 +3681,6 @@ static const struct bfd_elf_special_section
#define elf_backend_relocate_section elf64_x86_64_relocate_section
#define elf_backend_size_dynamic_sections elf64_x86_64_size_dynamic_sections
#define elf_backend_always_size_sections elf64_x86_64_always_size_sections
-#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_plt_sym_val elf64_x86_64_plt_sym_val
#define elf_backend_object_p elf64_x86_64_elf_object_p
#define bfd_elf64_mkobject elf64_x86_64_mkobject
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index d58cf34..a285a13 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -166,7 +166,7 @@ static void elf_debug_file (Elf_Internal_Ehdr *);
/* Translate an ELF symbol in external format into an ELF symbol in internal
format. */
-bfd_boolean
+void
elf_swap_symbol_in (bfd *abfd,
const void *psrc,
const void *pshn,
@@ -188,10 +188,9 @@ elf_swap_symbol_in (bfd *abfd,
if (dst->st_shndx == SHN_XINDEX)
{
if (shndx == NULL)
- return FALSE;
+ abort ();
dst->st_shndx = H_GET_32 (abfd, shndx->est_shndx);
}
- return TRUE;
}
/* Translate an ELF symbol in internal format into an ELF symbol in external
diff --git a/bfd/elflink.c b/bfd/elflink.c
index df7b899..a7657f9 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -444,21 +444,6 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info,
return TRUE;
}
-/* Mark a symbol dynamic. */
-
-void
-bfd_elf_link_mark_dynamic_symbol (struct bfd_link_info *info,
- struct elf_link_hash_entry *h)
-{
- struct bfd_elf_dynamic_list *d = info->dynamic;
-
- if (d == NULL || info->relocatable)
- return;
-
- if ((*d->match) (&d->head, NULL, h->root.root.string))
- h->dynamic = 1;
-}
-
/* Record an assignment to a symbol made by a linker script. We need
this in case some dynamic object refers to this symbol. */
@@ -492,10 +477,7 @@ bfd_elf_record_link_assignment (bfd *output_bfd,
}
if (h->root.type == bfd_link_hash_new)
- {
- bfd_elf_link_mark_dynamic_symbol (info, h);
- h->non_elf = 0;
- }
+ h->non_elf = 0;
/* If this symbol is being provided by the linker script, and it is
currently defined by a dynamic object, but not by a regular
@@ -712,8 +694,6 @@ _bfd_elf_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
struct bfd_link_info *info,
asection *p)
{
- struct elf_link_hash_table *htab;
-
switch (elf_section_data (p)->this_hdr.sh_type)
{
case SHT_PROGBITS:
@@ -721,21 +701,15 @@ _bfd_elf_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
/* If sh_type is yet undecided, assume it could be
SHT_PROGBITS/SHT_NOBITS. */
case SHT_NULL:
- htab = elf_hash_table (info);
- if (p == htab->tls_sec)
- return FALSE;
-
- if (htab->text_index_section != NULL)
- return p != htab->text_index_section && p != htab->data_index_section;
-
if (strcmp (p->name, ".got") == 0
|| strcmp (p->name, ".got.plt") == 0
|| strcmp (p->name, ".plt") == 0)
{
asection *ip;
+ bfd *dynobj = elf_hash_table (info)->dynobj;
- if (htab->dynobj != NULL
- && (ip = bfd_get_section_by_name (htab->dynobj, p->name)) != NULL
+ if (dynobj != NULL
+ && (ip = bfd_get_section_by_name (dynobj, p->name)) != NULL
&& (ip->flags & SEC_LINKER_CREATED)
&& ip->output_section == p)
return TRUE;
@@ -771,8 +745,6 @@ _bfd_elf_link_renumber_dynsyms (bfd *output_bfd,
&& (p->flags & SEC_ALLOC) != 0
&& !(*bed->elf_backend_omit_section_dynsym) (output_bfd, info, p))
elf_section_data (p)->dynindx = ++dynsymcount;
- else
- elf_section_data (p)->dynindx = 0;
}
*section_sym_count = dynsymcount;
@@ -842,15 +814,6 @@ _bfd_elf_merge_symbol (bfd *abfd,
sec = *psec;
bind = ELF_ST_BIND (sym->st_info);
- /* Silently discard TLS symbols from --just-syms. There's no way to
- combine a static TLS block with a new TLS block for this executable. */
- if (ELF_ST_TYPE (sym->st_info) == STT_TLS
- && sec->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
- {
- *skip = TRUE;
- return TRUE;
- }
-
if (! bfd_is_und_section (sec))
h = elf_link_hash_lookup (elf_hash_table (info), name, TRUE, FALSE, FALSE);
else
@@ -877,7 +840,6 @@ _bfd_elf_merge_symbol (bfd *abfd,
if (h->root.type == bfd_link_hash_new)
{
- bfd_elf_link_mark_dynamic_symbol (info, h);
h->non_elf = 0;
return TRUE;
}
@@ -1664,10 +1626,6 @@ _bfd_elf_export_symbol (struct elf_link_hash_entry *h, void *data)
{
struct elf_info_failed *eif = data;
- /* Ignore this if we won't export it. */
- if (!eif->info->export_dynamic && !h->dynamic)
- return TRUE;
-
/* Ignore indirect symbols. These are added by the versioning code. */
if (h->root.type == bfd_link_hash_indirect)
return TRUE;
@@ -2421,7 +2379,7 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
if (h->needs_plt
&& eif->info->shared
&& is_elf_hash_table (eif->info->hash)
- && (SYMBOLIC_BIND (eif->info, h)
+ && (eif->info->symbolic
|| ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
&& h->def_regular)
{
@@ -2650,7 +2608,7 @@ _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h,
/* Identify the cases where name binding rules say that a
visible symbol resolves locally. */
- binding_stays_local_p = info->executable || SYMBOLIC_BIND (info, h);
+ binding_stays_local_p = info->executable || info->symbolic;
switch (ELF_ST_VISIBILITY (h->other))
{
@@ -2713,7 +2671,7 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h,
/* At this point, we know the symbol is defined and dynamic. In an
executable it must resolve locally, likewise when building symbolic
shared libraries. */
- if (info->executable || SYMBOLIC_BIND (info, h))
+ if (info->executable || info->symbolic)
return TRUE;
/* Now deal with defined dynamic symbols in shared libraries. Ones
@@ -3223,7 +3181,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
const char *name;
name = bfd_get_section_name (abfd, s);
- if (CONST_STRNEQ (name, ".gnu.warning."))
+ if (strncmp (name, ".gnu.warning.", sizeof ".gnu.warning." - 1) == 0)
{
char *msg;
bfd_size_type sz;
@@ -4156,13 +4114,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
dynsym = TRUE;
}
- if (definition && (sec->flags & SEC_DEBUGGING))
- {
- /* We don't want to make debug symbol dynamic. */
- (*bed->elf_backend_hide_symbol) (info, h, TRUE);
- dynsym = FALSE;
- }
-
/* Check to see if we need to add an indirect symbol for
the default name. */
if (definition || h->root.type == bfd_link_hash_common)
@@ -4578,7 +4529,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
asection *stab;
for (stab = abfd->sections; stab; stab = stab->next)
- if (CONST_STRNEQ (stab->name, ".stab")
+ if (strncmp (".stab", stab->name, 5) == 0
&& (!stab->name[5] ||
(stab->name[5] == '.' && ISDIGIT (stab->name[6])))
&& (stab->flags & SEC_MERGE) == 0
@@ -5371,8 +5322,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
/* If we are supposed to export all symbols into the dynamic symbol
table (this is not the normal case), then do so. */
- if (info->export_dynamic
- || (info->executable && info->dynamic))
+ if (info->export_dynamic)
{
elf_link_hash_traverse (elf_hash_table (info),
_bfd_elf_export_symbol,
@@ -5949,65 +5899,16 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
return TRUE;
}
-/* Find the first non-excluded output section. We'll use its
- section symbol for some emitted relocs. */
-void
-_bfd_elf_init_1_index_section (bfd *output_bfd, struct bfd_link_info *info)
-{
- asection *s;
-
- for (s = output_bfd->sections; s != NULL; s = s->next)
- if ((s->flags & (SEC_EXCLUDE | SEC_ALLOC)) == SEC_ALLOC
- && !_bfd_elf_link_omit_section_dynsym (output_bfd, info, s))
- {
- elf_hash_table (info)->text_index_section = s;
- break;
- }
-}
-
-/* Find two non-excluded output sections, one for code, one for data.
- We'll use their section symbols for some emitted relocs. */
-void
-_bfd_elf_init_2_index_sections (bfd *output_bfd, struct bfd_link_info *info)
-{
- asection *s;
-
- for (s = output_bfd->sections; s != NULL; s = s->next)
- if (((s->flags & (SEC_EXCLUDE | SEC_ALLOC | SEC_READONLY))
- == (SEC_ALLOC | SEC_READONLY))
- && !_bfd_elf_link_omit_section_dynsym (output_bfd, info, s))
- {
- elf_hash_table (info)->text_index_section = s;
- break;
- }
-
- for (s = output_bfd->sections; s != NULL; s = s->next)
- if (((s->flags & (SEC_EXCLUDE | SEC_ALLOC | SEC_READONLY)) == SEC_ALLOC)
- && !_bfd_elf_link_omit_section_dynsym (output_bfd, info, s))
- {
- elf_hash_table (info)->data_index_section = s;
- break;
- }
-
- if (elf_hash_table (info)->text_index_section == NULL)
- elf_hash_table (info)->text_index_section
- = elf_hash_table (info)->data_index_section;
-}
-
bfd_boolean
bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info)
{
- const struct elf_backend_data *bed;
-
if (!is_elf_hash_table (info->hash))
return TRUE;
- bed = get_elf_backend_data (output_bfd);
- (*bed->elf_backend_init_index_section) (output_bfd, info);
-
if (elf_hash_table (info)->dynamic_sections_created)
{
bfd *dynobj;
+ const struct elf_backend_data *bed;
asection *s;
bfd_size_type dynsymcount;
unsigned long section_sym_count;
@@ -6046,6 +5947,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info)
section as we went along in elf_link_add_object_symbols. */
s = bfd_get_section_by_name (dynobj, ".dynsym");
BFD_ASSERT (s != NULL);
+ bed = get_elf_backend_data (output_bfd);
s->size = dynsymcount * bed->s->sizeof_sym;
if (dynsymcount != 0)
@@ -7135,6 +7037,8 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
if (h->dynindx != -1
&& elf_hash_table (finfo->info)->dynamic_sections_created)
{
+ size_t bucketcount;
+ size_t bucket;
bfd_byte *esym;
sym.st_name = h->dynstr_index;
@@ -7146,16 +7050,14 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
}
bed->s->swap_symbol_out (finfo->output_bfd, &sym, esym, 0);
+ bucketcount = elf_hash_table (finfo->info)->bucketcount;
+ bucket = h->u.elf_hash_value % bucketcount;
+
if (finfo->hash_sec != NULL)
{
size_t hash_entry_size;
bfd_byte *bucketpos;
bfd_vma chain;
- size_t bucketcount;
- size_t bucket;
-
- bucketcount = elf_hash_table (finfo->info)->bucketcount;
- bucket = h->u.elf_hash_value % bucketcount;
hash_entry_size
= elf_section_data (finfo->hash_sec)->this_hdr.sh_entsize;
@@ -7267,15 +7169,14 @@ _bfd_elf_default_action_discarded (asection *sec)
/* Find a match between a section and a member of a section group. */
static asection *
-match_group_member (asection *sec, asection *group,
- struct bfd_link_info *info)
+match_group_member (asection *sec, asection *group)
{
asection *first = elf_next_in_group (group);
asection *s = first;
while (s != NULL)
{
- if (bfd_elf_match_symbols_in_sections (s, sec, info))
+ if (bfd_elf_match_symbols_in_sections (s, sec))
return s;
s = elf_next_in_group (s);
@@ -7291,7 +7192,7 @@ match_group_member (asection *sec, asection *group,
NULL. */
asection *
-_bfd_elf_check_kept_section (asection *sec, struct bfd_link_info *info)
+_bfd_elf_check_kept_section (asection *sec)
{
asection *kept;
@@ -7299,7 +7200,7 @@ _bfd_elf_check_kept_section (asection *sec, struct bfd_link_info *info)
if (kept != NULL)
{
if (elf_sec_group (sec) != NULL)
- kept = match_group_member (sec, kept, info);
+ kept = match_group_member (sec, kept);
if (kept != NULL && sec->size != kept->size)
kept = NULL;
}
@@ -7652,8 +7553,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
{
asection *kept;
- kept = _bfd_elf_check_kept_section (sec,
- finfo->info);
+ kept = _bfd_elf_check_kept_section (sec);
if (kept != NULL)
{
*ps = kept;
@@ -7836,24 +7736,6 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
if (!bfd_is_abs_section (osec))
{
r_symndx = osec->target_index;
- if (r_symndx == 0)
- {
- struct elf_link_hash_table *htab;
- asection *oi;
-
- htab = elf_hash_table (finfo->info);
- oi = htab->text_index_section;
- if ((osec->flags & SEC_READONLY) == 0
- && htab->data_index_section != NULL)
- oi = htab->data_index_section;
-
- if (oi != NULL)
- {
- irela->r_addend += osec->vma - oi->vma;
- r_symndx = oi->target_index;
- }
- }
-
BFD_ASSERT (r_symndx != 0);
}
}
@@ -8802,17 +8684,6 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
}
}
- /* Free symbol buffer if needed. */
- if (!info->reduce_memory_overheads)
- {
- for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
- if (elf_tdata (sub)->symbuf)
- {
- free (elf_tdata (sub)->symbuf);
- elf_tdata (sub)->symbuf = NULL;
- }
- }
-
/* Output any global symbols that got converted to local in a
version script or due to symbol visibility. We do this in a
separate step since ELF requires all local symbols to appear
@@ -9353,44 +9224,14 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
/* Garbage collect unused sections. */
-typedef asection * (*gc_mark_hook_fn)
- (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *);
-
-/* Default gc_mark_hook. */
-
-asection *
-_bfd_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
- Elf_Internal_Rela *rel ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
-{
- if (h != NULL)
- {
- switch (h->root.type)
- {
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- return h->root.u.def.section;
-
- case bfd_link_hash_common:
- return h->root.u.c.p->section;
-
- default:
- break;
- }
- }
- else
- return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
-
- return NULL;
-}
-
/* The mark phase of garbage collection. For a given section, mark
it and any sections in this section's group, and all the sections
which define symbols to which it refers. */
+typedef asection * (*gc_mark_hook_fn)
+ (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *);
+
bfd_boolean
_bfd_elf_gc_mark (struct bfd_link_info *info,
asection *sec,
@@ -9807,7 +9648,7 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
continue;
for (o = sub->sections; o != NULL; o = o->next)
- if ((o->flags & (SEC_EXCLUDE | SEC_KEEP)) == SEC_KEEP && !o->gc_mark)
+ if ((o->flags & SEC_KEEP) != 0 && !o->gc_mark)
if (!_bfd_elf_gc_mark (info, o, gc_mark_hook))
return FALSE;
}
@@ -9826,24 +9667,21 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
easily due to needing special relocs to handle the
difference of two symbols in separate sections.
Don't keep code sections referenced by .eh_frame. */
-#define TEXT_PREFIX ".text."
-#define GCC_EXCEPT_TABLE_PREFIX ".gcc_except_table."
for (o = sub->sections; o != NULL; o = o->next)
if (!o->gc_mark && o->gc_mark_from_eh && (o->flags & SEC_CODE) == 0)
{
- if (CONST_STRNEQ (o->name, GCC_EXCEPT_TABLE_PREFIX))
+ if (strncmp (o->name, ".gcc_except_table.", 18) == 0)
{
+ unsigned long len;
char *fn_name;
- const char *sec_name;
asection *fn_text;
- unsigned o_name_prefix_len = strlen (GCC_EXCEPT_TABLE_PREFIX);
- unsigned fn_name_prefix_len = strlen (TEXT_PREFIX);
- sec_name = o->name + o_name_prefix_len;
- fn_name = bfd_malloc (strlen (sec_name) + fn_name_prefix_len + 1);
+ len = strlen (o->name + 18) + 1;
+ fn_name = bfd_malloc (len + 6);
if (fn_name == NULL)
return FALSE;
- sprintf (fn_name, "%s%s", TEXT_PREFIX, sec_name);
+ memcpy (fn_name, ".text.", 6);
+ memcpy (fn_name + 6, o->name + 18, len);
fn_text = bfd_get_section_by_name (sub, fn_name);
free (fn_name);
if (fn_text == NULL || !fn_text->gc_mark)
@@ -10309,8 +10147,7 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info)
}
void
-_bfd_elf_section_already_linked (bfd *abfd, struct bfd_section *sec,
- struct bfd_link_info *info)
+_bfd_elf_section_already_linked (bfd *abfd, struct bfd_section * sec)
{
flagword flags;
const char *name, *p;
@@ -10363,7 +10200,7 @@ _bfd_elf_section_already_linked (bfd *abfd, struct bfd_section *sec,
name = bfd_get_section_name (abfd, sec);
- if (CONST_STRNEQ (name, ".gnu.linkonce.")
+ if (strncmp (name, ".gnu.linkonce.", sizeof (".gnu.linkonce.") - 1) == 0
&& (p = strchr (name + sizeof (".gnu.linkonce.") - 1, '.')) != NULL)
p++;
else
@@ -10476,8 +10313,7 @@ _bfd_elf_section_already_linked (bfd *abfd, struct bfd_section *sec,
if ((l->sec->flags & SEC_GROUP) == 0
&& bfd_coff_get_comdat_section (l->sec->owner, l->sec) == NULL
&& bfd_elf_match_symbols_in_sections (l->sec,
- elf_next_in_group (sec),
- info))
+ elf_next_in_group (sec)))
{
elf_next_in_group (sec)->output_section = bfd_abs_section_ptr;
elf_next_in_group (sec)->kept_section = l->sec;
@@ -10498,7 +10334,7 @@ _bfd_elf_section_already_linked (bfd *abfd, struct bfd_section *sec,
if (first != NULL
&& elf_next_in_group (first) == first
- && bfd_elf_match_symbols_in_sections (first, sec, info))
+ && bfd_elf_match_symbols_in_sections (first, sec))
{
sec->output_section = bfd_abs_section_ptr;
sec->kept_section = l->sec;
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c
index a14760e..1e42faa 100644
--- a/bfd/elfn32-mips.c
+++ b/bfd/elfn32-mips.c
@@ -754,21 +754,6 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
-
- /* 32 bit relocation with no addend. */
- HOWTO (R_MIPS_GLOB_DAT, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- _bfd_mips_elf_generic_reloc, /* special_function */
- "R_MIPS_GLOB_DAT", /* name */
- FALSE, /* partial_inplace */
- 0x0, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
};
/* The relocation table used for SHT_RELA sections. */
@@ -1442,21 +1427,6 @@ static reloc_howto_type elf_mips_howto_table_rela[] =
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
-
- /* 32 bit relocation with no addend. */
- HOWTO (R_MIPS_GLOB_DAT, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- _bfd_mips_elf_generic_reloc, /* special_function */
- "R_MIPS_GLOB_DAT", /* name */
- FALSE, /* partial_inplace */
- 0x0, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
};
static reloc_howto_type elf_mips16_howto_table_rel[] =
@@ -2331,7 +2301,6 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
_bfd_mips_elf_always_size_sections
#define elf_backend_size_dynamic_sections \
_bfd_mips_elf_size_dynamic_sections
-#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
#define elf_backend_finish_dynamic_symbol \
_bfd_mips_elf_finish_dynamic_symbol
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 2fc5550..11bba4e 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -1424,15 +1424,22 @@ elfNN_ia64_relax_ldxmov (contents, off)
/* Return TRUE if NAME is an unwind table section name. */
static inline bfd_boolean
-is_unwind_section_name (bfd *abfd, const char *name)
+is_unwind_section_name (abfd, name)
+ bfd *abfd;
+ const char *name;
{
+ size_t len1, len2, len3;
+
if (elfNN_ia64_hpux_vec (abfd->xvec)
&& !strcmp (name, ELF_STRING_ia64_unwind_hdr))
return FALSE;
- return ((CONST_STRNEQ (name, ELF_STRING_ia64_unwind)
- && ! CONST_STRNEQ (name, ELF_STRING_ia64_unwind_info))
- || CONST_STRNEQ (name, ELF_STRING_ia64_unwind_once));
+ len1 = sizeof (ELF_STRING_ia64_unwind) - 1;
+ len2 = sizeof (ELF_STRING_ia64_unwind_info) - 1;
+ len3 = sizeof (ELF_STRING_ia64_unwind_once) - 1;
+ return ((strncmp (name, ELF_STRING_ia64_unwind, len1) == 0
+ && strncmp (name, ELF_STRING_ia64_unwind_info, len2) != 0)
+ || strncmp (name, ELF_STRING_ia64_unwind_once, len3) == 0);
}
/* Handle an IA-64 specific section when reading an object file. This
@@ -2209,7 +2216,7 @@ addend_compare (const void *xp, const void *yp)
const struct elfNN_ia64_dyn_sym_info *y
= (const struct elfNN_ia64_dyn_sym_info *) yp;
- return x->addend < y->addend ? -1 : x->addend > y->addend ? 1 : 0;
+ return x->addend - y->addend;
}
/* Sort elfNN_ia64_dyn_sym_info array and remove duplicates. */
@@ -2614,10 +2621,10 @@ get_reloc_section (abfd, ia64_info, sec, create)
if (srel_name == NULL)
return NULL;
- BFD_ASSERT ((CONST_STRNEQ (srel_name, ".rela")
+ BFD_ASSERT ((strncmp (srel_name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
srel_name+5) == 0)
- || (CONST_STRNEQ (srel_name, ".rel")
+ || (strncmp (srel_name, ".rel", 4) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
srel_name+4) == 0));
@@ -2734,7 +2741,7 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
have yet been processed. Do something with what we know, as
this may help reduce memory usage and processing time later. */
maybe_dynamic = (h && ((!info->executable
- && (!SYMBOLIC_BIND (info, h)
+ && (!info->symbolic
|| info->unresolved_syms_in_shared_libs == RM_IGNORE))
|| !h->def_regular
|| h->root.type == bfd_link_hash_defweak));
@@ -2906,7 +2913,7 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
have yet been processed. Do something with what we know, as
this may help reduce memory usage and processing time later. */
maybe_dynamic = (h && ((!info->executable
- && (!SYMBOLIC_BIND (info, h)
+ && (!info->symbolic
|| info->unresolved_syms_in_shared_libs == RM_IGNORE))
|| !h->def_regular
|| h->root.type == bfd_link_hash_defweak));
@@ -3695,7 +3702,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
if (strcmp (name, ".got.plt") == 0)
strip = FALSE;
- else if (CONST_STRNEQ (name, ".rel"))
+ else if (strncmp (name, ".rel", 4) == 0)
{
if (!strip)
{
@@ -4751,12 +4758,6 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_LTV32LSB:
case R_IA64_LTV64MSB:
case R_IA64_LTV64LSB:
- /* r_symndx will be zero only for relocs against symbols
- from removed linkonce sections, or sections discarded by
- a linker script. */
- if (r_symndx == 0)
- value = 0;
-
r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
@@ -5568,9 +5569,9 @@ elfNN_ia64_reloc_type_class (rela)
static const struct bfd_elf_special_section elfNN_ia64_special_sections[] =
{
- { STRING_COMMA_LEN (".sbss"), -1, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
- { STRING_COMMA_LEN (".sdata"), -1, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
- { NULL, 0, 0, 0, 0 }
+ { ".sbss", 5, -1, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
+ { ".sdata", 6, -1, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
+ { NULL, 0, 0, 0, 0 }
};
static bfd_boolean
@@ -5597,7 +5598,7 @@ elfNN_ia64_object_p (bfd *abfd)
if (elf_sec_group (sec) == NULL
&& ((sec->flags & (SEC_LINK_ONCE | SEC_CODE | SEC_GROUP))
== (SEC_LINK_ONCE | SEC_CODE))
- && CONST_STRNEQ (sec->name, ".gnu.linkonce.t."))
+ && strncmp (sec->name, ".gnu.linkonce.t.", 16) == 0)
{
name = sec->name + 16;
@@ -5768,8 +5769,6 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
elfNN_ia64_adjust_dynamic_symbol
#define elf_backend_size_dynamic_sections \
elfNN_ia64_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define elf_backend_relocate_section \
elfNN_ia64_relocate_section
#define elf_backend_finish_dynamic_symbol \
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 8f1fb6d..cdc81a2 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -493,7 +493,7 @@ static bfd_boolean mips_elf_sort_hash_table_f
(struct mips_elf_link_hash_entry *, void *);
static bfd_vma mips_elf_high
(bfd_vma);
-static bfd_boolean mips16_stub_section_p
+static bfd_boolean mips_elf_stub_section_p
(bfd *, asection *);
static bfd_boolean mips_elf_create_dynamic_relocation
(bfd *, struct bfd_link_info *, const Elf_Internal_Rela *,
@@ -709,10 +709,6 @@ static bfd *reldyn_sorting_bfd;
#define FN_STUB ".mips16.fn."
#define CALL_STUB ".mips16.call."
#define CALL_FP_STUB ".mips16.call.fp."
-
-#define FN_STUB_P(name) CONST_STRNEQ (name, FN_STUB)
-#define CALL_STUB_P(name) CONST_STRNEQ (name, CALL_STUB)
-#define CALL_FP_STUB_P(name) CONST_STRNEQ (name, CALL_FP_STUB)
/* The format of the first PLT entry in a VxWorks executable. */
static const bfd_vma mips_vxworks_exec_plt0_entry[] = {
@@ -1696,20 +1692,11 @@ sort_dynamic_relocs (const void *arg1, const void *arg2)
{
Elf_Internal_Rela int_reloc1;
Elf_Internal_Rela int_reloc2;
- int diff;
bfd_elf32_swap_reloc_in (reldyn_sorting_bfd, arg1, &int_reloc1);
bfd_elf32_swap_reloc_in (reldyn_sorting_bfd, arg2, &int_reloc2);
- diff = ELF32_R_SYM (int_reloc1.r_info) - ELF32_R_SYM (int_reloc2.r_info);
- if (diff != 0)
- return diff;
-
- if (int_reloc1.r_offset < int_reloc2.r_offset)
- return -1;
- if (int_reloc1.r_offset > int_reloc2.r_offset)
- return 1;
- return 0;
+ return ELF32_R_SYM (int_reloc1.r_info) - ELF32_R_SYM (int_reloc2.r_info);
}
/* Like sort_dynamic_relocs, but used for elf64 relocations. */
@@ -1727,16 +1714,8 @@ sort_dynamic_relocs_64 (const void *arg1 ATTRIBUTE_UNUSED,
(*get_elf_backend_data (reldyn_sorting_bfd)->s->swap_reloc_in)
(reldyn_sorting_bfd, arg2, int_reloc2);
- if (ELF64_R_SYM (int_reloc1[0].r_info) < ELF64_R_SYM (int_reloc2[0].r_info))
- return -1;
- if (ELF64_R_SYM (int_reloc1[0].r_info) > ELF64_R_SYM (int_reloc2[0].r_info))
- return 1;
-
- if (int_reloc1[0].r_offset < int_reloc2[0].r_offset)
- return -1;
- if (int_reloc1[0].r_offset > int_reloc2[0].r_offset)
- return 1;
- return 0;
+ return (ELF64_R_SYM (int_reloc1[0].r_info)
+ - ELF64_R_SYM (int_reloc2[0].r_info));
#else
abort ();
#endif
@@ -3109,7 +3088,8 @@ mips_elf_merge_gots (void **bfd2got_, void *p)
if (tcount > 0)
{
unsigned int primary_total = lcount + tcount + arg->global_count;
- if (primary_total > maxcnt)
+ if (primary_total * MIPS_ELF_GOT_SIZE (bfd2got->bfd)
+ >= MIPS_ELF_GOT_MAX_SIZE (arg->info))
too_many_for_tls = TRUE;
}
@@ -4082,10 +4062,9 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
a stub. */
if (r_type != R_MIPS16_26 && !info->relocatable
&& ((h != NULL && h->fn_stub != NULL)
- || (local_p
- && elf_tdata (input_bfd)->local_stubs != NULL
+ || (local_p && elf_tdata (input_bfd)->local_stubs != NULL
&& elf_tdata (input_bfd)->local_stubs[r_symndx] != NULL))
- && !mips16_stub_section_p (input_bfd, input_section))
+ && !mips_elf_stub_section_p (input_bfd, input_section))
{
/* This is a 32- or 64-bit call to a 16-bit function. We should
have already noticed that we were going to need the
@@ -4106,40 +4085,33 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
need to redirect the call to the stub. */
else if (r_type == R_MIPS16_26 && !info->relocatable
&& h != NULL
- && ((h->call_stub != NULL || h->call_fp_stub != NULL)
- || (local_p
- && elf_tdata (input_bfd)->local_call_stubs != NULL
- && elf_tdata (input_bfd)->local_call_stubs[r_symndx] != NULL))
+ && (h->call_stub != NULL || h->call_fp_stub != NULL)
&& !target_is_16_bit_code_p)
{
- if (local_p)
- sec = elf_tdata (input_bfd)->local_call_stubs[r_symndx];
- else
+ /* If both call_stub and call_fp_stub are defined, we can figure
+ out which one to use by seeing which one appears in the input
+ file. */
+ if (h->call_stub != NULL && h->call_fp_stub != NULL)
{
- /* If both call_stub and call_fp_stub are defined, we can figure
- out which one to use by checking which one appears in the input
- file. */
- if (h->call_stub != NULL && h->call_fp_stub != NULL)
+ asection *o;
+
+ sec = NULL;
+ for (o = input_bfd->sections; o != NULL; o = o->next)
{
- asection *o;
-
- sec = NULL;
- for (o = input_bfd->sections; o != NULL; o = o->next)
+ if (strncmp (bfd_get_section_name (input_bfd, o),
+ CALL_FP_STUB, sizeof CALL_FP_STUB - 1) == 0)
{
- if (CALL_FP_STUB_P (bfd_get_section_name (input_bfd, o)))
- {
- sec = h->call_fp_stub;
- break;
- }
+ sec = h->call_fp_stub;
+ break;
}
- if (sec == NULL)
- sec = h->call_stub;
}
- else if (h->call_stub != NULL)
+ if (sec == NULL)
sec = h->call_stub;
- else
- sec = h->call_fp_stub;
- }
+ }
+ else if (h->call_stub != NULL)
+ sec = h->call_stub;
+ else
+ sec = h->call_fp_stub;
BFD_ASSERT (sec->size > 0);
symbol = sec->output_section->vma + sec->output_offset;
@@ -4323,11 +4295,6 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
input_section))
return bfd_reloc_undefined;
}
- else if (r_symndx == 0)
- /* r_symndx will be zero only for relocs against symbols
- from removed linkonce sections, or sections discarded by
- a linker script. */
- value = 0;
else
{
if (r_type != R_MIPS_REL32)
@@ -4719,11 +4686,13 @@ mips_elf_perform_relocation (struct bfd_link_info *info,
/* Returns TRUE if SECTION is a MIPS16 stub section. */
static bfd_boolean
-mips16_stub_section_p (bfd *abfd ATTRIBUTE_UNUSED, asection *section)
+mips_elf_stub_section_p (bfd *abfd ATTRIBUTE_UNUSED, asection *section)
{
const char *name = bfd_get_section_name (abfd, section);
- return FN_STUB_P (name) || CALL_STUB_P (name) || CALL_FP_STUB_P (name);
+ return (strncmp (name, FN_STUB, sizeof FN_STUB - 1) == 0
+ || strncmp (name, CALL_STUB, sizeof CALL_STUB - 1) == 0
+ || strncmp (name, CALL_FP_STUB, sizeof CALL_FP_STUB - 1) == 0);
}
/* Add room for N relocations to the .rel(a).dyn section in ABFD. */
@@ -4832,11 +4801,6 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
{
indx = elf_section_data (sec->output_section)->dynindx;
if (indx == 0)
- {
- asection *osec = htab->root.text_index_section;
- indx = elf_section_data (osec)->dynindx;
- }
- if (indx == 0)
abort ();
}
@@ -5443,7 +5407,7 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd,
return FALSE;
break;
case SHT_MIPS_GPTAB:
- if (! CONST_STRNEQ (name, ".gptab."))
+ if (strncmp (name, ".gptab.", sizeof ".gptab." - 1) != 0)
return FALSE;
break;
case SHT_MIPS_UCODE:
@@ -5466,7 +5430,7 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd,
return FALSE;
break;
case SHT_MIPS_CONTENT:
- if (! CONST_STRNEQ (name, ".MIPS.content"))
+ if (strncmp (name, ".MIPS.content", sizeof ".MIPS.content" - 1) != 0)
return FALSE;
break;
case SHT_MIPS_OPTIONS:
@@ -5474,7 +5438,7 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd,
return FALSE;
break;
case SHT_MIPS_DWARF:
- if (! CONST_STRNEQ (name, ".debug_"))
+ if (strncmp (name, ".debug_", sizeof ".debug_" - 1) != 0)
return FALSE;
break;
case SHT_MIPS_SYMBOL_LIB:
@@ -5482,8 +5446,9 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd,
return FALSE;
break;
case SHT_MIPS_EVENTS:
- if (! CONST_STRNEQ (name, ".MIPS.events")
- && ! CONST_STRNEQ (name, ".MIPS.post_rel"))
+ if (strncmp (name, ".MIPS.events", sizeof ".MIPS.events" - 1) != 0
+ && strncmp (name, ".MIPS.post_rel",
+ sizeof ".MIPS.post_rel" - 1) != 0)
return FALSE;
break;
default:
@@ -5603,7 +5568,7 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
}
else if (strcmp (name, ".conflict") == 0)
hdr->sh_type = SHT_MIPS_CONFLICT;
- else if (CONST_STRNEQ (name, ".gptab."))
+ else if (strncmp (name, ".gptab.", sizeof ".gptab." - 1) == 0)
{
hdr->sh_type = SHT_MIPS_GPTAB;
hdr->sh_entsize = sizeof (Elf32_External_gptab);
@@ -5660,7 +5625,7 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
hdr->sh_type = SHT_MIPS_IFACE;
hdr->sh_flags |= SHF_MIPS_NOSTRIP;
}
- else if (CONST_STRNEQ (name, ".MIPS.content"))
+ else if (strncmp (name, ".MIPS.content", strlen (".MIPS.content")) == 0)
{
hdr->sh_type = SHT_MIPS_CONTENT;
hdr->sh_flags |= SHF_MIPS_NOSTRIP;
@@ -5672,7 +5637,7 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
hdr->sh_entsize = 1;
hdr->sh_flags |= SHF_MIPS_NOSTRIP;
}
- else if (CONST_STRNEQ (name, ".debug_"))
+ else if (strncmp (name, ".debug_", sizeof ".debug_" - 1) == 0)
hdr->sh_type = SHT_MIPS_DWARF;
else if (strcmp (name, ".MIPS.symlib") == 0)
{
@@ -5680,8 +5645,9 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
/* The sh_link and sh_info fields are set in
final_write_processing. */
}
- else if (CONST_STRNEQ (name, ".MIPS.events")
- || CONST_STRNEQ (name, ".MIPS.post_rel"))
+ else if (strncmp (name, ".MIPS.events", sizeof ".MIPS.events" - 1) == 0
+ || strncmp (name, ".MIPS.post_rel",
+ sizeof ".MIPS.post_rel" - 1) == 0)
{
hdr->sh_type = SHT_MIPS_EVENTS;
hdr->sh_flags |= SHF_MIPS_NOSTRIP;
@@ -6152,7 +6118,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* Check for the mips16 stub sections. */
name = bfd_get_section_name (abfd, sec);
- if (FN_STUB_P (name))
+ if (strncmp (name, FN_STUB, sizeof FN_STUB - 1) == 0)
{
unsigned long r_symndx;
@@ -6177,7 +6143,12 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* We can ignore stub sections when looking for relocs. */
if ((o->flags & SEC_RELOC) == 0
|| o->reloc_count == 0
- || mips16_stub_section_p (abfd, o))
+ || strncmp (bfd_get_section_name (abfd, o), FN_STUB,
+ sizeof FN_STUB - 1) == 0
+ || strncmp (bfd_get_section_name (abfd, o), CALL_STUB,
+ sizeof CALL_STUB - 1) == 0
+ || strncmp (bfd_get_section_name (abfd, o), CALL_FP_STUB,
+ sizeof CALL_FP_STUB - 1) == 0)
continue;
sec_relocs
@@ -6229,7 +6200,6 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
elf_tdata (abfd)->local_stubs = n;
}
- sec->flags |= SEC_KEEP;
elf_tdata (abfd)->local_stubs[r_symndx] = sec;
/* We don't need to set mips16_stubs_seen in this case.
@@ -6250,23 +6220,12 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* H is the symbol this stub is for. */
- /* If we already have an appropriate stub for this function, we
- don't need another one, so we can discard this one. Since
- this function is called before the linker maps input sections
- to output sections, we can easily discard it by setting the
- SEC_EXCLUDE flag. */
- if (h->fn_stub != NULL)
- {
- sec->flags |= SEC_EXCLUDE;
- return TRUE;
- }
-
- sec->flags |= SEC_KEEP;
h->fn_stub = sec;
mips_elf_hash_table (info)->mips16_stubs_seen = TRUE;
}
}
- else if (CALL_STUB_P (name) || CALL_FP_STUB_P (name))
+ else if (strncmp (name, CALL_STUB, sizeof CALL_STUB - 1) == 0
+ || strncmp (name, CALL_FP_STUB, sizeof CALL_FP_STUB - 1) == 0)
{
unsigned long r_symndx;
struct mips_elf_link_hash_entry *h;
@@ -6280,106 +6239,42 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (r_symndx < extsymoff
|| sym_hashes[r_symndx - extsymoff] == NULL)
{
- asection *o;
-
- /* This stub is for a local symbol. This stub will only be
- needed if there is some relocation (R_MIPS16_26) in this BFD
- that refers to this symbol. */
- for (o = abfd->sections; o != NULL; o = o->next)
- {
- Elf_Internal_Rela *sec_relocs;
- const Elf_Internal_Rela *r, *rend;
-
- /* We can ignore stub sections when looking for relocs. */
- if ((o->flags & SEC_RELOC) == 0
- || o->reloc_count == 0
- || mips16_stub_section_p (abfd, o))
- continue;
-
- sec_relocs
- = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL,
- info->keep_memory);
- if (sec_relocs == NULL)
- return FALSE;
-
- rend = sec_relocs + o->reloc_count;
- for (r = sec_relocs; r < rend; r++)
- if (ELF_R_SYM (abfd, r->r_info) == r_symndx
- && ELF_R_TYPE (abfd, r->r_info) == R_MIPS16_26)
- break;
-
- if (elf_section_data (o)->relocs != sec_relocs)
- free (sec_relocs);
-
- if (r < rend)
- break;
- }
-
- if (o == NULL)
- {
- /* There is no non-call reloc for this stub, so we do
- not need it. Since this function is called before
- the linker maps input sections to output sections, we
- can easily discard it by setting the SEC_EXCLUDE
- flag. */
- sec->flags |= SEC_EXCLUDE;
- return TRUE;
- }
-
- /* Record this stub in an array of local symbol call_stubs for
- this BFD. */
- if (elf_tdata (abfd)->local_call_stubs == NULL)
- {
- unsigned long symcount;
- asection **n;
- bfd_size_type amt;
+ /* This stub was actually built for a static symbol defined
+ in the same file. We assume that all static symbols in
+ mips16 code are themselves mips16, so we can simply
+ discard this stub. Since this function is called before
+ the linker maps input sections to output sections, we can
+ easily discard it by setting the SEC_EXCLUDE flag. */
+ sec->flags |= SEC_EXCLUDE;
+ return TRUE;
+ }
- if (elf_bad_symtab (abfd))
- symcount = NUM_SHDR_ENTRIES (symtab_hdr);
- else
- symcount = symtab_hdr->sh_info;
- amt = symcount * sizeof (asection *);
- n = bfd_zalloc (abfd, amt);
- if (n == NULL)
- return FALSE;
- elf_tdata (abfd)->local_call_stubs = n;
- }
+ h = ((struct mips_elf_link_hash_entry *)
+ sym_hashes[r_symndx - extsymoff]);
- sec->flags |= SEC_KEEP;
- elf_tdata (abfd)->local_call_stubs[r_symndx] = sec;
+ /* H is the symbol this stub is for. */
- /* We don't need to set mips16_stubs_seen in this case.
- That flag is used to see whether we need to look through
- the global symbol table for stubs. We don't need to set
- it here, because we just have a local stub. */
- }
+ if (strncmp (name, CALL_FP_STUB, sizeof CALL_FP_STUB - 1) == 0)
+ loc = &h->call_fp_stub;
else
- {
- h = ((struct mips_elf_link_hash_entry *)
- sym_hashes[r_symndx - extsymoff]);
-
- /* H is the symbol this stub is for. */
-
- if (CALL_FP_STUB_P (name))
- loc = &h->call_fp_stub;
- else
- loc = &h->call_stub;
-
- /* If we already have an appropriate stub for this function, we
- don't need another one, so we can discard this one. Since
- this function is called before the linker maps input sections
- to output sections, we can easily discard it by setting the
- SEC_EXCLUDE flag. */
- if (*loc != NULL)
- {
- sec->flags |= SEC_EXCLUDE;
- return TRUE;
- }
-
- sec->flags |= SEC_KEEP;
- *loc = sec;
- mips_elf_hash_table (info)->mips16_stubs_seen = TRUE;
+ loc = &h->call_stub;
+
+ /* If we already have an appropriate stub for this function, we
+ don't need another one, so we can discard this one. Since
+ this function is called before the linker maps input sections
+ to output sections, we can easily discard it by setting the
+ SEC_EXCLUDE flag. We can also discard this section if we
+ happen to already know that this is a mips16 function; it is
+ not necessary to check this here, as it is checked later, but
+ it is slightly faster to check now. */
+ if (*loc != NULL || h->root.other == STO_MIPS16)
+ {
+ sec->flags |= SEC_EXCLUDE;
+ return TRUE;
}
+
+ *loc = sec;
+ mips_elf_hash_table (info)->mips16_stubs_seen = TRUE;
}
if (dynobj == NULL)
@@ -6744,7 +6639,12 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
References from a stub section do not count. */
if (h != NULL
&& r_type != R_MIPS16_26
- && !mips16_stub_section_p (abfd, sec))
+ && strncmp (bfd_get_section_name (abfd, sec), FN_STUB,
+ sizeof FN_STUB - 1) != 0
+ && strncmp (bfd_get_section_name (abfd, sec), CALL_STUB,
+ sizeof CALL_STUB - 1) != 0
+ && strncmp (bfd_get_section_name (abfd, sec), CALL_FP_STUB,
+ sizeof CALL_FP_STUB - 1) != 0)
{
struct mips_elf_link_hash_entry *mh;
@@ -7392,7 +7292,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
- if (CONST_STRNEQ (name, ".rel"))
+ if (strncmp (name, ".rel", 4) == 0)
{
if (s->size != 0)
{
@@ -7444,7 +7344,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
mips_elf_allocate_dynamic_relocations (dynobj, info, count);
}
}
- else if (!htab->is_vxworks && CONST_STRNEQ (name, ".got"))
+ else if (!htab->is_vxworks && strncmp (name, ".got", 4) == 0)
{
/* _bfd_mips_elf_always_size_sections() has already done
most of the work, but some symbols may have been mapped
@@ -7520,16 +7420,16 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
}
else if (! info->shared
&& ! mips_elf_hash_table (info)->use_rld_obj_head
- && CONST_STRNEQ (name, ".rld_map"))
+ && strncmp (name, ".rld_map", 8) == 0)
{
/* We add a room for __rld_map. It will be filled in by the
rtld to contain a pointer to the _r_debug structure. */
s->size += 4;
}
else if (SGI_COMPAT (output_bfd)
- && CONST_STRNEQ (name, ".compact_rel"))
+ && strncmp (name, ".compact_rel", 12) == 0)
s->size += mips_elf_hash_table (info)->compact_rel_size;
- else if (! CONST_STRNEQ (name, ".init")
+ else if (strncmp (name, ".init", 5) != 0
&& s != htab->sgotplt
&& s != htab->splt)
{
@@ -7581,7 +7481,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
must add the entries now so that we get the correct size for
the .dynamic section. The DT_DEBUG entry is filled in by the
dynamic linker and used by the debugger. */
- if (info->executable)
+ if (! info->shared)
{
/* SGI object has the equivalence of DT_DEBUG in the
DT_MIPS_RLD_MAP entry. */
@@ -7593,6 +7493,15 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
return FALSE;
}
}
+ else
+ {
+ /* Shared libraries on traditional mips have DT_DEBUG. */
+ if (!SGI_COMPAT (output_bfd))
+ {
+ if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
+ return FALSE;
+ }
+ }
if (reltext && (SGI_COMPAT (output_bfd) || htab->is_vxworks))
info->flags |= DF_TEXTREL;
@@ -8959,10 +8868,6 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
* (ABI_64_P (output_bfd)
? sizeof (Elf64_Mips_External_Rel)
: sizeof (Elf32_External_Rel)));
- /* Adjust the section size too. Tools like the prelinker
- can reasonably expect the values to the same. */
- elf_section_data (s->output_section)->this_hdr.sh_size
- = dyn.d_un.d_val;
break;
default:
@@ -9184,7 +9089,7 @@ _bfd_mips_elf_final_write_processing (bfd *abfd,
BFD_ASSERT ((*hdrpp)->bfd_section != NULL);
name = bfd_get_section_name (abfd, (*hdrpp)->bfd_section);
BFD_ASSERT (name != NULL
- && CONST_STRNEQ (name, ".gptab."));
+ && strncmp (name, ".gptab.", sizeof ".gptab." - 1) == 0);
sec = bfd_get_section_by_name (abfd, name + sizeof ".gptab" - 1);
BFD_ASSERT (sec != NULL);
(*hdrpp)->sh_info = elf_section_data (sec)->this_idx;
@@ -9194,7 +9099,8 @@ _bfd_mips_elf_final_write_processing (bfd *abfd,
BFD_ASSERT ((*hdrpp)->bfd_section != NULL);
name = bfd_get_section_name (abfd, (*hdrpp)->bfd_section);
BFD_ASSERT (name != NULL
- && CONST_STRNEQ (name, ".MIPS.content"));
+ && strncmp (name, ".MIPS.content",
+ sizeof ".MIPS.content" - 1) == 0);
sec = bfd_get_section_by_name (abfd,
name + sizeof ".MIPS.content" - 1);
BFD_ASSERT (sec != NULL);
@@ -9214,12 +9120,13 @@ _bfd_mips_elf_final_write_processing (bfd *abfd,
BFD_ASSERT ((*hdrpp)->bfd_section != NULL);
name = bfd_get_section_name (abfd, (*hdrpp)->bfd_section);
BFD_ASSERT (name != NULL);
- if (CONST_STRNEQ (name, ".MIPS.events"))
+ if (strncmp (name, ".MIPS.events", sizeof ".MIPS.events" - 1) == 0)
sec = bfd_get_section_by_name (abfd,
name + sizeof ".MIPS.events" - 1);
else
{
- BFD_ASSERT (CONST_STRNEQ (name, ".MIPS.post_rel"));
+ BFD_ASSERT (strncmp (name, ".MIPS.post_rel",
+ sizeof ".MIPS.post_rel" - 1) == 0);
sec = bfd_get_section_by_name (abfd,
(name
+ sizeof ".MIPS.post_rel" - 1));
@@ -9259,12 +9166,6 @@ _bfd_mips_elf_additional_program_headers (bfd *abfd,
&& bfd_get_section_by_name (abfd, ".mdebug"))
++ret;
- /* Allocate a PT_NULL header in dynamic objects. See
- _bfd_mips_elf_modify_segment_map for details. */
- if (!SGI_COMPAT (abfd)
- && bfd_get_section_by_name (abfd, ".dynamic"))
- ++ret;
-
return ret;
}
@@ -9415,18 +9316,8 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
m->p_flags_valid = 1;
}
}
- /* GNU/Linux binaries do not need the extended PT_DYNAMIC section.
- glibc's dynamic linker has traditionally derived the number of
- tags from the p_filesz field, and sometimes allocates stack
- arrays of that size. An overly-big PT_DYNAMIC segment can
- be actively harmful in such cases. Making PT_DYNAMIC contain
- other sections can also make life hard for the prelinker,
- which might move one of the other sections to a different
- PT_LOAD segment. */
- if (SGI_COMPAT (abfd)
- && m != NULL
- && m->count == 1
- && strcmp (m->sections[0]->name, ".dynamic") == 0)
+ if (m != NULL
+ && m->count == 1 && strcmp (m->sections[0]->name, ".dynamic") == 0)
{
static const char *sec_names[] =
{
@@ -9483,38 +9374,6 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
}
}
- /* Allocate a spare program header in dynamic objects so that tools
- like the prelinker can add an extra PT_LOAD entry.
-
- If the prelinker needs to make room for a new PT_LOAD entry, its
- standard procedure is to move the first (read-only) sections into
- the new (writable) segment. However, the MIPS ABI requires
- .dynamic to be in a read-only segment, and the section will often
- start within sizeof (ElfNN_Phdr) bytes of the last program header.
-
- Although the prelinker could in principle move .dynamic to a
- writable segment, it seems better to allocate a spare program
- header instead, and avoid the need to move any sections.
- There is a long tradition of allocating spare dynamic tags,
- so allocating a spare program header seems like a natural
- extension. */
- if (!SGI_COMPAT (abfd)
- && bfd_get_section_by_name (abfd, ".dynamic"))
- {
- for (pm = &elf_tdata (abfd)->segment_map; *pm != NULL; pm = &(*pm)->next)
- if ((*pm)->p_type == PT_NULL)
- break;
- if (*pm == NULL)
- {
- m = bfd_zalloc (abfd, sizeof (*m));
- if (m == NULL)
- return FALSE;
-
- m->p_type = PT_NULL;
- *pm = m;
- }
- }
-
return TRUE;
}
@@ -9523,7 +9382,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
asection *
_bfd_mips_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
@@ -9531,14 +9390,32 @@ _bfd_mips_elf_gc_mark_hook (asection *sec,
/* ??? Do mips16 stub sections need to be handled special? */
if (h != NULL)
- switch (ELF_R_TYPE (sec->owner, rel->r_info))
- {
- case R_MIPS_GNU_VTINHERIT:
- case R_MIPS_GNU_VTENTRY:
- return NULL;
- }
+ {
+ switch (ELF_R_TYPE (sec->owner, rel->r_info))
+ {
+ case R_MIPS_GNU_VTINHERIT:
+ case R_MIPS_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ return NULL;
}
/* Update the got entry reference counts for the section being removed. */
@@ -10558,7 +10435,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
mdebug_sec = o;
}
- if (CONST_STRNEQ (o->name, ".gptab."))
+ if (strncmp (o->name, ".gptab.", sizeof ".gptab." - 1) == 0)
{
const char *subname;
unsigned int c;
@@ -11229,13 +11106,13 @@ _bfd_mips_elf_print_private_bfd_data (bfd *abfd, void *ptr)
const struct bfd_elf_special_section _bfd_mips_elf_special_sections[] =
{
- { STRING_COMMA_LEN (".lit4"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { STRING_COMMA_LEN (".lit8"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { STRING_COMMA_LEN (".mdebug"), 0, SHT_MIPS_DEBUG, 0 },
- { STRING_COMMA_LEN (".sbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { STRING_COMMA_LEN (".sdata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { STRING_COMMA_LEN (".ucode"), 0, SHT_MIPS_UCODE, 0 },
- { NULL, 0, 0, 0, 0 }
+ { ".lit4", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+ { ".lit8", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+ { ".mdebug", 7, 0, SHT_MIPS_DEBUG, 0 },
+ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+ { ".ucode", 6, 0, SHT_MIPS_UCODE, 0 },
+ { NULL, 0, 0, 0, 0 }
};
/* Merge non visibility st_other attributes. Ensure that the
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index 3b64aca..6da70a3 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -1430,7 +1430,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (name == NULL)
return FALSE;
- BFD_ASSERT (CONST_STRNEQ (name, ".rela")
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
&& strcmp (bfd_get_section_name (abfd, sec),
name + 5) == 0);
@@ -1532,14 +1532,35 @@ _bfd_sparc_elf_gc_mark_hook (asection *sec,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- switch (SPARC_ELF_R_TYPE (rel->r_info))
+ {
+ struct _bfd_sparc_elf_link_hash_table *htab;
+
+ htab = _bfd_sparc_elf_hash_table (info);
+ switch (SPARC_ELF_R_TYPE (rel->r_info))
{
case R_SPARC_GNU_VTINHERIT:
case R_SPARC_GNU_VTENTRY:
- return NULL;
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
}
+ }
+ else
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+ return NULL;
}
/* Update the got entry reference counts for the section being removed. */
@@ -2269,7 +2290,7 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd,
/* Strip this section if we don't need it; see the
comment below. */
}
- else if (CONST_STRNEQ (s->name, ".rela"))
+ else if (strncmp (s->name, ".rela", 5) == 0)
{
if (s->size != 0)
{
@@ -2755,13 +2776,8 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* r_symndx will be zero only for relocs against symbols
from removed linkonce sections, or sections discarded by
a linker script. */
- if (r_symndx == 0)
- {
- _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
- break;
- }
-
- if ((input_section->flags & SEC_ALLOC) == 0)
+ if (r_symndx == 0
+ || (input_section->flags & SEC_ALLOC) == 0)
break;
if ((info->shared
@@ -2869,8 +2885,6 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
long indx;
- outrel.r_addend = relocation + rel->r_addend;
-
if (is_plt)
sec = htab->splt;
@@ -2885,20 +2899,9 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
asection *osec;
- /* We are turning this relocation into one
- against a section symbol. It would be
- proper to subtract the symbol's value,
- osec->vma, from the emitted reloc addend,
- but ld.so expects buggy relocs. */
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
- if (indx == 0)
- {
- osec = htab->elf.text_index_section;
- indx = elf_section_data (osec)->dynindx;
- }
-
/* FIXME: we really should be able to link non-pic
shared libraries. */
if (indx == 0)
@@ -2912,8 +2915,8 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
}
}
- outrel.r_info = SPARC_ELF_R_INFO (htab, rel, indx,
- r_type);
+ outrel.r_info = SPARC_ELF_R_INFO (htab, rel, indx, r_type);
+ outrel.r_addend = relocation + rel->r_addend;
}
}
@@ -4084,8 +4087,7 @@ _bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i
}
elf_section_data (splt->output_section)->this_hdr.sh_entsize
- = (htab->is_vxworks || !ABI_64_P (output_bfd))
- ? 0 : htab->plt_entry_size;
+ = htab->plt_entry_size;
}
/* Set the first entry in the global offset table to the address of
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index 9e8ceca..fed6ea9 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -131,7 +131,7 @@
#define elf_backend_gc_mark_dynamic_ref bfd_elf_gc_mark_dynamic_ref_symbol
#endif
#ifndef elf_backend_gc_mark_hook
-#define elf_backend_gc_mark_hook _bfd_elf_gc_mark_hook
+#define elf_backend_gc_mark_hook NULL
#endif
#ifndef elf_backend_gc_sweep_hook
#define elf_backend_gc_sweep_hook NULL
@@ -381,10 +381,6 @@
#ifndef elf_backend_size_dynamic_sections
#define elf_backend_size_dynamic_sections 0
#endif
-#ifndef elf_backend_init_index_section
-#define elf_backend_init_index_section \
- ((void (*) (bfd *, struct bfd_link_info *)) bfd_void)
-#endif
#ifndef elf_backend_relocate_section
#define elf_backend_relocate_section 0
#endif
@@ -607,7 +603,6 @@ static struct elf_backend_data elfNN_bed =
elf_backend_adjust_dynamic_symbol,
elf_backend_always_size_sections,
elf_backend_size_dynamic_sections,
- elf_backend_init_index_section,
elf_backend_relocate_section,
elf_backend_finish_dynamic_symbol,
elf_backend_finish_dynamic_sections,
diff --git a/bfd/hpux-core.c b/bfd/hpux-core.c
index e8a5e31..b3c070c 100644
--- a/bfd/hpux-core.c
+++ b/bfd/hpux-core.c
@@ -144,7 +144,7 @@ thread_section_p (bfd *abfd ATTRIBUTE_UNUSED,
asection *sect,
void *obj ATTRIBUTE_UNUSED)
{
- return CONST_STRNEQ (sect->name, ".reg/");
+ return (strncmp (sect->name, ".reg/", 5) == 0);
}
/* this function builds a bfd target if the file is a corefile.
diff --git a/bfd/i386linux.c b/bfd/i386linux.c
index 99d1c06..519c40e 100644
--- a/bfd/i386linux.c
+++ b/bfd/i386linux.c
@@ -93,7 +93,8 @@ i386linux_write_object_contents (abfd)
#define GOT_REF_PREFIX "__GOT_"
#endif
-#define IS_GOT_SYM(name) (CONST_STRNEQ (name, GOT_REF_PREFIX))
+#define IS_GOT_SYM(name) \
+ (strncmp (name, GOT_REF_PREFIX, sizeof GOT_REF_PREFIX - 1) == 0)
/* See if a symbol name is a reference to the procedure linkage table. */
@@ -101,7 +102,8 @@ i386linux_write_object_contents (abfd)
#define PLT_REF_PREFIX "__PLT_"
#endif
-#define IS_PLT_SYM(name) (CONST_STRNEQ (name, PLT_REF_PREFIX))
+#define IS_PLT_SYM(name) \
+ (strncmp (name, PLT_REF_PREFIX, sizeof PLT_REF_PREFIX - 1) == 0)
/* This string is used to generate specialized error messages. */
@@ -439,7 +441,8 @@ linux_tally_symbols (h, data)
h = (struct linux_link_hash_entry *) h->root.root.u.i.link;
if (h->root.root.type == bfd_link_hash_undefined
- && CONST_STRNEQ (h->root.root.root.string, NEEDS_SHRLIB))
+ && strncmp (h->root.root.root.string, NEEDS_SHRLIB,
+ sizeof NEEDS_SHRLIB - 1) == 0)
{
const char *name;
char *p;
diff --git a/bfd/ieee.c b/bfd/ieee.c
index 0d60ad1..f8d4e80 100644
--- a/bfd/ieee.c
+++ b/bfd/ieee.c
@@ -1875,8 +1875,8 @@ ieee_object_p (bfd *abfd)
family[9] = '\0';
}
}
- else if ((CONST_STRNEQ (processor, "cpu32")) /* CPU32 and CPU32+ */
- || (CONST_STRNEQ (processor, "CPU32")))
+ else if ((strncmp (processor, "cpu32", 5) == 0) /* CPU32 and CPU32+ */
+ || (strncmp (processor, "CPU32", 5) == 0))
strcpy (family, "68332");
else
{
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index 3de9ed4..52172c1 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -410,7 +410,7 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nolink_bfd_link_split_section \
((bfd_boolean (*) (bfd *, struct bfd_section *)) bfd_false)
#define _bfd_nolink_section_already_linked \
- ((void (*) (bfd *, struct bfd_section *, struct bfd_link_info *)) bfd_void)
+ ((void (*) (bfd *, struct bfd_section *)) bfd_void)
/* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
@@ -524,7 +524,7 @@ extern bfd_boolean _bfd_generic_link_split_section
(bfd *, struct bfd_section *);
extern void _bfd_generic_section_already_linked
- (bfd *, struct bfd_section *, struct bfd_link_info *);
+ (bfd *, struct bfd_section *);
/* Generic reloc_link_order processing routine. */
extern bfd_boolean _bfd_generic_reloc_link_order
@@ -547,10 +547,6 @@ extern bfd_reloc_status_type _bfd_final_link_relocate
extern bfd_reloc_status_type _bfd_relocate_contents
(reloc_howto_type *, bfd *, bfd_vma, bfd_byte *);
-/* Clear a given location using a given howto. */
-extern void _bfd_clear_contents (reloc_howto_type *howto, bfd *input_bfd,
- bfd_byte *location);
-
/* Link stabs in sections in the first pass. */
extern bfd_boolean _bfd_link_section_stabs
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 8c55264..0aa7046 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -415,7 +415,7 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nolink_bfd_link_split_section \
((bfd_boolean (*) (bfd *, struct bfd_section *)) bfd_false)
#define _bfd_nolink_section_already_linked \
- ((void (*) (bfd *, struct bfd_section *, struct bfd_link_info *)) bfd_void)
+ ((void (*) (bfd *, struct bfd_section *)) bfd_void)
/* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
@@ -529,7 +529,7 @@ extern bfd_boolean _bfd_generic_link_split_section
(bfd *, struct bfd_section *);
extern void _bfd_generic_section_already_linked
- (bfd *, struct bfd_section *, struct bfd_link_info *);
+ (bfd *, struct bfd_section *);
/* Generic reloc_link_order processing routine. */
extern bfd_boolean _bfd_generic_reloc_link_order
@@ -552,10 +552,6 @@ extern bfd_reloc_status_type _bfd_final_link_relocate
extern bfd_reloc_status_type _bfd_relocate_contents
(reloc_howto_type *, bfd *, bfd_vma, bfd_byte *);
-/* Clear a given location using a given howto. */
-extern void _bfd_clear_contents (reloc_howto_type *howto, bfd *input_bfd,
- bfd_byte *location);
-
/* Link stabs in sections in the first pass. */
extern bfd_boolean _bfd_link_section_stabs
@@ -906,18 +902,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_SPARC_TLS_DTPOFF64",
"BFD_RELOC_SPARC_TLS_TPOFF32",
"BFD_RELOC_SPARC_TLS_TPOFF64",
- "BFD_RELOC_SPU_IMM7",
- "BFD_RELOC_SPU_IMM8",
- "BFD_RELOC_SPU_IMM10",
- "BFD_RELOC_SPU_IMM10W",
- "BFD_RELOC_SPU_IMM16",
- "BFD_RELOC_SPU_IMM16W",
- "BFD_RELOC_SPU_IMM18",
- "BFD_RELOC_SPU_PCREL9a",
- "BFD_RELOC_SPU_PCREL9b",
- "BFD_RELOC_SPU_PCREL16",
- "BFD_RELOC_SPU_LO16",
- "BFD_RELOC_SPU_HI16",
"BFD_RELOC_ALPHA_GPDISP_HI16",
"BFD_RELOC_ALPHA_GPDISP_LO16",
"BFD_RELOC_ALPHA_GPDISP",
@@ -1626,17 +1610,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_390_GOT20",
"BFD_RELOC_390_GOTPLT20",
"BFD_RELOC_390_TLS_GOTIE20",
- "BFD_RELOC_SCORE_DUMMY1",
- "BFD_RELOC_SCORE_GPREL15",
- "BFD_RELOC_SCORE_DUMMY2",
- "BFD_RELOC_SCORE_JMP",
- "BFD_RELOC_SCORE_BRANCH",
- "BFD_RELOC_SCORE16_JMP",
- "BFD_RELOC_SCORE16_BRANCH",
- "BFD_RELOC_SCORE_GOT15",
- "BFD_RELOC_SCORE_GOT_LO16",
- "BFD_RELOC_SCORE_CALL15",
- "BFD_RELOC_SCORE_DUMMY_HI16",
"BFD_RELOC_IP2K_FR9",
"BFD_RELOC_IP2K_BANK",
"BFD_RELOC_IP2K_ADDR16CJP",
diff --git a/bfd/libpei.h b/bfd/libpei.h
index 10a2a25..f0f6580 100644
--- a/bfd/libpei.h
+++ b/bfd/libpei.h
@@ -1,5 +1,5 @@
/* Support for the generic parts of PE/PEI; common header information.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
Written by Cygnus Solutions.
@@ -204,39 +204,7 @@
#define PUT_SCNHDR_LNNOPTR H_PUT_32
#endif
-#ifdef COFF_WITH_pex64
-
-#define GET_OPTHDR_IMAGE_BASE H_GET_64
-#define PUT_OPTHDR_IMAGE_BASE H_PUT_64
-#define GET_OPTHDR_SIZE_OF_STACK_RESERVE H_GET_64
-#define PUT_OPTHDR_SIZE_OF_STACK_RESERVE H_PUT_64
-#define GET_OPTHDR_SIZE_OF_STACK_COMMIT H_GET_64
-#define PUT_OPTHDR_SIZE_OF_STACK_COMMIT H_PUT_64
-#define GET_OPTHDR_SIZE_OF_HEAP_RESERVE H_GET_64
-#define PUT_OPTHDR_SIZE_OF_HEAP_RESERVE H_PUT_64
-#define GET_OPTHDR_SIZE_OF_HEAP_COMMIT H_GET_64
-#define PUT_OPTHDR_SIZE_OF_HEAP_COMMIT H_PUT_64
-#define GET_PDATA_ENTRY bfd_get_32
-
-#define _bfd_XX_bfd_copy_private_bfd_data_common _bfd_pex64_bfd_copy_private_bfd_data_common
-#define _bfd_XX_bfd_copy_private_section_data _bfd_pex64_bfd_copy_private_section_data
-#define _bfd_XX_get_symbol_info _bfd_pex64_get_symbol_info
-#define _bfd_XX_only_swap_filehdr_out _bfd_pex64_only_swap_filehdr_out
-#define _bfd_XX_print_private_bfd_data_common _bfd_pex64_print_private_bfd_data_common
-#define _bfd_XXi_final_link_postscript _bfd_pex64i_final_link_postscript
-#define _bfd_XXi_final_link_postscript _bfd_pex64i_final_link_postscript
-#define _bfd_XXi_only_swap_filehdr_out _bfd_pex64i_only_swap_filehdr_out
-#define _bfd_XXi_swap_aouthdr_in _bfd_pex64i_swap_aouthdr_in
-#define _bfd_XXi_swap_aouthdr_out _bfd_pex64i_swap_aouthdr_out
-#define _bfd_XXi_swap_aux_in _bfd_pex64i_swap_aux_in
-#define _bfd_XXi_swap_aux_out _bfd_pex64i_swap_aux_out
-#define _bfd_XXi_swap_lineno_in _bfd_pex64i_swap_lineno_in
-#define _bfd_XXi_swap_lineno_out _bfd_pex64i_swap_lineno_out
-#define _bfd_XXi_swap_scnhdr_out _bfd_pex64i_swap_scnhdr_out
-#define _bfd_XXi_swap_sym_in _bfd_pex64i_swap_sym_in
-#define _bfd_XXi_swap_sym_out _bfd_pex64i_swap_sym_out
-
-#elif defined COFF_WITH_pep
+#ifdef COFF_WITH_pep
#define GET_OPTHDR_IMAGE_BASE H_GET_64
#define PUT_OPTHDR_IMAGE_BASE H_PUT_64
@@ -303,9 +271,9 @@
#endif /* !COFF_WITH_pep */
/* Macro: Returns true if the bfd is a PE executable as opposed to a PE object file. */
-#define bfd_pe_executable_p(abfd) \
- (CONST_STRNEQ ((abfd)->xvec->name, "pei-") \
- || CONST_STRNEQ ((abfd)->xvec->name, "efi-app-"))
+#define bfd_pe_executable_p(abfd) \
+ (strncmp ((abfd)->xvec->name, "pei-", 4) == 0 \
+ || strncmp ((abfd)->xvec->name, "efi-app-", 8) == 0)
/* These functions are architecture dependent, and are in peicode.h:
coff_swap_reloc_in
diff --git a/bfd/linker.c b/bfd/linker.c
index b9aaf00..14eeae4 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -562,11 +562,11 @@ bfd_wrapped_link_hash_lookup (bfd *abfd,
#undef WRAP
-#undef REAL
+#undef REAL
#define REAL "__real_"
if (*l == '_'
- && CONST_STRNEQ (l, REAL)
+ && strncmp (l, REAL, sizeof REAL - 1) == 0
&& bfd_hash_lookup (info->wrap_hash, l + sizeof REAL - 1,
FALSE, FALSE) != NULL)
{
@@ -1659,7 +1659,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
s = name + 1;
while (*s == '_')
++s;
- if (s[0] == 'G' && CONST_STRNEQ (s, CONS_PREFIX))
+ if (s[0] == 'G'
+ && strncmp (s, CONS_PREFIX, CONS_PREFIX_LEN - 1) == 0)
{
char c;
@@ -2876,15 +2877,14 @@ FUNCTION
bfd_section_already_linked
SYNOPSIS
- void bfd_section_already_linked (bfd *abfd, asection *sec,
- struct bfd_link_info *info);
+ void bfd_section_already_linked (bfd *abfd, asection *sec);
DESCRIPTION
Check if @var{sec} has been already linked during a reloceatable
or final link.
-.#define bfd_section_already_linked(abfd, sec, info) \
-. BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
+.#define bfd_section_already_linked(abfd, sec) \
+. BFD_SEND (abfd, _section_already_linked, (abfd, sec))
.
*/
@@ -2970,8 +2970,7 @@ bfd_section_already_linked_table_free (void)
/* This is used on non-ELF inputs. */
void
-_bfd_generic_section_already_linked (bfd *abfd, asection *sec,
- struct bfd_link_info *info ATTRIBUTE_UNUSED)
+_bfd_generic_section_already_linked (bfd *abfd, asection *sec)
{
flagword flags;
const char *name;
@@ -3075,7 +3074,7 @@ _bfd_generic_section_already_linked (bfd *abfd, asection *sec,
bfd_section_already_linked_table_insert (already_linked_list, sec);
}
-/* Convert symbols in excluded output sections to use a kept section. */
+/* Convert symbols in excluded output sections to absolute. */
static bfd_boolean
fix_syms (struct bfd_link_hash_entry *h, void *data)
@@ -3094,64 +3093,8 @@ fix_syms (struct bfd_link_hash_entry *h, void *data)
&& (s->output_section->flags & SEC_EXCLUDE) != 0
&& bfd_section_removed_from_list (obfd, s->output_section))
{
- asection *op, *op1;
-
h->u.def.value += s->output_offset + s->output_section->vma;
-
- /* Find preceding kept section. */
- for (op1 = s->output_section->prev; op1 != NULL; op1 = op1->prev)
- if ((op1->flags & SEC_EXCLUDE) == 0
- && !bfd_section_removed_from_list (obfd, op1))
- break;
-
- /* Find following kept section. Start at prev->next because
- other sections may have been added after S was removed. */
- if (s->output_section->prev != NULL)
- op = s->output_section->prev->next;
- else
- op = s->output_section->owner->sections;
- for (; op != NULL; op = op->next)
- if ((op->flags & SEC_EXCLUDE) == 0
- && !bfd_section_removed_from_list (obfd, op))
- break;
-
- /* Choose better of two sections, based on flags. The idea
- is to choose a section that will be in the same segment
- as S would have been if it was kept. */
- if (op1 == NULL)
- {
- if (op == NULL)
- op = bfd_abs_section_ptr;
- }
- else if (op == NULL)
- op = op1;
- else if (((op1->flags ^ op->flags)
- & (SEC_ALLOC | SEC_THREAD_LOCAL)) != 0)
- {
- if (((op->flags ^ s->flags)
- & (SEC_ALLOC | SEC_THREAD_LOCAL)) != 0)
- op = op1;
- }
- else if (((op1->flags ^ op->flags) & SEC_READONLY) != 0)
- {
- if (((op->flags ^ s->flags) & SEC_READONLY) != 0)
- op = op1;
- }
- else if (((op1->flags ^ op->flags) & SEC_CODE) != 0)
- {
- if (((op->flags ^ s->flags) & SEC_CODE) != 0)
- op = op1;
- }
- else
- {
- /* Flags we care about are the same. Prefer the following
- section if that will result in a positive valued sym. */
- if (h->u.def.value < op->vma)
- op = op1;
- }
-
- h->u.def.value -= op->vma;
- h->u.def.section = op;
+ h->u.def.section = bfd_abs_section_ptr;
}
}
diff --git a/bfd/m68klinux.c b/bfd/m68klinux.c
index f2295d1..03f8eaa 100644
--- a/bfd/m68klinux.c
+++ b/bfd/m68klinux.c
@@ -94,7 +94,8 @@ m68klinux_write_object_contents (abfd)
#define GOT_REF_PREFIX "__GOT_"
#endif
-#define IS_GOT_SYM(name) (CONST_STRNEQ (name, GOT_REF_PREFIX))
+#define IS_GOT_SYM(name) \
+ (strncmp (name, GOT_REF_PREFIX, sizeof GOT_REF_PREFIX - 1) == 0)
/* See if a symbol name is a reference to the procedure linkage table. */
@@ -102,7 +103,8 @@ m68klinux_write_object_contents (abfd)
#define PLT_REF_PREFIX "__PLT_"
#endif
-#define IS_PLT_SYM(name) (CONST_STRNEQ (name, PLT_REF_PREFIX))
+#define IS_PLT_SYM(name) \
+ (strncmp (name, PLT_REF_PREFIX, sizeof PLT_REF_PREFIX - 1) == 0)
/* This string is used to generate specialized error messages. */
@@ -443,7 +445,8 @@ linux_tally_symbols (h, data)
h = (struct linux_link_hash_entry *) h->root.root.u.i.link;
if (h->root.root.type == bfd_link_hash_undefined
- && CONST_STRNEQ (h->root.root.root.string, NEEDS_SHRLIB))
+ && strncmp (h->root.root.root.string, NEEDS_SHRLIB,
+ sizeof NEEDS_SHRLIB - 1) == 0)
{
const char *name;
char *p;
diff --git a/bfd/merge.c b/bfd/merge.c
index 577a716..c1795d2 100644
--- a/bfd/merge.c
+++ b/bfd/merge.c
@@ -766,7 +766,7 @@ _bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED,
the hash table at all. */
for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next)
if (secinfo->first_str == NULL)
- secinfo->sec->flags |= SEC_EXCLUDE | SEC_KEEP;
+ secinfo->sec->flags |= SEC_EXCLUDE;
}
return TRUE;
diff --git a/bfd/mmo.c b/bfd/mmo.c
index 077e3a8..9ee539b 100644
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -2421,10 +2421,10 @@ mmo_internal_write_section (bfd *abfd, asection *sec)
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
- else if (CONST_STRNEQ (sec->name, MMIX_OTHER_SPEC_SECTION_PREFIX))
+ else if (strncmp (sec->name, MMIX_OTHER_SPEC_SECTION_PREFIX,
+ strlen (MMIX_OTHER_SPEC_SECTION_PREFIX)) == 0)
{
int n = atoi (sec->name + strlen (MMIX_OTHER_SPEC_SECTION_PREFIX));
-
mmo_write_tetra_raw (abfd, (LOP << 24) | (LOP_SPEC << 16) | n);
return (! abfd->tdata.mmo_data->have_error
&& mmo_write_chunk_list (abfd, mmo_section_data (sec)->head));
diff --git a/bfd/nlmcode.h b/bfd/nlmcode.h
index 507d5d6..a7d3985 100644
--- a/bfd/nlmcode.h
+++ b/bfd/nlmcode.h
@@ -174,7 +174,7 @@ nlm_swap_auxiliary_headers_in (bfd *abfd)
return FALSE;
if (bfd_seek (abfd, position, SEEK_SET) != 0)
return FALSE;
- if (CONST_STRNEQ (tempstr, "VeRsIoN#"))
+ if (strncmp (tempstr, "VeRsIoN#", 8) == 0)
{
Nlm_External_Version_Header thdr;
@@ -196,7 +196,7 @@ nlm_swap_auxiliary_headers_in (bfd *abfd)
nlm_version_header (abfd)->day =
get_word (abfd, (bfd_byte *) thdr.day);
}
- else if (CONST_STRNEQ (tempstr, "MeSsAgEs"))
+ else if (strncmp (tempstr, "MeSsAgEs", 8) == 0)
{
Nlm_External_Extended_Header thdr;
@@ -264,7 +264,7 @@ nlm_swap_auxiliary_headers_in (bfd *abfd)
nlm_extended_header (abfd)->reserved5 =
get_word (abfd, (bfd_byte *) thdr.reserved5);
}
- else if (CONST_STRNEQ (tempstr, "CoPyRiGhT="))
+ else if (strncmp (tempstr, "CoPyRiGhT=", 10) == 0)
{
amt = sizeof (nlm_copyright_header (abfd)->stamp);
if (bfd_bread ((void *) nlm_copyright_header (abfd)->stamp,
@@ -280,7 +280,7 @@ nlm_swap_auxiliary_headers_in (bfd *abfd)
amt, abfd) != amt)
return FALSE;
}
- else if (CONST_STRNEQ (tempstr, "CuStHeAd"))
+ else if (strncmp (tempstr, "CuStHeAd", 8) == 0)
{
Nlm_External_Custom_Header thdr;
bfd_size_type hdrLength;
@@ -345,7 +345,7 @@ nlm_swap_auxiliary_headers_in (bfd *abfd)
/* If we have found a Cygnus header, process it. Otherwise,
just save the associated data without trying to interpret
it. */
- if (CONST_STRNEQ (dataStamp, "CyGnUsEx"))
+ if (strncmp (dataStamp, "CyGnUsEx", 8) == 0)
{
file_ptr pos;
bfd_byte *contents;
@@ -364,7 +364,7 @@ nlm_swap_auxiliary_headers_in (bfd *abfd)
if (bfd_seek (abfd, pos, SEEK_SET) != 0)
return FALSE;
- LITMEMCPY (nlm_cygnus_ext_header (abfd), "CyGnUsEx");
+ memcpy (nlm_cygnus_ext_header (abfd), "CyGnUsEx", 8);
nlm_cygnus_ext_header (abfd)->offset = dataOffset;
nlm_cygnus_ext_header (abfd)->length = dataLength;
@@ -645,7 +645,7 @@ nlm_swap_auxiliary_headers_out (bfd *abfd)
{
Nlm_External_Version_Header thdr;
- LITMEMCPY (thdr.stamp, "VeRsIoN#");
+ memcpy (thdr.stamp, "VeRsIoN#", 8);
put_word (abfd, (bfd_vma) nlm_version_header (abfd)->majorVersion,
(bfd_byte *) thdr.majorVersion);
put_word (abfd, (bfd_vma) nlm_version_header (abfd)->minorVersion,
@@ -672,7 +672,7 @@ nlm_swap_auxiliary_headers_out (bfd *abfd)
{
Nlm_External_Copyright_Header thdr;
- LITMEMCPY (thdr.stamp, "CoPyRiGhT=");
+ memcpy (thdr.stamp, "CoPyRiGhT=", 10);
amt = sizeof (thdr.stamp);
if (bfd_bwrite ((void *) thdr.stamp, amt, abfd) != amt)
return FALSE;
@@ -694,7 +694,7 @@ nlm_swap_auxiliary_headers_out (bfd *abfd)
{
Nlm_External_Extended_Header thdr;
- LITMEMCPY (thdr.stamp, "MeSsAgEs");
+ memcpy (thdr.stamp, "MeSsAgEs", 8);
put_word (abfd,
(bfd_vma) nlm_extended_header (abfd)->languageID,
(bfd_byte *) thdr.languageID);
@@ -797,7 +797,7 @@ nlm_swap_auxiliary_headers_out (bfd *abfd)
ds = find_nonzero (nlm_custom_header (abfd)->dataStamp,
sizeof (nlm_custom_header (abfd)->dataStamp));
- LITMEMCPY (thdr.stamp, "CuStHeAd");
+ memcpy (thdr.stamp, "CuStHeAd", 8);
hdrLength = (2 * NLM_TARGET_LONG_SIZE + (ds ? 8 : 0)
+ nlm_custom_header (abfd)->hdrLength);
put_word (abfd, hdrLength, thdr.length);
@@ -831,14 +831,14 @@ nlm_swap_auxiliary_headers_out (bfd *abfd)
{
Nlm_External_Custom_Header thdr;
- LITMEMCPY (thdr.stamp, "CuStHeAd");
+ memcpy (thdr.stamp, "CuStHeAd", 8);
put_word (abfd, (bfd_vma) 2 * NLM_TARGET_LONG_SIZE + 8,
(bfd_byte *) thdr.length);
put_word (abfd, (bfd_vma) nlm_cygnus_ext_header (abfd)->offset,
(bfd_byte *) thdr.dataOffset);
put_word (abfd, (bfd_vma) nlm_cygnus_ext_header (abfd)->length,
(bfd_byte *) thdr.dataLength);
- LITMEMCPY (thdr.dataStamp, "CyGnUsEx");
+ memcpy (thdr.dataStamp, "CyGnUsEx", 8);
amt = sizeof (thdr);
if (bfd_bwrite ((void *) &thdr, amt, abfd) != amt)
return FALSE;
diff --git a/bfd/osf-core.c b/bfd/osf-core.c
index 9bba6e7..1d3802b 100644
--- a/bfd/osf-core.c
+++ b/bfd/osf-core.c
@@ -94,7 +94,7 @@ osf_core_core_file_p (abfd)
if (val != sizeof core_header)
return NULL;
- if (! CONST_STRNEQ (core_header.magic, "Core"))
+ if (strncmp (core_header.magic, "Core", 4) != 0)
return NULL;
core_hdr (abfd) = (struct osf_core_struct *)
diff --git a/bfd/pe-arm-wince.c b/bfd/pe-arm-wince.c
index a13594f..57f8bcf 100644
--- a/bfd/pe-arm-wince.c
+++ b/bfd/pe-arm-wince.c
@@ -1,21 +1,21 @@
/* BFD back-end for ARM WINCE PE files.
Copyright 2006 Free Software Foundation, Inc.
- This file is part of BFD, the Binary File Descriptor library.
+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 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.
+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. */
+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 TARGET_UNDERSCORE 0
#define USER_LABEL_PREFIX ""
@@ -32,6 +32,4 @@
#define bfd_arm_process_before_allocation \
bfd_arm_wince_pe_process_before_allocation
-#define LOCAL_LABEL_PREFIX "."
-
#include "pe-arm.c"
diff --git a/bfd/pe-i386.c b/bfd/pe-i386.c
index 1256d08..7c102b4 100644
--- a/bfd/pe-i386.c
+++ b/bfd/pe-i386.c
@@ -34,16 +34,10 @@
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_PARTIAL_MATCH (".data$"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".rdata"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_PARTIAL_MATCH (".rdata$"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_PARTIAL_MATCH (".text$"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
diff --git a/bfd/pe-x86_64.c b/bfd/pe-x86_64.c
deleted file mode 100644
index 9eb325b..0000000
--- a/bfd/pe-x86_64.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* BFD back-end for Intel/AMD x86_64 PECOFF files.
- Copyright 2006 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.
-
- Written by Kai Tietz, OneVision Software GmbH&CoKg. */
-
-#include "bfd.h"
-#include "sysdep.h"
-
-#define TARGET_SYM x86_64pe_vec
-#define TARGET_NAME "pe-x86-64"
-#define COFF_WITH_PE
-#define COFF_WITH_pex64
-#define PCRELOFFSET TRUE
-#define TARGET_UNDERSCORE '_'
-#define COFF_LONG_SECTION_NAMES
-#define COFF_SUPPORT_GNU_LINKONCE
-#define COFF_LONG_FILENAMES
-
-#define COFF_SECTION_ALIGNMENT_ENTRIES \
-{ COFF_SECTION_NAME_EXACT_MATCH (".bss"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_EXACT_MATCH (".rdata"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
-{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
-{ COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
-{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
-
-#include "coff-x86_64.c"
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index 3848f53..70ad6cd 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -52,8 +52,8 @@
on this code has a chance of getting something accomplished without
wasting too much time. */
-/* This expands into COFF_WITH_pe, COFF_WITH_pep, or COFF_WITH_pex64
- depending on whether we're compiling for straight PE or PE+. */
+/* This expands into COFF_WITH_pe or COFF_WITH_pep depending on whether
+ we're compiling for straight PE or PE+. */
#define COFF_WITH_XX
#include "bfd.h"
@@ -67,9 +67,7 @@
within PE/PEI, so we get them from there. FIXME: The lack of
variance is an assumption which may prove to be incorrect if new
PE/PEI targets are created. */
-#if defined COFF_WITH_pex64
-# include "coff/x86_64.h"
-#elif defined COFF_WITH_pep
+#ifdef COFF_WITH_pep
# include "coff/ia64.h"
#else
# include "coff/i386.h"
@@ -79,7 +77,7 @@
#include "libcoff.h"
#include "libpei.h"
-#if defined COFF_WITH_pep || defined COFF_WITH_pex64
+#ifdef COFF_WITH_pep
# undef AOUTSZ
# define AOUTSZ PEPAOUTSZ
# define PEAOUTHDR PEPAOUTHDR
@@ -401,7 +399,7 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
aouthdr_int->text_start =
GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
-#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
+#ifndef COFF_WITH_pep
/* PE32+ does not have data_start member! */
aouthdr_int->data_start =
GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
@@ -444,7 +442,6 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
/* If data directory is empty, rva also should be 0. */
int size =
H_GET_32 (abfd, src->DataDirectory[idx][1]);
-
a->DataDirectory[idx].Size = size;
if (size)
@@ -458,7 +455,7 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
if (aouthdr_int->entry)
{
aouthdr_int->entry += a->ImageBase;
-#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
+#ifndef COFF_WITH_pep
aouthdr_int->entry &= 0xffffffff;
#endif
}
@@ -466,12 +463,12 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
if (aouthdr_int->tsize)
{
aouthdr_int->text_start += a->ImageBase;
-#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
+#ifndef COFF_WITH_pep
aouthdr_int->text_start &= 0xffffffff;
#endif
}
-#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
+#ifndef COFF_WITH_pep
/* PE32+ does not have data_start member! */
if (aouthdr_int->dsize)
{
@@ -484,9 +481,9 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
/* These three fields are normally set up by ppc_relocate_section.
In the case of reading a file in, we can pick them up from the
DataDirectory. */
- first_thunk_address = a->DataDirectory[PE_IMPORT_ADDRESS_TABLE].VirtualAddress;
- thunk_size = a->DataDirectory[PE_IMPORT_ADDRESS_TABLE].Size;
- import_table_size = a->DataDirectory[PE_IMPORT_TABLE].Size;
+ first_thunk_address = a->DataDirectory[12].VirtualAddress;
+ thunk_size = a->DataDirectory[12].Size;
+ import_table_size = a->DataDirectory[1].Size;
#endif
}
@@ -544,14 +541,14 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
fa = extra->FileAlignment;
ib = extra->ImageBase;
- idata2 = pe->pe_opthdr.DataDirectory[PE_IMPORT_TABLE];
- idata5 = pe->pe_opthdr.DataDirectory[PE_IMPORT_ADDRESS_TABLE];
- tls = pe->pe_opthdr.DataDirectory[PE_TLS_TABLE];
+ idata2 = pe->pe_opthdr.DataDirectory[1];
+ idata5 = pe->pe_opthdr.DataDirectory[12];
+ tls = pe->pe_opthdr.DataDirectory[9];
if (aouthdr_in->tsize)
{
aouthdr_in->text_start -= ib;
-#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
+#ifndef COFF_WITH_pep
aouthdr_in->text_start &= 0xffffffff;
#endif
}
@@ -559,7 +556,7 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
if (aouthdr_in->dsize)
{
aouthdr_in->data_start -= ib;
-#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
+#ifndef COFF_WITH_pep
aouthdr_in->data_start &= 0xffffffff;
#endif
}
@@ -567,7 +564,7 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
if (aouthdr_in->entry)
{
aouthdr_in->entry -= ib;
-#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
+#ifndef COFF_WITH_pep
aouthdr_in->entry &= 0xffffffff;
#endif
}
@@ -596,11 +593,11 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
So - we copy the input values into the output values, and then, if
a final link is going to be performed, it can overwrite them. */
- extra->DataDirectory[PE_IMPORT_TABLE] = idata2;
- extra->DataDirectory[PE_IMPORT_ADDRESS_TABLE] = idata5;
- extra->DataDirectory[PE_TLS_TABLE] = tls;
+ extra->DataDirectory[1] = idata2;
+ extra->DataDirectory[12] = idata5;
+ extra->DataDirectory[9] = tls;
- if (extra->DataDirectory[PE_IMPORT_TABLE].VirtualAddress == 0)
+ if (extra->DataDirectory[1].VirtualAddress == 0)
/* Until other .idata fixes are made (pending patch), the entry for
.idata is needed for backwards compatibility. FIXME. */
add_data_entry (abfd, extra, 1, ".idata", ib);
@@ -664,7 +661,7 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
aouthdr_out->standard.text_start);
-#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
+#ifndef COFF_WITH_pep
/* PE32+ does not have data_start member! */
PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
aouthdr_out->standard.data_start);
@@ -1021,7 +1018,7 @@ static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] =
N_("Bound Import Directory"),
N_("Import Address Table Directory"),
N_("Delay Import Directory"),
- N_("CLR Runtime Header"),
+ N_("Reserved"),
N_("Reserved")
};
@@ -1055,9 +1052,9 @@ pe_print_idata (bfd * abfd, void * vfile)
bfd_vma addr;
- addr = extra->DataDirectory[PE_IMPORT_TABLE].VirtualAddress;
+ addr = extra->DataDirectory[1].VirtualAddress;
- if (addr == 0 && extra->DataDirectory[PE_IMPORT_TABLE].Size == 0)
+ if (addr == 0 && extra->DataDirectory[1].Size == 0)
{
/* Maybe the extra header isn't there. Look for the section. */
section = bfd_get_section_by_name (abfd, ".idata");
@@ -1175,7 +1172,7 @@ pe_print_idata (bfd * abfd, void * vfile)
bfd_size_type j;
char *dll;
- /* Print (i + extra->DataDirectory[PE_IMPORT_TABLE].VirtualAddress). */
+ /* Print (i + extra->DataDirectory[1].VirtualAddress). */
fprintf (file, " %08lx\t", (unsigned long) (i + adj + dataoff));
hint_addr = bfd_get_32 (abfd, data + i + dataoff);
time_stamp = bfd_get_32 (abfd, data + i + 4 + dataoff);
@@ -1216,8 +1213,8 @@ pe_print_idata (bfd * abfd, void * vfile)
ft_data = data;
ft_idx = first_thunk - adj;
ft_allocated = 0;
-
- if (first_thunk != hint_addr)
+
+ if (first_thunk != hint_addr)
{
/* Find the section which contains the first thunk. */
for (ft_section = abfd->sections;
@@ -1265,38 +1262,6 @@ pe_print_idata (bfd * abfd, void * vfile)
}
/* Print HintName vector entries. */
-#ifdef COFF_WITH_pex64
- for (j = 0; j < datasize; j += 8)
- {
- unsigned long member = bfd_get_32 (abfd, data + idx + j);
- unsigned long member_high = bfd_get_32 (abfd, data + idx + j + 4);
-
- if (!member && !member_high)
- break;
-
- if (member_high & 0x80000000)
- fprintf (file, "\t%lx%08lx\t %4lx%08lx <none>",
- member_high,member, member_high & 0x7fffffff, member);
- else
- {
- int ordinal;
- char *member_name;
-
- ordinal = bfd_get_16 (abfd, data + member - adj);
- member_name = (char *) data + member - adj + 2;
- fprintf (file, "\t%04lx\t %4d %s",member, ordinal, member_name);
- }
-
- /* If the time stamp is not zero, the import address
- table holds actual addresses. */
- if (time_stamp != 0
- && first_thunk != 0
- && first_thunk != hint_addr)
- fprintf (file, "\t%04lx",
- (long) bfd_get_32 (abfd, ft_data + ft_idx + j));
- fprintf (file, "\n");
- }
-#else
for (j = 0; j < datasize; j += 4)
{
unsigned long member = bfd_get_32 (abfd, data + idx + j);
@@ -1329,7 +1294,7 @@ pe_print_idata (bfd * abfd, void * vfile)
fprintf (file, "\n");
}
-#endif
+
if (ft_allocated)
free (ft_data);
}
@@ -1372,9 +1337,9 @@ pe_print_edata (bfd * abfd, void * vfile)
bfd_vma addr;
- addr = extra->DataDirectory[PE_EXPORT_TABLE].VirtualAddress;
+ addr = extra->DataDirectory[0].VirtualAddress;
- if (addr == 0 && extra->DataDirectory[PE_EXPORT_TABLE].Size == 0)
+ if (addr == 0 && extra->DataDirectory[0].Size == 0)
{
/* Maybe the extra header isn't there. Look for the section. */
section = bfd_get_section_by_name (abfd, ".edata");
@@ -1403,7 +1368,7 @@ pe_print_edata (bfd * abfd, void * vfile)
}
dataoff = addr - section->vma;
- datasize = extra->DataDirectory[PE_EXPORT_TABLE].Size;
+ datasize = extra->DataDirectory[0].Size;
if (datasize > section->size - dataoff)
{
fprintf (file,
@@ -1569,10 +1534,10 @@ pe_print_edata (bfd * abfd, void * vfile)
static bfd_boolean
pe_print_pdata (bfd * abfd, void * vfile)
{
-#if defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
-# define PDATA_ROW_SIZE (3 * 8)
+#ifdef COFF_WITH_pep
+# define PDATA_ROW_SIZE (3*8)
#else
-# define PDATA_ROW_SIZE (5 * 4)
+# define PDATA_ROW_SIZE (5*4)
#endif
FILE *file = (FILE *) vfile;
bfd_byte *data = 0;
@@ -1595,7 +1560,7 @@ pe_print_pdata (bfd * abfd, void * vfile)
fprintf (file,
_("\nThe Function Table (interpreted .pdata section contents)\n"));
-#if defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
+#ifdef COFF_WITH_pep
fprintf (file,
_(" vma:\t\t\tBegin Address End Address Unwind Info\n"));
#else
@@ -1649,7 +1614,7 @@ pe_print_pdata (bfd * abfd, void * vfile)
fprintf_vma (file, begin_addr); fputc (' ', file);
fprintf_vma (file, end_addr); fputc (' ', file);
fprintf_vma (file, eh_handler);
-#if !defined(COFF_WITH_pep) || defined(COFF_WITH_pex64)
+#ifndef COFF_WITH_pep
fputc (' ', file);
fprintf_vma (file, eh_data); fputc (' ', file);
fprintf_vma (file, prolog_end_addr);
@@ -1873,16 +1838,6 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile)
case IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER:
subsystem_name = "EFI runtime driver";
break;
- // These are from revision 8.0 of the MS PE/COFF spec
- case IMAGE_SUBSYSTEM_EFI_ROM:
- subsystem_name = "EFI ROM";
- break;
- case IMAGE_SUBSYSTEM_XBOX:
- subsystem_name = "XBOX";
- break;
- // Added default case for clarity - subsystem_name is NULL anyway.
- default:
- subsystem_name = NULL;
}
fprintf (file, "Subsystem\t\t%08x", i->Subsystem);
@@ -1935,8 +1890,8 @@ _bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd)
if we don't remove this entry as well. */
if (! pe_data (obfd)->has_reloc_section)
{
- pe_data (obfd)->pe_opthdr.DataDirectory[PE_BASE_RELOCATION_TABLE].VirtualAddress = 0;
- pe_data (obfd)->pe_opthdr.DataDirectory[PE_BASE_RELOCATION_TABLE].Size = 0;
+ pe_data (obfd)->pe_opthdr.DataDirectory[5].VirtualAddress = 0;
+ pe_data (obfd)->pe_opthdr.DataDirectory[5].Size = 0;
}
return TRUE;
}
@@ -2014,7 +1969,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo)
message for any sections tht could not be found. */
if (h1->root.u.def.section != NULL
&& h1->root.u.def.section->output_section != NULL)
- pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_TABLE].VirtualAddress =
+ pe_data (abfd)->pe_opthdr.DataDirectory[1].VirtualAddress =
(h1->root.u.def.value
+ h1->root.u.def.section->output_section->vma
+ h1->root.u.def.section->output_offset);
@@ -2031,11 +1986,11 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo)
if (h1 != NULL
&& h1->root.u.def.section != NULL
&& h1->root.u.def.section->output_section != NULL)
- pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_TABLE].Size =
+ pe_data (abfd)->pe_opthdr.DataDirectory[1].Size =
((h1->root.u.def.value
+ h1->root.u.def.section->output_section->vma
+ h1->root.u.def.section->output_offset)
- - pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_TABLE].VirtualAddress);
+ - pe_data (abfd)->pe_opthdr.DataDirectory[1].VirtualAddress);
else
{
_bfd_error_handler
@@ -2051,7 +2006,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo)
if (h1 != NULL
&& h1->root.u.def.section != NULL
&& h1->root.u.def.section->output_section != NULL)
- pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_ADDRESS_TABLE].VirtualAddress =
+ pe_data (abfd)->pe_opthdr.DataDirectory[12].VirtualAddress =
(h1->root.u.def.value
+ h1->root.u.def.section->output_section->vma
+ h1->root.u.def.section->output_offset);
@@ -2068,15 +2023,15 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo)
if (h1 != NULL
&& h1->root.u.def.section != NULL
&& h1->root.u.def.section->output_section != NULL)
- pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_ADDRESS_TABLE].Size =
+ pe_data (abfd)->pe_opthdr.DataDirectory[12].Size =
((h1->root.u.def.value
+ h1->root.u.def.section->output_section->vma
+ h1->root.u.def.section->output_offset)
- - pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_ADDRESS_TABLE].VirtualAddress);
+ - pe_data (abfd)->pe_opthdr.DataDirectory[12].VirtualAddress);
else
{
_bfd_error_handler
- (_("%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing"),
+ (_("%B: unable to fill in DataDictionary[12] because .idata$6 is missing"),
abfd);
result = FALSE;
}
@@ -2088,7 +2043,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo)
{
if (h1->root.u.def.section != NULL
&& h1->root.u.def.section->output_section != NULL)
- pe_data (abfd)->pe_opthdr.DataDirectory[PE_TLS_TABLE].VirtualAddress =
+ pe_data (abfd)->pe_opthdr.DataDirectory[9].VirtualAddress =
(h1->root.u.def.value
+ h1->root.u.def.section->output_section->vma
+ h1->root.u.def.section->output_offset
@@ -2101,7 +2056,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo)
result = FALSE;
}
- pe_data (abfd)->pe_opthdr.DataDirectory[PE_TLS_TABLE].Size = 0x18;
+ pe_data (abfd)->pe_opthdr.DataDirectory[9].Size = 0x18;
}
/* If we couldn't find idata$2, we either have an excessively
diff --git a/bfd/pef.c b/bfd/pef.c
index 23715f4..63e557a 100644
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -209,7 +209,7 @@ bfd_pef_print_symbol (bfd *abfd,
default:
bfd_print_symbol_vandf (abfd, (void *) file, symbol);
fprintf (file, " %-5s %s", symbol->section->name, symbol->name);
- if (CONST_STRNEQ (symbol->name, "__traceback_"))
+ if (strncmp (symbol->name, "__traceback_", strlen ("__traceback_")) == 0)
{
unsigned char *buf = alloca (symbol->udata.i);
size_t offset = symbol->value + 4;
diff --git a/bfd/pei-arm-wince.c b/bfd/pei-arm-wince.c
index 7d5a3be..48269c9 100644
--- a/bfd/pei-arm-wince.c
+++ b/bfd/pei-arm-wince.c
@@ -1,21 +1,21 @@
/* BFD back-end for ARM WINCE PE IMAGE COFF files.
Copyright 2006 Free Software Foundation, Inc.
- This file is part of BFD, the Binary File Descriptor library.
+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 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.
+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. */
+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 TARGET_UNDERSCORE 0
#define USER_LABEL_PREFIX ""
@@ -25,6 +25,4 @@
#define TARGET_BIG_SYM arm_wince_pei_big_vec
#define TARGET_BIG_NAME "pei-arm-wince-big"
-#define LOCAL_LABEL_PREFIX "."
-
#include "pei-arm.c"
diff --git a/bfd/pei-i386.c b/bfd/pei-i386.c
index b633784..38e36f3 100644
--- a/bfd/pei-i386.c
+++ b/bfd/pei-i386.c
@@ -35,16 +35,10 @@
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_PARTIAL_MATCH (".data$"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".rdata"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_PARTIAL_MATCH (".rdata$"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_PARTIAL_MATCH (".text$"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
diff --git a/bfd/pei-x86_64.c b/bfd/pei-x86_64.c
deleted file mode 100644
index caa5db3..0000000
--- a/bfd/pei-x86_64.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* BFD back-end for Intel 386 PE IMAGE COFF files.
- Copyright 2006 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.
-
- Written by Kai Tietz, OneVision Software GmbH&CoKg. */
-
-#include "bfd.h"
-#include "sysdep.h"
-
-#define TARGET_SYM x86_64pei_vec
-#define TARGET_NAME "pei-x86-64"
-#define COFF_IMAGE_WITH_PE
-#define COFF_WITH_PE
-#define COFF_WITH_pex64
-#define PCRELOFFSET TRUE
-#define TARGET_UNDERSCORE '_'
-#define COFF_LONG_SECTION_NAMES
-#define COFF_SUPPORT_GNU_LINKONCE
-#define COFF_LONG_FILENAMES
-
-#define COFF_SECTION_ALIGNMENT_ENTRIES \
-{ COFF_SECTION_NAME_EXACT_MATCH (".bss"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_EXACT_MATCH (".rdata"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
-{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
-{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
-{ COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
-{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \
- COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
-
-#include "coff-x86_64.c"
diff --git a/bfd/peicode.h b/bfd/peicode.h
index 22f1bbd..2061f41 100644
--- a/bfd/peicode.h
+++ b/bfd/peicode.h
@@ -1,6 +1,6 @@
/* Support for the generic parts of PE/PEI, for BFD.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006 Free Software Foundation, Inc.
+ 2005 Free Software Foundation, Inc.
Written by Cygnus Solutions.
This file is part of BFD, the Binary File Descriptor library.
@@ -182,10 +182,6 @@ coff_swap_filehdr_in (bfd * abfd, void * src, void * dst)
#ifdef COFF_IMAGE_WITH_PE
# define coff_swap_filehdr_out _bfd_XXi_only_swap_filehdr_out
-#elif defined COFF_WITH_pex64
-# define coff_swap_filehdr_out _bfd_pex64_only_swap_filehdr_out
-#elif defined COFF_WITH_pep
-# define coff_swap_filehdr_out _bfd_pep_only_swap_filehdr_out
#else
# define coff_swap_filehdr_out _bfd_pe_only_swap_filehdr_out
#endif
@@ -221,10 +217,7 @@ coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
if (scnhdr_int->s_vaddr != 0)
{
scnhdr_int->s_vaddr += pe_data (abfd)->pe_opthdr.ImageBase;
- /* Do not cut upper 32-bits for 64-bit vma. */
-#ifndef COFF_WITH_pex64
scnhdr_int->s_vaddr &= 0xffffffff;
-#endif
}
#ifndef COFF_NO_HACK_SCNHDR_SIZE
@@ -412,16 +405,8 @@ pe_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
+ NUM_ILF_SECTIONS * 9 \
+ STRING_SIZE_SIZE)
#define SIZEOF_IDATA2 (5 * 4)
-
-/* For PEx64 idata4 & 5 have thumb size of 8 bytes. */
-#ifdef COFF_WITH_pex64
-#define SIZEOF_IDATA4 (2 * 4)
-#define SIZEOF_IDATA5 (2 * 4)
-#else
#define SIZEOF_IDATA4 (1 * 4)
#define SIZEOF_IDATA5 (1 * 4)
-#endif
-
#define SIZEOF_IDATA6 (2 + strlen (symbol_name) + 1 + 1)
#define SIZEOF_IDATA7 (strlen (source_dll) + 1 + 1)
#define SIZEOF_ILF_SECTIONS (NUM_ILF_SECTIONS * sizeof (struct coff_section_tdata))
@@ -671,20 +656,9 @@ static jump_table jtab[] =
},
#endif
-#ifdef AMD64MAGIC
- { AMD64MAGIC,
- { 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90 },
- 8, 2
- },
-#endif
-
#ifdef MC68MAGIC
- { MC68MAGIC,
- { /* XXX fill me in */ },
- 0, 0
- },
+ { MC68MAGIC, { /* XXX fill me in */ }, 0, 0 },
#endif
-
#ifdef MIPS_ARCH_MAGIC_WINCE
{ MIPS_ARCH_MAGIC_WINCE,
{ 0x00, 0x00, 0x08, 0x3c, 0x00, 0x00, 0x08, 0x8d,
@@ -856,15 +830,8 @@ pe_ILF_build_a_bfd (bfd * abfd,
/* XXX - treat as IMPORT_NAME ??? */
abort ();
-#ifdef COFF_WITH_pex64
- ((unsigned int *) id4->contents)[0] = ordinal;
- ((unsigned int *) id4->contents)[1] = 0x80000000;
- ((unsigned int *) id5->contents)[0] = ordinal;
- ((unsigned int *) id5->contents)[1] = 0x80000000;
-#else
* (unsigned int *) id4->contents = ordinal | 0x80000000;
* (unsigned int *) id5->contents = ordinal | 0x80000000;
-#endif
}
else
{
@@ -1104,12 +1071,6 @@ pe_ILF_object_p (bfd * abfd)
#endif
break;
- case IMAGE_FILE_MACHINE_AMD64:
-#ifdef AMD64MAGIC
- magic = AMD64MAGIC;
-#endif
- break;
-
case IMAGE_FILE_MACHINE_M68K:
#ifdef MC68AGIC
magic = MC68MAGIC;
diff --git a/bfd/po/BLD-POTFILES.in b/bfd/po/BLD-POTFILES.in
index 07ad4b3..2dbe723 100644
--- a/bfd/po/BLD-POTFILES.in
+++ b/bfd/po/BLD-POTFILES.in
@@ -5,5 +5,4 @@ elf64-ia64.c
elf64-target.h
peigen.c
pepigen.c
-pex64igen.c
targmatch.h
diff --git a/bfd/po/SRC-POTFILES.in b/bfd/po/SRC-POTFILES.in
index a8dd4e8..8bcf979 100644
--- a/bfd/po/SRC-POTFILES.in
+++ b/bfd/po/SRC-POTFILES.in
@@ -57,7 +57,6 @@ coff-tic80.c
coff-u68k.c
coff-w65.c
coff-we32k.c
-coff-x86_64.c
coff-z80.c
coff-z8k.c
corefile.c
@@ -106,10 +105,8 @@ cpu-pj.c
cpu-powerpc.c
cpu-rs6000.c
cpu-s390.c
-cpu-score.c
cpu-sh.c
cpu-sparc.c
-cpu-spu.c
cpu-tic30.c
cpu-tic4x.c
cpu-tic54x.c
@@ -171,13 +168,11 @@ elf32-or32.c
elf32-pj.c
elf32-ppc.c
elf32-s390.c
-elf32-score.c
elf32-sh64.c
elf32-sh64-com.c
elf32-sh.c
elf32-sh-symbian.c
elf32-sparc.c
-elf32-spu.c
elf32-v850.c
elf32-vax.c
elf32-xc16x.c
@@ -276,25 +271,21 @@ osf-core.c
pc532-mach.c
pdp11.c
pe-arm.c
-pe-arm-wince.c
pef.c
pef.h
pef-traceback.h
pe-i386.c
pei-arm.c
-pei-arm-wince.c
peicode.h
pei-i386.c
pei-mcore.c
pei-mips.c
pei-ppc.c
pei-sh.c
-pei-x86_64.c
pe-mcore.c
pe-mips.c
pe-ppc.c
pe-sh.c
-pe-x86_64.c
ppcboot.c
reloc16.c
reloc.c
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 1b8c8d7..60ebf36 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -1522,6 +1522,7 @@ _bfd_relocate_contents (reloc_howto_type *howto,
switch (size)
{
default:
+ case 0:
abort ();
case 1:
bfd_put_8 (input_bfd, x, location);
@@ -1544,72 +1545,6 @@ _bfd_relocate_contents (reloc_howto_type *howto,
return flag;
}
-/* Clear a given location using a given howto, by applying a relocation value
- of zero and discarding any in-place addend. This is used for fixed-up
- relocations against discarded symbols, to make ignorable debug or unwind
- information more obvious. */
-
-void
-_bfd_clear_contents (reloc_howto_type *howto,
- bfd *input_bfd,
- bfd_byte *location)
-{
- int size;
- bfd_vma x = 0;
-
- /* Get the value we are going to relocate. */
- size = bfd_get_reloc_size (howto);
- switch (size)
- {
- default:
- case 0:
- abort ();
- case 1:
- x = bfd_get_8 (input_bfd, location);
- break;
- case 2:
- x = bfd_get_16 (input_bfd, location);
- break;
- case 4:
- x = bfd_get_32 (input_bfd, location);
- break;
- case 8:
-#ifdef BFD64
- x = bfd_get_64 (input_bfd, location);
-#else
- abort ();
-#endif
- break;
- }
-
- /* Zero out the unwanted bits of X. */
- x &= ~howto->dst_mask;
-
- /* Put the relocated value back in the object file. */
- switch (size)
- {
- default:
- case 0:
- abort ();
- case 1:
- bfd_put_8 (input_bfd, x, location);
- break;
- case 2:
- bfd_put_16 (input_bfd, x, location);
- break;
- case 4:
- bfd_put_32 (input_bfd, x, location);
- break;
- case 8:
-#ifdef BFD64
- bfd_put_64 (input_bfd, x, location);
-#else
- abort ();
-#endif
- break;
- }
-}
-
/*
DOCDD
INODE
@@ -1949,33 +1884,6 @@ ENUMDOC
SPARC TLS relocations
ENUM
- BFD_RELOC_SPU_IMM7
-ENUMX
- BFD_RELOC_SPU_IMM8
-ENUMX
- BFD_RELOC_SPU_IMM10
-ENUMX
- BFD_RELOC_SPU_IMM10W
-ENUMX
- BFD_RELOC_SPU_IMM16
-ENUMX
- BFD_RELOC_SPU_IMM16W
-ENUMX
- BFD_RELOC_SPU_IMM18
-ENUMX
- BFD_RELOC_SPU_PCREL9a
-ENUMX
- BFD_RELOC_SPU_PCREL9b
-ENUMX
- BFD_RELOC_SPU_PCREL16
-ENUMX
- BFD_RELOC_SPU_LO16
-ENUMX
- BFD_RELOC_SPU_HI16
-ENUMDOC
- SPU Relocations.
-
-ENUM
BFD_RELOC_ALPHA_GPDISP_HI16
ENUMDOC
Alpha ECOFF and ELF relocations. Some of these treat the symbol or
@@ -4058,43 +3966,6 @@ ENUMDOC
Long displacement extension.
ENUM
- BFD_RELOC_SCORE_DUMMY1
-ENUMDOC
- Score relocations
-ENUM
- BFD_RELOC_SCORE_GPREL15
-ENUMDOC
- Low 16 bit for load/store
-ENUM
- BFD_RELOC_SCORE_DUMMY2
-ENUMX
- BFD_RELOC_SCORE_JMP
-ENUMDOC
- This is a 24-bit reloc with the right 1 bit assumed to be 0
-ENUM
- BFD_RELOC_SCORE_BRANCH
-ENUMDOC
- This is a 19-bit reloc with the right 1 bit assumed to be 0
-ENUM
- BFD_RELOC_SCORE16_JMP
-ENUMDOC
- This is a 11-bit reloc with the right 1 bit assumed to be 0
-ENUM
- BFD_RELOC_SCORE16_BRANCH
-ENUMDOC
- This is a 8-bit reloc with the right 1 bit assumed to be 0
-ENUM
- BFD_RELOC_SCORE_GOT15
-ENUMX
- BFD_RELOC_SCORE_GOT_LO16
-ENUMX
- BFD_RELOC_SCORE_CALL15
-ENUMX
- BFD_RELOC_SCORE_DUMMY_HI16
-ENUMDOC
- Undocumented Score relocs
-
-ENUM
BFD_RELOC_IP2K_FR9
ENUMDOC
Scenix IP2K - 9-bit register number / data address
diff --git a/bfd/section.c b/bfd/section.c
index 5a100be..2b5f7f8 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -294,9 +294,7 @@ CODE_FRAGMENT
. else up the line will take care of it later. *}
.#define SEC_LINKER_CREATED 0x200000
.
-. {* This section should not be subject to garbage collection.
-. Also set to inform the linker that this section should not be
-. listed in the link map as discarded. *}
+. {* This section should not be subject to garbage collection. *}
.#define SEC_KEEP 0x400000
.
. {* This section contains "short" data, and should be placed
diff --git a/bfd/som.c b/bfd/som.c
index 4d00d49..ead05f9 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -4374,12 +4374,12 @@ som_slurp_symbol_table (bfd *abfd)
&& sym->symbol.name[strlen (sym->symbol.name) - 1] == '$'
&& !strcmp (sym->symbol.name, sym->symbol.section->name))
sym->symbol.flags |= BSF_SECTION_SYM;
- else if (CONST_STRNEQ (sym->symbol.name, "L$0\002"))
+ else if (!strncmp (sym->symbol.name, "L$0\002", 4))
{
sym->symbol.flags |= BSF_SECTION_SYM;
sym->symbol.name = sym->symbol.section->name;
}
- else if (CONST_STRNEQ (sym->symbol.name, "L$0\001"))
+ else if (!strncmp (sym->symbol.name, "L$0\001", 4))
sym->symbol.flags |= BSF_DEBUGGING;
/* Note increment at bottom of loop, since we skip some symbols
@@ -5653,7 +5653,7 @@ som_slurp_armap (bfd *abfd)
return FALSE;
/* For archives without .o files there is no symbol table. */
- if (! CONST_STRNEQ (nextname, "/ "))
+ if (strncmp (nextname, "/ ", 16))
{
bfd_has_map (abfd) = FALSE;
return TRUE;
diff --git a/bfd/sparclinux.c b/bfd/sparclinux.c
index 243e850..6b534e3 100644
--- a/bfd/sparclinux.c
+++ b/bfd/sparclinux.c
@@ -2,22 +2,22 @@
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
2003, 2004, 2006 Free Software Foundation, Inc.
- This file is part of BFD, the Binary File Descriptor library.
+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 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.
+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. */
+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 TARGET_PAGE_SIZE 4096
#define ZMAGIC_DISK_BLOCK_SIZE 1024
@@ -94,7 +94,8 @@ sparclinux_write_object_contents (abfd)
#define GOT_REF_PREFIX "__GOT_"
#endif
-#define IS_GOT_SYM(name) (CONST_STRNEQ (name, GOT_REF_PREFIX))
+#define IS_GOT_SYM(name) \
+ (strncmp (name, GOT_REF_PREFIX, sizeof GOT_REF_PREFIX - 1) == 0)
/* See if a symbol name is a reference to the procedure linkage table. */
@@ -102,7 +103,8 @@ sparclinux_write_object_contents (abfd)
#define PLT_REF_PREFIX "__PLT_"
#endif
-#define IS_PLT_SYM(name) (CONST_STRNEQ (name, PLT_REF_PREFIX))
+#define IS_PLT_SYM(name) \
+ (strncmp (name, PLT_REF_PREFIX, sizeof PLT_REF_PREFIX - 1) == 0)
/* This string is used to generate specialized error messages. */
@@ -426,7 +428,9 @@ linux_add_one_symbol (info, abfd, name, flags, section, value, string,
This function is called via linux_link_hash_traverse. */
static bfd_boolean
-linux_tally_symbols (struct linux_link_hash_entry *h, void * data)
+linux_tally_symbols (h, data)
+ struct linux_link_hash_entry *h;
+ PTR data;
{
struct bfd_link_info *info = (struct bfd_link_info *) data;
struct fixup *f, *f1;
@@ -438,7 +442,8 @@ linux_tally_symbols (struct linux_link_hash_entry *h, void * data)
h = (struct linux_link_hash_entry *) h->root.root.u.i.link;
if (h->root.root.type == bfd_link_hash_undefined
- && CONST_STRNEQ (h->root.root.root.string, NEEDS_SHRLIB))
+ && strncmp (h->root.root.root.string, NEEDS_SHRLIB,
+ sizeof NEEDS_SHRLIB - 1) == 0)
{
const char *name;
char *p;
diff --git a/bfd/stabs.c b/bfd/stabs.c
index 93ab0a6..4f48e8e 100644
--- a/bfd/stabs.c
+++ b/bfd/stabs.c
@@ -175,8 +175,10 @@ _bfd_link_section_stabs (bfd *abfd,
prepared to handle them. */
return TRUE;
- if (bfd_is_abs_section (stabsec->output_section)
- || bfd_is_abs_section (stabstrsec->output_section))
+ if ((stabsec->output_section != NULL
+ && bfd_is_abs_section (stabsec->output_section))
+ || (stabstrsec->output_section != NULL
+ && bfd_is_abs_section (stabstrsec->output_section)))
/* At least one of the sections is being discarded from the
link, so we should just ignore them. */
return TRUE;
@@ -431,7 +433,7 @@ _bfd_link_section_stabs (bfd *abfd,
++nest;
else if (incl_type == (int) N_EXCL)
/* Keep existing exclusion marks. */
- continue;
+ continue;
else if (nest == 0)
{
*incl_pstridx = (bfd_size_type) -1;
@@ -456,8 +458,8 @@ _bfd_link_section_stabs (bfd *abfd,
for that section. */
stabsec->size = (count - skip) * STABSIZE;
if (stabsec->size == 0)
- stabsec->flags |= SEC_EXCLUDE | SEC_KEEP;
- stabstrsec->flags |= SEC_EXCLUDE | SEC_KEEP;
+ stabsec->flags |= SEC_EXCLUDE;
+ stabstrsec->flags |= SEC_EXCLUDE;
sinfo->stabstr->size = _bfd_stringtab_size (sinfo->strings);
/* Calculate the `cumulative_skips' array now that stabs have been
@@ -609,7 +611,7 @@ _bfd_discard_section_stabs (bfd *abfd,
/* Shrink the stabsec as needed. */
stabsec->size -= skip * STABSIZE;
if (stabsec->size == 0)
- stabsec->flags |= SEC_EXCLUDE | SEC_KEEP;
+ stabsec->flags |= SEC_EXCLUDE;
/* Recalculate the `cumulative_skips' array now that stabs have been
deleted for this section. */
diff --git a/bfd/targets.c b/bfd/targets.c
index 71e3337..3471c25 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -481,8 +481,7 @@ BFD_JUMP_TABLE macros.
.
. {* Check if SEC has been already linked during a reloceatable or
. final link. *}
-. void (*_section_already_linked) (bfd *, struct bfd_section *,
-. struct bfd_link_info *);
+. void (*_section_already_linked) (bfd *, struct bfd_section *);
.
. {* Routines to handle dynamic symbols and relocs. *}
.#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
@@ -625,8 +624,6 @@ extern const bfd_target bfd_elf32_powerpc_vec;
extern const bfd_target bfd_elf32_powerpcle_vec;
extern const bfd_target bfd_elf32_powerpc_vxworks_vec;
extern const bfd_target bfd_elf32_s390_vec;
-extern const bfd_target bfd_elf32_bigscore_vec;
-extern const bfd_target bfd_elf32_littlescore_vec;
extern const bfd_target bfd_elf32_sh64_vec;
extern const bfd_target bfd_elf32_sh64l_vec;
extern const bfd_target bfd_elf32_sh64lin_vec;
@@ -644,7 +641,6 @@ extern const bfd_target bfd_elf32_shnbsd_vec;
extern const bfd_target bfd_elf32_shvxworks_vec;
extern const bfd_target bfd_elf32_sparc_vec;
extern const bfd_target bfd_elf32_sparc_vxworks_vec;
-extern const bfd_target bfd_elf32_spu_vec;
extern const bfd_target bfd_elf32_tradbigmips_vec;
extern const bfd_target bfd_elf32_tradlittlemips_vec;
extern const bfd_target bfd_elf32_us_cris_vec;
@@ -676,7 +672,6 @@ extern const bfd_target bfd_elf64_sh64blin_vec;
extern const bfd_target bfd_elf64_sh64lnbsd_vec;
extern const bfd_target bfd_elf64_sh64nbsd_vec;
extern const bfd_target bfd_elf64_sparc_vec;
-extern const bfd_target bfd_elf64_sparc_freebsd_vec;
extern const bfd_target bfd_elf64_tradbigmips_vec;
extern const bfd_target bfd_elf64_tradlittlemips_vec;
extern const bfd_target bfd_elf64_x86_64_freebsd_vec;
@@ -792,9 +787,6 @@ extern const bfd_target vms_alpha_vec;
extern const bfd_target vms_vax_vec;
extern const bfd_target w65_vec;
extern const bfd_target we32kcoff_vec;
-extern const bfd_target x86_64pe_vec;
-extern const bfd_target x86_64pei_vec;
-extern const bfd_target x86_64coff_vec;
extern const bfd_target z80coff_vec;
extern const bfd_target z8kcoff_vec;
@@ -819,8 +811,8 @@ extern const bfd_target sco5_core_vec;
extern const bfd_target trad_core_vec;
extern const bfd_target bfd_elf32_am33lin_vec;
-static const bfd_target * const _bfd_target_vector[] =
-{
+static const bfd_target * const _bfd_target_vector[] = {
+
#ifdef SELECT_VECS
SELECT_VECS,
@@ -952,8 +944,6 @@ static const bfd_target * const _bfd_target_vector[] =
&bfd_elf32_powerpc_vxworks_vec,
&bfd_elf32_powerpcle_vec,
&bfd_elf32_s390_vec,
- &bfd_elf32_bigscore_vec,
- &bfd_elf32_littlescore_vec,
&bfd_elf32_sh_vec,
&bfd_elf32_shblin_vec,
&bfd_elf32_shl_vec,
@@ -973,7 +963,6 @@ static const bfd_target * const _bfd_target_vector[] =
#endif
&bfd_elf32_sparc_vec,
&bfd_elf32_sparc_vxworks_vec,
- &bfd_elf32_spu_vec,
&bfd_elf32_tradbigmips_vec,
&bfd_elf32_tradlittlemips_vec,
&bfd_elf32_us_cris_vec,
@@ -1006,7 +995,6 @@ static const bfd_target * const _bfd_target_vector[] =
&bfd_elf64_sh64lin_vec,
&bfd_elf64_sh64blin_vec,
&bfd_elf64_sparc_vec,
- &bfd_elf64_sparc_freebsd_vec,
&bfd_elf64_tradbigmips_vec,
&bfd_elf64_tradlittlemips_vec,
&bfd_elf64_x86_64_freebsd_vec,
@@ -1062,11 +1050,6 @@ static const bfd_target * const _bfd_target_vector[] =
&i386os9k_vec,
&i386pe_vec,
&i386pei_vec,
-#ifdef BFD64
- &x86_64coff_vec,
- &x86_64pe_vec,
- &x86_64pei_vec,
-#endif
&i860coff_vec,
&icoff_big_vec,
&icoff_little_vec,
@@ -1291,6 +1274,7 @@ find_target (const char *name)
while (match->vector == NULL)
++match;
return match->vector;
+ break;
}
}
diff --git a/bfd/version.h b/bfd/version.h
index acd4ccb..db98084 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20061115
+#define BFD_VERSION_DATE 20060828
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_string@
diff --git a/bfd/vms-hdr.c b/bfd/vms-hdr.c
index 67c22b3..24a0aec 100644
--- a/bfd/vms-hdr.c
+++ b/bfd/vms-hdr.c
@@ -1,6 +1,6 @@
/* vms-hdr.c -- BFD back-end for VMS/VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
HDR record handling functions
@@ -248,7 +248,7 @@ _bfd_vms_write_hdr (bfd *abfd, int objtype)
/* LMN. */
_bfd_vms_output_begin (abfd, EOBJ_S_C_EMH, EMH_S_C_LNM);
- _bfd_vms_output_dump (abfd, (unsigned char *) STRING_COMMA_LEN ("GAS proGIS"));
+ _bfd_vms_output_dump (abfd, (unsigned char *)"GAS proGIS", 10);
_bfd_vms_output_flush (abfd);
/* SRC. */
@@ -260,7 +260,7 @@ _bfd_vms_write_hdr (bfd *abfd, int objtype)
if (symbol->flags & BSF_FILE)
{
- if (CONST_STRNEQ ((char *)symbol->name, "<CASE:"))
+ if (strncmp ((char *)symbol->name, "<CASE:", 6) == 0)
{
PRIV (flag_hash_long_names) = symbol->name[6] - '0';
PRIV (flag_show_after_trunc) = symbol->name[7] - '0';
@@ -280,13 +280,13 @@ _bfd_vms_write_hdr (bfd *abfd, int objtype)
}
if (symnum == abfd->symcount)
- _bfd_vms_output_dump (abfd, (unsigned char *) STRING_COMMA_LEN ("noname"));
+ _bfd_vms_output_dump (abfd, (unsigned char *)"noname", 6);
_bfd_vms_output_flush (abfd);
/* TTL. */
_bfd_vms_output_begin (abfd, EOBJ_S_C_EMH, EMH_S_C_TTL);
- _bfd_vms_output_dump (abfd, (unsigned char *) STRING_COMMA_LEN ("TTL"));
+ _bfd_vms_output_dump (abfd, (unsigned char *)"TTL", 3);
_bfd_vms_output_flush (abfd);
/* CPR. */
diff --git a/config.guess b/config.guess
index 396482d..c085f4f 100755
--- a/config.guess
+++ b/config.guess
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
-timestamp='2006-07-02'
+timestamp='2006-05-13'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -211,7 +211,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -790,10 +790,10 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[3456]*)
+ x86:Interix*:[345]*)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
- EM64T:Interix*:[3456]*)
+ EM64T:Interix*:[345]*)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
@@ -831,9 +831,6 @@ EOF
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit ;;
diff --git a/config.sub b/config.sub
index fab0aa3..7ee5e9fe 100755
--- a/config.sub
+++ b/config.sub
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
-timestamp='2006-09-20'
+timestamp='2006-05-13'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -241,7 +241,7 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
@@ -276,7 +276,6 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | score \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
@@ -285,7 +284,7 @@ case $basic_machine in
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
@@ -318,7 +317,7 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
+ | avr-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
@@ -368,7 +367,7 @@ case $basic_machine in
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
@@ -1219,7 +1218,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers*)
+ | -skyos* | -haiku* | -rdos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1371,9 +1370,6 @@ else
# system, and we'll never get to this point.
case $basic_machine in
- score-*)
- os=-elf
- ;;
spu-*)
os=-elf
;;
diff --git a/config/ChangeLog b/config/ChangeLog
index fda6f95..bf0c5d6 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,40 +1,28 @@
-2006-11-13 Daniel Jacobowitz <dan@codesourcery.com>
-
- * tls.m4 (GCC_CHECK_TLS): Fall back to a link test.
-
-2006-10-14 Geoffrey Keating <geoffk@apple.com>
-
- * multi.m4: New file, from automake version 2 branch.
-
-2006-09-18 Tom Tromey <tromey@redhat.com>
-
- * tls.m4 (GCC_CHECK_TLS): Pass empty argument as "help arg" to
- GCC_ENABLE.
-
2006-07-25 Paolo Bonzini <bonzini@gnu.org>
PR build/26188
- * stdint.m4: Test for uintptr_t even on systems with uint64_t or uint32_t.
+ * stdint.m4: Test for uintptr_t even on systems with uint64_t or uint32_t.
-2006-07-21 Steve Ellcey <sje@cup.hp.com>
+ Sync from GCC
+ 2006-07-21 Steve Ellcey <sje@cup.hp.com>
- PR target/26792
- * unwind_ipinfo.m4: New.
+ PR target/26792
+ * unwind_ipinfo.m4: New.
-2006-07-21 David Daney <ddaney@avtrex.com>
+ 2006-07-21 David Daney <ddaney@avtrex.com>
- PR libgcj/28426
- * gxx-include-dir.m4: Use target_alias in path for cross build.
+ PR libgcj/28426
+ * gxx-include-dir.m4: Use target_alias in path for cross build.
2006-07-18 Paolo Bonzini <bonzini@gnu.org>
- * acx.m4: Support --with-build-libsubdir and AC_SUBST
- build_libsubdir.
+ * acx.m4: Support --with-build-libsubdir and AC_SUBST
+ build_libsubdir.
2006-06-13 Richard Earnshaw <rearnsha@arm.com>
Alexandre Oliva <aoliva@redhat.com>
- * gettext-sister.m4 (ZW_GNU_GETTEXT_SISTER_DIR): Add optional
+ * (ZW_GNU_GETTEXT_SISTER_DIR): Add optional
argument for where to search for NLS config file.
2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
diff --git a/config/multi.m4 b/config/multi.m4
deleted file mode 100644
index 9841767..0000000
--- a/config/multi.m4
+++ /dev/null
@@ -1,65 +0,0 @@
-## -*- Autoconf -*-
-# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
-
-# AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
-# ---------------------------------------------------
-# Add --enable-multilib to configure.
-AC_DEFUN([AM_ENABLE_MULTILIB],
-[# Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "$enableval" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
- esac],
- [multilib=yes])
-
-# We may get other options which we leave undocumented:
-# --with-target-subdir, --with-multisrctop, --with-multisubdir
-# See config-ml.in if you want the gory details.
-
-if test "$srcdir" = "."; then
- if test "$with_target_subdir" != "."; then
- multi_basedir="$srcdir/$with_multisrctop../$2"
- else
- multi_basedir="$srcdir/$with_multisrctop$2"
- fi
-else
- multi_basedir="$srcdir/$2"
-fi
-AC_SUBST(multi_basedir)
-
-# Even if the default multilib is not a cross compilation,
-# it may be that some of the other multilibs are.
-if test $cross_compiling = no && test $multilib = yes \
- && test "x${with_multisubdir}" != x ; then
- cross_compiling=maybe
-fi
-
-AC_OUTPUT_COMMANDS([
-# Only add multilib support code if we just rebuilt the top-level
-# Makefile.
-case " $CONFIG_FILES " in
- *" ]m4_default([$1],Makefile)[ "*)
- ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
- ;;
-esac],
- [
-srcdir="$srcdir"
-host="$host"
-target="$target"
-with_multisubdir="$with_multisubdir"
-with_multisrctop="$with_multisrctop"
-with_target_subdir="$with_target_subdir"
-ac_configure_args="${multilib_arg} ${ac_configure_args}"
-multi_basedir="$multi_basedir"
-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-CC="$CC"])])dnl
diff --git a/config/tls.m4 b/config/tls.m4
index b66b6d7..5cbb685 100644
--- a/config/tls.m4
+++ b/config/tls.m4
@@ -1,6 +1,6 @@
dnl Check whether the target supports TLS.
AC_DEFUN([GCC_CHECK_TLS], [
- GCC_ENABLE(tls, yes, [], [Use thread-local storage])
+ GCC_ENABLE(tls, yes, [Use thread-local storage])
AC_CACHE_CHECK([whether the target supports thread-local storage],
have_tls, [
AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }],
@@ -13,8 +13,7 @@ AC_DEFUN([GCC_CHECK_TLS], [
[have_tls=yes], [have_tls=no], [])
LDFLAGS="$save_LDFLAGS"],
[have_tls=no],
- [AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }],
- [have_tls=yes], [have_tls=no])]
+ [AC_COMPILE_IFELSE([__thread int foo;], [have_tls=yes], [have_tls=no])]
)])
if test "$enable_tls $have_tls" = "yes yes"; then
AC_DEFINE(HAVE_TLS, 1,
diff --git a/configure b/configure
index f35de23..22cdb87 100755
--- a/configure
+++ b/configure
@@ -1095,7 +1095,7 @@ case "${host}" in
;;
i[3456789]86-*-mingw32*)
# noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv"
- noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool newlib"
+ noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
;;
i[3456789]86-*-beos*)
noconfigdirs="$noconfigdirs tk itcl libgui gdb"
@@ -1331,7 +1331,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
;;
bfin-*-*)
- noconfigdirs="$noconfigdirs gdb"
+ noconfigdirs="$noconfigdirs target-libgloss gdb"
if test x${is_cross_compiler} != xno ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
@@ -1439,17 +1439,17 @@ case "${target}" in
# 'target-newlib' will appear in skipdirs.
;;
i[3456789]86-*-mingw32*)
- target_configdirs="$target_configdirs target-winsup"
- noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}"
+ target_configdirs="$target_configdirs target-mingw"
+ noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
;;
*-*-cygwin*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
# always build newlib if winsup directory is present.
- if test -d "$srcdir/winsup/cygwin"; then
+ if test -d "$srcdir/winsup"; then
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
elif test -d "$srcdir/newlib"; then
- echo "Warning: winsup/cygwin is missing so newlib can't be built."
+ echo "Warning: winsup is missing so newlib can't be built."
fi
;;
i[3456789]86-moss-msdos | i[3456789]86-*-moss* | \
@@ -1552,11 +1552,17 @@ case "${target}" in
# <oldham@codesourcery.com>
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
+ mips*-dec-bsd*)
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
+ ;;
mips*-*-bsd*)
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
+ mipstx39-*-*)
+ noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
+ ;;
mips64*-*-linux*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs target-newlib ${libgcj}"
;;
mips*-*-linux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
@@ -1846,7 +1852,7 @@ else
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1850: checking for $ac_word" >&5
+echo "configure:1856: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1876,7 +1882,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1880: checking for $ac_word" >&5
+echo "configure:1886: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1927,7 +1933,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1931: checking for $ac_word" >&5
+echo "configure:1937: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1959,7 +1965,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1963: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1969: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1970,12 +1976,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1974 "configure"
+#line 1980 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2001,12 +2007,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2011: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2010: checking whether we are using GNU C" >&5
+echo "configure:2016: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2015,7 +2021,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -2034,7 +2040,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2038: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2044: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2101,7 +2107,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2105: checking for $ac_word" >&5
+echo "configure:2111: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2133,7 +2139,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2137: checking for $ac_word" >&5
+echo "configure:2143: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2166,7 +2172,7 @@ fi
fi
echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
-echo "configure:2170: checking whether compiler driver understands Ada" >&5
+echo "configure:2176: checking whether compiler driver understands Ada" >&5
if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2198,7 +2204,7 @@ else
fi
echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
-echo "configure:2202: checking how to compare bootstrapped objects" >&5
+echo "configure:2208: checking how to compare bootstrapped objects" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2296,20 +2302,20 @@ saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $gmpinc"
# Check GMP actually works
echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
-echo "configure:2300: checking for correct version of gmp.h" >&5
+echo "configure:2306: checking for correct version of gmp.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2302 "configure"
+#line 2308 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {
-#if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 1)
+#if __GNU_MP_VERSION < 3
choke me
#endif
; return 0; }
EOF
-if { (eval echo configure:2313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@@ -2321,25 +2327,21 @@ fi
rm -f conftest*
if test x"$have_gmp" = xyes; then
+ echo $ac_n "checking for MPFR""... $ac_c" 1>&6
+echo "configure:2332: checking for MPFR" >&5
+
saved_LIBS="$LIBS"
LIBS="$LIBS $gmplibs"
- echo $ac_n "checking for correct version of mpfr.h""... $ac_c" 1>&6
-echo "configure:2328: checking for correct version of mpfr.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2330 "configure"
+#line 2337 "configure"
#include "confdefs.h"
#include <gmp.h>
#include <mpfr.h>
int main() {
-
-#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2)
- choke me
-#endif
- mpfr_t n; mpfr_init(n);
-
+mpfr_t n; mpfr_init(n);
; return 0; }
EOF
-if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@@ -2353,14 +2355,6 @@ rm -f conftest*
fi
CFLAGS="$saved_CFLAGS"
-if test -d ${srcdir}/gcc && test x$have_gmp != xyes; then
- { echo "configure: error: Building GCC requires GMP 4.1+ and MPFR 2.2+.
-Try the --with-gmp and/or --with-mpfr options to specify their locations.
-Copies of these libraries' source code can be found at their respective
-hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
-See also http://gcc.gnu.org/install/prerequisites.html for additional info." 1>&2; exit 1; }
-fi
-
# Flags needed for both GMP and/or MPFR
@@ -2448,6 +2442,7 @@ if test -d ${srcdir}/gcc; then
subdir_requires=
boot_language=
build_by_default=
+ need_gmp=
. ${lang_frag}
potential_languages="${potential_languages},${language}"
# This is quite sensitive to the ordering of the case statement arms.
@@ -2493,6 +2488,18 @@ if test -d ${srcdir}/gcc; then
esac
done
+ # Disable languages that need GMP if it isn't available.
+ case ,${enable_languages},:${have_gmp}:${need_gmp} in
+ *,${language},*:no:yes)
+ # Specifically requested language; tell them.
+ { echo "configure: error: GMP with MPFR support is required to build $language" 1>&2; exit 1; }
+ ;;
+ *:no:yes)
+ # Silently disable.
+ add_this_lang=no
+ ;;
+ esac
+
# Disable a language that is unsupported by the target.
case " $unsupported_languages " in
*" $language "*)
@@ -3359,11 +3366,6 @@ case " $target_configdirs " in
esac
;;
esac
-case "$target" in
-*-mingw*)
- # Can't be handled as Cygwin above since Mingw does not use newlib.
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/mingw -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/mingw/include -isystem $$s/winsup/w32api/include' ;;
-esac
# Allow the user to override the flags for
# our build compiler if desired.
@@ -3445,7 +3447,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3449: checking for $ac_word" >&5
+echo "configure:3451: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3485,7 +3487,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3489: checking for $ac_word" >&5
+echo "configure:3491: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3524,7 +3526,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3528: checking for $ac_word" >&5
+echo "configure:3530: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_M4'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3563,7 +3565,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3567: checking for $ac_word" >&5
+echo "configure:3569: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3603,7 +3605,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3607: checking for $ac_word" >&5
+echo "configure:3609: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3642,7 +3644,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3646: checking for $ac_word" >&5
+echo "configure:3648: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3695,7 +3697,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3699: checking for $ac_word" >&5
+echo "configure:3701: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_EXPECT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3736,7 +3738,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3740: checking for $ac_word" >&5
+echo "configure:3742: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RUNTEST'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3768,7 +3770,7 @@ test -n "$RUNTEST" || RUNTEST="runtest"
case " $configdirs " in
*" dejagnu "*)
- test $host = $build && RUNTEST='$$s/$(HOST_SUBDIR)/dejagnu/runtest'
+ test $host = $build && RUNTEST='$$r/$(HOST_SUBDIR)/dejagnu/runtest'
;;
esac
@@ -3784,7 +3786,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3788: checking for $ac_word" >&5
+echo "configure:3790: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3815,7 +3817,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3819: checking for $ac_word" >&5
+echo "configure:3821: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3859,7 +3861,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3863: checking for $ac_word" >&5
+echo "configure:3865: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3890,7 +3892,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3894: checking for $ac_word" >&5
+echo "configure:3896: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3934,7 +3936,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3938: checking for $ac_word" >&5
+echo "configure:3940: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3965,7 +3967,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3969: checking for $ac_word" >&5
+echo "configure:3971: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4009,7 +4011,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4013: checking for $ac_word" >&5
+echo "configure:4015: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4040,7 +4042,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4044: checking for $ac_word" >&5
+echo "configure:4046: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4084,7 +4086,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4088: checking for $ac_word" >&5
+echo "configure:4090: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4115,7 +4117,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4119: checking for $ac_word" >&5
+echo "configure:4121: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4159,7 +4161,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4163: checking for $ac_word" >&5
+echo "configure:4165: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4190,7 +4192,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4194: checking for $ac_word" >&5
+echo "configure:4196: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4234,7 +4236,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4238: checking for $ac_word" >&5
+echo "configure:4240: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4265,7 +4267,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4269: checking for $ac_word" >&5
+echo "configure:4271: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4304,7 +4306,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4308: checking for $ac_word" >&5
+echo "configure:4310: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4335,7 +4337,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4339: checking for $ac_word" >&5
+echo "configure:4341: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4374,7 +4376,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4378: checking for $ac_word" >&5
+echo "configure:4380: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4405,7 +4407,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4409: checking for $ac_word" >&5
+echo "configure:4411: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4449,7 +4451,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4453: checking for $ac_word" >&5
+echo "configure:4455: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4480,7 +4482,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4484: checking for $ac_word" >&5
+echo "configure:4486: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4524,7 +4526,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4528: checking for $ac_word" >&5
+echo "configure:4530: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4555,7 +4557,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4559: checking for $ac_word" >&5
+echo "configure:4561: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4619,7 +4621,7 @@ fi
if test -n "$with_build_time_tools"; then
for ncn_progname in cc gcc; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:4623: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:4625: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_CC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -4636,7 +4638,7 @@ if test -z "$ac_cv_prog_CC_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4640: checking for $ac_word" >&5
+echo "configure:4642: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4667,7 +4669,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4671: checking for $ac_word" >&5
+echo "configure:4673: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4710,7 +4712,7 @@ fi
if test -n "$with_build_time_tools"; then
for ncn_progname in c++ g++ cxx gxx; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:4714: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:4716: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_CXX_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -4727,7 +4729,7 @@ if test -z "$ac_cv_prog_CXX_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4731: checking for $ac_word" >&5
+echo "configure:4733: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4758,7 +4760,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4762: checking for $ac_word" >&5
+echo "configure:4764: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4801,7 +4803,7 @@ fi
if test -n "$with_build_time_tools"; then
for ncn_progname in gcc; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:4805: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:4807: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_GCC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -4818,7 +4820,7 @@ if test -z "$ac_cv_prog_GCC_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4822: checking for $ac_word" >&5
+echo "configure:4824: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4849,7 +4851,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4853: checking for $ac_word" >&5
+echo "configure:4855: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4887,7 +4889,7 @@ fi
if test -n "$with_build_time_tools"; then
for ncn_progname in gcj; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:4891: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:4893: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_GCJ_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -4904,7 +4906,7 @@ if test -z "$ac_cv_prog_GCJ_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4908: checking for $ac_word" >&5
+echo "configure:4910: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4935,7 +4937,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4939: checking for $ac_word" >&5
+echo "configure:4941: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4978,7 +4980,7 @@ fi
if test -n "$with_build_time_tools"; then
for ncn_progname in gfortran; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:4982: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:4984: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_GFORTRAN_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -4995,7 +4997,7 @@ if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4999: checking for $ac_word" >&5
+echo "configure:5001: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5026,7 +5028,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5030: checking for $ac_word" >&5
+echo "configure:5032: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5133,7 +5135,7 @@ rm conftest.c
if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
echo $ac_n "checking for ar in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5137: checking for ar in $with_build_time_tools" >&5
+echo "configure:5139: checking for ar in $with_build_time_tools" >&5
if test -x $with_build_time_tools/ar; then
AR_FOR_TARGET=`cd $with_build_time_tools && pwd`/ar
ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
@@ -5151,7 +5153,7 @@ if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5155: checking for $ac_word" >&5
+echo "configure:5157: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5188,7 +5190,7 @@ if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
for ncn_progname in ar; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5192: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:5194: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_AR_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -5205,7 +5207,7 @@ if test -z "$ac_cv_prog_AR_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5209: checking for $ac_word" >&5
+echo "configure:5211: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5236,7 +5238,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5240: checking for $ac_word" >&5
+echo "configure:5242: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5286,7 +5288,7 @@ fi
if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
echo $ac_n "checking for as in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5290: checking for as in $with_build_time_tools" >&5
+echo "configure:5292: checking for as in $with_build_time_tools" >&5
if test -x $with_build_time_tools/as; then
AS_FOR_TARGET=`cd $with_build_time_tools && pwd`/as
ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
@@ -5304,7 +5306,7 @@ if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5308: checking for $ac_word" >&5
+echo "configure:5310: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5341,7 +5343,7 @@ if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
for ncn_progname in as; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5345: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:5347: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_AS_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -5358,7 +5360,7 @@ if test -z "$ac_cv_prog_AS_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5362: checking for $ac_word" >&5
+echo "configure:5364: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5389,7 +5391,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5393: checking for $ac_word" >&5
+echo "configure:5395: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5439,7 +5441,7 @@ fi
if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
echo $ac_n "checking for dlltool in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5443: checking for dlltool in $with_build_time_tools" >&5
+echo "configure:5445: checking for dlltool in $with_build_time_tools" >&5
if test -x $with_build_time_tools/dlltool; then
DLLTOOL_FOR_TARGET=`cd $with_build_time_tools && pwd`/dlltool
ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
@@ -5457,7 +5459,7 @@ if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5461: checking for $ac_word" >&5
+echo "configure:5463: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5494,7 +5496,7 @@ if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
for ncn_progname in dlltool; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5498: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:5500: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_DLLTOOL_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -5511,7 +5513,7 @@ if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5515: checking for $ac_word" >&5
+echo "configure:5517: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5542,7 +5544,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5546: checking for $ac_word" >&5
+echo "configure:5548: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5592,7 +5594,7 @@ fi
if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
echo $ac_n "checking for ld in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5596: checking for ld in $with_build_time_tools" >&5
+echo "configure:5598: checking for ld in $with_build_time_tools" >&5
if test -x $with_build_time_tools/ld; then
LD_FOR_TARGET=`cd $with_build_time_tools && pwd`/ld
ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
@@ -5610,7 +5612,7 @@ if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5614: checking for $ac_word" >&5
+echo "configure:5616: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5647,7 +5649,7 @@ if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
for ncn_progname in ld; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5651: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:5653: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_LD_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -5664,7 +5666,7 @@ if test -z "$ac_cv_prog_LD_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5668: checking for $ac_word" >&5
+echo "configure:5670: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5695,7 +5697,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5699: checking for $ac_word" >&5
+echo "configure:5701: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5745,7 +5747,7 @@ fi
if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
echo $ac_n "checking for lipo in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5749: checking for lipo in $with_build_time_tools" >&5
+echo "configure:5751: checking for lipo in $with_build_time_tools" >&5
if test -x $with_build_time_tools/lipo; then
LIPO_FOR_TARGET=`cd $with_build_time_tools && pwd`/lipo
ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
@@ -5763,7 +5765,7 @@ if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
# Extract the first word of "lipo", so it can be a program name with args.
set dummy lipo; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5767: checking for $ac_word" >&5
+echo "configure:5769: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LIPO_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5800,7 +5802,7 @@ if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
for ncn_progname in lipo; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5804: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:5806: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_LIPO_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -5817,7 +5819,7 @@ if test -z "$ac_cv_prog_LIPO_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5821: checking for $ac_word" >&5
+echo "configure:5823: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5848,7 +5850,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5852: checking for $ac_word" >&5
+echo "configure:5854: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5898,7 +5900,7 @@ fi
if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
echo $ac_n "checking for nm in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5902: checking for nm in $with_build_time_tools" >&5
+echo "configure:5904: checking for nm in $with_build_time_tools" >&5
if test -x $with_build_time_tools/nm; then
NM_FOR_TARGET=`cd $with_build_time_tools && pwd`/nm
ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
@@ -5916,7 +5918,7 @@ if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5920: checking for $ac_word" >&5
+echo "configure:5922: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5953,7 +5955,7 @@ if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
for ncn_progname in nm; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5957: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:5959: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_NM_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -5970,7 +5972,7 @@ if test -z "$ac_cv_prog_NM_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5974: checking for $ac_word" >&5
+echo "configure:5976: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6001,7 +6003,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6005: checking for $ac_word" >&5
+echo "configure:6007: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6051,7 +6053,7 @@ fi
if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
echo $ac_n "checking for objdump in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6055: checking for objdump in $with_build_time_tools" >&5
+echo "configure:6057: checking for objdump in $with_build_time_tools" >&5
if test -x $with_build_time_tools/objdump; then
OBJDUMP_FOR_TARGET=`cd $with_build_time_tools && pwd`/objdump
ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
@@ -6069,7 +6071,7 @@ if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6073: checking for $ac_word" >&5
+echo "configure:6075: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6106,7 +6108,7 @@ if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
for ncn_progname in objdump; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6110: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:6112: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_OBJDUMP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -6123,7 +6125,7 @@ if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6127: checking for $ac_word" >&5
+echo "configure:6129: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6154,7 +6156,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6158: checking for $ac_word" >&5
+echo "configure:6160: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6204,7 +6206,7 @@ fi
if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
echo $ac_n "checking for ranlib in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6208: checking for ranlib in $with_build_time_tools" >&5
+echo "configure:6210: checking for ranlib in $with_build_time_tools" >&5
if test -x $with_build_time_tools/ranlib; then
RANLIB_FOR_TARGET=`cd $with_build_time_tools && pwd`/ranlib
ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
@@ -6222,7 +6224,7 @@ if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6226: checking for $ac_word" >&5
+echo "configure:6228: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6259,7 +6261,7 @@ if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
for ncn_progname in ranlib; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6263: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:6265: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_RANLIB_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -6276,7 +6278,7 @@ if test -z "$ac_cv_prog_RANLIB_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6280: checking for $ac_word" >&5
+echo "configure:6282: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6307,7 +6309,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6311: checking for $ac_word" >&5
+echo "configure:6313: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6357,7 +6359,7 @@ fi
if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
echo $ac_n "checking for strip in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6361: checking for strip in $with_build_time_tools" >&5
+echo "configure:6363: checking for strip in $with_build_time_tools" >&5
if test -x $with_build_time_tools/strip; then
STRIP_FOR_TARGET=`cd $with_build_time_tools && pwd`/strip
ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
@@ -6375,7 +6377,7 @@ if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6379: checking for $ac_word" >&5
+echo "configure:6381: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6412,7 +6414,7 @@ if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
for ncn_progname in strip; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6416: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:6418: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_STRIP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -6429,7 +6431,7 @@ if test -z "$ac_cv_prog_STRIP_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6433: checking for $ac_word" >&5
+echo "configure:6435: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6460,7 +6462,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6464: checking for $ac_word" >&5
+echo "configure:6466: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6510,7 +6512,7 @@ fi
if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
echo $ac_n "checking for windres in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6514: checking for windres in $with_build_time_tools" >&5
+echo "configure:6516: checking for windres in $with_build_time_tools" >&5
if test -x $with_build_time_tools/windres; then
WINDRES_FOR_TARGET=`cd $with_build_time_tools && pwd`/windres
ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
@@ -6528,7 +6530,7 @@ if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6532: checking for $ac_word" >&5
+echo "configure:6534: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6565,7 +6567,7 @@ if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
for ncn_progname in windres; do
echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6569: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo "configure:6571: checking for ${ncn_progname} in $with_build_time_tools" >&5
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_WINDRES_FOR_TARGET=$with_build_time_tools/${ncn_progname}
echo "$ac_t""yes" 1>&6
@@ -6582,7 +6584,7 @@ if test -z "$ac_cv_prog_WINDRES_FOR_TARGET"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6586: checking for $ac_word" >&5
+echo "configure:6588: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6613,7 +6615,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6617: checking for $ac_word" >&5
+echo "configure:6619: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6661,7 +6663,7 @@ fi
RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
echo $ac_n "checking where to find the target ar""... $ac_c" 1>&6
-echo "configure:6665: checking where to find the target ar" >&5
+echo "configure:6667: checking where to find the target ar" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -6694,7 +6696,7 @@ else
fi
fi
echo $ac_n "checking where to find the target as""... $ac_c" 1>&6
-echo "configure:6698: checking where to find the target as" >&5
+echo "configure:6700: checking where to find the target as" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -6727,7 +6729,7 @@ else
fi
fi
echo $ac_n "checking where to find the target cc""... $ac_c" 1>&6
-echo "configure:6731: checking where to find the target cc" >&5
+echo "configure:6733: checking where to find the target cc" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -6760,7 +6762,7 @@ else
fi
fi
echo $ac_n "checking where to find the target c++""... $ac_c" 1>&6
-echo "configure:6764: checking where to find the target c++" >&5
+echo "configure:6766: checking where to find the target c++" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -6796,7 +6798,7 @@ else
fi
fi
echo $ac_n "checking where to find the target c++ for libstdc++""... $ac_c" 1>&6
-echo "configure:6800: checking where to find the target c++ for libstdc++" >&5
+echo "configure:6802: checking where to find the target c++ for libstdc++" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -6832,7 +6834,7 @@ else
fi
fi
echo $ac_n "checking where to find the target dlltool""... $ac_c" 1>&6
-echo "configure:6836: checking where to find the target dlltool" >&5
+echo "configure:6838: checking where to find the target dlltool" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -6865,7 +6867,7 @@ else
fi
fi
echo $ac_n "checking where to find the target gcc""... $ac_c" 1>&6
-echo "configure:6869: checking where to find the target gcc" >&5
+echo "configure:6871: checking where to find the target gcc" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -6898,7 +6900,7 @@ else
fi
fi
echo $ac_n "checking where to find the target gcj""... $ac_c" 1>&6
-echo "configure:6902: checking where to find the target gcj" >&5
+echo "configure:6904: checking where to find the target gcj" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -6934,7 +6936,7 @@ else
fi
fi
echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6
-echo "configure:6938: checking where to find the target gfortran" >&5
+echo "configure:6940: checking where to find the target gfortran" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -6970,7 +6972,7 @@ else
fi
fi
echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6
-echo "configure:6974: checking where to find the target ld" >&5
+echo "configure:6976: checking where to find the target ld" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -7003,7 +7005,7 @@ else
fi
fi
echo $ac_n "checking where to find the target lipo""... $ac_c" 1>&6
-echo "configure:7007: checking where to find the target lipo" >&5
+echo "configure:7009: checking where to find the target lipo" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -7026,7 +7028,7 @@ else
fi
fi
echo $ac_n "checking where to find the target nm""... $ac_c" 1>&6
-echo "configure:7030: checking where to find the target nm" >&5
+echo "configure:7032: checking where to find the target nm" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -7059,7 +7061,7 @@ else
fi
fi
echo $ac_n "checking where to find the target objdump""... $ac_c" 1>&6
-echo "configure:7063: checking where to find the target objdump" >&5
+echo "configure:7065: checking where to find the target objdump" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -7092,7 +7094,7 @@ else
fi
fi
echo $ac_n "checking where to find the target ranlib""... $ac_c" 1>&6
-echo "configure:7096: checking where to find the target ranlib" >&5
+echo "configure:7098: checking where to find the target ranlib" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -7125,7 +7127,7 @@ else
fi
fi
echo $ac_n "checking where to find the target strip""... $ac_c" 1>&6
-echo "configure:7129: checking where to find the target strip" >&5
+echo "configure:7131: checking where to find the target strip" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -7158,7 +7160,7 @@ else
fi
fi
echo $ac_n "checking where to find the target windres""... $ac_c" 1>&6
-echo "configure:7162: checking where to find the target windres" >&5
+echo "configure:7164: checking where to find the target windres" >&5
if test "x${build}" != "x${host}" ; then
if expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
@@ -7219,7 +7221,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:7223: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:7225: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -7268,16 +7270,16 @@ if test "$GCC" = yes; then
# Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
CFLAGS="$CFLAGS -fkeep-inline-functions"
echo $ac_n "checking whether -fkeep-inline-functions is supported""... $ac_c" 1>&6
-echo "configure:7272: checking whether -fkeep-inline-functions is supported" >&5
+echo "configure:7274: checking whether -fkeep-inline-functions is supported" >&5
cat > conftest.$ac_ext <<EOF
-#line 7274 "configure"
+#line 7276 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:7281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6; stage1_cflags="$stage1_cflags -fkeep-inline-functions"
else
diff --git a/configure.in b/configure.in
index ccb1b93..0c83351 100644
--- a/configure.in
+++ b/configure.in
@@ -279,7 +279,7 @@ case "${host}" in
;;
i[[3456789]]86-*-mingw32*)
# noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv"
- noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool newlib"
+ noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
;;
i[[3456789]]86-*-beos*)
noconfigdirs="$noconfigdirs tk itcl libgui gdb"
@@ -507,7 +507,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
;;
bfin-*-*)
- noconfigdirs="$noconfigdirs gdb"
+ noconfigdirs="$noconfigdirs target-libgloss gdb"
if test x${is_cross_compiler} != xno ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
@@ -615,17 +615,17 @@ case "${target}" in
# 'target-newlib' will appear in skipdirs.
;;
i[[3456789]]86-*-mingw32*)
- target_configdirs="$target_configdirs target-winsup"
- noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}"
+ target_configdirs="$target_configdirs target-mingw"
+ noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
;;
*-*-cygwin*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
# always build newlib if winsup directory is present.
- if test -d "$srcdir/winsup/cygwin"; then
+ if test -d "$srcdir/winsup"; then
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
elif test -d "$srcdir/newlib"; then
- echo "Warning: winsup/cygwin is missing so newlib can't be built."
+ echo "Warning: winsup is missing so newlib can't be built."
fi
;;
i[[3456789]]86-moss-msdos | i[[3456789]]86-*-moss* | \
@@ -728,11 +728,17 @@ case "${target}" in
# <oldham@codesourcery.com>
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
+ mips*-dec-bsd*)
+ noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
+ ;;
mips*-*-bsd*)
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
+ mipstx39-*-*)
+ noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
+ ;;
mips64*-*-linux*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs target-newlib ${libgcj}"
;;
mips*-*-linux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
@@ -1097,34 +1103,24 @@ CFLAGS="$CFLAGS $gmpinc"
# Check GMP actually works
AC_MSG_CHECKING([for correct version of gmp.h])
AC_TRY_COMPILE([#include "gmp.h"],[
-#if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 1)
+#if __GNU_MP_VERSION < 3
choke me
#endif
-], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
+], [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no]); have_gmp=no])
if test x"$have_gmp" = xyes; then
+ AC_MSG_CHECKING([for MPFR])
+
saved_LIBS="$LIBS"
LIBS="$LIBS $gmplibs"
- AC_MSG_CHECKING([for correct version of mpfr.h])
AC_TRY_LINK([#include <gmp.h>
-#include <mpfr.h>],[
-#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2)
- choke me
-#endif
- mpfr_t n; mpfr_init(n);
-], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
+#include <mpfr.h>], [mpfr_t n; mpfr_init(n);],
+ [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
LIBS="$saved_LIBS"
fi
CFLAGS="$saved_CFLAGS"
-if test -d ${srcdir}/gcc && test x$have_gmp != xyes; then
- AC_MSG_ERROR([Building GCC requires GMP 4.1+ and MPFR 2.2+.
-Try the --with-gmp and/or --with-mpfr options to specify their locations.
-Copies of these libraries' source code can be found at their respective
-hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
-See also http://gcc.gnu.org/install/prerequisites.html for additional info.])
-fi
-
# Flags needed for both GMP and/or MPFR
AC_SUBST(gmplibs)
AC_SUBST(gmpinc)
@@ -1212,6 +1208,7 @@ if test -d ${srcdir}/gcc; then
subdir_requires=
boot_language=
build_by_default=
+ need_gmp=
. ${lang_frag}
potential_languages="${potential_languages},${language}"
# This is quite sensitive to the ordering of the case statement arms.
@@ -1257,6 +1254,18 @@ if test -d ${srcdir}/gcc; then
esac
done
+ # Disable languages that need GMP if it isn't available.
+ case ,${enable_languages},:${have_gmp}:${need_gmp} in
+ *,${language},*:no:yes)
+ # Specifically requested language; tell them.
+ AC_MSG_ERROR([GMP with MPFR support is required to build $language])
+ ;;
+ *:no:yes)
+ # Silently disable.
+ add_this_lang=no
+ ;;
+ esac
+
# Disable a language that is unsupported by the target.
case " $unsupported_languages " in
*" $language "*)
@@ -2112,11 +2121,6 @@ case " $target_configdirs " in
esac
;;
esac
-case "$target" in
-*-mingw*)
- # Can't be handled as Cygwin above since Mingw does not use newlib.
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/mingw -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/mingw/include -isystem $$s/winsup/w32api/include' ;;
-esac
# Allow the user to override the flags for
# our build compiler if desired.
@@ -2249,7 +2253,7 @@ esac
AC_CHECK_PROGS(RUNTEST, runtest, runtest)
case " $configdirs " in
*" dejagnu "*)
- test $host = $build && RUNTEST='$$s/$(HOST_SUBDIR)/dejagnu/runtest'
+ test $host = $build && RUNTEST='$$r/$(HOST_SUBDIR)/dejagnu/runtest'
;;
esac
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6ff5bad..635cc7f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,547 +1,3 @@
-2006-11-14 Maxim Grigoriev <maxim@tensilica.com>
-
- * NEWS: New port to Xtensa.
- * Makefile.in: Add dependencies for Xtensa files.
- * configure.tgt (xtensa*, xtensa*-*-elf*): New.
- * configure.host (xtensa*-*-elf*): New.
- * config/xtensa/xtensa.mt: New file.
- * xtensa-config.c: New file.
- * xtensa-tdep.h: New file.
- * xtensa-tdep.c: New file.
-
-2006-11-14 Daniel Jacobowitz <dan@codesourcery.com>
-
- * remote.c (set_remote_cmd): Call help_list.
- (show_remote_cmd): Skip legacy aliases. Handle non-show_cmd
- entries. Add missed cleanup.
- * cli/cli-setshow.c (cmd_show_list): Handle non-show_cmd entries.
-
-2006-11-13 Paul Gilliam <pgilliam@us.ibm.com>
-
- * ppc-linux-tdep.c (ppc_linux_sigtramp_cache): Don't futz with
- the floating point registers if there aren't any.
-
-2006-11-12 Ben Harris <bjh21@NetBSD.org>
-
- * arm-tdep.c (arm_unwind_pc): Use arm_addr_bits_remove.
-
-2006-11-10 Daniel Jacobowitz <dan@codesourcery.com>
-
- * frame.c (frame_register_unwind_location): New function.
- (get_prev_frame_1): Check for UNWIND_NO_SAVED_PC.
- (frame_stop_reason_string): Handle UNWIND_NO_SAVED_PC.
- * frame.h (enum unwind_stop_reason): Add UNWIND_NO_SAVED_PC.
-
-2006-11-10 Daniel Jacobowitz <dan@codesourcery.com>
-
- * arch-utils.c (target_byte_order_user): Renamed from
- target_byte_order.
- (target_byte_order_auto, selected_byte_order): Removed.
- (show_endian): Check target_byte_order_user.
- (set_endian): Always update the architecture. Set
- target_byte_order_user after success.
- (target_architecture_auto): Removed.
- (target_architecture_user): New.
- (selected_architecture_name, show_architecture): Check it.
- (set_architecture): Set target_architecture_user after success.
- (gdbarch_from_bfd): Check the argument.
- (default_byte_order): New.
- (initialize_current_architecture): Set the global default
- architecture and endianness.
- (gdbarch_info_fill): Remove GDBARCH argument. Do not check the
- previous architecture. Use exec_bfd, global selected architecture
- and endianness, and global defaults.
- * arch-utils.h (selected_byte_order): Remove prototype.
- (gdbarch_info_fill): Update.
- * exec.c (exec_file_attach): Update the architecture after removing
- the current file.
- * gdbarch.sh: Update comments.
- (find_arch_by_info): Remove OLD_GDBARCH argument. Update call to
- gdbarch_info_fill.
- (gdbarch_find_by_info): Update call to find_arch_by_info.
- * gdbarch.h, gdbarch.c: Regenerated.
- * remote-sim.c (gdbsim_open): Use TARGET_BYTE_ORDER.
-
-2006-11-09 Joel Brobecker <brobecker@adacore.com>
-
- * sparc-tdep.c (sparc_fetch_instruction): Read instruction
- using read_memory_nobpt.
-
-2006-11-06 Jim Blandy <jimb@codesourcery.com>
-
- * dwarf2loc.c (dwarf_expr_read_reg): Use frame_register_read
- instead of frame_register. Doc fix.
-
-2006-11-04 Vladimir Prus <vladimir@codesourcery.com>
-
- * serial.c (serial_open): Strip leading spaces from program
- name when opening pipe.
-
-2006-11-03 Jim Blandy <jimb@codesourcery.com>
-
- * dwarf2loc.c (dwarf_expr_read_reg): Use frame_unwind_register
- instead of frame_register. Doc fix.
-
-2006-11-02 Daniel Jacobowitz <dan@codesourcery.com>
-
- * dwarf2read.c (struct dwarf2_per_cu_data): Update comment.
- (load_full_comp_unit): Take OBJFILE argument and use it.
- (dwarf2_build_psymtabs_hard): Skip partial units.
- (process_queue): Pass OBJFILE to load_full_comp_unit. Check
- type_hash for read in CUs. Test psymtab for NULL.
-
-2006-11-02 Daniel Jacobowitz <dan@codesourcery.com>
-
- * arm-tdep.c (arm_gdbarch_init): Handle EF_ARM_EABI_VER5.
-
-2006-10-31 Vladimir Prus <vladimir@codesourcery.com>
-
- * commands.h (enum command_class): Use different
- values for class_deprecated and class_run.
- * cli/cli-decode.c: (print_help_for_command): New.
- (apropos_cmd): Use the above.
- (help_list): Mention 'help all'
- and 'apropos' when printing top-level help.
- (help_all): Print the class name before printing
- commands in that class. Don't print prefix commands
- here, instead pass recurse flag to help_cmd_list.
- Print list of unclassified commands at the end.
- (help_cmd_list): When recursing, use all_commands class.
- Recurse only if the class of the command matches.
-
-2006-10-27 Andreas Schwab <schwab@suse.de>
-
- * gdbcmd.h (detachlist): Declare.
- * infcmd.c (_initialize_infcmd): Define "detach" as prefix
- command.
- * linux-fork.c (_initialize_linux_fork): Rename
- "detach-checkpoint" to "detach checkpoint" and "detach-fork" to
- "detach fork".
- * cli/cli-cmds.c (detachlist): Define.
- (init_cmd_lists): Initialize it.
- * cli/cli-cmds.h (detachlist): Declare.
-
-2006-10-25 Jim Blandy <jimb@codesourcery.com>
-
- * p-valprint.c (pascal_object_print_value): Add 'static' keyword
- to function definition, to match declaration earlier in file.
-
-2006-10-21 Paul Brook <paul@codesourcery.com>
-
- * remote.c (remote_fetch_registers): Fix error message.
-
-2006-10-20 Daniel Jacobowitz <dan@codesourcery.com>
-
- * gcore.c (MAX_COPY_BYTES): Define.
- (gcore_copy_callback): Use it to limit allocation.
-
-2006-10-19 Ulrich Weigand <uweigand@de.ibm.com>
-
- * linux-thread-db.c (check_for_thread_db): Don't attempt to use
- thread_db for remote targets.
- * remote.c (remote_new_objfile): Always call predecessor on
- new_objfile event chain.
-
-2006-10-19 Joel Brobecker <brobecker@adacore.com>
-
- * solib.c (libpthread_solib_p): New function.
- (solib_add): Always read the symbols from the libpthread library.
-
-2006-10-19 Andrew Stubbs <andrew.stubbs@st.com>
-
- * breakpoint.c (describe_other_breakpoints): Add thread parameter.
- Annotate display with thread number where appropriate.
- (create_breakpoints): Add thread parameter to call to
- describe_other_breakpoints.
-
-2006-10-18 Jim Blandy <jimb@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
-
- * utils.c (query): Use defaulted_query.
- (defaulted_query): Handle having no default answer. Print out
- messages even if we have no terminal. Prevent memory corruption.
-
-2006-10-18 Daniel Jacobowitz <dan@codesourcery.com>
-
- * frame.c (struct frame_info): Add stop_reason.
- (get_prev_frame_1): Set stop_reason. Don't call error for
- stop reasons.
- (get_frame_unwind_stop_reason, frame_stop_reason_string): New.
- * frame.h (enum unwind_stop_reason): New.
- (get_frame_unwind_stop_reason, frame_stop_reason_string): New
- prototypes.
- * stack.c (frame_info): Print the stop reason.
- (backtrace_command_1): Print the stop reason for errors.
-
-2006-10-18 Daniel Jacobowitz <dan@codesourcery.com>
-
- * inferior.h (start_remote): Update prototype.
- * infrun.c (start_remote): Take FROM_TTY. Call
- post_create_inferior.
- * monitor.c (monitor_open): Update call to start_remote.
- * remote-sds.c (sds_start_remote, sds_open): Likewise.
- * remote.c (remote_start_remote): Likewise.
- (remote_start_remote_dummy): Removed.
- (remote_open): Update call to remote_start_remote. Do not call
- post_create_inferior here.
-
-2006-10-18 Daniel Jacobowitz <dan@codesourcery.com>
-
- * solib-svr4.c (debug_loader_offset_p, debug_loader_offset)
- (debug_loader_name, svr4_default_sos): New.
- (svr4_current_sos): Call svr4_default_sos.
- (enable_break): Add a comment about AT_BASE. Set the new
- variables and retry solib_add.
- (svr4_clear_solib): Clear the new variables.
-
-2006-10-18 Daniel Jacobowitz <dan@codesourcery.com>
-
- * NEWS: Mention support for TLS without debugging information.
-
-2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
-
- * remote-sim.c (gdbsim_kill): Call target_mourn_inferior.
- (gdbsim_load): Don't bother to adjust inferior_ptid here.
- (gdbsim_create_inferior): Mark the simulator as running.
- (gdbsim_open): Don't bother fetching registers. Mark
- the target as not running.
- (gdbsim_xfer): When the program is not running, pass memory
- requests down.
- (gdbsim_mourn_inferior): Mark the target as not running.
- * target.c (target_mark_running, target_mark_exited): New.
- * target.h (target_has_execution): Update the comment.
- (target_mark_running, target_mark_exited): New prototypes.
-
-2006-10-17 Joel Brobecker <brobecker@adacore.com>
-
- * breakpoint.c (free_valchain): Minor reformatting.
-
-2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
-
- * solib-svr4.c (LM_ADDR_CHECK): Suggest shared library mismatch.
-
-2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
-
- * Makefile.in (symtab.o): Update.
- * symtab.h (matching_bfd_sections): New prototype.
- * symtab.c (matching_bfd_sections): New.
- (find_pc_sect_psymbol, find_pc_sect_symtab): Use it.
- * minsyms.c (lookup_minimal_symbol_by_pc_section): Likewise.
- * printcmd.c (sym_info): Ignore separate debug objfiles.
-
-2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
-
- * remote.c (remote_pid_to_str): Capitalize "Thread".
-
-2006-10-15 Daniel Jacobowitz <dan@codesourcery.com>
-
- PR remote/2158
- * remote.c (remote_write_bytes): Throttle packet alignment
- for small packets.
-
-2006-10-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * linux-thread-db.c (thread_db_wait): Don't bother continuing if
- the wait result indicates the program terminated with a
- signal (from gdb-6.3-ia64-sigill-20051115.patch, a patch for
- Fedora Core 5).
-
-2006-10-11 Daniel Jacobowitz <dan@codesourcery.com>
-
- * dwarf2read.c (dwarf_decode_lines): Call record_line upon
- encountering a different subfile.
-
-2006-10-11 Denis Pilat <denis.pilat@st.com>
-
- * tui/tui-source.c (tui_set_source_content): handle source
- files that contain non unix end-of-line.
-
-2006-10-10 Daniel Jacobowitz <dan@codesourcery.com>
-
- * ser-mingw.c (free_pipe_state, pipe_wait_handle): Update
- for changes to pipe_select_thread.
- (pipe_done_wait_handle): New.
- (_initialize_ser_windows): Reference it.
-
-2006-10-09 Jan Kratochvil <jan.kratochvil@redhat.com>
- Daniel Jacobowitz <dan@codesourcery.com>
-
- * Makefile.in (expprint.o, parse.o, target.o): Update.
- * dwarf2loc.c (dwarf_expr_tls_address): Move body to
- target_translate_tls_address. Call it.
- * eval.c (evaluate_subexp_standard): Handle UNOP_MEMVAL_TLS.
- * expprint.c (print_subexp_standard): Likewise.
- (op_name_standard, dump_subexp_body_standard): Likewise.
- * expression.h (enum exp_opcode): Add UNOP_MEMVAL_TLS.
- (union exp_element): Add objfile.
- * parse.c (write_exp_elt_objfile): New function.
- (msym_tls_symbol_type): New.
- (write_exp_msymbol): Handle TLS.
- (operator_length_standard): Handle UNOP_MEMVAL_TLS.
- (build_parse): Initialize msym_tls_symbol_type.
- * parser-defs.h (write_exp_elt_objfile): New prototype.
- * target.c (target_translate_tls_address): New.
- * target.h (target_translate_tls_address): Add prototype.
-
-2006-10-09 Jan Kratochvil <jan.kratochvil@redhat.com>
-
- * solib.c (solib_open): Handle an empty solib_absolute_prefix like a
- missing one.
-
-2006-10-09 Daniel Jacobowitz <dan@codesourcery.com>
-
- * solib.c (solib_read_symbols): Stop if the file was not found.
-
-2006-10-09 Paul Pluzhnikov <ppluzhnikov@charter.net>
-
- PR c++/2116
- * valops.c (find_overload_match): Check for a NULL name.
-
-2006-10-06 Joel Brobecker <brobecker@adacore.com>
-
- Fix PR symtab/2018
- * dwarf2read.c (read_array_type): Set the type name if the name
- attribute is present.
-
-2006-10-05 Joel Brobecker <brobecker@adacore.com>
-
- * blockframe.c (block_innermost_frame): Rewrite frame search logic.
-
-2006-10-05 Daniel Jacobowitz <dan@codesourcery.com>
-
- * Makefile.in (gdb_expat_h): New.
- (xml_support_h): Add gdb_expat.h dependency.
- (memory-map.o, xml-support.o): Likewise.
- * gdb_expat.h: New file.
- * xml-support.h: Include it.
- * memory-map.c, xml-support.c: Likewise. Remove XML_STATUS_OK
- definitions.
-
-2006-10-05 Daniel Jacobowitz <dan@codesourcery.com>
-
- * remote.c (get_remote_state_raw): Renamed from get_remote_state.
- (get_remote_state): New function.
- (init_remote_state, _initialize_remote): Use get_remote_state_raw.
-
-2006-10-04 Fred Fish <fnf@specifix.com>
-
- * vec.c: Include defs.h first. This pulls in config.h which can
- affect other includes.
-
-2006-10-04 Joel Brobecker <brobecker@adacore.com>
-
- * somread.c (som_symtab_read): Avoid using alloca for potentially
- large buffers.
-
-2006-10-04 Daniel Jacobowitz <dan@codesourcery.com>
-
- * arch-utils.h (gdbarch_info_fill): Remove duplicate prototype.
-
-2006-10-03 Daniel Jacobowitz <dan@codesourcery.com>
-
- * memory-map.c (XML_STATUS_OK, XML_STATUS_ERROR): Provide default
- definitions.
- * xml-support.c (XML_STATUS_OK, XML_STATUS_ERROR): Likewise.
-
-2006-09-22 Daniel Jacobowitz <dan@codesourcery.com>
-
- * remote.c (remote_write_bytes_aux): Doc fix.
-
-2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
-
- * Makefile.in (SFILES): Add target-memory.c.
- (COMMON_OBS): Add target-memory.o.
- * memattr.c (lookup_mem_region): Adjust handling for
- the top of memory. Improve comments.
- * remote.c (packet_check_result): New function, split out
- from packet_ok. Recognize "E." as an error prefix.
- (packet_ok): Use it.
- (remote_write_bytes_aux): New function, renamed from
- remote_write_bytes. Take packet header, packet format,
- and length flag as arguments.
- (remote_write_bytes): Rewrite to use remote_write_bytes_aux.
- (remote_send_printf, restore_remote_timeout)
- (remote_flash_timeout, remote_flash_erase, remote_flash_write)
- (remote_flash_done): New.
- (remote_xfer_partial): Handle flash writes.
- (init_remote_ops, init_remote_async_ops): Set to_flash_erase
- and to_flash_done.
- * symfile.c (struct load_section_data): Include a pointer to
- the cumulative stats and a request queue. Move most members
- to other types.
- (struct load_progress_data, struct load_progress_section_data): New
- types.
- (load_progress): Handle a NULL baton and zero bytes. Update for
- type changes.
- (load_section_callback): Create memory write requests instead of
- writing to memory. Don't print the progress message here.
- (clear_memory_write_data): New function.
- (generic_load): Use target_write_memory_blocks.
- * target-memory.c: New file.
- * target.c (update_current_target): Mention new uninherited methods.
- (memory_xfer_partial): Issue an error for flash writes.
- (target_flash_erase, target_flash_done): New functions.
- (target_write_with_progress): Call the progress callback at the
- start also.
- * target.h (enum target_object): Add TARGET_OBJECT_FLASH.
- (target_write_with_progress): Update comment.
- (struct target_ops): Add to_flash_erase and to_flash_done.
- (target_flash_erase, target_flash_done, struct memory_write_request)
- (memory_write_request_s, enum flash_preserve_mode)
- (target_write_memory_blocks): New, including a vector type
- for memory_write_request_s.
-
-2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
- Nathan Sidwell <nathan@codesourcery.com>
-
- * Makefile.in (SFILES): Add memory-map.c and xml-support.c.
- (memory_map_h, xml_support_h): New.
- (target_h): Add vec_h dependency.
- (COMMON_OBS): Add memory-map.o and xml-support.o.
- (memory-map.o, xml-support.o): New rules.
- (remote.o): Update.
- * exceptions.h (enum errors): Add XML_PARSE_ERROR.
- * infcmd.c (run_command_1, attach_command): Call target_pre_inferior.
- * memattr.c (default_mem_attrib): Initialize blocksize.
- (target_mem_region_list, mem_use_target)
- (target_mem_regions_valid, mem_region_cmp, mem_region_init)
- (require_user_regions, require_target_regions)
- (invalidate_target_mem_regions): New.
- (create_mem_region): Use mem_region_init.
- (mem_clear): Move higher.
- (lookup_mem_region): Use require_target_regions.
- (mem_command): Implement "mem auto".
- (mem_info_command): Handle target-supplied regions and flash
- attributes.
- (mem_enable_command, mem_disable_command, mem_delete_command): Use
- require_user_regions.
- (_initialize_mem): Mention "mem auto" in help.
- * memattr.h (enum mem_access_mode): Add MEM_FLASH.
- (struct mem_attrib): Add blocksize.
- (invalidate_target_mem_regions, mem_region_init, mem_region_cmp): New
- prototypes.
- * remote.c: Include "memory-map.h".
- (PACKET_qXfer_memory_map): New enum value.
- (remote_protocol_features): Add qXfer:memory-map:read.
- (remote_xfer_partial): Handle memory maps.
- (remote_memory_map): New.
- (init_remote_ops, init_remote_async_ops): Set to_memory_map.
- (_initialize_remote): Register qXfer:memory-map:read.
- * target.c (update_current_target): Mention to_memory_map.
- (target_memory_map, target_pre_inferior): New.
- (target_preopen): Call target_pre_inferior.
- * target.h: Include "vec.h".
- (enum target_object): Add TARGET_OBJECT_MEMORY_MAP.
- (struct target_ops): Add to_memory_map.
- (target_memory_map, target_pre_inferior): New prototypes.
- * memory-map.c, memory-map.h, xml-support.c, xml-support.h: New files.
-
-2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
-
- * ada-lex.l (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int)
- (strtoulst): Moved to ...
- * utils.c (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int)
- (strtoulst): ... here. Enhanced to behave more similarly
- to strtoul.
- * defs.h (strtoulst): New prototype.
-
-2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
-
- * Makefile.in (memattr_h, memattr.o): Update.
- * memattr.h: Include "vec.h".
- (struct mem_region): Remove linked list pointer.
- (mem_region_s): New typedef and corresponding vector.
- * memattr.c: Include "vec.h".
- (mem_region_chain): Delete.
- (mem_region_list): New vector pointer.
- (mem_region_lessthan): New function.
- (create_mem_region): Remove unused return value. Use vector
- operations. Remove linear search.
- (delete_mem_region): Delete.
- (lookup_mem_region): Use vector operations. Add a FIXME.
- (mem_info_command): Update to work with vectors.
- (mem_enable, mem_enable_command, mem_disable, mem_disable_command)
- (mem_free, mem_delete): Likewise.
-
-2006-09-21 Nathan Sidwell <nathan@codesourcery.com>
-
- * vec.h: New file.
- * vec.c: New file.
- * Makefile.in (SFILES): Add vec.c.
- (vec_h): New.
- (COMMON_OBJS): Add vec.o.
- (vec.o): New target.
-
-2006-09-20 Daniel Jacobowitz <dan@codesourcery.com>
-
- PR remote/2154
- * remote.c (remote_thread_alive): Remove local buf.
- (remote_get_threadinfo): Remove local threadinfo_pkt.
- (remote_get_threadlist): Remove unused threadlist_packet.
- (remote_current_thread): Remove local buf.
- (remote_threads_info): Set bufp after getpkt.
- (remote_threads_extra_info): Remove local bufp.
- (get_offsets): Set buf after getpkt.
- (remote_check_symbols): Set reply after getpkt.
- (remote_vcont_probe): Set buf after getpkt.
- (remote_resume): Set buf after set_thread.
- (remote_wait, remote_async_wait): Set buf after getpkt.
- (fetch_register_using_p): Set buf after remote_send.
- (remote_fetch_registers): Likewise.
- (store_register_using_P): Don't use buf after remote_send.
- (check_binary_download, remote_write_bytes)
- (remote_read_bytes, remote_rcmd): Remove local buf.
-
-2006-09-17 Vladimir Prus <vladimir@codesourcery.com>
-
- * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Don't emit error
- if high requested frame number is larger than number of available
- frames.
-
-2006-09-16 Nick Roberts <nickrob@snap.net.nz>
-
- * linux-nat.c (linux_test_for_tracefork): Don't leave zombie
- process.
-
-2006-09-16 Andrzej Zaborowski <balrog@zabor.org>
-
- * interps.c (interpreter_exec_cmd): Restore interpreter properties.
-
-2006-09-10 Daniel Jacobowitz <dan@codesourcery.com>
-
- PR threads/2149
- * infrun.c (handle_inferior_event): Context switch after fork
- and exec events.
-
-2006-09-10 Daniel Jacobowitz <dan@codesourcery.com>
-
- * infcall.c (call_function_by_hand): Check for function pointer
- types.
-
-2006-09-10 Andreas Schwab <schwab@suse.de>
-
- * m68k-tdep.c (m68k_analyze_register_saves): Fix decoding of
- `move.l %R,-(%sp)'.
-
-2006-09-07 Vladimir Prus <vladimir@codesourcery.com>
-
- * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames): Don't emit
- error if high requested frame number is larger then number
- of available frames.
-
-2006-09-07 Joel Brobecker <brobecker@adacore.com>
-
- From Stephan Springl <springl-gdb@bfw-online.de>
- * fork-child.c (fork_inferior): Fix typo.
-
-2006-08-28 DJ Delorie <dj@redhat.com>
-
- * m32c-tdep.c (m32c_decode_srcdest4): Initialize fields in sd
- that may not be initialized elsewhere.
- (m32c_decode_sd23): Likewise.
-
2006-08-25 Daniel Jacobowitz <dan@codesourcery.com>
* buildsym.c (finish_block): Don't adjust the boundaries of
@@ -2423,7 +1879,6 @@
2006-03-27 Nick Roberts <nickrob@snap.net.nz>
- PR mi/1429
* varobj.c (c_name_of_child, c_value_of_child): Allow non-zero
offsets for languages like Fortran.
diff --git a/gdb/ChangeLog-2004 b/gdb/ChangeLog-2004
index 0481c1d..04eafd8 100644
--- a/gdb/ChangeLog-2004
+++ b/gdb/ChangeLog-2004
@@ -14085,7 +14085,6 @@
type and value for simple data types and just the name and type
for complex ones, if required.
- PR mi/1438
* mi/mi-cmd-var.c (mi_cmd_var_list_children): Print the values of the
children, if required.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index d28dc08..5d4b5fc 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -541,7 +541,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c \
language.c linespec.c \
m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c \
macrotab.c macroexp.c macrocmd.c macroscope.c main.c maint.c \
- mdebugread.c memattr.c mem-break.c minsyms.c mipsread.c memory-map.c \
+ mdebugread.c memattr.c mem-break.c minsyms.c mipsread.c \
nlmread.c \
objc-exp.y objc-lang.c \
objfiles.c osabi.c observer.c \
@@ -554,15 +554,14 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c \
solib.c solib-null.c source.c \
stabsread.c stack.c std-regs.c symfile.c symfile-mem.c symmisc.c \
symtab.c \
- target.c target-memory.c thread.c top.c tracepoint.c \
+ target.c thread.c top.c tracepoint.c \
trad-frame.c \
tramp-frame.c \
typeprint.c \
ui-out.c utils.c ui-file.h ui-file.c \
user-regs.c \
- valarith.c valops.c valprint.c value.c varobj.c vec.c \
- wrapper.c \
- xml-support.c
+ valarith.c valops.c valprint.c value.c varobj.c \
+ wrapper.c
LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
@@ -701,7 +700,6 @@ gdb_curses_h = gdb_curses.h
gdb_dirent_h = gdb_dirent.h
gdb_events_h = gdb-events.h
gdb_h = gdb.h
-gdb_expat_h = gdb_expat.h
gdb_locale_h = gdb_locale.h
gdb_obstack_h = gdb_obstack.h $(obstack_h)
gdb_proc_service_h = gdb_proc_service.h $(gregset_h)
@@ -749,12 +747,11 @@ macroscope_h = macroscope.h $(macrotab_h) $(symtab_h)
macrotab_h = macrotab.h
main_h = main.h
mdebugread_h = mdebugread.h $(coff_sym_h) $(coff_symconst_h)
-memattr_h = memattr.h $(vec_h)
+memattr_h = memattr.h
mips_linux_tdep_h = mips-linux-tdep.h
mips_mdebug_tdep_h = mips-mdebug-tdep.h
mipsnbsd_tdep_h = mipsnbsd-tdep.h
mips_tdep_h = mips-tdep.h
-memory_map_h = memory-map.h $(memattr_h)
mn10300_tdep_h = mn10300-tdep.h
monitor_h = monitor.h
nbsd_tdep_h = nbsd-tdep.h
@@ -804,7 +801,7 @@ stabsread_h = stabsread.h
stack_h = stack.h
symfile_h = symfile.h
symtab_h = symtab.h
-target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h) $(vec_h)
+target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h)
terminal_h = terminal.h
top_h = top.h
tracepoint_h = tracepoint.h
@@ -819,13 +816,10 @@ value_h = value.h $(doublest_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
$(expression_h)
varobj_h = varobj.h $(symtab_h) $(gdbtypes_h)
vax_tdep_h = vax-tdep.h
-vec_h = vec.h $(gdb_assert_h) $(gdb_string_h)
version_h = version.h
wince_stub_h = wince-stub.h
wrapper_h = wrapper.h $(gdb_h)
xcoffsolib_h = xcoffsolib.h
-xml_support_h = xml-support.h $(gdb_expat_h)
-xtensa_tdep_h = xtensa-tdep.h
#
# gdb/cli/ headers
@@ -947,7 +941,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
dwarf2expr.o dwarf2loc.o dwarf2-frame.o \
ada-lang.o c-lang.o f-lang.o objc-lang.o \
ui-out.o cli-out.o \
- varobj.o vec.o wrapper.o \
+ varobj.o wrapper.o \
jv-lang.o jv-valprint.o jv-typeprint.o \
m2-lang.o p-lang.o p-typeprint.o p-valprint.o \
scm-exp.o scm-lang.o scm-valprint.o \
@@ -966,7 +960,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
trad-frame.o \
tramp-frame.o \
solib.o solib-null.o \
- prologue-value.o memory-map.o xml-support.o target-memory.o
+ prologue-value.o
TSOBS = inflow.o
@@ -1501,8 +1495,7 @@ ALLDEPFILES = \
vax-nat.c vax-tdep.c vaxbsd-nat.c vaxnbsd-tdep.c \
win32-nat.c \
xcoffread.c xcoffsolib.c \
- xstormy16-tdep.c \
- xtensa-tdep.c xtensa-config.c
+ xstormy16-tdep.c
# Some files need explicit build rules (due to -Werror problems) or due
# to sub-directory fun 'n' games.
@@ -1984,7 +1977,7 @@ exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \
$(xcoffsolib_h) $(observer_h)
expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
$(value_h) $(language_h) $(parser_defs_h) $(user_regs_h) $(target_h) \
- $(gdb_string_h) $(block_h) $(objfiles_h)
+ $(gdb_string_h) $(block_h)
fbsd-nat.o: fbsd-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h) \
$(regset_h) $(gdb_assert_h) $(gdb_string_h) $(elf_bfd_h) \
$(fbsd_nat_h)
@@ -2333,7 +2326,7 @@ mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
$(bfd_h) $(coff_ecoff_h) $(libaout_h) $(aout_aout64_h) \
$(aout_stab_gnu_h) $(expression_h)
memattr.o: memattr.c $(defs_h) $(command_h) $(gdbcmd_h) $(memattr_h) \
- $(target_h) $(value_h) $(language_h) $(vec_h) $(gdb_string_h)
+ $(target_h) $(value_h) $(language_h) $(gdb_string_h)
mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \
$(target_h)
mingw-hdep.o: mingw-hdep.c $(defs_h) $(serial_h) $(gdb_assert_h) \
@@ -2377,8 +2370,6 @@ mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \
$(floatformat_h)
mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
$(regcache_h) $(gregset_h)
-memory-map.o: memory-map.c $(defs_h) $(memory_map_h) $(xml_support_h) \
- $(gdb_assert_h) $(exceptions_h) $(gdb_string_h) $(gdb_expat_h)
mn10300-linux-tdep.o: mn10300-linux-tdep.c $(defs_h) $(gdbcore_h) \
$(gdb_string_h) $(regcache_h) $(mn10300_tdep_h) $(gdb_assert_h) \
$(bfd_h) $(elf_bfd_h) $(osabi_h) $(regset_h) $(solib_svr4_h) \
@@ -2431,7 +2422,7 @@ osabi.o: osabi.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(osabi_h) \
parse.o: parse.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(frame_h) $(expression_h) $(value_h) $(command_h) $(language_h) \
$(f_lang_h) $(parser_defs_h) $(gdbcmd_h) $(symfile_h) $(inferior_h) \
- $(doublest_h) $(gdb_assert_h) $(block_h) $(source_h) $(objfiles_h)
+ $(doublest_h) $(gdb_assert_h) $(block_h) $(source_h)
p-exp.o: p-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \
$(parser_defs_h) $(language_h) $(p_lang_h) $(bfd_h) $(symfile_h) \
$(objfiles_h) $(block_h)
@@ -2508,7 +2499,7 @@ remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \
$(gdb_stabs_h) $(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) \
$(gdb_assert_h) $(event_loop_h) $(event_top_h) $(inf_loop_h) \
$(serial_h) $(gdbcore_h) $(remote_fileio_h) $(solib_h) $(observer_h) \
- $(cli_decode_h) $(cli_setshow_h) $(memory_map_h)
+ $(cli_decode_h) $(cli_setshow_h)
remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(gdbarch_h) \
$(inferior_h) $(target_h) $(value_h) $(command_h) $(gdb_string_h) \
$(exceptions_h) $(gdbcmd_h) $(serial_h) $(remote_utils_h) \
@@ -2756,13 +2747,10 @@ symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
$(language_h) $(demangle_h) $(inferior_h) $(linespec_h) $(source_h) \
$(filenames_h) $(objc_lang_h) $(ada_lang_h) $(hashtab_h) \
$(gdb_obstack_h) $(block_h) $(dictionary_h) $(gdb_string_h) \
- $(gdb_stat_h) $(cp_abi_h) $(observer_h) $(gdb_assert_h)
+ $(gdb_stat_h) $(cp_abi_h) $(observer_h)
target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \
$(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
- $(gdb_wait_h) $(dcache_h) $(regcache_h) $(gdb_assert_h) $(gdbcore_h) \
- $(exceptions_h)
-target-memory.o: target-memory.c $(defs_h) $(vec_h) $(target_h) \
- $(memory_map_h) $(gdb_assert_h)
+ $(gdb_wait_h) $(dcache_h) $(regcache_h) $(gdb_assert_h) $(gdbcore_h)
thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \
$(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(exceptions_h) \
$(command_h) $(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) \
@@ -2838,7 +2826,6 @@ vax-tdep.o: vax-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \
$(float_format_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
$(gdbcore_h) $(gdbtypes_h) $(osabi_h) $(regcache_h) $(regset_h) \
$(trad_frame_h) $(value_h) $(gdb_string_h) $(vax_tdep_h)
-vec.o: vec.c $(defs_h) $(vec_h)
win32-nat.o: win32-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
$(exceptions_h) $(gdbcore_h) $(command_h) $(completer_h) \
$(regcache_h) $(top_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
@@ -2858,23 +2845,11 @@ xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \
$(complaints_h) $(gdb_stabs_h) $(aout_stab_gnu_h)
xcoffsolib.o: xcoffsolib.c $(defs_h) $(bfd_h) $(xcoffsolib_h) $(inferior_h) \
$(gdbcmd_h) $(symfile_h) $(frame_h) $(gdb_regex_h)
-xml-support.o: xml-support.c $(defs_h) $(xml_support_h) $(exceptions_h) \
- $(gdb_string_h) $(gdb_expat_h)
xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(frame_h) $(frame_base_h) \
$(frame_unwind_h) $(dwarf2_frame_h) $(symtab_h) $(gdbtypes_h) \
$(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) $(inferior_h) \
$(gdb_string_h) $(gdb_assert_h) $(arch_utils_h) $(floatformat_h) \
$(regcache_h) $(doublest_h) $(osabi_h) $(objfiles_h)
-xtensa-linux-tdep.o: xtensa-linux-tdep.c $(defs_h) $(inferior_h) \
- $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) \
- $(xtensa_tdep_h) $(xtensa_linux_tdep_h)
-xtensa-tdep.o: xtensa-tdep.c $(defs_h) $(doublest_h) $(frame_h) \
- $(frame_unwind_h) $(frame_base_h) $(inferior_h) $(symtab_h) \
- $(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) $(symfile_h) \
- $(objfiles_h) $(gdb_string_h) $(linespec_h) $(regcache_h) \
- $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) $(gdb_assert_h) \
- $(elf_bfd_h) $(xtensa_tdep_h) $(dwarf2_frame_h)
-xtensa-config.o: $(defs_h) $(xtensa_tdep_h)
#
# gdb/cli/ dependencies
diff --git a/gdb/NEWS b/gdb/NEWS
index a8d1611..f54f75b 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,10 +3,6 @@
*** Changes since GDB 6.5
-* New targets
-
-Xtensa xtensa-elf
-
* GDB can now be configured as a cross-debugger targeting native Windows
(mingw32) or Cygwin. It can communicate with a remote debugging stub
running on a Windows system over TCP/IP to debug Windows programs.
@@ -18,9 +14,6 @@ supported.
* The "set trust-readonly-sections" command works again. This command was
broken in GDB 6.3, 6.4, and 6.5.
-* Support for GNU/Linux Thread Local Storage (TLS, per-thread variables) no
-longer requires symbolic debug information (e.g. DWARF-2).
-
* New commands
set substitute-path
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index 7ece109..b25264c 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -296,6 +296,68 @@ canonicalizeNumeral (char *s1, const char *s2)
s1[0] = '\000';
}
+#define HIGH_BYTE_POSN ((sizeof (ULONGEST) - 1) * HOST_CHAR_BIT)
+
+/* True (non-zero) iff DIGIT is a valid digit in radix BASE,
+ where 2 <= BASE <= 16. */
+
+static int
+is_digit_in_base (unsigned char digit, int base)
+{
+ if (!isxdigit (digit))
+ return 0;
+ if (base <= 10)
+ return (isdigit (digit) && digit < base + '0');
+ else
+ return (isdigit (digit) || tolower (digit) < base - 10 + 'a');
+}
+
+static int
+digit_to_int (unsigned char c)
+{
+ if (isdigit (c))
+ return c - '0';
+ else
+ return tolower (c) - 'a' + 10;
+}
+
+/* As for strtoul, but for ULONGEST results. */
+
+ULONGEST
+strtoulst (const char *num, const char **trailer, int base)
+{
+ unsigned int high_part;
+ ULONGEST result;
+ int i;
+ unsigned char lim;
+
+ if (base < 2 || base > 16)
+ {
+ errno = EINVAL;
+ return 0;
+ }
+ lim = base - 1 + '0';
+
+ result = high_part = 0;
+ for (i = 0; is_digit_in_base (num[i], base); i += 1)
+ {
+ result = result*base + digit_to_int (num[i]);
+ high_part = high_part*base + (unsigned int) (result >> HIGH_BYTE_POSN);
+ result &= ((ULONGEST) 1 << HIGH_BYTE_POSN) - 1;
+ if (high_part > 0xff)
+ {
+ errno = ERANGE;
+ result = high_part = 0;
+ break;
+ }
+ }
+
+ if (trailer != NULL)
+ *trailer = &num[i];
+
+ return result + ((ULONGEST) high_part << HIGH_BYTE_POSN);
+}
+
/* Interprets the prefix of NUM that consists of digits of the given BASE
as an integer of that BASE, with the string EXP as an exponent.
Puts value in yylval, and returns INT, if the string is valid. Causes
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index c1801c9..702743d 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -335,7 +335,24 @@ generic_instruction_nullified (struct gdbarch *gdbarch,
/* Functions to manipulate the endianness of the target. */
-static int target_byte_order_user = BFD_ENDIAN_UNKNOWN;
+/* ``target_byte_order'' is only used when non- multi-arch.
+ Multi-arch targets obtain the current byte order using the
+ TARGET_BYTE_ORDER gdbarch method.
+
+ The choice of initial value is entirely arbitrary. During startup,
+ the function initialize_current_architecture() updates this value
+ based on default byte-order information extracted from BFD. */
+static int target_byte_order = BFD_ENDIAN_BIG;
+static int target_byte_order_auto = 1;
+
+enum bfd_endian
+selected_byte_order (void)
+{
+ if (target_byte_order_auto)
+ return BFD_ENDIAN_UNKNOWN;
+ else
+ return target_byte_order;
+}
static const char endian_big[] = "big";
static const char endian_little[] = "little";
@@ -355,7 +372,7 @@ static void
show_endian (struct ui_file *file, int from_tty, struct cmd_list_element *c,
const char *value)
{
- if (target_byte_order_user != BFD_ENDIAN_UNKNOWN)
+ if (target_byte_order_auto)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
fprintf_unfiltered (file, _("The target endianness is set automatically "
"(currently big endian)\n"));
@@ -374,37 +391,31 @@ show_endian (struct ui_file *file, int from_tty, struct cmd_list_element *c,
static void
set_endian (char *ignore_args, int from_tty, struct cmd_list_element *c)
{
- struct gdbarch_info info;
-
- gdbarch_info_init (&info);
-
if (set_endian_string == endian_auto)
{
- target_byte_order_user = BFD_ENDIAN_UNKNOWN;
- if (! gdbarch_update_p (info))
- internal_error (__FILE__, __LINE__,
- _("set_endian: architecture update failed"));
+ target_byte_order_auto = 1;
}
else if (set_endian_string == endian_little)
{
+ struct gdbarch_info info;
+ target_byte_order_auto = 0;
+ gdbarch_info_init (&info);
info.byte_order = BFD_ENDIAN_LITTLE;
if (! gdbarch_update_p (info))
printf_unfiltered (_("Little endian target not supported by GDB\n"));
- else
- target_byte_order_user = BFD_ENDIAN_LITTLE;
}
else if (set_endian_string == endian_big)
{
+ struct gdbarch_info info;
+ target_byte_order_auto = 0;
+ gdbarch_info_init (&info);
info.byte_order = BFD_ENDIAN_BIG;
if (! gdbarch_update_p (info))
printf_unfiltered (_("Big endian target not supported by GDB\n"));
- else
- target_byte_order_user = BFD_ENDIAN_BIG;
}
else
internal_error (__FILE__, __LINE__,
_("set_endian: bad value"));
-
show_endian (gdb_stdout, from_tty, NULL, NULL);
}
@@ -412,14 +423,14 @@ set_endian (char *ignore_args, int from_tty, struct cmd_list_element *c)
enum set_arch { set_arch_auto, set_arch_manual };
-static const struct bfd_arch_info *target_architecture_user;
+static int target_architecture_auto = 1;
static const char *set_architecture_string;
const char *
selected_architecture_name (void)
{
- if (target_architecture_user == NULL)
+ if (target_architecture_auto)
return NULL;
else
return set_architecture_string;
@@ -434,7 +445,7 @@ show_architecture (struct ui_file *file, int from_tty,
{
const char *arch;
arch = TARGET_ARCHITECTURE->printable_name;
- if (target_architecture_user == NULL)
+ if (target_architecture_auto)
fprintf_filtered (file, _("\
The target architecture is set automatically (currently %s)\n"), arch);
else
@@ -449,25 +460,20 @@ The target architecture is assumed to be %s\n"), arch);
static void
set_architecture (char *ignore_args, int from_tty, struct cmd_list_element *c)
{
- struct gdbarch_info info;
-
- gdbarch_info_init (&info);
-
if (strcmp (set_architecture_string, "auto") == 0)
{
- target_architecture_user = NULL;
- if (!gdbarch_update_p (info))
- internal_error (__FILE__, __LINE__,
- _("could not select an architecture automatically"));
+ target_architecture_auto = 1;
}
else
{
+ struct gdbarch_info info;
+ gdbarch_info_init (&info);
info.bfd_arch_info = bfd_scan_arch (set_architecture_string);
if (info.bfd_arch_info == NULL)
internal_error (__FILE__, __LINE__,
_("set_architecture: bfd_scan_arch failed"));
if (gdbarch_update_p (info))
- target_architecture_user = info.bfd_arch_info;
+ target_architecture_auto = 0;
else
printf_unfiltered (_("Architecture `%s' not recognized.\n"),
set_architecture_string);
@@ -524,13 +530,6 @@ gdbarch_from_bfd (bfd *abfd)
struct gdbarch *new_gdbarch;
struct gdbarch_info info;
- /* If we call gdbarch_find_by_info without filling in info.abfd,
- then it will use the global exec_bfd. That's fine if we don't
- have one of those either. And that's the only time we should
- reach here with a NULL ABFD argument - when we are discarding
- the executable. */
- gdb_assert (abfd != NULL || exec_bfd == NULL);
-
gdbarch_info_init (&info);
info.abfd = abfd;
return gdbarch_find_by_info (info);
@@ -568,8 +567,6 @@ static const bfd_target *default_bfd_vec = &DEFAULT_BFD_VEC;
static const bfd_target *default_bfd_vec;
#endif
-static int default_byte_order = BFD_ENDIAN_UNKNOWN;
-
void
initialize_current_architecture (void)
{
@@ -580,7 +577,10 @@ initialize_current_architecture (void)
gdbarch_info_init (&info);
/* Find a default architecture. */
- if (default_bfd_arch == NULL)
+ if (info.bfd_arch_info == NULL
+ && default_bfd_arch != NULL)
+ info.bfd_arch_info = default_bfd_arch;
+ if (info.bfd_arch_info == NULL)
{
/* Choose the architecture by taking the first one
alphabetically. */
@@ -594,32 +594,30 @@ initialize_current_architecture (void)
if (chosen == NULL)
internal_error (__FILE__, __LINE__,
_("initialize_current_architecture: No arch"));
- default_bfd_arch = bfd_scan_arch (chosen);
- if (default_bfd_arch == NULL)
+ info.bfd_arch_info = bfd_scan_arch (chosen);
+ if (info.bfd_arch_info == NULL)
internal_error (__FILE__, __LINE__,
_("initialize_current_architecture: Arch not found"));
}
- info.bfd_arch_info = default_bfd_arch;
-
/* Take several guesses at a byte order. */
- if (default_byte_order == BFD_ENDIAN_UNKNOWN
+ if (info.byte_order == BFD_ENDIAN_UNKNOWN
&& default_bfd_vec != NULL)
{
/* Extract BFD's default vector's byte order. */
switch (default_bfd_vec->byteorder)
{
case BFD_ENDIAN_BIG:
- default_byte_order = BFD_ENDIAN_BIG;
+ info.byte_order = BFD_ENDIAN_BIG;
break;
case BFD_ENDIAN_LITTLE:
- default_byte_order = BFD_ENDIAN_LITTLE;
+ info.byte_order = BFD_ENDIAN_LITTLE;
break;
default:
break;
}
}
- if (default_byte_order == BFD_ENDIAN_UNKNOWN)
+ if (info.byte_order == BFD_ENDIAN_UNKNOWN)
{
/* look for ``*el-*'' in the target name. */
const char *chp;
@@ -627,16 +625,14 @@ initialize_current_architecture (void)
if (chp != NULL
&& chp - 2 >= target_name
&& strncmp (chp - 2, "el", 2) == 0)
- default_byte_order = BFD_ENDIAN_LITTLE;
+ info.byte_order = BFD_ENDIAN_LITTLE;
}
- if (default_byte_order == BFD_ENDIAN_UNKNOWN)
+ if (info.byte_order == BFD_ENDIAN_UNKNOWN)
{
/* Wire it to big-endian!!! */
- default_byte_order = BFD_ENDIAN_BIG;
+ info.byte_order = BFD_ENDIAN_BIG;
}
- info.byte_order = default_byte_order;
-
if (! gdbarch_update_p (info))
internal_error (__FILE__, __LINE__,
_("initialize_current_architecture: Selection of "
@@ -678,46 +674,48 @@ gdbarch_info_init (struct gdbarch_info *info)
}
/* Similar to init, but this time fill in the blanks. Information is
- obtained from the global "set ..." options and explicitly
- initialized INFO fields. */
+ obtained from the specified architecture, global "set ..." options,
+ and explicitly initialized INFO fields. */
void
-gdbarch_info_fill (struct gdbarch_info *info)
+gdbarch_info_fill (struct gdbarch *gdbarch, struct gdbarch_info *info)
{
- /* Check for the current file. */
- if (info->abfd == NULL)
- info->abfd = exec_bfd;
-
/* "(gdb) set architecture ...". */
if (info->bfd_arch_info == NULL
- && target_architecture_user)
- info->bfd_arch_info = target_architecture_user;
+ && !target_architecture_auto
+ && gdbarch != NULL)
+ info->bfd_arch_info = gdbarch_bfd_arch_info (gdbarch);
if (info->bfd_arch_info == NULL
&& info->abfd != NULL
&& bfd_get_arch (info->abfd) != bfd_arch_unknown
&& bfd_get_arch (info->abfd) != bfd_arch_obscure)
info->bfd_arch_info = bfd_get_arch_info (info->abfd);
- /* From the default. */
- if (info->bfd_arch_info == NULL)
- info->bfd_arch_info = default_bfd_arch;
+ if (info->bfd_arch_info == NULL
+ && gdbarch != NULL)
+ info->bfd_arch_info = gdbarch_bfd_arch_info (gdbarch);
/* "(gdb) set byte-order ...". */
if (info->byte_order == BFD_ENDIAN_UNKNOWN
- && target_byte_order_user != BFD_ENDIAN_UNKNOWN)
- info->byte_order = target_byte_order_user;
+ && !target_byte_order_auto
+ && gdbarch != NULL)
+ info->byte_order = gdbarch_byte_order (gdbarch);
/* From the INFO struct. */
if (info->byte_order == BFD_ENDIAN_UNKNOWN
&& info->abfd != NULL)
info->byte_order = (bfd_big_endian (info->abfd) ? BFD_ENDIAN_BIG
- : bfd_little_endian (info->abfd) ? BFD_ENDIAN_LITTLE
- : BFD_ENDIAN_UNKNOWN);
- /* From the default. */
- if (info->byte_order == BFD_ENDIAN_UNKNOWN)
- info->byte_order = default_byte_order;
+ : bfd_little_endian (info->abfd) ? BFD_ENDIAN_LITTLE
+ : BFD_ENDIAN_UNKNOWN);
+ /* From the current target. */
+ if (info->byte_order == BFD_ENDIAN_UNKNOWN
+ && gdbarch != NULL)
+ info->byte_order = gdbarch_byte_order (gdbarch);
/* "(gdb) set osabi ...". Handled by gdbarch_lookup_osabi. */
if (info->osabi == GDB_OSABI_UNINITIALIZED)
info->osabi = gdbarch_lookup_osabi (info->abfd);
+ if (info->osabi == GDB_OSABI_UNINITIALIZED
+ && gdbarch != NULL)
+ info->osabi = gdbarch_osabi (gdbarch);
/* Must have at least filled in the architecture. */
gdb_assert (info->bfd_arch_info != NULL);
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index 1fec80f..ae2d8f5 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -126,6 +126,10 @@ extern int generic_instruction_nullified (struct gdbarch *gdbarch,
extern int legacy_register_sim_regno (int regnum);
+/* Return the selected byte order, or BFD_ENDIAN_UNKNOWN if no byte
+ order was explicitly selected. */
+extern enum bfd_endian selected_byte_order (void);
+
/* Return the selected architecture's name, or NULL if no architecture
was explicitly selected. */
extern const char *selected_architecture_name (void);
@@ -135,11 +139,14 @@ extern const char *selected_architecture_name (void);
information and fills in any unspecified fields. */
extern void gdbarch_info_init (struct gdbarch_info *info);
+extern void gdbarch_info_fill (struct gdbarch *gdbarch,
+ struct gdbarch_info *info);
/* Similar to init, but this time fill in the blanks. Information is
- obtained from the global "set ..." options and explicitly
- initialized INFO fields. */
-extern void gdbarch_info_fill (struct gdbarch_info *info);
+ obtained from the specified architecture, global "set ..." options,
+ and explicitly initialized INFO fields. */
+extern void gdbarch_info_fill (struct gdbarch *gdbarch,
+ struct gdbarch_info *info);
/* Return the architecture for ABFD. If no suitable architecture
could be find, return NULL. */
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index eaa089f..a8c00d8 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -1046,7 +1046,7 @@ arm_unwind_pc (struct gdbarch *gdbarch, struct frame_info *this_frame)
{
CORE_ADDR pc;
pc = frame_unwind_register_unsigned (this_frame, ARM_PC_REGNUM);
- return arm_addr_bits_remove (pc);
+ return IS_THUMB_ADDR (pc) ? UNMAKE_THUMB_ADDR (pc) : pc;
}
static CORE_ADDR
@@ -2635,7 +2635,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case EF_ARM_EABI_VER4:
- case EF_ARM_EABI_VER5:
arm_abi = ARM_ABI_AAPCS;
/* EABI binaries default to VFP float ordering. */
if (fp_model == ARM_FLOAT_AUTO)
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 8dfa006..ba298c3 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -358,15 +358,14 @@ block_innermost_frame (struct block *block)
start = BLOCK_START (block);
end = BLOCK_END (block);
- frame = get_current_frame ();
- while (frame != NULL)
+ frame = NULL;
+ while (1)
{
+ frame = get_prev_frame (frame);
+ if (frame == NULL)
+ return NULL;
calling_pc = get_frame_address_in_block (frame);
if (calling_pc >= start && calling_pc < end)
return frame;
-
- frame = get_prev_frame (frame);
}
-
- return NULL;
}
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 92102ce..95ab4f9 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -102,7 +102,7 @@ static void breakpoint_adjustment_warning (CORE_ADDR, CORE_ADDR, int, int);
static CORE_ADDR adjust_breakpoint_address (CORE_ADDR bpaddr,
enum bptype bptype);
-static void describe_other_breakpoints (CORE_ADDR, asection *, int);
+static void describe_other_breakpoints (CORE_ADDR, asection *);
static void breakpoints_info (char *, int);
@@ -749,8 +749,7 @@ insert_catchpoint (struct ui_out *uo, void *args)
/* Helper routine: free the value chain for a breakpoint (watchpoint). */
-static void
-free_valchain (struct bp_location *b)
+static void free_valchain (struct bp_location *b)
{
struct value *v;
struct value *n;
@@ -3782,7 +3781,7 @@ maintenance_info_breakpoints (char *bnum_exp, int from_tty)
/* Print a message describing any breakpoints set at PC. */
static void
-describe_other_breakpoints (CORE_ADDR pc, asection *section, int thread)
+describe_other_breakpoints (CORE_ADDR pc, asection *section)
{
int others = 0;
struct breakpoint *b;
@@ -3802,16 +3801,12 @@ describe_other_breakpoints (CORE_ADDR pc, asection *section, int thread)
if (!b->pending && (!overlay_debugging || b->loc->section == section))
{
others--;
- printf_filtered ("%d", b->number);
- if (b->thread == -1 && thread != -1)
- printf_filtered (" (all threads)");
- else if (b->thread != -1)
- printf_filtered (" (thread %d)", b->thread);
- printf_filtered ("%s%s ",
+ printf_filtered ("%d%s%s ",
+ b->number,
((b->enable_state == bp_disabled ||
b->enable_state == bp_shlib_disabled ||
b->enable_state == bp_call_disabled)
- ? " (disabled)"
+ ? " (disabled)"
: b->enable_state == bp_permanent
? " (permanent)"
: ""),
@@ -4964,7 +4959,7 @@ create_breakpoints (struct symtabs_and_lines sals, char **addr_string,
struct symtab_and_line sal = sals.sals[i];
if (from_tty)
- describe_other_breakpoints (sal.pc, sal.section, thread);
+ describe_other_breakpoints (sal.pc, sal.section);
b = set_raw_breakpoint (sal, type);
set_breakpoint_count (breakpoint_count + 1);
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 5359ed4..fdff394 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -122,10 +122,6 @@ struct cmd_list_element *stoplist;
struct cmd_list_element *deletelist;
-/* Chain containing all defined detach subcommands. */
-
-struct cmd_list_element *detachlist;
-
/* Chain containing all defined "enable breakpoint" subcommands. */
struct cmd_list_element *enablebreaklist;
@@ -1093,7 +1089,6 @@ init_cmd_lists (void)
togglelist = NULL;
stoplist = NULL;
deletelist = NULL;
- detachlist = NULL;
enablebreaklist = NULL;
setlist = NULL;
unsetlist = NULL;
diff --git a/gdb/cli/cli-cmds.h b/gdb/cli/cli-cmds.h
index 6d97b19..228e6aa 100644
--- a/gdb/cli/cli-cmds.h
+++ b/gdb/cli/cli-cmds.h
@@ -1,5 +1,5 @@
/* Header file for GDB CLI command implementation library.
- Copyright (c) 2000,2006 Free Software Foundation, Inc.
+ Copyright (c) 2000 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
@@ -39,10 +39,6 @@ extern struct cmd_list_element *disablelist;
extern struct cmd_list_element *deletelist;
-/* Chain containing all defined detach subcommands. */
-
-extern struct cmd_list_element *detachlist;
-
/* Chain containing all defined toggle subcommands. */
extern struct cmd_list_element *togglelist;
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 861d12a..20309e9 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -46,11 +46,6 @@ static struct cmd_list_element *find_cmd (char *command,
int *nfound);
static void help_all (struct ui_file *stream);
-
-static void
-print_help_for_command (struct cmd_list_element *c, char *prefix, int recurse,
- struct ui_file *stream);
-
/* Set the callback function for the specified command. For each both
the commands callback and func() are set. The latter set to a
@@ -692,8 +687,14 @@ apropos_cmd (struct ui_file *stream, struct cmd_list_element *commandlist,
returnvalue=re_search(regex,c->name,strlen(c->name),0,strlen(c->name),NULL);
if (returnvalue >= 0)
{
- print_help_for_command (c, prefix,
- 0 /* don't recurse */, stream);
+ /* Stolen from help_cmd_list. We don't directly use
+ * help_cmd_list because it doesn't let us print out
+ * single commands
+ */
+ fprintf_filtered (stream, "%s%s -- ", prefix, c->name);
+ print_doc_line (stream, c->doc);
+ fputs_filtered ("\n", stream);
+ returnvalue=0; /*Set this so we don't print it again.*/
}
}
if (c->doc != NULL && returnvalue != 0)
@@ -701,8 +702,13 @@ apropos_cmd (struct ui_file *stream, struct cmd_list_element *commandlist,
/* Try to match against documentation */
if (re_search(regex,c->doc,strlen(c->doc),0,strlen(c->doc),NULL) >=0)
{
- print_help_for_command (c, prefix,
- 0 /* don't recurse */, stream);
+ /* Stolen from help_cmd_list. We don't directly use
+ * help_cmd_list because it doesn't let us print out
+ * single commands
+ */
+ fprintf_filtered (stream, "%s%s -- ", prefix, c->name);
+ print_doc_line (stream, c->doc);
+ fputs_filtered ("\n", stream);
}
}
/* Check if this command has subcommands */
@@ -839,9 +845,6 @@ Type \"help%s\" followed by a class name for a list of commands in ",
cmdtype1);
wrap_here ("");
fprintf_filtered (stream, "that class.");
-
- fprintf_filtered (stream, "\n\
-Type \"help all\" for the list of all commands.");
}
fprintf_filtered (stream, "\nType \"help%s\" followed by %scommand name ",
@@ -852,8 +855,6 @@ Type \"help all\" for the list of all commands.");
fputs_filtered ("full ", stream);
wrap_here ("");
fputs_filtered ("documentation.\n", stream);
- fputs_filtered ("Type \"apropos word\" to search "
- "for commands related to \"word\".\n", stream);
fputs_filtered ("Command name abbreviations are allowed if unambiguous.\n",
stream);
}
@@ -863,41 +864,19 @@ help_all (struct ui_file *stream)
{
struct cmd_list_element *c;
extern struct cmd_list_element *cmdlist;
- int seen_unclassified = 0;
for (c = cmdlist; c; c = c->next)
{
if (c->abbrev_flag)
continue;
+ /* If this is a prefix command, print it's subcommands */
+ if (c->prefixlist)
+ help_cmd_list (*c->prefixlist, all_commands, c->prefixname, 0, stream);
+
/* If this is a class name, print all of the commands in the class */
-
- if (c->func == NULL)
- {
- fprintf_filtered (stream, "\nCommand class: %s\n\n", c->name);
- help_cmd_list (cmdlist, c->class, "", 1, stream);
- }
+ else if (c->func == NULL)
+ help_cmd_list (cmdlist, c->class, "", 0, stream);
}
-
- /* While it's expected that all commands are in some class,
- as a safety measure, we'll print commands outside of any
- class at the end. */
-
- for (c = cmdlist; c; c = c->next)
- {
- if (c->abbrev_flag)
- continue;
-
- if (c->class == no_class)
- {
- if (!seen_unclassified)
- {
- fprintf_filtered (stream, "\nUnclassified commands\n\n");
- seen_unclassified = 1;
- }
- print_help_for_command (c, "", 1, stream);
- }
- }
-
}
/* Print only the first line of STR on STREAM. */
@@ -930,26 +909,6 @@ print_doc_line (struct ui_file *stream, char *str)
ui_out_text (uiout, line_buffer);
}
-/* Print one-line help for command C.
- If RECURSE is non-zero, also print one-line descriptions
- of all prefixed subcommands. */
-static void
-print_help_for_command (struct cmd_list_element *c, char *prefix, int recurse,
- struct ui_file *stream)
-{
- fprintf_filtered (stream, "%s%s -- ", prefix, c->name);
- print_doc_line (stream, c->doc);
- fputs_filtered ("\n", stream);
-
- if (recurse
- && c->prefixlist != 0
- && c->abbrev_flag == 0)
- /* Subcommands of a prefix command typically have 'all_commands'
- as class. If we pass CLASS to recursive invocation,
- most often we won't see anything. */
- help_cmd_list (*c->prefixlist, all_commands, c->prefixname, 1, stream);
-}
-
/*
* Implement a help command on command list LIST.
* RECURSE should be non-zero if this should be done recursively on
@@ -973,14 +932,20 @@ help_cmd_list (struct cmd_list_element *list, enum command_class class,
struct cmd_list_element *c;
for (c = list; c; c = c->next)
- {
+ {
if (c->abbrev_flag == 0 &&
(class == all_commands
|| (class == all_classes && c->func == NULL)
|| (class == c->class && c->func != NULL)))
{
- print_help_for_command (c, prefix, recurse, stream);
+ fprintf_filtered (stream, "%s%s -- ", prefix, c->name);
+ print_doc_line (stream, c->doc);
+ fputs_filtered ("\n", stream);
}
+ if (recurse
+ && c->prefixlist != 0
+ && c->abbrev_flag == 0)
+ help_cmd_list (*c->prefixlist, class, c->prefixname, 1, stream);
}
}
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index c63c183..ac8bdb7 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -405,17 +405,14 @@ cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
/* Close the tuple. */
do_cleanups (optionlist_chain);
}
- else
+ if (list->type == show_cmd)
{
struct cleanup *option_chain
= make_cleanup_ui_out_tuple_begin_end (uiout, "option");
ui_out_text (uiout, prefix);
ui_out_field_string (uiout, "name", list->name);
ui_out_text (uiout, ": ");
- if (list->type == show_cmd)
- do_setshow_command ((char *) NULL, from_tty, list);
- else
- cmd_func (list, NULL, from_tty);
+ do_setshow_command ((char *) NULL, from_tty, list);
/* Close the tuple. */
do_cleanups (option_chain);
}
diff --git a/gdb/command.h b/gdb/command.h
index 44845fc..ec9c651 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -30,7 +30,7 @@
enum command_class
{
/* Special args to help_list */
- class_deprecated = -3, all_classes = -2, all_commands = -1,
+ class_deprecated, all_classes = -2, all_commands = -1,
/* Classes of commands */
no_class = -1, class_run = 0, class_vars, class_stack,
class_files, class_support, class_info, class_breakpoint, class_trace,
diff --git a/gdb/config/xtensa/xtensa.mt b/gdb/config/xtensa/xtensa.mt
deleted file mode 100644
index e87f98a..0000000
--- a/gdb/config/xtensa/xtensa.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-# Target: Tensilica Xtensa processors
-TDEPFILES= xtensa-tdep.o xtensa-config.o
diff --git a/gdb/configure.host b/gdb/configure.host
index bbfe498..24a3447 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -28,7 +28,6 @@ sh*) gdb_host_cpu=sh ;;
x86_64*) gdb_host_cpu=i386 ;;
xscale*) gdb_host_cpu=arm ;;
m32r*) gdb_host_cpu=m32r ;;
-xtensa*) gdb_host_cpu=xtensa ;;
*) gdb_host_cpu=$host_cpu ;;
esac
@@ -157,8 +156,6 @@ x86_64-*-openbsd*) gdb_host=obsd64 ;;
m32r*-*-linux*) gdb_host=linux ;;
-xtensa*-*-linux*) gdb_host=linux ;;
-
esac
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 45ff7e2..0e1911d 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -28,7 +28,6 @@ sh*) gdb_target_cpu=sh ;;
strongarm*) gdb_target_cpu=arm ;;
xscale*) gdb_target_cpu=arm ;;
x86_64*) gdb_target_cpu=i386 ;;
-xtensa*) gdb_target_cpu=xtensa ;;
*) gdb_target_cpu=$target_cpu ;;
esac
@@ -225,8 +224,6 @@ x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
gdb_target=nbsd64 ;;
x86_64-*-openbsd*) gdb_target=obsd64 ;;
-xtensa*) gdb_target=xtensa ;;
-
esac
# map target onto default OS ABI
diff --git a/gdb/defs.h b/gdb/defs.h
index f7dfbac..c9d5504 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -415,8 +415,6 @@ extern char *xfullpath (const char *);
extern unsigned long gnu_debuglink_crc32 (unsigned long crc,
unsigned char *buf, size_t len);
-ULONGEST strtoulst (const char *num, const char **trailer, int base);
-
/* From demangle.c */
extern void set_demangling_style (char *);
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 97f5018..f89a736 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,120 +1,3 @@
-2006-11-14 Maxim Grigoriev <maxim@tensilica.com>
-
- * gdb.texinfo (Contributors): Add contributors of Xtensa port.
-
-2006-11-14 Daniel Jacobowitz <dan@codesourcery.com>
-
- * gdb.texinfo (Remote configuration): Rewrite documentation for
- packet configuration commands.
- (OS Information): Adjust reference to qXfer:auxv:read.
- (General Query Packets): Remove references to read-aux-vector-packet
- and set remote get-thread-local-storage-address.
-
-2006-11-10 Daniel Jacobowitz <dan@codesourcery.com>
-
- * gdbint.texinfo (Target Architecture Definition): Add new
- Initializing a New Architecture section.
-
-2006-10-31 David Taylor <dtaylor@emc.com>
-
- * stabs.texinfo (Macro define and undefine): New node describing
- stabs for #define and #undef.
-
-2006-10-27 Andreas Schwab <schwab@suse.de>
-
- * gdb.texinfo (Processes): Rename "detach-fork" to "detach fork".
-
-2006-10-21 Eli Zaretskii <eliz@gnu.org>
-
- * gdb.texinfo (Breakpoints, Set Watchpoints): Elaborate and
- clarify on the possible meanings of ``expression'' watched by
- watchpoints. Add indexing.
- (Prompting, Errors, Invalidation, Annotations for Running)
- (Source Annotations): Fix index entries by adding "annotation" to
- them, to discriminate from index entries that point to the more
- general topic descriptions.
-
-2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
-
- * gdbint.texinfo (Target Vector Definition): Move most
- content into Existing Targets. Add a menu.
- (Existing Targets): New section, moved from Target Vector
- Definition. Use @subsection.
- (Managing Execution State): New section.
-
-2006-10-16 Bob Wilson <bob.wilson@acm.org>
-
- * gdb.texinfo (ST2000): Use Ctrl- instead of C-.
-
-2006-10-15 Eli Zaretskii <eliz@gnu.org>
-
- * gdb.texinfo (Sample Session, Invocation, Quitting GDB)
- (Command Syntax, Signals, Backtrace, Connecting)
- (Remote configuration, Renesas Boards, Console I/O): Fix last
- change: use Ctrl- instead of C-, except wrt Emacs.
- (File-I/O Examples): Put Ctrl-c in @kbd.
- (Cygwin Native, File-I/O Overview, The Ctrl-C message)
- (Console I/O): Use @samp with Ctrl-.
- (Signals, Set Breaks, Set Watchpoints): Document optional
- arguments to `info signals' `handle', `info breakpoints', and
- `info watchpoints'.
-
-2006-10-14 Eli Zaretskii <eliz@gnu.org>
-
- * gdb.texinfo (Backtrace): Fix last change.
-
-2006-10-14 Nick Roberts <nickrob@snap.net.nz>
-
- * gdb.texinfo (Backtrace): Order correctly and add other cases.
-
-2006-10-10 Bob Wilson <bob.wilson@acm.org>
-
- * gdb.texinfo (Command Syntax, Connecting, Remote configuration)
- (Renesas Boards, ST2000, TUI Keys, TUI Single Key Mode)
- (TUI Commands, Emacs, Console I/O): Fix @key and @kbd usage.
-
-2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
-
- * gdb.texinfo (Packets): Document vFlashErase,
- vFlashWrite and vFlashDone packets.
- (General Query Packets): Document qXfer:memory-map:read.
- Add a new feature for qXfer:memory-map:read.
- (Memory map format): New section.
- (Target Commands): Mention that gdb can write flash.
-
-2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
-
- * gdb.texinfo (Memory Region Attributes): Mention target-supplied
- memory regions and "mem auto".
-
-2006-09-21 Nathan Sidwell <nathan@codesourcery.com>
-
- * gdbint.texinfo (Array Containers): New section.
-
-2006-09-17 Vladimir Prus <vladimir@codesourcery.com>
-
- * gdb.texinfo (GDB/MI Stack Manipulation): Mention that
- -stack-list-arguments HIGH_FRAME argument can be larger then the
- actual number of frames.
-
-2006-09-07 Vladimir Prus <vladimir@codesourcery.com>
-
- * gdb.texinfo (GDB/MI Stack Manipulation): Mention that
- -stack-list-locals HIGH_FRAME argument can be larger then the
- actual number of frames.
-
-2006-09-02 Bob Wilson <bob.wilson@acm.org>
-
- * gdb.texinfo (Packets, Stop Reply Packets, General Query Packets,
- Register Packet Format, Tracepoint Packets): Fix spelling errors.
-
-2006-09-02 Eli Zaretskii <eliz@gnu.org>
-
- * gdbint.texinfo (Overall Structure): New section "Source Tree
- Structure".
-
2006-08-17 Jim Blandy <jimb@codesourcery.com>
* gdb.texinfo (Stop Reply Packets): Note similarity of 'S' and 'T'
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 0491816..d87e42d 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -497,11 +497,6 @@ Jacobowitz, Jeff Johnston, Mark Kettenis, Theodore A. Roth, Kei
Sakamoto, Yoshinori Sato, Michael Snyder, Corinna Vinschen, and Ulrich
Weigand.
-Christian Zankel, Ross Morley, Bob Wilson, and Maxim Grigoriev from
-Tensilica, Inc.@: contributed support for Xtensa processors. Others
-who have worked on the Xtensa port of @value{GDBN} in the past include
-Steve Tjiang, John Newlin, and Scott Foehner.
-
@node Sample Session
@chapter A Sample @value{GDBN} Session
@@ -542,7 +537,7 @@ $ @b{./m4}
@b{define(baz,defn(<QUOTE>foo<UNQUOTE>))}
@b{baz}
-@b{Ctrl-d}
+@b{C-d}
m4: End of input: 0: fatal error: EOF in string
@end smallexample
@@ -759,7 +754,7 @@ problem seems to have been just the two typos defining the wrong
lengths. We allow @code{m4} exit by giving it an EOF as input:
@smallexample
-@b{Ctrl-d}
+@b{C-d}
Program exited normally.
@end smallexample
@@ -781,7 +776,7 @@ The essentials are:
@item
type @samp{@value{GDBP}} to start @value{GDBN}.
@item
-type @kbd{quit} or @kbd{Ctrl-d} to exit.
+type @kbd{quit} or @kbd{C-d} to exit.
@end itemize
@menu
@@ -1282,14 +1277,14 @@ CISCO 68k: @file{.cisco-gdbinit}
@item quit @r{[}@var{expression}@r{]}
@itemx q
To exit @value{GDBN}, use the @code{quit} command (abbreviated
-@code{q}), or type an end-of-file character (usually @kbd{Ctrl-d}). If you
+@code{q}), or type an end-of-file character (usually @kbd{C-d}). If you
do not supply @var{expression}, @value{GDBN} will terminate normally;
otherwise it will terminate using the result of @var{expression} as the
error code.
@end table
@cindex interrupt
-An interrupt (often @kbd{Ctrl-c}) does not exit from @value{GDBN}, but rather
+An interrupt (often @kbd{C-c}) does not exit from @value{GDBN}, but rather
terminates the action of any @value{GDBN} command that is in progress and
returns to @value{GDBN} command level. It is safe to type the interrupt
character at any time because @value{GDBN} does not allow it to take effect
@@ -1416,9 +1411,9 @@ nothing. This is useful mainly in command files (@pxref{Command
Files,,Command files}).
@cindex repeating command sequences
-@kindex Ctrl-o @r{(operate-and-get-next)}
-The @kbd{Ctrl-o} binding is useful for repeating a complex sequence of
-commands. This command accepts the current line, like @key{RET}, and
+@kindex C-o @r{(operate-and-get-next)}
+The @kbd{C-o} binding is useful for repeating a complex sequence of
+commands. This command accepts the current line, like @kbd{RET}, and
then fetches the next line relative to the current line from the history
for editing.
@@ -2579,13 +2574,13 @@ as shown in the first field of the @samp{info forks} display.
@end table
To quit debugging one of the forked processes, you can either detach
-from it by using the @w{@code{detach fork}} command (allowing it to
+from it by using the @w{@code{detach-fork}} command (allowing it to
run independently), or delete (and kill) it using the
@w{@code{delete fork}} command.
@table @code
-@kindex detach fork @var{fork-id}
-@item detach fork @var{fork-id}
+@kindex detach-fork @var{fork-id}
+@item detach-fork @var{fork-id}
Detach from the process identified by @value{GDBN} fork number
@var{fork-id}, and remove it from the fork list. The process will be
allowed to run independently.
@@ -2778,19 +2773,15 @@ in shared library routines that are not called directly by the program
call).
@cindex watchpoints
-@cindex data breakpoints
@cindex memory tracing
@cindex breakpoint on memory address
@cindex breakpoint on variable modification
A @dfn{watchpoint} is a special breakpoint that stops your program
-when the value of an expression changes. The expression may be a value
-of a variable, or it could involve values of one or more variables
-combined by operators, such as @samp{a + b}. This is sometimes called
-@dfn{data breakpoints}. You must use a different command to set
-watchpoints (@pxref{Set Watchpoints, ,Setting watchpoints}), but aside
-from that, you can manage a watchpoint like any other breakpoint: you
-enable, disable, and delete both breakpoints and watchpoints using the
-same commands.
+when the value of an expression changes. You must use a different
+command to set watchpoints (@pxref{Set Watchpoints, ,Setting
+watchpoints}), but aside from that, you can manage a watchpoint like
+any other breakpoint: you enable, disable, and delete both breakpoints
+and watchpoints using the same commands.
You can arrange to have values from your program displayed automatically
whenever @value{GDBN} stops at a breakpoint. @xref{Auto Display,,
@@ -2994,9 +2985,7 @@ The @code{rbreak} command can be used to set breakpoints in
@itemx info break @r{[}@var{n}@r{]}
@itemx info watchpoints @r{[}@var{n}@r{]}
Print a table of all breakpoints, watchpoints, and catchpoints set and
-not deleted. Optional argument @var{n} means print information only
-about the specified breakpoint (or watchpoint or catchpoint). For
-each breakpoint, following columns are printed:
+not deleted, with the following columns for each breakpoint:
@table @emph
@item Breakpoint Numbers
@@ -3115,24 +3104,7 @@ You can see these breakpoints with the @value{GDBN} maintenance command
@cindex setting watchpoints
You can use a watchpoint to stop execution whenever the value of an
expression changes, without having to predict a particular place where
-this may happen. (This is sometimes called a @dfn{data breakpoint}.)
-The expression may be as simple as the value of a single variable, or
-as complex as many variables combined by operators. Examples include:
-
-@itemize @bullet
-@item
-A reference to the value of a single variable.
-
-@item
-An address cast to an appropriate data type. For example,
-@samp{*(int *)0x12345678} will watch a 4-byte region at the specified
-address (assuming an @code{int} occupies 4 bytes).
-
-@item
-An arbitrarily complex expression, such as @samp{a*b + c/d}. The
-expression can use any operators valid in the program's native
-language (@pxref{Languages}).
-@end itemize
+this may happen.
@cindex software watchpoints
@cindex hardware watchpoints
@@ -3150,14 +3122,8 @@ watchpoints, which do not slow down the running of your program.
@table @code
@kindex watch
@item watch @var{expr}
-Set a watchpoint for an expression. @value{GDBN} will break when the
-expression @var{expr} is written into by the program and its value
-changes. The simplest (and the most popular) use of this command is
-to watch the value of a single variable:
-
-@smallexample
-(@value{GDBP}) watch foo
-@end smallexample
+Set a watchpoint for an expression. @value{GDBN} will break when @var{expr}
+is written into by the program and its value changes.
@kindex rwatch
@item rwatch @var{expr}
@@ -3169,7 +3135,7 @@ by the program.
Set a watchpoint that will break when @var{expr} is either read from
or written into by the program.
-@kindex info watchpoints @r{[}@var{n}@r{]}
+@kindex info watchpoints
@item info watchpoints
This command prints a list of watchpoints, breakpoints, and catchpoints;
it is the same as @code{info break} (@pxref{Set Breaks}).
@@ -3249,11 +3215,6 @@ Hardware watchpoint @var{num}: Could not insert watchpoint
@noindent
If this happens, delete or disable some of the watchpoints.
-Watching complex expressions that reference many variables can also
-exhaust the resources available for hardware-assisted watchpoints.
-That's because @value{GDBN} needs to watch every variable in the
-expression with separately allocated resources.
-
The SPARClite DSU will generate traps when a program accesses some data
or instruction address that is assigned to the debug registers. For the
data addresses, DSU facilitates the @code{watch} command. However the
@@ -4135,7 +4096,7 @@ An argument is a repeat count, as in @code{next}.
A signal is an asynchronous event that can happen in a program. The
operating system defines the possible kinds of signals, and gives each
kind a name and a number. For example, in Unix @code{SIGINT} is the
-signal a program gets when you type an interrupt character (often @kbd{Ctrl-c});
+signal a program gets when you type an interrupt character (often @kbd{C-c});
@code{SIGSEGV} is the signal a program gets from referencing a place in
memory far away from all the areas in use; @code{SIGALRM} occurs when
the alarm clock timer goes off (which happens only if your program has
@@ -4169,19 +4130,15 @@ Print a table of all the kinds of signals and how @value{GDBN} has been told to
handle each one. You can use this to see the signal numbers of all
the defined types of signals.
-@item info signals @var{sig}
-Similar, but print information only about the specified signal number.
-
@code{info handle} is an alias for @code{info signals}.
@kindex handle
-@item handle @var{signal} @r{[}@var{keywords}@dots{}@r{]}
+@item handle @var{signal} @var{keywords}@dots{}
Change the way @value{GDBN} handles signal @var{signal}. @var{signal}
can be the number of a signal or its name (with or without the
@samp{SIG} at the beginning); a list of signal numbers of the form
@samp{@var{low}-@var{high}}; or the word @samp{all}, meaning all the
-known signals. Optional arguments @var{keywords}, described below,
-say what change to make.
+known signals. The @var{keywords} say what change to make.
@end table
@c @group
@@ -4498,7 +4455,7 @@ Print a backtrace of the entire stack: one line per frame for all
frames in the stack.
You can stop the backtrace at any time by typing the system interrupt
-character, normally @kbd{Ctrl-c}.
+character, normally @kbd{C-c}.
@item backtrace @var{n}
@itemx bt @var{n}
@@ -4509,11 +4466,8 @@ Similar, but print only the innermost @var{n} frames.
Similar, but print only the outermost @var{n} frames.
@item backtrace full
+Print the values of the local variables also.
@itemx bt full
-@itemx bt full @var{n}
-@itemx bt full -@var{n}
-Print the values of the local variables also. @var{n} specifies the
-number of frames to print, as described above.
@end table
@kindex where
@@ -6745,8 +6699,8 @@ identified by an integer tag; the meanings are well-known but system-specific.
Depending on the configuration and operating system facilities,
@value{GDBN} may be able to show you this information. For remote
targets, this functionality may further depend on the remote stub's
-support of the @samp{qXfer:auxv:read} packet, see
-@ref{qXfer auxiliary vector read}.
+support of the @samp{qXfer:auxv:read} packet, see @ref{Remote
+configuration, auxiliary vector}.
@table @code
@kindex info auxv
@@ -6766,12 +6720,9 @@ an unrecognized tag.
@cindex memory region attributes
@dfn{Memory region attributes} allow you to describe special handling
-required by regions of your target's memory. @value{GDBN} uses
-attributes to determine whether to allow certain types of memory
-accesses; whether to use specific width accesses; and whether to cache
-target memory. By default the description of memory regions is
-fetched from the target (if the current target supports this), but the
-user can override the fetched regions.
+required by regions of your target's memory. @value{GDBN} uses attributes
+to determine whether to allow certain types of memory accesses; whether to
+use specific width accesses; and whether to cache target memory.
Defined memory regions can be individually enabled and disabled. When a
memory region is disabled, @value{GDBN} uses the default attributes when
@@ -6791,10 +6742,6 @@ monitored by @value{GDBN}. Note that @var{upper} == 0 is a special
case: it is treated as the the target's maximum memory address.
(0xffff on 16 bit targets, 0xffffffff on 32 bit targets, etc.)
-@item mem auto
-Discard any user changes to the memory regions and use target-supplied
-regions, if available, or no regions if the target does not support.
-
@kindex delete mem
@item delete mem @var{nums}@dots{}
Remove memory regions @var{nums}@dots{} from the list of regions
@@ -12337,9 +12284,6 @@ link the program; for other formats, like a.out, the object file format
specifies a fixed address.
@c FIXME! This would be a good place for an xref to the GNU linker doc.
-Depending on the remote side capabilities, @value{GDBN} may be able to
-load programs into flash memory.
-
@code{load} does not repeat if you press @key{RET} again after using it.
@end table
@@ -12516,7 +12460,7 @@ remote program.
@cindex interrupting remote programs
@cindex remote programs, interrupting
Whenever @value{GDBN} is waiting for the remote program, if you type the
-interrupt character (often @kbd{Ctrl-c}), @value{GDBN} attempts to stop the
+interrupt character (often @key{C-C}), @value{GDBN} attempts to stop the
program. This may or may not succeed, depending in part on the hardware
and the serial drivers the remote system uses. If you type the
interrupt character once again, @value{GDBN} displays this prompt:
@@ -12706,7 +12650,7 @@ Show the current speed of the remote connection.
@cindex BREAK signal instead of Ctrl-C
@anchor{set remotebreak}
If set to on, @value{GDBN} sends a @code{BREAK} signal to the remote
-when you type @kbd{Ctrl-c} to interrupt the program running
+when you press the @key{Ctrl-C} key to interrupt the program running
on the remote. If set to off, @value{GDBN} sends the @samp{Ctrl-C}
character instead. The default is off, since most remote systems
expect to see @samp{Ctrl-C} as the interrupt signal.
@@ -12765,83 +12709,133 @@ responses.
@itemx set remote hardware-breakpoint-limit @var{limit}
Restrict @value{GDBN} to using @var{limit} remote hardware breakpoint or
watchpoints. A limit of -1, the default, is treated as unlimited.
-@end table
-
-@cindex remote packets, enabling and disabling
-The @value{GDBN} remote protocol autodetects the packets supported by
-your debugging stub. If you need to override the autodetection, you
-can use these commands to enable or disable individual packets. Each
-packet can be set to @samp{on} (the remote target supports this
-packet), @samp{off} (the remote target does not support this packet),
-or @samp{auto} (detect remote target support for this packet). They
-all default to @samp{auto}. For more information about each packet,
-see @ref{Remote Protocol}.
-
-During normal use, you should not have to use any of these commands.
-If you do, that may be a bug in your remote debugging stub, or a bug
-in @value{GDBN}. You may want to report the problem to the
-@value{GDBN} developers.
-
-The available settings are:
-
-@multitable @columnfractions 0.3 0.2 0.35
-@item Command Name
-@tab Remote Packet
-@tab Related Features
-
-@item @code{fetch-register-packet}
-@tab @code{p}
-@tab @code{info registers}
-
-@item @code{set-register-packet}
-@tab @code{P}
-@tab @code{set}
-
-@item @code{binary-download-packet}
-@tab @code{X}
-@tab @code{load}, @code{set}
-@item @code{read-aux-vector-packet}
-@tab @code{qXfer:auxv:read}
-@tab @code{info auxv}
-
-@item @code{symbol-lookup-packet}
-@tab @code{qSymbol}
-@tab Detecting multiple threads
-
-@item @code{verbose-resume-packet}
-@tab @code{vCont}
-@tab Stepping or resuming multiple threads
-
-@item @code{software-breakpoint-packet}
-@tab @code{Z0}
-@tab @code{break}
-
-@item @code{hardware-breakpoint-packet}
-@tab @code{Z1}
-@tab @code{hbreak}
-
-@item @code{write-watchpoint-packet}
-@tab @code{Z2}
-@tab @code{watch}
-
-@item @code{read-watchpoint-packet}
-@tab @code{Z3}
-@tab @code{rwatch}
+@item set remote fetch-register-packet
+@itemx set remote set-register-packet
+@itemx set remote P-packet
+@itemx set remote p-packet
+@cindex P-packet
+@cindex fetch registers from remote targets
+@cindex set registers in remote targets
+Determine whether @value{GDBN} can set and fetch registers from the
+remote target using the @samp{P} packets. The default depends on the
+remote stub's support of the @samp{P} packets (@value{GDBN} queries
+the stub when this packet is first required).
+
+@item show remote fetch-register-packet
+@itemx show remote set-register-packet
+@itemx show remote P-packet
+@itemx show remote p-packet
+Show the current setting of using the @samp{P} packets for setting and
+fetching registers from the remote target.
+
+@cindex binary downloads
+@cindex X-packet
+@item set remote binary-download-packet
+@itemx set remote X-packet
+Determine whether @value{GDBN} sends downloads in binary mode using
+the @samp{X} packets. The default is on.
+
+@item show remote binary-download-packet
+@itemx show remote X-packet
+Show the current setting of using the @samp{X} packets for binary
+downloads.
+
+@item set remote read-aux-vector-packet
+@cindex auxiliary vector of remote target
+@cindex @code{auxv}, and remote targets
+Set the use of the remote protocol's @samp{qXfer:auxv:read} (target
+auxiliary vector) request. This request is used to fetch the
+remote target's @dfn{auxiliary vector}, see @ref{OS Information,
+Auxiliary Vector}. The default setting depends on the remote stub's
+support of this request (@value{GDBN} queries the stub when this
+request is first required). @xref{General Query Packets, qXfer}, for
+more information about this request.
+
+@item show remote read-aux-vector-packet
+Show the current setting of use of the @samp{qXfer:auxv:read} request.
+
+@item set remote symbol-lookup-packet
+@cindex remote symbol lookup request
+Set the use of the remote protocol's @samp{qSymbol} (target symbol
+lookup) request. This request is used to communicate symbol
+information to the remote target, e.g., whenever a new shared library
+is loaded by the remote (@pxref{Files, shared libraries}). The
+default setting depends on the remote stub's support of this request
+(@value{GDBN} queries the stub when this request is first required).
+@xref{General Query Packets, qSymbol}, for more information about this
+request.
-@item @code{access-watchpoint-packet}
-@tab @code{Z4}
-@tab @code{awatch}
+@item show remote symbol-lookup-packet
+Show the current setting of use of the @samp{qSymbol} request.
+
+@item set remote verbose-resume-packet
+@cindex resume remote target
+@cindex signal thread, and remote targets
+@cindex single-step thread, and remote targets
+@cindex thread-specific operations on remote targets
+Set the use of the remote protocol's @samp{vCont} (descriptive resume)
+request. This request is used to resume specific threads in the
+remote target, and to single-step or signal them. The default setting
+depends on the remote stub's support of this request (@value{GDBN}
+queries the stub when this request is first required). This setting
+affects debugging of multithreaded programs: if @samp{vCont} cannot be
+used, @value{GDBN} might be unable to single-step a specific thread,
+especially under @code{set scheduler-locking off}; it is also
+impossible to pause a specific thread. @xref{Packets, vCont}, for
+more details.
+
+@item show remote verbose-resume-packet
+Show the current setting of use of the @samp{vCont} request
+
+@item set remote software-breakpoint-packet
+@itemx set remote hardware-breakpoint-packet
+@itemx set remote write-watchpoint-packet
+@itemx set remote read-watchpoint-packet
+@itemx set remote access-watchpoint-packet
+@itemx set remote Z-packet
+@cindex Z-packet
+@cindex remote hardware breakpoints and watchpoints
+These commands enable or disable the use of @samp{Z} packets for
+setting breakpoints and watchpoints in the remote target. The default
+depends on the remote stub's support of the @samp{Z} packets
+(@value{GDBN} queries the stub when each packet is first required).
+The command @code{set remote Z-packet}, kept for back-compatibility,
+turns on or off all the features that require the use of @samp{Z}
+packets.
+
+@item show remote software-breakpoint-packet
+@itemx show remote hardware-breakpoint-packet
+@itemx show remote write-watchpoint-packet
+@itemx show remote read-watchpoint-packet
+@itemx show remote access-watchpoint-packet
+@itemx show remote Z-packet
+Show the current setting of @samp{Z} packets usage.
+
+@item set remote get-thread-local-storage-address
+@kindex set remote get-thread-local-storage-address
+@cindex thread local storage of remote targets
+This command enables or disables the use of the @samp{qGetTLSAddr}
+(Get Thread Local Storage Address) request packet. The default
+depends on whether the remote stub supports this request.
+@xref{General Query Packets, qGetTLSAddr}, for more details about this
+packet.
-@item @code{get-thread-local-storage-address-packet}
-@tab @code{qGetTLSAddr}
-@tab Displaying @code{__thread} variables
+@item show remote get-thread-local-storage-address
+@kindex show remote get-thread-local-storage-address
+Show the current setting of @samp{qGetTLSAddr} packet usage.
-@item @code{supported-packets}
-@tab @code{qSupported}
-@tab Remote communications parameters
+@item set remote supported-packets
+@kindex set remote supported-packets
+@cindex query supported packets of remote targets
+This command enables or disables the use of the @samp{qSupported}
+request packet. @xref{General Query Packets, qSupported}, for more
+details about this packet. The default is to use @samp{qSupported}.
-@end multitable
+@item show remote supported-packets
+@kindex show remote supported-packets
+Show the current setting of @samp{qSupported} packet usage.
+@end table
@node remote stub
@section Implementing a remote stub
@@ -13610,7 +13604,7 @@ when the debuggee is started.
This boolean value controls whether the debuggee should
start a new group or stay in the same group as the debugger.
This affects the way the Windows OS handles
-@samp{Ctrl-C}.
+Ctrl-C.
@kindex show new-group
@item show new-group
@@ -14457,7 +14451,7 @@ you can't send an interrupt---but you can press the @sc{reset} switch!
Use the @sc{reset} button on the development board
@itemize @bullet
@item
-to interrupt your program (don't use @kbd{Ctrl-c} on the DOS host---it has
+to interrupt your program (don't use @kbd{ctl-C} on the DOS host---it has
no way to pass an interrupt signal to the development board); and
@item
@@ -15250,8 +15244,8 @@ manual for available commands.
Connect the controlling terminal to the STDBUG command monitor. When
you are done interacting with STDBUG, typing either of two character
sequences gets you back to the @value{GDBN} command prompt:
-@kbd{@key{RET} ~ .} (Return, followed by tilde and period) or
-@kbd{@key{RET} ~ Ctrl-d} (Return, followed by tilde and control-D).
+@kbd{@key{RET}~.} (Return, followed by tilde and period) or
+@kbd{@key{RET}~@key{C-d}} (Return, followed by tilde and control-D).
@end table
@node Z8000
@@ -16930,7 +16924,7 @@ In the TUI mode, the arrow keys are used by the active window
for scrolling. This means they are available for readline when the
active window is the command window. When the command window
does not have the focus, it is necessary to use other readline
-key bindings such as @kbd{C-p}, @kbd{C-n}, @kbd{C-b} and @kbd{C-f}.
+key bindings such as @key{C-p}, @key{C-n}, @key{C-b} and @key{C-f}.
@node TUI Single Key Mode
@section TUI Single Key Mode
@@ -16988,7 +16982,7 @@ The key that was pressed is inserted in the editing buffer so that
it is possible to type most @value{GDBN} commands without interaction
with the TUI @emph{SingleKey} mode. Once the command is entered the TUI
@emph{SingleKey} mode is restored. The only way to permanently leave
-this mode is by typing @kbd{q} or @kbd{C-x s}.
+this mode is by hitting @key{q} or @samp{@key{C-x} @key{s}}.
@node TUI Commands
@@ -17033,7 +17027,7 @@ can be affected to another window.
@item refresh
@kindex refresh
-Refresh the screen. This is similar to typing @kbd{C-L}.
+Refresh the screen. This is similar to using @key{C-L} key.
@item tui reg float
@kindex tui reg
@@ -17237,7 +17231,7 @@ Go down the number of frames indicated by the numeric argument, like the
@value{GDBN} @code{down} command.
@end table
-In any source file, the Emacs command @kbd{C-x @key{SPC}} (@code{gud-break})
+In any source file, the Emacs command @kbd{C-x SPC} (@code{gud-break})
tells @value{GDBN} to set a breakpoint on the source line point is on.
If you type @kbd{M-x speedbar}, then Emacs displays a separate frame which
@@ -19236,12 +19230,8 @@ For a stack with frame levels 0 through 11:
Display a list of the arguments for the frames between @var{low-frame}
and @var{high-frame} (inclusive). If @var{low-frame} and
-@var{high-frame} are not provided, list the arguments for the whole
-call stack. If the two arguments are equal, show the single frame
-at the corresponding level. It is an error if @var{low-frame} is
-larger than the actual number of frames. On the other hand,
-@var{high-frame} may be larger than the actual number of frames, in
-which case only existing frames will be returned.
+@var{high-frame} are not provided, list the arguments for the whole call
+stack.
The @var{show-values} argument must have a value of 0 or 1. A value of
0 means that only the names of the arguments are listed, a value of 1
@@ -19341,10 +19331,7 @@ Line number corresponding to the @code{$pc}.
If invoked without arguments, this command prints a backtrace for the
whole stack. If given two integer arguments, it shows the frames whose
levels are between the two arguments (inclusive). If the two arguments
-are equal, it shows the single frame at the corresponding level. It is
-an error if @var{low-frame} is larger than the actual number of
-frames. On the other hand, @var{high-frame} may be larger than the
-actual number of frames, in which case only existing frames will be returned.
+are equal, it shows the single frame at the corresponding level.
@subsubheading @value{GDBN} Command
@@ -21484,34 +21471,34 @@ features the following annotations:
The input types are
@table @code
-@findex pre-prompt annotation
-@findex prompt annotation
-@findex post-prompt annotation
+@findex pre-prompt
+@findex prompt
+@findex post-prompt
@item prompt
When @value{GDBN} is prompting for a command (the main @value{GDBN} prompt).
-@findex pre-commands annotation
-@findex commands annotation
-@findex post-commands annotation
+@findex pre-commands
+@findex commands
+@findex post-commands
@item commands
When @value{GDBN} prompts for a set of commands, like in the @code{commands}
command. The annotations are repeated for each command which is input.
-@findex pre-overload-choice annotation
-@findex overload-choice annotation
-@findex post-overload-choice annotation
+@findex pre-overload-choice
+@findex overload-choice
+@findex post-overload-choice
@item overload-choice
When @value{GDBN} wants the user to select between various overloaded functions.
-@findex pre-query annotation
-@findex query annotation
-@findex post-query annotation
+@findex pre-query
+@findex query
+@findex post-query
@item query
When @value{GDBN} wants the user to confirm a potentially dangerous operation.
-@findex pre-prompt-for-continue annotation
-@findex prompt-for-continue annotation
-@findex post-prompt-for-continue annotation
+@findex pre-prompt-for-continue
+@findex prompt-for-continue
+@findex post-prompt-for-continue
@item prompt-for-continue
When @value{GDBN} is asking the user to press return to continue. Note: Don't
expect this to work well; instead use @code{set height 0} to disable
@@ -21523,14 +21510,14 @@ presence of annotations.
@section Errors
@cindex annotations for errors, warnings and interrupts
-@findex quit annotation
+@findex quit
@smallexample
^Z^Zquit
@end smallexample
This annotation occurs right before @value{GDBN} responds to an interrupt.
-@findex error annotation
+@findex error
@smallexample
^Z^Zerror
@end smallexample
@@ -21545,7 +21532,7 @@ cannot expect not to receive it either, however; an error annotation
does not necessarily mean that @value{GDBN} is immediately returning all the way
to the top level.
-@findex error-begin annotation
+@findex error-begin
A quit or error annotation may be preceded by
@smallexample
@@ -21567,13 +21554,13 @@ The following annotations say that certain pieces of state may have
changed.
@table @code
-@findex frames-invalid annotation
+@findex frames-invalid
@item ^Z^Zframes-invalid
The frames (for example, output from the @code{backtrace} command) may
have changed.
-@findex breakpoints-invalid annotation
+@findex breakpoints-invalid
@item ^Z^Zbreakpoints-invalid
The breakpoints may have changed. For example, the user just added or
@@ -21584,8 +21571,8 @@ deleted a breakpoint.
@section Running the Program
@cindex annotations for running programs
-@findex starting annotation
-@findex stopping annotation
+@findex starting
+@findex stopping
When the program starts executing due to a @value{GDBN} command such as
@code{step} or @code{continue},
@@ -21603,16 +21590,16 @@ is output. Before the @code{stopped} annotation, a variety of
annotations describe how the program stopped.
@table @code
-@findex exited annotation
+@findex exited
@item ^Z^Zexited @var{exit-status}
The program exited, and @var{exit-status} is the exit status (zero for
successful exit, otherwise nonzero).
-@findex signalled annotation
-@findex signal-name annotation
-@findex signal-name-end annotation
-@findex signal-string annotation
-@findex signal-string-end annotation
+@findex signalled
+@findex signal-name
+@findex signal-name-end
+@findex signal-string
+@findex signal-string-end
@item ^Z^Zsignalled
The program exited with a signal. After the @code{^Z^Zsignalled}, the
annotation continues:
@@ -21636,17 +21623,17 @@ as @code{Illegal Instruction} or @code{Segmentation fault}.
@var{intro-text}, @var{middle-text}, and @var{end-text} are for the
user's benefit and have no particular format.
-@findex signal annotation
+@findex signal
@item ^Z^Zsignal
The syntax of this annotation is just like @code{signalled}, but @value{GDBN} is
just saying that the program received the signal, not that it was
terminated with it.
-@findex breakpoint annotation
+@findex breakpoint
@item ^Z^Zbreakpoint @var{number}
The program hit breakpoint number @var{number}.
-@findex watchpoint annotation
+@findex watchpoint
@item ^Z^Zwatchpoint @var{number}
The program hit watchpoint number @var{number}.
@end table
@@ -21655,7 +21642,7 @@ The program hit watchpoint number @var{number}.
@section Displaying Source
@cindex annotations for source display
-@findex source annotation
+@findex source
The following annotation is used instead of displaying source code:
@smallexample
@@ -22653,7 +22640,6 @@ Show the current setting of the target wait timeout.
* Interrupts::
* Examples::
* File-I/O remote protocol extension::
-* Memory map format::
@end menu
@node Overview
@@ -23001,7 +22987,7 @@ suitable for accessing memory-mapped I/O devices.
Reply:
@table @samp
@item @var{XX@dots{}}
-Memory contents; each byte is transmitted as a two-digit hexadecimal
+Memory contents; each byte is transmitted as a two-digit hexidecimal
number. The reply may contain fewer bytes than requested if the
server was able to read only part of the region of memory.
@item E @var{NN}
@@ -23012,7 +22998,7 @@ server was able to read only part of the region of memory.
@cindex @samp{M} packet
Write @var{length} bytes of memory starting at address @var{addr}.
@var{XX@dots{}} is the data; each byte is transmitted as a two-digit
-hexadecimal number.
+hexidecimal number.
Reply:
@table @samp
@@ -23043,7 +23029,7 @@ Indicating an unrecognized @var{query}.
@anchor{write register packet}
@cindex @samp{P} packet
Write register @var{n@dots{}} with value @var{r@dots{}}. The register
-number @var{n} is in hexadecimal, and @var{r@dots{}} contains two hex
+number @var{n} is in hexidecimal, and @var{r@dots{}} contains two hex
digits for each byte in the register (target byte order).
Reply:
@@ -23152,58 +23138,6 @@ command in the @samp{vCont} packet.
The @samp{vCont} packet is not supported.
@end table
-@item vFlashErase:@var{addr},@var{length}
-@cindex @samp{vFlashErase} packet
-Direct the stub to erase @var{length} bytes of flash starting at
-@var{addr}. The region may enclose any number of flash blocks, but
-its start and end must fall on block boundaries, as indicated by the
-flash block size appearing in the memory map (@pxref{Memory map
-format}). @value{GDBN} groups flash memory programming operations
-together, and sends a @samp{vFlashDone} request after each group; the
-stub is allowed to delay erase operation until the @samp{vFlashDone}
-packet is received.
-
-Reply:
-@table @samp
-@item OK
-for success
-@item E @var{NN}
-for an error
-@end table
-
-@item vFlashWrite:@var{addr}:@var{XX@dots{}}
-@cindex @samp{vFlashWrite} packet
-Direct the stub to write data to flash address @var{addr}. The data
-is passed in binary form using the same encoding as for the @samp{X}
-packet (@pxref{Binary Data}). The memory ranges specified by
-@samp{vFlashWrite} packets preceding a @samp{vFlashDone} packet must
-not overlap, and must appear in order of increasing addresses
-(although @samp{vFlashErase} packets for higher addresses may already
-have been received; the ordering is guaranteed only between
-@samp{vFlashWrite} packets). If a packet writes to an address that was
-neither erased by a preceding @samp{vFlashErase} packet nor by some other
-target-specific method, the results are unpredictable.
-
-
-Reply:
-@table @samp
-@item OK
-for success
-@item E.memtype
-for vFlashWrite addressing non-flash memory
-@item E @var{NN}
-for an error
-@end table
-
-@item vFlashDone
-@cindex @samp{vFlashDone} packet
-Indicate to the stub that flash programming operation is finished.
-The stub is permitted to delay or batch the effects of a group of
-@samp{vFlashErase} and @samp{vFlashWrite} packets until a
-@samp{vFlashDone} packet is received. The contents of the affected
-regions of flash memory are unpredictable until the @samp{vFlashDone}
-request is completed.
-
@item X @var{addr},@var{length}:@var{XX@dots{}}
@anchor{X packet}
@cindex @samp{X} packet
@@ -23358,13 +23292,13 @@ components.
@table @samp
@item S @var{AA}
-The program received signal number @var{AA} (a two-digit hexadecimal
+The program received signal number @var{AA} (a two-digit hexidecimal
number). This is equivalent to a @samp{T} response with no
@var{n}:@var{r} pairs.
@item T @var{AA} @var{n1}:@var{r1};@var{n2}:@var{r2};@dots{}
@cindex @samp{T} packet reply
-The program received signal number @var{AA} (a two-digit hexadecimal
+The program received signal number @var{AA} (a two-digit hexidecimal
number). This is equivalent to an @samp{S} response, except that the
@samp{@var{n}:@var{r}} pairs can carry values of important registers
and other information directly in the stop reply packet, reducing
@@ -23372,7 +23306,7 @@ round-trip latency. Single-step and breakpoint traps are reported
this way. Each @samp{@var{n}:@var{r}} pair is interpreted as follows:
@enumerate
@item
-If @var{n} is a hexadecimal number, it is a register number, and the
+If @var{n} is a hexidecimal number, it is a register number, and the
corresponding @var{r} gives that register's value. @var{r} is a
series of bytes in target byte order, with each byte given by a
two-digit hex number.
@@ -23479,7 +23413,7 @@ Return the current thread id.
Reply:
@table @samp
@item QC @var{pid}
-Where @var{pid} is an unsigned hexadecimal process id.
+Where @var{pid} is an unsigned hexidecimal process id.
@item @r{(anything else)}
Any other reply implies the old pid.
@end table
@@ -23559,6 +23493,10 @@ An error occurred. @var{nn} are hex digits.
An empty reply indicates that @samp{qGetTLSAddr} is not supported by the stub.
@end table
+Use of this request packet is controlled by the @code{set remote
+get-thread-local-storage-address} command (@pxref{Remote
+configuration, set remote get-thread-local-storage-address}).
+
@item qL @var{startflag} @var{threadcount} @var{nextthread}
Obtain thread information from RTOS. Where: @var{startflag} (one hex
digit) is one to indicate the first query and zero to indicate a
@@ -23742,11 +23680,6 @@ These are the currently defined stub features and their properties:
@tab @samp{-}
@tab Yes
-@item @samp{qXfer:memory-map:read}
-@tab No
-@tab @samp{-}
-@tab Yes
-
@end multitable
These are the currently defined stub features, in more detail:
@@ -23844,7 +23777,6 @@ packets.)
@item qXfer:@var{object}:read:@var{annex}:@var{offset},@var{length}
@cindex read special object, remote request
@cindex @samp{qXfer} packet
-@anchor{qXfer read}
Read uninterpreted bytes from the target's special data area
identified by the keyword @var{object}. Request @var{length} bytes
starting at @var{offset} bytes into the data. The content and
@@ -23859,23 +23791,13 @@ formats, listed below.
@item qXfer:auxv:read::@var{offset},@var{length}
@anchor{qXfer auxiliary vector read}
Access the target's @dfn{auxiliary vector}. @xref{OS Information,
-auxiliary vector}. Note @var{annex} must be empty.
+auxiliary vector}, and @ref{Remote configuration,
+read-aux-vector-packet}. Note @var{annex} must be empty.
This packet is not probed by default; the remote stub must request it,
by suppling an appropriate @samp{qSupported} response (@pxref{qSupported}).
@end table
-@table @samp
-@item qXfer:memory-map:read::@var{offset},@var{length}
-@anchor{qXfer memory map read}
-Access the target's @dfn{memory-map}. @xref{Memory map format}. The
-annex part of the generic @samp{qXfer} packet must be empty
-(@pxref{qXfer read}).
-
-This packet is not probed by default; the remote stub must request it,
-by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}).
-@end table
-
Reply:
@table @samp
@item m @var{data}
@@ -23952,21 +23874,21 @@ must respond with an empty packet.
The following @code{g}/@code{G} packets have previously been defined.
In the below, some thirty-two bit registers are transferred as
sixty-four bits. Those registers should be zero/sign extended (which?)
-to fill the space allocated. Register bytes are transferred in target
-byte order. The two nibbles within a register byte are transferred
+to fill the space allocated. Register bytes are transfered in target
+byte order. The two nibbles within a register byte are transfered
most-significant - least-significant.
@table @r
@item MIPS32
-All registers are transferred as thirty-two bit quantities in the order:
+All registers are transfered as thirty-two bit quantities in the order:
32 general-purpose; sr; lo; hi; bad; cause; pc; 32 floating-point
registers; fsr; fir; fp.
@item MIPS64
-All registers are transferred as sixty-four bit quantities (including
+All registers are transfered as sixty-four bit quantities (including
thirty-two bit registers such as @code{sr}). The ordering is the same
as @code{MIPS32}.
@@ -24022,7 +23944,7 @@ following forms:
@item R @var{mask}
Collect the registers whose bits are set in @var{mask}. @var{mask} is
-a hexadecimal number whose @var{i}'th bit is set if register number
+a hexidecimal number whose @var{i}'th bit is set if register number
@var{i} should be collected. (The least significant bit is numbered
zero.) Note that @var{mask} may be any number of digits long; it may
not fit in a 32-bit word.
@@ -24032,7 +23954,7 @@ Collect @var{len} bytes of memory starting at the address in register
number @var{basereg}, plus @var{offset}. If @var{basereg} is
@samp{-1}, then the range has a fixed address: @var{offset} is the
address of the lowest byte to collect. The @var{basereg},
-@var{offset}, and @var{len} parameters are all unsigned hexadecimal
+@var{offset}, and @var{len} parameters are all unsigned hexidecimal
values (the @samp{-1} value for @var{basereg} is a special case).
@item X @var{len},@var{expr}
@@ -24075,29 +23997,29 @@ one of the following forms:
@table @samp
@item F @var{f}
The selected frame is number @var{n} in the trace frame buffer;
-@var{f} is a hexadecimal number. If @var{f} is @samp{-1}, then there
+@var{f} is a hexidecimal number. If @var{f} is @samp{-1}, then there
was no frame matching the criteria in the request packet.
@item T @var{t}
The selected trace frame records a hit of tracepoint number @var{t};
-@var{t} is a hexadecimal number.
+@var{t} is a hexidecimal number.
@end table
@item QTFrame:pc:@var{addr}
Like @samp{QTFrame:@var{n}}, but select the first tracepoint frame after the
currently selected frame whose PC is @var{addr};
-@var{addr} is a hexadecimal number.
+@var{addr} is a hexidecimal number.
@item QTFrame:tdp:@var{t}
Like @samp{QTFrame:@var{n}}, but select the first tracepoint frame after the
currently selected frame that is a hit of tracepoint @var{t}; @var{t}
-is a hexadecimal number.
+is a hexidecimal number.
@item QTFrame:range:@var{start}:@var{end}
Like @samp{QTFrame:@var{n}}, but select the first tracepoint frame after the
currently selected frame whose PC is between @var{start} (inclusive)
-and @var{end} (exclusive); @var{start} and @var{end} are hexadecimal
+and @var{end} (exclusive); @var{start} and @var{end} are hexidecimal
numbers.
@item QTFrame:outside:@var{start}:@var{end}
@@ -24241,7 +24163,7 @@ or @samp{s} packets. While @value{GDBN} handles the request for a system call,
the target is stopped to allow deterministic access to the target's
memory. Therefore File-I/O is not interruptible by target signals. On
the other hand, it is possible to interrupt File-I/O by a user interrupt
-(@samp{Ctrl-C}) within @value{GDBN}.
+(Ctrl-C) within @value{GDBN}.
The target's request to perform a host system call does not finish
the latest @samp{C}, @samp{c}, @samp{S} or @samp{s} action. That means,
@@ -24397,16 +24319,16 @@ assuming 4 is the protocol specific representation of @code{EINTR}.
@node The Ctrl-C message
-@subsection The @samp{Ctrl-C} message
+@subsection The Ctrl-C message
@cindex ctrl-c message, in file-i/o protocol
-If the @samp{Ctrl-C} flag is set in the @value{GDBN}
-reply packet (@pxref{The F reply packet}),
+If the Ctrl-C flag is set in the @value{GDBN}
+reply packet (@pxref{The F reply packet}),
the target should behave as if it had
gotten a break message. The meaning for the target is ``system call
interrupted by @code{SIGINT}''. Consequentially, the target should actually stop
(as with a break message) and return to @value{GDBN} with a @code{T02}
-packet.
+packet.
It's important for the target to know in which
state the system call was interrupted. There are two possible cases:
@@ -24449,17 +24371,17 @@ conditions is met:
@itemize @bullet
@item
-The user types @kbd{Ctrl-c}. The behaviour is as explained above, and the
+The user presses @kbd{Ctrl-C}. The behaviour is as explained above, and the
@code{read}
system call is treated as finished.
@item
-The user presses @key{RET}. This is treated as end of input with a trailing
+The user presses @kbd{Enter}. This is treated as end of input with a trailing
newline.
@item
-The user types @kbd{Ctrl-d}. This is treated as end of input. No trailing
-character (neither newline nor @samp{Ctrl-D}) is appended to the input.
+The user presses @kbd{Ctrl-D}. This is treated as end of input. No trailing
+character (neither newline nor Ctrl-D) is appended to the input.
@end itemize
@@ -25338,7 +25260,7 @@ file descriptor (@code{EBADF}):
-> @code{F-1,9}
@end smallexample
-Example sequence of a read call, user presses @kbd{Ctrl-c} before syscall on
+Example sequence of a read call, user presses Ctrl-C before syscall on
host is called:
@smallexample
@@ -25347,7 +25269,7 @@ host is called:
<- @code{T02}
@end smallexample
-Example sequence of a read call, user presses @kbd{Ctrl-c} after syscall on
+Example sequence of a read call, user presses Ctrl-C after syscall on
host is called:
@smallexample
@@ -25356,88 +25278,6 @@ host is called:
<- @code{T02}
@end smallexample
-@node Memory map format
-@section Memory map format
-@cindex memory map format
-
-To be able to write into flash memory, @value{GDBN} needs to obtain a
-memory map from the target. This section describes the format of the
-memory map.
-
-The memory map is obtained using the @samp{qXfer:memory-map:read}
-(@pxref{qXfer memory map read}) packet and is an XML document that
-lists memory regions. The top-level structure of the document is shown below:
-
-@smallexample
-<?xml version="1.0"?>
-<!DOCTYPE memory-map
- PUBLIC "+//IDN gnu.org//DTD GDB Memory Map V1.0//EN"
- "http://sourceware.org/gdb/gdb-memory-map.dtd">
-<memory-map>
- region...
-</memory-map>
-@end smallexample
-
-Each region can be either:
-
-@itemize
-
-@item
-A region of RAM starting at @var{addr} and extending for @var{length}
-bytes from there:
-
-@smallexample
-<memory type="ram" start="@var{addr}" length="@var{length}"/>
-@end smallexample
-
-
-@item
-A region of read-only memory:
-
-@smallexample
-<memory type="rom" start="@var{addr}" length="@var{length}"/>
-@end smallexample
-
-
-@item
-A region of flash memory, with erasure blocks @var{blocksize}
-bytes in length:
-
-@smallexample
-<memory type="flash" start="@var{addr}" length="@var{length}">
- <property name="blocksize">@var{blocksize}</property>
-</memory>
-@end smallexample
-
-@end itemize
-
-Regions must not overlap. @value{GDBN} assumes that areas of memory not covered
-by the memory map are RAM, and uses the ordinary @samp{M} and @samp{X}
-packets to write to addresses in such ranges.
-
-The formal DTD for memory map format is given below:
-
-@smallexample
-<!-- ................................................... -->
-<!-- Memory Map XML DTD ................................ -->
-<!-- File: memory-map.dtd .............................. -->
-<!-- .................................... .............. -->
-<!-- memory-map.dtd -->
-<!-- memory-map: Root element with versioning -->
-<!ELEMENT memory-map (memory | property)>
-<!ATTLIST memory-map version CDATA #FIXED "1.0.0">
-<!ELEMENT memory (property)>
-<!-- memory: Specifies a memory region,
- and its type, or device. -->
-<!ATTLIST memory type CDATA #REQUIRED
- start CDATA #REQUIRED
- length CDATA #REQUIRED
- device CDATA #IMPLIED>
-<!-- property: Generic attribute tag -->
-<!ELEMENT property (#PCDATA | property)*>
-<!ATTLIST property name CDATA #REQUIRED>
-@end smallexample
-
@include agentexpr.texi
@include gpl.texi
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 229fb62..16267d1 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -212,54 +212,6 @@ file handling and @code{setjmp} handling are two common cases.
When you want to make @value{GDBN} work ``native'' on a particular machine, you
have to include all three kinds of information.
-@section Source Tree Structure
-@cindex @value{GDBN} source tree structure
-
-The @value{GDBN} source directory has a mostly flat structure---there
-are only a few subdirectories. A file's name usually gives a hint as
-to what it does; for example, @file{stabsread.c} reads stabs,
-@file{dwarfread.c} reads DWARF, etc.
-
-Files that are related to some common task have names that share
-common substrings. For example, @file{*-thread.c} files deal with
-debugging threads on various platforms; @file{*read.c} files deal with
-reading various kinds of symbol and object files; @file{inf*.c} files
-deal with direct control of the @dfn{inferior program} (@value{GDBN}
-parlance for the program being debugged).
-
-There are several dozens of files in the @file{*-tdep.c} family.
-@samp{tdep} stands for @dfn{target-dependent code}---each of these
-files implements debug support for a specific target architecture
-(sparc, mips, etc). Usually, only one of these will be used in a
-specific @value{GDBN} configuration (sometimes two, closely related).
-
-Similarly, there are many @file{*-nat.c} files, each one for native
-debugging on a specific system (e.g., @file{sparc-linux-nat.c} is for
-native debugging of Sparc machines running the Linux kernel).
-
-The few subdirectories of the source tree are:
-
-@table @file
-@item cli
-Code that implements @dfn{CLI}, the @value{GDBN} Command-Line
-Interpreter. @xref{User Interface, Command Interpreter}.
-
-@item gdbserver
-Code for the @value{GDBN} remote server.
-
-@item gdbtk
-Code for Insight, the @value{GDBN} TK-based GUI front-end.
-
-@item mi
-The @dfn{GDB/MI}, the @value{GDBN} Machine Interface interpreter.
-
-@item signals
-Target signal translation code.
-
-@item tui
-Code for @dfn{TUI}, the @value{GDBN} Text-mode full-screen User
-Interface. @xref{User Interface, TUI}.
-@end table
@node Algorithms
@@ -2722,41 +2674,6 @@ architecture, a warning will be issued and the debugging session will continue
with the defaults already established for @var{gdbarch}.
@end deftypefun
-@section Initializing a New Architecture
-
-Each @code{gdbarch} is associated with a single @sc{bfd} architecture,
-via a @code{bfd_arch_@var{arch}} constant. The @code{gdbarch} is
-registered by a call to @code{register_gdbarch_init}, usually from
-the file's @code{_initialize_@var{filename}} routine, which will
-be automatically called during @value{GDBN} startup. The arguments
-are a @sc{bfd} architecture constant and an initialization function.
-
-The initialization function has this type:
-
-@smallexample
-static struct gdbarch *
-@var{arch}_gdbarch_init (struct gdbarch_info @var{info},
- struct gdbarch_list *@var{arches})
-@end smallexample
-
-The @var{info} argument contains parameters used to select the correct
-architecture, and @var{arches} is a list of architectures which
-have already been created with the same @code{bfd_arch_@var{arch}}
-value.
-
-The initialization function should first make sure that @var{info}
-is acceptable, and return @code{NULL} if it is not. Then, it should
-search through @var{arches} for an exact match to @var{info}, and
-return one if found. Lastly, if no exact match was found, it should
-create a new architecture based on @var{info} and return it.
-
-Only information in @var{info} should be used to choose the new
-architecture. Historically, @var{info} could be sparse, and
-defaults would be collected from the first element on @var{arches}.
-However, @value{GDBN} now fills in @var{info} more thoroughly,
-so new @code{gdbarch} initialization functions should not take
-defaults from @var{arches}.
-
@section Registers and Memory
@value{GDBN}'s model of the target machine is rather simple.
@@ -4488,56 +4405,11 @@ actually exercises control over a process or a serial port.
@value{GDBN} includes some 30-40 different target vectors; however,
each configuration of @value{GDBN} includes only a few of them.
-@menu
-* Managing Execution State::
-* Existing Targets::
-@end menu
-
-@node Managing Execution State
-@section Managing Execution State
-@cindex execution state
-
-A target vector can be completely inactive (not pushed on the target
-stack), active but not running (pushed, but not connected to a fully
-manifested inferior), or completely active (pushed, with an accessible
-inferior). Most targets are only completely inactive or completely
-active, but some support persistant connections to a target even
-when the target has exited or not yet started.
-
-For example, connecting to the simulator using @code{target sim} does
-not create a running program. Neither registers nor memory are
-accessible until @code{run}. Similarly, after @code{kill}, the
-program can not continue executing. But in both cases @value{GDBN}
-remains connected to the simulator, and target-specific commands
-are directed to the simulator.
-
-A target which only supports complete activation should push itself
-onto the stack in its @code{to_open} routine (by calling
-@code{push_target}), and unpush itself from the stack in its
-@code{to_mourn_inferior} routine (by calling @code{unpush_target}).
-
-A target which supports both partial and complete activation should
-still call @code{push_target} in @code{to_open}, but not call
-@code{unpush_target} in @code{to_mourn_inferior}. Instead, it should
-call either @code{target_mark_running} or @code{target_mark_exited}
-in its @code{to_open}, depending on whether the target is fully active
-after connection. It should also call @code{target_mark_running} any
-time the inferior becomes fully active (e.g.@: in
-@code{to_create_inferior} and @code{to_attach}), and
-@code{target_mark_exited} when the inferior becomes inactive (in
-@code{to_mourn_inferior}). The target should also make sure to call
-@code{target_mourn_inferior} from its @code{to_kill}, to return the
-target to inactive state.
-
-@node Existing Targets
-@section Existing Targets
-@cindex targets
-
-@subsection File Targets
+@section File Targets
Both executables and core files have target vectors.
-@subsection Standard Protocol and Remote Stubs
+@section Standard Protocol and Remote Stubs
@value{GDBN}'s file @file{remote.c} talks a serial protocol to code
that runs in the target system. @value{GDBN} provides several sample
@@ -4582,13 +4454,13 @@ of the debugger/stub.
From reading the stub, it's probably not obvious how breakpoints work.
They are simply done by deposit/examine operations from @value{GDBN}.
-@subsection ROM Monitor Interface
+@section ROM Monitor Interface
-@subsection Custom Protocols
+@section Custom Protocols
-@subsection Transport Layer
+@section Transport Layer
-@subsection Builtin Simulator
+@section Builtin Simulator
@node Native Debugging
@@ -4993,181 +4865,6 @@ Regex conditionals.
@item sparc
@end table
-@section Array Containers
-@cindex Array Containers
-@cindex VEC
-
-Often it is necessary to manipulate a dynamic array of a set of
-objects. C forces some bookkeeping on this, which can get cumbersome
-and repetative. The @file{vec.h} file contains macros for defining
-and using a typesafe vector type. The functions defined will be
-inlined when compiling, and so the abstraction cost should be zero.
-Domain checks are added to detect programming errors.
-
-An example use would be an array of symbols or section information.
-The array can be grown as symbols are read in (or preallocated), and
-the accessor macros provided keep care of all the necessary
-bookkeeping. Because the arrays are type safe, there is no danger of
-accidentally mixing up the contents. Think of these as C++ templates,
-but implemented in C.
-
-Because of the different behavior of structure objects, scalar objects
-and of pointers, there are three flavors of vector, one for each of
-these variants. Both the structure object and pointer variants pass
-pointers to objects around --- in the former case the pointers are
-stored into the vector and in the latter case the pointers are
-dereferenced and the objects copied into the vector. The scalar
-object variant is suitable for @code{int}-like objects, and the vector
-elements are returned by value.
-
-There are both @code{index} and @code{iterate} accessors. The iterator
-returns a boolean iteration condition and updates the iteration
-variable passed by reference. Because the iterator will be inlined,
-the address-of can be optimized away.
-
-The vectors are implemented using the trailing array idiom, thus they
-are not resizeable without changing the address of the vector object
-itself. This means you cannot have variables or fields of vector type
---- always use a pointer to a vector. The one exception is the final
-field of a structure, which could be a vector type. You will have to
-use the @code{embedded_size} & @code{embedded_init} calls to create
-such objects, and they will probably not be resizeable (so don't use
-the @dfn{safe} allocation variants). The trailing array idiom is used
-(rather than a pointer to an array of data), because, if we allow
-@code{NULL} to also represent an empty vector, empty vectors occupy
-minimal space in the structure containing them.
-
-Each operation that increases the number of active elements is
-available in @dfn{quick} and @dfn{safe} variants. The former presumes
-that there is sufficient allocated space for the operation to succeed
-(it dies if there is not). The latter will reallocate the vector, if
-needed. Reallocation causes an exponential increase in vector size.
-If you know you will be adding N elements, it would be more efficient
-to use the reserve operation before adding the elements with the
-@dfn{quick} operation. This will ensure there are at least as many
-elements as you ask for, it will exponentially increase if there are
-too few spare slots. If you want reserve a specific number of slots,
-but do not want the exponential increase (for instance, you know this
-is the last allocation), use a negative number for reservation. You
-can also create a vector of a specific size from the get go.
-
-You should prefer the push and pop operations, as they append and
-remove from the end of the vector. If you need to remove several items
-in one go, use the truncate operation. The insert and remove
-operations allow you to change elements in the middle of the vector.
-There are two remove operations, one which preserves the element
-ordering @code{ordered_remove}, and one which does not
-@code{unordered_remove}. The latter function copies the end element
-into the removed slot, rather than invoke a memmove operation. The
-@code{lower_bound} function will determine where to place an item in
-the array using insert that will maintain sorted order.
-
-If you need to directly manipulate a vector, then the @code{address}
-accessor will return the address of the start of the vector. Also the
-@code{space} predicate will tell you whether there is spare capacity in the
-vector. You will not normally need to use these two functions.
-
-Vector types are defined using a
-@code{DEF_VEC_@{O,P,I@}(@var{typename})} macro. Variables of vector
-type are declared using a @code{VEC(@var{typename})} macro. The
-characters @code{O}, @code{P} and @code{I} indicate whether
-@var{typename} is an object (@code{O}), pointer (@code{P}) or integral
-(@code{I}) type. Be careful to pick the correct one, as you'll get an
-awkward and inefficient API if you use the wrong one. There is a
-check, which results in a compile-time warning, for the @code{P} and
-@code{I} versions, but there is no check for the @code{O} versions, as
-that is not possible in plain C.
-
-An example of their use would be,
-
-@smallexample
-DEF_VEC_P(tree); // non-managed tree vector.
-
-struct my_struct @{
- VEC(tree) *v; // A (pointer to) a vector of tree pointers.
-@};
-
-struct my_struct *s;
-
-if (VEC_length(tree, s->v)) @{ we have some contents @}
-VEC_safe_push(tree, s->v, decl); // append some decl onto the end
-for (ix = 0; VEC_iterate(tree, s->v, ix, elt); ix++)
- @{ do something with elt @}
-
-@end smallexample
-
-The @file{vec.h} file provides details on how to invoke the various
-accessors provided. They are enumerated here:
-
-@table @code
-@item VEC_length
-Return the number of items in the array,
-
-@item VEC_empty
-Return true if the array has no elements.
-
-@item VEC_last
-@itemx VEC_index
-Return the last or arbitrary item in the array.
-
-@item VEC_iterate
-Access an array element and indicate whether the array has been
-traversed.
-
-@item VEC_alloc
-@itemx VEC_free
-Create and destroy an array.
-
-@item VEC_embedded_size
-@itemx VEC_embedded_init
-Helpers for embedding an array as the final element of another struct.
-
-@item VEC_copy
-Duplicate an array.
-
-@item VEC_space
-Return the amount of free space in an array.
-
-@item VEC_reserve
-Ensure a certain amount of free space.
-
-@item VEC_quick_push
-@itemx VEC_safe_push
-Append to an array, either assuming the space is available, or making
-sure that it is.
-
-@item VEC_pop
-Remove the last item from an array.
-
-@item VEC_truncate
-Remove several items from the end of an array.
-
-@item VEC_safe_grow
-Add several items to the end of an array.
-
-@item VEC_replace
-Overwrite an item in the array.
-
-@item VEC_quick_insert
-@itemx VEC_safe_insert
-Insert an item into the middle of the array. Either the space must
-already exist, or the space is created.
-
-@item VEC_ordered_remove
-@itemx VEC_unordered_remove
-Remove an item from the array, preserving order or not.
-
-@item VEC_block_remove
-Remove a set of items from the array.
-
-@item VEC_address
-Provide the address of the first element.
-
-@item VEC_lower_bound
-Binary search the array.
-
-@end table
-
@section include
@node Coding
diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo
index 963fc3b..64998e2 100644
--- a/gdb/doc/stabs.texinfo
+++ b/gdb/doc/stabs.texinfo
@@ -67,7 +67,6 @@ This document describes the stabs debugging format.
* Constants:: Constants
* Variables::
* Types:: Type definitions
-* Macro define and undefine:: Representation of #define and #undef
* Symbol Tables:: Symbol information in symbol tables
* Cplusplus:: Stabs specific to C++
* Stab Types:: Symbol types in a.out files
@@ -2221,70 +2220,6 @@ generates the following code:
The variable defines a new type, 24, which is a pointer to another new
type, 25, which is a function returning @code{int}.
-@node Macro define and undefine
-@chapter Representation of #define and #undef
-
-This section describes the stabs support for macro define and undefine
-information, supported on some systems. (e.g., with @option{-g3}
-@option{-gstabs} when using GCC).
-
-A @code{#define @var{macro-name} @var{macro-body}} is represented with
-an @code{N_MAC_DEFINE} stab with a string field of
-@code{@var{macro-name} @var{macro-body}}.
-@findex N_MAC_DEFINE
-
-An @code{#undef @var{macro-name}} is represented with an
-@code{N_MAC_UNDEF} stabs with a string field of simply
-@code{@var{macro-name}}.
-@findex N_MAC_UNDEF
-
-For both @code{N_MAC_DEFINE} and @code{N_MAC_UNDEF}, the desc field is
-the line number within the file where the corresponding @code{#define}
-or @code{#undef} occurred.
-
-For example, the following C code:
-
-@example
- #define NONE 42
- #define TWO(a, b) (a + (a) + 2 * b)
- #define ONE(c) (c + 19)
-
- main(int argc, char *argv[])
- @{
- func(NONE, TWO(10, 11));
- func(NONE, ONE(23));
-
- #undef ONE
- #define ONE(c) (c + 23)
-
- func(NONE, ONE(-23));
-
- return (0);
- @}
-
- int global;
-
- func(int arg1, int arg2)
- @{
- global = arg1 + arg2;
- @}
-@end example
-
-@noindent
-produces the following stabs (as well as many others):
-
-@example
- .stabs "NONE 42",54,0,1,0
- .stabs "TWO(a,b) (a + (a) + 2 * b)",54,0,2,0
- .stabs "ONE(c) (c + 19)",54,0,3,0
- .stabs "ONE",58,0,10,0
- .stabs "ONE(c) (c + 23)",54,0,11,0
-@end example
-
-@noindent
-NOTE: In the above example, @code{54} is @code{N_MAC_DEFINE} and
-@code{58} is @code{N_MAC_UNDEF}.
-
@node Symbol Tables
@chapter Symbol Information in Symbol Tables
@@ -3341,17 +3276,11 @@ Number of symbols (according to Ultrix V4.0); see @ref{N_NSYMS}.
@item 0x34 N_NOMAP
No DST map; see @ref{N_NOMAP}.
-@item 0x36 N_MAC_DEFINE
-Name and body of a @code{#define}d macro; see @ref{Macro define and undefine}.
-
@c FIXME: describe this solaris feature in the body of the text (see
@c comments in include/aout/stab.def).
@item 0x38 N_OBJ
Object file (Solaris2).
-@item 0x3a N_MAC_UNDEF
-Name of an @code{#undef}ed macro; see @ref{Macro define and undefine}.
-
@c See include/aout/stab.def for (a little) more info.
@item 0x3c N_OPT
Debugger options (Solaris2).
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index f4f725e..76a99fa 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -114,21 +114,24 @@ struct dwarf_expr_baton
/* Helper functions for dwarf2_evaluate_loc_desc. */
-/* Using the frame specified in BATON, return the value of register
- REGNUM, treated as an unsigned integer. */
+/* Using the frame specified in BATON, read register REGNUM. The lval
+ type will be returned in LVALP, and for lval_memory the register
+ save address will be returned in ADDRP. */
static CORE_ADDR
dwarf_expr_read_reg (void *baton, int dwarf_regnum)
{
struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
- CORE_ADDR result;
+ CORE_ADDR result, save_addr;
+ enum lval_type lval_type;
gdb_byte *buf;
- int regnum, regsize;
+ int optimized, regnum, realnum, regsize;
regnum = DWARF2_REG_TO_REGNUM (dwarf_regnum);
regsize = register_size (current_gdbarch, regnum);
buf = alloca (regsize);
- frame_register_read (debaton->frame, regnum, buf);
+ frame_register (debaton->frame, regnum, &optimized, &lval_type, &save_addr,
+ &realnum, buf);
/* NOTE: cagney/2003-05-22: This extract is assuming that a DWARF 2
address is always unsigned. That may or may not be true. */
result = extract_unsigned_integer (buf, regsize);
@@ -186,8 +189,86 @@ static CORE_ADDR
dwarf_expr_tls_address (void *baton, CORE_ADDR offset)
{
struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
+ volatile CORE_ADDR addr = 0;
- return target_translate_tls_address (debaton->objfile, offset);
+ if (target_get_thread_local_address_p ()
+ && gdbarch_fetch_tls_load_module_address_p (current_gdbarch))
+ {
+ ptid_t ptid = inferior_ptid;
+ struct objfile *objfile = debaton->objfile;
+ volatile struct gdb_exception ex;
+
+ TRY_CATCH (ex, RETURN_MASK_ALL)
+ {
+ CORE_ADDR lm_addr;
+
+ /* Fetch the load module address for this objfile. */
+ lm_addr = gdbarch_fetch_tls_load_module_address (current_gdbarch,
+ objfile);
+ /* If it's 0, throw the appropriate exception. */
+ if (lm_addr == 0)
+ throw_error (TLS_LOAD_MODULE_NOT_FOUND_ERROR,
+ _("TLS load module not found"));
+
+ addr = target_get_thread_local_address (ptid, lm_addr, offset);
+ }
+ /* If an error occurred, print TLS related messages here. Otherwise,
+ throw the error to some higher catcher. */
+ if (ex.reason < 0)
+ {
+ int objfile_is_library = (objfile->flags & OBJF_SHARED);
+
+ switch (ex.error)
+ {
+ case TLS_NO_LIBRARY_SUPPORT_ERROR:
+ error (_("Cannot find thread-local variables in this thread library."));
+ break;
+ case TLS_LOAD_MODULE_NOT_FOUND_ERROR:
+ if (objfile_is_library)
+ error (_("Cannot find shared library `%s' in dynamic"
+ " linker's load module list"), objfile->name);
+ else
+ error (_("Cannot find executable file `%s' in dynamic"
+ " linker's load module list"), objfile->name);
+ break;
+ case TLS_NOT_ALLOCATED_YET_ERROR:
+ if (objfile_is_library)
+ error (_("The inferior has not yet allocated storage for"
+ " thread-local variables in\n"
+ "the shared library `%s'\n"
+ "for %s"),
+ objfile->name, target_pid_to_str (ptid));
+ else
+ error (_("The inferior has not yet allocated storage for"
+ " thread-local variables in\n"
+ "the executable `%s'\n"
+ "for %s"),
+ objfile->name, target_pid_to_str (ptid));
+ break;
+ case TLS_GENERIC_ERROR:
+ if (objfile_is_library)
+ error (_("Cannot find thread-local storage for %s, "
+ "shared library %s:\n%s"),
+ target_pid_to_str (ptid),
+ objfile->name, ex.message);
+ else
+ error (_("Cannot find thread-local storage for %s, "
+ "executable file %s:\n%s"),
+ target_pid_to_str (ptid),
+ objfile->name, ex.message);
+ break;
+ default:
+ throw_exception (ex);
+ break;
+ }
+ }
+ }
+ /* It wouldn't be wrong here to try a gdbarch method, too; finding
+ TLS is an ABI-specific thing. But we don't do that yet. */
+ else
+ error (_("Cannot find thread-local variables on this target"));
+
+ return addr;
}
/* Evaluate a location description, starting at DATA and with length
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 4254f16..a56a5c2 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -389,9 +389,7 @@ struct dwarf2_per_cu_data
it. */
htab_t type_hash;
- /* The partial symbol table associated with this compilation unit,
- or NULL for partial units (which do not have an associated
- symtab). */
+ /* The partial symbol table associated with this compilation unit. */
struct partial_symtab *psymtab;
};
@@ -1068,8 +1066,7 @@ static void reset_die_and_siblings_types (struct die_info *,
static void create_all_comp_units (struct objfile *);
-static struct dwarf2_cu *load_full_comp_unit (struct dwarf2_per_cu_data *,
- struct objfile *);
+static struct dwarf2_cu *load_full_comp_unit (struct dwarf2_per_cu_data *);
static void process_full_comp_unit (struct dwarf2_per_cu_data *);
@@ -1473,14 +1470,6 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
info_ptr = read_partial_die (&comp_unit_die, abbrev, bytes_read,
abfd, info_ptr, &cu);
- if (comp_unit_die.tag == DW_TAG_partial_unit)
- {
- info_ptr = (beg_of_comp_unit + cu.header.length
- + cu.header.initial_length_size);
- do_cleanups (back_to_inner);
- continue;
- }
-
/* Set the language we're debugging */
set_cu_language (comp_unit_die.language, &cu);
@@ -2397,14 +2386,14 @@ process_queue (struct objfile *objfile)
{
/* Read in this compilation unit. This may add new items to
the end of the queue. */
- load_full_comp_unit (item->per_cu, objfile);
+ load_full_comp_unit (item->per_cu);
item->per_cu->cu->read_in_chain = dwarf2_per_objfile->read_in_chain;
dwarf2_per_objfile->read_in_chain = item->per_cu;
/* If this compilation unit has already had full symbols created,
reset the TYPE fields in each DIE. */
- if (item->per_cu->type_hash)
+ if (item->per_cu->psymtab->readin)
reset_die_and_siblings_types (item->per_cu->cu->dies,
item->per_cu->cu);
}
@@ -2413,7 +2402,7 @@ process_queue (struct objfile *objfile)
them, one at a time, removing from the queue as we finish. */
for (item = dwarf2_queue; item != NULL; dwarf2_queue = item = next_item)
{
- if (item->per_cu->psymtab && !item->per_cu->psymtab->readin)
+ if (!item->per_cu->psymtab->readin)
process_full_comp_unit (item->per_cu);
item->per_cu->queued = 0;
@@ -2506,9 +2495,10 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
/* Load the DIEs associated with PST and PER_CU into memory. */
static struct dwarf2_cu *
-load_full_comp_unit (struct dwarf2_per_cu_data *per_cu, struct objfile *objfile)
+load_full_comp_unit (struct dwarf2_per_cu_data *per_cu)
{
- bfd *abfd = objfile->obfd;
+ struct partial_symtab *pst = per_cu->psymtab;
+ bfd *abfd = pst->objfile->obfd;
struct dwarf2_cu *cu;
unsigned long offset;
gdb_byte *info_ptr;
@@ -2527,7 +2517,7 @@ load_full_comp_unit (struct dwarf2_per_cu_data *per_cu, struct objfile *objfile)
/* If an error occurs while loading, release our storage. */
free_cu_cleanup = make_cleanup (free_one_comp_unit, cu);
- cu->objfile = objfile;
+ cu->objfile = pst->objfile;
/* read in the comp_unit header */
info_ptr = read_comp_unit_head (&cu->header, info_ptr, abfd);
@@ -4292,10 +4282,6 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
if (attr)
TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR;
- attr = dwarf2_attr (die, DW_AT_name, cu);
- if (attr && DW_STRING (attr))
- TYPE_NAME (type) = DW_STRING (attr);
-
do_cleanups (back_to);
/* Install the type in the die. */
@@ -6635,7 +6621,6 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
CORE_ADDR baseaddr;
struct objfile *objfile = cu->objfile;
const int decode_for_pst_p = (pst != NULL);
- struct subfile *last_subfile = NULL;
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
@@ -6685,12 +6670,6 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
lh->file_names[file - 1].included_p = 1;
if (!decode_for_pst_p)
{
- if (last_subfile != current_subfile)
- {
- if (last_subfile)
- record_line (last_subfile, 0, address);
- last_subfile = current_subfile;
- }
/* Append row to matrix using current values. */
record_line (current_subfile, line,
check_cu_functions (address, cu));
@@ -6745,16 +6724,8 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
case DW_LNS_copy:
lh->file_names[file - 1].included_p = 1;
if (!decode_for_pst_p)
- {
- if (last_subfile != current_subfile)
- {
- if (last_subfile)
- record_line (last_subfile, 0, address);
- last_subfile = current_subfile;
- }
- record_line (current_subfile, line,
- check_cu_functions (address, cu));
- }
+ record_line (current_subfile, line,
+ check_cu_functions (address, cu));
basic_block = 0;
break;
case DW_LNS_advance_pc:
@@ -6781,10 +6752,7 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
dir = lh->include_dirs[fe->dir_index - 1];
if (!decode_for_pst_p)
- {
- last_subfile = current_subfile;
- dwarf2_start_subfile (fe->name, dir, comp_dir);
- }
+ dwarf2_start_subfile (fe->name, dir, comp_dir);
}
break;
case DW_LNS_set_column:
diff --git a/gdb/eval.c b/gdb/eval.c
index e1076e1..d5d8969 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -2019,21 +2019,6 @@ evaluate_subexp_standard (struct type *expect_type,
return value_at_lazy (exp->elts[pc + 1].type,
value_as_address (arg1));
- case UNOP_MEMVAL_TLS:
- (*pos) += 3;
- arg1 = evaluate_subexp (expect_type, exp, pos, noside);
- if (noside == EVAL_SKIP)
- goto nosideret;
- if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return value_zero (exp->elts[pc + 2].type, lval_memory);
- else
- {
- CORE_ADDR tls_addr;
- tls_addr = target_translate_tls_address (exp->elts[pc + 1].objfile,
- value_as_address (arg1));
- return value_at_lazy (exp->elts[pc + 2].type, tls_addr);
- }
-
case UNOP_PREINCREMENT:
arg1 = evaluate_subexp (expect_type, exp, pos, noside);
if (noside == EVAL_SKIP || noside == EVAL_AVOID_SIDE_EFFECTS)
diff --git a/gdb/exceptions.h b/gdb/exceptions.h
index 47ce077..3cdc537 100644
--- a/gdb/exceptions.h
+++ b/gdb/exceptions.h
@@ -71,9 +71,6 @@ enum errors {
more detail. */
TLS_GENERIC_ERROR,
- /* Problem parsing an XML document. */
- XML_PARSE_ERROR,
-
/* Add more errors here. */
NR_ERRORS
};
diff --git a/gdb/exec.c b/gdb/exec.c
index 4ef2f7a..9653c24 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -188,8 +188,6 @@ exec_file_attach (char *filename, int from_tty)
{
if (from_tty)
printf_unfiltered (_("No executable file now.\n"));
-
- set_gdbarch_from_file (NULL);
}
else
{
diff --git a/gdb/expprint.c b/gdb/expprint.c
index f64c3e9..c7633b5 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -31,7 +31,6 @@
#include "target.h"
#include "gdb_string.h"
#include "block.h"
-#include "objfiles.h"
#ifdef HAVE_CTYPE_H
#include <ctype.h>
@@ -415,18 +414,6 @@ print_subexp_standard (struct expression *exp, int *pos,
fputs_filtered (")", stream);
return;
- case UNOP_MEMVAL_TLS:
- (*pos) += 3;
- if ((int) prec > (int) PREC_PREFIX)
- fputs_filtered ("(", stream);
- fputs_filtered ("{", stream);
- type_print (exp->elts[pc + 2].type, "", stream, 0);
- fputs_filtered ("} ", stream);
- print_subexp (exp, pos, stream, PREC_PREFIX);
- if ((int) prec > (int) PREC_PREFIX)
- fputs_filtered (")", stream);
- return;
-
case BINOP_ASSIGN_MODIFY:
opcode = exp->elts[pc + 1].opcode;
(*pos) += 2;
@@ -707,8 +694,6 @@ op_name_standard (enum exp_opcode opcode)
return "UNOP_CAST";
case UNOP_MEMVAL:
return "UNOP_MEMVAL";
- case UNOP_MEMVAL_TLS:
- return "UNOP_MEMVAL_TLS";
case UNOP_NEG:
return "UNOP_NEG";
case UNOP_LOGICAL_NOT:
@@ -1014,16 +999,6 @@ dump_subexp_body_standard (struct expression *exp,
fprintf_filtered (stream, ")");
elt = dump_subexp (exp, stream, elt + 2);
break;
- case UNOP_MEMVAL_TLS:
- fprintf_filtered (stream, "TLS type @");
- gdb_print_host_address (exp->elts[elt + 1].type, stream);
- fprintf_filtered (stream, " (__thread /* \"%s\" */ ",
- (exp->elts[elt].objfile == NULL ? "(null)"
- : exp->elts[elt].objfile->name));
- type_print (exp->elts[elt + 1].type, NULL, stream, 0);
- fprintf_filtered (stream, ")");
- elt = dump_subexp (exp, stream, elt + 3);
- break;
case OP_TYPE:
fprintf_filtered (stream, "Type @");
gdb_print_host_address (exp->elts[elt].type, stream);
diff --git a/gdb/expression.h b/gdb/expression.h
index 4d9205d..dd6184a 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -234,13 +234,6 @@ enum exp_opcode
following subexpression. */
UNOP_MEMVAL,
- /* UNOP_MEMVAL_TLS is followed by a `struct objfile' pointer in the next
- exp_element and a type pointer in the following exp_element.
- With another UNOP_MEMVAL_TLS at the end, this makes four exp_elements.
- It casts the contents of the word offsetted by the value of the
- following subexpression from the TLS specified by `struct objfile'. */
- UNOP_MEMVAL_TLS,
-
/* UNOP_... operate on one value from a following subexpression
and replace it with a result. They take no immediate arguments. */
@@ -367,7 +360,6 @@ union exp_element
struct type *type;
struct internalvar *internalvar;
struct block *block;
- struct objfile *objfile;
};
struct expression
diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index 44049dc..8940151 100644
--- a/gdb/fork-child.c
+++ b/gdb/fork-child.c
@@ -277,7 +277,7 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env,
(*pre_trace_fun) ();
/* Create the child process. Since the child process is going to
- exec(3) shortly afterwards, try to reduce the overhead by
+ exec(3) shortlty afterwards, try to reduce the overhead by
calling vfork(2). However, if PRE_TRACE_FUN is non-null, it's
likely that this optimization won't work since there's too much
work to do between the vfork(2) and the exec(3). This is known
diff --git a/gdb/frame.c b/gdb/frame.c
index f1b28f7..13b57ad 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -107,10 +107,6 @@ struct frame_info
struct frame_info *next; /* down, inner, younger */
int prev_p;
struct frame_info *prev; /* up, outer, older */
-
- /* The reason why we could not set PREV, or UNWIND_NO_REASON if we
- could. Only valid when PREV_P is set. */
- enum unwind_stop_reason stop_reason;
};
/* Flag to control debugging. */
@@ -1023,36 +1019,6 @@ reinit_frame_cache (void)
}
}
-/* Find where a register is saved (in memory or another register).
- The result of frame_register_unwind is just where it is saved
- relative to this particular frame.
-
- FIXME: alpha, m32c, and h8300 actually do the transitive operation
- themselves. */
-
-static void
-frame_register_unwind_location (struct frame_info *this_frame, int regnum,
- int *optimizedp, enum lval_type *lvalp,
- CORE_ADDR *addrp, int *realnump)
-{
- gdb_assert (this_frame == NULL || this_frame->level >= 0);
-
- while (this_frame != NULL)
- {
- frame_register_unwind (this_frame, regnum, optimizedp, lvalp,
- addrp, realnump, NULL);
-
- if (*optimizedp)
- break;
-
- if (*lvalp != lval_register)
- break;
-
- regnum = *realnump;
- this_frame = get_next_frame (this_frame);
- }
-}
-
/* Return a "struct frame_info" corresponding to the frame that called
THIS_FRAME. Returns NULL if there is no such frame.
@@ -1089,7 +1055,6 @@ get_prev_frame_1 (struct frame_info *this_frame)
return this_frame->prev;
}
this_frame->prev_p = 1;
- this_frame->stop_reason = UNWIND_NO_REASON;
/* Check that this frame's ID was valid. If it wasn't, don't try to
unwind to the prev frame. Be careful to not apply this test to
@@ -1103,7 +1068,6 @@ get_prev_frame_1 (struct frame_info *this_frame)
fprint_frame (gdb_stdlog, NULL);
fprintf_unfiltered (gdb_stdlog, " // this ID is NULL }\n");
}
- this_frame->stop_reason = UNWIND_NULL_ID;
return NULL;
}
@@ -1114,68 +1078,14 @@ get_prev_frame_1 (struct frame_info *this_frame)
if (this_frame->next->level >= 0
&& this_frame->next->unwind->type != SIGTRAMP_FRAME
&& frame_id_inner (this_id, get_frame_id (this_frame->next)))
- {
- if (frame_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "-> ");
- fprint_frame (gdb_stdlog, NULL);
- fprintf_unfiltered (gdb_stdlog, " // this frame ID is inner }\n");
- }
- this_frame->stop_reason = UNWIND_INNER_ID;
- return NULL;
- }
+ error (_("Previous frame inner to this frame (corrupt stack?)"));
/* Check that this and the next frame are not identical. If they
are, there is most likely a stack cycle. As with the inner-than
test above, avoid comparing the inner-most and sentinel frames. */
if (this_frame->level > 0
&& frame_id_eq (this_id, get_frame_id (this_frame->next)))
- {
- if (frame_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "-> ");
- fprint_frame (gdb_stdlog, NULL);
- fprintf_unfiltered (gdb_stdlog, " // this frame has same ID }\n");
- }
- this_frame->stop_reason = UNWIND_SAME_ID;
- return NULL;
- }
-
- /* Check that this and the next frame do not unwind the PC register
- to the same memory location. If they do, then even though they
- have different frame IDs, the new frame will be bogus; two
- functions can't share a register save slot for the PC. This can
- happen when the prologue analyzer finds a stack adjustment, but
- no PC save. This check does assume that the "PC register" is
- roughly a traditional PC, even if the gdbarch_unwind_pc method
- frobs it. */
- if (this_frame->level > 0
- && get_frame_type (this_frame) == NORMAL_FRAME
- && get_frame_type (this_frame->next) == NORMAL_FRAME)
- {
- int optimized, realnum;
- enum lval_type lval, nlval;
- CORE_ADDR addr, naddr;
-
- frame_register_unwind_location (this_frame, PC_REGNUM, &optimized,
- &lval, &addr, &realnum);
- frame_register_unwind_location (get_next_frame (this_frame), PC_REGNUM,
- &optimized, &nlval, &naddr, &realnum);
-
- if (lval == lval_memory && lval == nlval && addr == naddr)
- {
- if (frame_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "-> ");
- fprint_frame (gdb_stdlog, NULL);
- fprintf_unfiltered (gdb_stdlog, " // no saved PC }\n");
- }
-
- this_frame->stop_reason = UNWIND_NO_SAVED_PC;
- this_frame->prev = NULL;
- return NULL;
- }
- }
+ error (_("Previous frame identical to this frame (corrupt stack?)"));
/* Allocate the new frame but do not wire it in to the frame chain.
Some (bad) code in INIT_FRAME_EXTRA_INFO tries to look along
@@ -1646,48 +1556,6 @@ frame_sp_unwind (struct frame_info *next_frame)
internal_error (__FILE__, __LINE__, _("Missing unwind SP method"));
}
-/* Return the reason why we can't unwind past FRAME. */
-
-enum unwind_stop_reason
-get_frame_unwind_stop_reason (struct frame_info *frame)
-{
- /* If we haven't tried to unwind past this point yet, then assume
- that unwinding would succeed. */
- if (frame->prev_p == 0)
- return UNWIND_NO_REASON;
-
- /* Otherwise, we set a reason when we succeeded (or failed) to
- unwind. */
- return frame->stop_reason;
-}
-
-/* Return a string explaining REASON. */
-
-const char *
-frame_stop_reason_string (enum unwind_stop_reason reason)
-{
- switch (reason)
- {
- case UNWIND_NULL_ID:
- return _("unwinder did not report frame ID");
-
- case UNWIND_INNER_ID:
- return _("previous frame inner to this frame (corrupt stack?)");
-
- case UNWIND_SAME_ID:
- return _("previous frame identical to this frame (corrupt stack?)");
-
- case UNWIND_NO_SAVED_PC:
- return _("frame did not save the PC");
-
- case UNWIND_NO_REASON:
- case UNWIND_FIRST_ERROR:
- default:
- internal_error (__FILE__, __LINE__,
- "Invalid frame stop reason");
- }
-}
-
extern initialize_file_ftype _initialize_frame; /* -Wmissing-prototypes */
static struct cmd_list_element *set_backtrace_cmdlist;
diff --git a/gdb/frame.h b/gdb/frame.h
index 5843a25..800cbfb 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -394,54 +394,6 @@ enum frame_type
};
extern enum frame_type get_frame_type (struct frame_info *);
-/* For frames where we can not unwind further, describe why. */
-
-enum unwind_stop_reason
- {
- /* No particular reason; either we haven't tried unwinding yet,
- or we didn't fail. */
- UNWIND_NO_REASON,
-
- /* The previous frame's analyzer returns an invalid result
- from this_id.
-
- FIXME drow/2006-08-16: This is how GDB used to indicate end of
- stack. We should migrate to a model where frames always have a
- valid ID, and this becomes not just an error but an internal
- error. But that's a project for another day. */
- UNWIND_NULL_ID,
-
- /* All the conditions after this point are considered errors;
- abnormal stack termination. If a backtrace stops for one
- of these reasons, we'll let the user know. This marker
- is not a valid stop reason. */
- UNWIND_FIRST_ERROR,
-
- /* This frame ID looks like it ought to belong to a NEXT frame,
- but we got it for a PREV frame. Normally, this is a sign of
- unwinder failure. It could also indicate stack corruption. */
- UNWIND_INNER_ID,
-
- /* This frame has the same ID as the previous one. That means
- that unwinding further would almost certainly give us another
- frame with exactly the same ID, so break the chain. Normally,
- this is a sign of unwinder failure. It could also indicate
- stack corruption. */
- UNWIND_SAME_ID,
-
- /* The frame unwinder didn't find any saved PC, but we needed
- one to unwind further. */
- UNWIND_NO_SAVED_PC,
- };
-
-/* Return the reason why we can't unwind past this frame. */
-
-enum unwind_stop_reason get_frame_unwind_stop_reason (struct frame_info *);
-
-/* Translate a reason code to an informative string. */
-
-const char *frame_stop_reason_string (enum unwind_stop_reason);
-
/* Unwind the stack frame so that the value of REGNUM, in the previous
(up, older) frame is returned. If VALUEP is NULL, don't
fetch/compute the value. Instead just return the location of the
diff --git a/gdb/gcore.c b/gdb/gcore.c
index 2d22ef9..6d9ae06 100644
--- a/gdb/gcore.c
+++ b/gdb/gcore.c
@@ -1,7 +1,6 @@
/* Generate a core file for the inferior process.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -32,11 +31,6 @@
#include "gdb_assert.h"
-/* The largest amount of memory to read from the target at once. We
- must throttle it to limit the amount of memory used by GDB during
- generate-core-file for programs with large resident data. */
-#define MAX_COPY_BYTES (1024 * 1024)
-
static char *default_gcore_target (void);
static enum bfd_architecture default_gcore_arch (void);
static unsigned long default_gcore_mach (void);
@@ -450,8 +444,7 @@ objfile_find_memory_regions (int (*func) (CORE_ADDR, unsigned long,
static void
gcore_copy_callback (bfd *obfd, asection *osec, void *ignored)
{
- bfd_size_type size, total_size = bfd_section_size (obfd, osec);
- file_ptr offset = 0;
+ bfd_size_type size = bfd_section_size (obfd, osec);
struct cleanup *old_chain = NULL;
void *memhunk;
@@ -463,35 +456,19 @@ gcore_copy_callback (bfd *obfd, asection *osec, void *ignored)
if (strncmp ("load", bfd_section_name (obfd, osec), 4) != 0)
return;
- size = min (total_size, MAX_COPY_BYTES);
memhunk = xmalloc (size);
/* ??? This is crap since xmalloc should never return NULL. */
if (memhunk == NULL)
error (_("Not enough memory to create corefile."));
old_chain = make_cleanup (xfree, memhunk);
- while (total_size > 0)
- {
- if (size > total_size)
- size = total_size;
-
- if (target_read_memory (bfd_section_vma (obfd, osec) + offset,
- memhunk, size) != 0)
- {
- warning (_("Memory read failed for corefile section, %s bytes at 0x%s."),
- paddr_d (size), paddr (bfd_section_vma (obfd, osec)));
- break;
- }
- if (!bfd_set_section_contents (obfd, osec, memhunk, offset, size))
- {
- warning (_("Failed to write corefile contents (%s)."),
- bfd_errmsg (bfd_get_error ()));
- break;
- }
-
- total_size -= size;
- offset += size;
- }
+ if (target_read_memory (bfd_section_vma (obfd, osec),
+ memhunk, size) != 0)
+ warning (_("Memory read failed for corefile section, %s bytes at 0x%s."),
+ paddr_d (size), paddr (bfd_section_vma (obfd, osec)));
+ if (!bfd_set_section_contents (obfd, osec, memhunk, 0, size))
+ warning (_("Failed to write corefile contents (%s)."),
+ bfd_errmsg (bfd_get_error ()));
do_cleanups (old_chain); /* Frees MEMHUNK. */
}
diff --git a/gdb/gdb_expat.h b/gdb/gdb_expat.h
deleted file mode 100644
index b330182..0000000
--- a/gdb/gdb_expat.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Slightly more portable version of <expat.h>.
-
- Copyright (C) 2006
- 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(GDB_EXPAT_H)
-#define GDB_EXPAT_H
-
-#include <expat.h>
-
-/* Expat 1.95.x does not define these; this is the definition
- recommended by the expat 2.0 headers. */
-#ifndef XML_STATUS_OK
-# define XML_STATUS_OK 1
-# define XML_STATUS_ERROR 0
-#endif
-
-#endif /* !defined(GDB_EXPAT_H) */
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 784816f..cad6e04 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -3987,7 +3987,7 @@ gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
that there is no current architecture. */
static struct gdbarch *
-find_arch_by_info (struct gdbarch_info info)
+find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
{
struct gdbarch *new_gdbarch;
struct gdbarch_registration *rego;
@@ -3997,9 +3997,9 @@ find_arch_by_info (struct gdbarch_info info)
gdb_assert (current_gdbarch == NULL);
/* Fill in missing parts of the INFO struct using a number of
- sources: "set ..."; INFOabfd supplied; and the global
- defaults. */
- gdbarch_info_fill (&info);
+ sources: "set ..."; INFOabfd supplied; and the existing
+ architecture. */
+ gdbarch_info_fill (old_gdbarch, &info);
/* Must have found some sort of architecture. */
gdb_assert (info.bfd_arch_info != NULL);
@@ -4130,7 +4130,7 @@ gdbarch_find_by_info (struct gdbarch_info info)
struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
/* Find the specified architecture. */
- struct gdbarch *new_gdbarch = find_arch_by_info (info);
+ struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
/* Restore the existing architecture. */
gdb_assert (current_gdbarch == NULL);
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 1bebaa6..a4764f8 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1420,7 +1420,8 @@ extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
``struct gdbarch'' for this architecture.
The INFO parameter is, as far as possible, be pre-initialized with
- information obtained from INFO.ABFD or the global defaults.
+ information obtained from INFO.ABFD or the previously selected
+ architecture.
The ARCHES parameter is a linked list (sorted most recently used)
of all the previously created architures for this architecture
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index a815f047..b3d3547 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -943,7 +943,8 @@ extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
\`\`struct gdbarch'' for this architecture.
The INFO parameter is, as far as possible, be pre-initialized with
- information obtained from INFO.ABFD or the global defaults.
+ information obtained from INFO.ABFD or the previously selected
+ architecture.
The ARCHES parameter is a linked list (sorted most recently used)
of all the previously created architures for this architecture
@@ -2049,7 +2050,7 @@ gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
that there is no current architecture. */
static struct gdbarch *
-find_arch_by_info (struct gdbarch_info info)
+find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
{
struct gdbarch *new_gdbarch;
struct gdbarch_registration *rego;
@@ -2059,9 +2060,9 @@ find_arch_by_info (struct gdbarch_info info)
gdb_assert (current_gdbarch == NULL);
/* Fill in missing parts of the INFO struct using a number of
- sources: "set ..."; INFOabfd supplied; and the global
- defaults. */
- gdbarch_info_fill (&info);
+ sources: "set ..."; INFOabfd supplied; and the existing
+ architecture. */
+ gdbarch_info_fill (old_gdbarch, &info);
/* Must have found some sort of architecture. */
gdb_assert (info.bfd_arch_info != NULL);
@@ -2192,7 +2193,7 @@ gdbarch_find_by_info (struct gdbarch_info info)
struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
/* Find the specified architecture. */
- struct gdbarch *new_gdbarch = find_arch_by_info (info);
+ struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
/* Restore the existing architecture. */
gdb_assert (current_gdbarch == NULL);
diff --git a/gdb/gdbcmd.h b/gdb/gdbcmd.h
index 29de2d1..a87b544 100644
--- a/gdb/gdbcmd.h
+++ b/gdb/gdbcmd.h
@@ -50,10 +50,6 @@ extern struct cmd_list_element *disablelist;
extern struct cmd_list_element *deletelist;
-/* Chain containing all defined detach subcommands. */
-
-extern struct cmd_list_element *detachlist;
-
/* Chain containing all defined toggle subcommands. */
extern struct cmd_list_element *togglelist;
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 3a53f86..25b7ed5 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,47 +1,3 @@
-2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
-
- * server.c (handle_query): Correct error handling for read_auxv.
-
-2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
-
- * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
- and srv_linux_thread_db to yes.
- * linux-s390-low.c (s390_fill_gregset): New function.
- (target_regsets): Define data structure.
-
-2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
-
- * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
- * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
- * config.in, configure: Regenerated.
- * inferiors.c (gdb_id_to_thread): New function.
- (gdb_id_to_thread_id): Use it.
- * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
- * linux-low.h (struct process_info): Add th member.
- (thread_db_get_tls_address): New prototype.
- * remote-utils.c (decode_address): Make non-static.
- * server.c (handle_query): Handle qGetTLSAddr.
- * server.h (gdb_id_to_thread, decode_address): New prototypes.
- * target.h (struct target_ops): Add get_tls_address.
- * thread-db.c (maybe_attach_thread): Save the thread handle.
- (thread_db_get_tls_address): New.
-
-2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
-
- * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
- (linux_resume_one_process): Take a siginfo_t *. Update all
- callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
- (struct pending_signals): Add a siginfo_t.
- (linux_wait_for_process): Always set last_status.
- (linux_wait_for_event): Use PTRACE_GETSIGINFO.
- (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
- * linux-low.h (struct process_info): Add last_status.
-
-2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
-
- * remote-utils.c (try_rle): New function.
- (putpkt_binary): Use it.
-
2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.in (clean): Clean reg-x86-64-linux.c.
diff --git a/gdb/gdbserver/acinclude.m4 b/gdb/gdbserver/acinclude.m4
index aaad2e2..be7fe27 100644
--- a/gdb/gdbserver/acinclude.m4
+++ b/gdb/gdbserver/acinclude.m4
@@ -41,23 +41,3 @@ AC_DEFUN([SRV_CHECK_THREAD_DB],
])
LIBS="$old_LIBS"
])])
-
-AC_DEFUN([SRV_CHECK_TLS_GET_ADDR],
-[AC_CACHE_CHECK([for thread_db_tls_get_addr],[srv_cv_tls_get_addr],
- [old_LIBS="$LIBS"
- LIBS="$LIBS $srv_cv_thread_db"
- AC_TRY_LINK(
- [void ps_pglobal_lookup() {}
- void ps_pdread() {}
- void ps_pdwrite() {}
- void ps_lgetregs() {}
- void ps_lsetregs() {}
- void ps_lgetfpregs() {}
- void ps_lsetfpregs() {}
- void ps_get_thread_area() {}
- void ps_getpid() {}],
- [td_thr_tls_get_addr();],
- [srv_cv_tls_get_addr=yes],
- [srv_cv_tls_get_addr=no])
- LIBS="$old_LIBS"
-])])
diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
index 16d013d..70116aa 100644
--- a/gdb/gdbserver/config.in
+++ b/gdb/gdbserver/config.in
@@ -92,9 +92,6 @@
/* Define to 1 if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
-/* Define if td_thr_tls_get_addr is available. */
-#undef HAVE_TD_THR_TLS_GET_ADDR
-
/* Define if TD_VERSION is available. */
#undef HAVE_TD_VERSION
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index a5b5e05..1888bc3 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -1,8 +1,9 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
+# Generated by GNU Autoconf 2.60.
#
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
@@ -16,11 +17,35 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
@@ -29,8 +54,43 @@ else
fi
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
PS1='$ '
PS2='> '
PS4='+ '
@@ -44,18 +104,19 @@ do
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
- $as_unset $as_var
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
fi
done
# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
@@ -63,157 +124,386 @@ fi
# Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+# CDPATH.
+$as_unset CDPATH
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
fi
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
+ case $as_dir in
/*)
- if ("$as_dir/$as_base" -c '
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
as_lineno_1=$LINENO
as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell autoconf@gnu.org about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
+ s/-\n.*//
' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
+ chmod +x "$as_me.lineno" ||
{ echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
@@ -222,7 +512,19 @@ else
as_mkdir_p=false
fi
-as_executable_p="test -f"
+# Find out whether ``test -x'' works. Don't use a zero-byte file, as
+# systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ as_executable_p="test -x"
+else
+ as_executable_p=:
+fi
+rm -f conf$$.file
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -231,39 +533,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
+exec 7<&0 </dev/null 6>&1
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-exec 6>&1
-
#
# Initializations.
#
ac_default_prefix=/usr/local
+ac_clean_files=
ac_config_libobj_dir=.
+LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
# Identity of this package.
PACKAGE_NAME=
PACKAGE_TARNAME=
@@ -300,17 +590,92 @@ ac_includes_default="\
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
+#endif
+#if HAVE_STDINT_H
+# include <stdint.h>
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP RDYNAMIC GDBSERVER_DEPFILES GDBSERVER_LIBS USE_THREAD_DB LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+target
+target_cpu
+target_vendor
+target_os
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+CPP
+GREP
+EGREP
+RDYNAMIC
+GDBSERVER_DEPFILES
+GDBSERVER_LIBS
+USE_THREAD_DB
+LIBOBJS
+LTLIBOBJS'
ac_subst_files=''
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+CPP'
+
# Initialize some variables set by options.
ac_init_help=
@@ -337,34 +702,48 @@ x_libraries=NONE
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
ac_prev=
+ac_dashdash=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
+ eval $ac_prev=\$ac_option
ac_prev=
continue
fi
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
# Accept the important Cygnus configure options, so we can diagnose typos.
- case $ac_option in
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
@@ -386,12 +765,18 @@ do
--config-cache | -C)
cache_file=config.cache ;;
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ -datadir | --datadir | --datadi | --datad)
ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
datadir=$ac_optarg ;;
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
-disable-* | --disable-*)
ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
@@ -399,7 +784,17 @@ do
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
+ eval enable_$ac_feature=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
-enable-* | --enable-*)
ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
@@ -408,11 +803,7 @@ do
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
+ eval enable_$ac_feature=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -439,6 +830,12 @@ do
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
@@ -463,13 +860,16 @@ do
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
-localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
+ | --localstate | --localstat | --localsta | --localst | --locals)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -534,6 +934,16 @@ do
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
@@ -590,11 +1000,7 @@ do
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
+ eval with_$ac_package=\$ac_optarg ;;
-without-* | --without-*)
ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
@@ -603,7 +1009,7 @@ do
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
+ eval with_$ac_package=no ;;
--x)
# Obsolete; use --with-x.
@@ -634,8 +1040,7 @@ Try \`$0 --help' for more information." >&2
expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid variable name: $ac_envvar" >&2
{ (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
+ eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
@@ -655,27 +1060,19 @@ if test -n "$ac_prev"; then
{ (exit 1); exit 1; }; }
fi
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
+# Be sure to have absolute directory names.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
do
- eval ac_val=$`echo $ac_var`
+ eval ac_val=\$$ac_var
case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
+ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
done
# There might be people who depend on the old broken behavior: `$host'
@@ -702,74 +1099,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { echo "$as_me: error: Working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$0" ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$0" : 'X\(//\)[^/]' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
+ if test ! -r "$srcdir/$ac_unique_file"; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
{ (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
{ (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
#
# Report the --help message.
@@ -798,9 +1197,6 @@ Configuration:
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
-_ACEOF
-
- cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
@@ -818,15 +1214,22 @@ Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
_ACEOF
cat <<\_ACEOF
@@ -852,126 +1255,94 @@ Some influential environment variables:
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
_ACEOF
+ac_status=$?
fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
+ test -d "$ac_dir" || continue
ac_builddir=.
-if test "$ac_dir" != .; then
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
case $srcdir in
- .) # No --srcdir option. We are building in place.
+ .) # We are building in place.
ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
done
fi
-test -n "$ac_init_help" && exit 0
+test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.60
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
- exit 0
+ exit
fi
-exec 5>config.log
-cat >&5 <<_ACEOF
+cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
_ACEOF
+exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
@@ -990,7 +1361,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
@@ -1004,6 +1375,7 @@ do
test -z "$as_dir" && as_dir=.
echo "PATH: $as_dir"
done
+IFS=$as_save_IFS
} >&5
@@ -1025,7 +1397,6 @@ _ACEOF
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
-ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
@@ -1036,7 +1407,7 @@ do
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ *\'*)
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
@@ -1058,9 +1429,7 @@ do
-* ) ac_must_keep_next=true ;;
esac
fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
+ ac_configure_args="$ac_configure_args '$ac_arg'"
;;
esac
done
@@ -1071,8 +1440,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
@@ -1085,20 +1454,34 @@ trap 'exit_status=$?
_ASBOX
echo
# The following way of writing the cache mishandles newlines in values,
-{
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
(set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
*)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
- esac;
-}
+ esac |
+ sort
+)
echo
cat <<\_ASBOX
@@ -1109,22 +1492,28 @@ _ASBOX
echo
for ac_var in $ac_subst_vars
do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
_ASBOX
echo
for ac_var in $ac_subst_files
do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
@@ -1136,26 +1525,24 @@ _ASBOX
## ----------- ##
_ASBOX
echo
- sed "/^$/d" confdefs.h | sort
+ cat confdefs.h
echo
fi
test "$ac_signal" != 0 &&
echo "$as_me: caught signal $ac_signal"
echo "$as_me: exit $exit_status"
} >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
- ' 0
+' 0
for ac_signal in 1 2 13 15; do
trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
+rm -f -r conftest* confdefs.h
# Predefined preprocessor variables.
@@ -1186,14 +1573,17 @@ _ACEOF
# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+if test -n "$CONFIG_SITE"; then
+ set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+ set x "$ac_default_prefix/share/config.site" \
+ "$ac_default_prefix/etc/config.site"
fi
-for ac_site_file in $CONFIG_SITE; do
+shift
+for ac_site_file
+do
if test -r "$ac_site_file"; then
{ echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
@@ -1209,8 +1599,8 @@ if test -r "$cache_file"; then
{ echo "$as_me:$LINENO: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
esac
fi
else
@@ -1222,12 +1612,11 @@ fi
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+for ac_var in $ac_precious_vars; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
{ echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
@@ -1252,8 +1641,7 @@ echo "$as_me: current value: $ac_new_val" >&2;}
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -1270,12 +1658,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov
{ (exit 1); exit 1; }; }
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
@@ -1292,9 +1674,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- ac_config_headers="$ac_config_headers config.h:config.in"
+ac_config_headers="$ac_config_headers config.h:config.in"
ac_ext=c
@@ -1305,8 +1692,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1319,32 +1706,34 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1357,36 +1746,51 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1399,74 +1803,34 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
+ fi
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1480,7 +1844,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -1491,6 +1855,7 @@ do
fi
done
done
+IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
@@ -1508,22 +1873,23 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
+
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
+ for ac_prog in cl.exe
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1536,36 +1902,38 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
+
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
- for ac_prog in cl
+ for ac_prog in cl.exe
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1578,29 +1946,45 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
+
test -n "$ac_ct_CC" && break
done
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
fi
fi
@@ -1613,21 +1997,35 @@ See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
+echo "$as_me:$LINENO: checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
@@ -1652,46 +2050,70 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort. b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions. Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link_default") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files
do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
break;;
* )
break;;
esac
done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -1704,19 +2126,23 @@ See \`config.log' for more details." >&2;}
fi
ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
-# Check the compiler produces executables we can run. If not, either
+# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -1735,22 +2161,27 @@ See \`config.log' for more details." >&2;}
fi
fi
fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
rm -f a.out a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
+# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6; }
+
+{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
@@ -1761,9 +2192,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
break;;
* ) break;;
esac
@@ -1777,14 +2207,14 @@ See \`config.log' for more details." >&2;}
fi
rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
if test "${ac_cv_objext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1804,14 +2234,20 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
@@ -1829,12 +2265,12 @@ fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1857,24 +2293,36 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -1883,24 +2331,139 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_compiler_gnu=no
+ ac_compiler_gnu=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -1916,24 +2479,36 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -1942,12 +2517,20 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_prog_cc_g=no
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
@@ -1963,12 +2546,12 @@ else
CFLAGS=
fi
fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_prog_cc_stdc=no
+ ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -2002,12 +2585,17 @@ static char *f (char * (*g) (char **, int), char **p, ...)
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
+ as 'x'. The following induces an error, until -std is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
+ that's true only with -std. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2022,205 +2610,74 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
return 0;
}
_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
+ ac_cv_prog_cc_c89=$ac_arg
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
done
-rm -f conftest.$ac_ext conftest.$ac_objext
+rm -f conftest.$ac_ext
CC=$ac_save_CC
fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+ xno)
+ { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
*)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
+ CC="$CC $ac_cv_prog_cc_c89"
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
esac
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2229,104 +2686,154 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
- elif test -f $ac_dir/install.sh; then
+ elif test -f "$ac_dir/install.sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
- elif test -f $ac_dir/shtool; then
+ elif test -f "$ac_dir/shtool"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
{ (exit 1); exit 1; }; }
fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
{ (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
if test "${ac_cv_build+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
{ { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
{ (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
{ (exit 1); exit 1; }; }
fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
if test "${ac_cv_host+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
{ (exit 1); exit 1; }; }
+fi
fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
if test "${ac_cv_target+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_target_alias=$target_alias
-test "x$ac_cv_target_alias" = "x" &&
- ac_cv_target_alias=$ac_cv_host_alias
-ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ if test "x$target_alias" = x; then
+ ac_cv_target=$ac_cv_host
+else
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
{ (exit 1); exit 1; }; }
+fi
fi
-echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
+echo "$as_me: error: invalid value of canonical target" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
target=$ac_cv_target
-target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
# The aliases save the names the user supplied, while $host etc.
@@ -2349,8 +2856,8 @@ test -n "$target_alias" &&
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2372,7 +2879,7 @@ case $as_dir/ in
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -2391,21 +2898,22 @@ case $as_dir/ in
;;
esac
done
+IFS=$as_save_IFS
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL=$ac_cv_path_install
else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
- # removed, or if the path is relative.
+ # removed, or if the value is a relative name.
INSTALL=$ac_install_sh
fi
fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -2417,17 +2925,17 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
test "$program_prefix" != NONE &&
- program_transform_name="s,^,$program_prefix,;$program_transform_name"
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
- program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
# Double any \ or $. echo might interpret backslashes.
# By default was `s,x,x', remove it if useless.
cat <<\_ACEOF >conftest.sed
s/[\\$]/&&/g;s/;s,x,x,$//
_ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
+rm -f conftest.sed
@@ -2436,8 +2944,8 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2471,8 +2979,13 @@ cat >>conftest.$ac_ext <<_ACEOF
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -2497,9 +3010,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
+
rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether non-existent headers
+ # OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -2509,8 +3023,13 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -2537,6 +3056,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_preproc_ok=:
break
fi
+
rm -f conftest.err conftest.$ac_ext
done
@@ -2554,8 +3074,8 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
+{ echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
@@ -2578,8 +3098,13 @@ cat >>conftest.$ac_ext <<_ACEOF
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -2604,9 +3129,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
+
rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether non-existent headers
+ # OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -2616,8 +3142,13 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -2644,6 +3175,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_preproc_ok=:
break
fi
+
rm -f conftest.err conftest.$ac_ext
done
@@ -2666,23 +3198,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
+ # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_GREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_EGREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -2706,24 +3385,36 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -2732,9 +3423,10 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_header_stdc=no
+ ac_cv_header_stdc=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
@@ -2790,6 +3482,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ctype.h>
+#include <stdlib.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
@@ -2809,18 +3502,27 @@ main ()
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
+ return 2;
+ return 0;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -2833,12 +3535,14 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+
+
fi
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
cat >>confdefs.h <<\_ACEOF
@@ -2862,9 +3566,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -2878,24 +3582,36 @@ $ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -2904,12 +3620,14 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_Header=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
@@ -2942,18 +3660,19 @@ done
for ac_header in sgtty.h termio.h termios.h sys/reg.h string.h proc_service.h sys/procfs.h thread_db.h linux/elf.h stdlib.h unistd.h terminal.h sys/ioctl.h netinet/in.h sys/socket.h netdb.h netinet/tcp.h arpa/inet.h sys/wait.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
else
# Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -2964,24 +3683,36 @@ $ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -2990,15 +3721,16 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -3007,8 +3739,13 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -3032,9 +3769,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
+
rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -3058,25 +3796,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+
;;
esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -3089,8 +3821,8 @@ fi
done
-echo "$as_me:$LINENO: checking whether strerror is declared" >&5
-echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether strerror is declared" >&5
+echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6; }
if test "${ac_cv_have_decl_strerror+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3106,6 +3838,7 @@ main ()
{
#ifndef strerror
char *p = (char *) strerror;
+ return !p;
#endif
;
@@ -3113,24 +3846,36 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -3139,12 +3884,13 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_have_decl_strerror=no
+ ac_cv_have_decl_strerror=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
-echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6; }
if test $ac_cv_have_decl_strerror = yes; then
cat >>confdefs.h <<_ACEOF
@@ -3162,8 +3908,8 @@ fi
-echo "$as_me:$LINENO: checking for socklen_t" >&5
-echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for socklen_t" >&5
+echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
if test "${ac_cv_type_socklen_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3177,36 +3923,49 @@ cat >>conftest.$ac_ext <<_ACEOF
#include <sys/socket.h>
+typedef socklen_t ac__type_new_;
int
main ()
{
-if ((socklen_t *) 0)
+if ((ac__type_new_ *) 0)
return 0;
-if (sizeof (socklen_t))
+if (sizeof (ac__type_new_))
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -3215,12 +3974,13 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_type_socklen_t=no
+ ac_cv_type_socklen_t=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
-echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
+echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
if test $ac_cv_type_socklen_t = yes; then
cat >>confdefs.h <<_ACEOF
@@ -3256,8 +4016,8 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
- echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
-echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6
+ { echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
+echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6; }
if test "${gdbsrv_cv_have_ptrace_getregs+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3277,24 +4037,36 @@ PTRACE_GETREGS;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -3303,13 +4075,14 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gdbsrv_cv_have_ptrace_getregs=no
+ gdbsrv_cv_have_ptrace_getregs=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- echo "$as_me:$LINENO: result: $gdbsrv_cv_have_ptrace_getregs" >&5
-echo "${ECHO_T}$gdbsrv_cv_have_ptrace_getregs" >&6
+ { echo "$as_me:$LINENO: result: $gdbsrv_cv_have_ptrace_getregs" >&5
+echo "${ECHO_T}$gdbsrv_cv_have_ptrace_getregs" >&6; }
if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
cat >>confdefs.h <<\_ACEOF
@@ -3318,8 +4091,8 @@ _ACEOF
fi
- echo "$as_me:$LINENO: checking for PTRACE_GETFPXREGS" >&5
-echo $ECHO_N "checking for PTRACE_GETFPXREGS... $ECHO_C" >&6
+ { echo "$as_me:$LINENO: checking for PTRACE_GETFPXREGS" >&5
+echo $ECHO_N "checking for PTRACE_GETFPXREGS... $ECHO_C" >&6; }
if test "${gdbsrv_cv_have_ptrace_getfpxregs+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3339,24 +4112,36 @@ PTRACE_GETFPXREGS;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -3365,13 +4150,14 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gdbsrv_cv_have_ptrace_getfpxregs=no
+ gdbsrv_cv_have_ptrace_getfpxregs=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- echo "$as_me:$LINENO: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
-echo "${ECHO_T}$gdbsrv_cv_have_ptrace_getfpxregs" >&6
+ { echo "$as_me:$LINENO: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
+echo "${ECHO_T}$gdbsrv_cv_have_ptrace_getfpxregs" >&6; }
if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
cat >>confdefs.h <<\_ACEOF
@@ -3382,8 +4168,8 @@ _ACEOF
fi
if test "$ac_cv_header_sys_procfs_h" = yes; then
- echo "$as_me:$LINENO: checking for lwpid_t in sys/procfs.h" >&5
-echo $ECHO_N "checking for lwpid_t in sys/procfs.h... $ECHO_C" >&6
+ { echo "$as_me:$LINENO: checking for lwpid_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for lwpid_t in sys/procfs.h... $ECHO_C" >&6; }
if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3405,24 +4191,36 @@ lwpid_t avar
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -3431,10 +4229,11 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-bfd_cv_have_sys_procfs_type_lwpid_t=no
+ bfd_cv_have_sys_procfs_type_lwpid_t=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
@@ -3444,11 +4243,11 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
- echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
-echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpid_t" >&6
+ { echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
- echo "$as_me:$LINENO: checking for psaddr_t in sys/procfs.h" >&5
-echo $ECHO_N "checking for psaddr_t in sys/procfs.h... $ECHO_C" >&6
+ { echo "$as_me:$LINENO: checking for psaddr_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for psaddr_t in sys/procfs.h... $ECHO_C" >&6; }
if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3470,24 +4269,36 @@ psaddr_t avar
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -3496,10 +4307,11 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-bfd_cv_have_sys_procfs_type_psaddr_t=no
+ bfd_cv_have_sys_procfs_type_psaddr_t=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
@@ -3509,11 +4321,11 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
- echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
-echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psaddr_t" >&6
+ { echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
- echo "$as_me:$LINENO: checking for prgregset_t in sys/procfs.h" >&5
-echo $ECHO_N "checking for prgregset_t in sys/procfs.h... $ECHO_C" >&6
+ { echo "$as_me:$LINENO: checking for prgregset_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for prgregset_t in sys/procfs.h... $ECHO_C" >&6; }
if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3535,24 +4347,36 @@ prgregset_t avar
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -3561,10 +4385,11 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-bfd_cv_have_sys_procfs_type_prgregset_t=no
+ bfd_cv_have_sys_procfs_type_prgregset_t=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
@@ -3574,11 +4399,11 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
- echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
-echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset_t" >&6
+ { echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
- echo "$as_me:$LINENO: checking for elf_fpregset_t in sys/procfs.h" >&5
-echo $ECHO_N "checking for elf_fpregset_t in sys/procfs.h... $ECHO_C" >&6
+ { echo "$as_me:$LINENO: checking for elf_fpregset_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for elf_fpregset_t in sys/procfs.h... $ECHO_C" >&6; }
if test "${bfd_cv_have_sys_procfs_type_elf_fpregset_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3600,24 +4425,36 @@ elf_fpregset_t avar
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -3626,10 +4463,11 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
+ bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
@@ -3639,8 +4477,8 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
- echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
-echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6
+ { echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
fi
@@ -3649,8 +4487,8 @@ srv_libs=
USE_THREAD_DB=
if test "$srv_linux_thread_db" = "yes"; then
- echo "$as_me:$LINENO: checking for libthread_db" >&5
-echo $ECHO_N "checking for libthread_db... $ECHO_C" >&6
+ { echo "$as_me:$LINENO: checking for libthread_db" >&5
+echo $ECHO_N "checking for libthread_db... $ECHO_C" >&6; }
if test "${srv_cv_thread_db+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3680,24 +4518,36 @@ td_ta_new();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -3706,7 +4556,7 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-srv_cv_thread_db=no
+ srv_cv_thread_db=no
if test "$prefix" = "/usr" || test "$prefix" = "NONE"; then
thread_db="/lib/libthread_db.so.1"
@@ -3738,24 +4588,36 @@ td_ta_new();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -3764,19 +4626,21 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-srv_cv_thread_db=no
+ srv_cv_thread_db=no
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS="$old_LIBS"
fi
-echo "$as_me:$LINENO: result: $srv_cv_thread_db" >&5
-echo "${ECHO_T}$srv_cv_thread_db" >&6
+{ echo "$as_me:$LINENO: result: $srv_cv_thread_db" >&5
+echo "${ECHO_T}$srv_cv_thread_db" >&6; }
if test "$srv_cv_thread_db" = no; then
{ echo "$as_me:$LINENO: WARNING: Could not find libthread_db." >&5
echo "$as_me: WARNING: Could not find libthread_db." >&2;}
@@ -3785,72 +4649,6 @@ echo "$as_me: WARNING: Disabling thread support in gdbserver." >&2;}
srv_linux_thread_db=no
else
srv_libs="$srv_cv_thread_db"
- echo "$as_me:$LINENO: checking for thread_db_tls_get_addr" >&5
-echo $ECHO_N "checking for thread_db_tls_get_addr... $ECHO_C" >&6
-if test "${srv_cv_tls_get_addr+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- old_LIBS="$LIBS"
- LIBS="$LIBS $srv_cv_thread_db"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-void ps_pglobal_lookup() {}
- void ps_pdread() {}
- void ps_pdwrite() {}
- void ps_lgetregs() {}
- void ps_lsetregs() {}
- void ps_lgetfpregs() {}
- void ps_lsetfpregs() {}
- void ps_get_thread_area() {}
- void ps_getpid() {}
-int
-main ()
-{
-td_thr_tls_get_addr();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- srv_cv_tls_get_addr=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-srv_cv_tls_get_addr=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LIBS="$old_LIBS"
-
-fi
-echo "$as_me:$LINENO: result: $srv_cv_tls_get_addr" >&5
-echo "${ECHO_T}$srv_cv_tls_get_addr" >&6
fi
old_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -rdynamic"
@@ -3870,24 +4668,36 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -3896,9 +4706,10 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-RDYNAMIC=
+ RDYNAMIC=
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS="$old_LDFLAGS"
@@ -3907,8 +4718,8 @@ fi
if test "$srv_linux_thread_db" = "yes"; then
srv_thread_depfiles="thread-db.o proc-service.o"
USE_THREAD_DB="-DUSE_THREAD_DB"
- echo "$as_me:$LINENO: checking for TD_VERSION" >&5
-echo $ECHO_N "checking for TD_VERSION... $ECHO_C" >&6
+ { echo "$as_me:$LINENO: checking for TD_VERSION" >&5
+echo $ECHO_N "checking for TD_VERSION... $ECHO_C" >&6; }
if test "${gdbsrv_cv_have_td_version+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3928,24 +4739,36 @@ TD_VERSION;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -3954,12 +4777,13 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gdbsrv_cv_have_td_version=no
+ gdbsrv_cv_have_td_version=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $gdbsrv_cv_have_td_version" >&5
-echo "${ECHO_T}$gdbsrv_cv_have_td_version" >&6
+{ echo "$as_me:$LINENO: result: $gdbsrv_cv_have_td_version" >&5
+echo "${ECHO_T}$gdbsrv_cv_have_td_version" >&6; }
if test $gdbsrv_cv_have_td_version = yes; then
cat >>confdefs.h <<\_ACEOF
@@ -3967,14 +4791,6 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
-
- if test "$srv_cv_tls_get_addr"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TD_THR_TLS_GET_ADDR 1
-_ACEOF
-
- fi
fi
GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
@@ -3984,8 +4800,10 @@ GDBSERVER_LIBS="$srv_libs"
- ac_config_files="$ac_config_files Makefile"
- ac_config_commands="$ac_config_commands default"
+ac_config_files="$ac_config_files Makefile"
+
+ac_config_commands="$ac_config_commands default"
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -4004,39 +4822,58 @@ _ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
+# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-{
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \).
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
+ ;; #(
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
- esac;
-} |
+ esac |
+ sort
+) |
sed '
+ /^ac_cv_env_/b end
t clear
- : clear
+ :clear
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
cat confcache >$cache_file
else
- echo "not updating unwritable cache $cache_file"
+ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -4045,32 +4882,18 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
@@ -4108,11 +4931,35 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
@@ -4121,8 +4968,43 @@ else
fi
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
PS1='$ '
PS2='> '
PS4='+ '
@@ -4136,18 +5018,19 @@ do
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
- $as_unset $as_var
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
fi
done
# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
@@ -4155,159 +5038,120 @@ fi
# Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
+# CDPATH.
+$as_unset CDPATH
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
as_lineno_1=$LINENO
as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
+ s/-\n.*//
' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
@@ -4316,7 +5160,19 @@ else
as_mkdir_p=false
fi
-as_executable_p="test -f"
+# Find out whether ``test -x'' works. Don't use a zero-byte file, as
+# systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ as_executable_p="test -x"
+else
+ as_executable_p=:
+fi
+rm -f conf$$.file
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -4325,31 +5181,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
exec 6>&1
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# Save the log message, to keep $[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
+# values after options handling.
+ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -4357,30 +5196,20 @@ generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
+_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
-
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.
@@ -4407,19 +5236,21 @@ Configuration commands:
$config_commands
Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
+_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.60,
+ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2006 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
@@ -4430,39 +5261,24 @@ while test $# != 0
do
case $1 in
--*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
- -*)
+ *)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
esac
case $ac_option in
# Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
@@ -4472,18 +5288,24 @@ Try \`$0 --help' for more information." >&2;}
$ac_shift
CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ { echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
+ -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; } ;;
- *) ac_config_targets="$ac_config_targets $1" ;;
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
esac
shift
@@ -4499,30 +5321,44 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ CONFIG_SHELL=$SHELL
+ export CONFIG_SHELL
+ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi
_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ echo "$ac_log"
+} >&5
-
-
-
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
for ac_config_target in $ac_config_targets
do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
done
+
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
@@ -4534,689 +5370,531 @@ if $ac_need_defaults; then
fi
# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
+# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
trap '{ (exit 1); exit 1; }' 1 2 13 15
}
-
# Create a (secure) tmp directory for tmp files.
{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
} ||
{
echo "$me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
#
-# CONFIG_FILES section.
+# Set up the sed scripts for CONFIG_FILES section.
#
# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@target@,$target,;t t
-s,@target_cpu@,$target_cpu,;t t
-s,@target_vendor@,$target_vendor,;t t
-s,@target_os@,$target_os,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@RDYNAMIC@,$RDYNAMIC,;t t
-s,@GDBSERVER_DEPFILES@,$GDBSERVER_DEPFILES,;t t
-s,@GDBSERVER_LIBS@,$GDBSERVER_LIBS,;t t
-s,@USE_THREAD_DB@,$USE_THREAD_DB,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
+if test -n "$CONFIG_FILES"; then
_ACEOF
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+target!$target$ac_delim
+target_cpu!$target_cpu$ac_delim
+target_vendor!$target_vendor$ac_delim
+target_os!$target_os$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+CPP!$CPP$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+RDYNAMIC!$RDYNAMIC$ac_delim
+GDBSERVER_DEPFILES!$GDBSERVER_DEPFILES$ac_delim
+GDBSERVER_LIBS!$GDBSERVER_LIBS$ac_delim
+USE_THREAD_DB!$USE_THREAD_DB$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 68; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
-fi # test -n "$CONFIG_FILES"
+done
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ ac_file_inputs="$ac_file_inputs $ac_f"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input="Generated from "`IFS=:
+ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ fi
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin";;
+ esac
+ ;;
esac
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+ ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
{ (exit 1); exit 1; }; }; }
-
ac_builddir=.
-if test "$ac_dir" != .; then
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
case $srcdir in
- .) # No --srcdir option. We are building in place.
+ .) # We are building in place.
ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
case $INSTALL in
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
esac
+_ACEOF
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
+ -) cat "$tmp/out"; rm -f "$tmp/out";;
+ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
esac
-
- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- # Do quote $f, to prevent DOS paths from being IFS'd.
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
- # Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
_ACEOF
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h. The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status. Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless. Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #undef with comments. This is necessary, for
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status. If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless. But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
+ac_dB='\\)[ (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
+
+uniq confdefs.h |
+ sed -n '
+ t rset
+ :rset
+ s/^[ ]*#[ ]*define[ ][ ]*//
+ t ok
+ d
+ :ok
+ s/[\\&,]/\\&/g
+ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+ ' >>conftest.defines
+
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo ' :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[ #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
do
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ # Write a here document:
+ cat >>$CONFIG_STATUS <<_ACEOF
+ # First, check the format of the line:
+ cat >"\$tmp/defines.sed" <<\\CEOF
+/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
+/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
+b
+:def
+_ACEOF
+ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
echo 'CEOF
- sed -f $tmp/defines.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+ grep . conftest.tail >/dev/null || break
rm -f conftest.defines
mv conftest.tail conftest.defines
done
-rm -f conftest.defines
-echo ' fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- rm -f conftest.undefs
- mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
+rm -f conftest.defines conftest.tail
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
cat >>$CONFIG_STATUS <<\_ACEOF
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- echo "/* Generated by configure. */" >$tmp/config.h
- else
- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- fi
- cat $tmp/in >>$tmp/config.h
- rm -f $tmp/in
if test x"$ac_file" != x-; then
- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ echo "/* $configure_input */" >"$tmp/config.h"
+ cat "$ac_result" >>"$tmp/config.h"
+ if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
{ echo "$as_me:$LINENO: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
rm -f $ac_file
- mv $tmp/config.h $ac_file
+ mv "$tmp/config.h" $ac_file
fi
else
- cat $tmp/config.h
- rm -f $tmp/config.h
+ echo "/* $configure_input */"
+ cat "$ac_result"
fi
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_COMMANDS section.
-#
-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
+ rm -f "$tmp/out12"
+ ;;
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
+ :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
+echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
- { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
-echo "$as_me: executing $ac_dest commands" >&6;}
- case $ac_dest in
- default ) case x$CONFIG_HEADERS in
+ case $ac_file$ac_mode in
+ "default":C) case x$CONFIG_HEADERS in
xconfig.h:config.in)
echo > stamp-h ;;
esac
;;
+
esac
-done
-_ACEOF
+done # for ac_tag
-cat >>$CONFIG_STATUS <<\_ACEOF
{ (exit 0); exit 0; }
_ACEOF
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index ce8ed2a..e43b28a 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -115,7 +115,6 @@ if test "$srv_linux_thread_db" = "yes"; then
srv_linux_thread_db=no
else
srv_libs="$srv_cv_thread_db"
- SRV_CHECK_TLS_GET_ADDR
fi
old_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -rdynamic"
@@ -134,10 +133,6 @@ if test "$srv_linux_thread_db" = "yes"; then
if test $gdbsrv_cv_have_td_version = yes; then
AC_DEFINE(HAVE_TD_VERSION, 1, [Define if TD_VERSION is available.])
fi
-
- if test "$srv_cv_tls_get_addr"; then
- AC_DEFINE(HAVE_TD_THR_TLS_GET_ADDR, 1, [Define if td_thr_tls_get_addr is available.])
- fi
fi
GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
index 3287955..40805e5 100644
--- a/gdb/gdbserver/configure.srv
+++ b/gdb/gdbserver/configure.srv
@@ -87,14 +87,10 @@ case "${target}" in
s390-*-linux*) srv_regobj=reg-s390.o
srv_tgtobj="linux-low.o linux-s390-low.o"
srv_linux_usrregs=yes
- srv_linux_regsets=yes
- srv_linux_thread_db=yes
;;
s390x-*-linux*) srv_regobj=reg-s390x.o
srv_tgtobj="linux-low.o linux-s390-low.o"
srv_linux_usrregs=yes
- srv_linux_regsets=yes
- srv_linux_thread_db=yes
;;
sh*-*-linux*) srv_regobj=reg-sh.o
srv_tgtobj="linux-low.o linux-sh-low.o"
diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c
index ff761bc..6fa665f 100644
--- a/gdb/gdbserver/inferiors.c
+++ b/gdb/gdbserver/inferiors.c
@@ -144,8 +144,8 @@ thread_to_gdb_id (struct thread_info *thread)
return thread->gdb_id;
}
-struct thread_info *
-gdb_id_to_thread (unsigned int gdb_id)
+unsigned long
+gdb_id_to_thread_id (unsigned int gdb_id)
{
struct inferior_list_entry *inf = all_threads.head;
@@ -153,19 +153,11 @@ gdb_id_to_thread (unsigned int gdb_id)
{
struct thread_info *thread = get_thread (inf);
if (thread->gdb_id == gdb_id)
- return thread;
+ return inf->id;
inf = inf->next;
}
- return NULL;
-}
-
-unsigned long
-gdb_id_to_thread_id (unsigned int gdb_id)
-{
- struct thread_info *thread = gdb_id_to_thread (gdb_id);
-
- return thread ? thread->entry.id : 0;
+ return 0;
}
static void
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 2a780ea..b0f0b60 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -38,11 +38,6 @@
#include <errno.h>
#include <sys/syscall.h>
-#ifndef PTRACE_GETSIGINFO
-# define PTRACE_GETSIGINFO 0x4202
-# define PTRACE_SETSIGINFO 0x4203
-#endif
-
/* ``all_threads'' is keyed by the LWP ID - it should be the thread ID instead,
however. This requires changing the ID in place when we go from !using_threads
to using_threads, immediately.
@@ -59,7 +54,7 @@ int stopping_threads;
int using_threads;
static void linux_resume_one_process (struct inferior_list_entry *entry,
- int step, int signal, siginfo_t *info);
+ int step, int signal);
static void linux_resume (struct thread_resume *resume_info);
static void stop_all_processes (void);
static int linux_wait_for_event (struct thread_info *child);
@@ -67,7 +62,6 @@ static int linux_wait_for_event (struct thread_info *child);
struct pending_signals
{
int signal;
- siginfo_t info;
struct pending_signals *prev;
};
@@ -372,7 +366,7 @@ status_pending_p (struct inferior_list_entry *entry, void *dummy)
So instead of reporting the old SIGTRAP, pretend we got to
the breakpoint just after it was removed instead of just
before; resume the process. */
- linux_resume_one_process (&process->head, 0, 0, NULL);
+ linux_resume_one_process (&process->head, 0, 0);
return 0;
}
@@ -425,8 +419,6 @@ linux_wait_for_process (struct process_info **childp, int *wstatp)
(*childp)->stopped = 1;
(*childp)->pending_is_breakpoint = 0;
- (*childp)->last_status = *wstatp;
-
if (debug_threads
&& WIFSTOPPED (*wstatp))
{
@@ -535,7 +527,7 @@ linux_wait_for_event (struct thread_info *child)
fprintf (stderr, "Expected stop.\n");
event_child->stop_expected = 0;
linux_resume_one_process (&event_child->head,
- event_child->stepping, 0, NULL);
+ event_child->stepping, 0);
continue;
}
@@ -545,20 +537,13 @@ linux_wait_for_event (struct thread_info *child)
&& (WSTOPSIG (wstat) == __SIGRTMIN
|| WSTOPSIG (wstat) == __SIGRTMIN + 1))
{
- siginfo_t info, *info_p;
-
if (debug_threads)
fprintf (stderr, "Ignored signal %d for %ld (LWP %ld).\n",
WSTOPSIG (wstat), event_child->tid,
event_child->head.id);
-
- if (ptrace (PTRACE_GETSIGINFO, event_child->lwpid, 0, &info) == 0)
- info_p = &info;
- else
- info_p = NULL;
linux_resume_one_process (&event_child->head,
event_child->stepping,
- WSTOPSIG (wstat), info_p);
+ WSTOPSIG (wstat));
continue;
}
}
@@ -587,7 +572,7 @@ linux_wait_for_event (struct thread_info *child)
event_child->bp_reinsert = 0;
/* Clear the single-stepping flag and SIGTRAP as we resume. */
- linux_resume_one_process (&event_child->head, 0, 0, NULL);
+ linux_resume_one_process (&event_child->head, 0, 0);
continue;
}
@@ -624,13 +609,13 @@ linux_wait_for_event (struct thread_info *child)
{
event_child->bp_reinsert = stop_pc;
uninsert_breakpoint (stop_pc);
- linux_resume_one_process (&event_child->head, 1, 0, NULL);
+ linux_resume_one_process (&event_child->head, 1, 0);
}
else
{
reinsert_breakpoint_by_bp
(stop_pc, (*the_low_target.breakpoint_reinsert_addr) ());
- linux_resume_one_process (&event_child->head, 0, 0, NULL);
+ linux_resume_one_process (&event_child->head, 0, 0);
}
continue;
@@ -855,7 +840,7 @@ stop_all_processes (void)
static void
linux_resume_one_process (struct inferior_list_entry *entry,
- int step, int signal, siginfo_t *info)
+ int step, int signal)
{
struct process_info *process = (struct process_info *) entry;
struct thread_info *saved_inferior;
@@ -874,10 +859,6 @@ linux_resume_one_process (struct inferior_list_entry *entry,
p_sig = malloc (sizeof (*p_sig));
p_sig->prev = process->pending_signals;
p_sig->signal = signal;
- if (info == NULL)
- memset (&p_sig->info, 0, sizeof (siginfo_t));
- else
- memcpy (&p_sig->info, info, sizeof (siginfo_t));
process->pending_signals = p_sig;
}
@@ -933,9 +914,6 @@ linux_resume_one_process (struct inferior_list_entry *entry,
p_sig = &(*p_sig)->prev;
signal = (*p_sig)->signal;
- if ((*p_sig)->info.si_signo != 0)
- ptrace (PTRACE_SETSIGINFO, process->lwpid, 0, &(*p_sig)->info);
-
free (*p_sig);
*p_sig = NULL;
}
@@ -1002,7 +980,7 @@ linux_continue_one_thread (struct inferior_list_entry *entry)
else
step = process->resume->step;
- linux_resume_one_process (&process->head, step, process->resume->sig, NULL);
+ linux_resume_one_process (&process->head, step, process->resume->sig);
process->resume = NULL;
}
@@ -1033,16 +1011,6 @@ linux_queue_one_thread (struct inferior_list_entry *entry)
p_sig = malloc (sizeof (*p_sig));
p_sig->prev = process->pending_signals;
p_sig->signal = process->resume->sig;
- memset (&p_sig->info, 0, sizeof (siginfo_t));
-
- /* If this is the same signal we were previously stopped by,
- make sure to queue its siginfo. We can ignore the return
- value of ptrace; if it fails, we'll skip
- PTRACE_SETSIGINFO. */
- if (WIFSTOPPED (process->last_status)
- && WSTOPSIG (process->last_status) == process->resume->sig)
- ptrace (PTRACE_GETSIGINFO, process->lwpid, 0, &p_sig->info);
-
process->pending_signals = p_sig;
}
@@ -1652,13 +1620,6 @@ static struct target_ops linux_target_ops = {
linux_stopped_data_address,
#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_MMU__)
linux_read_offsets,
-#else
- NULL,
-#endif
-#ifdef USE_THREAD_DB
- thread_db_get_tls_address,
-#else
- NULL,
#endif
};
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
index 53c5934..516b40d 100644
--- a/gdb/gdbserver/linux-low.h
+++ b/gdb/gdbserver/linux-low.h
@@ -18,10 +18,6 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-#ifdef HAVE_THREAD_DB_H
-#include <thread_db.h>
-#endif
-
#ifdef HAVE_LINUX_REGSETS
typedef void (*regset_fill_func) (void *);
typedef void (*regset_store_func) (const void *);
@@ -96,9 +92,6 @@ struct process_info
event already received in a wait()). */
int stopped;
- /* When stopped is set, the last wait status recorded for this process. */
- int last_status;
-
/* If this flag is set, we have sent a SIGSTOP to this process and are
waiting for it to stop. */
int sigstop_sent;
@@ -128,11 +121,6 @@ struct process_info
and then processed and cleared in linux_resume_one_process. */
struct thread_resume *resume;
-
-#ifdef HAVE_THREAD_DB_H
- /* The thread handle, used for e.g. TLS access. */
- td_thrhandle_t th;
-#endif
};
extern struct inferior_list all_processes;
@@ -140,5 +128,3 @@ extern struct inferior_list all_processes;
void linux_attach_lwp (unsigned long pid, unsigned long tid);
int thread_db_init (void);
-int thread_db_get_tls_address (struct thread_info *thread, CORE_ADDR offset,
- CORE_ADDR load_module, CORE_ADDR *address);
diff --git a/gdb/gdbserver/linux-s390-low.c b/gdb/gdbserver/linux-s390-low.c
index c2511a5..7ebb8e9 100644
--- a/gdb/gdbserver/linux-s390-low.c
+++ b/gdb/gdbserver/linux-s390-low.c
@@ -1,6 +1,6 @@
/* GNU/Linux S/390 specific low level interface, for the remote server
for GDB.
- Copyright (C) 2001, 2002, 2005, 2006
+ Copyright (C) 2001, 2002, 2005
Free Software Foundation, Inc.
This file is part of GDB.
@@ -75,22 +75,6 @@ s390_cannot_store_register (int regno)
return 0;
}
-/* Provide only a fill function for the general register set. ps_lgetregs
- will use this for NPTL support. */
-
-static void s390_fill_gregset (void *buf)
-{
- int i;
-
- for (i = 0; i < 34; i++)
- collect_register (i, (char *) buf + s390_regmap[i]);
-}
-
-struct regset_info target_regsets[] = {
- { 0, 0, 0, GENERAL_REGS, s390_fill_gregset, NULL },
- { 0, 0, -1, -1, NULL, NULL }
-};
-
static const unsigned char s390_breakpoint[] = { 0, 1 };
#define s390_breakpoint_len 2
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index eb5d05d..8da223f 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -279,7 +279,7 @@ unhexify (char *bin, const char *hex, int count)
return i;
}
-void
+static void
decode_address (CORE_ADDR *addrp, const char *start, int len)
{
CORE_ADDR addr;
@@ -406,50 +406,6 @@ remote_unescape_input (const gdb_byte *buffer, int len,
return output_index;
}
-/* Look for a sequence of characters which can be run-length encoded.
- If there are any, update *CSUM and *P. Otherwise, output the
- single character. Return the number of characters consumed. */
-
-static int
-try_rle (char *buf, int remaining, unsigned char *csum, char **p)
-{
- int n;
-
- /* Always output the character. */
- *csum += buf[0];
- *(*p)++ = buf[0];
-
- /* Don't go past '~'. */
- if (remaining > 97)
- remaining = 97;
-
- for (n = 1; n < remaining; n++)
- if (buf[n] != buf[0])
- break;
-
- /* N is the index of the first character not the same as buf[0].
- buf[0] is counted twice, so by decrementing N, we get the number
- of characters the RLE sequence will replace. */
- n--;
-
- if (n < 3)
- return 1;
-
- /* Skip the frame characters. The manual says to skip '+' and '-'
- also, but there's no reason to. Unfortunately these two unusable
- characters double the encoded length of a four byte zero
- value. */
- while (n + 29 == '$' || n + 29 == '#')
- n--;
-
- *csum += '*';
- *(*p)++ = '*';
- *csum += n + 29;
- *(*p)++ = n + 29;
-
- return n + 1;
-}
-
/* Send a packet to the remote machine, with error checking.
The data of the packet is in BUF, and the length of the
packet is in CNT. Returns >= 0 on success, -1 otherwise. */
@@ -471,9 +427,11 @@ putpkt_binary (char *buf, int cnt)
p = buf2;
*p++ = '$';
- for (i = 0; i < cnt;)
- i += try_rle (buf + i, cnt - i, &csum, &p);
-
+ for (i = 0; i < cnt; i++)
+ {
+ csum += buf[i];
+ *p++ = buf[i];
+ }
*p++ = '#';
*p++ = tohex ((csum >> 4) & 0xf);
*p++ = tohex (csum & 0xf);
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 5f78736..c30a61a 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -232,9 +232,7 @@ handle_query (char *own_buf, int *new_packet_len_p)
len = PBUFSIZ - 2;
data = malloc (len + 1);
n = (*the_target->read_auxv) (ofs, data, len + 1);
- if (n < 0)
- write_enn (own_buf);
- else if (n > len)
+ if (n > len)
*new_packet_len_p = write_qxfer_response (own_buf, data, len, 1);
else
*new_packet_len_p = write_qxfer_response (own_buf, data, n, 0);
@@ -256,65 +254,6 @@ handle_query (char *own_buf, int *new_packet_len_p)
return;
}
- /* Thread-local storage support. */
- if (the_target->get_tls_address != NULL
- && strncmp ("qGetTLSAddr:", own_buf, 12) == 0)
- {
- char *p = own_buf + 12;
- CORE_ADDR parts[3], address = 0;
- int i, err;
-
- for (i = 0; i < 3; i++)
- {
- char *p2;
- int len;
-
- if (p == NULL)
- break;
-
- p2 = strchr (p, ',');
- if (p2)
- {
- len = p2 - p;
- p2++;
- }
- else
- {
- len = strlen (p);
- p2 = NULL;
- }
-
- decode_address (&parts[i], p, len);
- p = p2;
- }
-
- if (p != NULL || i < 3)
- err = 1;
- else
- {
- struct thread_info *thread = gdb_id_to_thread (parts[0]);
-
- if (thread == NULL)
- err = 2;
- else
- err = the_target->get_tls_address (thread, parts[1], parts[2],
- &address);
- }
-
- if (err == 0)
- {
- sprintf (own_buf, "%llx", address);
- return;
- }
- else if (err > 0)
- {
- write_enn (own_buf);
- return;
- }
-
- /* Otherwise, pretend we do not understand this packet. */
- }
-
/* Otherwise we didn't know what packet it was. Say we didn't
understand it. */
own_buf[0] = 0;
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index 5e7d394..00e281a 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -105,7 +105,6 @@ void add_thread (unsigned long thread_id, void *target_data, unsigned int);
unsigned int thread_id_to_gdb_id (unsigned long);
unsigned int thread_to_gdb_id (struct thread_info *);
unsigned long gdb_id_to_thread_id (unsigned int);
-struct thread_info *gdb_id_to_thread (unsigned int);
void clear_inferiors (void);
struct inferior_list_entry *find_inferior
(struct inferior_list *,
@@ -153,7 +152,6 @@ void new_thread_notify (int id);
void dead_thread_notify (int id);
void prepare_resume_reply (char *buf, char status, unsigned char sig);
-void decode_address (CORE_ADDR *addrp, const char *start, int len);
void decode_m_packet (char *from, CORE_ADDR * mem_addr_ptr,
unsigned int *len_ptr);
void decode_M_packet (char *from, CORE_ADDR * mem_addr_ptr,
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index b2f9b09..9ee87a2 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -163,15 +163,6 @@ struct target_ops
time. */
int (*read_offsets) (CORE_ADDR *text, CORE_ADDR *data);
-
- /* Fetch the address associated with a specific thread local storage
- area, determined by the specified THREAD, OFFSET, and LOAD_MODULE.
- Stores it in *ADDRESS and returns zero on success; otherwise returns
- an error code. A return value of -1 means this system does not
- support the operation. */
-
- int (*get_tls_address) (struct thread_info *thread, CORE_ADDR offset,
- CORE_ADDR load_module, CORE_ADDR *address);
};
extern struct target_ops *the_target;
diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c
index 78bc6434..24531bf 100644
--- a/gdb/gdbserver/thread-db.c
+++ b/gdb/gdbserver/thread-db.c
@@ -266,7 +266,6 @@ found:
process->lwpid = ti_p->ti_lid;
process->thread_known = 1;
- process->th = *th_p;
err = td_thr_event_enable (th_p, 1);
if (err != TD_OK)
error ("Cannot enable thread event reporting for %d: %s",
@@ -321,33 +320,6 @@ thread_db_look_up_symbols (void)
}
int
-thread_db_get_tls_address (struct thread_info *thread, CORE_ADDR offset,
- CORE_ADDR load_module, CORE_ADDR *address)
-{
-#if HAVE_TD_THR_TLS_GET_ADDR
- psaddr_t addr;
- td_err_e err;
- struct process_info *process;
-
- process = get_thread_process (thread);
- if (!process->thread_known)
- return TD_NOTHR;
-
- err = td_thr_tls_get_addr (&process->th, (psaddr_t) load_module, offset,
- &addr);
- if (err == TD_OK)
- {
- *address = (CORE_ADDR) addr;
- return 0;
- }
- else
- return err;
-#else
- return -1;
-#endif
-}
-
-int
thread_db_init ()
{
int err;
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 9f12896..3a1ad6a 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -336,9 +336,6 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
struct cleanup *caller_regcache_cleanup;
struct frame_id dummy_id;
- if (TYPE_CODE (ftype) == TYPE_CODE_PTR)
- ftype = check_typedef (TYPE_TARGET_TYPE (ftype));
-
if (!target_has_execution)
noprocess ();
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 704fb12..12a305d 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -468,10 +468,6 @@ run_command_1 (char *args, int from_tty, int tbreak_at_main)
kill_if_already_running (from_tty);
clear_breakpoint_hit_counts ();
- /* Clean up any leftovers from other runs. Some other things from
- this function should probably be moved into target_pre_inferior. */
- target_pre_inferior (from_tty);
-
/* Purge old solib objfiles. */
objfile_purge_solibs ();
@@ -1851,10 +1847,6 @@ attach_command (char *args, int from_tty)
error (_("Not killed."));
}
- /* Clean up any leftovers from other runs. Some other things from
- this function should probably be moved into target_pre_inferior. */
- target_pre_inferior (from_tty);
-
/* Clear out solib state. Otherwise the solib state of the previous
inferior might have survived and is entirely wrong for the new
target. This has been observed on Linux using glibc 2.3. How to
@@ -2123,11 +2115,10 @@ directory, or (if not found there) using the source file search path\n\
(see the \"directory\" command). You can also use the \"file\" command\n\
to specify the program, and to load its symbol table."));
- add_prefix_cmd ("detach", class_run, detach_command, _("\
+ add_com ("detach", class_run, detach_command, _("\
Detach a process or file previously attached.\n\
If a process, it is no longer traced, and it continues its execution. If\n\
-you were debugging a file, the file is closed and gdb no longer accesses it."),
- &detachlist, "detach ", 0, &cmdlist);
+you were debugging a file, the file is closed and gdb no longer accesses it."));
add_com ("disconnect", class_run, disconnect_command, _("\
Disconnect from a target.\n\
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 6160656..b3a5f55 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -269,7 +269,7 @@ extern int gdb_has_a_terminal (void);
/* From infrun.c */
-extern void start_remote (int from_tty);
+extern void start_remote (void);
extern void normal_stop (void);
diff --git a/gdb/infrun.c b/gdb/infrun.c
index b9652f6..1c31a84 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2,9 +2,8 @@
process.
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006
- Free Software Foundation, Inc.
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
+ Software Foundation, Inc.
This file is part of GDB.
@@ -833,7 +832,7 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
/* Start remote-debugging of a machine over a serial link. */
void
-start_remote (int from_tty)
+start_remote (void)
{
init_thread_list ();
init_wait_for_inferior ();
@@ -855,12 +854,6 @@ start_remote (int from_tty)
is currently running and GDB state should be set to the same as
for an async run. */
wait_for_inferior ();
-
- /* Now that the inferior has stopped, do any bookkeeping like
- loading shared libraries. We want to do this before normal_stop,
- so that the displayed frame is up to date. */
- post_create_inferior (&current_target, from_tty);
-
normal_stop ();
}
@@ -1418,12 +1411,6 @@ handle_inferior_event (struct execution_control_state *ecs)
pending_follow.fork_event.parent_pid = PIDGET (ecs->ptid);
pending_follow.fork_event.child_pid = ecs->ws.value.related_pid;
- if (!ptid_equal (ecs->ptid, inferior_ptid))
- {
- context_switch (ecs);
- flush_cached_frames ();
- }
-
stop_pc = read_pc ();
stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid, 0);
@@ -1482,12 +1469,6 @@ handle_inferior_event (struct execution_control_state *ecs)
ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
inferior_ptid = ecs->saved_inferior_ptid;
- if (!ptid_equal (ecs->ptid, inferior_ptid))
- {
- context_switch (ecs);
- flush_cached_frames ();
- }
-
/* If no catchpoint triggered for this, then keep going. */
if (ecs->random_signal)
{
diff --git a/gdb/interps.c b/gdb/interps.c
index d65a0ff..f72f683 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -402,9 +402,9 @@ interpreter_exec_cmd (char *args, int from_tty)
if (e.reason < 0)
{
interp_set (old_interp);
- interp_set_quiet (interp_to_use, use_quiet);
- interp_set_quiet (old_interp, old_quiet);
+ interp_set_quiet (interp_to_use, old_quiet);
error (_("error in command: \"%s\"."), prules[i]);
+ break;
}
}
diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c
index 8b413d9..e96275b 100644
--- a/gdb/linux-fork.c
+++ b/gdb/linux-fork.c
@@ -693,12 +693,11 @@ Argument 'n' is checkpoint ID, as displayed by 'info checkpoints'."));
Delete a fork/checkpoint (experimental)."),
&deletelist);
- /* Detach checkpoint command: release the process to run independently,
+ /* Detach-checkpoint command: release the process to run independantly,
and remove it from the fork list. */
- add_cmd ("checkpoint", class_obscure, detach_fork_command, _("\
-Detach from a fork/checkpoint (experimental)."),
- &detachlist);
+ add_com ("detach-checkpoint", class_obscure, detach_fork_command, _("\
+Detach from a fork/checkpoint (experimental)."));
/* Info checkpoints command: list all forks/checkpoints
currently under gdb's control. */
@@ -710,7 +709,7 @@ Detach from a fork/checkpoint (experimental)."),
interchangeably). */
add_alias_cmd ("fork", "checkpoint", class_obscure, 1, &deletelist);
- add_alias_cmd ("fork", "checkpoint", class_obscure, 1, &detachlist);
+ add_com_alias ("detach-fork", "detach-checkpoint", class_obscure, 1);
add_info_alias ("forks", "checkpoints", 0);
/* "fork <n>" (by analogy to "thread <n>"). */
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 584bffa..d9e5726 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -276,7 +276,6 @@ linux_test_for_tracefork (int original_pid)
ret = ptrace (PTRACE_KILL, second_pid, 0, 0);
if (ret != 0)
warning (_("linux_test_for_tracefork: failed to kill second child"));
- my_waitpid (second_pid, &status, 0);
}
}
else
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index a6d05f0..517dc44 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -599,10 +599,6 @@ check_for_thread_db (void)
if (!target_has_execution)
return;
- /* Don't attempt to use thread_db for remote targets. */
- if (!target_can_run (&current_target))
- return;
-
/* Initialize the structure that identifies the child process. */
proc_handle.pid = GET_PID (inferior_ptid);
@@ -876,8 +872,7 @@ thread_db_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
post-processing and bail out early. */
return ptid;
- if (ourstatus->kind == TARGET_WAITKIND_EXITED
- || ourstatus->kind == TARGET_WAITKIND_SIGNALLED)
+ if (ourstatus->kind == TARGET_WAITKIND_EXITED)
return pid_to_ptid (-1);
if (ourstatus->kind == TARGET_WAITKIND_EXECD)
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index 1fd1126..8ea84ac 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -1196,9 +1196,6 @@ m32c_decode_srcdest4 (struct m32c_pv_state *st,
else
sd.kind = srcdest_mem;
- sd.addr = pv_unknown ();
- sd.reg = 0;
-
switch (code)
{
case 0x0: sd.reg = (size == 1 ? &st->r0 : &st->r0); break;
@@ -1235,9 +1232,6 @@ m32c_decode_sd23 (struct m32c_pv_state *st, int code, int size, int ind)
{
struct srcdest sd;
- sd.addr = pv_unknown ();
- sd.reg = 0;
-
switch (code)
{
case 0x12:
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index fb6d73d..168eef1 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -1,7 +1,7 @@
/* Target-dependent code for the Motorola 68000 series.
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GDB.
@@ -677,10 +677,10 @@ m68k_analyze_register_saves (CORE_ADDR pc, CORE_ADDR current_pc,
else
break;
}
- else if ((op & 0177760) == P_MOVEL_SP)
+ else if ((op & 0170677) == P_MOVEL_SP)
{
/* move.l %R,-(%sp) */
- regno = op & 017;
+ regno = ((op & 07000) >> 9) | ((op & 0100) >> 3);
cache->saved_regs[regno] = offset;
offset -= 4;
pc += 2;
diff --git a/gdb/memattr.c b/gdb/memattr.c
index 889d03a..3a5f7d0 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -1,7 +1,6 @@
/* Memory attributes support, for GDB.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of GDB.
@@ -27,7 +26,6 @@
#include "target.h"
#include "value.h"
#include "language.h"
-#include "vec.h"
#include "gdb_string.h"
const struct mem_attrib default_mem_attrib =
@@ -36,158 +34,57 @@ const struct mem_attrib default_mem_attrib =
MEM_WIDTH_UNSPECIFIED,
0, /* hwbreak */
0, /* cache */
- 0, /* verify */
- -1 /* Flash blocksize not specified. */
+ 0 /* verify */
};
-VEC(mem_region_s) *mem_region_list, *target_mem_region_list;
+static struct mem_region *mem_region_chain = NULL;
static int mem_number = 0;
-/* If this flag is set, the memory region list should be automatically
- updated from the target. If it is clear, the list is user-controlled
- and should be left alone. */
-static int mem_use_target = 1;
-
-/* If this flag is set, we have tried to fetch the target memory regions
- since the last time it was invalidated. If that list is still
- empty, then the target can't supply memory regions. */
-static int target_mem_regions_valid;
-
-/* Predicate function which returns true if LHS should sort before RHS
- in a list of memory regions, useful for VEC_lower_bound. */
-
-static int
-mem_region_lessthan (const struct mem_region *lhs,
- const struct mem_region *rhs)
-{
- return lhs->lo < rhs->lo;
-}
-
-/* A helper function suitable for qsort, used to sort a
- VEC(mem_region_s) by starting address. */
-
-int
-mem_region_cmp (const void *untyped_lhs, const void *untyped_rhs)
-{
- const struct mem_region *lhs = untyped_lhs;
- const struct mem_region *rhs = untyped_rhs;
-
- if (lhs->lo < rhs->lo)
- return -1;
- else if (lhs->lo == rhs->lo)
- return 0;
- else
- return 1;
-}
-
-/* Allocate a new memory region, with default settings. */
-
-void
-mem_region_init (struct mem_region *new)
-{
- memset (new, 0, sizeof (struct mem_region));
- new->enabled_p = 1;
- new->attrib = default_mem_attrib;
-}
-
-/* This function should be called before any command which would
- modify the memory region list. It will handle switching from
- a target-provided list to a local list, if necessary. */
-
-static void
-require_user_regions (int from_tty)
-{
- struct mem_region *m;
- int ix, length;
-
- /* If we're already using a user-provided list, nothing to do. */
- if (!mem_use_target)
- return;
-
- /* Switch to a user-provided list (possibly a copy of the current
- one). */
- mem_use_target = 0;
-
- /* If we don't have a target-provided region list yet, then
- no need to warn. */
- if (mem_region_list == NULL)
- return;
-
- /* Otherwise, let the user know how to get back. */
- if (from_tty)
- warning (_("Switching to manual control of memory regions; use "
- "\"mem auto\" to fetch regions from the target again."));
-
- /* And create a new list for the user to modify. */
- length = VEC_length (mem_region_s, target_mem_region_list);
- mem_region_list = VEC_alloc (mem_region_s, length);
- for (ix = 0; VEC_iterate (mem_region_s, target_mem_region_list, ix, m); ix++)
- VEC_quick_push (mem_region_s, mem_region_list, m);
-}
-
-/* This function should be called before any command which would
- read the memory region list, other than those which call
- require_user_regions. It will handle fetching the
- target-provided list, if necessary. */
-
-static void
-require_target_regions (void)
-{
- if (mem_use_target && !target_mem_regions_valid)
- {
- target_mem_regions_valid = 1;
- target_mem_region_list = target_memory_map ();
- mem_region_list = target_mem_region_list;
- }
-}
-
-static void
+static struct mem_region *
create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
const struct mem_attrib *attrib)
{
- struct mem_region new;
- int i, ix;
+ struct mem_region *n, *new;
/* lo == hi is a useless empty region */
if (lo >= hi && hi != 0)
{
printf_unfiltered (_("invalid memory region: low >= high\n"));
- return;
+ return NULL;
}
- mem_region_init (&new);
- new.lo = lo;
- new.hi = hi;
-
- ix = VEC_lower_bound (mem_region_s, mem_region_list, &new,
- mem_region_lessthan);
-
- /* Check for an overlapping memory region. We only need to check
- in the vicinity - at most one before and one after the
- insertion point. */
- for (i = ix - 1; i < ix + 1; i++)
+ n = mem_region_chain;
+ while (n)
{
- struct mem_region *n;
-
- if (i < 0)
- continue;
- if (i >= VEC_length (mem_region_s, mem_region_list))
- continue;
-
- n = VEC_index (mem_region_s, mem_region_list, i);
-
+ /* overlapping node */
if ((lo >= n->lo && (lo < n->hi || n->hi == 0))
|| (hi > n->lo && (hi <= n->hi || n->hi == 0))
|| (lo <= n->lo && (hi >= n->hi || hi == 0)))
{
printf_unfiltered (_("overlapping memory region\n"));
- return;
+ return NULL;
}
+ n = n->next;
}
- new.number = ++mem_number;
- new.attrib = *attrib;
- VEC_safe_insert (mem_region_s, mem_region_list, ix, &new);
+ new = xmalloc (sizeof (struct mem_region));
+ new->lo = lo;
+ new->hi = hi;
+ new->number = ++mem_number;
+ new->enabled_p = 1;
+ new->attrib = *attrib;
+
+ /* link in new node */
+ new->next = mem_region_chain;
+ mem_region_chain = new;
+
+ return new;
+}
+
+static void
+delete_mem_region (struct mem_region *m)
+{
+ xfree (m);
}
/*
@@ -200,41 +97,28 @@ lookup_mem_region (CORE_ADDR addr)
struct mem_region *m;
CORE_ADDR lo;
CORE_ADDR hi;
- int ix;
-
- require_target_regions ();
/* First we initialize LO and HI so that they describe the entire
memory space. As we process the memory region chain, they are
redefined to describe the minimal region containing ADDR. LO
and HI are used in the case where no memory region is defined
that contains ADDR. If a memory region is disabled, it is
- treated as if it does not exist. The initial values for LO
- and HI represent the bottom and top of memory. */
+ treated as if it does not exist. */
- lo = 0;
- hi = 0;
+ lo = (CORE_ADDR) 0;
+ hi = (CORE_ADDR) ~ 0;
- /* If we ever want to support a huge list of memory regions, this
- check should be replaced with a binary search (probably using
- VEC_lower_bound). */
- for (ix = 0; VEC_iterate (mem_region_s, mem_region_list, ix, m); ix++)
+ for (m = mem_region_chain; m; m = m->next)
{
if (m->enabled_p == 1)
{
if (addr >= m->lo && (addr < m->hi || m->hi == 0))
return m;
- /* This (correctly) won't match if m->hi == 0, representing
- the top of the address space, because CORE_ADDR is unsigned;
- no value of LO is less than zero. */
if (addr >= m->hi && lo < m->hi)
lo = m->hi;
- /* This will never set HI to zero; if we're here and ADDR
- is at or below M, and the region starts at zero, then ADDR
- would have been in the region. */
- if (addr <= m->lo && (hi == 0 || hi > m->lo))
+ if (addr <= m->lo && hi > m->lo)
hi = m->lo;
}
}
@@ -246,31 +130,6 @@ lookup_mem_region (CORE_ADDR addr)
region.attrib = default_mem_attrib;
return &region;
}
-
-/* Invalidate any memory regions fetched from the target. */
-
-void
-invalidate_target_mem_regions (void)
-{
- struct mem_region *m;
- int ix;
-
- if (!target_mem_regions_valid)
- return;
-
- target_mem_regions_valid = 0;
- VEC_free (mem_region_s, target_mem_region_list);
- if (mem_use_target)
- mem_region_list = NULL;
-}
-
-/* Clear memory region list */
-
-static void
-mem_clear (void)
-{
- VEC_free (mem_region_s, mem_region_list);
-}
static void
@@ -283,24 +142,6 @@ mem_command (char *args, int from_tty)
if (!args)
error_no_arg (_("No mem"));
- /* For "mem auto", switch back to using a target provided list. */
- if (strcmp (args, "auto") == 0)
- {
- if (mem_use_target)
- return;
-
- if (mem_region_list != target_mem_region_list)
- {
- mem_clear ();
- mem_region_list = target_mem_region_list;
- }
-
- mem_use_target = 1;
- return;
- }
-
- require_user_regions (from_tty);
-
tok = strtok (args, " \t");
if (!tok)
error (_("no lo address"));
@@ -374,16 +215,8 @@ mem_info_command (char *args, int from_tty)
{
struct mem_region *m;
struct mem_attrib *attrib;
- int ix;
-
- if (mem_use_target)
- printf_filtered (_("Using memory regions provided by the target.\n"));
- else
- printf_filtered (_("Using user-defined memory regions.\n"));
- require_target_regions ();
-
- if (!mem_region_list)
+ if (!mem_region_chain)
{
printf_unfiltered (_("There are no memory regions defined.\n"));
return;
@@ -400,7 +233,7 @@ mem_info_command (char *args, int from_tty)
printf_filtered ("Attrs ");
printf_filtered ("\n");
- for (ix = 0; VEC_iterate (mem_region_s, mem_region_list, ix, m); ix++)
+ for (m = mem_region_chain; m; m = m->next)
{
char *tmp;
printf_filtered ("%-3d %-3c\t",
@@ -454,9 +287,6 @@ mem_info_command (char *args, int from_tty)
case MEM_WO:
printf_filtered ("wo ");
break;
- case MEM_FLASH:
- printf_filtered ("flash blocksize 0x%x ", attrib->blocksize);
- break;
}
switch (attrib->width)
@@ -509,9 +339,8 @@ static void
mem_enable (int num)
{
struct mem_region *m;
- int ix;
- for (ix = 0; VEC_iterate (mem_region_s, mem_region_list, ix, m); ix++)
+ for (m = mem_region_chain; m; m = m->next)
if (m->number == num)
{
m->enabled_p = 1;
@@ -527,15 +356,12 @@ mem_enable_command (char *args, int from_tty)
char *p1;
int num;
struct mem_region *m;
- int ix;
-
- require_user_regions (from_tty);
dcache_invalidate (target_dcache);
if (p == 0)
{
- for (ix = 0; VEC_iterate (mem_region_s, mem_region_list, ix, m); ix++)
+ for (m = mem_region_chain; m; m = m->next)
m->enabled_p = 1;
}
else
@@ -563,9 +389,8 @@ static void
mem_disable (int num)
{
struct mem_region *m;
- int ix;
- for (ix = 0; VEC_iterate (mem_region_s, mem_region_list, ix, m); ix++)
+ for (m = mem_region_chain; m; m = m->next)
if (m->number == num)
{
m->enabled_p = 0;
@@ -581,15 +406,12 @@ mem_disable_command (char *args, int from_tty)
char *p1;
int num;
struct mem_region *m;
- int ix;
-
- require_user_regions (from_tty);
dcache_invalidate (target_dcache);
if (p == 0)
{
- for (ix = 0; VEC_iterate (mem_region_s, mem_region_list, ix, m); ix++)
+ for (m = mem_region_chain; m; m = m->next)
m->enabled_p = 0;
}
else
@@ -610,31 +432,50 @@ mem_disable_command (char *args, int from_tty)
}
}
+/* Clear memory region list */
+
+static void
+mem_clear (void)
+{
+ struct mem_region *m;
+
+ while ((m = mem_region_chain) != 0)
+ {
+ mem_region_chain = m->next;
+ delete_mem_region (m);
+ }
+}
+
/* Delete the memory region number NUM. */
static void
mem_delete (int num)
{
struct mem_region *m1, *m;
- int ix;
- if (!mem_region_list)
+ if (!mem_region_chain)
{
printf_unfiltered (_("No memory region number %d.\n"), num);
return;
}
- for (ix = 0; VEC_iterate (mem_region_s, mem_region_list, ix, m); ix++)
- if (m->number == num)
- break;
-
- if (m == NULL)
+ if (mem_region_chain->number == num)
{
- printf_unfiltered (_("No memory region number %d.\n"), num);
- return;
+ m1 = mem_region_chain;
+ mem_region_chain = m1->next;
+ delete_mem_region (m1);
}
-
- VEC_ordered_remove (mem_region_s, mem_region_list, ix);
+ else
+ for (m = mem_region_chain; m->next; m = m->next)
+ {
+ if (m->next->number == num)
+ {
+ m1 = m->next;
+ m->next = m1->next;
+ delete_mem_region (m1);
+ break;
+ }
+ }
}
static void
@@ -644,8 +485,6 @@ mem_delete_command (char *args, int from_tty)
char *p1;
int num;
- require_user_regions (from_tty);
-
dcache_invalidate (target_dcache);
if (p == 0)
@@ -681,10 +520,8 @@ void
_initialize_mem (void)
{
add_com ("mem", class_vars, mem_command, _("\
-Define attributes for memory region or reset memory region handling to\n\
-target-based.\n\
-Usage: mem auto\n\
- mem <lo addr> <hi addr> [<mode> <width> <cache>], \n\
+Define attributes for memory region.\n\
+Usage: mem <lo addr> <hi addr> [<mode> <width> <cache>], \n\
where <mode> may be rw (read/write), ro (read-only) or wo (write-only), \n\
<width> may be 8, 16, 32, or 64, and \n\
<cache> may be cache or nocache"));
diff --git a/gdb/memattr.h b/gdb/memattr.h
index 046af68..cbb2aba 100644
--- a/gdb/memattr.h
+++ b/gdb/memattr.h
@@ -1,6 +1,5 @@
/* Memory attributes support, for GDB.
-
- Copyright (C) 2001, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,16 +21,11 @@
#ifndef MEMATTR_H
#define MEMATTR_H
-#include "vec.h"
-
enum mem_access_mode
{
MEM_RW, /* read/write */
MEM_RO, /* read only */
- MEM_WO, /* write only */
-
- /* Read/write, but special steps are required to write to it. */
- MEM_FLASH
+ MEM_WO /* write only */
};
enum mem_access_width
@@ -69,13 +63,16 @@ struct mem_attrib
/* enables memory verification. after a write, memory is re-read
to verify that the write was successful. */
int verify;
-
- /* Block size. Only valid if mode == MEM_FLASH. */
- int blocksize;
};
struct mem_region
{
+ /* FIXME: memory regions are stored in an unsorted singly-linked
+ list. This probably won't scale to handle hundreds of memory
+ regions --- that many could be needed to describe the allowed
+ access modes for memory mapped i/o device registers. */
+ struct mem_region *next;
+
CORE_ADDR lo;
CORE_ADDR hi;
@@ -89,18 +86,6 @@ struct mem_region
struct mem_attrib attrib;
};
-/* Declare a vector type for a group of mem_region structures. The
- typedef is necessary because vec.h can not handle a struct tag.
- Except during construction, these vectors are kept sorted. */
-typedef struct mem_region mem_region_s;
-DEF_VEC_O(mem_region_s);
-
extern struct mem_region *lookup_mem_region(CORE_ADDR);
-void invalidate_target_mem_regions (void);
-
-void mem_region_init (struct mem_region *);
-
-int mem_region_cmp (const void *, const void *);
-
#endif /* MEMATTR_H */
diff --git a/gdb/memory-map.c b/gdb/memory-map.c
deleted file mode 100644
index 991db1b..0000000
--- a/gdb/memory-map.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/* Routines for handling XML memory maps provided by target.
-
- Copyright (C) 2006
- 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. */
-
-#include "defs.h"
-#include "memory-map.h"
-#include "gdb_assert.h"
-#include "exceptions.h"
-
-#include "gdb_string.h"
-
-#if !defined(HAVE_LIBEXPAT)
-
-VEC(mem_region_s) *
-parse_memory_map (const char *memory_map)
-{
- static int have_warned;
-
- if (!have_warned)
- {
- have_warned = 1;
- warning (_("Can not parse XML memory map; XML support was disabled "
- "at compile time"));
- }
-
- return NULL;
-}
-
-#else /* HAVE_LIBEXPAT */
-
-#include "xml-support.h"
-
-#include "gdb_expat.h"
-
-/* Internal parsing data passed to all Expat callbacks. */
-struct memory_map_parsing_data
- {
- VEC(mem_region_s) **memory_map;
- struct mem_region *currently_parsing;
- char *character_data;
- const char *property_name;
- int capture_text;
- };
-
-static void
-free_memory_map_parsing_data (void *p_)
-{
- struct memory_map_parsing_data *p = p_;
-
- xfree (p->character_data);
-}
-
-/* Callback called by Expat on start of element.
- DATA_ is pointer to memory_map_parsing_data
- NAME is the name of element
- ATTRS is the zero-terminated array of attribute names and
- attribute values.
-
- This function handles the following elements:
- - 'memory' -- creates a new memory region and initializes it
- from attributes. Sets DATA_.currently_parsing to the new region.
- - 'properties' -- sets DATA.capture_text. */
-
-static void
-memory_map_start_element (void *data_, const XML_Char *name,
- const XML_Char **attrs)
-{
- static const XML_Char *type_names[] = {"ram", "rom", "flash", 0};
- static int type_values[] = { MEM_RW, MEM_RO, MEM_FLASH };
- struct memory_map_parsing_data *data = data_;
- struct gdb_exception ex;
-
- TRY_CATCH (ex, RETURN_MASK_ERROR)
- {
- if (strcmp (name, "memory") == 0)
- {
- struct mem_region *r;
-
- r = VEC_safe_push (mem_region_s, *data->memory_map, NULL);
- mem_region_init (r);
-
- r->lo = xml_get_integer_attribute (attrs, "start");
- r->hi = r->lo + xml_get_integer_attribute (attrs, "length");
- r->attrib.mode = xml_get_enum_value (attrs, "type", type_names,
- type_values);
- r->attrib.blocksize = -1;
-
- data->currently_parsing = r;
- }
- else if (strcmp (name, "property") == 0)
- {
- if (!data->currently_parsing)
- throw_error (XML_PARSE_ERROR,
- _("memory map: found 'property' element outside 'memory'"));
-
- data->capture_text = 1;
-
- data->property_name = xml_get_required_attribute (attrs, "name");
- }
- }
- if (ex.reason < 0)
- throw_error
- (ex.error, _("While parsing element %s:\n%s"), name, ex.message);
-}
-
-/* Callback called by Expat on start of element. DATA_ is a pointer
- to our memory_map_parsing_data. NAME is the name of the element.
-
- This function handles the following elements:
- - 'property' -- check that the property name is 'blocksize' and
- sets DATA->currently_parsing->attrib.blocksize
- - 'memory' verifies that flash block size is set. */
-
-static void
-memory_map_end_element (void *data_, const XML_Char *name)
-{
- struct memory_map_parsing_data *data = data_;
- struct gdb_exception ex;
-
- TRY_CATCH (ex, RETURN_MASK_ERROR)
- {
- if (strcmp (name, "property") == 0)
- {
- if (strcmp (data->property_name, "blocksize") == 0)
- {
- if (!data->character_data)
- throw_error (XML_PARSE_ERROR,
- _("Empty content of 'property' element"));
- char *end = NULL;
- data->currently_parsing->attrib.blocksize
- = strtoul (data->character_data, &end, 0);
- if (*end != '\0')
- throw_error (XML_PARSE_ERROR,
- _("Invalid content of the 'blocksize' property"));
- }
- else
- throw_error (XML_PARSE_ERROR,
- _("Unknown memory region property: %s"), name);
-
- data->capture_text = 0;
- }
- else if (strcmp (name, "memory") == 0)
- {
- if (data->currently_parsing->attrib.mode == MEM_FLASH
- && data->currently_parsing->attrib.blocksize == -1)
- throw_error (XML_PARSE_ERROR,
- _("Flash block size is not set"));
-
- data->currently_parsing = 0;
- data->character_data = 0;
- }
- }
- if (ex.reason < 0)
- throw_error
- (ex.error, _("while parsing element %s: \n%s"), name, ex.message);
-}
-
-/* Callback called by expat for all character data blocks.
- DATA_ is the pointer to memory_map_parsing_data.
- S is the point to character data.
- LEN is the length of data; the data is not zero-terminated.
-
- If DATA_->CAPTURE_TEXT is 1, appends this block of characters
- to DATA_->CHARACTER_DATA. */
-static void
-memory_map_character_data (void *data_, const XML_Char *s,
- int len)
-{
- struct memory_map_parsing_data *data = data_;
- int current_size = 0;
-
- if (!data->capture_text)
- return;
-
- /* Expat interface does not guarantee that a single call to
- a handler will be made. Actually, one call for each line
- will be made, and character data can possibly span several
- lines.
-
- Take care to realloc the data if needed. */
- if (!data->character_data)
- data->character_data = xmalloc (len + 1);
- else
- {
- current_size = strlen (data->character_data);
- data->character_data = xrealloc (data->character_data,
- current_size + len + 1);
- }
-
- memcpy (data->character_data + current_size, s, len);
- data->character_data[current_size + len] = '\0';
-}
-
-static void
-clear_result (void *p)
-{
- VEC(mem_region_s) **result = p;
- VEC_free (mem_region_s, *result);
- *result = NULL;
-}
-
-VEC(mem_region_s) *
-parse_memory_map (const char *memory_map)
-{
- VEC(mem_region_s) *result = NULL;
- struct cleanup *back_to = make_cleanup (null_cleanup, NULL);
- struct cleanup *before_deleting_result;
- struct cleanup *saved;
- volatile struct gdb_exception ex;
- int ok = 0;
-
- struct memory_map_parsing_data data = {};
-
- XML_Parser parser = XML_ParserCreateNS (NULL, '!');
- if (parser == NULL)
- goto out;
-
- make_cleanup_free_xml_parser (parser);
- make_cleanup (free_memory_map_parsing_data, &data);
- /* Note: 'clear_result' will zero 'result'. */
- before_deleting_result = make_cleanup (clear_result, &result);
-
- XML_SetElementHandler (parser, memory_map_start_element,
- memory_map_end_element);
- XML_SetCharacterDataHandler (parser, memory_map_character_data);
- XML_SetUserData (parser, &data);
- data.memory_map = &result;
-
- TRY_CATCH (ex, RETURN_MASK_ERROR)
- {
- if (XML_Parse (parser, memory_map, strlen (memory_map), 1)
- != XML_STATUS_OK)
- {
- enum XML_Error err = XML_GetErrorCode (parser);
-
- throw_error (XML_PARSE_ERROR, "%s", XML_ErrorString (err));
- }
- }
- if (ex.reason != GDB_NO_ERROR)
- {
- if (ex.error == XML_PARSE_ERROR)
- /* Just report it. */
- warning (_("Could not parse XML memory map: %s"), ex.message);
- else
- throw_exception (ex);
- }
- else
- /* Parsed successfully, don't need to delete the result. */
- discard_cleanups (before_deleting_result);
-
- out:
- do_cleanups (back_to);
- return result;
-}
-
-#endif /* HAVE_LIBEXPAT */
diff --git a/gdb/memory-map.h b/gdb/memory-map.h
deleted file mode 100644
index 2acfb62..0000000
--- a/gdb/memory-map.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Routines for handling XML memory maps provided by target.
-
- Copyright (C) 2006
- 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. */
-
-
-#ifndef MEMORY_MAP_H
-#define MEMORY_MAP_H
-
-#include "memattr.h"
-
-/* Parses XML memory map passed as argument and returns the memory
- regions it describes. On any error, emits error message and
- returns 0. Does not throw. Ownership of result is passed to the caller. */
-VEC(mem_region_s) *parse_memory_map (const char *memory_map);
-
-#endif
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index ddb38c3..2de5451 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -88,6 +88,8 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
}
do_cleanups (cleanup_stack);
+ if (i < frame_high)
+ error (_("mi_cmd_stack_list_frames: Not enough frames in stack."));
return MI_CMD_DONE;
}
@@ -205,6 +207,8 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
}
do_cleanups (cleanup_stack_args);
+ if (i < frame_high)
+ error (_("mi_cmd_stack_list_args: Not enough frames in stack."));
return MI_CMD_DONE;
}
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index b257c85..ae4c23a 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -360,6 +360,7 @@ lookup_minimal_symbol_solib_trampoline (const char *name,
return NULL;
}
+
/* Search through the minimal symbol table for each objfile and find
the symbol whose address is the largest address that is still less
than or equal to PC, and matches SECTION (if non-NULL). Returns a
@@ -490,8 +491,7 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc, asection *section)
don't fill the bfd_section member, so don't
throw away symbols on those platforms. */
&& SYMBOL_BFD_SECTION (&msymbol[hi]) != NULL
- && (!matching_bfd_sections
- (SYMBOL_BFD_SECTION (&msymbol[hi]), section)))
+ && SYMBOL_BFD_SECTION (&msymbol[hi]) != section)
{
hi--;
continue;
diff --git a/gdb/monitor.c b/gdb/monitor.c
index 80e0cdd..be807bc 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -812,7 +812,7 @@ monitor_open (char *args, struct monitor_ops *mon_ops, int from_tty)
monitor_printf (current_monitor->line_term);
- start_remote (from_tty);
+ start_remote ();
}
/* Close out all files and local state before this target loses
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index 33b7974..9eef4f7 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -915,7 +915,7 @@ pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
/* Special val_print routine to avoid printing multiple copies of virtual
baseclasses. */
-static void
+void
pascal_object_print_value (struct type *type, const gdb_byte *valaddr,
CORE_ADDR address, struct ui_file *stream,
int format, int recurse,
diff --git a/gdb/parse.c b/gdb/parse.c
index b0edaf4..5d949fd 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -53,7 +53,6 @@
#include "gdb_assert.h"
#include "block.h"
#include "source.h"
-#include "objfiles.h"
/* Standard set of definitions for printing, dumping, prefixifying,
* and evaluating expressions. */
@@ -220,15 +219,6 @@ write_exp_elt_block (struct block *b)
}
void
-write_exp_elt_objfile (struct objfile *objfile)
-{
- union exp_element tmp;
- memset (&tmp, 0, sizeof (union exp_element));
- tmp.objfile = objfile;
- write_exp_elt (tmp);
-}
-
-void
write_exp_elt_longcst (LONGEST expelt)
{
union exp_element tmp;
@@ -388,7 +378,6 @@ write_exp_bitstring (struct stoken str)
static struct type *msym_text_symbol_type;
static struct type *msym_data_symbol_type;
static struct type *msym_unknown_symbol_type;
-static struct type *msym_tls_symbol_type;
void
write_exp_msymbol (struct minimal_symbol *msymbol,
@@ -408,22 +397,6 @@ write_exp_msymbol (struct minimal_symbol *msymbol,
write_exp_elt_opcode (OP_LONG);
- if (SYMBOL_BFD_SECTION (msymbol)->flags & SEC_THREAD_LOCAL)
- {
- bfd *bfd = SYMBOL_BFD_SECTION (msymbol)->owner;
- struct objfile *ofp;
-
- ALL_OBJFILES (ofp)
- if (ofp->obfd == bfd)
- break;
-
- write_exp_elt_opcode (UNOP_MEMVAL_TLS);
- write_exp_elt_objfile (ofp);
- write_exp_elt_type (msym_tls_symbol_type);
- write_exp_elt_opcode (UNOP_MEMVAL_TLS);
- return;
- }
-
write_exp_elt_opcode (UNOP_MEMVAL);
switch (msymbol->type)
{
@@ -931,11 +904,6 @@ operator_length_standard (struct expression *expr, int endpos,
args = 1;
break;
- case UNOP_MEMVAL_TLS:
- oplen = 4;
- args = 1;
- break;
-
case UNOP_ABS:
case UNOP_CAP:
case UNOP_CHR:
@@ -1373,10 +1341,6 @@ build_parse (void)
init_type (TYPE_CODE_INT, 1, 0,
"<variable (not text or data), no debug info>",
NULL);
-
- msym_tls_symbol_type =
- init_type (TYPE_CODE_INT, TARGET_INT_BIT / HOST_CHAR_BIT, 0,
- "<thread local variable, no debug info>", NULL);
}
/* This function avoids direct calls to fprintf
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index 6bfc958..05061f7 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -131,8 +131,6 @@ extern void write_exp_bitstring (struct stoken);
extern void write_exp_elt_block (struct block *);
-extern void write_exp_elt_objfile (struct objfile *objfile);
-
extern void write_exp_msymbol (struct minimal_symbol *,
struct type *, struct type *);
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 50d9c39..5e1bc00 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -916,18 +916,14 @@ ppc_linux_sigtramp_cache (struct frame_info *next_frame,
trad_frame_set_reg_addr (this_cache, tdep->ppc_cr_regnum,
gpregs + 38 * tdep->wordsize);
- if (ppc_floating_point_unit_p (gdbarch))
+ /* Floating point registers. */
+ for (i = 0; i < 32; i++)
{
- /* Floating point registers. */
- for (i = 0; i < 32; i++)
- {
- int regnum = i + FP0_REGNUM;
- trad_frame_set_reg_addr (this_cache, regnum,
- fpregs + i * tdep->wordsize);
- }
- trad_frame_set_reg_addr (this_cache, tdep->ppc_fpscr_regnum,
- fpregs + 32 * tdep->wordsize);
+ int regnum = i + FP0_REGNUM;
+ trad_frame_set_reg_addr (this_cache, regnum, fpregs + i * tdep->wordsize);
}
+ trad_frame_set_reg_addr (this_cache, tdep->ppc_fpscr_regnum,
+ fpregs + 32 * tdep->wordsize);
trad_frame_set_id (this_cache, frame_id_build (base, func));
}
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 210a1c0..ade7802 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -983,11 +983,6 @@ sym_info (char *arg, int from_tty)
addr = parse_and_eval_address (arg);
ALL_OBJSECTIONS (objfile, osect)
{
- /* Only process each object file once, even if there's a separate
- debug file. */
- if (objfile->separate_debug_objfile_backlink)
- continue;
-
sect = osect->the_bfd_section;
sect_addr = overlay_mapped_address (addr, sect);
diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c
index b788792..8394ae5 100644
--- a/gdb/remote-sds.c
+++ b/gdb/remote-sds.c
@@ -148,9 +148,8 @@ sds_close (int quitting)
/* Stub for catch_errors. */
static int
-sds_start_remote (void *from_tty_p)
+sds_start_remote (void *dummy)
{
- int from_tty = * (int *) from_tty;
int c;
unsigned char buf[200];
@@ -174,7 +173,7 @@ sds_start_remote (void *from_tty_p)
immediate_quit--;
- start_remote (from_tty); /* Initialize gdb process mechanisms */
+ start_remote (); /* Initialize gdb process mechanisms */
return 1;
}
@@ -225,7 +224,7 @@ device is attached to the remote system (e.g. /dev/ttya).");
/* Start the remote connection; if error (0), discard this target.
In particular, if the user quits, be sure to discard it (we'd be
in an inconsistent state otherwise). */
- if (!catch_errors (sds_start_remote, &from_tty,
+ if (!catch_errors (sds_start_remote, NULL,
"Couldn't establish connection to remote target\n",
RETURN_MASK_ALL))
pop_target ();
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index cdd41ed..4e36f54 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -383,8 +383,8 @@ gdbsim_kill (void)
printf_filtered ("gdbsim_kill\n");
/* There is no need to `kill' running simulator - the simulator is
- not running. Mourning it is enough. */
- target_mourn_inferior ();
+ not running */
+ inferior_ptid = null_ptid;
}
/* Load an executable file into the target process. This is expected to
@@ -410,6 +410,8 @@ gdbsim_load (char *args, int fromtty)
if (sr_get_debug ())
printf_filtered ("gdbsim_load: prog \"%s\"\n", prog);
+ inferior_ptid = null_ptid;
+
/* FIXME: We will print two messages on error.
Need error to either not print anything if passed NULL or need
another routine that doesn't take any arguments. */
@@ -467,7 +469,6 @@ gdbsim_create_inferior (char *exec_file, char *args, char **env, int from_tty)
sim_create_inferior (gdbsim_desc, exec_bfd, argv, env);
inferior_ptid = pid_to_ptid (42);
- target_mark_running (&gdbsim_ops);
insert_breakpoints (); /* Needed to get correct instruction in cache */
clear_proceed_status ();
@@ -506,7 +507,7 @@ gdbsim_open (char *args, int from_tty)
strcpy (arg_buf, "gdbsim"); /* 7 */
/* Specify the byte order for the target when it is both selectable
and explicitly specified by the user (not auto detected). */
- switch (TARGET_BYTE_ORDER)
+ switch (selected_byte_order ())
{
case BFD_ENDIAN_BIG:
strcat (arg_buf, " -E big");
@@ -542,12 +543,8 @@ gdbsim_open (char *args, int from_tty)
error (_("unable to create simulator instance"));
push_target (&gdbsim_ops);
+ target_fetch_registers (-1);
printf_filtered ("Connected to the simulator.\n");
-
- /* There's nothing running after "target sim" or "load"; not until
- "run". */
- inferior_ptid = null_ptid;
- target_mark_exited (&gdbsim_ops);
}
/* Does whatever cleanup is required for a target that we are no longer
@@ -750,12 +747,6 @@ gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
int write, struct mem_attrib *attrib,
struct target_ops *target)
{
- /* If no program is running yet, then ignore the simulator for
- memory. Pass the request down to the next target, hopefully
- an exec file. */
- if (!target_has_execution)
- return 0;
-
if (!program_loaded)
error (_("No program loaded."));
@@ -811,7 +802,6 @@ gdbsim_mourn_inferior (void)
printf_filtered ("gdbsim_mourn_inferior:\n");
remove_breakpoints ();
- target_mark_exited (&gdbsim_ops);
generic_mourn_inferior ();
}
diff --git a/gdb/remote.c b/gdb/remote.c
index afbec0d..6bc53ca 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -60,8 +60,6 @@
#include "remote-fileio.h"
-#include "memory-map.h"
-
/* The size to align memory write packets, when practical. The protocol
does not guarantee any alignment, and gdb will generate short
writes and unaligned writes, but even as a best-effort attempt this
@@ -244,7 +242,7 @@ struct remote_state
static struct remote_state remote_state;
static struct remote_state *
-get_remote_state_raw (void)
+get_remote_state (void)
{
return &remote_state;
}
@@ -294,26 +292,11 @@ get_remote_arch_state (void)
return gdbarch_data (current_gdbarch, remote_gdbarch_data_handle);
}
-/* Fetch the global remote target state. */
-
-static struct remote_state *
-get_remote_state (void)
-{
- /* Make sure that the remote architecture state has been
- initialized, because doing so might reallocate rs->buf. Any
- function which calls getpkt also needs to be mindful of changes
- to rs->buf, but this call limits the number of places which run
- into trouble. */
- get_remote_arch_state ();
-
- return get_remote_state_raw ();
-}
-
static void *
init_remote_state (struct gdbarch *gdbarch)
{
int regnum;
- struct remote_state *rs = get_remote_state_raw ();
+ struct remote_state *rs = get_remote_state ();
struct remote_arch_state *rsa;
rsa = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct remote_arch_state);
@@ -768,42 +751,12 @@ add_packet_config_cmd (struct packet_config *config, const char *name,
}
static enum packet_result
-packet_check_result (const char *buf)
+packet_ok (const char *buf, struct packet_config *config)
{
if (buf[0] != '\0')
{
/* The stub recognized the packet request. Check that the
operation succeeded. */
- if (buf[0] == 'E'
- && isxdigit (buf[1]) && isxdigit (buf[2])
- && buf[3] == '\0')
- /* "Enn" - definitly an error. */
- return PACKET_ERROR;
-
- /* Always treat "E." as an error. This will be used for
- more verbose error messages, such as E.memtypes. */
- if (buf[0] == 'E' && buf[1] == '.')
- return PACKET_ERROR;
-
- /* The packet may or may not be OK. Just assume it is. */
- return PACKET_OK;
- }
- else
- /* The stub does not support the packet. */
- return PACKET_UNKNOWN;
-}
-
-static enum packet_result
-packet_ok (const char *buf, struct packet_config *config)
-{
- enum packet_result result;
-
- result = packet_check_result (buf);
- switch (result)
- {
- case PACKET_OK:
- case PACKET_ERROR:
- /* The stub recognized the packet request. */
switch (config->support)
{
case PACKET_SUPPORT_UNKNOWN:
@@ -820,8 +773,19 @@ packet_ok (const char *buf, struct packet_config *config)
case PACKET_ENABLE:
break;
}
- break;
- case PACKET_UNKNOWN:
+ if (buf[0] == 'O' && buf[1] == 'K' && buf[2] == '\0')
+ /* "OK" - definitly OK. */
+ return PACKET_OK;
+ if (buf[0] == 'E'
+ && isxdigit (buf[1]) && isxdigit (buf[2])
+ && buf[3] == '\0')
+ /* "Enn" - definitly an error. */
+ return PACKET_ERROR;
+ /* The packet may or may not be OK. Just assume it is. */
+ return PACKET_OK;
+ }
+ else
+ {
/* The stub does not support the packet. */
switch (config->support)
{
@@ -846,10 +810,8 @@ packet_ok (const char *buf, struct packet_config *config)
case PACKET_DISABLE:
break;
}
- break;
+ return PACKET_UNKNOWN;
}
-
- return result;
}
enum {
@@ -864,7 +826,6 @@ enum {
PACKET_Z3,
PACKET_Z4,
PACKET_qXfer_auxv,
- PACKET_qXfer_memory_map,
PACKET_qGetTLSAddr,
PACKET_qSupported,
PACKET_MAX
@@ -1042,14 +1003,15 @@ remote_thread_alive (ptid_t ptid)
{
struct remote_state *rs = get_remote_state ();
int tid = PIDGET (ptid);
+ char *buf = rs->buf;
if (tid < 0)
- xsnprintf (rs->buf, get_remote_packet_size (), "T-%08x", -tid);
+ xsnprintf (buf, get_remote_packet_size (), "T-%08x", -tid);
else
- xsnprintf (rs->buf, get_remote_packet_size (), "T%08x", tid);
- putpkt (rs->buf);
+ xsnprintf (buf, get_remote_packet_size (), "T%08x", tid);
+ putpkt (buf);
getpkt (&rs->buf, &rs->buf_size, 0);
- return (rs->buf[0] == 'O' && rs->buf[1] == 'K');
+ return (buf[0] == 'O' && buf[1] == 'K');
}
/* About these extended threadlist and threadinfo packets. They are
@@ -1548,11 +1510,12 @@ remote_get_threadinfo (threadref *threadid, int fieldset, /* TAG mask */
{
struct remote_state *rs = get_remote_state ();
int result;
+ char *threadinfo_pkt = rs->buf;
- pack_threadinfo_request (rs->buf, fieldset, threadid);
- putpkt (rs->buf);
+ pack_threadinfo_request (threadinfo_pkt, fieldset, threadid);
+ putpkt (threadinfo_pkt);
getpkt (&rs->buf, &rs->buf_size, 0);
- result = remote_unpack_thread_info_response (rs->buf + 2,
+ result = remote_unpack_thread_info_response (threadinfo_pkt + 2,
threadid, info);
return result;
}
@@ -1608,6 +1571,7 @@ remote_get_threadlist (int startflag, threadref *nextthread, int result_limit,
{
struct remote_state *rs = get_remote_state ();
static threadref echo_nextthread;
+ char *threadlist_packet = rs->buf;
int result = 1;
/* Trancate result limit to be smaller than the packet size. */
@@ -1724,16 +1688,17 @@ static ptid_t
remote_current_thread (ptid_t oldpid)
{
struct remote_state *rs = get_remote_state ();
+ char *buf = rs->buf;
putpkt ("qC");
getpkt (&rs->buf, &rs->buf_size, 0);
- if (rs->buf[0] == 'Q' && rs->buf[1] == 'C')
+ if (buf[0] == 'Q' && buf[1] == 'C')
/* Use strtoul here, so we'll correctly parse values whose highest
bit is set. The protocol carries them as a simple series of
hex digits; in the absence of a sign, strtol will see such
values as positive numbers out of range for signed 'long', and
return LONG_MAX to indicate an overflow. */
- return pid_to_ptid (strtoul (&rs->buf[2], NULL, 16));
+ return pid_to_ptid (strtoul (&buf[2], NULL, 16));
else
return oldpid;
}
@@ -1771,8 +1736,8 @@ remote_threads_info (void)
if (use_threadinfo_query)
{
putpkt ("qfThreadInfo");
- getpkt (&rs->buf, &rs->buf_size, 0);
bufp = rs->buf;
+ getpkt (&rs->buf, &rs->buf_size, 0);
if (bufp[0] != '\0') /* q packet recognized */
{
while (*bufp++ == 'm') /* reply contains one or more TID */
@@ -1791,8 +1756,8 @@ remote_threads_info (void)
}
while (*bufp++ == ','); /* comma-separated list */
putpkt ("qsThreadInfo");
- getpkt (&rs->buf, &rs->buf_size, 0);
bufp = rs->buf;
+ getpkt (&rs->buf, &rs->buf_size, 0);
}
return; /* done */
}
@@ -1830,14 +1795,16 @@ remote_threads_extra_info (struct thread_info *tp)
if (use_threadextra_query)
{
- xsnprintf (rs->buf, get_remote_packet_size (), "qThreadExtraInfo,%x",
+ char *bufp = rs->buf;
+
+ xsnprintf (bufp, get_remote_packet_size (), "qThreadExtraInfo,%x",
PIDGET (tp->ptid));
- putpkt (rs->buf);
+ putpkt (bufp);
getpkt (&rs->buf, &rs->buf_size, 0);
- if (rs->buf[0] != 0)
+ if (bufp[0] != 0)
{
- n = min (strlen (rs->buf) / 2, sizeof (display_buf));
- result = hex2bin (rs->buf, (gdb_byte *) display_buf, n);
+ n = min (strlen (bufp) / 2, sizeof (display_buf));
+ result = hex2bin (bufp, (gdb_byte *) display_buf, n);
display_buf [result] = '\0';
return display_buf;
}
@@ -1909,7 +1876,7 @@ static void
get_offsets (void)
{
struct remote_state *rs = get_remote_state ();
- char *buf;
+ char *buf = rs->buf;
char *ptr;
int lose;
CORE_ADDR text_addr, data_addr, bss_addr;
@@ -1917,7 +1884,6 @@ get_offsets (void)
putpkt ("qOffsets");
getpkt (&rs->buf, &rs->buf_size, 0);
- buf = rs->buf;
if (buf[0] == '\000')
return; /* Return silently. Stub doesn't support
@@ -1987,13 +1953,20 @@ get_offsets (void)
objfile_relocate (symfile_objfile, offs);
}
-/* Stub for catch_exception. */
+/* Stub for catch_errors. */
-static void
-remote_start_remote (struct ui_out *uiout, void *from_tty_p)
+static int
+remote_start_remote_dummy (struct ui_out *uiout, void *dummy)
{
- int from_tty = * (int *) from_tty_p;
+ start_remote (); /* Initialize gdb process mechanisms. */
+ /* NOTE: Return something >=0. A -ve value is reserved for
+ catch_exceptions. */
+ return 1;
+}
+static void
+remote_start_remote (struct ui_out *uiout, void *dummy)
+{
immediate_quit++; /* Allow user to interrupt it. */
/* Ack any packet which the remote side has already sent. */
@@ -2009,7 +1982,7 @@ remote_start_remote (struct ui_out *uiout, void *from_tty_p)
putpkt ("?"); /* Initiate a query from remote machine. */
immediate_quit--;
- start_remote (from_tty); /* Initialize gdb process mechanisms. */
+ remote_start_remote_dummy (uiout, dummy);
}
/* Open a connection to a remote debugger.
@@ -2073,12 +2046,13 @@ remote_check_symbols (struct objfile *objfile)
because we need both at the same time. */
msg = alloca (get_remote_packet_size ());
+ reply = rs->buf;
+
/* Invite target to request symbol lookups. */
putpkt ("qSymbol::");
getpkt (&rs->buf, &rs->buf_size, 0);
packet_ok (rs->buf, &remote_protocol_packets[PACKET_qSymbol]);
- reply = rs->buf;
while (strncmp (reply, "qSymbol:", 8) == 0)
{
@@ -2094,7 +2068,6 @@ remote_check_symbols (struct objfile *objfile)
&reply[8]);
putpkt (msg);
getpkt (&rs->buf, &rs->buf_size, 0);
- reply = rs->buf;
}
}
@@ -2204,9 +2177,7 @@ remote_packet_size (const struct protocol_feature *feature,
static struct protocol_feature remote_protocol_features[] = {
{ "PacketSize", PACKET_DISABLE, remote_packet_size, -1 },
{ "qXfer:auxv:read", PACKET_DISABLE, remote_supported_packet,
- PACKET_qXfer_auxv },
- { "qXfer:memory-map:read", PACKET_DISABLE, remote_supported_packet,
- PACKET_qXfer_memory_map }
+ PACKET_qXfer_auxv }
};
static void
@@ -2451,8 +2422,7 @@ remote_open_1 (char *name, int from_tty, struct target_ops *target,
function. See cli-dump.c. */
{
struct gdb_exception ex
- = catch_exception (uiout, remote_start_remote, &from_tty,
- RETURN_MASK_ALL);
+ = catch_exception (uiout, remote_start_remote, NULL, RETURN_MASK_ALL);
if (ex.reason < 0)
{
pop_target ();
@@ -2472,6 +2442,8 @@ remote_open_1 (char *name, int from_tty, struct target_ops *target,
getpkt (&rs->buf, &rs->buf_size, 0);
}
+ post_create_inferior (&current_target, from_tty);
+
if (exec_bfd) /* No use without an exec file. */
remote_check_symbols (symfile_objfile);
}
@@ -2587,12 +2559,11 @@ bin2hex (const gdb_byte *bin, char *hex, int count)
static void
remote_vcont_probe (struct remote_state *rs)
{
- char *buf;
+ char *buf = rs->buf;
- strcpy (rs->buf, "vCont?");
- putpkt (rs->buf);
+ strcpy (buf, "vCont?");
+ putpkt (buf);
getpkt (&rs->buf, &rs->buf_size, 0);
- buf = rs->buf;
/* Make sure that the features we assume are supported. */
if (strncmp (buf, "vCont", 5) == 0)
@@ -2717,7 +2688,7 @@ static void
remote_resume (ptid_t ptid, int step, enum target_signal siggnal)
{
struct remote_state *rs = get_remote_state ();
- char *buf;
+ char *buf = rs->buf;
int pid = PIDGET (ptid);
last_sent_signal = siggnal;
@@ -2738,7 +2709,6 @@ remote_resume (ptid_t ptid, int step, enum target_signal siggnal)
else
set_thread (pid, 0); /* Run this thread. */
- buf = rs->buf;
if (siggnal != TARGET_SIGNAL_0)
{
buf[0] = step ? 'S' : 'C';
@@ -2989,6 +2959,7 @@ remote_wait (ptid_t ptid, struct target_waitstatus *status)
{
struct remote_state *rs = get_remote_state ();
struct remote_arch_state *rsa = get_remote_arch_state ();
+ char *buf = rs->buf;
ULONGEST thread_num = -1;
ULONGEST addr;
@@ -2997,14 +2968,12 @@ remote_wait (ptid_t ptid, struct target_waitstatus *status)
while (1)
{
- char *buf, *p;
+ char *p;
ofunc = signal (SIGINT, remote_interrupt);
getpkt (&rs->buf, &rs->buf_size, 1);
signal (SIGINT, ofunc);
- buf = rs->buf;
-
/* This is a hook for when we need to do something (perhaps the
collection of trace data) every time the target stops. */
if (deprecated_target_wait_loop_hook)
@@ -3180,6 +3149,7 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status)
{
struct remote_state *rs = get_remote_state ();
struct remote_arch_state *rsa = get_remote_arch_state ();
+ char *buf = rs->buf;
ULONGEST thread_num = -1;
ULONGEST addr;
@@ -3190,7 +3160,7 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status)
while (1)
{
- char *buf, *p;
+ char *p;
if (!target_is_async_p ())
ofunc = signal (SIGINT, remote_interrupt);
@@ -3202,8 +3172,6 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status)
if (!target_is_async_p ())
signal (SIGINT, ofunc);
- buf = rs->buf;
-
/* This is a hook for when we need to do something (perhaps the
collection of trace data) every time the target stops. */
if (deprecated_target_wait_loop_hook)
@@ -3384,18 +3352,16 @@ static int
fetch_register_using_p (int regnum)
{
struct remote_state *rs = get_remote_state ();
- char *buf, *p;
+ char *buf = rs->buf, *p;
char regp[MAX_REGISTER_SIZE];
int i;
- p = rs->buf;
+ p = buf;
*p++ = 'p';
p += hexnumstr (p, regnum);
*p++ = '\0';
remote_send (&rs->buf, &rs->buf_size);
- buf = rs->buf;
-
/* If the stub didn't recognize the packet, or if we got an error,
tell our caller. */
if (buf[0] == '\0' || buf[0] == 'E')
@@ -3432,7 +3398,7 @@ remote_fetch_registers (int regnum)
{
struct remote_state *rs = get_remote_state ();
struct remote_arch_state *rsa = get_remote_arch_state ();
- char *buf;
+ char *buf = rs->buf;
int i;
char *p;
char *regs = alloca (rsa->sizeof_g_packet);
@@ -3474,9 +3440,8 @@ remote_fetch_registers (int regnum)
}
}
- sprintf (rs->buf, "g");
+ sprintf (buf, "g");
remote_send (&rs->buf, &rs->buf_size);
- buf = rs->buf;
/* Save the size of the packet sent to us by the target. Its used
as a heuristic when determining the max size of packets that the
@@ -3499,7 +3464,6 @@ remote_fetch_registers (int regnum)
fprintf_unfiltered (gdb_stdlog,
"Bad register packet; fetching a new packet\n");
getpkt (&rs->buf, &rs->buf_size, 0);
- buf = rs->buf;
}
/* Reply describes registers byte by byte, each byte encoded as two
@@ -3530,7 +3494,7 @@ remote_fetch_registers (int regnum)
register_bytes_found = i;
if (REGISTER_BYTES_OK_P ()
&& !REGISTER_BYTES_OK (i))
- warning (_("Remote reply is wrong length: %s"), buf);
+ warning (_("Remote reply is too short: %s"), buf);
}
supply_them:
@@ -3609,7 +3573,7 @@ store_register_using_P (int regnum)
bin2hex (regp, p, register_size (current_gdbarch, reg->regnum));
remote_send (&rs->buf, &rs->buf_size);
- return rs->buf[0] != '\0';
+ return buf[0] != '\0';
}
@@ -3846,9 +3810,10 @@ check_binary_download (CORE_ADDR addr)
break;
case PACKET_SUPPORT_UNKNOWN:
{
+ char *buf = rs->buf;
char *p;
- p = rs->buf;
+ p = buf;
*p++ = 'X';
p += hexnumstr (p, (ULONGEST) addr);
*p++ = ',';
@@ -3856,10 +3821,10 @@ check_binary_download (CORE_ADDR addr)
*p++ = ':';
*p = '\0';
- putpkt_binary (rs->buf, (int) (p - rs->buf));
+ putpkt_binary (buf, (int) (p - buf));
getpkt (&rs->buf, &rs->buf_size, 0);
- if (rs->buf[0] == '\0')
+ if (buf[0] == '\0')
{
if (remote_debug)
fprintf_unfiltered (gdb_stdlog,
@@ -3880,42 +3845,25 @@ check_binary_download (CORE_ADDR addr)
/* Write memory data directly to the remote machine.
This does not inform the data cache; the data cache uses this.
- HEADER is the starting part of the packet.
MEMADDR is the address in the remote memory space.
MYADDR is the address of the buffer in our space.
LEN is the number of bytes.
- PACKET_FORMAT should be either 'X' or 'M', and indicates if we
- should send data as binary ('X'), or hex-encoded ('M').
-
- The function creates packet of the form
- <HEADER><ADDRESS>,<LENGTH>:<DATA>
- where encoding of <DATA> is termined by PACKET_FORMAT.
-
- If USE_LENGTH is 0, then the <LENGTH> field and the preceding comma
- are omitted.
-
- Returns the number of bytes transferred, or 0 (setting errno) for
+ Returns number of bytes transferred, or 0 (setting errno) for
error. Only transfer a single packet. */
-static int
-remote_write_bytes_aux (const char *header, CORE_ADDR memaddr,
- const gdb_byte *myaddr, int len,
- char packet_format, int use_length)
+int
+remote_write_bytes (CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
{
struct remote_state *rs = get_remote_state ();
+ char *buf;
char *p;
- char *plen = NULL;
- int plenlen = 0;
+ char *plen;
+ int plenlen;
int todo;
int nr_bytes;
int payload_size;
int payload_length;
- int header_length;
-
- if (packet_format != 'X' && packet_format != 'M')
- internal_error (__FILE__, __LINE__,
- "remote_write_bytes_aux: bad packet format");
/* Should this be the selected frame? */
gdbarch_remote_translate_xfer_address (current_gdbarch,
@@ -3926,46 +3874,48 @@ remote_write_bytes_aux (const char *header, CORE_ADDR memaddr,
if (len <= 0)
return 0;
+ /* Verify that the target can support a binary download. */
+ check_binary_download (memaddr);
+
payload_size = get_memory_write_packet_size ();
/* The packet buffer will be large enough for the payload;
get_memory_packet_size ensures this. */
- rs->buf[0] = '\0';
+ buf = rs->buf;
/* Compute the size of the actual payload by subtracting out the
packet header and footer overhead: "$M<memaddr>,<len>:...#nn".
*/
- payload_size -= strlen ("$,:#NN");
- if (!use_length)
- /* The comma won't be used. */
- payload_size += 1;
- header_length = strlen (header);
- payload_size -= header_length;
+ payload_size -= strlen ("$M,:#NN");
payload_size -= hexnumlen (memaddr);
- /* Construct the packet excluding the data: "<header><memaddr>,<len>:". */
-
- strcat (rs->buf, header);
- p = rs->buf + strlen (header);
+ /* Construct the packet header: "[MX]<memaddr>,<len>:". */
- /* Compute a best guess of the number of bytes actually transfered. */
- if (packet_format == 'X')
+ /* Append "[XM]". Compute a best guess of the number of bytes
+ actually transfered. */
+ p = buf;
+ switch (remote_protocol_packets[PACKET_X].support)
{
+ case PACKET_ENABLE:
+ *p++ = 'X';
/* Best guess at number of bytes that will fit. */
todo = min (len, payload_size);
- if (use_length)
- payload_size -= hexnumlen (todo);
+ payload_size -= hexnumlen (todo);
todo = min (todo, payload_size);
- }
- else
- {
+ break;
+ case PACKET_DISABLE:
+ *p++ = 'M';
/* Num bytes that will fit. */
todo = min (len, payload_size / 2);
- if (use_length)
- payload_size -= hexnumlen (todo);
+ payload_size -= hexnumlen (todo);
todo = min (todo, payload_size / 2);
+ break;
+ case PACKET_SUPPORT_UNKNOWN:
+ internal_error (__FILE__, __LINE__,
+ _("remote_write_bytes: bad internal state"));
+ default:
+ internal_error (__FILE__, __LINE__, _("bad switch"));
}
-
if (todo <= 0)
internal_error (__FILE__, __LINE__,
_("minumum packet size too small to write data"));
@@ -3979,25 +3929,23 @@ remote_write_bytes_aux (const char *header, CORE_ADDR memaddr,
memaddr = remote_address_masked (memaddr);
p += hexnumstr (p, (ULONGEST) memaddr);
- if (use_length)
- {
- /* Append ",". */
- *p++ = ',';
+ /* Append ",". */
+ *p++ = ',';
- /* Append <len>. Retain the location/size of <len>. It may need to
- be adjusted once the packet body has been created. */
- plen = p;
- plenlen = hexnumstr (p, (ULONGEST) todo);
- p += plenlen;
- }
+ /* Append <len>. Retain the location/size of <len>. It may need to
+ be adjusted once the packet body has been created. */
+ plen = p;
+ plenlen = hexnumstr (p, (ULONGEST) todo);
+ p += plenlen;
/* Append ":". */
*p++ = ':';
*p = '\0';
/* Append the packet body. */
- if (packet_format == 'X')
+ switch (remote_protocol_packets[PACKET_X].support)
{
+ case PACKET_ENABLE:
/* Binary mode. Send target system values byte by byte, in
increasing byte addresses. Only escape certain critical
characters. */
@@ -4005,9 +3953,8 @@ remote_write_bytes_aux (const char *header, CORE_ADDR memaddr,
payload_size);
/* If not all TODO bytes fit, then we'll need another packet. Make
- a second try to keep the end of the packet aligned. Don't do
- this if the packet is tiny. */
- if (nr_bytes < todo && nr_bytes > 2 * REMOTE_ALIGN_WRITES)
+ a second try to keep the end of the packet aligned. */
+ if (nr_bytes < todo)
{
int new_nr_bytes;
@@ -4020,7 +3967,7 @@ remote_write_bytes_aux (const char *header, CORE_ADDR memaddr,
}
p += payload_length;
- if (use_length && nr_bytes < todo)
+ if (nr_bytes < todo)
{
/* Escape chars have filled up the buffer prematurely,
and we have actually sent fewer bytes than planned.
@@ -4029,20 +3976,25 @@ remote_write_bytes_aux (const char *header, CORE_ADDR memaddr,
plen += hexnumnstr (plen, (ULONGEST) nr_bytes, plenlen);
*plen = ':'; /* overwrite \0 from hexnumnstr() */
}
- }
- else
- {
+ break;
+ case PACKET_DISABLE:
/* Normal mode: Send target system values byte by byte, in
increasing byte addresses. Each byte is encoded as a two hex
value. */
nr_bytes = bin2hex (myaddr, p, todo);
p += 2 * nr_bytes;
+ break;
+ case PACKET_SUPPORT_UNKNOWN:
+ internal_error (__FILE__, __LINE__,
+ _("remote_write_bytes: bad internal state"));
+ default:
+ internal_error (__FILE__, __LINE__, _("bad switch"));
}
- putpkt_binary (rs->buf, (int) (p - rs->buf));
+ putpkt_binary (buf, (int) (p - buf));
getpkt (&rs->buf, &rs->buf_size, 0);
- if (rs->buf[0] == 'E')
+ if (buf[0] == 'E')
{
/* There is no correspondance between what the remote protocol
uses for errors and errno codes. We would like a cleaner way
@@ -4057,42 +4009,6 @@ remote_write_bytes_aux (const char *header, CORE_ADDR memaddr,
return nr_bytes;
}
-/* Write memory data directly to the remote machine.
- This does not inform the data cache; the data cache uses this.
- MEMADDR is the address in the remote memory space.
- MYADDR is the address of the buffer in our space.
- LEN is the number of bytes.
-
- Returns number of bytes transferred, or 0 (setting errno) for
- error. Only transfer a single packet. */
-
-int
-remote_write_bytes (CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
-{
- char *packet_format = 0;
-
- /* Check whether the target supports binary download. */
- check_binary_download (memaddr);
-
- switch (remote_protocol_packets[PACKET_X].support)
- {
- case PACKET_ENABLE:
- packet_format = "X";
- break;
- case PACKET_DISABLE:
- packet_format = "M";
- break;
- case PACKET_SUPPORT_UNKNOWN:
- internal_error (__FILE__, __LINE__,
- _("remote_write_bytes: bad internal state"));
- default:
- internal_error (__FILE__, __LINE__, _("bad switch"));
- }
-
- return remote_write_bytes_aux (packet_format,
- memaddr, myaddr, len, packet_format[0], 1);
-}
-
/* Read memory data directly from the remote machine.
This does not use the data cache; the data cache uses this.
MEMADDR is the address in the remote memory space.
@@ -4112,6 +4028,7 @@ int
remote_read_bytes (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
{
struct remote_state *rs = get_remote_state ();
+ char *buf;
int max_buf_size; /* Max size of packet output buffer. */
int origlen;
@@ -4127,6 +4044,7 @@ remote_read_bytes (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
max_buf_size = get_memory_read_packet_size ();
/* The packet buffer will be large enough for the payload;
get_memory_packet_size ensures this. */
+ buf = rs->buf;
origlen = len;
while (len > 0)
@@ -4138,21 +4056,21 @@ remote_read_bytes (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
todo = min (len, max_buf_size / 2); /* num bytes that will fit */
/* construct "m"<memaddr>","<len>" */
- /* sprintf (rs->buf, "m%lx,%x", (unsigned long) memaddr, todo); */
+ /* sprintf (buf, "m%lx,%x", (unsigned long) memaddr, todo); */
memaddr = remote_address_masked (memaddr);
- p = rs->buf;
+ p = buf;
*p++ = 'm';
p += hexnumstr (p, (ULONGEST) memaddr);
*p++ = ',';
p += hexnumstr (p, (ULONGEST) todo);
*p = '\0';
- putpkt (rs->buf);
+ putpkt (buf);
getpkt (&rs->buf, &rs->buf_size, 0);
- if (rs->buf[0] == 'E'
- && isxdigit (rs->buf[1]) && isxdigit (rs->buf[2])
- && rs->buf[3] == '\0')
+ if (buf[0] == 'E'
+ && isxdigit (buf[1]) && isxdigit (buf[2])
+ && buf[3] == '\0')
{
/* There is no correspondance between what the remote
protocol uses for errors and errno codes. We would like
@@ -4166,7 +4084,7 @@ remote_read_bytes (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
/* Reply describes memory byte by byte,
each byte encoded as two hex characters. */
- p = rs->buf;
+ p = buf;
if ((i = hex2bin (p, myaddr, todo)) < todo)
{
/* Reply is short. This means that we were able to read
@@ -4200,111 +4118,6 @@ remote_xfer_memory (CORE_ADDR mem_addr, gdb_byte *buffer, int mem_len,
return res;
}
-/* Sends a packet with content determined by the printf format string
- FORMAT and the remaining arguments, then gets the reply. Returns
- whether the packet was a success, a failure, or unknown. */
-
-enum packet_result
-remote_send_printf (const char *format, ...)
-{
- struct remote_state *rs = get_remote_state ();
- int max_size = get_remote_packet_size ();
-
- va_list ap;
- va_start (ap, format);
-
- rs->buf[0] = '\0';
- if (vsnprintf (rs->buf, max_size, format, ap) >= max_size)
- internal_error (__FILE__, __LINE__, "Too long remote packet.");
-
- if (putpkt (rs->buf) < 0)
- error (_("Communication problem with target."));
-
- rs->buf[0] = '\0';
- getpkt (&rs->buf, &rs->buf_size, 0);
-
- return packet_check_result (rs->buf);
-}
-
-static void
-restore_remote_timeout (void *p)
-{
- int value = *(int *)p;
- remote_timeout = value;
-}
-
-/* Flash writing can take quite some time. We'll set
- effectively infinite timeout for flash operations.
- In future, we'll need to decide on a better approach. */
-static const int remote_flash_timeout = 1000;
-
-static void
-remote_flash_erase (struct target_ops *ops,
- ULONGEST address, LONGEST length)
-{
- int saved_remote_timeout = remote_timeout;
- enum packet_result ret;
-
- struct cleanup *back_to = make_cleanup (restore_remote_timeout,
- &saved_remote_timeout);
- remote_timeout = remote_flash_timeout;
-
- ret = remote_send_printf ("vFlashErase:%s,%s",
- paddr (address),
- phex (length, 4));
- switch (ret)
- {
- case PACKET_UNKNOWN:
- error (_("Remote target does not support flash erase"));
- case PACKET_ERROR:
- error (_("Error erasing flash with vFlashErase packet"));
- default:
- break;
- }
-
- do_cleanups (back_to);
-}
-
-static LONGEST
-remote_flash_write (struct target_ops *ops,
- ULONGEST address, LONGEST length,
- const gdb_byte *data)
-{
- int saved_remote_timeout = remote_timeout;
- int ret;
- struct cleanup *back_to = make_cleanup (restore_remote_timeout,
- &saved_remote_timeout);
-
- remote_timeout = remote_flash_timeout;
- ret = remote_write_bytes_aux ("vFlashWrite:", address, data, length, 'X', 0);
- do_cleanups (back_to);
-
- return ret;
-}
-
-static void
-remote_flash_done (struct target_ops *ops)
-{
- int saved_remote_timeout = remote_timeout;
- int ret;
- struct cleanup *back_to = make_cleanup (restore_remote_timeout,
- &saved_remote_timeout);
-
- remote_timeout = remote_flash_timeout;
- ret = remote_send_printf ("vFlashDone");
- do_cleanups (back_to);
-
- switch (ret)
- {
- case PACKET_UNKNOWN:
- error (_("Remote target does not support vFlashDone"));
- case PACKET_ERROR:
- error (_("Error finishing flash operation"));
- default:
- break;
- }
-}
-
static void
remote_files_info (struct target_ops *ignore)
{
@@ -5484,27 +5297,9 @@ remote_xfer_partial (struct target_ops *ops, enum target_object object,
return -1;
}
- /* Only handle flash writes. */
- if (writebuf != NULL)
- {
- LONGEST xfered;
-
- switch (object)
- {
- case TARGET_OBJECT_FLASH:
- xfered = remote_flash_write (ops, offset, len, writebuf);
-
- if (xfered > 0)
- return xfered;
- else if (xfered == 0 && errno == 0)
- return 0;
- else
- return -1;
-
- default:
- return -1;
- }
- }
+ /* Only handle reads. */
+ if (writebuf != NULL || readbuf == NULL)
+ return -1;
/* Map pre-existing objects onto letters. DO NOT do this for new
objects!!! Instead specify new query packets. */
@@ -5519,11 +5314,6 @@ remote_xfer_partial (struct target_ops *ops, enum target_object object,
return remote_read_qxfer (ops, "auxv", annex, readbuf, offset, len,
&remote_protocol_packets[PACKET_qXfer_auxv]);
- case TARGET_OBJECT_MEMORY_MAP:
- gdb_assert (annex == NULL);
- return remote_read_qxfer (ops, "memory-map", annex, readbuf, offset, len,
- &remote_protocol_packets[PACKET_qXfer_memory_map]);
-
default:
return -1;
}
@@ -5580,7 +5370,8 @@ remote_rcmd (char *command,
struct ui_file *outbuf)
{
struct remote_state *rs = get_remote_state ();
- char *p = rs->buf;
+ char *buf = rs->buf;
+ char *p = buf;
if (!remote_desc)
error (_("remote rcmd is only available after target open"));
@@ -5590,10 +5381,10 @@ remote_rcmd (char *command,
command = "";
/* The query prefix. */
- strcpy (rs->buf, "qRcmd,");
- p = strchr (rs->buf, '\0');
+ strcpy (buf, "qRcmd,");
+ p = strchr (buf, '\0');
- if ((strlen (rs->buf) + strlen (command) * 2 + 8/*misc*/) > get_remote_packet_size ())
+ if ((strlen (buf) + strlen (command) * 2 + 8/*misc*/) > get_remote_packet_size ())
error (_("\"monitor\" command ``%s'' is too long."), command);
/* Encode the actual command. */
@@ -5605,12 +5396,9 @@ remote_rcmd (char *command,
/* get/display the response */
while (1)
{
- char *buf;
-
/* XXX - see also tracepoint.c:remote_get_noisy_reply(). */
- rs->buf[0] = '\0';
+ buf[0] = '\0';
getpkt (&rs->buf, &rs->buf_size, 0);
- buf = rs->buf;
if (buf[0] == '\0')
error (_("Target does not support this command."));
if (buf[0] == 'O' && buf[1] != 'K')
@@ -5634,23 +5422,6 @@ remote_rcmd (char *command,
}
}
-static VEC(mem_region_s) *
-remote_memory_map (struct target_ops *ops)
-{
- VEC(mem_region_s) *result = NULL;
- char *text = target_read_stralloc (&current_target,
- TARGET_OBJECT_MEMORY_MAP, NULL);
-
- if (text)
- {
- struct cleanup *back_to = make_cleanup (xfree, text);
- result = parse_memory_map (text);
- do_cleanups (back_to);
- }
-
- return result;
-}
-
static void
packet_command (char *args, int from_tty)
{
@@ -5826,7 +5597,7 @@ remote_pid_to_str (ptid_t ptid)
{
static char buf[32];
- xsnprintf (buf, sizeof buf, "Thread %d", ptid_get_pid (ptid));
+ xsnprintf (buf, sizeof buf, "thread %d", ptid_get_pid (ptid));
return buf;
}
@@ -5923,9 +5694,6 @@ Specify the serial device it is connected to\n\
remote_ops.to_has_execution = 1;
remote_ops.to_has_thread_control = tc_schedlock; /* can lock scheduler */
remote_ops.to_magic = OPS_MAGIC;
- remote_ops.to_memory_map = remote_memory_map;
- remote_ops.to_flash_erase = remote_flash_erase;
- remote_ops.to_flash_done = remote_flash_done;
}
/* Set up the extended remote vector by making a copy of the standard
@@ -6055,9 +5823,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
remote_async_ops.to_async = remote_async;
remote_async_ops.to_async_mask_value = 1;
remote_async_ops.to_magic = OPS_MAGIC;
- remote_async_ops.to_memory_map = remote_memory_map;
- remote_async_ops.to_flash_erase = remote_flash_erase;
- remote_async_ops.to_flash_done = remote_flash_done;
}
/* Set up the async extended remote vector by making a copy of the standard
@@ -6082,14 +5847,13 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
static void
set_remote_cmd (char *args, int from_tty)
{
- help_list (remote_set_cmdlist, "set remote ", -1, gdb_stdout);
}
static void
show_remote_cmd (char *args, int from_tty)
{
/* We can't just use cmd_show_list here, because we want to skip
- the redundant "show remote Z-packet" and the legacy aliases. */
+ the redundant "show remote Z-packet". */
struct cleanup *showlist_chain;
struct cmd_list_element *list = remote_show_cmdlist;
@@ -6097,26 +5861,16 @@ show_remote_cmd (char *args, int from_tty)
for (; list != NULL; list = list->next)
if (strcmp (list->name, "Z-packet") == 0)
continue;
- else if (list->type == not_set_cmd)
- /* Alias commands are exactly like the original, except they
- don't have the normal type. */
- continue;
- else
+ else if (list->type == show_cmd)
{
struct cleanup *option_chain
= make_cleanup_ui_out_tuple_begin_end (uiout, "option");
ui_out_field_string (uiout, "name", list->name);
ui_out_text (uiout, ": ");
- if (list->type == show_cmd)
- do_setshow_command ((char *) NULL, from_tty, list);
- else
- cmd_func (list, NULL, from_tty);
+ do_setshow_command ((char *) NULL, from_tty, list);
/* Close the tuple. */
do_cleanups (option_chain);
}
-
- /* Close the tuple. */
- do_cleanups (showlist_chain);
}
static void
@@ -6137,7 +5891,8 @@ remote_new_objfile (struct objfile *objfile)
remote_check_symbols (objfile);
}
/* Call predecessor on chain, if any. */
- if (remote_new_objfile_chain)
+ if (remote_new_objfile_chain != 0 &&
+ remote_desc == 0)
remote_new_objfile_chain (objfile);
}
@@ -6159,7 +5914,7 @@ _initialize_remote (void)
of these, not one per target. Only one target is active at a
time. The default buffer size is unimportant; it will be expanded
whenever a larger buffer is needed. */
- rs = get_remote_state_raw ();
+ rs = get_remote_state ();
rs->buf_size = 400;
rs->buf = xmalloc (rs->buf_size);
@@ -6308,9 +6063,6 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL,
add_packet_config_cmd (&remote_protocol_packets[PACKET_qXfer_auxv],
"qXfer:auxv:read", "read-aux-vector", 0);
- add_packet_config_cmd (&remote_protocol_packets[PACKET_qXfer_memory_map],
- "qXfer:memory-map:read", "memory-map", 0);
-
add_packet_config_cmd (&remote_protocol_packets[PACKET_qGetTLSAddr],
"qGetTLSAddr", "get-thread-local-storage-address",
0);
diff --git a/gdb/ser-mingw.c b/gdb/ser-mingw.c
index c0e1241..79e186b 100644
--- a/gdb/ser-mingw.c
+++ b/gdb/ser-mingw.c
@@ -658,19 +658,16 @@ free_pipe_state (struct pipe_state *ps)
int saved_errno = errno;
if (ps->wait.read_event != INVALID_HANDLE_VALUE)
- {
- SetEvent (ps->wait.exit_select);
-
- WaitForSingleObject (ps->wait.thread, INFINITE);
+ CloseHandle (ps->wait.read_event);
+ if (ps->wait.except_event != INVALID_HANDLE_VALUE)
+ CloseHandle (ps->wait.except_event);
+ if (ps->wait.start_select != INVALID_HANDLE_VALUE)
+ CloseHandle (ps->wait.start_select);
- CloseHandle (ps->wait.start_select);
- CloseHandle (ps->wait.stop_select);
- CloseHandle (ps->wait.exit_select);
- CloseHandle (ps->wait.have_stopped);
-
- CloseHandle (ps->wait.read_event);
- CloseHandle (ps->wait.except_event);
- }
+ /* If we have a select thread running, let the select thread free
+ the stop event. */
+ if (ps->wait.stop_select != INVALID_HANDLE_VALUE)
+ SetEvent (ps->wait.stop_select);
/* Close the pipe to the child. We must close the pipe before
calling pex_free because pex_free will wait for the child to exit
@@ -815,16 +812,9 @@ pipe_wait_handle (struct serial *scb, HANDLE *read, HANDLE *except)
{
DWORD threadId;
- /* Create auto reset events to wake, stop, and exit the select
- thread. */
+ /* Create auto reset events to wake and terminate the select thread. */
ps->wait.start_select = CreateEvent (0, FALSE, FALSE, 0);
ps->wait.stop_select = CreateEvent (0, FALSE, FALSE, 0);
- ps->wait.exit_select = CreateEvent (0, FALSE, FALSE, 0);
-
- /* Create a manual reset event to signal whether the thread is
- stopped. This must be manual reset, because we may wait on
- it multiple times without ever starting the thread. */
- ps->wait.have_stopped = CreateEvent (0, TRUE, FALSE, 0);
/* Create our own events to report read and exceptions separately.
The exception event is currently never used. */
@@ -835,31 +825,16 @@ pipe_wait_handle (struct serial *scb, HANDLE *read, HANDLE *except)
CreateThread (NULL, 0, pipe_select_thread, scb, 0, &threadId);
}
- *read = ps->wait.read_event;
- *except = ps->wait.except_event;
-
- /* Start from a blank state. */
ResetEvent (ps->wait.read_event);
ResetEvent (ps->wait.except_event);
- ResetEvent (ps->wait.stop_select);
- /* Start the select thread. */
SetEvent (ps->wait.start_select);
-}
-static void
-pipe_done_wait_handle (struct serial *scb)
-{
- struct pipe_state *ps = scb->state;
-
- /* Have we allocated our events yet? */
- if (ps->wait.read_event == INVALID_HANDLE_VALUE)
- return;
-
- SetEvent (ps->wait.stop_select);
- WaitForSingleObject (ps->wait.have_stopped, INFINITE);
+ *read = ps->wait.read_event;
+ *except = ps->wait.except_event;
}
+
struct net_windows_state
{
HANDLE read_event;
@@ -1158,7 +1133,6 @@ _initialize_ser_windows (void)
ops->read_prim = pipe_windows_read;
ops->write_prim = pipe_windows_write;
ops->wait_handle = pipe_wait_handle;
- ops->done_wait_handle = pipe_done_wait_handle;
serial_add_interface (ops);
diff --git a/gdb/serial.c b/gdb/serial.c
index 77b28f8..6a2c634 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -189,10 +189,7 @@ serial_open (const char *name)
else if (strncmp (name, "|", 1) == 0)
{
ops = serial_interface_lookup ("pipe");
- /* Discard ``|'' and any space before the command itself. */
- ++open_name;
- while (isspace (*open_name))
- ++open_name;
+ open_name = name + 1; /* discard ``|'' */
}
/* Check for a colon, suggesting an IP address/port pair.
Do this *after* checking for all the interesting prefixes. We
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 7bd76a1..89fd81a 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -187,6 +187,9 @@ LM_ADDR_CHECK (struct so_list *so, bfd *abfd)
if (dynaddr + l_addr != l_dynaddr)
{
+ warning (_(".dynamic section for \"%s\" "
+ "is not at the expected address"), so->so_name);
+
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
{
Elf_Internal_Ehdr *ehdr = elf_tdata (abfd)->elf_header;
@@ -215,16 +218,9 @@ LM_ADDR_CHECK (struct so_list *so, bfd *abfd)
if ((l_addr & align) == 0 && ((dynaddr - l_dynaddr) & align) == 0)
{
l_addr = l_dynaddr - dynaddr;
-
- warning (_(".dynamic section for \"%s\" "
- "is not at the expected address"), so->so_name);
warning (_("difference appears to be caused by prelink, "
"adjusting expectations"));
}
- else
- warning (_(".dynamic section for \"%s\" "
- "is not at the expected address "
- "(wrong library or version mismatch?)"), so->so_name);
}
set_addr:
@@ -267,15 +263,6 @@ IGNORE_FIRST_LINK_MAP_ENTRY (struct so_list *so)
static CORE_ADDR debug_base; /* Base of dynamic linker structures */
static CORE_ADDR breakpoint_addr; /* Address where end bkpt is set */
-/* Validity flag for debug_loader_offset. */
-static int debug_loader_offset_p;
-
-/* Load address for the dynamic linker, inferred. */
-static CORE_ADDR debug_loader_offset;
-
-/* Name of the dynamic linker, valid if debug_loader_offset_p. */
-static char *debug_loader_name;
-
/* Local function prototypes */
static int match_main (char *);
@@ -666,37 +653,6 @@ open_symbol_file_object (void *from_ttyp)
return 1;
}
-/* If no shared library information is available from the dynamic
- linker, build a fallback list from other sources. */
-
-static struct so_list *
-svr4_default_sos (void)
-{
- struct so_list *head = NULL;
- struct so_list **link_ptr = &head;
-
- if (debug_loader_offset_p)
- {
- struct so_list *new = XZALLOC (struct so_list);
-
- new->lm_info = xmalloc (sizeof (struct lm_info));
-
- /* Nothing will ever check the cached copy of the link
- map if we set l_addr. */
- new->lm_info->l_addr = debug_loader_offset;
- new->lm_info->lm = NULL;
-
- strncpy (new->so_name, debug_loader_name, SO_NAME_MAX_PATH_SIZE - 1);
- new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
- strcpy (new->so_original_name, new->so_name);
-
- *link_ptr = new;
- link_ptr = &new->next;
- }
-
- return head;
-}
-
/* LOCAL FUNCTION
current_sos -- build a list of currently loaded shared objects
@@ -733,13 +689,12 @@ svr4_current_sos (void)
/* If we can't find the dynamic linker's base structure, this
must not be a dynamically linked executable. Hmm. */
if (! debug_base)
- return svr4_default_sos ();
+ return 0;
}
/* Walk the inferior's link map list, and build our list of
`struct so_list' nodes. */
lm = solib_svr4_r_map ();
-
while (lm)
{
struct link_map_offsets *lmo = svr4_fetch_link_map_offsets ();
@@ -806,9 +761,6 @@ svr4_current_sos (void)
discard_cleanups (old_chain);
}
- if (head == NULL)
- return svr4_default_sos ();
-
return head;
}
@@ -1027,12 +979,7 @@ enable_break (void)
be trivial on GNU/Linux). Therefore, we have to try an alternate
mechanism to find the dynamic linker's base address. */
- /* TODO drow/2006-09-12: This is somewhat fragile, because it
- relies on read_pc. On both Solaris and GNU/Linux we can use
- the AT_BASE auxilliary entry, which GDB now knows how to
- access, to find the base address. */
-
- tmp_fd = solib_open (buf, &tmp_pathname);
+ tmp_fd = solib_open (buf, &tmp_pathname);
if (tmp_fd >= 0)
tmp_bfd = bfd_fopen (tmp_pathname, gnutarget, FOPEN_RB, tmp_fd);
@@ -1071,14 +1018,8 @@ enable_break (void)
the current pc (which should point at the entry point for the
dynamic linker) and subtracting the offset of the entry point. */
if (!load_addr_found)
- {
- load_addr = (read_pc ()
- - exec_entry_point (tmp_bfd, tmp_bfd_target));
- debug_loader_name = xstrdup (buf);
- debug_loader_offset_p = 1;
- debug_loader_offset = load_addr;
- solib_add (NULL, 0, NULL, auto_solib_add);
- }
+ load_addr = (read_pc ()
+ - exec_entry_point (tmp_bfd, tmp_bfd_target));
/* Record the relocated start and end address of the dynamic linker
text and plt section for svr4_in_dynsym_resolve_code. */
@@ -1390,10 +1331,6 @@ static void
svr4_clear_solib (void)
{
debug_base = 0;
- debug_loader_offset_p = 0;
- debug_loader_offset = 0;
- xfree (debug_loader_name);
- debug_loader_name = NULL;
}
static void
diff --git a/gdb/solib.c b/gdb/solib.c
index 4fa9fce..1368227 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -146,17 +146,13 @@ solib_open (char *in_pathname, char **found_pathname)
int found_file = -1;
char *temp_pathname = NULL;
char *p = in_pathname;
- int solib_absolute_prefix_is_empty;
-
- solib_absolute_prefix_is_empty = (solib_absolute_prefix == NULL
- || *solib_absolute_prefix == 0);
while (*p && !IS_DIR_SEPARATOR (*p))
p++;
if (*p)
{
- if (! IS_ABSOLUTE_PATH (in_pathname) || solib_absolute_prefix_is_empty)
+ if (! IS_ABSOLUTE_PATH (in_pathname) || solib_absolute_prefix == NULL)
temp_pathname = in_pathname;
else
{
@@ -212,14 +208,14 @@ solib_open (char *in_pathname, char **found_pathname)
&temp_pathname);
/* If not found, next search the inferior's $PATH environment variable. */
- if (found_file < 0 && solib_absolute_prefix_is_empty)
+ if (found_file < 0 && solib_absolute_prefix == NULL)
found_file = openp (get_in_environ (inferior_environ, "PATH"),
OPF_TRY_CWD_FIRST, in_pathname, O_RDONLY | O_BINARY, 0,
&temp_pathname);
/* If not found, next search the inferior's $LD_LIBRARY_PATH
environment variable. */
- if (found_file < 0 && solib_absolute_prefix_is_empty)
+ if (found_file < 0 && solib_absolute_prefix == NULL)
found_file = openp (get_in_environ (inferior_environ, "LD_LIBRARY_PATH"),
OPF_TRY_CWD_FIRST, in_pathname, O_RDONLY | O_BINARY, 0,
&temp_pathname);
@@ -422,11 +418,6 @@ solib_read_symbols (struct so_list *so, int from_tty)
if (from_tty)
printf_unfiltered (_("Symbols already loaded for %s\n"), so->so_name);
}
- else if (so->abfd == NULL)
- {
- if (from_tty)
- printf_unfiltered (_("Symbol file not found for %s\n"), so->so_name);
- }
else
{
if (catch_errors (symbol_add_stub, so,
@@ -615,17 +606,6 @@ update_solib_list (int from_tty, struct target_ops *target)
}
}
-/* Return non-zero if SO is the libpthread shared library.
-
- Uses a fairly simplistic heuristic approach where we check
- the file name against "/libpthread". This can lead to false
- positives, but this should be good enough in practice. */
-
-static int
-libpthread_solib_p (struct so_list *so)
-{
- return (strstr (so->so_name, "/libpthread") != NULL);
-}
/* GLOBAL FUNCTION
@@ -672,16 +652,8 @@ solib_add (char *pattern, int from_tty, struct target_ops *target, int readsyms)
for (gdb = so_list_head; gdb; gdb = gdb->next)
if (! pattern || re_exec (gdb->so_name))
{
- /* Normally, we would read the symbols from that library
- only if READSYMS is set. However, we're making a small
- exception for the pthread library, because we sometimes
- need the library symbols to be loaded in order to provide
- thread support (x86-linux for instance). */
- const int add_this_solib =
- (readsyms || libpthread_solib_p (gdb));
-
any_matches = 1;
- if (add_this_solib && solib_read_symbols (gdb, from_tty))
+ if (readsyms && solib_read_symbols (gdb, from_tty))
loaded_any_symbols = 1;
}
diff --git a/gdb/somread.c b/gdb/somread.c
index f17094d..c187d13 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -88,22 +88,15 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
number_of_symbols = bfd_get_symcount (abfd);
- /* Allocate a buffer to read in the debug info.
- We avoid using alloca because the memory size could be so large
- that we could hit the stack size limit. */
- buf = xmalloc (symsize * number_of_symbols);
- make_cleanup (xfree, buf);
+ /* FIXME (alloca): could be quite large. */
+ buf = alloca (symsize * number_of_symbols);
bfd_seek (abfd, obj_som_sym_filepos (abfd), SEEK_SET);
val = bfd_bread (buf, symsize * number_of_symbols, abfd);
if (val != symsize * number_of_symbols)
error (_("Couldn't read symbol dictionary!"));
- /* Allocate a buffer to read in the som stringtab section of
- the debugging info. Again, we avoid using alloca because
- the data could be so large that we could potentially hit
- the stack size limitat. */
- stringtab = xmalloc (obj_som_stringtab_size (abfd));
- make_cleanup (xfree, stringtab);
+ /* FIXME (alloca): could be quite large. */
+ stringtab = alloca (obj_som_stringtab_size (abfd));
bfd_seek (abfd, obj_som_str_filepos (abfd), SEEK_SET);
val = bfd_bread (stringtab, obj_som_stringtab_size (abfd), abfd);
if (val != obj_som_stringtab_size (abfd))
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 27c852f..6c6f276 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -99,7 +99,7 @@ sparc_fetch_instruction (CORE_ADDR pc)
int i;
/* If we can't read the instruction at PC, return zero. */
- if (read_memory_nobpt (pc, buf, sizeof (buf)))
+ if (target_read_memory (pc, buf, sizeof (buf)))
return 0;
insn = 0;
diff --git a/gdb/stack.c b/gdb/stack.c
index d58ba31..6eb96dc 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -923,16 +923,6 @@ frame_info (char *addr_exp, int from_tty)
deprecated_print_address_numeric (frame_pc_unwind (fi), 1, gdb_stdout);
printf_filtered ("\n");
- if (calling_frame_info == NULL)
- {
- enum unwind_stop_reason reason;
-
- reason = get_frame_unwind_stop_reason (fi);
- if (reason != UNWIND_NO_REASON)
- printf_filtered (_(" Outermost frame: %s\n"),
- frame_stop_reason_string (reason));
- }
-
if (calling_frame_info)
{
printf_filtered (" called by frame at ");
@@ -950,7 +940,6 @@ frame_info (char *addr_exp, int from_tty)
}
if (get_next_frame (fi) || calling_frame_info)
puts_filtered ("\n");
-
if (s)
printf_filtered (" source language %s.\n",
language_str (s->language));
@@ -1174,26 +1163,11 @@ backtrace_command_1 (char *count_exp, int show_locals, int from_tty)
print_frame_info (fi, 1, LOCATION, 1);
if (show_locals)
print_frame_local_vars (fi, 1, gdb_stdout);
-
- /* Save the last frame to check for error conditions. */
- trailing = fi;
}
/* If we've stopped before the end, mention that. */
if (fi && from_tty)
printf_filtered (_("(More stack frames follow...)\n"));
-
- /* If we've run out of frames, and the reason appears to be an error
- condition, print it. */
- if (fi == NULL && trailing != NULL)
- {
- enum unwind_stop_reason reason;
-
- reason = get_frame_unwind_stop_reason (trailing);
- if (reason > UNWIND_FIRST_ERROR)
- printf_filtered (_("Backtrace stopped: %s\n"),
- frame_stop_reason_string (reason));
- }
}
struct backtrace_command_args
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 8329aa5..2036a07 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1537,23 +1537,11 @@ add_section_size_callback (bfd *abfd, asection *asec, void *data)
/* Opaque data for load_section_callback. */
struct load_section_data {
unsigned long load_offset;
- struct load_progress_data *progress_data;
- VEC(memory_write_request_s) *requests;
-};
-
-/* Opaque data for load_progress. */
-struct load_progress_data {
- /* Cumulative data. */
unsigned long write_count;
unsigned long data_count;
bfd_size_type total_size;
-};
-
-/* Opaque data for load_progress for a single section. */
-struct load_progress_section_data {
- struct load_progress_data *cumulative;
- /* Per-section data. */
+ /* Per-section data for load_progress. */
const char *section_name;
ULONGEST section_sent;
ULONGEST section_size;
@@ -1561,30 +1549,12 @@ struct load_progress_section_data {
gdb_byte *buffer;
};
-/* Target write callback routine for progress reporting. */
+/* Target write callback routine for load_section_callback. */
static void
load_progress (ULONGEST bytes, void *untyped_arg)
{
- struct load_progress_section_data *args = untyped_arg;
- struct load_progress_data *totals;
-
- if (args == NULL)
- /* Writing padding data. No easy way to get at the cumulative
- stats, so just ignore this. */
- return;
-
- totals = args->cumulative;
-
- if (bytes == 0 && args->section_sent == 0)
- {
- /* The write is just starting. Let the user know we've started
- this section. */
- ui_out_message (uiout, 0, "Loading section %s, size 0x%s lma 0x%s\n",
- args->section_name, paddr_nz (args->section_size),
- paddr_nz (args->lma));
- return;
- }
+ struct load_section_data *args = untyped_arg;
if (validate_download)
{
@@ -1606,10 +1576,10 @@ load_progress (ULONGEST bytes, void *untyped_arg)
paddr (args->lma));
do_cleanups (verify_cleanups);
}
- totals->data_count += bytes;
+ args->data_count += bytes;
args->lma += bytes;
args->buffer += bytes;
- totals->write_count += 1;
+ args->write_count += 1;
args->section_sent += bytes;
if (quit_flag
|| (deprecated_ui_load_progress_hook != NULL
@@ -1621,8 +1591,8 @@ load_progress (ULONGEST bytes, void *untyped_arg)
deprecated_show_load_progress (args->section_name,
args->section_sent,
args->section_size,
- totals->data_count,
- totals->total_size);
+ args->data_count,
+ args->total_size);
}
/* Callback service function for generic_load (bfd_map_over_sections). */
@@ -1630,12 +1600,12 @@ load_progress (ULONGEST bytes, void *untyped_arg)
static void
load_section_callback (bfd *abfd, asection *asec, void *data)
{
- struct memory_write_request *new_request;
struct load_section_data *args = data;
- struct load_progress_section_data *section_data;
bfd_size_type size = bfd_get_section_size (asec);
gdb_byte *buffer;
+ struct cleanup *old_chain;
const char *sect_name = bfd_get_section_name (abfd, asec);
+ LONGEST transferred;
if ((bfd_get_section_flags (abfd, asec) & SEC_LOAD) == 0)
return;
@@ -1643,63 +1613,49 @@ load_section_callback (bfd *abfd, asection *asec, void *data)
if (size == 0)
return;
- new_request = VEC_safe_push (memory_write_request_s,
- args->requests, NULL);
- memset (new_request, 0, sizeof (struct memory_write_request));
- section_data = xcalloc (1, sizeof (struct load_progress_section_data));
- new_request->begin = bfd_section_lma (abfd, asec) + args->load_offset;
- new_request->end = new_request->begin + size; /* FIXME Should size be in instead? */
- new_request->data = xmalloc (size);
- new_request->baton = section_data;
+ buffer = xmalloc (size);
+ old_chain = make_cleanup (xfree, buffer);
- buffer = new_request->data;
+ args->section_name = sect_name;
+ args->section_sent = 0;
+ args->section_size = size;
+ args->lma = bfd_section_lma (abfd, asec) + args->load_offset;
+ args->buffer = buffer;
- section_data->cumulative = args->progress_data;
- section_data->section_name = sect_name;
- section_data->section_size = size;
- section_data->lma = new_request->begin;
- section_data->buffer = buffer;
+ /* Is this really necessary? I guess it gives the user something
+ to look at during a long download. */
+ ui_out_message (uiout, 0, "Loading section %s, size 0x%s lma 0x%s\n",
+ sect_name, paddr_nz (size), paddr_nz (args->lma));
bfd_get_section_contents (abfd, asec, buffer, 0, size);
-}
-
-/* Clean up an entire memory request vector, including load
- data and progress records. */
-static void
-clear_memory_write_data (void *arg)
-{
- VEC(memory_write_request_s) **vec_p = arg;
- VEC(memory_write_request_s) *vec = *vec_p;
- int i;
- struct memory_write_request *mr;
+ transferred = target_write_with_progress (&current_target,
+ TARGET_OBJECT_MEMORY,
+ NULL, buffer, args->lma,
+ size, load_progress, args);
+ if (transferred < size)
+ error (_("Memory access error while loading section %s."),
+ sect_name);
- for (i = 0; VEC_iterate (memory_write_request_s, vec, i, mr); ++i)
- {
- xfree (mr->data);
- xfree (mr->baton);
- }
- VEC_free (memory_write_request_s, vec);
+ do_cleanups (old_chain);
}
void
generic_load (char *args, int from_tty)
{
+ asection *s;
bfd *loadfile_bfd;
struct timeval start_time, end_time;
char *filename;
struct cleanup *old_cleanups = make_cleanup (null_cleanup, 0);
struct load_section_data cbdata;
- struct load_progress_data total_progress;
-
CORE_ADDR entry;
char **argv;
- memset (&cbdata, 0, sizeof (cbdata));
- memset (&total_progress, 0, sizeof (total_progress));
- cbdata.progress_data = &total_progress;
-
- make_cleanup (clear_memory_write_data, &cbdata.requests);
+ cbdata.load_offset = 0; /* Offset to add to vma for each section. */
+ cbdata.write_count = 0; /* Number of writes needed. */
+ cbdata.data_count = 0; /* Number of bytes written to target memory. */
+ cbdata.total_size = 0; /* Total size of all bfd sectors. */
argv = buildargv (args);
@@ -1746,15 +1702,11 @@ generic_load (char *args, int from_tty)
}
bfd_map_over_sections (loadfile_bfd, add_section_size_callback,
- (void *) &total_progress.total_size);
-
- bfd_map_over_sections (loadfile_bfd, load_section_callback, &cbdata);
+ (void *) &cbdata.total_size);
gettimeofday (&start_time, NULL);
- if (target_write_memory_blocks (cbdata.requests, flash_discard,
- load_progress) != 0)
- error (_("Load failed"));
+ bfd_map_over_sections (loadfile_bfd, load_section_callback, &cbdata);
gettimeofday (&end_time, NULL);
@@ -1762,7 +1714,7 @@ generic_load (char *args, int from_tty)
ui_out_text (uiout, "Start address ");
ui_out_field_fmt (uiout, "address", "0x%s", paddr_nz (entry));
ui_out_text (uiout, ", load size ");
- ui_out_field_fmt (uiout, "load-size", "%lu", total_progress.data_count);
+ ui_out_field_fmt (uiout, "load-size", "%lu", cbdata.data_count);
ui_out_text (uiout, "\n");
/* We were doing this in remote-mips.c, I suspect it is right
for other targets too. */
@@ -1774,9 +1726,8 @@ generic_load (char *args, int from_tty)
file is loaded in. Some targets do (e.g., remote-vx.c) but
others don't (or didn't - perhaps they have all been deleted). */
- print_transfer_performance (gdb_stdout, total_progress.data_count,
- total_progress.write_count,
- &start_time, &end_time);
+ print_transfer_performance (gdb_stdout, cbdata.data_count,
+ cbdata.write_count, &start_time, &end_time);
do_cleanups (old_cleanups);
}
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 10c723a..2832dd1 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -56,7 +56,6 @@
#include <ctype.h>
#include "cp-abi.h"
#include "observer.h"
-#include "gdb_assert.h"
/* Prototypes for local functions */
@@ -707,64 +706,6 @@ init_sal (struct symtab_and_line *sal)
}
-/* Return 1 if the two sections are the same, or if they could
- plausibly be copies of each other, one in an original object
- file and another in a separated debug file. */
-
-int
-matching_bfd_sections (asection *first, asection *second)
-{
- struct objfile *obj;
-
- /* If they're the same section, then they match. */
- if (first == second)
- return 1;
-
- /* If either is NULL, give up. */
- if (first == NULL || second == NULL)
- return 0;
-
- /* This doesn't apply to absolute symbols. */
- if (first->owner == NULL || second->owner == NULL)
- return 0;
-
- /* If they're in the same object file, they must be different sections. */
- if (first->owner == second->owner)
- return 0;
-
- /* Check whether the two sections are potentially corresponding. They must
- have the same size, address, and name. We can't compare section indexes,
- which would be more reliable, because some sections may have been
- stripped. */
- if (bfd_get_section_size (first) != bfd_get_section_size (second))
- return 0;
-
- if (bfd_get_section_vma (first->owner, first)
- != bfd_get_section_vma (second->owner, second))
- return 0;
-
- if (bfd_get_section_name (first->owner, first) == NULL
- || bfd_get_section_name (second->owner, second) == NULL
- || strcmp (bfd_get_section_name (first->owner, first),
- bfd_get_section_name (second->owner, second)) != 0)
- return 0;
-
- /* Otherwise check that they are in corresponding objfiles. */
-
- ALL_OBJFILES (obj)
- if (obj->obfd == first->owner)
- break;
- gdb_assert (obj != NULL);
-
- if (obj->separate_debug_objfile != NULL
- && obj->separate_debug_objfile->obfd == second->owner)
- return 1;
- if (obj->separate_debug_objfile_backlink != NULL
- && obj->separate_debug_objfile_backlink->obfd == second->owner)
- return 1;
-
- return 0;
-}
/* Find which partial symtab contains PC and SECTION. Return 0 if
none. We return the psymtab that contains a symbol whose address
@@ -904,7 +845,7 @@ find_pc_sect_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc,
if (section) /* match on a specific section */
{
fixup_psymbol_section (p, psymtab->objfile);
- if (!matching_bfd_sections (SYMBOL_BFD_SECTION (p), section))
+ if (SYMBOL_BFD_SECTION (p) != section)
continue;
}
best_pc = SYMBOL_VALUE_ADDRESS (p);
@@ -928,7 +869,7 @@ find_pc_sect_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc,
if (section) /* match on a specific section */
{
fixup_psymbol_section (p, psymtab->objfile);
- if (!matching_bfd_sections (SYMBOL_BFD_SECTION (p), section))
+ if (SYMBOL_BFD_SECTION (p) != section)
continue;
}
best_pc = SYMBOL_VALUE_ADDRESS (p);
@@ -1961,7 +1902,7 @@ find_pc_sect_symtab (CORE_ADDR pc, asection *section)
ALL_BLOCK_SYMBOLS (b, iter, sym)
{
fixup_symbol_section (sym, objfile);
- if (matching_bfd_sections (SYMBOL_BFD_SECTION (sym), section))
+ if (section == SYMBOL_BFD_SECTION (sym))
break;
}
if (sym == NULL)
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 4a980c1..bef9aaa 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1316,8 +1316,6 @@ extern char **make_source_files_completion_list (char *, char *);
/* symtab.c */
-int matching_bfd_sections (asection *, asection *);
-
extern struct partial_symtab *find_main_psymtab (void);
extern struct symtab *find_line_symtab (struct symtab *, int, int *, int *);
diff --git a/gdb/target-memory.c b/gdb/target-memory.c
deleted file mode 100644
index 64c16e1..0000000
--- a/gdb/target-memory.c
+++ /dev/null
@@ -1,437 +0,0 @@
-/* Parts of target interface that deal with accessing memory and memory-like
- objects.
-
- Copyright (C) 2006
- 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. */
-
-#include "defs.h"
-#include "vec.h"
-#include "target.h"
-#include "memory-map.h"
-
-#include "gdb_assert.h"
-
-#include <stdio.h>
-#include <sys/time.h>
-
-static int
-compare_block_starting_address (const void *a, const void *b)
-{
- const struct memory_write_request *a_req = a;
- const struct memory_write_request *b_req = b;
-
- if (a_req->begin < b_req->begin)
- return -1;
- else if (a_req->begin == b_req->begin)
- return 0;
- else
- return 1;
-}
-
-/* Adds to RESULT all memory write requests from BLOCK that are
- in [BEGIN, END) range.
-
- If any memory request is only partially in the specified range,
- that part of the memory request will be added. */
-
-static void
-claim_memory (VEC(memory_write_request_s) *blocks,
- VEC(memory_write_request_s) **result,
- ULONGEST begin,
- ULONGEST end)
-{
- int i;
- ULONGEST claimed_begin;
- ULONGEST claimed_end;
- struct memory_write_request *r;
-
- for (i = 0; VEC_iterate (memory_write_request_s, blocks, i, r); ++i)
- {
- /* If the request doesn't overlap [BEGIN, END), skip it. We
- must handle END == 0 meaning the top of memory; we don't yet
- check for R->end == 0, which would also mean the top of
- memory, but there's an assertion in
- target_write_memory_blocks which checks for that. */
-
- if (begin >= r->end)
- continue;
- if (end != 0 && end <= r->begin)
- continue;
-
- claimed_begin = max (begin, r->begin);
- if (end == 0)
- claimed_end = r->end;
- else
- claimed_end = min (end, r->end);
-
- if (claimed_begin == r->begin && claimed_end == r->end)
- VEC_safe_push (memory_write_request_s, *result, r);
- else
- {
- struct memory_write_request *n =
- VEC_safe_push (memory_write_request_s, *result, NULL);
- memset (n, 0, sizeof (struct memory_write_request));
- n->begin = claimed_begin;
- n->end = claimed_end;
- n->data = r->data + (claimed_begin - r->begin);
- }
- }
-}
-
-/* Given a vector of struct memory_write_request objects in BLOCKS,
- add memory requests for flash memory into FLASH_BLOCKS, and for
- regular memory to REGULAR_BLOCKS. */
-
-static void
-split_regular_and_flash_blocks (VEC(memory_write_request_s) *blocks,
- VEC(memory_write_request_s) **regular_blocks,
- VEC(memory_write_request_s) **flash_blocks)
-{
- struct mem_region *region;
- CORE_ADDR cur_address;
-
- /* This implementation runs in O(length(regions)*length(blocks)) time.
- However, in most cases the number of blocks will be small, so this does
- not matter.
-
- Note also that it's extremely unlikely that a memory write request
- will span more than one memory region, however for safety we handle
- such situations. */
-
- cur_address = 0;
- while (1)
- {
- VEC(memory_write_request_s) **r;
- region = lookup_mem_region (cur_address);
-
- r = region->attrib.mode == MEM_FLASH ? flash_blocks : regular_blocks;
- cur_address = region->hi;
- claim_memory (blocks, r, region->lo, region->hi);
-
- if (cur_address == 0)
- break;
- }
-}
-
-/* Given an ADDRESS, if BEGIN is non-NULL this function sets *BEGIN
- to the start of the flash block containing the address. Similarly,
- if END is non-NULL *END will be set to the address one past the end
- of the block containing the address. */
-
-static void
-block_boundaries (CORE_ADDR address, CORE_ADDR *begin, CORE_ADDR *end)
-{
- struct mem_region *region;
- unsigned blocksize;
-
- region = lookup_mem_region (address);
- gdb_assert (region->attrib.mode == MEM_FLASH);
- blocksize = region->attrib.blocksize;
- if (begin)
- *begin = address / blocksize * blocksize;
- if (end)
- *end = (address + blocksize - 1) / blocksize * blocksize;
-}
-
-/* Given the list of memory requests to be WRITTEN, this function
- returns write requests covering each group of flash blocks which must
- be erased. */
-
-static VEC(memory_write_request_s) *
-blocks_to_erase (VEC(memory_write_request_s) *written)
-{
- unsigned i;
- struct memory_write_request *ptr;
-
- VEC(memory_write_request_s) *result = NULL;
-
- for (i = 0; VEC_iterate (memory_write_request_s, written, i, ptr); ++i)
- {
- CORE_ADDR begin, end;
-
- block_boundaries (ptr->begin, &begin, 0);
- block_boundaries (ptr->end, 0, &end);
-
- if (!VEC_empty (memory_write_request_s, result)
- && VEC_last (memory_write_request_s, result)->end >= begin)
- {
- VEC_last (memory_write_request_s, result)->end = end;
- }
- else
- {
- struct memory_write_request *n =
- VEC_safe_push (memory_write_request_s, result, NULL);
- memset (n, 0, sizeof (struct memory_write_request));
- n->begin = begin;
- n->end = end;
- }
- }
-
- return result;
-}
-
-/* Given ERASED_BLOCKS, a list of blocks that will be erased with
- flash erase commands, and WRITTEN_BLOCKS, the list of memory
- addresses that will be written, compute the set of memory addresses
- that will be erased but not rewritten (e.g. padding within a block
- which is only partially filled by "load"). */
-
-static VEC(memory_write_request_s) *
-compute_garbled_blocks (VEC(memory_write_request_s) *erased_blocks,
- VEC(memory_write_request_s) *written_blocks)
-{
- VEC(memory_write_request_s) *result = NULL;
-
- unsigned i, j;
- unsigned je = VEC_length (memory_write_request_s, written_blocks);
- struct memory_write_request *erased_p;
-
- /* Look at each erased memory_write_request in turn, and
- see what part of it is subsequently written to.
-
- This implementation is O(length(erased) * length(written)). If
- the lists are sorted at this point it could be rewritten more
- efficiently, but the complexity is not generally worthwhile. */
-
- for (i = 0;
- VEC_iterate (memory_write_request_s, erased_blocks, i, erased_p);
- ++i)
- {
- /* Make a deep copy -- it will be modified inside the loop, but
- we don't want to modify original vector. */
- struct memory_write_request erased = *erased_p;
-
- for (j = 0; j != je;)
- {
- struct memory_write_request *written
- = VEC_index (memory_write_request_s,
- written_blocks, j);
-
- /* Now try various cases. */
-
- /* If WRITTEN is fully to the left of ERASED, check the next
- written memory_write_request. */
- if (written->end <= erased.begin)
- {
- ++j;
- continue;
- }
-
- /* If WRITTEN is fully to the right of ERASED, then ERASED
- is not written at all. WRITTEN might affect other
- blocks. */
- if (written->begin >= erased.end)
- {
- VEC_safe_push (memory_write_request_s, result, &erased);
- goto next_erased;
- }
-
- /* If all of ERASED is completely written, we can move on to
- the next erased region. */
- if (written->begin <= erased.begin
- && written->end >= erased.end)
- {
- goto next_erased;
- }
-
- /* If there is an unwritten part at the beginning of ERASED,
- then we should record that part and try this inner loop
- again for the remainder. */
- if (written->begin > erased.begin)
- {
- struct memory_write_request *n =
- VEC_safe_push (memory_write_request_s, result, NULL);
- memset (n, 0, sizeof (struct memory_write_request));
- n->begin = erased.begin;
- n->end = written->begin;
- erased.begin = written->begin;
- continue;
- }
-
- /* If there is an unwritten part at the end of ERASED, we
- forget about the part that was written to and wait to see
- if the next write request writes more of ERASED. We can't
- push it yet. */
- if (written->end < erased.end)
- {
- erased.begin = written->end;
- ++j;
- continue;
- }
- }
-
- /* If we ran out of write requests without doing anything about
- ERASED, then that means it's really erased. */
- VEC_safe_push (memory_write_request_s, result, &erased);
-
- next_erased:
- ;
- }
-
- return result;
-}
-
-static void
-cleanup_request_data (void *p)
-{
- VEC(memory_write_request_s) **v = p;
- struct memory_write_request *r;
- int i;
-
- for (i = 0; VEC_iterate (memory_write_request_s, *v, i, r); ++i)
- xfree (r->data);
-}
-
-static void
-cleanup_write_requests_vector (void *p)
-{
- VEC(memory_write_request_s) **v = p;
- VEC_free (memory_write_request_s, *v);
-}
-
-int
-target_write_memory_blocks (VEC(memory_write_request_s) *requests,
- enum flash_preserve_mode preserve_flash_p,
- void (*progress_cb) (ULONGEST, void *))
-{
- struct cleanup *back_to = make_cleanup (null_cleanup, NULL);
- VEC(memory_write_request_s) *blocks = VEC_copy (memory_write_request_s,
- requests);
- unsigned i;
- int err = 0;
- struct memory_write_request *r;
- VEC(memory_write_request_s) *regular = NULL;
- VEC(memory_write_request_s) *flash = NULL;
- VEC(memory_write_request_s) *erased, *garbled;
-
- /* END == 0 would represent wraparound: a write to the very last
- byte of the address space. This file was not written with that
- possibility in mind. This is fixable, but a lot of work for a
- rare problem; so for now, fail noisily here instead of obscurely
- later. */
- for (i = 0; VEC_iterate (memory_write_request_s, requests, i, r); ++i)
- gdb_assert (r->end != 0);
-
- make_cleanup (cleanup_write_requests_vector, &blocks);
-
- /* Sort the blocks by their start address. */
- qsort (VEC_address (memory_write_request_s, blocks),
- VEC_length (memory_write_request_s, blocks),
- sizeof (struct memory_write_request), compare_block_starting_address);
-
- /* Split blocks into list of regular memory blocks,
- and list of flash memory blocks. */
- make_cleanup (cleanup_write_requests_vector, &regular);
- make_cleanup (cleanup_write_requests_vector, &flash);
- split_regular_and_flash_blocks (blocks, &regular, &flash);
-
- /* If a variable is added to forbid flash write, even during "load",
- it should be checked here. Similarly, if this function is used
- for other situations besides "load" in which writing to flash
- is undesirable, that should be checked here. */
-
- /* Find flash blocks to erase. */
- erased = blocks_to_erase (flash);
- make_cleanup (cleanup_write_requests_vector, &erased);
-
- /* Find what flash regions will be erased, and not overwritten; then
- either preserve or discard the old contents. */
- garbled = compute_garbled_blocks (erased, flash);
- make_cleanup (cleanup_request_data, &garbled);
- make_cleanup (cleanup_write_requests_vector, &garbled);
-
- if (!VEC_empty (memory_write_request_s, garbled))
- {
- if (preserve_flash_p == flash_preserve)
- {
- struct memory_write_request *r;
-
- /* Read in regions that must be preserved and add them to
- the list of blocks we read. */
- for (i = 0; VEC_iterate (memory_write_request_s, garbled, i, r); ++i)
- {
- gdb_assert (r->data == NULL);
- r->data = xmalloc (r->end - r->begin);
- err = target_read_memory (r->begin, r->data, r->end - r->begin);
- if (err != 0)
- goto out;
-
- VEC_safe_push (memory_write_request_s, flash, r);
- }
-
- qsort (VEC_address (memory_write_request_s, flash),
- VEC_length (memory_write_request_s, flash),
- sizeof (struct memory_write_request), compare_block_starting_address);
- }
- }
-
- /* We could coalesce adjacent memory blocks here, to reduce the
- number of write requests for small sections. However, we would
- have to reallocate and copy the data pointers, which could be
- large; large sections are more common in loadable objects than
- large numbers of small sections (although the reverse can be true
- in object files). So, we issue at least one write request per
- passed struct memory_write_request. The remote stub will still
- have the opportunity to batch flash requests. */
-
- /* Write regular blocks. */
- for (i = 0; VEC_iterate (memory_write_request_s, regular, i, r); ++i)
- {
- LONGEST len;
-
- len = target_write_with_progress (&current_target,
- TARGET_OBJECT_MEMORY, NULL,
- r->data, r->begin, r->end - r->begin,
- progress_cb, r->baton);
- if (len < (LONGEST) (r->end - r->begin))
- {
- /* Call error? */
- err = -1;
- goto out;
- }
- }
-
- if (!VEC_empty (memory_write_request_s, erased))
- {
- /* Erase all pages. */
- for (i = 0; VEC_iterate (memory_write_request_s, erased, i, r); ++i)
- target_flash_erase (r->begin, r->end - r->begin);
-
- /* Write flash data. */
- for (i = 0; VEC_iterate (memory_write_request_s, flash, i, r); ++i)
- {
- LONGEST len;
-
- len = target_write_with_progress (&current_target,
- TARGET_OBJECT_FLASH, NULL,
- r->data, r->begin, r->end - r->begin,
- progress_cb, r->baton);
- if (len < (LONGEST) (r->end - r->begin))
- error (_("Error writing data to flash"));
- }
-
- target_flash_done ();
- }
-
- out:
- do_cleanups (back_to);
-
- return err;
-}
diff --git a/gdb/target.c b/gdb/target.c
index 2ff882c..65d24a5 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -39,7 +39,6 @@
#include "regcache.h"
#include "gdb_assert.h"
#include "gdbcore.h"
-#include "exceptions.h"
static void target_info (char *, int);
@@ -465,9 +464,6 @@ update_current_target (void)
INHERIT (to_make_corefile_notes, t);
INHERIT (to_get_thread_local_address, t);
INHERIT (to_magic, t);
- /* Do not inherit to_memory_map. */
- /* Do not inherit to_flash_erase. */
- /* Do not inherit to_flash_done. */
}
#undef INHERIT
@@ -649,56 +645,6 @@ update_current_target (void)
current_target.beneath = target_stack;
}
-/* Mark OPS as a running target. This reverses the effect
- of target_mark_exited. */
-
-void
-target_mark_running (struct target_ops *ops)
-{
- struct target_ops *t;
-
- for (t = target_stack; t != NULL; t = t->beneath)
- if (t == ops)
- break;
- if (t == NULL)
- internal_error (__FILE__, __LINE__,
- "Attempted to mark unpushed target \"%s\" as running",
- ops->to_shortname);
-
- ops->to_has_execution = 1;
- ops->to_has_all_memory = 1;
- ops->to_has_memory = 1;
- ops->to_has_stack = 1;
- ops->to_has_registers = 1;
-
- update_current_target ();
-}
-
-/* Mark OPS as a non-running target. This reverses the effect
- of target_mark_running. */
-
-void
-target_mark_exited (struct target_ops *ops)
-{
- struct target_ops *t;
-
- for (t = target_stack; t != NULL; t = t->beneath)
- if (t == ops)
- break;
- if (t == NULL)
- internal_error (__FILE__, __LINE__,
- "Attempted to mark unpushed target \"%s\" as running",
- ops->to_shortname);
-
- ops->to_has_execution = 0;
- ops->to_has_all_memory = 0;
- ops->to_has_memory = 0;
- ops->to_has_stack = 0;
- ops->to_has_registers = 0;
-
- update_current_target ();
-}
-
/* Push a new target type into the stack of the existing target accessors,
possibly superseding some of the existing accessors.
@@ -809,92 +755,6 @@ pop_target (void)
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
}
-/* Using the objfile specified in BATON, find the address for the
- current thread's thread-local storage with offset OFFSET. */
-CORE_ADDR
-target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset)
-{
- volatile CORE_ADDR addr = 0;
-
- if (target_get_thread_local_address_p ()
- && gdbarch_fetch_tls_load_module_address_p (current_gdbarch))
- {
- ptid_t ptid = inferior_ptid;
- volatile struct gdb_exception ex;
-
- TRY_CATCH (ex, RETURN_MASK_ALL)
- {
- CORE_ADDR lm_addr;
-
- /* Fetch the load module address for this objfile. */
- lm_addr = gdbarch_fetch_tls_load_module_address (current_gdbarch,
- objfile);
- /* If it's 0, throw the appropriate exception. */
- if (lm_addr == 0)
- throw_error (TLS_LOAD_MODULE_NOT_FOUND_ERROR,
- _("TLS load module not found"));
-
- addr = target_get_thread_local_address (ptid, lm_addr, offset);
- }
- /* If an error occurred, print TLS related messages here. Otherwise,
- throw the error to some higher catcher. */
- if (ex.reason < 0)
- {
- int objfile_is_library = (objfile->flags & OBJF_SHARED);
-
- switch (ex.error)
- {
- case TLS_NO_LIBRARY_SUPPORT_ERROR:
- error (_("Cannot find thread-local variables in this thread library."));
- break;
- case TLS_LOAD_MODULE_NOT_FOUND_ERROR:
- if (objfile_is_library)
- error (_("Cannot find shared library `%s' in dynamic"
- " linker's load module list"), objfile->name);
- else
- error (_("Cannot find executable file `%s' in dynamic"
- " linker's load module list"), objfile->name);
- break;
- case TLS_NOT_ALLOCATED_YET_ERROR:
- if (objfile_is_library)
- error (_("The inferior has not yet allocated storage for"
- " thread-local variables in\n"
- "the shared library `%s'\n"
- "for %s"),
- objfile->name, target_pid_to_str (ptid));
- else
- error (_("The inferior has not yet allocated storage for"
- " thread-local variables in\n"
- "the executable `%s'\n"
- "for %s"),
- objfile->name, target_pid_to_str (ptid));
- break;
- case TLS_GENERIC_ERROR:
- if (objfile_is_library)
- error (_("Cannot find thread-local storage for %s, "
- "shared library %s:\n%s"),
- target_pid_to_str (ptid),
- objfile->name, ex.message);
- else
- error (_("Cannot find thread-local storage for %s, "
- "executable file %s:\n%s"),
- target_pid_to_str (ptid),
- objfile->name, ex.message);
- break;
- default:
- throw_exception (ex);
- break;
- }
- }
- }
- /* It wouldn't be wrong here to try a gdbarch method, too; finding
- TLS is an ABI-specific thing. But we don't do that yet. */
- else
- error (_("Cannot find thread-local variables on this target"));
-
- return addr;
-}
-
#undef MIN
#define MIN(A, B) (((A) <= (B)) ? (A) : (B))
@@ -1031,12 +891,6 @@ memory_xfer_partial (struct target_ops *ops, void *readbuf, const void *writebuf
if (readbuf != NULL)
return -1;
break;
-
- case MEM_FLASH:
- /* We only support writing to flash during "load" for now. */
- if (writebuf != NULL)
- error (_("Writing to flash memory forbidden in this context"));
- break;
}
if (region->attrib.cache)
@@ -1186,87 +1040,6 @@ target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
return EIO;
}
-/* Fetch the target's memory map. */
-
-VEC(mem_region_s) *
-target_memory_map (void)
-{
- VEC(mem_region_s) *result;
- struct mem_region *last_one, *this_one;
- int ix;
- struct target_ops *t;
-
- if (targetdebug)
- fprintf_unfiltered (gdb_stdlog, "target_memory_map ()\n");
-
- for (t = current_target.beneath; t != NULL; t = t->beneath)
- if (t->to_memory_map != NULL)
- break;
-
- if (t == NULL)
- return NULL;
-
- result = t->to_memory_map (t);
- if (result == NULL)
- return NULL;
-
- qsort (VEC_address (mem_region_s, result),
- VEC_length (mem_region_s, result),
- sizeof (struct mem_region), mem_region_cmp);
-
- /* Check that regions do not overlap. Simultaneously assign
- a numbering for the "mem" commands to use to refer to
- each region. */
- last_one = NULL;
- for (ix = 0; VEC_iterate (mem_region_s, result, ix, this_one); ix++)
- {
- this_one->number = ix;
-
- if (last_one && last_one->hi > this_one->lo)
- {
- warning (_("Overlapping regions in memory map: ignoring"));
- VEC_free (mem_region_s, result);
- return NULL;
- }
- last_one = this_one;
- }
-
- return result;
-}
-
-void
-target_flash_erase (ULONGEST address, LONGEST length)
-{
- struct target_ops *t;
-
- for (t = current_target.beneath; t != NULL; t = t->beneath)
- if (t->to_flash_erase != NULL)
- {
- if (targetdebug)
- fprintf_unfiltered (gdb_stdlog, "target_flash_erase (%s, %s)\n",
- paddr (address), phex (length, 0));
- return t->to_flash_erase (t, address, length);
- }
-
- tcomplain ();
-}
-
-void
-target_flash_done (void)
-{
- struct target_ops *t;
-
- for (t = current_target.beneath; t != NULL; t = t->beneath)
- if (t->to_flash_done != NULL)
- {
- if (targetdebug)
- fprintf_unfiltered (gdb_stdlog, "target_flash_done\n");
- return t->to_flash_done (t);
- }
-
- tcomplain ();
-}
-
#ifndef target_stopped_data_address_p
int
target_stopped_data_address_p (struct target_ops *target)
@@ -1407,11 +1180,6 @@ target_write_with_progress (struct target_ops *ops,
void (*progress) (ULONGEST, void *), void *baton)
{
LONGEST xfered = 0;
-
- /* Give the progress callback a chance to set up. */
- if (progress)
- (*progress) (0, baton);
-
while (xfered < len)
{
LONGEST xfer = target_write_partial (ops, object, annex,
@@ -1588,18 +1356,6 @@ target_info (char *args, int from_tty)
}
}
-/* This function is called before any new inferior is created, e.g.
- by running a program, attaching, or connecting to a target.
- It cleans up any state from previous invocations which might
- change between runs. This is a subset of what target_preopen
- resets (things which might change between targets). */
-
-void
-target_pre_inferior (int from_tty)
-{
- invalidate_target_mem_regions ();
-}
-
/* This is to be called by the open routine before it does
anything. */
@@ -1622,8 +1378,6 @@ target_preopen (int from_tty)
if (target_has_execution)
pop_target ();
-
- target_pre_inferior (from_tty);
}
/* Detach a target after doing deferred register stores. */
diff --git a/gdb/target.h b/gdb/target.h
index 7be4aca..aa884c6 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -55,7 +55,6 @@ struct bp_target_info;
#include "symtab.h"
#include "dcache.h"
#include "memattr.h"
-#include "vec.h"
enum strata
{
@@ -199,14 +198,7 @@ enum target_object
/* Transfer auxilliary vector. */
TARGET_OBJECT_AUXV,
/* StackGhost cookie. See "sparc-tdep.c". */
- TARGET_OBJECT_WCOOKIE,
- /* Target memory map in XML format. */
- TARGET_OBJECT_MEMORY_MAP,
- /* Flash memory. This object can be used to write contents to
- a previously erased flash memory. Using it without erasing
- flash can have unexpected results. Addresses are physical
- address on target, and not relative to flash start. */
- TARGET_OBJECT_FLASH
+ TARGET_OBJECT_WCOOKIE
/* Possible future objects: TARGET_OBJECT_FILE, TARGET_OBJECT_PROC, ... */
};
@@ -232,13 +224,11 @@ extern LONGEST target_write (struct target_ops *ops,
const char *annex, const gdb_byte *buf,
ULONGEST offset, LONGEST len);
-/* Similar to target_write, except that it also calls PROGRESS with
- the number of bytes written and the opaque BATON after every
- successful partial write (and before the first write). This is
- useful for progress reporting and user interaction while writing
- data. To abort the transfer, the progress callback can throw an
- exception. */
-
+/* Similar to target_write, except that it also calls PROGRESS
+ with the number of bytes written and the opaque BATON after
+ every partial write. This is useful for progress reporting
+ and user interaction while writing data. To abort the transfer,
+ the progress callback can throw an exception. */
LONGEST target_write_with_progress (struct target_ops *ops,
enum target_object object,
const char *annex, const gdb_byte *buf,
@@ -463,35 +453,6 @@ struct target_ops
gdb_byte *readbuf, const gdb_byte *writebuf,
ULONGEST offset, LONGEST len);
- /* Returns the memory map for the target. A return value of NULL
- means that no memory map is available. If a memory address
- does not fall within any returned regions, it's assumed to be
- RAM. The returned memory regions should not overlap.
-
- The order of regions does not matter; target_memory_map will
- sort regions by starting address. For that reason, this
- function should not be called directly except via
- target_memory_map.
-
- This method should not cache data; if the memory map could
- change unexpectedly, it should be invalidated, and higher
- layers will re-fetch it. */
- VEC(mem_region_s) *(*to_memory_map) (struct target_ops *);
-
- /* Erases the region of flash memory starting at ADDRESS, of
- length LENGTH.
-
- Precondition: both ADDRESS and ADDRESS+LENGTH should be aligned
- on flash block boundaries, as reported by 'to_memory_map'. */
- void (*to_flash_erase) (struct target_ops *,
- ULONGEST address, LONGEST length);
-
- /* Finishes a flash memory write sequence. After this operation
- all flash memory should be available for writing and the result
- of reading from areas written by 'to_flash_write' should be
- equal to what was written. */
- void (*to_flash_done) (struct target_ops *);
-
int to_magic;
/* Need sub-structure for target machine related rather than comm related?
*/
@@ -615,61 +576,6 @@ extern int xfer_memory (CORE_ADDR, gdb_byte *, int, int,
extern int child_xfer_memory (CORE_ADDR, gdb_byte *, int, int,
struct mem_attrib *, struct target_ops *);
-/* Fetches the target's memory map. If one is found it is sorted
- and returned, after some consistency checking. Otherwise, NULL
- is returned. */
-VEC(mem_region_s) *target_memory_map (void);
-
-/* Erase the specified flash region. */
-void target_flash_erase (ULONGEST address, LONGEST length);
-
-/* Finish a sequence of flash operations. */
-void target_flash_done (void);
-
-/* Describes a request for a memory write operation. */
-struct memory_write_request
- {
- /* Begining address that must be written. */
- ULONGEST begin;
- /* Past-the-end address. */
- ULONGEST end;
- /* The data to write. */
- gdb_byte *data;
- /* A callback baton for progress reporting for this request. */
- void *baton;
- };
-typedef struct memory_write_request memory_write_request_s;
-DEF_VEC_O(memory_write_request_s);
-
-/* Enumeration specifying different flash preservation behaviour. */
-enum flash_preserve_mode
- {
- flash_preserve,
- flash_discard
- };
-
-/* Write several memory blocks at once. This version can be more
- efficient than making several calls to target_write_memory, in
- particular because it can optimize accesses to flash memory.
-
- Moreover, this is currently the only memory access function in gdb
- that supports writing to flash memory, and it should be used for
- all cases where access to flash memory is desirable.
-
- REQUESTS is the vector (see vec.h) of memory_write_request.
- PRESERVE_FLASH_P indicates what to do with blocks which must be
- erased, but not completely rewritten.
- PROGRESS_CB is a function that will be periodically called to provide
- feedback to user. It will be called with the baton corresponding
- to the request currently being written. It may also be called
- with a NULL baton, when preserved flash sectors are being rewritten.
-
- The function returns 0 on success, and error otherwise. */
-int target_write_memory_blocks (VEC(memory_write_request_s) *requests,
- enum flash_preserve_mode preserve_flash_p,
- void (*progress_cb) (ULONGEST, void *));
-
-
extern char *child_pid_to_exec_file (int);
extern char *child_core_file_to_sym_file (char *);
@@ -967,12 +873,11 @@ int target_follow_fork (int follow_child);
(current_target.to_has_registers)
/* Does the target have execution? Can we make it jump (through
- hoops), or pop its stack a few times? This means that the current
- target is currently executing; for some targets, that's the same as
- whether or not the target is capable of execution, but there are
- also targets which can be current while not executing. In that
- case this will become true after target_create_inferior or
- target_attach. */
+ hoops), or pop its stack a few times? FIXME: If this is to work that
+ way, it needs to check whether an inferior actually exists.
+ remote-udi.c and probably other targets can be the current target
+ when the inferior doesn't actually exist at the moment. Right now
+ this just tells us whether this target is *capable* of execution. */
#define target_has_execution \
(current_target.to_has_execution)
@@ -1222,22 +1127,10 @@ extern int push_target (struct target_ops *);
extern int unpush_target (struct target_ops *);
-extern void target_pre_inferior (int);
-
extern void target_preopen (int);
extern void pop_target (void);
-extern CORE_ADDR target_translate_tls_address (struct objfile *objfile,
- CORE_ADDR offset);
-
-/* Mark a pushed target as running or exited, for targets which do not
- automatically pop when not active. */
-
-void target_mark_running (struct target_ops *);
-
-void target_mark_exited (struct target_ops *);
-
/* Struct section_table maps address ranges to file sections. It is
mostly used with BFD files, but can be used without (e.g. for handling
raw disks, or files not in formats handled by BFD). */
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8e3dd05..61fcffb 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,129 +1,3 @@
-2006-11-10 Vladimir Prus <vladimir@codesourcery.com>
-
- * gdb.base/completion.exp: Fix completion tests for
- 'info' and 'info '.
- * gdb.base/help.exp (help_test_raw, test_class_help)
- (test_prefix_command_help): Move...
- * lib/gdb.exp: Here.
- * gdb.base/main.exp: Adjust.
- * gdb.cp/maint.exp: Adjust.
- * gdb.trace/tracecmd.exp: Use test_help_class.
-
-2006-11-09 Vladimir Prus <vladimir@codesourcery.com>
-
- * gdb.stabs/weird.exp (print_weird_var): Use
- gdb_test_multiple instead of gdb_expect.
-
-2006-11-09 Vladimir Prus <vladimir@codesourcery.com>
-
- * gdb.base/help.exp (help_test_raw): New.
- (test_class_help): New.
- (test_prefix_command_help): New.
- Adjust testcases.
-
-2006-11-09 Christophe Lyon <christophe.lyon@st.com>
-
- * gdb.base/constvars.c (main): Write to crass and crips, so that
- they are allocated by the compiler.
-
-2006-10-27 Andreas Schwab <schwab@suse.de>
-
- * gdb.base/multi-forks.exp: Use "detach fork" instead of
- "detach-fork".
-
-2006-10-18 Daniel Jacobowitz <dan@codesoucery.com>
-
- * lib/gdbserver-support.exp (gdb_target_cmd): Anchor the ends
- of patterns.
-
-2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
-
- * gdb.base/sepdebug.exp: Remove debug format test.
- * lib/gdb.exp (gdb_gnu_strip_debug): Perform debug format test.
- Handle no-symtab.
- * gdb.base/sepsymtab.c, gdb.base/sepsymtab.exp: New.
-
-2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
-
- * gdb.threads/manythreads.c (thread_function, main): Don't cast
- int to pointer or pointer to int.
- * gdb.threads/manythreads.exp: Don't expect the string "LWP".
-
-2006-10-12 Daniel Jacobowitz <dan@codesourcery.com>
-
- * gdb.base/annota1.exp, gdb.base/maint.exp: Use string_to_regexp.
-
-2006-10-09 Jan Kratochvil <jan.kratochvil@redhat.com>
-
- * gdb.threads/tls-nodebug.c, gdb.threads/tls-nodebug.exp: New test.
-
-2006-10-09 Daniel Jacobowitz <dan@codesourcery.com>
-
- PR c++/2116
- * gdb.cp/call-c.cc, gdb.cp/call-c.exp, gdb.cp/call-c-1.c: New.
-
-2006-10-06 Joel Brobecker <brobecker@adacore.com>
-
- * gdb.ada/arrayidx.exp: Remove calls to setup_kfail now that
- the corresponding bug has been fixed in GDB (PR/2018).
-
-2006-10-06 Joel Brobecker <brobecker@adacore.com>
-
- * gdb.base/subst.exp: New testcase.
-
-2006-10-06 Joel Brobecker <brobecker@adacore.com>
-
- * gdb.ada/array_return/pck.ads: Add copyright notice.
- * gdb.ada/array_return/pck.adb: Likewise.
- * gdb.ada/array_return/p.adb: Likewise.
- * gdb.ada/exec_changed/first.adb: Likewise.
- * gdb.ada/exec_changed/second.adb: Likewise.
-
-2006-10-06 Joel Brobecker <brobecker@adacore.com>
-
- * gdb.ada/watch_arg/watch.adb: New file.
- * gdb.ada/watch_arg.exp: New testcase.
-
-2006-10-02 Vladimir Prus <vladimir@codesourcery.com>
-
- * gdb.mi/mi-basics.exp (test_path_specification): Pass orig_path
- via string_to_regexp.
- * gdb.mi/mi2-basics.exp: Likewise.
-
-2006-09-20 Michael Snyder <michael.snyder@palmsource.com>
-
- * abug.exp, cpu32bug.exp, est.exp hmsirom.exp, nind.exp:
- Remove unused / obsolete files.
-
-2006-09-19 Nick Roberts <nickrob@snap.net.nz>
-
- * gdb.base/multi-forks.exp: Include __kernel_vsyscall in regexp.
-
-2006-09-17 Vladimir Prus <vladimir@codesourcery.com>
-
- * gdb.mi/mi-stack.exp (test_stack_args_listing): Test that
- HIGH_FRAME argument to -stack-list-arguments can be larger than
- the number of frames.
-
-2006-09-15 Daniel Jacobowitz <dan@codesourcery.com>
-
- * gdb.base/args.c (main): Add breakpoint marker.
- * gdb.base/args.exp: Use args_test for tests. Add new tests which
- really test empty arguments.
- (args_load): Delete.
- (args_test): New.
-
-2006-09-13 Nick Roberts <nickrob@snap.net.nz>
-
- * gdb.mi/mi-file.exp (test_file_list_exec_source_files): Just
- check for one file.
-
-2006-09-07 Vladimir Prus <ghost@vladimir@codesourcery.com>
-
- * gdb.mi/mi-stack.exp (test_stack_frame_listing): Test that
- HIGH_FRAME argument to -stack-list-locals can be larger than
- the number of frames.
-
2006-08-18 Fred Fish <fnf@specifix.com>
* lib/gdb.exp (skip_altivec_tests): Fix apparent typo,
diff --git a/gdb/testsuite/config/abug.exp b/gdb/testsuite/config/abug.exp
new file mode 100644
index 0000000..99b8a9d
--- /dev/null
+++ b/gdb/testsuite/config/abug.exp
@@ -0,0 +1,20 @@
+# Copyright 1997 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+load_lib ../config/monitor.exp
diff --git a/gdb/testsuite/config/cpu32bug.exp b/gdb/testsuite/config/cpu32bug.exp
new file mode 100644
index 0000000..99b8a9d
--- /dev/null
+++ b/gdb/testsuite/config/cpu32bug.exp
@@ -0,0 +1,20 @@
+# Copyright 1997 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+load_lib ../config/monitor.exp
diff --git a/gdb/testsuite/config/est.exp b/gdb/testsuite/config/est.exp
new file mode 100644
index 0000000..99b8a9d
--- /dev/null
+++ b/gdb/testsuite/config/est.exp
@@ -0,0 +1,20 @@
+# Copyright 1997 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+load_lib ../config/monitor.exp
diff --git a/gdb/testsuite/gdb.threads/tls-nodebug.exp b/gdb/testsuite/config/hmsirom.exp
index ee92a3f..0c53109 100644
--- a/gdb/testsuite/gdb.threads/tls-nodebug.exp
+++ b/gdb/testsuite/config/hmsirom.exp
@@ -1,5 +1,4 @@
-# tls.exp -- Expect script to test thread-local storage without debuginfo
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright 1997 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
@@ -13,40 +12,11 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
-set testfile tls-nodebug
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+# Support for testing against a Renesas SH3 target rom
-if [istarget "*-*-linux"] then {
- set target_cflags "-D_MIT_POSIX_THREADS"
-} else {
- set target_cflags ""
-}
-
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_load ${binfile}
-if ![runto_main] then {
- fail "Can't run to main"
- return 0
-}
-
-# Formerly: Cannot access memory at address 0x0
-gdb_test "p thread_local" "= 42" "thread local storage"
-
-# Done!
-#
-gdb_exit
-
-return 0
+load_lib ../config/monitor.exp
diff --git a/gdb/testsuite/config/nind.exp b/gdb/testsuite/config/nind.exp
new file mode 100644
index 0000000..0f84013
--- /dev/null
+++ b/gdb/testsuite/config/nind.exp
@@ -0,0 +1,46 @@
+# Test Framework Driver
+# Copyright (C) 1988, 1990, 1991, 1992, 1997 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# This file was written by Rob Savoye. (rob@cygnus.com)
+
+load_lib gdb.exp
+
+#
+# gdb_load -- load a file into the debugger.
+#
+proc gdb_load { arg } {
+ global verbose
+ global loadpath
+ global loadfile
+ global gdb_prompt
+ global GDB
+ set loadfile [file tail $arg]
+ set loadpath [file dirname $arg]
+ send_user "Not implememted yet\n" ; return -1
+}
+
+#
+# gdb_start -- start GDB running
+#
+proc gdb_start { } {
+ global GDB
+ global GDBFLAGS
+ global spawn_id
+ global gdb_prompt
+ global verbose
+ send_user "Not implememted yet\n" ; return -1
+}
diff --git a/gdb/testsuite/gdb.ada/array_return/p.adb b/gdb/testsuite/gdb.ada/array_return/p.adb
index bcfd75e..c465d28 100644
--- a/gdb/testsuite/gdb.ada/array_return/p.adb
+++ b/gdb/testsuite/gdb.ada/array_return/p.adb
@@ -1,20 +1,3 @@
--- Copyright 2006 Free Software Foundation, Inc.
---
--- This program is free software; you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation; either version 2 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program; if not, write to the Free Software
--- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- MA 02110-1301, USA
-
with Pck; use Pck;
procedure P is
diff --git a/gdb/testsuite/gdb.ada/array_return/pck.adb b/gdb/testsuite/gdb.ada/array_return/pck.adb
index 042af78..30282d1 100644
--- a/gdb/testsuite/gdb.ada/array_return/pck.adb
+++ b/gdb/testsuite/gdb.ada/array_return/pck.adb
@@ -1,20 +1,3 @@
--- Copyright 2006 Free Software Foundation, Inc.
---
--- This program is free software; you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation; either version 2 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program; if not, write to the Free Software
--- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- MA 02110-1301, USA
-
package body Pck is
function Create_Small return Data_Small is
diff --git a/gdb/testsuite/gdb.ada/array_return/pck.ads b/gdb/testsuite/gdb.ada/array_return/pck.ads
index 7f8eb23..2561ac7 100644
--- a/gdb/testsuite/gdb.ada/array_return/pck.ads
+++ b/gdb/testsuite/gdb.ada/array_return/pck.ads
@@ -1,20 +1,3 @@
--- Copyright 2006 Free Software Foundation, Inc.
---
--- This program is free software; you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation; either version 2 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program; if not, write to the Free Software
--- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- MA 02110-1301, USA
-
package Pck is
type Data_Small is array (1 .. 2) of Integer;
diff --git a/gdb/testsuite/gdb.ada/arrayidx.exp b/gdb/testsuite/gdb.ada/arrayidx.exp
index c6cd0d3..051937f 100644
--- a/gdb/testsuite/gdb.ada/arrayidx.exp
+++ b/gdb/testsuite/gdb.ada/arrayidx.exp
@@ -49,10 +49,22 @@ gdb_test "print one_two_three" \
"\\(1, 2, 3\\)" \
"print one_two_three, indexes off"
+# There is a bug somewhere that causes the debugger to think that
+# this array is indexed by an integer subrange, which it is actually
+# indexed by an enumerated type. As a consequence, indexes for this
+# array will be printed using their underlying integer value instead
+# of their names. Also, even when printing this array without indexes,
+# because the underlying value of the first enumeration is zero, the
+# debugger ends up printing this index even when "array-indexes" are
+# off, just because the index of the first element is not an enumerated
+# type, and its value is not one.
+setup_kfail "*-*-*" gdb/2018
gdb_test "print e_one_two_three" \
"\\(1, 2, 3\\)" \
"print e_one_two_three, indexes off"
+# Same as when printing e_one_two_three above.
+setup_kfail "*-*-*" gdb/2018
gdb_test "print r_two_three" \
"\\(two => 2, 3\\)" \
"print r_two_three, indexes off"
@@ -87,10 +99,16 @@ gdb_test "print one_two_three" \
"\\(1 => 1, 2 => 2, 3 => 3\\)" \
"print one_two_three"
+# Same as first attempt at printing this array, we currently fail.
+# See details above.
+setup_kfail "*-*-*" gdb/2018
gdb_test "print e_one_two_three" \
"\\(one => 1, two => 2, three => 3\\)" \
"print e_one_two_three"
+# Same as first attempt at printing this array, we currently fail.
+# See details above.
+setup_kfail "*-*-*" gdb/2018
gdb_test "print r_two_three" \
"\\(two => 2, three => 3\\)" \
"print r_two_three"
diff --git a/gdb/testsuite/gdb.ada/exec_changed/first.adb b/gdb/testsuite/gdb.ada/exec_changed/first.adb
index 342bea2..1a8b7e2 100644
--- a/gdb/testsuite/gdb.ada/exec_changed/first.adb
+++ b/gdb/testsuite/gdb.ada/exec_changed/first.adb
@@ -1,20 +1,3 @@
--- Copyright 2005 Free Software Foundation, Inc.
---
--- This program is free software; you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation; either version 2 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program; if not, write to the Free Software
--- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- MA 02110-1301, USA
-
procedure First is
begin
null;
diff --git a/gdb/testsuite/gdb.ada/exec_changed/second.adb b/gdb/testsuite/gdb.ada/exec_changed/second.adb
index 07a8117..60b8574 100644
--- a/gdb/testsuite/gdb.ada/exec_changed/second.adb
+++ b/gdb/testsuite/gdb.ada/exec_changed/second.adb
@@ -1,20 +1,3 @@
--- Copyright 2005 Free Software Foundation, Inc.
---
--- This program is free software; you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation; either version 2 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program; if not, write to the Free Software
--- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- MA 02110-1301, USA
-
procedure Second is
begin
null;
diff --git a/gdb/testsuite/gdb.ada/watch_arg.exp b/gdb/testsuite/gdb.ada/watch_arg.exp
deleted file mode 100644
index 81b9b9a..0000000
--- a/gdb/testsuite/gdb.ada/watch_arg.exp
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 2006 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA 02110-1301, USA
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-load_lib "ada.exp"
-
-set testdir "watch_arg"
-set testfile "${testdir}/watch"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
-
-file mkdir ${objdir}/${subdir}/${testdir}
-if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-set bp_location [gdb_get_line_number "BREAK1" ${testdir}/watch.adb]
-runto "watch.adb:$bp_location"
-
-# Insert a watchpoint on argument X
-
-gdb_test "watch x" \
- ".*atchpoint \[0-9\]+: x" \
- "Set watchpoint on function argument X"
-
-# Then insert a breakpoint at the location we'd like to continue to...
-set bp_location [gdb_get_line_number "BREAK2" ${testdir}/watch.adb]
-gdb_test "break watch.adb:$bp_location" \
- "Breakpoint \[0-9\]+ at.*: file .*watch.adb, line \[0-9\]+." \
- "insert second breakpoint in watch.adb"
-
-# Then continue to that breakpoint, and verify that the watchpoint
-# did not interfere with that.
-
-gdb_test "cont" \
- "Breakpoint \[0-9\]+, watch \\(\\).*" \
- "Continuing to second breakpoint"
-
-
diff --git a/gdb/testsuite/gdb.ada/watch_arg/watch.adb b/gdb/testsuite/gdb.ada/watch_arg/watch.adb
deleted file mode 100644
index e3cc4f6..0000000
--- a/gdb/testsuite/gdb.ada/watch_arg/watch.adb
+++ /dev/null
@@ -1,31 +0,0 @@
--- Copyright 2006 Free Software Foundation, Inc.
---
--- This program is free software; you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation; either version 2 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program; if not, write to the Free Software
--- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- MA 02110-1301, USA
-
-procedure Watch is
-
- procedure Foo (X : access Integer) is
- begin
- X.all := 3; -- BREAK1
- end Foo;
-
- X : aliased Integer := 1;
-
-begin
- Foo (X'Access);
- X := 2; -- BREAK2
-end Watch;
-
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index 7c8c0a7..c26aa6d 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -147,10 +147,9 @@ gdb_expect {
# annotate-stopped
#
#exp_internal 1
-set binexp [string_to_regexp $binfile]
send_gdb "run\n"
gdb_expect {
- -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" {
+ -re "\r\n\032\032post-prompt\r\nStarting program: $binfile \(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" {
pass "run until main breakpoint"
}
-re ".*$gdb_prompt$" {
diff --git a/gdb/testsuite/gdb.base/args.c b/gdb/testsuite/gdb.base/args.c
index 637544a..d564120 100644
--- a/gdb/testsuite/gdb.base/args.c
+++ b/gdb/testsuite/gdb.base/args.c
@@ -8,5 +8,5 @@ main (int argc, char **argv)
while (i < argc)
printf ("%s\n", argv[i++]);
- return 0; /* set breakpoint here */
+ return 0;
}
diff --git a/gdb/testsuite/gdb.base/args.exp b/gdb/testsuite/gdb.base/args.exp
index 75b5509..fa3c6c2ac 100644
--- a/gdb/testsuite/gdb.base/args.exp
+++ b/gdb/testsuite/gdb.base/args.exp
@@ -31,6 +31,15 @@ if [target_info exists noargs] {
return;
}
+# No loading needs to be done when the target is `exec'. Some targets
+# require that the program be loaded, however.
+proc args_load {} {
+ global binfile
+ if [target_info exists is_simulator] {
+ gdb_load ${binfile}
+ }
+}
+
set testfile "args"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
@@ -40,64 +49,42 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-proc args_test { name arglist } {
- global srcdir
- global subdir
- global binfile
- global hex
- global decimal
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
-
- # No loading needs to be done when the target is `exec'. Some targets
- # require that the program be loaded, however, and it doesn't hurt
- # for `exec'.
- gdb_load $binfile
-
- runto_main
- gdb_breakpoint [gdb_get_line_number "set breakpoint here"]
- gdb_continue_to_breakpoint "breakpoint for $name"
-
- set expected_len [expr 1 + [llength $arglist]]
- gdb_test "print argc" "\\\$$decimal = $expected_len" "argc for $name"
-
- set i 1
- foreach arg $arglist {
- gdb_test "print argv\[$i\]" "\\\$$decimal = $hex \"$arg\"" \
- "argv\[$i\] for $name"
- set i [expr $i + 1]
- }
-}
-
#
# Test that the --args are processed correctly.
#
set old_gdbflags $GDBFLAGS
set GDBFLAGS "--args $binfile 1 3"
-args_test basic {{1} {3}}
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+args_load
+gdb_test "run" \
+ "Starting program.*args(\\.exe)? 1 3.*3\r\n.*args\r\n1\r\n3.*Program exited normally." \
+ "correct args printed"
#
# Test that the --args are processed correctly even if one of them is empty.
-# The syntax needed is a little peculiar; DejaGNU treats the arguments as a
-# list and expands them itself, since no shell redirection is involved.
#
-set GDBFLAGS "--args $binfile 1 {} 3"
-args_test "one empty" {{1} {} {3}}
+set GDBFLAGS "--args $binfile 1 '' 3"
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+args_load
+gdb_test "run" \
+ "Starting program.*args(\\.exe)? 1 \\\\'\\\\' 3.*4\r\n.*args\r\n1\r\n''\r\n3.*Program exited normally." \
+ "correct args printed, one empty"
#
# try with 2 empty args
#
-set GDBFLAGS "--args $binfile 1 {} {} 3"
-args_test "two empty" {{1} {} {} 3}
-
-# Try with arguments containing literal single quotes.
-
-set GDBFLAGS "--args $binfile 1 '' 3"
-args_test "one empty" {{1} {''} {3}}
-
set GDBFLAGS "--args $binfile 1 '' '' 3"
-args_test "two empty" {{1} {''} {''} {3}}
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+args_load
+gdb_test "run" \
+ "Starting program.*args(\\.exe)? 1 \\\\'\\\\' \\\\'\\\\' 3.*5\r\n.*args\r\n1\r\n''\r\n''\r\n3.*Program exited normally." \
+ "correct args printed, two empty"
set GDBFLAGS $old_gdbflags
+
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index 8295e31..40102fa 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -313,7 +313,7 @@ gdb_expect {
-re "^info $"\
{ send_gdb "\n"
gdb_expect {
- -re "\"info\" must be followed by the name of an info command\\.\r\nList of info subcommands.*$gdb_prompt $"\
+ -re "\"info\" must be followed by the name of an info command\\.\r\nList of info subcommands:\r\n\r\n.*info address.*info watchpoints.*\r\n\r\nType \"help info\" followed by info subcommand name for full documentation.\r\nCommand name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
{ pass "complete 'info'"}
-re ".*$gdb_prompt $" { fail "complete 'info'"}
timeout {fail "(timeout) complete 'info'"}
@@ -329,7 +329,7 @@ gdb_expect {
-re "^info \\\x07$"\
{ send_gdb "\n"
gdb_expect {
- -re "\"info\" must be followed by the name of an info command\\.\r\nList of info subcommands:\r\n\r\n.*$gdb_prompt $"\
+ -re "\"info\" must be followed by the name of an info command\\.\r\nList of info subcommands:\r\n\r\n.*info address.*Type \"help info\" followed by info subcommand name for full documentation.\r\nCommand name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
{ pass "complete 'info '"}
-re ".*$gdb_prompt $" { fail "complete 'info '"}
timeout {fail "(timeout) complete 'info '"}
diff --git a/gdb/testsuite/gdb.base/constvars.c b/gdb/testsuite/gdb.base/constvars.c
index 188edb8..1602577 100644
--- a/gdb/testsuite/gdb.base/constvars.c
+++ b/gdb/testsuite/gdb.base/constvars.c
@@ -169,8 +169,8 @@ main (void)
/* various structs with const members */
- struct crass { char * const ptr; } crass = { lamprey };
- struct crisp { char * const *ptr; } crisp = { &lamprey };
+ struct crass { char * const ptr; } crass;
+ struct crisp { char * const *ptr; } crisp;
/* misc. references */
/*
diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp
index a76bec7..e9a1c21 100644
--- a/gdb/testsuite/gdb.base/help.exp
+++ b/gdb/testsuite/gdb.base/help.exp
@@ -39,8 +39,7 @@ gdb_test "help add-symbol-file" "Load symbols from FILE, assuming FILE has been
# test help advance
gdb_test "help advance" "Continue the program up to the given location \\(same form as args for break command\\)\.\[\r\n]+Execution will also stop upon exit from the current stack frame\." "help advance"
# test help aliases
-test_class_help "aliases" {"Aliases of other commands\.\[\r\n\]+"}
-
+gdb_test "help aliases" "Aliases of other commands\.\[\r\n\]+List of commands\:.*\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help aliases"
# test help append
gdb_test "help append" "Append target code/data to a local file\.\[\r\n\]+List of append subcommands:.*"
gdb_test "help append binary" "Append target code/data to a raw binary file\.\[\r\n\]+List of append binary subcommands:.*"
@@ -61,7 +60,7 @@ gdb_test "help brea" "Set breakpoint at specified line or function\.\[\r\n\]+bre
# test help breakpoint "break" abbreviation
gdb_test "help break" "Set breakpoint at specified line or function\.\[\r\n\]+break \\\[LOCATION\] \\\[thread THREADNUM\] \\\[if CONDITION\]\[\r\n\]+LOCATION may be a line number, function name, or \"\[*\]\" and an address\.\[\r\n\]+If a line number is specified, break at start of code for that line\.\[\r\n\]+If a function is specified, break at start of code for that function\.\[\r\n\]+If an address is specified, break at that exact address\.\[\r\n\]+With no LOCATION, uses current execution address of selected stack frame\.\[\r\n\]+This is useful for breaking on return to a stack frame\.\[\r\n\]+THREADNUM is the number from \"info threads\"\.\[\r\n\]+CONDITION is a boolean expression\.\[\r\n\]+Multiple breakpoints at one place are permitted, and useful if conditional\.\[\r\n\]+Do \"help breakpoints\" for info on other commands dealing with breakpoints\." "help breakpoint \"break\" abbreviation"
# test help breakpoints
-test_class_help "breakpoints" {"Making program stop at certain points\.\[\r\n\]+"}
+gdb_test "help breakpoints" "Making program stop at certain points\.\[\r\n\]+List of commands:\[\r\n\]+awatch -- Set a watchpoint for an expression\[\r\n\]+break -- Set breakpoint at specified line or function\[\r\n\]+catch -- Set catchpoints to catch events\[\r\n\]+clear -- Clear breakpoint at specified line or function\[\r\n\]+commands -- Set commands to be executed when a breakpoint is hit\[\r\n\]+condition -- Specify breakpoint number N to break only if COND is true\[\r\n\]+delete -- Delete some breakpoints or auto-display expressions\[\r\n\]+disable -- Disable some breakpoints\[\r\n\]+enable -- Enable some breakpoints\[\r\n\]+hbreak -- Set a hardware assisted breakpoint\[\r\n\]+ignore -- Set ignore-count of breakpoint number N to COUNT\[\r\n\]+rbreak -- Set a breakpoint for all functions matching REGEXP\[\r\n\]+rwatch -- Set a read watchpoint for an expression\[\r\n\]+tbreak -- Set a temporary breakpoint\[\r\n\]+tcatch -- Set temporary catchpoints to catch events\[\r\n\]+thbreak -- Set a temporary hardware assisted breakpoint\[\r\n\]+watch -- Set a watchpoint for an expression\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help breakpoints"
# test help backtrace "bt" abbreviation
gdb_test "help bt" "Print backtrace of all stack frames, or innermost COUNT frames\.\[\r\n\]+With a negative argument, print outermost -COUNT frames\.\[\r\n\]+Use of the 'full' qualifier also prints the values of the local variables\." "help backtrace \"bt\" abbreviation"
# test help backtrace
@@ -85,18 +84,11 @@ gdb_test "help condition" "Specify breakpoint number N to break only if COND is
# test help core-file
gdb_test "help core-file" "Use FILE as core dump for examining memory and registers\.\[\r\n\]+No arg means have no core file\. This command has been superseded by the\[\r\n\]+`target core' and `detach' commands\." "help core-file"
# test help delete "d" abbreviation
-set expected_help_delete {
- "Delete some breakpoints or auto-display expressions\.\[\r\n\]+"
- "Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+"
- "To delete all breakpoints, give no argument\.\[\r\n\]+"
- "Also a prefix command for deletion of other GDB objects\.\[\r\n\]+"
- "The \"unset\" command is also an alias for \"delete\"\.\[\r\n\]+"
-}
-test_prefix_command_help {"d" "delete"} $expected_help_delete "help delete \"d\" abbreviation"
+gdb_test "help d" "Delete some breakpoints or auto-display expressions\.\[\r\n\]+Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+To delete all breakpoints, give no argument\.\[\r\n\]+Also a prefix command for deletion of other GDB objects\.\[\r\n\]+The \"unset\" command is also an alias for \"delete\"\.\[\r\n\]+List of delete subcommands:\[\r\n\]+delete breakpoints -- Delete some breakpoints or auto-display expressions\[\r\n\]+(delete checkpoint -- Delete a fork/checkpoint \\(experimental\\)\[\r\n\]+)?delete display -- Cancel some expressions to be displayed when program stops\[\r\n\]+delete mem -- Delete memory region\[\r\n\]+delete tracepoints -- Delete specified tracepoints\[\r\n\]+Type \"help delete\" followed by delete subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help delete \"d\" abbreviation"
# test help delete
-test_prefix_command_help "delete" $expected_help_delete
+gdb_test "help delete" "Delete some breakpoints or auto-display expressions\.\[\r\n\]+Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+To delete all breakpoints, give no argument\.\[\r\n\]+Also a prefix command for deletion of other GDB objects\.\[\r\n\]+The \"unset\" command is also an alias for \"delete\"\.\[\r\n\]+List of delete subcommands:\[\r\n\]+delete breakpoints -- Delete some breakpoints or auto-display expressions\[\r\n\]+(delete checkpoint -- Delete a fork/checkpoint \\(experimental\\)\[\r\n\]+)?delete display -- Cancel some expressions to be displayed when program stops\[\r\n\]+delete mem -- Delete memory region\[\r\n\]+delete tracepoints -- Delete specified tracepoints\[\r\n\]+Type \"help delete\" followed by delete subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help delete"
# test help data
-test_class_help "data" {"Examining data\.\[\r\n\]+"}
+gdb_test "help data" "Examining data\.\[\r\n\]+List of commands:.*\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help data"
# test help define
gdb_test "help define" "Define a new command.*" "help define"
# test help delete breakpoints
@@ -104,25 +96,15 @@ gdb_test "help delete breakpoints" "Delete some breakpoints or auto-display expr
# test help delete display
gdb_test "help delete display" "Cancel some expressions to be displayed when program stops\.\[\r\n\]+Arguments are the code numbers of the expressions to stop displaying\.\[\r\n\]+No argument means cancel all automatic-display expressions\.\[\r\n\]+Do \"info display\" to see current list of code numbers\." "help delete display"
# test help detach
-test_prefix_command_help "detach" {
- "Detach a process or file previously attached\.\[\r\n\]+"
- "If a process, it is no longer traced, and it continues its execution\.\[ \r\n\]+If\[ \r\n\]+"
- "you were debugging a file, the file is closed and gdb no longer accesses it\.\[ \r\n\]+"
-}
+gdb_test "help detach" "Detach a process or file previously attached\.\[\r\n\]+If a process, it is no longer traced, and it continues its execution\.\[ \r\n\]+If\[ \r\n\]+you were debugging a file, the file is closed and gdb no longer accesses it\." "help detach"
# test help directory
gdb_test "help directory" "Add directory DIR to beginning of search path for source files\.\[\r\n\]+Forget cached info on source file locations and line positions\.\[\r\n\]+DIR can also be \\\$cwd for the current working directory, or \\\$cdir for the\[\r\n\]+directory in which the source file was compiled into object code\.\[\r\n\]+With no argument, reset the search path to \\\$cdir:\\\$cwd, the default\." "help directory"
# test help disable "dis" abbreviation
-set expected_help_disable {
- "Disable some breakpoints\.\[\r\n\]+"
- "Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+"
- "To disable all breakpoints, give no argument\.\[\r\n\]+"
- "A disabled breakpoint is not forgotten, but has no effect until reenabled\.\[\r\n\]+"
-}
-test_prefix_command_help {"dis" "disable"} $expected_help_disable "help disable \"dis\" abbreviation"
+gdb_test "help dis" "Disable some breakpoints\.\[\r\n\]+Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+To disable all breakpoints, give no argument\.\[\r\n\]+A disabled breakpoint is not forgotten, but has no effect until reenabled\.\[\r\n\]+List of disable subcommands:\[\r\n\]+disable breakpoints -- Disable some breakpoints\[\r\n\]+disable display -- Disable some expressions to be displayed when program stops\[\r\n\]+disable mem -- Disable memory region\[\r\n\]+disable tracepoints -- Disable specified tracepoints\[\r\n\]+Type \"help disable\" followed by disable subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help disable \"dis\" abbreviation"
# test help disable "disa" abbreviation
-test_prefix_command_help {"disa" "disable"} $expected_help_disable "help disable \"disa\" abbreviation"
+gdb_test "help disa" "Disable some breakpoints\.\[\r\n\]+Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+To disable all breakpoints, give no argument\.\[\r\n\]+A disabled breakpoint is not forgotten, but has no effect until reenabled\.\[\r\n\]+List of disable subcommands:\[\r\n\]+disable breakpoints -- Disable some breakpoints\[\r\n\]+disable display -- Disable some expressions to be displayed when program stops\[\r\n\]+disable mem -- Disable memory region\[\r\n\]+disable tracepoints -- Disable specified tracepoints\[\r\n\]+Type \"help disable\" followed by disable subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help disable \"disa\" abbreviation"
# test help disable
-test_prefix_command_help "disable" $expected_help_disable
+gdb_test "help disable" "Disable some breakpoints\.\[\r\n\]+Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+To disable all breakpoints, give no argument\.\[\r\n\]+A disabled breakpoint is not forgotten, but has no effect until reenabled\.\[\r\n\]+List of disable subcommands:\[\r\n\]+disable breakpoints -- Disable some breakpoints\[\r\n\]+disable display -- Disable some expressions to be displayed when program stops\[\r\n\]+disable mem -- Disable memory region\[\r\n\]+disable tracepoints -- Disable specified tracepoints\[\r\n\]+Type \"help disable\" followed by disable subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help disable"
# test help disable breakpoints
gdb_test "help disable breakpoints" "Disable some breakpoints\.\[\r\n\]+Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+To disable all breakpoints, give no argument\.\[\r\n\]+A disabled breakpoint is not forgotten, but has no effect until reenabled\.\[\r\n\]+This command may be abbreviated \"disable\"." "help disable breakpoints"
# test help disable display
@@ -168,12 +150,7 @@ gdb_test "help enable breakpoints delete" "Enable breakpoints and delete when hi
# test help enable breakpoints once
gdb_test "help enable breakpoints once" "Enable breakpoints for one hit.*" "help enable breakpoints once"
# test help enable breakpoints
-test_prefix_command_help {"enable breakpoints"} {
- "Enable some breakpoints\.\[\r\n\]+"
- "Give breakpoint numbers \\(separated by spaces\\) as arguments\.\[\r\n\]+"
- "This is used to cancel the effect of the \"disable\" command\.\[\r\n\]+"
- "May be abbreviated to simply \"enable\"\.\[\r\n\]+"
-}
+gdb_test "help enable breakpoints" "Enable some breakpoints\.\[\r\n\]+Give breakpoint numbers \\(separated by spaces\\) as arguments\.\[\r\n\]+This is used to cancel the effect of the \"disable\" command\.\[\r\n\]+May be abbreviated to simply \"enable\"\.\[\r\n\]+List of enable breakpoints subcommands:\[\r\n\]+enable breakpoints delete -- Enable breakpoints and delete when hit\[\r\n\]+enable breakpoints once -- Enable breakpoints for one hit\[\r\n\]+Type \"help enable breakpoints\" followed by enable breakpoints subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help enable breakpoints"
# test help enable delete
gdb_test "help enable delete" "Enable breakpoints and delete when hit\. Give breakpoint numbers\.\[\r\n\]+If a breakpoint is hit while enabled in this fashion, it is deleted\." "help enable delete"
# test help enable display
@@ -181,13 +158,7 @@ gdb_test "help enable display" "Enable some expressions to be displayed when pro
# test help enable once
gdb_test "help enable once" "Enable breakpoints for one hit.*" "help enable once"
# test help enable
-test_prefix_command_help "enable" {
- "Enable some breakpoints\.\[\r\n\]+"
- "Give breakpoint numbers \\(separated by spaces\\) as arguments\.\[\r\n\]+"
- "With no subcommand, breakpoints are enabled until you command otherwise.\.\[\r\n\]+"
- "This is used to cancel the effect of the \"disable\" command\.\[\r\n\]+"
- "With a subcommand you can enable temporarily\.\[\r\n\]+"
-}
+gdb_test "help enable" "Enable some breakpoints\.\[\r\n\]+Give breakpoint numbers \\(separated by spaces\\) as arguments\.\[\r\n\]+With no subcommand, breakpoints are enabled until you command otherwise\.\[\r\n\]+This is used to cancel the effect of the \"disable\" command\.\[\r\n\]+With a subcommand you can enable temporarily\.\[\r\n\]+List of enable subcommands:\[\r\n\]+enable delete -- Enable breakpoints and delete when hit\[\r\n\]+enable display -- Enable some expressions to be displayed when program stops\[\r\n\]+enable mem -- Enable memory region\[\r\n\]+enable once -- Enable breakpoints for one hit\[\r\n\]+enable tracepoints -- Enable specified tracepoints\[\r\n\]+Type \"help enable\" followed by enable subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help enable"
# test help exec-file
gdb_test "help exec-file" "Use FILE as program for getting contents of pure memory\.\[\r\n\]+If FILE cannot be found as specified, your execution directory path\[\r\n\]+is searched for a command of that name\.\[\r\n\]+No arg means have no executable file\." "help exec-file"
# test help frame "f" abbreviation
@@ -232,13 +203,9 @@ gdb_test "help help" "Print list of commands\." "help help"
# test help handle
gdb_test "help handle" "Specify how to handle a signal\..*" "help handle"
# test help info "i" abbreviation
-test_prefix_command_help {"i" "info"} {
- "Generic command for showing things about the program being debugged\.\[\r\n\]+"
-} "help info \"i\" abbreviation"
+gdb_test "help i" "Generic command for showing things about the program being debugged\.\[\r\n\]+List of info subcommands:.*\[\r\n\]+Type \"help info\" followed by info subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help info \"i\" abbreviation"
# test help info
-test_prefix_command_help "info" {
- "Generic command for showing things about the program being debugged\.\[\r\n\]+"
-}
+gdb_test "help info" "Generic command for showing things about the program being debugged\.\[\r\n\]+List of info subcommands:.*\[\r\n\]+Type \"help info\" followed by info subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help info"
# test help ignore
gdb_test "help ignore" "Set ignore-count of breakpoint number N to COUNT\.\[\r\n\]+Usage is `ignore N COUNT'\." "help ignore"
# test help info address
@@ -321,9 +288,7 @@ gdb_test "help next" "Step program, proceeding through subroutine calls\.\[\r\n\
gdb_test "help ni" "Step one instruction, but proceed through subroutine calls\.\[\r\n\]+Argument N means do this N times \\(or till program stops for another reason\\)\." "help nexti"
# all the commands that used to be here are now in "maintainance" instead
# test help obscure
-test_class_help "obscure" {
- "Obscure features\.\[\r\n\]+"
-}
+gdb_test "help obscure" "Obscure features\.\[\r\n\]+List of commands:.*\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help obscure"
# test help output
gdb_test "help output" "Like \"print\" but don't put in value history and don't print newline\.\[\r\n\]+This is useful in user-defined commands\." "help output"
# test help overlay
@@ -366,9 +331,7 @@ gdb_test "help return" "Make selected stack frame return to its caller\.\[\r\n\]
# test help reverse-search
gdb_test "help reverse-search" "Search backward for regular expression \\(see regex\\(3\\)\\) from last line listed\..*" "help reverse-search"
# test help running
-test_class_help "running" {
- "Running the program\.\[\r\n\]+"
-}
+gdb_test "help running" "Running the program\.\[\r\n\]+List of commands:.*\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help running"
# test help step "s" abbreviation
gdb_test "help s" "Step program until it reaches a different source line\.\[\r\n\]+Argument N means do this N times \\(or till program stops for another reason\\)\." "help step \"s\" abbreviation"
# test help step
@@ -382,17 +345,11 @@ gdb_test "help set annotate" "Set annotation_level\.\[\r\n\]+0 == normal; 1
# test help set args
gdb_test "help set args" "Set argument list to give program being debugged when it is started\.\[\r\n\]+Follow this command with any number of args, to be passed to the program\."
# test help set check "c" abbreviation
-test_prefix_command_help {"set c" "set check"} {
- "Set the status of the type/range checker\.\[\r\n\]+"
-} "help set check \"c\" abbreviation"
+gdb_test "help set c" "Set the status of the type/range checker\.\[\r\n\]+List of set check subcommands:\[\r\n\]+set check range -- Set range checking\[\r\n\]+set check type -- Set type checking\[\r\n\]+Type \"help set check\" followed by set check subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set check \"c\" abbreviation"
# test help set check "ch" abbreviation
-test_prefix_command_help {"set ch" "set check"} {
- "Set the status of the type/range checker\.\[\r\n\]+"
-} "help set check \"ch\" abbreviation"
+gdb_test "help set ch" "Set the status of the type/range checker\.\[\r\n\]+List of set check subcommands:\[\r\n\]+set check range -- Set range checking\[\r\n\]+set check type -- Set type checking\[\r\n\]+Type \"help set check\" followed by set check subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set check \"ch\" abbreviation"
# test help set check
-test_prefix_command_help {"set check"} {
- "Set the status of the type/range checker\.\[\r\n\]+"
-}
+gdb_test "help set check" "Set the status of the type/range checker\.\[\r\n\]+List of set check subcommands:\[\r\n\]+set check range -- Set range checking\[\r\n\]+set check type -- Set type checking\[\r\n\]+Type \"help set check\" followed by set check subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set check"
# test help set check range
gdb_test "help set check range" "Set range checking\. \\(on/warn/off/auto\\)" "help set check range"
# test help set check type
@@ -416,9 +373,7 @@ gdb_test "help set history save" "Set saving of the history record on exit\.\[\r
# test help set history size
gdb_test "help set history size" "Set the size of the command history,\[\r\n\]+ie\. the number of previous commands to keep a record of\." "help set history size"
# test help set history
-test_prefix_command_help {"set history"} {
- "Generic command for setting command history parameters\.\[\r\n\]+"
-}
+gdb_test "help set history" "Generic command for setting command history parameters\.\[\r\n\]+List of set history subcommands:\[\r\n\]+set history expansion -- Set history expansion on command input\[\r\n\]+set history filename -- Set the filename in which to record the command history\[\r\n\]+set history save -- Set saving of the history record on exit\[\r\n\]+set history size -- Set the size of the command history\[\r\n\]+Type \"help set history\" followed by set history subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set history"
# test help set language
gdb_test "help set language" "Set the current source language\." "help set language"
# test help set listsize
@@ -427,17 +382,11 @@ gdb_test "help set listsize" "Set number of source lines gdb will list by defaul
# FIXME -- Ultrix hangs randomly on this very long output from gdb and
# continues with its output only if something is sent to gdb.
# Also, if the system is slow, it may time out because the output is large.
-test_prefix_command_help {"set p" "set print"} {
- "Generic command for setting how things print\.\[\r\n\]+"
-} "help set print \"p\" abbreviation"
+gdb_test "help set p" "Generic command for setting how things print\.\[\r\n\]+List of set print subcommands:.*\[\r\n\]+Type \"help set print\" followed by set print subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set print \"p\" abbreviation"
# test help set print "pr" abbreviation
-test_prefix_command_help {"set pr" "set print"} {
- "Generic command for setting how things print\.\[\r\n\]+"
-} "help set print \"pr\" abbreviation"
+gdb_test "help set pr" "Generic command for setting how things print\.\[\r\n\]+List of set print subcommands:.*\[\r\n\]+Type \"help set print\" followed by set print subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set print \"pr\" abbreviation"
# test help set print
-test_prefix_command_help {"set print"} {
- "Generic command for setting how things print\.\[\r\n\]+"
-}
+gdb_test "help set print" "Generic command for setting how things print\.\[\r\n\]+List of set print subcommands:.*\[\r\n\]+Type \"help set print\" followed by set print subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set print"
# test help set print address
gdb_test "help set print address" "Set printing of addresses\." "help set print address"
# test help set print array
@@ -477,16 +426,7 @@ gdb_test "help set write" "Set writing into executable and core files\." "help s
# FIXME -- Ultrix hangs randomly on this very long output from gdb and
# continues with its output only if something is sent to gdb.
# Also, if the system is slow, it may time out because the output is large.
-test_prefix_command_help "set" {
- "Evaluate expression EXP and assign result to variable VAR, using assignment\[\r\n\]+"
- "syntax appropriate for the current language \\(VAR = EXP or VAR := EXP for\[\r\n\]+"
- "example\\)\. VAR may be a debugger \"convenience\" variable \\(names starting\[\r\n\]+"
- "with \\\$\\), a register \\(a few standard names starting with \\\$\\), or an actual\[\r\n\]+"
- "variable in the program being debugged\. EXP is any valid expression.*\[\r\n\]+"
- "Use \"set variable\" for variables with names identical to set subcommands\.\[\r\n\]+"
- "With a subcommand, this command modifies parts of the gdb environment\.\[\r\n\]+"
- "You can see these environment settings with the \"show\" command\.\[\r\n\]+"
-}
+gdb_test "help set" "Evaluate expression EXP and assign result to variable VAR, using assignment\[\r\n\]+syntax appropriate for the current language \\(VAR = EXP or VAR := EXP for\[\r\n\]+example\\)\. VAR may be a debugger \"convenience\" variable \\(names starting\[\r\n\]+with \\\$\\), a register \\(a few standard names starting with \\\$\\), or an actual\[\r\n\]+variable in the program being debugged\. EXP is any valid expression.*\[\r\n\]+set listsize -- Set number of source lines gdb will list by default.*\[\r\n\]+Type \"help set\" followed by set subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous..*\[\r\n\]+" "help set"
# test help shell
gdb_test "help shell" "Execute the rest of the line as a shell command\.\[\r\n\]+With no arguments, run an inferior shell\." "help shell"
#test help show annotate
@@ -494,13 +434,9 @@ gdb_test "help show annotate" "Show annotation_level\.\[\r\n\]+0 == normal;
# test help show args
gdb_test "help show args" "Show argument list to give program being debugged when it is started\.\[\r\n\]+Follow this command with any number of args, to be passed to the program\."
# test help show check "c" abbreviation
-test_prefix_command_help {"show c" "show check"} {
- "Show the status of the type/range checker\.\[\r\n\]+"
-} "help show check \"c\" abbreviation"
+gdb_test "help show c" "Show the status of the type/range checker\.\[\r\n\]+List of show check subcommands:\[\r\n\]+show check range -- Show range checking\[\r\n\]+show check type -- Show type checking\[\r\n\]+Type \"help show check\" followed by show check subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show check \"c\" abbreviation"
# test help show check
-test_prefix_command_help {"show check"} {
- "Show the status of the type/range checker\.\[\r\n\]+"
-}
+gdb_test "help show check" "Show the status of the type/range checker\.\[\r\n\]+List of show check subcommands:\[\r\n\]+show check range -- Show range checking\[\r\n\]+show check type -- Show type checking\[\r\n\]+Type \"help show check\" followed by show check subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show check"
# test help show check range
gdb_test "help show check range" "Show range checking\. \\(on/warn/off/auto\\)" "help show check range"
# test help show check type
@@ -530,25 +466,17 @@ gdb_test "help show history save" "Show saving of the history record on exit\.\[
# test help show history size
gdb_test "help show history size" "Show the size of the command history,\[\r\n\]+ie\. the number of previous commands to keep a record of\." "help show history size"
# test help show history
-test_prefix_command_help {"show history"} {
- "Generic command for showing command history parameters\.\[\r\n\]+"
-}
+gdb_test "help show history" "Generic command for showing command history parameters\.\[\r\n\]+List of show history subcommands:\[\r\n\]+show history expansion -- Show history expansion on command input\[\r\n\]+show history filename -- Show the filename in which to record the command history\[\r\n\]+show history save -- Show saving of the history record on exit\[\r\n\]+show history size -- Show the size of the command history\[\r\n\]+Type \"help show history\" followed by show history subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show history"
# test help show language
gdb_test "help show language" "Show the current source language\." "help show language"
# test help show listsize
gdb_test "help show listsize" "Show number of source lines gdb will list by default\." "help show listsize"
# test help show print "p" abbreviation
-test_prefix_command_help {"show p" "show print"} {
- "Generic command for showing print settings\.\[\r\n\]+"
-} "help show print \"p\" abbreviation"
+gdb_test "help show p" "Generic command for showing print settings\.\[\r\n\]+List of show print subcommands:.*\[\r\n\]+Type \"help show print\" followed by show print subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show print \"p\" abbreviation"
# test help show print "pr" abbreviation
-test_prefix_command_help {"show pr" "show print"} {
- "Generic command for showing print settings\.\[\r\n\]+"
-} "help show print \"pr\" abbreviation"
+gdb_test "help show pr" "Generic command for showing print settings\.\[\r\n\]+List of show print subcommands:.*\[\r\n\]+Type \"help show print\" followed by show print subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show print \"pr\" abbreviation"
# test help show print
-test_prefix_command_help {"show print"} {
- "Generic command for showing print settings\.\[\r\n\]+"
-} "help show print \"p\" abbreviation"
+gdb_test "help show print" "Generic command for showing print settings\.\[\r\n\]+List of show print subcommands:.*\[\r\n\]+Type \"help show print\" followed by show print subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show print"
# test help show paths
gdb_test "help show paths" "Current search path for finding object files\.\[\r\n\]+\\\$cwd in the path means the current working directory\.\[\r\n\]+This path is equivalent to the \\\$PATH shell variable\. It is a list of\[\r\n\]+directories, separated by colons\. These directories are searched to find\[\r\n\]+fully linked executable files and separately compiled object files as needed\." "help show paths"
# test help show print address
@@ -594,9 +522,7 @@ gdb_test "help show write" "Show writing into executable and core files\." "help
# FIXME -- Ultrix hangs randomly on this very long output from gdb and
# continues with its output only if something is sent to gdb.
# Also, if the system is slow, it may time out because the output is large.
-test_prefix_command_help "show" {
- "Generic command for showing things about the debugger\.\[\r\n\]+"
-}
+gdb_test "help show" "Generic command for showing things about the debugger\.\[\r\n\]+List of show subcommands:.*\[\r\n\]+show directories -- Current search path for finding source files.*\[\r\n\]+show listsize -- Show number of source lines gdb will list by default.*\[\r\n\]+Type \"help show\" followed by show subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show"
# test help step
gdb_test "help step" "Step program until it reaches a different source line\.\[\r\n\]+Argument N means do this N times \\(or till program stops for another reason\\)\." "help step #2"
# test help stepi "si" abbreviation
@@ -609,23 +535,15 @@ gdb_test "help signal" "Continue program giving it signal.*" "help signal"
# vxgdb reads .vxgdbinit
gdb_test "help source" "Read commands from a file named FILE\.\[\r\n\]+Optional -v switch \\(before the filename\\) causes each command in\[\r\n\]+FILE to be echoed as it is executed\.\[\r\n\]+Note that the file \"\[^\"\]*\" is read automatically in this way\[\r\n\]+when GDB is started\." "help source"
# test help stack
-test_class_help "stack" {
- "Examining the stack\..*\[\r\n\]+"
- "When the program being debugged stops, gdb selects the innermost frame\.\[\r\n\]+"
- "The commands below can be used to select other frames by number or address\.\[\r\n\]+"
-}
+gdb_test "help stack" "Examining the stack\..*\[\r\n\]+When the program being debugged stops, gdb selects the innermost frame\.\[\r\n\]+The commands below can be used to select other frames by number or address\.\[\r\n\]+List of commands:\[\r\n\]+backtrace -- Print backtrace of all stack frames\[\r\n\]+bt -- Print backtrace of all stack frames\[\r\n\]+down -- Select and print stack frame called by this one\[\r\n\]+frame -- Select and print a stack frame\[\r\n\]+return -- Make selected stack frame return to its caller\[\r\n\]+select-frame -- Select a stack frame without printing anything\[\r\n\]+up -- Select and print stack frame that called this one\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help stack"
# test help status
-test_class_help "status" {
- "Status inquiries\.\[\r\n\]+"
-}
+gdb_test "help status" "Status inquiries\.\[\r\n\]+List of commands:\[\r\n\]+info -- Generic command for showing things about the program being debugged.*\[\r\n\]+show -- Generic command for showing things about the debugger\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help status"
# test help support
# FIXME -- Ultrix hangs randomly on this very long output from gdb and
# continues with its output only if something is sent to gdb.
# Also, if the system is slow, it may time out because the output is large.
-test_class_help "support" {
- "Support facilities\.\[\r\n\]+"
-}
+gdb_test "help support" "Support facilities\.\[\r\n\]+List of commands:.*\[\r\n\]+show confirm -- Show whether to confirm potentially dangerous operations.*\[\r\n\]+show history -- Generic command for showing command history parameters.*\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help support"
# test help symbol-file
gdb_test "help symbol-file" "Load symbol table from executable file FILE\.\[\r\n\]+The `file' command can also load symbol tables, as well as setting the file\[\r\n\]+to execute\." "help symbol-file"
# test help target child
@@ -640,13 +558,7 @@ gdb_test "help target exec" "Use an executable file as a target\.\[\r\n\]+Specif
gdb_test "help target remote" "Use a remote computer via a serial line, using a gdb-specific protocol\.\[\r\n\]+Specify the serial device it is connected to\[\r\n\]+\\(e.g. .*" "help target remote"
# test help target
# the child process target may be "target child" or "target procfs"
-test_prefix_command_help "target" {
- "Connect to a target machine or process\.\[\r\n\]+"
- "The first argument is the type or protocol of the target machine\.\[\r\n\]+"
- "Remaining arguments are interpreted by the target protocol\. For more\[\r\n\]+"
- "information on the arguments for a particular protocol, type\[\r\n\]+"
- "`help target ' followed by the protocol name\.\[\r\n\]+"
-}
+gdb_test "help target" "Connect to a target machine or process\.\[\r\n\]+The first argument is the type or protocol of the target machine\.\[\r\n\]+Remaining arguments are interpreted by the target protocol\. For more\[\r\n\]+information on the arguments for a particular protocol, type\[\r\n\]+`help target ' followed by the protocol name\.\[\r\n\]+List of target subcommands:.*\[\r\n\]+target exec -- Use an executable file as a target.*\[\r\n\]+Type \"help target\" followed by target subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help target"
# test help tbreak
gdb_test "help tbreak" "Set a temporary breakpoint.*" "help tbreak"
# test help tty
@@ -660,19 +572,13 @@ gdb_test "help undisplay" "Cancel some expressions to be displayed when program
# test help unset environment
gdb_test "help unset environment" "Cancel environment variable VAR for the program\.\[\r\n\]+This does not affect the program until the next \"run\" command\." "help unset environment"
# test help unset
-test_prefix_command_help "unset" {
- "Complement to certain \"set\" commands\.\[\r\n\]+"
-}
+gdb_test "help unset" "Complement to certain \"set\" commands\.\[\r\n\]+List of unset subcommands:\[\r\n\]+.*Type \"help unset\" followed by unset subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help unset"
# test help up
gdb_test "help up" "Select and print stack frame that called this one\.\[\r\n\]+An argument says how many frames up to go\." "help up"
# test help up-silently
gdb_test "help up-silently" "Same as the `up' command, but does not print anything\.\[\r\n\]+This is useful in command scripts\." "help up-silently"
# test help user-defined
-test_class_help "user-defined" {
- "User-defined commands\.\[\r\n\]+"
- "The commands in this class are those defined by the user\.\[\r\n\]+"
- "Use the \"define\" command to define a command\.\[\r\n\]+"
-}
+gdb_test "help user-defined" "User-defined commands\.\[\r\n\]+The commands in this class are those defined by the user\.\[\r\n\]+Use the \"define\" command to define a command\.\[\r\n\]+List of commands:.*\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help user-defined"
# test help watch
gdb_test "help watch" "Set a watchpoint for an expression\.\[\r\n\]+A watchpoint stops execution of your program whenever the value of\[\r\n\]+an expression changes\." "help watch"
# test help whatis
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index f3fe9de..cc165ec 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -328,7 +328,7 @@ gdb_expect {
# Check that maint print msymbols allows relative pathnames
set mydir [pwd]
-gdb_test "cd ${objdir}" "Working directory [string_to_regexp ${objdir}]\..*"
+gdb_test "cd ${objdir}" "Working directory ${objdir}\..*"
gdb_test_multiple "maint print msymbols msymbols_output2 ${subdir}/${testfile}" "maint print msymbols" {
-re "^maint print msymbols msymbols_output2 \[^\n\]*\r\n$gdb_prompt $" {
gdb_test_multiple "shell ls msymbols_output2" "maint print msymbols" {
@@ -361,7 +361,7 @@ gdb_test_multiple "maint print msymbols msymbols_output2 ${subdir}/${testfile}"
fail "(timeout) maint print msymbols"
}
}
-gdb_test "cd ${mydir}" "Working directory [string_to_regexp ${mydir}]\..*"
+gdb_test "cd ${mydir}" "Working directory ${mydir}\..*"
send_gdb "maint print symbols\n"
gdb_expect {
@@ -679,16 +679,21 @@ gdb_expect {
timeout { fail "(timeout) help maint info" }
}
-test_prefix_command_help {"maint print" "maintenance print"} {
- "Maintenance command for printing GDB internal state\\.\[\r\n\]+"
-}
+send_gdb "help maint print\n"
+gdb_expect {
+ -re "Maintenance command for printing GDB internal state\\.\[\r\n\]+List of maintenance print subcommands:\[\r\n\]+maintenance print architecture -- Print the internal architecture configuration.*maintenance print msymbols -- Print dump of current minimal symbol definitions.*maintenance print objfiles -- Print dump of current object file definitions.*maintenance print psymbols -- Print dump of current partial symbol definitions.*maintenance print statistics -- Print statistics about internal gdb state.*maintenance print symbols -- Print dump of current symbol definitions.*maintenance print type -- Print a type chain for a given symbol.*Type .help maintenance print. followed by maintenance print subcommand name for full documentation\\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
+ { pass "help maint print" }
+ -re ".*$gdb_prompt $" { fail "help maint print" }
+ timeout { fail "(timeout) help maint print" }
+ }
-test_prefix_command_help {"maint" "maintenance"} {
- "Commands for use by GDB maintainers\\.\[\r\n\]+"
- "Includes commands to dump specific internal GDB structures in\[\r\n\]+"
- "a human readable form, to cause GDB to deliberately dump core,\[\r\n\]+"
- "to test internal functions such as the C\\+\\+/ObjC demangler, etc\\.\[\r\n\]+"
-}
+send_gdb "help maint\n"
+gdb_expect {
+ -re "Commands for use by GDB maintainers\\.\[\r\n\]+Includes commands to dump specific internal GDB structures in\[\r\n\]+a human readable form, to cause GDB to deliberately dump core,\[\r\n\]+to test internal functions such as the C\\+\\+/ObjC demangler, etc\\..*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
+ { pass "help maint" }
+ -re ".*$gdb_prompt $" { fail "help maint" }
+ timeout { fail "(timeout) help maint" }
+ }
#set oldtimeout $timeout
#set timeout [expr $timeout + 300]
diff --git a/gdb/testsuite/gdb.base/multi-forks.exp b/gdb/testsuite/gdb.base/multi-forks.exp
index fed0cce..4799478 100644
--- a/gdb/testsuite/gdb.base/multi-forks.exp
+++ b/gdb/testsuite/gdb.base/multi-forks.exp
@@ -115,8 +115,7 @@ gdb_test "set detach off" "" "set detach off"
for {set i 1} {$i <= 15} {incr i} {
gdb_test "continue" "Breakpoint .* main .*exit.*" "Run to exit $i"
gdb_test "info fork" " 4 .* 3 .* 2 .* 1 .*" "info fork $i"
- gdb_test "restart $i" "(_dl_sysinfo_int80|fork|__kernel_vsyscall).*" \
- "restart $i"
+ gdb_test "restart $i" "(_dl_sysinfo_int80|fork).*" "restart $i"
}
gdb_test "continue" "Breakpoint .* main .*exit.*" "Run to exit 16"
@@ -128,14 +127,14 @@ gdb_test "restart 0" " main .*" "restart final"
#
#
-# Test detach fork
+# Test detach-fork
#
# [assumes we're at #0]
-gdb_test "detach fork 1" "Detached .*" "Detach 1"
-gdb_test "detach fork 2" "Detached .*" "Detach 2"
-gdb_test "detach fork 3" "Detached .*" "Detach 3"
-gdb_test "detach fork 4" "Detached .*" "Detach 4"
+gdb_test "detach-fork 1" "Detached .*" "Detach 1"
+gdb_test "detach-fork 2" "Detached .*" "Detach 2"
+gdb_test "detach-fork 3" "Detached .*" "Detach 3"
+gdb_test "detach-fork 4" "Detached .*" "Detach 4"
#
# Test delete fork
diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp
index 4593549..5bc00c5 100644
--- a/gdb/testsuite/gdb.base/sepdebug.exp
+++ b/gdb/testsuite/gdb.base/sepdebug.exp
@@ -47,6 +47,39 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
+# FIXME: this is nasty. We need to check for the stabs debug format.
+# To do this we must run gdb on the unstripped executable, list 'main'
+# (as to have a default source file), use get_debug_format (which does
+# 'info source') and then see if the debug info is stabs. If so, we
+# bail out. We cannot do this any other way because get_debug_format
+# finds out the debug format using gdb itself, and in case of stabs we
+# get an error loading the program if it is already stripped. An
+# alternative would be to find out the debug info from the flags
+# passed to dejagnu when the test is run.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+gdb_test "list main" "" ""
+get_debug_format
+if { [test_debug_format "stabs"] } then {
+ # the separate debug info feature doesn't work well in binutils with stabs.
+ # It produces a corrupted debug info only file, and gdb chokes on it.
+ # It is almost impossible to capture the failing message out of gdb,
+ # because it happens inside gdb_load. At that point any error message
+ # is intercepted by dejagnu itself, and, because of the error threshold,
+ # any faulty test result is changed into an UNRESOLVED.
+ # (see dejagnu/lib/framework.exp)
+ unsupported "no separate debug info handling with stabs"
+ return -1
+} elseif { [test_debug_format "unknown"] } then {
+ # gdb doesn't know what the debug format is. We are out of luck here.
+ unsupported "unknown debugging format"
+ return -1
+}
+gdb_exit
+
# Note: the procedure gdb_gnu_strip_debug will produce an executable called
# ${binfile}, which is just like the executable ($binfile) but without
# the debuginfo. Instead $binfile has a .gnudebuglink section which contains
diff --git a/gdb/testsuite/gdb.base/sepsymtab.c b/gdb/testsuite/gdb.base/sepsymtab.c
deleted file mode 100644
index 1c53958..0000000
--- a/gdb/testsuite/gdb.base/sepsymtab.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-int
-main (int argc, char **argv, char **envp)
-{
- return 0;
-}
diff --git a/gdb/testsuite/gdb.base/sepsymtab.exp b/gdb/testsuite/gdb.base/sepsymtab.exp
deleted file mode 100644
index b386f3c..0000000
--- a/gdb/testsuite/gdb.base/sepsymtab.exp
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2006
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-#
-# test running programs
-#
-
-set testfile "sepsymtab"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
- executable {debug}] != "" } {
- untested sepsymtab.exp
- return -1
-}
-
-if [gdb_gnu_strip_debug $binfile no-main] {
- # check that you have a recent version of strip and objcopy installed
- unsupported "cannot produce separate debug info files"
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-set command "info sym main"
-set command_regex [string_to_regexp $command]
-gdb_test_multiple "$command" "$command" {
- -re "^${command_regex}\[\r\n\]+main in section \[^\r\n\]+\[\r\n\]+$gdb_prompt \$" {
- pass "$command"
- }
-}
diff --git a/gdb/testsuite/gdb.base/subst.exp b/gdb/testsuite/gdb.base/subst.exp
deleted file mode 100644
index cda75f9..0000000
--- a/gdb/testsuite/gdb.base/subst.exp
+++ /dev/null
@@ -1,149 +0,0 @@
-# Copyright 2006 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA 02110-1301, USA
-
-if $tracelevel {
- strace $tracelevel
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-# Do a bunch of testing of the set/unset/show substitute-path
-# commands that do not require the presence of an executable.
-
-gdb_test "set confirm off" \
- "" \
- "deactivate GDB's confirmation interface"
-
-gdb_test "show substitute-path" \
- "List of all source path substitution rules:" \
- "show substitute-path, no rule entered yet"
-
-gdb_test "show substitute-path from" \
- "Source path substitution rule matching `from':" \
- "show substitute-path from, no rule entered yet"
-
-gdb_test "show substitute-path too many" \
- "Too many arguments in command" \
- "show substitute-path, too many arguments"
-
-gdb_test "unset substitute-path from" \
- "No substitution rule defined for `from'" \
- "unset substitute-path from, no rule entered yet"
-
-gdb_test "unset substitute-path" \
- "" \
- "unset substitute-path, no rule entered yet"
-
-gdb_test "unset substitute-path from" \
- "No substitution rule defined for `from'" \
- "unset substitute-path from, no rule entered yet"
-
-gdb_test "unset substitute-path from to" \
- "Incorrect usage, too many arguments in command" \
- "unset substitute-path, too many arguments"
-
-gdb_test "set substitute-path too many arguments" \
- "Incorrect usage, too many arguments in command" \
- "set substitute-path, too many arguments"
-
-gdb_test "set substitute-path missing" \
- "Incorrect usage, too few arguments in command" \
- "set substitute-path, too few arguments"
-
-gdb_test "set substitute-path '' to" \
- "First argument must be at least one character long" \
- "set substitute-path, first argument is empty string"
-
-gdb_test "set substitute-path from to" \
- "" \
- "add from -> to substitution rule"
-
-gdb_test "set substitute-path from1 to1/" \
- "" \
- "add from1 -> to1 substitution rule"
-
-gdb_test "set substitute-path source destination" \
- "" \
- "add source -> destination substitution rule"
-
-gdb_test "set substitute-path depuis/ vers" \
- "" \
- "add depuis -> vers substitution rule"
-
-gdb_test "set substitute-path empty ''" \
- "" \
- "add substitution rule to empty string"
-
-gdb_test "show substitute-path" \
- "List of all source path substitution rules:\r\n +`from' -> `to'.\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'.\r\n\ +`depuis' -> `vers'.\r\n +`empty' -> `'." \
- "show substitute-path after all paths added"
-
-gdb_test "show substitute-path from" \
- "Source path substitution rule matching `from':\r\n +`from' -> `to'." \
- "show substitute-path from, after all paths added"
-
-gdb_test "show substitute-path depuis" \
- "Source path substitution rule matching `depuis':\r\n +`depuis' -> `vers'." \
- "show substitute-path depuis, after all paths added"
-
-gdb_test "show substitute-path garbage" \
- "Source path substitution rule matching `garbage':" \
- "show substitute-path garbage, after all paths added"
-
-gdb_test "unset substitute-path from" \
- "" \
- "unset substitute-path from"
-
-gdb_test "show substitute-path from" \
- "Source path substitution rule matching `from':" \
- ""
-
-gdb_test "show substitute-path" \
- "List of all source path substitution rules:\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'.\r\n\ +`depuis' -> `vers'.\r\n +`empty' -> `'." \
- "show substitute-path after from rule removed"
-
-gdb_test "unset substitute-path from" \
- "No substitution rule defined for `from'" \
- "unset substitute-path from after the rule was removed"
-
-gdb_test "unset substitute-path depuis" \
- "" \
- "unset substitute-path depuis (middle of list)"
-
-gdb_test "show substitute-path" \
- "List of all source path substitution rules:\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'.\r\n\ +`empty' -> `'." \
- "show substitute-path after depuis rule removed"
-
-gdb_test "unset substitute-path empty" \
- "" \
- "unset substitute-path empty (end of list)"
-
-gdb_test "show substitute-path" \
- "List of all source path substitution rules:\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'." \
- "show substitute-path after empty rule removed"
-
-gdb_test "unset substitute-path" \
- "" \
- "remove all remaining substitution rules"
-
-gdb_test "show substitute-path" \
- "List of all source path substitution rules:" \
- "show substitute-path after all remaining rules removed"
-
-
diff --git a/gdb/testsuite/gdb.cp/call-c-1.c b/gdb/testsuite/gdb.cp/call-c-1.c
deleted file mode 100644
index 32d8e53..0000000
--- a/gdb/testsuite/gdb.cp/call-c-1.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* This test script is part of GDB, the GNU debugger.
-
- Copyright 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-int foo(int x) { return x; }
diff --git a/gdb/testsuite/gdb.cp/call-c.cc b/gdb/testsuite/gdb.cp/call-c.cc
deleted file mode 100644
index 77be441..0000000
--- a/gdb/testsuite/gdb.cp/call-c.cc
+++ /dev/null
@@ -1,29 +0,0 @@
-/* This test script is part of GDB, the GNU debugger.
-
- Copyright 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-int func(int x)
-{
- return x;
-}
-
-int main()
-{
- return func(0);
-}
diff --git a/gdb/testsuite/gdb.cp/call-c.exp b/gdb/testsuite/gdb.cp/call-c.exp
deleted file mode 100644
index 879e195..0000000
--- a/gdb/testsuite/gdb.cp/call-c.exp
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 2006 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile call-c
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfilec ${srcdir}/${subdir}/${testfile}-1.c
-set srcfilecpp ${srcdir}/${subdir}/${testfile}.cc
-set objfilec ${objdir}/${subdir}/${testfile}-1.o
-set objfilecpp ${objdir}/${subdir}/${testfile}.o
-
-if {[gdb_compile "${srcfilec}" "${objfilec}" object {debug}] != ""
- || [gdb_compile "${srcfilecpp}" "${objfilecpp}" object {c++ debug}] != ""
- || [gdb_compile "${objfilecpp} ${objfilec}" "${binfile}" executable {c++ debug}] != ""} {
- untested hang.exp
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-runto_main
-
-gdb_test "print foo(1)" "\\\$$decimal = 1"
diff --git a/gdb/testsuite/gdb.cp/maint.exp b/gdb/testsuite/gdb.cp/maint.exp
index 15e7677..6b781df 100644
--- a/gdb/testsuite/gdb.cp/maint.exp
+++ b/gdb/testsuite/gdb.cp/maint.exp
@@ -29,17 +29,13 @@ proc test_help {} {
set first_component_help "Print the first class/namespace component of NAME"
set namespace_help "Print the list of possible C\\+\\+ namespaces"
- test_prefix_command_help {"maintenance cplus"} {
- "C\\+\\+ maintenance commands\.\[\r\n\]+"
- }
-
- test_prefix_command_help {"maint cp" "maintenance cplus"} {
- "C\\+\\+ maintenance commands.\r\n\r\n"
- }
-
set multiple_help_body "List of maintenance cplus subcommands:\r\n\r\nmaintenance cplus first_component -- ${first_component_help}\r\nmaintenance cplus namespace -- ${namespace_help}\r\n\r\nType \"help maintenance cplus\" followed by maintenance cplus subcommand name for full documentation.\r\nCommand name abbreviations are allowed if unambiguous."
- gdb_test "maint cp" "\"maintenance cplus\" must be followed by the name of a command.\r\n.*"
+ set help_maint_cp "C\\+\\+ maintenance commands.\r\n\r\n${multiple_help_body}"
+
+ gdb_test "help maintenance cplus" "${help_maint_cp}"
+ gdb_test "help maint cp" "${help_maint_cp}"
+ gdb_test "maint cp" "\"maintenance cplus\" must be followed by the name of a command.\r\n${multiple_help_body}"
gdb_test "help maint cp first_component" "${first_component_help}."
gdb_test "help maint cp namespace" "${namespace_help}."
diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp
index bd24513..9a6bdc8 100644
--- a/gdb/testsuite/gdb.mi/mi-basics.exp
+++ b/gdb/testsuite/gdb.mi/mi-basics.exp
@@ -219,8 +219,6 @@ proc test_path_specification {} {
}
}
- set orig_path [string_to_regexp ${orig_path}]
-
mi_gdb_test "207-environment-path" \
"207\\\^done,path=\"$orig_path\"" \
"environment-path no-args operation"
diff --git a/gdb/testsuite/gdb.mi/mi-file.exp b/gdb/testsuite/gdb.mi/mi-file.exp
index 1043185..86f0665 100644
--- a/gdb/testsuite/gdb.mi/mi-file.exp
+++ b/gdb/testsuite/gdb.mi/mi-file.exp
@@ -75,7 +75,7 @@ proc test_file_list_exec_source_files {} {
# get the path and absolute path to the current executable
mi_gdb_test "222-file-list-exec-source-files" \
- "222\\\^done,files=\\\[\{file=\".*/${srcfile}\",fullname=\"$fullname_syntax${srcfile}\"\}.*]" \
+ "222\\\^done,files=\\\[\{file=\".*/${srcfile}\",fullname=\"$fullname_syntax${srcfile}\"\},\{file=\".*\"\},\{file=\".*\"\},\{file=\".*\"\},\{file=\".*\"\}\\\]" \
"Getting a list of source files."
}
diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp
index b3f92b6..47e51cd 100644
--- a/gdb/testsuite/gdb.mi/mi-stack.exp
+++ b/gdb/testsuite/gdb.mi/mi-stack.exp
@@ -75,10 +75,6 @@ proc test_stack_frame_listing {} {
mi_gdb_test "235-stack-info-frame" \
"235\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*${srcfile}\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_callee4_body\"\}" \
"selected frame listing"
-
- mi_gdb_test "236-stack-list-frames 1 300" \
- "236\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\}\\\]" \
- "stack frame listing 1 300"
}
proc test_stack_args_listing {} {
@@ -122,10 +118,6 @@ proc test_stack_args_listing {} {
mi_gdb_test "234-stack-list-arguments" \
"&.*234\\^error,msg=\"mi_cmd_stack_list_args: Usage.*PRINT_VALUES.*FRAME_LOW FRAME_HIGH.*\"" \
"stack args listing wrong"
-
- mi_gdb_test "235-stack-list-arguments 1 1 300" \
- "235\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"2\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"3\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\\\]\},frame=\{level=\"4\",args=\\\[\\\]\}\\\]" \
- "stack args listing 1 1 300"
}
proc test_stack_info_depth {} {
diff --git a/gdb/testsuite/gdb.mi/mi2-basics.exp b/gdb/testsuite/gdb.mi/mi2-basics.exp
index 21db56d..c3a6692 100644
--- a/gdb/testsuite/gdb.mi/mi2-basics.exp
+++ b/gdb/testsuite/gdb.mi/mi2-basics.exp
@@ -222,8 +222,6 @@ proc test_path_specification {} {
}
}
- set orig_path [string_to_regexp ${orig_path}]
-
mi_gdb_test "207-environment-path" \
"207\\\^done,path=\"$orig_path\"" \
"environment-path no-args operation"
diff --git a/gdb/testsuite/gdb.stabs/weird.exp b/gdb/testsuite/gdb.stabs/weird.exp
index cb7c40e..cff581b 100644
--- a/gdb/testsuite/gdb.stabs/weird.exp
+++ b/gdb/testsuite/gdb.stabs/weird.exp
@@ -228,13 +228,16 @@ proc print_weird_var { var } {
# Make sure that the variable gets printed out correctly, without
# any sort of warning message.
- gdb_test_multiple "print $var\n" "variable $var printed property" {
+ send_gdb "print $var\n"
+ gdb_expect {
-re "^print $var\r*\n.\[0-9\]* = 42.*$gdb_prompt $" {
pass "variable $var printed properly"
}
-re ".*$gdb_prompt $" {
fail "variable $var printed properly"
}
+ timeout { fail "variable $var printed properly (timeout)" }
+ eof { fail "variable $var printed properly (eof)" }
}
# Make sure that the stabs did get loaded in a sensible way.
diff --git a/gdb/testsuite/gdb.threads/manythreads.c b/gdb/testsuite/gdb.threads/manythreads.c
index 1c23567..e39412c 100644
--- a/gdb/testsuite/gdb.threads/manythreads.c
+++ b/gdb/testsuite/gdb.threads/manythreads.c
@@ -1,5 +1,5 @@
/* Manythreads test program.
- Copyright 2004, 2006
+ Copyright 2004
Free Software Foundation, Inc.
Written by Jeff Johnston <jjohnstn@redhat.com>
@@ -29,7 +29,7 @@
void *
thread_function (void *arg)
{
- int x = * (int *) arg;
+ int x = (int)arg;
printf ("Thread <%d> executing\n", x);
@@ -41,7 +41,6 @@ main (int argc, char **argv)
{
pthread_attr_t attr;
pthread_t threads[256];
- int args[256];
int i, j;
pthread_attr_init (&attr);
@@ -53,8 +52,8 @@ main (int argc, char **argv)
{
for (j = 0; j < 256; ++j)
{
- args[j] = i * 1000 + j;
- pthread_create (&threads[j], &attr, thread_function, &args[j]);
+ pthread_create (&threads[j], &attr, thread_function,
+ (void *)(i * 1000 + j));
}
for (j = 0; j < 256; ++j)
diff --git a/gdb/testsuite/gdb.threads/manythreads.exp b/gdb/testsuite/gdb.threads/manythreads.exp
index 2a9721d..a2baf84 100644
--- a/gdb/testsuite/gdb.threads/manythreads.exp
+++ b/gdb/testsuite/gdb.threads/manythreads.exp
@@ -1,5 +1,5 @@
# manythreads.exp -- Expect script to test stopping many threads
-# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2004 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
@@ -81,7 +81,7 @@ gdb_test_multiple "" "stop threads 1" {
}
}
-gdb_test "info threads" ".*1 Thread .*"
+gdb_test "info threads" ".*1 Thread.*.LWP.*"
set message "second continue"
gdb_test_multiple "continue" "second continue" {
diff --git a/gdb/testsuite/gdb.threads/tls-nodebug.c b/gdb/testsuite/gdb.threads/tls-nodebug.c
deleted file mode 100644
index 73d96f0..0000000
--- a/gdb/testsuite/gdb.threads/tls-nodebug.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Test accessing TLS based variable without any debug info compiled. */
-
-#include <pthread.h>
-
-__thread int thread_local = 42;
-
-int main(void)
-{
- return 0;
-}
diff --git a/gdb/testsuite/gdb.trace/tracecmd.exp b/gdb/testsuite/gdb.trace/tracecmd.exp
index 3bf1280..1609e67 100644
--- a/gdb/testsuite/gdb.trace/tracecmd.exp
+++ b/gdb/testsuite/gdb.trace/tracecmd.exp
@@ -66,9 +66,109 @@ set testline2 [expr $baseline + 3]
#
set helpcnt 0;
-test_class_help "tracepoints" {
- "Tracing of program execution without stopping the program\.[\r\n\]+"
-} "1.0: help tracepoints"
+send_gdb "help tracepoints\n"
+gdb_expect {
+ -re "Tracing of program execution without stopping the program." {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "actions -- Specify the actions to be taken at a tracepoint" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "collect -- Specify one or more data items to be collected" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "delete tracepoints -- Delete specified tracepoints" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "end -- Ends a list of.*actions" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "info tracepoints -- Status of tracepoints" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "passcount -- Set the passcount for a tracepoint" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "save-tracepoints -- Save current tracepoint definitions" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "tdump -- Print everything collected at the current tracepoint" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "tfind -- Select a trace frame" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "tfind end -- Synonym for 'none'" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "tfind line -- Select a trace frame by line number" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "tfind none -- De-select any trace frame and resume 'live' debugging" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "tfind outside -- Select a trace frame whose PC is outside" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "tfind pc -- Select a trace frame by PC" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "tfind range -- Select a trace frame whose PC is in the given" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "tfind start -- Select the first trace frame in the trace buffer" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "tfind tracepoint -- Select a trace frame by tracepoint number" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "trace -- Set a tracepoint at a specified line or function or addr" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "tstart -- Start trace data collection" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "tstatus -- Display the status of the current trace data collection" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "tstop -- Stop trace data collection" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re "while-stepping -- Specify single-stepping behavior at a tracepoint" {
+ incr helpcnt;
+ exp_continue
+ }
+ -re ".*$gdb_prompt $" {
+ if { $helpcnt == 21 } {
+ pass "1.0: help tracepoints"
+ } else {
+ warning "$helpcnt";
+ fail "1.0: help tracepoints"
+ }
+ }
+}
#
# test trace command:
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 3c1eb87..0d8a430 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2276,7 +2276,7 @@ proc gdb_skip_bogus_test { msg } {
# Note: the procedure gdb_gnu_strip_debug will produce an executable called
# ${binfile}.dbglnk, which is just like the executable ($binfile) but without
# the debuginfo. Instead $binfile has a .gnu_debuglink section which contains
-# the name of a debuginfo only file. This file will be stored in the
+# the name of a idebuginfo only file. This file will be stored in the
# gdb.base/.debug subdirectory.
# Functions for separate debug info testing
@@ -2307,45 +2307,8 @@ proc separate_debug_filename { exec } {
return $debug_file
}
-# Create stripped files for DEST, replacing it. If ARGS is passed, it is a
-# list of optional flags. The only currently supported flag is no-main,
-# which removes the symbol entry for main from the separate debug file.
-proc gdb_gnu_strip_debug { dest args } {
-
- # First, make sure that we can do this. This is nasty. We need to
- # check for the stabs debug format. To do this we must run gdb on
- # the unstripped executable, list 'main' (as to have a default
- # source file), use get_debug_format (which does 'info source')
- # and then see if the debug info is stabs. If so, we bail out. We
- # cannot do this any other way because get_debug_format finds out
- # the debug format using gdb itself, and in case of stabs we get
- # an error loading the program if it is already stripped. An
- # alternative would be to find out the debug info from the flags
- # passed to dejagnu when the test is run.
-
- gdb_exit
- gdb_start
- gdb_load ${dest}
- gdb_test "list main" "" ""
- get_debug_format
- if { [test_debug_format "stabs"] } then {
- # The separate debug info feature doesn't work well in
- # binutils with stabs. It produces a corrupted debug info
- # only file, and gdb chokes on it. It is almost impossible to
- # capture the failing message out of gdb, because it happens
- # inside gdb_load. At that point any error message is
- # intercepted by dejagnu itself, and, because of the error
- # threshold, any faulty test result is changed into an
- # UNRESOLVED. (see dejagnu/lib/framework.exp)
- unsupported "no separate debug info handling with stabs"
- return -1
- } elseif { [test_debug_format "unknown"] } then {
- # gdb doesn't know what the debug format is. We are out of luck here.
- unsupported "unknown debugging format"
- return -1
- }
- gdb_exit
+proc gdb_gnu_strip_debug { dest } {
set debug_file [separate_debug_filename $dest]
set strip_to_file_program strip
@@ -2379,22 +2342,6 @@ proc gdb_gnu_strip_debug { dest args } {
return 1
}
- # If no-main is passed, strip the symbol for main from the separate
- # file. This is to simulate the behavior of elfutils's eu-strip, which
- # leaves the symtab in the original file only. There's no way to get
- # objcopy or strip to remove the symbol table without also removing the
- # debugging sections, so this is as close as we can get.
- if { [llength $args] == 1 && [lindex $args 0] == "no-main" } {
- set result [catch "exec $objcopy_program -N main ${debug_file} ${debug_file}-tmp" output]
- verbose "result is $result"
- verbose "output is $output"
- if {$result == 1} {
- return 1
- }
- file delete "${debug_file}"
- file rename "${debug_file}-tmp" "${debug_file}"
- }
-
# Link the two previous output files together, adding the .gnu_debuglink
# section to the stripped_file, containing a pointer to the debug_file,
# save the new file in dest.
@@ -2409,61 +2356,3 @@ proc gdb_gnu_strip_debug { dest args } {
return 0
}
-# Test the output of GDB_COMMAND matches the pattern obtained
-# by concatenating all elements of EXPECTED_LINES. This makes
-# it possible to split otherwise very long string into pieces.
-# If third argument is not empty, it's used as the name of the
-# test to be printed on pass/fail.
-proc help_test_raw { gdb_command expected_lines args } {
- set message $gdb_command
- if [llength $args]>0 then {
- set message [lindex $args 0]
- }
- set expected_output [join $expected_lines ""]
- gdb_test "${gdb_command}" "${expected_output}" $message
-}
-
-# Test the output of "help COMMNAD_CLASS". EXPECTED_INITIAL_LINES
-# are regular expressions that should match the beginning of output,
-# before the list of commands in that class. The presence of
-# command list and standard epilogue will be tested automatically.
-proc test_class_help { command_class expected_initial_lines args } {
- set l_stock_body {
- "List of commands\:.*\[\r\n\]+"
- "Type \"help\" followed by command name for full documentation\.\[\r\n\]+"
- "Type \"apropos word\" to search for commands related to \"word\"\.[\r\n\]+"
- "Command name abbreviations are allowed if unambiguous\."
- }
- set l_entire_body [concat $expected_initial_lines $l_stock_body]
-
- eval [list help_test_raw "help ${command_class}" $l_entire_body] $args
-}
-
-# COMMAND_LIST should have either one element -- command to test, or
-# two elements -- abbreviated command to test, and full command the first
-# element is abbreviation of.
-# The command must be a prefix command. EXPECTED_INITIAL_LINES
-# are regular expressions that should match the beginning of output,
-# before the list of subcommands. The presence of
-# subcommand list and standard epilogue will be tested automatically.
-proc test_prefix_command_help { command_list expected_initial_lines args } {
- set command [lindex $command_list 0]
- if {[llength $command_list]>1} {
- set full_command [lindex $command_list 1]
- } else {
- set full_command $command
- }
- # Use 'list' and not just {} because we want variables to
- # be expanded in this list.
- set l_stock_body [list\
- "List of $full_command subcommands\:.*\[\r\n\]+"\
- "Type \"help $full_command\" followed by $full_command subcommand name for full documentation\.\[\r\n\]+"\
- "Type \"apropos word\" to search for commands related to \"word\"\.\[\r\n\]+"\
- "Command name abbreviations are allowed if unambiguous\."]
- set l_entire_body [concat $expected_initial_lines $l_stock_body]
- if {[llength $args]>0} {
- help_test_raw "help ${command}" $l_entire_body [lindex $args 0]
- } else {
- help_test_raw "help ${command}" $l_entire_body
- }
-}
diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp
index 36a7148..71535d0 100644
--- a/gdb/testsuite/lib/gdbserver-support.exp
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -1,5 +1,4 @@
-# Copyright 2000, 2002, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
+# Copyright 2000, 2002, 2003, 2004, 2005 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
@@ -52,32 +51,32 @@ proc gdb_target_cmd { targetname serialport } {
send_gdb "y\n"
exp_continue
}
- -re "Couldn't establish connection to remote.*$gdb_prompt $" {
+ -re "Couldn't establish connection to remote.*$gdb_prompt" {
verbose "Connection failed"
}
-re "Remote MIPS debugging.*$gdb_prompt" {
verbose "Set target to $targetname"
return 0
}
- -re "Remote debugging using .*$serialport.*$gdb_prompt $" {
+ -re "Remote debugging using .*$serialport.*$gdb_prompt" {
verbose "Set target to $targetname"
return 0
}
- -re "Remote target $targetname connected to.*$gdb_prompt $" {
+ -re "Remote target $targetname connected to.*$gdb_prompt" {
verbose "Set target to $targetname"
return 0
}
- -re "Connected to.*$gdb_prompt $" {
+ -re "Connected to.*$gdb_prompt" {
verbose "Set target to $targetname"
return 0
}
- -re "Ending remote.*$gdb_prompt $" { }
- -re "Connection refused.*$gdb_prompt $" {
+ -re "Ending remote.*$gdb_prompt" { }
+ -re "Connection refused.*$gdb_prompt" {
verbose "Connection refused by remote target. Pausing, and trying again."
sleep 30
continue
}
- -re "Timeout reading from remote system.*$gdb_prompt $" {
+ -re "Timeout reading from remote system.*$gdb_prompt" {
verbose "Got timeout error from gdb."
}
timeout {
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index 3460324..c7bcea6 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -194,14 +194,6 @@ tui_set_source_content (struct symtab *s, int line_no, int noerror)
chars until we do */
while (c != EOF && c != '\n' && c != '\r')
c = fgetc (stream);
- /* Handle non-'\n' end-of-line. */
- if (c == '\r' &&
- (c = fgetc (stream)) != '\n' && c != EOF)
- {
- ungetc (c, stream);
- c = '\r';
- }
-
}
}
while (c != EOF && c != '\n' && c != '\r' &&
diff --git a/gdb/utils.c b/gdb/utils.c
index c64629c..6c4afb7 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1127,13 +1127,92 @@ gdb_print_host_address (const void *addr, struct ui_file *stream)
fprintf_filtered (stream, "0x%lx", (unsigned long) addr);
}
+
+/* Ask user a y-or-n question and return 1 iff answer is yes.
+ Takes three args which are given to printf to print the question.
+ The first, a control string, should end in "? ".
+ It should not say how to answer, because we do that. */
+
+/* VARARGS */
+int
+query (const char *ctlstr, ...)
+{
+ va_list args;
+ int answer;
+ int ans2;
+ int retval;
+
+ /* Automatically answer "yes" if input is not from the user
+ directly, or if the user did not want prompts. */
+ if (!input_from_terminal_p () || !caution)
+ return 1;
+
+ if (deprecated_query_hook)
+ {
+ va_start (args, ctlstr);
+ return deprecated_query_hook (ctlstr, args);
+ }
+
+ while (1)
+ {
+ wrap_here (""); /* Flush any buffered output */
+ gdb_flush (gdb_stdout);
+
+ if (annotation_level > 1)
+ printf_filtered (("\n\032\032pre-query\n"));
+
+ va_start (args, ctlstr);
+ vfprintf_filtered (gdb_stdout, ctlstr, args);
+ va_end (args);
+ printf_filtered (_("(y or n) "));
+
+ if (annotation_level > 1)
+ printf_filtered (("\n\032\032query\n"));
+
+ wrap_here ("");
+ gdb_flush (gdb_stdout);
+
+ answer = fgetc (stdin);
+ clearerr (stdin); /* in case of C-d */
+ if (answer == EOF) /* C-d */
+ {
+ retval = 1;
+ break;
+ }
+ /* Eat rest of input line, to EOF or newline */
+ if (answer != '\n')
+ do
+ {
+ ans2 = fgetc (stdin);
+ clearerr (stdin);
+ }
+ while (ans2 != EOF && ans2 != '\n' && ans2 != '\r');
+
+ if (answer >= 'a')
+ answer -= 040;
+ if (answer == 'Y')
+ {
+ retval = 1;
+ break;
+ }
+ if (answer == 'N')
+ {
+ retval = 0;
+ break;
+ }
+ printf_filtered (_("Please answer y or n.\n"));
+ }
+
+ if (annotation_level > 1)
+ printf_filtered (("\n\032\032post-query\n"));
+ return retval;
+}
-/* This function supports the query, nquery, and yquery functions.
+/* This function supports the nquery() and yquery() functions.
Ask user a y-or-n question and return 0 if answer is no, 1 if
- answer is yes, or default the answer to the specified default
- (for yquery or nquery). DEFCHAR may be 'y' or 'n' to provide a
- default answer, or '\0' for no default.
+ answer is yes, or default the answer to the specified default.
+ DEFCHAR is either 'y' or 'n' and refers to the default answer.
CTLSTR is the control string and should end in "? ". It should
not say how to answer, because we do that.
ARGS are the arguments passed along with the CTLSTR argument to
@@ -1147,18 +1226,10 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args)
int retval;
int def_value;
char def_answer, not_def_answer;
- char *y_string, *n_string, *question;
+ char *y_string, *n_string;
/* Set up according to which answer is the default. */
- if (defchar == '\0')
- {
- def_value = 1;
- def_answer = 'Y';
- not_def_answer = 'N';
- y_string = "y";
- n_string = "n";
- }
- else if (defchar == 'y')
+ if (defchar == 'y')
{
def_value = 1;
def_answer = 'Y';
@@ -1175,27 +1246,6 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args)
n_string = "[n]";
}
- /* Automatically answer the default value if the user did not want
- prompts. */
- if (! caution)
- return def_value;
-
- /* If input isn't coming from the user directly, just say what
- question we're asking, and then answer "yes" automatically. This
- way, important error messages don't get lost when talking to GDB
- over a pipe. */
- if (! input_from_terminal_p ())
- {
- wrap_here ("");
- vfprintf_filtered (gdb_stdout, ctlstr, args);
-
- printf_filtered (_("(%s or %s) [answered %c; input not from terminal]\n"),
- y_string, n_string, def_answer);
- gdb_flush (gdb_stdout);
-
- return def_value;
- }
-
/* Automatically answer the default value if input is not from the user
directly, or if the user did not want prompts. */
if (!input_from_terminal_p () || !caution)
@@ -1206,9 +1256,6 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args)
return deprecated_query_hook (ctlstr, args);
}
- /* Format the question outside of the loop, to avoid reusing args. */
- question = xstrvprintf (ctlstr, args);
-
while (1)
{
wrap_here (""); /* Flush any buffered output */
@@ -1217,7 +1264,7 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args)
if (annotation_level > 1)
printf_filtered (("\n\032\032pre-query\n"));
- fputs_filtered (question, gdb_stdout);
+ vfprintf_filtered (gdb_stdout, ctlstr, args);
printf_filtered (_("(%s or %s) "), y_string, n_string);
if (annotation_level > 1)
@@ -1251,12 +1298,10 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args)
retval = !def_value;
break;
}
- /* Otherwise, if a default was specified, the user may either
- specify the required input or have it default by entering
- nothing. */
- if (answer == def_answer
- || (defchar != '\0' &&
- (answer == '\n' || answer == '\r' || answer == EOF)))
+ /* Otherwise, for the default, the user may either specify
+ the required input or have it default by entering nothing. */
+ if (answer == def_answer || answer == '\n' ||
+ answer == '\r' || answer == EOF)
{
retval = def_value;
break;
@@ -1266,7 +1311,6 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args)
y_string, n_string);
}
- xfree (question);
if (annotation_level > 1)
printf_filtered (("\n\032\032post-query\n"));
return retval;
@@ -1305,21 +1349,6 @@ yquery (const char *ctlstr, ...)
va_end (args);
}
-/* Ask user a y-or-n question and return 1 iff answer is yes.
- Takes three args which are given to printf to print the question.
- The first, a control string, should end in "? ".
- It should not say how to answer, because we do that. */
-
-int
-query (const char *ctlstr, ...)
-{
- va_list args;
-
- va_start (args, ctlstr);
- return defaulted_query (ctlstr, '\0', args);
- va_end (args);
-}
-
/* Print an error message saying that we couldn't make sense of a
\^mumble sequence in a string or character constant. START and END
indicate a substring of some larger string that contains the
@@ -3110,102 +3139,3 @@ dummy_obstack_deallocate (void *object, void *data)
{
return;
}
-
-/* The bit offset of the highest byte in a ULONGEST, for overflow
- checking. */
-
-#define HIGH_BYTE_POSN ((sizeof (ULONGEST) - 1) * HOST_CHAR_BIT)
-
-/* True (non-zero) iff DIGIT is a valid digit in radix BASE,
- where 2 <= BASE <= 36. */
-
-static int
-is_digit_in_base (unsigned char digit, int base)
-{
- if (!isalnum (digit))
- return 0;
- if (base <= 10)
- return (isdigit (digit) && digit < base + '0');
- else
- return (isdigit (digit) || tolower (digit) < base - 10 + 'a');
-}
-
-static int
-digit_to_int (unsigned char c)
-{
- if (isdigit (c))
- return c - '0';
- else
- return tolower (c) - 'a' + 10;
-}
-
-/* As for strtoul, but for ULONGEST results. */
-
-ULONGEST
-strtoulst (const char *num, const char **trailer, int base)
-{
- unsigned int high_part;
- ULONGEST result;
- int minus = 0;
- int i = 0;
-
- /* Skip leading whitespace. */
- while (isspace (num[i]))
- i++;
-
- /* Handle prefixes. */
- if (num[i] == '+')
- i++;
- else if (num[i] == '-')
- {
- minus = 1;
- i++;
- }
-
- if (base == 0 || base == 16)
- {
- if (num[i] == '0' && (num[i + 1] == 'x' || num[i + 1] == 'X'))
- {
- i += 2;
- if (base == 0)
- base = 16;
- }
- }
-
- if (base == 0 && num[i] == '0')
- base = 8;
-
- if (base == 0)
- base = 10;
-
- if (base < 2 || base > 36)
- {
- errno = EINVAL;
- return 0;
- }
-
- result = high_part = 0;
- for (; is_digit_in_base (num[i], base); i += 1)
- {
- result = result * base + digit_to_int (num[i]);
- high_part = high_part * base + (unsigned int) (result >> HIGH_BYTE_POSN);
- result &= ((ULONGEST) 1 << HIGH_BYTE_POSN) - 1;
- if (high_part > 0xff)
- {
- errno = ERANGE;
- result = ~ (ULONGEST) 0;
- high_part = 0;
- minus = 0;
- break;
- }
- }
-
- if (trailer != NULL)
- *trailer = &num[i];
-
- result = result + ((ULONGEST) high_part << HIGH_BYTE_POSN);
- if (minus)
- return -result;
- else
- return result;
-}
diff --git a/gdb/valops.c b/gdb/valops.c
index 15c407c..7d1b7d8 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1889,15 +1889,10 @@ find_overload_match (struct type **arg_types, int nargs, char *name, int method,
else
{
const char *qualified_name = SYMBOL_CPLUS_DEMANGLED_NAME (fsym);
+ func_name = cp_func_name (qualified_name);
- /* If we have a C++ name, try to extract just the function
- part. */
- if (qualified_name)
- func_name = cp_func_name (qualified_name);
-
- /* If there was no C++ name, this must be a C-style function.
- Just return the same symbol. Do the same if cp_func_name
- fails for some reason. */
+ /* If the name is NULL this must be a C-style function.
+ Just return the same symbol. */
if (func_name == NULL)
{
*symp = fsym;
diff --git a/gdb/vec.c b/gdb/vec.c
deleted file mode 100644
index d5a0929..0000000
--- a/gdb/vec.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Vector API for GDB.
- Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
- Contributed by Nathan Sidwell <nathan@codesourcery.com>
-
- 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. */
-
-#include "defs.h"
-#include "vec.h"
-
-struct vec_prefix
-{
- unsigned num;
- unsigned alloc;
- void *vec[1];
-};
-
-/* Calculate the new ALLOC value, making sure that abs(RESERVE) slots
- are free. If RESERVE < 0 grow exactly, otherwise grow
- exponentially. */
-
-static inline unsigned
-calculate_allocation (const struct vec_prefix *pfx, int reserve)
-{
- unsigned alloc = 0;
- unsigned num = 0;
-
- if (pfx)
- {
- alloc = pfx->alloc;
- num = pfx->num;
- }
- else if (!reserve)
- /* If there's no prefix, and we've not requested anything, then we
- will create a NULL vector. */
- return 0;
-
- /* We must have run out of room. */
- gdb_assert (alloc - num < (unsigned)(reserve < 0 ? -reserve : reserve));
-
- if (reserve < 0)
- /* Exact size. */
- alloc = num + -reserve;
- else
- {
- /* Exponential growth. */
- if (!alloc)
- alloc = 4;
- else if (alloc < 16)
- /* Double when small. */
- alloc = alloc * 2;
- else
- /* Grow slower when large. */
- alloc = (alloc * 3 / 2);
-
- /* If this is still too small, set it to the right size. */
- if (alloc < num + reserve)
- alloc = num + reserve;
- }
- return alloc;
-}
-
-/* Ensure there are at least abs(RESERVE) free slots in VEC. If
- RESERVE < 0 grow exactly, else grow exponentially. As a special
- case, if VEC is NULL, and RESERVE is 0, no vector will be created. */
-
-void *
-vec_p_reserve (void *vec, int reserve)
-{
- return vec_o_reserve (vec, reserve,
- offsetof (struct vec_prefix, vec), sizeof (void *));
-}
-
-/* As vec_p_reserve, but for object vectors. The vector's trailing
- array is at VEC_OFFSET offset and consists of ELT_SIZE sized
- elements. */
-
-void *
-vec_o_reserve (void *vec, int reserve, size_t vec_offset, size_t elt_size)
-{
- struct vec_prefix *pfx = vec;
- unsigned alloc = calculate_allocation (pfx, reserve);
-
- if (!alloc)
- return NULL;
-
- vec = xrealloc (vec, vec_offset + alloc * elt_size);
- ((struct vec_prefix *)vec)->alloc = alloc;
- if (!pfx)
- ((struct vec_prefix *)vec)->num = 0;
-
- return vec;
-}
-
-#if 0
-/* Example uses. */
-DEF_VEC_I (int);
-typedef struct X
-{
- int i;
-} obj_t;
-typedef obj_t *ptr_t;
-
-DEF_VEC_P (ptr_t);
-DEF_VEC_O (obj_t);
-#endif
diff --git a/gdb/vec.h b/gdb/vec.h
deleted file mode 100644
index f6b7f07..0000000
--- a/gdb/vec.h
+++ /dev/null
@@ -1,1000 +0,0 @@
-/* Vector API for GDB.
- Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
- Contributed by Nathan Sidwell <nathan@codesourcery.com>
-
- 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 (GDB_VEC_H)
-#define GDB_VEC_H
-
-#include <stddef.h>
-#include "gdb_string.h"
-#include "gdb_assert.h"
-
-/* The macros here implement a set of templated vector types and
- associated interfaces. These templates are implemented with
- macros, as we're not in C++ land. The interface functions are
- typesafe and use static inline functions, sometimes backed by
- out-of-line generic functions.
-
- Because of the different behavior of structure objects, scalar
- objects and of pointers, there are three flavors, one for each of
- these variants. Both the structure object and pointer variants
- pass pointers to objects around -- in the former case the pointers
- are stored into the vector and in the latter case the pointers are
- dereferenced and the objects copied into the vector. The scalar
- object variant is suitable for int-like objects, and the vector
- elements are returned by value.
-
- There are both 'index' and 'iterate' accessors. The iterator
- returns a boolean iteration condition and updates the iteration
- variable passed by reference. Because the iterator will be
- inlined, the address-of can be optimized away.
-
- The vectors are implemented using the trailing array idiom, thus
- they are not resizeable without changing the address of the vector
- object itself. This means you cannot have variables or fields of
- vector type -- always use a pointer to a vector. The one exception
- is the final field of a structure, which could be a vector type.
- You will have to use the embedded_size & embedded_init calls to
- create such objects, and they will probably not be resizeable (so
- don't use the 'safe' allocation variants). The trailing array
- idiom is used (rather than a pointer to an array of data), because,
- if we allow NULL to also represent an empty vector, empty vectors
- occupy minimal space in the structure containing them.
-
- Each operation that increases the number of active elements is
- available in 'quick' and 'safe' variants. The former presumes that
- there is sufficient allocated space for the operation to succeed
- (it dies if there is not). The latter will reallocate the
- vector, if needed. Reallocation causes an exponential increase in
- vector size. If you know you will be adding N elements, it would
- be more efficient to use the reserve operation before adding the
- elements with the 'quick' operation. This will ensure there are at
- least as many elements as you ask for, it will exponentially
- increase if there are too few spare slots. If you want reserve a
- specific number of slots, but do not want the exponential increase
- (for instance, you know this is the last allocation), use a
- negative number for reservation. You can also create a vector of a
- specific size from the get go.
-
- You should prefer the push and pop operations, as they append and
- remove from the end of the vector. If you need to remove several
- items in one go, use the truncate operation. The insert and remove
- operations allow you to change elements in the middle of the
- vector. There are two remove operations, one which preserves the
- element ordering 'ordered_remove', and one which does not
- 'unordered_remove'. The latter function copies the end element
- into the removed slot, rather than invoke a memmove operation. The
- 'lower_bound' function will determine where to place an item in the
- array using insert that will maintain sorted order.
-
- If you need to directly manipulate a vector, then the 'address'
- accessor will return the address of the start of the vector. Also
- the 'space' predicate will tell you whether there is spare capacity
- in the vector. You will not normally need to use these two functions.
-
- Vector types are defined using a DEF_VEC_{O,P,I}(TYPEDEF) macro.
- Variables of vector type are declared using a VEC(TYPEDEF) macro.
- The characters O, P and I indicate whether TYPEDEF is a pointer
- (P), object (O) or integral (I) type. Be careful to pick the
- correct one, as you'll get an awkward and inefficient API if you
- use the wrong one. There is a check, which results in a
- compile-time warning, for the P and I versions, but there is no
- check for the O versions, as that is not possible in plain C.
-
- An example of their use would be,
-
- DEF_VEC_P(tree); // non-managed tree vector.
-
- struct my_struct {
- VEC(tree) *v; // A (pointer to) a vector of tree pointers.
- };
-
- struct my_struct *s;
-
- if (VEC_length(tree, s->v)) { we have some contents }
- VEC_safe_push(tree, s->v, decl); // append some decl onto the end
- for (ix = 0; VEC_iterate(tree, s->v, ix, elt); ix++)
- { do something with elt }
-
-*/
-
-/* Macros to invoke API calls. A single macro works for both pointer
- and object vectors, but the argument and return types might well be
- different. In each macro, T is the typedef of the vector elements.
- Some of these macros pass the vector, V, by reference (by taking
- its address), this is noted in the descriptions. */
-
-/* Length of vector
- unsigned VEC_T_length(const VEC(T) *v);
-
- Return the number of active elements in V. V can be NULL, in which
- case zero is returned. */
-
-#define VEC_length(T,V) (VEC_OP(T,length)(V))
-
-
-/* Check if vector is empty
- int VEC_T_empty(const VEC(T) *v);
-
- Return nonzero if V is an empty vector (or V is NULL), zero otherwise. */
-
-#define VEC_empty(T,V) (VEC_length (T,V) == 0)
-
-
-/* Get the final element of the vector.
- T VEC_T_last(VEC(T) *v); // Integer
- T VEC_T_last(VEC(T) *v); // Pointer
- T *VEC_T_last(VEC(T) *v); // Object
-
- Return the final element. V must not be empty. */
-
-#define VEC_last(T,V) (VEC_OP(T,last)(V VEC_ASSERT_INFO))
-
-/* Index into vector
- T VEC_T_index(VEC(T) *v, unsigned ix); // Integer
- T VEC_T_index(VEC(T) *v, unsigned ix); // Pointer
- T *VEC_T_index(VEC(T) *v, unsigned ix); // Object
-
- Return the IX'th element. If IX must be in the domain of V. */
-
-#define VEC_index(T,V,I) (VEC_OP(T,index)(V,I VEC_ASSERT_INFO))
-
-/* Iterate over vector
- int VEC_T_iterate(VEC(T) *v, unsigned ix, T &ptr); // Integer
- int VEC_T_iterate(VEC(T) *v, unsigned ix, T &ptr); // Pointer
- int VEC_T_iterate(VEC(T) *v, unsigned ix, T *&ptr); // Object
-
- Return iteration condition and update PTR to point to the IX'th
- element. At the end of iteration, sets PTR to NULL. Use this to
- iterate over the elements of a vector as follows,
-
- for (ix = 0; VEC_iterate(T,v,ix,ptr); ix++)
- continue; */
-
-#define VEC_iterate(T,V,I,P) (VEC_OP(T,iterate)(V,I,&(P)))
-
-/* Allocate new vector.
- VEC(T,A) *VEC_T_alloc(int reserve);
-
- Allocate a new vector with space for RESERVE objects. If RESERVE
- is zero, NO vector is created. */
-
-#define VEC_alloc(T,N) (VEC_OP(T,alloc)(N))
-
-/* Free a vector.
- void VEC_T_free(VEC(T,A) *&);
-
- Free a vector and set it to NULL. */
-
-#define VEC_free(T,V) (VEC_OP(T,free)(&V))
-
-/* Use these to determine the required size and initialization of a
- vector embedded within another structure (as the final member).
-
- size_t VEC_T_embedded_size(int reserve);
- void VEC_T_embedded_init(VEC(T) *v, int reserve);
-
- These allow the caller to perform the memory allocation. */
-
-#define VEC_embedded_size(T,N) (VEC_OP(T,embedded_size)(N))
-#define VEC_embedded_init(T,O,N) (VEC_OP(T,embedded_init)(VEC_BASE(O),N))
-
-/* Copy a vector.
- VEC(T,A) *VEC_T_copy(VEC(T) *);
-
- Copy the live elements of a vector into a new vector. The new and
- old vectors need not be allocated by the same mechanism. */
-
-#define VEC_copy(T,V) (VEC_OP(T,copy)(V))
-
-/* Determine if a vector has additional capacity.
-
- int VEC_T_space (VEC(T) *v,int reserve)
-
- If V has space for RESERVE additional entries, return nonzero. You
- usually only need to use this if you are doing your own vector
- reallocation, for instance on an embedded vector. This returns
- nonzero in exactly the same circumstances that VEC_T_reserve
- will. */
-
-#define VEC_space(T,V,R) (VEC_OP(T,space)(V,R VEC_ASSERT_INFO))
-
-/* Reserve space.
- int VEC_T_reserve(VEC(T,A) *&v, int reserve);
-
- Ensure that V has at least abs(RESERVE) slots available. The
- signedness of RESERVE determines the reallocation behavior. A
- negative value will not create additional headroom beyond that
- requested. A positive value will create additional headroom. Note
- this can cause V to be reallocated. Returns nonzero iff
- reallocation actually occurred. */
-
-#define VEC_reserve(T,V,R) (VEC_OP(T,reserve)(&(V),R VEC_ASSERT_INFO))
-
-/* Push object with no reallocation
- T *VEC_T_quick_push (VEC(T) *v, T obj); // Integer
- T *VEC_T_quick_push (VEC(T) *v, T obj); // Pointer
- T *VEC_T_quick_push (VEC(T) *v, T *obj); // Object
-
- Push a new element onto the end, returns a pointer to the slot
- filled in. For object vectors, the new value can be NULL, in which
- case NO initialization is performed. There must
- be sufficient space in the vector. */
-
-#define VEC_quick_push(T,V,O) (VEC_OP(T,quick_push)(V,O VEC_ASSERT_INFO))
-
-/* Push object with reallocation
- T *VEC_T_safe_push (VEC(T,A) *&v, T obj); // Integer
- T *VEC_T_safe_push (VEC(T,A) *&v, T obj); // Pointer
- T *VEC_T_safe_push (VEC(T,A) *&v, T *obj); // Object
-
- Push a new element onto the end, returns a pointer to the slot
- filled in. For object vectors, the new value can be NULL, in which
- case NO initialization is performed. Reallocates V, if needed. */
-
-#define VEC_safe_push(T,V,O) (VEC_OP(T,safe_push)(&(V),O VEC_ASSERT_INFO))
-
-/* Pop element off end
- T VEC_T_pop (VEC(T) *v); // Integer
- T VEC_T_pop (VEC(T) *v); // Pointer
- void VEC_T_pop (VEC(T) *v); // Object
-
- Pop the last element off the end. Returns the element popped, for
- pointer vectors. */
-
-#define VEC_pop(T,V) (VEC_OP(T,pop)(V VEC_ASSERT_INFO))
-
-/* Truncate to specific length
- void VEC_T_truncate (VEC(T) *v, unsigned len);
-
- Set the length as specified. The new length must be less than or
- equal to the current length. This is an O(1) operation. */
-
-#define VEC_truncate(T,V,I) \
- (VEC_OP(T,truncate)(V,I VEC_ASSERT_INFO))
-
-/* Grow to a specific length.
- void VEC_T_safe_grow (VEC(T,A) *&v, int len);
-
- Grow the vector to a specific length. The LEN must be as
- long or longer than the current length. The new elements are
- uninitialized. */
-
-#define VEC_safe_grow(T,V,I) \
- (VEC_OP(T,safe_grow)(&(V),I VEC_ASSERT_INFO))
-
-/* Replace element
- T VEC_T_replace (VEC(T) *v, unsigned ix, T val); // Integer
- T VEC_T_replace (VEC(T) *v, unsigned ix, T val); // Pointer
- T *VEC_T_replace (VEC(T) *v, unsigned ix, T *val); // Object
-
- Replace the IXth element of V with a new value, VAL. For pointer
- vectors returns the original value. For object vectors returns a
- pointer to the new value. For object vectors the new value can be
- NULL, in which case no overwriting of the slot is actually
- performed. */
-
-#define VEC_replace(T,V,I,O) (VEC_OP(T,replace)(V,I,O VEC_ASSERT_INFO))
-
-/* Insert object with no reallocation
- T *VEC_T_quick_insert (VEC(T) *v, unsigned ix, T val); // Integer
- T *VEC_T_quick_insert (VEC(T) *v, unsigned ix, T val); // Pointer
- T *VEC_T_quick_insert (VEC(T) *v, unsigned ix, T *val); // Object
-
- Insert an element, VAL, at the IXth position of V. Return a pointer
- to the slot created. For vectors of object, the new value can be
- NULL, in which case no initialization of the inserted slot takes
- place. There must be sufficient space. */
-
-#define VEC_quick_insert(T,V,I,O) \
- (VEC_OP(T,quick_insert)(V,I,O VEC_ASSERT_INFO))
-
-/* Insert object with reallocation
- T *VEC_T_safe_insert (VEC(T,A) *&v, unsigned ix, T val); // Integer
- T *VEC_T_safe_insert (VEC(T,A) *&v, unsigned ix, T val); // Pointer
- T *VEC_T_safe_insert (VEC(T,A) *&v, unsigned ix, T *val); // Object
-
- Insert an element, VAL, at the IXth position of V. Return a pointer
- to the slot created. For vectors of object, the new value can be
- NULL, in which case no initialization of the inserted slot takes
- place. Reallocate V, if necessary. */
-
-#define VEC_safe_insert(T,V,I,O) \
- (VEC_OP(T,safe_insert)(&(V),I,O VEC_ASSERT_INFO))
-
-/* Remove element retaining order
- T VEC_T_ordered_remove (VEC(T) *v, unsigned ix); // Integer
- T VEC_T_ordered_remove (VEC(T) *v, unsigned ix); // Pointer
- void VEC_T_ordered_remove (VEC(T) *v, unsigned ix); // Object
-
- Remove an element from the IXth position of V. Ordering of
- remaining elements is preserved. For pointer vectors returns the
- removed object. This is an O(N) operation due to a memmove. */
-
-#define VEC_ordered_remove(T,V,I) \
- (VEC_OP(T,ordered_remove)(V,I VEC_ASSERT_INFO))
-
-/* Remove element destroying order
- T VEC_T_unordered_remove (VEC(T) *v, unsigned ix); // Integer
- T VEC_T_unordered_remove (VEC(T) *v, unsigned ix); // Pointer
- void VEC_T_unordered_remove (VEC(T) *v, unsigned ix); // Object
-
- Remove an element from the IXth position of V. Ordering of
- remaining elements is destroyed. For pointer vectors returns the
- removed object. This is an O(1) operation. */
-
-#define VEC_unordered_remove(T,V,I) \
- (VEC_OP(T,unordered_remove)(V,I VEC_ASSERT_INFO))
-
-/* Remove a block of elements
- void VEC_T_block_remove (VEC(T) *v, unsigned ix, unsigned len);
-
- Remove LEN elements starting at the IXth. Ordering is retained.
- This is an O(1) operation. */
-
-#define VEC_block_remove(T,V,I,L) \
- (VEC_OP(T,block_remove)(V,I,L) VEC_ASSERT_INFO)
-
-/* Get the address of the array of elements
- T *VEC_T_address (VEC(T) v)
-
- If you need to directly manipulate the array (for instance, you
- want to feed it to qsort), use this accessor. */
-
-#define VEC_address(T,V) (VEC_OP(T,address)(V))
-
-/* Find the first index in the vector not less than the object.
- unsigned VEC_T_lower_bound (VEC(T) *v, const T val,
- int (*lessthan) (const T, const T)); // Integer
- unsigned VEC_T_lower_bound (VEC(T) *v, const T val,
- int (*lessthan) (const T, const T)); // Pointer
- unsigned VEC_T_lower_bound (VEC(T) *v, const T *val,
- int (*lessthan) (const T*, const T*)); // Object
-
- Find the first position in which VAL could be inserted without
- changing the ordering of V. LESSTHAN is a function that returns
- true if the first argument is strictly less than the second. */
-
-#define VEC_lower_bound(T,V,O,LT) \
- (VEC_OP(T,lower_bound)(V,O,LT VEC_ASSERT_INFO))
-
-/* Reallocate an array of elements with prefix. */
-extern void *vec_p_reserve (void *, int);
-extern void *vec_o_reserve (void *, int, size_t, size_t);
-#define vec_free(V) xfree (V)
-
-#define VEC_ASSERT_INFO ,__FILE__,__LINE__
-#define VEC_ASSERT_DECL ,const char *file_,unsigned line_
-#define VEC_ASSERT_PASS ,file_,line_
-#define vec_assert(expr, op) \
- ((void)((expr) ? 0 : (gdb_assert_fail (op, file_, line_, ASSERT_FUNCTION), 0)))
-
-#define VEC(T) VEC_##T
-#define VEC_OP(T,OP) VEC_##T##_##OP
-
-#define VEC_T(T) \
-typedef struct VEC(T) \
-{ \
- unsigned num; \
- unsigned alloc; \
- T vec[1]; \
-} VEC(T)
-
-/* Vector of integer-like object. */
-#define DEF_VEC_I(T) \
-static inline void VEC_OP (T,must_be_integral_type) (void) \
-{ \
- (void)~(T)0; \
-} \
- \
-VEC_T(T); \
-DEF_VEC_FUNC_P(T) \
-DEF_VEC_ALLOC_FUNC_I(T) \
-struct vec_swallow_trailing_semi
-
-/* Vector of pointer to object. */
-#define DEF_VEC_P(T) \
-static inline void VEC_OP (T,must_be_pointer_type) (void) \
-{ \
- (void)((T)1 == (void *)1); \
-} \
- \
-VEC_T(T); \
-DEF_VEC_FUNC_P(T) \
-DEF_VEC_ALLOC_FUNC_P(T) \
-struct vec_swallow_trailing_semi
-
-/* Vector of object. */
-#define DEF_VEC_O(T) \
-VEC_T(T); \
-DEF_VEC_FUNC_O(T) \
-DEF_VEC_ALLOC_FUNC_O(T) \
-struct vec_swallow_trailing_semi
-
-#define DEF_VEC_ALLOC_FUNC_I(T) \
-static inline VEC(T) *VEC_OP (T,alloc) \
- (int alloc_) \
-{ \
- /* We must request exact size allocation, hence the negation. */ \
- return (VEC(T) *) vec_o_reserve (NULL, -alloc_, \
- offsetof (VEC(T),vec), sizeof (T)); \
-} \
- \
-static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_) \
-{ \
- size_t len_ = vec_ ? vec_->num : 0; \
- VEC (T) *new_vec_ = NULL; \
- \
- if (len_) \
- { \
- /* We must request exact size allocation, hence the negation. */ \
- new_vec_ = (VEC (T) *) \
- vec_o_reserve (NULL, -len_, offsetof (VEC(T),vec), sizeof (T)); \
- \
- new_vec_->num = len_; \
- memcpy (new_vec_->vec, vec_->vec, sizeof (T) * len_); \
- } \
- return new_vec_; \
-} \
- \
-static inline void VEC_OP (T,free) \
- (VEC(T) **vec_) \
-{ \
- if (*vec_) \
- vec_free (*vec_); \
- *vec_ = NULL; \
-} \
- \
-static inline int VEC_OP (T,reserve) \
- (VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL) \
-{ \
- int extend = !VEC_OP (T,space) \
- (*vec_, alloc_ < 0 ? -alloc_ : alloc_ VEC_ASSERT_PASS); \
- \
- if (extend) \
- *vec_ = (VEC(T) *) vec_o_reserve (*vec_, alloc_, \
- offsetof (VEC(T),vec), sizeof (T)); \
- \
- return extend; \
-} \
- \
-static inline void VEC_OP (T,safe_grow) \
- (VEC(T) **vec_, int size_ VEC_ASSERT_DECL) \
-{ \
- vec_assert (size_ >= 0 && VEC_OP(T,length) (*vec_) <= (unsigned)size_, \
- "safe_grow"); \
- VEC_OP (T,reserve) (vec_, (int)(*vec_ ? (*vec_)->num : 0) - size_ \
- VEC_ASSERT_PASS); \
- (*vec_)->num = size_; \
-} \
- \
-static inline T *VEC_OP (T,safe_push) \
- (VEC(T) **vec_, const T obj_ VEC_ASSERT_DECL) \
-{ \
- VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); \
- \
- return VEC_OP (T,quick_push) (*vec_, obj_ VEC_ASSERT_PASS); \
-} \
- \
-static inline T *VEC_OP (T,safe_insert) \
- (VEC(T) **vec_, unsigned ix_, const T obj_ VEC_ASSERT_DECL) \
-{ \
- VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); \
- \
- return VEC_OP (T,quick_insert) (*vec_, ix_, obj_ VEC_ASSERT_PASS); \
-}
-
-#define DEF_VEC_FUNC_P(T) \
-static inline unsigned VEC_OP (T,length) (const VEC(T) *vec_) \
-{ \
- return vec_ ? vec_->num : 0; \
-} \
- \
-static inline T VEC_OP (T,last) \
- (const VEC(T) *vec_ VEC_ASSERT_DECL) \
-{ \
- vec_assert (vec_ && vec_->num, "last"); \
- \
- return vec_->vec[vec_->num - 1]; \
-} \
- \
-static inline T VEC_OP (T,index) \
- (const VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) \
-{ \
- vec_assert (vec_ && ix_ < vec_->num, "index"); \
- \
- return vec_->vec[ix_]; \
-} \
- \
-static inline int VEC_OP (T,iterate) \
- (const VEC(T) *vec_, unsigned ix_, T *ptr) \
-{ \
- if (vec_ && ix_ < vec_->num) \
- { \
- *ptr = vec_->vec[ix_]; \
- return 1; \
- } \
- else \
- { \
- *ptr = 0; \
- return 0; \
- } \
-} \
- \
-static inline size_t VEC_OP (T,embedded_size) \
- (int alloc_) \
-{ \
- return offsetof (VEC(T),vec) + alloc_ * sizeof(T); \
-} \
- \
-static inline void VEC_OP (T,embedded_init) \
- (VEC(T) *vec_, int alloc_) \
-{ \
- vec_->num = 0; \
- vec_->alloc = alloc_; \
-} \
- \
-static inline int VEC_OP (T,space) \
- (VEC(T) *vec_, int alloc_ VEC_ASSERT_DECL) \
-{ \
- vec_assert (alloc_ >= 0, "space"); \
- return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_; \
-} \
- \
-static inline T *VEC_OP (T,quick_push) \
- (VEC(T) *vec_, T obj_ VEC_ASSERT_DECL) \
-{ \
- T *slot_; \
- \
- vec_assert (vec_->num < vec_->alloc, "quick_push"); \
- slot_ = &vec_->vec[vec_->num++]; \
- *slot_ = obj_; \
- \
- return slot_; \
-} \
- \
-static inline T VEC_OP (T,pop) (VEC(T) *vec_ VEC_ASSERT_DECL) \
-{ \
- T obj_; \
- \
- vec_assert (vec_->num, "pop"); \
- obj_ = vec_->vec[--vec_->num]; \
- \
- return obj_; \
-} \
- \
-static inline void VEC_OP (T,truncate) \
- (VEC(T) *vec_, unsigned size_ VEC_ASSERT_DECL) \
-{ \
- vec_assert (vec_ ? vec_->num >= size_ : !size_, "truncate"); \
- if (vec_) \
- vec_->num = size_; \
-} \
- \
-static inline T VEC_OP (T,replace) \
- (VEC(T) *vec_, unsigned ix_, T obj_ VEC_ASSERT_DECL) \
-{ \
- T old_obj_; \
- \
- vec_assert (ix_ < vec_->num, "replace"); \
- old_obj_ = vec_->vec[ix_]; \
- vec_->vec[ix_] = obj_; \
- \
- return old_obj_; \
-} \
- \
-static inline T *VEC_OP (T,quick_insert) \
- (VEC(T) *vec_, unsigned ix_, T obj_ VEC_ASSERT_DECL) \
-{ \
- T *slot_; \
- \
- vec_assert (vec_->num < vec_->alloc && ix_ <= vec_->num, "quick_insert"); \
- slot_ = &vec_->vec[ix_]; \
- memmove (slot_ + 1, slot_, (vec_->num++ - ix_) * sizeof (T)); \
- *slot_ = obj_; \
- \
- return slot_; \
-} \
- \
-static inline T VEC_OP (T,ordered_remove) \
- (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) \
-{ \
- T *slot_; \
- T obj_; \
- \
- vec_assert (ix_ < vec_->num, "ordered_remove"); \
- slot_ = &vec_->vec[ix_]; \
- obj_ = *slot_; \
- memmove (slot_, slot_ + 1, (--vec_->num - ix_) * sizeof (T)); \
- \
- return obj_; \
-} \
- \
-static inline T VEC_OP (T,unordered_remove) \
- (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) \
-{ \
- T *slot_; \
- T obj_; \
- \
- vec_assert (ix_ < vec_->num, "unordered_remove"); \
- slot_ = &vec_->vec[ix_]; \
- obj_ = *slot_; \
- *slot_ = vec_->vec[--vec_->num]; \
- \
- return obj_; \
-} \
- \
-static inline void VEC_OP (T,block_remove) \
- (VEC(T) *vec_, unsigned ix_, unsigned len_ VEC_ASSERT_DECL) \
-{ \
- T *slot_; \
- \
- vec_assert (ix_ + len_ <= vec_->num, "block_remove"); \
- slot_ = &vec_->vec[ix_]; \
- vec_->num -= len_; \
- memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (T)); \
-} \
- \
-static inline T *VEC_OP (T,address) \
- (VEC(T) *vec_) \
-{ \
- return vec_ ? vec_->vec : 0; \
-} \
- \
-static inline unsigned VEC_OP (T,lower_bound) \
- (VEC(T) *vec_, const T obj_, \
- int (*lessthan_)(const T, const T) VEC_ASSERT_DECL) \
-{ \
- unsigned int len_ = VEC_OP (T, length) (vec_); \
- unsigned int half_, middle_; \
- unsigned int first_ = 0; \
- while (len_ > 0) \
- { \
- T middle_elem_; \
- half_ = len_ >> 1; \
- middle_ = first_; \
- middle_ += half_; \
- middle_elem_ = VEC_OP (T,index) (vec_, middle_ VEC_ASSERT_PASS); \
- if (lessthan_ (middle_elem_, obj_)) \
- { \
- first_ = middle_; \
- ++first_; \
- len_ = len_ - half_ - 1; \
- } \
- else \
- len_ = half_; \
- } \
- return first_; \
-}
-
-#define DEF_VEC_ALLOC_FUNC_P(T) \
-static inline VEC(T) *VEC_OP (T,alloc) \
- (int alloc_) \
-{ \
- /* We must request exact size allocation, hence the negation. */ \
- return (VEC(T) *) vec_p_reserve (NULL, -alloc_); \
-} \
- \
-static inline void VEC_OP (T,free) \
- (VEC(T) **vec_) \
-{ \
- if (*vec_) \
- vec_free (*vec_); \
- *vec_ = NULL; \
-} \
- \
-static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_) \
-{ \
- size_t len_ = vec_ ? vec_->num : 0; \
- VEC (T) *new_vec_ = NULL; \
- \
- if (len_) \
- { \
- /* We must request exact size allocation, hence the negation. */ \
- new_vec_ = (VEC (T) *)(vec_p_reserve (NULL, -len_)); \
- \
- new_vec_->num = len_; \
- memcpy (new_vec_->vec, vec_->vec, sizeof (T) * len_); \
- } \
- return new_vec_; \
-} \
- \
-static inline int VEC_OP (T,reserve) \
- (VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL) \
-{ \
- int extend = !VEC_OP (T,space) \
- (*vec_, alloc_ < 0 ? -alloc_ : alloc_ VEC_ASSERT_PASS); \
- \
- if (extend) \
- *vec_ = (VEC(T) *) vec_p_reserve (*vec_, alloc_); \
- \
- return extend; \
-} \
- \
-static inline void VEC_OP (T,safe_grow) \
- (VEC(T) **vec_, int size_ VEC_ASSERT_DECL) \
-{ \
- vec_assert (size_ >= 0 && VEC_OP(T,length) (*vec_) <= (unsigned)size_, \
- "safe_grow"); \
- VEC_OP (T,reserve) \
- (vec_, (int)(*vec_ ? (*vec_)->num : 0) - size_ VEC_ASSERT_PASS); \
- (*vec_)->num = size_; \
-} \
- \
-static inline T *VEC_OP (T,safe_push) \
- (VEC(T) **vec_, T obj_ VEC_ASSERT_DECL) \
-{ \
- VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); \
- \
- return VEC_OP (T,quick_push) (*vec_, obj_ VEC_ASSERT_PASS); \
-} \
- \
-static inline T *VEC_OP (T,safe_insert) \
- (VEC(T) **vec_, unsigned ix_, T obj_ VEC_ASSERT_DECL) \
-{ \
- VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); \
- \
- return VEC_OP (T,quick_insert) (*vec_, ix_, obj_ VEC_ASSERT_PASS); \
-}
-
-#define DEF_VEC_FUNC_O(T) \
-static inline unsigned VEC_OP (T,length) (const VEC(T) *vec_) \
-{ \
- return vec_ ? vec_->num : 0; \
-} \
- \
-static inline T *VEC_OP (T,last) (VEC(T) *vec_ VEC_ASSERT_DECL) \
-{ \
- vec_assert (vec_ && vec_->num, "last"); \
- \
- return &vec_->vec[vec_->num - 1]; \
-} \
- \
-static inline T *VEC_OP (T,index) \
- (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) \
-{ \
- vec_assert (vec_ && ix_ < vec_->num, "index"); \
- \
- return &vec_->vec[ix_]; \
-} \
- \
-static inline int VEC_OP (T,iterate) \
- (VEC(T) *vec_, unsigned ix_, T **ptr) \
-{ \
- if (vec_ && ix_ < vec_->num) \
- { \
- *ptr = &vec_->vec[ix_]; \
- return 1; \
- } \
- else \
- { \
- *ptr = 0; \
- return 0; \
- } \
-} \
- \
-static inline size_t VEC_OP (T,embedded_size) \
- (int alloc_) \
-{ \
- return offsetof (VEC(T),vec) + alloc_ * sizeof(T); \
-} \
- \
-static inline void VEC_OP (T,embedded_init) \
- (VEC(T) *vec_, int alloc_) \
-{ \
- vec_->num = 0; \
- vec_->alloc = alloc_; \
-} \
- \
-static inline int VEC_OP (T,space) \
- (VEC(T) *vec_, int alloc_ VEC_ASSERT_DECL) \
-{ \
- vec_assert (alloc_ >= 0, "space"); \
- return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_; \
-} \
- \
-static inline T *VEC_OP (T,quick_push) \
- (VEC(T) *vec_, const T *obj_ VEC_ASSERT_DECL) \
-{ \
- T *slot_; \
- \
- vec_assert (vec_->num < vec_->alloc, "quick_push"); \
- slot_ = &vec_->vec[vec_->num++]; \
- if (obj_) \
- *slot_ = *obj_; \
- \
- return slot_; \
-} \
- \
-static inline void VEC_OP (T,pop) (VEC(T) *vec_ VEC_ASSERT_DECL) \
-{ \
- vec_assert (vec_->num, "pop"); \
- --vec_->num; \
-} \
- \
-static inline void VEC_OP (T,truncate) \
- (VEC(T) *vec_, unsigned size_ VEC_ASSERT_DECL) \
-{ \
- vec_assert (vec_ ? vec_->num >= size_ : !size_, "truncate"); \
- if (vec_) \
- vec_->num = size_; \
-} \
- \
-static inline T *VEC_OP (T,replace) \
- (VEC(T) *vec_, unsigned ix_, const T *obj_ VEC_ASSERT_DECL) \
-{ \
- T *slot_; \
- \
- vec_assert (ix_ < vec_->num, "replace"); \
- slot_ = &vec_->vec[ix_]; \
- if (obj_) \
- *slot_ = *obj_; \
- \
- return slot_; \
-} \
- \
-static inline T *VEC_OP (T,quick_insert) \
- (VEC(T) *vec_, unsigned ix_, const T *obj_ VEC_ASSERT_DECL) \
-{ \
- T *slot_; \
- \
- vec_assert (vec_->num < vec_->alloc && ix_ <= vec_->num, "quick_insert"); \
- slot_ = &vec_->vec[ix_]; \
- memmove (slot_ + 1, slot_, (vec_->num++ - ix_) * sizeof (T)); \
- if (obj_) \
- *slot_ = *obj_; \
- \
- return slot_; \
-} \
- \
-static inline void VEC_OP (T,ordered_remove) \
- (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) \
-{ \
- T *slot_; \
- \
- vec_assert (ix_ < vec_->num, "ordered_remove"); \
- slot_ = &vec_->vec[ix_]; \
- memmove (slot_, slot_ + 1, (--vec_->num - ix_) * sizeof (T)); \
-} \
- \
-static inline void VEC_OP (T,unordered_remove) \
- (VEC(T) *vec_, unsigned ix_ VEC_ASSERT_DECL) \
-{ \
- vec_assert (ix_ < vec_->num, "unordered_remove"); \
- vec_->vec[ix_] = vec_->vec[--vec_->num]; \
-} \
- \
-static inline void VEC_OP (T,block_remove) \
- (VEC(T) *vec_, unsigned ix_, unsigned len_ VEC_ASSERT_DECL) \
-{ \
- T *slot_; \
- \
- vec_assert (ix_ + len_ <= vec_->num, "block_remove"); \
- slot_ = &vec_->vec[ix_]; \
- vec_->num -= len_; \
- memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (T)); \
-} \
- \
-static inline T *VEC_OP (T,address) \
- (VEC(T) *vec_) \
-{ \
- return vec_ ? vec_->vec : 0; \
-} \
- \
-static inline unsigned VEC_OP (T,lower_bound) \
- (VEC(T) *vec_, const T *obj_, \
- int (*lessthan_)(const T *, const T *) VEC_ASSERT_DECL) \
-{ \
- unsigned int len_ = VEC_OP (T, length) (vec_); \
- unsigned int half_, middle_; \
- unsigned int first_ = 0; \
- while (len_ > 0) \
- { \
- T *middle_elem_; \
- half_ = len_ >> 1; \
- middle_ = first_; \
- middle_ += half_; \
- middle_elem_ = VEC_OP (T,index) (vec_, middle_ VEC_ASSERT_PASS); \
- if (lessthan_ (middle_elem_, obj_)) \
- { \
- first_ = middle_; \
- ++first_; \
- len_ = len_ - half_ - 1; \
- } \
- else \
- len_ = half_; \
- } \
- return first_; \
-}
-
-#define DEF_VEC_ALLOC_FUNC_O(T) \
-static inline VEC(T) *VEC_OP (T,alloc) \
- (int alloc_) \
-{ \
- /* We must request exact size allocation, hence the negation. */ \
- return (VEC(T) *) vec_o_reserve (NULL, -alloc_, \
- offsetof (VEC(T),vec), sizeof (T)); \
-} \
- \
-static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_) \
-{ \
- size_t len_ = vec_ ? vec_->num : 0; \
- VEC (T) *new_vec_ = NULL; \
- \
- if (len_) \
- { \
- /* We must request exact size allocation, hence the negation. */ \
- new_vec_ = (VEC (T) *) \
- vec_o_reserve (NULL, -len_, offsetof (VEC(T),vec), sizeof (T)); \
- \
- new_vec_->num = len_; \
- memcpy (new_vec_->vec, vec_->vec, sizeof (T) * len_); \
- } \
- return new_vec_; \
-} \
- \
-static inline void VEC_OP (T,free) \
- (VEC(T) **vec_) \
-{ \
- if (*vec_) \
- vec_free (*vec_); \
- *vec_ = NULL; \
-} \
- \
-static inline int VEC_OP (T,reserve) \
- (VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL) \
-{ \
- int extend = !VEC_OP (T,space) (*vec_, alloc_ < 0 ? -alloc_ : alloc_ \
- VEC_ASSERT_PASS); \
- \
- if (extend) \
- *vec_ = (VEC(T) *) \
- vec_o_reserve (*vec_, alloc_, offsetof (VEC(T),vec), sizeof (T)); \
- \
- return extend; \
-} \
- \
-static inline void VEC_OP (T,safe_grow) \
- (VEC(T) **vec_, int size_ VEC_ASSERT_DECL) \
-{ \
- vec_assert (size_ >= 0 && VEC_OP(T,length) (*vec_) <= (unsigned)size_, \
- "safe_grow"); \
- VEC_OP (T,reserve) \
- (vec_, (int)(*vec_ ? (*vec_)->num : 0) - size_ VEC_ASSERT_PASS); \
- (*vec_)->num = size_; \
-} \
- \
-static inline T *VEC_OP (T,safe_push) \
- (VEC(T) **vec_, const T *obj_ VEC_ASSERT_DECL) \
-{ \
- VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); \
- \
- return VEC_OP (T,quick_push) (*vec_, obj_ VEC_ASSERT_PASS); \
-} \
- \
-static inline T *VEC_OP (T,safe_insert) \
- (VEC(T) **vec_, unsigned ix_, const T *obj_ VEC_ASSERT_DECL) \
-{ \
- VEC_OP (T,reserve) (vec_, 1 VEC_ASSERT_PASS); \
- \
- return VEC_OP (T,quick_insert) (*vec_, ix_, obj_ VEC_ASSERT_PASS); \
-}
-
-#endif /* GDB_VEC_H */
diff --git a/gdb/version.in b/gdb/version.in
index 9a84f12..fb856db 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-6.5.50.20061115-cvs
+6.5.50.20060828-cvs
diff --git a/gdb/xml-support.c b/gdb/xml-support.c
deleted file mode 100644
index 2fcf64e..0000000
--- a/gdb/xml-support.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/* Helper routines for parsing XML using Expat.
-
- Copyright (C) 2006
- 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. */
-
-#include "defs.h"
-
-/* The contents of this file are only useful if XML support is
- available. */
-#ifdef HAVE_LIBEXPAT
-
-#include "exceptions.h"
-#include "xml-support.h"
-
-#include "gdb_expat.h"
-#include "gdb_string.h"
-
-/* Returns the value of attribute ATTR from expat attribute list
- ATTRLIST. If not found, throws an exception. */
-
-const XML_Char *
-xml_get_required_attribute (const XML_Char **attrs,
- const XML_Char *attr)
-{
- const XML_Char **p;
- for (p = attrs; *p; p += 2)
- {
- const char *name = p[0];
- const char *val = p[1];
-
- if (strcmp (name, attr) == 0)
- return val;
- }
- throw_error (XML_PARSE_ERROR, _("Can't find attribute %s"), attr);
-}
-
-/* Parse a field VALSTR that we expect to contain an integer value.
- The integer is returned in *VALP. The string is parsed with an
- equivalent to strtoul.
-
- Returns 0 for success, -1 for error. */
-
-static int
-xml_parse_unsigned_integer (const char *valstr, ULONGEST *valp)
-{
- const char *endptr;
- ULONGEST result;
-
- if (*valstr == '\0')
- return -1;
-
- result = strtoulst (valstr, &endptr, 0);
- if (*endptr != '\0')
- return -1;
-
- *valp = result;
- return 0;
-}
-
-/* Gets the value of an integer attribute named ATTR, if it's present.
- If the attribute is not found, or can't be parsed as integer,
- throws an exception. */
-
-ULONGEST
-xml_get_integer_attribute (const XML_Char **attrs,
- const XML_Char *attr)
-{
- ULONGEST result;
- const XML_Char *value = xml_get_required_attribute (attrs, attr);
-
- if (xml_parse_unsigned_integer (value, &result) != 0)
- {
- throw_error (XML_PARSE_ERROR,
- _("Can't convert value of attribute %s, %s, to integer"),
- attr, value);
- }
- return result;
-}
-
-/* Obtains a value of attribute with enumerated type. In XML, enumerated
- attributes have string as a value, and in C, they are represented as
- values of enumerated type. This function maps the attribute onto
- an integer value that can be immediately converted into enumerated
- type.
-
- First, obtains the string value of ATTR in ATTRS.
- Then, finds the index of that value in XML_NAMES, which is a zero-terminated
- array of strings. If found, returns the element of VALUES with that index.
- Otherwise throws. */
-
-int
-xml_get_enum_value (const XML_Char **attrs,
- const XML_Char *attr,
- const XML_Char **xml_names,
- int *values)
-{
- const XML_Char *value = xml_get_required_attribute (attrs, attr);
-
- int i;
- for (i = 0; xml_names[i]; ++i)
- {
- if (strcmp (xml_names[i], value) == 0)
- return values[i];
- }
- throw_error (XML_PARSE_ERROR,
- _("Invalid enumerated value in XML: %s"), value);
-}
-
-/* Cleanup wrapper for XML_ParserFree, with the correct type
- for make_cleanup. */
-
-static void
-free_xml_parser (void *parser)
-{
- XML_ParserFree (parser);
-}
-
-/* Register a cleanup to release PARSER. Only the parser itself
- is freed; another cleanup may be necessary to discard any
- associated user data. */
-
-void
-make_cleanup_free_xml_parser (XML_Parser parser)
-{
- make_cleanup (free_xml_parser, parser);
-}
-
-#endif /* HAVE_LIBEXPAT */
diff --git a/gdb/xml-support.h b/gdb/xml-support.h
deleted file mode 100644
index ada4847..0000000
--- a/gdb/xml-support.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Helper routines for parsing XML using Expat.
-
- Copyright (C) 2006
- 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. */
-
-
-#ifndef XML_SUPPORT_H
-#define XML_SUPPORT_H
-
-#include "gdb_expat.h"
-
-/* Helper functions for parsing XML documents. See xml-support.c
- for more information about these functions. */
-
-const XML_Char *xml_get_required_attribute (const XML_Char **attrs,
- const XML_Char *attr);
-
-ULONGEST xml_get_integer_attribute (const XML_Char **attrs,
- const XML_Char *attr);
-
-int xml_get_enum_value (const XML_Char **attrs,
- const XML_Char *attr,
- const XML_Char **xml_names,
- int *values);
-
-void make_cleanup_free_xml_parser (XML_Parser parser);
-
-#endif
diff --git a/gdb/xtensa-config.c b/gdb/xtensa-config.c
deleted file mode 100644
index f904556..0000000
--- a/gdb/xtensa-config.c
+++ /dev/null
@@ -1,563 +0,0 @@
-/* Configuration for the Xtensa architecture for GDB, the GNU debugger.
-
- Copyright (C) 2003, 2005, 2006 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. */
-
-#include "xtensa-config.h"
-#include "defs.h"
-#include "gdbarch.h"
-#include "xtensa-tdep.h"
-#include "gdbtypes.h"
-
-/* Check version of configuration file. */
-#define XTENSA_CONFIG_VERSION 0x60
-#if XTENSA_TDEP_VERSION != XTENSA_CONFIG_VERSION
-#warning "xtensa-config.c version mismatch!"
-#endif
-
-
-/* Return the byte order from the configuration.
- We need this function, because the byte order is needed even
- before the target structure (tdep) has been set up. */
-
-int
-xtensa_config_byte_order (void)
-{
- return XCHAL_HAVE_BE ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE;
-}
-
-
-/* This routine returns the predefined architecture-dependent
- parameter structure (tdep) and register map. */
-
-struct gdbarch_tdep xtensa_tdep;
-
-struct gdbarch_tdep *
-xtensa_config_tdep (struct gdbarch_info *info)
-{
- return &xtensa_tdep;
-}
-
-
-/* Masked registers. */
-const int mask0[] = { 1, 96, 0, 4 };
-const int mask1[] = { 1, 96, 5, 1 };
-const int mask2[] = { 1, 96, 18, 1 };
-const int mask3[] = { 1, 96, 6, 2 };
-const int mask4[] = { 1, 96, 4, 1 };
-const int mask5[] = { 1, 96, 16, 2 };
-const int mask6[] = { 1, 96, 8, 4 };
-const int mask7[] = { 1, 95, 12, 20 };
-const int mask8[] = { 1, 95, 0, 1 };
-const int mask9[] = { 1, 108, 8, 4 };
-const int mask10[] = { 1, 109, 24, 8 };
-const int mask11[] = { 1, 109, 16, 8 };
-const int mask12[] = { 1, 109, 8, 8 };
-const int mask13[] = { 1, 110, 16, 2 };
-const int mask14[] = { 1, 111, 16, 2 };
-const int mask15[] = { 1, 67, 22, 10 };
-
-
-/* Register map. */
-xtensa_register_t rmap[] =
-{
- { /* 0000 */ "ar0", 0, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000100, 0x0006, 0,
- 0, 0 },
- { /* 0001 */ "ar1", 4, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000101, 0x0006, 0,
- 0, 0 },
- { /* 0002 */ "ar2", 8, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000102, 0x0006, 0,
- 0, 0 },
- { /* 0003 */ "ar3", 12, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000103, 0x0006, 0,
- 0, 0 },
- { /* 0004 */ "ar4", 16, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000104, 0x0006, 0,
- 0, 0 },
- { /* 0005 */ "ar5", 20, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000105, 0x0006, 0,
- 0, 0 },
- { /* 0006 */ "ar6", 24, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000106, 0x0006, 0,
- 0, 0 },
- { /* 0007 */ "ar7", 28, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000107, 0x0006, 0,
- 0, 0 },
- { /* 0008 */ "ar8", 32, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000108, 0x0006, 0,
- 0, 0 },
- { /* 0009 */ "ar9", 36, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000109, 0x0006, 0,
- 0, 0 },
- { /* 0010 */ "ar10", 40, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000010a, 0x0006, 0,
- 0, 0 },
- { /* 0011 */ "ar11", 44, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000010b, 0x0006, 0,
- 0, 0 },
- { /* 0012 */ "ar12", 48, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000010c, 0x0006, 0,
- 0, 0 },
- { /* 0013 */ "ar13", 52, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000010d, 0x0006, 0,
- 0, 0 },
- { /* 0014 */ "ar14", 56, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000010e, 0x0006, 0,
- 0, 0 },
- { /* 0015 */ "ar15", 60, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000010f, 0x0006, 0,
- 0, 0 },
- { /* 0016 */ "ar16", 64, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000110, 0x0006, 0,
- 0, 0 },
- { /* 0017 */ "ar17", 68, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000111, 0x0006, 0,
- 0, 0 },
- { /* 0018 */ "ar18", 72, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000112, 0x0006, 0,
- 0, 0 },
- { /* 0019 */ "ar19", 76, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000113, 0x0006, 0,
- 0, 0 },
- { /* 0020 */ "ar20", 80, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000114, 0x0006, 0,
- 0, 0 },
- { /* 0021 */ "ar21", 84, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000115, 0x0006, 0,
- 0, 0 },
- { /* 0022 */ "ar22", 88, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000116, 0x0006, 0,
- 0, 0 },
- { /* 0023 */ "ar23", 92, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000117, 0x0006, 0,
- 0, 0 },
- { /* 0024 */ "ar24", 96, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000118, 0x0006, 0,
- 0, 0 },
- { /* 0025 */ "ar25", 100, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000119, 0x0006, 0,
- 0, 0 },
- { /* 0026 */ "ar26", 104, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000011a, 0x0006, 0,
- 0, 0 },
- { /* 0027 */ "ar27", 108, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000011b, 0x0006, 0,
- 0, 0 },
- { /* 0028 */ "ar28", 112, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000011c, 0x0006, 0,
- 0, 0 },
- { /* 0029 */ "ar29", 116, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000011d, 0x0006, 0,
- 0, 0 },
- { /* 0030 */ "ar30", 120, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000011e, 0x0006, 0,
- 0, 0 },
- { /* 0031 */ "ar31", 124, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000011f, 0x0006, 0,
- 0, 0 },
- { /* 0032 */ "ar32", 128, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000120, 0x0006, 0,
- 0, 0 },
- { /* 0033 */ "ar33", 132, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000121, 0x0006, 0,
- 0, 0 },
- { /* 0034 */ "ar34", 136, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000122, 0x0006, 0,
- 0, 0 },
- { /* 0035 */ "ar35", 140, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000123, 0x0006, 0,
- 0, 0 },
- { /* 0036 */ "ar36", 144, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000124, 0x0006, 0,
- 0, 0 },
- { /* 0037 */ "ar37", 148, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000125, 0x0006, 0,
- 0, 0 },
- { /* 0038 */ "ar38", 152, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000126, 0x0006, 0,
- 0, 0 },
- { /* 0039 */ "ar39", 156, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000127, 0x0006, 0,
- 0, 0 },
- { /* 0040 */ "ar40", 160, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000128, 0x0006, 0,
- 0, 0 },
- { /* 0041 */ "ar41", 164, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000129, 0x0006, 0,
- 0, 0 },
- { /* 0042 */ "ar42", 168, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000012a, 0x0006, 0,
- 0, 0 },
- { /* 0043 */ "ar43", 172, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000012b, 0x0006, 0,
- 0, 0 },
- { /* 0044 */ "ar44", 176, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000012c, 0x0006, 0,
- 0, 0 },
- { /* 0045 */ "ar45", 180, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000012d, 0x0006, 0,
- 0, 0 },
- { /* 0046 */ "ar46", 184, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000012e, 0x0006, 0,
- 0, 0 },
- { /* 0047 */ "ar47", 188, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000012f, 0x0006, 0,
- 0, 0 },
- { /* 0048 */ "ar48", 192, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000130, 0x0006, 0,
- 0, 0 },
- { /* 0049 */ "ar49", 196, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000131, 0x0006, 0,
- 0, 0 },
- { /* 0050 */ "ar50", 200, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000132, 0x0006, 0,
- 0, 0 },
- { /* 0051 */ "ar51", 204, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000133, 0x0006, 0,
- 0, 0 },
- { /* 0052 */ "ar52", 208, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000134, 0x0006, 0,
- 0, 0 },
- { /* 0053 */ "ar53", 212, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000135, 0x0006, 0,
- 0, 0 },
- { /* 0054 */ "ar54", 216, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000136, 0x0006, 0,
- 0, 0 },
- { /* 0055 */ "ar55", 220, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000137, 0x0006, 0,
- 0, 0 },
- { /* 0056 */ "ar56", 224, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000138, 0x0006, 0,
- 0, 0 },
- { /* 0057 */ "ar57", 228, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x00000139, 0x0006, 0,
- 0, 0 },
- { /* 0058 */ "ar58", 232, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000013a, 0x0006, 0,
- 0, 0 },
- { /* 0059 */ "ar59", 236, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000013b, 0x0006, 0,
- 0, 0 },
- { /* 0060 */ "ar60", 240, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000013c, 0x0006, 0,
- 0, 0 },
- { /* 0061 */ "ar61", 244, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000013d, 0x0006, 0,
- 0, 0 },
- { /* 0062 */ "ar62", 248, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000013e, 0x0006, 0,
- 0, 0 },
- { /* 0063 */ "ar63", 252, xtRegisterTypeArRegfile, 0x2, 0,
- 32, 4, 4, 0x0000013f, 0x0006, 0,
- 0, 0 },
- { /* 0064 */ "lbeg", 256, xtRegisterTypeSpecialReg, 0x1100, 0,
- 32, 4, 4, 0x00000200, 0x0006, 0,
- 0, 0 },
- { /* 0065 */ "lend", 260, xtRegisterTypeSpecialReg, 0x1100, 0,
- 32, 4, 4, 0x00000201, 0x0006, 0,
- 0, 0 },
- { /* 0066 */ "lcount", 264, xtRegisterTypeSpecialReg, 0x1100, 0,
- 32, 4, 4, 0x00000202, 0x0006, 0,
- 0, 0 },
- { /* 0067 */ "ptevaddr", 268, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x00000253, 0x0007, 0,
- 0, 0 },
- { /* 0068 */ "ddr", 272, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x00000268, 0x0007, 0,
- 0, 0 },
- { /* 0069 */ "interrupt", 276, xtRegisterTypeSpecialReg, 0x1000, 0,
- 17, 4, 4, 0x000002e2, 0x000b, 0,
- 0, 0 },
- { /* 0070 */ "intset", 280, xtRegisterTypeSpecialReg, 0x1000, 0,
- 17, 4, 4, 0x000002e2, 0x000d, 0,
- 0, 0 },
- { /* 0071 */ "intclear", 284, xtRegisterTypeSpecialReg, 0x1000, 0,
- 17, 4, 4, 0x000002e3, 0x000d, 0,
- 0, 0 },
- { /* 0072 */ "ccount", 288, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002ea, 0x000f, 0,
- 0, 0 },
- { /* 0073 */ "prid", 292, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002eb, 0x0003, 0,
- 0, 0 },
- { /* 0074 */ "icount", 296, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002ec, 0x000f, 0,
- 0, 0 },
- { /* 0075 */ "ccompare0", 300, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002f0, 0x000f, 0,
- 0, 0 },
- { /* 0076 */ "ccompare1", 304, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002f1, 0x000f, 0,
- 0, 0 },
- { /* 0077 */ "ccompare2", 308, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002f2, 0x000f, 0,
- 0, 0 },
- { /* 0078 */ "epc1", 312, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002b1, 0x0007, 0,
- 0, 0 },
- { /* 0079 */ "epc2", 316, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002b2, 0x0007, 0,
- 0, 0 },
- { /* 0080 */ "epc3", 320, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002b3, 0x0007, 0,
- 0, 0 },
- { /* 0081 */ "epc4", 324, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002b4, 0x0007, 0,
- 0, 0 },
- { /* 0082 */ "excsave1", 328, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002d1, 0x0007, 0,
- 0, 0 },
- { /* 0083 */ "excsave2", 332, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002d2, 0x0007, 0,
- 0, 0 },
- { /* 0084 */ "excsave3", 336, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002d3, 0x0007, 0,
- 0, 0 },
- { /* 0085 */ "excsave4", 340, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002d4, 0x0007, 0,
- 0, 0 },
- { /* 0086 */ "eps2", 344, xtRegisterTypeSpecialReg, 0x1000, 0,
- 19, 4, 4, 0x000002c2, 0x0007, 0,
- 0, 0 },
- { /* 0087 */ "eps3", 348, xtRegisterTypeSpecialReg, 0x1000, 0,
- 19, 4, 4, 0x000002c3, 0x0007, 0,
- 0, 0 },
- { /* 0088 */ "eps4", 352, xtRegisterTypeSpecialReg, 0x1000, 0,
- 19, 4, 4, 0x000002c4, 0x0007, 0,
- 0, 0 },
- { /* 0089 */ "exccause", 356, xtRegisterTypeSpecialReg, 0x1000, 0,
- 6, 4, 4, 0x000002e8, 0x0007, 0,
- 0, 0 },
- { /* 0090 */ "depc", 360, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002c0, 0x0007, 0,
- 0, 0 },
- { /* 0091 */ "excvaddr", 364, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002ee, 0x0007, 0,
- 0, 0 },
- { /* 0092 */ "windowbase", 368, xtRegisterTypeSpecialReg, 0x1002, 0,
- 4, 4, 4, 0x00000248, 0x0007, 0,
- 0, 0 },
- { /* 0093 */ "windowstart", 372, xtRegisterTypeSpecialReg, 0x1002, 0,
- 16, 4, 4, 0x00000249, 0x0007, 0,
- 0, 0 },
- { /* 0094 */ "sar", 376, xtRegisterTypeSpecialReg, 0x1100, 0,
- 6, 4, 4, 0x00000203, 0x0006, 0,
- 0, 0 },
- { /* 0095 */ "litbase", 380, xtRegisterTypeSpecialReg, 0x1100, 0,
- 32, 4, 4, 0x00000205, 0x0006, 0,
- 0, 0 },
- { /* 0096 */ "ps", 384, xtRegisterTypeSpecialReg, 0x1100, 0,
- 19, 4, 4, 0x000002e6, 0x0007, 0,
- 0, 0 },
- { /* 0097 */ "misc0", 388, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002f4, 0x0007, 0,
- 0, 0 },
- { /* 0098 */ "misc1", 392, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002f5, 0x0007, 0,
- 0, 0 },
- { /* 0099 */ "intenable", 396, xtRegisterTypeSpecialReg, 0x1000, 0,
- 17, 4, 4, 0x000002e4, 0x0007, 0,
- 0, 0 },
- { /* 0100 */ "dbreaka0", 400, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x00000290, 0x0007, 0,
- 0, 0 },
- { /* 0101 */ "dbreakc0", 404, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002a0, 0x0007, 0,
- 0, 0 },
- { /* 0102 */ "dbreaka1", 408, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x00000291, 0x0007, 0,
- 0, 0 },
- { /* 0103 */ "dbreakc1", 412, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x000002a1, 0x0007, 0,
- 0, 0 },
- { /* 0104 */ "ibreaka0", 416, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x00000280, 0x0007, 0,
- 0, 0 },
- { /* 0105 */ "ibreaka1", 420, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x00000281, 0x0007, 0,
- 0, 0 },
- { /* 0106 */ "ibreakenable", 424, xtRegisterTypeSpecialReg, 0x1000, 0,
- 2, 4, 4, 0x00000260, 0x0007, 0,
- 0, 0 },
- { /* 0107 */ "icountlevel", 428, xtRegisterTypeSpecialReg, 0x1000, 0,
- 4, 4, 4, 0x000002ed, 0x0007, 0,
- 0, 0 },
- { /* 0108 */ "debugcause", 432, xtRegisterTypeSpecialReg, 0x1000, 0,
- 12, 4, 4, 0x000002e9, 0x0003, 0,
- 0, 0 },
- { /* 0109 */ "rasid", 436, xtRegisterTypeSpecialReg, 0x1000, 0,
- 32, 4, 4, 0x0000025a, 0x0007, 0,
- 0, 0 },
- { /* 0110 */ "itlbcfg", 440, xtRegisterTypeSpecialReg, 0x1000, 0,
- 18, 4, 4, 0x0000025b, 0x0007, 0,
- 0, 0 },
- { /* 0111 */ "dtlbcfg", 444, xtRegisterTypeSpecialReg, 0x1000, 0,
- 18, 4, 4, 0x0000025c, 0x0007, 0,
- 0, 0 },
- { /* 0112 */ "threadptr", 448, xtRegisterTypeUserReg, 0x110, 0,
- 32, 4, 4, 0x000003e7, 0x0006, 0,
- 0, 0 },
- { /* 0113 */ "pc", 452, xtRegisterTypeVirtual, 0x100, 0,
- 32, 4, 4, 0x00000020, 0x0006, 0,
- 0, 0 },
- { /* 0114 */ "a0", 456, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x00000000, 0x0006, 0,
- 0, 0 },
- { /* 0115 */ "a1", 460, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x00000001, 0x0006, 0,
- 0, 0 },
- { /* 0116 */ "a2", 464, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x00000002, 0x0006, 0,
- 0, 0 },
- { /* 0117 */ "a3", 468, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x00000003, 0x0006, 0,
- 0, 0 },
- { /* 0118 */ "a4", 472, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x00000004, 0x0006, 0,
- 0, 0 },
- { /* 0119 */ "a5", 476, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x00000005, 0x0006, 0,
- 0, 0 },
- { /* 0120 */ "a6", 480, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x00000006, 0x0006, 0,
- 0, 0 },
- { /* 0121 */ "a7", 484, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x00000007, 0x0006, 0,
- 0, 0 },
- { /* 0122 */ "a8", 488, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x00000008, 0x0006, 0,
- 0, 0 },
- { /* 0123 */ "a9", 492, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x00000009, 0x0006, 0,
- 0, 0 },
- { /* 0124 */ "a10", 496, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x0000000a, 0x0006, 0,
- 0, 0 },
- { /* 0125 */ "a11", 500, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x0000000b, 0x0006, 0,
- 0, 0 },
- { /* 0126 */ "a12", 504, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x0000000c, 0x0006, 0,
- 0, 0 },
- { /* 0127 */ "a13", 508, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x0000000d, 0x0006, 0,
- 0, 0 },
- { /* 0128 */ "a14", 512, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x0000000e, 0x0006, 0,
- 0, 0 },
- { /* 0129 */ "a15", 516, xtRegisterTypeWindow, 0x100, 0,
- 32, 4, 4, 0x0000000f, 0x0006, 0,
- 0, 0 },
- { /* 0130 */ "psintlevel", 520, xtRegisterTypeMapped, 0x1010, 0,
- 4, 4, 4, 0x00002004, 0x0006, (xtensa_mask_t *) mask0,
- 0, 0 },
- { /* 0131 */ "psum", 524, xtRegisterTypeMapped, 0x1010, 0,
- 1, 4, 4, 0x00002005, 0x0006, (xtensa_mask_t *) mask1,
- 0, 0 },
- { /* 0132 */ "pswoe", 528, xtRegisterTypeMapped, 0x1010, 0,
- 1, 4, 4, 0x00002006, 0x0006, (xtensa_mask_t *) mask2,
- 0, 0 },
- { /* 0133 */ "psring", 532, xtRegisterTypeMapped, 0x1010, 0,
- 2, 4, 4, 0x00002007, 0x0006, (xtensa_mask_t *) mask3,
- 0, 0 },
- { /* 0134 */ "psexcm", 536, xtRegisterTypeMapped, 0x1010, 0,
- 1, 4, 4, 0x00002008, 0x0006, (xtensa_mask_t *) mask4,
- 0, 0 },
- { /* 0135 */ "pscallinc", 540, xtRegisterTypeMapped, 0x1010, 0,
- 2, 4, 4, 0x00002009, 0x0006, (xtensa_mask_t *) mask5,
- 0, 0 },
- { /* 0136 */ "psowb", 544, xtRegisterTypeMapped, 0x1010, 0,
- 4, 4, 4, 0x0000200a, 0x0006, (xtensa_mask_t *) mask6,
- 0, 0 },
- { /* 0137 */ "litbaddr", 548, xtRegisterTypeMapped, 0x1010, 0,
- 20, 4, 4, 0x0000200b, 0x0006, (xtensa_mask_t *) mask7,
- 0, 0 },
- { /* 0138 */ "litben", 552, xtRegisterTypeMapped, 0x1010, 0,
- 1, 4, 4, 0x0000200c, 0x0006, (xtensa_mask_t *) mask8,
- 0, 0 },
- { /* 0139 */ "dbnum", 556, xtRegisterTypeMapped, 0x1010, 0,
- 4, 4, 4, 0x00002011, 0x0006, (xtensa_mask_t *) mask9,
- 0, 0 },
- { /* 0140 */ "asid3", 560, xtRegisterTypeMapped, 0x1010, 0,
- 8, 4, 4, 0x00002012, 0x0006, (xtensa_mask_t *) mask10,
- 0, 0 },
- { /* 0141 */ "asid2", 564, xtRegisterTypeMapped, 0x1010, 0,
- 8, 4, 4, 0x00002013, 0x0006, (xtensa_mask_t *) mask11,
- 0, 0 },
- { /* 0142 */ "asid1", 568, xtRegisterTypeMapped, 0x1010, 0,
- 8, 4, 4, 0x00002014, 0x0006, (xtensa_mask_t *) mask12,
- 0, 0 },
- { /* 0143 */ "instpgszid4", 572, xtRegisterTypeMapped, 0x1010, 0,
- 2, 4, 4, 0x00002015, 0x0006, (xtensa_mask_t *) mask13,
- 0, 0 },
- { /* 0144 */ "datapgszid4", 576, xtRegisterTypeMapped, 0x1010, 0,
- 2, 4, 4, 0x00002016, 0x0006, (xtensa_mask_t *) mask14,
- 0, 0 },
- { /* 0145 */ "ptbase", 580, xtRegisterTypeMapped, 0x1010, 0,
- 10, 4, 4, 0x00002017, 0x0006, (xtensa_mask_t *) mask15,
- 0, 0 },
-};
-
-
-struct gdbarch_tdep xtensa_tdep =
-{
- /* target_flags */ 0,
- /* spill_location */ -1,
- /* spill_size */ 0,
- /* unused */ 0,
- /* call_abi */ 0,
- /* debug_interrupt_level */ XCHAL_DEBUGLEVEL,
- /* icache_line_bytes */ XCHAL_ICACHE_LINESIZE,
- /* dcache_line_bytes */ XCHAL_DCACHE_LINESIZE,
- /* dcache_writeback */ XCHAL_DCACHE_IS_WRITEBACK,
- /* isa_use_windowed_registers */ XCHAL_HAVE_WINDOWED,
- /* isa_use_density_instructions */ XCHAL_HAVE_DENSITY,
- /* isa_use_exceptions */ 1,
- /* isa_use_ext_l32r */ 0 /* XCHAL_USE_ABSOLUTE_LITERALS */,
- /* isa_max_insn_size */ 3,
- /* debug_num_ibreaks */ XCHAL_NUM_IBREAK,
- /* debug_num_dbreaks */ XCHAL_NUM_DBREAK,
- /* rmap */ rmap,
- /* num_regs */ 114,
- /* num_pseudo_regs */ 32,
- /* num_aregs */ 64,
- /* num_contexts */ 0,
- /* ar_base */ 0,
- /* a0_base */ 114,
- /* wb_regnum */ 92,
- /* ws_regnum */ 93,
- /* pc_regnum */ 113,
- /* ps_regnum */ 96,
- /* lbeg_regnum */ 64,
- /* lend_regnum */ 65,
- /* lcount_regnum */ 66,
- /* sar_regnum */ 94,
- /* litbase_regnum */ 0,
- /* debugcause_regnum */ 108,
- /* exccause_regnum */ 89,
- /* excvaddr_regnum */ 91,
- /* max_register_raw_size */ 4,
- /* max_register_virtual_size */ 4,
- /* fp_layout */ 0,
- /* fp_layout_bytes */ 0,
- /* gregmap */ 0
-};
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
deleted file mode 100644
index d2c777d..0000000
--- a/gdb/xtensa-tdep.c
+++ /dev/null
@@ -1,1739 +0,0 @@
-/* Target-dependent code for the Xtensa port of GDB, the GNU debugger.
-
- Copyright (C) 2003, 2005, 2006 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. */
-
-#include "defs.h"
-#include "frame.h"
-#include "symtab.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "gdbtypes.h"
-#include "gdbcore.h"
-#include "value.h"
-#include "dis-asm.h"
-#include "inferior.h"
-#include "floatformat.h"
-#include "regcache.h"
-#include "reggroups.h"
-#include "regset.h"
-
-#include "dummy-frame.h"
-#include "elf/dwarf2.h"
-#include "dwarf2-frame.h"
-#include "dwarf2loc.h"
-#include "frame.h"
-#include "frame-base.h"
-#include "frame-unwind.h"
-
-#include "arch-utils.h"
-#include "gdbarch.h"
-#include "remote.h"
-#include "serial.h"
-
-#include "command.h"
-#include "gdbcmd.h"
-#include "gdb_assert.h"
-
-#include "xtensa-tdep.h"
-
-
-static int xtensa_debug_level = 0;
-
-#define DEBUGWARN(args...) \
- if (xtensa_debug_level > 0) \
- fprintf_unfiltered (gdb_stdlog, "(warn ) " args)
-
-#define DEBUGINFO(args...) \
- if (xtensa_debug_level > 1) \
- fprintf_unfiltered (gdb_stdlog, "(info ) " args)
-
-#define DEBUGTRACE(args...) \
- if (xtensa_debug_level > 2) \
- fprintf_unfiltered (gdb_stdlog, "(trace) " args)
-
-#define DEBUGVERB(args...) \
- if (xtensa_debug_level > 3) \
- fprintf_unfiltered (gdb_stdlog, "(verb ) " args)
-
-
-/* According to the ABI, the SP must be aligned to 16-byte boundaries. */
-
-#define SP_ALIGNMENT 16
-
-
-/* We use a6 through a11 for passing arguments to a function called by GDB. */
-
-#define ARGS_FIRST_REG A6_REGNUM
-#define ARGS_NUM_REGS 6
-#define REGISTER_SIZE 4
-
-
-/* Extract the call size from the return address or ps register. */
-
-#define PS_CALLINC_SHIFT 16
-#define PS_CALLINC_MASK 0x00030000
-#define CALLINC(ps) (((ps) & PS_CALLINC_MASK) >> PS_CALLINC_SHIFT)
-#define WINSIZE(ra) (4 * (( (ra) >> 30) & 0x3))
-
-
-/* Convert a live Ax register number to the corresponding Areg number. */
-
-#define AREG_NUMBER(r, wb) \
- ((((r) - A0_REGNUM + (((wb) & WB_MASK)<<WB_SHIFT)) & AREGS_MASK) + AR_BASE)
-
-
-/* Define prototypes. */
-
-extern struct gdbarch_tdep *xtensa_config_tdep (struct gdbarch_info *);
-extern int xtensa_config_byte_order (struct gdbarch_info *);
-
-
-/* XTENSA_IS_ENTRY tests whether the first byte of an instruction
- indicates that the instruction is an ENTRY instruction. */
-
-#define XTENSA_IS_ENTRY(op1) \
- ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) ? ((op1) == 0x6c) : ((op1) == 0x36))
-
-#define XTENSA_ENTRY_LENGTH 3
-
-
-/* windowing_enabled() returns true, if windowing is enabled.
- WOE must be set to 1; EXCM to 0.
- Note: We assume that EXCM is always 0 for XEA1. */
-
-static inline int
-windowing_enabled (CORE_ADDR ps)
-{
- return ((ps & (1 << 4)) == 0 && (ps & (1 << 18)) != 0);
-}
-
-/* Return the window size of the previous call to the function from which we
- have just returned.
-
- This function is used to extract the return value after a called function
- has returned to the callee. On Xtensa, the register that holds the return
- value (from the perspective of the caller) depends on what call
- instruction was used. For now, we are assuming that the call instruction
- precedes the current address, so we simply analyze the call instruction.
- If we are in a dummy frame, we simply return 4 as we used a 'pseudo-call4'
- method to call the inferior function. */
-
-static int
-extract_call_winsize (CORE_ADDR pc)
-{
- int winsize = 4; /* Default: No call, e.g. dummy frame. */
- int insn;
- char buf[4];
-
- DEBUGTRACE ("extract_call_winsize (pc = 0x%08x)\n", (int) pc);
-
- /* Read the previous instruction (should be a call[x]{4|8|12}. */
- read_memory (pc-3, buf, 3);
- insn = extract_unsigned_integer (buf, 3);
-
- /* Decode call instruction:
- Little Endian
- call{0,4,8,12} OFFSET || {00,01,10,11} || 0101
- callx{0,4,8,12} OFFSET || 11 || {00,01,10,11} || 0000
- Big Endian
- call{0,4,8,12} 0101 || {00,01,10,11} || OFFSET
- callx{0,4,8,12} 0000 || {00,01,10,11} || 11 || OFFSET. */
-
- /* Lookup call insn.
- (Return the default value (4) if we can't find a valid call insn. */
-
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
- {
- if (((insn & 0xf) == 0x5) || ((insn & 0xcf) == 0xc0))
- winsize = (insn & 0x30) >> 2; /* 0, 4, 8, 12 */
- }
- else
- {
- if (((insn >> 20) == 0x5) || (((insn >> 16) & 0xf3) == 0x03))
- winsize = (insn >> 16) & 0xc; /* 0, 4, 8, 12 */
- }
- return winsize;
-}
-
-
-/* REGISTER INFORMATION */
-
-/* Returns the name of a register. */
-
-static const char *
-xtensa_register_name (int regnum)
-{
- /* Return the name stored in the register map. */
- if (regnum >= 0 && regnum < NUM_REGS + NUM_PSEUDO_REGS)
- return REGMAP[regnum].name;
-
- /* Invalid register number. */
- internal_error (__FILE__, __LINE__, _("invalid register %d"), regnum);
- return 0;
-}
-
-
-/* Return the type of a register. Create a new type, if necessary. */
-
-static struct ctype_cache
-{
- struct ctype_cache *next;
- int size;
- struct type *virtual_type;
-} *type_entries = NULL;
-
-static struct type *
-xtensa_register_type (struct gdbarch *gdbarch, int regnum)
-{
- /* Return signed integer for ARx and Ax registers. */
- if ((regnum >= AR_BASE && regnum < AR_BASE + NUM_AREGS)
- || (regnum >= A0_BASE && regnum < A0_BASE + 16))
- return builtin_type_int;
-
- if (regnum == PC_REGNUM || regnum == A1_REGNUM)
- return lookup_pointer_type (builtin_type_void);
-
- /* Return the stored type for all other registers. */
- else if (regnum >= 0 && regnum < NUM_REGS + NUM_PSEUDO_REGS)
- {
- xtensa_register_t* reg = &REGMAP[regnum];
-
- /* Set ctype for this register (only the first time we ask for it). */
-
- if (reg->ctype == 0)
- {
- struct ctype_cache *tp;
- int size = reg->byte_size;
-
- /* We always use the memory representation, even if the register
- width is smaller. */
- switch (size)
- {
- case 1:
- reg->ctype = builtin_type_uint8;
- break;
-
- case 2:
- reg->ctype = builtin_type_uint16;
- break;
-
- case 4:
- reg->ctype = builtin_type_uint32;
- break;
-
- case 8:
- reg->ctype = builtin_type_uint64;
- break;
-
- case 16:
- reg->ctype = builtin_type_uint128;
- break;
-
- default:
- for (tp = type_entries; tp != NULL; tp = tp->next)
- if (tp->size == size)
- break;
-
- if (tp == NULL)
- {
- char *name = xmalloc (16);
- tp = xmalloc (sizeof (struct ctype_cache));
- tp->next = type_entries;
- type_entries = tp;
- tp->size = size;
-
- sprintf (name, "int%d", size * 8);
- tp->virtual_type = init_type (TYPE_CODE_INT, size,
- TYPE_FLAG_UNSIGNED, name,
- NULL);
- }
-
- reg->ctype = tp->virtual_type;
- }
- }
- return reg->ctype;
- }
-
- /* Invalid register number. */
- internal_error (__FILE__, __LINE__, _("invalid register number %d"), regnum);
- return 0;
-}
-
-
-/* Returns the 'local' register number for stubs, dwarf2, etc.
- The debugging information enumerates registers starting from 0 for A0
- to n for An. So, we only have to add the base number for A0. */
-
-static int
-xtensa_reg_to_regnum (int regnum)
-{
- int i;
-
- if (regnum >= 0 && regnum < 16)
- return A0_BASE + regnum;
-
- for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
- if (regnum == REGMAP[i].target_number)
- return i;
-
- /* Invalid register number. */
- internal_error (__FILE__, __LINE__,
- _("invalid dwarf/stabs register number %d"), regnum);
- return 0;
-}
-
-
-/* Handle the special case of masked registers. */
-
-/* Write the bits of a masked register to the various registers that
- are combined into this register. Only the masked areas of these
- registers are modified; the other fields are untouched.
- (Note: The size of masked registers is always less or equal 32 bits.) */
-
-static void
-xtensa_register_write_masked (xtensa_register_t *reg, unsigned char *buffer)
-{
- unsigned int value[(MAX_REGISTER_SIZE + 3) / 4];
-
- const xtensa_mask_t *mask = reg->mask;
-
- int shift = 0; /* Shift for next mask (mod 32). */
- int start, size; /* Start bit and size of current mask. */
-
- unsigned int *ptr = value;
- unsigned int regval, m, mem = 0;
-
- int bytesize = reg->byte_size;
- int bitsize = bytesize * 8;
- int i, r;
-
- DEBUGTRACE ("xtensa_register_write_masked ()\n");
-
- /* Copy the masked register to host byte-order. */
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- for (i = 0; i < bytesize; i++)
- {
- mem >>= 8;
- mem |= (buffer[bytesize - i - 1] << 24);
- if ((i & 3) == 3)
- *ptr++ = mem;
- }
- else
- for (i = 0; i < bytesize; i++)
- {
- mem >>= 8;
- mem |= (buffer[i] << 24);
- if ((i & 3) == 3)
- *ptr++ = mem;
- }
-
- /* We might have to shift the final value:
- bytesize & 3 == 0 -> nothing to do, we use the full 32 bits,
- bytesize & 3 == x -> shift (4-x) * 8. */
-
- *ptr = mem >> (((0 - bytesize) & 3) * 8);
- ptr = value;
- mem = *ptr;
-
- /* Write the bits to the masked areas of the other registers. */
- for (i = 0; i < mask->count; i++)
- {
- start = mask->mask[i].bit_start;
- size = mask->mask[i].bit_size;
- regval = mem >> shift;
-
- if ((shift += size) > bitsize)
- error (_("size of all masks is larger than the register"));
-
- if (shift >= 32)
- {
- mem = *(++ptr);
- shift -= 32;
- bitsize -= 32;
-
- if (shift > 0)
- regval |= mem << (size - shift);
- }
-
- /* Make sure we have a valid register. */
- r = mask->mask[i].reg_num;
- if (r >= 0 && size > 0)
- {
- /* Don't overwrite the unmasked areas. */
- m = 0xffffffff >> (32 - size) << start;
- regval <<= start;
- regval = (regval & m) | (read_register (r) & ~m);
- write_register (r, regval);
- }
- }
-}
-
-
-/* Read the masked areas of the registers and assemble it into a single
- register. */
-
-static void
-xtensa_register_read_masked (xtensa_register_t *reg, unsigned char *buffer)
-{
- unsigned int value[(MAX_REGISTER_SIZE + 3) / 4];
-
- const xtensa_mask_t *mask = reg->mask;
-
- int shift = 0;
- int start, size;
-
- unsigned int *ptr = value;
- unsigned int regval, mem = 0;
-
- int bytesize = reg->byte_size;
- int bitsize = bytesize * 8;
- int i;
-
- DEBUGTRACE ("xtensa_register_read_masked (reg \"%s\", ...)\n",
- reg->name == 0 ? "" : reg->name);
-
- /* Assemble the register from the masked areas of other registers. */
- for (i = 0; i < mask->count; i++)
- {
- int r = mask->mask[i].reg_num;
- regval = (r >= 0) ? read_register (r) : 0;
- start = mask->mask[i].bit_start;
- size = mask->mask[i].bit_size;
-
- regval >>= start;
-
- if (size < 32)
- regval &= (0xffffffff >> (32 - size));
-
- mem |= regval << shift;
-
- if ((shift += size) > bitsize)
- error (_("size of all masks is larger than the register"));
-
- if (shift >= 32)
- {
- *ptr++ = mem;
- bitsize -= 32;
- shift -= 32;
-
- if (shift == 0)
- mem = 0;
- else
- mem = regval >> (size - shift);
- }
- }
-
- if (shift > 0)
- *ptr = mem;
-
- /* Copy value to target byte order. */
- ptr = value;
- mem = *ptr;
-
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- for (i = 0; i < bytesize; i++)
- {
- if ((i & 3) == 0)
- mem = *ptr++;
- buffer[bytesize - i - 1] = mem & 0xff;
- mem >>= 8;
- }
- else
- for (i = 0; i < bytesize; i++)
- {
- if ((i & 3) == 0)
- mem = *ptr++;
- buffer[i] = mem & 0xff;
- mem >>= 8;
- }
-}
-
-
-/* Read pseudo registers. */
-
-static void
-xtensa_pseudo_register_read (struct gdbarch *gdbarch,
- struct regcache *regcache,
- int regnum,
- gdb_byte *buffer)
-{
- DEBUGTRACE ("xtensa_pseudo_register_read (... regnum = %d (%s) ...)\n",
- regnum, xtensa_register_name (regnum));
-
- /* Check if it is FP (renumber it in this case -> A0...A15). */
- if (regnum == FP_ALIAS)
- error (_("trying to read FP"));
-
- /* Read aliases a0..a15. */
- if (regnum >= A0_REGNUM && regnum <= A15_REGNUM)
- {
- char *buf = (char *) alloca (MAX_REGISTER_SIZE);
-
- regcache_raw_read (regcache, WB_REGNUM, buf);
- regnum = AREG_NUMBER (regnum, extract_unsigned_integer (buf, 4));
- }
-
- /* We can always read 'regular' registers. */
- if (regnum >= 0 && regnum < NUM_REGS)
- regcache_raw_read (regcache, regnum, buffer);
-
- /* Pseudo registers. */
- else if (regnum >= 0 && regnum < NUM_REGS + NUM_PSEUDO_REGS)
- {
- xtensa_register_t *reg = &REGMAP[regnum];
- xtensa_register_type_t type = reg->type;
- int flags = XTENSA_TARGET_FLAGS;
-
- /* Can we read Unknown or Unmapped registers? */
- if (type == xtRegisterTypeUnmapped || type == xtRegisterTypeUnknown)
- {
- if ((flags & xtTargetFlagsNonVisibleRegs) == 0)
- {
- warning (_("cannot read register %s"),
- xtensa_register_name (regnum));
- return;
- }
- }
-
- /* Some targets cannot read TIE register files. */
- else if (type == xtRegisterTypeTieRegfile)
- {
- /* Use 'fetch' to get register? */
- if (flags & xtTargetFlagsUseFetchStore)
- {
- warning (_("cannot read register"));
- return;
- }
-
- /* On some targets (esp. simulators), we can always read the reg. */
- else if ((flags & xtTargetFlagsNonVisibleRegs) == 0)
- {
- warning (_("cannot read register"));
- return;
- }
- }
-
- /* We can always read mapped registers. */
- else if (type == xtRegisterTypeMapped || type == xtRegisterTypeTieState)
- {
- xtensa_register_read_masked (reg, (unsigned char *) buffer);
- return;
- }
-
- /* Assume that we can read the register. */
- regcache_raw_read (regcache, regnum, buffer);
- }
-
- else
- internal_error (__FILE__, __LINE__,
- _("invalid register number %d"), regnum);
-}
-
-
-/* Write pseudo registers. */
-
-static void
-xtensa_pseudo_register_write (struct gdbarch *gdbarch,
- struct regcache *regcache,
- int regnum,
- const gdb_byte *buffer)
-{
- DEBUGTRACE ("xtensa_pseudo_register_write (... regnum = %d (%s) ...)\n",
- regnum, xtensa_register_name (regnum));
-
- /* Check if this is FP. */
- if (regnum == FP_ALIAS)
- error (_("trying to write FP"));
-
- /* Renumber register, if aliase a0..a15. */
- if (regnum >= A0_REGNUM && regnum <= A15_REGNUM)
- {
- char *buf = (char *) alloca (MAX_REGISTER_SIZE);
- unsigned int wb;
-
- regcache_raw_read (regcache, WB_REGNUM, buf);
- regnum = AREG_NUMBER (regnum, extract_unsigned_integer (buf, 4));
- }
-
- /* We can always write 'core' registers.
- Note: We might have converted Ax->ARy. */
- if (regnum >= 0 && regnum < NUM_REGS)
- regcache_raw_write (regcache, regnum, buffer);
-
- /* Pseudo registers. */
- else if (regnum >= 0 && regnum < NUM_REGS + NUM_PSEUDO_REGS)
- {
- xtensa_register_t *reg = &REGMAP[regnum];
- xtensa_register_type_t type = reg->type;
- int flags = XTENSA_TARGET_FLAGS;
-
- /* On most targets, we can't write registers of type "Unknown"
- or "Unmapped". */
- if (type == xtRegisterTypeUnmapped || type == xtRegisterTypeUnknown)
- {
- if ((flags & xtTargetFlagsNonVisibleRegs) == 0)
- {
- warning (_("cannot write register %s"),
- xtensa_register_name (regnum));
- return;
- }
- }
-
- /* Some targets cannot read TIE register files. */
- else if (type == xtRegisterTypeTieRegfile)
- {
- /* Use 'store' to get register? */
- if (flags & xtTargetFlagsUseFetchStore)
- {
- warning (_("cannot write register"));
- return;
- }
-
- /* On some targets (esp. simulators), we can always write
- the register. */
-
- else if ((flags & xtTargetFlagsNonVisibleRegs) == 0)
- {
- warning (_("cannot write register"));
- return;
- }
- }
-
- /* We can always write mapped registers. */
- else if (type == xtRegisterTypeMapped || type == xtRegisterTypeTieState)
- {
- xtensa_register_write_masked (reg, (unsigned char *) buffer);
- return;
- }
-
- /* Assume that we can write the register. */
- regcache_raw_write (regcache, regnum, buffer);
- }
-
- else
- internal_error (__FILE__, __LINE__,
- _("invalid register number %d"), regnum);
-}
-
-
-static struct reggroup *xtensa_ar_reggroup;
-static struct reggroup *xtensa_user_reggroup;
-static struct reggroup *xtensa_vectra_reggroup;
-
-static void
-xtensa_init_reggroups (void)
-{
- xtensa_ar_reggroup = reggroup_new ("ar", USER_REGGROUP);
- xtensa_user_reggroup = reggroup_new ("user", USER_REGGROUP);
- xtensa_vectra_reggroup = reggroup_new ("vectra", USER_REGGROUP);
-}
-
-
-static void
-xtensa_add_reggroups (struct gdbarch *gdbarch)
-{
- reggroup_add (gdbarch, all_reggroup);
- reggroup_add (gdbarch, save_reggroup);
- reggroup_add (gdbarch, restore_reggroup);
- reggroup_add (gdbarch, system_reggroup);
- reggroup_add (gdbarch, vector_reggroup); /* vectra */
- reggroup_add (gdbarch, general_reggroup); /* core */
- reggroup_add (gdbarch, float_reggroup); /* float */
-
- reggroup_add (gdbarch, xtensa_ar_reggroup); /* ar */
- reggroup_add (gdbarch, xtensa_user_reggroup); /* user */
- reggroup_add (gdbarch, xtensa_vectra_reggroup); /* vectra */
-}
-
-
-#define SAVE_REST_FLAGS (XTENSA_REGISTER_FLAGS_READABLE \
- | XTENSA_REGISTER_FLAGS_WRITABLE \
- | XTENSA_REGISTER_FLAGS_VOLATILE)
-
-#define SAVE_REST_VALID (XTENSA_REGISTER_FLAGS_READABLE \
- | XTENSA_REGISTER_FLAGS_WRITABLE)
-
-static int
-xtensa_register_reggroup_p (struct gdbarch *gdbarch,
- int regnum,
- struct reggroup *group)
-{
- xtensa_register_t* reg = &REGMAP[regnum];
- xtensa_register_type_t type = reg->type;
- xtensa_register_group_t rg = reg->group;
-
- /* First, skip registers that are not visible to this target
- (unknown and unmapped registers when not using ISS). */
-
- if (type == xtRegisterTypeUnmapped || type == xtRegisterTypeUnknown)
- return 0;
- if (group == all_reggroup)
- return 1;
- if (group == xtensa_ar_reggroup)
- return rg & xtRegisterGroupAddrReg;
- if (group == xtensa_user_reggroup)
- return rg & xtRegisterGroupUser;
- if (group == float_reggroup)
- return rg & xtRegisterGroupFloat;
- if (group == general_reggroup)
- return rg & xtRegisterGroupGeneral;
- if (group == float_reggroup)
- return rg & xtRegisterGroupFloat;
- if (group == system_reggroup)
- return rg & xtRegisterGroupState;
- if (group == vector_reggroup || group == xtensa_vectra_reggroup)
- return rg & xtRegisterGroupVectra;
- if (group == save_reggroup || group == restore_reggroup)
- return (regnum < NUM_REGS
- && (reg->flags & SAVE_REST_FLAGS) == SAVE_REST_VALID);
- else
- return 1;
-}
-
-
-/* CORE FILE SUPPORT */
-
-/* Supply register REGNUM from the buffer specified by GREGS and LEN
- in the general-purpose register set REGSET to register cache
- REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
-
-static void
-xtensa_supply_gregset (const struct regset *regset,
- struct regcache *rc,
- int regnum,
- const void *gregs,
- size_t len)
-{
- const xtensa_elf_gregset_t *regs = gregs;
- int i;
-
- DEBUGTRACE ("xtensa_supply_gregset (..., regnum==%d, ...) \n", regnum);
-
- if (regnum == PC_REGNUM || regnum == -1)
- regcache_raw_supply (rc, PC_REGNUM, (char *) &regs->pc);
- if (regnum == PS_REGNUM || regnum == -1)
- regcache_raw_supply (rc, PS_REGNUM, (char *) &regs->ps);
- if (regnum == WB_REGNUM || regnum == -1)
- regcache_raw_supply (rc, WB_REGNUM, (char *) &regs->windowbase);
- if (regnum == WS_REGNUM || regnum == -1)
- regcache_raw_supply (rc, WS_REGNUM, (char *) &regs->windowstart);
- if (regnum == LBEG_REGNUM || regnum == -1)
- regcache_raw_supply (rc, LBEG_REGNUM, (char *) &regs->lbeg);
- if (regnum == LEND_REGNUM || regnum == -1)
- regcache_raw_supply (rc, LEND_REGNUM, (char *) &regs->lend);
- if (regnum == LCOUNT_REGNUM || regnum == -1)
- regcache_raw_supply (rc, LCOUNT_REGNUM, (char *) &regs->lcount);
- if (regnum == SAR_REGNUM || regnum == -1)
- regcache_raw_supply (rc, SAR_REGNUM, (char *) &regs->sar);
- if (regnum == EXCCAUSE_REGNUM || regnum == -1)
- regcache_raw_supply (rc, EXCCAUSE_REGNUM, (char *) &regs->exccause);
- if (regnum == EXCVADDR_REGNUM || regnum == -1)
- regcache_raw_supply (rc, EXCVADDR_REGNUM, (char *) &regs->excvaddr);
- if (regnum >= AR_BASE && regnum < AR_BASE + NUM_AREGS)
- regcache_raw_supply (rc, regnum, (char *) &regs->ar[regnum - AR_BASE]);
- else if (regnum == -1)
- {
- for (i = 0; i < NUM_AREGS; ++i)
- regcache_raw_supply (rc, AR_BASE + i, (char *) &regs->ar[i]);
- }
-}
-
-
-/* Xtensa register set. */
-
-static struct regset
-xtensa_gregset =
-{
- NULL,
- xtensa_supply_gregset
-};
-
-
-/* Return the appropriate register set for the core section identified
- by SECT_NAME and SECT_SIZE. */
-
-static const struct regset *
-xtensa_regset_from_core_section (struct gdbarch *core_arch,
- const char *sect_name,
- size_t sect_size)
-{
- DEBUGTRACE ("xtensa_regset_from_core_section "
- "(..., sect_name==\"%s\", sect_size==%x) \n",
- sect_name, sect_size);
-
- if (strcmp (sect_name, ".reg") == 0
- && sect_size >= sizeof(xtensa_elf_gregset_t))
- return &xtensa_gregset;
-
- return NULL;
-}
-
-
-/* F R A M E */
-
-/* We currently don't support the call0-abi, so we have at max. 12 registers
- saved on the stack. */
-
-#define XTENSA_NUM_SAVED_AREGS 12
-
-typedef struct xtensa_frame_cache
-{
- CORE_ADDR base;
- CORE_ADDR pc;
- CORE_ADDR ra; /* The raw return address; use to compute call_inc. */
- CORE_ADDR ps;
- int wb; /* Base for this frame; -1 if not in regfile. */
- int callsize; /* Call size to next frame. */
- int ws;
- CORE_ADDR aregs[XTENSA_NUM_SAVED_AREGS];
- CORE_ADDR prev_sp;
-} xtensa_frame_cache_t;
-
-
-static struct xtensa_frame_cache *
-xtensa_alloc_frame_cache (void)
-{
- xtensa_frame_cache_t *cache;
- int i;
-
- DEBUGTRACE ("xtensa_alloc_frame_cache ()\n");
-
- cache = FRAME_OBSTACK_ZALLOC (xtensa_frame_cache_t);
-
- cache->base = 0;
- cache->pc = 0;
- cache->ra = 0;
- cache->wb = 0;
- cache->ps = 0;
- cache->callsize = -1;
- cache->prev_sp = 0;
-
- for (i = 0; i < XTENSA_NUM_SAVED_AREGS; i++)
- cache->aregs[i] = -1;
-
- return cache;
-}
-
-
-static CORE_ADDR
-xtensa_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
-{
- return address & ~15;
-}
-
-
-static CORE_ADDR
-xtensa_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- char buf[8];
-
- DEBUGTRACE ("xtensa_unwind_pc (next_frame = %p)\n", next_frame);
-
- frame_unwind_register (next_frame, PC_REGNUM, buf);
-
- DEBUGINFO ("[xtensa_unwind_pc] pc = 0x%08x\n", (unsigned int)
- extract_typed_address (buf, builtin_type_void_func_ptr));
-
- return extract_typed_address (buf, builtin_type_void_func_ptr);
-}
-
-
-static struct frame_id
-xtensa_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- CORE_ADDR pc, fp;
- char buf[4];
-
- /* next_frame->prev is a dummy frame. Return a frame ID of that frame. */
-
- DEBUGTRACE ("xtensa_unwind_dummy_id ()\n");
-
- pc = frame_pc_unwind (next_frame);
- frame_unwind_register (next_frame, A1_REGNUM, buf);
- fp = extract_unsigned_integer (buf, 4);
-
- /* Make dummy frame ID unique by adding a constant. */
- return frame_id_build (fp+SP_ALIGNMENT, pc);
-}
-
-
-static struct xtensa_frame_cache *
-xtensa_frame_cache (struct frame_info *next_frame, void **this_cache)
-{
- xtensa_frame_cache_t *cache;
- char buf[4];
- CORE_ADDR ra, wb, ws, pc, sp, ps;
- char op1;
-
- DEBUGTRACE ("xtensa_frame_cache (next_frame %p, *this_cache %p)\n",
- next_frame, this_cache ? *this_cache : (void*)0xdeadbeef);
-
- /* Already cached? */
- if (*this_cache)
- return *this_cache;
-
- /* Get pristine xtensa-frame. */
- cache = xtensa_alloc_frame_cache ();
- *this_cache = cache;
-
- /* Get windowbase, windowstart, ps, and pc. */
- wb = frame_unwind_register_unsigned (next_frame, WB_REGNUM);
- ws = frame_unwind_register_unsigned (next_frame, WS_REGNUM);
- ps = frame_unwind_register_unsigned (next_frame, PS_REGNUM);
- pc = frame_unwind_register_unsigned (next_frame, PC_REGNUM);
-
- op1 = read_memory_integer (pc, 1);
- if (XTENSA_IS_ENTRY (op1) || !windowing_enabled (read_register (PS_REGNUM)))
- {
- int callinc = CALLINC (frame_unwind_register_unsigned (next_frame,
- PS_REGNUM));
- ra = frame_unwind_register_unsigned (next_frame,
- A0_REGNUM + callinc * 4);
-
- DEBUGINFO("[xtensa_frame_cache] 'entry' at 0x%08x\n (callinc = %d)",
- (int)pc, callinc);
-
- /* ENTRY hasn't been executed yet, therefore callsize is still 0. */
- cache->callsize = 0;
- cache->wb = wb;
- cache->ws = ws;
- cache->prev_sp = read_register (A1_REGNUM);
- }
- else
- {
- ra = frame_unwind_register_unsigned (next_frame, A0_REGNUM);
- cache->callsize = WINSIZE (ra);
- cache->wb = (wb - (cache->callsize / 4)) & ((NUM_AREGS / 4) - 1);
- cache->ws = ws & ~(1 << wb);
- }
-
- cache->pc = ((frame_func_unwind (next_frame) & 0xc0000000)
- | (ra & 0x3fffffff));
- cache->ps = (ps & ~PS_CALLINC_MASK) | ((WINSIZE(ra)/4) << PS_CALLINC_SHIFT);
-
-
- /* Note: We could also calculate the location on stack when we actually
- access the register. However, this approach, saving the location
- in the cache frame, is probably easier to support the call0 ABI. */
-
- if (cache->ws == 0)
- {
- int i;
-
- /* Set A0...A3. */
- sp = frame_unwind_register_unsigned (next_frame, A1_REGNUM) - 16;
-
- for (i = 0; i < 4; i++, sp += 4)
- {
- cache->aregs[i] = sp;
- }
-
- if (cache->callsize > 4)
- {
- /* Set A4...A7/A11. */
-
- sp = (CORE_ADDR) read_memory_integer (sp - 12, 4);
- sp = (CORE_ADDR) read_memory_integer (sp - 12, 4);
- sp -= cache->callsize * 4;
-
- for ( /* i=4 */ ; i < cache->callsize; i++, sp += 4)
- {
- cache->aregs[i] = sp;
- }
- }
- }
-
- if (cache->prev_sp == 0)
- {
- if (cache->ws == 0)
- {
- /* Register window overflow already happened.
- We can read caller's frame SP from the proper spill loction. */
- cache->prev_sp =
- read_memory_integer (cache->aregs[1],
- register_size (current_gdbarch,
- A1_REGNUM));
- }
- else
- {
- /* Read caller's frame SP directly from the previous window. */
-
- int regnum = AREG_NUMBER (A1_REGNUM, cache->wb);
-
- cache->prev_sp = read_register (regnum);
- }
- }
-
- cache->base = frame_unwind_register_unsigned (next_frame,A1_REGNUM);
-
- DEBUGINFO ("[xtensa_frame_cache] base 0x%08x, wb %d, "
- "ws 0x%08x, callsize %d, pc 0x%08x, ps 0x%08x, prev_sp 0x%08x\n",
- (unsigned int) cache->base, (unsigned int) cache->wb,
- cache->ws, cache->callsize, (unsigned int) cache->pc,
- (unsigned int) cache->ps, (unsigned int) cache->prev_sp);
-
- return cache;
-}
-
-
-static void
-xtensa_frame_this_id (struct frame_info *next_frame,
- void **this_cache,
- struct frame_id *this_id)
-{
- struct xtensa_frame_cache *cache =
- xtensa_frame_cache (next_frame, this_cache);
-
- DEBUGTRACE ("xtensa_frame_this_id (next 0x%08x, *this 0x%08x)\n",
- (unsigned int) next_frame, (unsigned int) *this_cache);
-
- if (cache->prev_sp == 0)
- return;
-
- (*this_id) = frame_id_build (cache->prev_sp, cache->pc);
-}
-
-
-static void
-xtensa_frame_prev_register (struct frame_info *next_frame,
- void **this_cache,
- int regnum,
- int *optimizedp,
- enum lval_type *lvalp,
- CORE_ADDR *addrp,
- int *realnump,
- gdb_byte *valuep)
-{
- struct xtensa_frame_cache *cache =
- xtensa_frame_cache (next_frame, this_cache);
- CORE_ADDR saved_reg = 0;
- int done = 1;
-
- DEBUGTRACE ("xtensa_frame_prev_register (next 0x%08x, "
- "*this 0x%08x, regnum %d (%s), ...)\n",
- (unsigned int) next_frame,
- *this_cache? (unsigned int) *this_cache : 0, regnum,
- xtensa_register_name (regnum));
-
- if (regnum == WS_REGNUM)
- {
- if (cache->ws != 0)
- saved_reg = cache->ws;
- else
- saved_reg = 1 << cache->wb;
- }
- else if (regnum == WB_REGNUM)
- saved_reg = cache->wb;
- else if (regnum == PC_REGNUM)
- saved_reg = cache->pc;
- else if (regnum == PS_REGNUM)
- saved_reg = cache->ps;
- else
- done = 0;
-
- if (done)
- {
- *optimizedp = 0;
- *lvalp = not_lval;
- *addrp = 0;
- *realnump = -1;
- if (valuep)
- store_unsigned_integer (valuep, 4, saved_reg);
-
- return;
- }
-
- /* Convert Ax register numbers to ARx register numbers. */
- if (regnum >= A0_REGNUM && regnum <= A15_REGNUM)
- regnum = AREG_NUMBER (regnum, cache->wb);
-
- /* Check if ARx register has been saved to stack. */
- if (regnum >= AR_BASE && regnum <= (AR_BASE + NUM_AREGS))
- {
- int areg = regnum - AR_BASE - (cache->wb * 4);
-
- if (areg >= 0
- && areg < XTENSA_NUM_SAVED_AREGS
- && cache->aregs[areg] != -1)
- {
- *optimizedp = 0;
- *lvalp = lval_memory;
- *addrp = cache->aregs[areg];
- *realnump = -1;
-
- if (valuep)
- read_memory (*addrp, valuep,
- register_size (current_gdbarch, regnum));
-
- DEBUGINFO ("[xtensa_frame_prev_register] register on stack\n");
- return;
- }
- }
-
- /* Note: All other registers have been either saved to the dummy stack
- or are still alive in the processor. */
-
- *optimizedp = 0;
- *lvalp = lval_register;
- *addrp = 0;
- *realnump = regnum;
- if (valuep)
- frame_unwind_register (next_frame, (*realnump), valuep);
-}
-
-
-static const struct frame_unwind
-xtensa_frame_unwind =
-{
- NORMAL_FRAME,
- xtensa_frame_this_id,
- xtensa_frame_prev_register
-};
-
-static const struct frame_unwind *
-xtensa_frame_sniffer (struct frame_info *next_frame)
-{
- return &xtensa_frame_unwind;
-}
-
-static CORE_ADDR
-xtensa_frame_base_address (struct frame_info *next_frame, void **this_cache)
-{
- struct xtensa_frame_cache *cache =
- xtensa_frame_cache (next_frame, this_cache);
-
- return cache->base;
-}
-
-static const struct frame_base
-xtensa_frame_base =
-{
- &xtensa_frame_unwind,
- xtensa_frame_base_address,
- xtensa_frame_base_address,
- xtensa_frame_base_address
-};
-
-
-static void
-xtensa_extract_return_value (struct type *type,
- struct regcache *regcache,
- void *dst)
-{
- bfd_byte *valbuf = dst;
- int len = TYPE_LENGTH (type);
- ULONGEST pc, wb;
- int callsize, areg;
- int offset = 0;
-
- DEBUGTRACE ("xtensa_extract_return_value (...)\n");
-
- gdb_assert(len > 0);
-
- /* First, we have to find the caller window in the register file. */
- regcache_raw_read_unsigned (regcache, PC_REGNUM, &pc);
- callsize = extract_call_winsize (pc);
-
- /* On Xtensa, we can return up to 4 words (or 2 when called by call12). */
- if (len > (callsize > 8 ? 8 : 16))
- internal_error (__FILE__, __LINE__,
- _("cannot extract return value of %d bytes long"), len);
-
- /* Get the register offset of the return register (A2) in the caller
- window. */
- regcache_raw_read_unsigned (regcache, WB_REGNUM, &wb);
- areg = AREG_NUMBER(A2_REGNUM + callsize, wb);
-
- DEBUGINFO ("[xtensa_extract_return_value] areg %d len %d\n", areg, len);
-
- if (len < 4 && TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- offset = 4 - len;
-
- for (; len > 0; len -= 4, areg++, valbuf += 4)
- {
- if (len < 4)
- regcache_raw_read_part (regcache, areg, offset, len, valbuf);
- else
- regcache_raw_read (regcache, areg, valbuf);
- }
-}
-
-
-static void
-xtensa_store_return_value (struct type *type,
- struct regcache *regcache,
- const void *dst)
-{
- const bfd_byte *valbuf = dst;
- unsigned int areg;
- ULONGEST pc, wb;
- int callsize;
- int len = TYPE_LENGTH (type);
- int offset = 0;
-
- DEBUGTRACE ("xtensa_store_return_value (...)\n");
-
- regcache_raw_read_unsigned (regcache, WB_REGNUM, &wb);
- regcache_raw_read_unsigned (regcache, PC_REGNUM, &pc);
- callsize = extract_call_winsize (pc);
-
- if (len > (callsize > 8 ? 8 : 16))
- internal_error (__FILE__, __LINE__,
- _("unimplemented for this length: %d"),
- TYPE_LENGTH (type));
-
- DEBUGTRACE ("[xtensa_store_return_value] callsize %d wb %d\n",
- callsize, (int) wb);
-
- if (len < 4 && TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- offset = 4 - len;
-
- areg = AREG_NUMBER (A2_REGNUM + callsize, wb);
-
- for (; len > 0; len -= 4, areg++, valbuf += 4)
- {
- if (len < 4)
- regcache_raw_write_part (regcache, areg, offset, len, valbuf);
- else
- regcache_raw_write (regcache, areg, valbuf);
- }
-}
-
-
-enum return_value_convention
-xtensa_return_value (struct gdbarch *gdbarch,
- struct type *valtype,
- struct regcache *regcache,
- gdb_byte *readbuf,
- const gdb_byte *writebuf)
-{
- /* Note: Structures up to 16 bytes are returned in registers. */
-
- int struct_return = ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
- || TYPE_CODE (valtype) == TYPE_CODE_UNION
- || TYPE_CODE (valtype) == TYPE_CODE_ARRAY)
- && TYPE_LENGTH (valtype) > 16);
-
- if (struct_return)
- return RETURN_VALUE_STRUCT_CONVENTION;
-
- DEBUGTRACE ("xtensa_return_value(...)\n");
-
- if (writebuf != NULL)
- {
- xtensa_store_return_value (valtype, regcache, writebuf);
- }
-
- if (readbuf != NULL)
- {
- gdb_assert (!struct_return);
- xtensa_extract_return_value (valtype, regcache, readbuf);
- }
- return RETURN_VALUE_REGISTER_CONVENTION;
-}
-
-
-/* DUMMY FRAME */
-
-static CORE_ADDR
-xtensa_push_dummy_call (struct gdbarch *gdbarch,
- struct value *function,
- struct regcache *regcache,
- CORE_ADDR bp_addr,
- int nargs,
- struct value **args,
- CORE_ADDR sp,
- int struct_return,
- CORE_ADDR struct_addr)
-{
- int i;
- int size, onstack_size;
- char *buf = (char *) alloca (16);
- CORE_ADDR ra, ps;
- struct argument_info
- {
- const bfd_byte *contents;
- int length;
- int onstack; /* onstack == 0 => in reg */
- int align; /* alignment */
- union
- {
- int offset; /* stack offset if on stack */
- int regno; /* regno if in register */
- } u;
- };
-
- struct argument_info *arg_info =
- (struct argument_info *) alloca (nargs * sizeof (struct argument_info));
-
- CORE_ADDR osp = sp;
-
- DEBUGTRACE ("xtensa_push_dummy_call (...)\n");
-
- if (xtensa_debug_level > 3)
- {
- int i;
- DEBUGINFO ("[xtensa_push_dummy_call] nargs = %d\n", nargs);
- DEBUGINFO ("[xtensa_push_dummy_call] sp=0x%x, struct_return=%d, "
- "struct_addr=0x%x\n",
- (int) sp, (int) struct_return, (int) struct_addr);
-
- for (i = 0; i < nargs; i++)
- {
- struct value *arg = args[i];
- struct type *arg_type = check_typedef (value_type (arg));
- fprintf_unfiltered (gdb_stdlog, "%2d: 0x%08x %3d ",
- i, (int) arg, TYPE_LENGTH (arg_type));
- switch (TYPE_CODE (arg_type))
- {
- case TYPE_CODE_INT:
- fprintf_unfiltered (gdb_stdlog, "int");
- break;
- case TYPE_CODE_STRUCT:
- fprintf_unfiltered (gdb_stdlog, "struct");
- break;
- default:
- fprintf_unfiltered (gdb_stdlog, "%3d", TYPE_CODE (arg_type));
- break;
- }
- fprintf_unfiltered (gdb_stdlog, " 0x%08x\n",
- (unsigned int) value_contents (arg));
- }
- }
-
- /* First loop: collect information.
- Cast into type_long. (This shouldn't happen often for C because
- GDB already does this earlier.) It's possible that GDB could
- do it all the time but it's harmless to leave this code here. */
-
- size = 0;
- onstack_size = 0;
- i = 0;
-
- if (struct_return)
- size = REGISTER_SIZE;
-
- for (i = 0; i < nargs; i++)
- {
- struct argument_info *info = &arg_info[i];
- struct value *arg = args[i];
- struct type *arg_type = check_typedef (value_type (arg));
-
- switch (TYPE_CODE (arg_type))
- {
- case TYPE_CODE_INT:
- case TYPE_CODE_BOOL:
- case TYPE_CODE_CHAR:
- case TYPE_CODE_RANGE:
- case TYPE_CODE_ENUM:
-
- /* Cast argument to long if necessary as the mask does it too. */
- if (TYPE_LENGTH (arg_type) < TYPE_LENGTH (builtin_type_long))
- {
- arg_type = builtin_type_long;
- arg = value_cast (arg_type, arg);
- }
- info->align = TYPE_LENGTH (builtin_type_long);
- break;
-
- case TYPE_CODE_FLT:
-
- /* Align doubles correctly. */
- if (TYPE_LENGTH (arg_type) == TYPE_LENGTH (builtin_type_double))
- info->align = TYPE_LENGTH (builtin_type_double);
- else
- info->align = TYPE_LENGTH (builtin_type_long);
- break;
-
- case TYPE_CODE_STRUCT:
- default:
- info->align = TYPE_LENGTH (builtin_type_long);
- break;
- }
- info->length = TYPE_LENGTH (arg_type);
- info->contents = value_contents (arg);
-
- /* Align size and onstack_size. */
- size = (size + info->align - 1) & ~(info->align - 1);
- onstack_size = (onstack_size + info->align - 1) & ~(info->align - 1);
-
- if (size + info->length > REGISTER_SIZE * ARGS_NUM_REGS)
- {
- info->onstack = 1;
- info->u.offset = onstack_size;
- onstack_size += info->length;
- }
- else
- {
- info->onstack = 0;
- info->u.regno = ARGS_FIRST_REG + size / REGISTER_SIZE;
- }
- size += info->length;
- }
-
- /* Adjust the stack pointer and align it. */
- sp = align_down (sp - onstack_size, SP_ALIGNMENT);
-
- /* Simulate MOVSP. */
- if (sp != osp)
- {
- read_memory (osp - 16, buf, 16);
- write_memory (sp - 16, buf, 16);
- }
-
- /* Second Loop: Load arguments. */
-
- if (struct_return)
- {
- store_unsigned_integer (buf, REGISTER_SIZE, struct_addr);
- regcache_cooked_write (regcache, ARGS_FIRST_REG, buf);
- }
-
- for (i = 0; i < nargs; i++)
- {
- struct argument_info *info = &arg_info[i];
-
- if (info->onstack)
- {
- int n = info->length;
- CORE_ADDR offset = sp + info->u.offset;
-
- /* Odd-sized structs are aligned to the lower side of a memory
- word in big-endian mode and require a shift. This only
- applies for structures smaller than one word. */
-
- if (n < REGISTER_SIZE && TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- offset += (REGISTER_SIZE - n);
-
- write_memory (offset, info->contents, info->length);
-
- }
- else
- {
- int n = info->length;
- const bfd_byte *cp = info->contents;
- int r = info->u.regno;
-
- /* Odd-sized structs are aligned to the lower side of registers in
- big-endian mode and require a shift. The odd-sized leftover will
- be at the end. Note that this is only true for structures smaller
- than REGISTER_SIZE; for larger odd-sized structures the excess
- will be left-aligned in the register on both endiannesses. */
-
- if (n < REGISTER_SIZE && TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- {
- ULONGEST v = extract_unsigned_integer (cp, REGISTER_SIZE);
- v = v >> ((REGISTER_SIZE - n) * TARGET_CHAR_BIT);
-
- store_unsigned_integer (buf, REGISTER_SIZE, v);
- regcache_cooked_write (regcache, r, buf);
-
- cp += REGISTER_SIZE;
- n -= REGISTER_SIZE;
- r++;
- }
- else
- while (n > 0)
- {
- /* ULONGEST v = extract_unsigned_integer (cp, REGISTER_SIZE);*/
- regcache_cooked_write (regcache, r, cp);
-
- /* write_register (r, v); */
- cp += REGISTER_SIZE;
- n -= REGISTER_SIZE;
- r++;
- }
- }
- }
-
-
- /* Set the return address of dummy frame to the dummy address.
- Note: The return address for the current function (in A0) is
- saved in the dummy frame, so we can savely overwrite A0 here. */
-
- ra = (bp_addr & 0x3fffffff) | 0x40000000;
- regcache_raw_read (regcache, PS_REGNUM, buf);
- ps = extract_unsigned_integer (buf, 4) & ~0x00030000;
- regcache_cooked_write_unsigned (regcache, A4_REGNUM, ra);
- regcache_cooked_write_unsigned (regcache, PS_REGNUM, ps | 0x00010000);
-
- /* Set new stack pointer and return it. */
- regcache_cooked_write_unsigned (regcache, A1_REGNUM, sp);
- /* Make dummy frame ID unique by adding a constant. */
- return sp + SP_ALIGNMENT;
-}
-
-
-/* Return a breakpoint for the current location of PC. We always use
- the density version if we have density instructions (regardless of the
- current instruction at PC), and use regular instructions otherwise. */
-
-#define BIG_BREAKPOINT { 0x00, 0x04, 0x00 }
-#define LITTLE_BREAKPOINT { 0x00, 0x40, 0x00 }
-#define DENSITY_BIG_BREAKPOINT { 0xd2, 0x0f }
-#define DENSITY_LITTLE_BREAKPOINT { 0x2d, 0xf0 }
-
-const unsigned char *
-xtensa_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
-{
- static char big_breakpoint[] = BIG_BREAKPOINT;
- static char little_breakpoint[] = LITTLE_BREAKPOINT;
- static char density_big_breakpoint[] = DENSITY_BIG_BREAKPOINT;
- static char density_little_breakpoint[] = DENSITY_LITTLE_BREAKPOINT;
-
- DEBUGTRACE ("xtensa_breakpoint_from_pc (pc = 0x%08x)\n", (int) *pcptr);
-
- if (ISA_USE_DENSITY_INSTRUCTIONS)
- {
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- {
- *lenptr = sizeof (density_big_breakpoint);
- return density_big_breakpoint;
- }
- else
- {
- *lenptr = sizeof (density_little_breakpoint);
- return density_little_breakpoint;
- }
- }
- else
- {
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- {
- *lenptr = sizeof (big_breakpoint);
- return big_breakpoint;
- }
- else
- {
- *lenptr = sizeof (little_breakpoint);
- return little_breakpoint;
- }
- }
-}
-
-
-/* Return the pc of the first real instruction. We assume that this
- machine uses register windows.
-
- If we have debug info ( line-number info, in particular ) we simply skip
- the code associated with the first function line effectively skipping
- the prologue code. It works even in cases like
-
- int main()
- { int local_var = 1;
- ....
- }
-
- because, for this source code, both Xtensa compilers will generate two
- separate entries ( with the same line number ) in dwarf line-number
- section to make sure there is a boundary between the prologue code and
- the rest of the function.
-
- If there is no debug info, we need to analyze the code. */
-
-CORE_ADDR
-xtensa_skip_prologue (CORE_ADDR start_pc)
-{
- DEBUGTRACE ("xtensa_skip_prologue (start_pc = 0x%08x)\n", (int) start_pc);
-
- if (ISA_USE_WINDOWED_REGISTERS)
- {
- unsigned char op1;
- struct symtab_and_line prologue_sal;
-
- op1 = read_memory_integer (start_pc, 1);
- if (!XTENSA_IS_ENTRY (op1))
- return start_pc;
-
- prologue_sal = find_pc_line (start_pc, 0);
- if (prologue_sal.line != 0)
- return prologue_sal.end;
- else
- return start_pc + XTENSA_ENTRY_LENGTH;
- }
- else
- {
- internal_error (__FILE__, __LINE__,
- _("non-windowed configurations are not supported"));
- return start_pc;
- }
-}
-
-
-/* CONFIGURATION CHECK */
-
-/* Verify the current configuration. */
-
-static void
-xtensa_verify_config (struct gdbarch *gdbarch)
-{
- struct ui_file *log;
- struct cleanup *cleanups;
- struct gdbarch_tdep *tdep;
- long dummy;
- char *buf;
-
- tdep = gdbarch_tdep (gdbarch);
- log = mem_fileopen ();
- cleanups = make_cleanup_ui_file_delete (log);
-
- /* Verify that we got a reasonable number of AREGS. */
- if ((tdep->num_aregs & -tdep->num_aregs) != tdep->num_aregs)
- fprintf_unfiltered (log, "\n\tnum_aregs: Number of AR registers (%d) "
- "is not a power of two!", tdep->num_aregs);
-
- /* Verify that certain registers exist. */
- if (tdep->pc_regnum == -1)
- fprintf_unfiltered (log, "\n\tpc_regnum: No PC register");
- if (tdep->ps_regnum == -1)
- fprintf_unfiltered (log, "\n\tps_regnum: No PS register");
- if (tdep->wb_regnum == -1)
- fprintf_unfiltered (log, "\n\twb_regnum: No WB register");
- if (tdep->ws_regnum == -1)
- fprintf_unfiltered (log, "\n\tws_regnum: No WS register");
- if (tdep->ar_base == -1)
- fprintf_unfiltered (log, "\n\tar_base: No AR registers");
- if (tdep->a0_base == -1)
- fprintf_unfiltered (log, "\n\ta0_base: No Ax registers");
-
- buf = ui_file_xstrdup (log, &dummy);
- make_cleanup (xfree, buf);
- if (strlen (buf) > 0)
- internal_error (__FILE__, __LINE__,
- _("the following are invalid: %s"), buf);
- do_cleanups (cleanups);
-}
-
-
-/* Module "constructor" function. */
-
-static struct gdbarch *
-xtensa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
-{
- struct gdbarch_tdep *tdep;
- struct gdbarch *gdbarch;
- struct xtensa_abi_handler *abi_handler;
-
- DEBUGTRACE ("gdbarch_init()\n");
-
- /* We have to set the byte order before we call gdbarch_alloc. */
- info.byte_order = xtensa_config_byte_order (&info);
-
- tdep = xtensa_config_tdep (&info);
- gdbarch = gdbarch_alloc (&info, tdep);
-
- /* Verify our configuration. */
- xtensa_verify_config (gdbarch);
-
- /* Pseudo-Register read/write */
- set_gdbarch_pseudo_register_read (gdbarch, xtensa_pseudo_register_read);
- set_gdbarch_pseudo_register_write (gdbarch, xtensa_pseudo_register_write);
-
- /* Set target information. */
- set_gdbarch_num_regs (gdbarch, tdep->num_regs);
- set_gdbarch_num_pseudo_regs (gdbarch, tdep->num_pseudo_regs);
- set_gdbarch_sp_regnum (gdbarch, tdep->a0_base + 1);
- set_gdbarch_pc_regnum (gdbarch, tdep->pc_regnum);
- set_gdbarch_ps_regnum (gdbarch, tdep->ps_regnum);
-
- /* Renumber registers for known formats (stab, dwarf, and dwarf2). */
- set_gdbarch_stab_reg_to_regnum (gdbarch, xtensa_reg_to_regnum);
- set_gdbarch_dwarf_reg_to_regnum (gdbarch, xtensa_reg_to_regnum);
- set_gdbarch_dwarf2_reg_to_regnum (gdbarch, xtensa_reg_to_regnum);
-
- /* We provide our own function to get register information. */
- set_gdbarch_register_name (gdbarch, xtensa_register_name);
- set_gdbarch_register_type (gdbarch, xtensa_register_type);
-
- /* To call functions from GDB using dummy frame */
- set_gdbarch_push_dummy_call (gdbarch, xtensa_push_dummy_call);
-
- set_gdbarch_believe_pcc_promotion (gdbarch, 1);
-
- set_gdbarch_return_value (gdbarch, xtensa_return_value);
-
- /* Advance PC across any prologue instructions to reach "real" code. */
- set_gdbarch_skip_prologue (gdbarch, xtensa_skip_prologue);
-
- /* Stack grows downward. */
- set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-
- /* Set breakpoints. */
- set_gdbarch_breakpoint_from_pc (gdbarch, xtensa_breakpoint_from_pc);
-
- /* After breakpoint instruction or illegal instruction, pc still
- points at break instruction, so don't decrement. */
- set_gdbarch_decr_pc_after_break (gdbarch, 0);
-
- /* We don't skip args. */
- set_gdbarch_frame_args_skip (gdbarch, 0);
-
- set_gdbarch_unwind_pc (gdbarch, xtensa_unwind_pc);
-
- set_gdbarch_frame_align (gdbarch, xtensa_frame_align);
-
- set_gdbarch_unwind_dummy_id (gdbarch, xtensa_unwind_dummy_id);
-
- /* Frame handling. */
- frame_base_set_default (gdbarch, &xtensa_frame_base);
- frame_unwind_append_sniffer (gdbarch, xtensa_frame_sniffer);
-
- set_gdbarch_print_insn (gdbarch, print_insn_xtensa);
-
- set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
-
- xtensa_add_reggroups (gdbarch);
- set_gdbarch_register_reggroup_p (gdbarch, xtensa_register_reggroup_p);
-
- set_gdbarch_regset_from_core_section (gdbarch,
- xtensa_regset_from_core_section);
-
- return gdbarch;
-}
-
-
-/* Dump xtensa tdep structure. */
-
-static void
-xtensa_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
-{
- error (_("xtensa_dump_tdep(): not implemented"));
-}
-
-
-void
-_initialize_xtensa_tdep (void)
-{
- struct cmd_list_element *c;
-
- gdbarch_register (bfd_arch_xtensa, xtensa_gdbarch_init, xtensa_dump_tdep);
- xtensa_init_reggroups ();
-
- add_setshow_zinteger_cmd ("xtensa",
- class_maintenance,
- &xtensa_debug_level, _("\
-Set Xtensa debugging."), _("\
-Show Xtensa debugging."), _("\
-When non-zero, Xtensa-specific debugging is enabled. \
-Can be 1, 2, 3, or 4 indicating the level of debugging."),
- NULL,
- NULL,
- &setdebuglist, &showdebuglist);
-}
diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h
deleted file mode 100644
index 3d5390c..0000000
--- a/gdb/xtensa-tdep.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/* Target-dependent code for the Xtensa port of GDB, the GNU debugger.
-
- Copyright (C) 2003, 2005, 2006 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. */
-
-
-/* XTENSA_TDEP_VERSION can/should be changed along with XTENSA_CONFIG_VERSION
- whenever the "tdep" structure changes in an incompatible way. */
-
-#define XTENSA_TDEP_VERSION 0x60
-
-/* Xtensa register type. */
-
-typedef enum
-{
- xtRegisterTypeArRegfile = 1, /* Register File ar0..arXX. */
- xtRegisterTypeSpecialReg, /* CPU states, such as PS, Booleans, (rsr). */
- xtRegisterTypeUserReg, /* User defined registers (rur). */
- xtRegisterTypeTieRegfile, /* User define register files. */
- xtRegisterTypeTieState, /* TIE States (mapped on user regs). */
- xtRegisterTypeMapped, /* Mapped on Special Registers. */
- xtRegisterTypeUnmapped, /* Special case of masked registers. */
- xtRegisterTypeWindow, /* Live window registers (a0..a15). */
- xtRegisterTypeVirtual, /* PC, FP. */
- xtRegisterTypeUnknown
-} xtensa_register_type_t;
-
-
-/* Xtensa register group. */
-
-typedef enum
-{
- xtRegisterGroupUnknown = 0,
- xtRegisterGroupRegFile = 0x0001, /* Register files without ARx. */
- xtRegisterGroupAddrReg = 0x0002, /* ARx. */
- xtRegisterGroupSpecialReg = 0x0004, /* SRxx. */
- xtRegisterGroupUserReg = 0x0008, /* URxx. */
- xtRegisterGroupState = 0x0010, /* States. */
-
- xtRegisterGroupGeneral = 0x0100, /* General registers, Ax, SR. */
- xtRegisterGroupUser = 0x0200, /* User registers. */
- xtRegisterGroupFloat = 0x0400, /* Floating Point. */
- xtRegisterGroupVectra = 0x0800, /* Vectra. */
- xtRegisterGroupSystem = 0x1000, /* System. */
-} xtensa_register_group_t;
-
-
-/* Xtensa target flags. */
-
-typedef enum
-{
- xtTargetFlagsNonVisibleRegs = 0x0001,
- xtTargetFlagsUseFetchStore = 0x0002,
-} xtensa_target_flags_t;
-
-
-/* Xtensa ELF core file register set representation ('.reg' section).
- Copied from target-side ELF header <xtensa/elf.h>. */
-
-typedef unsigned long xtensa_elf_greg_t;
-
-typedef struct
-{
- xtensa_elf_greg_t xchal_config_id0;
- xtensa_elf_greg_t xchal_config_id1;
- xtensa_elf_greg_t cpux;
- xtensa_elf_greg_t cpuy;
- xtensa_elf_greg_t pc;
- xtensa_elf_greg_t ps;
- xtensa_elf_greg_t exccause;
- xtensa_elf_greg_t excvaddr;
- xtensa_elf_greg_t windowbase;
- xtensa_elf_greg_t windowstart;
- xtensa_elf_greg_t lbeg;
- xtensa_elf_greg_t lend;
- xtensa_elf_greg_t lcount;
- xtensa_elf_greg_t sar;
- xtensa_elf_greg_t syscall;
- xtensa_elf_greg_t ar[0]; /* variable size (per config). */
-} xtensa_elf_gregset_t;
-
-#define SIZEOF_GREGSET (sizeof (xtensa_elf_gregset_t) + NUM_AREGS * 4)
-#define XTENSA_ELF_NGREG (SIZEOF_GREGSET / sizeof(xtensa_elf_greg_t))
-
-
-/* Mask. */
-
-typedef struct
-{
- int count;
- struct
- {
- int reg_num;
- int bit_start;
- int bit_size;
- } mask[0];
-} xtensa_mask_t;
-
-
-/* Xtensa register representation. */
-
-typedef struct
-{
- char* name; /* Register name. */
- int offset; /* Offset. */
- xtensa_register_type_t type; /* Register type. */
- xtensa_register_group_t group;/* Register group. */
- struct type* ctype; /* C-type. */
- int bit_size; /* The actual bit size in the target. */
- int byte_size; /* Actual space allocated in registers[]. */
- int align; /* Alignment for this register. */
-
- unsigned int target_number; /* Register target number. */
-
- int flags; /* Flags. */
-
- const xtensa_mask_t *mask; /* Register is a compilation of other regs. */
- const char *fetch; /* Instruction sequence to fetch register. */
- const char *store; /* Instruction sequence to store register. */
-} xtensa_register_t;
-
-
-#define XTENSA_REGISTER_FLAGS_PRIVILEDGED 0x0001
-#define XTENSA_REGISTER_FLAGS_READABLE 0x0002
-#define XTENSA_REGISTER_FLAGS_WRITABLE 0x0004
-#define XTENSA_REGISTER_FLAGS_VOLATILE 0x0008
-
-
-/* Call-ABI for stack frame. */
-
-typedef enum
-{
- CallAbiDefault = 0, /* Any 'callX' instructions; default stack. */
- CallAbiCall0Only, /* Only 'call0' instructions; flat stack. */
-} call_abi_t;
-
-
-/* Xtensa-specific target dependencies. */
-
-struct gdbarch_tdep
-{
- unsigned int target_flags;
-
- /* Spill location for TIE register files under ocd. */
-
- unsigned int spill_location;
- unsigned int spill_size;
-
- char *unused; /* Placeholder for compatibility. */
- call_abi_t call_abi; /* Calling convention. */
-
- /* CPU configuration. */
-
- unsigned int debug_interrupt_level;
-
- unsigned int icache_line_bytes;
- unsigned int dcache_line_bytes;
- unsigned int dcache_writeback;
-
- unsigned int isa_use_windowed_registers;
- unsigned int isa_use_density_instructions;
- unsigned int isa_use_exceptions;
- unsigned int isa_use_ext_l32r;
- unsigned int isa_max_insn_size; /* Maximum instruction length. */
- unsigned int debug_num_ibreaks; /* Number of IBREAKs. */
- unsigned int debug_num_dbreaks;
-
- /* Register map. */
-
- xtensa_register_t* regmap;
-
- unsigned int num_regs; /* Number of registers in regmap. */
- unsigned int num_pseudo_regs; /* Number of pseudo registers. */
- unsigned int num_aregs; /* Size of register file. */
- unsigned int num_contexts;
-
- int ar_base; /* Register number for AR0. */
- int a0_base; /* Register number for A0 (pseudo). */
- int wb_regnum; /* Register number for WB. */
- int ws_regnum; /* Register number for WS. */
- int pc_regnum; /* Register number for PC. */
- int ps_regnum; /* Register number for PS. */
- int lbeg_regnum; /* Register numbers for count regs. */
- int lend_regnum;
- int lcount_regnum;
- int sar_regnum; /* Register number of SAR. */
- int litbase_regnum; /* Register number of LITBASE. */
-
- int interrupt_regnum; /* Register number for interrupt. */
- int interrupt2_regnum; /* Register number for interrupt2. */
- int cpenable_regnum; /* Register number for cpenable. */
- int debugcause_regnum; /* Register number for debugcause. */
- int exccause_regnum; /* Register number for exccause. */
- int excvaddr_regnum; /* Register number for excvaddr. */
-
- int max_register_raw_size;
- int max_register_virtual_size;
- unsigned long *fp_layout; /* Layout of custom/TIE regs in 'FP' area. */
- unsigned int fp_layout_bytes; /* Size of layout information (in bytes). */
- unsigned long *gregmap;
-};
-
-
-/* Define macros to access some of the gdbarch entries. */
-#define XTENSA_TARGET_FLAGS \
- (gdbarch_tdep (current_gdbarch)->target_flags)
-#define SPILL_LOCATION \
- (gdbarch_tdep (current_gdbarch)->spill_location)
-#define SPILL_SIZE \
- (gdbarch_tdep (current_gdbarch)->spill_size)
-#define CALL_ABI \
- (gdbarch_tdep (current_gdbarch)->call_abi)
-#define ISA_USE_WINDOWED_REGISTERS \
- (gdbarch_tdep (current_gdbarch)->isa_use_windowed_registers)
-#define ISA_USE_DENSITY_INSTRUCTIONS \
- (gdbarch_tdep (current_gdbarch)->isa_use_density_instructions)
-#define ISA_USE_EXCEPTIONS \
- (gdbarch_tdep (current_gdbarch)->isa_use_exceptions)
-#define ISA_USE_EXT_L32R \
- (gdbarch_tdep (current_gdbarch)->isa_use_ext_l32r)
-#define DEBUG_DATA_VADDR_TRAP_COUNT \
- (gdbarch_tdep (current_gdbarch)->debug_data_vaddr_trap_count)
-#define DEBUG_INST_VADDR_TRAP_COUNT \
- (gdbarch_tdep (current_gdbarch)->debug_inst_vaddr_trap_count)
-#define ISA_MAX_INSN_SIZE \
- (gdbarch_tdep (current_gdbarch)->isa_max_insn_size)
-#define DEBUG_NUM_IBREAKS \
- (gdbarch_tdep (current_gdbarch)->debug_num_ibreaks)
-#define DEBUG_NUM_DBREAKS \
- (gdbarch_tdep (current_gdbarch)->debug_num_dbreaks)
-
-#define NUM_AREGS (gdbarch_tdep (current_gdbarch)->num_aregs)
-#define WB_REGNUM (gdbarch_tdep (current_gdbarch)->wb_regnum)
-#define WS_REGNUM (gdbarch_tdep (current_gdbarch)->ws_regnum)
-#define LBEG_REGNUM (gdbarch_tdep (current_gdbarch)->lbeg_regnum)
-#define LEND_REGNUM (gdbarch_tdep (current_gdbarch)->lend_regnum)
-#define LCOUNT_REGNUM (gdbarch_tdep (current_gdbarch)->lcount_regnum)
-#define SAR_REGNUM (gdbarch_tdep (current_gdbarch)->sar_regnum)
-#define REGMAP (gdbarch_tdep (current_gdbarch)->regmap)
-
-#define LITBASE_REGNUM (gdbarch_tdep (current_gdbarch)->litbase_regnum)
-#define DEBUGCAUSE_REGNUM (gdbarch_tdep (current_gdbarch)->debugcause_regnum)
-#define EXCCAUSE_REGNUM (gdbarch_tdep (current_gdbarch)->exccause_regnum)
-#define EXCVADDR_REGNUM (gdbarch_tdep (current_gdbarch)->excvaddr_regnum)
-#define NUM_IBREAKS (gdbarch_tdep (current_gdbarch)->num_ibreaks)
-#define REGMAP_BYTES (gdbarch_tdep (current_gdbarch)->regmap_bytes)
-#define A0_BASE (gdbarch_tdep (current_gdbarch)->a0_base)
-#define AR_BASE (gdbarch_tdep (current_gdbarch)->ar_base)
-#define FP_ALIAS (NUM_REGS + NUM_PSEUDO_REGS)
-#define CALL_ABI (gdbarch_tdep (current_gdbarch)->call_abi)
-#define NUM_CONTEXTS (gdbarch_tdep (current_gdbarch)->num_contexts)
-
-#define FP_LAYOUT (gdbarch_tdep (current_gdbarch)->fp_layout)
-#define FP_LAYOUT_BYTES (gdbarch_tdep (current_gdbarch)->fp_layout_bytes)
-#define GREGMAP (gdbarch_tdep (current_gdbarch)->gregmap)
-
-#define AREGS_MASK (NUM_AREGS - 1)
-#define WB_MASK (AREGS_MASK >> 2)
-#define WB_SHIFT 2
-
-/* We assign fixed numbers to the registers of the "current" window
- (i.e., relative to WB). The registers get remapped via the reg_map
- data structure to their corresponding register in the AR register
- file (see xtensa-tdep.c). */
-
-#define A0_REGNUM (A0_BASE + 0)
-#define A1_REGNUM (A0_BASE + 1)
-#define A2_REGNUM (A0_BASE + 2)
-#define A3_REGNUM (A0_BASE + 3)
-#define A4_REGNUM (A0_BASE + 4)
-#define A5_REGNUM (A0_BASE + 5)
-#define A6_REGNUM (A0_BASE + 6)
-#define A7_REGNUM (A0_BASE + 7)
-#define A8_REGNUM (A0_BASE + 8)
-#define A9_REGNUM (A0_BASE + 9)
-#define A10_REGNUM (A0_BASE + 10)
-#define A11_REGNUM (A0_BASE + 11)
-#define A12_REGNUM (A0_BASE + 12)
-#define A13_REGNUM (A0_BASE + 13)
-#define A14_REGNUM (A0_BASE + 14)
-#define A15_REGNUM (A0_BASE + 15)
-
diff --git a/include/ChangeLog b/include/ChangeLog
index b7cb681..5140f8d 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,34 +1,3 @@
-2006-10-30 Paul Brook <paul@codesourcery.com>
-
- * dis-asm.h (disassemble_info): Add symtab, symtab_pos and
- symtab_size.
-
-2006-10-30 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3111
- * bfdlink.h (bfd_link_info): Add reduce_memory_overheads.
-
-2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
- Yukishige Shibata <shibata@rd.scei.sony.co.jp>
- Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
- Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
- Alan Modra <amodra@bigpond.net.au>
-
- * dis-asm.h (print_insn_spu): Declare.
-
-2006-10-17 Mark Shinwell <shinwell@codesourcery.com>
-
- * elf/arm.h: Define TAG_CPU_ARCH_* constants.
-
-2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
-
- * dis-asm.h: Add prototypes for Score disassembler routines.
-
-2006-09-07 H.J. Lu <hongjiu.lu@intel.com>
-
- * bfdlink.h (bfd_elf_dynamic_list): New.
- (bfd_link_info): Add a dynamic field.
-
2006-08-04 Marcelo Tosatti <marcelo@kvack.org>
* bfdlink.h (struct bfd_link_info): New field: print_gc_sections.
diff --git a/include/bfdlink.h b/include/bfdlink.h
index 228cab8..bbedd60 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -221,8 +221,6 @@ enum report_method
RM_GENERATE_ERROR
};
-struct bfd_elf_dynamic_list;
-
/* This structure holds all the information needed to communicate
between BFD and the linker when doing a link. */
@@ -335,11 +333,6 @@ struct bfd_link_info
/* 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;
-
/* 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
@@ -438,9 +431,6 @@ struct bfd_link_info
/* Start and end of RELRO region. */
bfd_vma relro_start, relro_end;
-
- /* List of symbols should be dynamic. */
- struct bfd_elf_dynamic_list *dynamic;
};
/* This structures holds a set of callback functions. These are
@@ -734,12 +724,4 @@ struct bfd_elf_version_tree
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/include/coff/ChangeLog b/include/coff/ChangeLog
index 60a8587..f41c115 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,23 +1,3 @@
-2006-11-14 Phil Lello <phil.lello@homecall.co.uk>
-
- * 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 <Kai.Tietz@onevision.com>
-
- * 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 <arnold.metselaar@planet.nl>
* internal.h: Add relocation number R_IMM24 for Z80.
diff --git a/include/coff/external.h b/include/coff/external.h
index e38fb1b..9e760bd 100644
--- a/include/coff/external.h
+++ b/include/coff/external.h
@@ -1,6 +1,6 @@
/* external.h -- External COFF structures
- Copyright 2001, 2006 Free Software Foundation, Inc.
+ Copyright 2001 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
@@ -55,21 +55,7 @@ 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 */
+#endif
#ifndef DO_NOT_DEFINE_SCNHDR
/********************** SECTION HEADER **********************/
diff --git a/include/coff/internal.h b/include/coff/internal.h
index 61ca4e3..ed0918a 100644
--- a/include/coff/internal.h
+++ b/include/coff/internal.h
@@ -1,7 +1,7 @@
/* Internal format of COFF object file data structures, for GNU BFD.
This file is part of BFD, the Binary File Descriptor library.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004. 2005, 2006
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004. 2005
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -103,22 +103,6 @@ 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
/* Default image base for NT. */
@@ -620,25 +604,6 @@ struct internal_reloc
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
diff --git a/include/coff/pe.h b/include/coff/pe.h
index 277621c..643cea4 100644
--- a/include/coff/pe.h
+++ b/include/coff/pe.h
@@ -1,6 +1,6 @@
/* pe.h - PE COFF header information
- Copyright 1999, 2000, 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -119,7 +119,6 @@
#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
@@ -130,8 +129,6 @@
#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
-#define IMAGE_SUBSYSTEM_EFI_ROM 13
-#define IMAGE_SUBSYSTEM_XBOX 14
/* Magic values that are true for all dos/nt implementations. */
#define DOSMAGIC 0x5a4d
@@ -262,7 +259,6 @@ typedef struct
/* 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)
@@ -271,11 +267,8 @@ typedef struct
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];
@@ -301,12 +294,7 @@ typedef struct
/* 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. */
diff --git a/include/coff/x86_64.h b/include/coff/x86_64.h
deleted file mode 100644
index b58dd2f..0000000
--- a/include/coff/x86_64.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* COFF information for AMD 64.
- Copyright 2006 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.
-
- Written by Kai Tietz, OneVision Software GmbH&CoKg. */
-
-#define L_LNNO_SIZE 2
-#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
-
-#include "coff/external.h"
-
-#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/include/dis-asm.h b/include/dis-asm.h
index af48e85..bdbf9f8 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -1,6 +1,6 @@
/* Interface between the opcode library and its callers.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -37,8 +37,7 @@ extern "C" {
typedef int (*fprintf_ftype) (void *, const char*, ...) ATTRIBUTE_FPTR_PRINTF_2;
-enum dis_insn_type
-{
+enum dis_insn_type {
dis_noninsn, /* Not a valid instruction */
dis_nonbranch, /* Not a branch instruction */
dis_branch, /* Unconditional branch */
@@ -59,8 +58,7 @@ enum dis_insn_type
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
-{
+typedef struct disassemble_info {
fprintf_ftype fprintf_func;
void *stream;
void *application_data;
@@ -96,12 +94,6 @@ typedef struct disassemble_info
/* 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. */
@@ -209,64 +201,59 @@ typedef struct disassemble_info
target address. Return number of octets processed. */
typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *);
+extern int print_insn_big_mips (bfd_vma, disassemble_info *);
+extern int print_insn_little_mips (bfd_vma, disassemble_info *);
+extern int print_insn_i386 (bfd_vma, disassemble_info *);
+extern int print_insn_i386_att (bfd_vma, disassemble_info *);
+extern int print_insn_i386_intel (bfd_vma, disassemble_info *);
+extern int print_insn_ia64 (bfd_vma, disassemble_info *);
+extern int print_insn_i370 (bfd_vma, disassemble_info *);
+extern int print_insn_m68hc11 (bfd_vma, disassemble_info *);
+extern int print_insn_m68hc12 (bfd_vma, disassemble_info *);
+extern int print_insn_m68k (bfd_vma, disassemble_info *);
+extern int print_insn_z80 (bfd_vma, disassemble_info *);
+extern int print_insn_z8001 (bfd_vma, disassemble_info *);
+extern int print_insn_z8002 (bfd_vma, disassemble_info *);
+extern int print_insn_h8300 (bfd_vma, disassemble_info *);
+extern int print_insn_h8300h (bfd_vma, disassemble_info *);
+extern int print_insn_h8300s (bfd_vma, disassemble_info *);
+extern int print_insn_h8500 (bfd_vma, disassemble_info *);
extern int print_insn_alpha (bfd_vma, disassemble_info *);
+extern int print_insn_big_arm (bfd_vma, disassemble_info *);
+extern int print_insn_little_arm (bfd_vma, disassemble_info *);
+extern int print_insn_sparc (bfd_vma, disassemble_info *);
extern int print_insn_avr (bfd_vma, disassemble_info *);
extern int print_insn_bfin (bfd_vma, disassemble_info *);
-extern int print_insn_big_arm (bfd_vma, disassemble_info *);
-extern int print_insn_big_mips (bfd_vma, disassemble_info *);
-extern int print_insn_big_or32 (bfd_vma, disassemble_info *);
-extern int print_insn_big_powerpc (bfd_vma, disassemble_info *);
-extern int print_insn_big_score (bfd_vma, disassemble_info *);
-extern int print_insn_crx (bfd_vma, disassemble_info *);
extern int print_insn_d10v (bfd_vma, disassemble_info *);
extern int print_insn_d30v (bfd_vma, disassemble_info *);
extern int print_insn_dlx (bfd_vma, disassemble_info *);
extern int print_insn_fr30 (bfd_vma, disassemble_info *);
-extern int print_insn_frv (bfd_vma, disassemble_info *);
-extern int print_insn_h8300 (bfd_vma, disassemble_info *);
-extern int print_insn_h8300h (bfd_vma, disassemble_info *);
-extern int print_insn_h8300s (bfd_vma, disassemble_info *);
-extern int print_insn_h8500 (bfd_vma, disassemble_info *);
extern int print_insn_hppa (bfd_vma, disassemble_info *);
-extern int print_insn_i370 (bfd_vma, disassemble_info *);
-extern int print_insn_i386 (bfd_vma, disassemble_info *);
-extern int print_insn_i386_att (bfd_vma, disassemble_info *);
-extern int print_insn_i386_intel (bfd_vma, disassemble_info *);
extern int print_insn_i860 (bfd_vma, disassemble_info *);
extern int print_insn_i960 (bfd_vma, disassemble_info *);
-extern int print_insn_ia64 (bfd_vma, disassemble_info *);
extern int print_insn_ip2k (bfd_vma, disassemble_info *);
-extern int print_insn_iq2000 (bfd_vma, disassemble_info *);
-extern int print_insn_little_arm (bfd_vma, disassemble_info *);
-extern int print_insn_little_mips (bfd_vma, disassemble_info *);
-extern int print_insn_little_or32 (bfd_vma, disassemble_info *);
-extern int print_insn_little_powerpc (bfd_vma, disassemble_info *);
-extern int print_insn_little_score (bfd_vma, disassemble_info *);
-extern int print_insn_m32c (bfd_vma, disassemble_info *);
extern int print_insn_m32r (bfd_vma, disassemble_info *);
-extern int print_insn_m68hc11 (bfd_vma, disassemble_info *);
-extern int print_insn_m68hc12 (bfd_vma, disassemble_info *);
-extern int print_insn_m68k (bfd_vma, disassemble_info *);
extern int print_insn_m88k (bfd_vma, disassemble_info *);
-extern int print_insn_maxq_big (bfd_vma, disassemble_info *);
extern int print_insn_maxq_little (bfd_vma, disassemble_info *);
+extern int print_insn_maxq_big (bfd_vma, disassemble_info *);
extern int print_insn_mcore (bfd_vma, disassemble_info *);
extern int print_insn_mmix (bfd_vma, disassemble_info *);
extern int print_insn_mn10200 (bfd_vma, disassemble_info *);
extern int print_insn_mn10300 (bfd_vma, disassemble_info *);
-extern int print_insn_msp430 (bfd_vma, disassemble_info *);
extern int print_insn_mt (bfd_vma, disassemble_info *);
+extern int print_insn_msp430 (bfd_vma, disassemble_info *);
extern int print_insn_ns32k (bfd_vma, disassemble_info *);
+extern int print_insn_crx (bfd_vma, disassemble_info *);
extern int print_insn_openrisc (bfd_vma, disassemble_info *);
+extern int print_insn_big_or32 (bfd_vma, disassemble_info *);
+extern int print_insn_little_or32 (bfd_vma, disassemble_info *);
extern int print_insn_pdp11 (bfd_vma, disassemble_info *);
extern int print_insn_pj (bfd_vma, disassemble_info *);
+extern int print_insn_big_powerpc (bfd_vma, disassemble_info *);
+extern int print_insn_little_powerpc (bfd_vma, disassemble_info *);
extern int print_insn_rs6000 (bfd_vma, disassemble_info *);
extern int print_insn_s390 (bfd_vma, disassemble_info *);
extern int print_insn_sh (bfd_vma, disassemble_info *);
-extern int print_insn_sh64 (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_spu (bfd_vma, disassemble_info *);
extern int print_insn_tic30 (bfd_vma, disassemble_info *);
extern int print_insn_tic4x (bfd_vma, disassemble_info *);
extern int print_insn_tic54x (bfd_vma, disassemble_info *);
@@ -274,12 +261,14 @@ extern int print_insn_tic80 (bfd_vma, disassemble_info *);
extern int print_insn_v850 (bfd_vma, disassemble_info *);
extern int print_insn_vax (bfd_vma, disassemble_info *);
extern int print_insn_w65 (bfd_vma, disassemble_info *);
-extern int print_insn_xc16x (bfd_vma, disassemble_info *);
extern int print_insn_xstormy16 (bfd_vma, disassemble_info *);
extern int print_insn_xtensa (bfd_vma, disassemble_info *);
-extern int print_insn_z80 (bfd_vma, disassemble_info *);
-extern int print_insn_z8001 (bfd_vma, disassemble_info *);
-extern int print_insn_z8002 (bfd_vma, disassemble_info *);
+extern int print_insn_sh64 (bfd_vma, disassemble_info *);
+extern int print_insn_sh64x_media (bfd_vma, disassemble_info *);
+extern int print_insn_frv (bfd_vma, disassemble_info *);
+extern int print_insn_iq2000 (bfd_vma, disassemble_info *);
+extern int print_insn_xc16x (bfd_vma, disassemble_info *);
+extern int print_insn_m32c (bfd_vma, disassemble_info *);
extern disassembler_ftype arc_get_disassembler (void *);
extern disassembler_ftype cris_get_disassembler (bfd *);
@@ -288,9 +277,9 @@ extern void print_mips_disassembler_options (FILE *);
extern void print_ppc_disassembler_options (FILE *);
extern void print_arm_disassembler_options (FILE *);
extern void parse_arm_disassembler_option (char *);
-extern int get_arm_regname_num_options (void);
-extern int set_arm_regname_option (int);
-extern int get_arm_regnames (int, const char **, const char **, const char *const **);
+extern int get_arm_regname_num_options (void);
+extern int set_arm_regname_option (int);
+extern int get_arm_regnames (int, const char **, const char **, const char *const **);
extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *);
/* Fetch the disassembler for a given BFD, if that support is available. */
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 3a661cb..f1c15b5 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,28 +1,3 @@
-2006-10-28 Richard Sandiford <richard@codesourcery.com>
-
- * mips.h (R_MIPS_GLOB_DAT): Define
- (R_MIPS_max): Bump by 1.
-
-2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
- Yukishige Shibata <shibata@rd.scei.sony.co.jp>
- Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
- Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
- Alan Modra <amodra@bigpond.net.au>
-
- * common.h (EM_SPU): Define.
- * spu.h: New file.
-
-2006-10-19 Mei Ligang <ligang@sunnorth.com.cn>
-
- * 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-09-17 Mei Ligang <ligang@sunnorth.com.cn>
-
- * score.h: New file.
- * common.h: Add Score machine number.
-
2006-07-10 Jakub Jelinek <jakub@redhat.com>
* common.h (SHT_GNU_HASH, DT_GNU_HASH): Define.
diff --git a/include/elf/arm.h b/include/elf/arm.h
index 890ef8d..6b72977 100644
--- a/include/elf/arm.h
+++ b/include/elf/arm.h
@@ -84,19 +84,6 @@
#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
-
/* Relocation types. */
START_RELOC_NUMBERS (elf_arm_reloc_type)
diff --git a/include/elf/common.h b/include/elf/common.h
index b418d3f..0380a8f 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -118,7 +118,6 @@
#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_V800 36 /* NEC V800 series */
#define EM_FR20 37 /* Fujitsu FR20 */
@@ -186,7 +185,6 @@
#define EM_BLACKFIN 106 /* ADI Blackfin */
#define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */
#define EM_CRX 114 /* National Semiconductor CRX */
-#define EM_SCORE 135 /* Sunplus Score */
/* If it is necessary to assign new unofficial EM_* values, please pick large
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
diff --git a/include/elf/mips.h b/include/elf/mips.h
index c0d3eb1..f22bd4d 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -87,8 +87,7 @@ START_RELOC_NUMBERS (elf_mips_reloc_type)
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)
- FAKE_RELOC (R_MIPS_max, 52)
+ FAKE_RELOC (R_MIPS_max, 51)
/* These relocs are used for the mips16. */
FAKE_RELOC (R_MIPS16_min, 100)
RELOC_NUMBER (R_MIPS16_26, 100)
diff --git a/include/elf/score.h b/include/elf/score.h
deleted file mode 100644
index ec3b32f..0000000
--- a/include/elf/score.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Score ELF support for BFD.
- Copyright 2006 Free Software Foundation, Inc.
- Contributed by
- 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 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,
- 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: */
-
-/* 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 0xff01
-#define SHN_SCORE_DATA 0xff02
-/* Small common symbol. */
-#define SHN_SCORE_SCOMMON 0xff03
-
-/* 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_DUMMY1, 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)
-END_RELOC_NUMBERS (R_SCORE_max)
-
-#endif /* _ELF_SCORE_H */
diff --git a/include/elf/spu.h b/include/elf/spu.h
deleted file mode 100644
index 2e3f050..0000000
--- a/include/elf/spu.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* SPU ELF support for BFD.
-
- Copyright 2006 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_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)
-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/include/opcode/ChangeLog b/include/opcode/ChangeLog
index aad0ddb..5170514 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,655 +1,3 @@
-2006-11-08 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Replace CpuPNI with CpuSSE3.
-
-2006-10-31 Mei Ligang <ligang@sunnorth.com.cn>
-
- * score-inst.h (enum score_insn_type): Add Insn_internal.
-
-2006-10-31 Mei Ligang <ligang@sunnorth.com.cn>
-
- * score-inst.h (enum score_insn_type): Add Insn_internal.
-
-2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
- Yukishige Shibata <shibata@rd.scei.sony.co.jp>
- Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
- Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
- Alan Modra <amodra@bigpond.net.au>
-
- * spu-insns.h: New file.
- * spu.h: New file.
-
-2006-10-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
-
- * ppc.h (PPC_OPCODE_CELL): Define.
-
-2006-10-23 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
-
- * i386.h : Modify opcode to support for the change in POPCNT opcode
- in amdfam10 architecture.
-
-2006-09-28 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h: Replace CpuMNI with CpuSSSE3.
-
-2006-09-26 Mark Shinwell <shinwell@codesourcery.com>
- Joseph Myers <joseph@codesourcery.com>
- Ian Lance Taylor <ian@wasabisystems.com>
- Ben Elliston <bje@wasabisystems.com>
-
- * arm.h (ARM_CEXT_IWMMXT2, ARM_ARCH_IWMMXT2): Define.
-
-2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
-
- * score-datadep.h: New file.
- * score-inst.h: New file.
-
-2006-07-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Remove InvMem from maskmovq, movhlps,
- movlhps, movmskps, pextrw, pmovmskb, movmskpd, maskmovdqu,
- movdq2q and movq2dq.
-
-2006-07-10 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
- Michael Meissner <michael.meissner@amd.com>
-
- * i386.h: Add amdfam10 new instructions (SSE4a and ABM instructions).
-
-2006-06-12 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Add "nop" with memory reference.
-
-2006-06-12 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Update comment for 64bit NOP.
-
-2006-06-06 Ben Elliston <bje@au.ibm.com>
- Anton Blanchard <anton@samba.org>
-
- * ppc.h (PPC_OPCODE_POWER6): Define.
- Adjust whitespace.
-
-2006-06-05 Thiemo Seufer <ths@mips.com>
-
- * mips.h: Improve description of MT flags.
-
-2006-05-25 Richard Sandiford <richard@codesourcery.com>
-
- * m68k.h (mcf_mask): Define.
-
-2006-05-05 Thiemo Seufer <ths@mips.com>
- David Ung <davidu@mips.com>
-
- * mips.h (enum): Add macro M_CACHE_AB.
-
-2006-05-04 Thiemo Seufer <ths@mips.com>
- Nigel Stephens <nigel@mips.com>
- David Ung <davidu@mips.com>
-
- * mips.h: Add INSN_SMARTMIPS define.
-
-2006-04-30 Thiemo Seufer <ths@mips.com>
- David Ung <davidu@mips.com>
-
- * mips.h: Defines udi bits and masks. Add description of
- characters which may appear in the args field of udi
- instructions.
-
-2006-04-26 Thiemo Seufer <ths@networkno.de>
-
- * mips.h: Improve comments describing the bitfield instruction
- fields.
-
-2006-04-26 Julian Brown <julian@codesourcery.com>
-
- * arm.h (FPU_VFP_EXT_V3): Define constant.
- (FPU_NEON_EXT_V1): Likewise.
- (FPU_VFP_HARD): Update.
- (FPU_VFP_V3): Define macro.
- (FPU_ARCH_VFP_V3, FPU_ARCH_VFP_V3_PLUS_NEON_V1): Define macros.
-
-2006-04-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
-
- * avr.h (AVR_ISA_PWMx): New.
-
-2006-03-28 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k.h (cpu_m68k, cpu_cf, cpu_m68000, cpu_m68008, cpu_m68010,
- cpu_m68020, cpu_m68ec030, cpu_m68040, cpu_m68060, cpu_m68851,
- cpu_m68881, cpu_m68882, cpu_cpu32, cpu_cf5200, cpu_cf5206e,
- cpu_cf5208, cpu_cf521x, cpu_cf5213, cpu_cf5249, cpu_cf528x,
- cpu_cf5307, cpu_cf5329, cpu_cf5407, cpu_cf547x, cpu_cf548x): Remove.
-
-2006-03-10 Paul Brook <paul@codesourcery.com>
-
- * arm.h (ARM_AEXT_V7_ARM): Include v6ZK extensions.
-
-2006-03-04 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (pa_opcodes): Reorder bb opcodes so that pa10 opcodes come
- first. Correct mask of bb "B" opcode.
-
-2006-02-27 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Support Intel Merom New Instructions.
-
-2006-02-24 Paul Brook <paul@codesourcery.com>
-
- * arm.h: Add V7 feature bits.
-
-2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
-
- * ia64.h (ia64_opnd): Add IA64_OPND_IMMU5b.
-
-2006-01-31 Paul Brook <paul@codesourcery.com>
- Richard Earnshaw <rearnsha@arm.com>
-
- * arm.h: Use ARM_CPU_FEATURE.
- (ARM_AEXT_*, FPU_ENDIAN_PURE, FPU_VFP_HARD): New.
- (arm_feature_set): Change to a structure.
- (ARM_CPU_HAS_FEATURE, ARM_MERGE_FEATURE_SETS, ARM_CLEAR_FEATURE,
- ARM_FEATURE): New macros.
-
-2005-12-07 Hans-Peter Nilsson <hp@axis.com>
-
- * cris.h (MOVE_M_TO_PREG_OPCODE, MOVE_M_TO_PREG_ZBITS)
- (MOVE_PC_INCR_OPCODE_PREFIX, MOVE_PC_INCR_OPCODE_SUFFIX): New macros.
- (ADD_PC_INCR_OPCODE): Don't define.
-
-2005-12-06 H.J. Lu <hongjiu.lu@intel.com>
-
- PR gas/1874
- * i386.h (i386_optab): Add 64bit support for monitor and mwait.
-
-2005-11-14 David Ung <davidu@mips.com>
-
- * mips.h: Assign 'm'/'M' codes to MIPS16e save/restore
- instructions. Define MIPS16_ALL_ARGS and MIPS16_ALL_STATICS for
- save/restore encoding of the args field.
-
-2005-10-28 Dave Brolley <brolley@redhat.com>
-
- Contribute the following changes:
- 2005-02-16 Dave Brolley <brolley@redhat.com>
-
- * cgen-bitset.h: Rename CGEN_ISA_MASK to CGEN_BITSET. Rename
- cgen_isa_mask_* to cgen_bitset_*.
- * cgen.h: Likewise.
-
- 2003-10-21 Richard Sandiford <rsandifo@redhat.com>
-
- * cgen.h (CGEN_BITSET_ATTR_VALUE): Fix definition.
- (CGEN_ATTR_ENTRY): Change "value" to type "unsigned".
- (CGEN_CPU_TABLE): Make isas a ponter.
-
- 2003-09-29 Dave Brolley <brolley@redhat.com>
-
- * cgen.h (CGEN_ATTR_VALUE_BITSET_TYPE): New typedef.
- (CGEN_ATTR_VALUE_ENUM_TYPE): Ditto.
- (CGEN_ATTR_VALUE_TYPE): Use these new typedefs.
-
- 2002-12-13 Dave Brolley <brolley@redhat.com>
-
- * cgen.h (symcat.h): #include it.
- (cgen-bitset.h): #include it.
- (CGEN_ATTR_VALUE_TYPE): Now a union.
- (CGEN_ATTR_VALUE): Reference macros generated in opcodes/<arch>-desc.h.
- (CGEN_ATTR_ENTRY): 'value' now unsigned.
- (cgen_cpu_desc): 'isas' now (CGEN_ISA_MASK*).
- * cgen-bitset.h: New file.
-
-2005-09-30 Catherine Moore <clm@cm00re.com>
-
- * bfin.h: New file.
-
-2005-10-24 Jan Beulich <jbeulich@novell.com>
-
- * ia64.h (enum ia64_opnd): Move memory operand out of set of
- indirect operands.
-
-2005-10-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (pa_opcodes): Add two fcmp opcodes. Reorder ftest opcodes.
- Add FLAG_STRICT to pa10 ftest opcode.
-
-2005-10-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (pa_opcodes): Remove lha entries.
-
-2005-10-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (FLAG_STRICT): Revise comment.
- (pa_opcode): Revise ordering rules. Add/move strict pa10 variants
- before corresponding pa11 opcodes. Add strict pa10 register-immediate
- entries for "fdc".
-
-2005-09-24 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (pa_opcodes): Add new "fdc" and "fic" opcode entries.
-
-2005-09-06 Chao-ying Fu <fu@mips.com>
-
- * mips.h (OP_SH_MT_U, OP_MASK_MT_U, OP_SH_MT_H, OP_MASK_MT_H,
- OP_SH_MTACC_T, OP_MASK_MTACC_T, OP_SH_MTACC_D, OP_MASK_MTACC_D): New
- define.
- Document !, $, *, &, g, +t, +T operand formats for MT instructions.
- (INSN_ASE_MASK): Update to include INSN_MT.
- (INSN_MT): New define for MT ASE.
-
-2005-08-25 Chao-ying Fu <fu@mips.com>
-
- * mips.h (OP_SH_DSPACC, OP_MASK_DSPACC, OP_SH_DSPACC_S,
- OP_MASK_DSPACC_S, OP_SH_DSPSFT, OP_MASK_DSPSFT, OP_SH_DSPSFT_7,
- OP_MASK_DSPSFT_7, OP_SH_SA3, OP_MASK_SA3, OP_SH_SA4, OP_MASK_SA4,
- OP_SH_IMM8, OP_MASK_IMM8, OP_SH_IMM10, OP_MASK_IMM10, OP_SH_WRDSP,
- OP_MASK_WRDSP, OP_SH_RDDSP, OP_MASK_RDDSP): New define.
- Document 3, 4, 5, 6, 7, 8, 9, 0, :, ', @ operand formats for DSP
- instructions.
- (INSN_DSP): New define for DSP ASE.
-
-2005-08-18 Alan Modra <amodra@bigpond.net.au>
-
- * a29k.h: Delete.
-
-2005-08-15 Daniel Jacobowitz <dan@codesourcery.com>
-
- * ppc.h (PPC_OPCODE_E300): Define.
-
-2005-08-12 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * s390.h (s390_opcode_cpu_val): Add enum for cpu type z9-109.
-
-2005-07-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- PR gas/336
- * hppa.h (pa_opcodes): Allow 0 immediates in PA 2.0 variants of pdtlb
- and pitlb.
-
-2005-07-27 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (i386_optab): Add comment to movd. Use LongMem for all
- movd-s. Add NoRex64 to movq-s dealing only with mmx or xmm registers.
- Add movq-s as 64-bit variants of movd-s.
-
-2005-07-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h: Fix punctuation in comment.
-
- * hppa.h (pa_opcode): Add rules for opcode ordering. Check first for
- implicit space-register addressing. Set space-register bits on opcodes
- using implicit space-register addressing. Add various missing pa20
- long-immediate opcodes. Remove various opcodes using implicit 3-bit
- space-register addressing. Use "fE" instead of "fe" in various
- fstw opcodes.
-
-2005-07-18 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (i386_optab): Operands of aam and aad are unsigned.
-
-2007-07-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Support Intel VMX Instructions.
-
-2005-07-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (pa_opcode): Don't set FLAG_STRICT in pa10 loads and stores.
-
-2005-07-05 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (i386_optab): Add new insns.
-
-2005-07-01 Nick Clifton <nickc@redhat.com>
-
- * sparc.h: Add typedefs to structure declarations.
-
-2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
-
- PR 1013
- * i386.h (i386_optab): Update comments for 64bit addressing on
- mov. Allow 64bit addressing for mov and movq.
-
-2005-06-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (pa_opcodes): Use cM and cX instead of cm and cx,
- respectively, in various floating-point load and store patterns.
-
-2005-05-23 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (FLAG_STRICT): Correct comment.
- (pa_opcodes): Update load and store entries to allow both PA 1.X and
- PA 2.0 mneumonics when equivalent. Entries with cache control
- completers now require PA 1.1. Adjust whitespace.
-
-2005-05-19 Anton Blanchard <anton@samba.org>
-
- * ppc.h (PPC_OPCODE_POWER5): Define.
-
-2005-05-10 Nick Clifton <nickc@redhat.com>
-
- * Update the address and phone number of the FSF organization in
- the GPL notices in the following files:
- a29k.h, alpha.h, arc.h, arm.h, avr.h, cgen.h, convex.h, cris.h,
- crx.h, d10v.h, d30v.h, dlx.h, h8300.h, hppa.h, i370.h, i386.h,
- i860.h, i960.h, m68hc11.h, m68k.h, m88k.h, maxq.h, mips.h, mmix.h,
- mn10200.h, mn10300.h, msp430.h, np1.h, ns32k.h, or32.h, pdp11.h,
- pj.h, pn.h, ppc.h, pyr.h, s390.h, sparc.h, tic30.h, tic4x.h,
- tic54x.h, tic80.h, v850.h, vax.h
-
-2005-05-09 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (i386_optab): Add ht and hnt.
-
-2005-04-18 Mark Kettenis <kettenis@gnu.org>
-
- * i386.h: Insert hyphens into selected VIA PadLock extensions.
- Add xcrypt-ctr. Provide aliases without hyphens.
-
-2005-04-13 H.J. Lu <hongjiu.lu@intel.com>
-
- Moved from ../ChangeLog
-
- 2005-04-12 Paul Brook <paul@codesourcery.com>
- * m88k.h: Rename psr macros to avoid conflicts.
-
- 2005-03-12 Zack Weinberg <zack@codesourcery.com>
- * arm.h: Adjust comments for ARM_EXT_V4T and ARM_EXT_V5T.
- Add ARM_EXT_V6T2, ARM_ARCH_V6T2, ARM_ARCH_V6KT2, ARM_ARCH_V6ZT2,
- and ARM_ARCH_V6ZKT2.
-
- 2004-11-29 Tomer Levi <Tomer.Levi@nsc.com>
- * crx.h (enum operand_type): Rename rbase_cst4 to rbase_dispu4.
- Remove redundant instruction types.
- (struct argument): X_op - new field.
- (struct cst4_entry): Remove.
- (no_op_insn): Declare.
-
- 2004-11-05 Tomer Levi <Tomer.Levi@nsc.com>
- * crx.h (enum argtype): Rename types, remove unused types.
-
- 2004-10-27 Tomer Levi <Tomer.Levi@nsc.com>
- * crx.h (enum reg): Rearrange registers, remove 'ccfg' and `'pc'.
- (enum reg_type): Remove CRX_PC_REGTYPE, CRX_MTPR_REGTYPE.
- (enum operand_type): Rearrange operands, edit comments.
- replace us<N> with ui<N> for unsigned immediate.
- replace d<N> with disps<N>/dispu<N>/dispe<N> for signed/unsigned/escaped
- displacements (respectively).
- replace rbase_ridx_scl2_dispu<N> with rindex_disps<N> for register index.
- (instruction type): Add NO_TYPE_INS.
- (instruction flags): Add USER_REG, CST4MAP, NO_SP, NO_RPTR.
- (operand_entry): New field - 'flags'.
- (operand flags): New.
-
- 2004-10-21 Tomer Levi <Tomer.Levi@nsc.com>
- * crx.h (operand_type): Remove redundant types i3, i4,
- i5, i8, i12.
- Add new unsigned immediate types us3, us4, us5, us16.
-
-2005-04-12 Mark Kettenis <kettenis@gnu.org>
-
- * i386.h (i386_optab): Mark VIA PadLock instructions as ImmExt and
- adjust them accordingly.
-
-2005-04-01 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (i386_optab): Add rdtscp.
-
-2005-03-29 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Don't allow the `l' suffix for moving
- between memory and segment register. Allow movq for moving between
- general-purpose register and segment register.
-
-2005-02-09 Jan Beulich <jbeulich@novell.com>
-
- PR gas/707
- * i386.h (i386_optab): Add x_Suf to fbld and fbstp. Add w_Suf and
- FloatMF to fldcw, fstcw, fnstcw, and the memory formas of fstsw and
- fnstsw.
-
-2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k.h (m68008, m68ec030, m68882): Remove.
- (m68k_mask): New.
- (cpu_m68k, cpu_cf): New.
- (mcf5200, mcf5206e, mcf521x, mcf5249, mcf528x, mcf5307, mcf5407,
- mcf5470, mcf5480): Rename to cpu_<foo>. Add m680x0 variants.
-
-2005-01-25 Alexandre Oliva <aoliva@redhat.com>
-
- 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
- * cgen.h (enum cgen_parse_operand_type): Add
- CGEN_PARSE_OPERAND_SYMBOLIC.
-
-2005-01-21 Fred Fish <fnf@specifixinc.com>
-
- * mips.h: Change INSN_ALIAS to INSN2_ALIAS.
- Change INSN_WRITE_MDMX_ACC to INSN2_WRITE_MDMX_ACC.
- Change INSN_READ_MDMX_ACC to INSN2_READ_MDMX_ACC.
-
-2005-01-19 Fred Fish <fnf@specifixinc.com>
-
- * mips.h (struct mips_opcode): Add new pinfo2 member.
- (INSN_ALIAS): New define for opcode table entries that are
- specific instances of another entry, such as 'move' for an 'or'
- with a zero operand.
- (INSN_READ_MDMX_ACC): Redefine from 0 to 0x2.
- (INSN_WRITE_MDMX_ACC): Redefine from 0 to 0x4.
-
-2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
-
- * mips.h (CPU_RM9000): Define.
- (OPCODE_IS_MEMBER): Handle CPU_RM9000.
-
-2004-11-25 Jan Beulich <jbeulich@novell.com>
-
- * i386.h: CpuNo64 mov can't reasonably have a 'q' suffix. Moves
- to/from test registers are illegal in 64-bit mode. Add missing
- NoRex64 to sidt. fxsave/fxrstor now allow for a 'q' suffix
- (previously one had to explicitly encode a rex64 prefix). Re-enable
- lahf/sahf in 64-bit mode as at least some Athlon64/Opteron steppings
- support it there. Add cmpxchg16b as per Intel's 64-bit documentation.
-
-2004-11-23 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (i386_optab): paddq and psubq, even in their MMX form, are
- available only with SSE2. Change the MMX additions introduced by SSE
- and 3DNow!A to CpuMMX2 (rather than CpuMMX). Indicate the 3DNow!A
- instructions by their now designated identifier (since combining i686
- and 3DNow! does not really imply 3DNow!A).
-
-2004-11-19 Alan Modra <amodra@bigpond.net.au>
-
- * msp430.h (struct rcodes_s, MSP430_RLC, msp430_rcodes,
- struct hcodes_s, msp430_hcodes): Move to gas/config/tc-msp430.c.
-
-2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
- Vineet Sharma <vineets@noida.hcltech.com>
-
- * maxq.h: New file: Disassembly information for the maxq port.
-
-2004-11-05 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Put back "movzb".
-
-2004-11-04 Hans-Peter Nilsson <hp@axis.com>
-
- * cris.h (enum cris_insn_version_usage): Tweak formatting and
- comments. Remove member cris_ver_sim. Add members
- cris_ver_sim_v0_10, cris_ver_v0_10, cris_ver_v3_10,
- cris_ver_v8_10, cris_ver_v10, cris_ver_v10p.
- (struct cris_support_reg, struct cris_cond15): New types.
- (cris_conds15): Declare.
- (JUMP_PC_INCR_OPCODE_V32, BA_DWORD_OPCODE, NOP_OPCODE_COMMON)
- (NOP_OPCODE_ZBITS_COMMON, LAPC_DWORD_OPCODE, LAPC_DWORD_Z_BITS)
- (NOP_OPCODE_V32, NOP_Z_BITS_V32): New macros.
- (NOP_Z_BITS): Define in terms of NOP_OPCODE.
- (cris_imm_oprnd_size_type): New members SIZE_FIELD_SIGNED and
- SIZE_FIELD_UNSIGNED.
-
-2004-11-04 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (sldx_Suf): Remove.
- (FP, l_FP, sl_FP, x_FP): Don't imply IgnoreSize.
- (q_FP): Define, implying no REX64.
- (x_FP, sl_FP): Imply FloatMF.
- (i386_optab): Split reg and mem forms of moving from segment registers
- so that the memory forms can ignore the 16-/32-bit operand size
- distinction. Adjust a few others for Intel mode. Remove *FP uses from
- all non-floating-point instructions. Unite 32- and 64-bit forms of
- movsx, movzx, and movd. Adjust floating point operations for the above
- changes to the *FP macros. Add DefaultSize to floating point control
- insns operating on larger memory ranges. Remove left over comments
- hinting at certain insns being Intel-syntax ones where the ones
- actually meant are already gone.
-
-2004-10-07 Tomer Levi <Tomer.Levi@nsc.com>
-
- * crx.h: Add COPS_REG_INS - Coprocessor Special register
- instruction type.
-
-2004-09-30 Paul Brook <paul@codesourcery.com>
-
- * arm.h (ARM_EXT_V6K, ARM_EXT_V6Z): Define.
- (ARM_ARCH_V6K, ARM_ARCH_V6Z, ARM_ARCH_V6ZK): Define.
-
-2004-09-11 Theodore A. Roth <troth@openavr.org>
-
- * avr.h: Add support for
- atmega48, atmega88, atmega168, attiny13, attiny2313, at90can128.
-
-2004-09-09 Segher Boessenkool <segher@kernel.crashing.org>
-
- * ppc.h (PPC_OPERAND_OPTIONAL): Fix comment.
-
-2004-08-24 Dmitry Diky <diwil@spec.ru>
-
- * msp430.h (msp430_opc): Add new instructions.
- (msp430_rcodes): Declare new instructions.
- (msp430_hcodes): Likewise..
-
-2004-08-13 Nick Clifton <nickc@redhat.com>
-
- PR/301
- * h8300.h (O_JSR): Do not allow VECIND addressing for non-SX
- processors.
-
-2004-08-30 Michal Ludvig <mludvig@suse.cz>
-
- * i386.h (i386_optab): Added montmul/xsha1/xsha256 insns.
-
-2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Allow cs/ds in 64bit for branch hints.
-
-2004-07-21 Jan Beulich <jbeulich@novell.com>
-
- * i386.h: Adjust instruction descriptions to better match the
- specification.
-
-2004-07-16 Richard Earnshaw <rearnsha@arm.com>
-
- * arm.h: Remove all old content. Replace with architecture defines
- from gas/config/tc-arm.c.
-
-2004-07-09 Andreas Schwab <schwab@suse.de>
-
- * m68k.h: Fix comment.
-
-2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
-
- * crx.h: New file.
-
-2004-06-24 Alan Modra <amodra@bigpond.net.au>
-
- * i386.h (i386_optab): Remove fildd, fistpd and fisttpd.
-
-2004-05-24 Peter Barada <peter@the-baradas.com>
-
- * m68k.h: Add 'size' to m68k_opcode.
-
-2004-05-05 Peter Barada <peter@the-baradas.com>
-
- * m68k.h: Switch from ColdFire chip name to core variant.
-
-2004-04-22 Peter Barada <peter@the-baradas.com>
-
- * m68k.h: Add mcfmac/mcfemac definitions. Update operand
- descriptions for new EMAC cases.
- Remove ColdFire macmw/macml/msacmw/msacmw hacks and properly
- handle Motorola MAC syntax.
- Allow disassembly of ColdFire V4e object files.
-
-2004-03-16 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h (PPC_OPERAND_GPR_0): Define. Bump other operand defines.
-
-2004-03-12 Jakub Jelinek <jakub@redhat.com>
-
- * i386.h (i386_optab): Remove CpuNo64 from sysenter and sysexit.
-
-2004-03-12 Michal Ludvig <mludvig@suse.cz>
-
- * i386.h (i386_optab): Added xstore as an alias for xstorerng.
-
-2004-03-12 Michal Ludvig <mludvig@suse.cz>
-
- * i386.h (i386_optab): Added xstore/xcrypt insns.
-
-2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
-
- * h8300.h (32bit ldc/stc): Add relaxing support.
-
-2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
-
- * h8300.h (BITOP): Pass MEMRELAX flag.
-
-2004-01-09 Anil Paranjpe <anilp1@KPITCummins.com>
-
- * h8300.h (BITOP): Dissallow operations on @aa:16 and @aa:32
- except for the H8S.
-
-For older changes see ChangeLog-9103
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
-2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
- Yukishige Shibata <shibata@rd.scei.sony.co.jp>
- Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
- Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
- Alan Modra <amodra@bigpond.net.au>
-
- * spu-insns.h: New file.
- * spu.h: New file.
-
-2006-10-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
-
- * ppc.h (PPC_OPCODE_CELL): Define.
-
-2006-10-23 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
-
- * i386.h : Modify opcode to support for the change in POPCNT opcode
- in amdfam10 architecture.
-
-2006-09-28 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h: Replace CpuMNI with CpuSSSE3.
-
-2006-09-26 Mark Shinwell <shinwell@codesourcery.com>
- Joseph Myers <joseph@codesourcery.com>
- Ian Lance Taylor <ian@wasabisystems.com>
- Ben Elliston <bje@wasabisystems.com>
-
- * arm.h (ARM_CEXT_IWMMXT2, ARM_ARCH_IWMMXT2): Define.
-
-2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
-
- * score-datadep.h: New file.
- * score-inst.h: New file.
-
2006-07-14 H.J. Lu <hongjiu.lu@intel.com>
* i386.h (i386_optab): Remove InvMem from maskmovq, movhlps,
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
index 24a89cf..f142fca 100644
--- a/include/opcode/arm.h
+++ b/include/opcode/arm.h
@@ -49,7 +49,6 @@
#define ARM_CEXT_XSCALE 0x00000001 /* Allow MIA etc. */
#define ARM_CEXT_MAVERICK 0x00000002 /* Use Cirrus/DSP coprocessor. */
#define ARM_CEXT_IWMMXT 0x00000004 /* Intel Wireless MMX technology coprocessor. */
-#define ARM_CEXT_IWMMXT2 0x00000008 /* Intel Wireless MMX technology coprocessor version 2. */
#define FPU_ENDIAN_PURE 0x80000000 /* Pure-endian doubles. */
#define FPU_ENDIAN_BIG 0 /* Double words-big-endian. */
@@ -104,8 +103,6 @@
#define ARM_ARCH_XSCALE ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE)
#define ARM_ARCH_IWMMXT \
ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE | ARM_CEXT_IWMMXT)
-#define ARM_ARCH_IWMMXT2 \
- ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE | ARM_CEXT_IWMMXT | ARM_CEXT_IWMMXT2)
#define FPU_VFP_V1xD (FPU_VFP_EXT_V1xD | FPU_ENDIAN_PURE)
#define FPU_VFP_V1 (FPU_VFP_V1xD | FPU_VFP_EXT_V1)
diff --git a/include/opcode/i386.h b/include/opcode/i386.h
index 3e91aa0..c66ca32 100644
--- a/include/opcode/i386.h
+++ b/include/opcode/i386.h
@@ -1328,38 +1328,38 @@ static const template i386_optab[] =
{"punpckhqdq",2, 0x660f6d, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"punpcklqdq",2, 0x660f6c, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-/* SSE-3 instructions. */
-
-{"addsubpd", 2, 0x660fd0, X, CpuSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"addsubps", 2, 0xf20fd0, X, CpuSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpxchg16b",1, 0x0fc7, 1, CpuSSE3|Cpu64, NoSuf|Modrm|Rex64, { LLongMem, 0, 0} },
-{"fisttp", 1, 0xdf, 1, CpuSSE3, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
-{"fisttp", 1, 0xdd, 1, CpuSSE3, q_FP|Modrm, { LLongMem, 0, 0} },
-{"fisttpll", 1, 0xdd, 1, CpuSSE3, FP|Modrm, { LLongMem, 0, 0} },
-{"haddpd", 2, 0x660f7c, X, CpuSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"haddps", 2, 0xf20f7c, X, CpuSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"hsubpd", 2, 0x660f7d, X, CpuSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"hsubps", 2, 0xf20f7d, X, CpuSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"lddqu", 2, 0xf20ff0, X, CpuSSE3, NoSuf|IgnoreSize|Modrm, { LLongMem, RegXMM, 0 } },
-{"monitor", 0, 0x0f01, 0xc8, CpuSSE3, NoSuf|ImmExt, { 0, 0, 0} },
+/* Prescott New Instructions. */
+
+{"addsubpd", 2, 0x660fd0, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"addsubps", 2, 0xf20fd0, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"cmpxchg16b",1, 0x0fc7, 1, CpuPNI|Cpu64, NoSuf|Modrm|Rex64, { LLongMem, 0, 0} },
+{"fisttp", 1, 0xdf, 1, CpuPNI, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
+{"fisttp", 1, 0xdd, 1, CpuPNI, q_FP|Modrm, { LLongMem, 0, 0} },
+{"fisttpll", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} },
+{"haddpd", 2, 0x660f7c, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"haddps", 2, 0xf20f7c, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"hsubpd", 2, 0x660f7d, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"hsubps", 2, 0xf20f7d, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"lddqu", 2, 0xf20ff0, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { LLongMem, RegXMM, 0 } },
+{"monitor", 0, 0x0f01, 0xc8, CpuPNI, NoSuf|ImmExt, { 0, 0, 0} },
/* monitor is very special. CX and DX are always 64bits with zero upper
32bits in 64bit mode, and 32bits in 16bit and 32bit modes. The
address size override prefix can be used to overrride the AX size in
all modes. */
/* Need to ensure only "monitor %eax/%ax,%ecx,%edx" is accepted. */
-{"monitor", 3, 0x0f01, 0xc8, CpuSSE3|CpuNo64, NoSuf|ImmExt, { Reg16|Reg32, Reg32, Reg32 } },
+{"monitor", 3, 0x0f01, 0xc8, CpuPNI|CpuNo64, NoSuf|ImmExt, { Reg16|Reg32, Reg32, Reg32 } },
/* Need to ensure only "monitor %rax/%eax,%rcx,%rdx" is accepted. */
-{"monitor", 3, 0x0f01, 0xc8, CpuSSE3|Cpu64, NoSuf|ImmExt|NoRex64, { Reg32|Reg64, Reg64, Reg64 } },
-{"movddup", 2, 0xf20f12, X, CpuSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movshdup", 2, 0xf30f16, X, CpuSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movsldup", 2, 0xf30f12, X, CpuSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"mwait", 0, 0x0f01, 0xc9, CpuSSE3, NoSuf|ImmExt, { 0, 0, 0} },
+{"monitor", 3, 0x0f01, 0xc8, CpuPNI|Cpu64, NoSuf|ImmExt|NoRex64, { Reg32|Reg64, Reg64, Reg64 } },
+{"movddup", 2, 0xf20f12, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"movshdup", 2, 0xf30f16, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"movsldup", 2, 0xf30f12, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"mwait", 0, 0x0f01, 0xc9, CpuPNI, NoSuf|ImmExt, { 0, 0, 0} },
/* mwait is very special. AX and CX are always 64bits with zero upper
32bits in 64bit mode, and 32bits in 16bit and 32bit modes. */
/* Need to ensure only "mwait %eax,%ecx" is accepted. */
-{"mwait", 2, 0x0f01, 0xc9, CpuSSE3|CpuNo64, NoSuf|ImmExt, { Reg32, Reg32, 0} },
+{"mwait", 2, 0x0f01, 0xc9, CpuPNI|CpuNo64, NoSuf|ImmExt, { Reg32, Reg32, 0} },
/* Need to ensure only "mwait %rax,%rcx" is accepted. */
-{"mwait", 2, 0x0f01, 0xc9, CpuSSE3|Cpu64, NoSuf|ImmExt|NoRex64, { Reg64, Reg64, 0} },
+{"mwait", 2, 0x0f01, 0xc9, CpuPNI|Cpu64, NoSuf|ImmExt|NoRex64, { Reg64, Reg64, 0} },
/* VMX instructions. */
{"vmcall", 0, 0x0f01, 0xc1, CpuVMX, NoSuf|ImmExt, { 0, 0, 0} },
@@ -1375,40 +1375,40 @@ static const template i386_optab[] =
{"vmxoff", 0, 0x0f01, 0xc4, CpuVMX, NoSuf|ImmExt, { 0, 0, 0} },
{"vmxon", 1, 0xf30fc7, 6, CpuVMX, NoSuf|IgnoreSize|Modrm|NoRex64, { LLongMem, 0, 0} },
-/* Supplemental Streaming SIMD extensions 3 Instructions. */
-
-{"phaddw", 2, 0x0f3801,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"phaddw", 2, 0x660f3801,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"phaddd", 2, 0x0f3802,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"phaddd", 2, 0x660f3802,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"phaddsw", 2, 0x0f3803,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"phaddsw", 2, 0x660f3803,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"phsubw", 2, 0x0f3805,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"phsubw", 2, 0x660f3805,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"phsubd", 2, 0x0f3806,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"phsubd", 2, 0x660f3806,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"phsubsw", 2, 0x0f3807,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"phsubsw", 2, 0x660f3807,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmaddubsw", 2, 0x0f3804,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmaddubsw", 2, 0x660f3804,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmulhrsw", 2, 0x0f380b,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmulhrsw", 2, 0x660f380b,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pshufb", 2, 0x0f3800,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pshufb", 2, 0x660f3800,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psignb", 2, 0x0f3808,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psignb", 2, 0x660f3808,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psignw", 2, 0x0f3809,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psignw", 2, 0x660f3809,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psignd", 2, 0x0f380a,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psignd", 2, 0x660f380a,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"palignr", 3, 0x0f3a0f,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { Imm8, RegMMX|LongMem, RegMMX } },
-{"palignr", 3, 0x660f3a0f,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"pabsb", 2, 0x0f381c,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pabsb", 2, 0x660f381c,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pabsw", 2, 0x0f381d,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pabsw", 2, 0x660f381d,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pabsd", 2, 0x0f381e,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pabsd", 2, 0x660f381e,X, CpuSSSE3, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+/* Merom New Instructions. */
+
+{"phaddw", 2, 0x0f3801,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"phaddw", 2, 0x660f3801,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"phaddd", 2, 0x0f3802,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"phaddd", 2, 0x660f3802,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"phaddsw", 2, 0x0f3803,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"phaddsw", 2, 0x660f3803,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"phsubw", 2, 0x0f3805,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"phsubw", 2, 0x660f3805,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"phsubd", 2, 0x0f3806,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"phsubd", 2, 0x660f3806,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"phsubsw", 2, 0x0f3807,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"phsubsw", 2, 0x660f3807,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"pmaddubsw", 2, 0x0f3804,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pmaddubsw", 2, 0x660f3804,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"pmulhrsw", 2, 0x0f380b,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pmulhrsw", 2, 0x660f380b,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"pshufb", 2, 0x0f3800,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pshufb", 2, 0x660f3800,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"psignb", 2, 0x0f3808,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psignb", 2, 0x660f3808,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"psignw", 2, 0x0f3809,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psignw", 2, 0x660f3809,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"psignd", 2, 0x0f380a,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"psignd", 2, 0x660f380a,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"palignr", 3, 0x0f3a0f,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { Imm8, RegMMX|LongMem, RegMMX } },
+{"palignr", 3, 0x660f3a0f,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
+{"pabsb", 2, 0x0f381c,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pabsb", 2, 0x660f381c,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"pabsw", 2, 0x0f381d,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pabsw", 2, 0x660f381d,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"pabsd", 2, 0x0f381e,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
+{"pabsd", 2, 0x660f381e,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
/* AMD 3DNow! instructions. */
@@ -1472,7 +1472,7 @@ static const template i386_optab[] =
{"insertq", 4, 0xf20f78, X, CpuSSE4a, NoSuf|IgnoreSize|Modrm, { Imm8, Imm8, RegXMM, RegXMM} },
/* ABM instructions */
-{"popcnt", 2, 0xf30fb8, X, CpuABM, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
+{"popcnt", 2, 0x0fb8, X, CpuABM, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
{"lzcnt", 2, 0xf30fbd, X, CpuABM, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h
index 2205bd6..fc4d41f 100644
--- a/include/opcode/ppc.h
+++ b/include/opcode/ppc.h
@@ -143,8 +143,6 @@ extern const int powerpc_num_opcodes;
/* Opcode is only supported by Power6 architecture. */
#define PPC_OPCODE_POWER6 0x4000000
-/* Opcode is only supported by PowerPC Cell family. */
-#define PPC_OPCODE_CELL 0x8000000
/* A macro to extract the major opcode from an instruction. */
#define PPC_OP(i) (((i) >> 26) & 0x3f)
diff --git a/include/opcode/score-datadep.h b/include/opcode/score-datadep.h
deleted file mode 100644
index 8ef35ad..0000000
--- a/include/opcode/score-datadep.h
+++ /dev/null
@@ -1,282 +0,0 @@
-/* score-datadep.h -- Score Instructions data dependency table
- Copyright 2006 Free Software Foundation, Inc.
- Contributed by:
- Mei Ligang (ligang@sunnorth.com.cn)
- Pei-Lin Tsai (pltsai@sunplus.com)
-
- 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 2, 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, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#ifndef SCORE_DATA_DEPENDENCY_H
-#define SCORE_DATA_DEPENDENCY_H
-
-#define INSN_NAME_LEN 16
-
-enum insn_type_for_dependency
-{
- D_pce,
- D_cond_br,
- D_cond_mv,
- D_cached,
- D_cachei,
- D_ldst,
- D_ldcombine,
- D_mtcr,
- D_mfcr,
- D_mfsr,
- D_mftlb,
- D_mtptlb,
- D_mtrtlb,
- D_stlb,
- D_all_insn
-};
-
-struct insn_to_dependency
-{
- char *insn_name;
- enum insn_type_for_dependency type;
-};
-
-struct data_dependency
-{
- enum insn_type_for_dependency pre_insn_type;
- char pre_reg[6];
- enum insn_type_for_dependency cur_insn_type;
- char cur_reg[6];
- int bubblenum_7;
- int bubblenum_5;
- int warn_or_error; /* warning - 0; error - 1 */
-};
-
-static const struct insn_to_dependency insn_to_dependency_table[] =
-{
- /* pce instruction. */
- {"pce", D_pce},
- /* conditional branch instruction. */
- {"bcs", D_cond_br},
- {"bcc", D_cond_br},
- {"bgtu", D_cond_br},
- {"bleu", D_cond_br},
- {"beq", D_cond_br},
- {"bne", D_cond_br},
- {"bgt", D_cond_br},
- {"ble", D_cond_br},
- {"bge", D_cond_br},
- {"blt", D_cond_br},
- {"bmi", D_cond_br},
- {"bpl", D_cond_br},
- {"bvs", D_cond_br},
- {"bvc", D_cond_br},
- {"bcsl", D_cond_br},
- {"bccl", D_cond_br},
- {"bgtul", D_cond_br},
- {"bleul", D_cond_br},
- {"beql", D_cond_br},
- {"bnel", D_cond_br},
- {"bgtl", D_cond_br},
- {"blel", D_cond_br},
- {"bgel", D_cond_br},
- {"bltl", D_cond_br},
- {"bmil", D_cond_br},
- {"bpll", D_cond_br},
- {"bvsl", D_cond_br},
- {"bvcl", D_cond_br},
- {"bcs!", D_cond_br},
- {"bcc!", D_cond_br},
- {"bgtu!", D_cond_br},
- {"bleu!", D_cond_br},
- {"beq!", D_cond_br},
- {"bne!", D_cond_br},
- {"bgt!", D_cond_br},
- {"ble!", D_cond_br},
- {"bge!", D_cond_br},
- {"blt!", D_cond_br},
- {"bmi!", D_cond_br},
- {"bpl!", D_cond_br},
- {"bvs!", D_cond_br},
- {"bvc!", D_cond_br},
- {"brcs", D_cond_br},
- {"brcc", D_cond_br},
- {"brgtu", D_cond_br},
- {"brleu", D_cond_br},
- {"breq", D_cond_br},
- {"brne", D_cond_br},
- {"brgt", D_cond_br},
- {"brle", D_cond_br},
- {"brge", D_cond_br},
- {"brlt", D_cond_br},
- {"brmi", D_cond_br},
- {"brpl", D_cond_br},
- {"brvs", D_cond_br},
- {"brvc", D_cond_br},
- {"brcsl", D_cond_br},
- {"brccl", D_cond_br},
- {"brgtul", D_cond_br},
- {"brleul", D_cond_br},
- {"breql", D_cond_br},
- {"brnel", D_cond_br},
- {"brgtl", D_cond_br},
- {"brlel", D_cond_br},
- {"brgel", D_cond_br},
- {"brltl", D_cond_br},
- {"brmil", D_cond_br},
- {"brpll", D_cond_br},
- {"brvsl", D_cond_br},
- {"brvcl", D_cond_br},
- {"brcs!", D_cond_br},
- {"brcc!", D_cond_br},
- {"brgtu!", D_cond_br},
- {"brleu!", D_cond_br},
- {"breq!", D_cond_br},
- {"brne!", D_cond_br},
- {"brgt!", D_cond_br},
- {"brle!", D_cond_br},
- {"brge!", D_cond_br},
- {"brlt!", D_cond_br},
- {"brmi!", D_cond_br},
- {"brpl!", D_cond_br},
- {"brvs!", D_cond_br},
- {"brvc!", D_cond_br},
- {"brcsl!", D_cond_br},
- {"brccl!", D_cond_br},
- {"brgtul!", D_cond_br},
- {"brleul!", D_cond_br},
- {"breql!", D_cond_br},
- {"brnel!", D_cond_br},
- {"brgtl!", D_cond_br},
- {"brlel!", D_cond_br},
- {"brgel!", D_cond_br},
- {"brltl!", D_cond_br},
- {"brmil!", D_cond_br},
- {"brpll!", D_cond_br},
- {"brvsl!", D_cond_br},
- {"brvcl!", D_cond_br},
- /* conditional move instruction. */
- {"mvcs", D_cond_mv},
- {"mvcc", D_cond_mv},
- {"mvgtu", D_cond_mv},
- {"mvleu", D_cond_mv},
- {"mveq", D_cond_mv},
- {"mvne", D_cond_mv},
- {"mvgt", D_cond_mv},
- {"mvle", D_cond_mv},
- {"mvge", D_cond_mv},
- {"mvlt", D_cond_mv},
- {"mvmi", D_cond_mv},
- {"mvpl", D_cond_mv},
- {"mvvs", D_cond_mv},
- {"mvvc", D_cond_mv},
- /* move spectial instruction. */
- {"mtcr", D_mtcr},
- {"mftlb", D_mftlb},
- {"mtptlb", D_mtptlb},
- {"mtrtlb", D_mtrtlb},
- {"stlb", D_stlb},
- {"mfcr", D_mfcr},
- {"mfsr", D_mfsr},
- /* cache instruction. */
- {"cache 8", D_cached},
- {"cache 9", D_cached},
- {"cache 10", D_cached},
- {"cache 11", D_cached},
- {"cache 12", D_cached},
- {"cache 13", D_cached},
- {"cache 14", D_cached},
- {"cache 24", D_cached},
- {"cache 26", D_cached},
- {"cache 27", D_cached},
- {"cache 29", D_cached},
- {"cache 30", D_cached},
- {"cache 31", D_cached},
- {"cache 0", D_cachei},
- {"cache 1", D_cachei},
- {"cache 2", D_cachei},
- {"cache 3", D_cachei},
- {"cache 4", D_cachei},
- {"cache 16", D_cachei},
- {"cache 17", D_cachei},
- /* load/store instruction. */
- {"lb", D_ldst},
- {"lbu", D_ldst},
- {"lbu!", D_ldst},
- {"lbup!", D_ldst},
- {"lh", D_ldst},
- {"lhu", D_ldst},
- {"lh!", D_ldst},
- {"lhp!", D_ldst},
- {"lw", D_ldst},
- {"lw!", D_ldst},
- {"lwp!", D_ldst},
- {"sb", D_ldst},
- {"sb!", D_ldst},
- {"sbp!", D_ldst},
- {"sh", D_ldst},
- {"sh!", D_ldst},
- {"shp!", D_ldst},
- {"sw", D_ldst},
- {"sw!", D_ldst},
- {"swp!", D_ldst},
- {"alw", D_ldst},
- {"asw", D_ldst},
- {"push!", D_ldst},
- {"pushhi!", D_ldst},
- {"pop!", D_ldst},
- {"pophi!", D_ldst},
- {"ldc1", D_ldst},
- {"ldc2", D_ldst},
- {"ldc3", D_ldst},
- {"stc1", D_ldst},
- {"stc2", D_ldst},
- {"stc3", D_ldst},
- {"scb", D_ldst},
- {"scw", D_ldst},
- {"sce", D_ldst},
- /* load combine instruction. */
- {"lcb", D_ldcombine},
- {"lcw", D_ldcombine},
- {"lce", D_ldcombine},
-};
-
-static const struct data_dependency data_dependency_table[] =
-{
- /* Condition register. */
- {D_mtcr, "cr1", D_pce, "", 2, 1, 1},
- {D_mtcr, "cr1", D_cond_br, "", 1, 0, 1},
- {D_mtcr, "cr1", D_cond_mv, "", 1, 0, 1},
- /* Status regiser. */
- {D_mtcr, "cr0", D_all_insn, "", 5, 4, 0},
- /* CCR regiser. */
- {D_mtcr, "cr4", D_all_insn, "", 6, 5, 0},
- /* EntryHi/EntryLo register. */
- {D_mftlb, "", D_mtptlb, "", 1, 1, 1},
- {D_mftlb, "", D_mtrtlb, "", 1, 1, 1},
- {D_mftlb, "", D_stlb, "", 1, 1,1},
- {D_mftlb, "", D_mfcr, "cr11", 1, 1, 1},
- {D_mftlb, "", D_mfcr, "cr12", 1, 1, 1},
- /* Index register. */
- {D_stlb, "", D_mtptlb, "", 1, 1, 1},
- {D_stlb, "", D_mftlb, "", 1, 1, 1},
- {D_stlb, "", D_mfcr, "cr8", 2, 2, 1},
- /* Cache. */
- {D_cached, "", D_ldst, "", 1, 1, 0},
- {D_cached, "", D_ldcombine, "", 1, 1, 0},
- {D_cachei, "", D_all_insn, "", 5, 4, 0},
- /* Load combine. */
- {D_ldcombine, "", D_mfsr, "sr1", 3, 3, 1},
-};
-
-#endif
diff --git a/include/opcode/score-inst.h b/include/opcode/score-inst.h
deleted file mode 100644
index e87794f..0000000
--- a/include/opcode/score-inst.h
+++ /dev/null
@@ -1,507 +0,0 @@
-/* score-inst.h -- Score Instructions Table
- Copyright 2006 Free Software Foundation, Inc.
- Contributed by:
- Mei Ligang (ligang@sunnorth.com.cn)
- Pei-Lin Tsai (pltsai@sunplus.com)
-
- 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 2, 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, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#ifndef SCORE_INST_H
-#define SCORE_INST_H
-
-#define LDST_UNALIGN_MASK 0x0000007f
-#define UA_LCB 0x00000060
-#define UA_LCW 0x00000062
-#define UA_LCE 0x00000066
-#define UA_SCB 0x00000068
-#define UA_SCW 0x0000006a
-#define UA_SCE 0x0000006e
-#define UA_LL 0x0000000c
-#define UA_SC 0x0000000e
-#define LDST16_RR_MASK 0x0000000f
-#define N16_LW 8
-#define N16_LH 9
-#define N16_POP 10
-#define N16_LBU 11
-#define N16_SW 12
-#define N16_SH 13
-#define N16_PUSH 14
-#define N16_SB 15
-#define LDST16_RI_MASK 0x7007
-#define N16_LWP 0x7000
-#define N16_LHP 0x7001
-#define N16_LBUP 0x7003
-#define N16_SWP 0x7004
-#define N16_SHP 0x7005
-#define N16_SBP 0x7007
-#define N16_LIU 0x5000
-
-#define OPC_PSEUDOLDST_MASK 0x00000007
-
-enum
-{
- INSN_LW = 0,
- INSN_LH = 1,
- INSN_LHU = 2,
- INSN_LB = 3,
- INSN_SW = 4,
- INSN_SH = 5,
- INSN_LBU = 6,
- INSN_SB = 7,
-};
-
-/* Sub opcdoe opcode. */
-enum
-{
- INSN16_LBU = 11,
- INSN16_LH = 9,
- INSN16_LW = 8,
- INSN16_SB = 15,
- INSN16_SH = 13,
- INSN16_SW = 12,
-};
-
-enum
-{
- LDST_NOUPDATE = 0,
- LDST_PRE = 1,
- LDST_POST = 2,
-};
-
-enum score_insn_type
-{
- Rd_I4,
- Rd_I5,
- Rd_rvalueBP_I5,
- Rd_lvalueBP_I5,
- Rd_Rs_I5,
- x_Rs_I5,
- x_I5_x,
- Rd_I8,
- Rd_Rs_I14,
- I15,
- Rd_I16,
- Rd_rvalueRs_SI10,
- Rd_lvalueRs_SI10,
- Rd_rvalueRs_preSI12,
- Rd_rvalueRs_postSI12,
- Rd_lvalueRs_preSI12,
- Rd_lvalueRs_postSI12,
- Rd_Rs_SI14,
- Rd_rvalueRs_SI15,
- Rd_lvalueRs_SI15,
- Rd_SI16,
- PC_DISP8div2,
- PC_DISP11div2,
- PC_DISP19div2,
- PC_DISP24div2,
- Rd_Rs_Rs,
- x_Rs_x,
- x_Rs_Rs,
- Rd_Rs_x,
- Rd_x_Rs,
- Rd_x_x,
- Rd_Rs,
- Rd_HighRs,
- Rd_lvalueRs,
- Rd_rvalueRs,
- Rd_lvalue32Rs,
- Rd_rvalue32Rs,
- x_Rs,
- NO_OPD,
- NO16_OPD,
- OP5_rvalueRs_SI15,
- I5_Rs_Rs_I5_OP5,
- x_rvalueRs_post4,
- Rd_rvalueRs_post4,
- Rd_x_I5,
- Rd_lvalueRs_post4,
- x_lvalueRs_post4,
- Rd_LowRs,
- Rd_Rs_Rs_imm,
- Insn_Type_PCE,
- Insn_Type_SYN,
- Insn_GP,
- Insn_PIC,
- Insn_internal,
-};
-
-enum score_data_type
-{
- _IMM4 = 0,
- _IMM5,
- _IMM8,
- _IMM14,
- _IMM15,
- _IMM16,
- _SIMM10 = 6,
- _SIMM12,
- _SIMM14,
- _SIMM15,
- _SIMM16,
- _SIMM14_NEG = 11,
- _IMM16_NEG,
- _SIMM16_NEG,
- _IMM20,
- _IMM25,
- _DISP8div2 = 16,
- _DISP11div2,
- _DISP19div2,
- _DISP24div2,
- _VALUE,
- _VALUE_HI16,
- _VALUE_LO16,
- _VALUE_LDST_LO16 = 23,
- _SIMM16_LA,
- _IMM5_RSHIFT_1,
- _IMM5_RSHIFT_2,
- _SIMM16_LA_POS,
- _IMM5_RANGE_8_31,
- _IMM10_RSHIFT_2,
- _GP_IMM15 = 30,
- _GP_IMM14 = 31,
- _SIMM16_pic = 42, /* Index in score_df_range. */
- _IMM16_LO16_pic = 43,
- _IMM16_pic = 44,
-};
-
-#define REG_TMP 1
-
-#define OP_REG_TYPE (1 << 6)
-#define OP_IMM_TYPE (1 << 7)
-#define OP_SH_REGD (OP_REG_TYPE |20)
-#define OP_SH_REGS1 (OP_REG_TYPE |15)
-#define OP_SH_REGS2 (OP_REG_TYPE |10)
-#define OP_SH_I (OP_IMM_TYPE | 1)
-#define OP_SH_RI15 (OP_IMM_TYPE | 0)
-#define OP_SH_I12 (OP_IMM_TYPE | 3)
-#define OP_SH_DISP24 (OP_IMM_TYPE | 1)
-#define OP_SH_DISP19_p1 (OP_IMM_TYPE |15)
-#define OP_SH_DISP19_p2 (OP_IMM_TYPE | 1)
-#define OP_SH_I5 (OP_IMM_TYPE |10)
-#define OP_SH_I10 (OP_IMM_TYPE | 5)
-#define OP_SH_COPID (OP_IMM_TYPE | 5)
-#define OP_SH_TRAPI5 (OP_IMM_TYPE |15)
-#define OP_SH_I15 (OP_IMM_TYPE |10)
-
-#define OP16_SH_REGD (OP_REG_TYPE | 8)
-#define OP16_SH_REGS1 (OP_REG_TYPE | 4)
-#define OP16_SH_I45 (OP_IMM_TYPE | 3)
-#define OP16_SH_I8 (OP_IMM_TYPE | 0)
-#define OP16_SH_DISP8 (OP_IMM_TYPE | 0)
-#define OP16_SH_DISP11 (OP_IMM_TYPE | 1)
-
-struct datafield_range
-{
- int data_type;
- int bits;
- int range[2];
-};
-
-struct datafield_range score_df_range[] =
-{
- {_IMM4, 4, {0, (1 << 4) - 1}}, /* ( 0 ~ 15 ) */
- {_IMM5, 5, {0, (1 << 5) - 1}}, /* ( 0 ~ 31 ) */
- {_IMM8, 8, {0, (1 << 8) - 1}}, /* ( 0 ~ 255 ) */
- {_IMM14, 14, {0, (1 << 14) - 1}}, /* ( 0 ~ 16383) */
- {_IMM15, 15, {0, (1 << 15) - 1}}, /* ( 0 ~ 32767) */
- {_IMM16, 16, {0, (1 << 16) - 1}}, /* ( 0 ~ 65535) */
- {_SIMM10, 10, {-(1 << 9), (1 << 9) - 1}}, /* ( -512 ~ 511 ) */
- {_SIMM12, 12, {-(1 << 11), (1 << 11) - 1}}, /* ( -2048 ~ 2047 ) */
- {_SIMM14, 14, {-(1 << 13), (1 << 13) - 1}}, /* ( -8192 ~ 8191 ) */
- {_SIMM15, 15, {-(1 << 14), (1 << 14) - 1}}, /* (-16384 ~ 16383) */
- {_SIMM16, 16, {-(1 << 15), (1 << 15) - 1}}, /* (-32768 ~ 32767) */
- {_SIMM14_NEG, 14, {-(1 << 13), (1 << 13) - 1}}, /* ( -8191 ~ 8192 ) */
- {_IMM16_NEG, 16, {0, (1 << 16) - 1}}, /* (-65535 ~ 0 ) */
- {_SIMM16_NEG, 16, {-(1 << 15), (1 << 15) - 1}}, /* (-32768 ~ 32767) */
- {_IMM20, 20, {0, (1 << 20) - 1}},
- {_IMM25, 25, {0, (1 << 25) - 1}},
- {_DISP8div2, 8, {-(1 << 8), (1 << 8) - 1}}, /* ( -256 ~ 255 ) */
- {_DISP11div2, 11, {0, 0}},
- {_DISP19div2, 19, {-(1 << 19), (1 << 19) - 1}}, /* (-524288 ~ 524287) */
- {_DISP24div2, 24, {0, 0}},
- {_VALUE, 32, {0, ((unsigned int)1 << 31) - 1}},
- {_VALUE_HI16, 16, {0, (1 << 16) - 1}},
- {_VALUE_LO16, 16, {0, (1 << 16) - 1}},
- {_VALUE_LDST_LO16, 16, {0, (1 << 16) - 1}},
- {_SIMM16_LA, 16, {-(1 << 15), (1 << 15) - 1}}, /* (-32768 ~ 32767) */
- {_IMM5_RSHIFT_1, 5, {0, (1 << 6) - 1}}, /* ( 0 ~ 63 ) */
- {_IMM5_RSHIFT_2, 5, {0, (1 << 7) - 1}}, /* ( 0 ~ 127 ) */
- {_SIMM16_LA_POS, 16, {0, (1 << 15) - 1}}, /* ( 0 ~ 32767) */
- {_IMM5_RANGE_8_31, 5, {8, 31}}, /* But for cop0 the valid data : (8 ~ 31). */
- {_IMM10_RSHIFT_2, 10, {-(1 << 11), (1 << 11) - 1}}, /* For ldc#, stc#. */
- {_SIMM10, 10, {0, (1 << 10) - 1}}, /* ( -1024 ~ 1023 ) */
- {_SIMM12, 12, {0, (1 << 12) - 1}}, /* ( -2048 ~ 2047 ) */
- {_SIMM14, 14, {0, (1 << 14) - 1}}, /* ( -8192 ~ 8191 ) */
- {_SIMM15, 15, {0, (1 << 15) - 1}}, /* (-16384 ~ 16383) */
- {_SIMM16, 16, {0, (1 << 16) - 1}}, /* (-65536 ~ 65536) */
- {_SIMM14_NEG, 14, {0, (1 << 16) - 1}}, /* ( -8191 ~ 8192 ) */
- {_IMM16_NEG, 16, {0, (1 << 16) - 1}}, /* ( 65535 ~ 0 ) */
- {_SIMM16_NEG, 16, {0, (1 << 16) - 1}}, /* ( 65535 ~ 0 ) */
- {_IMM20, 20, {0, (1 << 20) - 1}}, /* (-32768 ~ 32767) */
- {_IMM25, 25, {0, (1 << 25) - 1}}, /* (-32768 ~ 32767) */
- {_GP_IMM15, 15, {0, (1 << 15) - 1}}, /* ( 0 ~ 65535) */
- {_GP_IMM14, 14, {0, (1 << 14) - 1}}, /* ( 0 ~ 65535) */
- {_SIMM16_pic, 16, {-(1 << 15), (1 << 15) - 1}}, /* (-32768 ~ 32767) */
- {_IMM16_LO16_pic, 16, {0, (1 << 16) - 1}}, /* ( 65535 ~ 0 ) */
- {_IMM16_pic, 16, {0, (1 << 16) - 1}}, /* ( 0 ~ 65535) */
-};
-
-struct shift_bitmask
-{
- int opd_type;
- int opd_num;
- struct datafield_range *df_range;
- int sh[4];
- long fieldbits[4];
-};
-
-struct shift_bitmask score_sh_bits_map[] =
-{
- {
- Rd_I4, 2, &score_df_range[_IMM4],
- {OP16_SH_REGD, OP16_SH_I45, 0, 0},
- {0xf, 0xf, 0, 0},
- },
- {
- Rd_I5, 2, &score_df_range[_IMM5],
- {OP16_SH_REGD, OP16_SH_I45, 0, 0},
- {0xf, 0x1f, 0, 0},
- },
- {
- Rd_rvalueBP_I5, 2, &score_df_range[_IMM5],
- {OP16_SH_REGD, OP16_SH_I45, 0, 0},
- {0xf, 0x1f, 0, 0},
- },
- {
- Rd_lvalueBP_I5, 2, &score_df_range[_IMM5],
- {OP16_SH_REGD, OP16_SH_I45, 0, 0},
- {0xf, 0x1f, 0, 0},
- },
- {
- Rd_Rs_I5, 3, &score_df_range[_IMM5],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I5, 0},
- {0x1f, 0x1f, 0x1f, 0},
- },
- {
- x_Rs_I5, 2, &score_df_range[_IMM5],
- {OP_SH_REGS1, OP_SH_I5, 0, 0},
- {0x1f, 0x1f, 0, 0},
- },
- {
- x_I5_x, 1, &score_df_range[_IMM5],
- {OP_SH_TRAPI5, 0, 0, 0},
- {0x1f, 0, 0, 0},
- },
- {
- Rd_I8, 2, &score_df_range[_IMM8],
- {OP16_SH_REGD, OP16_SH_I8, 0, 0},
- {0xf, 0xff, 0, 0},
- },
- {
- Rd_Rs_I14, 3, &score_df_range[_IMM14],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I, 0},
- {0x1f, 0x1f, 0x3fff, 0},
- },
- {
- I15, 1, &score_df_range[_IMM15],
- {OP_SH_I15, 0, 0, 0},
- {0x7fff, 0, 0, 0},
- },
- {
- Rd_I16, 2, &score_df_range[_IMM16],
- {OP_SH_REGD, OP_SH_I, 0, 0},
- {0x1f, 0xffff, 0, 0},
- },
- {
- Rd_rvalueRs_SI10, 3, &score_df_range[_SIMM10],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I10, 0},
- {0x1f, 0x1f, 0x3ff, 0},
- },
- {
- Rd_lvalueRs_SI10, 3, &score_df_range[_SIMM10],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I10, 0},
- {0x1f, 0x1f, 0x3ff, 0},
- },
- {
- Rd_rvalueRs_preSI12, 3, &score_df_range[_SIMM12],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I12, 0},
- {0xf, 0xf, 0xfff, 0},
- },
- {
- Rd_rvalueRs_postSI12, 3, &score_df_range[_SIMM12],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I12, 0},
- {0xf, 0xf, 0xfff, 0},
- },
- {
- Rd_lvalueRs_preSI12, 3, &score_df_range[_SIMM12],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I12, 0},
- {0xf, 0xf, 0xfff, 0},
- },
- {
- Rd_lvalueRs_postSI12, 3, &score_df_range[_SIMM12],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I12, 0},
- {0xf, 0xf, 0xfff, 0},
- },
- {
- Rd_Rs_SI14, 3, &score_df_range[_SIMM14],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I, 0},
- {0x1f, 0x1f, 0x3fff, 0},
- },
- {
- Rd_rvalueRs_SI15, 3, &score_df_range[_SIMM15],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_RI15, 0},
- {0x1f, 0x1f, 0x7fff, 0},
- },
- {
- Rd_lvalueRs_SI15, 3, &score_df_range[_SIMM15],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_RI15, 0},
- {0x1f, 0x1f, 0x7fff, 0},
- },
- {
- Rd_SI16, 2, &score_df_range[_SIMM16],
- {OP_SH_REGD, OP_SH_I, 0, 0},
- {0x1f, 0xffff, 0, 0},
- },
- {
- PC_DISP8div2, 1, &score_df_range[_DISP8div2],
- {OP16_SH_DISP8, 0, 0, 0},
- {0xff, 0, 0, 0},
- },
- {
- PC_DISP11div2, 1, &score_df_range[_DISP11div2],
- {OP16_SH_DISP11, 0, 0, 0},
- {0x7ff, 0, 0, 0},
- },
- {
- PC_DISP19div2, 2, &score_df_range[_DISP19div2],
- {OP_SH_DISP19_p1, OP_SH_DISP19_p2, 0, 0},
- {0x3ff, 0x1ff, 0, 0},
- },
- {
- PC_DISP24div2, 1, &score_df_range[_DISP24div2],
- {OP_SH_DISP24, 0, 0, 0},
- {0xffffff, 0, 0, 0},
- },
- {
- Rd_Rs_Rs, 3, NULL,
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_REGS2, 0},
- {0x1f, 0x1f, 0x1f, 0}
- },
- {
- Rd_Rs_x, 2, NULL,
- {OP_SH_REGD, OP_SH_REGS1, 0, 0},
- {0x1f, 0x1f, 0, 0},
- },
- {
- Rd_x_Rs, 2, NULL,
- {OP_SH_REGD, OP_SH_REGS2, 0, 0},
- {0x1f, 0x1f, 0, 0},
- },
- {
- Rd_x_x, 1, NULL,
- {OP_SH_REGD, 0, 0, 0},
- {0x1f, 0, 0, 0},
- },
- {
- x_Rs_Rs, 2, NULL,
- {OP_SH_REGS1, OP_SH_REGS2, 0, 0},
- {0x1f, 0x1f, 0, 0},
- },
- {
- x_Rs_x, 1, NULL,
- {OP_SH_REGS1, 0, 0, 0},
- {0x1f, 0, 0, 0},
- },
- {
- Rd_Rs, 2, NULL,
- {OP16_SH_REGD, OP16_SH_REGS1, 0, 0},
- {0xf, 0xf, 0, 0},
- },
- {
- Rd_HighRs, 2, NULL,
- {OP16_SH_REGD, OP16_SH_REGS1, 0, 0},
- {0xf, 0xf, 0x1f, 0},
- },
- {
- Rd_rvalueRs, 2, NULL,
- {OP16_SH_REGD, OP16_SH_REGS1, 0, 0},
- {0xf, 0xf, 0, 0},
- },
- {
- Rd_lvalueRs, 2, NULL,
- {OP16_SH_REGD, OP16_SH_REGS1, 0, 0},
- {0xf, 0xf, 0, 0}
- },
- {
- Rd_lvalue32Rs, 2, NULL,
- {OP_SH_REGD, OP_SH_REGS1, 0, 0},
- {0x1f, 0x1f, 0, 0},
- },
- {
- Rd_rvalue32Rs, 2, NULL,
- {OP_SH_REGD, OP_SH_REGS1, 0, 0},
- {0x1f, 0x1f, 0, 0},
- },
- {
- x_Rs, 1, NULL,
- {OP16_SH_REGS1, 0, 0, 0},
- {0xf, 0, 0, 0},
- },
- {
- NO_OPD, 0, NULL,
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- },
- {
- NO16_OPD, 0, NULL,
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- },
-};
-
-struct asm_opcode
-{
- /* Instruction name. */
- const char *template;
-
- /* Instruction Opcode. */
- unsigned long value;
-
- /* Instruction bit mask. */
- unsigned long bitmask;
-
- /* Relax instruction opcode. 0x8000 imply no relaxation. */
- unsigned long relax_value;
-
- /* Instruction type. */
- enum score_insn_type type;
-
- /* Function to call to parse args. */
- void (*parms) (char *);
-};
-
-enum insn_class
-{
- INSN_CLASS_16,
- INSN_CLASS_32,
- INSN_CLASS_PCE,
- INSN_CLASS_SYN
-};
-
-#endif
diff --git a/include/opcode/spu-insns.h b/include/opcode/spu-insns.h
deleted file mode 100644
index 99dc452..0000000
--- a/include/opcode/spu-insns.h
+++ /dev/null
@@ -1,410 +0,0 @@
-/* SPU ELF support for BFD.
-
- Copyright 2006 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. */
-
-/* SPU Opcode Table
-
--=-=-= FORMAT =-=-=-
-
- +----+-------+-------+-------+-------+ +------------+-------+-------+-------+
-RRR | op | RC | RB | RA | RT | RI7 | op | I7 | RA | RT |
- +----+-------+-------+-------+-------+ +------------+-------+-------+-------+
- 0 3 1 1 2 3 0 1 1 2 3
- 0 7 4 1 0 7 4 1
-
- +-----------+--------+-------+-------+ +---------+----------+-------+-------+
-RI8 | op | I8 | RA | RT | RI10 | op | I10 | RA | RT |
- +-----------+--------+-------+-------+ +---------+----------+-------+-------+
- 0 9 1 2 3 0 7 1 2 3
- 7 4 1 7 4 1
-
- +----------+-----------------+-------+ +--------+-------------------+-------+
-RI16 | op | I16 | RT | RI18 | op | I18 | RT |
- +----------+-----------------+-------+ +--------+-------------------+-------+
- 0 8 2 3 0 6 2 3
- 4 1 4 1
-
- +------------+-------+-------+-------+ +-------+--+-----------------+-------+
-RR | op | RB | RA | RT | LBT | op |RO| I16 | RO |
- +------------+-------+-------+-------+ +-------+--+-----------------+-------+
- 0 1 1 2 3 0 6 8 2 3
- 0 7 4 1 4 1
-
- +------------+----+--+-------+-------+
- LBTI | op | // |RO| RA | RO |
- +------------+----+--+-------+-------+
- 0 1 1 1 2 3
- 0 5 7 4 1
-
--=-=-= OPCODE =-=-=-
-
-OPCODE field specifies the most significant 11bit of the instruction. Some formats don't have 11bits for opcode field, and in this
-case, bit field other than op are defined as 0s. For example, opcode of fma instruction which is RRR format is defined as 0x700,
-since 0x700 -> 11'b11100000000, this means opcode is 4'b1110, and other 7bits are defined as 7'b0000000.
-
--=-=-= ASM_FORMAT =-=-=-
-
-RRR category RI7 category
- ASM_RRR mnemonic RC, RA, RB, RT ASM_RI4 mnemonic RT, RA, I4
- ASM_RI7 mnemonic RT, RA, I7
-
-RI8 category RI10 category
- ASM_RUI8 mnemonic RT, RA, UI8 ASM_AI10 mnemonic RA, I10
- ASM_RI10 mnemonic RT, RA, R10
- ASM_RI10IDX mnemonic RT, I10(RA)
-
-RI16 category RI18 category
- ASM_I16W mnemonic I16W ASM_RI18 mnemonic RT, I18
- ASM_RI16 mnemonic RT, I16
- ASM_RI16W mnemonic RT, I16W
-
-RR category LBT category
- ASM_MFSPR mnemonic RT, SA ASM_LBT mnemonic brinst, brtarg
- ASM_MTSPR mnemonic SA, RT
- ASM_NOOP mnemonic LBTI category
- ASM_RA mnemonic RA ASM_LBTI mnemonic brinst, RA
- ASM_RAB mnemonic RA, RB
- ASM_RDCH mnemonic RT, CA
- ASM_RR mnemonic RT, RA, RB
- ASM_RT mnemonic RT
- ASM_RTA mnemonic RT, RA
- ASM_WRCH mnemonic CA, RT
-
-Note that RRR instructions have the names for RC and RT reversed from
-what's in the ISA, in order to put RT in the same position it appears
-for other formats.
-
--=-=-= DEPENDENCY =-=-=-
-
-DEPENDENCY filed consists of 5 digits. This represents which register is used as source and which register is used as target.
-The first(most significant) digit is always 0. Then it is followd by RC, RB, RA and RT digits.
-If the digit is 0, this means the corresponding register is not used in the instruction.
-If the digit is 1, this means the corresponding register is used as a source in the instruction.
-If the digit is 2, this means the corresponding register is used as a target in the instruction.
-If the digit is 3, this means the corresponding register is used as both source and target in the instruction.
-For example, fms instruction has 00113 as the DEPENDENCY field. This means RC is not used in this operation, RB and RA are
-used as sources and RT is the target.
-
--=-=-= PIPE =-=-=-
-
-This field shows which execution pipe is used for the instruction
-
-pipe0 execution pipelines:
- FP6 SP floating pipeline
- FP7 integer operations executed in SP floating pipeline
- FPD DP floating pipeline
- FX2 FXU pipeline
- FX3 Rotate/Shift pipeline
- FXB Byte pipeline
- NOP No pipeline
-
-pipe1 execution pipelines:
- BR Branch pipeline
- LNOP No pipeline
- LS Load/Store pipeline
- SHUF Shuffle pipeline
- SPR SPR/CH pipeline
-
-*/
-
-#define _A0() {0}
-#define _A1(a) {1,a}
-#define _A2(a,b) {2,a,b}
-#define _A3(a,b,c) {3,a,b,c}
-#define _A4(a,b,c,d) {4,a,b,c,d}
-
-/* TAG FORMAT OPCODE MNEMONIC ASM_FORMAT DEPENDENCY PIPE COMMENT */
-/* 0[RC][RB][RA][RT] */
-/* 1:src, 2:target */
-
-APUOP(M_BR, RI16, 0x190, "br", _A1(A_R18), 00000, BR) /* BRel IP<-IP+I16 */
-APUOP(M_BRSL, RI16, 0x198, "brsl", _A2(A_T,A_R18), 00002, BR) /* BRelSetLink RT,IP<-IP,IP+I16 */
-APUOP(M_BRA, RI16, 0x180, "bra", _A1(A_S18), 00000, BR) /* BRAbs IP<-I16 */
-APUOP(M_BRASL, RI16, 0x188, "brasl", _A2(A_T,A_S18), 00002, BR) /* BRAbsSetLink RT,IP<-IP,I16 */
-APUOP(M_FSMBI, RI16, 0x194, "fsmbi", _A2(A_T,A_X16), 00002, SHUF) /* FormSelMask%I RT<-fsm(I16) */
-APUOP(M_LQA, RI16, 0x184, "lqa", _A2(A_T,A_S18), 00002, LS) /* LoadQAbs RT<-M[I16] */
-APUOP(M_LQR, RI16, 0x19C, "lqr", _A2(A_T,A_R18), 00002, LS) /* LoadQRel RT<-M[IP+I16] */
-APUOP(M_STOP, RR, 0x000, "stop", _A0(), 00000, BR) /* STOP stop */
-APUOP(M_STOP2, RR, 0x000, "stop", _A1(A_U14), 00000, BR) /* STOP stop */
-APUOP(M_STOPD, RR, 0x140, "stopd", _A3(A_T,A_A,A_B), 00111, BR) /* STOPD stop (with register dependencies) */
-APUOP(M_LNOP, RR, 0x001, "lnop", _A0(), 00000, LNOP) /* LNOP no_operation */
-APUOP(M_SYNC, RR, 0x002, "sync", _A0(), 00000, BR) /* SYNC flush_pipe */
-APUOP(M_DSYNC, RR, 0x003, "dsync", _A0(), 00000, BR) /* DSYNC flush_store_queue */
-APUOP(M_MFSPR, RR, 0x00c, "mfspr", _A2(A_T,A_S), 00002, SPR) /* MFSPR RT<-SA */
-APUOP(M_RDCH, RR, 0x00d, "rdch", _A2(A_T,A_H), 00002, SPR) /* ReaDCHannel RT<-CA:data */
-APUOP(M_RCHCNT, RR, 0x00f, "rchcnt", _A2(A_T,A_H), 00002, SPR) /* ReaDCHanCouNT RT<-CA:count */
-APUOP(M_HBRA, LBT, 0x080, "hbra", _A2(A_S11,A_S18), 00000, LS) /* HBRA BTB[B9]<-M[I16] */
-APUOP(M_HBRR, LBT, 0x090, "hbrr", _A2(A_S11,A_R18), 00000, LS) /* HBRR BTB[B9]<-M[IP+I16] */
-APUOP(M_BRZ, RI16, 0x100, "brz", _A2(A_T,A_R18), 00001, BR) /* BRZ IP<-IP+I16_if(RT) */
-APUOP(M_BRNZ, RI16, 0x108, "brnz", _A2(A_T,A_R18), 00001, BR) /* BRNZ IP<-IP+I16_if(RT) */
-APUOP(M_BRHZ, RI16, 0x110, "brhz", _A2(A_T,A_R18), 00001, BR) /* BRHZ IP<-IP+I16_if(RT) */
-APUOP(M_BRHNZ, RI16, 0x118, "brhnz", _A2(A_T,A_R18), 00001, BR) /* BRHNZ IP<-IP+I16_if(RT) */
-APUOP(M_STQA, RI16, 0x104, "stqa", _A2(A_T,A_S18), 00001, LS) /* SToreQAbs M[I16]<-RT */
-APUOP(M_STQR, RI16, 0x11C, "stqr", _A2(A_T,A_R18), 00001, LS) /* SToreQRel M[IP+I16]<-RT */
-APUOP(M_MTSPR, RR, 0x10c, "mtspr", _A2(A_S,A_T), 00001, SPR) /* MTSPR SA<-RT */
-APUOP(M_WRCH, RR, 0x10d, "wrch", _A2(A_H,A_T), 00001, SPR) /* ChanWRite CA<-RT */
-APUOP(M_LQD, RI10, 0x1a0, "lqd", _A4(A_T,A_S14,A_P,A_A), 00012, LS) /* LoadQDisp RT<-M[Ra+I10] */
-APUOP(M_BI, RR, 0x1a8, "bi", _A1(A_A), 00010, BR) /* BI IP<-RA */
-APUOP(M_BISL, RR, 0x1a9, "bisl", _A2(A_T,A_A), 00012, BR) /* BISL RT,IP<-IP,RA */
-APUOP(M_IRET, RR, 0x1aa, "iret", _A1(A_A), 00010, BR) /* IRET IP<-SRR0 */
-APUOP(M_IRET2, RR, 0x1aa, "iret", _A0(), 00010, BR) /* IRET IP<-SRR0 */
-APUOP(M_BISLED, RR, 0x1ab, "bisled", _A2(A_T,A_A), 00012, BR) /* BISLED RT,IP<-IP,RA_if(ext) */
-APUOP(M_HBR, LBTI, 0x1ac, "hbr", _A2(A_S11I,A_A), 00010, LS) /* HBR BTB[B9]<-M[Ra] */
-APUOP(M_FREST, RR, 0x1b8, "frest", _A2(A_T,A_A), 00012, SHUF) /* FREST RT<-recip(RA) */
-APUOP(M_FRSQEST, RR, 0x1b9, "frsqest", _A2(A_T,A_A), 00012, SHUF) /* FRSQEST RT<-rsqrt(RA) */
-APUOP(M_FSM, RR, 0x1b4, "fsm", _A2(A_T,A_A), 00012, SHUF) /* FormSelMask% RT<-expand(Ra) */
-APUOP(M_FSMH, RR, 0x1b5, "fsmh", _A2(A_T,A_A), 00012, SHUF) /* FormSelMask% RT<-expand(Ra) */
-APUOP(M_FSMB, RR, 0x1b6, "fsmb", _A2(A_T,A_A), 00012, SHUF) /* FormSelMask% RT<-expand(Ra) */
-APUOP(M_GB, RR, 0x1b0, "gb", _A2(A_T,A_A), 00012, SHUF) /* GatherBits% RT<-gather(RA) */
-APUOP(M_GBH, RR, 0x1b1, "gbh", _A2(A_T,A_A), 00012, SHUF) /* GatherBits% RT<-gather(RA) */
-APUOP(M_GBB, RR, 0x1b2, "gbb", _A2(A_T,A_A), 00012, SHUF) /* GatherBits% RT<-gather(RA) */
-APUOP(M_CBD, RI7, 0x1f4, "cbd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */
-APUOP(M_CHD, RI7, 0x1f5, "chd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */
-APUOP(M_CWD, RI7, 0x1f6, "cwd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */
-APUOP(M_CDD, RI7, 0x1f7, "cdd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */
-APUOP(M_ROTQBII, RI7, 0x1f8, "rotqbii", _A3(A_T,A_A,A_U3), 00012, SHUF) /* ROTQBII RT<-RA<<<I7 */
-APUOP(M_ROTQBYI, RI7, 0x1fc, "rotqbyi", _A3(A_T,A_A,A_S7N), 00012, SHUF) /* ROTQBYI RT<-RA<<<(I7*8) */
-APUOP(M_ROTQMBII, RI7, 0x1f9, "rotqmbii", _A3(A_T,A_A,A_S3), 00012, SHUF) /* ROTQMBII RT<-RA<<I7 */
-APUOP(M_ROTQMBYI, RI7, 0x1fd, "rotqmbyi", _A3(A_T,A_A,A_S6), 00012, SHUF) /* ROTQMBYI RT<-RA<<I7 */
-APUOP(M_SHLQBII, RI7, 0x1fb, "shlqbii", _A3(A_T,A_A,A_U3), 00012, SHUF) /* SHLQBII RT<-RA<<I7 */
-APUOP(M_SHLQBYI, RI7, 0x1ff, "shlqbyi", _A3(A_T,A_A,A_U5), 00012, SHUF) /* SHLQBYI RT<-RA<<I7 */
-APUOP(M_STQD, RI10, 0x120, "stqd", _A4(A_T,A_S14,A_P,A_A), 00011, LS) /* SToreQDisp M[Ra+I10]<-RT */
-APUOP(M_BIHNZ, RR, 0x12b, "bihnz", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */
-APUOP(M_BIHZ, RR, 0x12a, "bihz", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
-APUOP(M_BINZ, RR, 0x129, "binz", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */
-APUOP(M_BIZ, RR, 0x128, "biz", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
-APUOP(M_CBX, RR, 0x1d4, "cbx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */
-APUOP(M_CHX, RR, 0x1d5, "chx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */
-APUOP(M_CWX, RR, 0x1d6, "cwx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */
-APUOP(M_CDX, RR, 0x1d7, "cdx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */
-APUOP(M_LQX, RR, 0x1c4, "lqx", _A3(A_T,A_A,A_B), 00112, LS) /* LoadQindeX RT<-M[Ra+Rb] */
-APUOP(M_ROTQBI, RR, 0x1d8, "rotqbi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQBI RT<-RA<<<Rb */
-APUOP(M_ROTQMBI, RR, 0x1d9, "rotqmbi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQMBI RT<-RA<<Rb */
-APUOP(M_SHLQBI, RR, 0x1db, "shlqbi", _A3(A_T,A_A,A_B), 00112, SHUF) /* SHLQBI RT<-RA<<Rb */
-APUOP(M_ROTQBY, RR, 0x1dc, "rotqby", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQBY RT<-RA<<<(Rb*8) */
-APUOP(M_ROTQMBY, RR, 0x1dd, "rotqmby", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQMBY RT<-RA<<Rb */
-APUOP(M_SHLQBY, RR, 0x1df, "shlqby", _A3(A_T,A_A,A_B), 00112, SHUF) /* SHLQBY RT<-RA<<Rb */
-APUOP(M_ROTQBYBI, RR, 0x1cc, "rotqbybi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQBYBI RT<-RA<<Rb */
-APUOP(M_ROTQMBYBI, RR, 0x1cd, "rotqmbybi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQMBYBI RT<-RA<<Rb */
-APUOP(M_SHLQBYBI, RR, 0x1cf, "shlqbybi", _A3(A_T,A_A,A_B), 00112, SHUF) /* SHLQBYBI RT<-RA<<Rb */
-APUOP(M_STQX, RR, 0x144, "stqx", _A3(A_T,A_A,A_B), 00111, LS) /* SToreQindeX M[Ra+Rb]<-RT */
-APUOP(M_SHUFB, RRR, 0x580, "shufb", _A4(A_C,A_A,A_B,A_T), 02111, SHUF) /* SHUFfleBytes RC<-f(RA,RB,RT) */
-APUOP(M_IL, RI16, 0x204, "il", _A2(A_T,A_S16), 00002, FX2) /* ImmLoad RT<-sxt(I16) */
-APUOP(M_ILH, RI16, 0x20c, "ilh", _A2(A_T,A_X16), 00002, FX2) /* ImmLoadH RT<-I16 */
-APUOP(M_ILHU, RI16, 0x208, "ilhu", _A2(A_T,A_X16), 00002, FX2) /* ImmLoadHUpper RT<-I16<<16 */
-APUOP(M_ILA, RI18, 0x210, "ila", _A2(A_T,A_U18), 00002, FX2) /* ImmLoadAddr RT<-zxt(I18) */
-APUOP(M_NOP, RR, 0x201, "nop", _A1(A_T), 00000, NOP) /* XNOP no_operation */
-APUOP(M_NOP2, RR, 0x201, "nop", _A0(), 00000, NOP) /* XNOP no_operation */
-APUOP(M_IOHL, RI16, 0x304, "iohl", _A2(A_T,A_X16), 00003, FX2) /* AddImmeXt RT<-RT+sxt(I16) */
-APUOP(M_ANDBI, RI10, 0x0b0, "andbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* AND%I RT<-RA&I10 */
-APUOP(M_ANDHI, RI10, 0x0a8, "andhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* AND%I RT<-RA&I10 */
-APUOP(M_ANDI, RI10, 0x0a0, "andi", _A3(A_T,A_A,A_S10), 00012, FX2) /* AND%I RT<-RA&I10 */
-APUOP(M_ORBI, RI10, 0x030, "orbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* OR%I RT<-RA|I10 */
-APUOP(M_ORHI, RI10, 0x028, "orhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* OR%I RT<-RA|I10 */
-APUOP(M_ORI, RI10, 0x020, "ori", _A3(A_T,A_A,A_S10), 00012, FX2) /* OR%I RT<-RA|I10 */
-APUOP(M_ORX, RR, 0x1f0, "orx", _A2(A_T,A_A), 00012, BR) /* ORX RT<-RA.w0|RA.w1|RA.w2|RA.w3 */
-APUOP(M_XORBI, RI10, 0x230, "xorbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* XOR%I RT<-RA^I10 */
-APUOP(M_XORHI, RI10, 0x228, "xorhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* XOR%I RT<-RA^I10 */
-APUOP(M_XORI, RI10, 0x220, "xori", _A3(A_T,A_A,A_S10), 00012, FX2) /* XOR%I RT<-RA^I10 */
-APUOP(M_AHI, RI10, 0x0e8, "ahi", _A3(A_T,A_A,A_S10), 00012, FX2) /* Add%Immed RT<-RA+I10 */
-APUOP(M_AI, RI10, 0x0e0, "ai", _A3(A_T,A_A,A_S10), 00012, FX2) /* Add%Immed RT<-RA+I10 */
-APUOP(M_SFHI, RI10, 0x068, "sfhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* SubFrom%Imm RT<-I10-RA */
-APUOP(M_SFI, RI10, 0x060, "sfi", _A3(A_T,A_A,A_S10), 00012, FX2) /* SubFrom%Imm RT<-I10-RA */
-APUOP(M_CGTBI, RI10, 0x270, "cgtbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* CGT%I RT<-(RA>I10) */
-APUOP(M_CGTHI, RI10, 0x268, "cgthi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CGT%I RT<-(RA>I10) */
-APUOP(M_CGTI, RI10, 0x260, "cgti", _A3(A_T,A_A,A_S10), 00012, FX2) /* CGT%I RT<-(RA>I10) */
-APUOP(M_CLGTBI, RI10, 0x2f0, "clgtbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* CLGT%I RT<-(RA>I10) */
-APUOP(M_CLGTHI, RI10, 0x2e8, "clgthi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CLGT%I RT<-(RA>I10) */
-APUOP(M_CLGTI, RI10, 0x2e0, "clgti", _A3(A_T,A_A,A_S10), 00012, FX2) /* CLGT%I RT<-(RA>I10) */
-APUOP(M_CEQBI, RI10, 0x3f0, "ceqbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* CEQ%I RT<-(RA=I10) */
-APUOP(M_CEQHI, RI10, 0x3e8, "ceqhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CEQ%I RT<-(RA=I10) */
-APUOP(M_CEQI, RI10, 0x3e0, "ceqi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CEQ%I RT<-(RA=I10) */
-APUOP(M_HGTI, RI10, 0x278, "hgti", _A3(A_T,A_A,A_S10), 00010, FX2) /* HaltGTI halt_if(RA>I10) */
-APUOP(M_HGTI2, RI10, 0x278, "hgti", _A2(A_A,A_S10), 00010, FX2) /* HaltGTI halt_if(RA>I10) */
-APUOP(M_HLGTI, RI10, 0x2f8, "hlgti", _A3(A_T,A_A,A_S10), 00010, FX2) /* HaltLGTI halt_if(RA>I10) */
-APUOP(M_HLGTI2, RI10, 0x2f8, "hlgti", _A2(A_A,A_S10), 00010, FX2) /* HaltLGTI halt_if(RA>I10) */
-APUOP(M_HEQI, RI10, 0x3f8, "heqi", _A3(A_T,A_A,A_S10), 00010, FX2) /* HaltEQImm halt_if(RA=I10) */
-APUOP(M_HEQI2, RI10, 0x3f8, "heqi", _A2(A_A,A_S10), 00010, FX2) /* HaltEQImm halt_if(RA=I10) */
-APUOP(M_MPYI, RI10, 0x3a0, "mpyi", _A3(A_T,A_A,A_S10), 00012, FP7) /* MPYI RT<-RA*I10 */
-APUOP(M_MPYUI, RI10, 0x3a8, "mpyui", _A3(A_T,A_A,A_S10), 00012, FP7) /* MPYUI RT<-RA*I10 */
-APUOP(M_CFLTS, RI8, 0x3b0, "cflts", _A3(A_T,A_A,A_U7A), 00012, FP7) /* CFLTS RT<-int(RA,I8) */
-APUOP(M_CFLTU, RI8, 0x3b2, "cfltu", _A3(A_T,A_A,A_U7A), 00012, FP7) /* CFLTU RT<-int(RA,I8) */
-APUOP(M_CSFLT, RI8, 0x3b4, "csflt", _A3(A_T,A_A,A_U7B), 00012, FP7) /* CSFLT RT<-flt(RA,I8) */
-APUOP(M_CUFLT, RI8, 0x3b6, "cuflt", _A3(A_T,A_A,A_U7B), 00012, FP7) /* CUFLT RT<-flt(RA,I8) */
-APUOP(M_FESD, RR, 0x3b8, "fesd", _A2(A_T,A_A), 00012, FPD) /* FESD RT<-double(RA) */
-APUOP(M_FRDS, RR, 0x3b9, "frds", _A2(A_T,A_A), 00012, FPD) /* FRDS RT<-single(RA) */
-APUOP(M_FSCRRD, RR, 0x398, "fscrrd", _A1(A_T), 00002, FPD) /* FSCRRD RT<-FP_status */
-APUOP(M_FSCRWR, RR, 0x3ba, "fscrwr", _A2(A_T,A_A), 00010, FP7) /* FSCRWR FP_status<-RA */
-APUOP(M_FSCRWR2, RR, 0x3ba, "fscrwr", _A1(A_A), 00010, FP7) /* FSCRWR FP_status<-RA */
-APUOP(M_CLZ, RR, 0x2a5, "clz", _A2(A_T,A_A), 00012, FX2) /* CLZ RT<-clz(RA) */
-APUOP(M_CNTB, RR, 0x2b4, "cntb", _A2(A_T,A_A), 00012, FXB) /* CNT RT<-pop(RA) */
-APUOP(M_XSBH, RR, 0x2b6, "xsbh", _A2(A_T,A_A), 00012, FX2) /* eXtSignBtoH RT<-sign_ext(RA) */
-APUOP(M_XSHW, RR, 0x2ae, "xshw", _A2(A_T,A_A), 00012, FX2) /* eXtSignHtoW RT<-sign_ext(RA) */
-APUOP(M_XSWD, RR, 0x2a6, "xswd", _A2(A_T,A_A), 00012, FX2) /* eXtSignWtoD RT<-sign_ext(RA) */
-APUOP(M_ROTI, RI7, 0x078, "roti", _A3(A_T,A_A,A_S7N), 00012, FX3) /* ROT%I RT<-RA<<<I7 */
-APUOP(M_ROTMI, RI7, 0x079, "rotmi", _A3(A_T,A_A,A_S7), 00012, FX3) /* ROT%MI RT<-RA<<I7 */
-APUOP(M_ROTMAI, RI7, 0x07a, "rotmai", _A3(A_T,A_A,A_S7), 00012, FX3) /* ROTMA%I RT<-RA<<I7 */
-APUOP(M_SHLI, RI7, 0x07b, "shli", _A3(A_T,A_A,A_U6), 00012, FX3) /* SHL%I RT<-RA<<I7 */
-APUOP(M_ROTHI, RI7, 0x07c, "rothi", _A3(A_T,A_A,A_S7N), 00012, FX3) /* ROT%I RT<-RA<<<I7 */
-APUOP(M_ROTHMI, RI7, 0x07d, "rothmi", _A3(A_T,A_A,A_S6), 00012, FX3) /* ROT%MI RT<-RA<<I7 */
-APUOP(M_ROTMAHI, RI7, 0x07e, "rotmahi", _A3(A_T,A_A,A_S6), 00012, FX3) /* ROTMA%I RT<-RA<<I7 */
-APUOP(M_SHLHI, RI7, 0x07f, "shlhi", _A3(A_T,A_A,A_U5), 00012, FX3) /* SHL%I RT<-RA<<I7 */
-APUOP(M_A, RR, 0x0c0, "a", _A3(A_T,A_A,A_B), 00112, FX2) /* Add% RT<-RA+RB */
-APUOP(M_AH, RR, 0x0c8, "ah", _A3(A_T,A_A,A_B), 00112, FX2) /* Add% RT<-RA+RB */
-APUOP(M_SF, RR, 0x040, "sf", _A3(A_T,A_A,A_B), 00112, FX2) /* SubFrom% RT<-RB-RA */
-APUOP(M_SFH, RR, 0x048, "sfh", _A3(A_T,A_A,A_B), 00112, FX2) /* SubFrom% RT<-RB-RA */
-APUOP(M_CGT, RR, 0x240, "cgt", _A3(A_T,A_A,A_B), 00112, FX2) /* CGT% RT<-(RA>RB) */
-APUOP(M_CGTB, RR, 0x250, "cgtb", _A3(A_T,A_A,A_B), 00112, FX2) /* CGT% RT<-(RA>RB) */
-APUOP(M_CGTH, RR, 0x248, "cgth", _A3(A_T,A_A,A_B), 00112, FX2) /* CGT% RT<-(RA>RB) */
-APUOP(M_CLGT, RR, 0x2c0, "clgt", _A3(A_T,A_A,A_B), 00112, FX2) /* CLGT% RT<-(RA>RB) */
-APUOP(M_CLGTB, RR, 0x2d0, "clgtb", _A3(A_T,A_A,A_B), 00112, FX2) /* CLGT% RT<-(RA>RB) */
-APUOP(M_CLGTH, RR, 0x2c8, "clgth", _A3(A_T,A_A,A_B), 00112, FX2) /* CLGT% RT<-(RA>RB) */
-APUOP(M_CEQ, RR, 0x3c0, "ceq", _A3(A_T,A_A,A_B), 00112, FX2) /* CEQ% RT<-(RA=RB) */
-APUOP(M_CEQB, RR, 0x3d0, "ceqb", _A3(A_T,A_A,A_B), 00112, FX2) /* CEQ% RT<-(RA=RB) */
-APUOP(M_CEQH, RR, 0x3c8, "ceqh", _A3(A_T,A_A,A_B), 00112, FX2) /* CEQ% RT<-(RA=RB) */
-APUOP(M_HGT, RR, 0x258, "hgt", _A3(A_T,A_A,A_B), 00110, FX2) /* HaltGT halt_if(RA>RB) */
-APUOP(M_HGT2, RR, 0x258, "hgt", _A2(A_A,A_B), 00110, FX2) /* HaltGT halt_if(RA>RB) */
-APUOP(M_HLGT, RR, 0x2d8, "hlgt", _A3(A_T,A_A,A_B), 00110, FX2) /* HaltLGT halt_if(RA>RB) */
-APUOP(M_HLGT2, RR, 0x2d8, "hlgt", _A2(A_A,A_B), 00110, FX2) /* HaltLGT halt_if(RA>RB) */
-APUOP(M_HEQ, RR, 0x3d8, "heq", _A3(A_T,A_A,A_B), 00110, FX2) /* HaltEQ halt_if(RA=RB) */
-APUOP(M_HEQ2, RR, 0x3d8, "heq", _A2(A_A,A_B), 00110, FX2) /* HaltEQ halt_if(RA=RB) */
-APUOP(M_FCEQ, RR, 0x3c2, "fceq", _A3(A_T,A_A,A_B), 00112, FX2) /* FCEQ RT<-(RA=RB) */
-APUOP(M_FCMEQ, RR, 0x3ca, "fcmeq", _A3(A_T,A_A,A_B), 00112, FX2) /* FCMEQ RT<-(|RA|=|RB|) */
-APUOP(M_FCGT, RR, 0x2c2, "fcgt", _A3(A_T,A_A,A_B), 00112, FX2) /* FCGT RT<-(RA<RB) */
-APUOP(M_FCMGT, RR, 0x2ca, "fcmgt", _A3(A_T,A_A,A_B), 00112, FX2) /* FCMGT RT<-(|RA|<|RB|) */
-APUOP(M_AND, RR, 0x0c1, "and", _A3(A_T,A_A,A_B), 00112, FX2) /* AND RT<-RA&RB */
-APUOP(M_NAND, RR, 0x0c9, "nand", _A3(A_T,A_A,A_B), 00112, FX2) /* NAND RT<-!(RA&RB) */
-APUOP(M_OR, RR, 0x041, "or", _A3(A_T,A_A,A_B), 00112, FX2) /* OR RT<-RA|RB */
-APUOP(M_NOR, RR, 0x049, "nor", _A3(A_T,A_A,A_B), 00112, FX2) /* NOR RT<-!(RA&RB) */
-APUOP(M_XOR, RR, 0x241, "xor", _A3(A_T,A_A,A_B), 00112, FX2) /* XOR RT<-RA^RB */
-APUOP(M_EQV, RR, 0x249, "eqv", _A3(A_T,A_A,A_B), 00112, FX2) /* EQuiValent RT<-!(RA^RB) */
-APUOP(M_ANDC, RR, 0x2c1, "andc", _A3(A_T,A_A,A_B), 00112, FX2) /* ANDComplement RT<-RA&!RB */
-APUOP(M_ORC, RR, 0x2c9, "orc", _A3(A_T,A_A,A_B), 00112, FX2) /* ORComplement RT<-RA|!RB */
-APUOP(M_ABSDB, RR, 0x053, "absdb", _A3(A_T,A_A,A_B), 00112, FXB) /* ABSoluteDiff RT<-|RA-RB| */
-APUOP(M_AVGB, RR, 0x0d3, "avgb", _A3(A_T,A_A,A_B), 00112, FXB) /* AVG% RT<-(RA+RB+1)/2 */
-APUOP(M_SUMB, RR, 0x253, "sumb", _A3(A_T,A_A,A_B), 00112, FXB) /* SUM% RT<-f(RA,RB) */
-APUOP(M_DFA, RR, 0x2cc, "dfa", _A3(A_T,A_A,A_B), 00112, FPD) /* DFAdd RT<-RA+RB */
-APUOP(M_DFM, RR, 0x2ce, "dfm", _A3(A_T,A_A,A_B), 00112, FPD) /* DFMul RT<-RA*RB */
-APUOP(M_DFS, RR, 0x2cd, "dfs", _A3(A_T,A_A,A_B), 00112, FPD) /* DFSub RT<-RA-RB */
-APUOP(M_FA, RR, 0x2c4, "fa", _A3(A_T,A_A,A_B), 00112, FP6) /* FAdd RT<-RA+RB */
-APUOP(M_FM, RR, 0x2c6, "fm", _A3(A_T,A_A,A_B), 00112, FP6) /* FMul RT<-RA*RB */
-APUOP(M_FS, RR, 0x2c5, "fs", _A3(A_T,A_A,A_B), 00112, FP6) /* FSub RT<-RA-RB */
-APUOP(M_MPY, RR, 0x3c4, "mpy", _A3(A_T,A_A,A_B), 00112, FP7) /* MPY RT<-RA*RB */
-APUOP(M_MPYH, RR, 0x3c5, "mpyh", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYH RT<-(RAh*RB)<<16 */
-APUOP(M_MPYHH, RR, 0x3c6, "mpyhh", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYHH RT<-RAh*RBh */
-APUOP(M_MPYHHU, RR, 0x3ce, "mpyhhu", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYHHU RT<-RAh*RBh */
-APUOP(M_MPYS, RR, 0x3c7, "mpys", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYS RT<-(RA*RB)>>16 */
-APUOP(M_MPYU, RR, 0x3cc, "mpyu", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYU RT<-RA*RB */
-APUOP(M_FI, RR, 0x3d4, "fi", _A3(A_T,A_A,A_B), 00112, FP7) /* FInterpolate RT<-f(RA,RB) */
-APUOP(M_ROT, RR, 0x058, "rot", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT% RT<-RA<<<RB */
-APUOP(M_ROTM, RR, 0x059, "rotm", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT%M RT<-RA<<Rb */
-APUOP(M_ROTMA, RR, 0x05a, "rotma", _A3(A_T,A_A,A_B), 00112, FX3) /* ROTMA% RT<-RA<<Rb */
-APUOP(M_SHL, RR, 0x05b, "shl", _A3(A_T,A_A,A_B), 00112, FX3) /* SHL% RT<-RA<<Rb */
-APUOP(M_ROTH, RR, 0x05c, "roth", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT% RT<-RA<<<RB */
-APUOP(M_ROTHM, RR, 0x05d, "rothm", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT%M RT<-RA<<Rb */
-APUOP(M_ROTMAH, RR, 0x05e, "rotmah", _A3(A_T,A_A,A_B), 00112, FX3) /* ROTMA% RT<-RA<<Rb */
-APUOP(M_SHLH, RR, 0x05f, "shlh", _A3(A_T,A_A,A_B), 00112, FX3) /* SHL% RT<-RA<<Rb */
-APUOP(M_MPYHHA, RR, 0x346, "mpyhha", _A3(A_T,A_A,A_B), 00113, FP7) /* MPYHHA RT<-RAh*RBh+RT */
-APUOP(M_MPYHHAU, RR, 0x34e, "mpyhhau", _A3(A_T,A_A,A_B), 00113, FP7) /* MPYHHAU RT<-RAh*RBh+RT */
-APUOP(M_DFMA, RR, 0x35c, "dfma", _A3(A_T,A_A,A_B), 00113, FPD) /* DFMAdd RT<-RT+RA*RB */
-APUOP(M_DFMS, RR, 0x35d, "dfms", _A3(A_T,A_A,A_B), 00113, FPD) /* DFMSub RT<-RA*RB-RT */
-APUOP(M_DFNMS, RR, 0x35e, "dfnms", _A3(A_T,A_A,A_B), 00113, FPD) /* DFNMSub RT<-RT-RA*RB */
-APUOP(M_DFNMA, RR, 0x35f, "dfnma", _A3(A_T,A_A,A_B), 00113, FPD) /* DFNMAdd RT<-(-RT)-RA*RB */
-APUOP(M_FMA, RRR, 0x700, "fma", _A4(A_C,A_A,A_B,A_T), 02111, FP6) /* FMAdd RC<-RT+RA*RB */
-APUOP(M_FMS, RRR, 0x780, "fms", _A4(A_C,A_A,A_B,A_T), 02111, FP6) /* FMSub RC<-RA*RB-RT */
-APUOP(M_FNMS, RRR, 0x680, "fnms", _A4(A_C,A_A,A_B,A_T), 02111, FP6) /* FNMSub RC<-RT-RA*RB */
-APUOP(M_MPYA, RRR, 0x600, "mpya", _A4(A_C,A_A,A_B,A_T), 02111, FP7) /* MPYA RC<-RA*RB+RT */
-APUOP(M_SELB, RRR, 0x400, "selb", _A4(A_C,A_A,A_B,A_T), 02111, FX2) /* SELectBits RC<-RA&RT|RB&!RT */
-/* for system function call, this uses op-code of mtspr */
-APUOP(M_SYSCALL, RI7, 0x10c, "syscall", _A3(A_T,A_A,A_S7N), 00002, SPR) /* System Call */
-/*
-pseudo instruction:
-system call
-value of I9 operation
-0 halt
-1 rt[0] = open(MEM[ra[0]], ra[1])
-2 rt[0] = close(ra[0])
-3 rt[0] = read(ra[0], MEM[ra[1]], ra[2])
-4 rt[0] = write(ra[0], MEM[ra[1]], ra[2])
-5 printf(MEM[ra[0]], ra[1], ra[2], ra[3])
-42 rt[0] = clock()
-52 rt[0] = lseek(ra0, ra1, ra2)
-
-*/
-
-
-/* new multiprecision add/sub */
-APUOP(M_ADDX, RR, 0x340, "addx", _A3(A_T,A_A,A_B), 00113, FX2) /* Add_eXtended RT<-RA+RB+RT */
-APUOP(M_CG, RR, 0x0c2, "cg", _A3(A_T,A_A,A_B), 00112, FX2) /* CarryGenerate RT<-cout(RA+RB) */
-APUOP(M_CGX, RR, 0x342, "cgx", _A3(A_T,A_A,A_B), 00113, FX2) /* CarryGen_eXtd RT<-cout(RA+RB+RT) */
-APUOP(M_SFX, RR, 0x341, "sfx", _A3(A_T,A_A,A_B), 00113, FX2) /* Add_eXtended RT<-RA+RB+RT */
-APUOP(M_BG, RR, 0x042, "bg", _A3(A_T,A_A,A_B), 00112, FX2) /* CarryGenerate RT<-cout(RA+RB) */
-APUOP(M_BGX, RR, 0x343, "bgx", _A3(A_T,A_A,A_B), 00113, FX2) /* CarryGen_eXtd RT<-cout(RA+RB+RT) */
-
-/*
-
-The following ops are a subset of above except with feature bits set.
-Feature bits are bits 11-17 of the instruction:
-
- 11 - C & P feature bit
- 12 - disable interrupts
- 13 - enable interrupts
-
-*/
-APUOPFB(M_BID, RR, 0x1a8, 0x20, "bid", _A1(A_A), 00010, BR) /* BI IP<-RA */
-APUOPFB(M_BIE, RR, 0x1a8, 0x10, "bie", _A1(A_A), 00010, BR) /* BI IP<-RA */
-APUOPFB(M_BISLD, RR, 0x1a9, 0x20, "bisld", _A2(A_T,A_A), 00012, BR) /* BISL RT,IP<-IP,RA */
-APUOPFB(M_BISLE, RR, 0x1a9, 0x10, "bisle", _A2(A_T,A_A), 00012, BR) /* BISL RT,IP<-IP,RA */
-APUOPFB(M_IRETD, RR, 0x1aa, 0x20, "iretd", _A1(A_A), 00010, BR) /* IRET IP<-SRR0 */
-APUOPFB(M_IRETD2, RR, 0x1aa, 0x20, "iretd", _A0(), 00010, BR) /* IRET IP<-SRR0 */
-APUOPFB(M_IRETE, RR, 0x1aa, 0x10, "irete", _A1(A_A), 00010, BR) /* IRET IP<-SRR0 */
-APUOPFB(M_IRETE2, RR, 0x1aa, 0x10, "irete", _A0(), 00010, BR) /* IRET IP<-SRR0 */
-APUOPFB(M_BISLEDD, RR, 0x1ab, 0x20, "bisledd", _A2(A_T,A_A), 00012, BR) /* BISLED RT,IP<-IP,RA_if(ext) */
-APUOPFB(M_BISLEDE, RR, 0x1ab, 0x10, "bislede", _A2(A_T,A_A), 00012, BR) /* BISLED RT,IP<-IP,RA_if(ext) */
-APUOPFB(M_BIHNZD, RR, 0x12b, 0x20, "bihnzd", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */
-APUOPFB(M_BIHNZE, RR, 0x12b, 0x10, "bihnze", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */
-APUOPFB(M_BIHZD, RR, 0x12a, 0x20, "bihzd", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
-APUOPFB(M_BIHZE, RR, 0x12a, 0x10, "bihze", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
-APUOPFB(M_BINZD, RR, 0x129, 0x20, "binzd", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */
-APUOPFB(M_BINZE, RR, 0x129, 0x10, "binze", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */
-APUOPFB(M_BIZD, RR, 0x128, 0x20, "bizd", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
-APUOPFB(M_BIZE, RR, 0x128, 0x10, "bize", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
-APUOPFB(M_SYNCC, RR, 0x002, 0x40, "syncc", _A0(), 00000, BR) /* SYNCC flush_pipe */
-APUOPFB(M_HBRP, LBTI, 0x1ac, 0x40, "hbrp", _A0(), 00010, LS) /* HBR BTB[B9]<-M[Ra] */
-
-/* Synonyms required by the AS manual. */
-APUOP(M_LR, RI10, 0x020, "lr", _A2(A_T,A_A), 00012, FX2) /* OR%I RT<-RA|I10 */
-APUOP(M_BIHT, RR, 0x12b, "biht", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */
-APUOP(M_BIHF, RR, 0x12a, "bihf", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
-APUOP(M_BIT, RR, 0x129, "bit", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */
-APUOP(M_BIF, RR, 0x128, "bif", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
-APUOPFB(M_BIHTD, RR, 0x12b, 0x20, "bihtd", _A2(A_T,A_A), 00011, BR) /* BIHNF IP<-RA_if(RT) */
-APUOPFB(M_BIHTE, RR, 0x12b, 0x10, "bihte", _A2(A_T,A_A), 00011, BR) /* BIHNF IP<-RA_if(RT) */
-APUOPFB(M_BIHFD, RR, 0x12a, 0x20, "bihfd", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
-APUOPFB(M_BIHFE, RR, 0x12a, 0x10, "bihfe", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
-APUOPFB(M_BITD, RR, 0x129, 0x20, "bitd", _A2(A_T,A_A), 00011, BR) /* BINF IP<-RA_if(RT) */
-APUOPFB(M_BITE, RR, 0x129, 0x10, "bite", _A2(A_T,A_A), 00011, BR) /* BINF IP<-RA_if(RT) */
-APUOPFB(M_BIFD, RR, 0x128, 0x20, "bifd", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
-APUOPFB(M_BIFE, RR, 0x128, 0x10, "bife", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
-
-#undef _A0
-#undef _A1
-#undef _A2
-#undef _A3
-#undef _A4
diff --git a/include/opcode/spu.h b/include/opcode/spu.h
deleted file mode 100644
index 975b1fd..0000000
--- a/include/opcode/spu.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* SPU ELF support for BFD.
-
- Copyright 2006 Free Software Foundation, Inc.
-
- This file is part of GDB, GAS, and the GNU binutils.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 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. */
-
-
-/* These two enums are from rel_apu/common/spu_asm_format.h */
-/* definition of instruction format */
-typedef enum {
- RRR,
- RI18,
- RI16,
- RI10,
- RI8,
- RI7,
- RR,
- LBT,
- LBTI,
- IDATA,
- UNKNOWN_IFORMAT
-} spu_iformat;
-
-/* These values describe assembly instruction arguments. They indicate
- * how to encode, range checking and which relocation to use. */
-typedef enum {
- A_T, /* register at pos 0 */
- A_A, /* register at pos 7 */
- A_B, /* register at pos 14 */
- A_C, /* register at pos 21 */
- A_S, /* special purpose register at pos 7 */
- A_H, /* channel register at pos 7 */
- A_P, /* parenthesis, this has to separate regs from immediates */
- A_S3,
- A_S6,
- A_S7N,
- A_S7,
- A_U7A,
- A_U7B,
- A_S10B,
- A_S10,
- A_S11,
- A_S11I,
- A_S14,
- A_S16,
- A_S18,
- A_R18,
- A_U3,
- A_U5,
- A_U6,
- A_U7,
- A_U14,
- A_X16,
- A_U18,
- A_MAX
-} spu_aformat;
-
-enum spu_insns {
-#define APUOP(TAG,MACFORMAT,OPCODE,MNEMONIC,ASMFORMAT,DEP,PIPE) \
- TAG,
-#define APUOPFB(TAG,MACFORMAT,OPCODE,FB,MNEMONIC,ASMFORMAT,DEP,PIPE) \
- TAG,
-#include "opcode/spu-insns.h"
-#undef APUOP
-#undef APUOPFB
- M_SPU_MAX
-};
-
-struct spu_opcode
-{
- spu_iformat insn_type;
- unsigned int opcode;
- char *mnemonic;
- int arg[5];
-};
-
-#define SIGNED_EXTRACT(insn,size,pos) (((int)((insn) << (32-size-pos))) >> (32-size))
-#define UNSIGNED_EXTRACT(insn,size,pos) (((insn) >> pos) & ((1 << size)-1))
-
-#define DECODE_INSN_RT(insn) (insn & 0x7f)
-#define DECODE_INSN_RA(insn) ((insn >> 7) & 0x7f)
-#define DECODE_INSN_RB(insn) ((insn >> 14) & 0x7f)
-#define DECODE_INSN_RC(insn) ((insn >> 21) & 0x7f)
-
-#define DECODE_INSN_I10(insn) SIGNED_EXTRACT(insn,10,14)
-#define DECODE_INSN_U10(insn) UNSIGNED_EXTRACT(insn,10,14)
-
-/* For branching, immediate loads, hbr and lqa/stqa. */
-#define DECODE_INSN_I16(insn) SIGNED_EXTRACT(insn,16,7)
-#define DECODE_INSN_U16(insn) UNSIGNED_EXTRACT(insn,16,7)
-
-/* for stop */
-#define DECODE_INSN_U14(insn) UNSIGNED_EXTRACT(insn,14,0)
-
-/* For ila */
-#define DECODE_INSN_I18(insn) SIGNED_EXTRACT(insn,18,7)
-#define DECODE_INSN_U18(insn) UNSIGNED_EXTRACT(insn,18,7)
-
-/* For rotate and shift and generate control mask */
-#define DECODE_INSN_I7(insn) SIGNED_EXTRACT(insn,7,14)
-#define DECODE_INSN_U7(insn) UNSIGNED_EXTRACT(insn,7,14)
-
-/* For float <-> int conversion */
-#define DECODE_INSN_I8(insn) SIGNED_EXTRACT(insn,8,14)
-#define DECODE_INSN_U8(insn) UNSIGNED_EXTRACT(insn,8,14)
-
-/* For hbr */
-#define DECODE_INSN_I9a(insn) ((SIGNED_EXTRACT(insn,2,23) << 7) | UNSIGNED_EXTRACT(insn,7,0))
-#define DECODE_INSN_I9b(insn) ((SIGNED_EXTRACT(insn,2,14) << 7) | UNSIGNED_EXTRACT(insn,7,0))
-#define DECODE_INSN_U9a(insn) ((UNSIGNED_EXTRACT(insn,2,23) << 7) | UNSIGNED_EXTRACT(insn,7,0))
-#define DECODE_INSN_U9b(insn) ((UNSIGNED_EXTRACT(insn,2,14) << 7) | UNSIGNED_EXTRACT(insn,7,0))
-
diff --git a/intl/ChangeLog b/intl/ChangeLog
index c511c1e..6fa7c19 100644
--- a/intl/ChangeLog
+++ b/intl/ChangeLog
@@ -1,19 +1,3 @@
-2006-09-27 Alan Modra <amodra@bigpond.net.au>
-
- * Makefile.in (distclean): Delete config files.
-
-2006-09-13 Eric Botcazou <ebotcazou@libertysurf.fr>
-
- PR other/23541
- PR other/26507
- Backport from gettext repository:
-
- 2003-09-04 Bruno Haible <bruno@clisp.org>
- * dgettext.c: Include <locale.h> after gettextP.h, not before. This
- ensures that libintl_dcgettext is correctly declared on Solaris.
- (Needed because Solaris <locale.h> includes libintl.h.)
- * dngettext.c: Likewise, for the libintl_dcngettext declaration.
-
2006-06-07 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.in (install-info, install-dvi, install-ps, install-pdf):
diff --git a/intl/Makefile.in b/intl/Makefile.in
index ca3814d..6651de4 100644
--- a/intl/Makefile.in
+++ b/intl/Makefile.in
@@ -186,7 +186,6 @@ mostlyclean:
clean: mostlyclean
distclean: clean
- rm -f config.status config.cache config.log config.intl config.h
rm -f Makefile ID TAGS
maintainer-clean: distclean
@@ -203,7 +202,7 @@ Makefile: $(srcdir)/Makefile.in config.status
config.intl: $(srcdir)/config.intl.in config.status
$(SHELL) ./config.status config.intl
-
+
config.status: $(srcdir)/configure
$(SHELL) ./config.status --recheck
@@ -232,6 +231,7 @@ stamp-h1: $(srcdir)/config.h.in config.status
$(srcdir)/config.h.in: @MAINT@ $(srcdir)/aclocal.m4 $(srcdir)/configure.ac
cd $(srcdir) && $(AUTOHEADER)
-rm -f stamp-h1
+
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/intl/dgettext.c b/intl/dgettext.c
index e497dd9..1b6ce03 100644
--- a/intl/dgettext.c
+++ b/intl/dgettext.c
@@ -1,5 +1,5 @@
/* Implementation of the dgettext(3) function.
- Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
+ Copyright (C) 1995-1997, 2000, 2001, 2002 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
@@ -20,10 +20,9 @@
# include <config.h>
#endif
-#include "gettextP.h"
-
#include <locale.h>
+#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
diff --git a/intl/dngettext.c b/intl/dngettext.c
index 8dee800..2c304e8 100644
--- a/intl/dngettext.c
+++ b/intl/dngettext.c
@@ -1,5 +1,5 @@
/* Implementation of the dngettext(3) function.
- Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
+ Copyright (C) 1995-1997, 2000, 2001, 2002 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
@@ -20,10 +20,9 @@
# include <config.h>
#endif
-#include "gettextP.h"
-
#include <locale.h>
+#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 592954b..727b987 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,45 +1,3 @@
-2006-11-08 Vladimir Prus <vladimir@codesourcery.com>
-
- * pex-win32.c (no_suffixes): Remove.
- (std_suffixes): Add "" as first element.
- (find_executable): Remove detection of already-present
- extension. Try all suffixes in std_suffixes.
-
-2006-11-07 Julian Brown <julian@codesourcery.com>
-
- * floatformat.c (get_field): Fix segfault with little-endian word
- order on 64-bit hosts.
- (put_field): Likewise.
- (min): Move definition.
-
-2006-10-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- pex-win32.c (argv_to_cmdline): Replace xmalloc with XNEWVEC.
- (find_executable): Likewise.
- (win32_spawn): Cast alloca return to (char**).
- Replace malloc with XNEWVEC.
- bcopy.c (bcopy): Add explict casts in assignments.
-
-2006-10-25 Ben Elliston <bje@au.ibm.com>
-
- * pexecute.txh: Wrap pexecute's "flag" argument with @var {..}.
-
-2006-10-10 Brooks Moses <bmoses@stanford.edu>
-
- * Makefile.in: Added "pdf", "libiberty.pdf" target support.
- * testsuite/Makefile.in: Added empty "pdf" target.
-
-2006-09-22 Ian Lance Taylor <ian@airs.com>
-
- PR other/29176
- * cp-demangle.c (d_substitution): Check for overflow when
- computing substitution index.
-
-2006-08-30 Corinna Vinschen <corinna@vinschen.de>
-
- * configure.ac: Add case for Mingw as host.
- * configure: Regenerate.
-
2006-08-27 Ian Lance Taylor <ian@airs.com>
PR driver/27622
@@ -105,19 +63,19 @@
2006-03-29 Jim Blandy <jimb@codesourcery.com>
- * pex-common.c (pex_input_file, pex_input_pipe): New functions.
+ * pex-common.c (pex_input_file, pex_input_pipe): New functions.
(pex_init_common): Initialize obj->input_file.
(pex_run): Close any file opened by pex_input_file.
- * pexecute.txh (pex_input_file, pex_input_pipe): New docs.
- * pex-common.h (struct pex_obj): New field input_file.
+ * pexecute.txh (pex_input_file, pex_input_pipe): New docs.
+ * pex-common.h (struct pex_obj): New field input_file.
(struct pex_funcs): New function ptr fdopenw.
- * pex-unix.c (pex_unix_fdopenw): New function.
- (funcs): List it as our fdopenw function.
- * pex-win32.c (pex_win32_fdopenw): New function.
- (funcs): List it as our fdopenw function.
- * pex-djgpp.c (funcs): Leave fdopenw null.
- * pex-msdos (funcs): Same.
- * functions.texi: Regenerated.
+ * pex-unix.c (pex_unix_fdopenw): New function.
+ (funcs): List it as our fdopenw function.
+ * pex-win32.c (pex_win32_fdopenw): New function.
+ (funcs): List it as our fdopenw function.
+ * pex-djgpp.c (funcs): Leave fdopenw null.
+ * pex-msdos (funcs): Same.
+ * functions.texi: Regenerated.
2006-04-10 Jim Blandy <jimb@codesourcery.com>
@@ -6840,7 +6798,7 @@ Wed Aug 19 14:40:34 1992 Ian Lance Taylor (ian@cygnus.com)
Mon Aug 10 17:33:40 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
- * Makefile.in: clean up definition of CFILES, more comments
+ * Makefile.in: clean up definition of CFILES, more comments
Sat Aug 8 23:10:59 1992 Fred Fish (fnf@cygnus.com)
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 6e02403..a579d79 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -245,7 +245,6 @@ info: libiberty.info info-subdir
install-info: install-info-subdir
clean-info: clean-info-subdir
dvi: libiberty.dvi dvi-subdir
-pdf: libiberty.pdf pdf-subdir
# html, install-html targets
HTMLS = libiberty.html
@@ -320,9 +319,6 @@ libiberty.info : $(srcdir)/libiberty.texi $(TEXISRC)
libiberty.dvi : $(srcdir)/libiberty.texi $(TEXISRC)
texi2dvi $(srcdir)/libiberty.texi
-libiberty.pdf : $(srcdir)/libiberty.texi $(TEXISRC)
- texi2pdf $(srcdir)/libiberty.texi
-
libiberty.html : $(srcdir)/libiberty.texi $(TEXISRC)
$(MAKEINFO) --no-split --html -I$(srcdir) -o $@ $<
@@ -438,7 +434,7 @@ mostlyclean: mostlyclean-subdir
clean: clean-subdir
$(MAKE) SUBDIRS="" mostlyclean
-rm -f *.a required-list tmpmulti.out
- -rm -f libiberty.dvi libiberty.pdf libiberty.info* libiberty.html
+ -rm -f libiberty.dvi libiberty.info* libiberty.html
@$(MULTICLEAN) multi-clean DO=clean
distclean: distclean-subdir
$(MAKE) SUBDIRS="" clean
@@ -467,7 +463,7 @@ config.status: $(srcdir)/configure
# if needed. This prevents problems with parallel builds, in case
# subdirectories need to run config.status also.
all-subdir check-subdir installcheck-subdir info-subdir \
-install-info-subdir clean-info-subdir dvi-subdir pdf-subdir install-subdir \
+install-info-subdir clean-info-subdir dvi-subdir install-subdir \
etags-subdir mostlyclean-subdir clean-subdir distclean-subdir \
maintainer-clean-subdir: config.h
@subdirs='$(SUBDIRS)'; \
diff --git a/libiberty/bcopy.c b/libiberty/bcopy.c
index f9b7a8a..1e2eca9 100644
--- a/libiberty/bcopy.c
+++ b/libiberty/bcopy.c
@@ -16,8 +16,8 @@ bcopy (const void *src, void *dest, size_t len)
{
if (dest < src)
{
- const char *firsts = (const char *) src;
- char *firstd = (char *) dest;
+ const char *firsts = src;
+ char *firstd = dest;
while (len--)
*firstd++ = *firsts++;
}
diff --git a/libiberty/configure b/libiberty/configure
index 3491102..ed7423a 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -5679,208 +5679,6 @@ _ACEOF
fi
- # If we are being configured for Mingw, we know which functions
- # Mingw provides and which ones we will be expected to provide.
-
- case "${host}" in
- *-*-mingw*)
- case $LIBOBJS in
- "asprintf.$ac_objext" | \
- *" asprintf.$ac_objext" | \
- "asprintf.$ac_objext "* | \
- *" asprintf.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "basename.$ac_objext" | \
- *" basename.$ac_objext" | \
- "basename.$ac_objext "* | \
- *" basename.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "bcmp.$ac_objext" | \
- *" bcmp.$ac_objext" | \
- "bcmp.$ac_objext "* | \
- *" bcmp.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS bcmp.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "bcopy.$ac_objext" | \
- *" bcopy.$ac_objext" | \
- "bcopy.$ac_objext "* | \
- *" bcopy.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS bcopy.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "bzero.$ac_objext" | \
- *" bzero.$ac_objext" | \
- "bzero.$ac_objext "* | \
- *" bzero.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS bzero.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "clock.$ac_objext" | \
- *" clock.$ac_objext" | \
- "clock.$ac_objext "* | \
- *" clock.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS clock.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "ffs.$ac_objext" | \
- *" ffs.$ac_objext" | \
- "ffs.$ac_objext "* | \
- *" ffs.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS ffs.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "getpagesize.$ac_objext" | \
- *" getpagesize.$ac_objext" | \
- "getpagesize.$ac_objext "* | \
- *" getpagesize.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "index.$ac_objext" | \
- *" index.$ac_objext" | \
- "index.$ac_objext "* | \
- *" index.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS index.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "insque.$ac_objext" | \
- *" insque.$ac_objext" | \
- "insque.$ac_objext "* | \
- *" insque.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "mempcpy.$ac_objext" | \
- *" mempcpy.$ac_objext" | \
- "mempcpy.$ac_objext "* | \
- *" mempcpy.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS mempcpy.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "mkstemps.$ac_objext" | \
- *" mkstemps.$ac_objext" | \
- "mkstemps.$ac_objext "* | \
- *" mkstemps.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS mkstemps.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "random.$ac_objext" | \
- *" random.$ac_objext" | \
- "random.$ac_objext "* | \
- *" random.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "rindex.$ac_objext" | \
- *" rindex.$ac_objext" | \
- "rindex.$ac_objext "* | \
- *" rindex.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS rindex.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "sigsetmask.$ac_objext" | \
- *" sigsetmask.$ac_objext" | \
- "sigsetmask.$ac_objext "* | \
- *" sigsetmask.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS sigsetmask.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "stpcpy.$ac_objext" | \
- *" stpcpy.$ac_objext" | \
- "stpcpy.$ac_objext "* | \
- *" stpcpy.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "stpncpy.$ac_objext" | \
- *" stpncpy.$ac_objext" | \
- "stpncpy.$ac_objext "* | \
- *" stpncpy.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS stpncpy.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "strndup.$ac_objext" | \
- *" strndup.$ac_objext" | \
- "strndup.$ac_objext "* | \
- *" strndup.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS strndup.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "strverscmp.$ac_objext" | \
- *" strverscmp.$ac_objext" | \
- "strverscmp.$ac_objext "* | \
- *" strverscmp.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS strverscmp.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "vasprintf.$ac_objext" | \
- *" vasprintf.$ac_objext" | \
- "vasprintf.$ac_objext "* | \
- *" vasprintf.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "waitpid.$ac_objext" | \
- *" waitpid.$ac_objext" | \
- "waitpid.$ac_objext "* | \
- *" waitpid.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
-esac
-
-
- for f in $funcs; do
- case "$f" in
- asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid)
- ;;
- *)
- n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >>confdefs.h <<_ACEOF
-#define $n 1
-_ACEOF
-
- ;;
- esac
- done
-
- # Mingw doesnt provide any of the variables in $vars, so we
- # dont have to check them here.
-
- # Of the functions in $checkfuncs, Mingw only has strerror.
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRERROR 1
-_ACEOF
-
-
- setobjs=yes
- ;;
-
- esac
-
# We may wish to install the target headers somewhere.
# Check whether --enable-install-libiberty or --disable-install-libiberty was given.
if test "${enable_install_libiberty+set}" = set; then
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index f9713c2..76cf3d5 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -419,55 +419,6 @@ if test -n "${with_target_subdir}"; then
fi
- # If we are being configured for Mingw, we know which functions
- # Mingw provides and which ones we will be expected to provide.
-
- case "${host}" in
- *-*-mingw*)
- AC_LIBOBJ([asprintf])
- AC_LIBOBJ([basename])
- AC_LIBOBJ([bcmp])
- AC_LIBOBJ([bcopy])
- AC_LIBOBJ([bzero])
- AC_LIBOBJ([clock])
- AC_LIBOBJ([ffs])
- AC_LIBOBJ([getpagesize])
- AC_LIBOBJ([index])
- AC_LIBOBJ([insque])
- AC_LIBOBJ([mempcpy])
- AC_LIBOBJ([mkstemps])
- AC_LIBOBJ([random])
- AC_LIBOBJ([rindex])
- AC_LIBOBJ([sigsetmask])
- AC_LIBOBJ([stpcpy])
- AC_LIBOBJ([stpncpy])
- AC_LIBOBJ([strndup])
- AC_LIBOBJ([strverscmp])
- AC_LIBOBJ([vasprintf])
- AC_LIBOBJ([waitpid])
-
- for f in $funcs; do
- case "$f" in
- asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid)
- ;;
- *)
- n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- AC_DEFINE_UNQUOTED($n)
- ;;
- esac
- done
-
- # Mingw doesnt provide any of the variables in $vars, so we
- # dont have to check them here.
-
- # Of the functions in $checkfuncs, Mingw only has strerror.
- AC_DEFINE(HAVE_STRERROR)
-
- setobjs=yes
- ;;
-
- esac
-
# We may wish to install the target headers somewhere.
AC_ARG_ENABLE(install-libiberty,
[ --enable-install-libiberty Install headers for end users],
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 2fa5978..c7ee878 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -2505,8 +2505,6 @@ d_substitution (struct d_info *di, int prefix)
id = id * 36 + c - 'A' + 10;
else
return NULL;
- if (id < 0)
- return NULL;
c = d_next_char (di);
}
while (c != '_');
diff --git a/libiberty/floatformat.c b/libiberty/floatformat.c
index c5abbb1..0bbb8ed 100644
--- a/libiberty/floatformat.c
+++ b/libiberty/floatformat.c
@@ -249,51 +249,53 @@ const struct floatformat floatformat_ia64_quad_little =
floatformat_always_valid
};
-
-#ifndef min
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#endif
-
/* Extract a field which starts at START and is LEN bits long. DATA and
TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */
static unsigned long
get_field (const unsigned char *data, enum floatformat_byteorders order,
unsigned int total_len, unsigned int start, unsigned int len)
{
- unsigned long result = 0;
+ unsigned long result;
unsigned int cur_byte;
- int lo_bit, hi_bit, cur_bitshift = 0;
- int nextbyte = (order == floatformat_little) ? 1 : -1;
-
- /* Start is in big-endian bit order! Fix that first. */
- start = total_len - (start + len);
+ int cur_bitshift;
/* Start at the least significant part of the field. */
+ cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;
if (order == floatformat_little)
- cur_byte = start / FLOATFORMAT_CHAR_BIT;
+ cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1;
+ cur_bitshift =
+ ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;
+ result = *(data + cur_byte) >> (-cur_bitshift);
+ cur_bitshift += FLOATFORMAT_CHAR_BIT;
+ if (order == floatformat_little)
+ ++cur_byte;
else
- cur_byte = (total_len - start - 1) / FLOATFORMAT_CHAR_BIT;
+ --cur_byte;
- lo_bit = start % FLOATFORMAT_CHAR_BIT;
- hi_bit = min (lo_bit + len, FLOATFORMAT_CHAR_BIT);
-
- do
+ /* Move towards the most significant part of the field. */
+ while ((unsigned int) cur_bitshift < len)
{
- unsigned int shifted = *(data + cur_byte) >> lo_bit;
- unsigned int bits = hi_bit - lo_bit;
- unsigned int mask = (1 << bits) - 1;
- result |= (shifted & mask) << cur_bitshift;
- len -= bits;
- cur_bitshift += bits;
- cur_byte += nextbyte;
- lo_bit = 0;
- hi_bit = min (len, FLOATFORMAT_CHAR_BIT);
+ if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT)
+ /* This is the last byte; zero out the bits which are not part of
+ this field. */
+ result |=
+ (*(data + cur_byte) & ((1 << (len - cur_bitshift)) - 1))
+ << cur_bitshift;
+ else
+ result |= *(data + cur_byte) << cur_bitshift;
+ cur_bitshift += FLOATFORMAT_CHAR_BIT;
+ if (order == floatformat_little)
+ ++cur_byte;
+ else
+ --cur_byte;
}
- while (len != 0);
-
return result;
}
+#ifndef min
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
/* Convert from FMT to a double.
FROM is the address of the extended float.
Store the double in *TO. */
@@ -426,34 +428,43 @@ put_field (unsigned char *data, enum floatformat_byteorders order,
unsigned long stuff_to_put)
{
unsigned int cur_byte;
- int lo_bit, hi_bit;
- int nextbyte = (order == floatformat_little) ? 1 : -1;
-
- /* Start is in big-endian bit order! Fix that first. */
- start = total_len - (start + len);
+ int cur_bitshift;
/* Start at the least significant part of the field. */
+ cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;
+ if (order == floatformat_little)
+ cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1;
+ cur_bitshift =
+ ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;
+ *(data + cur_byte) &=
+ ~(((1 << ((start + len) % FLOATFORMAT_CHAR_BIT)) - 1) << (-cur_bitshift));
+ *(data + cur_byte) |=
+ (stuff_to_put & ((1 << FLOATFORMAT_CHAR_BIT) - 1)) << (-cur_bitshift);
+ cur_bitshift += FLOATFORMAT_CHAR_BIT;
if (order == floatformat_little)
- cur_byte = start / FLOATFORMAT_CHAR_BIT;
+ ++cur_byte;
else
- cur_byte = (total_len - start - 1) / FLOATFORMAT_CHAR_BIT;
+ --cur_byte;
- lo_bit = start % FLOATFORMAT_CHAR_BIT;
- hi_bit = min (lo_bit + len, FLOATFORMAT_CHAR_BIT);
-
- do
+ /* Move towards the most significant part of the field. */
+ while ((unsigned int) cur_bitshift < len)
{
- unsigned char *byte_ptr = data + cur_byte;
- unsigned int bits = hi_bit - lo_bit;
- unsigned int mask = ((1 << bits) - 1) << lo_bit;
- *byte_ptr = (*byte_ptr & ~mask) | ((stuff_to_put << lo_bit) & mask);
- stuff_to_put >>= bits;
- len -= bits;
- cur_byte += nextbyte;
- lo_bit = 0;
- hi_bit = min (len, FLOATFORMAT_CHAR_BIT);
+ if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT)
+ {
+ /* This is the last byte. */
+ *(data + cur_byte) &=
+ ~((1 << (len - cur_bitshift)) - 1);
+ *(data + cur_byte) |= (stuff_to_put >> cur_bitshift);
+ }
+ else
+ *(data + cur_byte) = ((stuff_to_put >> cur_bitshift)
+ & ((1 << FLOATFORMAT_CHAR_BIT) - 1));
+ cur_bitshift += FLOATFORMAT_CHAR_BIT;
+ if (order == floatformat_little)
+ ++cur_byte;
+ else
+ --cur_byte;
}
- while (len != 0);
}
/* The converse: convert the double *FROM to an extended float
diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c
index ef9eb02..aef386d 100644
--- a/libiberty/pex-win32.c
+++ b/libiberty/pex-win32.c
@@ -1,6 +1,6 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. Generic Win32 specialization.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of the libiberty library.
@@ -358,7 +358,7 @@ argv_to_cmdline (char *const *argv)
cmdline_len += j;
cmdline_len += 3; /* for leading and trailing quotes and space */
}
- cmdline = XNEWVEC (char, cmdline_len);
+ cmdline = xmalloc (cmdline_len);
p = cmdline;
for (i = 0; argv[i]; i++)
{
@@ -382,18 +382,16 @@ argv_to_cmdline (char *const *argv)
return cmdline;
}
-/* We'll try the passed filename with all the known standard
- extensions, and then without extension. We try no extension
- last so that we don't try to run some random extension-less
- file that might be hanging around. We try both extension
- and no extension so that we don't need any fancy logic
- to determine if a file has extension. */
static const char *const
std_suffixes[] = {
".com",
".exe",
".bat",
".cmd",
+ 0
+};
+static const char *const
+no_suffixes[] = {
"",
0
};
@@ -411,6 +409,7 @@ find_executable (const char *program, BOOL search)
const char *const *ext;
const char *p, *q;
size_t proglen = strlen (program);
+ int has_extension = !!strchr (program, '.');
int has_slash = (strchr (program, '/') || strchr (program, '\\'));
HANDLE h;
@@ -433,8 +432,8 @@ find_executable (const char *program, BOOL search)
if (*q == ';')
q++;
}
- fe_len = fe_len + 1 + proglen + 5 /* space for extension */;
- full_executable = XNEWVEC (char, fe_len);
+ fe_len = fe_len + 1 + proglen + (has_extension ? 1 : 5);
+ full_executable = xmalloc (fe_len);
p = path;
do
@@ -459,7 +458,7 @@ find_executable (const char *program, BOOL search)
/* At this point, e points to the terminating NUL character for
full_executable. */
- for (ext = std_suffixes; *ext; ext++)
+ for (ext = has_extension ? no_suffixes : std_suffixes; *ext; ext++)
{
/* Remove any current extension. */
*e = '\0';
@@ -558,14 +557,14 @@ win32_spawn (const char *executable,
/* Windows needs the members of the block to be sorted by variable
name. */
- env_copy = (char **) alloca (sizeof (char *) * env_size);
+ env_copy = alloca (sizeof (char *) * env_size);
memcpy (env_copy, env, sizeof (char *) * env_size);
qsort (env_copy, env_size, sizeof (char *), env_compare);
for (var = 0; var < env_size; var++)
total_size += strlen (env[var]) + 1;
- env_block = XNEWVEC (char, total_size);
+ env_block = malloc (total_size);
bufptr = env_block;
for (var = 0; var < env_size; var++)
bufptr = stpcpy (bufptr, env_copy[var]) + 1;
diff --git a/libiberty/pexecute.txh b/libiberty/pexecute.txh
index 0310d8f..d85ee59 100644
--- a/libiberty/pexecute.txh
+++ b/libiberty/pexecute.txh
@@ -259,7 +259,7 @@ be set to the exit status of the program.
@end deftypefn
-@deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int @var{flags})
+@deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int flags)
This is the old interface to execute one or more programs. It is
still supported for compatibility purposes, but is no longer
diff --git a/libiberty/testsuite/Makefile.in b/libiberty/testsuite/Makefile.in
index 6979d94..534626e 100644
--- a/libiberty/testsuite/Makefile.in
+++ b/libiberty/testsuite/Makefile.in
@@ -73,7 +73,7 @@ test-expandargv: $(srcdir)/test-expandargv.c ../libiberty.a
$(srcdir)/test-expandargv.c ../libiberty.a
# Standard (either GNU or Cygnus) rules we don't use.
-html install-html info install-info clean-info dvi pdf install etags tags installcheck:
+html install-html info install-info clean-info dvi install etags tags installcheck:
# The standard clean rules.
mostlyclean:
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
index 3f5622f..4aaa3d6 100644
--- a/libiberty/testsuite/demangle-expected
+++ b/libiberty/testsuite/demangle-expected
@@ -3811,8 +3811,3 @@ make<Factory, int>
_Z1fM1AKiPKS1_
f(int const A::*, int const A::* const*)
f
-# This used to cause a core dump in the demangler -- PR 29176
---format=auto --no-params
-SASDASDFASDF_sdfsdf
-SASDASDFASDF_sdfsdf
-SASDASDFASDF_sdfsdf
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 727170e..ac61f93 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,177 +1,9 @@
-2006-11-09 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386-dis.c (print_insn): Check PREFIX_REPNZ before
- PREFIX_DATA when prefix user table is used.
-
-2006-11-09 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386-dis.c (twobyte_uses_SSE_prefix): Renamed to ...
- (twobyte_uses_DATA_prefix): This.
- (twobyte_uses_REPNZ_prefix): New.
- (twobyte_uses_REPZ_prefix): Likewise.
- (threebyte_0x38_uses_DATA_prefix): Likewise.
- (threebyte_0x38_uses_REPNZ_prefix): Likewise.
- (threebyte_0x38_uses_REPZ_prefix): Likewise.
- (threebyte_0x3a_uses_DATA_prefix): Likewise.
- (threebyte_0x3a_uses_REPNZ_prefix): Likewise.
- (threebyte_0x3a_uses_REPZ_prefix): Likewise.
- (print_insn): Updated checking usages of DATA/REPNZ/REPZ
- prefixes.
-
-2006-11-06 Troy Rollo <troy@corvu.com.au>
-
- * ppc-opc.c: Restore COM to mfcr wrongly removed 2003-07-04.
-
-2006-11-01 Mei Ligang <ligang@sunnorth.com.cn>
-
- * score-opc.h (score_opcodes): Delete modifier '0x'.
-
-2006-10-30 Paul Brook <paul@codesourcery.com>
-
- * arm-dis.c (last_is_thumb, last_mapping_sym, last_mapping_addr): New.
- (get_sym_code_type): New function.
- (print_insn): Search for mapping symbols.
-
-2006-10-31 Mei Ligang <ligang@sunnorth.com.cn>
-
- * score-dis.c (print_insn): Correct the error code to print
- correct PCE instruction disassembly.
-
-2006-10-26 Ben Elliston <bje@au.ibm.com>
- Anton Blanchard <anton@samba.org>
- Peter Bergner <bergner@vnet.ibm.com>
-
- * ppc-opc.c (A_L, DCM, DGM, TE, RMC, R, SP, S, SH16, XRT_L, EH,
- AFRALFRC_MASK, Z, ZRC, Z_MASK, XLRT_MASK, XEH_MASK): Define.
- (POWER6): Define.
- (powerpc_opcodes): Extend "lwarx", "ldarx", "dcbf", "fres", "fres.",
- "frsqrtes", "frsqrtes." "fre", "fre.", "frsqrte" and "frsqrte.".
- Add "doze", "nap", "sleep", "rvwinkle", "dcbfl", "prtyw", "prtyd",
- "mfcfar", "cmpb", "lfdpx", "stfdpx", "mtcfar", "mffgpr", "mftgpr",
- "lwzcix", "lhzcix", "lbzcix", "ldcix", "lfiwax", "stwcix", "sthcix",
- "stbcix", "stdcix", "lfdp", "dadd", "dadd.", "dqua", "dqua.", "dmul",
- "dmul.", "drrnd", "drrnd.", "dscli", "dscli.", "dquai", "dquai.",
- "dscri", "dscri.", "drintx", "drintx.", "dcmpo", "dtstex", "dtstdc",
- "dtstdg", "dtstsf", "drintn", "drintn.", "dctdp", "dctdp.", "dctfix",
- "dctfix.", "ddedpd", "ddedpd.", "dxex", "dxex.", "dsub", "dsub.",
- "ddiv", "ddiv.", "dcmpu", "drsp", "drsp.", "dcffix", "dcffix.",
- "denbcd", "denbcd.", "diex", "diex.", "stfdp", "daddq", "daddq.",
- "dquaq", "dquaq.", "fcpsgn", "fcpsgn.", "dmulq", "dmulq.",
- "drrndq", "drrndq.", "dscliq", "dscliq.", "dquaiq", "dquaiq.",
- "dscriq", "dscriq.", "drintxq", "drintxq.", "dcmpoq", "dtstexq",
- "dtstdcq", "dtstdgq", "dtstsfq", "drintnq", "drintnq.",
- "dctqpq", "dctqpq.", "dctfixq", "dctfixq.", "ddedpdq", "ddedpdq.",
- "dxexq", "dxexq.", "dsubq", "dsubq.", "ddivq", "ddivq.", "dcmpuq",
- "drdpq", "drdpq.", "dcffixq", "dcffixq.", "denbcdq", "denbcdq.",
- "diexq" and "diexq." opcodes.
-
-2006-10-26 Daniel Jacobowitz <dan@codesourcery.com>
-
- * h8300-dis.c (bfd_h8_disassemble): Add missing consts.
-
-2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
- Yukishige Shibata <shibata@rd.scei.sony.co.jp>
- Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
- Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
- Alan Modra <amodra@bigpond.net.au>
-
- * spu-dis.c: New file.
- * spu-opc.c: New file.
- * configure.in: Add SPU support.
- * disassemble.c: Likewise.
- * Makefile.am: Likewise. Run "make dep-am".
- * Makefile.in: Regenerate.
- * configure: Regenerate.
- * po/POTFILES.in: Regenerate.
-
-2006-10-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
-
- * ppc-opc.c (CELL): New define.
- (powerpc_opcodes): Enable hrfid for Cell. Add ldbrx and stdbrx,
- cell specific instructions. Add {st,l}x{r,l}{,l} cell specific
- VMX instructions.
- * ppc-dis.c (powerpc_dialect): Handle cell.
-
-2006-10-23 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
-
- * i386-dis.c (dis386): Add support for the change in POPCNT opcode in
- amdfam10 architecture.
- (PREGRP37): NEW.
- (print_insn): Disallow REP prefix for POPCNT.
-
-2006-10-20 Andrew Stubbs <andrew.stubbs@st.com>
-
- * sh-dis.c (print_insn_sh): Remove 0x from output to prevent GDB
- duplicating it.
-
-2006-10-18 Dave Brolley <brolley@redhat.com>
-
- * configure.in (BFD_MACHINES): Add cgen-bitset.lo for bfd_sh_arch.
- * configure: Regenerated.
-
-2006-09-29 Alan Modra <amodra@bigpond.net.au>
-
- * po/POTFILES.in: Regenerate.
-
-2006-09-26 Mark Shinwell <shinwell@codesourcery.com>
- Joseph Myers <joseph@codesourcery.com>
- Ian Lance Taylor <ian@wasabisystems.com>
- Ben Elliston <bje@wasabisystems.com>
-
- * arm-dis.c (coprocessor_opcodes): The X-qualifier to WMADD may
- only be used with the default multiply-add operation, so if N is
- set, don't bother printing X. Add new iwmmxt instructions.
- (IWMMXT_INSN_COUNT): Update.
- (iwmmxt_wwssnames): Qualify "wwss" names at index 2, 6, 10 and 14
- with a 'c' suffix.
- (print_insn_coprocessor): Check for iWMMXt2. Handle format
- specifiers 'r', 'i'.
-
-2006-09-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
-
- PR binutils/3100
- * i386-dis.c (prefix_user_table): Fix the second operand of
- maskmovdqu instruction to allow only %xmm register instead of
- both %xmm register and memory.
-
-2006-09-23 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/3235
- * i386-dis.c (OP_OFF64): Get 32bit offset if there is an
- address size prefix.
-
-2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
-
- * score-dis.c: New file.
- * score-opc.h: New file.
- * Makefile.am: Add Score files.
- * Makefile.in: Regenerate.
- * configure.in: Add support for Score target.
- * configure: Regenerate.
- * disassemble.c: Add support for Score target.
-
-2006-09-16 Nick Clifton <nickc@redhat.com>
- Pedro Alves <pedro_alves@portugalmail.pt>
-
- * arm-dis.c: Make use of new STRING_COMMA_LEN and CONST_STRNEQ
- macros defined in bfd.h.
- * cris-dis.c: Likewise.
- * h8300-dis.c: Likewise.
- * i386-dis.c: Likewise.
- * ia64-gen.c: Likewise.
- * mips-dis: Likewise.
-
-2006-09-04 Paul Brook <paul@codesourcery.com>
-
- * arm-dis.c (neon_opcode): Fix suffix on VMOVN.
-
2006-08-23 H.J. Lu <hongjiu.lu@intel.com>
* i386-dis.c (three_byte_table): Expand to 256 elements.
2006-08-04 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
- PR binutils/3000
* i386-dis.c (MXC,EMC): Define.
(OP_MXC): New function to handle cvt* (convert instructions) between
%xmm and %mm register correctly.
@@ -220,6 +52,7 @@
prefix for non-string instructions.
(print_insn): Ditto.
+
2006-07-05 Julian Brown <julian@codesourcery.com>
* arm-dis.c (coprocessor): Alter fmsrr disassembly syntax.
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index ebd252f..e54a829 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -41,7 +41,6 @@ HFILES = \
mcore-opc.h \
mt-desc.h mt-opc.h \
openrisc-desc.h openrisc-opc.h \
- score-opc.h \
sh-opc.h \
sh64-opc.h \
sysdep.h \
@@ -163,14 +162,11 @@ CFILES = \
s390-mkopc.c \
s390-opc.c \
s390-dis.c \
- score-dis.c \
sh-dis.c \
sh64-dis.c \
sh64-opc.c \
sparc-dis.c \
sparc-opc.c \
- spu-dis.c \
- spu-opc.c \
tic30-dis.c \
tic4x-dis.c \
tic54x-dis.c \
@@ -297,14 +293,11 @@ ALL_MACHINES = \
ppc-opc.lo \
s390-dis.lo \
s390-opc.lo \
- score-dis.lo \
sh-dis.lo \
sh64-dis.lo \
sh64-opc.lo \
sparc-dis.lo \
sparc-opc.lo \
- spu-dis.lo \
- spu-opc.lo \
tic30-dis.lo \
tic4x-dis.lo \
tic54x-dis.lo \
@@ -608,164 +601,131 @@ dep-am: DEP
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
alpha-dis.lo: alpha-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/alpha.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/alpha.h
alpha-opc.lo: alpha-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/alpha.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/opcode/alpha.h $(BFD_H) $(INCDIR)/symcat.h \
+ opintl.h
arc-dis.lo: arc-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
- opintl.h arc-dis.h arc-ext.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h \
+ $(INCDIR)/elf/reloc-macros.h opintl.h arc-dis.h arc-ext.h
arc-opc.lo: arc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h \
opintl.h
arc-ext.lo: arc-ext.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h arc-ext.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/symcat.h arc-ext.h $(INCDIR)/libiberty.h
arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/arm.h opintl.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/floatformat.h $(INCDIR)/ansidecl.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arm.h \
+ opintl.h $(INCDIR)/safe-ctype.h $(INCDIR)/floatformat.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h
avr-dis.lo: avr-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/avr.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/opcode/avr.h
bfin-dis.lo: bfin-dis.c $(INCDIR)/opcode/bfin.h $(INCDIR)/dis-asm.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
cgen-asm.lo: cgen-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h \
opintl.h
cgen-bitset.lo: cgen-bitset.c $(INCDIR)/libiberty.h \
$(INCDIR)/ansidecl.h $(INCDIR)/opcode/cgen-bitset.h
cgen-dis.lo: cgen-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h
+ $(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/opcode/cgen-bitset.h
cgen-opc.lo: cgen-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h
cris-dis.lo: cris-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/cris.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h
+ $(INCDIR)/opcode/cris.h $(INCDIR)/libiberty.h
cris-opc.lo: cris-opc.c $(INCDIR)/opcode/cris.h
crx-dis.lo: crx-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/crx.h
+ $(INCDIR)/opcode/crx.h
crx-opc.lo: crx-opc.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/opcode/crx.h
d10v-dis.lo: d10v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d10v.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/symcat.h
d10v-opc.lo: d10v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d10v.h
d30v-dis.lo: d30v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d30v.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/symcat.h opintl.h
d30v-opc.lo: d30v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d30v.h
dlx-dis.lo: dlx-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/dlx.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/dlx.h
dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h
dis-init.lo: dis-init.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H)
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
fr30-asm.lo: fr30-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
fr30-desc.lo: fr30-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
fr30-dis.lo: fr30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
- opintl.h
+ fr30-opc.h opintl.h
fr30-ibld.lo: fr30-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
fr30-opc.h opintl.h $(INCDIR)/safe-ctype.h
fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h fr30-opc.h $(INCDIR)/libiberty.h
frv-asm.lo: frv-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
frv-desc.lo: frv-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
- opintl.h
+ frv-opc.h opintl.h
frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
frv-opc.h opintl.h $(INCDIR)/safe-ctype.h
frv-opc.lo: frv-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/elf/frv.h \
- $(INCDIR)/elf/reloc-macros.h
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h
h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h
+ $(INCDIR)/symcat.h opintl.h $(INCDIR)/libiberty.h
h8500-dis.lo: h8500-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h opintl.h
+ h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ opintl.h
hppa-dis.lo: hppa-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(BFDDIR)/libhppa.h \
+ $(INCDIR)/opcode/hppa.h
i370-dis.lo: i370-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/i370.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/i370.h
i370-opc.lo: i370-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/i370.h
i386-dis.lo: i386-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- $(INCDIR)/ansidecl.h opintl.h
+ opintl.h
i860-dis.lo: i860-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/i860.h
i960-dis.lo: i960-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
ia64-dis.lo: ia64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/ia64.h \
- $(BFD_H)
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/ia64.h
ia64-opc-a.lo: ia64-opc-a.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
ia64-opc-b.lo: ia64-opc-b.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
@@ -778,390 +738,290 @@ ia64-opc-m.lo: ia64-opc-m.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
ia64-opc-d.lo: ia64-opc-d.c
ia64-opc.lo: ia64-opc.c $(INCDIR)/ansidecl.h sysdep.h \
- config.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- ia64-asmtab.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ia64-asmtab.c
+ config.h $(INCDIR)/libiberty.h ia64-asmtab.h $(INCDIR)/opcode/ia64.h \
+ $(BFD_H) $(INCDIR)/symcat.h ia64-asmtab.c
ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h sysdep.h \
- config.h $(INCDIR)/getopt.h ia64-opc.h $(INCDIR)/opcode/ia64.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h ia64-opc-a.c \
- ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c ia64-opc-f.c \
- ia64-opc-x.c ia64-opc-d.c
+ $(INCDIR)/safe-ctype.h sysdep.h config.h $(INCDIR)/getopt.h \
+ ia64-opc.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.h \
+ ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
+ ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
ia64-asmtab.lo: ia64-asmtab.c
ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
ip2k-dis.lo: ip2k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
- opintl.h
+ ip2k-opc.h opintl.h
ip2k-ibld.lo: ip2k-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
ip2k-opc.h opintl.h $(INCDIR)/safe-ctype.h
ip2k-opc.lo: ip2k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h ip2k-opc.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
iq2000-asm.lo: iq2000-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
iq2000-desc.lo: iq2000-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
iq2000-dis.lo: iq2000-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
- opintl.h
+ iq2000-opc.h opintl.h
iq2000-ibld.lo: iq2000-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
iq2000-opc.h opintl.h $(INCDIR)/safe-ctype.h
iq2000-opc.lo: iq2000-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h iq2000-opc.h $(INCDIR)/libiberty.h
m32c-asm.lo: m32c-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
- cgen-types.h cgen-ops.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32c-opc.h cgen-types.h cgen-ops.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h
m32c-desc.lo: m32c-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
- cgen-types.h cgen-ops.h opintl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+ $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32c-opc.h cgen-types.h cgen-ops.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
m32c-dis.lo: m32c-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
- cgen-types.h cgen-ops.h opintl.h $(INCDIR)/elf/m32c.h \
+ m32c-opc.h cgen-types.h cgen-ops.h opintl.h $(INCDIR)/elf/m32c.h \
$(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
m32c-ibld.lo: m32c-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
m32c-opc.h cgen-types.h cgen-ops.h opintl.h $(INCDIR)/safe-ctype.h
m32c-opc.lo: m32c-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
- cgen-types.h cgen-ops.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32c-opc.h cgen-types.h cgen-ops.h \
+ $(INCDIR)/libiberty.h
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
m32r-desc.lo: m32r-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
m32r-dis.lo: m32r-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
- opintl.h
+ m32r-opc.h opintl.h
m32r-ibld.lo: m32r-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h opintl.h $(INCDIR)/safe-ctype.h
m32r-opc.lo: m32r-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32r-opc.h $(INCDIR)/libiberty.h
m32r-opinst.lo: m32r-opinst.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32r-opc.h
m68hc11-dis.lo: m68hc11-dis.c $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68hc11.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/symcat.h
m68hc11-opc.lo: m68hc11-opc.c $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68hc11.h
m68k-dis.lo: m68k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/floatformat.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- opintl.h $(INCDIR)/opcode/m68k.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/floatformat.h \
+ $(INCDIR)/libiberty.h opintl.h $(INCDIR)/opcode/m68k.h
m68k-opc.lo: m68k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68k.h
m88k-dis.lo: m88k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/m88k.h opintl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/m88k.h \
+ opintl.h $(INCDIR)/libiberty.h
maxq-dis.lo: maxq-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/maxq.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/maxq.h
mcore-dis.lo: mcore-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h
+ mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mips.h \
- opintl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/opcode/mips.h opintl.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
mips-opc.lo: mips-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mips.h
mips16-opc.lo: mips16-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mips.h
m10200-dis.lo: m10200-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10200.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/symcat.h opintl.h
m10200-opc.lo: m10200-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10200.h
m10300-dis.lo: m10300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10300.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/symcat.h opintl.h
m10300-opc.lo: m10300-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10300.h
mmix-dis.lo: mmix-dis.c $(INCDIR)/opcode/mmix.h $(INCDIR)/dis-asm.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(BFD_H) opintl.h
+ opintl.h
mmix-opc.lo: mmix-opc.c $(INCDIR)/opcode/mmix.h $(INCDIR)/symcat.h
mt-asm.lo: mt-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h mt-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
mt-desc.lo: mt-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h mt-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
mt-dis.lo: mt-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
- opintl.h
+ mt-opc.h opintl.h
mt-ibld.lo: mt-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h mt-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
mt-opc.h opintl.h $(INCDIR)/safe-ctype.h
mt-opc.lo: mt-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h mt-opc.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
ns32k-dis.lo: ns32k-dis.c $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/ns32k.h \
- opintl.h
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(INCDIR)/opcode/ns32k.h opintl.h
openrisc-asm.lo: openrisc-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
openrisc-desc.lo: openrisc-desc.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/symcat.h openrisc-desc.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+ openrisc-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
openrisc-dis.lo: openrisc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
- opintl.h
+ openrisc-opc.h opintl.h
openrisc-ibld.lo: openrisc-ibld.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
- opintl.h $(INCDIR)/safe-ctype.h
-openrisc-opc.lo: openrisc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ openrisc-opc.h opintl.h $(INCDIR)/safe-ctype.h
+openrisc-opc.lo: openrisc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h openrisc-opc.h $(INCDIR)/libiberty.h
or32-dis.lo: or32-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/or32.h \
$(INCDIR)/safe-ctype.h
or32-opc.lo: or32-opc.c $(INCDIR)/safe-ctype.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/or32.h
pdp11-dis.lo: pdp11-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/pdp11.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/pdp11.h
pdp11-opc.lo: pdp11-opc.c $(INCDIR)/opcode/pdp11.h
pj-dis.lo: pj-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/pj.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/symcat.h
pj-opc.lo: pj-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/pj.h
ppc-dis.lo: ppc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/ppc.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/ppc.h
ppc-opc.lo: ppc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/ppc.h opintl.h
s390-mkopc.lo: s390-mkopc.c
s390-opc.lo: s390-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/s390.h \
s390-opc.tab
s390-dis.lo: s390-dis.c $(INCDIR)/ansidecl.h sysdep.h \
- config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/s390.h
-score-dis.lo: score-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- score-opc.h opintl.h $(BFD_H) $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h
+ config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/s390.h
sh-dis.lo: sh-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- sh-opc.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/dis-asm.h $(BFD_H)
+ sh-opc.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/dis-asm.h
sh64-dis.lo: sh64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- $(INCDIR)/ansidecl.h sh64-opc.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf32-sh64.h
+ sh64-opc.h $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+ $(BFDDIR)/elf32-sh64.h
sh64-opc.lo: sh64-opc.c sh64-opc.h
sparc-dis.lo: sparc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/sparc.h $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h opintl.h
+ $(INCDIR)/opcode/sparc.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h opintl.h
sparc-opc.lo: sparc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/sparc.h $(INCDIR)/ansidecl.h
-spu-dis.lo: spu-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/spu.h $(INCDIR)/opcode/spu-insns.h
-spu-opc.lo: spu-opc.c $(INCDIR)/opcode/spu.h $(INCDIR)/opcode/spu-insns.h \
- $(INCDIR)/opcode/spu-insns.h
+ $(INCDIR)/opcode/sparc.h
tic30-dis.lo: tic30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/tic30.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic30.h
tic4x-dis.lo: tic4x-dis.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/tic4x.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic4x.h
tic54x-dis.lo: tic54x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/tic54x.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h \
+ $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h
tic54x-opc.lo: tic54x-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/tic54x.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h
tic80-dis.lo: tic80-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/tic80.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/symcat.h
tic80-opc.lo: tic80-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/tic80.h
v850-dis.lo: v850-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/v850.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/symcat.h opintl.h
v850-opc.lo: v850-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/v850.h opintl.h
vax-dis.lo: vax-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
-w65-dis.lo: w65-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h
+w65-dis.lo: w65-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
xc16x-asm.lo: xc16x-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h xc16x-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
xc16x-desc.lo: xc16x-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h xc16x-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
xc16x-dis.lo: xc16x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
- opintl.h
+ xc16x-opc.h opintl.h
xc16x-ibld.lo: xc16x-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
xc16x-opc.h opintl.h $(INCDIR)/safe-ctype.h
xc16x-opc.lo: xc16x-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h xc16x-opc.h $(INCDIR)/libiberty.h
xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ xstormy16-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
xstormy16-desc.lo: xstormy16-desc.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+ xstormy16-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
xstormy16-dis.lo: xstormy16-dis.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
- xstormy16-opc.h opintl.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ $(INCDIR)/libiberty.h xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h
xstormy16-ibld.lo: xstormy16-ibld.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
- opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ xstormy16-opc.h opintl.h $(INCDIR)/safe-ctype.h
xstormy16-opc.lo: xstormy16-opc.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ xstormy16-opc.h $(INCDIR)/libiberty.h
xtensa-dis.lo: xtensa-dis.c $(INCDIR)/xtensa-isa.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- sysdep.h config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h sysdep.h \
+ config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
z80-dis.lo: z80-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
z8k-dis.lo: z8k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- z8k-opc.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h z8k-opc.h
z8kgen.lo: z8kgen.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(INCDIR)/libiberty.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index 85003e6..bcbd41e 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -254,7 +254,6 @@ HFILES = \
mcore-opc.h \
mt-desc.h mt-opc.h \
openrisc-desc.h openrisc-opc.h \
- score-opc.h \
sh-opc.h \
sh64-opc.h \
sysdep.h \
@@ -377,14 +376,11 @@ CFILES = \
s390-mkopc.c \
s390-opc.c \
s390-dis.c \
- score-dis.c \
sh-dis.c \
sh64-dis.c \
sh64-opc.c \
sparc-dis.c \
sparc-opc.c \
- spu-dis.c \
- spu-opc.c \
tic30-dis.c \
tic4x-dis.c \
tic54x-dis.c \
@@ -511,14 +507,11 @@ ALL_MACHINES = \
ppc-opc.lo \
s390-dis.lo \
s390-opc.lo \
- score-dis.lo \
sh-dis.lo \
sh64-dis.lo \
sh64-opc.lo \
sparc-dis.lo \
sparc-opc.lo \
- spu-dis.lo \
- spu-opc.lo \
tic30-dis.lo \
tic4x-dis.lo \
tic54x-dis.lo \
@@ -1145,164 +1138,131 @@ dep-am: DEP
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
alpha-dis.lo: alpha-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/alpha.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/alpha.h
alpha-opc.lo: alpha-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/alpha.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/opcode/alpha.h $(BFD_H) $(INCDIR)/symcat.h \
+ opintl.h
arc-dis.lo: arc-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
- opintl.h arc-dis.h arc-ext.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h \
+ $(INCDIR)/elf/reloc-macros.h opintl.h arc-dis.h arc-ext.h
arc-opc.lo: arc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h \
opintl.h
arc-ext.lo: arc-ext.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h arc-ext.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/symcat.h arc-ext.h $(INCDIR)/libiberty.h
arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/arm.h opintl.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/floatformat.h $(INCDIR)/ansidecl.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arm.h \
+ opintl.h $(INCDIR)/safe-ctype.h $(INCDIR)/floatformat.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h
avr-dis.lo: avr-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/avr.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/opcode/avr.h
bfin-dis.lo: bfin-dis.c $(INCDIR)/opcode/bfin.h $(INCDIR)/dis-asm.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
cgen-asm.lo: cgen-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h \
opintl.h
cgen-bitset.lo: cgen-bitset.c $(INCDIR)/libiberty.h \
$(INCDIR)/ansidecl.h $(INCDIR)/opcode/cgen-bitset.h
cgen-dis.lo: cgen-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h
+ $(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/opcode/cgen-bitset.h
cgen-opc.lo: cgen-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h
cris-dis.lo: cris-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/cris.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h
+ $(INCDIR)/opcode/cris.h $(INCDIR)/libiberty.h
cris-opc.lo: cris-opc.c $(INCDIR)/opcode/cris.h
crx-dis.lo: crx-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/crx.h
+ $(INCDIR)/opcode/crx.h
crx-opc.lo: crx-opc.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/opcode/crx.h
d10v-dis.lo: d10v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d10v.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/symcat.h
d10v-opc.lo: d10v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d10v.h
d30v-dis.lo: d30v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d30v.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/symcat.h opintl.h
d30v-opc.lo: d30v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d30v.h
dlx-dis.lo: dlx-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/dlx.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/dlx.h
dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h
dis-init.lo: dis-init.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H)
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
fr30-asm.lo: fr30-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
fr30-desc.lo: fr30-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
fr30-dis.lo: fr30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
- opintl.h
+ fr30-opc.h opintl.h
fr30-ibld.lo: fr30-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
fr30-opc.h opintl.h $(INCDIR)/safe-ctype.h
fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h fr30-opc.h $(INCDIR)/libiberty.h
frv-asm.lo: frv-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
frv-desc.lo: frv-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
- opintl.h
+ frv-opc.h opintl.h
frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
frv-opc.h opintl.h $(INCDIR)/safe-ctype.h
frv-opc.lo: frv-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/elf/frv.h \
- $(INCDIR)/elf/reloc-macros.h
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h
h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h
+ $(INCDIR)/symcat.h opintl.h $(INCDIR)/libiberty.h
h8500-dis.lo: h8500-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h opintl.h
+ h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ opintl.h
hppa-dis.lo: hppa-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(BFDDIR)/libhppa.h \
+ $(INCDIR)/opcode/hppa.h
i370-dis.lo: i370-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/i370.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/i370.h
i370-opc.lo: i370-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/i370.h
i386-dis.lo: i386-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- $(INCDIR)/ansidecl.h opintl.h
+ opintl.h
i860-dis.lo: i860-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/i860.h
i960-dis.lo: i960-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
ia64-dis.lo: ia64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/ia64.h \
- $(BFD_H)
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/ia64.h
ia64-opc-a.lo: ia64-opc-a.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
ia64-opc-b.lo: ia64-opc-b.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
@@ -1315,392 +1275,292 @@ ia64-opc-m.lo: ia64-opc-m.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
ia64-opc-d.lo: ia64-opc-d.c
ia64-opc.lo: ia64-opc.c $(INCDIR)/ansidecl.h sysdep.h \
- config.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- ia64-asmtab.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ia64-asmtab.c
+ config.h $(INCDIR)/libiberty.h ia64-asmtab.h $(INCDIR)/opcode/ia64.h \
+ $(BFD_H) $(INCDIR)/symcat.h ia64-asmtab.c
ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h sysdep.h \
- config.h $(INCDIR)/getopt.h ia64-opc.h $(INCDIR)/opcode/ia64.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h ia64-opc-a.c \
- ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c ia64-opc-f.c \
- ia64-opc-x.c ia64-opc-d.c
+ $(INCDIR)/safe-ctype.h sysdep.h config.h $(INCDIR)/getopt.h \
+ ia64-opc.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.h \
+ ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
+ ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
ia64-asmtab.lo: ia64-asmtab.c
ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
ip2k-dis.lo: ip2k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
- opintl.h
+ ip2k-opc.h opintl.h
ip2k-ibld.lo: ip2k-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
ip2k-opc.h opintl.h $(INCDIR)/safe-ctype.h
ip2k-opc.lo: ip2k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h ip2k-opc.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
iq2000-asm.lo: iq2000-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
iq2000-desc.lo: iq2000-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
iq2000-dis.lo: iq2000-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
- opintl.h
+ iq2000-opc.h opintl.h
iq2000-ibld.lo: iq2000-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
iq2000-opc.h opintl.h $(INCDIR)/safe-ctype.h
iq2000-opc.lo: iq2000-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h iq2000-opc.h $(INCDIR)/libiberty.h
m32c-asm.lo: m32c-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
- cgen-types.h cgen-ops.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32c-opc.h cgen-types.h cgen-ops.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h
m32c-desc.lo: m32c-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
- cgen-types.h cgen-ops.h opintl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+ $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32c-opc.h cgen-types.h cgen-ops.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
m32c-dis.lo: m32c-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
- cgen-types.h cgen-ops.h opintl.h $(INCDIR)/elf/m32c.h \
+ m32c-opc.h cgen-types.h cgen-ops.h opintl.h $(INCDIR)/elf/m32c.h \
$(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
m32c-ibld.lo: m32c-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
m32c-opc.h cgen-types.h cgen-ops.h opintl.h $(INCDIR)/safe-ctype.h
m32c-opc.lo: m32c-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
- cgen-types.h cgen-ops.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32c-opc.h cgen-types.h cgen-ops.h \
+ $(INCDIR)/libiberty.h
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
m32r-desc.lo: m32r-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
m32r-dis.lo: m32r-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
- opintl.h
+ m32r-opc.h opintl.h
m32r-ibld.lo: m32r-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h opintl.h $(INCDIR)/safe-ctype.h
m32r-opc.lo: m32r-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32r-opc.h $(INCDIR)/libiberty.h
m32r-opinst.lo: m32r-opinst.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32r-opc.h
m68hc11-dis.lo: m68hc11-dis.c $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68hc11.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/symcat.h
m68hc11-opc.lo: m68hc11-opc.c $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68hc11.h
m68k-dis.lo: m68k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/floatformat.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- opintl.h $(INCDIR)/opcode/m68k.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/floatformat.h \
+ $(INCDIR)/libiberty.h opintl.h $(INCDIR)/opcode/m68k.h
m68k-opc.lo: m68k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68k.h
m88k-dis.lo: m88k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/m88k.h opintl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/m88k.h \
+ opintl.h $(INCDIR)/libiberty.h
maxq-dis.lo: maxq-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/maxq.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/maxq.h
mcore-dis.lo: mcore-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h
+ mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mips.h \
- opintl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/opcode/mips.h opintl.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
mips-opc.lo: mips-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mips.h
mips16-opc.lo: mips16-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mips.h
m10200-dis.lo: m10200-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10200.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/symcat.h opintl.h
m10200-opc.lo: m10200-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10200.h
m10300-dis.lo: m10300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10300.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/symcat.h opintl.h
m10300-opc.lo: m10300-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10300.h
mmix-dis.lo: mmix-dis.c $(INCDIR)/opcode/mmix.h $(INCDIR)/dis-asm.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(BFD_H) opintl.h
+ opintl.h
mmix-opc.lo: mmix-opc.c $(INCDIR)/opcode/mmix.h $(INCDIR)/symcat.h
mt-asm.lo: mt-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h mt-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
mt-desc.lo: mt-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h mt-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
mt-dis.lo: mt-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
- opintl.h
+ mt-opc.h opintl.h
mt-ibld.lo: mt-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h mt-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
mt-opc.h opintl.h $(INCDIR)/safe-ctype.h
mt-opc.lo: mt-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h mt-opc.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
ns32k-dis.lo: ns32k-dis.c $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/ns32k.h \
- opintl.h
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(INCDIR)/opcode/ns32k.h opintl.h
openrisc-asm.lo: openrisc-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
openrisc-desc.lo: openrisc-desc.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/symcat.h openrisc-desc.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+ openrisc-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
openrisc-dis.lo: openrisc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
- opintl.h
+ openrisc-opc.h opintl.h
openrisc-ibld.lo: openrisc-ibld.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
- opintl.h $(INCDIR)/safe-ctype.h
-openrisc-opc.lo: openrisc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ openrisc-opc.h opintl.h $(INCDIR)/safe-ctype.h
+openrisc-opc.lo: openrisc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h openrisc-opc.h $(INCDIR)/libiberty.h
or32-dis.lo: or32-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/or32.h \
$(INCDIR)/safe-ctype.h
or32-opc.lo: or32-opc.c $(INCDIR)/safe-ctype.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/or32.h
pdp11-dis.lo: pdp11-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/pdp11.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/pdp11.h
pdp11-opc.lo: pdp11-opc.c $(INCDIR)/opcode/pdp11.h
pj-dis.lo: pj-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/pj.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/symcat.h
pj-opc.lo: pj-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/pj.h
ppc-dis.lo: ppc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/ppc.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/ppc.h
ppc-opc.lo: ppc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/ppc.h opintl.h
s390-mkopc.lo: s390-mkopc.c
s390-opc.lo: s390-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/s390.h \
s390-opc.tab
s390-dis.lo: s390-dis.c $(INCDIR)/ansidecl.h sysdep.h \
- config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/s390.h
-score-dis.lo: score-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- score-opc.h opintl.h $(BFD_H) $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h
+ config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/s390.h
sh-dis.lo: sh-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- sh-opc.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/dis-asm.h $(BFD_H)
+ sh-opc.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/dis-asm.h
sh64-dis.lo: sh64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- $(INCDIR)/ansidecl.h sh64-opc.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf32-sh64.h
+ sh64-opc.h $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+ $(BFDDIR)/elf32-sh64.h
sh64-opc.lo: sh64-opc.c sh64-opc.h
sparc-dis.lo: sparc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/sparc.h $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h opintl.h
+ $(INCDIR)/opcode/sparc.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h opintl.h
sparc-opc.lo: sparc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/sparc.h $(INCDIR)/ansidecl.h
-spu-dis.lo: spu-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/spu.h $(INCDIR)/opcode/spu-insns.h
-spu-opc.lo: spu-opc.c $(INCDIR)/opcode/spu.h $(INCDIR)/opcode/spu-insns.h \
- $(INCDIR)/opcode/spu-insns.h
+ $(INCDIR)/opcode/sparc.h
tic30-dis.lo: tic30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/tic30.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic30.h
tic4x-dis.lo: tic4x-dis.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/tic4x.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic4x.h
tic54x-dis.lo: tic54x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/tic54x.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h \
+ $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h
tic54x-opc.lo: tic54x-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(INCDIR)/opcode/tic54x.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h
tic80-dis.lo: tic80-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/tic80.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/symcat.h
tic80-opc.lo: tic80-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/tic80.h
v850-dis.lo: v850-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/v850.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/symcat.h opintl.h
v850-opc.lo: v850-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/v850.h opintl.h
vax-dis.lo: vax-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
-w65-dis.lo: w65-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h
+w65-dis.lo: w65-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
xc16x-asm.lo: xc16x-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h xc16x-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
xc16x-desc.lo: xc16x-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h xc16x-opc.h opintl.h $(INCDIR)/libiberty.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
xc16x-dis.lo: xc16x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
- opintl.h
+ xc16x-opc.h opintl.h
xc16x-ibld.lo: xc16x-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
xc16x-opc.h opintl.h $(INCDIR)/safe-ctype.h
xc16x-opc.lo: xc16x-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
- xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h xc16x-opc.h $(INCDIR)/libiberty.h
xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ xstormy16-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
xstormy16-desc.lo: xstormy16-desc.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+ xstormy16-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
xstormy16-dis.lo: xstormy16-dis.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
- $(INCDIR)/ansidecl.h xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
- xstormy16-opc.h opintl.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ $(INCDIR)/libiberty.h xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h
xstormy16-ibld.lo: xstormy16-ibld.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
- opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ xstormy16-opc.h opintl.h $(INCDIR)/safe-ctype.h
xstormy16-opc.lo: xstormy16-opc.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ xstormy16-opc.h $(INCDIR)/libiberty.h
xtensa-dis.lo: xtensa-dis.c $(INCDIR)/xtensa-isa.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- sysdep.h config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h sysdep.h \
+ config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
z80-dis.lo: z80-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
z8k-dis.lo: z8k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- z8k-opc.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h z8k-opc.h
z8kgen.lo: z8kgen.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+ $(INCDIR)/libiberty.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index 7a02e31..147e149 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -98,11 +98,7 @@ struct opcode16
%L print as an iWMMXt N/M width field.
%Z print the Immediate of a WSHUFH instruction.
%l like 'A' except use byte offsets for 'B' & 'H'
- versions.
- %i print 5-bit immediate in bits 8,3..0
- (print "32" when 0)
- %r print register offset address for wldt/wstr instruction
-*/
+ versions. */
/* Common coprocessor opcodes shared between Arm and Thumb-2. */
@@ -117,7 +113,7 @@ static const struct opcode32 coprocessor_opcodes[] =
/* Intel Wireless MMX technology instructions. */
#define FIRST_IWMMXT_INSN 0x0e130130
-#define IWMMXT_INSN_COUNT 73
+#define IWMMXT_INSN_COUNT 47
{ARM_CEXT_IWMMXT, 0x0e130130, 0x0f3f0fff, "tandc%22-23w%c\t%12-15r"},
{ARM_CEXT_XSCALE, 0x0e400010, 0x0ff00f3f, "tbcst%6-7w%c\t%16-19g, %12-15r"},
{ARM_CEXT_XSCALE, 0x0e130170, 0x0f3f0ff8, "textrc%22-23w%c\t%12-15r, #%0-2d"},
@@ -132,63 +128,37 @@ static const struct opcode32 coprocessor_opcodes[] =
{ARM_CEXT_XSCALE, 0x0e100110, 0x0ff00ff0, "tmrc%c\t%12-15r, %16-19G"},
{ARM_CEXT_XSCALE, 0x0c500000, 0x0ff00ff0, "tmrrc%c\t%12-15r, %16-19r, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e130150, 0x0f3f0fff, "torc%22-23w%c\t%12-15r"},
- {ARM_CEXT_XSCALE, 0x0e130190, 0x0f3f0fff, "torvsc%22-23w%c\t%12-15r"},
- {ARM_CEXT_XSCALE, 0x0e2001c0, 0x0f300fff, "wabs%22-23w%c\t%12-15g, %16-19g"},
{ARM_CEXT_XSCALE, 0x0e0001c0, 0x0f300fff, "wacc%22-23w%c\t%12-15g, %16-19g"},
{ARM_CEXT_XSCALE, 0x0e000180, 0x0f000ff0, "wadd%20-23w%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e2001a0, 0x0f300ff0, "waddbhus%22?ml%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0ea001a0, 0x0ff00ff0, "waddsubhx%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e000020, 0x0f800ff0, "waligni%c\t%12-15g, %16-19g, %0-3g, #%20-22d"},
{ARM_CEXT_XSCALE, 0x0e800020, 0x0fc00ff0, "walignr%20-21d%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e200000, 0x0fe00ff0, "wand%20'n%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e800000, 0x0fa00ff0, "wavg2%22?hb%20'r%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e400000, 0x0fe00ff0, "wavg4%20'r%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e000060, 0x0f300ff0, "wcmpeq%22-23w%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e100060, 0x0f100ff0, "wcmpgt%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0xfc500100, 0xfe500f00, "wldrd\t%12-15g, %r"},
{ARM_CEXT_XSCALE, 0xfc100100, 0xfe500f00, "wldrw\t%12-15G, %A"},
{ARM_CEXT_XSCALE, 0x0c100000, 0x0e100e00, "wldr%L%c\t%12-15g, %l"},
{ARM_CEXT_XSCALE, 0x0e400100, 0x0fc00ff0, "wmac%21?su%20'z%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e800100, 0x0fc00ff0, "wmadd%21?su%20'x%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0ec00100, 0x0fd00ff0, "wmadd%21?sun%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e800100, 0x0fd00ff0, "wmadd%21?su%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e000160, 0x0f100ff0, "wmax%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e000080, 0x0f100fe0, "wmerge%c\t%12-15g, %16-19g, %0-3g, #%21-23d"},
- {ARM_CEXT_XSCALE, 0x0e0000a0, 0x0f800ff0, "wmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e800120, 0x0f800ff0, "wmiaw%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e100160, 0x0f100ff0, "wmin%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e000100, 0x0fc00ff0, "wmul%21?su%20?ml%23'r%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0ed00100, 0x0fd00ff0, "wmul%21?sumr%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0ee000c0, 0x0fe00ff0, "wmulwsm%20`r%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0ec000c0, 0x0fe00ff0, "wmulwum%20`r%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0eb000c0, 0x0ff00ff0, "wmulwl%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e8000a0, 0x0f800ff0, "wqmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e100080, 0x0fd00ff0, "wqmulm%21'r%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0ec000e0, 0x0fd00ff0, "wqmulwm%21'r%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e000100, 0x0fc00ff0, "wmul%21?su%20?ml%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e000000, 0x0ff00ff0, "wor%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e000080, 0x0f000ff0, "wpack%20-23w%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0xfe300040, 0xff300ef0, "wror%22-23w\t%12-15g, %16-19g, #%i"},
- {ARM_CEXT_XSCALE, 0x0e300040, 0x0f300ff0, "wror%22-23w%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e300140, 0x0f300ff0, "wror%22-23wg%c\t%12-15g, %16-19g, %0-3G"},
+ {ARM_CEXT_XSCALE, 0x0e300040, 0x0f300ff0, "wror%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e300148, 0x0f300ffc, "wror%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
{ARM_CEXT_XSCALE, 0x0e000120, 0x0fa00ff0, "wsad%22?hb%20'z%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e0001e0, 0x0f000ff0, "wshufh%c\t%12-15g, %16-19g, #%Z"},
- {ARM_CEXT_XSCALE, 0xfe100040, 0xff300ef0, "wsll%22-23w\t%12-15g, %16-19g, #%i"},
{ARM_CEXT_XSCALE, 0x0e100040, 0x0f300ff0, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e100148, 0x0f300ffc, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
- {ARM_CEXT_XSCALE, 0xfe000040, 0xff300ef0, "wsra%22-23w\t%12-15g, %16-19g, #%i"},
{ARM_CEXT_XSCALE, 0x0e000040, 0x0f300ff0, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e000148, 0x0f300ffc, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
- {ARM_CEXT_XSCALE, 0xfe200040, 0xff300ef0, "wsrl%22-23w\t%12-15g, %16-19g, #%i"},
{ARM_CEXT_XSCALE, 0x0e200040, 0x0f300ff0, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e200148, 0x0f300ffc, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
- {ARM_CEXT_XSCALE, 0xfc400100, 0xfe500f00, "wstrd\t%12-15g, %r"},
{ARM_CEXT_XSCALE, 0xfc000100, 0xfe500f00, "wstrw\t%12-15G, %A"},
{ARM_CEXT_XSCALE, 0x0c000000, 0x0e100e00, "wstr%L%c\t%12-15g, %l"},
{ARM_CEXT_XSCALE, 0x0e0001a0, 0x0f000ff0, "wsub%20-23w%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0ed001c0, 0x0ff00ff0, "wsubaddhx%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e1001c0, 0x0f300ff0, "wabsdiff%22-23w%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e0000c0, 0x0fd00fff, "wunpckeh%21?sub%c\t%12-15g, %16-19g"},
- {ARM_CEXT_XSCALE, 0x0e4000c0, 0x0fd00fff, "wunpckeh%21?suh%c\t%12-15g, %16-19g"},
- {ARM_CEXT_XSCALE, 0x0e8000c0, 0x0fd00fff, "wunpckeh%21?suw%c\t%12-15g, %16-19g"},
+ {ARM_CEXT_XSCALE, 0x0e0000c0, 0x0f100fff, "wunpckeh%21?su%22-23w%c\t%12-15g, %16-19g"},
{ARM_CEXT_XSCALE, 0x0e0000e0, 0x0f100fff, "wunpckel%21?su%22-23w%c\t%12-15g, %16-19g"},
{ARM_CEXT_XSCALE, 0x0e1000c0, 0x0f300ff0, "wunpckih%22-23w%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e1000e0, 0x0f300ff0, "wunpckil%22-23w%c\t%12-15g, %16-19g, %0-3g"},
@@ -505,7 +475,7 @@ static const struct opcode32 neon_opcodes[] =
{FPU_NEON_EXT_V1, 0xf3b00500, 0xffbf0f90, "vcnt%c.8\t%12-15,22R, %0-3,5R"},
{FPU_NEON_EXT_V1, 0xf3b00580, 0xffbf0f90, "vmvn%c\t%12-15,22R, %0-3,5R"},
{FPU_NEON_EXT_V1, 0xf3b20000, 0xffbf0f90, "vswp%c\t%12-15,22R, %0-3,5R"},
- {FPU_NEON_EXT_V1, 0xf3b20200, 0xffb30fd0, "vmovn%c.i%18-19T2\t%12-15,22D, %0-3,5Q"},
+ {FPU_NEON_EXT_V1, 0xf3b20200, 0xffb30fd0, "vmovn%c.i%18-19S2\t%12-15,22D, %0-3,5Q"},
{FPU_NEON_EXT_V1, 0xf3b20240, 0xffb30fd0, "vqmovun%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
{FPU_NEON_EXT_V1, 0xf3b20280, 0xffb30fd0, "vqmovn%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
{FPU_NEON_EXT_V1, 0xf3b202c0, 0xffb30fd0, "vqmovn%c.u%18-19T2\t%12-15,22D, %0-3,5Q"},
@@ -1447,10 +1417,10 @@ static const char *const iwmmxt_wwnames[] =
{"b", "h", "w", "d"};
static const char *const iwmmxt_wwssnames[] =
-{"b", "bus", "bc", "bss",
- "h", "hus", "hc", "hss",
- "w", "wus", "wc", "wss",
- "d", "dus", "dc", "dss"
+{"b", "bus", "b", "bss",
+ "h", "hus", "h", "hss",
+ "w", "wus", "w", "wss",
+ "d", "dus", "d", "dss"
};
static const char *const iwmmxt_regnames[] =
@@ -1480,11 +1450,6 @@ static unsigned int ifthen_next_state;
static bfd_vma ifthen_address;
#define IFTHEN_COND ((ifthen_state >> 4) & 0xf)
-/* Cached Thumb state. */
-int last_is_thumb;
-int last_mapping_sym = -1;
-bfd_vma last_mapping_addr = 0;
-
/* Functions. */
int
@@ -1598,8 +1563,7 @@ print_insn_coprocessor (bfd_vma pc, struct disassemble_info *info, long given,
{
if (insn->value == FIRST_IWMMXT_INSN
&& info->mach != bfd_mach_arm_XScale
- && info->mach != bfd_mach_arm_iWMMXt
- && info->mach != bfd_mach_arm_iWMMXt2)
+ && info->mach != bfd_mach_arm_iWMMXt)
insn = insn + IWMMXT_INSN_COUNT;
mask = insn->mask;
@@ -2013,53 +1977,6 @@ print_insn_coprocessor (bfd_vma pc, struct disassemble_info *info, long given,
}
break;
- case 'r':
- {
- int imm4 = (given >> 4) & 0xf;
- int puw_bits = ((given >> 22) & 6) | ((given >> 21) & 1);
- int ubit = (given >> 23) & 1;
- const char *rm = arm_regnames [given & 0xf];
- const char *rn = arm_regnames [(given >> 16) & 0xf];
-
- switch (puw_bits)
- {
- case 1:
- /* fall through */
- case 3:
- func (stream, "[%s], %c%s", rn, ubit ? '+' : '-', rm);
- if (imm4)
- func (stream, ", lsl #%d", imm4);
- break;
-
- case 4:
- /* fall through */
- case 5:
- /* fall through */
- case 6:
- /* fall through */
- case 7:
- func (stream, "[%s, %c%s", rn, ubit ? '+' : '-', rm);
- if (imm4 > 0)
- func (stream, ", lsl #%d", imm4);
- func (stream, "]");
- if (puw_bits == 5 || puw_bits == 7)
- func (stream, "!");
- break;
-
- default:
- func (stream, "INVALID");
- }
- }
- break;
-
- case 'i':
- {
- long imm5;
- imm5 = ((given & 0x100) >> 4) | (given & 0xf);
- func (stream, "%ld", (imm5 == 0) ? 32 : imm5);
- }
- break;
-
default:
abort ();
}
@@ -3736,7 +3653,7 @@ parse_arm_disassembler_option (char *option)
if (option == NULL)
return;
- if (CONST_STRNEQ (option, "reg-names-"))
+ if (strneq (option, "reg-names-", 10))
{
int i;
@@ -3753,9 +3670,9 @@ parse_arm_disassembler_option (char *option)
/* XXX - should break 'option' at following delimiter. */
fprintf (stderr, _("Unrecognised register name set: %s\n"), option);
}
- else if (CONST_STRNEQ (option, "force-thumb"))
+ else if (strneq (option, "force-thumb", 11))
force_thumb = 1;
- else if (CONST_STRNEQ (option, "no-force-thumb"))
+ else if (strneq (option, "no-force-thumb", 14))
force_thumb = 0;
else
/* XXX - should break 'option' at following delimiter. */
@@ -3864,38 +3781,6 @@ find_ifthen_state (bfd_vma pc, struct disassemble_info *info,
ifthen_state = 0;
}
-/* Try to infer the code type (Arm or Thumb) from a symbol.
- Returns nonzero if is_thumb was set. */
-
-static int
-get_sym_code_type (struct disassemble_info *info, int n, int *is_thumb)
-{
- elf_symbol_type *es;
- unsigned int type;
- const char *name;
-
- es = *(elf_symbol_type **)(info->symbols);
- type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
-
- /* If the symbol has function type then use that. */
- if (type == STT_FUNC || type == STT_ARM_TFUNC)
- {
- *is_thumb = (type == STT_ARM_TFUNC);
- return TRUE;
- }
-
- /* Check for mapping symbols. */
- name = bfd_asymbol_name(info->symtab[n]);
- if (name[0] == '$' && (name[1] == 'a' || name[1] == 't')
- && (name[2] == 0 || name[2] == '.'))
- {
- *is_thumb = (name[1] == 't');
- return TRUE;
- }
-
- return FALSE;
-}
-
/* NOTE: There are no checks in these routines that
the relevant number of data bytes exist. */
@@ -3934,71 +3819,13 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
}
else if (bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour)
{
- bfd_vma addr;
- int n;
- int last_sym;
- bfd_boolean found;
-
- if (info->symtab)
- {
- if (pc <= last_mapping_addr)
- last_mapping_sym = -1;
- is_thumb = last_is_thumb;
- found = FALSE;
- /* Start scanning at the start of the function, or wherever
- we finished last time. */
- n = info->symtab_pos + 1;
- if (n < last_mapping_sym)
- n = last_mapping_sym;
-
- /* Scan up to the location being disassembled. */
- for (; n < info->symtab_size; n++)
- {
- addr = bfd_asymbol_value (info->symtab[n]);
- if (addr > pc)
- break;
- if (get_sym_code_type (info, n, &is_thumb))
- found = TRUE;
- }
+ elf_symbol_type * es;
+ unsigned int type;
- last_sym = n;
- if (!found)
- {
- if (last_mapping_sym == -1)
- last_mapping_sym = 0;
- else
- found = TRUE;
+ es = *(elf_symbol_type **)(info->symbols);
+ type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
- /* No mapping symbol found at this address. Look backwards
- for a preceeding one. */
- for (n = info->symtab_pos; n >= last_mapping_sym; n--)
- {
- if (get_sym_code_type (info, n, &is_thumb))
- {
- found = TRUE;
- break;
- }
- }
- }
-
- last_mapping_sym = last_sym;
- last_is_thumb = is_thumb;
- }
- else
- found = FALSE;
-
- /* If no mapping symbol has been found then fall back to the type
- of the function symbol. */
- if (!found)
- {
- elf_symbol_type * es;
- unsigned int type;
-
- es = *(elf_symbol_type **)(info->symbols);
- type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
-
- is_thumb = (type == STT_ARM_TFUNC) || (type == STT_ARM_16BIT);
- }
+ is_thumb = (type == STT_ARM_TFUNC) || (type == STT_ARM_16BIT);
}
}
diff --git a/opcodes/configure b/opcodes/configure
index 8e3e27e..db0fdf4 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -5230,9 +5230,8 @@ INCINTL=
XGETTEXT=
GMSGFMT=
POSUB=
-
-if test -f ../intl/config.intl; then
- . ../intl/config.intl
+if test -f ../intl/config.intl; then
+ . ../intl/config.intl
fi
echo "$as_me:$LINENO: checking whether NLS is requested" >&5
echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
@@ -6572,7 +6571,6 @@ if test x${all_targets} = xfalse ; then
bfd_romp_arch) ;;
bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_s390_arch) ta="$ta s390-dis.lo s390-opc.lo" ;;
- bfd_score_arch) ta="$ta score-dis.lo" ;;
bfd_sh_arch)
# We can't decide what we want just from the CPU family.
# We want SH5 support unless a specific version of sh is
@@ -6587,9 +6585,8 @@ if test x${all_targets} = xfalse ; then
break;;
esac;
done
- ta="$ta sh-dis.lo cgen-bitset.lo" ;;
+ ta="$ta sh-dis.lo" ;;
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
- bfd_spu_arch) ta="$ta spu-dis.lo spu-opc.lo" ;;
bfd_tahoe_arch) ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
bfd_tic4x_arch) ta="$ta tic4x-dis.lo" ;;
diff --git a/opcodes/configure.in b/opcodes/configure.in
index d937784..46da039 100644
--- a/opcodes/configure.in
+++ b/opcodes/configure.in
@@ -201,7 +201,6 @@ if test x${all_targets} = xfalse ; then
bfd_romp_arch) ;;
bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_s390_arch) ta="$ta s390-dis.lo s390-opc.lo" ;;
- bfd_score_arch) ta="$ta score-dis.lo" ;;
bfd_sh_arch)
# We can't decide what we want just from the CPU family.
# We want SH5 support unless a specific version of sh is
@@ -216,9 +215,8 @@ if test x${all_targets} = xfalse ; then
break;;
esac;
done
- ta="$ta sh-dis.lo cgen-bitset.lo" ;;
+ ta="$ta sh-dis.lo" ;;
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
- bfd_spu_arch) ta="$ta spu-dis.lo spu-opc.lo" ;;
bfd_tahoe_arch) ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
bfd_tic4x_arch) ta="$ta tic4x-dis.lo" ;;
diff --git a/opcodes/cris-dis.c b/opcodes/cris-dis.c
index 137bed7..f6c63cb 100644
--- a/opcodes/cris-dis.c
+++ b/opcodes/cris-dis.c
@@ -1,5 +1,5 @@
/* Disassembler code for CRIS.
- Copyright 2000, 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
Contributed by Axis Communications AB, Lund, Sweden.
Written by Hans-Peter Nilsson.
@@ -783,7 +783,7 @@ print_with_operands (const struct cris_opcode *opcodep,
better way). */
if (opcodep->name[0] == 'j')
{
- if (CONST_STRNEQ (opcodep->name, "jsr"))
+ if (strncmp (opcodep->name, "jsr", 3) == 0)
/* It's "jsr" or "jsrc". */
info->insn_type = dis_jsr;
else
@@ -1360,16 +1360,16 @@ print_with_operands (const struct cris_opcode *opcodep,
itself or in a "move.d const,rN, sub.d rN,rM"-like sequence. */
if (TRACE_CASE && case_offset_counter == 0)
{
- if (CONST_STRNEQ (opcodep->name, "sub"))
+ if (strncmp (opcodep->name, "sub", 3) == 0)
case_offset = last_immediate;
/* It could also be an "add", if there are negative case-values. */
- else if (CONST_STRNEQ (opcodep->name, "add"))
+ else if (strncmp (opcodep->name, "add", 3) == 0)
/* The first case is the negated operand to the add. */
case_offset = -last_immediate;
/* A bound insn will tell us the number of cases. */
- else if (CONST_STRNEQ (opcodep->name, "bound"))
+ else if (strncmp (opcodep->name, "bound", 5) == 0)
no_of_case_offsets = last_immediate + 1;
/* A jump or jsr or branch breaks the chain of insns for a
diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c
index ca28f56..3ea4583 100644
--- a/opcodes/disassemble.c
+++ b/opcodes/disassemble.c
@@ -1,6 +1,6 @@
/* Select disassembly routine for specified architecture.
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2004, 2005 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
@@ -64,10 +64,8 @@
#define ARCH_powerpc
#define ARCH_rs6000
#define ARCH_s390
-#define ARCH_score
#define ARCH_sh
#define ARCH_sparc
-#define ARCH_spu
#define ARCH_tic30
#define ARCH_tic4x
#define ARCH_tic54x
@@ -328,14 +326,6 @@ disassembler (abfd)
disassemble = print_insn_s390;
break;
#endif
-#ifdef ARCH_score
- case bfd_arch_score:
- if (bfd_big_endian (abfd))
- disassemble = print_insn_big_score;
- else
- disassemble = print_insn_little_score;
- break;
-#endif
#ifdef ARCH_sh
case bfd_arch_sh:
disassemble = print_insn_sh;
@@ -346,11 +336,6 @@ disassembler (abfd)
disassemble = print_insn_sparc;
break;
#endif
-#ifdef ARCH_spu
- case bfd_arch_spu:
- disassemble = print_insn_spu;
- break;
-#endif
#ifdef ARCH_tic30
case bfd_arch_tic30:
disassemble = print_insn_tic30;
diff --git a/opcodes/h8300-dis.c b/opcodes/h8300-dis.c
index d0e3006..769c12e 100644
--- a/opcodes/h8300-dis.c
+++ b/opcodes/h8300-dis.c
@@ -1,5 +1,5 @@
/* Disassemble h8300 instructions.
- Copyright 1993, 1994, 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 1993, 1994, 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -362,7 +362,7 @@ bfd_h8_disassemble (bfd_vma addr, disassemble_info *info, int mach)
for (qi = h8_instructions; qi->opcode->name; qi++)
{
const struct h8_opcode *q = qi->opcode;
- const op_type *nib = q->data.nib;
+ op_type *nib = q->data.nib;
unsigned int len = 0;
while (1)
@@ -638,9 +638,9 @@ bfd_h8_disassemble (bfd_vma addr, disassemble_info *info, int mach)
regno[1]);
return qi->length;
}
- if (CONST_STRNEQ (q->name, "mova"))
+ if (strncmp (q->name, "mova", 4) == 0)
{
- const op_type *args = q->args.nib;
+ op_type *args = q->args.nib;
if (args[1] == (op_type) E)
{
@@ -666,7 +666,7 @@ bfd_h8_disassemble (bfd_vma addr, disassemble_info *info, int mach)
}
/* Fill in the args. */
{
- const op_type *args = q->args.nib;
+ op_type *args = q->args.nib;
int hadone = 0;
int nargs;
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index caac903..18ca5de 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -1,6 +1,6 @@
/* Print i386 instructions for GDB, the GNU debugger.
Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GDB.
@@ -471,8 +471,6 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#define PREGRP34 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 34, NULL, 0, NULL, 0
#define PREGRP35 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 35, NULL, 0, NULL, 0
#define PREGRP36 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 36, NULL, 0, NULL, 0
-#define PREGRP37 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 37, NULL, 0, NULL, 0
-
#define X86_64_0 NULL, NULL, X86_64_SPECIAL, NULL, 0, NULL, 0, NULL, 0
@@ -1030,7 +1028,7 @@ static const struct dis386 dis386_twobyte[] = {
{ "movz{bR|x|bR|x}", Gv, Eb, XX, XX },
{ "movz{wR|x|wR|x}", Gv, Ew, XX, XX }, /* yes, there really is movzww ! */
/* b8 */
- { PREGRP37 },
+ { "popcntS", Gv, Ev, XX, XX },
{ "ud2b", XX, XX, XX, XX },
{ GRP8 },
{ "btcS", Ev, Gv, XX, XX },
@@ -1158,7 +1156,7 @@ static const unsigned char twobyte_has_modrm[256] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
};
-static const unsigned char twobyte_uses_DATA_prefix[256] = {
+static const unsigned char twobyte_uses_SSE_prefix[256] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
/* ------------------------------- */
/* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
@@ -1181,196 +1179,6 @@ static const unsigned char twobyte_uses_DATA_prefix[256] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
};
-static const unsigned char twobyte_uses_REPNZ_prefix[256] = {
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
- /* ------------------------------- */
- /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
- /* 10 */ 1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
- /* 20 */ 0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0, /* 2f */
- /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
- /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
- /* 50 */ 0,1,0,0,0,0,0,0,1,1,1,0,1,1,1,1, /* 5f */
- /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
- /* 70 */ 1,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0, /* 7f */
- /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
- /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
- /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
- /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
- /* c0 */ 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
- /* d0 */ 1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* df */
- /* e0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* ef */
- /* f0 */ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
- /* ------------------------------- */
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
-};
-
-static const unsigned char twobyte_uses_REPZ_prefix[256] = {
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
- /* ------------------------------- */
- /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
- /* 10 */ 1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0, /* 1f */
- /* 20 */ 0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0, /* 2f */
- /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
- /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
- /* 50 */ 0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* 5f */
- /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, /* 6f */
- /* 70 */ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1, /* 7f */
- /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
- /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
- /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
- /* b0 */ 0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0, /* bf */
- /* c0 */ 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
- /* d0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* df */
- /* e0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* ef */
- /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
- /* ------------------------------- */
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
-};
-
-/* This is used to determine if opcode 0f 38 XX uses DATA prefix. */
-static const unsigned char threebyte_0x38_uses_DATA_prefix[256] = {
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
- /* ------------------------------- */
- /* 00 */ 1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, /* 0f */
- /* 10 */ 0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0, /* 1f */
- /* 20 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 2f */
- /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
- /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
- /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5f */
- /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
- /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
- /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
- /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
- /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
- /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
- /* c0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
- /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
- /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
- /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
- /* ------------------------------- */
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
-};
-
-/* This is used to determine if opcode 0f 38 XX uses REPNZ prefix. */
-static const unsigned char threebyte_0x38_uses_REPNZ_prefix[256] = {
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
- /* ------------------------------- */
- /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
- /* 10 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
- /* 20 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 2f */
- /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
- /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
- /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5f */
- /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
- /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
- /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
- /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
- /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
- /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
- /* c0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
- /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
- /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
- /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
- /* ------------------------------- */
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
-};
-
-/* This is used to determine if opcode 0f 38 XX uses REPZ prefix. */
-static const unsigned char threebyte_0x38_uses_REPZ_prefix[256] = {
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
- /* ------------------------------- */
- /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
- /* 10 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
- /* 20 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 2f */
- /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
- /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
- /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5f */
- /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
- /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
- /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
- /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
- /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
- /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
- /* c0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
- /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
- /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
- /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
- /* ------------------------------- */
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
-};
-
-/* This is used to determine if opcode 0f 3a XX uses DATA prefix. */
-static const unsigned char threebyte_0x3a_uses_DATA_prefix[256] = {
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
- /* ------------------------------- */
- /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, /* 0f */
- /* 10 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
- /* 20 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 2f */
- /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
- /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
- /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5f */
- /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
- /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
- /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
- /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
- /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
- /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
- /* c0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
- /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
- /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
- /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
- /* ------------------------------- */
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
-};
-
-/* This is used to determine if opcode 0f 3a XX uses REPNZ prefix. */
-static const unsigned char threebyte_0x3a_uses_REPNZ_prefix[256] = {
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
- /* ------------------------------- */
- /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
- /* 10 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
- /* 20 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 2f */
- /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
- /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
- /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5f */
- /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
- /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
- /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
- /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
- /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
- /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
- /* c0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
- /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
- /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
- /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
- /* ------------------------------- */
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
-};
-
-/* This is used to determine if opcode 0f 3a XX uses REPZ prefix. */
-static const unsigned char threebyte_0x3a_uses_REPZ_prefix[256] = {
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
- /* ------------------------------- */
- /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
- /* 10 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
- /* 20 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 2f */
- /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
- /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
- /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5f */
- /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
- /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
- /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
- /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
- /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
- /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
- /* c0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
- /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
- /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
- /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
- /* ------------------------------- */
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
-};
-
static char obuf[100];
static char *obufp;
static char scratchbuf[100];
@@ -1879,7 +1687,7 @@ static const struct dis386 prefix_user_table[][4] = {
{
{ "maskmovq", MX, MS, XX, XX },
{ "(bad)", XM, EX, XX, XX },
- { "maskmovdqu", XM, XS, XX, XX },
+ { "maskmovdqu", XM, EX, XX, XX },
{ "(bad)", XM, EX, XX, XX },
},
/* PREGRP19 */
@@ -2012,13 +1820,6 @@ static const struct dis386 prefix_user_table[][4] = {
{ "(bad)", XX, XX, XX, XX },
},
- /* PREGRP37 */
- {
- { "(bad)", XX, XX, XX, XX },
- { "popcntS",Gv, Ev, XX, XX },
- { "(bad)", XX, XX, XX, XX },
- { "(bad)", XX, XX, XX, XX },
- },
};
static const struct dis386 x86_64_table[][2] = {
@@ -2839,12 +2640,10 @@ print_insn (bfd_vma pc, disassemble_info *info)
int i;
char *first, *second, *third, *fourth;
int needcomma;
- unsigned char uses_DATA_prefix, uses_LOCK_prefix;
- unsigned char uses_REPNZ_prefix, uses_REPZ_prefix;
+ unsigned char uses_SSE_prefix, uses_LOCK_prefix;
int sizeflag;
const char *p;
struct dis_private priv;
- unsigned char op;
if (info->mach == bfd_mach_x86_64_intel_syntax
|| info->mach == bfd_mach_x86_64)
@@ -2868,44 +2667,44 @@ print_insn (bfd_vma pc, disassemble_info *info)
for (p = info->disassembler_options; p != NULL; )
{
- if (CONST_STRNEQ (p, "x86-64"))
+ if (strncmp (p, "x86-64", 6) == 0)
{
address_mode = mode_64bit;
priv.orig_sizeflag = AFLAG | DFLAG;
}
- else if (CONST_STRNEQ (p, "i386"))
+ else if (strncmp (p, "i386", 4) == 0)
{
address_mode = mode_32bit;
priv.orig_sizeflag = AFLAG | DFLAG;
}
- else if (CONST_STRNEQ (p, "i8086"))
+ else if (strncmp (p, "i8086", 5) == 0)
{
address_mode = mode_16bit;
priv.orig_sizeflag = 0;
}
- else if (CONST_STRNEQ (p, "intel"))
+ else if (strncmp (p, "intel", 5) == 0)
{
intel_syntax = 1;
}
- else if (CONST_STRNEQ (p, "att"))
+ else if (strncmp (p, "att", 3) == 0)
{
intel_syntax = 0;
}
- else if (CONST_STRNEQ (p, "addr"))
+ else if (strncmp (p, "addr", 4) == 0)
{
if (p[4] == '1' && p[5] == '6')
priv.orig_sizeflag &= ~AFLAG;
else if (p[4] == '3' && p[5] == '2')
priv.orig_sizeflag |= AFLAG;
}
- else if (CONST_STRNEQ (p, "data"))
+ else if (strncmp (p, "data", 4) == 0)
{
if (p[4] == '1' && p[5] == '6')
priv.orig_sizeflag &= ~DFLAG;
else if (p[4] == '3' && p[5] == '2')
priv.orig_sizeflag |= DFLAG;
}
- else if (CONST_STRNEQ (p, "suffix"))
+ else if (strncmp (p, "suffix", 6) == 0)
priv.orig_sizeflag |= SUFFIX_ALWAYS;
p = strchr (p, ',');
@@ -3012,62 +2811,36 @@ print_insn (bfd_vma pc, disassemble_info *info)
return 1;
}
- op = 0;
if (*codep == 0x0f)
{
- unsigned char threebyte;
FETCH_DATA (info, codep + 2);
- threebyte = *++codep;
- dp = &dis386_twobyte[threebyte];
+ dp = &dis386_twobyte[*++codep];
need_modrm = twobyte_has_modrm[*codep];
- uses_DATA_prefix = twobyte_uses_DATA_prefix[*codep];
- uses_REPNZ_prefix = twobyte_uses_REPNZ_prefix[*codep];
- uses_REPZ_prefix = twobyte_uses_REPZ_prefix[*codep];
+ uses_SSE_prefix = twobyte_uses_SSE_prefix[*codep];
uses_LOCK_prefix = (*codep & ~0x02) == 0x20;
- codep++;
- if (dp->name == NULL && dp->bytemode1 == IS_3BYTE_OPCODE)
- {
- FETCH_DATA (info, codep + 2);
- op = *codep++;
- switch (threebyte)
- {
- case 0x38:
- uses_DATA_prefix = threebyte_0x38_uses_DATA_prefix[op];
- uses_REPNZ_prefix = threebyte_0x38_uses_REPNZ_prefix[op];
- uses_REPZ_prefix = threebyte_0x38_uses_REPZ_prefix[op];
- break;
- case 0x3a:
- uses_DATA_prefix = threebyte_0x3a_uses_DATA_prefix[op];
- uses_REPNZ_prefix = threebyte_0x3a_uses_REPNZ_prefix[op];
- uses_REPZ_prefix = threebyte_0x3a_uses_REPZ_prefix[op];
- break;
- default:
- break;
- }
- }
}
else
{
dp = &dis386[*codep];
need_modrm = onebyte_has_modrm[*codep];
- uses_DATA_prefix = 0;
- uses_REPNZ_prefix = 0;
- uses_REPZ_prefix = 0;
+ uses_SSE_prefix = 0;
uses_LOCK_prefix = 0;
- codep++;
}
- if (!uses_REPZ_prefix && (prefixes & PREFIX_REPZ))
+ /*"lzcnt"=0xBD is the only non-sse instruction which uses F3 in the opcode without any "rep(z|nz)"*/
+ if (!uses_SSE_prefix && (prefixes & PREFIX_REPZ) && *codep !=0xBD)
{
oappend ("repz ");
used_prefixes |= PREFIX_REPZ;
}
- if (!uses_REPNZ_prefix && (prefixes & PREFIX_REPNZ))
+ if (!uses_SSE_prefix && (prefixes & PREFIX_REPNZ) && *codep !=0xBD)
{
oappend ("repnz ");
used_prefixes |= PREFIX_REPNZ;
}
+ codep++;
+
if (!uses_LOCK_prefix && (prefixes & PREFIX_LOCK))
{
oappend ("lock ");
@@ -3087,7 +2860,7 @@ print_insn (bfd_vma pc, disassemble_info *info)
}
}
- if (!uses_DATA_prefix && (prefixes & PREFIX_DATA))
+ if (!uses_SSE_prefix && (prefixes & PREFIX_DATA))
{
sizeflag ^= DFLAG;
if (dp->bytemode3 == cond_jump_mode
@@ -3104,7 +2877,8 @@ print_insn (bfd_vma pc, disassemble_info *info)
if (dp->name == NULL && dp->bytemode1 == IS_3BYTE_OPCODE)
{
- dp = &three_byte_table[dp->bytemode2][op];
+ FETCH_DATA (info, codep + 2);
+ dp = &three_byte_table[dp->bytemode2][*codep++];
mod = (*codep >> 6) & 3;
reg = (*codep >> 3) & 7;
rm = *codep & 7;
@@ -3139,16 +2913,14 @@ print_insn (bfd_vma pc, disassemble_info *info)
index = 1;
else
{
- /* We should check PREFIX_REPNZ and PREFIX_REPZ
- before PREFIX_DATA. */
- used_prefixes |= (prefixes & PREFIX_REPNZ);
- if (prefixes & PREFIX_REPNZ)
- index = 3;
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ if (prefixes & PREFIX_DATA)
+ index = 2;
else
{
- used_prefixes |= (prefixes & PREFIX_DATA);
- if (prefixes & PREFIX_DATA)
- index = 2;
+ used_prefixes |= (prefixes & PREFIX_REPNZ);
+ if (prefixes & PREFIX_REPNZ)
+ index = 3;
}
}
dp = &prefix_user_table[dp->bytemode2][index];
@@ -4921,8 +4693,7 @@ OP_OFF64 (int bytemode, int sizeflag)
{
bfd_vma off;
- if (address_mode != mode_64bit
- || (prefixes & PREFIX_ADDR))
+ if (address_mode != mode_64bit)
{
OP_OFF (bytemode, sizeflag);
return;
@@ -5436,9 +5207,9 @@ PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag)
&& (prefixes & PREFIX_ADDR)
&& olen >= (4 + 7)
&& *(p - 1) == ' '
- && CONST_STRNEQ (p - 7, "addr")
- && (CONST_STRNEQ (p - 3, "16")
- || CONST_STRNEQ (p - 3, "32")))
+ && strncmp (p - 7, "addr", 4) == 0
+ && (strncmp (p - 3, "16", 2) == 0
+ || strncmp (p - 3, "32", 2) == 0))
p -= 7;
if (rm)
diff --git a/opcodes/ia64-gen.c b/opcodes/ia64-gen.c
index b1d0225..5562283 100644
--- a/opcodes/ia64-gen.c
+++ b/opcodes/ia64-gen.c
@@ -467,7 +467,7 @@ fetch_insn_class (const char *full_name, int create)
int ind;
int is_class = 0;
- if (CONST_STRNEQ (full_name, "IC:"))
+ if (strncmp (full_name, "IC:", 3) == 0)
{
name = xstrdup (full_name + 3);
is_class = 1;
@@ -749,7 +749,7 @@ parse_resource_users (ref, usersp, nusersp, notesp)
are read. Only create new classes if it's *not* an insn class,
or if it's a composite class (which wouldn't necessarily be in the IC
table). */
- if (! CONST_STRNEQ (name, "IC:") || xsect != NULL)
+ if (strncmp (name, "IC:", 3) != 0 || xsect != NULL)
create = 1;
iclass = fetch_insn_class (name, create);
@@ -1034,7 +1034,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
if (ic->comment)
{
- if (CONST_STRNEQ (ic->comment, "Format"))
+ if (!strncmp (ic->comment, "Format", 6))
{
/* Assume that the first format seen is the most restrictive, and
only keep a later one if it looks like it's more restrictive. */
@@ -1050,7 +1050,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
else
format = ic->comment;
}
- else if (CONST_STRNEQ (ic->comment, "Field"))
+ else if (!strncmp (ic->comment, "Field", 5))
{
if (field)
warn (_("overlapping field %s->%s\n"),
@@ -1064,7 +1064,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
instructions. */
if (ic->nsubs == 0 && ic->nxsubs == 0)
{
- int is_mov = CONST_STRNEQ (idesc->name, "mov");
+ int is_mov = strncmp (idesc->name, "mov", 3) == 0;
int plain_mov = strcmp (idesc->name, "mov") == 0;
int len = strlen(ic->name);
@@ -1123,32 +1123,32 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
if (resolved && format)
{
- if (CONST_STRNEQ (idesc->name, "dep")
+ if (strncmp (idesc->name, "dep", 3) == 0
&& strstr (format, "I13") != NULL)
resolved = idesc->operands[1] == IA64_OPND_IMM8;
- else if (CONST_STRNEQ (idesc->name, "chk")
+ else if (strncmp (idesc->name, "chk", 3) == 0
&& strstr (format, "M21") != NULL)
resolved = idesc->operands[0] == IA64_OPND_F2;
- else if (CONST_STRNEQ (idesc->name, "lfetch"))
+ else if (strncmp (idesc->name, "lfetch", 6) == 0)
resolved = (strstr (format, "M14 M15") != NULL
&& (idesc->operands[1] == IA64_OPND_R2
|| idesc->operands[1] == IA64_OPND_IMM9b));
- else if (CONST_STRNEQ (idesc->name, "br.call")
+ else if (strncmp (idesc->name, "br.call", 7) == 0
&& strstr (format, "B5") != NULL)
resolved = idesc->operands[1] == IA64_OPND_B2;
- else if (CONST_STRNEQ (idesc->name, "br.call")
+ else if (strncmp (idesc->name, "br.call", 7) == 0
&& strstr (format, "B3") != NULL)
resolved = idesc->operands[1] == IA64_OPND_TGT25c;
- else if (CONST_STRNEQ (idesc->name, "brp")
+ else if (strncmp (idesc->name, "brp", 3) == 0
&& strstr (format, "B7") != NULL)
resolved = idesc->operands[0] == IA64_OPND_B2;
else if (strcmp (ic->name, "invala") == 0)
resolved = strcmp (idesc->name, ic->name) == 0;
- else if (CONST_STRNEQ (idesc->name, "st")
+ else if (strncmp (idesc->name, "st", 2) == 0
&& (strstr (format, "M5") != NULL
|| strstr (format, "M10") != NULL))
resolved = idesc->flags & IA64_OPCODE_POSTINC;
- else if (CONST_STRNEQ (idesc->name, "ld")
+ else if (strncmp (idesc->name, "ld", 2) == 0
&& (strstr (format, "M2 M3") != NULL
|| strstr (format, "M12") != NULL
|| strstr (format, "M7 M8") != NULL))
@@ -1161,7 +1161,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
plain brl matches brl.cond. */
if (!resolved
&& (strcmp (idesc->name, "brl") == 0
- || CONST_STRNEQ (idesc->name, "brl."))
+ || strncmp (idesc->name, "brl.", 4) == 0)
&& strcmp (ic->name, "brl.cond") == 0)
{
resolved = 1;
@@ -1170,7 +1170,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
/* Misc br variations ('.cond' is optional). */
if (!resolved
&& (strcmp (idesc->name, "br") == 0
- || CONST_STRNEQ (idesc->name, "br."))
+ || strncmp (idesc->name, "br.", 3) == 0)
&& strcmp (ic->name, "br.cond") == 0)
{
if (format)
@@ -1183,7 +1183,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
}
/* probe variations. */
- if (!resolved && CONST_STRNEQ (idesc->name, "probe"))
+ if (!resolved && strncmp (idesc->name, "probe", 5) == 0)
{
resolved = strcmp (ic->name, "probe") == 0
&& !((strstr (idesc->name, "fault") != NULL)
@@ -1217,7 +1217,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
}
/* Some variants of mov and mov.[im]. */
- if (!resolved && CONST_STRNEQ (ic->name, "mov_"))
+ if (!resolved && strncmp (ic->name, "mov_", 4) == 0)
resolved = in_iclass_mov_x (idesc, ic, format, field);
}
@@ -1476,13 +1476,13 @@ lookup_specifier (const char *name)
warn (_("Don't know how to specify # dependency %s\n"),
name);
}
- else if (CONST_STRNEQ (name, "AR[FPSR]"))
+ else if (strncmp (name, "AR[FPSR]", 8) == 0)
return IA64_RS_AR_FPSR;
- else if (CONST_STRNEQ (name, "AR["))
+ else if (strncmp (name, "AR[", 3) == 0)
return IA64_RS_ARX;
- else if (CONST_STRNEQ (name, "CR["))
+ else if (strncmp (name, "CR[", 3) == 0)
return IA64_RS_CRX;
- else if (CONST_STRNEQ (name, "PSR."))
+ else if (strncmp (name, "PSR.", 4) == 0)
return IA64_RS_PSR;
else if (strcmp (name, "InService*") == 0)
return IA64_RS_INSERVICE;
@@ -2448,7 +2448,7 @@ insert_opcode_dependencies (opc, cmp)
int j;
if (strcmp (opc->name, "cmp.eq.and") == 0
- && CONST_STRNEQ (rs->name, "PR%")
+ && strncmp (rs->name, "PR%", 3) == 0
&& rs->mode == 1)
no_class_found = 99;
@@ -2459,7 +2459,7 @@ insert_opcode_dependencies (opc, cmp)
if (in_iclass (opc, ics[rs->regs[j]], NULL, NULL, &ic_note))
{
/* We can ignore ic_note 11 for non PR resources. */
- if (ic_note == 11 && ! CONST_STRNEQ (rs->name, "PR"))
+ if (ic_note == 11 && strncmp (rs->name, "PR", 2) != 0)
ic_note = 0;
if (ic_note != 0 && rs->regnotes[j] != 0
@@ -2487,7 +2487,7 @@ insert_opcode_dependencies (opc, cmp)
if (in_iclass (opc, ics[rs->chks[j]], NULL, NULL, &ic_note))
{
/* We can ignore ic_note 11 for non PR resources. */
- if (ic_note == 11 && ! CONST_STRNEQ (rs->name, "PR"))
+ if (ic_note == 11 && strncmp (rs->name, "PR", 2) != 0)
ic_note = 0;
if (ic_note != 0 && rs->chknotes[j] != 0
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index 8af043c..b0562ea 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -575,7 +575,7 @@ parse_mips_dis_option (const char *option, unsigned int len)
const struct mips_arch_choice *chosen_arch;
/* Try to match options that are simple flags */
- if (CONST_STRNEQ (option, "no-aliases"))
+ if (strncmp (option, "no-aliases", 10) == 0)
{
no_aliases = 1;
return;
diff --git a/opcodes/po/POTFILES.in b/opcodes/po/POTFILES.in
index 337ec85..67e98c4 100644
--- a/opcodes/po/POTFILES.in
+++ b/opcodes/po/POTFILES.in
@@ -131,8 +131,6 @@ ppc-opc.c
s390-dis.c
s390-mkopc.c
s390-opc.c
-score-dis.c
-score-opc.h
sh64-dis.c
sh64-opc.c
sh64-opc.h
@@ -140,8 +138,6 @@ sh-dis.c
sh-opc.h
sparc-dis.c
sparc-opc.c
-spu-dis.c
-spu-opc.c
sysdep.h
tic30-dis.c
tic4x-dis.c
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index d144892..8b3996a 100644
--- a/opcodes/ppc-dis.c
+++ b/opcodes/ppc-dis.c
@@ -74,10 +74,6 @@ powerpc_dialect (struct disassemble_info *info)
dialect |= PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5;
if (info->disassembler_options
- && strstr (info->disassembler_options, "cell") != NULL)
- dialect |= PPC_OPCODE_POWER4 | PPC_OPCODE_CELL | PPC_OPCODE_ALTIVEC;
-
- if (info->disassembler_options
&& strstr (info->disassembler_options, "power6") != NULL)
dialect |= PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 | PPC_OPCODE_ALTIVEC;
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 5295dfd..84e6d6a 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -559,45 +559,10 @@ const struct powerpc_operand powerpc_operands[] =
#define WS_MASK (0x7 << 11)
{ 3, 11, NULL, NULL, 0 },
- /* The L field in an mtmsrd or A form instruction. */
+ /* The L field in an mtmsrd instruction */
#define MTMSRD_L WS + 1
-#define A_L MTMSRD_L
{ 1, 16, NULL, NULL, PPC_OPERAND_OPTIONAL },
- /* The DCM field in a Z form instruction. */
-#define DCM MTMSRD_L + 1
- { 6, 16, NULL, NULL, 0 },
-
- /* Likewise, the DGM field in a Z form instruction. */
-#define DGM DCM + 1
- { 6, 16, NULL, NULL, 0 },
-
-#define TE DGM + 1
- { 5, 11, NULL, NULL, 0 },
-
-#define RMC TE + 1
- { 2, 21, NULL, NULL, 0 },
-
-#define R RMC + 1
- { 1, 15, NULL, NULL, 0 },
-
-#define SP R + 1
- { 2, 11, NULL, NULL, 0 },
-
-#define S SP + 1
- { 1, 11, NULL, NULL, 0 },
-
- /* SH field starting at bit position 16. */
-#define SH16 S + 1
- { 6, 10, NULL, NULL, 0 },
-
- /* The L field in an X form with the RT field fixed instruction. */
-#define XRT_L SH16 + 1
- { 2, 21, NULL, NULL, PPC_OPERAND_OPTIONAL },
-
- /* The EH field in larx instruction. */
-#define EH XRT_L + 1
- { 1, 0, NULL, NULL, PPC_OPERAND_OPTIONAL },
};
/* The functions used to insert and extract complicated operands. */
@@ -1544,9 +1509,6 @@ extract_tbr (unsigned long insn,
/* An A_MASK with the FRA and FRC fields fixed. */
#define AFRAFRC_MASK (A_MASK | FRA_MASK | FRC_MASK)
-/* An AFRAFRC_MASK, but with L bit clear. */
-#define AFRALFRC_MASK (AFRAFRC_MASK & ~((unsigned long) 1 << 16))
-
/* A B form instruction. */
#define B(op, aa, lk) (OP (op) | ((((unsigned long)(aa)) & 1) << 1) | ((lk) & 1))
#define B_MASK B (0x3f, 1, 1)
@@ -1657,21 +1619,12 @@ extract_tbr (unsigned long insn,
/* An X form instruction. */
#define X(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1))
-/* A Z form instruction. */
-#define Z(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x1ff) << 1))
-
/* An X form instruction with the RC bit specified. */
#define XRC(op, xop, rc) (X ((op), (xop)) | ((rc) & 1))
-/* A Z form instruction with the RC bit specified. */
-#define ZRC(op, xop, rc) (Z ((op), (xop)) | ((rc) & 1))
-
/* The mask for an X form instruction. */
#define X_MASK XRC (0x3f, 0x3ff, 1)
-/* The mask for a Z form instruction. */
-#define Z_MASK ZRC (0x3f, 0x1ff, 1)
-
/* An X_MASK with the RA field fixed. */
#define XRA_MASK (X_MASK | RA_MASK)
@@ -1681,9 +1634,6 @@ extract_tbr (unsigned long insn,
/* An X_MASK with the RT field fixed. */
#define XRT_MASK (X_MASK | RT_MASK)
-/* An XRT_MASK mask with the L bits clear. */
-#define XLRT_MASK (XRT_MASK & ~((unsigned long) 0x3 << 21))
-
/* An X_MASK with the RA and RB fields fixed. */
#define XRARB_MASK (X_MASK | RA_MASK | RB_MASK)
@@ -1720,9 +1670,6 @@ extract_tbr (unsigned long insn,
/* An X form sync instruction with everything filled in except the LS field. */
#define XSYNC_MASK (0xff9fffff)
-/* An X_MASK, but with the EH bit clear. */
-#define XEH_MASK (X_MASK & ~((unsigned long )1))
-
/* An X form AltiVec dss instruction. */
#define XDSS(op, xop, a) (X ((op), (xop)) | ((((unsigned long)(a)) & 1) << 25))
#define XDSS_MASK XDSS(0x3f, 0x3ff, 1)
@@ -1876,8 +1823,6 @@ extract_tbr (unsigned long insn,
#define NOPOWER4 PPC_OPCODE_NOPOWER4 | PPCCOM
#define POWER4 PPC_OPCODE_POWER4
#define POWER5 PPC_OPCODE_POWER5
-#define POWER6 PPC_OPCODE_POWER6
-#define CELL PPC_OPCODE_CELL
#define PPC32 PPC_OPCODE_32 | PPC_OPCODE_PPC
#define PPC64 PPC_OPCODE_64 | PPC_OPCODE_PPC
#define PPC403 PPC_OPCODE_403
@@ -3069,23 +3014,16 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "crand", XL(19,257), XL_MASK, COM, { BT, BA, BB } },
-{ "hrfid", XL(19,274), 0xffffffff, POWER5 | CELL, { 0 } },
+{ "hrfid", XL(19,274), 0xffffffff, POWER5, { 0 } },
{ "crset", XL(19,289), XL_MASK, PPCCOM, { BT, BAT, BBA } },
{ "creqv", XL(19,289), XL_MASK, COM, { BT, BA, BB } },
-{ "doze", XL(19,402), 0xffffffff, POWER6, { 0 } },
-
{ "crorc", XL(19,417), XL_MASK, COM, { BT, BA, BB } },
-{ "nap", XL(19,434), 0xffffffff, POWER6, { 0 } },
-
{ "crmove", XL(19,449), XL_MASK, PPCCOM, { BT, BA, BBA } },
{ "cror", XL(19,449), XL_MASK, COM, { BT, BA, BB } },
-{ "sleep", XL(19,466), 0xffffffff, POWER6, { 0 } },
-{ "rvwinkle", XL(19,498), 0xffffffff, POWER6, { 0 } },
-
{ "bctr", XLO(19,BOU,528,0), XLBOBIBB_MASK, COM, { 0 } },
{ "bctrl", XLO(19,BOU,528,1), XLBOBIBB_MASK, COM, { 0 } },
{ "bltctr", XLOCB(19,BOT,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
@@ -3383,10 +3321,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "isel", XISEL(31,15), XISEL_MASK, PPCISEL, { RT, RA, RB, CRB } },
{ "mfocrf", XFXM(31,19,0,1), XFXFXM_MASK, COM, { RT, FXM } },
-{ "mfcr", X(31,19), XRARB_MASK, NOPOWER4 | COM, { RT } },
+{ "mfcr", X(31,19), XRARB_MASK, NOPOWER4, { RT } },
{ "mfcr", X(31,19), XFXFXM_MASK, POWER4, { RT, FXM4 } },
-{ "lwarx", X(31,20), XEH_MASK, PPC, { RT, RA0, RB, EH } },
+{ "lwarx", X(31,20), X_MASK, PPC, { RT, RA0, RB } },
{ "ldx", X(31,21), X_MASK, PPC64, { RT, RA0, RB } },
@@ -3479,10 +3417,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfmsr", X(31,83), XRARB_MASK, COM, { RT } },
-{ "ldarx", X(31,84), XEH_MASK, PPC64, { RT, RA0, RB, EH } },
+{ "ldarx", X(31,84), X_MASK, PPC64, { RT, RA0, RB } },
-{ "dcbfl", XOPL(31,86,1), XRT_MASK, POWER5, { RA, RB } },
-{ "dcbf", X(31,86), XLRT_MASK, PPC, { RA, RB, XRT_L } },
+{ "dcbf", X(31,86), XRT_MASK, PPC, { RA, RB } },
{ "lbzx", X(31,87), X_MASK, COM, { RT, RA0, RB } },
@@ -3564,8 +3501,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sle", XRC(31,153,0), X_MASK, M601, { RA, RS, RB } },
{ "sle.", XRC(31,153,1), X_MASK, M601, { RA, RS, RB } },
-{ "prtyw", X(31,154), XRB_MASK, POWER6, { RA, RS } },
-
{ "wrteei", X(31,163), XE_MASK, PPC403 | BOOKE, { E } },
{ "dcbtls", X(31,166), X_MASK, PPCCHLK, { CT, RA, RB }},
@@ -3581,8 +3516,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sliq", XRC(31,184,0), X_MASK, M601, { RA, RS, SH } },
{ "sliq.", XRC(31,184,1), X_MASK, M601, { RA, RS, SH } },
-{ "prtyd", X(31,186), XRB_MASK, POWER6, { RA, RS } },
-
{ "stwuxe", X(31,191), X_MASK, BOOKE64, { RS, RAS, RB } },
{ "subfze", XO(31,200,0,0), XORB_MASK, PPCCOM, { RT, RA } },
@@ -3689,7 +3622,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lscbx", XRC(31,277,0), X_MASK, M601, { RT, RA, RB } },
{ "lscbx.", XRC(31,277,1), X_MASK, M601, { RT, RA, RB } },
-{ "dcbt", X(31,278), X_MASK, PPC, { CT, RA, RB } },
+{ "dcbt", X(31,278), X_MASK, PPC, { CT, RA, RB } },
{ "lhzx", X(31,279), X_MASK, COM, { RT, RA0, RB } },
@@ -3770,7 +3703,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfsdr1", XSPR(31,339,25), XSPR_MASK, COM, { RT } },
{ "mfsrr0", XSPR(31,339,26), XSPR_MASK, COM, { RT } },
{ "mfsrr1", XSPR(31,339,27), XSPR_MASK, COM, { RT } },
-{ "mfcfar", XSPR(31,339,28), XSPR_MASK, POWER6, { RT } },
{ "mfpid", XSPR(31,339,48), XSPR_MASK, BOOKE, { RT } },
{ "mfpid", XSPR(31,339,945), XSPR_MASK, PPC403, { RT } },
{ "mfcsrr0", XSPR(31,339,58), XSPR_MASK, BOOKE, { RT } },
@@ -3992,18 +3924,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sthx", X(31,407), X_MASK, COM, { RS, RA0, RB } },
-{ "cmpb", X(31,508), X_MASK, POWER6, { RA, RS, RB } },
-
{ "lfqx", X(31,791), X_MASK, POWER2, { FRT, RA, RB } },
-{ "lfdpx", X(31,791), X_MASK, POWER6, { FRT, RA, RB } },
-
{ "lfqux", X(31,823), X_MASK, POWER2, { FRT, RA, RB } },
{ "stfqx", X(31,919), X_MASK, POWER2, { FRS, RA, RB } },
-{ "stfdpx", X(31,919), X_MASK, POWER6, { FRS, RA, RB } },
-
{ "stfqux", X(31,951), X_MASK, POWER2, { FRS, RA, RB } },
{ "orc", XRC(31,412,0), X_MASK, COM, { RA, RS, RB } },
@@ -4093,7 +4019,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mtsdr1", XSPR(31,467,25), XSPR_MASK, COM, { RS } },
{ "mtsrr0", XSPR(31,467,26), XSPR_MASK, COM, { RS } },
{ "mtsrr1", XSPR(31,467,27), XSPR_MASK, COM, { RS } },
-{ "mtcfar", XSPR(31,467,28), XSPR_MASK, POWER6, { RS } },
{ "mtpid", XSPR(31,467,48), XSPR_MASK, BOOKE, { RS } },
{ "mtpid", XSPR(31,467,945), XSPR_MASK, PPC403, { RS } },
{ "mtdecar", XSPR(31,467,54), XSPR_MASK, BOOKE, { RS } },
@@ -4281,8 +4206,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "clcs", X(31,531), XRB_MASK, M601, { RT, RA } },
-{ "ldbrx", X(31,532), X_MASK, CELL, { RT, RA0, RB } },
-
{ "lswx", X(31,533), X_MASK, PPCCOM, { RT, RA0, RB } },
{ "lsx", X(31,533), X_MASK, PWRCOM, { RT, RA, RB } },
@@ -4332,8 +4255,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lfdxe", X(31,607), X_MASK, BOOKE64, { FRT, RA0, RB } },
-{ "mffgpr", XRC(31,607,0), XRA_MASK, POWER6, { FRT, RB } },
-
{ "mfsri", X(31,627), X_MASK, PWRCOM, { RT, RA, RB } },
{ "dclst", X(31,630), XRB_MASK, PWRCOM, { RS, RA } },
@@ -4344,8 +4265,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfsrin", X(31,659), XRA_MASK, PPC32, { RT, RB } },
-{ "stdbrx", X(31,660), X_MASK, CELL, { RS, RA0, RB } },
-
{ "stswx", X(31,661), X_MASK, PPCCOM, { RS, RA0, RB } },
{ "stsx", X(31,661), X_MASK, PWRCOM, { RS, RA0, RB } },
@@ -4384,8 +4303,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stfdxe", X(31,735), X_MASK, BOOKE64, { FRS, RA0, RB } },
-{ "mftgpr", XRC(31,735,0), XRA_MASK, POWER6, { RT, FRB } },
-
{ "dcba", X(31,758), XRT_MASK, PPC405 | BOOKE, { RA, RB } },
{ "stfdux", X(31,759), X_MASK, COM, { FRS, RAS, RB } },
@@ -4400,8 +4317,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbivax", X(31,786), XRT_MASK, BOOKE, { RA, RB } },
{ "tlbivaxe",X(31,787), XRT_MASK, BOOKE64, { RA, RB } },
-{ "lwzcix", X(31,789), X_MASK, POWER6, { RT, RA0, RB } },
-
{ "lhbrx", X(31,790), X_MASK, COM, { RT, RA0, RB } },
{ "sraw", XRC(31,792,0), X_MASK, PPCCOM, { RA, RS, RB } },
@@ -4419,8 +4334,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "rac", X(31,818), X_MASK, PWRCOM, { RT, RA, RB } },
-{ "lhzcix", X(31,821), X_MASK, POWER6, { RT, RA0, RB } },
-
{ "dss", XDSS(31,822,0), XDSS_MASK, PPCVEC, { STRM } },
{ "dssall", XDSS(31,822,1), XDSS_MASK, PPCVEC, { 0 } },
@@ -4431,15 +4344,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "slbmfev", X(31,851), XRA_MASK, PPC64, { RT, RB } },
-{ "lbzcix", X(31,853), X_MASK, POWER6, { RT, RA0, RB } },
-
{ "mbar", X(31,854), X_MASK, BOOKE, { MO } },
{ "eieio", X(31,854), 0xffffffff, PPC, { 0 } },
-{ "lfiwax", X(31,855), X_MASK, POWER6, { FRT, RA0, RB } },
-
-{ "ldcix", X(31,885), X_MASK, POWER6, { RT, RA0, RB } },
-
{ "tlbsx", XRC(31,914,0), X_MASK, PPC403|BOOKE, { RTO, RA, RB } },
{ "tlbsx.", XRC(31,914,1), X_MASK, PPC403|BOOKE, { RTO, RA, RB } },
{ "tlbsxe", XRC(31,915,0), X_MASK, BOOKE64, { RA, RB } },
@@ -4447,8 +4354,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "slbmfee", X(31,915), XRA_MASK, PPC64, { RT, RB } },
-{ "stwcix", X(31,917), X_MASK, POWER6, { RS, RA0, RB } },
-
{ "sthbrx", X(31,918), X_MASK, COM, { RS, RA0, RB } },
{ "sraq", XRC(31,920,0), X_MASK, M601, { RA, RS, RB } },
@@ -4470,8 +4375,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbrelo", XTLB(31,946,1), XTLB_MASK, PPC403, { RT, RA } },
{ "tlbre", X(31,946), X_MASK, PPC403|BOOKE, { RSO, RAOPT, SHO } },
-{ "sthcix", X(31,949), X_MASK, POWER6, { RS, RA0, RB } },
-
{ "sraiq", XRC(31,952,0), X_MASK, M601, { RA, RS, SH } },
{ "sraiq.", XRC(31,952,1), X_MASK, M601, { RA, RS, SH } },
@@ -4487,8 +4390,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbwe", X(31,978), X_MASK, PPC403|BOOKE, { RSO, RAOPT, SHO } },
{ "tlbld", X(31,978), XRTRA_MASK, PPC, { RB } },
-{ "stbcix", X(31,981), X_MASK, POWER6, { RS, RA0, RB } },
-
{ "icbi", X(31,982), XRT_MASK, PPC, { RA, RB } },
{ "stfiwx", X(31,983), X_MASK, PPC, { FRS, RA0, RB } },
@@ -4503,8 +4404,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbli", X(31,1010), XRTRA_MASK, PPC, { RB } },
-{ "stdcix", X(31,1013), X_MASK, POWER6, { RS, RA0, RB } },
-
{ "dcbzl", XOPL(31,1014,1), XRT_MASK,POWER4, { RA, RB } },
{ "dcbz", X(31,1014), XRT_MASK, PPC, { RA, RB } },
{ "dclz", X(31,1014), XRT_MASK, PPC, { RA, RB } },
@@ -4524,16 +4423,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stvx", X(31, 231), X_MASK, PPCVEC, { VS, RA, RB } },
{ "stvxl", X(31, 487), X_MASK, PPCVEC, { VS, RA, RB } },
-/* New load/store left/right index vector instructions that are in the Cell only. */
-{ "lvlx", X(31, 519), X_MASK, CELL, { VD, RA0, RB } },
-{ "lvlxl", X(31, 775), X_MASK, CELL, { VD, RA0, RB } },
-{ "lvrx", X(31, 551), X_MASK, CELL, { VD, RA0, RB } },
-{ "lvrxl", X(31, 807), X_MASK, CELL, { VD, RA0, RB } },
-{ "stvlx", X(31, 647), X_MASK, CELL, { VS, RA0, RB } },
-{ "stvlxl", X(31, 903), X_MASK, CELL, { VS, RA0, RB } },
-{ "stvrx", X(31, 679), X_MASK, CELL, { VS, RA0, RB } },
-{ "stvrxl", X(31, 935), X_MASK, CELL, { VS, RA0, RB } },
-
{ "lwz", OP(32), OP_MASK, PPCCOM, { RT, D, RA0 } },
{ "l", OP(32), OP_MASK, PWRCOM, { RT, D, RA0 } },
@@ -4594,8 +4483,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lfqu", OP(57), OP_MASK, POWER2, { FRT, D, RA0 } },
-{ "lfdp", OP(57), OP_MASK, POWER6, { FRT, D, RA0 } },
-
{ "lbze", DEO(58,0), DE_MASK, BOOKE64, { RT, DE, RA0 } },
{ "lbzue", DEO(58,1), DE_MASK, BOOKE64, { RT, DE, RAL } },
{ "lhze", DEO(58,2), DE_MASK, BOOKE64, { RT, DE, RA0 } },
@@ -4617,12 +4504,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lwa", DSO(58,2), DS_MASK, PPC64, { RT, DS, RA0 } },
-{ "dadd", XRC(59,2,0), X_MASK, POWER6, { FRT, FRA, FRB } },
-{ "dadd.", XRC(59,2,1), X_MASK, POWER6, { FRT, FRA, FRB } },
-
-{ "dqua", ZRC(59,3,0), Z_MASK, POWER6, { FRT, FRA, FRB, RMC } },
-{ "dqua.", ZRC(59,3,1), Z_MASK, POWER6, { FRT, FRA, FRB, RMC } },
-
{ "fdivs", A(59,18,0), AFRC_MASK, PPC, { FRT, FRA, FRB } },
{ "fdivs.", A(59,18,1), AFRC_MASK, PPC, { FRT, FRA, FRB } },
@@ -4635,14 +4516,14 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "fsqrts", A(59,22,0), AFRAFRC_MASK, PPC, { FRT, FRB } },
{ "fsqrts.", A(59,22,1), AFRAFRC_MASK, PPC, { FRT, FRB } },
-{ "fres", A(59,24,0), AFRALFRC_MASK, PPC, { FRT, FRB, A_L } },
-{ "fres.", A(59,24,1), AFRALFRC_MASK, PPC, { FRT, FRB, A_L } },
+{ "fres", A(59,24,0), AFRAFRC_MASK, PPC, { FRT, FRB } },
+{ "fres.", A(59,24,1), AFRAFRC_MASK, PPC, { FRT, FRB } },
{ "fmuls", A(59,25,0), AFRB_MASK, PPC, { FRT, FRA, FRC } },
{ "fmuls.", A(59,25,1), AFRB_MASK, PPC, { FRT, FRA, FRC } },
-{ "frsqrtes", A(59,26,0), AFRALFRC_MASK,POWER5, { FRT, FRB, A_L } },
-{ "frsqrtes.",A(59,26,1), AFRALFRC_MASK,POWER5, { FRT, FRB, A_L } },
+{ "frsqrtes", A(59,26,0), AFRAFRC_MASK, POWER5, { FRT, FRB } },
+{ "frsqrtes.",A(59,26,1), AFRAFRC_MASK, POWER5, { FRT, FRB } },
{ "fmsubs", A(59,28,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
{ "fmsubs.", A(59,28,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
@@ -4656,73 +4537,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "fnmadds", A(59,31,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
{ "fnmadds.",A(59,31,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
-{ "dmul", XRC(59,34,0), X_MASK, POWER6, { FRT, FRA, FRB } },
-{ "dmul.", XRC(59,34,1), X_MASK, POWER6, { FRT, FRA, FRB } },
-
-{ "drrnd", ZRC(59,35,0), Z_MASK, POWER6, { FRT, FRA, FRB, RMC } },
-{ "drrnd.", ZRC(59,35,1), Z_MASK, POWER6, { FRT, FRA, FRB, RMC } },
-
-{ "dscli", ZRC(59,66,0), Z_MASK, POWER6, { FRT, FRA, SH16 } },
-{ "dscli.", ZRC(59,66,1), Z_MASK, POWER6, { FRT, FRA, SH16 } },
-
-{ "dquai", ZRC(59,67,0), Z_MASK, POWER6, { TE, FRT, FRB, RMC } },
-{ "dquai.", ZRC(59,67,1), Z_MASK, POWER6, { TE, FRT, FRB, RMC } },
-
-{ "dscri", ZRC(59,98,0), Z_MASK, POWER6, { FRT, FRA, SH16 } },
-{ "dscri.", ZRC(59,98,1), Z_MASK, POWER6, { FRT, FRA, SH16 } },
-
-{ "drintx", ZRC(59,99,0), Z_MASK, POWER6, { R, FRT, FRB, RMC } },
-{ "drintx.", ZRC(59,99,1), Z_MASK, POWER6, { R, FRT, FRB, RMC } },
-
-{ "dcmpo", X(59,130), X_MASK, POWER6, { BF, FRA, FRB } },
-
-{ "dtstex", X(59,162), X_MASK, POWER6, { BF, FRA, FRB } },
-{ "dtstdc", Z(59,194), Z_MASK, POWER6, { BF, FRA, DCM } },
-{ "dtstdg", Z(59,226), Z_MASK, POWER6, { BF, FRA, DGM } },
-
-{ "drintn", ZRC(59,227,0), Z_MASK, POWER6, { R, FRT, FRB, RMC } },
-{ "drintn.", ZRC(59,227,1), Z_MASK, POWER6, { R, FRT, FRB, RMC } },
-
-{ "dctdp", XRC(59,258,0), X_MASK, POWER6, { FRT, FRB } },
-{ "dctdp.", XRC(59,258,1), X_MASK, POWER6, { FRT, FRB } },
-
-{ "dctfix", XRC(59,290,0), X_MASK, POWER6, { FRT, FRB } },
-{ "dctfix.", XRC(59,290,1), X_MASK, POWER6, { FRT, FRB } },
-
-{ "ddedpd", XRC(59,322,0), X_MASK, POWER6, { SP, FRT, FRB } },
-{ "ddedpd.", XRC(59,322,1), X_MASK, POWER6, { SP, FRT, FRB } },
-
-{ "dxex", XRC(59,354,0), X_MASK, POWER6, { FRT, FRB } },
-{ "dxex.", XRC(59,354,1), X_MASK, POWER6, { FRT, FRB } },
-
-{ "dsub", XRC(59,514,0), X_MASK, POWER6, { FRT, FRA, FRB } },
-{ "dsub.", XRC(59,514,1), X_MASK, POWER6, { FRT, FRA, FRB } },
-
-{ "ddiv", XRC(59,546,0), X_MASK, POWER6, { FRT, FRA, FRB } },
-{ "ddiv.", XRC(59,546,1), X_MASK, POWER6, { FRT, FRA, FRB } },
-
-{ "dcmpu", X(59,642), X_MASK, POWER6, { BF, FRA, FRB } },
-
-{ "dtstsf", X(59,674), X_MASK, POWER6, { BF, FRA, FRB } },
-
-{ "drsp", XRC(59,770,0), X_MASK, POWER6, { FRT, FRB } },
-{ "drsp.", XRC(59,770,1), X_MASK, POWER6, { FRT, FRB } },
-
-{ "dcffix", XRC(59,802,0), X_MASK, POWER6, { FRT, FRB } },
-{ "dcffix.", XRC(59,802,1), X_MASK, POWER6, { FRT, FRB } },
-
-{ "denbcd", XRC(59,834,0), X_MASK, POWER6, { S, FRT, FRB } },
-{ "denbcd.", XRC(59,834,1), X_MASK, POWER6, { S, FRT, FRB } },
-
-{ "diex", XRC(59,866,0), X_MASK, POWER6, { FRT, FRA, FRB } },
-{ "diex.", XRC(59,866,1), X_MASK, POWER6, { FRT, FRA, FRB } },
-
{ "stfq", OP(60), OP_MASK, POWER2, { FRS, D, RA } },
{ "stfqu", OP(61), OP_MASK, POWER2, { FRS, D, RA } },
-{ "stfdp", OP(61), OP_MASK, POWER6, { FRT, D, RA0 } },
-
{ "lde", DEO(62,0), DE_MASK, BOOKE64, { RT, DES, RA0 } },
{ "ldue", DEO(62,1), DE_MASK, BOOKE64, { RT, DES, RA0 } },
{ "lfse", DEO(62,4), DE_MASK, BOOKE64, { FRT, DES, RA0 } },
@@ -4744,15 +4562,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "fcmpu", X(63,0), X_MASK|(3<<21), COM, { BF, FRA, FRB } },
-{ "daddq", XRC(63,2,0), X_MASK, POWER6, { FRT, FRA, FRB } },
-{ "daddq.", XRC(63,2,1), X_MASK, POWER6, { FRT, FRA, FRB } },
-
-{ "dquaq", ZRC(63,3,0), Z_MASK, POWER6, { FRT, FRA, FRB, RMC } },
-{ "dquaq.", ZRC(63,3,1), Z_MASK, POWER6, { FRT, FRA, FRB, RMC } },
-
-{ "fcpsgn", XRC(63,8,0), X_MASK, POWER6, { FRT, FRA, FRB } },
-{ "fcpsgn.", XRC(63,8,1), X_MASK, POWER6, { FRT, FRA, FRB } },
-
{ "frsp", XRC(63,12,0), XRA_MASK, COM, { FRT, FRB } },
{ "frsp.", XRC(63,12,1), XRA_MASK, COM, { FRT, FRB } },
@@ -4787,16 +4596,16 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "fsel", A(63,23,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
{ "fsel.", A(63,23,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
-{ "fre", A(63,24,0), AFRALFRC_MASK, POWER5, { FRT, FRB, A_L } },
-{ "fre.", A(63,24,1), AFRALFRC_MASK, POWER5, { FRT, FRB, A_L } },
+{ "fre", A(63,24,0), AFRAFRC_MASK, POWER5, { FRT, FRB } },
+{ "fre.", A(63,24,1), AFRAFRC_MASK, POWER5, { FRT, FRB } },
{ "fmul", A(63,25,0), AFRB_MASK, PPCCOM, { FRT, FRA, FRC } },
{ "fm", A(63,25,0), AFRB_MASK, PWRCOM, { FRT, FRA, FRC } },
{ "fmul.", A(63,25,1), AFRB_MASK, PPCCOM, { FRT, FRA, FRC } },
{ "fm.", A(63,25,1), AFRB_MASK, PWRCOM, { FRT, FRA, FRC } },
-{ "frsqrte", A(63,26,0), AFRALFRC_MASK, PPC, { FRT, FRB, A_L } },
-{ "frsqrte.",A(63,26,1), AFRALFRC_MASK, PPC, { FRT, FRB, A_L } },
+{ "frsqrte", A(63,26,0), AFRAFRC_MASK, PPC, { FRT, FRB } },
+{ "frsqrte.",A(63,26,1), AFRAFRC_MASK, PPC, { FRT, FRB } },
{ "fmsub", A(63,28,0), A_MASK, PPCCOM, { FRT,FRA,FRC,FRB } },
{ "fms", A(63,28,0), A_MASK, PWRCOM, { FRT,FRA,FRC,FRB } },
@@ -4820,12 +4629,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "fcmpo", X(63,32), X_MASK|(3<<21), COM, { BF, FRA, FRB } },
-{ "dmulq", XRC(63,34,0), X_MASK, POWER6, { FRT, FRA, FRB } },
-{ "dmulq.", XRC(63,34,1), X_MASK, POWER6, { FRT, FRA, FRB } },
-
-{ "drrndq", ZRC(63,35,0), Z_MASK, POWER6, { FRT, FRA, FRB, RMC } },
-{ "drrndq.", ZRC(63,35,1), Z_MASK, POWER6, { FRT, FRA, FRB, RMC } },
-
{ "mtfsb1", XRC(63,38,0), XRARB_MASK, COM, { BT } },
{ "mtfsb1.", XRC(63,38,1), XRARB_MASK, COM, { BT } },
@@ -4834,54 +4637,21 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mcrfs", X(63,64), XRB_MASK|(3<<21)|(3<<16), COM, { BF, BFA } },
-{ "dscliq", ZRC(63,66,0), Z_MASK, POWER6, { FRT, FRA, SH16 } },
-{ "dscliq.", ZRC(63,66,1), Z_MASK, POWER6, { FRT, FRA, SH16 } },
-
-{ "dquaiq", ZRC(63,67,0), Z_MASK, POWER6, { TE, FRT, FRB, RMC } },
-{ "dquaiq.", ZRC(63,67,1), Z_MASK, POWER6, { FRT, FRA, FRB, RMC } },
-
{ "mtfsb0", XRC(63,70,0), XRARB_MASK, COM, { BT } },
{ "mtfsb0.", XRC(63,70,1), XRARB_MASK, COM, { BT } },
{ "fmr", XRC(63,72,0), XRA_MASK, COM, { FRT, FRB } },
{ "fmr.", XRC(63,72,1), XRA_MASK, COM, { FRT, FRB } },
-{ "dscriq", ZRC(63,98,0), Z_MASK, POWER6, { FRT, FRA, SH16 } },
-{ "dscriq.", ZRC(63,98,1), Z_MASK, POWER6, { FRT, FRA, SH16 } },
-
-{ "drintxq", ZRC(63,99,0), Z_MASK, POWER6, { R, FRT, FRB, RMC } },
-{ "drintxq.",ZRC(63,99,1), Z_MASK, POWER6, { R, FRT, FRB, RMC } },
-
-{ "dcmpoq", X(63,130), X_MASK, POWER6, { BF, FRA, FRB } },
-
{ "mtfsfi", XRC(63,134,0), XRA_MASK|(3<<21)|(1<<11), COM, { BF, U } },
{ "mtfsfi.", XRC(63,134,1), XRA_MASK|(3<<21)|(1<<11), COM, { BF, U } },
{ "fnabs", XRC(63,136,0), XRA_MASK, COM, { FRT, FRB } },
{ "fnabs.", XRC(63,136,1), XRA_MASK, COM, { FRT, FRB } },
-{ "dtstexq", X(63,162), X_MASK, POWER6, { BF, FRA, FRB } },
-{ "dtstdcq", Z(63,194), Z_MASK, POWER6, { BF, FRA, DCM } },
-{ "dtstdgq", Z(63,226), Z_MASK, POWER6, { BF, FRA, DGM } },
-
-{ "drintnq", ZRC(63,227,0), Z_MASK, POWER6, { R, FRT, FRB, RMC } },
-{ "drintnq.",ZRC(63,227,1), Z_MASK, POWER6, { R, FRT, FRB, RMC } },
-
-{ "dctqpq", XRC(63,258,0), X_MASK, POWER6, { FRT, FRB } },
-{ "dctqpq.", XRC(63,258,1), X_MASK, POWER6, { FRT, FRB } },
-
{ "fabs", XRC(63,264,0), XRA_MASK, COM, { FRT, FRB } },
{ "fabs.", XRC(63,264,1), XRA_MASK, COM, { FRT, FRB } },
-{ "dctfixq", XRC(63,290,0), X_MASK, POWER6, { FRT, FRB } },
-{ "dctfixq.",XRC(63,290,1), X_MASK, POWER6, { FRT, FRB } },
-
-{ "ddedpdq", XRC(63,322,0), X_MASK, POWER6, { SP, FRT, FRB } },
-{ "ddedpdq.",XRC(63,322,1), X_MASK, POWER6, { SP, FRT, FRB } },
-
-{ "dxexq", XRC(63,354,0), X_MASK, POWER6, { FRT, FRB } },
-{ "dxexq.", XRC(63,354,1), X_MASK, POWER6, { FRT, FRB } },
-
{ "frin", XRC(63,392,0), XRA_MASK, POWER5, { FRT, FRB } },
{ "frin.", XRC(63,392,1), XRA_MASK, POWER5, { FRT, FRB } },
{ "friz", XRC(63,424,0), XRA_MASK, POWER5, { FRT, FRB } },
@@ -4891,43 +4661,21 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "frim", XRC(63,488,0), XRA_MASK, POWER5, { FRT, FRB } },
{ "frim.", XRC(63,488,1), XRA_MASK, POWER5, { FRT, FRB } },
-{ "dsubq", XRC(63,514,0), X_MASK, POWER6, { FRT, FRA, FRB } },
-{ "dsubq.", XRC(63,514,1), X_MASK, POWER6, { FRT, FRA, FRB } },
-
-{ "ddivq", XRC(63,546,0), X_MASK, POWER6, { FRT, FRA, FRB } },
-{ "ddivq.", XRC(63,546,1), X_MASK, POWER6, { FRT, FRA, FRB } },
-
{ "mffs", XRC(63,583,0), XRARB_MASK, COM, { FRT } },
{ "mffs.", XRC(63,583,1), XRARB_MASK, COM, { FRT } },
-{ "dcmpuq", X(63,642), X_MASK, POWER6, { BF, FRA, FRB } },
-
-{ "dtstsfq", X(63,674), X_MASK, POWER6, { BF, FRA, FRB } },
-
{ "mtfsf", XFL(63,711,0), XFL_MASK, COM, { FLM, FRB } },
{ "mtfsf.", XFL(63,711,1), XFL_MASK, COM, { FLM, FRB } },
-{ "drdpq", XRC(63,770,0), X_MASK, POWER6, { FRT, FRB } },
-{ "drdpq.", XRC(63,770,1), X_MASK, POWER6, { FRT, FRB } },
-
-{ "dcffixq", XRC(63,802,0), X_MASK, POWER6, { FRT, FRB } },
-{ "dcffixq.",XRC(63,802,1), X_MASK, POWER6, { FRT, FRB } },
-
{ "fctid", XRC(63,814,0), XRA_MASK, PPC64, { FRT, FRB } },
{ "fctid.", XRC(63,814,1), XRA_MASK, PPC64, { FRT, FRB } },
{ "fctidz", XRC(63,815,0), XRA_MASK, PPC64, { FRT, FRB } },
{ "fctidz.", XRC(63,815,1), XRA_MASK, PPC64, { FRT, FRB } },
-{ "denbcdq", XRC(63,834,0), X_MASK, POWER6, { S, FRT, FRB } },
-{ "denbcdq.",XRC(63,834,1), X_MASK, POWER6, { S, FRT, FRB } },
-
{ "fcfid", XRC(63,846,0), XRA_MASK, PPC64, { FRT, FRB } },
{ "fcfid.", XRC(63,846,1), XRA_MASK, PPC64, { FRT, FRB } },
-{ "diexq", XRC(63,866,0), X_MASK, POWER6, { FRT, FRA, FRB } },
-{ "diexq.", XRC(63,866,1), X_MASK, POWER6, { FRT, FRA, FRB } },
-
};
const int powerpc_num_opcodes =
diff --git a/opcodes/score-dis.c b/opcodes/score-dis.c
deleted file mode 100644
index 96d1ec4..0000000
--- a/opcodes/score-dis.c
+++ /dev/null
@@ -1,504 +0,0 @@
-/* Instruction printing code for Score
- Copyright 2006 Free Software Foundation, Inc.
- Contributed by:
- Mei Ligang (ligang@sunnorth.com.cn)
- Pei-Lin Tsai (pltsai@sunplus.com)
-
- This file is part of libopcodes.
-
- This program is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#include "sysdep.h"
-#include "dis-asm.h"
-#define DEFINE_TABLE
-#include "score-opc.h"
-#include "opintl.h"
-#include "bfd.h"
-
-/* FIXME: This shouldn't be done here. */
-#include "elf-bfd.h"
-#include "elf/internal.h"
-#include "elf/score.h"
-
-#ifndef streq
-#define streq(a,b) (strcmp ((a), (b)) == 0)
-#endif
-
-#ifndef strneq
-#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0)
-#endif
-
-#ifndef NUM_ELEM
-#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0])
-#endif
-
-typedef struct
-{
- const char *name;
- const char *description;
- const char *reg_names[32];
-} score_regname;
-
-static score_regname regnames[] =
-{
- {"gcc", "Select register names used by GCC",
- {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",
- "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20",
- "r21", "r22", "r23", "r24", "r25", "r26", "r27", "gp", "r29", "r30", "r31"}},
-};
-
-static unsigned int regname_selected = 0;
-
-#define NUM_SCORE_REGNAMES NUM_ELEM (regnames)
-#define score_regnames regnames[regname_selected].reg_names
-
-/* Print one instruction from PC on INFO->STREAM.
- Return the size of the instruction. */
-static int
-print_insn_score32 (bfd_vma pc, struct disassemble_info *info, long given)
-{
- struct score_opcode *insn;
- void *stream = info->stream;
- fprintf_ftype func = info->fprintf_func;
-
- for (insn = score_opcodes; insn->assembler; insn++)
- {
- if ((insn->mask & 0xffff0000) && (given & insn->mask) == insn->value)
- {
- char *c;
-
- for (c = insn->assembler; *c; c++)
- {
- if (*c == '%')
- {
- switch (*++c)
- {
- case 'j':
- {
- int target;
-
- if (info->flags & INSN_HAS_RELOC)
- pc = 0;
- target = (pc & 0xfe000000) | (given & 0x01fffffe);
- (*info->print_address_func) (target, info);
- }
- break;
- case 'b':
- {
- /* Sign-extend a 20-bit number. */
-#define SEXT20(x) ((((x) & 0xfffff) ^ (~ 0x7ffff)) + 0x80000)
- int disp = ((given & 0x01ff8000) >> 5) | (given & 0x3fe);
- int target = (pc + SEXT20 (disp));
-
- (*info->print_address_func) (target, info);
- }
- break;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- int bitstart = *c++ - '0';
- int bitend = 0;
-
- while (*c >= '0' && *c <= '9')
- bitstart = (bitstart * 10) + *c++ - '0';
-
- switch (*c)
- {
- case '-':
- c++;
- while (*c >= '0' && *c <= '9')
- bitend = (bitend * 10) + *c++ - '0';
-
- if (!bitend)
- abort ();
-
- switch (*c)
- {
- case 'r':
- {
- long reg;
-
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
-
- func (stream, "%s", score_regnames[reg]);
- }
- break;
- case 'd':
- {
- long reg;
-
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
-
- func (stream, "%ld", reg);
- }
- break;
- case 'i':
- {
- long reg;
-
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
- reg = ((reg ^ (1 << (bitend - bitstart))) -
- (1 << (bitend - bitstart)));
-
- if (((given & insn->mask) == 0x0c00000a) /* ldc1 */
- || ((given & insn->mask) == 0x0c000012) /* ldc2 */
- || ((given & insn->mask) == 0x0c00001c) /* ldc3 */
- || ((given & insn->mask) == 0x0c00000b) /* stc1 */
- || ((given & insn->mask) == 0x0c000013) /* stc2 */
- || ((given & insn->mask) == 0x0c00001b)) /* stc3 */
- reg <<= 2;
-
- func (stream, "%ld", reg);
- }
- break;
- case 'x':
- {
- long reg;
-
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
-
- func (stream, "%lx", reg);
- }
- break;
- default:
- abort ();
- }
- break;
- case '`':
- c++;
- if ((given & (1 << bitstart)) == 0)
- func (stream, "%c", *c);
- break;
- case '\'':
- c++;
- if ((given & (1 << bitstart)) != 0)
- func (stream, "%c", *c);
- break;
- default:
- abort ();
- }
- break;
-
- default:
- abort ();
- }
- }
- }
- else
- func (stream, "%c", *c);
- }
- return 4;
- }
- }
-
-#if (SCORE_SIMULATOR_ACTIVE)
- func (stream, _("<illegal instruction>"));
- return 4;
-#endif
-
- abort ();
-}
-
-static void
-print_insn_parallel_sym (struct disassemble_info *info)
-{
- void *stream = info->stream;
- fprintf_ftype func = info->fprintf_func;
-
- /* 10: 0000 nop!
- 4 space + 1 colon + 1 space + 1 tab + 8 opcode + 2 space + 1 tab.
- FIXME: the space number is not accurate. */
- func (stream, "%s", " ||\n \t \t");
-}
-
-/* Print one instruction from PC on INFO->STREAM.
- Return the size of the instruction. */
-static int
-print_insn_score16 (bfd_vma pc, struct disassemble_info *info, long given)
-{
- struct score_opcode *insn;
- void *stream = info->stream;
- fprintf_ftype func = info->fprintf_func;
-
- given &= 0xffff;
- for (insn = score_opcodes; insn->assembler; insn++)
- {
- if (!(insn->mask & 0xffff0000) && (given & insn->mask) == insn->value)
- {
- char *c = insn->assembler;
-
- info->bytes_per_chunk = 2;
- info->bytes_per_line = 4;
- given &= 0xffff;
-
- for (; *c; c++)
- {
- if (*c == '%')
- {
- switch (*++c)
- {
-
- case 'j':
- {
- int target;
-
- if (info->flags & INSN_HAS_RELOC)
- pc = 0;
-
- target = (pc & 0xfffff000) | (given & 0x00000ffe);
- (*info->print_address_func) (target, info);
- }
- break;
- case 'b':
- {
- /* Sign-extend a 9-bit number. */
-#define SEXT9(x) ((((x) & 0x1ff) ^ (~ 0xff)) + 0x100)
- int disp = (given & 0xff) << 1;
- int target = (pc + SEXT9 (disp));
-
- (*info->print_address_func) (target, info);
- }
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- int bitstart = *c++ - '0';
- int bitend = 0;
-
- while (*c >= '0' && *c <= '9')
- bitstart = (bitstart * 10) + *c++ - '0';
-
- switch (*c)
- {
- case '-':
- {
- long reg;
-
- c++;
- while (*c >= '0' && *c <= '9')
- bitend = (bitend * 10) + *c++ - '0';
- if (!bitend)
- abort ();
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
- switch (*c)
- {
- case 'R':
- func (stream, "%s", score_regnames[reg + 16]);
- break;
- case 'r':
- func (stream, "%s", score_regnames[reg]);
- break;
- case 'd':
- if (*(c + 1) == '\0')
- func (stream, "%ld", reg);
- else
- {
- c++;
- if (*c == '1')
- func (stream, "%ld", reg << 1);
- else if (*c == '2')
- func (stream, "%ld", reg << 2);
- }
- break;
-
- case 'x':
- if (*(c + 1) == '\0')
- func (stream, "%lx", reg);
- else
- {
- c++;
- if (*c == '1')
- func (stream, "%lx", reg << 1);
- else if (*c == '2')
- func (stream, "%lx", reg << 2);
- }
- break;
- case 'i':
- reg = ((reg ^ (1 << bitend)) - (1 << bitend));
- func (stream, "%ld", reg);
- break;
- default:
- abort ();
- }
- }
- break;
-
- case '\'':
- c++;
- if ((given & (1 << bitstart)) != 0)
- func (stream, "%c", *c);
- break;
- default:
- abort ();
- }
- }
- break;
- default:
- abort ();
- }
- }
- else
- func (stream, "%c", *c);
- }
-
- return 2;
- }
- }
-#if (SCORE_SIMULATOR_ACTIVE)
- func (stream, _("<illegal instruction>"));
- return 2;
-#endif
- /* No match. */
- abort ();
-}
-
-/* NOTE: There are no checks in these routines that
- the relevant number of data bytes exist. */
-static int
-print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
-{
- unsigned char b[4];
- long given;
- long ridparity;
- int status;
- bfd_boolean insn_pce_p = FALSE;
- bfd_boolean insn_16_p = FALSE;
-
- info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
-
- if (pc & 0x2)
- {
- info->bytes_per_chunk = 2;
- status = info->read_memory_func (pc, (bfd_byte *) b, 2, info);
- b[3] = b[2] = 0;
- insn_16_p = TRUE;
- }
- else
- {
- info->bytes_per_chunk = 4;
- status = info->read_memory_func (pc, (bfd_byte *) & b[0], 4, info);
- if (status != 0)
- {
- info->bytes_per_chunk = 2;
- status = info->read_memory_func (pc, (bfd_byte *) b, 2, info);
- b[3] = b[2] = 0;
- insn_16_p = TRUE;
- }
- }
-
- if (status != 0)
- {
- info->memory_error_func (status, pc, info);
- return -1;
- }
-
- if (little)
- {
- given = (b[0]) | (b[1] << 8) | (b[2] << 16) | (b[3] << 24);
- }
- else
- {
- given = (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | (b[3]);
- }
-
- if ((given & 0x80008000) == 0x80008000)
- {
- insn_pce_p = FALSE;
- insn_16_p = FALSE;
- }
- else if ((given & 0x8000) == 0x8000)
- {
- insn_pce_p = TRUE;
- }
- else
- {
- insn_16_p = TRUE;
- }
-
- /* 16 bit instruction. */
- if (insn_16_p)
- {
- if (little)
- {
- given = b[0] | (b[1] << 8);
- }
- else
- {
- given = (b[0] << 8) | b[1];
- }
-
- status = print_insn_score16 (pc, info, given);
- }
- /* pce instruction. */
- else if (insn_pce_p)
- {
- long other;
-
- other = given & 0xFFFF;
- given = (given & 0xFFFF0000) >> 16;
-
- status = print_insn_score16 (pc, info, given);
- print_insn_parallel_sym (info);
- status += print_insn_score16 (pc, info, other);
- /* disassemble_bytes() will output 4 byte per chunk for pce instructio. */
- info->bytes_per_chunk = 4;
- }
- /* 32 bit instruction. */
- else
- {
- /* Get rid of parity. */
- ridparity = (given & 0x7FFF);
- ridparity |= (given & 0x7FFF0000) >> 1;
- given = ridparity;
- status = print_insn_score32 (pc, info, given);
- }
-
- return status;
-}
-
-int
-print_insn_big_score (bfd_vma pc, struct disassemble_info *info)
-{
- return print_insn (pc, info, FALSE);
-}
-
-int
-print_insn_little_score (bfd_vma pc, struct disassemble_info *info)
-{
- return print_insn (pc, info, TRUE);
-}
diff --git a/opcodes/score-opc.h b/opcodes/score-opc.h
deleted file mode 100644
index 20437d7..0000000
--- a/opcodes/score-opc.h
+++ /dev/null
@@ -1,487 +0,0 @@
-/* Copyright 2006 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. */
-
-struct score_opcode
-{
- unsigned long value;
- unsigned long mask; /* Recognise instruction if (op & mask) == value. */
- char *assembler; /* Disassembly string. */
-};
-
-/* Note: There is a partial ordering in this table - it must be searched from
- the top to obtain a correct match. */
-
-static struct score_opcode score_opcodes[] =
-{
- /* Score Instructions. */
- {0x3800000a, 0x3e007fff, "abs\t\t%20-24r, %15-19r"},
- {0x3800004b, 0x3e007fff, "abs.s\t\t%20-24r, %15-19r"},
- {0x00000010, 0x3e0003ff, "add\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000011, 0x3e0003ff, "add.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x38000048, 0x3e0003ff, "add.s\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000012, 0x3e0003ff, "addc\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000013, 0x3e0003ff, "addc.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x02000000, 0x3e0e0001, "addi\t\t%20-24r, %1-16i"},
- {0x02000001, 0x3e0e0001, "addi.c\t\t%20-24r, %1-16i"},
- {0x0a000000, 0x3e0e0001, "addis\t\t%20-24r, %1-16d(0x%1-16x)"},
- {0x0a000001, 0x3e0e0001, "addis.c\t\t%20-24r, %1-16d(0x%1-16x)"},
- {0x10000000, 0x3e000001, "addri\t\t%20-24r, %15-19r, %1-14i"},
- {0x10000001, 0x3e000001, "addri.c\t\t%20-24r, %15-19r, %1-14i"},
- {0x00000009, 0x0000700f, "addc!\t\t%8-11r, %4-7r"},
- {0x00002000, 0x0000700f, "add!\t\t%8-11r, %4-7r"},
- {0x00006000, 0x00007087, "addei!\t\t%8-11r, %3-6d"},
- {0x00000020, 0x3e0003ff, "and\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000021, 0x3e0003ff, "and.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x02080000, 0x3e0e0001, "andi\t\t%20-24r, 0x%1-16x"},
- {0x02080001, 0x3e0e0001, "andi.c\t\t%20-24r, 0x%1-16x"},
- {0x0a080000, 0x3e0e0001, "andis\t\t%20-24r, 0x%1-16x"},
- {0x0a080001, 0x3e0e0001, "andis.c\t\t%20-24r, 0x%1-16x"},
- {0x18000000, 0x3e000001, "andri\t\t%20-24r, %15-19r, 0x%1-14x"},
- {0x18000001, 0x3e000001, "andri.c\t\t%20-24r, %15-19r,0x%1-14x"},
- {0x00002004, 0x0000700f, "and!\t\t%8-11r, %4-7r"},
- {0x08000000, 0x3e007c01, "bcs\t\t%b" },
- {0x08000400, 0x3e007c01, "bcc\t\t%b" },
- {0x08003800, 0x3e007c01, "bcnz\t\t%b" },
- {0x08000001, 0x3e007c01, "bcsl\t\t%b" },
- {0x08000401, 0x3e007c01, "bccl\t\t%b" },
- {0x08003801, 0x3e007c01, "bcnzl\t\t%b" },
- {0x00004000, 0x00007f00, "bcs!\t\t%b" },
- {0x00004100, 0x00007f00, "bcc!\t\t%b" },
- {0x00004e00, 0x00007f00, "bcnz!\t\t%b" },
- {0x08001000, 0x3e007c01, "beq\t\t%b" },
- {0x08001001, 0x3e007c01, "beql\t\t%b" },
- {0x00004400, 0x00007f00, "beq!\t\t%b" },
- {0x08000800, 0x3e007c01, "bgtu\t\t%b" },
- {0x08001800, 0x3e007c01, "bgt\t\t%b" },
- {0x08002000, 0x3e007c01, "bge\t\t%b" },
- {0x08000801, 0x3e007c01, "bgtul\t\t%b" },
- {0x08001801, 0x3e007c01, "bgtl\t\t%b" },
- {0x08002001, 0x3e007c01, "bgel\t\t%b" },
- {0x00004200, 0x00007f00, "bgtu!\t\t%b" },
- {0x00004600, 0x00007f00, "bgt!\t\t%b" },
- {0x00004800, 0x00007f00, "bge!\t\t%b" },
- {0x00000029, 0x3e0003ff, "bitclr.c\t%20-24r, %15-19r, 0x%10-14x"},
- {0x0000002b, 0x3e0003ff, "bitset.c\t%20-24r, %15-19r, 0x%10-14x"},
- {0x0000002d, 0x3e0003ff, "bittst.c\t%15-19r, 0x%10-14x"},
- {0x0000002f, 0x3e0003ff, "bittgl.c\t%20-24r, %15-19r, 0x%10-14x"},
- {0x00006004, 0x00007007, "bitclr!\t\t%8-11r, 0x%3-7x"},
- {0x3800000c, 0x3e0003ff, "bitrev\t\t%20-24r, %15-19r,%10-14r"},
- {0x00006005, 0x00007007, "bitset!\t\t%8-11r, 0x%3-7x"},
- {0x00006006, 0x00007007, "bittst!\t\t%8-11r, 0x%3-7x"},
- {0x00006007, 0x00007007, "bittgl!\t\t%8-11r, 0x%3-7x"},
- {0x08000c00, 0x3e007c01, "bleu\t\t%b" },
- {0x08001c00, 0x3e007c01, "ble\t\t%b" },
- {0x08002400, 0x3e007c01, "blt\t\t%b" },
- {0x08000c01, 0x3e007c01, "bleul\t\t%b" },
- {0x08001c01, 0x3e007c01, "blel\t\t%b" },
- {0x08002401, 0x3e007c01, "bltl\t\t%b" },
- {0x08003c01, 0x3e007c01, "bl\t\t%b" },
- {0x00004300, 0x00007f00, "bleu!\t\t%b" },
- {0x00004700, 0x00007f00, "ble!\t\t%b" },
- {0x00004900, 0x00007f00, "blt!\t\t%b" },
- {0x08002800, 0x3e007c01, "bmi\t\t%b" },
- {0x08002801, 0x3e007c01, "bmil\t\t%b" },
- {0x00004a00, 0x00007f00, "bmi!\t\t%b" },
- {0x08001400, 0x3e007c01, "bne\t\t%b" },
- {0x08001401, 0x3e007c01, "bnel\t\t%b" },
- {0x00004500, 0x00007f00, "bne!\t\t%b" },
- {0x08002c00, 0x3e007c01, "bpl\t\t%b" },
- {0x08002c01, 0x3e007c01, "bpll\t\t%b" },
- {0x00004b00, 0x00007f00, "bpl!\t\t%b" },
- {0x00000008, 0x3e007fff, "brcs\t\t%15-19r" },
- {0x00000408, 0x3e007fff, "brcc\t\t%15-19r" },
- {0x00000808, 0x3e007fff, "brgtu\t\t%15-19r" },
- {0x00000c08, 0x3e007fff, "brleu\t\t%15-19r" },
- {0x00001008, 0x3e007fff, "breq\t\t%15-19r" },
- {0x00001408, 0x3e007fff, "brne\t\t%15-19r" },
- {0x00001808, 0x3e007fff, "brgt\t\t%15-19r" },
- {0x00001c08, 0x3e007fff, "brle\t\t%15-19r" },
- {0x00002008, 0x3e007fff, "brge\t\t%15-19r" },
- {0x00002408, 0x3e007fff, "brlt\t\t%15-19r" },
- {0x00002808, 0x3e007fff, "brmi\t\t%15-19r" },
- {0x00002c08, 0x3e007fff, "brpl\t\t%15-19r" },
- {0x00003008, 0x3e007fff, "brvs\t\t%15-19r" },
- {0x00003408, 0x3e007fff, "brvc\t\t%15-19r" },
- {0x00003808, 0x3e007fff, "brcnz\t\t%15-19r" },
- {0x00003c08, 0x3e007fff, "br\t\t%15-19r" },
- {0x00000009, 0x3e007fff, "brcsl\t\t%15-19r" },
- {0x00000409, 0x3e007fff, "brccl\t\t%15-19r" },
- {0x00000809, 0x3e007fff, "brgtul\t\t%15-19r" },
- {0x00000c09, 0x3e007fff, "brleul\t\t%15-19r" },
- {0x00001009, 0x3e007fff, "breql\t\t%15-19r" },
- {0x00001409, 0x3e007fff, "brnel\t\t%15-19r" },
- {0x00001809, 0x3e007fff, "brgtl\t\t%15-19r" },
- {0x00001c09, 0x3e007fff, "brlel\t\t%15-19r" },
- {0x00002009, 0x3e007fff, "brgel\t\t%15-19r" },
- {0x00002409, 0x3e007fff, "brltl\t\t%15-19r" },
- {0x00002809, 0x3e007fff, "brmil\t\t%15-19r" },
- {0x00002c09, 0x3e007fff, "brpll\t\t%15-19r" },
- {0x00003009, 0x3e007fff, "brvsl\t\t%15-19r" },
- {0x00003409, 0x3e007fff, "brvcl\t\t%15-19r" },
- {0x00003809, 0x3e007fff, "brcnzl\t\t%15-19r" },
- {0x00003c09, 0x3e007fff, "brl\t\t%15-19r" },
- {0x00000004, 0x00007f0f, "brcs!\t\t%4-7r" },
- {0x00000104, 0x00007f0f, "brcc!\t\t%4-7r" },
- {0x00000204, 0x00007f0f, "brgtu!\t\t%4-7r" },
- {0x00000304, 0x00007f0f, "brleu!\t\t%4-7r" },
- {0x00000404, 0x00007f0f, "breq!\t\t%4-7r" },
- {0x00000504, 0x00007f0f, "brne!\t\t%4-7r" },
- {0x00000604, 0x00007f0f, "brgt!\t\t%4-7r" },
- {0x00000704, 0x00007f0f, "brle!\t\t%4-7r" },
- {0x00000804, 0x00007f0f, "brge!\t\t%4-7r" },
- {0x00000904, 0x00007f0f, "brlt!\t\t%4-7r" },
- {0x00000a04, 0x00007f0f, "brmi!\t\t%4-7r" },
- {0x00000b04, 0x00007f0f, "brpl!\t\t%4-7r" },
- {0x00000c04, 0x00007f0f, "brvs!\t\t%4-7r" },
- {0x00000d04, 0x00007f0f, "brvc!\t\t%4-7r" },
- {0x00000e04, 0x00007f0f, "brcnz!\t\t%4-7r" },
- {0x00000f04, 0x00007f0f, "br!\t\t%4-7r" },
- {0x0000000c, 0x00007f0f, "brcsl!\t\t%4-7r" },
- {0x0000010c, 0x00007f0f, "brccl!\t\t%4-7r" },
- {0x0000020c, 0x00007f0f, "brgtul!\t\t%4-7r" },
- {0x0000030c, 0x00007f0f, "brleul!\t\t%4-7r" },
- {0x0000040c, 0x00007f0f, "breql!\t\t%4-7r" },
- {0x0000050c, 0x00007f0f, "brnel!\t\t%4-7r" },
- {0x0000060c, 0x00007f0f, "brgtl!\t\t%4-7r" },
- {0x0000070c, 0x00007f0f, "brlel!\t\t%4-7r" },
- {0x0000080c, 0x00007f0f, "brgel!\t\t%4-7r" },
- {0x0000090c, 0x00007f0f, "brltl!\t\t%4-7r" },
- {0x00000a0c, 0x00007f0f, "brmil!\t\t%4-7r" },
- {0x00000b0c, 0x00007f0f, "brpll!\t\t%4-7r" },
- {0x00000c0c, 0x00007f0f, "brvsl!\t\t%4-7r" },
- {0x00000d0c, 0x00007f0f, "brvcl!\t\t%4-7r" },
- {0x00000e0c, 0x00007f0f, "brcnzl!\t\t%4-7r" },
- {0x00000f0c, 0x00007f0f, "brl!\t\t%4-7r" },
- {0x08003000, 0x3e007c01, "bvs\t\t%b" },
- {0x08003400, 0x3e007c01, "bvc\t\t%b" },
- {0x08003001, 0x3e007c01, "bvsl\t\t%b" },
- {0x08003401, 0x3e007c01, "bvcl\t\t%b" },
- {0x00004c00, 0x00007f00, "bvs!\t\t%b" },
- {0x00004d00, 0x00007f00, "bvc!\t\t%b" },
- {0x00004f00, 0x00007f00, "b!\t\t%b" },
- {0x08003c00, 0x3e007c01, "b\t\t%b" },
- {0x30000000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x30100000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x30200000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x30300000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x30400000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x30800000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x30900000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x30a00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x30b00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x30c00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x30d00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x30e00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x31000000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x31100000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x31800000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x31a00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x31b00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x31c00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x31d00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x31e00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x31f00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
- {0x38000000, 0x3ff003ff, "mad\t\t%15-19r, %10-14r"},
- {0x38000020, 0x3ff003ff, "madu\t\t%15-19r, %10-14r"},
- {0x38000080, 0x3ff003ff, "mad.f\t\t%15-19r, %10-14r"},
- {0x38000001, 0x3ff003ff, "msb\t\t%15-19r, %10-14r"},
- {0x38000021, 0x3ff003ff, "msbu\t\t%15-19r, %10-14r"},
- {0x38000081, 0x3ff003ff, "msb.f\t\t%15-19r, %10-14r"},
- {0x38000102, 0x3ff003ff, "mazl\t\t%15-19r, %10-14r"},
- {0x38000182, 0x3ff003ff, "mazl.f\t\t%15-19r, %10-14r"},
- {0x38000002, 0x3ff003ff, "madl\t\t%15-19r, %10-14r"},
- {0x380000c2, 0x3ff003ff, "madl.fs\t\t%15-19r, %10-14r"},
- {0x38000303, 0x3ff003ff, "mazh\t\t%15-19r, %10-14r"},
- {0x38000383, 0x3ff003ff, "mazh.f\t\t%15-19r, %10-14r"},
- {0x38000203, 0x3ff003ff, "madh\t\t%15-19r, %10-14r"},
- {0x380002c3, 0x3ff003ff, "madh.fs\t\t%15-19r, %10-14r"},
- {0x38000007, 0x3e0003ff, "max\t\t%20-24r, %15-19r, %10-14r"},
- {0x38000006, 0x3e0003ff, "min\t\t%20-24r, %15-19r, %10-14r"},
- {0x38000104, 0x3ff003ff, "mszl\t\t%15-19r, %10-14r"},
- {0x38000184, 0x3ff003ff, "mszl.f\t\t%15-19r, %10-14r"},
- {0x38000004, 0x3ff003ff, "msbl\t\t%15-19r, %10-14r"},
- {0x380000c4, 0x3ff003ff, "msbl.fs\t\t%15-19r, %10-14r"},
- {0x38000305, 0x3ff003ff, "mszh\t\t%15-19r, %10-14r"},
- {0x38000385, 0x3ff003ff, "mszh.f\t\t%15-19r, %10-14r"},
- {0x38000205, 0x3ff003ff, "msbh\t\t%15-19r, %10-14r"},
- {0x380002c5, 0x3ff003ff, "msbh.fs\t\t%15-19r, %10-14r"},
- {0x3800004e, 0x3e0003ff, "sll.s\t\t%20-24r, %15-19r, %10-14r"},
- {0x38000049, 0x3e0003ff, "sub.s\t\t%20-24r, %15-19r, %10-14r"},
- {0x3800000d, 0x3e007fff, "clz\t\t%20-24r, %15-19r"},
- {0x38000000, 0x3e000000, "ceinst\t\t%20-24d, %15-19r, %10-14r, %5-9d, %0-4d"},
- {0x00000019, 0x3ff003ff, "cmpteq.c\t\t%15-19r, %10-14r"},
- {0x00100019, 0x3ff003ff, "cmptmi.c\t\t%15-19r, %10-14r"},
- {0x00300019, 0x3ff003ff, "cmp.c\t\t%15-19r, %10-14r"},
- {0x0000001b, 0x3ff07fff, "cmpzteq.c\t%15-19r"},
- {0x0010001b, 0x3ff07fff, "cmpztmi.c\t%15-19r"},
- {0x0030001b, 0x3ff07fff, "cmpz.c\t\t%15-19r"},
- {0x02040001, 0x3e0e0001, "cmpi.c\t\t%20-24r, %1-16i"},
- {0x00002003, 0x0000700f, "cmp!\t\t%8-11r, %4-7r"},
- {0x0c00000c, 0x3e00001f, "cop1\t\tc%20-24r, c%15-19r, c%10-14r, %5-9d"},
- {0x0c000014, 0x3e00001f, "cop2\t\tc%20-24r, c%15-19r, c%10-14r, %5-9d"},
- {0x0c00001c, 0x3e00001f, "cop3\t\tc%20-24r, c%15-19r, c%10-14r, %5-9d"},
- {0x00000044, 0x3e0003ff, "div\t\t%15-19r, %10-14r"},
- {0x00000046, 0x3e0003ff, "divu\t\t%15-19r, %10-14r"},
- {0x0c0000a4, 0x3e0003ff, "drte" },
- {0x00000058, 0x3e0003ff, "extsb\t\t%20-24r, %15-19r"},
- {0x00000059, 0x3e0003ff, "extsb.c\t\t%20-24r, %15-19r"},
- {0x0000005a, 0x3e0003ff, "extsh\t\t%20-24r, %15-19r"},
- {0x0000005b, 0x3e0003ff, "extsh.c\t\t%20-24r, %15-19r"},
- {0x0000005c, 0x3e0003ff, "extzb\t\t%20-24r, %15-19r"},
- {0x0000005d, 0x3e0003ff, "extzb.c\t\t%20-24r, %15-19r"},
- {0x0000005e, 0x3e0003ff, "extzh\t\t%20-24r, %15-19r"},
- {0x0000005f, 0x3e0003ff, "extzh.c\t\t%20-24r, %15-19r"},
- {0x04000001, 0x3e000001, "jl\t\t%j"},
- {0x00003001, 0x00007001, "jl!\t\t%j" },
- {0x00003000, 0x00007001, "j!\t\t%j" },
- {0x04000000, 0x3e000001, "j\t\t%j"},
- {0x26000000, 0x3e000000, "lb\t\t%20-24r, [%15-19r, %0-14i]"},
- {0x2c000000, 0x3e000000, "lbu\t\t%20-24r, [%15-19r, %0-14i]"},
- {0x06000003, 0x3e000007, "lb\t\t%20-24r, [%15-19r, %3-14i]+"},
- {0x06000006, 0x3e000007, "lbu\t\t%20-24r, [%15-19r, %3-14i]+"},
- {0x0e000003, 0x3e000007, "lb\t\t%20-24r, [%15-19r]+, %3-14i"},
- {0x0e000006, 0x3e000007, "lbu\t\t%20-24r, [%15-19r]+, %3-14i"},
- {0x0000200b, 0x0000700f, "lbu!\t\t%8-11r, [%4-7r]"},
- {0x00007003, 0x00007007, "lbup!\t\t%8-11r, %3-7d"},
- {0x00000060, 0x3e0003ff, "lcb\t\t[%15-19r]+"},
- {0x00000062, 0x3e0003ff, "lcw\t\t%20-24r, [%15-19r]+"},
- {0x00000066, 0x3e0003ff, "lce\t\t%20-24r, [%15-19r]+"},
- {0x0c00000a, 0x3e00001f, "ldc1\t\tc%15-19r, [%20-24r, %5-14i]"},
- {0x0c000012, 0x3e00001f, "ldc2\t\tc%15-19r, [%20-24r, %5-14i]"},
- {0x0c00001a, 0x3e00001f, "ldc3\t\tc%15-19r, [%20-24r, %5-14i]"},
- {0x22000000, 0x3e000000, "lh\t\t%20-24r, [%15-19r, %0-14i]"},
- {0x24000000, 0x3e000000, "lhu\t\t%20-24r, [%15-19r, %0-14i]"},
- {0x06000001, 0x3e000007, "lh\t\t%20-24r, [%15-19r, %3-14i]+"},
- {0x06000002, 0x3e000007, "lhu\t\t%20-24r, [%15-19r, %3-14i]+"},
- {0x0e000001, 0x3e000007, "lh\t\t%20-24r, [%15-19r]+, %3-14i"},
- {0x0e000002, 0x3e000007, "lhu\t\t%20-24r, [%15-19r]+, %3-14i"},
- {0x00002009, 0x0000700f, "lh!\t\t%8-11r, [%4-7r]"},
- {0x00007001, 0x00007007, "lhp!\t\t%8-11r, %3-7d1"},
- {0x020c0000, 0x3e0e0000, "ldi\t\t%20-24r, 0x%1-16x(%1-16i)"},
- {0x0a0c0000, 0x3e0e0000, "ldis\t\t%20-24r, 0x%1-16x(%1-16i)"},
- {0x00005000, 0x00007000, "ldiu!\t\t%8-11r, %0-7d"},
- {0x0000000c, 0x3e0003ff, "alw\t\t%20-24r, [%15-19r]"},
- {0x20000000, 0x3e000000, "lw\t\t%20-24r, [%15-19r, %0-14i]"},
- {0x06000000, 0x3e000007, "lw\t\t%20-24r, [%15-19r, %3-14i]+"},
- {0x0e000000, 0x3e000007, "lw\t\t%20-24r, [%15-19r]+, %3-14i"},
- {0x00002008, 0x0000700f, "lw!\t\t%8-11r, [%4-7r]"},
- {0x00007000, 0x00007007, "lwp!\t\t%8-11r, %3-7d2"},
- {0x0000100b, 0x0000700f, "madh.fs!\t\t%8-11r, %4-7r"},
- {0x0000100a, 0x0000700f, "madl.fs!\t\t%8-11r, %4-7r"},
- {0x00001005, 0x0000700f, "madu!\t\t%8-11r, %4-7r"},
- {0x00001004, 0x0000700f, "mad.f!\t\t%8-11r, %4-7r"},
- {0x00001009, 0x0000700f, "mazh.f!\t\t%8-11r, %4-7r"},
- {0x00001008, 0x0000700f, "mazl.f!\t\t%8-11r, %4-7r"},
- {0x00000448, 0x3e007fff, "mfcel\t\t%20-24r"},
- {0x00001001, 0x00007f0f, "mfcel!\t\t%4-7r"},
- {0x00000848, 0x3e007fff, "mfceh\t\t%20-24r"},
- {0x00001101, 0x00007f0f, "mfceh!\t\t%4-7r"},
- {0x00000c48, 0x3e007fff, "mfcehl\t\t%20-24r, %15-19r"},
- {0x00000048, 0x3e0003ff, "mfce\t\t%20-24r, er%10-14d"},
- {0x00000050, 0x3e0003ff, "mfsr\t\t%20-24r, sr%10-14d"},
- {0x0c000001, 0x3e00001f, "mfcr\t\t%20-24r, c%15-19r"},
- {0x0c000009, 0x3e00001f, "mfc1\t\t%20-24r, c%15-19r"},
- {0x0c000011, 0x3e00001f, "mfc2\t\t%20-24r, c%15-19r"},
- {0x0c000019, 0x3e00001f, "mfc3\t\t%20-24r, c%15-19r"},
- {0x0c00000f, 0x3e00001f, "mfcc1\t\t%20-24r, c%15-19r"},
- {0x0c000017, 0x3e00001f, "mfcc2\t\t%20-24r, c%15-19r"},
- {0x0c00001f, 0x3e00001f, "mfcc3\t\t%20-24r, c%15-19r"},
- {0x00000002, 0x0000700f, "mhfl!\t\t%8-11R, %4-7r"},
- {0x00000001, 0x0000700f, "mlfh!\t\t%8-11r, %4-7R"},
- {0x00001006, 0x0000700f, "msb.f!\t\t%8-11r, %4-7r"},
- {0x0000100f, 0x0000700f, "msbh.fs!\t\t%8-11r, %4-7r"},
- {0x0000100e, 0x0000700f, "msbl.fs!\t\t%8-11r, %4-7r"},
- {0x00001007, 0x0000700f, "msbu!\t\t%8-11r, %4-7r"},
- {0x0000100d, 0x0000700f, "mszh.f!\t\t%8-11r, %4-7r"},
- {0x0000100c, 0x0000700f, "mszl.f!\t\t%8-11r, %4-7r"},
- {0x0000044a, 0x3e007fff, "mtcel\t\t%20-24r"},
- {0x00001000, 0x00007f0f, "mtcel!\t\t%4-7r"},
- {0x0000084a, 0x3e007fff, "mtceh\t\t%20-24r"},
- {0x00001100, 0x00007f0f, "mtceh!\t\t%4-7r"},
- {0x00000c4a, 0x3e007fff, "mtcehl\t\t%20-24r, %15-19r"},
- {0x0000004a, 0x3e0003ff, "mtce\t\t%20-24r, er%10-14d"},
- {0x00000052, 0x3e0003ff, "mtsr\t\t%15-19r, sr%10-14d"},
- {0x0c000000, 0x3e00001f, "mtcr\t\t%20-24r, c%15-19r"},
- {0x0c000008, 0x3e00001f, "mtc1\t\t%20-24r, c%15-19r"},
- {0x0c000010, 0x3e00001f, "mtc2\t\t%20-24r, c%15-19r"},
- {0x0c000018, 0x3e00001f, "mtc3\t\t%20-24r, c%15-19r"},
- {0x0c00000e, 0x3e00001f, "mtcc1\t\t%20-24r, c%15-19r"},
- {0x0c000016, 0x3e00001f, "mtcc2\t\t%20-24r, c%15-19r"},
- {0x0c00001e, 0x3e00001f, "mtcc3\t\t%20-24r, c%15-19r"},
- {0x00000040, 0x3e0003ff, "mul\t\t%15-19r, %10-14r"},
- {0x00000040, 0x3e0003ff, "maz\t\t%15-19r, %10-14r"},
- {0x00000041, 0x3e0003ff, "mul.f\t\t%15-19r, %10-14r"},
- {0x00000041, 0x3e0003ff, "maz.f\t\t%15-19r, %10-14r"},
- {0x00001002, 0x0000700f, "mul.f!\t\t%8-11r, %4-7r"},
- {0x00000042, 0x3e0003ff, "mulu\t\t%15-19r, %10-14r"},
- {0x00000042, 0x3e0003ff, "mazu\t\t%15-19r, %10-14r"},
- {0x00001003, 0x0000700f, "mulu!\t\t%8-11r, %4-7r"},
- {0x00000056, 0x3e007fff, "mvcs\t\t%20-24r, %15-19r"},
- {0x00000456, 0x3e007fff, "mvcc\t\t%20-24r, %15-19r"},
- {0x00000856, 0x3e007fff, "mvgtu\t\t%20-24r, %15-19r"},
- {0x00000c56, 0x3e007fff, "mvleu\t\t%20-24r, %15-19r"},
- {0x00001056, 0x3e007fff, "mveq\t\t%20-24r, %15-19r"},
- {0x00001456, 0x3e007fff, "mvne\t\t%20-24r, %15-19r"},
- {0x00001856, 0x3e007fff, "mvgt\t\t%20-24r, %15-19r"},
- {0x00001c56, 0x3e007fff, "mvle\t\t%20-24r, %15-19r"},
- {0x00002056, 0x3e007fff, "mvge\t\t%20-24r, %15-19r"},
- {0x00002456, 0x3e007fff, "mvlt\t\t%20-24r, %15-19r"},
- {0x00002856, 0x3e007fff, "mvmi\t\t%20-24r, %15-19r"},
- {0x00002c56, 0x3e007fff, "mvpl\t\t%20-24r, %15-19r"},
- {0x00003056, 0x3e007fff, "mvvs\t\t%20-24r, %15-19r"},
- {0x00003456, 0x3e007fff, "mvvc\t\t%20-24r, %15-19r"},
- {0x00003c56, 0x3e007fff, "mv\t\t%20-24r, %15-19r"},
- {0x00000003, 0x0000700f, "mv!\t\t%8-11r, %4-7r"},
- {0x0000001e, 0x3e0003ff, "neg\t\t%20-24r, %10-14r" },
- {0x0000001f, 0x3e0003ff, "neg.c\t\t%20-24r, %10-14r" },
- {0x00002002, 0x0000700f, "neg!\t\t%8-11r, %4-7r"},
- {0x00000000, 0x3e0003ff, "nop" },
- {0x00000024, 0x3e0003ff, "not\t\t%20-24r, %15-19r" },
- {0x00000025, 0x3e0003ff, "not.c\t\t%20-24r, %15-19r" },
- {0x00000000, 0x0000700f, "nop!" },
- {0x00002006, 0x0000700f, "not!\t\t%8-11r, %4-7r"},
- {0x00000022, 0x3e0003ff, "or\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000023, 0x3e0003ff, "or.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x020a0000, 0x3e0e0001, "ori\t\t%20-24r, 0x%1-16x"},
- {0x020a0001, 0x3e0e0001, "ori.c\t\t%20-24r, 0x%1-16x"},
- {0x0a0a0000, 0x3e0e0001, "oris\t\t%20-24r, 0x%1-16x"},
- {0x0a0a0001, 0x3e0e0001, "oris.c\t\t%20-24r, 0x%1-16x"},
- {0x1a000000, 0x3e000001, "orri\t\t%20-24r, %15-19r, 0x%1-14x"},
- {0x1a000001, 0x3e000001, "orri.c\t\t%20-24r, %15-19r, 0x%1-14x"},
- {0x00002005, 0x0000700f, "or!\t\t%8-11r, %4-7r"},
- {0x0000000a, 0x3e0003ff, "pflush"},
- {0x0000208a, 0x0000708f, "pop!\t\t%8-11R, [%4-6r]"},
- {0x0000200a, 0x0000700f, "pop!\t\t%8-11r, [%4-7r]"},
- {0x0000208e, 0x0000708f, "push!\t\t%8-11R, [%4-6r]"},
- {0x0000200e, 0x0000700f, "push!\t\t%8-11r, [%4-7r]"},
- {0x00000038, 0x3e0003ff, "ror\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000039, 0x3e0003ff, "ror.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x0000003b, 0x3e0003ff, "rorc.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x0000003c, 0x3e0003ff, "rol\t\t%20-24r, %15-19r, %10-14r"},
- {0x0000003d, 0x3e0003ff, "rol.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x0000003f, 0x3e0003ff, "rolc.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000078, 0x3e0003ff, "rori\t\t%20-24r, %15-19r, %10-14d"},
- {0x00000079, 0x3e0003ff, "rori.c\t\t%20-24r, %15-19r, %10-14d"},
- {0x0000007b, 0x3e0003ff, "roric.c\t\t%20-24r, %15-19r, %10-14d"},
- {0x0000007c, 0x3e0003ff, "roli\t\t%20-24r, %15-19r, %10-14d"},
- {0x0000007d, 0x3e0003ff, "roli.c\t\t%20-24r, %15-19r, %10-14d"},
- {0x0000007f, 0x3e0003ff, "rolic.c\t\t%20-24r, %15-19r, %10-14d"},
- {0x0c000084, 0x3e0003ff, "rte" },
- {0x2e000000, 0x3e000000, "sb\t\t%20-24r, [%15-19r, %0-14i]"},
- {0x06000007, 0x3e000007, "sb\t\t%20-24r, [%15-19r, %3-14i]+"},
- {0x0e000007, 0x3e000007, "sb\t\t%20-24r, [%15-19r]+, %3-14i"},
- {0x0000200f, 0x0000700f, "sb!\t\t%8-11r, [%4-7r]"},
- {0x00007007, 0x00007007, "sbp!\t\t%8-11r, %3-7d"},
- {0x0000000e, 0x3e0003ff, "asw\t\t%20-24r, [%15-19r]"},
- {0x00000068, 0x3e0003ff, "scb\t\t%20-24r, [%15-19r]+"},
- {0x0000006a, 0x3e0003ff, "scw\t\t%20-24r, [%15-19r]+"},
- {0x0000006e, 0x3e0003ff, "sce\t\t[%15-19r]+"},
- {0x00000006, 0x3e0003ff, "sdbbp\t\t%15-19d"},
- {0x00006002, 0x00007007, "sdbbp!\t\t%3-7d"},
- {0x2a000000, 0x3e000000, "sh\t\t%20-24r, [%15-19r, %0-14i]"},
- {0x06000005, 0x3e000007, "sh\t\t%20-24r, [%15-19r, %3-14i]+"},
- {0x0e000005, 0x3e000007, "sh\t\t%20-24r, [%15-19r]+, %3-14i"},
- {0x0000200d, 0x0000700f, "sh!\t\t%8-11r, [%4-7r]"},
- {0x00007005, 0x00007007, "shp!\t\t%8-11r, %3-7d1"},
- {0x0c0000c4, 0x3e0003ff, "sleep" },
- {0x00000030, 0x3e0003ff, "sll\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000031, 0x3e0003ff, "sll.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000070, 0x3e0003ff, "slli\t\t%20-24r, %15-19r, %10-14d"},
- {0x00000071, 0x3e0003ff, "slli.c\t\t%20-24r, %15-19r, %10-14d"},
- {0x00000008, 0x0000700f, "sll!\t\t%8-11r, %4-7r"},
- {0x00006001, 0x00007007, "slli!\t\t%8-11r, %3-7d"},
- {0x00000034, 0x3e0003ff, "srl\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000035, 0x3e0003ff, "srl.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000036, 0x3e0003ff, "sra\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000037, 0x3e0003ff, "sra.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000074, 0x3e0003ff, "srli\t\t%20-24r, %15-19r, %10-14d"},
- {0x00000075, 0x3e0003ff, "srli.c\t\t%20-24r, %15-19r, %10-14d"},
- {0x00000076, 0x3e0003ff, "srai\t\t%20-24r, %15-19r, %10-14d"},
- {0x00000077, 0x3e0003ff, "srai.c\t\t%20-24r, %15-19r, %10-14d"},
- {0x0000000a, 0x0000700f, "srl!\t\t%8-11r, %4-7r"},
- {0x00006003, 0x00007007, "srli!\t\t%8-11r, %3-7d"},
- {0x0000000b, 0x0000700f, "sra!\t\t%8-11r, %4-7r"},
- {0x0c00000b, 0x3e00001f, "stc1\t\tc%15-19r, [%20-24r, %5-14i]"},
- {0x0c000013, 0x3e00001f, "stc2\t\tc%15-19r, [%20-24r, %5-14i]"},
- {0x0c00001b, 0x3e00001f, "stc3\t\tc%15-19r, [%20-24r, %5-14i]"},
- {0x00000014, 0x3e0003ff, "sub\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000015, 0x3e0003ff, "sub.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000016, 0x3e0003ff, "subc\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000017, 0x3e0003ff, "subc.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x00002001, 0x0000700f, "sub!\t\t%8-11r, %4-7r"},
- {0x00006080, 0x00007087, "subei!\t\t%8-11r, %3-6d"},
- {0x28000000, 0x3e000000, "sw\t\t%20-24r, [%15-19r, %0-14i]"},
- {0x06000004, 0x3e000007, "sw\t\t%20-24r, [%15-19r, %3-14i]+"},
- {0x0e000004, 0x3e000007, "sw\t\t%20-24r, [%15-19r]+, %3-14i"},
- {0x0000200c, 0x0000700f, "sw!\t\t%8-11r, [%4-7r]"},
- {0x00007004, 0x00007007, "swp!\t\t%8-11r, %3-7d2"},
- {0x00000002, 0x3e0003ff, "syscall\t\t%10-24d"},
- {0x00000054, 0x3e007fff, "tcs" },
- {0x00000454, 0x3e007fff, "tcc" },
- {0x00003854, 0x3e007fff, "tcnz" },
- {0x00000005, 0x00007f0f, "tcs!" },
- {0x00000105, 0x00007f0f, "tcc!" },
- {0x00000e05, 0x00007f0f, "tcnz!" },
- {0x00001054, 0x3e007fff, "teq" },
- {0x00000405, 0x00007f0f, "teq!" },
- {0x00000854, 0x3e007fff, "tgtu" },
- {0x00001854, 0x3e007fff, "tgt" },
- {0x00002054, 0x3e007fff, "tge" },
- {0x00000205, 0x00007f0f, "tgtu!" },
- {0x00000605, 0x00007f0f, "tgt!" },
- {0x00000805, 0x00007f0f, "tge!" },
- {0x00000c54, 0x3e007fff, "tleu" },
- {0x00001c54, 0x3e007fff, "tle" },
- {0x00002454, 0x3e007fff, "tlt" },
- {0x0c000004, 0x3e0003ff, "stlb" },
- {0x0c000024, 0x3e0003ff, "mftlb" },
- {0x0c000044, 0x3e0003ff, "mtptlb" },
- {0x0c000064, 0x3e0003ff, "mtrtlb" },
- {0x00000305, 0x00007f0f, "tleu!" },
- {0x00000705, 0x00007f0f, "tle!" },
- {0x00000905, 0x00007f0f, "tlt!" },
- {0x00002854, 0x3e007fff, "tmi" },
- {0x00000a05, 0x00007f0f, "tmi!" },
- {0x00001454, 0x3e007fff, "tne" },
- {0x00000505, 0x00007f0f, "tne!" },
- {0x00002c54, 0x3e007fff, "tpl" },
- {0x00000b05, 0x00007f0f, "tpl!" },
- {0x00000004, 0x3e007fff, "trapcs\t\t%15-19d"},
- {0x00000404, 0x3e007fff, "trapcc\t\t%15-19d"},
- {0x00000804, 0x3e007fff, "trapgtu\t\t%15-19d"},
- {0x00000c04, 0x3e007fff, "trapleu\t\t%15-19d"},
- {0x00001004, 0x3e007fff, "trapeq\t\t%15-19d"},
- {0x00001404, 0x3e007fff, "trapne\t\t%15-19d"},
- {0x00001804, 0x3e007fff, "trapgt\t\t%15-19d"},
- {0x00001c04, 0x3e007fff, "traple\t\t%15-19d"},
- {0x00002004, 0x3e007fff, "trapge\t\t%15-19d"},
- {0x00002404, 0x3e007fff, "traplt\t\t%15-19d"},
- {0x00002804, 0x3e007fff, "trapmi\t\t%15-19d"},
- {0x00002c04, 0x3e007fff, "trappl\t\t%15-19d"},
- {0x00003004, 0x3e007fff, "trapvs\t\t%15-19d"},
- {0x00003404, 0x3e007fff, "trapvc\t\t%15-19d"},
- {0x00003c04, 0x3e007fff, "trap\t\t%15-19d"},
- {0x00003c54, 0x3e007fff, "tset" },
- {0x00000f05, 0x00007f0f, "tset!" },
- {0x00003054, 0x3e007fff, "tvs" },
- {0x00003454, 0x3e007fff, "tvc" },
- {0x00000c05, 0x00007f0f, "tvs!" },
- {0x00000d05, 0x00007f0f, "tvc!" },
- {0x00000026, 0x3e0003ff, "xor\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000027, 0x3e0003ff, "xor.c\t\t%20-24r, %15-19r, %10-14r"},
- {0x00002007, 0x0000700f, "xor!\t\t%8-11r, %4-7r"}
-};
diff --git a/opcodes/sh-dis.c b/opcodes/sh-dis.c
index 0dee910..381fa4d 100644
--- a/opcodes/sh-dis.c
+++ b/opcodes/sh-dis.c
@@ -924,11 +924,11 @@ print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
}
if ((*info->symbol_at_address_func) (val, info))
{
- fprintf_fn (stream, "\t! ");
+ fprintf_fn (stream, "\t! 0x");
(*info->print_address_func) (val, info);
}
else
- fprintf_fn (stream, "\t! %x", val);
+ fprintf_fn (stream, "\t! 0x%x", val);
}
}
diff --git a/opcodes/spu-dis.c b/opcodes/spu-dis.c
deleted file mode 100644
index a0dd1a0..0000000
--- a/opcodes/spu-dis.c
+++ /dev/null
@@ -1,260 +0,0 @@
-/* Disassemble SPU instructions
-
- Copyright 2006 Free Software Foundation, Inc.
-
- This file is part of GDB, GAS, and the GNU binutils.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include <stdio.h>
-#include "sysdep.h"
-#include "dis-asm.h"
-#include "opcode/spu.h"
-
-/* This file provides a disassembler function which uses
- the disassembler interface defined in dis-asm.h. */
-
-extern const struct spu_opcode spu_opcodes[];
-extern const int spu_num_opcodes;
-
-static const struct spu_opcode *spu_disassemble_table[(1<<11)];
-
-static void
-init_spu_disassemble (void)
-{
- int i;
-
- /* If two instructions have the same opcode then we prefer the first
- * one. In most cases it is just an alternate mnemonic. */
- for (i = 0; i < spu_num_opcodes; i++)
- {
- int o = spu_opcodes[i].opcode;
- if (o >= (1 << 11))
- abort ();
- if (spu_disassemble_table[o] == 0)
- spu_disassemble_table[o] = &spu_opcodes[i];
- }
-}
-
-/* Determine the instruction from the 10 least significant bits. */
-static const struct spu_opcode *
-get_index_for_opcode (unsigned int insn)
-{
- const struct spu_opcode *index;
- unsigned int opcode = insn >> (32-11);
-
- /* Init the table. This assumes that element 0/opcode 0 (currently
- * NOP) is always used */
- if (spu_disassemble_table[0] == 0)
- init_spu_disassemble ();
-
- if ((index = spu_disassemble_table[opcode & 0x780]) != 0
- && index->insn_type == RRR)
- return index;
-
- if ((index = spu_disassemble_table[opcode & 0x7f0]) != 0
- && (index->insn_type == RI18 || index->insn_type == LBT))
- return index;
-
- if ((index = spu_disassemble_table[opcode & 0x7f8]) != 0
- && index->insn_type == RI10)
- return index;
-
- if ((index = spu_disassemble_table[opcode & 0x7fc]) != 0
- && (index->insn_type == RI16))
- return index;
-
- if ((index = spu_disassemble_table[opcode & 0x7fe]) != 0
- && (index->insn_type == RI8))
- return index;
-
- if ((index = spu_disassemble_table[opcode & 0x7ff]) != 0)
- return index;
-
- return 0;
-}
-
-/* Print a Spu instruction. */
-
-int
-print_insn_spu (bfd_vma memaddr, struct disassemble_info *info)
-{
- bfd_byte buffer[4];
- int value;
- int hex_value;
- int status;
- unsigned int insn;
- const struct spu_opcode *index;
- enum spu_insns tag;
-
- status = (*info->read_memory_func) (memaddr, buffer, 4, info);
- if (status != 0)
- {
- (*info->memory_error_func) (status, memaddr, info);
- return -1;
- }
-
- insn = bfd_getb32 (buffer);
-
- index = get_index_for_opcode (insn);
-
- if (index == 0)
- {
- (*info->fprintf_func) (info->stream, ".long 0x%x", insn);
- }
- else
- {
- int i;
- int paren = 0;
- tag = (enum spu_insns)(index - spu_opcodes);
- (*info->fprintf_func) (info->stream, "%s", index->mnemonic);
- if (tag == M_BI || tag == M_BISL || tag == M_IRET || tag == M_BISLED
- || tag == M_BIHNZ || tag == M_BIHZ || tag == M_BINZ || tag == M_BIZ
- || tag == M_SYNC || tag == M_HBR)
- {
- int fb = (insn >> (32-18)) & 0x7f;
- if (fb & 0x40)
- (*info->fprintf_func) (info->stream, tag == M_SYNC ? "c" : "p");
- if (fb & 0x20)
- (*info->fprintf_func) (info->stream, "d");
- if (fb & 0x10)
- (*info->fprintf_func) (info->stream, "e");
- }
- if (index->arg[0] != 0)
- (*info->fprintf_func) (info->stream, "\t");
- hex_value = 0;
- for (i = 1; i <= index->arg[0]; i++)
- {
- int arg = index->arg[i];
- if (arg != A_P && !paren && i > 1)
- (*info->fprintf_func) (info->stream, ",");
-
- switch (arg)
- {
- case A_T:
- (*info->fprintf_func) (info->stream, "$%d",
- DECODE_INSN_RT (insn));
- break;
- case A_A:
- (*info->fprintf_func) (info->stream, "$%d",
- DECODE_INSN_RA (insn));
- break;
- case A_B:
- (*info->fprintf_func) (info->stream, "$%d",
- DECODE_INSN_RB (insn));
- break;
- case A_C:
- (*info->fprintf_func) (info->stream, "$%d",
- DECODE_INSN_RC (insn));
- break;
- case A_S:
- (*info->fprintf_func) (info->stream, "$sp%d",
- DECODE_INSN_RA (insn));
- break;
- case A_H:
- (*info->fprintf_func) (info->stream, "$ch%d",
- DECODE_INSN_RA (insn));
- break;
- case A_P:
- paren++;
- (*info->fprintf_func) (info->stream, "(");
- break;
- case A_U7A:
- (*info->fprintf_func) (info->stream, "%d",
- 173 - DECODE_INSN_U8 (insn));
- break;
- case A_U7B:
- (*info->fprintf_func) (info->stream, "%d",
- 155 - DECODE_INSN_U8 (insn));
- break;
- case A_S3:
- case A_S6:
- case A_S7:
- case A_S7N:
- case A_U3:
- case A_U5:
- case A_U6:
- case A_U7:
- hex_value = DECODE_INSN_I7 (insn);
- (*info->fprintf_func) (info->stream, "%d", hex_value);
- break;
- case A_S11:
- (*info->print_address_func) (memaddr + DECODE_INSN_I9a (insn) * 4,
- info);
- break;
- case A_S11I:
- (*info->print_address_func) (memaddr + DECODE_INSN_I9b (insn) * 4,
- info);
- break;
- case A_S10:
- case A_S10B:
- hex_value = DECODE_INSN_I10 (insn);
- (*info->fprintf_func) (info->stream, "%d", hex_value);
- break;
- case A_S14:
- hex_value = DECODE_INSN_I10 (insn) * 16;
- (*info->fprintf_func) (info->stream, "%d", hex_value);
- break;
- case A_S16:
- hex_value = DECODE_INSN_I16 (insn);
- (*info->fprintf_func) (info->stream, "%d", hex_value);
- break;
- case A_X16:
- hex_value = DECODE_INSN_U16 (insn);
- (*info->fprintf_func) (info->stream, "%u", hex_value);
- break;
- case A_R18:
- value = DECODE_INSN_I16 (insn) * 4;
- if (value == 0)
- (*info->fprintf_func) (info->stream, "%d", value);
- else
- {
- hex_value = memaddr + value;
- (*info->print_address_func) (hex_value & 0x3ffff, info);
- }
- break;
- case A_S18:
- value = DECODE_INSN_U16 (insn) * 4;
- if (value == 0)
- (*info->fprintf_func) (info->stream, "%d", value);
- else
- (*info->print_address_func) (value, info);
- break;
- case A_U18:
- value = DECODE_INSN_U18 (insn);
- if (value == 0 || !(*info->symbol_at_address_func)(0, info))
- {
- hex_value = value;
- (*info->fprintf_func) (info->stream, "%u", value);
- }
- else
- (*info->print_address_func) (value, info);
- break;
- case A_U14:
- hex_value = DECODE_INSN_U14 (insn);
- (*info->fprintf_func) (info->stream, "%u", hex_value);
- break;
- }
- if (arg != A_P && paren)
- {
- (*info->fprintf_func) (info->stream, ")");
- paren--;
- }
- }
- if (hex_value > 16)
- (*info->fprintf_func) (info->stream, "\t# %x", hex_value);
- }
- return 4;
-}
diff --git a/opcodes/spu-opc.c b/opcodes/spu-opc.c
deleted file mode 100644
index 683f96f..0000000
--- a/opcodes/spu-opc.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* SPU opcode list
-
- Copyright 2006 Free Software Foundation, Inc.
-
- This file is part of GDB, GAS, and the GNU binutils.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include "opcode/spu.h"
-
-/* This file holds the Spu opcode table */
-
-
-/*
- Example contents of spu-insn.h
- id_tag mode mode type opcode mnemonic asmtype dependency FPU L/S? branch? instruction
- QUAD WORD (0,RC,RB,RA,RT) latency
- APUOP(M_LQD, 1, 0, RI9, 0x1f8, "lqd", ASM_RI9IDX, 00012, FXU, 1, 0) Load Quadword d-form
- */
-
-const struct spu_opcode spu_opcodes[] = {
-#define APUOP(TAG,MACFORMAT,OPCODE,MNEMONIC,ASMFORMAT,DEP,PIPE) \
- { MACFORMAT, OPCODE, MNEMONIC, ASMFORMAT },
-#define APUOPFB(TAG,MACFORMAT,OPCODE,FB,MNEMONIC,ASMFORMAT,DEP,PIPE) \
- { MACFORMAT, OPCODE, MNEMONIC, ASMFORMAT },
-#include "opcode/spu-insns.h"
-#undef APUOP
-#undef APUOPFB
-};
-
-const int spu_num_opcodes =
- sizeof (spu_opcodes) / sizeof (spu_opcodes[0]);
diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb
index 6751473..c357426 100644
--- a/readline/ChangeLog.gdb
+++ b/readline/ChangeLog.gdb
@@ -1,13 +1,3 @@
-2006-11-13 Denis Pilat <denis.pilat@st.com>
-
- * terminal.c (_rl_get_screen_size): use wr and wc variable to store
- window size.
-
-2006-10-21 Ulrich Weigand <uweigand@de.ibm.com>
-
- * callback.c: Include "xmalloc.h".
- * Makefile.in: Add dependency.
-
2006-04-24 Daniel Jacobowitz <dan@codesourcery.com>
Imported readline 5.1, and upstream patches 001-004.
diff --git a/readline/Makefile.in b/readline/Makefile.in
index e14318b..2dbd4bb 100644
--- a/readline/Makefile.in
+++ b/readline/Makefile.in
@@ -446,7 +446,6 @@ util.o: rlprivate.h
vi_mode.o: rlprivate.h
bind.o: xmalloc.h
-callback.o: xmalloc.h
complete.o: xmalloc.h
display.o: xmalloc.h
funmap.o: xmalloc.h
diff --git a/readline/callback.c b/readline/callback.c
index 697066e..9120969 100644
--- a/readline/callback.c
+++ b/readline/callback.c
@@ -43,7 +43,6 @@
#include "rldefs.h"
#include "readline.h"
#include "rlprivate.h"
-#include "xmalloc.h"
/* Private data for callback registration functions. See comments in
rl_callback_read_char for more details. */
diff --git a/readline/terminal.c b/readline/terminal.c
index 46b50e7..21732a7 100644
--- a/readline/terminal.c
+++ b/readline/terminal.c
@@ -226,8 +226,8 @@ _rl_get_screen_size (tty, ignore_env)
CONSOLE_SCREEN_BUFFER_INFO scr;
if (GetConsoleScreenBufferInfo (hConOut, &scr))
{
- wc = scr.dwSize.X;
- wr = scr.srWindow.Bottom - scr.srWindow.Top + 1;
+ _rl_screenwidth = scr.dwSize.X;
+ _rl_screenheight = scr.srWindow.Bottom - scr.srWindow.Top + 1;
}
}
#endif
diff --git a/sim/ChangeLog b/sim/ChangeLog
index ac9d9e6..b68d793 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,37 +1,3 @@
-2006-10-02 Edgar E. Iglesias <edgar@axis.com>
- Hans-Peter Nilsson <hp@axis.com>
-
- * cris/cris-sim.h (enum cris_unknown_syscall_action_type)
- (cris_unknown_syscall_action): Declare.
- * cris/sim-if.c (cris_unknown_syscall_action): Define.
- (cris_options): Add cris-unknown-syscall option.
- (cris_option_handler): Correct comment about and error message for
- invalid --cris-cycles argument. Handle --cris-unknown-syscall.
- * cris/traps.c: Include stdarg.h
- (cris_unknown_syscall): New function.
- (cris_break_13_handler): Instead of sim_io_eprintf and
- sim_engine_halt, call cris_unknown_syscall to handle more or less
- unknown syscalls. Adjust code as necessary to handle return
- value.
-
-2006-09-30 Daniel Jacobowitz <dan@codesourcery.com>
-
- * MAINTAINERS: Add Dave Brolley for sh64.
-
-2006-09-30 Hans-Peter Nilsson <hp@axis.com>
-
- * cris/traps.c (TARGET_PIPE_BUF): New macro.
- (cris_pipe_empty): Correct initialization of "remaining". Only
- adjust the "write" return value if more than TARGET_PIPE_BUF bytes
- are written.
-
-2006-09-29 Hans-Peter Nilsson <hp@axis.com>
-
- * cris/configure.ac: Check for limits.h and sys/param.h.
- * cris/configure, cris/config.in: Rebuild.
- * cris/traps.c (SIM_PATHMAX): New macro.
- (cris_break_13_handler): Use SIM_PATHMAX, not MAXPATHLEN.
-
2006-08-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac (sparc-*-rtems*|sparc-*-elf*): Enable erc32 simulator.
diff --git a/sim/MAINTAINERS b/sim/MAINTAINERS
index d109e5c..a7e9f73 100644
--- a/sim/MAINTAINERS
+++ b/sim/MAINTAINERS
@@ -16,7 +16,6 @@ ppc Andrew Cagney <ac131313@redhat.com>
m68hc11 Stephane Carrez <stcarrez@nerim.fr>
mips Thiemo Seufer <ths@networkno.de>
sh (global maintainers)
-sh64 Dave Brolley <brolley@redhat.com>
m32c DJ Delorie <dj@redhat.com>
common Ben Elliston <bje@gnu.org>
common Frank Ch. Eigler <fche@redhat.com>
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 9d0b8d8..1768b40 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,25 +1,3 @@
-2006-11-07 Thiemo Seufer <ths@mips.com>
-
- * gentmap.c: Fix compile time warning.
-
-2006-11-07 Thiemo Seufer <ths@mips.com>
-
- * sim-base.h (text_start, text_end, start_addr): Use bfd_vma type
- for bfd text addresses.
-
-2006-08-29 Thiemo Seufer <ths@mips.com>
- Nigel Stephens <nigel@mips.com>
-
- * sim-fpu.c (pack_fpu): Handle QUIET_NAN correctly for
- SIM_QUIET_NAN_NEGATED.
-
-2006-08-29 Nigel Stephens <nigel@mips.com>
-
- * sim-profile.c (profile_pc_init): Initialise default profiling
- frequency to a prime number.
- (profile_print_pc): Convert gmon.out sample data into target
- byte order.
-
2006-06-13 Richard Earnshaw <rearnsha@arm.com>
* aclocal.m4: Pass ../../intl to ZW_GNU_GETTEXT_SISTER_DIR.
diff --git a/sim/common/gentmap.c b/sim/common/gentmap.c
index a4d3713..897a6f7 100644
--- a/sim/common/gentmap.c
+++ b/sim/common/gentmap.c
@@ -1,7 +1,6 @@
/* Generate targ-vals.h and targ-map.c. */
#include <stdio.h>
-#include <stdlib.h>
struct tdefs {
char *symbol;
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index 831768b..fde9847 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -181,13 +181,13 @@ typedef struct {
/* The program's text section. */
struct bfd_section *text_section;
/* Starting and ending text section addresses from the bfd. */
- bfd_vma text_start, text_end;
+ SIM_ADDR text_start, text_end;
#define STATE_TEXT_SECTION(sd) ((sd)->base.text_section)
#define STATE_TEXT_START(sd) ((sd)->base.text_start)
#define STATE_TEXT_END(sd) ((sd)->base.text_end)
/* Start address, set when the program is loaded from the bfd. */
- bfd_vma start_addr;
+ SIM_ADDR start_addr;
#define STATE_START_ADDR(sd) ((sd)->base.start_addr)
/* Size of the simulator's cache, if any.
diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c
index 4f7fbc9..d7d8600 100644
--- a/sim/common/sim-fpu.c
+++ b/sim/common/sim-fpu.c
@@ -213,11 +213,7 @@ pack_fpu (const sim_fpu *src,
/* force fraction to correct class */
fraction = src->fraction;
fraction >>= NR_GUARDS;
-#ifdef SIM_QUIET_NAN_NEGATED
- fraction |= QUIET_NAN;
-#else
fraction &= ~QUIET_NAN;
-#endif
break;
case sim_fpu_class_infinity:
sign = src->sign;
diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c
index 787b0e9..20d7a54 100644
--- a/sim/common/sim-profile.c
+++ b/sim/common/sim-profile.c
@@ -519,7 +519,7 @@ profile_pc_init (SIM_DESC sd)
int bucket_size;
/* fill in the frequency if not specified */
if (PROFILE_PC_FREQ (data) == 0)
- PROFILE_PC_FREQ (data) = 257;
+ PROFILE_PC_FREQ (data) = 256;
/* fill in the start/end if not specified */
if (PROFILE_PC_END (data) == 0)
{
@@ -700,7 +700,6 @@ profile_print_pc (sim_cpu *cpu, int verbose)
sample = 0xffff;
else
sample = PROFILE_PC_COUNT (profile) [loop];
- H2T (sample);
ok = fwrite (&sample, sizeof (sample), 1, pf);
}
if (ok == 0)
diff --git a/sim/cris/config.in b/sim/cris/config.in
index 41eb086..e69de29 100644
--- a/sim/cris/config.in
+++ b/sim/cris/config.in
@@ -1,108 +0,0 @@
-/* config.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if translation of program messages to the user's native
- language is requested. */
-#undef ENABLE_NLS
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the <fpu_control.h> header file. */
-#undef HAVE_FPU_CONTROL_H
-
-/* Define to 1 if you have the `getrusage' function. */
-#undef HAVE_GETRUSAGE
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `nsl' library (-lnsl). */
-#undef HAVE_LIBNSL
-
-/* Define to 1 if you have the `socket' library (-lsocket). */
-#undef HAVE_LIBSOCKET
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `sigaction' function. */
-#undef HAVE_SIGACTION
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the `time' function. */
-#undef HAVE_TIME
-
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `__setfpucw' function. */
-#undef HAVE___SETFPUCW
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
diff --git a/sim/cris/configure b/sim/cris/configure
index 96bb0cc..4706527 100755
--- a/sim/cris/configure
+++ b/sim/cris/configure
@@ -4355,9 +4355,7 @@ sim_link_links="${sim_link_links} targ-vals.def"
# For dv-rv and rvdummy.
-
-
-for ac_header in sys/socket.h sys/select.h limits.h sys/param.h
+for ac_header in sys/socket.h sys/select.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac
index 6ff1c0e..a349d8d 100644
--- a/sim/cris/configure.ac
+++ b/sim/cris/configure.ac
@@ -10,7 +10,7 @@ sinclude(../common/aclocal.m4)
sinclude(../common/common.m4)
# For dv-rv and rvdummy.
-AC_CHECK_HEADERS(sys/socket.h sys/select.h limits.h sys/param.h)
+AC_CHECK_HEADERS(sys/socket.h sys/select.h)
SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
SIM_AC_OPTION_HOSTENDIAN
diff --git a/sim/cris/cris-sim.h b/sim/cris/cris-sim.h
index b2dc5b6..49a6f61 100644
--- a/sim/cris/cris-sim.h
+++ b/sim/cris/cris-sim.h
@@ -87,9 +87,6 @@ extern USI crisv32f_break_handler (SIM_CPU *, USI, USI);
extern USI cris_break_13_handler (SIM_CPU *, USI, USI, USI, USI, USI, USI,
USI, USI);
extern char cris_have_900000xxif;
-enum cris_unknown_syscall_action_type
- { CRIS_USYSC_MSG_STOP, CRIS_USYSC_MSG_ENOSYS, CRIS_USYSC_QUIET_ENOSYS };
-extern enum cris_unknown_syscall_action_type cris_unknown_syscall_action;
enum cris_interrupt_type { CRIS_INT_NMI, CRIS_INT_RESET, CRIS_INT_INT };
extern int crisv10deliver_interrupt (SIM_CPU *,
enum cris_interrupt_type,
diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c
index bfa360c..86d19b2 100644
--- a/sim/cris/sim-if.c
+++ b/sim/cris/sim-if.c
@@ -80,10 +80,6 @@ static char cris_bare_iron = 0;
/* Whether 0x9000000xx have simulator-specific meanings. */
char cris_have_900000xxif = 0;
-/* What to do when we face a more or less unknown syscall. */
-enum cris_unknown_syscall_action_type cris_unknown_syscall_action
- = CRIS_USYSC_MSG_STOP;
-
/* Records simulator descriptor so utilities like cris_dump_regs can be
called from gdb. */
SIM_DESC current_state;
@@ -94,7 +90,6 @@ typedef enum {
OPTION_CRIS_TRACE,
OPTION_CRIS_NAKED,
OPTION_CRIS_900000XXIF,
- OPTION_CRIS_UNKNOWN_SYSCALL
} CRIS_OPTIONS;
static const OPTION cris_options[] =
@@ -113,10 +108,6 @@ static const OPTION cris_options[] =
{ {"cris-900000xx", no_argument, NULL, OPTION_CRIS_900000XXIF},
'\0', NULL, "Define addresses at 0x900000xx with simulator semantics",
cris_option_handler, NULL },
- { {"cris-unknown-syscall", required_argument, NULL,
- OPTION_CRIS_UNKNOWN_SYSCALL},
- '\0', "stop|enosys|enosys-quiet", "Action at an unknown system call",
- cris_option_handler, NULL },
{ {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL, NULL }
};
@@ -161,9 +152,9 @@ cris_option_handler (SIM_DESC sd, sim_cpu *cpu ATTRIBUTE_UNUSED, int opt,
*tracefp = FLAG_CRIS_MISC_PROFILE_ALL;
else
{
- /* Beware; the framework does not handle the error case;
- we have to do it ourselves. */
- sim_io_eprintf (sd, "Unknown option `--cris-cycles=%s'\n", arg);
+ /* We'll actually never get here; the caller handles the
+ error case. */
+ sim_io_eprintf (sd, "Unknown option `--cris-stats=%s'\n", arg);
return SIM_RC_FAIL;
}
break;
@@ -186,21 +177,6 @@ cris_option_handler (SIM_DESC sd, sim_cpu *cpu ATTRIBUTE_UNUSED, int opt,
cris_have_900000xxif = 1;
break;
- case OPTION_CRIS_UNKNOWN_SYSCALL:
- if (strcmp (arg, "enosys") == 0)
- cris_unknown_syscall_action = CRIS_USYSC_MSG_ENOSYS;
- else if (strcmp (arg, "enosys-quiet") == 0)
- cris_unknown_syscall_action = CRIS_USYSC_QUIET_ENOSYS;
- else if (strcmp (arg, "stop") == 0)
- cris_unknown_syscall_action = CRIS_USYSC_MSG_STOP;
- else
- {
- sim_io_eprintf (sd, "Unknown option `--cris-unknown-syscall=%s'\n",
- arg);
- return SIM_RC_FAIL;
- }
- break;
-
default:
/* We'll actually never get here; the caller handles the error
case. */
diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index 3d80911..2eb0a1b 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "bfd.h"
/* FIXME: get rid of targ-vals.h usage everywhere else. */
-#include <stdarg.h>
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
@@ -39,21 +38,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-/* For PATH_MAX, originally. */
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-
-/* From ld/sysdep.h. */
-#ifdef PATH_MAX
-# define SIM_PATHMAX PATH_MAX
-#else
-# ifdef MAXPATHLEN
-# define SIM_PATHMAX MAXPATHLEN
-# else
-# define SIM_PATHMAX 1024
-# endif
-#endif
/* The verbatim values are from asm-cris/unistd.h. */
@@ -241,9 +225,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define TARGET___WALL 0x40000000
#define TARGET___WCLONE 0x80000000
-/* From linux/limits.h. */
-#define TARGET_PIPE_BUF 4096
-
static const char stat_map[] =
"st_dev,2:space,10:space,4:st_mode,4:st_nlink,4:st_uid,4"
":st_gid,4:st_rdev,2:space,10:st_size,8:st_blksize,4:st_blocks,4"
@@ -1350,31 +1331,6 @@ make_first_thread (SIM_CPU *current_cpu)
abort ();
}
-/* Handle unknown system calls. Returns (if it does) the syscall
- return value. */
-
-static USI
-cris_unknown_syscall (SIM_CPU *current_cpu, USI pc, char *s, ...)
-{
- SIM_DESC sd = CPU_STATE (current_cpu);
- host_callback *cb = STATE_CALLBACK (sd);
-
- if (cris_unknown_syscall_action == CRIS_USYSC_MSG_STOP
- || cris_unknown_syscall_action == CRIS_USYSC_MSG_ENOSYS)
- {
- va_list ap;
-
- va_start (ap, s);
- sim_io_evprintf (sd, s, ap);
- va_end (ap);
-
- if (cris_unknown_syscall_action == CRIS_USYSC_MSG_STOP)
- sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped, SIM_SIGILL);
- }
-
- return -cb_host_to_target_errno (cb, ENOSYS);
-}
-
/* Main function: the handler of the "break 13" syscall insn. */
USI
@@ -1493,17 +1449,16 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
}
/* FALLTHROUGH */
default:
- /* Nothing else is implemented. */
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented %s syscall "
- "(fd: 0x%lx: cmd: 0x%lx arg: "
- "0x%lx)\n",
- callnum == TARGET_SYS_fcntl
- ? "fcntl" : "fcntl64",
- (unsigned long) (USI) arg1,
- (unsigned long) (USI) arg2,
- (unsigned long) (USI) arg3);
+ /* Abort for all other cases. */
+ sim_io_eprintf (sd, "Unimplemented %s syscall "
+ "(fd: 0x%lx: cmd: 0x%lx arg: 0x%lx)\n",
+ callnum == TARGET_SYS_fcntl
+ ? "fcntl" : "fcntl64",
+ (unsigned long) (USI) arg1,
+ (unsigned long) (USI) arg2,
+ (unsigned long) (USI) arg3);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
break;
}
break;
@@ -1625,17 +1580,16 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|| (fd != (USI) -1 && prot != TARGET_PROT_READ)
|| pgoff != 0)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented mmap2 call "
- "(0x%lx, 0x%lx, 0x%lx, "
- "0x%lx, 0x%lx, 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2,
- (unsigned long) arg3,
- (unsigned long) arg4,
- (unsigned long) arg5,
- (unsigned long) arg6);
+ sim_io_eprintf (sd, "Unimplemented mmap2 call "
+ "(0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx)\n",
+ (unsigned long) arg1,
+ (unsigned long) arg2,
+ (unsigned long) arg3,
+ (unsigned long) arg4,
+ (unsigned long) arg5,
+ (unsigned long) arg6);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
break;
}
else if (fd != (USI) -1)
@@ -1729,13 +1683,13 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|| !is_mapped (sd, &current_cpu->highest_mmapped_page, addr,
len))
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented mprotect call "
- "(0x%lx, 0x%lx, 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2,
- (unsigned long) arg3);
+ sim_io_eprintf (sd, "Unimplemented mprotect call "
+ "(0x%lx, 0x%lx, 0x%lx)\n",
+ (unsigned long) arg1,
+ (unsigned long) arg2,
+ (unsigned long) arg3);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
break;
}
@@ -1794,14 +1748,14 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|| rusagep != 0
|| current_cpu->thread_data == NULL)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented wait4 call "
- "(0x%lx, 0x%lx, 0x%lx, 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2,
- (unsigned long) arg3,
- (unsigned long) arg4);
+ sim_io_eprintf (sd, "Unimplemented wait4 call "
+ "(0x%lx, 0x%lx, 0x%lx, 0x%lx)\n",
+ (unsigned long) arg1,
+ (unsigned long) arg2,
+ (unsigned long) arg3,
+ (unsigned long) arg4);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
break;
}
@@ -1907,22 +1861,19 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
&& target_sa_flags != (TARGET_SA_RESTART|TARGET_SA_SIGINFO))
|| target_sa_handler == 0)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented rt_sigaction "
- "syscall "
- "(0x%lx, 0x%lx: "
- "[0x%x, 0x%x, 0x%x, "
- "{0x%x, 0x%x}], 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2,
- target_sa_handler,
- target_sa_flags,
- target_sa_restorer,
- target_sa_mask_low,
- target_sa_mask_high,
- (unsigned long) arg3);
- break;
+ sim_io_eprintf (sd, "Unimplemented rt_sigaction "
+ "syscall (0x%lx, "
+ "0x%lx: [0x%x, 0x%x, 0x%x, "
+ "{0x%x, 0x%x}], "
+ "0x%lx)\n",
+ (unsigned long) arg1,
+ (unsigned long) arg2,
+ target_sa_handler, target_sa_flags,
+ target_sa_restorer,
+ target_sa_mask_low, target_sa_mask_high,
+ (unsigned long) arg3);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
}
current_cpu->sighandler[signum] = target_sa_handler;
@@ -2043,14 +1994,11 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|| (buf.st_mode & S_IFIFO) == 0)
|| current_cpu->thread_data == NULL)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented poll syscall "
- "(0x%lx: [0x%x, 0x%x, x], "
- "0x%lx, 0x%lx)\n",
- (unsigned long) arg1, fd, events,
- (unsigned long) arg2,
- (unsigned long) arg3);
+ sim_io_eprintf (sd, "Unimplemented poll syscall "
+ "(0x%lx: [0x%x, 0x%x, x], 0x%lx, 0x%lx)\n",
+ (unsigned long) arg1, fd, events,
+ (unsigned long) arg2, (unsigned long) arg3);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped, SIM_SIGILL);
break;
}
@@ -2142,13 +2090,12 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
if (!((offs_hi == 0 && offs_lo >= 0)
|| (offs_hi == -1 && offs_lo < 0)))
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented llseek offset,"
- " fd %d: 0x%x:0x%x\n",
- fd, (unsigned) arg2,
- (unsigned) arg3);
- break;
+ sim_io_eprintf (sd,
+ "Unimplemented llseek offset,"
+ " fd %d: 0x%x:0x%x\n",
+ fd, (unsigned) arg2, (unsigned) arg3);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
}
s.func = TARGET_SYS_lseek;
@@ -2226,11 +2173,11 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
&& how != TARGET_SIG_SETMASK
&& how != TARGET_SIG_UNBLOCK)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented rt_sigprocmask "
- "syscall (0x%x, 0x%x, 0x%x)\n",
- arg1, arg2, arg3);
+ sim_io_eprintf (sd, "Unimplemented rt_sigprocmask syscall "
+ "(0x%x, 0x%x, 0x%x)\n", arg1, arg2, arg3);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
+ retval = 0;
break;
}
@@ -2301,19 +2248,17 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|| (current_cpu->thread_data[threadno].cpu_context_atsignal
== NULL))
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Invalid sigreturn syscall: "
- "no signal handler active "
- "(0x%lx, 0x%lx, 0x%lx, 0x%lx, "
- "0x%lx, 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2,
- (unsigned long) arg3,
- (unsigned long) arg4,
- (unsigned long) arg5,
- (unsigned long) arg6);
- break;
+ sim_io_eprintf (sd, "Invalid sigreturn syscall: no signal"
+ " handler active "
+ "(0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx)\n",
+ (unsigned long) arg1,
+ (unsigned long) arg2,
+ (unsigned long) arg3,
+ (unsigned long) arg4,
+ (unsigned long) arg5,
+ (unsigned long) arg6);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
}
was_sigsuspended
@@ -2379,13 +2324,11 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
if (setsize != 8)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented rt_sigsuspend syscall"
- " arguments (0x%lx, 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2);
- break;
+ sim_io_eprintf (sd, "Unimplemented rt_sigsuspend syscall"
+ " arguments (0x%lx, 0x%lx)\n",
+ (unsigned long) arg1, (unsigned long) arg2);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
}
/* Don't change the signal mask if we're already in
@@ -2470,8 +2413,8 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
USI buf = arg1;
USI size = arg2;
- char *cwd = xmalloc (SIM_PATHMAX);
- if (cwd != getcwd (cwd, SIM_PATHMAX))
+ char *cwd = xmalloc (MAXPATHLEN);
+ if (cwd != getcwd (cwd, MAXPATHLEN))
abort ();
/* FIXME: When and if we support chdir, we need something
@@ -2497,8 +2440,8 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
SI path = arg1;
SI buf = arg2;
SI bufsiz = arg3;
- char *pbuf = xmalloc (SIM_PATHMAX);
- char *lbuf = xmalloc (SIM_PATHMAX);
+ char *pbuf = xmalloc (MAXPATHLEN);
+ char *lbuf = xmalloc (MAXPATHLEN);
char *lbuf_alloc = lbuf;
int nchars = -1;
int i;
@@ -2510,7 +2453,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
o += strlen (simulator_sysroot);
}
- for (i = 0; i + o < SIM_PATHMAX; i++)
+ for (i = 0; i + o < MAXPATHLEN; i++)
{
pbuf[i + o]
= sim_core_read_unaligned_1 (current_cpu, pc, 0, path + i);
@@ -2518,7 +2461,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
break;
}
- if (i + o == SIM_PATHMAX)
+ if (i + o == MAXPATHLEN)
{
retval = -cb_host_to_target_errno (cb, ENAMETOOLONG);
break;
@@ -2535,12 +2478,12 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
if (argv0 == NULL || *argv0 == '.')
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented readlink syscall "
- "(0x%lx: [\"%s\"], 0x%lx)\n",
- (unsigned long) arg1, pbuf,
- (unsigned long) arg2);
+ sim_io_eprintf (sd, "Unimplemented readlink syscall "
+ "(0x%lx: [\"%s\"], 0x%lx)\n",
+ (unsigned long) arg1, pbuf,
+ (unsigned long) arg2);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
break;
}
else if (*argv0 == '/')
@@ -2554,8 +2497,8 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
}
else
{
- if (getcwd (lbuf, SIM_PATHMAX) != NULL
- && strlen (lbuf) + 2 + strlen (argv0) < SIM_PATHMAX)
+ if (getcwd (lbuf, MAXPATHLEN) != NULL
+ && strlen (lbuf) + 2 + strlen (argv0) < MAXPATHLEN)
{
if (strncmp (simulator_sysroot, lbuf,
strlen (simulator_sysroot)) == 0)
@@ -2570,7 +2513,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
}
}
else
- nchars = readlink (pbuf, lbuf, SIM_PATHMAX);
+ nchars = readlink (pbuf, lbuf, MAXPATHLEN);
/* We trust that the readlink result returns a *relative*
link, or one already adjusted for the file-path-prefix.
@@ -2773,19 +2716,19 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
break;
}
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented _sysctl syscall "
- "(0x%lx: [0x%lx, 0x%lx],"
- " 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx)\n",
- (unsigned long) name,
- (unsigned long) name0,
- (unsigned long) name1,
- (unsigned long) nlen,
- (unsigned long) oldval,
- (unsigned long) oldlenp,
- (unsigned long) newval,
- (unsigned long) newlen);
+ sim_io_eprintf (sd, "Unimplemented _sysctl syscall "
+ "(0x%lx: [0x%lx, 0x%lx],"
+ " 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx)\n",
+ (unsigned long) name,
+ (unsigned long) name0,
+ (unsigned long) name1,
+ (unsigned long) nlen,
+ (unsigned long) oldval,
+ (unsigned long) oldlenp,
+ (unsigned long) newval,
+ (unsigned long) newlen);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
break;
}
@@ -2858,13 +2801,11 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
| TARGET_CLONE_SIGHAND)
|| newsp == 0)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented clone syscall "
- "(0x%lx, 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2);
- break;
+ sim_io_eprintf (sd,
+ "Unimplemented clone syscall (0x%lx, 0x%lx)\n",
+ (unsigned long) arg1, (unsigned long) arg2);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
}
if (current_cpu->thread_data == NULL)
@@ -2927,12 +2868,11 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
unimplemented_syscall:
default:
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented syscall: %d "
- "(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x)\n",
- callnum, arg1, arg2, arg3, arg4, arg5,
- arg6);
+ sim_io_eprintf (sd, "Unimplemented syscall: %d "
+ "(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x)\n", callnum,
+ arg1, arg2, arg3, arg4, arg5, arg6);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
}
}
@@ -2942,7 +2882,6 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
current_cpu->last_open_fd = retval;
current_cpu->last_open_flags = arg2;
}
-
current_cpu->last_syscall = callnum;
/* A system call is a rescheduling point. For the time being, we don't
@@ -3017,14 +2956,13 @@ cris_pipe_nonempty (host_callback *cb ATTRIBUTE_UNUSED,
static void
cris_pipe_empty (host_callback *cb,
- int reader,
+ int reader ATTRIBUTE_UNUSED,
int writer)
{
int i;
SIM_CPU *cpu = current_cpu_for_cb_callback;
bfd_byte r10_buf[4];
- int remaining
- = cb->pipe_buffer[writer].size - cb->pipe_buffer[reader].size;
+ int remaining = cb->pipe_buffer[writer].size;
/* We need to find the thread that waits for this pipe. */
for (i = 0; i < SIM_TARGET_MAX_THREADS; i++)
@@ -3032,7 +2970,6 @@ cris_pipe_empty (host_callback *cb,
&& cpu->thread_data[i].pipe_write_fd == writer)
{
int retval;
-
/* Temporarily switch to this cpu context, so we can change the
PC by ordinary calls. */
@@ -3043,25 +2980,19 @@ cris_pipe_empty (host_callback *cb,
cpu->thread_data[i].cpu_context,
cpu->thread_cpu_data_size);
- /* The return value is supposed to contain the number of
- written bytes, which is the number of bytes requested and
- returned at the write call. You might think the right
- thing is to adjust the return-value to be only the
- *consumed* number of bytes, but it isn't. We're only
- called if the pipe buffer is fully consumed or it is being
- closed, possibly with remaining bytes. For the latter
- case, the writer is still supposed to see success for
- PIPE_BUF bytes (a constant which we happen to know and is
- unlikely to change). The return value may also be a
- negative number; an error value. This case is covered
- because "remaining" is always >= 0. */
+ /* The return value is supposed to contain the number of written
+ bytes, which is the number of bytes requested and returned at
+ the write call. We subtract the remaining bytes from that,
+ but making sure we still get a positive number.
+ The return value may also be a negative number; an error
+ value. We cover this case by comparing against remaining,
+ which is always >= 0. */
(*CPU_REG_FETCH (cpu)) (cpu, H_GR_R10, r10_buf, 4);
retval = (int) bfd_getl_signed_32 (r10_buf);
- if (retval - remaining > TARGET_PIPE_BUF)
- {
- bfd_putl32 (retval - remaining, r10_buf);
- (*CPU_REG_STORE (cpu)) (cpu, H_GR_R10, r10_buf, 4);
- }
+ if (retval >= remaining)
+ bfd_putl32 (retval - remaining, r10_buf);
+ (*CPU_REG_STORE (cpu)) (cpu, H_GR_R10, r10_buf, 4);
+
sim_pc_set (cpu, sim_pc_get (cpu) + 2);
memcpy (cpu->thread_data[i].cpu_context,
&cpu->cpu_data_placeholder,
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 2f867b5..6ea29d6 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,28 +1,3 @@
-2006-11-07 Thiemo Seufer <ths@mips.com>
-
- * dsp.igen (do_w_op): Fix compiler warning.
-
-2006-08-29 Thiemo Seufer <ths@mips.com>
- David Ung <davidu@mips.com>
-
- * configure.ac (mipsisa32r2*-*-*, mipsisa32*-*-*): Add smartmips to
- sim_igen_machine.
- * configure: Regenerate.
- * mips.igen (model): Add smartmips.
- (MADDU): Increment ACX if carry.
- (do_mult): Clear ACX.
- (ROR,RORV): Add smartmips.
- (include): Include smartmips.igen.
- * sim-main.h (ACX): Set to REGISTERS[89].
- * smartmips.igen: New file.
-
-2006-08-29 Thiemo Seufer <ths@mips.com>
- David Ung <davidu@mips.com>
-
- * Makefile.in (IGEN_INCLUDE): Add missing includes for m16e.igen and
- mips3264r2.igen. Add missing dependency rules.
- * m16e.igen: Support for mips16e save/restore instructions.
-
2006-06-13 Richard Earnshaw <rearnsha@arm.com>
* configure: Regenerated.
diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in
index 817dcdf..9c3e838 100644
--- a/sim/mips/Makefile.in
+++ b/sim/mips/Makefile.in
@@ -92,14 +92,12 @@ IGEN_DC=$(srcdir)/mips.dc
M16_DC=$(srcdir)/m16.dc
IGEN_INCLUDE=\
$(srcdir)/m16.igen \
- $(srcdir)/m16e.igen \
$(srcdir)/mdmx.igen \
$(srcdir)/mips3d.igen \
$(srcdir)/sb1.igen \
$(srcdir)/tx.igen \
$(srcdir)/vr.igen \
$(srcdir)/dsp.igen \
- $(srcdir)/mips3264r2.igen \
# NB: Since these can be built by a number of generators, care
# must be taken to ensure that they are only dependant on
@@ -186,15 +184,8 @@ support.o: sim-main.h support.c $(SIM_EXTRA_DEPS)
idecode.o: sim-main.h idecode.c $(SIM_EXTRA_DEPS)
itable.o: sim-main.h itable.c $(SIM_EXTRA_DEPS)
-m16_semantics.o: sim-main.h m16_semantics.c $(SIM_EXTRA_DEPS)
-m16_support.o: sim-main.h m16_support.c $(SIM_EXTRA_DEPS)
-m16_idecode.o: sim-main.h m16_idecode.c $(SIM_EXTRA_DEPS)
-m16_icache.o: sim-main.h m16_icache.c $(SIM_EXTRA_DEPS)
-m32_semantics.o: sim-main.h m32_semantics.c $(SIM_EXTRA_DEPS)
-m32_support.o: sim-main.h m32_support.c $(SIM_EXTRA_DEPS)
-m32_idecode.o: sim-main.h m32_idecode.c $(SIM_EXTRA_DEPS)
-m32_icache.o: sim-main.h m32_icache.c $(SIM_EXTRA_DEPS)
+
BUILT_SRC_FROM_M16 = \
m16_icache.h \
diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac
index 19a9d49..f81abbb 100644
--- a/sim/mips/configure.ac
+++ b/sim/mips/configure.ac
@@ -146,13 +146,13 @@ case "${target}" in
sim_m16_filter="16"
;;
mipsisa32r2*-*-*) sim_gen=M16
- sim_igen_machine="-M mips32r2,mips16,mips16e,dsp,smartmips"
+ sim_igen_machine="-M mips32r2,mips16,mips16e,dsp"
sim_m16_machine="-M mips16,mips16e,mips32r2"
sim_igen_filter="32,f"
sim_mach_default="mipsisa32r2"
;;
mipsisa32*-*-*) sim_gen=M16
- sim_igen_machine="-M mips32,mips16,mips16e,dsp,smartmips"
+ sim_igen_machine="-M mips32,mips16,mips16e,dsp"
sim_m16_machine="-M mips16,mips16e,mips32"
sim_igen_filter="32,f"
sim_mach_default="mipsisa32"
diff --git a/sim/mips/dsp.igen b/sim/mips/dsp.igen
index 0b337cc..18aafcb 100644
--- a/sim/mips/dsp.igen
+++ b/sim/mips/dsp.igen
@@ -69,10 +69,10 @@
h0 = (signed64)h1 + (signed64)h2;
else // SUB
h0 = (signed64)h1 - (signed64)h2;
- if (((h0 & 0x100000000LL) >> 1) != (h0 & 0x80000000))
+ if (((h0 & 0x100000000) >> 1) != (h0 & 0x80000000))
{
DSPCR |= DSPCR_OUFLAG4;
- if (h0 & 0x100000000LL)
+ if (h0 & 0x100000000)
h0 = 0x80000000;
else
h0 = 0x7fffffff;
diff --git a/sim/mips/m16e.igen b/sim/mips/m16e.igen
index 8808906..2d7a073 100644
--- a/sim/mips/m16e.igen
+++ b/sim/mips/m16e.igen
@@ -103,267 +103,3 @@
RA = NIA;
NIA = GPR[TRX];
}
-
-
-// format routines for save/restore
-:%s::::RAS:int ras
-*mips16e
-{
- static char buf[10];
- buf[0] = '\0';
- if (ras & 4)
- strcat (buf,"ra,");
- if (ras & 2)
- strcat (buf,"s0,");
- if (ras & 1)
- strcat (buf,"s1,");
- return (buf);
-}
-
-:%s::::XSREGS:int xsregs
-*mips16e
-{
- if (xsregs > 6)
- return "s2,s3,s4,s5,s6,s7,s8,";
- if (xsregs > 5)
- return "s2,s3,s4,s5,s6,s7,";
- if (xsregs > 4)
- return "s2,s3,s4,s5,s6,";
- if (xsregs > 3)
- return "s2,s3,s4,s5,";
- if (xsregs > 2)
- return "s2,s3,s4,";
- if (xsregs > 1)
- return "s2,s3,";
- if (xsregs > 0)
- return "s2,";
- return "";
-}
-
-:%s::::AREGS:int aregs
-*mips16e
-{
- // Fixme: how is the arg/static distinction made by the assembler?
- static const char * const aregstr[16] = {
- "",
- "A3,",
- "A2,A3,",
- "A1,A2,A3,",
- "A0,A1,A2,A3,",
- "a0,",
- "a0,A3,",
- "a0,A2,A3,",
- "a0,A1,A2,A3,",
- "a0,a1,",
- "a0,a1,A3,",
- "a0,a1,A2,A3,",
- "a0,a1,a2,",
- "a0,a1,a2,A3,",
- "?,"
- };
- return aregstr[aregs];
-}
-
-:compute:::int:SFRAME:FS:((FS == 0) ? 128 \: (FS << 3))
-:compute:::int:BFRAME:FSHI,FSLO:(((FSHI << 4) | FSLO) << 3)
-
-:function:::void:do_save:int xsregs, int aregs, int ras0s1, int framesize
-{
- unsigned_word temp;
- int args, astatic;
-
- temp = GPR[29];
-
- /* writes are in the same order as the hardware description... */
- switch (aregs) {
- case 0: case 1: case 2: case 3: case 11:
- args = 0;
- break;
- case 4: case 5: case 6: case 7:
- args = 1;
- break;
- case 8: case 9: case 10:
- args = 2;
- break;
- case 12: case 13:
- args = 3;
- break;
- case 14:
- args = 4;
- break;
- default:
- sim_engine_abort (SD, CPU, CIA, "save: aregs=%d causes unpredictable results\n", aregs);
- }
- if (args > 0) {
- do_store (SD_, AccessLength_WORD, temp, 0, GPR[4]);
- if (args > 1) {
- do_store (SD_,AccessLength_WORD, temp, 4 , GPR[5]);
- if (args > 2) {
- do_store (SD_,AccessLength_WORD, temp, 8 , GPR[6]);
- if (args > 3) {
- do_store (SD_,AccessLength_WORD, temp, 12, GPR[7]);
- }
- }
- }
- }
-
- if (ras0s1 & 4)
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[31]);
-
- switch (xsregs) {
- case 7:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[30]);
- case 6:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[23]);
- case 5:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[22]);
- case 4:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[21]);
- case 3:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[20]);
- case 2:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[19]);
- case 1:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[18]);
- }
-
- if (ras0s1 & 1)
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[17]);
- if (ras0s1 & 2)
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[16]);
-
- switch (aregs) {
- case 0: case 4: case 8: case 12: case 14:
- astatic = 0;
- break;
- case 1: case 5: case 9: case 13:
- astatic = 1;
- break;
- case 2: case 6: case 10:
- astatic = 2;
- break;
- case 3: case 7:
- astatic = 3;
- break;
- case 11:
- astatic = 4;
- break;
- default:
- sim_engine_abort (SD, CPU, CIA, "save: aregs=%d causes unpredictable results\n", aregs);
- }
- if (astatic > 0) {
- do_store (SD_, AccessLength_WORD, temp -= 4, 0, GPR[7]);
- if (astatic > 1) {
- do_store (SD_, AccessLength_WORD, temp -= 4, 0, GPR[6]);
- if (astatic > 2) {
- do_store (SD_, AccessLength_WORD, temp -= 4, 0, GPR[5]);
- if (astatic > 3) {
- do_store (SD_, AccessLength_WORD, temp -= 4, 0, GPR[4]);
- }
- }
- }
- }
-
- GPR[29] -= framesize;
-}
-
-01100,100,1,3.RAS,4.FS:I8:16::SAVE
-"save %s<RAS>,<SFRAME>"
-*mips16e
-{
- do_save (SD_, 0, 0, RAS, SFRAME);
-}
-
-
-11110,3.XSREGS,4.FSHI,4.AREGS + 01100,100,1,3.RAS,4.FSLO:EXT-I8:16::SAVE
-"save %s<RAS>%s<XSREGS>%s<AREGS><BFRAME>"
-*mips16e
-{
- do_save (SD_, XSREGS, AREGS, RAS, BFRAME);
-}
-
-
-:function:::void:do_restore:int xsregs, int aregs, int ras0s1, int framesize
-*mips16e
-{
- unsigned_word temp, temp2;
- int astatic;
-
- temp = GPR[29] + framesize;
- temp2 = temp;
-
- /* reads are in the same order as the hardware description... */
-
- if (ras0s1 & 4)
- GPR[31] = EXTEND32 (do_load(SD_, AccessLength_WORD, temp -= 4, 0));
-
- switch (xsregs) {
- case 7:
- GPR[30] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- case 6:
- GPR[23] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- case 5:
- GPR[22] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- case 4:
- GPR[21] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- case 3:
- GPR[20] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- case 2:
- GPR[19] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- case 1:
- GPR[18] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- }
-
- if (ras0s1 & 1)
- GPR[17] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- if (ras0s1 & 2)
- GPR[16] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
-
- switch (aregs) {
- case 0: case 4: case 8: case 12: case 14:
- astatic = 0;
- break;
- case 1: case 5: case 9: case 13:
- astatic = 1;
- break;
- case 2: case 6: case 10:
- astatic = 2;
- break;
- case 3: case 7:
- astatic = 3;
- break;
- case 11:
- astatic = 4;
- break;
- default:
- sim_engine_abort (SD, CPU, CIA, "save: aregs=%d causes unpredictable results\n", aregs);
- }
- if (astatic > 0) {
- GPR[7] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- if (astatic > 1) {
- GPR[6] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- if (astatic > 2) {
- GPR[5] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- if (astatic > 3) {
- GPR[4] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- }
- }
- }
- }
-
- GPR[29] = temp2;
-}
-
-01100,100,0,3.RAS,4.FS:I8:16::RESTORE
-"restore %s<RAS>,<SFRAME>"
-*mips16e
-{
- do_restore (SD_,0,0,RAS,SFRAME);
-}
-
-11110,3.XSREGS,4.FSHI,4.AREGS + 01100,100,0,3.RAS,4.FSLO:EXT-I8:16::RESTORE
-"restore %s<RAS>%s<XSREGS>%s<AREGS><BFRAME>"
-*mips16e
-{
- do_restore (SD_,XSREGS,AREGS,RAS,BFRAME);
-}
diff --git a/sim/mips/mips.igen b/sim/mips/mips.igen
index 85d08ea..e179cf0 100644
--- a/sim/mips/mips.igen
+++ b/sim/mips/mips.igen
@@ -72,7 +72,6 @@
:model:::mips3d:mips3d: // mips3d.igen
:model:::mdmx:mdmx: // mdmx.igen
:model:::dsp:dsp: // dsp.igen
-:model:::smartmips:smartmips: // smartmips.igen
// Vendor Extensions
//
@@ -2458,7 +2457,6 @@
TRACE_ALU_INPUT2 (GPR[RS], GPR[RT]);
temp = (U8_4 (VL4_8 (HI), VL4_8 (LO))
+ ((unsigned64) VL4_8 (GPR[RS]) * (unsigned64) VL4_8 (GPR[RT])));
- ACX += U8_4 (VL4_8 (HI), VL4_8 (LO)) < temp; /* SmartMIPS */
LO = EXTEND32 (temp);
HI = EXTEND32 (VH4_8 (temp));
TRACE_ALU_RESULT2 (HI, LO);
@@ -2660,7 +2658,6 @@
* ((signed64)(signed32) GPR[rt]));
LO = EXTEND32 (VL4_8 (prod));
HI = EXTEND32 (VH4_8 (prod));
- ACX = 0; /* SmartMIPS */
if (rd != 0)
GPR[rd] = LO;
TRACE_ALU_RESULT2 (HI, LO);
@@ -2853,7 +2850,6 @@
"ror r<RD>, r<RT>, <SHIFT>"
*mips32r2:
*mips64r2:
-*smartmips:
*vr5400:
*vr5500:
{
@@ -2864,7 +2860,6 @@
"rorv r<RD>, r<RT>, r<RS>"
*mips32r2:
*mips64r2:
-*smartmips:
*vr5400:
*vr5500:
{
@@ -5688,5 +5683,4 @@
:include:::tx.igen
:include:::vr.igen
:include:::dsp.igen
-:include:::smartmips.igen
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index b300f07..76e6374 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -348,7 +348,6 @@ struct _sim_cpu {
#define Debug (REGISTERS[86])
#define DEPC (REGISTERS[87])
#define EPC (REGISTERS[88])
-#define ACX (REGISTERS[89])
#define AC0LOIDX (33) /* Must be the same register as LO */
#define AC0HIIDX (34) /* Must be the same register as HI */
diff --git a/sim/mips/smartmips.igen b/sim/mips/smartmips.igen
deleted file mode 100644
index 31d3a4b..0000000
--- a/sim/mips/smartmips.igen
+++ /dev/null
@@ -1,123 +0,0 @@
-// -*- C -*-
-//
-// Simulator definition for the SmartMIPS extensions.
-// Copyright (C) 2005 Free Software Foundation, Inc.
-// Contributed by Nigel Stephens (nigel@mips.com) and
-// David Ung (davidu@mips.com) of MIPS Technologies.
-//
-// This file is part of GDB, the GNU debugger.
-//
-// 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.,
-// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-011100,5.BASE,5.INDEX,5.RD,00010,001000:SPECIAL:32::LWXS
-"lwxs r<RD>, <INDEX>(r<BASE>)"
-*smartmips:
-{
- GPR[RD] = EXTEND32 (do_load(SD_, AccessLength_WORD, GPR[BASE], GPR[INDEX]<<2));
-}
-
-011100,5.RS,5.RT,00000,10001,000001:SPECIAL:32::MADDP
-"maddp r<RS>, r<RT>"
-*smartmips:
-{
- unsigned64 res;
- unsigned64 rs, rt;
- int i;
-
- check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
- TRACE_ALU_INPUT2 (GPR[RS], GPR[RT]);
-
- res = 0;
- rs = GPR[RS];
- rt = GPR[RT];
- for (i = 0; i < 32; i++)
- {
- if (rs & 1)
- res ^= rt;
- rs >>= 1;
- rt <<= 1;
- }
- LO ^= EXTEND32 (VL4_8 (res));
- HI ^= EXTEND32 (VH4_8 (res));
- TRACE_ALU_RESULT2 (HI, LO);
-}
-
-
-000000,0000000000,5.RD,00001,010010:SPECIAL:32::MFLHXU
-"mflhxu r<RD>"
-*smartmips:
-{
- check_mf_hilo (SD_, HIHISTORY, LOHISTORY);
- TRACE_ALU_INPUT3 (ACX,HI,LO);
- GPR[RD] = LO;
- LO = HI;
- HI = ACX;
- ACX = 0;
- TRACE_ALU_RESULT4 (ACX,HI,LO,GPR[RD]);
-}
-
-000000,5.RS,000000000000001,010011:SPECIAL:32::MTLHX
-"mtlhx r<RS>"
-*smartmips:
-{
- check_mf_hilo (SD_, HIHISTORY, LOHISTORY);
- TRACE_ALU_INPUT3 (HI,LO,GPR[RS]);
- ACX = HI;
- HI = LO;
- LO = GPR[RS];
- TRACE_ALU_RESULT4 (ACX,HI,LO,GPR[RS]);
-}
-
-000000,5.RS,5.RT,00000,10001,011001:SPECIAL:32::MULTP
-"multp r<RS>, r<RT>"
-*smartmips:
-{
- unsigned64 res;
- unsigned64 rs, rt;
- int i;
- check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
- TRACE_ALU_INPUT2 (GPR[RS], GPR[RT]);
-
- res = 0;
- rs = GPR[RS];
- rt = GPR[RT];
- for (i = 0; i < 32; i++)
- {
- if (rs & 1)
- res ^= rt;
- rs >>= 1;
- rt <<= 1;
- }
- LO = EXTEND32 (VL4_8 (res));
- HI = EXTEND32 (VH4_8 (res));
- ACX = 0;
- TRACE_ALU_RESULT2 (HI, LO);
-}
-
-011100,5.RS,5.RT,00000,10010,000001:SPECIAL:32::PPERM
-"pperm r<RS>, r<RT>"
-*smartmips:
-{
- int i;
- ACX = (ACX << 6) | MSEXTRACTED(HI,26,31);
- HI = EXTEND32 ((HI << 6) | MSEXTRACTED(LO,26,31));
- LO = EXTEND32 (LO << 6);
- for (i = 0; i < 6; i++) {
- int sbit = 5*i;
- int ebit = sbit + 4;
- int tbit = EXTRACTED(GPR[RT],sbit,ebit);
- LO |= MSEXTRACTED(GPR[RS],tbit,tbit) << i;
- }
-}
diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog
index c7c0acc..061b45d 100644
--- a/sim/testsuite/ChangeLog
+++ b/sim/testsuite/ChangeLog
@@ -1,33 +1,3 @@
-2006-10-02 Hans-Peter Nilsson <hp@axis.com>
- Edgar E. Iglesias <edgar@axis.com>
-
- * sim/cris/c/clone5.c, sim/cris/c/mprotect1.c,
- sim/cris/c/rtsigprocmask1.c, sim/cris/c/rtsigsuspend1.c,
- sim/cris/c/sig7.c, sim/cris/c/sigreturn1.c,
- sim/cris/c/sigreturn2.c, sim/cris/c/syscall1.c,
- sim/cris/c/syscall2.c, sim/cris/c/sysctl2.c, sim/cris/c/fcntl1.c,
- sim/cris/c/readlink2.c: Add code to print ENOSYS if syscall being
- tested returns ENOSYS. Add early exit where needed. Change any
- existing code to print "xyzzy", not "pass".
- * sim/cris/asm/option3.ms, sim/cris/asm/option4.ms,
- sim/cris/c/clone6.c, sim/cris/c/fcntl2.c,
- sim/cris/c/mprotect2.c, sim/cris/c/readlink11.c,
- sim/cris/c/rtsigprocmask2.c, sim/cris/c/rtsigsuspend2.c,
- sim/cris/c/sig13.c, sim/cris/c/sigreturn3.c,
- sim/cris/c/sigreturn4.c, sim/cris/c/syscall3.c,
- sim/cris/c/syscall4.c, sim/cris/c/syscall5.c,
- sim/cris/c/syscall6.c, sim/cris/c/syscall7.c,
- sim/cris/c/syscall8.c, sim/cris/c/sysctl3.c: New tests.
-
-2006-09-30 Hans-Peter Nilsson <hp@axis.com>
-
- * sim/cris/c/pipe2.c: Adjust expected output.
- (process): Don't write as much to the pipe as to trig the
- inordinate-amount test in the sim pipe machinery. Correct test of
- write return-value; check only that pipemax bytes were
- successfully written. For error-case, emit strerror as well.
- (main): Add a second read.
-
2006-04-08 Hans-Peter Nilsson <hp@axis.com>
* sim/cris/hw/rv-n-cris/irq6.ms: New test.
diff --git a/sim/testsuite/sim/cris/asm/option3.ms b/sim/testsuite/sim/cris/asm/option3.ms
deleted file mode 100644
index 75ddb44..0000000
--- a/sim/testsuite/sim/cris/asm/option3.ms
+++ /dev/null
@@ -1,7 +0,0 @@
-#mach: crisv0 crisv3 crisv8 crisv10 crisv32
-#sim: --cris-cycles=foo
-#xerror:
-#output: Unknown option `--cris-cycles=foo'\n
- .include "testutils.inc"
- start
- fail
diff --git a/sim/testsuite/sim/cris/asm/option4.ms b/sim/testsuite/sim/cris/asm/option4.ms
deleted file mode 100644
index e0bc691..0000000
--- a/sim/testsuite/sim/cris/asm/option4.ms
+++ /dev/null
@@ -1,7 +0,0 @@
-#mach: crisv0 crisv3 crisv8 crisv10 crisv32
-#sim: --cris-unknown-syscall=foo
-#xerror:
-#output: Unknown option `--cris-unknown-syscall=foo'\n
- .include "testutils.inc"
- start
- fail
diff --git a/sim/testsuite/sim/cris/c/clone5.c b/sim/testsuite/sim/cris/c/clone5.c
index 3444b56..b642a2f 100644
--- a/sim/testsuite/sim/cris/c/clone5.c
+++ b/sim/testsuite/sim/cris/c/clone5.c
@@ -11,7 +11,6 @@
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <errno.h>
int pip[2];
@@ -27,9 +26,7 @@ main (void)
int retcode;
long stack[16384];
- retcode = clone (process, (char *) stack + sizeof (stack) - 64, 0, "cba");
- if (retcode == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ clone (process, (char *) stack + sizeof (stack) - 64, 0, "cba");
printf ("xyzzy\n");
return 0;
}
diff --git a/sim/testsuite/sim/cris/c/clone6.c b/sim/testsuite/sim/cris/c/clone6.c
deleted file mode 100644
index 586b5c6..0000000
--- a/sim/testsuite/sim/cris/c/clone6.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "clone5.c"
diff --git a/sim/testsuite/sim/cris/c/fcntl1.c b/sim/testsuite/sim/cris/c/fcntl1.c
index 184fd64..e180841 100644
--- a/sim/testsuite/sim/cris/c/fcntl1.c
+++ b/sim/testsuite/sim/cris/c/fcntl1.c
@@ -7,13 +7,10 @@
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
int main (void)
{
- int err = fcntl (1, 42);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
- printf ("xyzzy\n");
+ fcntl (1, 42);
+ printf ("pass\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/fcntl2.c b/sim/testsuite/sim/cris/c/fcntl2.c
deleted file mode 100644
index fc9f95b..0000000
--- a/sim/testsuite/sim/cris/c/fcntl2.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "fcntl1.c"
diff --git a/sim/testsuite/sim/cris/c/mprotect1.c b/sim/testsuite/sim/cris/c/mprotect1.c
index 01d9519..ef249ec 100644
--- a/sim/testsuite/sim/cris/c/mprotect1.c
+++ b/sim/testsuite/sim/cris/c/mprotect1.c
@@ -7,13 +7,10 @@
#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h>
-#include <errno.h>
int main (int argc, char *argv[])
{
- int err = mprotect (0, 8193, PROT_EXEC);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ mprotect (0, 8193, PROT_EXEC);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/mprotect2.c b/sim/testsuite/sim/cris/c/mprotect2.c
deleted file mode 100644
index 4d83945..0000000
--- a/sim/testsuite/sim/cris/c/mprotect2.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "mprotect1.c"
diff --git a/sim/testsuite/sim/cris/c/pipe2.c b/sim/testsuite/sim/cris/c/pipe2.c
index 18ccf38..ccb97f8 100644
--- a/sim/testsuite/sim/cris/c/pipe2.c
+++ b/sim/testsuite/sim/cris/c/pipe2.c
@@ -1,6 +1,6 @@
/* Check that closing a pipe with a nonempty buffer works.
#notarget: cris*-*-elf
-#output: got: a\ngot: b\nexit: 0\n
+#output: got: a\nexit: 0\n
*/
@@ -14,7 +14,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <string.h>
+
int pip[2];
int pipemax;
@@ -23,8 +23,7 @@ int
process (void *arg)
{
char *s = arg;
- int lots = pipemax + 256;
- char *buf = malloc (lots);
+ char *buf = malloc (pipemax * 100);
int ret;
if (buf == NULL)
@@ -38,17 +37,12 @@ process (void *arg)
*buf = s[1];
- /* The second write may or may not be successful for the whole
- write, but should be successful for at least the pipemax part.
- As linux/limits.h clamps PIPE_BUF to 4096, but the page size is
- actually 8k, we can get away with that much. There should be no
- error, though. Doing this on host shows that for
- x86_64-unknown-linux-gnu (2.6.14-1.1656_FC4) pipemax * 10 can be
- successfully written, perhaps for similar reasons. */
- ret = write (pip[1], buf, lots);
- if (ret < pipemax)
+ /* The second write should only successful for at most the PIPE_MAX
+ part, but no error. */
+ ret = write (pip[1], buf, pipemax * 10);
+ if (ret != 0 && ret != pipemax - 1 && ret != pipemax)
{
- fprintf (stderr, "ret: %d, %s, %d\n", ret, strerror (errno), pipemax);
+ fprintf (stderr, "ret: %d\n", ret);
fflush (0);
abort ();
}
@@ -110,19 +104,6 @@ main (void)
printf ("got: %c\n", buf[0]);
- /* Need to read out something from the second write too before
- closing, or the writer can get EPIPE. */
- while ((retcode = read (pip[0], buf, 1)) == 0)
- ;
-
- if (retcode != 1)
- {
- fprintf (stderr, "Bad read 2: %d\n", retcode);
- abort ();
- }
-
- printf ("got: %c\n", buf[0]);
-
if (close (pip[0]) != 0)
{
perror ("pip close");
diff --git a/sim/testsuite/sim/cris/c/readlink11.c b/sim/testsuite/sim/cris/c/readlink11.c
deleted file mode 100644
index 05a332f..0000000
--- a/sim/testsuite/sim/cris/c/readlink11.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As readlink5.c (sic), but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#dest: ./readlink11.c.x
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "readlink2.c"
diff --git a/sim/testsuite/sim/cris/c/readlink2.c b/sim/testsuite/sim/cris/c/readlink2.c
index e5e9d94..5a0d878 100644
--- a/sim/testsuite/sim/cris/c/readlink2.c
+++ b/sim/testsuite/sim/cris/c/readlink2.c
@@ -12,18 +12,11 @@ int main (int argc, char *argv[])
{
char buf[1024];
char buf2[1024];
- int err;
/* This is a special feature handled in the simulator. The "42"
should be formed from getpid () if this was a real program. */
- err = readlink ("/proc/42/exe", buf, sizeof (buf));
- if (err < 0)
- {
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
- printf ("xyzzy\n");
- exit (0);
- }
+ if (readlink ("/proc/42/exe", buf, sizeof (buf)) < 0)
+ abort ();
/* Don't use an abort in the following; it might cause the printf to
not make it all the way to output and make debugging more
diff --git a/sim/testsuite/sim/cris/c/rtsigprocmask1.c b/sim/testsuite/sim/cris/c/rtsigprocmask1.c
index 7cc7c5c..0eee768 100644
--- a/sim/testsuite/sim/cris/c/rtsigprocmask1.c
+++ b/sim/testsuite/sim/cris/c/rtsigprocmask1.c
@@ -13,7 +13,6 @@
#include <unistd.h>
#include <signal.h>
#include <pthread.h>
-#include <errno.h>
static void *
process (void *arg)
@@ -39,13 +38,8 @@ main (void)
abort ();
/* An invalid parameter 1 should cause this to halt the simulator. */
- retcode
- = pthread_sigmask (SIG_BLOCK + SIG_UNBLOCK + SIG_SETMASK, NULL, &sigs);
- /* Direct return of the error number; i.e. not using -1 and errno,
- is the actual documented behavior. */
- if (retcode == ENOSYS)
- printf ("ENOSYS\n");
-
+ pthread_sigmask (SIG_BLOCK + SIG_UNBLOCK + SIG_SETMASK,
+ NULL, &sigs);
printf ("xyzzy\n");
return 0;
}
diff --git a/sim/testsuite/sim/cris/c/rtsigprocmask2.c b/sim/testsuite/sim/cris/c/rtsigprocmask2.c
deleted file mode 100644
index 5026908..0000000
--- a/sim/testsuite/sim/cris/c/rtsigprocmask2.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#cc: additional_flags=-pthread
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "rtsigprocmask1.c"
diff --git a/sim/testsuite/sim/cris/c/rtsigsuspend1.c b/sim/testsuite/sim/cris/c/rtsigsuspend1.c
index 0e00cc1..4a5ee3f 100644
--- a/sim/testsuite/sim/cris/c/rtsigsuspend1.c
+++ b/sim/testsuite/sim/cris/c/rtsigsuspend1.c
@@ -9,13 +9,10 @@
#include <sys/syscall.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
int main (void)
{
- int err = syscall (SYS_rt_sigsuspend, 1, 2);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ syscall (SYS_rt_sigsuspend, 1, 2);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/rtsigsuspend2.c b/sim/testsuite/sim/cris/c/rtsigsuspend2.c
deleted file mode 100644
index 9ce165d..0000000
--- a/sim/testsuite/sim/cris/c/rtsigsuspend2.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "rtsigsuspend1.c"
diff --git a/sim/testsuite/sim/cris/c/sig13.c b/sim/testsuite/sim/cris/c/sig13.c
deleted file mode 100644
index 4d71752..0000000
--- a/sim/testsuite/sim/cris/c/sig13.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "sig7.c"
diff --git a/sim/testsuite/sim/cris/c/sig7.c b/sim/testsuite/sim/cris/c/sig7.c
index 0991ff0..2e70a43 100644
--- a/sim/testsuite/sim/cris/c/sig7.c
+++ b/sim/testsuite/sim/cris/c/sig7.c
@@ -7,20 +7,17 @@
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
-#include <errno.h>
int
main (void)
{
struct sigaction sa;
- int err;
sa.sa_sigaction = NULL;
sa.sa_flags = SA_RESTART | SA_SIGINFO;
sigemptyset (&sa.sa_mask);
- err = sigaction (SIGFPE, &sa, NULL);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ if (sigaction (SIGFPE, &sa, NULL) != 0)
+ abort ();
printf ("xyzzy\n");
exit (0);
diff --git a/sim/testsuite/sim/cris/c/sigreturn1.c b/sim/testsuite/sim/cris/c/sigreturn1.c
index 09989f5..ddb0d02 100644
--- a/sim/testsuite/sim/cris/c/sigreturn1.c
+++ b/sim/testsuite/sim/cris/c/sigreturn1.c
@@ -9,13 +9,10 @@
#include <sys/syscall.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
int main (void)
{
- int err = syscall (SYS_sigreturn, 1, 2, 3, 4, 5, 6);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ syscall (SYS_sigreturn, 1, 2, 3, 4, 5, 6);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/sigreturn2.c b/sim/testsuite/sim/cris/c/sigreturn2.c
index d0305cb..f0157f0 100644
--- a/sim/testsuite/sim/cris/c/sigreturn2.c
+++ b/sim/testsuite/sim/cris/c/sigreturn2.c
@@ -14,7 +14,6 @@
#include <sys/types.h>
#include <sys/syscall.h>
#include <signal.h>
-#include <errno.h>
static void *
process (void *arg)
@@ -28,11 +27,7 @@ int main (void)
{
pthread_t th_a;
if (pthread_create (&th_a, NULL, process, (void *) "a") == 0)
- {
- int err = syscall (SYS_sigreturn, 1, 2, 3, 4, 5, 6);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
- }
+ syscall (SYS_sigreturn, 1, 2, 3, 4, 5, 6);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/sigreturn3.c b/sim/testsuite/sim/cris/c/sigreturn3.c
deleted file mode 100644
index f5ed90f..0000000
--- a/sim/testsuite/sim/cris/c/sigreturn3.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "sigreturn1.c"
diff --git a/sim/testsuite/sim/cris/c/sigreturn4.c b/sim/testsuite/sim/cris/c/sigreturn4.c
deleted file mode 100644
index 456e312..0000000
--- a/sim/testsuite/sim/cris/c/sigreturn4.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#cc: additional_flags=-pthread
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "sigreturn2.c"
diff --git a/sim/testsuite/sim/cris/c/syscall1.c b/sim/testsuite/sim/cris/c/syscall1.c
index 150f297..5b8cfda 100644
--- a/sim/testsuite/sim/cris/c/syscall1.c
+++ b/sim/testsuite/sim/cris/c/syscall1.c
@@ -8,15 +8,12 @@
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
int main (void)
{
/* The number 166 is chosen because there's a gap for that number in
the CRIS asm/unistd.h. */
- int err = syscall (166, 1, 2, 3, 4, 5, 6);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ syscall (166, 1, 2, 3, 4, 5, 6);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/syscall2.c b/sim/testsuite/sim/cris/c/syscall2.c
index 43462ec..4497588 100644
--- a/sim/testsuite/sim/cris/c/syscall2.c
+++ b/sim/testsuite/sim/cris/c/syscall2.c
@@ -8,16 +8,11 @@
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
int main (void)
{
- int err;
-
/* Check special case of number 0 syscall. */
- err = syscall (0, 3, 2, 1, 4, 6, 5);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ syscall (0, 3, 2, 1, 4, 6, 5);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/syscall3.c b/sim/testsuite/sim/cris/c/syscall3.c
deleted file mode 100644
index 9ba9635..0000000
--- a/sim/testsuite/sim/cris/c/syscall3.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As the included file, just actually specifying the default.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=stop
-#xerror:
-#output: Unimplemented syscall: 166 (0x1, 0x2, 0x3, 0x4, 0x5, 0x6)\n
-#output: program stopped with signal 4.\n
-*/
-
-#include "syscall1.c"
diff --git a/sim/testsuite/sim/cris/c/syscall4.c b/sim/testsuite/sim/cris/c/syscall4.c
deleted file mode 100644
index 757099f..0000000
--- a/sim/testsuite/sim/cris/c/syscall4.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As the included file, just actually specifying the default.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=stop
-#xerror:
-#output: Unimplemented syscall: 0 (0x3, 0x2, 0x1, 0x4, 0x6, 0x5)\n
-#output: program stopped with signal 4.\n
-*/
-
-#include "syscall2.c"
diff --git a/sim/testsuite/sim/cris/c/syscall5.c b/sim/testsuite/sim/cris/c/syscall5.c
deleted file mode 100644
index 2eac900..0000000
--- a/sim/testsuite/sim/cris/c/syscall5.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As the included file, but specifying ENOSYS with message.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys
-#output: Unimplemented syscall: 166 (0x1, 0x2, 0x3, 0x4, 0x5, 0x6)\n
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "syscall1.c"
diff --git a/sim/testsuite/sim/cris/c/syscall6.c b/sim/testsuite/sim/cris/c/syscall6.c
deleted file mode 100644
index 91375df..0000000
--- a/sim/testsuite/sim/cris/c/syscall6.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As the included file, but specifying ENOSYS with message.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys
-#output: Unimplemented syscall: 0 (0x3, 0x2, 0x1, 0x4, 0x6, 0x5)\n
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "syscall2.c"
diff --git a/sim/testsuite/sim/cris/c/syscall7.c b/sim/testsuite/sim/cris/c/syscall7.c
deleted file mode 100644
index 0f1daf1..0000000
--- a/sim/testsuite/sim/cris/c/syscall7.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "syscall1.c"
diff --git a/sim/testsuite/sim/cris/c/syscall8.c b/sim/testsuite/sim/cris/c/syscall8.c
deleted file mode 100644
index c579436..0000000
--- a/sim/testsuite/sim/cris/c/syscall8.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "syscall2.c"
diff --git a/sim/testsuite/sim/cris/c/sysctl2.c b/sim/testsuite/sim/cris/c/sysctl2.c
index b6752a8..482e546 100644
--- a/sim/testsuite/sim/cris/c/sysctl2.c
+++ b/sim/testsuite/sim/cris/c/sysctl2.c
@@ -10,7 +10,6 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
int main (void)
{
@@ -33,9 +32,7 @@ int main (void)
(void *) -1, &x, NULL, 0
};
- int err = syscall (SYS__sysctl, &scargs);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ syscall (SYS__sysctl, &scargs);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/sysctl3.c b/sim/testsuite/sim/cris/c/sysctl3.c
deleted file mode 100644
index 747e784..0000000
--- a/sim/testsuite/sim/cris/c/sysctl3.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "sysctl2.c"
diff --git a/sim/testsuite/sim/mips/ChangeLog b/sim/testsuite/sim/mips/ChangeLog
index b6ff359..9c7b789 100644
--- a/sim/testsuite/sim/mips/ChangeLog
+++ b/sim/testsuite/sim/mips/ChangeLog
@@ -1,13 +1,3 @@
-2006-11-08 Thiemo Seufer <ths@mips.com>
-
- * basic.exp: Fix spelling in comment. Use canonical form of target
- patterns. Run DSP test only for DSP-capable ISAs. Check also mips32r2
- and mips64r2 if supported by the target.
-
-2006-08-08 Chris Dearman <chris@mips.com>
-
- * testutils.inc (setup): __start is also a valid start symbol.
-
2006-05-15 Chao-ying Fu <fu@mips.com>
* mips32-dsp.s: Add some tests for shra_r.ph, shrav_r.ph, shra_r.w,
diff --git a/sim/testsuite/sim/mips/basic.exp b/sim/testsuite/sim/mips/basic.exp
index 00f77c2..98795ab 100644
--- a/sim/testsuite/sim/mips/basic.exp
+++ b/sim/testsuite/sim/mips/basic.exp
@@ -1,6 +1,6 @@
# MIPS simulator instruction tests
-# As gross as it is, we unset the linker script specified by the target
+# As gross as it is, we unset the linker script specifid by the target
# board. The MIPS libgloss linker scripts include libgcc (and possibly
# other libraries), which the linker (used to link these tests rather
# than the compiler) can't necessarily find.
@@ -32,27 +32,23 @@ proc run_hilo_test {testfile models nops} {
}
-# Only test mips*-*-elf (e.g., no mips*-*-linux), and only test if the target
+# Only test mips*-elf (e.g., no mips-linux), and only test if the target
# board really is a simulator (sim tests don't work on real HW).
-if {[istarget mips*-*-elf] && [board_info target exists is_simulator]} {
+if {[istarget mips*-elf] && [board_info target exists is_simulator]} {
- set dspmodels ""
-
- if {[istarget mipsisa64sb1*-*-elf]} {
+ if {[istarget mipsisa64sb1*-elf]} {
set models "sb1"
set submodels "mips1 mips2 mips3 mips4 mips32 mips64"
- } elseif {[istarget mipsisa64*-*-elf]} {
- set models "mips32 mips64 mips32r2 mips64r2"
+ } elseif {[istarget mipsisa64*-elf]} {
+ set models "mips32 mips64"
set submodels "mips1 mips2 mips3 mips4"
- append dspmodels " mips32r2 mips64r2"
- } elseif {[istarget mipsisa32*-*-elf]} {
- set models "mips32 mips32r2"
+ } elseif {[istarget mipsisa32*-elf]} {
+ set models "mips32"
set submodels "mips1 mips2"
- append dspmodels " mips32r2"
- } elseif {[istarget mips64vr*-*-elf]} {
+ } elseif {[istarget mips64vr-*-elf] || [istarget mips64vrel-*-elf]} {
set models "vr4100 vr4111 vr4120 vr5000 vr5400 vr5500"
set submodels "mips1 mips2 mips3 mips4"
- } elseif {[istarget mips64*-*-elf]} {
+ } elseif {[istarget mips64*-elf]} {
set models "mips3"
set submodels "mips1 mips2"
} else {
@@ -76,5 +72,5 @@ if {[istarget mips*-*-elf] && [board_info target exists is_simulator]} {
run_sim_test mdmx-ob.s $submodels
run_sim_test mdmx-ob-sb1.s $submodels
- run_sim_test mips32-dsp.s $dspmodels
+ run_sim_test mips32-dsp.s $models
}
diff --git a/sim/testsuite/sim/mips/testutils.inc b/sim/testsuite/sim/mips/testutils.inc
index 1d4b732..f111f79 100644
--- a/sim/testsuite/sim/mips/testutils.inc
+++ b/sim/testsuite/sim/mips/testutils.inc
@@ -47,10 +47,8 @@
.macro setup
.global _start
- .global __start
.ent _start
_start:
-__start:
.set push
.set noreorder
j DIAG