]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Merge with mainline; tag is carlton_dictionary-20020927-merge
authorDavid Carlton <carlton@bactrian.org>
Fri, 27 Sep 2002 20:03:29 +0000 (20:03 +0000)
committerDavid Carlton <carlton@bactrian.org>
Fri, 27 Sep 2002 20:03:29 +0000 (20:03 +0000)
80 files changed:
ChangeLog
Makefile.in
bfd/ChangeLog
bfd/Makefile.am
bfd/Makefile.in
bfd/bfd-in2.h
bfd/config.bfd
bfd/configure
bfd/dwarf2.c
bfd/elf-eh-frame.c
bfd/elf32-i386.c
bfd/elf32-ppc.c
bfd/elf32-sparc.c
bfd/elf64-alpha.c
bfd/elf64-ppc.c
bfd/elf64-sparc.c
bfd/elf64-x86-64.c
bfd/elfcode.h
bfd/elflink.h
bfd/elfxx-mips.c
bfd/libbfd.h
bfd/po/SRC-POTFILES.in
bfd/reloc.c
bfd/version.h
configure
configure.in
gdb/ChangeLog
gdb/MAINTAINERS
gdb/Makefile.in
gdb/NEWS
gdb/breakpoint.c
gdb/builtin-regs.c
gdb/builtin-regs.h
gdb/cli/cli-cmds.c
gdb/complaints.c
gdb/config/djgpp/fnchange.lst
gdb/doc/ChangeLog
gdb/doc/all-cfg.texi
gdb/doc/gdb.texinfo
gdb/eval.c
gdb/expprint.c
gdb/frame.c
gdb/frame.h
gdb/infcmd.c
gdb/linespec.c
gdb/main.c
gdb/mi/ChangeLog
gdb/mi/gdbmi.texinfo
gdb/mi/mi-cmd-disas.c
gdb/mips-tdep.c
gdb/parse.c
gdb/parser-defs.h
gdb/rs6000-tdep.c
gdb/scm-lang.c
gdb/source.c
gdb/source.h
gdb/stack.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.gdb/complaints.exp
gdb/testsuite/gdb.mi/ChangeLog
gdb/testsuite/gdb.mi/configure
gdb/testsuite/gdb.mi/configure.in
gdb/testsuite/lib/insight-support.exp
gdb/top.c
gdb/v850-tdep.c
gdb/varobj.c
gdb/version.in
include/ChangeLog
include/elf/x86-64.h
include/regs/ChangeLog [deleted file]
libiberty/ChangeLog
libiberty/Makefile.in
opcodes/ChangeLog
opcodes/Makefile.am
opcodes/Makefile.in
opcodes/mips-dis.c
opcodes/po/POTFILES.in
opcodes/po/de.po
sim/v850/ChangeLog
sim/v850/simops.c

index d7043ca7a2112e760523c5a02dc340487fe19e8d..a970f0e5e19a8651dd57e3c825f8f37d754a63e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,42 @@
+2002-09-25  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+       * Makefile.tpl: Make subsituted variables more autoconfy.
+       * Makefile.in: Regenerate.
+       * configure: Make seds more autoconfy.
+
+2002-09-25  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+       * Makefile.tpl: Rewrite substituted lines to look autoconfy.
+       * Makefile.in: Regenerate.
+       * configure.in: Rewrite sed statements to look autoconfy.
+
+       * Makefile.tpl: Autogenerate *-target-* lists, dependencies of
+       all-target-foo on configure-target-foo.
+       * Makefile.def: Ditto.
+       * Makefile.in: Rebuild.
+
+2002-09-22  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+       * Makefile.def: New file.
+       * Makefile.tpl: New file.
+       * Makefile.in: Generate from Makefile.tpl with 'autogen Makefile.def'.
+
+       * configure.in: Minor rearrangement.  Simplify tests.
+
+2002-09-23  Jason Thorpe  <thorpej@wasabisystems.com>
+
+       * configure.in (with_headers): Skip copy if value is "yes".
+       (with_libs): Likewise.
+
+2002-09-20  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+       * configure.in (*-*-netbsd*): Use noconfigdirs, not skipdirs.
+       * configure.in (sh*-*-pe*): Ditto.
+       * configure.in (mips*-*-pe*): Ditto.
+       * configure.in (*arm-wince-pe): Ditto.
+
+       * configure.in: Rearrange.
+
 2002-09-12  Nick Clifton  <nickc@redhat.com>
 
        * Import these changes from the config master repository:
index c37a5052d5af1b7dca286e7e3dfd8f1f20256a5b..d90547df9106d60f7212353e07e5961b76cba241 100644 (file)
@@ -1,3 +1,5 @@
+
+# Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
 #
 # Makefile for directory with subdirs to build.
 #   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
 NOTPARALLEL = .NOTPARALLEL
 $(NOTPARALLEL):
 
-srcdir = .
+srcdir = @srcdir@
 
-prefix = /usr/local
-exec_prefix = $(prefix)
+prefix = @prefix@
+exec_prefix = @exec_prefix@
 
-bindir=${exec_prefix}/bin
-sbindir=${exec_prefix}/sbin
-libexecdir=${exec_prefix}/libexec
-datadir=${prefix}/share
-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
-gxx_include_dir=${includedir}/g++
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+includedir = @includedir@
+oldincludedir = @oldincludedir@
+infodir = @infodir@
+mandir = @mandir@
+gxx_include_dir=@gxx_include_dir@
 
-tooldir = $(exec_prefix)/$(target_alias)
-build_tooldir = $(exec_prefix)/$(target_alias)
+tooldir = @tooldir@
+build_tooldir = @build_tooldir@
 
-program_transform_name =
+program_transform_name = @program_transform_name@
 
 man1dir = $(mandir)/man1
 man2dir = $(mandir)/man2
@@ -57,13 +59,11 @@ man6dir = $(mandir)/man6
 man7dir = $(mandir)/man7
 man8dir = $(mandir)/man8
 man9dir = $(mandir)/man9
-infodir = $(prefix)/info
-includedir = $(prefix)/include
 # Directory in which the compiler finds executables, libraries, etc.
 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
 GDB_NLM_DEPS = 
 
-SHELL = /bin/sh
+SHELL = @config_shell@
 
 # pwd command to use.  Allow user to override default by setting PWDCMD in
 # the environment to account for automounters.  The make variable must not
@@ -128,9 +128,9 @@ BZIPPROG = bzip2
 MD5PROG = md5sum
 
 # These values are substituted by configure.
-DEFAULT_YACC = yacc
-DEFAULT_LEX = lex
-DEFAULT_M4 = m4
+DEFAULT_YACC = @DEFAULT_YACC@
+DEFAULT_LEX = @DEFAULT_LEX@
+DEFAULT_M4 = @DEFAULT_M4@
 
 BISON = `if [ -f $$r/bison/bison ] ; then \
            echo $$r/bison/bison -L $$s/bison/ ; \
@@ -186,22 +186,22 @@ OTHERS =
 
 # This is set by the configure script to the list of directories which
 # should be built using the target tools.
-TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib winsup opcodes libf2c libobjc
+TARGET_CONFIGDIRS = @target_configdirs@
 
 # Target libraries are put under this directory:
 # Changed by configure to $(target_alias) if cross.
-TARGET_SUBDIR = .
+TARGET_SUBDIR = @target_subdir@
 
 BUILD_CONFIGDIRS = libiberty
-BUILD_SUBDIR = .
+BUILD_SUBDIR = @build_subdir@
 
 # This is set by the configure script to the arguments to use when configuring
 # directories built for the target.
-TARGET_CONFIGARGS = 
+TARGET_CONFIGARGS = @target_configargs@
 
 # This is set by the configure script to the arguments to use when configuring
 # directories built for the build system.
-BUILD_CONFIGARGS =
+BUILD_CONFIGARGS = @build_configargs@
 
 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
 # was used.
@@ -241,11 +241,11 @@ INSTALL_TARGET_CROSS = installdirs \
        $(INSTALL_DOSREL)
 
 # Should be substed by configure.in
-FLAGS_FOR_TARGET =
-CC_FOR_TARGET =
-CXX_FOR_TARGET =
-CXX_FOR_TARGET_FOR_RECURSIVE_MAKE =
-GCJ_FOR_TARGET =
+FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
+CC_FOR_TARGET = @CC_FOR_TARGET@
+CXX_FOR_TARGET = @CXX_FOR_TARGET@
+CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
+GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
 
 # If GCC_FOR_TARGET is not overriden on the command line, then this
 # variable is passed down to the gcc Makefile, where it is used to
@@ -514,7 +514,7 @@ GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
 # macro for build!=host builds.
 ALL_BUILD_MODULES_LIST = \
        all-build-libiberty
-ALL_BUILD_MODULES = 
+ALL_BUILD_MODULES = @all_build_modules@
 
 # This is a list of the configure targets for all of the modules which
 # are compiled using the native tools.
@@ -529,6 +529,7 @@ ALL_MODULES = \
        all-automake \
        all-bash \
        all-bfd \
+       all-opcodes \
        all-binutils \
        all-bison \
        all-byacc \
@@ -553,6 +554,7 @@ ALL_MODULES = \
        all-hello \
        all-indent \
        all-intl \
+       all-tcl \
        all-itcl \
        all-ld \
        all-libgui \
@@ -561,7 +563,6 @@ ALL_MODULES = \
        all-m4 \
        all-make \
        all-mmalloc \
-       all-opcodes \
        all-patch \
        all-perl \
        all-prms \
@@ -576,7 +577,6 @@ ALL_MODULES = \
        all-sim \
        all-snavigator \
        all-tar \
-       all-tcl \
        all-texinfo \
        all-textutils \
        all-time \
@@ -605,6 +605,7 @@ CROSS_CHECK_MODULES = \
        check-automake \
        check-bash \
        check-bfd \
+       check-opcodes \
        check-binutils \
        check-bzip2 \
        check-db \
@@ -624,6 +625,7 @@ CROSS_CHECK_MODULES = \
        check-hello \
        check-indent \
        check-intl \
+       check-tcl \
        check-itcl \
        check-ld \
        check-libgui \
@@ -631,8 +633,6 @@ CROSS_CHECK_MODULES = \
        check-libtool \
        check-m4 \
        check-make \
-       check-mmcheckoc \
-       check-opcodes \
        check-patch \
        check-perl \
        check-prms \
@@ -642,11 +642,10 @@ CROSS_CHECK_MODULES = \
        check-sed \
        check-send-pr \
        check-shellutils \
-       check-snavigator \
        check-sid \
        check-sim \
+       check-snavigator \
        check-tar \
-       check-tcl \
        check-texinfo \
        check-textutils \
        check-time \
@@ -669,11 +668,11 @@ INSTALL_MODULES = \
        install-automake \
        install-bash \
        install-bfd \
-       install-bzip2 \
        install-opcodes \
        install-binutils \
        install-bison \
        install-byacc \
+       install-bzip2 \
        install-db \
        install-dejagnu \
        install-diff \
@@ -770,7 +769,7 @@ ALL_TARGET_MODULES = \
        all-target-libjava \
        all-target-zlib \
        all-target-boehm-gc \
-       all-target-qthreads
+       all-target-qthreads 
 
 # This is a list of the configure targets for all of the modules which
 # are compiled using the target tools.
@@ -789,7 +788,7 @@ CONFIGURE_TARGET_MODULES = \
        configure-target-libjava \
        configure-target-zlib \
        configure-target-boehm-gc \
-       configure-target-qthreads
+       configure-target-qthreads 
 
 # This is a list of the check targets for all of the modules which are
 # compiled using $(TARGET_FLAGS_TO_PASS).
@@ -800,12 +799,12 @@ CHECK_TARGET_MODULES = \
        check-target-libobjc \
        check-target-winsup \
        check-target-libiberty \
+       check-target-gperf \
        check-target-libffi \
        check-target-libjava \
        check-target-zlib \
        check-target-boehm-gc \
-       check-target-qthreads \
-       check-target-gperf
+       check-target-qthreads 
 
 # This is a list of the install targets for all of the modules which are
 # compiled using $(TARGET_FLAGS_TO_PASS).
@@ -818,11 +817,11 @@ INSTALL_TARGET_MODULES = \
        install-target-winsup \
        install-target-libgloss \
        install-target-libiberty \
+       install-target-gperf \
        install-target-libjava \
        install-target-zlib \
        install-target-boehm-gc \
-       install-target-qthreads \
-       install-target-gperf
+       install-target-qthreads 
 
 # This is a list of the targets for which we can do a clean-{target}.
 CLEAN_MODULES = \
@@ -831,6 +830,7 @@ CLEAN_MODULES = \
        clean-automake \
        clean-bash \
        clean-bfd \
+       clean-opcodes \
        clean-binutils \
        clean-bison \
        clean-byacc \
@@ -855,6 +855,7 @@ CLEAN_MODULES = \
        clean-hello \
        clean-indent \
        clean-intl \
+       clean-tcl \
        clean-itcl \
        clean-ld \
        clean-libgui \
@@ -863,7 +864,6 @@ CLEAN_MODULES = \
        clean-m4 \
        clean-make \
        clean-mmalloc \
-       clean-opcodes \
        clean-patch \
        clean-perl \
        clean-prms \
@@ -878,14 +878,13 @@ CLEAN_MODULES = \
        clean-sim \
        clean-snavigator \
        clean-tar \
-       clean-tcl \
        clean-texinfo \
        clean-textutils \
        clean-time \
        clean-uudecode \
        clean-wdiff \
        clean-zip \
-       clean-zlib
+       clean-zlib 
 
 # All of the target modules that can be cleaned
 CLEAN_TARGET_MODULES = \
@@ -902,7 +901,7 @@ CLEAN_TARGET_MODULES = \
        clean-target-libjava \
        clean-target-zlib \
        clean-target-boehm-gc \
-       clean-target-qthreads
+       clean-target-qthreads 
 
 # All of the x11 modules that can be cleaned
 CLEAN_X11_MODULES = \
@@ -1658,7 +1657,6 @@ all-bfd: all-libiberty all-intl
 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
 all-bison: all-texinfo
 configure-target-boehm-gc: $(ALL_GCC_C) configure-target-qthreads
-all-target-boehm-gc: configure-target-boehm-gc
 all-byacc:
 all-bzip2:
 all-db:
@@ -1666,7 +1664,6 @@ all-dejagnu: all-tcl all-expect all-tk
 all-diff: all-libiberty
 all-etc:
 configure-target-examples: $(ALL_GCC_C)
-all-target-examples: configure-target-examples
 all-expect: all-tcl all-tk
 all-fileutils: all-libiberty
 all-findutils:
@@ -1676,12 +1673,12 @@ all-gas: all-libiberty all-opcodes all-bfd all-intl
 all-gawk:
 all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib
 all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib
-GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
+GDB_TK = @GDB_TK@
 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
 all-gettext:
 all-gnuserv:
 configure-target-gperf: $(ALL_GCC_CXX)
-all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++-v3
+all-target-gperf: all-target-libiberty all-target-libstdc++-v3
 all-gprof: all-libiberty all-bfd all-opcodes all-intl
 all-grep: all-libiberty
 all-gui: all-gdb all-libproc
@@ -1693,36 +1690,32 @@ all-intl:
 all-itcl: all-tcl all-tk
 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
 configure-target-libgloss: $(ALL_GCC)
-all-target-libgloss: configure-target-libgloss configure-target-newlib
+all-target-libgloss: configure-target-newlib
 all-libgui: all-tcl all-tk all-itcl
 all-libiberty:
 
 all-build-libiberty: configure-build-libiberty
 
 configure-target-libffi: $(ALL_GCC_C) 
-all-target-libffi: configure-target-libffi
 configure-target-libjava: $(ALL_GCC_C) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
-all-target-libjava: configure-target-libjava all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
+all-target-libjava: all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
 configure-target-libstdc++-v3: $(ALL_GCC_C)
-all-target-libstdc++-v3: configure-target-libstdc++-v3 all-target-libiberty
+all-target-libstdc++-v3: all-target-libiberty
 all-libtool:
 configure-target-libf2c: $(ALL_GCC_C)
-all-target-libf2c: configure-target-libf2c all-target-libiberty
+all-target-libf2c: all-target-libiberty
 configure-target-libobjc: $(ALL_GCC_C)
-all-target-libobjc: configure-target-libobjc all-target-libiberty
+all-target-libobjc: all-target-libiberty
 all-m4: all-libiberty all-texinfo
 all-make: all-libiberty
 all-mmalloc:
 configure-target-newlib: $(ALL_GCC)
-all-target-newlib: configure-target-newlib
 configure-target-libtermcap: $(ALL_GCC_C)
-all-target-libtermcap: configure-target-libtermcap
 all-opcodes: all-bfd all-libiberty
 all-patch: all-libiberty
 all-perl:
 all-prms: all-libiberty
 configure-target-qthreads: $(ALL_GCC_C)
-all-target-qthreads: configure-target-qthreads
 all-rcs:
 all-readline:
 all-recode: all-libiberty
@@ -1742,21 +1735,38 @@ all-time:
 all-tix: all-tcl all-tk
 all-wdiff:
 configure-target-winsup: $(ALL_GCC_C)
-all-target-winsup: all-target-libiberty all-target-libtermcap configure-target-winsup
+all-target-winsup: all-target-libiberty all-target-libtermcap
 all-uudecode: all-libiberty
 all-zip:
 all-zlib:
 configure-target-zlib: $(ALL_GCC_C)
-all-target-zlib: configure-target-zlib
 all-fastjar: all-zlib all-libiberty
 configure-target-fastjar: configure-target-zlib
 all-target-fastjar: configure-target-fastjar all-target-zlib all-target-libiberty
 configure-target-libiberty: $(ALL_GCC_C)
-all-target-libiberty: configure-target-libiberty
 all-target: $(ALL_TARGET_MODULES)
 install-target: $(INSTALL_TARGET_MODULES)
 install-gdb: install-tcl install-tk install-itcl install-tix install-libgui
 install-sid: install-tcl install-tk
+
+# Dependencies of all-target-foo on configure-target-foo.
+all-target-libstdc++-v3: configure-target-libstdc++-v3
+all-target-newlib: configure-target-newlib
+all-target-libf2c: configure-target-libf2c
+all-target-libobjc: configure-target-libobjc
+all-target-libtermcap: configure-target-libtermcap
+all-target-winsup: configure-target-winsup
+all-target-libgloss: configure-target-libgloss
+all-target-libiberty: configure-target-libiberty
+all-target-gperf: configure-target-gperf
+all-target-examples: configure-target-examples
+all-target-libffi: configure-target-libffi
+all-target-libjava: configure-target-libjava
+all-target-zlib: configure-target-zlib
+all-target-boehm-gc: configure-target-boehm-gc
+all-target-qthreads: configure-target-qthreads
+
+
 ### other supporting targets
 
 MAKEDIRS= \
@@ -1787,6 +1797,10 @@ etags tags: TAGS
 # built are.
 TAGS: do-TAGS
 
+# Rebuilding Makefile.in, using autogen.
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
+       cd $(srcdir) && autogen Makefile.def
+
 # with the gnu make, this is done automatically.
 
 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
index 1bb5aa5991a7d5383eb9093e9c4777cb338b520d..27bff18c33909b3a401ab3b5b1d61097b07127cd 100644 (file)
@@ -1,3 +1,90 @@
+2002-09-27  Jakub Jelinek  <jakub@redhat.com>
+
+       * reloc.c: Add x86-64 TLS relocs.
+       * bfd-in2.h, libbfd.h: Rebuilt.
+       * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
+       relocs.  Add TLS relocs.
+       (x86_64_reloc_map): Add TLS relocs.
+       (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
+       (struct elf64_x86_64_link_hash_entry): Add tls_type field.
+       (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
+       (elf64_x86_64_hash_entry): Define.
+       (struct elf64_x86_64_obj_tdata): New.
+       (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
+       (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
+       (link_hash_newfunc): Initialize tls_type.
+       (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
+       (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
+       (elf64_x86_64_mkobject): New.
+       (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
+       (elf64_x86_64_tls_transition): New.
+       (elf64_x86_64_check_relocs): Add r_type variable and use it.
+       Handle TLS relocs.
+       (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
+       (allocate_dynrelocs): Allocate GOT space for TLS relocs.
+       (elf64_x86_64_size_dynamic_sections): Likewise.
+       (dtpoff_base, tpoff): New.
+       (elf64_x86_64_relocate_section): Handle TLS relocs.
+       (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
+       entries.
+       (bfd_elf64_mkobject): Define.
+
+       * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
+       DF_STATIC_TLS if shared.
+
+2002-09-26  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+       * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
+       empty relocation sections.
+
+2002-09-26  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
+       (ppc64_elf_build_stubs): Build them here instead.
+
+2002-09-24  Jakub Jelinek  <jakub@redhat.com>
+
+       * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
+       addend into r_addend, not *r_offset.
+       (elf32_sparc_finish_dynamic_symbol): Likewise.
+       * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
+       R_SPARC_RELATIVE's r_offset.
+
+2002-09-23  Nathan Tallent  <eraxxon@alumni.rice.edu>
+
+       * dwarf2.c (decode_line_info): Update to correctly decode
+       the (non-standard DWARF2) out-of-order address sequences
+       generated by the Intel C++ 6.0 compiler for ia64-Linux.
+
+2002-09-23  Mark Elbrecht  <snowball3@softhome.net>
+
+       * config.bfd: For DJGPP targets, match with any cpu and any machine.
+
+2002-09-23  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
+       for discarded FDEs.  Remove redundant assignment.
+       * elflink.h (elf_bfd_discard_info): Save edited relocs.
+
+2002-09-22  H.J. Lu <hjl@gnu.org>
+
+       * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
+       the relocation count between different .reloc sections.
+
+2002-09-21  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
+       ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
+       R_PPC_EMB_SDA2REL.  Similarly for R_PPC_EMB_SDA21 and
+       R_PPC_EMB_RELSDA.
+
+       * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
+       unsigned.  Move "symcount" assignment out of loop.
+       * Makefile.am: Run "make dep-am".
+       * Makefile.in: Regenerate.
+       * configure: Regenerate.
+       * po/SRC-POTFILES.in: Regnerate.
+
 2002-09-19  Nathan Tallent  <eraxxon@alumni.rice.edu>
 
        * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
        * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
        R_ARM_THM_PC11.
 
+2002-09-11  Jeffrey Law  <law@redhat.com>
+
+       * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
+
 2002-09-11  Andrew Haley  <aph@cambridge.redhat.com>
 
        * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
        * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
        relocs in opd for non-shared too.
 
-2002-06-06  Jeffrey Law <law@redhat.com
+2002-06-06  Jeffrey Law  <law@redhat.com>
 
        * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
        relocations.
index cb570746d7bbfab4580dc731c59db18bfd9abfd8..0aa98e3b87f81924084017bb576a7cecdd0dcfab 100644 (file)
@@ -1168,10 +1168,10 @@ elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
-elf32-i386-fbsd.lo: elf32-i386-fbsd.c elf32-i386.c $(INCDIR)/filenames.h \
-  $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
-  $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
-  $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-i386-fbsd.lo: elf32-i386-fbsd.c $(INCDIR)/filenames.h \
+  elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-i386.c \
+  $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
 elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \
   $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
   $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
@@ -1533,13 +1533,13 @@ elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \
   $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
   $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \
   libecoff.h ecoffswap.h elf64-target.h
-elf64-alpha-fbsd.lo: elf64-alpha-fbsd.c elf64-alpha.c $(INCDIR)/filenames.h \
+elf64-alpha-fbsd.lo: elf64-alpha-fbsd.c $(INCDIR)/filenames.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
-  $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/alpha.h \
-  $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \
-  $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
-  $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \
-  libecoff.h ecoffswap.h elf64-target.h
+  $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf64-alpha.c \
+  $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
+  $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
+  $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \
+  libcoff.h libecoff.h ecoffswap.h elf64-target.h
 elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \
   $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
   $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
index 2da51c8d92b7edfd54e760f7234679070007daac..4816c1718b0bac6369daf4a070c18ead777d0ce1 100644 (file)
@@ -344,6 +344,7 @@ BFD32_BACKENDS = \
        elf32-hppa.lo \
        elf32-i370.lo \
        elf32-i386.lo \
+       elf32-i386-fbsd.lo \
        elf32-i386qnx.lo \
        elf32-i860.lo \
        elf32-i960.lo \
@@ -507,6 +508,7 @@ BFD32_BACKENDS_CFILES = \
        elf32-hppa.c \
        elf32-i370.c \
        elf32-i386.c \
+       elf32-i386-fbsd.c \
        elf32-i386qnx.c \
        elf32-i860.c \
        elf32-i960.c \
@@ -617,6 +619,7 @@ BFD64_BACKENDS = \
        efi-app-ia64.lo \
        elf64-x86-64.lo \
        elf64-alpha.lo \
+       elf64-alpha-fbsd.lo \
        elf64-hppa.lo \
        elf64-ia64.lo \
        elf64-gen.lo \
@@ -644,6 +647,7 @@ BFD64_BACKENDS_CFILES = \
        efi-app-ia64.c \
        elf64-x86-64.c \
        elf64-alpha.c \
+       elf64-alpha-fbsd.c \
        elf64-hppa.c \
        elf64-gen.c \
        elfn32-mips.c \
@@ -1694,6 +1698,10 @@ elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
+elf32-i386-fbsd.lo: elf32-i386-fbsd.c $(INCDIR)/filenames.h \
+  elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-i386.c \
+  $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
 elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \
   $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
   $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
@@ -2055,6 +2063,13 @@ elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \
   $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
   $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \
   libecoff.h ecoffswap.h elf64-target.h
+elf64-alpha-fbsd.lo: elf64-alpha-fbsd.c $(INCDIR)/filenames.h \
+  elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf64-alpha.c \
+  $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
+  $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
+  $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \
+  libcoff.h libecoff.h ecoffswap.h elf64-target.h
 elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \
   $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
   $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
index 0525594109009326a3e15312576172a0a7d3ba42..c7dfe3358644106cddca54afbfdcab703f1948fb 100644 (file)
@@ -2286,6 +2286,14 @@ to compensate for the borrow when the low bits are added.  */
   BFD_RELOC_X86_64_RELATIVE,
   BFD_RELOC_X86_64_GOTPCREL,
   BFD_RELOC_X86_64_32S,
+  BFD_RELOC_X86_64_DTPMOD64,
+  BFD_RELOC_X86_64_DTPOFF64,
+  BFD_RELOC_X86_64_TPOFF64,
+  BFD_RELOC_X86_64_TLSGD,
+  BFD_RELOC_X86_64_TLSLD,
+  BFD_RELOC_X86_64_DTPOFF32,
+  BFD_RELOC_X86_64_GOTTPOFF,
+  BFD_RELOC_X86_64_TPOFF32,
 
 /* ns32k relocations  */
   BFD_RELOC_NS32K_IMM_8,
index c76157f956e44fa9febec04cd1b4926ebd0d03b2..4aabfedaf53fe59e96ed83863098e4ce0ff85c35 100644 (file)
@@ -377,7 +377,7 @@ case "${targ}" in
   i[3456]86-*-chorus*)
     targ_defvec=bfd_elf32_i386_vec
     ;;
-  i[3456]86-*-msdosdjgpp* | i[3456]*-*-go32* | i[3456]86-go32-rtems* )
+  *-*-msdosdjgpp* | *-*-go32* | *-go32-rtems* )
     targ_defvec=go32coff_vec
     targ_selvecs="go32stubbedcoff_vec i386aout_vec"
     ;;
index f41efc742e6e07fbacb83a54fb539047039638b3..2ca10f7e37f50b06cc68eb3fc9c3a7f9357ad15c 100755 (executable)
@@ -6075,6 +6075,7 @@ do
     bfd_elf32_hppa_linux_vec)  tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_hppa_vec)                tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_i370_vec)                tb="$tb elf32-i370.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_freebsd_vec)        tb="$tb elf32-i386-fbsd.lo elf32.lo $elf" ;;
     bfd_elf32_i386_vec)                tb="$tb elf32-i386.lo elf32.lo $elf" ;;
     bfd_elf32_i386qnx_vec)     tb="$tb elf32-i386qnx.lo elf32.lo $elf" ;;
     bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
@@ -6133,6 +6134,7 @@ do
     bfd_elf32_v850_vec)                tb="$tb elf32-v850.lo elf32.lo $elf" ;;
     bfd_elf32_vax_vec)         tb="$tb elf32-vax.lo elf32.lo $elf" ;;
     bfd_elf32_xstormy16_vec)   tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
+    bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha-fbsd.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_alpha_vec)       tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_big_generic_vec)         tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_bigmips_vec)     tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
@@ -6338,10 +6340,10 @@ case ${host64}-${target64}-${want64} in
     if test -n "$GCC" ; then
        bad_64bit_gcc=no;
        echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6342: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6344: checking for gcc version with buggy 64-bit support" >&5
        # Add more tests for gcc versions with non-working 64-bit support here.
        cat > conftest.$ac_ext <<EOF
-#line 6345 "configure"
+#line 6347 "configure"
 #include "confdefs.h"
 :__GNUC__:__GNUC_MINOR__:__i386__:
 EOF
@@ -6386,17 +6388,17 @@ for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6390: checking for $ac_hdr" >&5
+echo "configure:6392: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6395 "configure"
+#line 6397 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6425,12 +6427,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6429: checking for $ac_func" >&5
+echo "configure:6431: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6434 "configure"
+#line 6436 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6453,7 +6455,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6478,7 +6480,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6482: checking for working mmap" >&5
+echo "configure:6484: checking for working mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6486,7 +6488,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 6490 "configure"
+#line 6492 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6639,7 +6641,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:6643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -6664,12 +6666,12 @@ fi
 for ac_func in madvise mprotect
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6668: checking for $ac_func" >&5
+echo "configure:6670: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6673 "configure"
+#line 6675 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6692,7 +6694,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
index 1cdd46156bba02b0bc5f19dad5fa927d8860c559..7c000b9890e54562186aaa1f11fda3d42f2cf9c1 100644 (file)
    based on Fred Fish's (Cygnus Support) implementation of DWARF 1
    support in dwarfread.c
 
-This file is part of BFD.
+   This file is part of BFD.
 
-This program is free software; you can 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "bfd.h"
 #include "sysdep.h"
@@ -1084,13 +1084,19 @@ decode_line_info (unit, stash)
     {
       /* State machine registers.  */
       bfd_vma address = 0;
-      char* filename = concat_filename (table, 1);
+      char * filename = concat_filename (table, 1);
       unsigned int line = 1;
       unsigned int column = 0;
       int is_stmt = lh.default_is_stmt;
       int basic_block = 0;
-      int end_sequence = 0, need_low_pc = 1;
-      bfd_vma low_pc = 0;
+      int end_sequence = 0;
+      /* eraxxon@alumni.rice.edu: Against the DWARF2 specs, some
+         compilers generate address sequences that are wildly out of
+         order using DW_LNE_set_address (e.g. Intel C++ 6.0 compiler
+         for ia64-Linux).  Thus, to determine the low and high
+         address, we must compare on every DW_LNS_copy, etc.  */
+      bfd_vma low_pc  = 0;
+      bfd_vma high_pc = 0;
 
       /* Decode the table.  */
       while (! end_sequence)
@@ -1099,7 +1105,8 @@ decode_line_info (unit, stash)
          line_ptr += 1;
 
          if (op_code >= lh.opcode_base)
-           {           /* Special operand.  */
+           {
+             /* Special operand.  */
              adj_opcode = op_code - lh.opcode_base;
              address += (adj_opcode / lh.line_range)
                * lh.minimum_instruction_length;
@@ -1107,30 +1114,30 @@ decode_line_info (unit, stash)
              /* Append row to matrix using current values.  */
              add_line_info (table, address, filename, line, column, 0);
              basic_block = 1;
-             if (need_low_pc)
-               {
-                 need_low_pc = 0;
-                 low_pc = address;
-               }
+             if (low_pc == 0 || address < low_pc)
+               low_pc = address;
+             if (address > high_pc)
+               high_pc = address;
            }
          else switch (op_code)
            {
            case DW_LNS_extended_op:
-             line_ptr += 1;    /* Ignore length.  */
+             /* Ignore length.  */
+             line_ptr += 1;
              extended_op = read_1_byte (abfd, line_ptr);
              line_ptr += 1;
+
              switch (extended_op)
                {
                case DW_LNE_end_sequence:
                  end_sequence = 1;
                  add_line_info (table, address, filename, line, column,
                                 end_sequence);
-                 if (need_low_pc)
-                   {
-                     need_low_pc = 0;
-                     low_pc = address;
-                   }
-                 arange_add (unit, low_pc, address);
+                 if (low_pc == 0 || address < low_pc)
+                   low_pc = address;
+                 if (address > high_pc)
+                   high_pc = address;
+                 arange_add (unit, low_pc, high_pc);
                  break;
                case DW_LNE_set_address:
                  address = read_address (unit, line_ptr);
@@ -1169,11 +1176,10 @@ decode_line_info (unit, stash)
            case DW_LNS_copy:
              add_line_info (table, address, filename, line, column, 0);
              basic_block = 0;
-             if (need_low_pc)
-               {
-                 need_low_pc = 0;
-                 low_pc = address;
-               }
+             if (low_pc == 0 || address < low_pc)
+               low_pc = address;
+             if (address > high_pc)
+               high_pc = address;
              break;
            case DW_LNS_advance_pc:
              address += lh.minimum_instruction_length
@@ -1188,8 +1194,8 @@ decode_line_info (unit, stash)
              {
                unsigned int file;
 
-               /* The file and directory tables are 0 based, the references
-                  are 1 based.  */
+               /* The file and directory tables are 0
+                  based, the references are 1 based.  */
                file = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
                line_ptr += bytes_read;
                filename = concat_filename (table, file);
@@ -1214,8 +1220,9 @@ decode_line_info (unit, stash)
              line_ptr += 2;
              break;
            default:
-             {  /* Unknown standard opcode, ignore it.  */
+             {
                int i;
+               /* Unknown standard opcode, ignore it.  */
                for (i = 0; i < lh.standard_opcode_lengths[op_code]; i++)
                  {
                    (void) read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
@@ -1234,10 +1241,7 @@ decode_line_info (unit, stash)
    LINENUMBER_PTR, are pointers to the objects to be filled in.  */
 
 static boolean
-lookup_address_in_line_info_table (table,
-                                  addr,
-                                  function,
-                                  filename_ptr,
+lookup_address_in_line_info_table (table, addr, function, filename_ptr,
                                   linenumber_ptr)
      struct line_info_table* table;
      bfd_vma addr;
@@ -1298,9 +1302,7 @@ lookup_address_in_line_info_table (table,
 /* If ADDR is within TABLE, set FUNCTIONNAME_PTR, and return true.  */
 
 static boolean
-lookup_address_in_function_table (table,
-                                 addr,
-                                 function_ptr,
+lookup_address_in_function_table (table, addr, function_ptr,
                                  functionname_ptr)
      struct funcinfo* table;
      bfd_vma addr;
@@ -1666,9 +1668,8 @@ comp_unit_contains_address (unit, addr)
    false otherwise.  */
 
 static boolean
-comp_unit_find_nearest_line (unit, addr,
-                            filename_ptr, functionname_ptr, linenumber_ptr,
-                            stash)
+comp_unit_find_nearest_line (unit, addr, filename_ptr, functionname_ptr,
+                            linenumber_ptr, stash)
      struct comp_unit* unit;
      bfd_vma addr;
      const char **filename_ptr;
@@ -1708,26 +1709,23 @@ comp_unit_find_nearest_line (unit, addr,
     }
 
   function = NULL;
-  func_p = lookup_address_in_function_table (unit->function_table,
-                                            addr,
-                                            &function,
-                                            functionname_ptr);
-  line_p = lookup_address_in_line_info_table (unit->line_table,
-                                             addr,
-                                             function,
-                                             filename_ptr,
+  func_p = lookup_address_in_function_table (unit->function_table, addr,
+                                            &function, functionname_ptr);
+  line_p = lookup_address_in_line_info_table (unit->line_table, addr,
+                                             function, filename_ptr,
                                              linenumber_ptr);
   return line_p || func_p;
 }
 
-/* Locate a section in a BFD containing debugging info.  The search starts from the
-   section after AFTER_SEC, or from the first section in the BFD if AFTER_SEC is
-   NULL.  The search works by examining the names of the sections.  There are two
-   permissiable names.  The first is .debug_info.  This is the standard DWARF2 name.
-   The second is a prefix .gnu.linkonce.wi.  This is a variation on the .debug_info
-   section which has a checksum describing the contents appended onto the name.  This
-   allows the linker to identify and discard duplicate debugging sections for
-   different compilation units.  */
+/* Locate a section in a BFD containing debugging info.  The search starts
+   from the section after AFTER_SEC, or from the first section in the BFD if
+   AFTER_SEC is NULL.  The search works by examining the names of the
+   sections.  There are two permissiable names.  The first is .debug_info.
+   This is the standard DWARF2 name.  The second is a prefix .gnu.linkonce.wi.
+   This is a variation on the .debug_info section which has a checksum
+   describing the contents appended onto the name.  This allows the linker to
+   identify and discard duplicate debugging sections for different
+   compilation units.  */
 #define DWARF2_DEBUG_INFO ".debug_info"
 #define GNU_LINKONCE_INFO ".gnu.linkonce.wi."
 
@@ -1766,8 +1764,7 @@ find_debug_info (abfd, after_sec)
 boolean
 _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
                               filename_ptr, functionname_ptr,
-                              linenumber_ptr,
-                              addr_size, pinfo)
+                              linenumber_ptr, addr_size, pinfo)
      bfd *abfd;
      asection *section;
      asymbol **symbols;
index eb4a69b04d0583dbd8a255580c540f72e5848db5..e80fc6c9d5704ac6d1119cba11afc5a5ad606ec6 100644 (file)
@@ -632,11 +632,11 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
            goto free_no_table;
          if ((*reloc_symbol_deleted_p) (buf - ehbuf, cookie))
            {
-             cookie->rel = rel;
              /* This is a FDE against discarded section, it should
                 be deleted.  */
              new_size -= hdr.length + 4;
              sec_info->entry[sec_info->count].removed = 1;
+             memset (rel, 0, sizeof (*rel));
            }
          else
            {
index d52d5a7db4d920cd38b5735cbdcbbe7748d52d8e..b71d78eb073dbb46a9f1fb893499153966c0c3ba 100644 (file)
@@ -1057,6 +1057,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
        case R_386_TLS_LE:
          if (!info->shared)
            break;
+         info->flags |= DF_STATIC_TLS;
          /* Fall through */        
 
        case R_386_32:
index a2a0a6da698e2032ee5f6e54c23a839100c82b06..6faffd203c0627304ed361860d68e8f37e36f914 100644 (file)
@@ -3483,8 +3483,10 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
 
            BFD_ASSERT (sec != (asection *) 0);
            name = bfd_get_section_name (abfd, sec->output_section);
-           if (strcmp (name, ".sdata") != 0
-               && strcmp (name, ".sbss") != 0)
+           if (! ((strncmp (name, ".sdata", 6) == 0
+                   && (name[6] == 0 || name[6] == '.'))
+                  || (strncmp (name, ".sbss", 5) == 0
+                      && (name[5] == 0 || name[5] == '.'))))
              {
                (*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
                                       bfd_archive_filename (input_bfd),
@@ -3505,7 +3507,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
 
            BFD_ASSERT (sec != (asection *) 0);
            name = bfd_get_section_name (abfd, sec->output_section);
-           if (strcmp (name, ".sdata2") != 0 && strcmp (name, ".sbss2") != 0)
+           if (! (strncmp (name, ".sdata2", 7) == 0
+                  || strncmp (name, ".sbss2", 6) == 0))
              {
                (*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
                                       bfd_archive_filename (input_bfd),
@@ -3532,7 +3535,10 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
 
            BFD_ASSERT (sec != (asection *) 0);
            name = bfd_get_section_name (abfd, sec->output_section);
-           if (strcmp (name, ".sdata") == 0 || strcmp (name, ".sbss") == 0)
+           if (((strncmp (name, ".sdata", 6) == 0      
+                 && (name[6] == 0 || name[6] == '.'))
+                || (strncmp (name, ".sbss", 5) == 0
+                    && (name[5] == 0 || name[5] == '.'))))
              {
                reg = 13;
                addend -= (sdata->sym_hash->root.u.def.value
@@ -3540,8 +3546,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
                           + sdata->sym_hash->root.u.def.section->output_offset);
              }
 
-           else if (strcmp (name, ".sdata2") == 0
-                    || strcmp (name, ".sbss2") == 0)
+           else if (strncmp (name, ".sdata2", 7) == 0
+                    || strncmp (name, ".sbss2", 6) == 0)
              {
                reg = 2;
                addend -= (sdata2->sym_hash->root.u.def.value
index 4c9b3d45aaa41f0a70d9726c68c5cdce87a4449b..be2733d36bb7cf6919e132ba95b9f311bbf00b54 100644 (file)
@@ -1281,7 +1281,6 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
                off &= ~1;
              else
                {
-                 bfd_put_32 (output_bfd, relocation, sgot->contents + off);
 
                  if (info->shared)
                    {
@@ -1297,7 +1296,8 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
                                         + sgot->output_offset
                                         + off);
                      outrel.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
-                     outrel.r_addend = 0;
+                     outrel.r_addend = relocation;
+                     relocation = 0;
                      bfd_elf32_swap_reloca_out (output_bfd, &outrel,
                                                 (((Elf32_External_Rela *)
                                                   srelgot->contents)
@@ -1305,6 +1305,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
                      ++srelgot->reloc_count;
                    }
 
+                 bfd_put_32 (output_bfd, relocation, sgot->contents + off);
                  local_got_offsets[r_symndx] |= 1;
                }
            }
@@ -1810,14 +1811,21 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
       if (info->shared
          && (info->symbolic || h->dynindx == -1)
          && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
-       rela.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
+       {
+         asection *sec = h->root.u.def.section;
+         rela.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
+         rela.r_addend = (h->root.u.def.value
+                          + sec->output_section->vma
+                          + sec->output_offset);
+       }
       else
        {
-         bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
          rela.r_info = ELF32_R_INFO (h->dynindx, R_SPARC_GLOB_DAT);
+         rela.r_addend = 0;
        }
 
-      rela.r_addend = 0;
+      bfd_put_32 (output_bfd, (bfd_vma) 0,
+                 sgot->contents + (h->got.offset &~ (bfd_vma) 1));
       bfd_elf32_swap_reloca_out (output_bfd, &rela,
                                 ((Elf32_External_Rela *) srela->contents
                                  + srela->reloc_count));
index af99b351bd63f0bc0ad1fef387f473c07a5b840e..e1d095d523125c54d7ebf43ac15013570297911e 100644 (file)
@@ -3403,7 +3403,7 @@ elf64_alpha_merge_ind_symbols (hi, dummy)
        {
          rin = ri->next;
          for (rs = rsh; rs ; rs = rs->next)
-           if (ri->rtype == rs->rtype)
+           if (ri->rtype == rs->rtype && ri->srel == rs->srel)
              {
                rs->count += ri->count;
                goto found_reloc;
index d9f86260b49cd110912b8d67874c97832ab103f1..91610aae7e8782580395211a48fb491f932ec7f8 100644 (file)
@@ -4464,27 +4464,6 @@ ppc_build_one_stub (gen_entry, in_arg)
       break;
 
     case ppc_stub_plt_call:
-      /* Build the .glink lazy link call stub.  */
-      p = htab->sglink->contents + htab->sglink->_cooked_size;
-      indx = htab->sglink->reloc_count;
-      if (indx < 0x8000)
-       {
-         bfd_put_32 (htab->sglink->owner, LI_R0_0 | indx, p);
-         p += 4;
-       }
-      else
-       {
-         bfd_put_32 (htab->sglink->owner, LIS_R0_0 | PPC_HI (indx), p);
-         p += 4;
-         bfd_put_32 (htab->sglink->owner, ORI_R0_R0_0 | PPC_LO (indx), p);
-         p += 4;
-       }
-      bfd_put_32 (htab->sglink->owner,
-                 B_DOT | ((htab->sglink->contents - p) & 0x3fffffc), p);
-      p += 4;
-      htab->sglink->_cooked_size = p - htab->sglink->contents;
-      htab->sglink->reloc_count += 1;
-
       /* Do the best we can for shared libraries built without
         exporting ".foo" for each "foo".  This can happen when symbol
         versioning scripts strip all bar a subset of symbols.  */
@@ -5149,6 +5128,8 @@ ppc64_elf_build_stubs (info)
 
   if (htab->splt != NULL)
     {
+      unsigned int indx;
+
       /* Build the .glink plt call stub.  */
       plt_r2 = (htab->splt->output_offset
                + htab->splt->output_section->vma
@@ -5156,15 +5137,33 @@ ppc64_elf_build_stubs (info)
                - TOC_BASE_OFF);
       p = htab->sglink->contents;
       p = build_plt_stub (htab->sglink->owner, p, (int) plt_r2, 1);
-      while (p - htab->sglink->contents < GLINK_CALL_STUB_SIZE)
+      while (p < htab->sglink->contents + GLINK_CALL_STUB_SIZE)
        {
          bfd_put_32 (htab->sglink->owner, NOP, p);
          p += 4;
        }
-      htab->sglink->_cooked_size = p - htab->sglink->contents;
 
-      /* Use reloc_count to count entries.  */
-      htab->sglink->reloc_count = 0;
+      /* Build the .glink lazy link call stubs.  */
+      indx = 0;
+      while (p < htab->sglink->contents + htab->sglink->_raw_size)
+       {
+         if (indx < 0x8000)
+           {
+             bfd_put_32 (htab->sglink->owner, LI_R0_0 | indx, p);
+             p += 4;
+           }
+         else
+           {
+             bfd_put_32 (htab->sglink->owner, LIS_R0_0 | PPC_HI (indx), p);
+             p += 4;
+             bfd_put_32 (htab->sglink->owner, ORI_R0_R0_0 | PPC_LO (indx), p);
+             p += 4;
+           }
+         bfd_put_32 (htab->sglink->owner,
+                     B_DOT | ((htab->sglink->contents - p) & 0x3fffffc), p);
+         p += 4;
+       }
+      htab->sglink->_cooked_size = p - htab->sglink->contents;
     }
 
   if (htab->sbrlt->_raw_size != 0)
@@ -5177,7 +5176,6 @@ ppc64_elf_build_stubs (info)
 
   /* Build the stubs as directed by the stub hash table.  */
   bfd_hash_traverse (&htab->stub_hash_table, ppc_build_one_stub, info);
-  htab->sglink->reloc_count = 0;
 
   for (stub_sec = htab->stub_bfd->sections;
        stub_sec != NULL;
index 764b0d75a91cfef7c1f03e80f14f22235a2c73db..f79d76c30bd244658d8fdda7203dc1ca119eb1da 100644 (file)
@@ -2727,11 +2727,12 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
        }
       else
        {
-         bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
          rela.r_info = ELF64_R_INFO (h->dynindx, R_SPARC_GLOB_DAT);
          rela.r_addend = 0;
        }
 
+      bfd_put_64 (output_bfd, (bfd_vma) 0,
+                 sgot->contents + (h->got.offset &~ (bfd_vma) 1));
       bfd_elf64_swap_reloca_out (output_bfd, &rela,
                                 ((Elf64_External_Rela *) srela->contents
                                  + srela->reloc_count));
index 9c4a9d4ec18a5ccaa0feef9f7a9814f4ece1e35c..fa2f2ee5ec1ebf17d4ddf8b801b0a36f033e88c4 100644 (file)
@@ -40,16 +40,16 @@ static reloc_howto_type x86_64_elf_howto_table[] =
   HOWTO(R_X86_64_64, 0, 4, 64, false, 0, complain_overflow_bitfield,
        bfd_elf_generic_reloc, "R_X86_64_64", false, MINUS_ONE, MINUS_ONE,
        false),
-  HOWTO(R_X86_64_PC32, 0, 4, 32, true, 0, complain_overflow_signed,
+  HOWTO(R_X86_64_PC32, 0, 2, 32, true, 0, complain_overflow_signed,
        bfd_elf_generic_reloc, "R_X86_64_PC32", false, 0xffffffff, 0xffffffff,
        true),
-  HOWTO(R_X86_64_GOT32, 0, 4, 32, false, 0, complain_overflow_signed,
+  HOWTO(R_X86_64_GOT32, 0, 2, 32, false, 0, complain_overflow_signed,
        bfd_elf_generic_reloc, "R_X86_64_GOT32", false, 0xffffffff, 0xffffffff,
        false),
-  HOWTO(R_X86_64_PLT32, 0, 4, 32, true, 0, complain_overflow_signed,
+  HOWTO(R_X86_64_PLT32, 0, 2, 32, true, 0, complain_overflow_signed,
        bfd_elf_generic_reloc, "R_X86_64_PLT32", false, 0xffffffff, 0xffffffff,
        true),
-  HOWTO(R_X86_64_COPY, 0, 4, 32, false, 0, complain_overflow_bitfield,
+  HOWTO(R_X86_64_COPY, 0, 2, 32, false, 0, complain_overflow_bitfield,
        bfd_elf_generic_reloc, "R_X86_64_COPY", false, 0xffffffff, 0xffffffff,
        false),
   HOWTO(R_X86_64_GLOB_DAT, 0, 4, 64, false, 0, complain_overflow_bitfield,
@@ -61,13 +61,13 @@ static reloc_howto_type x86_64_elf_howto_table[] =
   HOWTO(R_X86_64_RELATIVE, 0, 4, 64, false, 0, complain_overflow_bitfield,
        bfd_elf_generic_reloc, "R_X86_64_RELATIVE", false, MINUS_ONE,
        MINUS_ONE, false),
-  HOWTO(R_X86_64_GOTPCREL, 0, 4, 32, true,0 , complain_overflow_signed,
+  HOWTO(R_X86_64_GOTPCREL, 0, 2, 32, true, 0, complain_overflow_signed,
        bfd_elf_generic_reloc, "R_X86_64_GOTPCREL", false, 0xffffffff,
        0xffffffff, true),
-  HOWTO(R_X86_64_32, 0, 4, 32, false, 0, complain_overflow_unsigned,
+  HOWTO(R_X86_64_32, 0, 2, 32, false, 0, complain_overflow_unsigned,
        bfd_elf_generic_reloc, "R_X86_64_32", false, 0xffffffff, 0xffffffff,
        false),
-  HOWTO(R_X86_64_32S, 0, 4, 32, false, 0, complain_overflow_signed,
+  HOWTO(R_X86_64_32S, 0, 2, 32, false, 0, complain_overflow_signed,
        bfd_elf_generic_reloc, "R_X86_64_32S", false, 0xffffffff, 0xffffffff,
        false),
   HOWTO(R_X86_64_16, 0, 1, 16, false, 0, complain_overflow_bitfield,
@@ -78,6 +78,30 @@ static reloc_howto_type x86_64_elf_howto_table[] =
        bfd_elf_generic_reloc, "R_X86_64_8", false, 0xff, 0xff, false),
   HOWTO(R_X86_64_PC8, 0, 0, 8, true, 0, complain_overflow_signed,
        bfd_elf_generic_reloc, "R_X86_64_PC8", false, 0xff, 0xff, true),
+  HOWTO(R_X86_64_DTPMOD64, 0, 4, 64, false, 0, complain_overflow_bitfield,
+       bfd_elf_generic_reloc, "R_X86_64_DTPMOD64", false, MINUS_ONE,
+       MINUS_ONE, false),
+  HOWTO(R_X86_64_DTPOFF64, 0, 4, 64, false, 0, complain_overflow_bitfield,
+       bfd_elf_generic_reloc, "R_X86_64_DTPOFF64", false, MINUS_ONE,
+       MINUS_ONE, false),
+  HOWTO(R_X86_64_TPOFF64, 0, 4, 64, false, 0, complain_overflow_bitfield,
+       bfd_elf_generic_reloc, "R_X86_64_TPOFF64", false, MINUS_ONE,
+       MINUS_ONE, false),
+  HOWTO(R_X86_64_TLSGD, 0, 2, 32, true, 0, complain_overflow_signed,
+       bfd_elf_generic_reloc, "R_X86_64_TLSGD", false, 0xffffffff,
+       0xffffffff, true),
+  HOWTO(R_X86_64_TLSLD, 0, 2, 32, true, 0, complain_overflow_signed,
+       bfd_elf_generic_reloc, "R_X86_64_TLSLD", false, 0xffffffff,
+       0xffffffff, true),
+  HOWTO(R_X86_64_DTPOFF32, 0, 2, 32, false, 0, complain_overflow_bitfield,
+       bfd_elf_generic_reloc, "R_X86_64_DTPOFF32", false, 0xffffffff,
+       0xffffffff, false),
+  HOWTO(R_X86_64_GOTTPOFF, 0, 2, 32, true, 0, complain_overflow_signed,
+       bfd_elf_generic_reloc, "R_X86_64_GOTTPOFF", false, 0xffffffff,
+       0xffffffff, true),
+  HOWTO(R_X86_64_TPOFF32, 0, 2, 32, false, 0, complain_overflow_signed,
+       bfd_elf_generic_reloc, "R_X86_64_TPOFF32", false, 0xffffffff,
+       0xffffffff, false),
 
 /* GNU extension to record C++ vtable hierarchy.  */
   HOWTO (R_X86_64_GNU_VTINHERIT, 0, 4, 0, false, 0, complain_overflow_dont,
@@ -114,6 +138,14 @@ static const struct elf_reloc_map x86_64_reloc_map[] =
   { BFD_RELOC_16_PCREL,                R_X86_64_PC16, },
   { BFD_RELOC_8,               R_X86_64_8, },
   { BFD_RELOC_8_PCREL,         R_X86_64_PC8, },
+  { BFD_RELOC_X86_64_DTPMOD64, R_X86_64_DTPMOD64, },
+  { BFD_RELOC_X86_64_DTPOFF64, R_X86_64_DTPOFF64, },
+  { BFD_RELOC_X86_64_TPOFF64,  R_X86_64_TPOFF64, },
+  { BFD_RELOC_X86_64_TLSGD,    R_X86_64_TLSGD, },
+  { BFD_RELOC_X86_64_TLSLD,    R_X86_64_TLSLD, },
+  { BFD_RELOC_X86_64_DTPOFF32, R_X86_64_DTPOFF32, },
+  { BFD_RELOC_X86_64_GOTTPOFF, R_X86_64_GOTTPOFF, },
+  { BFD_RELOC_X86_64_TPOFF32,  R_X86_64_TPOFF32, },
   { BFD_RELOC_VTABLE_INHERIT,  R_X86_64_GNU_VTINHERIT, },
   { BFD_RELOC_VTABLE_ENTRY,    R_X86_64_GNU_VTENTRY, },
 };
@@ -128,6 +160,10 @@ static boolean elf64_x86_64_grok_psinfo
   PARAMS ((bfd *, Elf_Internal_Note *));
 static struct bfd_link_hash_table *elf64_x86_64_link_hash_table_create
   PARAMS ((bfd *));
+static int elf64_x86_64_tls_transition
+  PARAMS ((struct bfd_link_info *, int, int));
+static boolean elf64_x86_64_mkobject
+  PARAMS((bfd *));
 static boolean elf64_x86_64_elf_object_p PARAMS ((bfd *abfd));
 static boolean create_got_section
   PARAMS((bfd *, struct bfd_link_info *));
@@ -158,6 +194,10 @@ static boolean readonly_dynrelocs
   PARAMS ((struct elf_link_hash_entry *, PTR));
 static boolean elf64_x86_64_size_dynamic_sections
   PARAMS ((bfd *, struct bfd_link_info *));
+static bfd_vma dtpoff_base
+  PARAMS ((struct bfd_link_info *));
+static bfd_vma tpoff
+  PARAMS ((struct bfd_link_info *, bfd_vma));
 static boolean elf64_x86_64_relocate_section
   PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
         Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
@@ -198,13 +238,13 @@ elf64_x86_64_info_to_howto (abfd, cache_ptr, dst)
   r_type = ELF64_R_TYPE (dst->r_info);
   if (r_type < (unsigned int) R_X86_64_GNU_VTINHERIT)
     {
-      BFD_ASSERT (r_type <= (unsigned int) R_X86_64_PC8);
+      BFD_ASSERT (r_type <= (unsigned int) R_X86_64_TPOFF32);
       i = r_type;
     }
   else
     {
       BFD_ASSERT (r_type < (unsigned int) R_X86_64_max);
-      i = r_type - ((unsigned int) R_X86_64_GNU_VTINHERIT - R_X86_64_PC8 - 1);
+      i = r_type - ((unsigned int) R_X86_64_GNU_VTINHERIT - R_X86_64_TPOFF32 - 1);
     }
   cache_ptr->howto = &x86_64_elf_howto_table[i];
   BFD_ASSERT (r_type == cache_ptr->howto->type);
@@ -343,8 +383,32 @@ struct elf64_x86_64_link_hash_entry
 
   /* Track dynamic relocs copied for this symbol.  */
   struct elf64_x86_64_dyn_relocs *dyn_relocs;
+
+#define GOT_UNKNOWN    0
+#define GOT_NORMAL     1
+#define GOT_TLS_GD     2
+#define GOT_TLS_IE     3
+  unsigned char tls_type;
+};
+
+#define elf64_x86_64_hash_entry(ent) \
+  ((struct elf64_x86_64_link_hash_entry *)(ent))
+
+struct elf64_x86_64_obj_tdata
+{
+  struct elf_obj_tdata root;
+
+  /* tls_type for each local got entry.  */
+  char *local_got_tls_type;
 };
 
+#define elf64_x86_64_tdata(abfd) \
+  ((struct elf64_x86_64_obj_tdata *) (abfd)->tdata.any)
+
+#define elf64_x86_64_local_got_tls_type(abfd) \
+  (elf64_x86_64_tdata (abfd)->local_got_tls_type)
+
+
 /* x86-64 ELF linker hash table.  */
 
 struct elf64_x86_64_link_hash_table
@@ -360,6 +424,11 @@ struct elf64_x86_64_link_hash_table
   asection *sdynbss;
   asection *srelbss;
 
+  union {
+    bfd_signed_vma refcount;
+    bfd_vma offset;
+  } tls_ld_got;
+
   /* Small local sym to section mapping cache.  */
   struct sym_sec_cache sym_sec;
 };
@@ -395,6 +464,7 @@ link_hash_newfunc (entry, table, string)
 
       eh = (struct elf64_x86_64_link_hash_entry *) entry;
       eh->dyn_relocs = NULL;
+      eh->tls_type = GOT_UNKNOWN;
     }
 
   return entry;
@@ -427,6 +497,7 @@ elf64_x86_64_link_hash_table_create (abfd)
   ret->sdynbss = NULL;
   ret->srelbss = NULL;
   ret->sym_sec.abfd = NULL;
+  ret->tls_ld_got.refcount = 0;
 
   return &ret->elf.root;
 }
@@ -538,18 +609,67 @@ elf64_x86_64_copy_indirect_symbol (bed, dir, ind)
       eind->dyn_relocs = NULL;
     }
 
+  if (ind->root.type == bfd_link_hash_indirect
+      && dir->got.refcount <= 0)
+    {
+      edir->tls_type = eind->tls_type;
+      eind->tls_type = GOT_UNKNOWN;
+    }
+
   _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
 
 static boolean
-elf64_x86_64_elf_object_p (abfd)
+elf64_x86_64_mkobject (abfd)
      bfd *abfd;
 {
+  bfd_size_type amt = sizeof (struct elf64_x86_64_obj_tdata);
+  abfd->tdata.any = bfd_zalloc (abfd, amt);
+  if (abfd->tdata.any == NULL)
+    return false;
+  return true;
+}
+
+static boolean
+elf64_x86_64_elf_object_p (abfd)
+  bfd *abfd;
+{
+  /* Allocate our special target data.  */
+  struct elf64_x86_64_obj_tdata *new_tdata;
+  bfd_size_type amt = sizeof (struct elf64_x86_64_obj_tdata);
+  new_tdata = bfd_zalloc (abfd, amt);
+  if (new_tdata == NULL)
+    return false;
+  new_tdata->root = *abfd->tdata.elf_obj_data;
+  abfd->tdata.any = new_tdata;
   /* Set the right machine number for an x86-64 elf64 file.  */
   bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_x86_64);
   return true;
 }
 
+static int
+elf64_x86_64_tls_transition (info, r_type, is_local)
+     struct bfd_link_info *info;
+     int r_type;
+     int is_local;
+{
+  if (info->shared)
+    return r_type;
+
+  switch (r_type)
+    {
+    case R_X86_64_TLSGD:
+    case R_X86_64_GOTTPOFF:
+      if (is_local)
+       return R_X86_64_TPOFF32;
+      return R_X86_64_GOTTPOFF;
+    case R_X86_64_TLSLD:
+      return R_X86_64_TPOFF32;
+    }
+
+   return r_type;
+}
+
 /* Look through the relocs for a section during the first phase, and
    calculate needed space in the global offset table, procedure
    linkage table, and dynamic reloc sections.  */
@@ -580,10 +700,12 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
     {
+      unsigned int r_type;
       unsigned long r_symndx;
       struct elf_link_hash_entry *h;
 
       r_symndx = ELF64_R_SYM (rel->r_info);
+      r_type = ELF64_R_TYPE (rel->r_info);
 
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
        {
@@ -598,38 +720,103 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
       else
        h = sym_hashes[r_symndx - symtab_hdr->sh_info];
 
-      switch (ELF64_R_TYPE (rel->r_info))
+      r_type = elf64_x86_64_tls_transition (info, r_type, h == NULL);
+      switch (r_type)
        {
-       case R_X86_64_GOT32:
-       case R_X86_64_GOTPCREL:
-         /* This symbol requires a global offset table entry.  */
-         if (h != NULL)
+       case R_X86_64_TLSLD:
+         htab->tls_ld_got.refcount += 1;
+         goto create_got;
+
+       case R_X86_64_TPOFF32:
+         if (info->shared)
            {
-             h->got.refcount += 1;
+             (*_bfd_error_handler)
+               (_("%s: relocation %s can not be used when making a shared object; recompile with -fPIC"),
+                bfd_archive_filename (abfd),
+                x86_64_elf_howto_table[r_type].name);
+             bfd_set_error (bfd_error_bad_value);
+             return false;
            }
-         else
-           {
-             bfd_signed_vma *local_got_refcounts;
+         break;
 
-             /* This is a global offset table entry for a local symbol.  */
-             local_got_refcounts = elf_local_got_refcounts (abfd);
-             if (local_got_refcounts == NULL)
-               {
-                 bfd_size_type size;
+       case R_X86_64_GOTTPOFF:
+         if (info->shared)
+           info->flags |= DF_STATIC_TLS;
+         /* Fall through */
 
-                 size = symtab_hdr->sh_info;
-                 size *= sizeof (bfd_signed_vma);
-                 local_got_refcounts = ((bfd_signed_vma *)
-                                        bfd_zalloc (abfd, size));
-                 if (local_got_refcounts == NULL)
+       case R_X86_64_GOT32:
+       case R_X86_64_GOTPCREL:
+       case R_X86_64_TLSGD:
+         /* This symbol requires a global offset table entry.  */
+         {
+           int tls_type, old_tls_type;
+
+           switch (r_type)
+             {
+             default: tls_type = GOT_NORMAL; break;
+             case R_X86_64_TLSGD: tls_type = GOT_TLS_GD; break;
+             case R_X86_64_GOTTPOFF: tls_type = GOT_TLS_IE; break;
+             }
+
+           if (h != NULL)
+             {
+               h->got.refcount += 1;
+               old_tls_type = elf64_x86_64_hash_entry (h)->tls_type;
+             }
+           else
+             {
+               bfd_signed_vma *local_got_refcounts;
+
+               /* This is a global offset table entry for a local symbol.  */
+               local_got_refcounts = elf_local_got_refcounts (abfd);
+               if (local_got_refcounts == NULL)
+                 {
+                   bfd_size_type size;
+
+                   size = symtab_hdr->sh_info;
+                   size *= sizeof (bfd_signed_vma) + sizeof (char);
+                   local_got_refcounts = ((bfd_signed_vma *)
+                                          bfd_zalloc (abfd, size));
+                   if (local_got_refcounts == NULL)
+                     return false;
+                   elf_local_got_refcounts (abfd) = local_got_refcounts;
+                   elf64_x86_64_local_got_tls_type (abfd)
+                     = (char *) (local_got_refcounts + symtab_hdr->sh_info);
+                 }
+               local_got_refcounts[r_symndx] += 1;
+               old_tls_type
+                 = elf64_x86_64_local_got_tls_type (abfd) [r_symndx];
+             }
+
+           /* If a TLS symbol is accessed using IE at least once,
+              there is no point to use dynamic model for it.  */
+           if (old_tls_type != tls_type && old_tls_type != GOT_UNKNOWN
+               && (old_tls_type != GOT_TLS_GD || tls_type != GOT_TLS_IE))
+             {
+               if (old_tls_type == GOT_TLS_IE && tls_type == GOT_TLS_GD)
+                 tls_type = old_tls_type;
+               else
+                 {
+                   (*_bfd_error_handler)
+                     (_("%s: %s' accessed both as normal and thread local symbol"),
+                      bfd_archive_filename (abfd),
+                      h ? h->root.root.string : "<local>");
                    return false;
-                 elf_local_got_refcounts (abfd) = local_got_refcounts;
-               }
-             local_got_refcounts[r_symndx] += 1;
-           }
+                 }
+             }
+
+           if (old_tls_type != tls_type)
+             {
+               if (h != NULL)
+                 elf64_x86_64_hash_entry (h)->tls_type = tls_type;
+               else
+                 elf64_x86_64_local_got_tls_type (abfd) [r_symndx] = tls_type;
+             }
+         }
          /* Fall through */
 
          //case R_X86_64_GOTPCREL:
+       create_got:
          if (htab->sgot == NULL)
            {
              if (htab->elf.dynobj == NULL)
@@ -671,7 +858,7 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
              (*_bfd_error_handler)
                (_("%s: relocation %s can not be used when making a shared object; recompile with -fPIC"),
                 bfd_archive_filename (abfd),
-                x86_64_elf_howto_table[ELF64_R_TYPE (rel->r_info)].name);
+                x86_64_elf_howto_table[r_type].name);
              bfd_set_error (bfd_error_bad_value);
              return false;
            }
@@ -719,9 +906,9 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
             symbol.  */
          if ((info->shared
               && (sec->flags & SEC_ALLOC) != 0
-              && (((ELF64_R_TYPE (rel->r_info) != R_X86_64_PC8)
-                   && (ELF64_R_TYPE (rel->r_info) != R_X86_64_PC16)
-                   && (ELF64_R_TYPE (rel->r_info) != R_X86_64_PC32))
+              && (((r_type != R_X86_64_PC8)
+                   && (r_type != R_X86_64_PC16)
+                   && (r_type != R_X86_64_PC32))
                   || (h != NULL
                       && (! info->symbolic
                           || h->root.type == bfd_link_hash_defweak
@@ -822,9 +1009,9 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
                }
 
              p->count += 1;
-             if (ELF64_R_TYPE (rel->r_info) == R_X86_64_PC8
-                 || ELF64_R_TYPE (rel->r_info) == R_X86_64_PC16
-                 || ELF64_R_TYPE (rel->r_info) == R_X86_64_PC32)
+             if (r_type == R_X86_64_PC8
+                 || r_type == R_X86_64_PC16
+                 || r_type == R_X86_64_PC32)
                p->pc_count += 1;
            }
          break;
@@ -905,6 +1092,7 @@ elf64_x86_64_gc_sweep_hook (abfd, info, sec, relocs)
   bfd_signed_vma *local_got_refcounts;
   const Elf_Internal_Rela *rel, *relend;
   unsigned long r_symndx;
+  int r_type;
   struct elf_link_hash_entry *h;
 
   elf_section_data (sec)->local_dynrel = NULL;
@@ -915,8 +1103,18 @@ elf64_x86_64_gc_sweep_hook (abfd, info, sec, relocs)
 
   relend = relocs + sec->reloc_count;
   for (rel = relocs; rel < relend; rel++)
-    switch (ELF64_R_TYPE (rel->r_info))
+    switch ((r_type = elf64_x86_64_tls_transition (info,
+                                                  ELF64_R_TYPE (rel->r_info),
+                                                  ELF64_R_SYM (rel->r_info)
+                                                  >= symtab_hdr->sh_info)))
       {
+      case R_X86_64_TLSLD:
+       if (elf64_x86_64_hash_table (info)->tls_ld_got.refcount > 0)
+         elf64_x86_64_hash_table (info)->tls_ld_got.refcount -= 1;
+       break;
+
+      case R_X86_64_TLSGD:
+      case R_X86_64_GOTTPOFF:
       case R_X86_64_GOT32:
       case R_X86_64_GOTPCREL:
        r_symndx = ELF64_R_SYM (rel->r_info);
@@ -1226,10 +1424,18 @@ allocate_dynrelocs (h, inf)
       h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
     }
 
-  if (h->got.refcount > 0)
+  /* If R_X86_64_GOTTPOFF symbol is now local to the binary,
+     make it a R_X86_64_TPOFF32 requiring no GOT entry.  */
+  if (h->got.refcount > 0
+      && !info->shared
+      && h->dynindx == -1
+      && elf64_x86_64_hash_entry (h)->tls_type == GOT_TLS_IE)
+    h->got.offset = (bfd_vma) -1;
+  else if (h->got.refcount > 0)
     {
       asection *s;
       boolean dyn;
+      int tls_type = elf64_x86_64_hash_entry (h)->tls_type;
 
       /* Make sure this symbol is output as a dynamic symbol.
         Undefined weak syms won't yet be marked as dynamic.  */
@@ -1243,8 +1449,19 @@ allocate_dynrelocs (h, inf)
       s = htab->sgot;
       h->got.offset = s->_raw_size;
       s->_raw_size += GOT_ENTRY_SIZE;
+      /* R_X86_64_TLSGD needs 2 consecutive GOT slots.  */
+      if (tls_type == GOT_TLS_GD)
+       s->_raw_size += GOT_ENTRY_SIZE;
       dyn = htab->elf.dynamic_sections_created;
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
+      /* R_X86_64_TLSGD needs one dynamic relocation if local symbol
+        and two if global.
+        R_X86_64_GOTTPOFF needs one dynamic relocation.  */
+      if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
+         || tls_type == GOT_TLS_IE)
+       htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+      else if (tls_type == GOT_TLS_GD)
+       htab->srelgot->_raw_size += 2 * sizeof (Elf64_External_Rela);
+      else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
        htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
     }
   else
@@ -1390,6 +1607,7 @@ elf64_x86_64_size_dynamic_sections (output_bfd, info)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
+      char *local_tls_type;
       bfd_size_type locsymcount;
       Elf_Internal_Shdr *symtab_hdr;
       asection *srel;
@@ -1432,15 +1650,20 @@ elf64_x86_64_size_dynamic_sections (output_bfd, info)
       symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
       locsymcount = symtab_hdr->sh_info;
       end_local_got = local_got + locsymcount;
+      local_tls_type = elf64_x86_64_local_got_tls_type (ibfd);
       s = htab->sgot;
       srel = htab->srelgot;
-      for (; local_got < end_local_got; ++local_got)
+      for (; local_got < end_local_got; ++local_got, ++local_tls_type)
        {
          if (*local_got > 0)
            {
              *local_got = s->_raw_size;
              s->_raw_size += GOT_ENTRY_SIZE;
-             if (info->shared)
+             if (*local_tls_type == GOT_TLS_GD)
+               s->_raw_size += GOT_ENTRY_SIZE;
+             if (info->shared
+                 || *local_tls_type == GOT_TLS_GD
+                 || *local_tls_type == GOT_TLS_IE)
                srel->_raw_size += sizeof (Elf64_External_Rela);
            }
          else
@@ -1448,6 +1671,17 @@ elf64_x86_64_size_dynamic_sections (output_bfd, info)
        }
     }
 
+  if (htab->tls_ld_got.refcount > 0)
+    {
+      /* Allocate 2 got entries and 1 dynamic reloc for R_X86_64_TLSLD
+        relocs.  */
+      htab->tls_ld_got.offset = htab->sgot->_raw_size;
+      htab->sgot->_raw_size += 2 * GOT_ENTRY_SIZE;
+      htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+    }
+  else
+    htab->tls_ld_got.offset = -1;
+
   /* Allocate global sym .plt and .got entries, and space for global
      sym dynamic relocs.  */
   elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
@@ -1558,6 +1792,38 @@ elf64_x86_64_size_dynamic_sections (output_bfd, info)
   return true;
 }
 
+/* Return the base VMA address which should be subtracted from real addresses
+   when resolving @dtpoff relocation.
+   This is PT_TLS segment p_vaddr.  */
+
+static bfd_vma
+dtpoff_base (info)
+     struct bfd_link_info *info;
+{
+  /* If tls_segment is NULL, we should have signalled an error already.  */
+  if (elf_hash_table (info)->tls_segment == NULL)
+    return 0;
+  return elf_hash_table (info)->tls_segment->start;
+}
+
+/* Return the relocation value for @tpoff relocation
+   if STT_TLS virtual address is ADDRESS.  */
+
+static bfd_vma
+tpoff (info, address)
+     struct bfd_link_info *info;
+     bfd_vma address;
+{
+  struct elf_link_tls_segment *tls_segment
+    = elf_hash_table (info)->tls_segment;
+
+  /* If tls_segment is NULL, we should have signalled an error already.  */
+  if (tls_segment == NULL)
+    return 0;
+  return address - align_power (tls_segment->size, tls_segment->align)
+        - tls_segment->start;
+}
+
 /* Relocate an x86_64 ELF section.  */
 
 static boolean
@@ -1591,7 +1857,7 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
   relend = relocs + input_section->reloc_count;
   for (; rel < relend; rel++)
     {
-      int r_type;
+      unsigned int r_type;
       reloc_howto_type *howto;
       unsigned long r_symndx;
       struct elf_link_hash_entry *h;
@@ -1601,13 +1867,14 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
       bfd_vma relocation;
       boolean unresolved_reloc;
       bfd_reloc_status_type r;
+      int tls_type;
 
       r_type = ELF64_R_TYPE (rel->r_info);
       if (r_type == (int) R_X86_64_GNU_VTINHERIT
          || r_type == (int) R_X86_64_GNU_VTENTRY)
        continue;
 
-      if (r_type < 0 || r_type >= R_X86_64_max)
+      if (r_type >= R_X86_64_max)
        {
          bfd_set_error (bfd_error_bad_value);
          return false;
@@ -1933,6 +2200,313 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
 
          break;
 
+       case R_X86_64_TLSGD:
+       case R_X86_64_GOTTPOFF:
+         r_type = elf64_x86_64_tls_transition (info, r_type, h == NULL);
+         tls_type = GOT_UNKNOWN;
+         if (h == NULL && local_got_offsets)
+           tls_type = elf64_x86_64_local_got_tls_type (input_bfd) [r_symndx];
+         else if (h != NULL)
+           {
+             tls_type = elf64_x86_64_hash_entry (h)->tls_type;
+             if (!info->shared && h->dynindx == -1 && tls_type == GOT_TLS_IE)
+               r_type = R_X86_64_TPOFF32;
+           }
+         if (r_type == R_X86_64_TLSGD)
+           {
+             if (tls_type == GOT_TLS_IE)
+               r_type = R_X86_64_GOTTPOFF;
+           }
+
+         if (r_type == R_X86_64_TPOFF32)
+           {
+             BFD_ASSERT (! unresolved_reloc);
+             if (ELF64_R_TYPE (rel->r_info) == R_X86_64_TLSGD)
+               {
+                 unsigned int i;
+                 static unsigned char tlsgd[7]
+                   = { 0x66, 0x66, 0x66, 0x66, 0x48, 0x8d, 0x3d };
+
+                 /* GD->LE transition.
+                    .long 0x66666666; leaq foo@tlsgd(%rip), %rdi
+                    callq __tls_get_addr@plt
+                    Change it into:
+                    movq %fs:0, %rax
+                    leaq foo@tpoff(%rax), %rax */
+                 BFD_ASSERT (rel->r_offset >= 7);
+                 for (i = 0; i < 7; i++)
+                   BFD_ASSERT (bfd_get_8 (input_bfd,
+                                          contents + rel->r_offset - 7 + i)
+                               == tlsgd[i]);
+                 BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size);
+                 BFD_ASSERT (bfd_get_8 (input_bfd,
+                                        contents + rel->r_offset + 4)
+                             == 0xe8);
+                 BFD_ASSERT (rel + 1 < relend);
+                 BFD_ASSERT (ELF64_R_TYPE (rel[1].r_info) == R_X86_64_PLT32);
+                 memcpy (contents + rel->r_offset - 7,
+                         "\x64\x48\x8b\x04\x25\0\0\0\0\x48\x8d\x80\0\0\0",
+                         16);
+                 bfd_put_32 (output_bfd, tpoff (info, relocation),
+                             contents + rel->r_offset + 5);
+                 /* Skip R_X86_64_PLT32.  */
+                 rel++;
+                 continue;
+               }
+             else
+               {
+                 unsigned int val, type, reg;
+
+                 /* IE->LE transition:
+                    Originally it can be one of:
+                    movq foo@gottpoff(%rip), %reg
+                    addq foo@gottpoff(%rip), %reg
+                    We change it into:
+                    movq $foo, %reg
+                    leaq foo(%reg), %reg
+                    addq $foo, %reg.  */
+                 BFD_ASSERT (rel->r_offset >= 3);
+                 val = bfd_get_8 (input_bfd, contents + rel->r_offset - 3);
+                 BFD_ASSERT (val == 0x48 || val == 0x4c);
+                 type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
+                 BFD_ASSERT (type == 0x8b || type == 0x03);
+                 reg = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
+                 BFD_ASSERT ((reg & 0xc7) == 5);
+                 reg >>= 3;
+                 BFD_ASSERT (rel->r_offset + 4 <= input_section->_raw_size);
+                 if (type == 0x8b)
+                   {
+                     /* movq */
+                     if (val == 0x4c)
+                       bfd_put_8 (output_bfd, 0x49,
+                                  contents + rel->r_offset - 3);
+                     bfd_put_8 (output_bfd, 0xc7,
+                                contents + rel->r_offset - 2);
+                     bfd_put_8 (output_bfd, 0xc0 | reg,
+                                contents + rel->r_offset - 1);
+                   }
+                 else if (reg == 4)
+                   {
+                     /* addq -> addq - addressing with %rsp/%r12 is
+                        special  */
+                     if (val == 0x4c)
+                       bfd_put_8 (output_bfd, 0x49,
+                                  contents + rel->r_offset - 3);
+                     bfd_put_8 (output_bfd, 0x81,
+                                contents + rel->r_offset - 2);
+                     bfd_put_8 (output_bfd, 0xc0 | reg,
+                                contents + rel->r_offset - 1);
+                   }
+                 else
+                   {
+                     /* addq -> leaq */
+                     if (val == 0x4c)
+                       bfd_put_8 (output_bfd, 0x4d,
+                                  contents + rel->r_offset - 3);
+                     bfd_put_8 (output_bfd, 0x8d,
+                                contents + rel->r_offset - 2);
+                     bfd_put_8 (output_bfd, 0x80 | reg | (reg << 3),
+                                contents + rel->r_offset - 1);
+                   }
+                 bfd_put_32 (output_bfd, tpoff (info, relocation),
+                             contents + rel->r_offset);
+                 continue;
+               }
+           }
+
+         if (htab->sgot == NULL)
+           abort ();
+
+         if (h != NULL)
+           off = h->got.offset;
+         else
+           {
+             if (local_got_offsets == NULL)
+               abort ();
+
+             off = local_got_offsets[r_symndx];
+           }
+
+         if ((off & 1) != 0)
+           off &= ~1;
+          else
+           {
+             Elf_Internal_Rela outrel;
+             Elf64_External_Rela *loc;
+             int dr_type, indx;
+
+             if (htab->srelgot == NULL)
+               abort ();
+
+             outrel.r_offset = (htab->sgot->output_section->vma
+                                + htab->sgot->output_offset + off);
+
+             indx = h && h->dynindx != -1 ? h->dynindx : 0;
+             if (r_type == R_X86_64_TLSGD)
+               dr_type = R_X86_64_DTPMOD64;
+             else
+               dr_type = R_X86_64_TPOFF64;
+
+             bfd_put_64 (output_bfd, 0, htab->sgot->contents + off);
+             outrel.r_addend = 0;
+             if (dr_type == R_X86_64_TPOFF64 && indx == 0)
+               outrel.r_addend = relocation - dtpoff_base (info);
+             outrel.r_info = ELF64_R_INFO (indx, dr_type);
+
+             loc = (Elf64_External_Rela *) htab->srelgot->contents;
+             loc += htab->srelgot->reloc_count++;
+             bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+
+             if (r_type == R_X86_64_TLSGD)
+               {
+                 if (indx == 0)
+                   {
+                     BFD_ASSERT (! unresolved_reloc);
+                     bfd_put_64 (output_bfd,
+                                 relocation - dtpoff_base (info),
+                                 htab->sgot->contents + off + GOT_ENTRY_SIZE);
+                   }
+                 else
+                   {
+                     bfd_put_64 (output_bfd, 0,
+                                 htab->sgot->contents + off + GOT_ENTRY_SIZE);
+                     outrel.r_info = ELF64_R_INFO (indx,
+                                                   R_X86_64_DTPOFF64);
+                     outrel.r_offset += GOT_ENTRY_SIZE;
+                     htab->srelgot->reloc_count++;
+                     loc++;
+                     bfd_elf64_swap_reloca_out (output_bfd, &outrel,
+                                                loc);
+                   }
+               }
+
+             if (h != NULL)
+               h->got.offset |= 1;
+             else
+               local_got_offsets[r_symndx] |= 1;
+           }
+
+         if (off >= (bfd_vma) -2)
+           abort ();
+         if (r_type == ELF64_R_TYPE (rel->r_info))
+           {
+             relocation = htab->sgot->output_section->vma
+                          + htab->sgot->output_offset + off;
+             unresolved_reloc = false;
+           }
+         else
+           {
+             unsigned int i;
+             static unsigned char tlsgd[7]
+               = { 0x66, 0x66, 0x66, 0x66, 0x48, 0x8d, 0x3d };
+
+             /* GD->IE transition.
+                .long 0x66666666; leaq foo@tlsgd(%rip), %rdi
+                callq __tls_get_addr@plt
+                Change it into:
+                movq %fs:0, %rax
+                addq foo@gottpoff(%rip), %rax */
+             BFD_ASSERT (rel->r_offset >= 7);
+             for (i = 0; i < 7; i++)
+               BFD_ASSERT (bfd_get_8 (input_bfd,
+                                      contents + rel->r_offset - 7 + i)
+                           == tlsgd[i]);
+             BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size);
+             BFD_ASSERT (bfd_get_8 (input_bfd,
+                                    contents + rel->r_offset + 4)
+                         == 0xe8);
+             BFD_ASSERT (rel + 1 < relend);
+             BFD_ASSERT (ELF64_R_TYPE (rel[1].r_info) == R_X86_64_PLT32);
+             memcpy (contents + rel->r_offset - 7,
+                     "\x64\x48\x8b\x04\x25\0\0\0\0\x48\x03\x05\0\0\0",
+                     16);
+
+             relocation = (htab->sgot->output_section->vma
+                           + htab->sgot->output_offset + off
+                           - rel->r_offset
+                           - input_section->output_section->vma
+                           - input_section->output_offset
+                           - 9);
+             bfd_put_32 (output_bfd, relocation,
+                         contents + rel->r_offset + 5);
+             /* Skip R_X86_64_PLT32.  */
+             rel++;
+             continue;
+           }
+         break;
+
+       case R_X86_64_TLSLD:
+         if (! info->shared)
+           {
+             /* LD->LE transition:
+                Ensure it is:
+                leaq foo@tlsld(%rip), %rdi; call __tls_get_addr@plt.
+                We change it into:
+                .word 0x6666; .byte 0x66; movl %fs:0, %rax.  */
+             BFD_ASSERT (rel->r_offset >= 3);
+             BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset - 3)
+                         == 0x48);
+             BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset - 2)
+                         == 0x8d);
+             BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset - 1)
+                         == 0x3d);
+             BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size);
+             BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset + 4)
+                         == 0xe8);
+             BFD_ASSERT (rel + 1 < relend);
+             BFD_ASSERT (ELF64_R_TYPE (rel[1].r_info) == R_X86_64_PLT32);
+             memcpy (contents + rel->r_offset - 3,
+                     "\x66\x66\x66\x64\x48\x8b\x04\x25\0\0\0", 12);
+             /* Skip R_X86_64_PLT32.  */
+             rel++;
+             continue;
+           }
+
+         if (htab->sgot == NULL)
+           abort ();
+
+         off = htab->tls_ld_got.offset;
+         if (off & 1)
+           off &= ~1;
+         else
+           {
+             Elf_Internal_Rela outrel;
+             Elf64_External_Rela *loc;
+
+             if (htab->srelgot == NULL)
+               abort ();
+
+             outrel.r_offset = (htab->sgot->output_section->vma
+                                + htab->sgot->output_offset + off);
+
+             bfd_put_64 (output_bfd, 0,
+                         htab->sgot->contents + off);
+             bfd_put_64 (output_bfd, 0,
+                         htab->sgot->contents + off + GOT_ENTRY_SIZE);
+             outrel.r_info = ELF64_R_INFO (0, R_X86_64_DTPMOD64);
+             outrel.r_addend = 0;
+             loc = (Elf64_External_Rela *) htab->srelgot->contents;
+             loc += htab->srelgot->reloc_count++;
+             bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+             htab->tls_ld_got.offset |= 1;
+           }
+         relocation = htab->sgot->output_section->vma
+                      + htab->sgot->output_offset + off;
+         unresolved_reloc = false;
+         break;
+
+       case R_X86_64_DTPOFF32:
+         if (info->shared)
+           relocation -= dtpoff_base (info);
+         else
+           relocation = tpoff (info, relocation);
+         break;
+
+       case R_X86_64_TPOFF32:
+         BFD_ASSERT (! info->shared);
+         relocation = tpoff (info, relocation);
+         break;
+
        default:
          break;
        }
@@ -2087,13 +2661,15 @@ elf64_x86_64_finish_dynamic_symbol (output_bfd, info, h, sym)
        }
     }
 
-  if (h->got.offset != (bfd_vma) -1)
+  if (h->got.offset != (bfd_vma) -1
+      && elf64_x86_64_hash_entry (h)->tls_type != GOT_TLS_GD
+      && elf64_x86_64_hash_entry (h)->tls_type != GOT_TLS_IE)
     {
       Elf_Internal_Rela rela;
       Elf64_External_Rela *loc;
 
       /* This symbol has an entry in the global offset table.  Set it
-         up.  */
+        up.  */
 
       if (htab->sgot == NULL || htab->srelgot == NULL)
        abort ();
@@ -2351,5 +2927,6 @@ elf64_x86_64_finish_dynamic_sections (output_bfd, info)
 #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_object_p               elf64_x86_64_elf_object_p
+#define bfd_elf64_mkobject                 elf64_x86_64_mkobject
 
 #include "elf64-target.h"
index ca72307710a9a124812ecbf6d013c4fbcbf05e51..4f54cd35ccc6276c867d417e7a87ded5ac696e46 100644 (file)
@@ -1377,7 +1377,7 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
   arelent *relent;
   unsigned int i;
   int entsize;
-  long symcount;
+  unsigned int symcount;
 
   allocated = (PTR) bfd_malloc (rel_hdr->sh_size);
   if (allocated == NULL)
@@ -1394,6 +1394,11 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
   BFD_ASSERT (entsize == sizeof (Elf_External_Rel)
              || entsize == sizeof (Elf_External_Rela));
 
+  if (dynamic)
+    symcount = bfd_get_dynamic_symcount (abfd);
+  else
+    symcount = bfd_get_symcount (abfd);
+
   for (i = 0, relent = relents;
        i < reloc_count;
        i++, relent++, native_relocs += entsize)
@@ -1420,11 +1425,6 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
       else
        relent->address = rela.r_offset - asect->vma;
 
-      if (dynamic)
-       symcount = bfd_get_dynamic_symcount (abfd);
-      else
-       symcount = bfd_get_symcount (abfd);
-
       if (ELF_R_SYM (rela.r_info) == 0)
        relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
       else if (ELF_R_SYM (rela.r_info) > symcount)
index 2df334b1e48fd216d6497ec548f3cc5def88470e..85160e90257c6f1261081d46044842d1d44f65e4 100644 (file)
@@ -8482,7 +8482,12 @@ elf_bfd_discard_info (output_bfd, info)
          if (_bfd_elf_discard_section_eh_frame (abfd, info, eh, ehdr,
                                                 elf_reloc_symbol_deleted_p,
                                                 &cookie))
-           ret = true;
+           {
+             /* Relocs have been edited.  Ensure edited version is
+                used later in relocate_section.  */
+             elf_section_data (eh)->relocs = cookie.rels;
+             ret = true;
+           }
          if (cookie.rels && elf_section_data (eh)->relocs != cookie.rels)
            free (cookie.rels);
        }
index 8da904be7772ddea7514733e70d45f51b0bdb6a9..72f9a6bfdee873325026988d57330bfa2cda1395 100644 (file)
@@ -3644,7 +3644,7 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
      sh_offset == object size, and ld doesn't allow that.  While the check
      is arguably bogus for empty or SHT_NOBITS sections, it can easily be
      avoided by not emitting those useless sections in the first place.  */
-  if ((IRIX_COMPAT (abfd) != ict_irix5 && (IRIX_COMPAT (abfd) != ict_irix6))
+  if (! SGI_COMPAT (abfd) && ! NEWABI_P(abfd)
       && (sec->flags & SEC_RELOC) != 0)
     {
       struct bfd_elf_section_data *esd;
index 3971ea6aa628006e23a836f38ddf39b2779c8029..96e55d7c54750b5685bc0d7ea4a614a473b9bf2c 100644 (file)
@@ -819,6 +819,14 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_X86_64_RELATIVE",
   "BFD_RELOC_X86_64_GOTPCREL",
   "BFD_RELOC_X86_64_32S",
+  "BFD_RELOC_X86_64_DTPMOD64",
+  "BFD_RELOC_X86_64_DTPOFF64",
+  "BFD_RELOC_X86_64_TPOFF64",
+  "BFD_RELOC_X86_64_TLSGD",
+  "BFD_RELOC_X86_64_TLSLD",
+  "BFD_RELOC_X86_64_DTPOFF32",
+  "BFD_RELOC_X86_64_GOTTPOFF",
+  "BFD_RELOC_X86_64_TPOFF32",
   "BFD_RELOC_NS32K_IMM_8",
   "BFD_RELOC_NS32K_IMM_16",
   "BFD_RELOC_NS32K_IMM_32",
index 4c32ca064ce5586aee50bd38f741cdf75aaa183e..27ce9a93a6732376c3ece6dd4cafcea36bb5eec8 100644 (file)
@@ -45,6 +45,7 @@ coff-sparc.c
 coff-stgo32.c
 coff-svm68k.c
 coff-tic30.c
+coff-tic4x.c
 coff-tic54x.c
 coff-tic80.c
 coff-u68k.c
@@ -98,6 +99,7 @@ cpu-s390.c
 cpu-sh.c
 cpu-sparc.c
 cpu-tic30.c
+cpu-tic4x.c
 cpu-tic54x.c
 cpu-tic80.c
 cpu-v850.c
@@ -135,6 +137,7 @@ elf32-h8300.c
 elf32-hppa.c
 elf32-hppa.h
 elf32-i370.c
+elf32-i386-fbsd.c
 elf32-i386.c
 elf32-i386qnx.c
 elf32-i860.c
@@ -151,6 +154,7 @@ elf32-openrisc.c
 elf32-or32.c
 elf32-pj.c
 elf32-ppc.c
+elf32-ppcqnx.c
 elf32-s390.c
 elf32-sh-lin.c
 elf32-sh-nbsd.c
@@ -158,11 +162,13 @@ elf32-sh.c
 elf32-sh64-com.c
 elf32-sh64-nbsd.c
 elf32-sh64.c
+elf32-shqnx.c
 elf32-sparc.c
 elf32-v850.c
 elf32-vax.c
 elf32-xstormy16.c
 elf32.c
+elf64-alpha-fbsd.c
 elf64-alpha.c
 elf64-gen.c
 elf64-hppa.c
@@ -178,10 +184,12 @@ elf64-x86-64.c
 elf64.c
 elfarm-nabi.c
 elfarm-oabi.c
+elfarmqnx-nabi.c
 elfcode.h
 elfcore.h
 elflink.c
 elflink.h
+elfn32-mips.c
 elfxx-mips.c
 epoc-pe-arm.c
 epoc-pei-arm.c
index 504359f2af1461fc67598706c83c9e678b4c50fb..71f17402be095b7508a2cdde607d3e212279e7a4 100644 (file)
@@ -2165,6 +2165,22 @@ ENUMX
   BFD_RELOC_X86_64_GOTPCREL
 ENUMX
   BFD_RELOC_X86_64_32S
+ENUMX
+  BFD_RELOC_X86_64_DTPMOD64
+ENUMX
+  BFD_RELOC_X86_64_DTPOFF64
+ENUMX
+  BFD_RELOC_X86_64_TPOFF64
+ENUMX
+  BFD_RELOC_X86_64_TLSGD
+ENUMX
+  BFD_RELOC_X86_64_TLSLD
+ENUMX
+  BFD_RELOC_X86_64_DTPOFF32
+ENUMX
+  BFD_RELOC_X86_64_GOTTPOFF
+ENUMX
+  BFD_RELOC_X86_64_TPOFF32
 ENUMDOC
   x86-64/elf relocations
 
index 1a7a14db9b5f205e535dfd0e63b5ce437c52909f..5a98d1c9699e74f252f11a986b6e67a7b1ac4ecf 100644 (file)
@@ -1 +1 @@
-#define BFD_VERSION_DATE 20020920
+#define BFD_VERSION_DATE 20020927
index 339b23d3e7e9fba21189cc627991c569822062d9..6d4b7fab9bdba71f3b32be6ef2cfb11110f88c2d 100755 (executable)
--- a/configure
+++ b/configure
@@ -1365,21 +1365,21 @@ EOF
                 rm -f ${subdir}/Makefile.tem
                 mv ${subdir}/Makefile.tm2 ${subdir}/Makefile.tem
            fi
-           sed     -e "s|^prefix[      ]*=.*$|prefix = ${prefix}|" \
-                    -e "s|^exec_prefix[        ]*=.*$|exec_prefix = ${exec_prefix}|" \
-                    -e "s|^bindir[     ]*=.*$|bindir = ${bindir}|" \
-                    -e "s|^sbindir[    ]*=.*$|sbindir = ${sbindir}|" \
-                    -e "s|^libexecdir[         ]*=.*$|libexecdir = ${libexecdir}|" \
-                    -e "s|^datadir[    ]*=.*$|datadir = ${datadir}|" \
-                    -e "s|^sysconfdir[         ]*=.*$|sysconfdir = ${sysconfdir}|" \
-                    -e "s|^sharedstatedir[     ]*=.*$|sharedstatedir = ${sharedstatedir}|" \
-                    -e "s|^localstatedir[      ]*=.*$|localstatedir = ${localstatedir}|" \
-                    -e "s|^libdir[     ]*=.*$|libdir = ${libdir}|" \
-                    -e "s|^includedir[         ]*=.*$|includedir = ${includedir}|" \
-                    -e "s|^oldincludedir[      ]*=.*$|oldincludedir = ${oldincludedir}|" \
-                    -e "s|^infodir[    ]*=.*$|infodir = ${infodir}|" \
-                    -e "s|^mandir[     ]*=.*$|mandir = ${mandir}|" \
-                   -e "s|^ALL_BUILD_MODULES =.*|ALL_BUILD_MODULES =${all_build_modules}|" \
+           sed     -e "s|@prefix@|${prefix}|" \
+                    -e "s|@exec_prefix@|${exec_prefix}|" \
+                    -e "s|@bindir@|${bindir}|" \
+                    -e "s|@sbindir@|${sbindir}|" \
+                    -e "s|@libexecdir@|${libexecdir}|" \
+                    -e "s|@datadir@|${datadir}|" \
+                    -e "s|@sysconfdir@|${sysconfdir}|" \
+                    -e "s|@sharedstatedir@|${sharedstatedir}|" \
+                    -e "s|@localstatedir@|${localstatedir}|" \
+                    -e "s|@libdir@|${libdir}|" \
+                    -e "s|@includedir@|${includedir}|" \
+                    -e "s|@oldincludedir@|${oldincludedir}|" \
+                    -e "s|@infodir@|${infodir}|" \
+                    -e "s|@mandir@|${mandir}|" \
+                   -e "s|@all_build_modules@|${all_build_modules}|" \
                    -e "/^CC[   ]*=/{
                        :loop1
                        /\\\\$/ N
@@ -1408,20 +1408,18 @@ EOF
                        t loop4
                        s%^CXXFLAGS[    ]*=.*$%CXXFLAGS = ${CXXFLAGS}%
                        }" \
-                   -e "s|^SHELL[        ]*=.*$|SHELL = ${config_shell}|" \
-                    -e "s|^srcdir[     ]*=.*$|srcdir = ${makesrcdir}|" \
+                   -e "s|@config_shell@|${config_shell}|" \
+                    -e "s|@srcdir@|${makesrcdir}|" \
                     -e "s/\f//" \
-                    -e "s:^program_prefix[     ]*=.*$:program_prefix = ${program_prefix}:" \
-                    -e "s:^program_suffix[     ]*=.*$:program_suffix = ${program_suffix}:" \
-                    -e "s:^program_transform_name[     ]*=.*$:program_transform_name = ${program_transform_name}:" \
-                    -e "s|^tooldir[    ]*=.*$|tooldir = ${tooldir}|" \
-                    -e "s|^build_tooldir[      ]*=.*$|build_tooldir = ${tooldir}|" \
-                   -e "s:^DEFAULT_YACC[         ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \
-                   -e "s:^DEFAULT_LEX[  ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
-                   -e "s:^DEFAULT_M4[  ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
+                    -e "s:@program_transform_name@:${program_transform_name}:" \
+                    -e "s|@tooldir@|${tooldir}|" \
+                    -e "s|@build_tooldir@|${tooldir}|" \
+                   -e "s:@DEFAULT_YACC@:${DEFAULT_YACC}:" \
+                   -e "s:@DEFAULT_LEX@:${DEFAULT_LEX}:" \
+                   -e "s:@DEFAULT_M4@:${DEFAULT_M4}:" \
                     ${subdir}/Makefile.tem >> ${Makefile}
   
-           sed -e "s:^GDB_TK[   ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem
+           sed -e "s:@GDB_TK@:${GDB_TK}:" ${Makefile} >${Makefile}.tem
            mv -f ${Makefile}.tem ${Makefile}
 
            # If this is a Canadian Cross, preset the values of many more
index a945dcb243275ff7992e3a890b23c8a375231f44..e4a3ae58c4d46d142a1886026d10985ef6554f0a 100644 (file)
@@ -80,22 +80,6 @@ target_tools="target-examples target-groff target-gperf"
 
 ################################################################################
 
-## These two lists are of directories that are to be removed from the
-## ${configdirs} list for either cross-compilations or for native-
-## compilations.  For example, it doesn't make that much sense to
-## cross-compile Emacs, nor is it terribly useful to compile target-libiberty in
-## a native environment.  
-
-# directories to be built in the native environment only
-#
-# This must be a single line because of the way it is searched by grep in
-# the code below.
-native_only="autoconf automake libtool fileutils find gawk gettext grep gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms snavigator gnuserv target-gperf"
-
-# directories to be built in a cross environment only
-#
-cross_only="target-libgloss target-newlib target-opcodes"
-
 ## All tools belong in one of the four categories, and are assigned above
 ## We assign ${configdirs} this way to remove all embedded newlines.  This
 ## is important because configure will choke if they ever get through.
@@ -184,8 +168,12 @@ case ${with_x} in
 esac
 
 # Some tools are only suitable for building in a "native" situation.
-# Remove these if host!=target.  Similarly, some are only suitable
-# for cross toolchains; remove if host=target.
+# Remove these if host!=target.  
+native_only="autoconf automake libtool fileutils find gawk gettext grep gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms snavigator gnuserv target-gperf"
+
+# Similarly, some are only suitable for cross toolchains.
+# Remove these if host=target.
+cross_only="target-libgloss target-newlib target-opcodes"
 
 case $is_cross_compiler in
   no) skipdirs="${skipdirs} ${cross_only}" ;;
@@ -277,7 +265,7 @@ case "${target}" in
     ;;
   *-*-netbsd*)
     # Skip some stuff on all NetBSD configurations.
-    skipdirs="$skipdirs target-newlib target-libiberty target-libgloss"
+    noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
 
     # Skip some stuff that's unsupported on some NetBSD configurations.
     case "${target}" in
@@ -333,7 +321,7 @@ case "${target}" in
     noconfigdirs="$noconfigdirs expect dejagnu"
     # the C++ libraries don't build on top of CE's C libraries
     noconfigdirs="$noconfigdirs ${libstdcxx_version}"
-    skipdirs="$skipdirs target-newlib"
+    noconfigdirs="$noconfigdirs target-newlib"
     case "${host}" in
       *-*-cygwin*) ;; # keep gdb and readline
       *) noconfigdirs="$noconfigdirs gdb readline ${libstdcxx_version}"
@@ -755,8 +743,7 @@ for dir in . $skipdirs $noconfigdirs ; do
   dirname=`echo $dir | sed -e s/target-//g`
   if test $dir != .  && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
     configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
-    if test -r $srcdir/$dirname/configure \
-       || test -r $srcdir/$dirname/configure.in ; then
+    if test -r $srcdir/$dirname/configure ; then
       if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
        true
       else
@@ -766,8 +753,7 @@ for dir in . $skipdirs $noconfigdirs ; do
   fi
   if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
     target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
-    if test -r $srcdir/$dirname/configure \
-       || test -r $srcdir/$dirname/configure.in ; then
+    if test -r $srcdir/$dirname/configure ; then
       if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
        true
       else
@@ -783,7 +769,7 @@ if test -n "${target_configdirs}" ; then
   others=
   for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
     if test "$i" != "libiberty" ; then
-      if test -r $srcdir/$i/configure || test -r $srcdir/$i/configure.in ; then
+      if test -r $srcdir/$i/configure ; then
        others=yes;
        break;
       fi
@@ -876,36 +862,41 @@ esac
 
 copy_dirs=
 
-# Handle --with-headers=XXX.  The contents of the named directory are
-# copied to $(tooldir)/sys-include.
+# Handle --with-headers=XXX.  If the value is not "yes", the contents of
+# the named directory are copied to $(tooldir)/sys-include.
 if test x"${with_headers}" != x ; then
   if test x${is_cross_compiler} = xno ; then
     echo 1>&2 '***' --with-headers is only supported when cross compiling
     exit 1
   fi
-  case "${exec_prefixoption}" in
-  "") x=${prefix} ;;
-  *) x=${exec_prefix} ;;
-  esac
-  copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
+  if test x"${with_headers}" != xyes ; then
+    case "${exec_prefixoption}" in
+    "") x=${prefix} ;;
+    *) x=${exec_prefix} ;;
+    esac
+    copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
+  fi
 fi
 
-# Handle --with-libs=XXX.  Multiple directories are permitted.  The
-# contents are copied to $(tooldir)/lib.
+# Handle --with-libs=XXX.  If the value is not "yes", the contents of
+# the name directories are copied to $(tooldir)/lib.  Multiple directories
+# are permitted.
 if test x"${with_libs}" != x ; then
   if test x${is_cross_compiler} = xno ; then
     echo 1>&2 '***' --with-libs is only supported when cross compiling
     exit 1
   fi
-  # Copy the libraries in reverse order, so that files in the first named
-  # library override files in subsequent libraries.
-  case "${exec_prefixoption}" in
-  "") x=${prefix} ;;
-  *) x=${exec_prefix} ;;
-  esac
-  for l in ${with_libs}; do
-    copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
-  done
+  if test x"${with_libs}" != xyes ; then
+    # Copy the libraries in reverse order, so that files in the first named
+    # library override files in subsequent libraries.
+    case "${exec_prefixoption}" in
+    "") x=${prefix} ;;
+    *) x=${exec_prefix} ;;
+    esac
+    for l in ${with_libs}; do
+      copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
+    done
+  fi
 fi
 
 # Handle ${copy_dirs}
@@ -1127,25 +1118,6 @@ if test -n "${host_makefile_frag}" ; then
   host_makefile_frag=mh-frag
 fi
 
-# If we aren't going to be using gcc, see if we can extract a definition
-# of CC from the fragment.
-# Actually, use the 'pre-extracted' version above.
-if test -z "${CC}" && test "${build}" = "${host}" ; then
-  IFS="${IFS=  }"; save_ifs="$IFS"; IFS="${IFS}:"
-  found=
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/gcc; then
-      found=yes
-      break
-    fi
-  done
-  IFS="$save_ifs"
-  if test -z "${found}" && test -n "${tentative_cc}" ; then
-    CC=$tentative_cc
-  fi
-fi
-
 case "${target}" in
   v810*)
     target_makefile_frag="config/mt-v810"
@@ -1282,6 +1254,25 @@ case "${host}" in
     ;;
 esac
 
+# If we aren't going to be using gcc, see if we can extract a definition
+# of CC from the fragment.
+# Actually, use the 'pre-extracted' version above.
+if test -z "${CC}" && test "${build}" = "${host}" ; then
+  IFS="${IFS=  }"; save_ifs="$IFS"; IFS="${IFS}:"
+  found=
+  for dir in $PATH; do
+    test -z "$dir" && dir=.
+    if test -f $dir/gcc; then
+      found=yes
+      break
+    fi
+  done
+  IFS="$save_ifs"
+  if test -z "${found}" && test -n "${tentative_cc}" ; then
+    CC=$tentative_cc
+  fi
+fi
+
 # post-target:
 
 # Make sure that the compiler is able to generate an executable.  If it
@@ -1551,17 +1542,17 @@ qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
 
 sedtemp=sed.$$
 cat >$sedtemp <<EOF
-s:^TARGET_CONFIGDIRS[  ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:
-s%^TARGET_CONFIGARGS[  ]*=.*$%TARGET_CONFIGARGS = ${targargs}%
-s%^FLAGS_FOR_TARGET[   ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%
-s%^CC_FOR_TARGET[      ]*=.*$%CC_FOR_TARGET = \$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}%
-s%^GCJ_FOR_TARGET[      ]*=.*$%GCJ_FOR_TARGET = \$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}%
-s%^CXX_FOR_TARGET[     ]*=.*$%CXX_FOR_TARGET = \$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}%
-s%^CXX_FOR_TARGET_FOR_RECURSIVE_MAKE[  ]*=.*$%CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = \$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}%
-s%^TARGET_SUBDIR[      ]*=.*$%TARGET_SUBDIR = ${target_subdir}%
-s%^BUILD_SUBDIR[       ]*=.*$%BUILD_SUBDIR = ${build_subdir}%
-s%^BUILD_CONFIGARGS[   ]*=.*$%BUILD_CONFIGARGS = ${buildargs}%
-s%^gxx_include_dir[    ]*=.*$%gxx_include_dir=${gxx_include_dir}%
+s:@target_configdirs@:${target_configdirs}:
+s%@target_configargs@%${targargs}%
+s%@FLAGS_FOR_TARGET@%${FLAGS_FOR_TARGET}%
+s%@CC_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}%
+s%@GCJ_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}%
+s%@CXX_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}%
+s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}%
+s%@target_subdir@%${target_subdir}%
+s%@build_subdir@%${build_subdir}%
+s%@build_configargs@%${buildargs}%
+s%@gxx_include_dir@%${gxx_include_dir}%
 EOF
 sed -f $sedtemp Makefile > Makefile.tem
 rm -f Makefile $sedtemp
index 336c0aa210da15462aa3474c34c000a01b8af3d0..5a2d8d5d874ec6d4a3b2288c56179df1b0a765cf 100644 (file)
@@ -1,3 +1,148 @@
+2002-09-27  David Carlton  <carlton@math.stanford.edu>
+
+       * Makefile.in (cris-tdep.o): Depend on gdb_string_h.
+       (mcore-tdep.o): Ditto.
+       (ns32k-tdep.o): Ditto.
+       (ns32knbsd-tdep.o): Ditto.
+       (sh3-rom.o): Ditto.
+       (vax-tdep.o): Ditto.
+       * cris-tdep.c: #include "gdb_string.h"
+       * mcore-tdep.c: Ditto.
+       * ns32k-tdep.c: Ditto.
+       * ns32knbsd-tdep.c: Ditto.
+       * sh3-rom.c: Ditto.
+       * vax-tdep.c: Ditto.
+
+2002-09-27  David Carlton  <carlton@math.stanford.edu>
+
+       * config/djgpp/fnchange.lst: Add entries for
+       gdb/testsuite/gdb.c++/m-static files.
+
+2002-09-27  Jim Wilson  <wilson@redhat.com>
+
+       * MAINTAINERS: Add myself to the Write After Approval list.
+
+2002-09-26  Martin M. Hunt  <hunt@redhat.com>
+
+       * mips-tdep.c (find_proc_desc): Initialize startaddr.
+
+
+2002-09-26  Andrew Cagney  <ac131313@redhat.com>
+
+       * rs6000-tdep.c (rs6000_frame_chain): Don't chain past the dummy
+       frame.
+
+2002-09-26  Andrew Cagney  <ac131313@redhat.com>
+
+       * rs6000-tdep.c (rs6000_extract_struct_value_address): Return 0.
+       (rs6000_struct_return_address): Delete variable.
+       (rs6000_store_struct_return): Update.
+       (rs6000_gdbarch_init): Set extract_struct_value_address instead of
+       deprecated_extract_struct_value_address.
+       (rs6000_frame_align): New function.
+       (rs6000_gdbarch_init): Set frame_align.
+
+2002-09-26  Andrew Cagney  <ac131313@redhat.com>
+
+       From Grace Sainsbury <graces@redhat.com>:
+       * Makefile.in (gdbtk-main.o): New target.
+       (gdb.o): New target.
+       (main_h): Define.
+       (main.o): Update dependencies.
+       (gdb$(EXEEXT)): Add gdb.o.
+       (SUBDIR_GDBTK_SRCS): Add gdbtk-main.c.
+       (SUBDIR_GDBTK_ALL, SUBDIR_GDBTK_UNINSTALL): Set.
+       (SUBDIR_GDBTK_CLEAN): Set.
+       (install-gdbtk): Install the insight binary.
+       (uninstall-gdbtk): New target.
+       (all-gdbtk, clean-gdbtk): New rule.
+       * top.c (use_windows): Default to zero.
+       * main.c: Include "main.h".
+       (main): Delete.
+       (struct captured_main_args): Delete.
+       (gdb_main): New function.
+       * main.h: New file.
+       * gdb.c: New File.
+
+2002-09-25  Andrew Cagney  <cagney@redhat.com>
+
+       * frame.c: Include "gdb_string.h" and "builtin-regs.h".
+       (frame_map_regnum_to_name): New function.
+       (frame_map_name_to_regnum): New function.
+       * frame.h (frame_map_name_to_regnum): Declare.
+       (frame_map_regnum_to_name): Declare.
+       * builtin-regs.c (builtin_reg_map_regnum_to_name): New function.
+       * builtin-regs.h (builtin_reg_map_regnum_to_name): Declare.
+       * parse.c: Do not include "builtin-regs.h".
+       (target_map_name_to_register): Delete function.
+       (write_dollar_variable): Use frame_map_name_to_regnum.
+       * parser-defs.h (target_map_name_to_register): Delete declaration.
+       * expprint.c: Include "frame.h".
+       (print_subexp): Use frame_map_regnum_to_name.
+       * eval.c (evaluate_subexp_standard): Use frame_map_regnum_to_name.
+       * infcmd.c (registers_info): Use frame_map_name_to_regnum.
+
+2002-09-25  Andrew Cagney  <ac131313@redhat.com>
+
+       * rs6000-tdep.c (rs6000_frame_saved_pc): If the link register
+       wasn't saved, and the next innermost frame is a dummy, return the
+       dummy frame's link register.
+
+2002-09-24  Jim Blandy  <jimb@redhat.com>
+
+       Fix from Paul Breed:
+       * main.c (captured_main): Add a `break' after the case for 'b'.
+
+2002-09-24  Keith Seitz  <keiths@redhat.com>
+
+       * varobj.c (c_type_of_child): Use get_target_type instead
+       of TYPE_TARGET_TYPE.
+
+2002-09-22  Fernando Nasser  <fnasser@redhat.com>
+
+       * source.c (get_current_or_default_source_symtab_and_line): Remove
+       function.
+       (set_default_source_symtab_and_line): New function. Attempts to
+       determine a source file to list lines from if one is not currently
+       defined.
+       (get_current_source_symtab_and_line): Initialize sal.pc and
+        sal.end fields.
+       (set_current_source_symtab_and_line): Mark argument as const.
+       * source.h: Update declarations and comments.
+       * linespec.c (decode_line_1): Replace call to removed routine above.
+       * stack.c (print_frame_info_base): Ditto.
+       * cli/cli-cmds.c (edit_command): Ditto.
+       (list_command): Ditto.
+
+2002-09-22  Fernando Nasser  <fnasser@redhat.com>
+
+       * source.c (get_current__or_default_source_symtab_and_line): Initialize
+       sal.pc and sal.end fields.
+       (get_current_or_default_source_symtab_and_line): Ditto.
+       * breakpoint.c (parse_breakpoint_sals): Use correct accessor function
+       so we do not cause a new source symtab to be searched for (reverting an
+       unintentional change from the 2002-09-20 patch).
+       * scm-lang.c (scm_unpac): Ditto.
+
+2002-09-21  Andrew Cagney  <cagney@redhat.com>
+
+       * complaints.c (symfile_explanations): Remove new-line from
+       ``isolated_message''.
+       (vcomplaint): When ISOLATED_MESSAGE, force a line break.
+       (clear_complaints): When a SUBSEQUENT_MESSAGE, force a line break.
+
+2002-09-20  Nick Clifton  <nickc@redhat.com>
+       
+       * NEWS: Announce that V850EA ISA is no longer supported.
+        * v850-tdep.c: Remove reference to bfd_mach_v850ea.
+
+2002-09-20  David Carlton  <carlton@math.stanford.edu>
+
+       * Makefile.in (c-lang.o): Correct dependencies.
+       (utils.o): Gather dependencies.
+       (charset.o): Move.
+       * c-lang.c: #include "gdb_string.h"
+
 2002-09-26  David Carlton  <carlton@math.stanford.edu>
 
        * dictionary.c (dict_iter_name_first): New function.
        * dwarf2read.c (psymtab_to_symtab_1): Ditto.
        * dbxread.c (dbx_psymtab_to_symtab_1): Ditto.
 
-2002-09-20  David Carlton  <carlton@math.stanford.edu>
-
-       * Makefile.in (c-lang.o): Correct dependencies.
-       (utils.o): Gather dependencies.
-       (charset.o): Move.
-       * c-lang.c: #include "gdb_string.h"
-
 2002-09-20  Fernando Nasser  <fnasser@redhat.com>
 
        From 2002-07-02  George Helffrich <george@gly.bris.ac.uk>
index 94f1bb17a3c55f32d89220c987b5b5cdebb2e6d3..710609d1f7794bb1a742e9bac0015e7cdbda299f 100644 (file)
@@ -430,6 +430,7 @@ Jason Thorpe                                        thorpej@wasabisystems.com
 Tom Tromey                                     tromey@redhat.com
 Corinna Vinschen                               vinschen@redhat.com
 Keith Walker                                   keith.walker@arm.com
+Jim Wilson                                     wilson@redhat.com
 Elena Zannoni                                  ezannoni@redhat.com
 Eli Zaretskii                                  eliz@gnu.org
 
index 34ecbe49d5a00cafd5f6aaf536f168148b639e90..7537ecbf20be5b7b782c4485ef1dfe4afd06abce 100644 (file)
@@ -290,16 +290,17 @@ SUBDIR_GDBTK_SRCS = \
        gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-bp.c \
        gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c \
        gdbtk/generic/gdbtk-register.c gdbtk/generic/gdbtk-stack.c \
-       gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c
+       gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c \
+       gdbtk/generic/gdbtk-main.c
 SUBDIR_GDBTK_DEPS = \
        $(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)
 SUBDIR_GDBTK_INITS = gdbtk/generic/gdbtk.c
 SUBDIR_GDBTK_LDFLAGS=
 SUBDIR_GDBTK_CFLAGS= -DGDBTK
-SUBDIR_GDBTK_ALL=
-SUBDIR_GDBTK_CLEAN=
+SUBDIR_GDBTK_ALL= all-gdbtk
+SUBDIR_GDBTK_CLEAN= clean-gdbtk
 SUBDIR_GDBTK_INSTALL= install-gdbtk
-SUBDIR_GDBTK_UNINSTALL= 
+SUBDIR_GDBTK_UNINSTALL= uninstall-gdbtk
 
 CONFIG_OBS= @CONFIG_OBS@
 CONFIG_LIB_OBS= @CONFIG_LIB_OBS@
@@ -681,6 +682,7 @@ m2_lang_h = m2-lang.h
 macroexp_h = macroexp.h
 macroscope_h = macroscope.h $(macrotab_h) $(symtab_h)
 macrotab_h = macrotab.h
+main_h = main.h
 memattr_h = memattr.h
 minimon_h = minimon.h
 mipsnbsd_tdep_h = mipsnbsd-tdep.h
@@ -931,25 +933,8 @@ uninstall: force $(CONFIG_UNINSTALL)
                  true ; \
                fi ; \
                rm -f $(bindir)/$$transformed_name$(EXEEXT) $(man1dir)/$$transformed_name.1
-       rm -rf $(GDBTK_LIBRARY)
        @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do 
 
-install-gdbtk:
-       $(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY) ; \
-       $(SHELL) $(srcdir)/../mkinstalldirs $(libdir)/insight$(GDBTK_VERSION) ; \
-       $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl $(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \
-       $(SHELL) $(srcdir)/../mkinstalldirs \
-               $(GDBTK_LIBRARY)/images \
-               $(GDBTK_LIBRARY)/images2 ; \
-       $(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY)/help \
-               $(GDBTK_LIBRARY)/help/images \
-               $(GDBTK_LIBRARY)/help/trace ; \
-       cd $(srcdir)/gdbtk/library ; \
-       for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html  help/trace/*.html help/trace/index.toc help/images/*.gif; \
-         do \
-               $(INSTALL_DATA) $$i $(GDBTK_LIBRARY)/$$i ; \
-         done ;
-
 # We do this by grepping through sources.  If that turns out to be too slow,
 # maybe we could just require every .o file to have an initialization routine
 # of a given name (top.o -> _initialize_top, etc.).
@@ -1019,11 +1004,11 @@ init.c: $(INIT_FILES)
 init.o: init.c $(defs_h) $(call_cmds_h)
 
 # Removing the old gdb first works better if it is running, at least on SunOS.
-gdb$(EXEEXT): main.o libgdb.a $(CONFIG_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
+gdb$(EXEEXT): gdb.o main.o libgdb.a $(CONFIG_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
        rm -f gdb$(EXEEXT)
-       $(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -o gdb$(EXEEXT) \
-       main.o libgdb.a $(CONFIG_OBS) $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS)\
-       $(LOADLIBES)
+       $(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
+               -o gdb$(EXEEXT) gdb.o main.o $(CONFIG_OBS) libgdb.a \
+               $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
 
 nlm:   force
        rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do
@@ -1695,6 +1680,7 @@ frv-tdep.o: frv-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
        $(arch_utils_h) $(regcache_h)
 gcore.o: gcore.c $(defs_h) $(cli_decode_h) $(inferior_h) $(gdbcore_h) \
        $(elf_bfd_h) $(symfile_h) $(objfiles_h)
+gdb.o: gdb.c $(defs_h) $(main_h) $(gdb_string_h)
 gdb-events.o: gdb-events.c $(defs_h) $(gdb_events_h) $(gdbcmd_h)
 gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \
        $(gdb_string_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \
@@ -1888,7 +1874,7 @@ macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) \
        $(bcache_h) $(complaints_h)
 main.o: main.c $(defs_h) $(top_h) $(target_h) $(inferior_h) $(symfile_h) \
        $(gdbcore_h) $(getopt_h) $(gdb_stat_h) $(gdb_string_h) \
-       $(event_loop_h) $(ui_out_h)
+       $(event_loop_h) $(ui_out_h) $(main_h)
 maint.o: maint.c $(defs_h) $(command_h) $(gdbcmd_h) $(symtab_h) \
        $(gdbtypes_h) $(demangle_h) $(gdbcore_h) $(expression_h) \
        $(language_h) $(symfile_h) $(objfiles_h) $(value_h) $(cli_decode_h)
@@ -2348,6 +2334,55 @@ cli-utils.o: $(srcdir)/cli/cli-utils.c $(defs_h) $(cli_utils_h)
 # Need to explicitly specify the compile rule as make will do nothing
 # or try to compile the object file into the mi directory.
 
+all-gdbtk: insight$(EXEEXT)
+
+install-gdbtk:
+       transformed_name=`t='$(program_transform_name)'; \
+                 echo insight | sed -e $$t` ; \
+       if test "x$$transformed_name" = x; then \
+         transformed_name=insight ; \
+       else \
+         true ; \
+       fi ; \
+       $(SHELL) $(srcdir)/../mkinstalldirs $(bindir)
+       $(INSTALL_PROGRAM) insight$(EXEEXT) $(bindir)/$$transformed_name$(EXEEXT) ; \
+       $(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY) ; \
+       $(SHELL) $(srcdir)/../mkinstalldirs $(libdir)/insight$(GDBTK_VERSION) ; \
+       $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl $(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \
+       $(SHELL) $(srcdir)/../mkinstalldirs \
+               $(GDBTK_LIBRARY)/images \
+               $(GDBTK_LIBRARY)/images2 ; \
+       $(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY)/help \
+               $(GDBTK_LIBRARY)/help/images \
+               $(GDBTK_LIBRARY)/help/trace ; \
+       cd $(srcdir)/gdbtk/library ; \
+       for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html  help/trace/*.html help/trace/index.toc help/images/*.gif; \
+         do \
+               $(INSTALL_DATA) $$i $(GDBTK_LIBRARY)/$$i ; \
+         done ;
+
+uninstall-gdbtk:
+       transformed_name=`t='$(program_transform_name)'; \
+                 echo insight | sed -e $$t` ; \
+       if test "x$$transformed_name" = x; then \
+               transformed_name=insight ; \
+       else \
+               true ; \
+       fi ; \
+       rm -f $(bindir)/$$transformed_name$(EXEEXT) ; \
+       rm -rf $(GDBTK_LIBRARY)
+
+clean-gdbtk:
+       rm -f insight$(EXEEXT)
+
+# Removing the old gdb first works better if it is running, at least on SunOS.
+insight$(EXEEXT): gdbtk-main.o main.o libgdb.a $(CONFIG_OBS) $(ADD_DEPS) \
+               $(CDEPS) $(TDEPLIBS)
+       rm -f insight$(EXEEXT)
+       $(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
+               -o insight$(EXEEXT) gdbtk-main.o main.o libgdb.a $(CONFIG_OBS)\
+               $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
+
 gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico
        $(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o
 
@@ -2391,6 +2426,12 @@ gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c \
        $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
                $(srcdir)/gdbtk/generic/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
 
+gdbtk-main.o: $(srcdir)/gdbtk/generic/gdbtk-main.c $(defs_h) $(main_h) \
+       $(gdb_string_h)
+       $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
+       $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
+               $(srcdir)/gdbtk/generic/gdbtk-main.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
+
 gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c \
                $(srcdir)/gdbtk/generic/gdbtk.h \
                $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
@@ -2596,7 +2637,6 @@ xdr_rdb.o: vx-share/xdr_rdb.c $(defs_h) vx-share/vxTypes.h \
        vx-share/vxWorks.h vx-share/xdr_rdb.h
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_rdb.c
 
-
 # Compiles and then runs a subset of the tests.
 carlton: all
        cd testsuite; ./carlton_runtest
index bbd70c4534cf113c0bfe223d810ad0c0fb158186..8dfa54ce5da88ecce679830823d302a0f37a26d0 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,10 @@
 
 *** Changes since GDB 5.3:
 
+* REMOVED configurations and files
+
+V850EA ISA                             
+
 * MIPS $fp behavior changed
 
 The convenience variable $fp, for the MIPS, now consistently returns
index adc3956e0c7c53fbfaa7ce391496c167a271224a..d52153f7f400cf78a72091feac6443a92da26d7e 100644 (file)
@@ -4621,8 +4621,7 @@ parse_breakpoint_sals (char **address,
          should produce the results we want almost all of the time while
          leaving default_breakpoint_* alone.  */
         
-      struct symtab_and_line cursal = 
-                       get_current_or_default_source_symtab_and_line ();
+      struct symtab_and_line cursal = get_current_source_symtab_and_line ();
                        
       if (default_breakpoint_valid
          && (!cursal.symtab
index 8c488e3a55770aca7d58e65af101e7bfbf4a936f..07e5fcca58a334ec124292ff42cc0e50ddc12e49 100644 (file)
@@ -68,6 +68,15 @@ builtin_reg_map_name_to_regnum (const char *name, int len)
   return -1;
 }
 
+const char *
+builtin_reg_map_regnum_to_name (int regnum)
+{
+  int reg = regnum - (NUM_REGS + NUM_PSEUDO_REGS);
+  if (reg < 0 || reg >= nr_builtin_regs)
+    return NULL;
+  return builtin_regs[reg].name;
+}
+
 struct value *
 value_of_builtin_reg (int regnum, struct frame_info *frame)
 {
index b35c4e91362236612b99157490012a7c3865487e..fb9fbcf8f8ed4091636de909192b4f5fc253af9d 100644 (file)
@@ -26,6 +26,8 @@
 
 extern int builtin_reg_map_name_to_regnum (const char *str, int len);
 
+extern const char *builtin_reg_map_regnum_to_name (int regnum);
+
 extern struct value *value_of_builtin_reg (int regnum,
                                           struct frame_info *frame);
 
index 0b5b857c98fd6c01a8752f09e1c9ba1b5bc17edd..c44975adebf838f183f6e04c90f45a67d1b32a39 100644 (file)
@@ -552,7 +552,10 @@ edit_command (char *arg, int from_tty)
 
   /* Pull in the current default source line if necessary */
   if (arg == 0)
-    sal = get_current_or_default_source_symtab_and_line ();
+    {
+      set_default_source_symtab_and_line ();
+      sal = get_current_source_symtab_and_line ();
+    }
 
   /* bare "edit" edits file with present line.  */
 
@@ -655,7 +658,10 @@ list_command (char *arg, int from_tty)
 
   /* Pull in the current default source line if necessary */
   if (arg == 0 || arg[0] == '+' || arg[0] == '-')
-    cursal = get_current_or_default_source_symtab_and_line ();
+    {
+      set_default_source_symtab_and_line ();
+      cursal = get_current_source_symtab_and_line ();
+    }
 
   /* "l" or "l +" lists next ten lines.  */
 
index 95ded4c4a8a982c1e5599cb47635c3cf86e4dba0..84cf6a2e30308a66e348eb6f67a5e2145482d6fa 100644 (file)
@@ -84,7 +84,7 @@ static struct complain complaint_sentinel;
 /* The symbol table complaint table.  */
 
 static const char *symfile_explanations[] = {
-  "During symbol reading, %s.\n",
+  "During symbol reading, %s.",
   "During symbol reading...%s...",
   "%s...",
   "%s...",
@@ -181,6 +181,7 @@ vcomplaint (struct complaints **c, const char *file, int line, const char *fmt,
   else
     {
       if (complaints->explanation == NULL)
+       /* A [v]warning() call always appends a newline.  */
        vwarning (complaint->fmt, args);
       else
        {
@@ -194,7 +195,17 @@ vcomplaint (struct complaints **c, const char *file, int line, const char *fmt,
          fprintf_filtered (gdb_stderr,
                            complaints->explanation[series],
                            msg);
-         wrap_here ("");
+         /* Force a line-break after any isolated message.  For the
+             other cases, clear_complaints() takes care of any missing
+             trailing newline, the wrap_here() is just a hint.  */
+         if (series == ISOLATED_MESSAGE)
+           /* It would be really nice to use begin_line() here.
+              Unfortunatly that function doesn't track GDB_STDERR and
+              consequently will sometimes supress a line when it
+              shouldn't.  */
+           fputs_filtered ("\n", gdb_stderr);
+         else
+           wrap_here ("");
          do_cleanups (cleanups);
        }
     }
@@ -267,10 +278,26 @@ clear_complaints (struct complaints **c, int less_verbose, int noisy)
       p->counter = 0;
     }
 
-  if (complaints->series > 1 && !warning_hook)
+  switch (complaints->series)
     {
-      /* Terminate previous series, since caller won't.  */
-      puts_filtered ("\n");
+    case FIRST_MESSAGE:
+      /* Haven't yet printed anything.  */
+      break;
+    case SHORT_FIRST_MESSAGE:
+      /* Haven't yet printed anything.  */
+      break;
+    case ISOLATED_MESSAGE:
+      /* The code above, always forces a line-break.  No need to do it
+         here.  */
+      break;
+    case SUBSEQUENT_MESSAGE:
+      /* It would be really nice to use begin_line() here.
+         Unfortunatly that function doesn't track GDB_STDERR and
+         consequently will sometimes supress a line when it shouldn't.  */
+      fputs_unfiltered ("\n", gdb_stderr);
+      break;
+    default:
+      internal_error (__FILE__, __LINE__, "bad switch");
     }
 
   if (!less_verbose)
index 0671a129dade3411745617cb081168f9cd0cd7dd..b8a9eb8ea68fdc608a94f2cd56315a64a5b956c0 100644 (file)
 @V@/gdb/testsuite/gdb.c++/inherit.exp @V@/gdb/testsuite/gdb.cxx/inherit.exp
 @V@/gdb/testsuite/gdb.c++/local.cc @V@/gdb/testsuite/gdb.cxx/local.cc
 @V@/gdb/testsuite/gdb.c++/local.exp @V@/gdb/testsuite/gdb.cxx/local.exp
+@V@/gdb/testsuite/gdb.c++/m-static.cc @V@/gdb/testsuite/gdb.cxx/m-static.cc
+@V@/gdb/testsuite/gdb.c++/m-static1.cc @V@/gdb/testsuite/gdb.cxx/m-stat1.cc
+@V@/gdb/testsuite/gdb.c++/m-static.exp @V@/gdb/testsuite/gdb.cxx/m-static.exp
+@V@/gdb/testsuite/gdb.c++/m-static.h @V@/gdb/testsuite/gdb.cxx/m-static.h
 @V@/gdb/testsuite/gdb.c++/member-ptr.cc @V@/gdb/testsuite/gdb.cxx/member-ptr.cc
 @V@/gdb/testsuite/gdb.c++/member-ptr.exp @V@/gdb/testsuite/gdb.cxx/member-ptr.exp
 @V@/gdb/testsuite/gdb.c++/method.cc @V@/gdb/testsuite/gdb.cxx/method.cc
index 71df0d0200b97c60f958bc1eb1f1009bd2e39f3d..362e05679fb1f5d545878a89872b34477eb002df 100644 (file)
@@ -1,3 +1,29 @@
+2002-09-27  Andrew Cagney  <ac131313@redhat.com>
+
+       * all-cfg.texi: Use @sc for GDB and GCC.  Update copyright.
+
+2002-09-25  Kevin Buettner  <kevinb@redhat.com>
+
+       * gdb.texinfo: Use GNU/Linux instead of Linux.
+
+2002-09-25  Andrew Cagney  <ac131313@redhat.com>
+
+       * gdb.texinfo (Packets): Replace @samp{} with ``an empty string''.
+
+2002-09-24  Andrew Cagney  <ac131313@redhat.com>
+
+       * gdb.texinfo: Replace @example with @smallexample.
+
+2002-09-20  Kevin Buettner  <kevinb@redhat.com>
+
+       From Eli Zaretskii  <eliz@is.elta.co.il>:
+       * gdb.texinfo (Character Sets): Use @smallexample instead of
+       @example.  Use GNU/Linux instead of Linux.
+
+2002-09-20  Jim Blandy  <jimb@redhat.com>
+
+       * gdb.texinfo: Add character set documentation.
+
 2002-09-19  Andrew Cagney  <ac131313@redhat.com>
 
        * gdb.texinfo (Packets): Revise `z' and `Z' packet documentation.
index 6dee4e4ef678e6d2db8c041447d052c29e1870b6..b680ea2b49254d26517a208fb8243eb9f5820509 100644 (file)
@@ -1,5 +1,6 @@
 @c GDB MANUAL configuration file.  
-@c Copyright 1993, 1995, 1999 Free Software Foundation, Inc.
+@c
+@c Copyright 1993, 1995, 1999, 2002 Free Software Foundation, Inc.
 @c
 @c NOTE: While the GDB manual is configurable (by changing these
 @c switches), its configuration is ***NOT*** automatically tied in to
 @set GDBP gdb
 @c 
 @c Name of GDB product.  Used in running text.
-@set GDBN GDB
+@set GDBN @sc{gdb}
 @c
 @c Name of host.  Should not be used in generic configs, but generic
 @c value may catch some flubs.
 @set HOST machine specific
 @c
 @c Name of GCC product
-@set NGCC GCC
+@set NGCC @sc{gcc}
 @c 
 @c Name of GCC program
 @set GCC gcc
-
index ceaa21a14bc19a2b82f0da3dd01f7ff689d1705d..7e93c229491dd8235bdbe5d3a0816772a9e37686 100644 (file)
@@ -395,7 +395,7 @@ Tim Tucker contributed support for the Gould NP1 and Gould Powernode.
 Pace Willison contributed Intel 386 support.
 Jay Vosburgh contributed Symmetry support.
 
-Andreas Schwab contributed M68K Linux support.
+Andreas Schwab contributed M68K @sc{gnu}/Linux support.
 
 Rich Schaefer and Peter Schauer helped with support of SunOS shared
 libraries.
@@ -2622,7 +2622,7 @@ times slower than normal execution.  (But this may still be worth it, to
 catch errors where you have no clue what part of your program is the
 culprit.)
 
-On some systems, such as HP-UX, Linux and some other x86-based targets,
+On some systems, such as HP-UX, @sc{gnu}/Linux and some other x86-based targets,
 @value{GDBN} includes support for
 hardware watchpoints, which do not slow down the running of your
 program.
@@ -4206,26 +4206,24 @@ You can customize @value{GDBN} to use any editor you want
 @footnote{
 The only restriction is that your editor (say @code{ex}), recognizes the
 following command-line syntax:
-@example
+@smallexample
 ex +@var{number} file
-@end example
-The optional numeric value +@var{number} designates the active line in the file.
-}.
-By default, it is @value{EDITOR}, but you can change this by setting the
-environment variable @code{EDITOR} before using
-@value{GDBN}.
-For example, to configure @value{GDBN} to use the @code{vi} editor, you
-could use these commands with the @code{sh} shell:
-@example
+@end smallexample
+The optional numeric value +@var{number} designates the active line in
+the file.}.  By default, it is @value{EDITOR}, but you can change this
+by setting the environment variable @code{EDITOR} before using
+@value{GDBN}.  For example, to configure @value{GDBN} to use the
+@code{vi} editor, you could use these commands with the @code{sh} shell:
+@smallexample
 EDITOR=/usr/bin/vi
 export EDITOR
 gdb ...
-@end example
+@end smallexample
 or in the @code{csh} shell,
-@example
+@smallexample
 setenv EDITOR /usr/bin/vi
 gdb ...
-@end example
+@end smallexample
 
 @node Search
 @section Searching source files
@@ -4493,6 +4491,8 @@ Table}.
 * Vector Unit::                 Vector Unit
 * Memory Region Attributes::    Memory region attributes
 * Dump/Restore Files::          Copy between memory and a file
+* Character Sets::              Debugging programs that use a different
+                                character set than GDB does
 @end menu
 
 @node Expressions
@@ -5879,6 +5879,254 @@ the @var{bias} argument is applied.
 
 @end table
 
+@node Character Sets
+@section Character Sets
+@cindex character sets
+@cindex charset
+@cindex translating between character sets
+@cindex host character set
+@cindex target character set
+
+If the program you are debugging uses a different character set to
+represent characters and strings than the one @value{GDBN} uses itself,
+@value{GDBN} can automatically translate between the character sets for
+you.  The character set @value{GDBN} uses we call the @dfn{host
+character set}; the one the inferior program uses we call the
+@dfn{target character set}.
+
+For example, if you are running @value{GDBN} on a @sc{gnu}/Linux system, which
+uses the ISO Latin 1 character set, but you are using @value{GDBN}'s
+remote protocol (@pxref{Remote,Remote Debugging}) to debug a program
+running on an IBM mainframe, which uses the @sc{ebcdic} character set,
+then the host character set is Latin-1, and the target character set is
+@sc{ebcdic}.  If you give @value{GDBN} the command @code{set
+target-charset ebcdic-us}, then @value{GDBN} translates between
+@sc{ebcdic} and Latin 1 as you print character or string values, or use
+character and string literals in expressions.
+
+@value{GDBN} has no way to automatically recognize which character set
+the inferior program uses; you must tell it, using the @code{set
+target-charset} command, described below.
+
+Here are the commands for controlling @value{GDBN}'s character set
+support:
+
+@table @code
+@item set target-charset @var{charset}
+@kindex set target-charset
+Set the current target character set to @var{charset}.  We list the
+character set names @value{GDBN} recognizes below, but if you invoke the
+@code{set target-charset} command with no argument, @value{GDBN} lists
+the character sets it supports.
+@end table
+
+@table @code
+@item set host-charset @var{charset}
+@kindex set host-charset
+Set the current host character set to @var{charset}.
+
+By default, @value{GDBN} uses a host character set appropriate to the
+system it is running on; you can override that default using the
+@code{set host-charset} command.
+
+@value{GDBN} can only use certain character sets as its host character
+set.  We list the character set names @value{GDBN} recognizes below, and
+indicate which can be host character sets, but if you invoke the
+@code{set host-charset} command with no argument, @value{GDBN} lists the
+character sets it supports, placing an asterisk (@samp{*}) after those
+it can use as a host character set.
+
+@item set charset @var{charset}
+@kindex set charset
+Set the current host and target character sets to @var{charset}.  If you
+invoke the @code{set charset} command with no argument, it lists the
+character sets it supports.  @value{GDBN} can only use certain character
+sets as its host character set; it marks those in the list with an
+asterisk (@samp{*}).
+
+@item show charset
+@itemx show host-charset
+@itemx show target-charset
+@kindex show charset
+@kindex show host-charset
+@kindex show target-charset
+Show the current host and target charsets.  The @code{show host-charset}
+and @code{show target-charset} commands are synonyms for @code{show
+charset}.
+
+@end table
+
+@value{GDBN} currently includes support for the following character
+sets:
+
+@table @code
+
+@item ASCII
+@cindex ASCII character set
+Seven-bit U.S. @sc{ascii}.  @value{GDBN} can use this as its host
+character set.
+
+@item ISO-8859-1
+@cindex ISO 8859-1 character set
+@cindex ISO Latin 1 character set
+The ISO Latin 1 character set.  This extends ASCII with accented
+characters needed for French, German, and Spanish.  @value{GDBN} can use
+this as its host character set.
+
+@item EBCDIC-US
+@itemx IBM1047
+@cindex EBCDIC character set
+@cindex IBM1047 character set
+Variants of the @sc{ebcdic} character set, used on some of IBM's
+mainframe operating systems.  (@sc{gnu}/Linux on the S/390 uses U.S. @sc{ascii}.)
+@value{GDBN} cannot use these as its host character set.
+
+@end table
+
+Note that these are all single-byte character sets.  More work inside
+GDB is needed to support multi-byte or variable-width character
+encodings, like the UTF-8 and UCS-2 encodings of Unicode.
+
+Here is an example of @value{GDBN}'s character set support in action.
+Assume that the following source code has been placed in the file
+@file{charset-test.c}:
+
+@smallexample
+#include <stdio.h>
+
+char ascii_hello[]
+  = @{72, 101, 108, 108, 111, 44, 32, 119,
+     111, 114, 108, 100, 33, 10, 0@};
+char ibm1047_hello[]
+  = @{200, 133, 147, 147, 150, 107, 64, 166,
+     150, 153, 147, 132, 90, 37, 0@};
+
+main ()
+@{
+  printf ("Hello, world!\n");
+@}
+@end smallexample
+
+In this program, @code{ascii_hello} and @code{ibm1047_hello} are arrays
+containing the string @samp{Hello, world!} followed by a newline,
+encoded in the @sc{ascii} and @sc{ibm1047} character sets.
+
+We compile the program, and invoke the debugger on it:
+
+@smallexample
+$ gcc -g charset-test.c -o charset-test
+$ gdb -nw charset-test
+GNU gdb 2001-12-19-cvs
+Copyright 2001 Free Software Foundation, Inc.
+@dots{}
+(gdb) 
+@end smallexample
+
+We can use the @code{show charset} command to see what character sets
+@value{GDBN} is currently using to interpret and display characters and
+strings:
+
+@smallexample
+(gdb) show charset
+The current host and target character set is `iso-8859-1'.
+(gdb) 
+@end smallexample
+
+For the sake of printing this manual, let's use @sc{ascii} as our
+initial character set:
+@smallexample
+(gdb) set charset ascii
+(gdb) show charset
+The current host and target character set is `ascii'.
+(gdb) 
+@end smallexample
+
+Let's assume that @sc{ascii} is indeed the correct character set for our
+host system --- in other words, let's assume that if @value{GDBN} prints
+characters using the @sc{ascii} character set, our terminal will display
+them properly.  Since our current target character set is also
+@sc{ascii}, the contents of @code{ascii_hello} print legibly:
+
+@smallexample
+(gdb) print ascii_hello
+$1 = 0x401698 "Hello, world!\n"
+(gdb) print ascii_hello[0]
+$2 = 72 'H'
+(gdb) 
+@end smallexample
+
+@value{GDBN} uses the target character set for character and string
+literals you use in expressions:
+
+@smallexample
+(gdb) print '+'
+$3 = 43 '+'
+(gdb) 
+@end smallexample
+
+The @sc{ascii} character set uses the number 43 to encode the @samp{+}
+character.
+
+@value{GDBN} relies on the user to tell it which character set the
+target program uses.  If we print @code{ibm1047_hello} while our target
+character set is still @sc{ascii}, we get jibberish:
+
+@smallexample
+(gdb) print ibm1047_hello
+$4 = 0x4016a8 "\310\205\223\223\226k@@\246\226\231\223\204Z%"
+(gdb) print ibm1047_hello[0]
+$5 = 200 '\310'
+(gdb) 
+@end smallexample
+
+If we invoke the @code{set target-charset} command without an argument,
+@value{GDBN} tells us the character sets it supports:
+
+@smallexample
+(gdb) set target-charset
+Valid character sets are:
+  ascii *
+  iso-8859-1 *
+  ebcdic-us  
+  ibm1047  
+* - can be used as a host character set
+@end smallexample
+
+We can select @sc{ibm1047} as our target character set, and examine the
+program's strings again.  Now the @sc{ascii} string is wrong, but
+@value{GDBN} translates the contents of @code{ibm1047_hello} from the
+target character set, @sc{ibm1047}, to the host character set,
+@sc{ascii}, and they display correctly:
+
+@smallexample
+(gdb) set target-charset ibm1047
+(gdb) show charset
+The current host character set is `ascii'.
+The current target character set is `ibm1047'.
+(gdb) print ascii_hello
+$6 = 0x401698 "\110\145%%?\054\040\167?\162%\144\041\012"
+(gdb) print ascii_hello[0]
+$7 = 72 '\110'
+(gdb) print ibm1047_hello
+$8 = 0x4016a8 "Hello, world!\n"
+(gdb) print ibm1047_hello[0]
+$9 = 200 'H'
+(gdb)
+@end smallexample
+
+As above, @value{GDBN} uses the target character set for character and
+string literals you use in expressions:
+
+@smallexample
+(gdb) print '+'
+$10 = 78 '+'
+(gdb) 
+@end smallexample
+
+The IBM1047 character set uses the number 78 to encode the @samp{+}
+character.
+
+
 @node Macros
 @chapter C Preprocessor Macros
 
@@ -10946,7 +11194,7 @@ this facility, the command @code{info proc} is available to report on
 several kinds of information about the process running your program.
 @code{info proc} works only on SVR4 systems that include the
 @code{procfs} code.  This includes OSF/1 (Digital Unix), Solaris, Irix,
-and Unixware, but not HP-UX or Linux, for example.
+and Unixware, but not HP-UX or @sc{gnu}/Linux, for example.
 
 @table @code
 @kindex info proc
@@ -15023,9 +15271,9 @@ watchpoint starting at address @var{address} and covering the next
 Each breakpoint and watchpoint packet @var{type} is documented
 separately.
 
-@emph{Implementation notes: A remote target shall return @samp{} for an
-unrecognized breakpoint or watchpoint packet @var{type}.  A remote
-target shall support either both or neither of a given
+@emph{Implementation notes: A remote target shall return an empty string
+for an unrecognized breakpoint or watchpoint packet @var{type}.  A
+remote target shall support either both or neither of a given
 @code{Z}@var{type}@dots{} and @code{z}@var{type}@dots{} packet pair.  To
 avoid potential problems with duplicate packets, the operations should
 be implemented in an idempotent way.}
index 33ec9438a04c8ef7dad5d8ca65ab7b59eda00acd..cbcf862e53a478975c271647680cb54076000ee8 100644 (file)
@@ -448,7 +448,8 @@ evaluate_subexp_standard (struct type *expect_type,
        struct value *val = value_of_register (regno, selected_frame);
        (*pos) += 2;
        if (val == NULL)
-         error ("Value of register %s not available.", REGISTER_NAME (regno));
+         error ("Value of register %s not available.",
+                frame_map_regnum_to_name (regno));
        else
          return val;
       }
index 9f3f17153214f75364fae4e390b8cd31c7ce9c70..aa8b87620128b45f5a50d4d4ba204f03dc24bac5 100644 (file)
@@ -26,6 +26,7 @@
 #include "value.h"
 #include "language.h"
 #include "parser-defs.h"
+#include "frame.h"             /* For frame_map_regnum_to_name.  */
 
 #ifdef HAVE_CTYPE_H
 #include <ctype.h>
@@ -119,10 +120,12 @@ print_subexp (register struct expression *exp, register int *pos,
       return;
 
     case OP_REGISTER:
-      (*pos) += 2;
-      fprintf_filtered (stream, "$%s",
-             REGISTER_NAME (longest_to_int (exp->elts[pc + 1].longconst)));
-      return;
+      {
+       int regnum = longest_to_int (exp->elts[pc + 1].longconst);
+       (*pos) += 2;
+       fprintf_filtered (stream, "$%s", frame_map_regnum_to_name (regnum));
+       return;
+      }
 
     case OP_BOOL:
       (*pos) += 2;
index 82754ef1ce57c430373a1b20c572c799606755d5..1ad3b09f3bd10ed282ee6546cfd9dbf6a5fe7e79 100644 (file)
@@ -27,6 +27,8 @@
 #include "inferior.h"  /* for inferior_ptid */
 #include "regcache.h"
 #include "gdb_assert.h"
+#include "gdb_string.h"
+#include "builtin-regs.h"
 
 /* Return a frame uniq ID that can be used to, later re-find the
    frame.  */
@@ -233,3 +235,44 @@ frame_register_read (struct frame_info *frame, int regnum, void *myaddr)
 
   return !optim;
 }
+
+
+/* Map between a frame register number and its name.  A frame register
+   space is a superset of the cooked register space --- it also
+   includes builtin registers.  */
+
+int
+frame_map_name_to_regnum (const char *name, int len)
+{
+  int i;
+
+  /* Search register name space. */
+  for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
+    if (REGISTER_NAME (i) && len == strlen (REGISTER_NAME (i))
+       && strncmp (name, REGISTER_NAME (i), len) == 0)
+      {
+       return i;
+      }
+
+  /* Try builtin registers.  */
+  i = builtin_reg_map_name_to_regnum (name, len);
+  if (i >= 0)
+    {
+      /* A builtin register doesn't fall into the architecture's
+         register range.  */
+      gdb_assert (i >= NUM_REGS + NUM_PSEUDO_REGS);
+      return i;
+    }
+
+  return -1;
+}
+
+const char *
+frame_map_regnum_to_name (int regnum)
+{
+  if (regnum < 0)
+    return NULL;
+  if (regnum < NUM_REGS + NUM_PSEUDO_REGS)
+    return REGISTER_NAME (regnum);
+  return builtin_reg_map_regnum_to_name (regnum);
+}
index df2a0215f1dfe80e3308a3aea4d0e8b26b2e65c7..79bb3d95a6f55db2cf861103d855d4796ebb32d2 100644 (file)
@@ -366,4 +366,11 @@ extern void get_saved_register (char *raw_buffer, int *optimized,
 extern int frame_register_read (struct frame_info *frame, int regnum,
                                void *buf);
 
+/* Map between a frame register number and its name.  A frame register
+   space is a superset of the cooked register space --- it also
+   includes builtin registers.  */
+
+extern int frame_map_name_to_regnum (const char *name, int strlen);
+extern const char *frame_map_regnum_to_name (int regnum);
+
 #endif /* !defined (FRAME_H)  */
index 95636ca466619d7bddf5a406221a9fb9c41277a0..a1d030bbce55d8edd11b00349a7dfec82fe194e0 100644 (file)
@@ -1701,7 +1701,7 @@ registers_info (char *addr_exp, int fpregs)
        ++end;
       numregs = NUM_REGS + NUM_PSEUDO_REGS;
 
-      regnum = target_map_name_to_register (addr_exp, end - addr_exp);
+      regnum = frame_map_name_to_regnum (addr_exp, end - addr_exp);
       if (regnum >= 0)
        goto found;
 
index d1bb4e3328f419d9f572822e21a2b53a796ffdfe..5631fd31433a6a82c850da184a1bdd98edbfd60f 100644 (file)
@@ -1027,13 +1027,16 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
       /* This is where we need to make sure that we have good defaults.
          We must guarantee that this section of code is never executed
          when we are called with just a function name, since
-        get_current_or_default_source_symtab_and_line uses
+        set_default_source_symtab_and_line uses
          select_source_symtab that calls us with such an argument  */
 
       if (s == 0 && default_symtab == 0)
        {
-          struct symtab_and_line cursal =
-                 get_current_or_default_source_symtab_and_line ();
+          struct symtab_and_line cursal;
+
+         /* Make sure we have at least a default source file. */
+         set_default_source_symtab_and_line ();
+          cursal = get_current_source_symtab_and_line ();
       
           default_symtab = cursal.symtab;
           default_line = cursal.line;
index 61479e8f1e68864cb326c0e569310d21c66c9a7e..eb88747d19b7fccfb40132468f3d6baf405d3c6f 100644 (file)
@@ -37,6 +37,8 @@
 #include "event-loop.h"
 #include "ui-out.h"
 
+#include "main.h"
+
 /* If nonzero, display time usage both at startup and for each command.  */
 
 int display_time;
@@ -108,12 +110,6 @@ captured_command_loop (void *data)
   return 1;
 }
 
-struct captured_main_args
-  {
-    int argc;
-    char **argv;
-  };
-
 static int
 captured_main (void *data)
 {
@@ -397,6 +393,7 @@ extern int gdbtk_test (char *);
              else
                baud_rate = i;
            }
+            break;
          case 'l':
            {
              int i;
@@ -735,12 +732,10 @@ extern int gdbtk_test (char *);
 }
 
 int
-main (int argc, char **argv)
+gdb_main (struct captured_main_args *args)
 {
-  struct captured_main_args args;
-  args.argc = argc;
-  args.argv = argv;
-  catch_errors (captured_main, &args, "", RETURN_MASK_ALL);
+  use_windows = args->use_windows;
+  catch_errors (captured_main, args, "", RETURN_MASK_ALL);
   return 0;
 }
 
index d3f86c82b5ae13ffcfd920fa0676d24cb153c267..a5d7af194d84bbc61b6a667221102429990ab13a 100644 (file)
@@ -1,3 +1,15 @@
+2002-09-27  Andrew Cagney  <ac131313@redhat.com>
+
+       From 2002-07-12 Mo DeJong <supermo@bayarea.net>
+       * gdbmi.texinfo (var-evaluate-expression): Note that
+       var-list-children must be invoked before child variable
+       values can be evaluated.
+
+2002-09-26  Elena Zannoni  <ezannoni@redhat.com>
+
+        * mi-cmd-disas.c (dump_insns): Add text only output for CLI.
+        (do_mixed_source_and_assembly): Ditto.
+
 2002-09-23  David Carlton  <carlton@math.stanford.edu>
 
        * mi-cmd-stack.c (list_args_or_locals): Update use of
index a71b7026964601bb88bac498e4780fea1ca533de..6145dcf81e638be1a5d9473e7b1ea0b81eab046a 100644 (file)
@@ -3786,6 +3786,9 @@ for the object:
  value=@var{value}
 @end example
 
+Note that one must invoke @code{-var-list-children} for a variable
+before the value of a child variable can be evaluated.
+
 @subheading The @code{-var-assign} Command
 @findex -var-assign
 
index 028dc0758f30eb4943b9597d9782395d6c5c6879..85328d7cc17091397462d0e19ef8ac24f1b14113 100644 (file)
@@ -115,8 +115,11 @@ dump_insns (disassemble_info * di, CORE_ADDR low, CORE_ADDR high,
        {
          /* We don't care now about line, filename and
             unmapped. But we might in the future. */
+         ui_out_text (uiout, " <");
          ui_out_field_string (uiout, "func-name", name);
+         ui_out_text (uiout, "+");
          ui_out_field_int (uiout, "offset", offset);
+         ui_out_text (uiout, ">:\t");
        }
       if (filename != NULL)
        xfree (filename);
@@ -128,6 +131,7 @@ dump_insns (disassemble_info * di, CORE_ADDR low, CORE_ADDR high,
       ui_out_field_stream (uiout, "inst", stb);
       ui_file_rewind (stb->stream);
       ui_out_tuple_end (uiout);
+      ui_out_text (uiout, "\n");
     }
   return num_displayed;
 }
@@ -257,6 +261,7 @@ do_mixed_source_and_assembly (struct disassemble_info *di, int nlines,
        {
          ui_out_list_end (uiout);
          ui_out_tuple_end (uiout);
+         ui_out_text (uiout, "\n");
          close_list = 0;
        }
       if (how_many >= 0)
index f54f19c2ad702be0bbd7679550925b9476ff1698..95b288ce6da7c1dbd51e80a5d9343829bac47b33 100644 (file)
@@ -2336,7 +2336,7 @@ static mips_extra_func_info_t
 find_proc_desc (CORE_ADDR pc, struct frame_info *next_frame, int cur_frame)
 {
   mips_extra_func_info_t proc_desc;
-  CORE_ADDR startaddr;
+  CORE_ADDR startaddr = 0;
 
   proc_desc = non_heuristic_proc_desc (pc, &startaddr);
 
index c5de0af33346a8a9e6af646c54f28021dbcb8841..29b8e3c3709a003299e9d78c3bc0fd00b40a855e 100644 (file)
@@ -47,7 +47,6 @@
 #include "inferior.h"          /* for NUM_PSEUDO_REGS.  NOTE: replace 
                                   with "gdbarch.h" when appropriate.  */
 #include "doublest.h"
-#include "builtin-regs.h"
 #include "gdb_assert.h"
 
 \f
@@ -106,42 +105,6 @@ struct funcall
 
 static struct funcall *funcall_chain;
 
-/* The generic method for targets to specify how their registers are
-   named.  The mapping can be derived from two sources: REGISTER_NAME;
-   or builtin regs.  */
-
-int
-target_map_name_to_register (char *str, int len)
-{
-  int i;
-
-  /* Search register name space. */
-  for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
-    if (REGISTER_NAME (i) && len == strlen (REGISTER_NAME (i))
-       && STREQN (str, REGISTER_NAME (i), len))
-      {
-       return i;
-      }
-
-  /* Try builtin registers.  */
-  i = builtin_reg_map_name_to_regnum (str, len);
-  if (i >= 0)
-    {
-      gdb_assert (i >= NUM_REGS + NUM_PSEUDO_REGS);
-      return i;
-    }
-
-  /* Try builtin registers.  */
-  i = builtin_reg_map_name_to_regnum (str, len);
-  if (i >= 0)
-    {
-      gdb_assert (i >= NUM_REGS + NUM_PSEUDO_REGS);
-      return i;
-    }
-
-  return -1;
-}
-
 /* Begin counting arguments for a function call,
    saving the data about any containing call.  */
 
@@ -491,7 +454,7 @@ write_dollar_variable (struct stoken str)
 
   /* Handle tokens that refer to machine registers:
      $ followed by a register name.  */
-  i = target_map_name_to_register (str.ptr + 1, str.length - 1);
+  i = frame_map_name_to_regnum (str.ptr + 1, str.length - 1);
   if (i >= 0)
     goto handle_register;
 
index 748208ae6d1ecac55b32649f86a7ae0737e8c8a2..b522241a464c1cfe3f6a88f36d4db6910e24a65b 100644 (file)
@@ -210,12 +210,6 @@ struct op_print
     int right_assoc;
   };
 
-/* The generic method for targets to specify how their registers are
-   named.  The mapping can be derived from two sources: REGISTER_NAME;
-   and builtin regs. */
-
-extern int target_map_name_to_register (char *, int);
-
 /* Function used to avoid direct calls to fprintf
    in the code generated by the bison parser.  */
 
index 2df49e136fae00f316ffdd2bd742287041fb0ad0..e6a68ef202b7d079983895b3946277597ae1757b 100644 (file)
@@ -1032,6 +1032,13 @@ rs6000_fix_call_dummy (char *dummyname, CORE_ADDR pc, CORE_ADDR fun,
     }
 }
 
+/* All the ABI's require 16 byte alignment.  */
+static CORE_ADDR
+rs6000_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
+{
+  return (addr & -16);
+}
+
 /* Pass the arguments in either registers, or in the stack. In RS/6000,
    the first eight words of the argument list (that might be less than
    eight parameters if some parameters occupy more than one word) are
@@ -1363,13 +1370,6 @@ rs6000_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
     }
 }
 
-/* Keep structure return address in this variable.
-   FIXME:  This is a horrid kludge which should not be allowed to continue
-   living.  This only allows a single nested call to a structure-returning
-   function.  Come on, guys!  -- gnu@cygnus.com, Aug 92  */
-
-static CORE_ADDR rs6000_struct_return_address;
-
 /* Return whether handle_inferior_event() should proceed through code
    starting at PC in function NAME when stepping.
 
@@ -1527,6 +1527,16 @@ rs6000_frame_saved_pc (struct frame_info *fi)
       if (fi->next->signal_handler_caller)
        return read_memory_addr (fi->next->frame + SIG_FRAME_LR_OFFSET,
                                 wordsize);
+      else if (PC_IN_CALL_DUMMY (get_next_frame (fi)->pc, 0, 0))
+       /* The link register wasn't saved by this frame and the next
+           (inner, newer) frame is a dummy.  Get the link register
+           value by unwinding it from that [dummy] frame.  */
+       {
+         ULONGEST lr;
+         frame_unwind_unsigned_register (get_next_frame (fi),
+                                         tdep->ppc_lr_regnum, &lr);
+         return lr;
+       }
       else
        return read_memory_addr (FRAME_CHAIN (fi) + tdep->lr_frame_offset,
                                 wordsize);
@@ -1731,7 +1741,9 @@ rs6000_frame_chain (struct frame_info *thisframe)
   int wordsize = gdbarch_tdep (current_gdbarch)->wordsize;
 
   if (PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame))
-    return thisframe->frame;   /* dummy frame same as caller's frame */
+    /* A dummy frame always correctly chains back to the previous
+       frame.  */
+    return read_memory_addr ((thisframe)->frame, wordsize);
 
   if (inside_entry_file (thisframe->pc) ||
       thisframe->pc == entry_point_address ())
@@ -1748,13 +1760,6 @@ rs6000_frame_chain (struct frame_info *thisframe)
     fp = FRAME_FP (thisframe);
   else
     fp = read_memory_addr ((thisframe)->frame, wordsize);
-
-  lr = read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum);
-  if (lr == entry_point_address ())
-    if (fp != 0 && (fpp = read_memory_addr (fp, wordsize)) != 0)
-      if (PC_IN_CALL_DUMMY (lr, fpp, fpp))
-       return fpp;
-
   return fp;
 }
 
@@ -1979,18 +1984,12 @@ rs6000_stab_reg_to_regnum (int num)
 }
 
 /* Store the address of the place in which to copy the structure the
-   subroutine will return.  This is called from call_function.
-
-   In RS/6000, struct return addresses are passed as an extra parameter in r3.
-   In function return, callee is not responsible of returning this address
-   back.  Since gdb needs to find it, we will store in a designated variable
-   `rs6000_struct_return_address'.  */
+   subroutine will return.  */
 
 static void
 rs6000_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
 {
   write_register (3, addr);
-  rs6000_struct_return_address = addr;
 }
 
 /* Write into appropriate registers a function return value
@@ -2048,9 +2047,20 @@ rs6000_store_return_value (struct type *type, char *valbuf)
    as a CORE_ADDR (or an expression that can be used as one).  */
 
 static CORE_ADDR
-rs6000_extract_struct_value_address (char *regbuf)
-{
-  return rs6000_struct_return_address;
+rs6000_extract_struct_value_address (struct regcache *regcache)
+{
+  /* FIXME: cagney/2002-09-26: PR gdb/724: When making an inferior
+     function call GDB knows the address of the struct return value
+     and hence, should not need to call this function.  Unfortunately,
+     the current hand_function_call() code only saves the most recent
+     struct address leading to occasional calls.  The code should
+     instead maintain a stack of such addresses (in the dummy frame
+     object).  */
+  /* NOTE: cagney/2002-09-26: Return 0 which indicates that we've
+     really got no idea where the return value is being stored.  While
+     r3, on function entry, contained the address it will have since
+     been reused (scratch) and hence wouldn't be valid */
+  return 0;
 }
 
 /* Return whether PC is in a dummy function call.
@@ -2877,6 +2887,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
   set_gdbarch_fix_call_dummy (gdbarch, rs6000_fix_call_dummy);
+  set_gdbarch_frame_align (gdbarch, rs6000_frame_align);
   set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
   set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
   set_gdbarch_push_return_address (gdbarch, ppc_push_return_address);
@@ -2900,7 +2911,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
     set_gdbarch_push_arguments (gdbarch, rs6000_push_arguments);
 
   set_gdbarch_store_struct_return (gdbarch, rs6000_store_struct_return);
-  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
+  set_gdbarch_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
   set_gdbarch_pop_frame (gdbarch, rs6000_pop_frame);
 
   set_gdbarch_skip_prologue (gdbarch, rs6000_skip_prologue);
index 318a51d9def8984c9f52b39ba980c3882a241c76..5b2f0c5b6653733b5534a661f4b6f402ec506256 100644 (file)
@@ -134,8 +134,7 @@ scm_unpack (struct type *type, char *valaddr, enum type_code context)
 static int
 in_eval_c (void)
 {
-  struct symtab_and_line cursal =
-         get_current_or_default_source_symtab_and_line ();
+  struct symtab_and_line cursal = get_current_source_symtab_and_line ();
   
   if (cursal.symtab && cursal.symtab->filename)
     {
index e5d99d3db09b4b34ee2d0ffa783e555b21eaa3a6..5c88a55db812ab2bb20102aa9a302d23e1c72416 100644 (file)
@@ -152,21 +152,22 @@ get_current_source_symtab_and_line (void)
 
   cursal.symtab = current_source_symtab;
   cursal.line = current_source_line;
+  cursal.pc = 0;
+  cursal.end = 0;
   
   return cursal;
 }
 
-/* Return the current source file for listing and next line to list.
-   If a file is not set, try and get a default.
+/* If the current source file for listing is not set, try and get a default.
+   Usually called before get_current_source_symtab_and_line() is called.
    It may err out if a default cannot be determined.
-   Depending on where it is called, it can recurse as the process of
-   determining a new default may call the caler!
-   Use get_current_source_symtab_and_line instead to get whatever
-   we have without erroring out or trying to get a default.
-   NOTE: The returned sal pc and end fields are not valid. */
+   We must be cautious about where it is called, as it can recurse as the
+   process of determining a new default may call the caller!
+   Use get_current_source_symtab_and_line only to get whatever
+   we have without erroring out or trying to get a default. */
    
-struct symtab_and_line
-get_current_or_default_source_symtab_and_line (void)
+void
+set_default_source_symtab_and_line (void)
 {
   struct symtab_and_line cursal;
 
@@ -176,19 +177,15 @@ get_current_or_default_source_symtab_and_line (void)
   /* Pull in a current source symtab if necessary */
   if (current_source_symtab == 0)
     select_source_symtab (0);
-  
-  cursal.symtab = current_source_symtab;
-  cursal.line = current_source_line;
-  
-  return cursal;
 }
 
 /* Return the current default file for listing and next line to list
    (the returned sal pc and end fields are not valid.)
-   and set the surrent default to whatever is in SAL */
+   and set the current default to whatever is in SAL.
+   NOTE: The returned sal pc and end fields are not valid. */
    
 struct symtab_and_line
-set_current_source_symtab_and_line (struct symtab_and_line *sal)
+set_current_source_symtab_and_line (const struct symtab_and_line *sal)
 {
   struct symtab_and_line cursal;
   
@@ -197,6 +194,8 @@ set_current_source_symtab_and_line (struct symtab_and_line *sal)
 
   current_source_symtab = sal->symtab;
   current_source_line = sal->line;
+  cursal.pc = 0;
+  cursal.end = 0;
   
   return cursal;
 }
index 84cd0ff1a161b4da10f2acbd38ec8dae562a958d..ba7d45f5260c8ebdb13bf653d406cbbc13df9600 100644 (file)
@@ -44,23 +44,23 @@ extern int get_lines_to_list (void);
 
 /* Return the current source file for listing and next line to list.
    NOTE: The returned sal pc and end fields are not valid. */
-extern void clear_current_source_symtab_and_line (void);
+extern struct symtab_and_line get_current_source_symtab_and_line (void);
 
-/* Return the current source file for listing and next line to list.
-   If a file is not set, try and get a default.
+/* If the current source file for listing is not set, try and get a default.
+   Usually called before get_current_source_symtab_and_line() is called.
    It may err out if a default cannot be determined.
-   Depending on where it is called, it can recurse as the process of
-   determining a new default may call the caler!
-   Use get_current_source_symtab_and_line instead to get whatever
-   we have without erroring out or trying to get a default.
-   NOTE: The returned sal pc and end fields are not valid. */
-extern struct symtab_and_line get_current_source_symtab_and_line (void);
+   We must be cautious about where it is called, as it can recurse as the
+   process of determining a new default may call the caller!
+   Use get_current_source_symtab_and_line only to get whatever
+   we have without erroring out or trying to get a default. */
+extern void set_default_source_symtab_and_line (void);
 
 /* Return the current default file for listing and next line to list
    (the returned sal pc and end fields are not valid.)
-   and set the surrent default to whatever is in SAL */
-extern struct symtab_and_line get_current_or_default_source_symtab_and_line (void);
+   and set the current default to whatever is in SAL.
+   NOTE: The returned sal pc and end fields are not valid. */
+extern struct symtab_and_line set_current_source_symtab_and_line (const struct symtab_and_line *);
 
 /* Reset any information stored about a default file and line to print. */
-extern struct symtab_and_line set_current_source_symtab_and_line (struct symtab_and_line *);
+extern void clear_current_source_symtab_and_line (void);
 #endif
index 72374ed653b9e85a6d69bd8d544803f396f93a53..5d5248290500dc41915ba61544fb7aa847980558 100644 (file)
@@ -435,7 +435,9 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
              print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
            }
        }
-      cursal = get_current_or_default_source_symtab_and_line ();
+      /* Make sure we have at least a default source file */
+      set_default_source_symtab_and_line ();
+      cursal = get_current_source_symtab_and_line ();
       cursal.line = max (sal.line - get_lines_to_list () / 2, 1);
       set_current_source_symtab_and_line (&cursal);
     }
index 8a7841dd0c6907cadc896e92b15fd9c511749f41..e530e61a2814b831d1377a431c8ad41fc9546474 100644 (file)
@@ -1,3 +1,21 @@
+2002-09-26  Keith Seitz  <keiths@redhat.com>
+
+       * lib/insight-support.exp (gdbtk_start): Figure out where
+       the insight executable is based on where gdb is. Use this
+       executable to start insight instead of gdb.
+
+2002-09-25  Andrew Cagney  <cagney@redhat.com>
+
+       * gdb.base/pc-fp.exp, gdb.base/pc-fp.c: New test.
+
+2002-09-24  Andrew Cagney  <ac131313@redhat.com>
+
+       * gdb.gdb/complaints.exp (test_initial_complaints): Rename
+       test_isolated_complaints.
+       (test_empty_complaint): New function.
+       (test_empty_complaints): New function.  Check no output when no
+       complaints.
+       
 2002-09-20  David Carlton  <carlton@math.stanford.edu>
 
        * carlton_runtest: New file.
index 159a8cab67b379de21c0d76d7603f4afb9efabc8..3d3426f2474e3c0f6364f4be499daefb83da4c64 100644 (file)
@@ -101,7 +101,7 @@ proc setup_test { executable } {
     return 0
 }
 
-proc test_isolated_complaints { } {
+proc test_initial_complaints { } {
 
     global gdb_prompt
 
@@ -233,6 +233,41 @@ proc test_short_complaints { } {
     return 0
 }
 
+# Check that nothing comes out when there haven't been any real
+# complaints.  Note that each test is really checking the previous
+# command.
+
+proc test_empty_complaint { cmd msg } {
+    global gdb_prompt
+    send_gdb $cmd
+    gdb_expect {
+       -re "\r\n\r\n$gdb_prompt " {
+           fail $msg
+       }
+       "\r\n$gdb_prompt" {
+           pass $msg
+       }
+       timeout {
+           fail "$msg (timeout)"
+       }
+    }
+  
+}
+
+proc test_empty_complaints { } {
+
+    test_empty_complaint "call clear_complaints(&symfile_complaints,0,0)\n" \
+           "empty non-verbose non-noisy clear"
+    test_empty_complaint "call clear_complaints(&symfile_complaints,1,0)\n" \
+           "empty verbose non-noisy clear"
+    test_empty_complaint "call clear_complaints(&symfile_complaints,1,1)\n" \
+           "empty verbose noisy clear"
+    test_empty_complaint "call clear_complaints(&symfile_complaints,0,1)\n" \
+           "empty non-verbose noisy clear"
+
+    return 0
+}
+
 # Find a pathname to a file that we would execute if the shell was asked
 # to run $arg using the current PATH.
 
@@ -274,9 +309,10 @@ if {$setup_result <0} then {
     return -1
 }
 
-test_isolated_complaints
+test_initial_complaints
 test_serial_complaints
 test_short_complaints
+test_empty_complaints
 
 gdb_exit;
 catch "remote_file host delete $file";
index 5feba8dbc2e8a0fcc979d2585b458a77e6e0ca5f..eb9420b44f56128de3813f7575d582931b5fb9aa 100644 (file)
@@ -1,3 +1,21 @@
+2002-09-25  Keith Seitz  <keiths@redhat.com>
+
+       * mi-pthreads.exp (get_mi_thread_list): Check if expect_out
+       exists before using it.
+       (check_mi_and_console_threads): Likewise.
+       * gdb669.exp (get_mi_thread_list): Likewise.
+       (check_mi_and_console_threads): Likewise.
+
+2002-09-24  Keith Seitz  <keiths@redhat.com>
+
+       * configure.in: Add config header.
+       Check for pthread.h.
+       * configure: Regenerate.
+       * config.in: New file.
+       * pthreads.c: New file.
+       * mi-pthreads.exp: New file to test thread functionality.
+       * gdb669.exp: New file.
+
 2002-09-17  Keith Seitz  <keiths@redhat.com>
 
        * mi-var-cmd.exp: Add tests to check when varobj pinned to a
index fd5d1467f1a3da22e6b19e2d10d1609612e7fc27..48628f501363606568460b4b10a2b11bcfb5172e 100755 (executable)
@@ -522,6 +522,7 @@ fi
 
 
 
+
 CC=${CC-cc}
 
 ac_aux_dir=
@@ -571,7 +572,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:575: checking host system type" >&5
+echo "configure:576: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -592,7 +593,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:596: checking target system type" >&5
+echo "configure:597: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -610,7 +611,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:614: checking build system type" >&5
+echo "configure:615: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -633,6 +634,128 @@ test "$host_alias" != "$target_alias" &&
   program_prefix=${target_alias}-
 
 
+# Check for pthread.h
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:640: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 655 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 672 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 689 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+for ac_hdr in pthread.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:723: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 728 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -696,19 +819,7 @@ fi
 
 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
 
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[    `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
+DEFS=-DHAVE_CONFIG_H
 
 # Without the "./", some shells look in PATH for config.status.
 : ${CONFIG_STATUS=./config.status}
@@ -745,7 +856,7 @@ done
 
 ac_given_srcdir=$srcdir
 
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -793,6 +904,7 @@ s%@build_alias@%$build_alias%g
 s%@build_cpu@%$build_cpu%g
 s%@build_vendor@%$build_vendor%g
 s%@build_os@%$build_os%g
+s%@CPP@%$CPP%g
 
 CEOF
 EOF
@@ -888,6 +1000,113 @@ s%@top_srcdir@%$top_srcdir%g
 fi; done
 rm -f conftest.s*
 
+# 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='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_uB='\([     ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+  CONFIG_HEADERS="config.h:config.in"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  echo creating $ac_file
+
+  rm -f conftest.frag conftest.in conftest.out
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h.  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.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #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.vals <<\EOF
+s%^[   ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+  ac_lines=`grep -c . conftest.vals`
+  # grep -c gives empty output for an empty file on some AIX systems.
+  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+  # Write a limited-size here document to conftest.frag.
+  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+  echo 'CEOF
+  sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
+  mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
+  mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+  rm -f conftest.frag conftest.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
+  cat conftest.in >> conftest.h
+  rm -f conftest.in
+  if cmp -s $ac_file conftest.h 2>/dev/null; then
+    echo "$ac_file is unchanged"
+    rm -f conftest.h
+  else
+    # Remove last slash and all that follows it.  Not all systems have dirname.
+      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+      # The file is in a subdirectory.
+      test ! -d "$ac_dir" && mkdir "$ac_dir"
+    fi
+    rm -f $ac_file
+    mv conftest.h $ac_file
+  fi
+fi; done
+
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
index 94278273f137f8bb798a2c68b9e60da0eed109c0..3204867b3fa76e3ad5a14f4ac7eddcf77b4e05fd 100644 (file)
@@ -6,10 +6,14 @@ dnl any existing configure script.
 
 AC_PREREQ(2.5)
 AC_INIT(mi-basics.exp)
+AC_CONFIG_HEADER(config.h:config.in)
 
 CC=${CC-cc}
 AC_SUBST(CC)
 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
 AC_CANONICAL_SYSTEM
 
+# Check for pthread.h
+AC_CHECK_HEADERS(pthread.h)
+
 AC_OUTPUT(Makefile)
index 42d14a9a27a72e4c481edee2d5ca0676237b2485..cbdf163c85f290f2fdced0bab58d1673b79ec34a 100644 (file)
@@ -54,7 +54,15 @@ proc gdbtk_start {test} {
 
   gdb_stop_suppressing_tests;
 
-  verbose "Starting $GDB -nx -q --tclcommand=$test"
+  # Need to convert ::GDB to use (-)?insight...
+  if {[regsub {gdb$} $GDB insight newGDB]} {
+    set INSIGHT $newGDB
+  } else {
+    perror "Cannot find Insight executable"
+    exit 1
+  }
+
+  verbose "Starting $INSIGHT -nx -q --tclcommand=$test"
 
   set real_test [which $test]
   if {$real_test == 0} {
@@ -63,8 +71,8 @@ proc gdbtk_start {test} {
   }
 
   if {![is_remote host]} {
-    if { [which $GDB] == 0 } {
-      perror "$GDB does not exist."
+    if { [which $INSIGHT] == 0 } {
+      perror "$INSIGHT does not exist."
       exit 1
     }
   }
@@ -91,9 +99,9 @@ proc gdbtk_start {test} {
   set env(GDBTK_VERBOSE) 1
   set env(GDBTK_LOGFILE) [to_tcl_path [file join $objdir gdb.log]]
 
-  set err [catch {exec $GDB -nx -q --tclcommand=$test} res]
+  set err [catch {exec $INSIGHT -nx -q --tclcommand=$test} res]
   if { $err } {
-    perror "Execing $GDB failed: $res"
+    perror "Execing $INSIGHT failed: $res"
     append res "\nERROR gdb-crash"
   }
   return $res
index 60c1bf9c3e08e5e7774bd55f4efa99f55e0487c3..3d5783fbe82c9aafb0de6a9d02724c9ea6c1b413 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -82,7 +82,7 @@ int inhibit_gdbinit = 0;
 /* If nonzero, and GDB has been configured to be able to use windows,
    attempt to open them upon startup.  */
 
-int use_windows = 1;
+int use_windows = 0;
 
 extern char lang_frame_mismatch_warn[];                /* language.c */
 
index 03ae1618d31a01891e96935ef5bdfa47cc138b1a..6aea88664132b961c8aa378de8c91d72d56380b2 100644 (file)
@@ -172,10 +172,6 @@ v850_processor_type_table[] =
     v850e_reg_names, bfd_mach_v850e
   }
   ,
-  {
-    v850e_reg_names, bfd_mach_v850ea
-  }
-  ,
   {
     NULL, 0
   }
index 4ae046aad4ef6fa717fb027473f3263d4fbeaab7..16ba528afe67dc2d2534124418932a4cb02adb75 100644 (file)
@@ -1345,7 +1345,10 @@ make_cleanup_free_variable (struct varobj *var)
 
 /* This returns the type of the variable. This skips past typedefs
    and returns the real type of the variable. It also dereferences
-   pointers and references. */
+   pointers and references.
+
+   NOTE: TYPE_TARGET_TYPE should NOT be used anywhere in this file
+   except within get_target_type and get_type. */
 static struct type *
 get_type (struct varobj *var)
 {
@@ -1374,7 +1377,10 @@ get_type_deref (struct varobj *var)
 }
 
 /* This returns the target type (or NULL) of TYPE, also skipping
-   past typedefs, just like get_type (). */
+   past typedefs, just like get_type ().
+
+   NOTE: TYPE_TARGET_TYPE should NOT be used anywhere in this file
+   except within get_target_type and get_type. */
 static struct type *
 get_target_type (struct type *type)
 {
@@ -1959,7 +1965,7 @@ c_type_of_child (struct varobj *parent, int index)
   switch (TYPE_CODE (parent->type))
     {
     case TYPE_CODE_ARRAY:
-      type = TYPE_TARGET_TYPE (parent->type);
+      type = get_target_type (parent->type);
       break;
 
     case TYPE_CODE_STRUCT:
@@ -1968,7 +1974,7 @@ c_type_of_child (struct varobj *parent, int index)
       break;
 
     case TYPE_CODE_PTR:
-      switch (TYPE_CODE (TYPE_TARGET_TYPE (parent->type)))
+      switch (TYPE_CODE (get_target_type (parent->type)))
        {
        case TYPE_CODE_STRUCT:
        case TYPE_CODE_UNION:
@@ -1976,7 +1982,7 @@ c_type_of_child (struct varobj *parent, int index)
          break;
 
        default:
-         type = TYPE_TARGET_TYPE (parent->type);
+         type = get_target_type (parent->type);
          break;
        }
       break;
index 6980726a6ffe2905e76d54d4c74134f4776cd7f8..6d40e8b1d0f4377948198e7dcec5a3a0fd66595e 100644 (file)
@@ -1 +1 @@
-2002-09-20-cvs
+2002-09-27-cvs
index 148c9bd59a5e8f59f8552873821d65a8fd8191d8..257e381931feb1b1cd12f94ac121c9fbaea325c4 100644 (file)
@@ -1,3 +1,11 @@
+2002-09-26  Jakub Jelinek  <jakub@redhat.com>
+
+       * elf/x86-64.h: Add TLS relocs.
+
+2002-09-26  Andrew Cagney  <ac131313@redhat.com>
+
+       * regs/: Delete directory.
+
 2002-09-19  Alexandre Oliva  <aoliva@redhat.com>
 
        * libiberty.h (asprintf, vasprintf): Don't declare them if the
index 74febc2d5dbbcb3ccb951e31ee8dddaf5bb6074d..7e9100dba4a022599dfd1bf351002949e8f6febd 100644 (file)
@@ -1,5 +1,5 @@
 /* x86_64 ELF support for BFD.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002 Free Software Foundation, Inc.
    Contributed by Jan Hubicka <jh@suse.cz>
 
    This file is part of BFD, the Binary File Descriptor library.
 
 START_RELOC_NUMBERS (elf_x86_64_reloc_type)
      RELOC_NUMBER (R_X86_64_NONE,     0)      /* No reloc */
-     RELOC_NUMBER (R_X86_64_64,               1)      /* Direct 64 bit  */
+     RELOC_NUMBER (R_X86_64_64,       1)      /* Direct 64 bit  */
      RELOC_NUMBER (R_X86_64_PC32,     2)      /* PC relative 32 bit signed */
      RELOC_NUMBER (R_X86_64_GOT32,    3)      /* 32 bit GOT entry */
      RELOC_NUMBER (R_X86_64_PLT32,    4)      /* 32 bit PLT address */
      RELOC_NUMBER (R_X86_64_COPY,     5)      /* Copy symbol at runtime */
      RELOC_NUMBER (R_X86_64_GLOB_DAT, 6)      /* Create GOT entry */
-     RELOC_NUMBER (R_X86_64_JUMP_SLOT,        7)      /* Create PLT entry */
+     RELOC_NUMBER (R_X86_64_JUMP_SLOT,7)      /* Create PLT entry */
      RELOC_NUMBER (R_X86_64_RELATIVE, 8)      /* Adjust by program base */
      RELOC_NUMBER (R_X86_64_GOTPCREL, 9)      /* 32 bit signed pc relative
                                                  offset to GOT */
-     RELOC_NUMBER (R_X86_64_32,               10)     /* Direct 32 bit zero extended */
-     RELOC_NUMBER (R_X86_64_32S,              11)     /* Direct 32 bit sign extended */
-     RELOC_NUMBER (R_X86_64_16,               12)     /* Direct 16 bit zero extended */
+     RELOC_NUMBER (R_X86_64_32,       10)     /* Direct 32 bit zero extended */
+     RELOC_NUMBER (R_X86_64_32S,      11)     /* Direct 32 bit sign extended */
+     RELOC_NUMBER (R_X86_64_16,       12)     /* Direct 16 bit zero extended */
      RELOC_NUMBER (R_X86_64_PC16,     13)     /* 16 bit sign extended pc relative*/
-     RELOC_NUMBER (R_X86_64_8,                14)     /* Direct 8 bit sign extended */
-     RELOC_NUMBER (R_X86_64_PC8,              15)     /* 8 bit sign extended pc relative*/
+     RELOC_NUMBER (R_X86_64_8,        14)     /* Direct 8 bit sign extended */
+     RELOC_NUMBER (R_X86_64_PC8,      15)     /* 8 bit sign extended pc relative*/
+     RELOC_NUMBER (R_X86_64_DTPMOD64, 16)     /* ID of module containing symbol */
+     RELOC_NUMBER (R_X86_64_DTPOFF64, 17)     /* Offset in TLS block */
+     RELOC_NUMBER (R_X86_64_TPOFF64,  18)     /* Offset in initial TLS block */
+     RELOC_NUMBER (R_X86_64_TLSGD,    19)     /* PC relative offset to GD GOT block */
+     RELOC_NUMBER (R_X86_64_TLSLD,    20)     /* PC relative offset to LD GOT block */
+     RELOC_NUMBER (R_X86_64_DTPOFF32, 21)     /* Offset in TLS block */
+     RELOC_NUMBER (R_X86_64_GOTTPOFF, 22)     /* PC relative offset to IE GOT entry */
+     RELOC_NUMBER (R_X86_64_TPOFF32,  23)     /* Offset in initial TLS block */
      RELOC_NUMBER (R_X86_64_GNU_VTINHERIT, 250)       /* GNU C++ hack  */
      RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251)         /* GNU C++ hack  */
 END_RELOC_NUMBERS (R_X86_64_max)
diff --git a/include/regs/ChangeLog b/include/regs/ChangeLog
deleted file mode 100644 (file)
index e69de29..0000000
index df6f33f43629ebee21e8f78e3da23795261b3096..bde129cda841f85d5a76e1887dbb0d02dd072089 100644 (file)
@@ -1,3 +1,7 @@
+2002-09-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * Makefile.in (all): Fix multilib parallel build.
+
 2002-09-19  John David Anglin  <dave@hiuly1.hia.nrc.ca>
 
        * cp-demangle.c (demangling_new): Cast 0 to enum.
index 5a25987d58b6d6872564ee6e134252d86583bdf2..e0bb15a7519825b06cc6a1a67d1fa7bcdf8a90c0 100644 (file)
@@ -105,7 +105,7 @@ SUBDIRS = testsuite
 
 # FIXME: add @BUILD_INFO@ once we're sure it works for everyone.
 all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir
-       @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
+       @: $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
 
 .PHONY: check installcheck
 check: check-subdir
index 01cec2197be4f2656b148e3f5c398cc3cfd399c7..487530a5bf85c9a8e69b68fab4596eca258645cc 100644 (file)
@@ -1,3 +1,18 @@
+2002-09-26  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+       * mips-dis.c (print_insn_mips): Always allow disassembly of
+       32-bit jalx opcode.
+
+2002-09-24  Nick Clifton  <nickc@redhat.com>
+
+       * po/de.po: Updated German translation.
+
+2002-09-21  Alan Modra  <amodra@bigpond.net.au>
+
+       * Makefile.am: Run "make dep-am".
+       * Makefile.in: Regenerate.
+       * po/POTFILES.in: Regenerate.
+
 2002-09-20  Nick Clifton  <nickc@redhat.com>
 
        * ppc-opc.c (CRFD, CRFS): Add PPC_OPERAND_CR flag so that cr
 2002-09-13  Nick Clifton  <nickc@redhat.com>
 
        * ppc-opc.c (MFDEC2): Include Book-E.
-        (PPCCHLK64): New opcode mask.
-        (evsubw, evsubiw, evmr, evnot, isellt, iselgt, iseleq, mfpid,
-        mfcsrr0, mfcsrr1, mfdear, mfesr, mfivpr, mfusprg0, mftbl,
-        mftbu, mfpir, mfdbsr, mfdbcr0, mfdbcr1, mfdbcr2, mfiac1,
-        mfiac2, mfiac3, mfiac4, mfdac1, mfdac2, mfdvc1, mfdvc2, mftsr,
-        mftcr, mfivor0, mfivor1, mfivor2, mfivor3, mfivor4, mfivor5,
-        mfivor6, mfivor7, mfivor8, mfivor9, mfivor10, mfivor11,
-        mfivor12, mfivor13, mfivor14, mfivor15, mfbbear, mfmcsrr0,
-        mfmcsrr1, mfmcsr, mtpid, mtdecar, mtcsrr0, mtcsrr1, mtdear,
-        mtesr, mtivpr, mtusprg0, mtsprg4, mtsprg5, mtsprg6, mtsprg7,
-        mtdbsr, mtdbcr0, mtdbcr1, mtdbcr2, mtiac1, mtiac2, mtiac3,
-        mtiac4, mtdac1, mtdac2, mtdvc1, mtdvc2, mttsr, mttcr, mtivor0,
-        mtivor1, mtivor2, mtivor3, mtivor4, mtivor5, mtivor6, mtivor7,
-        mtivor8, mtivor9, mtivor10, mtivor11, mtivor12, mtivor13,
-        mtivor14, mtivor15, mtbbear, mtmcsrr0, mtmcsrr1, mtmcsr): New
-        Book-E instructions.
-        (evfsneg): Fix opcode value.
-        (dcbtstlse, dcbtlse, icblce, dcblce, icbtsle): Use PPCCHLK64
-        mask.
-        (mcrxr64, tlbivaxe, tlbsxe, tlbsxe.): Restrict to 64-bit
-        Book-E.
-        (extsw): Restrict to 64-bit PPC instruction sets.
-        (extsw.): Does not exist in 64-bit Book-E.
-        (powerpc_macro): Remove mftbl, mftbu and mftb Book-E macros as
-        they are no longer needed.
+       (PPCCHLK64): New opcode mask.
+       (evsubw, evsubiw, evmr, evnot, isellt, iselgt, iseleq, mfpid,
+       mfcsrr0, mfcsrr1, mfdear, mfesr, mfivpr, mfusprg0, mftbl,
+       mftbu, mfpir, mfdbsr, mfdbcr0, mfdbcr1, mfdbcr2, mfiac1,
+       mfiac2, mfiac3, mfiac4, mfdac1, mfdac2, mfdvc1, mfdvc2, mftsr,
+       mftcr, mfivor0, mfivor1, mfivor2, mfivor3, mfivor4, mfivor5,
+       mfivor6, mfivor7, mfivor8, mfivor9, mfivor10, mfivor11,
+       mfivor12, mfivor13, mfivor14, mfivor15, mfbbear, mfmcsrr0,
+       mfmcsrr1, mfmcsr, mtpid, mtdecar, mtcsrr0, mtcsrr1, mtdear,
+       mtesr, mtivpr, mtusprg0, mtsprg4, mtsprg5, mtsprg6, mtsprg7,
+       mtdbsr, mtdbcr0, mtdbcr1, mtdbcr2, mtiac1, mtiac2, mtiac3,
+       mtiac4, mtdac1, mtdac2, mtdvc1, mtdvc2, mttsr, mttcr, mtivor0,
+       mtivor1, mtivor2, mtivor3, mtivor4, mtivor5, mtivor6, mtivor7,
+       mtivor8, mtivor9, mtivor10, mtivor11, mtivor12, mtivor13,
+       mtivor14, mtivor15, mtbbear, mtmcsrr0, mtmcsrr1, mtmcsr): New
+       Book-E instructions.
+       (evfsneg): Fix opcode value.
+       (dcbtstlse, dcbtlse, icblce, dcblce, icbtsle): Use PPCCHLK64
+       mask.
+       (mcrxr64, tlbivaxe, tlbsxe, tlbsxe.): Restrict to 64-bit
+       Book-E.
+       (extsw): Restrict to 64-bit PPC instruction sets.
+       (extsw.): Does not exist in 64-bit Book-E.
+       (powerpc_macro): Remove mftbl, mftbu and mftb Book-E macros as
+       they are no longer needed.
 
 2002-09-12  Gary Hade  <garyhade@us.ibm.com>
 
@@ -53,7 +68,7 @@
 
        * disassemble.c (disassembler_usage): Add invocation of
        print_ppc_disassembler_options.
-        * ppc-dis.c (print_ppc_disassembler_options): New function.
+       * ppc-dis.c (print_ppc_disassembler_options): New function.
 
 2002-09-04  Nick Clifton  <nickc@redhat.com>
 
        * z8kgen.c (opt): Fix definition of "in rd,imm16" opcode.
        * z8k-opc.h: Regenerated with new z8kgen.c.
 
-2002-08-19  Elena Zannoni  <ezannoni@redhat.com> 
+2002-08-19  Elena Zannoni  <ezannoni@redhat.com>
 
-        From  matthew green  <mrg@redhat.com>
+       From  matthew green  <mrg@redhat.com>
 
        * ppc-dis.c (powerpc_dialect): Support `-m500', `-m500x2' and
        `-mefs'. Turn off AltiVec for E500 and efs.
        (efsabs, efsnabs, efsneg, efsadd, efssub, efsmul,
        efsdiv, efscmpgt, efscmplt, efscmpeq, efststgt, efststlt,
        efststeq, efscfui, efsctuiz, efscfsi, efscfuf, efscfsf,
-       efsctui, efsctsi, efsctsiz, efsctuf, efsctsf, 
+       efsctui, efsctsi, efsctsiz, efsctuf, efsctsf,
        evaddw, evaddiw, evsubfw, evsubifw, evabs, evneg, evextsb,
        evextsh, evrndw, evcntlzw, evcntlsw, brinc, evand, evandc, evor,
        evorc, evxor, eveqv, evnand, evnor, evrlw, evrlwi, evslw, evslwi,
 
        * mips-opc.c: Clean up a few whitespace issues, and sort a
        few entries understanding that 'x' follows 'w' in the alphabet.
-       
+
 2002-05-31  Chris G. Demetriou  <cgd@broadcom.com>
-            Ed Satterthwaite  <ehs@broadcom.com>
+           Ed Satterthwaite  <ehs@broadcom.com>
 
        * mips-opc.c: Add support for SB-1 MDMX subset and extensions.
 
        * po/POTFILES.in: Regenerate.
 
 2002-05-30  Chris G. Demetriou  <cgd@broadcom.com>
-            Ed Satterthwaite  <ehs@broadcom.com>
+           Ed Satterthwaite  <ehs@broadcom.com>
 
        * mips-dis.c (print_insn_arg): Add support for 'O', 'Q', 'X', 'Y',
        and 'Z' formats, for MDMX.
-        (mips_isa_type): Add MDMX instructions to the ISA
+       (mips_isa_type): Add MDMX instructions to the ISA
        bit mask for bfd_mach_mipsisa64.
        * mips-opc.c: Add support for MDMX instructions.
        (MX): New definition.
 2002-05-30  Diego Novillo  <dnovillo@redhat.com>
 
        * d10v-opc.c (d10v_opcodes): `btsti' does not modify its
-        arguments.
+       arguments.
 
 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
 
 
 2002-05-07  Graydon Hoare  <graydon@redhat.com>
 
-       * cgen-dis.in: (print_insn_@arch@): Cache list of opened CPUs rather 
+       * cgen-dis.in: (print_insn_@arch@): Cache list of opened CPUs rather
        than just most-recently-opened.
 
 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
 2002-03-16  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * Makefile.am: Tidy up sh64 rules.
-        * Makefile.in: Regenerate.
+       * Makefile.in: Regenerate.
 
 2002-03-15  Chris G. Demetriou  <cgd@broadcom.com>
 
 2002-02-12  Graydon Hoare  <graydon@redhat.com>
 
        * cgen-asm.in (parse_insn_normal): Change call from
-       @arch@_cgen_parse_operand to cd->parse_operand, to 
+       @arch@_cgen_parse_operand to cd->parse_operand, to
        facilitate CGEN_ASM_INIT_HOOK doing useful work.
-       
+
 2002-02-11  Alexandre Oliva  <aoliva@redhat.com>
 
        * sparc-dis.c (print_insn_sparc): Make sure 0xFFFFFFFF is not
        * cgen-asm.in: Include safe-ctype.h in preference to
        ctype.h.  Fix formatting.  Use ISSPACE instead of isspace and
        TOLOWER instead of tolower.
-        (@arch@_cgen_build_insn_regex): Remove duplication of syntax
+       (@arch@_cgen_build_insn_regex): Remove duplication of syntax
        string elements in constructed regular expression.
        * fr30-asm.c: Regenerate.
        * fr30-desc.c: Regenerate.
        * sh-opc.h: Fix encoding of least significant nibble of the
        DSP single data transfer instructions.
 
-        * sh-dis.c (print_insn_shx): Fix decoding of As opcode in DSP
+       * sh-dis.c (print_insn_shx): Fix decoding of As opcode in DSP
        instructions.
 
 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
        C files.
        * cgen-dis.in: The same.
        * cgen-ibld.in: The same.
-        * fr30-asm.c: Regenerate.
-        * fr30-desc.c: Regenerate.
-        * fr30-dis.c: Regenerate.
-        * fr30-ibld.c: Regenerate.
-        * fr30-opc.c: Regenerate.
-        * m32r-asm.c: Regenerate.
-        * m32r-desc.c: Regenerate.
-        * m32r-dis.c: Regenerate.
-        * m32r-ibld.c: Regenerate.
-        * m32r-opc.c: Regenerate.
-        * m32r-opinst.c Regenerate.
-        * openrisc-asm.c: Regenerate.
-        * openrisc-desc.c: Regenerate.
-        * openrisc-dis.c: Regenerate.
-        * openrisc-ibld.c: Regenerate.
-        * openrisc-opc.c: Regenerate.
-        * openrisc-opc.h: Regenerate.
+       * fr30-asm.c: Regenerate.
+       * fr30-desc.c: Regenerate.
+       * fr30-dis.c: Regenerate.
+       * fr30-ibld.c: Regenerate.
+       * fr30-opc.c: Regenerate.
+       * m32r-asm.c: Regenerate.
+       * m32r-desc.c: Regenerate.
+       * m32r-dis.c: Regenerate.
+       * m32r-ibld.c: Regenerate.
+       * m32r-opc.c: Regenerate.
+       * m32r-opinst.c Regenerate.
+       * openrisc-asm.c: Regenerate.
+       * openrisc-desc.c: Regenerate.
+       * openrisc-dis.c: Regenerate.
+       * openrisc-ibld.c: Regenerate.
+       * openrisc-opc.c: Regenerate.
+       * openrisc-opc.h: Regenerate.
        * Makefile.in: Regenerate.
        * po/POTFILES.in: Regenerate.
        * po/opcodes.pot: Regenerate.
 
 2001-10-08  Aldy Hernandez  <aldyh@redhat.com>
 
-        * arm-opc.h (arm_opcodes): Add cirrus insns.
+       * arm-opc.h (arm_opcodes): Add cirrus insns.
 
        * arm-dis.c (print_insn_arm): Add 'I' case.
 
 
 2001-09-30  John Healy  <jhealy@redhat.com>
 
-        * cgen-ibld.in (insert_1): Switched bfd_get_bits and bfd_set_bits
-        calls to cgen_get_insn_value and cgen_put_insn_value calls.
-        (extract_1): Switched bfd_get_bits call to cgen_get_insn_value call.
+       * cgen-ibld.in (insert_1): Switched bfd_get_bits and bfd_set_bits
+       calls to cgen_get_insn_value and cgen_put_insn_value calls.
+       (extract_1): Switched bfd_get_bits call to cgen_get_insn_value call.
 
 2001-09-30  Hans-Peter Nilsson  <hp@bitrange.com>
 
 
 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
 
-        * cgen-asm.in: Include "xregex.h" always to enable the libiberty
-        regex support.
-        (@arch@_cgen_build_insn_regex): New routine from Graydon.
-        (@arch@_cgen_assemble_insn): Add Graydon's code to use regex
+       * cgen-asm.in: Include "xregex.h" always to enable the libiberty
+       regex support.
+       (@arch@_cgen_build_insn_regex): New routine from Graydon.
+       (@arch@_cgen_assemble_insn): Add Graydon's code to use regex
        to verify if it is worth parsing the insn as insn "x".  Also update
        error message when insn is not a recognized format of the insn vs
        when the insn is completely unrecognized.
 
 2001-06-06  Christian Groessler <cpg@aladdin.de>
 
-        * z8k-dis.c: Fix formatting.
-        (unpack_instr): Remove unused cases in switch statement. Add
-        safety abort() in default case.
-        (unparse_instr): Add safety abort() in default case.
+       * z8k-dis.c: Fix formatting.
+       (unpack_instr): Remove unused cases in switch statement. Add
+       safety abort() in default case.
+       (unparse_instr): Add safety abort() in default case.
 
 2001-06-06  Peter Jakubek <pjak@snafu.de>
 
 
 2001-04-27  Johan Rydberg  <jrydberg@opencores.org>
 
-        * Makefile.am: Add OpenRISC target.
-        * Makefile.in: Regenerated.
+       * Makefile.am: Add OpenRISC target.
+       * Makefile.in: Regenerated.
 
-        * disassemble.c (disassembler): Recognize the OpenRISC disassembly.
+       * disassemble.c (disassembler): Recognize the OpenRISC disassembly.
 
-        * configure.in (bfd_openrisc_arch): Add target.
-        * configure: Regenerated.
+       * configure.in (bfd_openrisc_arch): Add target.
+       * configure: Regenerated.
 
-        * openrisc-asm.c: New file.
-        * openrisc-desc.c: Likewise.
-        * openrisc-desc.h: Likewise.
-        * openrisc-dis.c: Likewise.
-        * openrisc-ibld.c: Likewise.
-        * openrisc-opc.c: Likewise.
-        * openrisc-opc.h: Likewise.
+       * openrisc-asm.c: New file.
+       * openrisc-desc.c: Likewise.
+       * openrisc-desc.h: Likewise.
+       * openrisc-dis.c: Likewise.
+       * openrisc-ibld.c: Likewise.
+       * openrisc-opc.c: Likewise.
+       * openrisc-opc.h: Likewise.
 
 2001-04-24  Christian Groessler  <cpg@aladdin.de>
 
 
 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
 
-        * cgen-dis.in (print_insn_@arch@): Add support for target machine
-        determination via CGEN_COMPUTE_MACH.
+       * cgen-dis.in (print_insn_@arch@): Add support for target machine
+       determination via CGEN_COMPUTE_MACH.
        * fr30-desc.c: Regenerate.
        * fr30-dis.c: Regenerate.
        * fr30-opc.h: Regenerate.
 2001-03-06  Nick Clifton  <nickc@redhat.com>
 
        * arm-dis.c (print_insn_thumb): Compute destination address
-        of BLX(1) instruction by taking bit 1 from PC and not from bit
-        0 of the offset.
+       of BLX(1) instruction by taking bit 1 from PC and not from bit
+       0 of the offset.
 
 2001-03-06  Igor Shevlyakov  <igor@windriver.com>
 
 
 2001-02-18  lars brinkhoff  <lars@nocrew.org>
 
-        * Makefile.am: Add PDP-11 target.
-        * configure.in: Likewise.
-        * disassemble.c: Likewise.
-        * pdp11-dis.c: New file.
-        * pdp11-opc.c: New file.
+       * Makefile.am: Add PDP-11 target.
+       * configure.in: Likewise.
+       * disassemble.c: Likewise.
+       * pdp11-dis.c: New file.
+       * pdp11-opc.c: New file.
 
 2001-02-14  Jim Wilson  <wilson@redhat.com>
 
 
 2001-02-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
 
-        * mips-dis.c (print_insn_arg): Use top four bits of the address of
+       * mips-dis.c (print_insn_arg): Use top four bits of the address of
        the following instruction not of the jump itself for the jump
        target.
        (print_mips16_insn_arg): Likewise.
 
 2000-12-03  Chris Demetriou   cgd@sibyte.com
 
-        * mips-opc.c (mips_builtin_opcodes): Use the WR_HILO, RD_HILO,
-        MOD_HILO, and MOD_LO macros.
+       * mips-opc.c (mips_builtin_opcodes): Use the WR_HILO, RD_HILO,
+       MOD_HILO, and MOD_LO macros.
 
-        * mips-opc.c (M1, M2): Delete.
-        (mips_builtin_opcodes): Remove all uses of M1.
+       * mips-opc.c (M1, M2): Delete.
+       (mips_builtin_opcodes): Remove all uses of M1.
 
-        * mips-opc.c (mips_builtin_opcodes): Make the dmfc2 and dmtc2
-        instructions take "G" format second operands and use the
-        correct flags.
-        There are mfc3 and mtc3 opcodes, so add dmfc3 and dmtc3 opcodes to
+       * mips-opc.c (mips_builtin_opcodes): Make the dmfc2 and dmtc2
+       instructions take "G" format second operands and use the
+       correct flags.
+       There are mfc3 and mtc3 opcodes, so add dmfc3 and dmtc3 opcodes to
        match.
-        Delete "sel" code operands from mfc1 and mtc1.
-        Add MIPS64 opcode changes (dclo, dclz), and "sel" code variants
+       Delete "sel" code operands from mfc1 and mtc1.
+       Add MIPS64 opcode changes (dclo, dclz), and "sel" code variants
        for dm[ft]c[023].
 
 2000-12-03  Ed Satterthwaite  ehs@sibyte.com  and
-            Chris Demetriou   cgd@sibyte.com
+           Chris Demetriou   cgd@sibyte.com
 
-        * mips-opc.c (mips_builtin_opcodes): Finish additions
-        for MIPS32 support, and clean up existing entries for
-        aesthetics, consistency with the MIPS32 ISA, and
-        with consistency the rest of the table.
+       * mips-opc.c (mips_builtin_opcodes): Finish additions
+       for MIPS32 support, and clean up existing entries for
+       aesthetics, consistency with the MIPS32 ISA, and
+       with consistency the rest of the table.
 
 2000-12-01  Nick Clifton  <nickc@redhat.com>
 
 
 2000-12-01  Chris Demetriou <cgd@sibyte.com>
 
-        mips-dis.c (print_insn_arg): Handle new 'U' and 'J' argument
-        specifiers.  Update 'B' for new constant names, and remove
-        'm'.
-        mips-opc.c (mips_builtin_opcodes): Place "pref" and "ssnop"
-        near the top of the array, so they are disassembled properly.
-        Enable "ssnop" for MIPS32.  Add "break" variant with 20 bit
-        code for MIPS32.  Update "clo" and "clz" to use 'U' operand
-        specifier.  Add 'H' format specifier variants for "mfc1,"
-        "mfc2," "mfc3," "mtc1," "mtc2," and "mtc3" for MIPS32.  Update
-        MIPS32 "sdbbp" to use 'B' operand specifier.  Add MIPS32
-        "wait" variant which uses 'J' operand specifier.
-
-        * mips-dis.c (set_mips_isa_type): Update to use
-        CPU_UNKNOWN and ISA_* constants.  Add bfd_mach_mips32 case.
-        Replace bfd_mach_mips4K with bfd_mach_mips32_4k case.
-        * mips-opc.c (I32): New constant for instructions added in
-        MIPS32.
-        (P4): Delete.
-        (mips_builtin_opcodes) Replace all uses of P4 with I32.
-
-        * mips-dis.c (set_mips_isa_type): Add cases for
-        bfd_mach_mips5 and bfd_mach_mips64.
-        * mips-opc.c (I64): New definitions.
-
-        * mips-dis.c (set_mips_isa_type): Add case for
-        bfd_mach_mips_sb1.
+       mips-dis.c (print_insn_arg): Handle new 'U' and 'J' argument
+       specifiers.  Update 'B' for new constant names, and remove
+       'm'.
+       mips-opc.c (mips_builtin_opcodes): Place "pref" and "ssnop"
+       near the top of the array, so they are disassembled properly.
+       Enable "ssnop" for MIPS32.  Add "break" variant with 20 bit
+       code for MIPS32.  Update "clo" and "clz" to use 'U' operand
+       specifier.  Add 'H' format specifier variants for "mfc1,"
+       "mfc2," "mfc3," "mtc1," "mtc2," and "mtc3" for MIPS32.  Update
+       MIPS32 "sdbbp" to use 'B' operand specifier.  Add MIPS32
+       "wait" variant which uses 'J' operand specifier.
+
+       * mips-dis.c (set_mips_isa_type): Update to use
+       CPU_UNKNOWN and ISA_* constants.  Add bfd_mach_mips32 case.
+       Replace bfd_mach_mips4K with bfd_mach_mips32_4k case.
+       * mips-opc.c (I32): New constant for instructions added in
+       MIPS32.
+       (P4): Delete.
+       (mips_builtin_opcodes) Replace all uses of P4 with I32.
+
+       * mips-dis.c (set_mips_isa_type): Add cases for
+       bfd_mach_mips5 and bfd_mach_mips64.
+       * mips-opc.c (I64): New definitions.
+
+       * mips-dis.c (set_mips_isa_type): Add case for
+       bfd_mach_mips_sb1.
 
 2000-11-28  Hans-Peter Nilsson  <hp@bitrange.com>
 
 
 2000-09-07  Catherine Moore  <clm@redhat.com>
 
-        * d30v-opc.c (d30v_format_tab): Use format Ra for
-        modinc and moddec.
+       * d30v-opc.c (d30v_format_tab): Use format Ra for
+       modinc and moddec.
 
 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
 
index d2c21434f0011a598b189b1c4077f41861d4473a..ed6e8134e3217b96667fc72bf18b84397e8a644a 100644 (file)
@@ -477,7 +477,7 @@ arc-dis.lo: arc-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.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 \
-  $(INCDIR)/opcode/arc.h
+  $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h
 arc-ext.lo: arc-ext.c sysdep.h config.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 \
@@ -723,8 +723,8 @@ sparc-opc.lo: sparc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.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)/symcat.h $(INCDIR)/opcode/tic30.h
-tic4x-dis.lo: tic4x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
-  $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/tic4x.h
+tic4x-dis.lo: tic4x-dis.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.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)/symcat.h $(INCDIR)/opcode/tic54x.h \
   $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h
index 634161834a305fcd294953f8ee13b4b8cfa8d5b0..c4742303ebf3aae856b645e03d2954b62f07b952 100644 (file)
@@ -449,7 +449,7 @@ acinclude.m4 aclocal.m4 config.in configure configure.in
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = gtar
+TAR = tar
 GZIP_ENV = --best
 SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
 OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS)
@@ -973,7 +973,7 @@ arc-dis.lo: arc-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.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 \
-  $(INCDIR)/opcode/arc.h
+  $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h
 arc-ext.lo: arc-ext.c sysdep.h config.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 \
@@ -1219,8 +1219,8 @@ sparc-opc.lo: sparc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.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)/symcat.h $(INCDIR)/opcode/tic30.h
-tic4x-dis.lo: tic4x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
-  $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/tic4x.h
+tic4x-dis.lo: tic4x-dis.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.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)/symcat.h $(INCDIR)/opcode/tic54x.h \
   $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h
index af44788821a5156fce647fd77b6439bab4d45ae3..4ffdf9990f432bdb4c398eef08c2f100e493fc11 100644 (file)
@@ -526,7 +526,9 @@ print_insn_mips (memaddr, word, info)
            {
              register const char *d;
 
-             if (! OPCODE_IS_MEMBER (op, mips_isa, target_processor))
+             /* We always allow to disassemble the jalx instruction.  */
+             if (! OPCODE_IS_MEMBER (op, mips_isa, target_processor)
+                 && strcmp (op->name, "jalx"))
                continue;
 
              /* Figure out instruction type and branch delay information.  */
index 1f85d720f672d18b9992c0594ef9da755ed72d5f..861e4104d528dd8511f7856999366cda0bcb569d 100644 (file)
@@ -113,6 +113,7 @@ sparc-dis.c
 sparc-opc.c
 sysdep.h
 tic30-dis.c
+tic4x-dis.c
 tic54x-dis.c
 tic54x-opc.c
 tic80-dis.c
index 6039e3e0629b6eec44a0e63bfd978611b27ab119..2914776e6ab0b3f2232f0936914ddc6cdf4a1257 100644 (file)
@@ -4,9 +4,9 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: opcodes 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-17 13:58+0000\n"
-"PO-Revision-Date: 2002-02-24 13:59+0100\n"
+"Project-Id-Version: opcodes 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-09-24 07:13+0200\n"
 "Last-Translator: Martin v. Löwis <martin@v.loewis.de>\n"
 "Language-Team: German <de@li.org>\n"
 "MIME-Version: 1.0\n"
@@ -25,21 +25,21 @@ msgstr "Sprunghinweis ist nicht ausgerichtet (unaligned)."
 msgid "Illegal limm reference in last instruction!\n"
 msgstr "Ungültige limm-Referenz in der letzten Anweisung!\n"
 
-#: arm-dis.c:509
+#: arm-dis.c:507
 msgid "<illegal precision>"
 msgstr "<ungültige Präzision>"
 
-#: arm-dis.c:1019
+#: arm-dis.c:1010
 #, c-format
 msgid "Unrecognised register name set: %s\n"
 msgstr "Unbekannte Registernamensmenge: %s\n"
 
-#: arm-dis.c:1026
+#: arm-dis.c:1017
 #, c-format
 msgid "Unrecognised disassembler option: %s\n"
 msgstr "Unbekannte Disassembler-Option: %s\n"
 
-#: arm-dis.c:1198
+#: arm-dis.c:1191
 msgid ""
 "\n"
 "The following ARM specific disassembler options are supported for use with\n"
@@ -59,7 +59,8 @@ msgstr "Interner Disassemblerfehler."
 msgid "unknown constraint `%c'"
 msgstr ""
 
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
+#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
+#: openrisc-ibld.c:195 xstormy16-ibld.c:195
 #, c-format
 msgid "operand out of range (%ld not between %ld and %ld)"
 msgstr ""
@@ -85,104 +86,126 @@ msgstr "Unbekannter Fehler %d\n"
 msgid "Address 0x%x is out of bounds.\n"
 msgstr ""
 
-#: fr30-asm.c:324 m32r-asm.c:326 openrisc-asm.c:245
+#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
+#: xstormy16-asm.c:231
 #, c-format
 msgid "Unrecognized field %d while parsing.\n"
 msgstr ""
 
-#: fr30-asm.c:374 m32r-asm.c:376 openrisc-asm.c:295
+#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
+#: xstormy16-asm.c:281
 msgid "missing mnemonic in syntax string"
 msgstr ""
 
 #. We couldn't parse it.
-#: fr30-asm.c:510 fr30-asm.c:514 fr30-asm.c:601 fr30-asm.c:703 m32r-asm.c:512 m32r-asm.c:516 m32r-asm.c:603 m32r-asm.c:705 openrisc-asm.c:431 openrisc-asm.c:435 openrisc-asm.c:522 openrisc-asm.c:624
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
+#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
+#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
+#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
 msgid "unrecognized instruction"
 msgstr ""
 
-#: fr30-asm.c:557 m32r-asm.c:559 openrisc-asm.c:478
+#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
+#: xstormy16-asm.c:464
 #, c-format
 msgid "syntax error (expected char `%c', found `%c')"
 msgstr "Syntaxfehler (erwartetes Zeichen »%c«, gefunden »%c«)"
 
-#: fr30-asm.c:567 m32r-asm.c:569 openrisc-asm.c:488
+#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
+#: xstormy16-asm.c:474
 #, c-format
 msgid "syntax error (expected char `%c', found end of instruction)"
 msgstr ""
 
-#: fr30-asm.c:595 m32r-asm.c:597 openrisc-asm.c:516
+#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
+#: xstormy16-asm.c:502
 msgid "junk at end of line"
 msgstr ""
 
-#: fr30-asm.c:702 m32r-asm.c:704 openrisc-asm.c:623
+#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
+#: xstormy16-asm.c:609
 msgid "unrecognized form of instruction"
 msgstr ""
 
-#: fr30-asm.c:714 m32r-asm.c:716 openrisc-asm.c:635
+#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
+#: xstormy16-asm.c:621
 #, c-format
 msgid "bad instruction `%.50s...'"
 msgstr ""
 
-#: fr30-asm.c:717 m32r-asm.c:719 openrisc-asm.c:638
+#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
+#: xstormy16-asm.c:624
 #, c-format
 msgid "bad instruction `%.50s'"
 msgstr ""
 
 #. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: xstormy16-dis.c:39
 msgid "*unknown*"
 msgstr ""
 
-#: fr30-dis.c:319 m32r-dis.c:250 openrisc-dis.c:137
+#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
+#: xstormy16-dis.c:169
 #, c-format
 msgid "Unrecognized field %d while printing insn.\n"
 msgstr ""
 
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: xstormy16-ibld.c:166
 #, c-format
 msgid "operand out of range (%ld not between %ld and %lu)"
 msgstr ""
 
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: xstormy16-ibld.c:179
 #, c-format
 msgid "operand out of range (%lu not between 0 and %lu)"
 msgstr ""
 
-#: fr30-ibld.c:731 m32r-ibld.c:660 openrisc-ibld.c:634
+#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
+#: xstormy16-ibld.c:678
 #, c-format
 msgid "Unrecognized field %d while building insn.\n"
 msgstr ""
 
-#: fr30-ibld.c:939 m32r-ibld.c:794 openrisc-ibld.c:737
+#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
+#: xstormy16-ibld.c:826
 #, c-format
 msgid "Unrecognized field %d while decoding insn.\n"
 msgstr ""
 
-#: fr30-ibld.c:1088 m32r-ibld.c:904 openrisc-ibld.c:817
+#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
+#: xstormy16-ibld.c:939
 #, c-format
 msgid "Unrecognized field %d while getting int operand.\n"
 msgstr ""
 
-#: fr30-ibld.c:1217 m32r-ibld.c:994 openrisc-ibld.c:877
+#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
+#: xstormy16-ibld.c:1032
 #, c-format
 msgid "Unrecognized field %d while getting vma operand.\n"
 msgstr ""
 
-#: fr30-ibld.c:1351 m32r-ibld.c:1092 openrisc-ibld.c:946
+#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
+#: xstormy16-ibld.c:1134
 #, c-format
 msgid "Unrecognized field %d while setting int operand.\n"
 msgstr ""
 
-#: fr30-ibld.c:1473 m32r-ibld.c:1178 openrisc-ibld.c:1003
+#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
+#: xstormy16-ibld.c:1224
 #, c-format
 msgid "Unrecognized field %d while setting vma operand.\n"
 msgstr ""
 
-#: h8300-dis.c:384
+#: h8300-dis.c:385
 #, c-format
 msgid "Hmmmm %x"
 msgstr ""
 
-#: h8300-dis.c:395
+#: h8300-dis.c:396
 #, c-format
 msgid "Don't understand %x \n"
 msgstr ""
@@ -232,12 +255,12 @@ msgstr ""
 msgid "# <dis error: %08x>"
 msgstr ""
 
-#: mips-dis.c:290
+#: mips-dis.c:337
 #, c-format
 msgid "# internal error, undefined modifier(%c)"
 msgstr ""
 
-#: mips-dis.c:1154
+#: mips-dis.c:1209
 #, c-format
 msgid "# internal disassembler error, unrecognised modifier (%c)"
 msgstr ""
@@ -271,62 +294,62 @@ msgstr ""
 msgid "$<undefined>"
 msgstr ""
 
-#: ppc-opc.c:765 ppc-opc.c:798
+#: ppc-opc.c:777 ppc-opc.c:810
 msgid "invalid conditional option"
 msgstr ""
 
-#: ppc-opc.c:800
+#: ppc-opc.c:812
 msgid "attempt to set y bit when using + or - modifier"
 msgstr ""
 
-#: ppc-opc.c:832 ppc-opc.c:884
+#: ppc-opc.c:844 ppc-opc.c:896
 msgid "offset not a multiple of 4"
 msgstr ""
 
-#: ppc-opc.c:857
+#: ppc-opc.c:869
 msgid "offset not between -2048 and 2047"
 msgstr ""
 
-#: ppc-opc.c:882
+#: ppc-opc.c:894
 msgid "offset not between -8192 and 8191"
 msgstr ""
 
-#: ppc-opc.c:910
+#: ppc-opc.c:922
 msgid "ignoring least significant bits in branch offset"
 msgstr ""
 
-#: ppc-opc.c:944 ppc-opc.c:981
+#: ppc-opc.c:956 ppc-opc.c:993
 msgid "illegal bitmask"
 msgstr ""
 
-#: ppc-opc.c:1054
+#: ppc-opc.c:1066
 msgid "value out of range"
 msgstr ""
 
-#: ppc-opc.c:1130
+#: ppc-opc.c:1142
 msgid "index register in load range"
 msgstr ""
 
-#: ppc-opc.c:1146
+#: ppc-opc.c:1158
 msgid "invalid register operand when updating"
 msgstr ""
 
 #. Mark as non-valid instruction
-#: sparc-dis.c:749
+#: sparc-dis.c:750
 msgid "unknown"
 msgstr ""
 
-#: sparc-dis.c:824
+#: sparc-dis.c:825
 #, c-format
 msgid "Internal error:  bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr ""
 
-#: sparc-dis.c:835
+#: sparc-dis.c:836
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr ""
 
-#: sparc-dis.c:884
+#: sparc-dis.c:885
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
 msgstr ""
@@ -389,3 +412,31 @@ msgstr ""
 #: v850-opc.c:375
 msgid "immediate value must be even"
 msgstr "Der Direktoperand muss gerade sein."
+
+#: xstormy16-asm.c:74
+msgid "Bad register in preincrement"
+msgstr ""
+
+#: xstormy16-asm.c:79
+msgid "Bad register in postincrement"
+msgstr ""
+
+#: xstormy16-asm.c:81
+msgid "Bad register name"
+msgstr "Falscher Registername."
+
+#: xstormy16-asm.c:85
+msgid "Label conflicts with register name"
+msgstr ""
+
+#: xstormy16-asm.c:89
+msgid "Label conflicts with `Rx'"
+msgstr ""
+
+#: xstormy16-asm.c:91
+msgid "Bad immediate expression"
+msgstr ""
+
+#: xstormy16-asm.c:120
+msgid "Small operand was not an immediate number"
+msgstr ""
index e10f1dab3a56837df9b3862c5edde4c500af0f42..100ece186e5879c2db49184e8f7a6cd819524361 100644 (file)
@@ -1,3 +1,7 @@
+2002-09-26  Jim Wilson  <wilson@redhat.com>
+
+       * simops (OP_10007E0): Don't subtract 4 from PC.
+
 2002-09-19  Nick Clifton  <nickc@redhat.com>
 
        * interp.c (sim_open): Remove reference to v850ea.
index d8a4d58ae11334c3d3ca53b4c62cdfd23d8d9e7a..eba728fa287cdd88ee98d270ac62ae24aa8d8744 100644 (file)
@@ -1880,7 +1880,7 @@ OP_10007E0 ()
       ECR |= 0x40 + OP[0];
       /* Flag that we are now doing exception processing.  */
       PSW |= PSW_EP | PSW_ID;
-      PC = ((OP[0] < 0x10) ? 0x40 : 0x50) - 4;
+      PC = (OP[0] < 0x10) ? 0x40 : 0x50;
 
       return 0;
     }