aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobody <>2002-10-25 18:55:23 +0000
committernobody <>2002-10-25 18:55:23 +0000
commit534f74e249078b2441e9fbb739677ba2ccb1f408 (patch)
tree3caaa6491967d0c657fe2a81c103a315163fcb7e
parentd48ee38f3dbd6806cff2ebee97cdd21e905df7f5 (diff)
downloadgdb-carlton_dictionary-20021025-merge.zip
gdb-carlton_dictionary-20021025-merge.tar.gz
gdb-carlton_dictionary-20021025-merge.tar.bz2
This commit was manufactured by cvs2svn to create tagcarlton_dictionary-20021025-merge
'carlton_dictionary-20021025-merge'. Sprout from drow-cplus-branch 2002-10-04 22:17:37 UTC nobody 'This commit was manufactured by cvs2svn to create branch 'drow-cplus-' Cherrypick from drow-cplus-branch 2002-10-25 15:43:04 UTC nobody 'This commit was manufactured by cvs2svn to create branch 'drow-cplus-': bfd/elf32-qnx.c bfd/simple.c gdb/config/i386/obsd.mt gdb/i386obsd-tdep.c gdb/testsuite/gdb.asm/mips.inc Cherrypick from master 2002-10-25 18:55:22 UTC Jim Wilson <wilson@tuliptree.org> 'Add some string section merging support.': ChangeLog bfd/ChangeLog bfd/Makefile.am bfd/Makefile.in bfd/aoutx.h bfd/archive.c bfd/archures.c bfd/bfd-in.h bfd/bfd-in2.h bfd/bfd.c bfd/binary.c bfd/coff-arm.c bfd/coffgen.c bfd/cofflink.c bfd/config.bfd bfd/configure bfd/configure.in bfd/doc/ChangeLog bfd/doc/Makefile.am bfd/doc/Makefile.in bfd/dwarf2.c bfd/ecoff.c bfd/elf.c bfd/elf32-arc.c bfd/elf32-arm.h bfd/elf32-d10v.c bfd/elf32-i386.c bfd/elf32-ip2k.c bfd/elf32-m32r.c bfd/elf32-m68hc11.c bfd/elf32-m68hc12.c bfd/elf32-or32.c bfd/elf32-ppc.c bfd/elf32-qnx.h bfd/elf32-sh.c bfd/elf32-sh64.c bfd/elf64-alpha.c bfd/elf64-hppa.c bfd/elf64-ppc.c bfd/elf64-sh64.c bfd/elfarm-nabi.c bfd/elflink.c bfd/elflink.h bfd/elfxx-ia64.c bfd/elfxx-mips.c bfd/elfxx-target.h bfd/format.c bfd/gen-aout.c bfd/libbfd.c bfd/libbfd.h bfd/libcoff.h bfd/linker.c bfd/merge.c bfd/opncls.c bfd/po/BLD-POTFILES.in bfd/po/SRC-POTFILES.in bfd/reloc.c bfd/section.c bfd/srec.c bfd/stabs.c bfd/syms.c bfd/targets.c bfd/version.h bfd/vms-hdr.c bfd/xcofflink.c configure.in gdb/ChangeLog gdb/MAINTAINERS gdb/Makefile.in gdb/NEWS gdb/ada-lang.c gdb/blockframe.c gdb/breakpoint.c gdb/c-exp.y gdb/c-lang.h gdb/c-typeprint.c gdb/config/alpha/nm-fbsd.h gdb/config/alpha/nm-linux.h gdb/config/alpha/nm-nbsd.h gdb/config/alpha/nm-osf.h gdb/config/djgpp/fnchange.lst gdb/config/i386/i386gnu.mt gdb/config/i386/i386sco5.mt gdb/config/i386/i386v4.mt gdb/config/i386/ncr3000.mt gdb/config/i386/nm-i386sco.h gdb/config/i386/tm-i386sol2.h gdb/config/i386/tm-i386v42mp.h gdb/config/i386/tm-ptx.h gdb/config/i386/xm-i386sco.h gdb/config/mips/nm-irix4.h gdb/config/mips/nm-irix5.h gdb/config/mips/tm-embed.h gdb/config/mips/tm-irix3.h gdb/config/mips/tm-irix6.h gdb/config/pa/nm-hppah.h gdb/config/rs6000/tm-rs6000.h gdb/config/tm-sysv4.h gdb/configure gdb/configure.in gdb/configure.tgt gdb/corefile.c gdb/cp-valprint.c gdb/defs.h gdb/demangle.c gdb/doc/ChangeLog gdb/doc/gdb.texinfo gdb/doc/gdbint.texinfo gdb/dwarf2cfi.c gdb/dwarf2cfi.h gdb/dwarf2read.c gdb/expression.h gdb/f-valprint.c gdb/findvar.c gdb/gdb_indent.sh gdb/gdbarch.c gdb/gdbarch.h gdb/gdbarch.sh gdb/gdbcore.h gdb/gdbtypes.c gdb/gdbtypes.h gdb/hppa-tdep.c gdb/hpread.c gdb/i386bsd-nat.c gdb/i386obsd-nat.c gdb/i386v-nat.c gdb/infcmd.c gdb/infrun.c gdb/jv-exp.y gdb/language.c gdb/language.h gdb/linespec.c gdb/mi/ChangeLog gdb/mi/mi-cmd-stack.c gdb/mi/mi-cmd-var.c gdb/mi/mi-main.c gdb/mips-tdep.c gdb/objc-exp.y gdb/objc-lang.c gdb/p-exp.y gdb/parse.c gdb/printcmd.c gdb/solib-sunos.c gdb/solib-svr4.c gdb/solib-svr4.h gdb/source.c gdb/stabsread.c gdb/symfile.c gdb/symfile.h gdb/symtab.c gdb/symtab.h gdb/testsuite/ChangeLog gdb/testsuite/gdb.asm/asm-source.exp gdb/testsuite/gdb.asm/asmsrc1.s gdb/testsuite/gdb.asm/asmsrc2.s gdb/testsuite/gdb.asm/common.inc gdb/testsuite/gdb.base/constvars.c gdb/testsuite/gdb.base/constvars.exp gdb/testsuite/gdb.base/default.exp gdb/testsuite/gdb.base/help.exp gdb/testsuite/gdb.mi/ChangeLog gdb/testsuite/gdb.mi/mi-var-cmd.exp gdb/testsuite/gdb.mi/mi1-var-cmd.exp gdb/testsuite/gdb.threads/schedlock.c gdb/utils.c gdb/valops.c gdb/value.h gdb/varobj.c gdb/version.in gdb/x86-64-linux-tdep.c gdb/x86-64-tdep.c gdb/x86-64-tdep.h include/ChangeLog include/ansidecl.h include/elf/ChangeLog include/elf/sh.h include/getopt.h include/opcode/ChangeLog include/opcode/cgen.h libiberty/ChangeLog libiberty/config.table libiberty/cplus-dem.c opcodes/ChangeLog opcodes/m68hc11-dis.c opcodes/sparc-opc.c sim/common/ChangeLog sim/common/cgen-trace.h sim/sh/ChangeLog sim/sh/gencode.c sim/sh/interp.c Delete: bfd/elf32-i386-fbsd.c bfd/elf32-i386qnx.c bfd/elf32-ppcqnx.c bfd/elf32-sh-lin.c bfd/elf32-sh-nbsd.c bfd/elf32-sh64-nbsd.c bfd/elf32-shqnx.c bfd/elf64-alpha-fbsd.c bfd/elf64-sh64-nbsd.c bfd/elfarmqnx-nabi.c gdb/config/i386/tm-i386v4.h
-rw-r--r--ChangeLog9
-rw-r--r--bfd/ChangeLog454
-rw-r--r--bfd/Makefile.am106
-rw-r--r--bfd/Makefile.in115
-rw-r--r--bfd/aoutx.h88
-rw-r--r--bfd/archive.c11
-rw-r--r--bfd/archures.c50
-rw-r--r--bfd/bfd-in.h6
-rw-r--r--bfd/bfd-in2.h77
-rw-r--r--bfd/bfd.c9
-rw-r--r--bfd/binary.c2
-rw-r--r--bfd/coff-arm.c16
-rw-r--r--bfd/coffgen.c2
-rw-r--r--bfd/cofflink.c3
-rw-r--r--bfd/config.bfd12
-rwxr-xr-xbfd/configure532
-rw-r--r--bfd/configure.in62
-rw-r--r--bfd/doc/ChangeLog8
-rw-r--r--bfd/doc/Makefile.am2
-rw-r--r--bfd/doc/Makefile.in5
-rw-r--r--bfd/dwarf2.c150
-rw-r--r--bfd/ecoff.c12
-rw-r--r--bfd/elf.c4
-rw-r--r--bfd/elf32-arc.c5
-rw-r--r--bfd/elf32-arm.h45
-rw-r--r--bfd/elf32-d10v.c2
-rw-r--r--bfd/elf32-i386-fbsd.c56
-rw-r--r--bfd/elf32-i386.c110
-rw-r--r--bfd/elf32-i386qnx.c30
-rw-r--r--bfd/elf32-ip2k.c2
-rw-r--r--bfd/elf32-m32r.c30
-rw-r--r--bfd/elf32-m68hc11.c144
-rw-r--r--bfd/elf32-m68hc12.c2
-rw-r--r--bfd/elf32-or32.c2
-rw-r--r--bfd/elf32-ppc.c22
-rw-r--r--bfd/elf32-ppcqnx.c32
-rw-r--r--bfd/elf32-qnx.c92
-rw-r--r--bfd/elf32-qnx.h101
-rw-r--r--bfd/elf32-sh-lin.c110
-rw-r--r--bfd/elf32-sh-nbsd.c29
-rw-r--r--bfd/elf32-sh.c1507
-rw-r--r--bfd/elf32-sh64-nbsd.c29
-rw-r--r--bfd/elf32-sh64.c66
-rw-r--r--bfd/elf32-shqnx.c31
-rw-r--r--bfd/elf64-alpha-fbsd.c56
-rw-r--r--bfd/elf64-alpha.c58
-rw-r--r--bfd/elf64-hppa.c5
-rw-r--r--bfd/elf64-ppc.c31
-rw-r--r--bfd/elf64-sh64-nbsd.c29
-rw-r--r--bfd/elf64-sh64.c84
-rw-r--r--bfd/elfarm-nabi.c29
-rw-r--r--bfd/elfarmqnx-nabi.c34
-rw-r--r--bfd/elflink.c50
-rw-r--r--bfd/elflink.h171
-rw-r--r--bfd/elfxx-ia64.c8
-rw-r--r--bfd/elfxx-mips.c129
-rw-r--r--bfd/elfxx-target.h3
-rw-r--r--bfd/format.c4
-rw-r--r--bfd/gen-aout.c4
-rw-r--r--bfd/libbfd.c12
-rw-r--r--bfd/libbfd.h8
-rw-r--r--bfd/libcoff.h2
-rw-r--r--bfd/linker.c16
-rw-r--r--bfd/merge.c6
-rw-r--r--bfd/opncls.c70
-rw-r--r--bfd/po/BLD-POTFILES.in1
-rw-r--r--bfd/po/SRC-POTFILES.in13
-rw-r--r--bfd/reloc.c20
-rw-r--r--bfd/section.c5
-rw-r--r--bfd/simple.c197
-rw-r--r--bfd/srec.c4
-rw-r--r--bfd/stabs.c20
-rw-r--r--bfd/syms.c10
-rw-r--r--bfd/targets.c15
-rw-r--r--bfd/version.h4
-rw-r--r--bfd/vms-hdr.c1
-rw-r--r--bfd/xcofflink.c6
-rw-r--r--configure.in9
-rw-r--r--gdb/ChangeLog431
-rw-r--r--gdb/MAINTAINERS4
-rw-r--r--gdb/Makefile.in9
-rw-r--r--gdb/NEWS5
-rw-r--r--gdb/ada-lang.c6
-rw-r--r--gdb/blockframe.c14
-rw-r--r--gdb/breakpoint.c21
-rw-r--r--gdb/c-exp.y17
-rw-r--r--gdb/c-lang.h3
-rw-r--r--gdb/c-typeprint.c32
-rw-r--r--gdb/config/alpha/nm-fbsd.h2
-rw-r--r--gdb/config/alpha/nm-linux.h2
-rw-r--r--gdb/config/alpha/nm-nbsd.h2
-rw-r--r--gdb/config/alpha/nm-osf.h2
-rw-r--r--gdb/config/djgpp/fnchange.lst1
-rw-r--r--gdb/config/i386/i386gnu.mt2
-rw-r--r--gdb/config/i386/i386sco5.mt2
-rw-r--r--gdb/config/i386/i386v4.mt2
-rw-r--r--gdb/config/i386/ncr3000.mt2
-rw-r--r--gdb/config/i386/nm-i386sco.h8
-rw-r--r--gdb/config/i386/obsd.mt3
-rw-r--r--gdb/config/i386/tm-i386sol2.h2
-rw-r--r--gdb/config/i386/tm-i386v4.h39
-rw-r--r--gdb/config/i386/tm-i386v42mp.h2
-rw-r--r--gdb/config/i386/tm-ptx.h2
-rw-r--r--gdb/config/i386/xm-i386sco.h5
-rw-r--r--gdb/config/mips/nm-irix4.h2
-rw-r--r--gdb/config/mips/nm-irix5.h2
-rw-r--r--gdb/config/mips/tm-embed.h2
-rw-r--r--gdb/config/mips/tm-irix3.h5
-rw-r--r--gdb/config/mips/tm-irix6.h5
-rw-r--r--gdb/config/pa/nm-hppah.h2
-rw-r--r--gdb/config/rs6000/tm-rs6000.h5
-rw-r--r--gdb/config/tm-sysv4.h10
-rwxr-xr-xgdb/configure863
-rw-r--r--gdb/configure.in2
-rw-r--r--gdb/configure.tgt10
-rw-r--r--gdb/corefile.c8
-rw-r--r--gdb/cp-valprint.c16
-rw-r--r--gdb/defs.h7
-rw-r--r--gdb/demangle.c31
-rw-r--r--gdb/doc/ChangeLog23
-rw-r--r--gdb/doc/gdb.texinfo4
-rw-r--r--gdb/doc/gdbint.texinfo135
-rw-r--r--gdb/dwarf2cfi.c46
-rw-r--r--gdb/dwarf2cfi.h36
-rw-r--r--gdb/dwarf2read.c298
-rw-r--r--gdb/expression.h21
-rw-r--r--gdb/f-valprint.c12
-rw-r--r--gdb/findvar.c27
-rwxr-xr-xgdb/gdb_indent.sh2
-rw-r--r--gdb/gdbarch.c134
-rw-r--r--gdb/gdbarch.h65
-rwxr-xr-xgdb/gdbarch.sh4
-rw-r--r--gdb/gdbcore.h7
-rw-r--r--gdb/gdbtypes.c26
-rw-r--r--gdb/gdbtypes.h16
-rw-r--r--gdb/hppa-tdep.c2
-rw-r--r--gdb/hpread.c2
-rw-r--r--gdb/i386bsd-nat.c11
-rw-r--r--gdb/i386obsd-nat.c8
-rw-r--r--gdb/i386obsd-tdep.c122
-rw-r--r--gdb/i386v-nat.c2
-rw-r--r--gdb/infcmd.c2
-rw-r--r--gdb/infrun.c21
-rw-r--r--gdb/jv-exp.y16
-rw-r--r--gdb/language.c7
-rw-r--r--gdb/language.h3
-rw-r--r--gdb/linespec.c12
-rw-r--r--gdb/mi/ChangeLog16
-rw-r--r--gdb/mi/mi-cmd-stack.c26
-rw-r--r--gdb/mi/mi-cmd-var.c10
-rw-r--r--gdb/mi/mi-main.c31
-rw-r--r--gdb/mips-tdep.c3
-rw-r--r--gdb/objc-exp.y25
-rw-r--r--gdb/objc-lang.c4
-rw-r--r--gdb/p-exp.y3
-rw-r--r--gdb/parse.c18
-rw-r--r--gdb/printcmd.c14
-rw-r--r--gdb/solib-sunos.c8
-rw-r--r--gdb/solib-svr4.c71
-rw-r--r--gdb/solib-svr4.h4
-rw-r--r--gdb/source.c7
-rw-r--r--gdb/stabsread.c47
-rw-r--r--gdb/symfile.c7
-rw-r--r--gdb/symfile.h6
-rw-r--r--gdb/symtab.c75
-rw-r--r--gdb/symtab.h100
-rw-r--r--gdb/testsuite/ChangeLog24
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp9
-rw-r--r--gdb/testsuite/gdb.asm/asmsrc1.s16
-rw-r--r--gdb/testsuite/gdb.asm/asmsrc2.s3
-rw-r--r--gdb/testsuite/gdb.asm/common.inc14
-rw-r--r--gdb/testsuite/gdb.asm/mips.inc64
-rw-r--r--gdb/testsuite/gdb.base/constvars.c5
-rw-r--r--gdb/testsuite/gdb.base/constvars.exp5
-rw-r--r--gdb/testsuite/gdb.base/default.exp4
-rw-r--r--gdb/testsuite/gdb.base/help.exp8
-rw-r--r--gdb/testsuite/gdb.mi/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-cmd.exp20
-rw-r--r--gdb/testsuite/gdb.mi/mi1-var-cmd.exp20
-rw-r--r--gdb/testsuite/gdb.threads/schedlock.c2
-rw-r--r--gdb/utils.c63
-rw-r--r--gdb/valops.c36
-rw-r--r--gdb/value.h2
-rw-r--r--gdb/varobj.c16
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/x86-64-linux-tdep.c82
-rw-r--r--gdb/x86-64-tdep.c21
-rw-r--r--gdb/x86-64-tdep.h6
-rw-r--r--include/ChangeLog10
-rw-r--r--include/ansidecl.h5
-rw-r--r--include/elf/ChangeLog4
-rw-r--r--include/elf/sh.h16
-rw-r--r--include/getopt.h2
-rw-r--r--include/opcode/ChangeLog4
-rw-r--r--include/opcode/cgen.h16
-rw-r--r--libiberty/ChangeLog10
-rw-r--r--libiberty/config.table1
-rw-r--r--libiberty/cplus-dem.c18
-rw-r--r--opcodes/ChangeLog12
-rw-r--r--opcodes/m68hc11-dis.c99
-rw-r--r--opcodes/sparc-opc.c38
-rw-r--r--sim/common/ChangeLog4
-rw-r--r--sim/common/cgen-trace.h2
-rw-r--r--sim/sh/ChangeLog8
-rw-r--r--sim/sh/gencode.c33
-rw-r--r--sim/sh/interp.c19
206 files changed, 6249 insertions, 2906 deletions
diff --git a/ChangeLog b/ChangeLog
index f01dee3..8a3bf45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-10-24 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * configure.in (i[3456]86-*-linux*): Add check to disable
+ ${libgcj} for glibc1.
+
+2002-10-07 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * configure.in: Add tic4x target.
+
2002-10-03 Nathanael Nerode <neroden@gcc.gnu.org>
* Makefile.tpl: Make SET_LIB_PATH substitution more autoconfy.
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f2c7a38..7e6a412 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,421 @@
+2002-10-25 Jim Wilson <wilson@redhat.com>
+
+ * elf64-sh64.c (sh_elf64_relocate_section): Call
+ _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
+ of SHF_MERGE section.
+
+2002-10-25 Hans-Peter Nilsson <hp@axis.com>
+
+ * simple.c: Correct placement of ATTRIBUTE_UNUSED.
+
+2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
+ unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
+ unsigned int.
+ (NAME(aout,final_link)): Cast enum used in assignment.
+ (aout_link_write_symbols): Cast enums in comparisons, int values to
+ boolean, enums in assignments to int.
+ (aout_link_input_section_std): Cast rel->r_index to unsigned int.
+ (aout_link_input_section_ext): Likewise. Cast enums used in comparisons
+ with unsigned ints.
+ (aout_link_reloc_link_order): Cast enum to int in assignment.
+ * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
+ calls to char *.
+ * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
+ assignment.
+ * bfd-in2.h (bfd_set_section_vma): Likewise.
+ * bfd.c (bfd_record_phdr): Cast enums in assignments.
+ * binary.c (bfd_alloc): Cast enum to long.
+ * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
+ * dwarf2.c (read_abbrevs): Add casts to enum types.
+ (read_attribute_value): Likewise.
+ (arange_add): Cast result of bfd_zalloc call.
+ (comp_unit_contains_address): Return true and false.
+ (comp_unit_find_nearest_line): Cast return to boolean.
+ * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
+ * gen-aout.c: define macro '_' if not defined.
+ * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
+ (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
+ (bfd_write_bigendian_4byte_int): Cast return to boolean.
+ (bfd_seek): Cast bfd_realloc to bfd_byte *.
+ (bfd_generic_is_local_label_name): Cast return to boolean.
+ * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
+ * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
+ struct bfd_hash_entry *.
+ (_bfd_generic_link_hash_newfunc): likewise.
+ (_bfd_generic_final_link): Cast enum to unsigned int.
+ * merge.c (sec_merge_emit): Cast return to boolean.
+ (merge_strings): Add casts to const unsigned char *.
+ * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
+ (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
+ * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
+ struct bfd_hash_entry *.
+ (bfd_set_section_content): Add cast to PTR in comparison.
+ * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
+ simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
+ simple_dummy_unattached_reloc,
+ bfd_simple_get_relocated_section_contents): Add K&R declarations and
+ function definitions.
+ * srec.c (S3Forced): Initialize to false.
+ (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
+ * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
+ (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
+ * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
+ (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
+ comparisons.
+
+2002-10-23 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
+ relocs into shared lib non-allocated reloc sections.
+
+2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
+
+ * dwarf2.c (add_line_info): Ensure that the line_info_table is
+ sorted even when given an out-of-order line sequence.
+ (lookup_address_in_line_info_table): When an exact VMA match is
+ not found, return line information with the closest VMA.
+
+2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
+
+ * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
+ HPUX 11.00 patch PHSS_26559.
+
+2002-10-22 Alexandre Oliva <aoliva@redhat.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
+ the options section into a separate section unless IRIX 6
+ compatibility is enabled.
+
+2002-10-22 Alexandre Oliva <aoliva@redhat.com>
+
+ * elflink.h (struct elf_link_sort_rela): Turn rel and rela
+ into arrays.
+ (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
+ (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
+ into account.
+ * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
+ R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
+
+2002-10-21 Graeme Peterson <gp@qnx.com>
+
+ * targets.c (_bfd_target_vector): Add missing qnx vectors.
+
+2002-10-21 Alan Modra <amodra@bigpond.net.au>
+
+ * targets.c (bfd_target_list): Don't return the default target twice.
+
+2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
+
+ * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
+ perror with bfd_perror.
+
+2002-10-19 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_link_add_object_symbols): Correctly handle
+ DT_RPATH and DT_RUNPATH.
+
+2002-10-19 Mark Kettenis <kettenis@gnu.org>
+
+ * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
+
+2002-10-17 Denis Chertykov <denisc@overta.ru>
+
+ * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
+ for ip2k port.
+
+2002-10-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elfxx-target.h (USE_REL): Don't define as 1.
+ * elf32-arm.h (USE_REL): Provide a default define of 0.
+ Use #if rather than #ifdef when testing USE_REL.
+ * elf32-m32r.c: Likewise.
+
+ * elf32-arc.c (USE_REL): Define as 1.
+ * elf32-d10v.c (USE_REL): Likewise.
+ * elf32-m32r.c (USE_REL): Likewise.
+ * elf32-m68hc11.c (USE_REL): Likewise.
+ * elf32-m68hc12.c (USE_REL): Likewise.
+ * elf32-or32.c (USE_REL): Likewise.
+ * elfarm-nabi.c (USE_REL): Likewise.
+
+2002-10-16 Jakub Jelinek <jakub@redhat.com>
+
+ * config.bfd (s390-*-linux*): Add targ64_selvecs.
+ (s390x-*-linux*): Add targ_selvecs.
+
+2002-10-16 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
+ elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
+ elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
+ elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
+ (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
+ (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
+ (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
+ (SOURCE_HFILES): Add elf32-qnx.h.
+ (BUILD_HFILES): Add bfdver.h.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * configure.in Update bfd vector dependencies.
+ * configure: Regenerate.
+ * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
+ * elf32-i386qnx.c: Likewise.
+ * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
+ * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
+ * elf32-sh-lin.c: Likewise.
+ * elf32-shqnx.c: Likewise.
+ * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
+ * elf32-sh64-nbsd.c: Likewise.
+ * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
+ * elf64-sh64-nbsd.c: Likewise.
+ * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
+ * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
+ * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
+ * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
+ * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
+ (elf_backend_is_contained_by_filepos): Likewise.
+ (elf_backend_copy_private_bfd_data_p): Likewise.
+ Globalize and move functions to..
+ * elf32-qnx.c: ..here. New file.
+ * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
+ emit target vectors when INCLUDE_SHMEDIA.
+ * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
+ end of file.
+ * elf64-sh64.c: Remove ELF_ARCH test.
+ * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
+ * po/BLD-POTFILES.in: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2002-10-16 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
+ loaded with --just-symbols.
+
+ * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
+ * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
+ * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
+ * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
+
+2002-10-15 Richard Henderson <rth@redhat.com>
+
+ * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
+ (BFD64_BACKENDS_CFILES): Likewise.
+ * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
+ * elf64-alpha-fbsd.c: Remove file, move code ...
+ * elf64-alpha.c: ... here.
+ * Makefile.in, configure: Rebuild.
+
+2002-10-14 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
+ VALUE, not ADDEND.
+
+2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
+
+ * elf32-sh.c (elf_sh_link_hash_entry): Replace
+ datalabel_got_offset with union of datalabel_got
+ offset and refcount.
+ (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
+ (allocate_dynrelocs): Delete unnecessary code for
+ STT_DATALABEL type. Create entry in got for
+ datalabel version of symbol if datalabel_got.refcount > 0.
+ (sh_elf_relocate_section): Use datalabel_got union.
+ (sh_elf_gc_sweep_hook): Pull common code to initialize
+ h and eh out of switch statement. Declare seen_stt_datalabel.
+ Initialize it. Decrement datalabel_got.refcount for
+ got relocs when seen_stt_datalabel is true.
+ Decrement local_got_refcounts entry for datalabel got relocs
+ of local symbols.
+ (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
+ (sh_elf_check_relocs): Declare seen_stt_datalabel.
+ Initialize it. When seen_stt_datalabel is true, increment
+ datalabel_got refcount rather than got.refcount.
+ (sh_elf_finish_dynamic_symbol): Create relocs to
+ initialize got entry for datalabel version of symbol.
+
+2002-10-14 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ (BFD_H_FILES): Remove version.h.
+ * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
+ * version.h: ..to here.
+ * configure.in (bfd_version_date): Remove.
+ (AC_OUTPUT): Make bfdver.h from version.h.
+ * bfd.c: #include "bfdver.h".
+ * vms-hdr.c: Likewise.
+ * Makefile.in: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * configure: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2002-10-14 Alan Modra <amodra@bigpond.net.au>
+
+ * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
+ bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
+ bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
+ bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
+ bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
+ bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
+ bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
+ bfd_mach_ip2022, bfd_mach_ip2022ext,
+ bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
+ * bfd-in2.h: Regenerate.
+
+2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
+ endian vector to targ_selvecs.
+
+2002-10-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * elfxx-mips.c (mips_elf_calculate_relocation): Take
+ save_addend argument. Don't apply the 32-bit mask to a
+ GPREL32 value if it's to be used in another relocation. Don't
+ use forced-check computation of local_p to decide whether to
+ add gp0 to GPREL16 value. Don't use only the lowest 16 bits
+ of the addend of a non-in-place GPREL16 relocation.
+ (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
+ mips_elf_calculate_relocation().
+
+2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
+
+ * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
+ with symbols in other sections if we relaxed something; the sections
+ output offsets must be re-computed before.
+
+2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
+
+ * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
+ handling to use Elf_Internal_Sym.
+ (m68hc11_elf_relax_delete_bytes): Likewise.
+
+2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
+ sh_elf_object_p, dtpoff_base): New functions.
+ (sh_elf_howto_table): Add TLS relocs.
+ (sh_reloc_map): Likewise.
+ (sh_elf_info_to_howto): Support TLS relocs.
+ (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
+ (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
+ New macros.
+ (sh_elf_obj_tdata): New.
+ (elf_sh_link_hash_table): Add tls_ldm_got.
+ (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
+ (allocate_dynrelocs): Support TLS relocs.
+ (sh_elf_size_dynamic_sections): Likewise.
+ (sh_elf_relocate_section): Support TLS relocs. Don't try to find
+ .rela.got section when found already. Return false after printing
+ error about unresolvable relocation.
+ (sh_elf_gc_sweep_hook): Support TLS relocs.
+ (sh_elf_check_relocs): Likewise.
+ (sh_elf_finish_dynamic_symbol): Likewise.
+ (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
+ * reloc.c: Add SH TLS relocs.
+ * bfd-in2.h, libbfd.h: Regenerate.
+
+2002-10-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.in: Regenerated.
+
+2002-10-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.am: Run dep-am.
+ (BFD_H_DEP): Add simple.c and linker.c.
+ (BFD32_LIBS): Add simple.lo.
+ (BFD32_LIBS_CFILES): Add simple.c.
+ * Makefile.in: Regenerated.
+ * bfd-in2.h: Regenerated.
+ * simple.c: New file.
+
+2002-10-11 Alan Modra <amodra@bigpond.net.au>
+
+ * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
+ (record_thumb_to_arm_glue): Likewise.
+ * ecoff.c (ecoff_link_add_externals): Likewise.
+ * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
+ (record_thumb_to_arm_glue): Likewise.
+ * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
+ * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
+ * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
+ * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
+ * elf64-ppc.c (func_desc_adjust): Likewise.
+ * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
+ (sh64_elf64_create_dynamic_sections): Likewise.
+ * elflink.c (_bfd_elf_create_got_section): Likewise.
+ (_bfd_elf_create_dynamic_sections): Likewise.
+ (_bfd_elf_create_linker_section): Likewise.
+ * elflink.h (elf_add_default_symbol): Likewise.
+ (elf_link_create_dynamic_sections): Likewise.
+ (NAME(bfd_elf,size_dynamic_sections)): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
+ * elfxx-mips.c (mips_elf_create_got_section): Likewise.
+ (_bfd_mips_elf_add_symbol_hook): Likewise.
+ (_bfd_mips_elf_create_dynamic_sections): Likewise.
+ * linker.c (generic_link_add_symbol_list): Likewise.
+ * xcofflink.c (xcoff_link_add_symbols): Likewise.
+
+ * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
+
+ * elf64-ppc.c (edit_opd): Only zero opd syms when function is
+ completely removed. Correct local sym adjustment.
+
+2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
+
+ * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
+ Correct mistake in calculation of address of .got.
+ * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
+ elf_sh64_pic_plt_entry_le): Likewise.
+
+2002-10-09 Richard Shann <richard.shann@superh.com>
+ Stephen Clarke <stephen.clarke@superh.com>
+
+ * Makefile.am: Add entries for elf32-sh64-lin.c and
+ elf64-sh64-lin.c. Regenerate.
+ * Makefile.in: Regenerate.
+ * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
+ to use sh64 vectors rather than sh vectors.
+ * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
+ bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
+ * configure: Regenerate.
+ * elf32-sh64-lin.c: New file.
+ * elf64-sh64-lin.c: New file.
+ * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
+ bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
+
+2002-10-08 H.J. Lu <hjl@gnu.org>
+
+ * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
+ IE->LE transition for R_386_TLS_IE.
+
+2002-10-08 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (edit_opd): Correct test for discarded sections.
+
+2002-10-07 Mark Elbrecht <snowball3@softhome.net>
+
+ * cofflink.c (mark_relocs): Don't mark relocations in excluded
+ sections.
+
+2002-10-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
+ code.
+
+ * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
+
+2002-10-06 Alan Modra <amodra@bigpond.net.au>
+
+ * opncls.c: Formatting.
+ (_bfd_new_bfd): Use a smaller section hash table.
+
+2002-10-05 Alexandre Oliva <aoliva@redhat.com>
+
+ * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
+ of the other two relocations packed with a REL32 to NONE.
+
2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
* elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
@@ -9,7 +427,7 @@
to correctly adjust got.refcount and plt.refcount.
(sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
(sh_elf_check_relocs): Increment gotplt_refcount.
-
+
2002-10-01 Jakub Jelinek <jakub@redhat.com>
* elf32-i386.c (elf_i386_relocate_section): Fix
@@ -28,10 +446,10 @@
R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
- Ken Raeburn <raeburn@cygnus.com>
- Aldy Hernandez <aldyh@redhat.com>
- Eric Christopher <echristo@redhat.com>
- Richard Sandiford <rsandifo@redhat.com>
+ Ken Raeburn <raeburn@cygnus.com>
+ Aldy Hernandez <aldyh@redhat.com>
+ Eric Christopher <echristo@redhat.com>
+ Richard Sandiford <rsandifo@redhat.com>
* archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
(bfd_mach_mips5500): New.
@@ -233,7 +651,7 @@
* elfcode.h (elf_slurp_reloc_table_from_section): Check
for overflow.
-2002-09-17 Stan Cox <scox@redhat.com>
+2002-09-17 Stan Cox <scox@redhat.com>
* elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
(mips_elf64_final_gp): Don't make up gp value.
@@ -315,7 +733,7 @@
2002-09-10 Michael Snyder <msnyder@redhat.com>
* irix-core.c (do_sections, do_sections64): New functions.
- (irix_core_core_file_p): Call new functions do_sections,
+ (irix_core_core_file_p): Call new functions do_sections,
do_sections64, depending on corefile (32-bit or 64-bit).
2002-09-09 Richard Henderson <rth@redhat.com>
@@ -325,8 +743,8 @@
2002-09-04 Kevin Buettner <kevinb@redhat.com>
- * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
- vector.
+ * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
+ vector.
2002-09-02 Nick Clifton <nickc@redhat.com>
@@ -337,7 +755,7 @@
(v850_elf_relax_section): Replace caching of external symbols
with caching of internal symbols obtained from calling
bfd_elf_get_elf_syms().
- Fixup problems with freeing cached allocated memory blocks.
+ Fixup problems with freeing cached allocated memory blocks.
2002-09-02 Alan Modra <amodra@bigpond.net.au>
@@ -506,7 +924,7 @@
* elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
value if .init is an SHmedia function. Similarly for DT_FINI.
* elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
-
+
2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
* elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
@@ -516,7 +934,7 @@
2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
- byte read when reading the return address register column.
+ byte read when reading the return address register column.
2002-08-22 Nick Clifton <nickc@redhat.com>
@@ -582,9 +1000,9 @@
argument declaration.
2002-08-19 Elena Zannoni <ezannoni@redhat.com>
-
- * archures.c (bfd_mach_ppc_e500): Added.
- * bfd-in2.h: Rebuilt.
+
+ * archures.c (bfd_mach_ppc_e500): Added.
+ * bfd-in2.h: Rebuilt.
* cpu-powerpc.c (bfd_powerpc_archs): Added e500.
2002-08-19 Alan Modra <amodra@bigpond.net.au>
@@ -594,7 +1012,7 @@
2002-08-17 Andrew Cagney <ac131313@redhat.com>
* elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
- `bfd_byte'.
+ `bfd_byte'.
2002-08-17 Stan Cox <scox@redhat.com>
@@ -606,7 +1024,7 @@
* bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
symbols when looking for section referred to by a relocation.
* bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
-
+
2002-08-15 Alan Modra <amodra@bigpond.net.au>
* elf32-i370.c: Move reloc enum to include/elf/i370.h.
@@ -695,7 +1113,7 @@
2002-08-09 Graeme Peterson <gp@qnx.com>
- * Makefile.am: Add entries for elf32-ppcqnx.c, and add
+ * Makefile.am: Add entries for elf32-ppcqnx.c, and add
elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
* Makefile.in: Regenerate.
* config.bfd: Add support for powerpc{le}-*-nto targets.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 0aa98e3..ecd583a 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -32,7 +32,7 @@ BFD32_LIBS = \
format.lo init.lo libbfd.lo opncls.lo reloc.lo \
section.lo syms.lo targets.lo hash.lo linker.lo \
srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \
- merge.lo dwarf2.lo
+ merge.lo dwarf2.lo simple.lo
BFD64_LIBS = archive64.lo
@@ -41,7 +41,7 @@ BFD32_LIBS_CFILES = \
format.c init.c libbfd.c opncls.c reloc.c \
section.c syms.c targets.c hash.c linker.c \
srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
- merge.c dwarf2.c
+ merge.c dwarf2.c simple.c
BFD64_LIBS_CFILES = archive64.c
@@ -203,7 +203,6 @@ BFD32_BACKENDS = \
elf32-arc.lo \
elfarm-oabi.lo \
elfarm-nabi.lo \
- elfarmqnx-nabi.lo \
elf32-avr.lo \
elf32-cris.lo \
elf32-d10v.lo \
@@ -216,8 +215,6 @@ BFD32_BACKENDS = \
elf32-hppa.lo \
elf32-i370.lo \
elf32-i386.lo \
- elf32-i386-fbsd.lo \
- elf32-i386qnx.lo \
elf32-i860.lo \
elf32-i960.lo \
elf32-ia64.lo \
@@ -236,15 +233,11 @@ BFD32_BACKENDS = \
elf32-or32.lo \
elf32-pj.lo \
elf32-ppc.lo \
- elf32-ppcqnx.lo \
+ elf32-qnx.lo \
elf32-s390.lo \
elf32-sh.lo \
- elf32-sh-lin.lo \
elf32-sh64.lo \
elf32-sh64-com.lo \
- elf32-sh-nbsd.lo \
- elf32-sh64-nbsd.lo \
- elf32-shqnx.lo \
elf32-sparc.lo \
elf32-v850.lo \
elf32-vax.lo \
@@ -366,7 +359,6 @@ BFD32_BACKENDS_CFILES = \
elf32-arc.c \
elfarm-oabi.c \
elfarm-nabi.c \
- elfarmqnx-nabi.c \
elf32-avr.c \
elf32-cris.c \
elf32-d10v.c \
@@ -379,8 +371,6 @@ 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 \
elf32-ip2k.c \
@@ -398,15 +388,11 @@ BFD32_BACKENDS_CFILES = \
elf32-or32.c \
elf32-pj.c \
elf32-ppc.c \
- elf32-ppcqnx.c \
+ elf32-qnx.c \
elf32-sh64.c \
elf32-sh64-com.c \
elf32-s390.c \
elf32-sh.c \
- elf32-sh-lin.c \
- elf32-sh-nbsd.c \
- elf32-sh64-nbsd.c \
- elf32-shqnx.c \
elf32-sparc.c \
elf32-v850.c \
elf32-vax.c \
@@ -489,7 +475,6 @@ 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 \
@@ -497,7 +482,6 @@ BFD64_BACKENDS = \
elf64-mips.lo \
elf64-mmix.lo \
elf64-sh64.lo \
- elf64-sh64-nbsd.lo \
elf64-ppc.lo \
elf64-s390.lo \
elf64-sparc.lo \
@@ -516,7 +500,6 @@ 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 \
@@ -525,7 +508,6 @@ BFD64_BACKENDS_CFILES = \
elf64-ppc.c \
elf64-s390.c \
elf64-sh64.c \
- elf64-sh64-nbsd.c \
elf64-sparc.c \
elf64.c \
mmo.c \
@@ -579,16 +561,17 @@ CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
## This is a list of all .h files which are in the source tree.
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
- elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf64-hppa.h \
- elfcode.h elfcore.h elflink.h freebsd.h genlink.h go32stub.h \
- libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
- libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \
- nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h libxcoff.h \
- xcoff-target.h version.h
+ elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf32-qnx.h \
+ elf64-hppa.h elfcode.h elfcore.h elflink.h \
+ freebsd.h genlink.h go32stub.h \
+ libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
+ libnlm.h liboasys.h libpei.h libxcoff.h \
+ netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \
+ peicode.h som.h version.h vms.h xcoff-target.h
## ... and all .h files which are in the build tree.
BUILD_HFILES = \
- elf32-target.h elf64-target.h targmatch.h
+ bfdver.h elf32-target.h elf64-target.h targmatch.h
HFILES = $(SOURCE_HFILES) $(BUILD_HFILES)
@@ -806,7 +789,7 @@ stmp-bfd-h: bfd-in3.h
touch stmp-bfd-h
BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
- reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c version.h
+ reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c
BFD64_H_FILES = archive64.c
LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c cache.c reloc.c archures.c elf.c
LIBCOFF_H_FILES = libcoff-in.h coffcode.h
@@ -863,7 +846,7 @@ config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
$(INCDIR)/aout/ranlib.h $(INCDIR)/safe-ctype.h
archures.lo: archures.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
-bfd.lo: bfd.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+bfd.lo: bfd.c bfdver.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/sym.h libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
@@ -900,6 +883,7 @@ merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
+simple.lo: simple.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h
cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h
cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h
@@ -1115,12 +1099,7 @@ elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- elf32-arm.h elf32-target.h
-elfarmqnx-nabi.lo: elfarmqnx-nabi.c elfarm-nabi.c $(INCDIR)/elf/arm.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-qnx.h \
- elf32-arm.h elf32-target.h
+ elf32-arm.h elf32-target.h elf32-qnx.h
elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
@@ -1167,15 +1146,7 @@ elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
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 \
- $(INCDIR)/elf/reloc-macros.h elf32-qnx.h elf32-target.h
+ elf32-target.h elf32-qnx.h
elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
@@ -1246,11 +1217,10 @@ elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-ppcqnx.lo: elf32-ppcqnx.c elf32-ppc.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/reloc-macros.h elf32-qnx.h elf32-target.h
+ elf32-target.h elf32-qnx.h
+elf32-qnx.lo: elf32-qnx.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h elf32-qnx.h
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
@@ -1267,24 +1237,7 @@ elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-sh-lin.lo: elf32-sh-lin.c $(INCDIR)/filenames.h \
- $(INCDIR)/elf/internal.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-sh.c \
- $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-sh-nbsd.lo: elf32-sh-nbsd.c elf32-sh.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-sh64-nbsd.lo: elf32-sh64-nbsd.c elf32-sh64.c \
- $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(srcdir)/../opcodes/sh64-opc.h elf32-sh.c $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-shqnx.lo: elf32-shqnx.c elf32-sh.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/reloc-macros.h elf32-qnx.h elf32-target.h
+ elf32-target.h elf32-qnx.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
@@ -1493,8 +1446,8 @@ vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
-vms-hdr.lo: vms-hdr.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/safe-ctype.h vms.h
+vms-hdr.lo: vms-hdr.c bfdver.h $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h vms.h
vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
@@ -1533,13 +1486,6 @@ 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 \
@@ -1578,10 +1524,6 @@ elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf64-target.h
-elf64-sh64-nbsd.lo: elf64-sh64-nbsd.c elf64-sh64.c \
- $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf64-target.h
elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 4816c17..a3a0d40 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -118,7 +118,6 @@ bfd_default_target_size = @bfd_default_target_size@
bfd_libs = @bfd_libs@
bfd_machines = @bfd_machines@
bfd_version = @bfd_version@
-bfd_version_date = @bfd_version_date@
bfd_version_string = @bfd_version_string@
l = @l@
tdefaults = @tdefaults@
@@ -156,7 +155,7 @@ BFD32_LIBS = \
format.lo init.lo libbfd.lo opncls.lo reloc.lo \
section.lo syms.lo targets.lo hash.lo linker.lo \
srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \
- merge.lo dwarf2.lo
+ merge.lo dwarf2.lo simple.lo
BFD64_LIBS = archive64.lo
@@ -166,7 +165,7 @@ BFD32_LIBS_CFILES = \
format.c init.c libbfd.c opncls.c reloc.c \
section.c syms.c targets.c hash.c linker.c \
srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
- merge.c dwarf2.c
+ merge.c dwarf2.c simple.c
BFD64_LIBS_CFILES = archive64.c
@@ -331,7 +330,6 @@ BFD32_BACKENDS = \
elf32-arc.lo \
elfarm-oabi.lo \
elfarm-nabi.lo \
- elfarmqnx-nabi.lo \
elf32-avr.lo \
elf32-cris.lo \
elf32-d10v.lo \
@@ -344,8 +342,6 @@ BFD32_BACKENDS = \
elf32-hppa.lo \
elf32-i370.lo \
elf32-i386.lo \
- elf32-i386-fbsd.lo \
- elf32-i386qnx.lo \
elf32-i860.lo \
elf32-i960.lo \
elf32-ia64.lo \
@@ -364,15 +360,11 @@ BFD32_BACKENDS = \
elf32-or32.lo \
elf32-pj.lo \
elf32-ppc.lo \
- elf32-ppcqnx.lo \
+ elf32-qnx.lo \
elf32-s390.lo \
elf32-sh.lo \
- elf32-sh-lin.lo \
elf32-sh64.lo \
elf32-sh64-com.lo \
- elf32-sh-nbsd.lo \
- elf32-sh64-nbsd.lo \
- elf32-shqnx.lo \
elf32-sparc.lo \
elf32-v850.lo \
elf32-vax.lo \
@@ -495,7 +487,6 @@ BFD32_BACKENDS_CFILES = \
elf32-arc.c \
elfarm-oabi.c \
elfarm-nabi.c \
- elfarmqnx-nabi.c \
elf32-avr.c \
elf32-cris.c \
elf32-d10v.c \
@@ -508,8 +499,6 @@ 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 \
elf32-ip2k.c \
@@ -527,15 +516,11 @@ BFD32_BACKENDS_CFILES = \
elf32-or32.c \
elf32-pj.c \
elf32-ppc.c \
- elf32-ppcqnx.c \
+ elf32-qnx.c \
elf32-sh64.c \
elf32-sh64-com.c \
elf32-s390.c \
elf32-sh.c \
- elf32-sh-lin.c \
- elf32-sh-nbsd.c \
- elf32-sh64-nbsd.c \
- elf32-shqnx.c \
elf32-sparc.c \
elf32-v850.c \
elf32-vax.c \
@@ -619,7 +604,6 @@ 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 \
@@ -627,7 +611,6 @@ BFD64_BACKENDS = \
elf64-mips.lo \
elf64-mmix.lo \
elf64-sh64.lo \
- elf64-sh64-nbsd.lo \
elf64-ppc.lo \
elf64-s390.lo \
elf64-sparc.lo \
@@ -647,7 +630,6 @@ 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 \
@@ -656,7 +638,6 @@ BFD64_BACKENDS_CFILES = \
elf64-ppc.c \
elf64-s390.c \
elf64-sh64.c \
- elf64-sh64-nbsd.c \
elf64-sparc.c \
elf64.c \
mmo.c \
@@ -714,16 +695,17 @@ CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
- elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf64-hppa.h \
- elfcode.h elfcore.h elflink.h freebsd.h genlink.h go32stub.h \
- libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
- libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \
- nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h libxcoff.h \
- xcoff-target.h version.h
+ elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf32-qnx.h \
+ elf64-hppa.h elfcode.h elfcore.h elflink.h \
+ freebsd.h genlink.h go32stub.h \
+ libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
+ libnlm.h liboasys.h libpei.h libxcoff.h \
+ netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \
+ peicode.h som.h version.h vms.h xcoff-target.h
BUILD_HFILES = \
- elf32-target.h elf64-target.h targmatch.h
+ bfdver.h elf32-target.h elf64-target.h targmatch.h
HFILES = $(SOURCE_HFILES) $(BUILD_HFILES)
@@ -754,7 +736,7 @@ BFD_H_DEPS = $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
LOCAL_H_DEPS = libbfd.h sysdep.h config.h
BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
- reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c version.h
+ reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c
BFD64_H_FILES = archive64.c
LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c cache.c reloc.c archures.c elf.c
@@ -770,7 +752,7 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = bfd-in3.h
+CONFIG_CLEAN_FILES = bfd-in3.h bfdver.h
LIBRARIES = $(noinst_LIBRARIES)
@@ -785,7 +767,7 @@ LTLIBRARIES = $(bfdlib_LTLIBRARIES)
libbfd_la_OBJECTS = archive.lo archures.lo bfd.lo cache.lo coffgen.lo \
corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo \
syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo \
-ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo archive64.lo
+ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo archive64.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -793,7 +775,7 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = README ./stamp-h.in COPYING ChangeLog Makefile.am \
Makefile.in TODO acinclude.m4 aclocal.m4 bfd-in2.h config.in configure \
-configure.in
+configure.in version.h
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
@@ -847,6 +829,8 @@ distclean-hdr:
maintainer-clean-hdr:
bfd-in3.h: $(top_builddir)/config.status bfd-in2.h
cd $(top_builddir) && CONFIG_FILES=$@:bfd-in2.h CONFIG_HEADERS= $(SHELL) ./config.status
+bfdver.h: $(top_builddir)/config.status version.h
+ cd $(top_builddir) && CONFIG_FILES=$@:version.h CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-noinstLIBRARIES:
@@ -1393,7 +1377,7 @@ config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
$(INCDIR)/aout/ranlib.h $(INCDIR)/safe-ctype.h
archures.lo: archures.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
-bfd.lo: bfd.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+bfd.lo: bfd.c bfdver.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/sym.h libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
@@ -1430,6 +1414,7 @@ merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
+simple.lo: simple.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h
cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h
cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h
@@ -1645,12 +1630,7 @@ elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- elf32-arm.h elf32-target.h
-elfarmqnx-nabi.lo: elfarmqnx-nabi.c elfarm-nabi.c $(INCDIR)/elf/arm.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-qnx.h \
- elf32-arm.h elf32-target.h
+ elf32-arm.h elf32-target.h elf32-qnx.h
elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
@@ -1697,15 +1677,7 @@ elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
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 \
- $(INCDIR)/elf/reloc-macros.h elf32-qnx.h elf32-target.h
+ elf32-target.h elf32-qnx.h
elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
@@ -1776,11 +1748,10 @@ elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-ppcqnx.lo: elf32-ppcqnx.c elf32-ppc.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/reloc-macros.h elf32-qnx.h elf32-target.h
+ elf32-target.h elf32-qnx.h
+elf32-qnx.lo: elf32-qnx.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h elf32-qnx.h
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
@@ -1797,24 +1768,7 @@ elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-sh-lin.lo: elf32-sh-lin.c $(INCDIR)/filenames.h \
- $(INCDIR)/elf/internal.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-sh.c \
- $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-sh-nbsd.lo: elf32-sh-nbsd.c elf32-sh.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-sh64-nbsd.lo: elf32-sh64-nbsd.c elf32-sh64.c \
- $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(srcdir)/../opcodes/sh64-opc.h elf32-sh.c $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-shqnx.lo: elf32-shqnx.c elf32-sh.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/reloc-macros.h elf32-qnx.h elf32-target.h
+ elf32-target.h elf32-qnx.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
@@ -2023,8 +1977,8 @@ vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
-vms-hdr.lo: vms-hdr.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/safe-ctype.h vms.h
+vms-hdr.lo: vms-hdr.c bfdver.h $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h vms.h
vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
@@ -2063,13 +2017,6 @@ 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 \
@@ -2108,10 +2055,6 @@ elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf64-target.h
-elf64-sh64-nbsd.lo: elf64-sh64-nbsd.c elf64-sh64.c \
- $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf64-target.h
elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 7fa334a..107772d 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -2261,8 +2261,8 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
/* Now the fun stuff. */
if (bfd_header_big_endian (abfd))
{
- r_index = ((bytes->r_index[0] << 16)
- | (bytes->r_index[1] << 8)
+ r_index = (((unsigned int) bytes->r_index[0] << 16)
+ | ((unsigned int) bytes->r_index[1] << 8)
| bytes->r_index[2]);
r_extern = (0 != (bytes->r_type[0] & RELOC_EXT_BITS_EXTERN_BIG));
r_type = ((bytes->r_type[0] & RELOC_EXT_BITS_TYPE_BIG)
@@ -2270,8 +2270,8 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
}
else
{
- r_index = ((bytes->r_index[2] << 16)
- | (bytes->r_index[1] << 8)
+ r_index = (((unsigned int) bytes->r_index[2] << 16)
+ | ((unsigned int) bytes->r_index[1] << 8)
| bytes->r_index[0]);
r_extern = (0 != (bytes->r_type[0] & RELOC_EXT_BITS_EXTERN_LITTLE));
r_type = ((bytes->r_type[0] & RELOC_EXT_BITS_TYPE_LITTLE)
@@ -2283,9 +2283,9 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
/* Base relative relocs are always against the symbol table,
regardless of the setting of r_extern. r_extern just reflects
whether the symbol the reloc is against is local or global. */
- if (r_type == RELOC_BASE10
- || r_type == RELOC_BASE13
- || r_type == RELOC_BASE22)
+ if (r_type == (unsigned int) RELOC_BASE10
+ || r_type == (unsigned int) RELOC_BASE13
+ || r_type == (unsigned int) RELOC_BASE22)
r_extern = 1;
if (r_extern && r_index > symcount)
@@ -2320,8 +2320,8 @@ NAME(aout,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
/* Now the fun stuff. */
if (bfd_header_big_endian (abfd))
{
- r_index = ((bytes->r_index[0] << 16)
- | (bytes->r_index[1] << 8)
+ r_index = (((unsigned int) bytes->r_index[0] << 16)
+ | ((unsigned int) bytes->r_index[1] << 8)
| bytes->r_index[2]);
r_extern = (0 != (bytes->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
r_pcrel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_PCREL_BIG));
@@ -2333,8 +2333,8 @@ NAME(aout,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
}
else
{
- r_index = ((bytes->r_index[2] << 16)
- | (bytes->r_index[1] << 8)
+ r_index = (((unsigned int) bytes->r_index[2] << 16)
+ | ((unsigned int) bytes->r_index[1] << 8)
| bytes->r_index[0]);
r_extern = (0 != (bytes->r_type[0] & RELOC_STD_BITS_EXTERN_LITTLE));
r_pcrel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_PCREL_LITTLE));
@@ -3891,7 +3891,7 @@ NAME(aout,final_link) (abfd, info, callback)
for (p = o->link_order_head; p != NULL; p = p->next)
{
if (p->type == bfd_indirect_link_order)
- p->u.indirect.section->linker_mark = true;
+ p->u.indirect.section->linker_mark = (unsigned int) true;
}
}
@@ -4440,7 +4440,7 @@ aout_link_write_symbols (finfo, input_bfd)
characters in the symbol names, not including the file
numbers in types (the first number after an open
parenthesis). */
- if (type == N_BINCL)
+ if (type == (int) N_BINCL)
{
struct external_nlist *incl_sym;
int nest;
@@ -4454,13 +4454,13 @@ aout_link_write_symbols (finfo, input_bfd)
int incl_type;
incl_type = H_GET_8 (input_bfd, incl_sym->e_type);
- if (incl_type == N_EINCL)
+ if (incl_type == (int) N_EINCL)
{
if (nest == 0)
break;
--nest;
}
- else if (incl_type == N_BINCL)
+ else if (incl_type == (int) N_BINCL)
++nest;
else if (nest == 0)
{
@@ -4485,7 +4485,7 @@ aout_link_write_symbols (finfo, input_bfd)
/* If we have already included a header file with the
same value, then replace this one with an N_EXCL
symbol. */
- copy = ! finfo->info->keep_memory;
+ copy = (boolean) (! finfo->info->keep_memory);
incl_entry = aout_link_includes_lookup (&finfo->includes,
name, true, copy);
if (incl_entry == NULL)
@@ -4513,7 +4513,7 @@ aout_link_write_symbols (finfo, input_bfd)
/* This is a duplicate header file. We must change
it to be an N_EXCL entry, and mark all the
included symbols to prevent outputting them. */
- type = N_EXCL;
+ type = (int) N_EXCL;
nest = 0;
for (incl_sym = sym + 1, incl_map = symbol_map + 1;
@@ -4523,7 +4523,7 @@ aout_link_write_symbols (finfo, input_bfd)
int incl_type;
incl_type = H_GET_8 (input_bfd, incl_sym->e_type);
- if (incl_type == N_EINCL)
+ if (incl_type == (int) N_EINCL)
{
if (nest == 0)
{
@@ -4532,7 +4532,7 @@ aout_link_write_symbols (finfo, input_bfd)
}
--nest;
}
- else if (incl_type == N_BINCL)
+ else if (incl_type == (int) N_BINCL)
++nest;
else if (nest == 0)
*incl_map = -1;
@@ -4887,8 +4887,8 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
if (bfd_header_big_endian (input_bfd))
{
- r_index = ((rel->r_index[0] << 16)
- | (rel->r_index[1] << 8)
+ r_index = (((unsigned int) rel->r_index[0] << 16)
+ | ((unsigned int) rel->r_index[1] << 8)
| rel->r_index[2]);
r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
r_pcrel = (0 != (rel->r_type[0] & RELOC_STD_BITS_PCREL_BIG));
@@ -4900,8 +4900,8 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
}
else
{
- r_index = ((rel->r_index[2] << 16)
- | (rel->r_index[1] << 8)
+ r_index = (((unsigned int) rel->r_index[2] << 16)
+ | ((unsigned int) rel->r_index[1] << 8)
| rel->r_index[0]);
r_extern = (0 != (rel->r_type[0] & RELOC_STD_BITS_EXTERN_LITTLE));
r_pcrel = (0 != (rel->r_type[0] & RELOC_STD_BITS_PCREL_LITTLE));
@@ -5223,8 +5223,8 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
if (bfd_header_big_endian (input_bfd))
{
- r_index = ((rel->r_index[0] << 16)
- | (rel->r_index[1] << 8)
+ r_index = (((unsigned int) rel->r_index[0] << 16)
+ | ((unsigned int) rel->r_index[1] << 8)
| rel->r_index[2]);
r_extern = (0 != (rel->r_type[0] & RELOC_EXT_BITS_EXTERN_BIG));
r_type = ((rel->r_type[0] & RELOC_EXT_BITS_TYPE_BIG)
@@ -5232,8 +5232,8 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
}
else
{
- r_index = ((rel->r_index[2] << 16)
- | (rel->r_index[1] << 8)
+ r_index = (((unsigned int) rel->r_index[2] << 16)
+ | ((unsigned int) rel->r_index[1] << 8)
| rel->r_index[0]);
r_extern = (0 != (rel->r_type[0] & RELOC_EXT_BITS_EXTERN_LITTLE));
r_type = ((rel->r_type[0] & RELOC_EXT_BITS_TYPE_LITTLE)
@@ -5249,16 +5249,16 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
/* We are generating a relocateable output file, and must
modify the reloc accordingly. */
if (r_extern
- || r_type == RELOC_BASE10
- || r_type == RELOC_BASE13
- || r_type == RELOC_BASE22)
+ || r_type == (unsigned int) RELOC_BASE10
+ || r_type == (unsigned int) RELOC_BASE13
+ || r_type == (unsigned int) RELOC_BASE22)
{
/* If we know the symbol this relocation is against,
convert it into a relocation against a section. This
is what the native linker does. */
- if (r_type == RELOC_BASE10
- || r_type == RELOC_BASE13
- || r_type == RELOC_BASE22)
+ if (r_type == (unsigned int) RELOC_BASE10
+ || r_type == (unsigned int) RELOC_BASE13
+ || r_type == (unsigned int) RELOC_BASE22)
h = NULL;
else
h = sym_hashes[r_index];
@@ -5426,9 +5426,9 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
relocation = 0;
}
}
- else if (r_type == RELOC_BASE10
- || r_type == RELOC_BASE13
- || r_type == RELOC_BASE22)
+ else if (r_type == (unsigned int) RELOC_BASE10
+ || r_type == (unsigned int) RELOC_BASE13
+ || r_type == (unsigned int) RELOC_BASE22)
{
struct external_nlist *sym;
int type;
@@ -5510,9 +5510,9 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
to skip this reloc. */
if (hundef
&& ! finfo->info->shared
- && r_type != RELOC_BASE10
- && r_type != RELOC_BASE13
- && r_type != RELOC_BASE22)
+ && r_type != (unsigned int) RELOC_BASE10
+ && r_type != (unsigned int) RELOC_BASE13
+ && r_type != (unsigned int) RELOC_BASE22)
{
const char *name;
@@ -5526,7 +5526,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
return false;
}
- if (r_type != RELOC_SPARC_REV32)
+ if (r_type != (unsigned int) RELOC_SPARC_REV32)
r = MY_final_link_relocate (howto_table_ext + r_type,
input_bfd, input_section,
contents, r_addr, relocation,
@@ -5555,9 +5555,9 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
if (h != NULL)
name = h->root.root.string;
else if (r_extern
- || r_type == RELOC_BASE10
- || r_type == RELOC_BASE13
- || r_type == RELOC_BASE22)
+ || r_type == (unsigned int) RELOC_BASE10
+ || r_type == (unsigned int) RELOC_BASE13
+ || r_type == (unsigned int) RELOC_BASE22)
name = strings + GET_WORD (input_bfd,
syms[r_index].e_strx);
else
@@ -5673,7 +5673,7 @@ aout_link_reloc_link_order (finfo, o, p)
int r_relative;
int r_length;
- r_pcrel = howto->pc_relative;
+ r_pcrel = (int) howto->pc_relative;
r_baserel = (howto->type & 8) != 0;
r_jmptable = (howto->type & 16) != 0;
r_relative = (howto->type & 32) != 0;
diff --git a/bfd/archive.c b/bfd/archive.c
index d7ac214..bfbd6de 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -436,12 +436,12 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
spaces, so only look for ' ' if we don't find '/'. */
char *e;
- e = memchr (hdr.ar_name, '\0', ar_maxnamelen (abfd));
+ e = (char *) memchr (hdr.ar_name, '\0', ar_maxnamelen (abfd));
if (e == NULL)
{
- e = memchr (hdr.ar_name, '/', ar_maxnamelen (abfd));
+ e = (char *) memchr (hdr.ar_name, '/', ar_maxnamelen (abfd));
if (e == NULL)
- e = memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd));
+ e = (char *) memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd));
}
if (e != NULL)
@@ -2082,7 +2082,7 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
bfd_flush (arch);
if (bfd_stat (arch, &archstat) == -1)
{
- perror (_("Reading archive file mod timestamp"));
+ bfd_perror (_("Reading archive file mod timestamp"));
/* Can't read mod time for some reason. */
return true;
@@ -2108,8 +2108,7 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
|| (bfd_bwrite (hdr.ar_date, (bfd_size_type) sizeof (hdr.ar_date), arch)
!= sizeof (hdr.ar_date)))
{
- /* FIXME: bfd can't call perror. */
- perror (_("Writing updated armap timestamp"));
+ bfd_perror (_("Writing updated armap timestamp"));
/* Some error while writing. */
return true;
diff --git a/bfd/archures.c b/bfd/archures.c
index f84fc13..1ab0cfa 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -147,11 +147,11 @@ DESCRIPTION
.#define bfd_mach_mipsisa32 32
.#define bfd_mach_mipsisa64 64
. bfd_arch_i386, {* Intel 386 *}
-.#define bfd_mach_i386_i386 0
-.#define bfd_mach_i386_i8086 1
-.#define bfd_mach_i386_i386_intel_syntax 2
-.#define bfd_mach_x86_64 3
-.#define bfd_mach_x86_64_intel_syntax 4
+.#define bfd_mach_i386_i386 1
+.#define bfd_mach_i386_i8086 2
+.#define bfd_mach_i386_i386_intel_syntax 3
+.#define bfd_mach_x86_64 64
+.#define bfd_mach_x86_64_intel_syntax 65
. bfd_arch_we32k, {* AT&T WE32xxx *}
. bfd_arch_tahoe, {* CCI/Harris Tahoe *}
. bfd_arch_i860, {* Intel 860 *}
@@ -167,8 +167,8 @@ DESCRIPTION
.#define bfd_mach_h8300s 3
. bfd_arch_pdp11, {* DEC PDP-11 *}
. bfd_arch_powerpc, {* PowerPC *}
-.#define bfd_mach_ppc 0
-.#define bfd_mach_ppc64 1
+.#define bfd_mach_ppc 32
+.#define bfd_mach_ppc64 64
.#define bfd_mach_ppc_403 403
.#define bfd_mach_ppc_403gc 4030
.#define bfd_mach_ppc_505 505
@@ -187,13 +187,13 @@ DESCRIPTION
.#define bfd_mach_ppc_7400 7400
.#define bfd_mach_ppc_e500 500
. bfd_arch_rs6000, {* IBM RS/6000 *}
-.#define bfd_mach_rs6k 0
+.#define bfd_mach_rs6k 6000
.#define bfd_mach_rs6k_rs1 6001
.#define bfd_mach_rs6k_rsc 6003
.#define bfd_mach_rs6k_rs2 6002
. bfd_arch_hppa, {* HP PA RISC *}
. bfd_arch_d10v, {* Mitsubishi D10V *}
-.#define bfd_mach_d10v 0
+.#define bfd_mach_d10v 1
.#define bfd_mach_d10v_ts2 2
.#define bfd_mach_d10v_ts3 3
. bfd_arch_d30v, {* Mitsubishi D30V *}
@@ -205,7 +205,7 @@ DESCRIPTION
.#define bfd_mach_z8002 2
. bfd_arch_h8500, {* Hitachi H8/500 *}
. bfd_arch_sh, {* Hitachi SH *}
-.#define bfd_mach_sh 0
+.#define bfd_mach_sh 1
.#define bfd_mach_sh2 0x20
.#define bfd_mach_sh_dsp 0x2d
.#define bfd_mach_sh3 0x30
@@ -237,15 +237,15 @@ DESCRIPTION
. bfd_arch_tic54x, {* Texas Instruments TMS320C54X *}
. bfd_arch_tic80, {* TI TMS320c80 (MVP) *}
. bfd_arch_v850, {* NEC V850 *}
-.#define bfd_mach_v850 0
+.#define bfd_mach_v850 1
.#define bfd_mach_v850e 'E'
. bfd_arch_arc, {* ARC Cores *}
-.#define bfd_mach_arc_5 0
-.#define bfd_mach_arc_6 1
-.#define bfd_mach_arc_7 2
-.#define bfd_mach_arc_8 3
+.#define bfd_mach_arc_5 5
+.#define bfd_mach_arc_6 6
+.#define bfd_mach_arc_7 7
+.#define bfd_mach_arc_8 8
. bfd_arch_m32r, {* Mitsubishi M32R/D *}
-.#define bfd_mach_m32r 0 {* For backwards compatibility. *}
+.#define bfd_mach_m32r 1 {* For backwards compatibility. *}
.#define bfd_mach_m32rx 'x'
. bfd_arch_mn10200, {* Matsushita MN10200 *}
. bfd_arch_mn10300, {* Matsushita MN10300 *}
@@ -254,19 +254,19 @@ DESCRIPTION
. bfd_arch_fr30,
.#define bfd_mach_fr30 0x46523330
. bfd_arch_frv,
-.#define bfd_mach_frv 0
-.#define bfd_mach_frvsimple 1
+.#define bfd_mach_frv 1
+.#define bfd_mach_frvsimple 2
.#define bfd_mach_fr300 300
.#define bfd_mach_fr400 400
.#define bfd_mach_frvtomcat 499 {* fr500 prototype *}
.#define bfd_mach_fr500 500
. bfd_arch_mcore,
. bfd_arch_ia64, {* HP/Intel ia64 *}
-.#define bfd_mach_ia64_elf64 0
-.#define bfd_mach_ia64_elf32 1
+.#define bfd_mach_ia64_elf64 64
+.#define bfd_mach_ia64_elf32 32
. bfd_arch_ip2k, {* Ubicom IP2K microcontrollers. *}
-.#define bfd_mach_ip2022 0
-.#define bfd_mach_ip2022ext 1
+.#define bfd_mach_ip2022 1
+.#define bfd_mach_ip2022ext 2
. bfd_arch_pj,
. bfd_arch_avr, {* Atmel AVR microcontrollers. *}
.#define bfd_mach_avr1 1
@@ -276,12 +276,12 @@ DESCRIPTION
.#define bfd_mach_avr5 5
. bfd_arch_cris, {* Axis CRIS *}
. bfd_arch_s390, {* IBM s390 *}
-.#define bfd_mach_s390_31 0
-.#define bfd_mach_s390_64 1
+.#define bfd_mach_s390_31 31
+.#define bfd_mach_s390_64 64
. bfd_arch_openrisc, {* OpenRISC *}
. bfd_arch_mmix, {* Donald Knuth's educational processor. *}
. bfd_arch_xstormy16,
-.#define bfd_mach_xstormy16 0
+.#define bfd_mach_xstormy16 1
. bfd_arch_last
. };
*/
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index f30e20d..f41e3fb 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -41,10 +41,6 @@ extern "C" {
#endif
#endif
-#define BFD_VERSION @bfd_version@
-#define BFD_VERSION_DATE @bfd_version_date@
-#define BFD_VERSION_STRING @bfd_version_string@
-
/* The word size used by BFD on the host. This may be 64 with a 32
bit target if the host is 64 bit, or if other 64 bit targets have
been selected with --enable-targets, or if --enable-64-bit-bfd. */
@@ -349,7 +345,7 @@ typedef struct sec *sec_ptr;
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (boolean)true), true)
+#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (unsigned int)true), true)
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true)
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 38e5459..018a0fd 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1,7 +1,7 @@
/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
"section.c", "archures.c", "reloc.c", "syms.c", "bfd.c", "archive.c",
- "corefile.c", "targets.c" and "format.c".
+ "corefile.c", "targets.c", "format.c", "linker.c" and "simple.c".
Run "make headers" in your build bfd/ to regenerate. */
/* Main header file for the bfd library -- portable access to object files.
@@ -47,10 +47,6 @@ extern "C" {
#endif
#endif
-#define BFD_VERSION @bfd_version@
-#define BFD_VERSION_DATE @bfd_version_date@
-#define BFD_VERSION_STRING @bfd_version_string@
-
/* The word size used by BFD on the host. This may be 64 with a 32
bit target if the host is 64 bit, or if other 64 bit targets have
been selected with --enable-targets, or if --enable-64-bit-bfd. */
@@ -355,7 +351,7 @@ typedef struct sec *sec_ptr;
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (boolean)true), true)
+#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (unsigned int)true), true)
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true)
@@ -1542,11 +1538,11 @@ enum bfd_architecture
#define bfd_mach_mipsisa32 32
#define bfd_mach_mipsisa64 64
bfd_arch_i386, /* Intel 386 */
-#define bfd_mach_i386_i386 0
-#define bfd_mach_i386_i8086 1
-#define bfd_mach_i386_i386_intel_syntax 2
-#define bfd_mach_x86_64 3
-#define bfd_mach_x86_64_intel_syntax 4
+#define bfd_mach_i386_i386 1
+#define bfd_mach_i386_i8086 2
+#define bfd_mach_i386_i386_intel_syntax 3
+#define bfd_mach_x86_64 64
+#define bfd_mach_x86_64_intel_syntax 65
bfd_arch_we32k, /* AT&T WE32xxx */
bfd_arch_tahoe, /* CCI/Harris Tahoe */
bfd_arch_i860, /* Intel 860 */
@@ -1562,8 +1558,8 @@ enum bfd_architecture
#define bfd_mach_h8300s 3
bfd_arch_pdp11, /* DEC PDP-11 */
bfd_arch_powerpc, /* PowerPC */
-#define bfd_mach_ppc 0
-#define bfd_mach_ppc64 1
+#define bfd_mach_ppc 32
+#define bfd_mach_ppc64 64
#define bfd_mach_ppc_403 403
#define bfd_mach_ppc_403gc 4030
#define bfd_mach_ppc_505 505
@@ -1582,13 +1578,13 @@ enum bfd_architecture
#define bfd_mach_ppc_7400 7400
#define bfd_mach_ppc_e500 500
bfd_arch_rs6000, /* IBM RS/6000 */
-#define bfd_mach_rs6k 0
+#define bfd_mach_rs6k 6000
#define bfd_mach_rs6k_rs1 6001
#define bfd_mach_rs6k_rsc 6003
#define bfd_mach_rs6k_rs2 6002
bfd_arch_hppa, /* HP PA RISC */
bfd_arch_d10v, /* Mitsubishi D10V */
-#define bfd_mach_d10v 0
+#define bfd_mach_d10v 1
#define bfd_mach_d10v_ts2 2
#define bfd_mach_d10v_ts3 3
bfd_arch_d30v, /* Mitsubishi D30V */
@@ -1600,7 +1596,7 @@ enum bfd_architecture
#define bfd_mach_z8002 2
bfd_arch_h8500, /* Hitachi H8/500 */
bfd_arch_sh, /* Hitachi SH */
-#define bfd_mach_sh 0
+#define bfd_mach_sh 1
#define bfd_mach_sh2 0x20
#define bfd_mach_sh_dsp 0x2d
#define bfd_mach_sh3 0x30
@@ -1632,15 +1628,15 @@ enum bfd_architecture
bfd_arch_tic54x, /* Texas Instruments TMS320C54X */
bfd_arch_tic80, /* TI TMS320c80 (MVP) */
bfd_arch_v850, /* NEC V850 */
-#define bfd_mach_v850 0
+#define bfd_mach_v850 1
#define bfd_mach_v850e 'E'
bfd_arch_arc, /* ARC Cores */
-#define bfd_mach_arc_5 0
-#define bfd_mach_arc_6 1
-#define bfd_mach_arc_7 2
-#define bfd_mach_arc_8 3
+#define bfd_mach_arc_5 5
+#define bfd_mach_arc_6 6
+#define bfd_mach_arc_7 7
+#define bfd_mach_arc_8 8
bfd_arch_m32r, /* Mitsubishi M32R/D */
-#define bfd_mach_m32r 0 /* For backwards compatibility. */
+#define bfd_mach_m32r 1 /* For backwards compatibility. */
#define bfd_mach_m32rx 'x'
bfd_arch_mn10200, /* Matsushita MN10200 */
bfd_arch_mn10300, /* Matsushita MN10300 */
@@ -1649,19 +1645,19 @@ enum bfd_architecture
bfd_arch_fr30,
#define bfd_mach_fr30 0x46523330
bfd_arch_frv,
-#define bfd_mach_frv 0
-#define bfd_mach_frvsimple 1
+#define bfd_mach_frv 1
+#define bfd_mach_frvsimple 2
#define bfd_mach_fr300 300
#define bfd_mach_fr400 400
#define bfd_mach_frvtomcat 499 /* fr500 prototype */
#define bfd_mach_fr500 500
bfd_arch_mcore,
bfd_arch_ia64, /* HP/Intel ia64 */
-#define bfd_mach_ia64_elf64 0
-#define bfd_mach_ia64_elf32 1
+#define bfd_mach_ia64_elf64 64
+#define bfd_mach_ia64_elf32 32
bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
-#define bfd_mach_ip2022 0
-#define bfd_mach_ip2022ext 1
+#define bfd_mach_ip2022 1
+#define bfd_mach_ip2022ext 2
bfd_arch_pj,
bfd_arch_avr, /* Atmel AVR microcontrollers. */
#define bfd_mach_avr1 1
@@ -1671,12 +1667,12 @@ enum bfd_architecture
#define bfd_mach_avr5 5
bfd_arch_cris, /* Axis CRIS */
bfd_arch_s390, /* IBM s390 */
-#define bfd_mach_s390_31 0
-#define bfd_mach_s390_64 1
+#define bfd_mach_s390_31 31
+#define bfd_mach_s390_64 64
bfd_arch_openrisc, /* OpenRISC */
bfd_arch_mmix, /* Donald Knuth's educational processor. */
bfd_arch_xstormy16,
-#define bfd_mach_xstormy16 0
+#define bfd_mach_xstormy16 1
bfd_arch_last
};
@@ -2505,6 +2501,14 @@ field in the instruction. */
BFD_RELOC_SH_IMM_HI16,
BFD_RELOC_SH_IMM_HI16_PCREL,
BFD_RELOC_SH_PT_16,
+ BFD_RELOC_SH_TLS_GD_32,
+ BFD_RELOC_SH_TLS_LD_32,
+ BFD_RELOC_SH_TLS_LDO_32,
+ BFD_RELOC_SH_TLS_IE_32,
+ BFD_RELOC_SH_TLS_LE_32,
+ BFD_RELOC_SH_TLS_DTPMOD32,
+ BFD_RELOC_SH_TLS_DTPOFF32,
+ BFD_RELOC_SH_TLS_TPOFF32,
/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
be zero and is not stored in the instruction. */
@@ -4121,6 +4125,17 @@ bfd_set_format PARAMS ((bfd *abfd, bfd_format format));
const char *
bfd_format_string PARAMS ((bfd_format format));
+/* Extracted from linker.c. */
+boolean
+bfd_link_split_section PARAMS ((bfd *abfd, asection *sec));
+
+#define bfd_link_split_section(abfd, sec) \
+ BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
+
+/* Extracted from simple.c. */
+bfd_byte *
+bfd_simple_get_relocated_section_contents PARAMS ((bfd *abfd, asection *sec, bfd_byte *outbuf));
+
#ifdef __cplusplus
}
#endif
diff --git a/bfd/bfd.c b/bfd/bfd.c
index cfd7772..bf45162 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -196,6 +196,7 @@ CODE_FRAGMENT
*/
#include "bfd.h"
+#include "bfdver.h"
#include "sysdep.h"
#ifdef ANSI_PROTOTYPES
@@ -1293,10 +1294,10 @@ bfd_record_phdr (abfd, type, flags_valid, flags, at_valid, at,
m->p_type = type;
m->p_flags = flags;
m->p_paddr = at;
- m->p_flags_valid = flags_valid;
- m->p_paddr_valid = at_valid;
- m->includes_filehdr = includes_filehdr;
- m->includes_phdrs = includes_phdrs;
+ m->p_flags_valid = (unsigned int) flags_valid;
+ m->p_paddr_valid = (unsigned int) at_valid;
+ m->includes_filehdr = (unsigned int) includes_filehdr;
+ m->includes_phdrs = (unsigned int) includes_phdrs;
m->count = count;
if (count > 0)
memcpy (m->sections, secs, count * sizeof (asection *));
diff --git a/bfd/binary.c b/bfd/binary.c
index fc972b2..7bddabf 100644
--- a/bfd/binary.c
+++ b/bfd/binary.c
@@ -185,7 +185,7 @@ binary_get_symtab (abfd, alocation)
syms = (asymbol *) bfd_alloc (abfd, amt);
if (syms == NULL)
- return false;
+ return (long) false;
/* Start symbol. */
syms[0].the_bfd = abfd;
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index 5e7f907..25256a8 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -1881,6 +1881,7 @@ record_arm_to_thumb_glue (info, h)
register asection * s;
char * tmp_name;
struct coff_link_hash_entry * myh;
+ struct bfd_link_hash_entry * bh;
struct coff_arm_link_hash_table * globals;
bfd_vma val;
bfd_size_type amt;
@@ -1915,10 +1916,10 @@ record_arm_to_thumb_glue (info, h)
though the section isn't allocated yet, this is where we will be putting
it. */
+ bh = NULL;
val = globals->arm_glue_size + 1;
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
- BSF_GLOBAL, s, val, NULL, true, false,
- (struct bfd_link_hash_entry **) & myh);
+ BSF_GLOBAL, s, val, NULL, true, false, &bh);
free (tmp_name);
@@ -1937,6 +1938,7 @@ record_thumb_to_arm_glue (info, h)
register asection * s;
char * tmp_name;
struct coff_link_hash_entry * myh;
+ struct bfd_link_hash_entry * bh;
struct coff_arm_link_hash_table * globals;
bfd_vma val;
bfd_size_type amt;
@@ -1967,12 +1969,13 @@ record_thumb_to_arm_glue (info, h)
return; /* we've already seen this guy */
}
+ bh = NULL;
val = globals->thumb_glue_size + 1;
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
- BSF_GLOBAL, s, val, NULL, true, false,
- (struct bfd_link_hash_entry **) &myh);
+ BSF_GLOBAL, s, val, NULL, true, false, &bh);
/* If we mark it 'thumb', the disassembler will do a better job. */
+ myh = (struct coff_link_hash_entry *) bh;
myh->class = C_THUMBEXTFUNC;
free (tmp_name);
@@ -1989,11 +1992,10 @@ record_thumb_to_arm_glue (info, h)
sprintf (tmp_name, globals->support_old_code ? BACK_FROM_ARM : CHANGE_TO_ARM, name);
- myh = NULL;
+ bh = NULL;
val = globals->thumb_glue_size + (globals->support_old_code ? 8 : 4);
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
- BSF_LOCAL, s, val, NULL, true, false,
- (struct bfd_link_hash_entry **) & myh);
+ BSF_LOCAL, s, val, NULL, true, false, &bh);
free (tmp_name);
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index ee6c8fc..21589c6 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -2196,7 +2196,7 @@ _bfd_coff_is_local_label_name (abfd, name)
bfd *abfd ATTRIBUTE_UNUSED;
const char *name;
{
- return name[0] == '.' && name[1] == 'L';
+ return (boolean) (name[0] == '.' && name[1] == 'L');
}
/* Provided a BFD, a section and an offset (in bytes, not octets) into the
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index eb9388f..c1302ee 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -1322,6 +1322,9 @@ mark_relocs (finfo, input_bfd)
if ((a->flags & SEC_RELOC) == 0 || a->reloc_count < 1)
continue;
+ /* Don't mark relocs in excluded sections. */
+ if (a->output_section == bfd_abs_section_ptr)
+ continue;
/* Read in the relocs. */
internal_relocs = _bfd_coff_read_internal_relocs
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 4aabfed..fdc7bbe 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -915,10 +915,12 @@ case "${targ}" in
s390-*-linux*)
targ_defvec=bfd_elf32_s390_vec
+ targ64_selvecs=bfd_elf64_s390_vec
;;
#ifdef BFD64
s390x-*-linux*)
targ_defvec=bfd_elf64_s390_vec
+ targ_selvecs=bfd_elf32_s390_vec
;;
#endif
@@ -934,12 +936,12 @@ case "${targ}" in
targ_underscore=yes
;;
sh64eb-*-linux*)
- targ_defvec=bfd_elf32_shblin_vec
- targ_selvecs="bfd_elf32_shblin_vec bfd_elf32_sh64_vec bfd_elf64_sh64_vec bfd_elf32_sh_vec"
+ targ_defvec=bfd_elf32_sh64blin_vec
+ targ_selvecs="bfd_elf32_sh64lin_vec bfd_elf64_sh64blin_vec bfd_elf64_sh64lin_vec bfd_elf32_shblin_vec bfd_elf32_shlin_vec"
;;
sh64-*-linux*)
- targ_defvec=bfd_elf32_shlin_vec
- targ_selvecs="bfd_elf32_shlin_vec bfd_elf32_sh64l_vec bfd_elf64_sh64l_vec bfd_elf32_shl_vec"
+ targ_defvec=bfd_elf32_sh64lin_vec
+ targ_selvecs="bfd_elf32_sh64blin_vec bfd_elf64_sh64lin_vec bfd_elf64_sh64blin_vec bfd_elf32_shlin_vec bfd_elf32_shblin_vec"
;;
#endif /* BFD64 */
@@ -952,9 +954,11 @@ case "${targ}" in
;;
sh*eb-*-linux*)
targ_defvec=bfd_elf32_shblin_vec
+ targ_selvecs=bfd_elf32_shlin_vec
;;
sh*-*-linux*)
targ_defvec=bfd_elf32_shlin_vec
+ targ_selvecs=bfd_elf32_shblin_vec
;;
#ifdef BFD64
diff --git a/bfd/configure b/bfd/configure
index 2ca10f7..794cb62 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -1206,14 +1206,13 @@ fi
bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'`
bfd_version_string="\"${VERSION}\""
-bfd_version_date=`sed -e 's/.*DATE //' < ${srcdir}/version.h`
if test x${is_release} = x; then
+ bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
bfd_version_string="\"${VERSION} ${bfd_version_date}\""
fi
-
if test $host != $build; then
ac_tool_prefix=${host_alias}-
else
@@ -1223,7 +1222,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1227: checking for $ac_word" >&5
+echo "configure:1226: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1255,7 +1254,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1259: checking for $ac_word" >&5
+echo "configure:1258: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1287,7 +1286,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1291: checking for $ac_word" >&5
+echo "configure:1290: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1402,7 +1401,7 @@ ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1406: checking for ld used by GCC" >&5
+echo "configure:1405: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1432,10 +1431,10 @@ echo "configure:1406: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1436: checking for GNU ld" >&5
+echo "configure:1435: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1439: checking for non-GNU ld" >&5
+echo "configure:1438: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1470,7 +1469,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1474: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1473: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1487,7 +1486,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1491: checking for $LD option to reload object files" >&5
+echo "configure:1490: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1499,7 +1498,7 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1503: checking for BSD-compatible nm" >&5
+echo "configure:1502: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1537,7 +1536,7 @@ NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1541: checking whether ln -s works" >&5
+echo "configure:1540: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1558,7 +1557,7 @@ else
fi
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1562: checking how to recognise dependant libraries" >&5
+echo "configure:1561: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1731,13 +1730,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1735: checking for object suffix" >&5
+echo "configure:1734: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -1757,7 +1756,7 @@ ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1761: checking for executable suffix" >&5
+echo "configure:1760: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1767,7 +1766,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:1770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj) ;;
@@ -1794,7 +1793,7 @@ case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1798: checking for ${ac_tool_prefix}file" >&5
+echo "configure:1797: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1856,7 +1855,7 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1860: checking for file" >&5
+echo "configure:1859: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1927,7 +1926,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1931: checking for $ac_word" >&5
+echo "configure:1930: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1959,7 +1958,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1963: checking for $ac_word" >&5
+echo "configure:1962: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1994,7 +1993,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1998: checking for $ac_word" >&5
+echo "configure:1997: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2026,7 +2025,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2030: checking for $ac_word" >&5
+echo "configure:2029: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2093,8 +2092,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2097 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 2096 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:2097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
@@ -2113,7 +2112,7 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:2116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*ELF-32*)
HPUX_IA64_MODE="32"
@@ -2131,7 +2130,7 @@ ia64-*-hpux*)
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2135: checking whether the C compiler needs -belf" >&5
+echo "configure:2134: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2144,14 +2143,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2148 "configure"
+#line 2147 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -2341,7 +2340,7 @@ if test -z "$target" ; then
fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2345: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:2344: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -2364,7 +2363,7 @@ fi
echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6
-echo "configure:2368: checking whether to install libbfd" >&5
+echo "configure:2367: checking whether to install libbfd" >&5
# Check whether --enable-install-libbfd or --disable-install-libbfd was given.
if test "${enable_install_libbfd+set}" = set; then
enableval="$enable_install_libbfd"
@@ -2401,7 +2400,7 @@ fi
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2405: checking for executable suffix" >&5
+echo "configure:2404: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2411,7 +2410,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:2414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj) ;;
@@ -2441,7 +2440,7 @@ bfd_default_target_size=32
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2445: checking for $ac_word" >&5
+echo "configure:2444: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2471,7 +2470,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2475: checking for $ac_word" >&5
+echo "configure:2474: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2522,7 +2521,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2526: checking for $ac_word" >&5
+echo "configure:2525: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2554,7 +2553,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2558: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2557: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2565,12 +2564,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2569 "configure"
+#line 2568 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2596,12 +2595,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2600: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2599: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2605: checking whether we are using GNU C" >&5
+echo "configure:2604: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2610,7 +2609,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -2629,7 +2628,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2633: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2632: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2663,7 +2662,7 @@ fi
ALL_LINGUAS="fr tr ja es sv da"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2667: checking how to run the C preprocessor" >&5
+echo "configure:2666: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2678,13 +2677,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2682 "configure"
+#line 2681 "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:2688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2687: \"$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
:
@@ -2695,13 +2694,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2699 "configure"
+#line 2698 "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:2705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2704: \"$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
:
@@ -2712,13 +2711,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2716 "configure"
+#line 2715 "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:2722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2721: \"$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
:
@@ -2745,7 +2744,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2749: checking for $ac_word" >&5
+echo "configure:2748: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2773,12 +2772,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2777: checking for ANSI C header files" >&5
+echo "configure:2776: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2782 "configure"
+#line 2781 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2786,7 +2785,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2789: \"$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*
@@ -2803,7 +2802,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2807 "configure"
+#line 2806 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2821,7 +2820,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2825 "configure"
+#line 2824 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2842,7 +2841,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2846 "configure"
+#line 2845 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2853,7 +2852,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2877,12 +2876,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2881: checking for working const" >&5
+echo "configure:2880: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2886 "configure"
+#line 2885 "configure"
#include "confdefs.h"
int main() {
@@ -2931,7 +2930,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2952,21 +2951,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2956: checking for inline" >&5
+echo "configure:2955: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 2963 "configure"
+#line 2962 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2992,12 +2991,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2996: checking for off_t" >&5
+echo "configure:2995: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3001 "configure"
+#line 3000 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3025,12 +3024,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3029: checking for size_t" >&5
+echo "configure:3028: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3034 "configure"
+#line 3033 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3060,19 +3059,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3064: checking for working alloca.h" >&5
+echo "configure:3063: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3069 "configure"
+#line 3068 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -3093,12 +3092,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3097: checking for alloca" >&5
+echo "configure:3096: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3102 "configure"
+#line 3101 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3126,7 +3125,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -3158,12 +3157,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3162: checking whether alloca needs Cray hooks" >&5
+echo "configure:3161: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3167 "configure"
+#line 3166 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3188,12 +3187,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3192: checking for $ac_func" >&5
+echo "configure:3191: 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 3197 "configure"
+#line 3196 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3216,7 +3215,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3219: \"$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
@@ -3243,7 +3242,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3247: checking stack direction for C alloca" >&5
+echo "configure:3246: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3251,7 +3250,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3255 "configure"
+#line 3254 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3270,7 +3269,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -3295,17 +3294,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:3299: checking for $ac_hdr" >&5
+echo "configure:3298: 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 3304 "configure"
+#line 3303 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3308: \"$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*
@@ -3334,12 +3333,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3338: checking for $ac_func" >&5
+echo "configure:3337: 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 3343 "configure"
+#line 3342 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3362,7 +3361,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3365: \"$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
@@ -3387,7 +3386,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3391: checking for working mmap" >&5
+echo "configure:3390: 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
@@ -3395,7 +3394,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3399 "configure"
+#line 3398 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3548,7 +3547,7 @@ main()
}
EOF
-if { (eval echo configure:3552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3551: \"$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
@@ -3576,17 +3575,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3580: checking for $ac_hdr" >&5
+echo "configure:3579: 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 3585 "configure"
+#line 3584 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3589: \"$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*
@@ -3616,12 +3615,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3620: checking for $ac_func" >&5
+echo "configure:3619: 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 3625 "configure"
+#line 3624 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3644,7 +3643,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3647: \"$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
@@ -3673,12 +3672,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3677: checking for $ac_func" >&5
+echo "configure:3676: 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 3682 "configure"
+#line 3681 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3701,7 +3700,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3704: \"$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
@@ -3735,19 +3734,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3739: checking for LC_MESSAGES" >&5
+echo "configure:3738: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3744 "configure"
+#line 3743 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -3768,7 +3767,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3772: checking whether NLS is requested" >&5
+echo "configure:3771: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -3788,7 +3787,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3792: checking whether included gettext is requested" >&5
+echo "configure:3791: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -3807,17 +3806,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3811: checking for libintl.h" >&5
+echo "configure:3810: checking for libintl.h" >&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 3816 "configure"
+#line 3815 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3820: \"$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*
@@ -3834,19 +3833,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3838: checking for gettext in libc" >&5
+echo "configure:3837: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3843 "configure"
+#line 3842 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -3862,7 +3861,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3866: checking for bindtextdomain in -lintl" >&5
+echo "configure:3865: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3870,7 +3869,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3874 "configure"
+#line 3873 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3881,7 +3880,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3897,19 +3896,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3901: checking for gettext in libintl" >&5
+echo "configure:3900: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3906 "configure"
+#line 3905 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -3937,7 +3936,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3941: checking for $ac_word" >&5
+echo "configure:3940: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3971,12 +3970,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3975: checking for $ac_func" >&5
+echo "configure:3974: 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 3980 "configure"
+#line 3979 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3999,7 +3998,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4002: \"$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
@@ -4026,7 +4025,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4030: checking for $ac_word" >&5
+echo "configure:4029: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4062,7 +4061,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4066: checking for $ac_word" >&5
+echo "configure:4065: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4094,7 +4093,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 4098 "configure"
+#line 4097 "configure"
#include "confdefs.h"
int main() {
@@ -4102,7 +4101,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -4134,7 +4133,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4138: checking for $ac_word" >&5
+echo "configure:4137: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4168,7 +4167,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4172: checking for $ac_word" >&5
+echo "configure:4171: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4204,7 +4203,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4208: checking for $ac_word" >&5
+echo "configure:4207: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4294,7 +4293,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4298: checking for catalogs to be installed" >&5
+echo "configure:4297: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -4322,17 +4321,17 @@ echo "configure:4298: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4326: checking for linux/version.h" >&5
+echo "configure:4325: checking for linux/version.h" >&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 4331 "configure"
+#line 4330 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4335: \"$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*
@@ -4410,7 +4409,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:4414: checking for a BSD compatible install" >&5
+echo "configure:4413: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4493,7 +4492,7 @@ if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4497: checking for build system executable suffix" >&5
+echo "configure:4496: checking for build system executable suffix" >&5
if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4521,17 +4520,17 @@ for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4525: checking for $ac_hdr" >&5
+echo "configure:4524: 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 4530 "configure"
+#line 4529 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4534: \"$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*
@@ -4561,17 +4560,17 @@ for ac_hdr in fcntl.h sys/file.h sys/time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4565: checking for $ac_hdr" >&5
+echo "configure:4564: 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 4570 "configure"
+#line 4569 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4574: \"$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*
@@ -4598,12 +4597,12 @@ fi
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:4602: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:4601: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4607 "configure"
+#line 4606 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -4612,7 +4611,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:4616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -4637,12 +4636,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4641: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4640: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4646 "configure"
+#line 4645 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -4650,7 +4649,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -4675,7 +4674,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4679: checking for opendir in -ldir" >&5
+echo "configure:4678: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4683,7 +4682,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4687 "configure"
+#line 4686 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4694,7 +4693,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4716,7 +4715,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4720: checking for opendir in -lx" >&5
+echo "configure:4719: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4724,7 +4723,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4728 "configure"
+#line 4727 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4735,7 +4734,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4760,12 +4759,12 @@ fi
for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4764: checking for $ac_func" >&5
+echo "configure:4763: 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 4769 "configure"
+#line 4768 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4788,7 +4787,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4791: \"$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
@@ -4823,12 +4822,12 @@ EOF
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4827: checking whether strstr must be declared" >&5
+echo "configure:4826: checking whether strstr must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4832 "configure"
+#line 4831 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4849,7 +4848,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4870,12 +4869,12 @@ EOF
fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:4874: checking whether malloc must be declared" >&5
+echo "configure:4873: checking whether malloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4879 "configure"
+#line 4878 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4896,7 +4895,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:4900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -4917,12 +4916,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:4921: checking whether realloc must be declared" >&5
+echo "configure:4920: checking whether realloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4926 "configure"
+#line 4925 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4943,7 +4942,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:4947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -4964,12 +4963,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4968: checking whether free must be declared" >&5
+echo "configure:4967: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4973 "configure"
+#line 4972 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4990,7 +4989,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:4994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -5011,12 +5010,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:5015: checking whether getenv must be declared" >&5
+echo "configure:5014: checking whether getenv must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5020 "configure"
+#line 5019 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5037,7 +5036,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:5041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -5224,16 +5223,16 @@ if test "${target}" = "${host}"; then
# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
# have c_impl as a member of struct core_dumpx
echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6
-echo "configure:5228: checking for c_impl in struct core_dumpx" >&5
+echo "configure:5227: checking for c_impl in struct core_dumpx" >&5
cat > conftest.$ac_ext <<EOF
-#line 5230 "configure"
+#line 5229 "configure"
#include "confdefs.h"
#include <core.h>
int main() {
struct core_dumpx c; c.c_impl = 0;
; return 0; }
EOF
-if { (eval echo configure:5237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_ST_C_IMPL 1
@@ -5301,17 +5300,17 @@ rm -f conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5305: checking for $ac_hdr" >&5
+echo "configure:5304: 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 5310 "configure"
+#line 5309 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5314: \"$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*
@@ -5339,12 +5338,12 @@ done
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5343: checking for prstatus_t in sys/procfs.h" >&5
+echo "configure:5342: checking for prstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5348 "configure"
+#line 5347 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5353,7 +5352,7 @@ int main() {
prstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus_t=yes
else
@@ -5375,12 +5374,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5379: checking for prstatus32_t in sys/procfs.h" >&5
+echo "configure:5378: checking for prstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5384 "configure"
+#line 5383 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5389,7 +5388,7 @@ int main() {
prstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus32_t=yes
else
@@ -5411,12 +5410,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5415: checking for prstatus_t.pr_who in sys/procfs.h" >&5
+echo "configure:5414: checking for prstatus_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5420 "configure"
+#line 5419 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5425,7 +5424,7 @@ int main() {
prstatus_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
else
@@ -5447,12 +5446,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5451: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
+echo "configure:5450: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5456 "configure"
+#line 5455 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5461,7 +5460,7 @@ int main() {
prstatus32_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
else
@@ -5483,12 +5482,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5487: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5486: checking for pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5492 "configure"
+#line 5491 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5497,7 +5496,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -5519,12 +5518,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5523: checking for pxstatus_t in sys/procfs.h" >&5
+echo "configure:5522: checking for pxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5528 "configure"
+#line 5527 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5533,7 +5532,7 @@ int main() {
pxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pxstatus_t=yes
else
@@ -5555,12 +5554,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5559: checking for pstatus32_t in sys/procfs.h" >&5
+echo "configure:5558: checking for pstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5564 "configure"
+#line 5563 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5569,7 +5568,7 @@ int main() {
pstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus32_t=yes
else
@@ -5591,12 +5590,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5595: checking for prpsinfo_t in sys/procfs.h" >&5
+echo "configure:5594: checking for prpsinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5600 "configure"
+#line 5599 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5605,7 +5604,7 @@ int main() {
prpsinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
else
@@ -5627,12 +5626,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5631: checking for prpsinfo32_t in sys/procfs.h" >&5
+echo "configure:5630: checking for prpsinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5636 "configure"
+#line 5635 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5641,7 +5640,7 @@ int main() {
prpsinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
else
@@ -5663,12 +5662,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5667: checking for psinfo_t in sys/procfs.h" >&5
+echo "configure:5666: checking for psinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5672 "configure"
+#line 5671 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5677,7 +5676,7 @@ int main() {
psinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo_t=yes
else
@@ -5699,12 +5698,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5703: checking for psinfo32_t in sys/procfs.h" >&5
+echo "configure:5702: checking for psinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5708 "configure"
+#line 5707 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5713,7 +5712,7 @@ int main() {
psinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo32_t=yes
else
@@ -5735,12 +5734,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5739: checking for lwpstatus_t in sys/procfs.h" >&5
+echo "configure:5738: checking for lwpstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5744 "configure"
+#line 5743 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5749,7 +5748,7 @@ int main() {
lwpstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
else
@@ -5771,12 +5770,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5775: checking for lwpxstatus_t in sys/procfs.h" >&5
+echo "configure:5774: checking for lwpxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5780 "configure"
+#line 5779 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5785,7 +5784,7 @@ int main() {
lwpxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
else
@@ -5807,12 +5806,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5811: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
+echo "configure:5810: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5816 "configure"
+#line 5815 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5821,7 +5820,7 @@ int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_context
; return 0; }
EOF
-if { (eval echo configure:5825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
else
@@ -5843,12 +5842,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5847: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
+echo "configure:5846: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5852 "configure"
+#line 5851 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5857,7 +5856,7 @@ int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
; return 0; }
EOF
-if { (eval echo configure:5861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
else
@@ -5879,12 +5878,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5883: checking for win32_pstatus_t in sys/procfs.h" >&5
+echo "configure:5882: checking for win32_pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5888 "configure"
+#line 5887 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5893,7 +5892,7 @@ int main() {
win32_pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
else
@@ -6062,8 +6061,8 @@ do
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
- bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
- bfd_elf32_bigarmqnx_vec) tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarmqnx_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
@@ -6075,9 +6074,9 @@ 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_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_i386qnx_vec) tb="$tb elf32-i386.lo elf32-qnx.lo elf32.lo $elf" ;;
bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
@@ -6087,8 +6086,8 @@ do
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
- bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
- bfd_elf32_littlearmqnx_vec) tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearmqnx_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
@@ -6107,26 +6106,28 @@ do
bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;;
bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
- bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcleqnx_vec) tb="$tb elf32-ppcqnx.lo elf32-ppc.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcqnx_vec) tb="$tb elf32-ppcqnx.lo elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcleqnx_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcqnx_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
# FIXME: We include cofflink.lo not because it's needed for
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
# which needs it but does not list it. Should be fixed in right place.
bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
- bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
- bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shlqnx_vec) tb="$tb elf32-shqnx.lo elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shqnx_vec) tb="$tb elf32-shqnx.lo elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_sh64lin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64blin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
+ bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
+ bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo elf32-qnx.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlqnx_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shqnx_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
@@ -6134,7 +6135,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_freebsd_vec) tb="$tb elf64-alpha.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 ;;
@@ -6153,8 +6154,10 @@ do
bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;;
- bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64lin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64blin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
@@ -6340,10 +6343,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:6344: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6347: 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 6347 "configure"
+#line 6350 "configure"
#include "confdefs.h"
:__GNUC__:__GNUC_MINOR__:__i386__:
EOF
@@ -6388,17 +6391,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:6392: checking for $ac_hdr" >&5
+echo "configure:6395: 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 6397 "configure"
+#line 6400 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6405: \"$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*
@@ -6427,12 +6430,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6431: checking for $ac_func" >&5
+echo "configure:6434: 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 6436 "configure"
+#line 6439 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6455,7 +6458,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6462: \"$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
@@ -6480,7 +6483,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6484: checking for working mmap" >&5
+echo "configure:6487: 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
@@ -6488,7 +6491,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6492 "configure"
+#line 6495 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6641,7 +6644,7 @@ main()
}
EOF
-if { (eval echo configure:6645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6648: \"$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
@@ -6666,12 +6669,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6670: checking for $ac_func" >&5
+echo "configure:6673: 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 6675 "configure"
+#line 6678 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6694,7 +6697,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6701: \"$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
@@ -6827,7 +6830,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -6887,7 +6890,6 @@ s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@bfd_version@%$bfd_version%g
-s%@bfd_version_date@%$bfd_version_date%g
s%@bfd_version_string@%$bfd_version_string%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
@@ -6986,7 +6988,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
diff --git a/bfd/configure.in b/bfd/configure.in
index ba38dd4..b59089d 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -16,17 +16,11 @@ bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\
changequote([,])dnl
bfd_version_string="\"${VERSION}\""
-bfd_version_date=`sed -e 's/.*DATE //' < ${srcdir}/version.h`
if test x${is_release} = x; then
-dnl Sad, but we can't use XSTRING here to pick up the date from version.h
-dnl because traditional C doesn't allow it.
+ bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
bfd_version_string="\"${VERSION} ${bfd_version_date}\""
fi
-dnl Since we need to edit bfd-in3.h to get the date for bfd_version_string,
-dnl we may as well substitute for bfd_version_date too. That way we don't
-dnl need to #include version.h
AC_SUBST(bfd_version)
-AC_SUBST(bfd_version_date)
AC_SUBST(bfd_version_string)
dnl These must be called before AM_PROG_LIBTOOL, because it may want
@@ -563,8 +557,8 @@ do
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
- bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
- bfd_elf32_bigarmqnx_vec) tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarmqnx_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
@@ -576,9 +570,9 @@ 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_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_i386qnx_vec) tb="$tb elf32-i386.lo elf32-qnx.lo elf32.lo $elf" ;;
bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
@@ -588,8 +582,8 @@ do
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
- bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
- bfd_elf32_littlearmqnx_vec) tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearmqnx_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
@@ -608,26 +602,28 @@ do
bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;;
bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
- bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcleqnx_vec) tb="$tb elf32-ppcqnx.lo elf32-ppc.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcqnx_vec) tb="$tb elf32-ppcqnx.lo elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcleqnx_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcqnx_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
# FIXME: We include cofflink.lo not because it's needed for
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
# which needs it but does not list it. Should be fixed in right place.
bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
- bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
- bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shlqnx_vec) tb="$tb elf32-shqnx.lo elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shqnx_vec) tb="$tb elf32-shqnx.lo elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_sh64lin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64blin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
+ bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
+ bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo elf32-qnx.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlqnx_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shqnx_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
@@ -635,7 +631,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_freebsd_vec) tb="$tb elf64-alpha.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 ;;
@@ -654,8 +650,10 @@ do
bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;;
- bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64lin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64blin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
@@ -880,6 +878,6 @@ case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
esac
rm -f doc/config.status
-AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in,
+AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in,
[sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile])
diff --git a/bfd/doc/ChangeLog b/bfd/doc/ChangeLog
index f20113c..a236bfb 100644
--- a/bfd/doc/ChangeLog
+++ b/bfd/doc/ChangeLog
@@ -1,3 +1,11 @@
+2002-10-14 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2002-10-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.in: Regenerated.
+
2002-08-29 John David Anglin <dave@hiauly1.hia.nrc.ca>
* chew.c (paramstuff, outputdots, perform, bang and usage): Remove
diff --git a/bfd/doc/Makefile.am b/bfd/doc/Makefile.am
index 0787143..da51daf 100644
--- a/bfd/doc/Makefile.am
+++ b/bfd/doc/Makefile.am
@@ -248,6 +248,8 @@ BFD_H_DEP = \
$(srcdir)/../corefile.c \
$(srcdir)/../targets.c \
$(srcdir)/../format.c \
+ $(srcdir)/../linker.c \
+ $(srcdir)/../simple.c \
$(srcdir)/header.sed \
$(srcdir)/proto.str \
$(srcdir)/../version.h \
diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in
index 66a19d1..d25bbf2 100644
--- a/bfd/doc/Makefile.in
+++ b/bfd/doc/Makefile.in
@@ -119,7 +119,6 @@ bfd_default_target_size = @bfd_default_target_size@
bfd_libs = @bfd_libs@
bfd_machines = @bfd_machines@
bfd_version = @bfd_version@
-bfd_version_date = @bfd_version_date@
bfd_version_string = @bfd_version_string@
bfdincludedir = @bfdincludedir@
bfdlibdir = @bfdlibdir@
@@ -216,6 +215,8 @@ BFD_H_DEP = \
$(srcdir)/../corefile.c \
$(srcdir)/../targets.c \
$(srcdir)/../format.c \
+ $(srcdir)/../linker.c \
+ $(srcdir)/../simple.c \
$(srcdir)/header.sed \
$(srcdir)/proto.str \
$(srcdir)/../version.h \
@@ -244,7 +245,7 @@ DIST_COMMON = ChangeLog Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 7c000b9..0639826 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -402,7 +402,7 @@ read_indirect_string (unit, buf, bytes_read_ptr)
return NULL;
}
- buf = stash->dwarf_str_buffer + offset;
+ buf = stash->dwarf_str_buffer + offset;
if (*buf == '\0')
return NULL;
return buf;
@@ -578,7 +578,8 @@ read_abbrevs (abfd, offset, stash)
/* Read in abbrev header. */
cur_abbrev->number = abbrev_number;
- cur_abbrev->tag = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+ cur_abbrev->tag = (enum dwarf_tag)
+ read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
abbrev_ptr += bytes_read;
cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr);
abbrev_ptr += 1;
@@ -601,8 +602,10 @@ read_abbrevs (abfd, offset, stash)
return 0;
}
- cur_abbrev->attrs[cur_abbrev->num_attrs].name = abbrev_name;
- cur_abbrev->attrs[cur_abbrev->num_attrs++].form = abbrev_form;
+ cur_abbrev->attrs[cur_abbrev->num_attrs].name
+ = (enum dwarf_attribute) abbrev_name;
+ cur_abbrev->attrs[cur_abbrev->num_attrs++].form
+ = (enum dwarf_form) abbrev_form;
abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
abbrev_ptr += bytes_read;
abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
@@ -614,7 +617,7 @@ read_abbrevs (abfd, offset, stash)
abbrevs[hash_number] = cur_abbrev;
/* Get next abbreviation.
- Under Irix6 the abbreviations for a compilation unit are not
+ Under Irix6 the abbreviations for a compilation unit are not
always properly terminated with an abbrev number of 0.
Exit loop if we encounter an abbreviation which we have
already read (which means we are about to read the abbreviations
@@ -646,7 +649,7 @@ read_attribute_value (attr, form, unit, info_ptr)
struct dwarf_block *blk;
bfd_size_type amt;
- attr->form = form;
+ attr->form = (enum dwarf_form) form;
switch (form)
{
@@ -806,7 +809,8 @@ struct line_info_table
char* comp_dir;
char** dirs;
struct fileinfo* files;
- struct line_info* last_line;
+ struct line_info* last_line; /* largest VMA */
+ struct line_info* lcl_head; /* local head; used in 'add_line_info' */
};
struct funcinfo
@@ -817,6 +821,11 @@ struct funcinfo
bfd_vma high;
};
+/* add_line_info: adds a new entry to the line_info list in the
+ line_info_table, ensuring that the list is sorted. Note that the
+ line_info list is sorted from highest to lowest VMA (with possible
+ duplicates); that is, line_info->prev_line always accesses an equal
+ or smaller VMA. */
static void
add_line_info (table, address, filename, line, column, end_sequence)
struct line_info_table* table;
@@ -829,9 +838,72 @@ add_line_info (table, address, filename, line, column, end_sequence)
bfd_size_type amt = sizeof (struct line_info);
struct line_info* info = (struct line_info*) bfd_alloc (table->abfd, amt);
- info->prev_line = table->last_line;
- table->last_line = info;
+ /* Find the correct location for 'info'. Normally we will receive
+ new line_info data 1) in order and 2) with increasing VMAs.
+ However some compilers break the rules (cf. decode_line_info) and
+ so we include some heuristics for quickly finding the correct
+ location for 'info'. In particular, these heuristics optimize for
+ the common case in which the VMA sequence that we receive is a
+ list of locally sorted VMAs such as
+ p...z a...j (where a < j < p < z)
+ Note: table->lcl_head is used to head an *actual* or *possible*
+ sequence within the list (such as a...j) that is not directly
+ headed by table->last_line
+
+ Note: we may receive duplicate entries from 'decode_line_info'. */
+
+ while (1)
+ if (!table->last_line
+ || address >= table->last_line->address)
+ {
+ /* Normal case: add 'info' to the beginning of the list */
+ info->prev_line = table->last_line;
+ table->last_line = info;
+
+ /* lcl_head: initialize to head a *possible* sequence at the end. */
+ if (!table->lcl_head)
+ table->lcl_head = info;
+ break;
+ }
+ else if (!table->lcl_head->prev_line
+ && table->lcl_head->address > address)
+ {
+ /* Abnormal but easy: lcl_head is 1) at the *end* of the line
+ list and 2) the head of 'info'. */
+ info->prev_line = NULL;
+ table->lcl_head->prev_line = info;
+ break;
+ }
+ else if (table->lcl_head->prev_line
+ && table->lcl_head->address > address
+ && address >= table->lcl_head->prev_line->address)
+ {
+ /* Abnormal but easy: lcl_head is 1) in the *middle* of the line
+ list and 2) the head of 'info'. */
+ info->prev_line = table->lcl_head->prev_line;
+ table->lcl_head->prev_line = info;
+ break;
+ }
+ else
+ {
+ /* Abnormal and hard: Neither 'last_line' nor 'lcl_head' are valid
+ heads for 'info'. Reset 'lcl_head' and repeat. */
+ struct line_info* li2 = table->last_line; /* always non-NULL */
+ struct line_info* li1 = li2->prev_line;
+
+ while (li1)
+ {
+ if (li2->address > address && address >= li1->address)
+ break;
+
+ li2 = li1; /* always non-NULL */
+ li1 = li1->prev_line;
+ }
+ table->lcl_head = li2;
+ }
+
+ /* Set member data of 'info'. */
info->address = address;
info->filename = filename;
info->line = line;
@@ -908,7 +980,8 @@ arange_add (unit, low_pc, high_pc)
}
/* Need to allocate a new arange and insert it into the arange list. */
- arange = bfd_zalloc (unit->abfd, (bfd_size_type) sizeof (*arange));
+ arange = (struct arange *)
+ bfd_zalloc (unit->abfd, (bfd_size_type) sizeof (*arange));
arange->low = low_pc;
arange->high = high_pc;
@@ -982,6 +1055,7 @@ decode_line_info (unit, stash)
table->files = NULL;
table->last_line = NULL;
+ table->lcl_head = NULL;
line_ptr = stash->dwarf_line_buffer + unit->line_offset;
@@ -1091,10 +1165,10 @@ decode_line_info (unit, stash)
int basic_block = 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. */
+ 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;
@@ -1249,19 +1323,31 @@ lookup_address_in_line_info_table (table, addr, function, filename_ptr,
const char **filename_ptr;
unsigned int *linenumber_ptr;
{
+ /* Note: table->last_line should be a descendingly sorted list. */
struct line_info* next_line = table->last_line;
- struct line_info* each_line;
+ struct line_info* each_line = NULL;
+ *filename_ptr = NULL;
if (!next_line)
return false;
each_line = next_line->prev_line;
+ /* Check for large addresses */
+ if (addr > next_line->address)
+ each_line = NULL; /* ensure we skip over the normal case */
+
+ /* Normal case: search the list; save */
while (each_line && next_line)
{
- if (!each_line->end_sequence
- && addr >= each_line->address && addr < next_line->address)
+ /* If we have an address match, save this info. This allows us
+ to return as good as results as possible for strange debugging
+ info. */
+ boolean addr_match = false;
+ if (each_line->address <= addr && addr <= next_line->address)
{
+ addr_match = true;
+
/* If this line appears to span functions, and addr is in the
later function, return the first line of that function instead
of the last line of the earlier one. This check is for GCC
@@ -1278,16 +1364,22 @@ lookup_address_in_line_info_table (table, addr, function, filename_ptr,
*filename_ptr = each_line->filename;
*linenumber_ptr = each_line->line;
}
- return true;
}
+
+ if (addr_match && !each_line->end_sequence)
+ return true; /* we have definitely found what we want */
+
next_line = each_line;
each_line = each_line->prev_line;
}
- /* At this point each_line is NULL but next_line is not. If we found the
- containing function in this compilation unit, return the first line we
- have a number for. This is also for compatibility with GCC 2.95. */
- if (function != NULL)
+ /* At this point each_line is NULL but next_line is not. If we found
+ a candidate end-of-sequence point in the loop above, we can return
+ that (compatibility with a bug in the Intel compiler); otherwise,
+ assuming that we found the containing function for this address in
+ this compilation unit, return the first line we have a number for
+ (compatibility with GCC 2.95). */
+ if (*filename_ptr == NULL && function != NULL)
{
*filename_ptr = next_line->filename;
*linenumber_ptr = next_line->line;
@@ -1645,18 +1737,18 @@ comp_unit_contains_address (unit, addr)
struct arange *arange;
if (unit->error)
- return 0;
+ return false;
arange = &unit->arange;
do
{
if (addr >= arange->low && addr < arange->high)
- return 1;
+ return true;
arange = arange->next;
}
while (arange);
- return 0;
+ return false;
}
/* If UNIT contains ADDR, set the output parameters to the values for
@@ -1701,7 +1793,7 @@ comp_unit_find_nearest_line (unit, addr, filename_ptr, functionname_ptr,
}
if (unit->first_child_die_ptr < unit->end_ptr
- && ! scan_unit_for_functions (unit))
+ && ! scan_unit_for_functions (unit))
{
unit->error = 1;
return false;
@@ -1714,7 +1806,7 @@ comp_unit_find_nearest_line (unit, addr, filename_ptr, functionname_ptr,
line_p = lookup_address_in_line_info_table (unit->line_table, addr,
function, filename_ptr,
linenumber_ptr);
- return line_p || func_p;
+ return (boolean) (line_p || func_p);
}
/* Locate a section in a BFD containing debugging info. The search starts
@@ -1821,7 +1913,7 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
return false;
/* There can be more than one DWARF2 info section in a BFD these days.
- Read them all in and produce one large stash. We do this in two
+ Read them all in and produce one large stash. We do this in two
passes - in the first pass we just accumulate the section sizes.
In the second pass we read in the section's contents. The allows
us to avoid reallocing the data as we add sections to the stash. */
@@ -1917,7 +2009,7 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
stash->info_ptr += addr_size;
if (length > 0)
- {
+ {
each = parse_comp_unit (abfd, stash, length, offset_size);
stash->info_ptr += length;
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 47b6582..4f129f6 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -3837,7 +3837,7 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
= backend->debug_swap.swap_ext_in;
bfd_size_type external_ext_size = backend->debug_swap.external_ext_size;
unsigned long ext_count;
- struct ecoff_link_hash_entry **sym_hash;
+ struct bfd_link_hash_entry **sym_hash;
char *ext_ptr;
char *ext_end;
bfd_size_type amt;
@@ -3846,10 +3846,10 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
amt = ext_count;
amt *= sizeof (struct bfd_link_hash_entry *);
- sym_hash = (struct ecoff_link_hash_entry **) bfd_alloc (abfd, amt);
+ sym_hash = (struct bfd_link_hash_entry **) bfd_alloc (abfd, amt);
if (!sym_hash)
return false;
- ecoff_data (abfd)->sym_hashes = sym_hash;
+ ecoff_data (abfd)->sym_hashes = (struct ecoff_link_hash_entry **) sym_hash;
ext_ptr = (char *) external_ext;
ext_end = ext_ptr + ext_count * external_ext_size;
@@ -3980,15 +3980,13 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
name = ssext + esym.asym.iss;
- h = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, name,
(flagword) (esym.weakext ? BSF_WEAK : BSF_GLOBAL),
- section, value, (const char *) NULL, true, true,
- (struct bfd_link_hash_entry **) &h)))
+ section, value, (const char *) NULL, true, true, sym_hash)))
return false;
- *sym_hash = h;
+ h = (struct ecoff_link_hash_entry *) *sym_hash;
/* If we are building an ECOFF hash table, save the external
symbol information. */
diff --git a/bfd/elf.c b/bfd/elf.c
index c1e2d11..f184c9f 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -6803,8 +6803,8 @@ elfcore_grok_note (abfd, note)
#endif
case NT_PRXFPREG: /* Linux SSE extension */
- if (note->namesz == 5
- && ! strcmp (note->namedata, "LINUX"))
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
return elfcore_grok_prxfpreg (abfd, note);
else
return true;
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index ff5c5f4..fad1a1e 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -1,5 +1,6 @@
/* ARC-specific support for 32-bit ELF
- Copyright 1994, 1995, 1997, 1999, 2001 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1997, 1999, 2001, 2002
+ Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
@@ -39,7 +40,7 @@ static bfd_reloc_status_type arc_elf_b22_pcrel
/* Try to minimize the amount of space occupied by relocation tables
on the ROM (not that the ROM won't be swamped by other ELF overhead). */
-#define USE_REL
+#define USE_REL 1
static reloc_howto_type elf_arc_howto_table[] =
{
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index 2d59601..5901aea 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -17,6 +17,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+#ifndef USE_REL
+#define USE_REL 0
+#endif
+
typedef unsigned long int insn32;
typedef unsigned short int insn16;
@@ -76,7 +80,7 @@ static boolean elf32_arm_finish_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static struct bfd_hash_entry * elf32_arm_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-#ifdef USE_REL
+#if USE_REL
static void arm_add_to_rel
PARAMS ((bfd *, bfd_byte *, reloc_howto_type *, bfd_signed_vma));
#endif
@@ -427,6 +431,7 @@ record_arm_to_thumb_glue (link_info, h)
asection * s;
char * tmp_name;
struct elf_link_hash_entry * myh;
+ struct bfd_link_hash_entry * bh;
struct elf32_arm_link_hash_table * globals;
bfd_vma val;
@@ -460,11 +465,11 @@ record_arm_to_thumb_glue (link_info, h)
/* The only trick here is using hash_table->arm_glue_size as the value. Even
though the section isn't allocated yet, this is where we will be putting
it. */
+ bh = NULL;
val = globals->arm_glue_size + 1;
_bfd_generic_link_add_one_symbol (link_info, globals->bfd_of_glue_owner,
tmp_name, BSF_GLOBAL, s, val,
- NULL, true, false,
- (struct bfd_link_hash_entry **) &myh);
+ NULL, true, false, &bh);
free (tmp_name);
@@ -482,6 +487,7 @@ record_thumb_to_arm_glue (link_info, h)
asection *s;
char *tmp_name;
struct elf_link_hash_entry *myh;
+ struct bfd_link_hash_entry *bh;
struct elf32_arm_link_hash_table *hash_table;
char bind;
bfd_vma val;
@@ -513,13 +519,14 @@ record_thumb_to_arm_glue (link_info, h)
return;
}
+ bh = NULL;
val = hash_table->thumb_glue_size + 1;
_bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
tmp_name, BSF_GLOBAL, s, val,
- NULL, true, false,
- (struct bfd_link_hash_entry **) &myh);
+ NULL, true, false, &bh);
/* If we mark it 'Thumb', the disassembler will do a better job. */
+ myh = (struct elf_link_hash_entry *) bh;
bind = ELF_ST_BIND (myh->type);
myh->type = ELF_ST_INFO (bind, STT_ARM_TFUNC);
@@ -536,13 +543,11 @@ record_thumb_to_arm_glue (link_info, h)
sprintf (tmp_name, CHANGE_TO_ARM, name);
- myh = NULL;
-
+ bh = NULL;
val = hash_table->thumb_glue_size + 4,
_bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
tmp_name, BSF_LOCAL, s, val,
- NULL, true, false,
- (struct bfd_link_hash_entry **) &myh);
+ NULL, true, false, &bh);
free (tmp_name);
@@ -1093,7 +1098,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
local_got_offsets = elf_local_got_offsets (input_bfd);
r_symndx = ELF32_R_SYM (rel->r_info);
-#ifdef USE_REL
+#if USE_REL
addend = bfd_get_32 (input_bfd, hit_data) & howto->src_mask;
if (addend & ((howto->src_mask + 1) >> 1))
@@ -1369,7 +1374,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
case R_ARM_THM_ABS5:
/* Support ldr and str instructions for the thumb. */
-#ifdef USE_REL
+#if USE_REL
/* Need to refetch addend. */
addend = bfd_get_16 (input_bfd, hit_data) & howto->src_mask;
/* ??? Need to determine shift amount from operand size. */
@@ -1401,7 +1406,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
bfd_vma check;
bfd_signed_vma signed_check;
-#ifdef USE_REL
+#if USE_REL
/* Need to refetch the addend and squish the two 11 bit pieces
together. */
{
@@ -1506,7 +1511,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
bfd_signed_vma reloc_signed_min = ~ reloc_signed_max;
bfd_signed_vma signed_check;
-#ifdef USE_REL
+#if USE_REL
/* Need to refetch addend. */
addend = bfd_get_16 (input_bfd, hit_data) & howto->src_mask;
if (addend & ((howto->src_mask + 1) >> 1))
@@ -1744,7 +1749,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
}
}
-#ifdef USE_REL
+#if USE_REL
/* Add INCREMENT to the reloc (of type HOWTO) at ADDRESS. */
static void
arm_add_to_rel (abfd, address, howto, increment)
@@ -1836,7 +1841,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela * relend;
const char * name;
-#ifndef USE_REL
+#if !USE_REL
if (info->relocateable)
return true;
#endif
@@ -1865,7 +1870,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_ARM_GNU_VTINHERIT)
continue;
-#ifdef USE_REL
+#if USE_REL
elf32_arm_info_to_howto (input_bfd, & bfd_reloc,
(Elf_Internal_Rel *) rel);
#else
@@ -1873,7 +1878,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
#endif
howto = bfd_reloc.howto;
-#ifdef USE_REL
+#if USE_REL
if (info->relocateable)
{
/* This is a relocateable link. We don't have to change
@@ -1906,7 +1911,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
-#ifdef USE_REL
+#if USE_REL
relocation = (sec->output_section->vma
+ sec->output_offset
+ sym->st_value);
@@ -3648,9 +3653,7 @@ elf32_arm_reloc_type_class (rela)
#define ELF_ARCH bfd_arch_arm
#define ELF_MACHINE_CODE EM_ARM
-#ifndef ELF_MAXPAGESIZE
#define ELF_MAXPAGESIZE 0x8000
-#endif
#define bfd_elf32_bfd_copy_private_bfd_data elf32_arm_copy_private_bfd_data
#define bfd_elf32_bfd_merge_private_bfd_data elf32_arm_merge_private_bfd_data
@@ -3677,7 +3680,7 @@ elf32_arm_reloc_type_class (rela)
#define elf_backend_plt_readonly 1
#define elf_backend_want_got_plt 1
#define elf_backend_want_plt_sym 0
-#ifndef USE_REL
+#if !USE_REL
#define elf_backend_rela_normal 1
#endif
diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c
index 1dec0b0..fe31b92 100644
--- a/bfd/elf32-d10v.c
+++ b/bfd/elf32-d10v.c
@@ -43,7 +43,7 @@ static boolean elf32_d10v_relocate_section
asection **));
/* Use REL instead of RELA to save space. */
-#define USE_REL
+#define USE_REL 1
static reloc_howto_type elf_d10v_howto_table[] =
{
diff --git a/bfd/elf32-i386-fbsd.c b/bfd/elf32-i386-fbsd.c
deleted file mode 100644
index 500e0eb..0000000
--- a/bfd/elf32-i386-fbsd.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Intel IA-32 specific support for 32-bit ELF on FreeBSD.
- Copyright 2002 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define TARGET_LITTLE_SYM bfd_elf32_i386_freebsd_vec
-#define TARGET_LITTLE_NAME "elf32-i386-freebsd"
-#define ELF_ARCH bfd_arch_i386
-#define ELF_MACHINE_CODE EM_386
-#define ELF_MAXPAGESIZE 0x1000
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "elf-bfd.h"
-
-/* The kernel recognizes executables as valid only if they carry a
- "FreeBSD" label in the ELF header. So we put this label on all
- executables and (for simplicity) also all other object files. */
-
-static void elf_i386_post_process_headers
- PARAMS ((bfd *, struct bfd_link_info *));
-
-static void
-elf_i386_post_process_headers (abfd, link_info)
- bfd * abfd;
- struct bfd_link_info * link_info ATTRIBUTE_UNUSED;
-{
- Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */
-
- i_ehdrp = elf_elfheader (abfd);
-
- /* Put an ABI label supported by FreeBSD >= 4.1. */
- i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
-#ifdef OLD_FREEBSD_ABI_LABEL
- /* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard. */
- memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8);
-#endif
-}
-
-#define elf_backend_post_process_headers elf_i386_post_process_headers
-
-#include "elf32-i386.c"
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 87e1e76..e26ee79 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -2617,36 +2617,40 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_ASSERT (rel->r_offset >= 1);
val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
BFD_ASSERT (rel->r_offset + 4 <= input_section->_raw_size);
- if (val != 0xa1)
- {
- BFD_ASSERT (rel->r_offset >= 2);
- type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
- }
if (val == 0xa1)
{
/* movl foo, %eax. */
bfd_put_8 (output_bfd, 0xb8, contents + rel->r_offset - 1);
}
- else if (type == 0x8b)
- {
- /* movl */
- BFD_ASSERT ((val & 0xc7) == 0x05);
- bfd_put_8 (output_bfd, 0xc7,
- contents + rel->r_offset - 2);
- bfd_put_8 (output_bfd, 0xc0 | ((val >> 3) & 7),
- contents + rel->r_offset - 1);
- }
- else if (type == 0x03)
+ else
{
- /* addl */
- BFD_ASSERT ((val & 0xc7) == 0x05);
- bfd_put_8 (output_bfd, 0x81,
- contents + rel->r_offset - 2);
- bfd_put_8 (output_bfd, 0xc0 | ((val >> 3) & 7),
- contents + rel->r_offset - 1);
+ BFD_ASSERT (rel->r_offset >= 2);
+ type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
+ switch (type)
+ {
+ case 0x8b:
+ /* movl */
+ BFD_ASSERT ((val & 0xc7) == 0x05);
+ bfd_put_8 (output_bfd, 0xc7,
+ contents + rel->r_offset - 2);
+ bfd_put_8 (output_bfd,
+ 0xc0 | ((val >> 3) & 7),
+ contents + rel->r_offset - 1);
+ break;
+ case 0x03:
+ /* addl */
+ BFD_ASSERT ((val & 0xc7) == 0x05);
+ bfd_put_8 (output_bfd, 0x81,
+ contents + rel->r_offset - 2);
+ bfd_put_8 (output_bfd,
+ 0xc0 | ((val >> 3) & 7),
+ contents + rel->r_offset - 1);
+ break;
+ default:
+ BFD_FAIL ();
+ break;
+ }
}
- else
- BFD_FAIL ();
bfd_put_32 (output_bfd, -tpoff (info, relocation),
contents + rel->r_offset);
continue;
@@ -3344,13 +3348,11 @@ elf_i386_finish_dynamic_sections (output_bfd, info)
return true;
}
-#ifndef ELF_ARCH
#define TARGET_LITTLE_SYM bfd_elf32_i386_vec
#define TARGET_LITTLE_NAME "elf32-i386"
#define ELF_ARCH bfd_arch_i386
#define ELF_MACHINE_CODE EM_386
#define ELF_MAXPAGESIZE 0x1000
-#endif /* ELF_ARCH */
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1
@@ -3385,6 +3387,62 @@ elf_i386_finish_dynamic_sections (output_bfd, info)
#define elf_backend_relocate_section elf_i386_relocate_section
#define elf_backend_size_dynamic_sections elf_i386_size_dynamic_sections
-#ifndef ELF32_I386_C_INCLUDED
#include "elf32-target.h"
+
+/* FreeBSD support. */
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_i386_freebsd_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-i386-freebsd"
+
+/* The kernel recognizes executables as valid only if they carry a
+ "FreeBSD" label in the ELF header. So we put this label on all
+ executables and (for simplicity) also all other object files. */
+
+static void elf_i386_post_process_headers
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+static void
+elf_i386_post_process_headers (abfd, link_info)
+ bfd *abfd;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+{
+ Elf_Internal_Ehdr *i_ehdrp;
+
+ i_ehdrp = elf_elfheader (abfd);
+
+ /* Put an ABI label supported by FreeBSD >= 4.1. */
+ i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
+#ifdef OLD_FREEBSD_ABI_LABEL
+ /* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard. */
+ memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8);
#endif
+}
+
+#undef elf_backend_post_process_headers
+#define elf_backend_post_process_headers elf_i386_post_process_headers
+
+#define elf32_bed elf32_i386_fbsd_bed
+
+#include "elf32-target.h"
+
+#undef elf_backend_post_process_headers
+#undef elf32_bed
+
+/* QNX support. */
+#include "elf32-qnx.h"
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_i386qnx_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-i386-nto"
+
+#define elf32_bed elf32_i386_qnx_bed
+
+#include "elf32-target.h"
+
+#undef elf_backend_set_nonloadable_filepos
+#undef elf_backend_is_contained_by_filepos
+#undef elf_backend_copy_private_bfd_data_p
+#undef elf32_bed
diff --git a/bfd/elf32-i386qnx.c b/bfd/elf32-i386qnx.c
deleted file mode 100644
index 523eecb..0000000
--- a/bfd/elf32-i386qnx.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Intel 80386/80486 QNX specific support for 32-bit ELF
- Copyright 2002
- Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define ELF32_I386_C_INCLUDED
-#include "elf32-i386.c"
-
-#include "elf32-qnx.h"
-
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM bfd_elf32_i386qnx_vec
-
-#include "elf32-target.h"
-
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index 0194646..67da85c 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -1671,6 +1671,7 @@ ip2k_elf_gc_sweep_hook (abfd, info, sec, relocs)
#define ELF_ARCH bfd_arch_ip2k
#define ELF_MACHINE_CODE EM_IP2K
+#define ELF_MACHINE_ALT1 EM_IP2K_OLD
#define ELF_MAXPAGESIZE 1 /* No pages on the IP2K */
#define elf_info_to_howto_rel NULL
@@ -1689,4 +1690,3 @@ ip2k_elf_gc_sweep_hook (abfd, info, sec, relocs)
#include "elf32-target.h"
-
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index a2e9e0b..7a7d500 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -88,7 +88,11 @@ asection * m32r_elf_gc_mark_hook
This only saves space in libraries and object files, but perhaps
relocs will be put in ROM? All in all though, REL relocs are a pain
to work with. */
-#define USE_REL
+#define USE_REL 1
+
+#ifndef USE_REL
+#define USE_REL 0
+#endif
static reloc_howto_type m32r_elf_howto_table[] =
{
@@ -847,6 +851,7 @@ m32r_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
section already exists a new one is created that follows it which
screws of _SDA_BASE_ address calcs because output_offset != 0. */
struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
asection *s = bfd_get_section_by_name (abfd, ".sdata");
/* The following code was cobbled from elf32-ppc.c and elflink.c. */
@@ -863,10 +868,10 @@ m32r_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
bfd_set_section_alignment (abfd, s, 2);
}
- h = (struct elf_link_hash_entry *)
- bfd_link_hash_lookup (info->hash, "_SDA_BASE_", false, false, false);
+ bh = bfd_link_hash_lookup (info->hash, "_SDA_BASE_",
+ false, false, false);
- if ((h == NULL || h->root.type == bfd_link_hash_undefined)
+ if ((bh == NULL || bh->type == bfd_link_hash_undefined)
&& !(_bfd_generic_link_add_one_symbol (info,
abfd,
"_SDA_BASE_",
@@ -876,8 +881,9 @@ m32r_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
(const char *) NULL,
false,
get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ &bh)))
return false;
+ h = (struct elf_link_hash_entry *) bh;
h->type = STT_OBJECT;
}
@@ -980,7 +986,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* Assume success. */
boolean ret = true;
-#ifndef USE_REL
+#if !USE_REL
if (info->relocateable)
return true;
#endif
@@ -1024,7 +1030,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
howto = m32r_elf_howto_table + r_type;
r_symndx = ELF32_R_SYM (rel->r_info);
-#ifdef USE_REL
+#if USE_REL
if (info->relocateable)
{
/* This is a relocateable link. We don't have to change
@@ -1100,7 +1106,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
sym_name = "<local symbol>";
-#ifndef USE_REL
+#if !USE_REL
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
addend = rel->r_addend;
#else
@@ -1505,7 +1511,7 @@ m32r_elf_relax_section (abfd, sec, link_info, again)
will be at least 4 bytes closer if we can relax. It'll actually
be 4 or 8 bytes closer, but we don't know which just yet and
the difference isn't significant enough to worry about. */
-#ifndef USE_REL /* put in for learning purposes */
+#if !USE_REL /* put in for learning purposes */
pcrel_value += irel->r_addend;
#else
addend = bfd_get_signed_16 (abfd, contents + irel->r_offset + 2);
@@ -1534,7 +1540,7 @@ m32r_elf_relax_section (abfd, sec, link_info, again)
We OR in CODE just in case it's not a nop (technically,
CODE currently must be a nop, but for cleanness we
allow it to be anything). */
-#ifndef USE_REL /* put in for learning purposes */
+#if !USE_REL /* put in for learning purposes */
code = 0x7e000000 | MAKE_PARALLEL (code);
#else
code = (0x7e000000 + (((addend >> 2) & 0xff) << 16)) | MAKE_PARALLEL (code);
@@ -1544,7 +1550,7 @@ m32r_elf_relax_section (abfd, sec, link_info, again)
else
{
/* Change the seth rN,foo to a bl24 foo. */
-#ifndef USE_REL /* put in for learning purposes */
+#if !USE_REL /* put in for learning purposes */
code = 0xfe000000;
#else
code = 0xfe000000 + ((addend >> 2) & 0xffffff);
@@ -2105,7 +2111,7 @@ m32r_elf_check_relocs (abfd, info, sec, relocs)
#define elf_backend_check_relocs m32r_elf_check_relocs
#define elf_backend_can_gc_sections 1
-#ifndef USE_REL
+#if !USE_REL
#define elf_backend_rela_normal 1
#endif
#if 0 /* not yet */
diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c
index f189be8..9f05a9e 100644
--- a/bfd/elf32-m68hc11.c
+++ b/bfd/elf32-m68hc11.c
@@ -62,7 +62,7 @@ boolean _bfd_m68hc11_elf_set_private_flags PARAMS ((bfd *, flagword));
boolean _bfd_m68hc11_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
/* Use REL instead of RELA to save space */
-#define USE_REL
+#define USE_REL 1
/* The Motorola 68HC11 microcontroler only addresses 64Kb.
We must handle 8 and 16-bit relocations. The 32-bit relocation
@@ -646,12 +646,11 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
Elf_Internal_Rela *irel, *irelend;
bfd_byte *contents = NULL;
bfd_byte *free_contents = NULL;
- Elf32_External_Sym *extsyms = NULL;
Elf32_External_Sym *free_extsyms = NULL;
Elf_Internal_Rela *prev_insn_branch = NULL;
Elf_Internal_Rela *prev_insn_group = NULL;
unsigned insn_group_value = 0;
- Elf_External_Sym_Shndx *shndx_buf = NULL;
+ Elf_Internal_Sym *isymbuf = NULL;
/* Assume nothing changes. */
*again = false;
@@ -693,7 +692,8 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
{
bfd_vma symval;
bfd_vma value;
- Elf_Internal_Sym isym;
+ Elf_Internal_Sym *isym;
+ asection *sym_sec;
/* If this isn't something that can be relaxed, then ignore
this reloc. */
@@ -777,53 +777,24 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
}
/* Read this BFD's symbols if we haven't done so already. */
- if (extsyms == NULL)
+ if (isymbuf == NULL && symtab_hdr->sh_info != 0)
{
- /* Get cached copy if it exists. */
- if (symtab_hdr->contents != NULL)
- extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
- else
- {
- /* Go get them off disk. */
- bfd_size_type amt = symtab_hdr->sh_size;
- extsyms = (Elf32_External_Sym *) bfd_malloc (amt);
- if (extsyms == NULL)
- goto error_return;
- free_extsyms = extsyms;
- if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
- || bfd_bread ((PTR) extsyms, amt, abfd) != amt)
- goto error_return;
- }
-
- if (shndx_hdr->sh_size != 0)
- {
- bfd_size_type amt;
-
- amt = symtab_hdr->sh_info * sizeof (Elf_External_Sym_Shndx);
- shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
- if (shndx_buf == NULL)
- goto error_return;
- if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
- || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
- goto error_return;
- shndx_hdr->contents = (PTR) shndx_buf;
- }
+ isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (isymbuf == NULL)
+ isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+ symtab_hdr->sh_info, 0,
+ NULL, NULL, NULL);
+ if (isymbuf == NULL)
+ goto error_return;
}
/* Get the value of the symbol referred to by the reloc. */
if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
{
- Elf32_External_Sym *esym;
- Elf_External_Sym_Shndx *shndx;
- asection *sym_sec;
-
/* A local symbol. */
- esym = extsyms + ELF32_R_SYM (irel->r_info);
- shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
- sym_sec = bfd_section_from_elf_index (abfd, isym.st_shndx);
- symval = (isym.st_value
+ isym = isymbuf + ELF32_R_SYM (irel->r_info);
+ sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+ symval = (isym->st_value
+ sym_sec->output_section->vma
+ sym_sec->output_offset);
}
@@ -847,9 +818,11 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
continue;
}
+ isym = 0;
+ sym_sec = h->root.u.def.section;
symval = (h->root.u.def.value
- + h->root.u.def.section->output_section->vma
- + h->root.u.def.section->output_offset);
+ + sym_sec->output_section->vma
+ + sym_sec->output_offset);
}
if (ELF32_R_TYPE (irel->r_info) == (int) R_M68HC11_RL_GROUP)
@@ -862,10 +835,36 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
continue;
prev_insn_group = irel;
- insn_group_value = isym.st_value;
+ insn_group_value = isym->st_value;
continue;
}
+ /* When we relax some bytes, the size of our section changes.
+ This affects the layout of next input sections that go in our
+ output section. When the symbol is part of another section that
+ will go in the same output section as the current one, it's
+ final address may now be incorrect (too far). We must let the
+ linker re-compute all section offsets before processing this
+ reloc. Code example:
+
+ Initial Final
+ .sect .text section size = 6 section size = 4
+ jmp foo
+ jmp bar
+ .sect .text.foo_bar output_offset = 6 output_offset = 4
+ foo: rts
+ bar: rts
+
+ If we process the reloc now, the jmp bar is replaced by a
+ relative branch to the initial bar address (output_offset 6). */
+ if (*again && sym_sec != sec
+ && sym_sec->output_section == sec->output_section)
+ {
+ prev_insn_group = 0;
+ prev_insn_branch = 0;
+ continue;
+ }
+
value = symval;
/* Try to turn a far branch to a near branch. */
if (ELF32_R_TYPE (irel->r_info) == (int) R_M68HC11_16
@@ -911,6 +910,7 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
irel->r_offset - 1, 3);
}
prev_insn_branch = 0;
+ *again = true;
}
/* Try to turn a 16 bit address into a 8 bit page0 address. */
@@ -932,6 +932,8 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
if (prev_insn_group)
{
+ unsigned long old_sec_size = sec->_cooked_size;
+
/* Note that we've changed the reldection contents, etc. */
elf_section_data (sec)->relocs = internal_relocs;
free_relocs = NULL;
@@ -939,7 +941,7 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
elf_section_data (sec)->this_hdr.contents = contents;
free_contents = NULL;
- symtab_hdr->contents = (bfd_byte *) extsyms;
+ symtab_hdr->contents = (bfd_byte *) isymbuf;
free_extsyms = NULL;
m68hc11_relax_group (abfd, sec, contents, offset,
@@ -949,6 +951,8 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
prev_insn_group = 0;
irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
R_M68HC11_NONE);
+ if (sec->_cooked_size != old_sec_size)
+ *again = true;
continue;
}
@@ -968,7 +972,7 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
elf_section_data (sec)->this_hdr.contents = contents;
free_contents = NULL;
- symtab_hdr->contents = (bfd_byte *) extsyms;
+ symtab_hdr->contents = (bfd_byte *) isymbuf;
free_extsyms = NULL;
/* Fix the opcode. */
@@ -984,8 +988,7 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
R_M68HC11_8);
- /* That will change things, so, we should relax again.
- Note that this is not required, and it may be slow. */
+ /* That will change things, so, we should relax again. */
*again = true;
}
else if (ELF32_R_TYPE (irel->r_info) == R_M68HC11_16)
@@ -1014,7 +1017,7 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
elf_section_data (sec)->this_hdr.contents = contents;
free_contents = NULL;
- symtab_hdr->contents = (bfd_byte *) extsyms;
+ symtab_hdr->contents = (bfd_byte *) isymbuf;
free_extsyms = NULL;
/* Shrink the branch. */
@@ -1027,6 +1030,8 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
R_M68HC11_NONE);
m68hc11_elf_relax_delete_bytes (abfd, sec,
irel->r_offset + 1, 1);
+ /* That will change things, so, we should relax again. */
+ *again = true;
}
}
}
@@ -1058,7 +1063,7 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
else
{
/* Cache the symbols for elf_link_input_bfd. */
- symtab_hdr->contents = (unsigned char *) extsyms;
+ symtab_hdr->contents = (unsigned char *) isymbuf;
}
free_extsyms = NULL;
}
@@ -1085,20 +1090,17 @@ m68hc11_elf_relax_delete_bytes (abfd, sec, addr, count)
int count;
{
Elf_Internal_Shdr *symtab_hdr;
- Elf_Internal_Shdr *shndx_hdr;
- Elf32_External_Sym *extsyms;
unsigned int sec_shndx;
- Elf_External_Sym_Shndx *shndx;
bfd_byte *contents;
Elf_Internal_Rela *irel, *irelend;
bfd_vma toaddr;
- Elf32_External_Sym *esym, *esymend;
+ Elf_Internal_Sym *isymbuf, *isym, *isymend;
struct elf_link_hash_entry **sym_hashes;
struct elf_link_hash_entry **end_hashes;
unsigned int symcount;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
+ isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
@@ -1112,8 +1114,9 @@ m68hc11_elf_relax_delete_bytes (abfd, sec, addr, count)
/* Actually delete the bytes. */
memmove (contents + addr, contents + addr + count,
(size_t) (toaddr - addr - count));
- sec->_cooked_size -= count;
+ sec->_cooked_size -= count;
+
/* Adjust all the relocs. */
for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
{
@@ -1212,24 +1215,13 @@ m68hc11_elf_relax_delete_bytes (abfd, sec, addr, count)
}
/* Adjust the local symbols defined in this section. */
- shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
- shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
- esym = extsyms;
- esymend = esym + symtab_hdr->sh_info;
- for (; esym < esymend; esym++, shndx = (shndx ? shndx + 1 : NULL))
+ isymend = isymbuf + symtab_hdr->sh_info;
+ for (isym = isymbuf; isym < isymend; isym++)
{
- Elf_Internal_Sym isym;
- Elf_External_Sym_Shndx dummy;
-
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
- if (isym.st_shndx == sec_shndx
- && isym.st_value > addr
- && isym.st_value < toaddr)
- {
- isym.st_value -= count;
- bfd_elf32_swap_symbol_out (abfd, &isym, esym, &dummy);
- }
+ if (isym->st_shndx == sec_shndx
+ && isym->st_value > addr
+ && isym->st_value < toaddr)
+ isym->st_value -= count;
}
/* Now adjust the global symbols defined in this section. */
diff --git a/bfd/elf32-m68hc12.c b/bfd/elf32-m68hc12.c
index 9ab8780..ea12e3b 100644
--- a/bfd/elf32-m68hc12.c
+++ b/bfd/elf32-m68hc12.c
@@ -54,7 +54,7 @@ boolean _bfd_m68hc12_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
/* Use REL instead of RELA to save space */
-#define USE_REL
+#define USE_REL 1
/* The Motorola 68HC11 microcontroler only addresses 64Kb.
We must handle 8 and 16-bit relocations. The 32-bit relocation
diff --git a/bfd/elf32-or32.c b/bfd/elf32-or32.c
index a61b09d..39219e9 100644
--- a/bfd/elf32-or32.c
+++ b/bfd/elf32-or32.c
@@ -38,7 +38,7 @@ static bfd_reloc_status_type or32_elf_jumptarg_reloc PARAMS ((bfd *, a
/* Try to minimize the amount of space occupied by relocation tables
on the ROM (not that the ROM won't be swamped by other ELF overhead). */
-#define USE_REL
+#define USE_REL 1
static reloc_howto_type elf_or32_howto_table[] =
{
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 6faffd20..56df535 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -3849,7 +3849,25 @@ ppc_elf_grok_psinfo (abfd, note)
#define elf_backend_grok_psinfo ppc_elf_grok_psinfo
#define elf_backend_reloc_type_class ppc_elf_reloc_type_class
-#ifndef ELF32_PPC_C_INCLUDED
#include "elf32-target.h"
-#endif
+/* QNX support. */
+#include "elf32-qnx.h"
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_powerpcleqnx_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-powerpcle-nto"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_powerpcqnx_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-powerpc-nto"
+
+#define elf32_bed elf32_ppc_qnx_bed
+
+#include "elf32-target.h"
+
+#undef elf_backend_set_nonloadable_filepos
+#undef elf_backend_is_contained_by_filepos
+#undef elf_backend_copy_private_bfd_data_p
+#undef elf32_bed
diff --git a/bfd/elf32-ppcqnx.c b/bfd/elf32-ppcqnx.c
deleted file mode 100644
index 35fbe37..0000000
--- a/bfd/elf32-ppcqnx.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* PowerPC QNX specific support for 32-bit ELF
- Copyright 2002
- Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define ELF32_PPC_C_INCLUDED
-#include "elf32-ppc.c"
-
-#include "elf32-qnx.h"
-
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM bfd_elf32_powerpcleqnx_vec
-#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM bfd_elf32_powerpcqnx_vec
-
-#include "elf32-target.h"
-
diff --git a/bfd/elf32-qnx.c b/bfd/elf32-qnx.c
new file mode 100644
index 0000000..b397c38
--- /dev/null
+++ b/bfd/elf32-qnx.c
@@ -0,0 +1,92 @@
+/* QNX specific support for 32-bit ELF
+ Copyright 2002 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "elf-bfd.h"
+#include "elf32-qnx.h"
+
+/* Returns the end address of the segment + 1. */
+#define SEGMENT_END(segment, start) \
+ (start + (segment->p_memsz > segment->p_filesz \
+ ? segment->p_memsz : segment->p_filesz))
+
+boolean
+elf_qnx_copy_private_bfd_data_p (ibfd, isec, obfd, osec)
+ bfd *ibfd ATTRIBUTE_UNUSED;
+ asection *isec;
+ bfd *obfd ATTRIBUTE_UNUSED;
+ asection *osec ATTRIBUTE_UNUSED;
+{
+ return isec->next == NULL;
+}
+
+boolean
+elf_qnx_is_contained_by_filepos (section, segment)
+ asection *section;
+ Elf_Internal_Phdr *segment;
+{
+ return ((bfd_vma) section->filepos >= segment->p_offset
+ && ((bfd_vma) section->filepos + section->_raw_size
+ <= SEGMENT_END (segment, segment->p_offset)));
+}
+
+void
+elf_qnx_set_nonloadable_filepos (abfd, phdrs)
+ bfd *abfd;
+ Elf_Internal_Phdr *phdrs;
+{
+ struct elf_segment_map *m;
+ Elf_Internal_Phdr *p;
+ file_ptr off = 0;
+
+ for (m = elf_tdata (abfd)->segment_map, p = phdrs;
+ m != NULL;
+ m = m->next, p++)
+ {
+ unsigned int i;
+ asection **secpp;
+
+ for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
+ {
+ asection *sec;
+
+ sec = *secpp;
+
+ if (p->p_type == PT_LOAD)
+ off = sec->filepos;
+ else
+ {
+ if (i == 0)
+ {
+ if (sec->filepos)
+ p->p_offset = sec->filepos;
+ else
+ p->p_offset = off;
+ }
+ if (!sec->filepos)
+ {
+ off += sec->_raw_size;
+ p->p_filesz += sec->_raw_size;
+ }
+ }
+ }
+ }
+ return;
+}
diff --git a/bfd/elf32-qnx.h b/bfd/elf32-qnx.h
index d4eefb8..0e79d7e 100644
--- a/bfd/elf32-qnx.h
+++ b/bfd/elf32-qnx.h
@@ -14,98 +14,19 @@
GNU General Public License for more details.
You 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. */
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- /* Returns the end address of the segment + 1. */
-#define SEGMENT_END(segment, start) \
- (start + (segment->p_memsz > segment->p_filesz \
- ? segment->p_memsz : segment->p_filesz))
-
-static boolean elf_qnx_copy_private_bfd_data_p
+boolean elf_qnx_copy_private_bfd_data_p
PARAMS ((bfd *, asection *, bfd *, asection *));
-static boolean elf_qnx_is_contained_by_filepos
+boolean elf_qnx_is_contained_by_filepos
PARAMS ((asection *, Elf_Internal_Phdr *));
-static void elf_qnx_set_nonloadable_filepos
+void elf_qnx_set_nonloadable_filepos
PARAMS ((bfd *, Elf_Internal_Phdr *));
-static boolean
-elf_qnx_copy_private_bfd_data_p (ibfd, isec, obfd, osec)
- bfd *ibfd;
- asection *isec;
- bfd *obfd;
- asection *osec;
-{
- /* We don't use these parameters, but another target might. */
- ibfd = ibfd;
- obfd = obfd;
- osec = osec;
-
- return isec->next == NULL;
-}
-
-static boolean
-elf_qnx_is_contained_by_filepos (section, segment)
- asection *section;
- Elf_Internal_Phdr *segment;
-{
- return ((bfd_vma) section->filepos >= segment->p_offset
- && ((bfd_vma) section->filepos + section->_raw_size
- <= SEGMENT_END (segment, segment->p_offset)));
-}
-
-static void
-elf_qnx_set_nonloadable_filepos (abfd, phdrs)
- bfd *abfd;
- Elf_Internal_Phdr *phdrs;
-{
- struct elf_segment_map *m;
- Elf_Internal_Phdr *p;
- file_ptr off = 0;
-
- for (m = elf_tdata (abfd)->segment_map, p = phdrs;
- m != NULL;
- m = m->next, p++)
- {
- unsigned int i;
- asection **secpp;
-
- for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
- {
- asection *sec;
-
- sec = *secpp;
-
- if (p->p_type == PT_LOAD)
- off = sec->filepos;
- else
- {
- if (i == 0)
- {
- if (sec->filepos)
- p->p_offset = sec->filepos;
- else
- p->p_offset = off;
- }
- if (!sec->filepos)
- {
- off += sec->_raw_size;
- p->p_filesz += sec->_raw_size;
- }
- }
- }
- }
- return;
-}
-
-#ifndef elf_backend_set_nonloadable_filepos
-#define elf_backend_set_nonloadable_filepos elf_qnx_set_nonloadable_filepos
-#endif
-
-#ifndef elf_backend_is_contained_by_filepos
-#define elf_backend_is_contained_by_filepos elf_qnx_is_contained_by_filepos
-#endif
-
-#ifndef elf_backend_copy_private_bfd_data_p
-#define elf_backend_copy_private_bfd_data_p elf_qnx_copy_private_bfd_data_p
-#endif
+#undef elf_backend_set_nonloadable_filepos
+#define elf_backend_set_nonloadable_filepos elf_qnx_set_nonloadable_filepos
+#undef elf_backend_is_contained_by_filepos
+#define elf_backend_is_contained_by_filepos elf_qnx_is_contained_by_filepos
+#undef elf_backend_copy_private_bfd_data_p
+#define elf_backend_copy_private_bfd_data_p elf_qnx_copy_private_bfd_data_p
diff --git a/bfd/elf32-sh-lin.c b/bfd/elf32-sh-lin.c
deleted file mode 100644
index e0b434d..0000000
--- a/bfd/elf32-sh-lin.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Hitachi SH specific support for 32-bit Linux
- Copyright 2000, 2001 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define TARGET_BIG_SYM bfd_elf32_shblin_vec
-#define TARGET_BIG_NAME "elf32-shbig-linux"
-#define TARGET_LITTLE_SYM bfd_elf32_shlin_vec
-#define TARGET_LITTLE_NAME "elf32-sh-linux"
-#define ELF_ARCH bfd_arch_sh
-#define ELF_MACHINE_CODE EM_SH
-#define ELF_MAXPAGESIZE 0x10000
-#define elf_symbol_leading_char 0
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "elf/internal.h"
-#include "elf-bfd.h"
-
-static boolean elf32_shlin_grok_prstatus
- PARAMS ((bfd *abfd, Elf_Internal_Note *note));
-static boolean elf32_shlin_grok_psinfo
- PARAMS ((bfd *abfd, Elf_Internal_Note *note));
-
-/* Support for core dump NOTE sections */
-static boolean
-elf32_shlin_grok_prstatus (abfd, note)
- bfd *abfd;
- Elf_Internal_Note *note;
-{
- int offset;
- unsigned int raw_size;
-
- switch (note->descsz)
- {
- default:
- return false;
-
- case 168: /* Linux/SH */
- /* pr_cursig */
- elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
-
- /* pr_pid */
- elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
-
- /* pr_reg */
- offset = 72;
- raw_size = 92;
-
- break;
- }
-
- /* Make a ".reg/999" section. */
- return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
-}
-
-static boolean
-elf32_shlin_grok_psinfo (abfd, note)
- bfd *abfd;
- Elf_Internal_Note *note;
-{
- switch (note->descsz)
- {
- default:
- return false;
-
- case 124: /* Linux/SH elf_prpsinfo */
- elf_tdata (abfd)->core_program
- = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
- elf_tdata (abfd)->core_command
- = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
- }
-
- /* Note that for some reason, a spurious space is tacked
- onto the end of the args in some (at least one anyway)
- implementations, so strip it off if it exists. */
-
- {
- char *command = elf_tdata (abfd)->core_command;
- int n = strlen (command);
-
- if (0 < n && command[n - 1] == ' ')
- command[n - 1] = '\0';
- }
-
- return true;
-}
-
-
-#define elf_backend_grok_prstatus elf32_shlin_grok_prstatus
-#define elf_backend_grok_psinfo elf32_shlin_grok_psinfo
-
-
-
-#include "elf32-sh.c"
diff --git a/bfd/elf32-sh-nbsd.c b/bfd/elf32-sh-nbsd.c
deleted file mode 100644
index 692b057..0000000
--- a/bfd/elf32-sh-nbsd.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Hitachi SH specific support for 32-bit NetBSD
- Copyright 2002 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define TARGET_BIG_SYM bfd_elf32_shnbsd_vec
-#define TARGET_BIG_NAME "elf32-sh-nbsd"
-#define TARGET_LITTLE_SYM bfd_elf32_shlnbsd_vec
-#define TARGET_LITTLE_NAME "elf32-shl-nbsd"
-#define ELF_ARCH bfd_arch_sh
-#define ELF_MACHINE_CODE EM_SH
-#define ELF_MAXPAGESIZE 0x10000
-#define elf_symbol_leading_char 0
-
-#include "elf32-sh.c"
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 703ac40..0f681a8 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -59,6 +59,12 @@ static bfd_byte *sh_elf_get_relocated_section_contents
static void sh_elf_copy_indirect_symbol
PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
+static int sh_elf_optimized_tls_reloc
+ PARAMS ((struct bfd_link_info *, int, int));
+static boolean sh_elf_mkobject
+ PARAMS((bfd *));
+static boolean sh_elf_object_p
+ PARAMS((bfd *));
static boolean sh_elf_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
@@ -82,6 +88,8 @@ static boolean create_got_section
PARAMS((bfd *, struct bfd_link_info *));
static boolean sh_elf_create_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
+static bfd_vma dtpoff_base
+ PARAMS ((struct bfd_link_info *));
static asection * sh_elf_gc_mark_hook
PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
struct elf_link_hash_entry *, Elf_Internal_Sym *));
@@ -97,6 +105,10 @@ static enum elf_reloc_type_class sh_elf_reloc_type_class
#ifdef INCLUDE_SHMEDIA
inline static void movi_shori_putval PARAMS ((bfd *, unsigned long, char *));
#endif
+static boolean elf32_shlin_grok_prstatus
+ PARAMS ((bfd *abfd, Elf_Internal_Note *note));
+static boolean elf32_shlin_grok_psinfo
+ PARAMS ((bfd *abfd, Elf_Internal_Note *note));
/* The name of the dynamic interpreter. This is put in the .interp
section. */
@@ -713,14 +725,119 @@ static reloc_howto_type sh_elf_howto_table[] =
EMPTY_HOWTO (141),
EMPTY_HOWTO (142),
EMPTY_HOWTO (143),
- EMPTY_HOWTO (144),
- EMPTY_HOWTO (145),
- EMPTY_HOWTO (146),
- EMPTY_HOWTO (147),
- EMPTY_HOWTO (148),
- EMPTY_HOWTO (149),
- EMPTY_HOWTO (150),
- EMPTY_HOWTO (151),
+
+ HOWTO (R_SH_TLS_GD_32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_TLS_GD_32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_LD_32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_TLS_LD_32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_LDO_32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_TLS_LDO_32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_IE_32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_TLS_IE_32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_LE_32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_TLS_LE_32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_DTPMOD32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_TLS_DTPMOD32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_DTPOFF32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_TLS_DTPOFF32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_TPOFF32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_TLS_TPOFF32", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
EMPTY_HOWTO (152),
EMPTY_HOWTO (153),
EMPTY_HOWTO (154),
@@ -1776,6 +1893,14 @@ static const struct elf_reloc_map sh_reloc_map[] =
{ BFD_RELOC_VTABLE_ENTRY, R_SH_GNU_VTENTRY },
{ BFD_RELOC_SH_LOOP_START, R_SH_LOOP_START },
{ BFD_RELOC_SH_LOOP_END, R_SH_LOOP_END },
+ { BFD_RELOC_SH_TLS_GD_32, R_SH_TLS_GD_32 },
+ { BFD_RELOC_SH_TLS_LD_32, R_SH_TLS_LD_32 },
+ { BFD_RELOC_SH_TLS_LDO_32, R_SH_TLS_LDO_32 },
+ { BFD_RELOC_SH_TLS_IE_32, R_SH_TLS_IE_32 },
+ { BFD_RELOC_SH_TLS_LE_32, R_SH_TLS_LE_32 },
+ { BFD_RELOC_SH_TLS_DTPMOD32, R_SH_TLS_DTPMOD32 },
+ { BFD_RELOC_SH_TLS_DTPOFF32, R_SH_TLS_DTPOFF32 },
+ { BFD_RELOC_SH_TLS_TPOFF32, R_SH_TLS_TPOFF32 },
{ BFD_RELOC_32_GOT_PCREL, R_SH_GOT32 },
{ BFD_RELOC_32_PLT_PCREL, R_SH_PLT32 },
{ BFD_RELOC_SH_COPY, R_SH_COPY },
@@ -1874,6 +1999,7 @@ sh_elf_info_to_howto (abfd, cache_ptr, dst)
BFD_ASSERT (r < R_SH_FIRST_INVALID_RELOC_2 || r > R_SH_LAST_INVALID_RELOC_2);
BFD_ASSERT (r < R_SH_FIRST_INVALID_RELOC_3 || r > R_SH_LAST_INVALID_RELOC_3);
BFD_ASSERT (r < R_SH_FIRST_INVALID_RELOC_4 || r > R_SH_LAST_INVALID_RELOC_4);
+ BFD_ASSERT (r < R_SH_FIRST_INVALID_RELOC_5 || r > R_SH_LAST_INVALID_RELOC_5);
cache_ptr->howto = &sh_elf_howto_table[r];
}
@@ -3047,7 +3173,7 @@ static const bfd_byte elf_sh_pic_plt_entry_be[PLT_ENTRY_SIZE] =
0x6f, 0xf0, 0xff, 0xf0, /* nop */
0x6f, 0xf0, 0xff, 0xf0, /* nop */
0xce, 0x00, 0x01, 0x10, /* movi -GOT_BIAS, r17 */
- 0x00, 0xca, 0x45, 0x10, /* sub.l r12, r17, r17 */
+ 0x00, 0xc8, 0x45, 0x10, /* add.l r12, r17, r17 */
0x89, 0x10, 0x09, 0x90, /* ld.l r17, 8, r25 */
0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
0x89, 0x10, 0x05, 0x10, /* ld.l r17, 4, r17 */
@@ -3067,7 +3193,7 @@ static const bfd_byte elf_sh_pic_plt_entry_le[PLT_ENTRY_SIZE] =
0xf0, 0xff, 0xf0, 0x6f, /* nop */
0xf0, 0xff, 0xf0, 0x6f, /* nop */
0x10, 0x01, 0x00, 0xce, /* movi -GOT_BIAS, r17 */
- 0x10, 0x45, 0xca, 0x00, /* sub.l r12, r17, r17 */
+ 0x10, 0x45, 0xc8, 0x00, /* add.l r12, r17, r17 */
0x90, 0x09, 0x10, 0x89, /* ld.l r17, 8, r25 */
0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
0x10, 0x05, 0x10, 0x89, /* ld.l r17, 4, r17 */
@@ -3383,15 +3509,56 @@ struct elf_sh_link_hash_entry
struct elf_link_hash_entry root;
#ifdef INCLUDE_SHMEDIA
- bfd_vma datalabel_got_offset;
+ union
+ {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } datalabel_got;
#endif
/* Track dynamic relocs copied for this symbol. */
struct elf_sh_dyn_relocs *dyn_relocs;
bfd_signed_vma gotplt_refcount;
+
+ enum {
+ GOT_UNKNOWN = 0, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE
+ } tls_type;
+
+ /* If true, R_SH_TLS_TPOFF32 relocation is generated. */
+ boolean tls_tpoff32;
};
+#define sh_elf_hash_entry(ent) ((struct elf_sh_link_hash_entry *)(ent))
+
+struct sh_elf_obj_tdata
+{
+ struct elf_obj_tdata root;
+
+ /* tls_type for each local got entry. */
+ char *local_got_tls_type;
+};
+
+#define sh_elf_tdata(abfd) \
+ ((struct sh_elf_obj_tdata *) (abfd)->tdata.any)
+
+#define sh_elf_local_got_tls_type(abfd) \
+ (sh_elf_tdata (abfd)->local_got_tls_type)
+
+/* Override the generic function because we need to store sh_elf_obj_tdata
+ as the specific tdata. */
+
+static boolean
+sh_elf_mkobject (abfd)
+ bfd *abfd;
+{
+ bfd_size_type amt = sizeof (struct sh_elf_obj_tdata);
+ abfd->tdata.any = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.any == NULL)
+ return false;
+ return true;
+}
+
/* sh ELF linker hash table. */
struct elf_sh_link_hash_table
@@ -3409,6 +3576,13 @@ struct elf_sh_link_hash_table
/* Small local sym to section mapping cache. */
struct sym_sec_cache sym_sec;
+
+ /* A counter or offset to track a TLS got entry. */
+ union
+ {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } tls_ldm_got;
};
/* Traverse an sh ELF linker hash table. */
@@ -3450,14 +3624,13 @@ sh_elf_link_hash_newfunc (entry, table, string)
table, string));
if (ret != (struct elf_sh_link_hash_entry *) NULL)
{
- struct elf_sh_link_hash_entry *eh;
-
- eh = (struct elf_sh_link_hash_entry *) ret;
- eh->dyn_relocs = NULL;
- eh->gotplt_refcount = 0;
+ ret->dyn_relocs = NULL;
+ ret->gotplt_refcount = 0;
#ifdef INCLUDE_SHMEDIA
- ret->datalabel_got_offset = (bfd_vma) -1;
+ ret->datalabel_got.refcount = ret->root.got.refcount;
#endif
+ ret->tls_type = GOT_UNKNOWN;
+ ret->tls_tpoff32 = false;
}
return (struct bfd_hash_entry *) ret;
@@ -3491,6 +3664,7 @@ sh_elf_link_hash_table_create (abfd)
ret->sdynbss = NULL;
ret->srelbss = NULL;
ret->sym_sec.abfd = NULL;
+ ret->tls_ldm_got.refcount = 0;
return &ret->root.root;
}
@@ -3582,13 +3756,16 @@ sh_elf_create_dynamic_sections (abfd, info)
{
/* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
.plt section. */
- struct elf_link_hash_entry *h = NULL;
+ struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh = NULL;
+
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
(bfd_vma) 0, (const char *) NULL, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ get_elf_backend_data (abfd)->collect, &bh)))
return false;
+
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -3943,6 +4120,7 @@ allocate_dynrelocs (h, inf)
{
asection *s;
boolean dyn;
+ int tls_type = sh_elf_hash_entry (h)->tls_type;
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
@@ -3954,27 +4132,50 @@ allocate_dynrelocs (h, inf)
}
s = htab->sgot;
+ h->got.offset = s->_raw_size;
+ s->_raw_size += 4;
+ /* R_SH_TLS_GD needs 2 consecutive GOT slots. */
+ if (tls_type == GOT_TLS_GD)
+ s->_raw_size += 4;
+ dyn = htab->root.dynamic_sections_created;
+ /* R_SH_TLS_IE_32 needs one dynamic relocation,
+ R_SH_TLS_GD needs one if local symbol and two if global. */
+ if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
+ || tls_type == GOT_TLS_IE)
+ htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ else if (tls_type == GOT_TLS_GD)
+ htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rela);
+ else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
+ htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ }
+ else
+ h->got.offset = (bfd_vma) -1;
+
#ifdef INCLUDE_SHMEDIA
- if (h->type == STT_DATALABEL)
- {
- struct elf_sh_link_hash_entry *hsh;
+ if (eh->datalabel_got.refcount > 0)
+ {
+ asection *s;
+ boolean dyn;
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
- hsh = (struct elf_sh_link_hash_entry *)h;
- hsh->datalabel_got_offset = s->_raw_size;
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ if (h->dynindx == -1
+ && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ {
+ if (! bfd_elf32_link_record_dynamic_symbol (info, h))
+ return false;
}
- else
- h->got.offset = s->_raw_size;
-#else
- h->got.offset = s->_raw_size;
-#endif
+
+ s = htab->sgot;
+ eh->datalabel_got.offset = s->_raw_size;
s->_raw_size += 4;
dyn = htab->root.dynamic_sections_created;
if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
}
else
- h->got.offset = (bfd_vma) -1;
+ eh->datalabel_got.offset = (bfd_vma) -1;
+#endif
if (eh->dyn_relocs == NULL)
return true;
@@ -4006,6 +4207,9 @@ allocate_dynrelocs (h, inf)
}
else
{
+ if (sh_elf_hash_entry (h)->tls_tpoff32)
+ goto keep;
+
/* For the non-shared case, discard space for relocs against
symbols which turn out to need copy relocs or are not
dynamic. */
@@ -4113,6 +4317,7 @@ sh_elf_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;
@@ -4158,6 +4363,7 @@ sh_elf_size_dynamic_sections (output_bfd, info)
locsymcount *= 2;
#endif
end_local_got = local_got + locsymcount;
+ local_tls_type = sh_elf_local_got_tls_type (ibfd);
s = htab->sgot;
srel = htab->srelgot;
for (; local_got < end_local_got; ++local_got)
@@ -4166,14 +4372,28 @@ sh_elf_size_dynamic_sections (output_bfd, info)
{
*local_got = s->_raw_size;
s->_raw_size += 4;
+ if (*local_tls_type == GOT_TLS_GD)
+ s->_raw_size += 4;
if (info->shared)
srel->_raw_size += sizeof (Elf32_External_Rela);
}
else
*local_got = (bfd_vma) -1;
+ ++local_tls_type;
}
}
+ if (htab->tls_ldm_got.refcount > 0)
+ {
+ /* Allocate 2 got entries and 1 dynamic reloc for R_SH_TLS_LD_32
+ relocs. */
+ htab->tls_ldm_got.offset = htab->sgot->_raw_size;
+ htab->sgot->_raw_size += 8;
+ htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ }
+ else
+ htab->tls_ldm_got.offset = -1;
+
/* Allocate global sym .plt and .got entries, and space for global
sym dynamic relocs. */
elf_link_hash_traverse (&htab->root, allocate_dynrelocs, (PTR) info);
@@ -4309,6 +4529,7 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
asection *sgotplt;
asection *splt;
asection *sreloc;
+ asection *srelgot;
htab = sh_elf_hash_table (info);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -4320,6 +4541,7 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
sgotplt = htab->sgotplt;
splt = htab->splt;
sreloc = NULL;
+ srelgot = NULL;
rel = relocs;
relend = relocs + input_section->reloc_count;
@@ -4335,6 +4557,8 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma addend = (bfd_vma) 0;
bfd_reloc_status_type r;
int seen_stt_datalabel = 0;
+ bfd_vma off;
+ int tls_type;
r_symndx = ELF32_R_SYM (rel->r_info);
@@ -4356,6 +4580,8 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
&& r_type <= (int) R_SH_LAST_INVALID_RELOC_3)
|| ( r_type >= (int) R_SH_FIRST_INVALID_RELOC_4
&& r_type <= (int) R_SH_LAST_INVALID_RELOC_4)
+ || ( r_type >= (int) R_SH_FIRST_INVALID_RELOC_5
+ && r_type <= (int) R_SH_LAST_INVALID_RELOC_5)
|| (r_type >= (int) R_SH_FIRST_INVALID_RELOC_2
&& r_type <= (int) R_SH_LAST_INVALID_RELOC_2))
{
@@ -4526,15 +4752,18 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
with them here. */
|| ((input_section->flags & SEC_DEBUGGING) != 0
&& (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0))))
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0)))
+ || (sec->output_section == NULL
+ && (sh_elf_hash_entry (h)->tls_type == GOT_TLS_IE
+ || sh_elf_hash_entry (h)->tls_type == GOT_TLS_GD)))
relocation = 0;
else if (sec->output_section == NULL)
{
(*_bfd_error_handler)
- (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
+ (_("%s: unresolvable relocation against symbol `%s' from %s section"),
bfd_archive_filename (input_bfd), h->root.root.string,
bfd_get_section_name (input_bfd, input_section));
- relocation = 0;
+ return false;
}
else
relocation = ((h->root.u.def.value
@@ -4779,7 +5008,6 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (h != NULL)
{
- bfd_vma off;
boolean dyn;
off = h->got.offset;
@@ -4789,7 +5017,7 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
struct elf_sh_link_hash_entry *hsh;
hsh = (struct elf_sh_link_hash_entry *)h;
- off = hsh->datalabel_got_offset;
+ off = hsh->datalabel_got.offset;
}
#endif
BFD_ASSERT (off != (bfd_vma) -1);
@@ -4825,7 +5053,7 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
struct elf_sh_link_hash_entry *hsh;
hsh = (struct elf_sh_link_hash_entry *)h;
- hsh->datalabel_got_offset |= 1;
+ hsh->datalabel_got.offset |= 1;
}
else
#endif
@@ -4837,8 +5065,6 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- bfd_vma off;
-
#ifdef INCLUDE_SHMEDIA
if (rel->r_addend)
{
@@ -4872,11 +5098,14 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->shared)
{
- asection *srelgot;
Elf_Internal_Rela outrel;
- srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- BFD_ASSERT (srelgot != NULL);
+ if (srelgot == NULL)
+ {
+ srelgot = bfd_get_section_by_name (dynobj,
+ ".rela.got");
+ BFD_ASSERT (srelgot != NULL);
+ }
outrel.r_offset = (sgot->output_section->vma
+ sgot->output_offset
@@ -5010,6 +5239,450 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
rel->r_offset, sec, start, end);
break;
}
+
+ case R_SH_TLS_GD_32:
+ case R_SH_TLS_IE_32:
+ r_type = sh_elf_optimized_tls_reloc (info, r_type, h == NULL);
+ tls_type = GOT_UNKNOWN;
+ if (h == NULL && local_got_offsets)
+ tls_type = sh_elf_local_got_tls_type (input_bfd) [r_symndx];
+ else if (h != NULL)
+ {
+ tls_type = sh_elf_hash_entry (h)->tls_type;
+ if (! info->shared
+ && (h->dynindx == -1
+ || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+ && (tls_type == GOT_TLS_IE
+ || sh_elf_hash_entry (h)->tls_tpoff32))
+ r_type = R_SH_TLS_LE_32;
+ }
+
+ if (r_type == R_SH_TLS_GD_32 && tls_type == GOT_TLS_IE)
+ r_type = R_SH_TLS_IE_32;
+
+ if (r_type == R_SH_TLS_LE_32)
+ {
+ bfd_vma offset;
+ unsigned short insn;
+ int indx;
+ Elf_Internal_Rela outrel;
+
+ if (ELF32_R_TYPE (rel->r_info) == R_SH_TLS_GD_32)
+ {
+ /* GD->LE transition:
+ mov.l 1f,r4; mova 2f,r0; mov.l 2f,r1; add r0,r1;
+ jsr @r1; add r12,r4; bra 3f; nop; .align 2;
+ 1: .long x$TLSGD; 2: .long __tls_get_addr@PLT; 3:
+ We change it into:
+ mov.l 1f,r4; stc gbr,r0; add r4,r0; nop;
+ nop; nop; ...
+ 1: .long x@TPOFF; 2: .long __tls_get_addr@PLT; 3:. */
+
+ offset = rel->r_offset;
+ BFD_ASSERT (offset >= 16);
+ /* Size of GD instructions is 16 or 18. */
+ offset -= 16;
+ insn = bfd_get_16 (input_bfd, contents + offset + 0);
+ if ((insn & 0xff00) == 0xc700)
+ {
+ BFD_ASSERT (offset >= 2);
+ offset -= 2;
+ insn = bfd_get_16 (input_bfd, contents + offset + 0);
+ }
+
+ BFD_ASSERT ((insn & 0xff00) == 0xd400);
+ insn = bfd_get_16 (input_bfd, contents + offset + 2);
+ BFD_ASSERT ((insn & 0xff00) == 0xc700);
+ insn = bfd_get_16 (input_bfd, contents + offset + 4);
+ BFD_ASSERT ((insn & 0xff00) == 0xd100);
+ insn = bfd_get_16 (input_bfd, contents + offset + 6);
+ BFD_ASSERT (insn == 0x310c);
+ insn = bfd_get_16 (input_bfd, contents + offset + 8);
+ BFD_ASSERT (insn == 0x410b);
+ insn = bfd_get_16 (input_bfd, contents + offset + 10);
+ BFD_ASSERT (insn == 0x34cc);
+
+ bfd_put_16 (output_bfd, 0x0012, contents + offset + 2);
+ bfd_put_16 (output_bfd, 0x304c, contents + offset + 4);
+ bfd_put_16 (output_bfd, 0x0009, contents + offset + 6);
+ bfd_put_16 (output_bfd, 0x0009, contents + offset + 8);
+ bfd_put_16 (output_bfd, 0x0009, contents + offset + 10);
+ }
+ else
+ {
+ int index;
+
+ /* IE->LE transition:
+ mov.l 1f,r0; stc gbr,rN; mov.l @(r0,r12),rM;
+ bra 2f; add ...; .align 2; 1: x@GOTTPOFF; 2:
+ We change it into:
+ mov.l .Ln,rM; stc gbr,rN; nop; ...;
+ 1: x@TPOFF; 2:. */
+
+ offset = rel->r_offset;
+ BFD_ASSERT (offset >= 16);
+ /* Size of IE instructions is 10 or 12. */
+ offset -= 10;
+ insn = bfd_get_16 (input_bfd, contents + offset + 0);
+ if ((insn & 0xf0ff) == 0x0012)
+ {
+ BFD_ASSERT (offset >= 2);
+ offset -= 2;
+ insn = bfd_get_16 (input_bfd, contents + offset + 0);
+ }
+
+ BFD_ASSERT ((insn & 0xff00) == 0xd000);
+ index = insn & 0x00ff;
+ insn = bfd_get_16 (input_bfd, contents + offset + 2);
+ BFD_ASSERT ((insn & 0xf0ff) == 0x0012);
+ insn = bfd_get_16 (input_bfd, contents + offset + 4);
+ BFD_ASSERT ((insn & 0xf0ff) == 0x00ce);
+ insn = 0xd000 | (insn & 0x0f00) | index;
+ bfd_put_16 (output_bfd, insn, contents + offset + 0);
+ bfd_put_16 (output_bfd, 0x0009, contents + offset + 4);
+ }
+
+ if (sreloc == NULL)
+ {
+ const char *name;
+
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd,
+ elf_elfheader (input_bfd)->e_shstrndx,
+ elf_section_data (input_section)->rel_hdr.sh_name));
+ if (name == NULL)
+ return false;
+
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ && strcmp (bfd_get_section_name (input_bfd,
+ input_section),
+ name + 5) == 0);
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ BFD_ASSERT (sreloc != NULL);
+ }
+
+ indx = (h && h->dynindx != -1) ? h->dynindx : 0;
+ outrel.r_offset = (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+ outrel.r_info = ELF32_R_INFO (indx, R_SH_TLS_TPOFF32);
+ if (indx == 0)
+ outrel.r_addend = relocation - dtpoff_base (info);
+ else
+ outrel.r_addend = 0;
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+ (((Elf32_External_Rela *)
+ sreloc->contents)
+ + sreloc->reloc_count));
+ ++sreloc->reloc_count;
+
+ continue;
+ }
+
+ sgot = htab->sgot;
+ if (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;
+ Elf32_External_Rela *loc;
+ int dr_type, indx;
+
+ if (srelgot == NULL)
+ {
+ srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+ BFD_ASSERT (srelgot != NULL);
+ }
+
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset + off);
+
+ indx = (h && h->dynindx != -1) ? h->dynindx : 0;
+ dr_type = (r_type == R_SH_TLS_GD_32 ? R_SH_TLS_DTPMOD32 :
+ R_SH_TLS_TPOFF32);
+ if (dr_type == R_SH_TLS_TPOFF32 && indx == 0)
+ outrel.r_addend = relocation - dtpoff_base (info);
+ else
+ outrel.r_addend = 0;
+ outrel.r_info = ELF32_R_INFO (indx, dr_type);
+ loc = (Elf32_External_Rela *) srelgot->contents;
+ loc += srelgot->reloc_count++;
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
+
+ if (r_type == R_SH_TLS_GD_32)
+ {
+ if (indx == 0)
+ {
+ bfd_put_32 (output_bfd,
+ relocation - dtpoff_base (info),
+ sgot->contents + off + 4);
+ }
+ else
+ {
+ outrel.r_info = ELF32_R_INFO (indx,
+ R_SH_TLS_DTPOFF32);
+ outrel.r_offset += 4;
+ outrel.r_addend = 0;
+ srelgot->reloc_count++;
+ loc++;
+ bfd_elf32_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 == (int) ELF32_R_TYPE (rel->r_info))
+ relocation = sgot->output_offset + off;
+ else
+ {
+ bfd_vma offset;
+ unsigned short insn;
+
+ /* GD->IE transition:
+ mov.l 1f,r4; mova 2f,r0; mov.l 2f,r1; add r0,r1;
+ jsr @r1; add r12,r4; bra 3f; nop; .align 2;
+ 1: .long x$TLSGD; 2: .long __tls_get_addr@PLT; 3:
+ We change it into:
+ mov.l 1f,r0; stc gbr,r4; mov.l @(r0,r12),r0; add r4,r0;
+ nop; nop; bra 3f; nop; .align 2;
+ 1: .long x@TPOFF; 2:...; 3:. */
+
+ offset = rel->r_offset;
+ BFD_ASSERT (offset >= 16);
+ /* Size of GD instructions is 16 or 18. */
+ offset -= 16;
+ insn = bfd_get_16 (input_bfd, contents + offset + 0);
+ if ((insn & 0xff00) == 0xc700)
+ {
+ BFD_ASSERT (offset >= 2);
+ offset -= 2;
+ insn = bfd_get_16 (input_bfd, contents + offset + 0);
+ }
+
+ BFD_ASSERT ((insn & 0xff00) == 0xd400);
+
+ /* Replace mov.l 1f,R4 with mov.l 1f,r0. */
+ bfd_put_16 (output_bfd, insn & 0xf0ff, contents + offset);
+
+ insn = bfd_get_16 (input_bfd, contents + offset + 2);
+ BFD_ASSERT ((insn & 0xff00) == 0xc700);
+ insn = bfd_get_16 (input_bfd, contents + offset + 4);
+ BFD_ASSERT ((insn & 0xff00) == 0xd100);
+ insn = bfd_get_16 (input_bfd, contents + offset + 6);
+ BFD_ASSERT (insn == 0x310c);
+ insn = bfd_get_16 (input_bfd, contents + offset + 8);
+ BFD_ASSERT (insn == 0x410b);
+ insn = bfd_get_16 (input_bfd, contents + offset + 10);
+ BFD_ASSERT (insn == 0x34cc);
+
+ bfd_put_16 (output_bfd, 0x0412, contents + offset + 2);
+ bfd_put_16 (output_bfd, 0x00ce, contents + offset + 4);
+ bfd_put_16 (output_bfd, 0x304c, contents + offset + 6);
+ bfd_put_16 (output_bfd, 0x0009, contents + offset + 8);
+ bfd_put_16 (output_bfd, 0x0009, contents + offset + 10);
+
+ bfd_put_32 (output_bfd, sgot->output_offset + off,
+ contents + rel->r_offset);
+
+ continue;
+ }
+
+ addend = rel->r_addend;
+
+ goto final_link_relocate;
+
+ case R_SH_TLS_LD_32:
+ if (! info->shared)
+ {
+ bfd_vma offset;
+ unsigned short insn;
+
+ /* LD->LE transition:
+ mov.l 1f,r4; mova 2f,r0; mov.l 2f,r1; add r0,r1;
+ jsr @r1; add r12,r4; bra 3f; nop; .align 2;
+ 1: .long x$TLSLD; 2: .long __tls_get_addr@PLT; 3:
+ We change it into:
+ stc gbr,r0; nop; nop; nop;
+ nop; nop; bra 3f; ...; 3:. */
+
+ offset = rel->r_offset;
+ BFD_ASSERT (offset >= 16);
+ /* Size of LD instructions is 16 or 18. */
+ offset -= 16;
+ insn = bfd_get_16 (input_bfd, contents + offset + 0);
+ if ((insn & 0xff00) == 0xc700)
+ {
+ BFD_ASSERT (offset >= 2);
+ offset -= 2;
+ insn = bfd_get_16 (input_bfd, contents + offset + 0);
+ }
+
+ BFD_ASSERT ((insn & 0xff00) == 0xd400);
+ insn = bfd_get_16 (input_bfd, contents + offset + 2);
+ BFD_ASSERT ((insn & 0xff00) == 0xc700);
+ insn = bfd_get_16 (input_bfd, contents + offset + 4);
+ BFD_ASSERT ((insn & 0xff00) == 0xd100);
+ insn = bfd_get_16 (input_bfd, contents + offset + 6);
+ BFD_ASSERT (insn == 0x310c);
+ insn = bfd_get_16 (input_bfd, contents + offset + 8);
+ BFD_ASSERT (insn == 0x410b);
+ insn = bfd_get_16 (input_bfd, contents + offset + 10);
+ BFD_ASSERT (insn == 0x34cc);
+
+ bfd_put_16 (output_bfd, 0x0012, contents + offset + 0);
+ bfd_put_16 (output_bfd, 0x0009, contents + offset + 2);
+ bfd_put_16 (output_bfd, 0x0009, contents + offset + 4);
+ bfd_put_16 (output_bfd, 0x0009, contents + offset + 6);
+ bfd_put_16 (output_bfd, 0x0009, contents + offset + 8);
+ bfd_put_16 (output_bfd, 0x0009, contents + offset + 10);
+
+ continue;
+ }
+
+ sgot = htab->sgot;
+ if (sgot == NULL)
+ abort ();
+
+ off = htab->tls_ldm_got.offset;
+ if (off & 1)
+ off &= ~1;
+ else
+ {
+ Elf_Internal_Rela outrel;
+ Elf32_External_Rela *loc;
+
+ srelgot = htab->srelgot;
+ if (srelgot == NULL)
+ abort ();
+
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset + off);
+ outrel.r_addend = 0;
+ outrel.r_info = ELF32_R_INFO (0, R_SH_TLS_DTPMOD32);
+ loc = (Elf32_External_Rela *) srelgot->contents;
+ loc += srelgot->reloc_count++;
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
+ htab->tls_ldm_got.offset |= 1;
+ }
+
+ relocation = sgot->output_offset + off;
+ addend = rel->r_addend;
+
+ goto final_link_relocate;
+
+ case R_SH_TLS_LDO_32:
+ if (! info->shared)
+ {
+ int indx;
+ Elf_Internal_Rela outrel;
+
+ if (sreloc == NULL)
+ {
+ const char *name;
+
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd,
+ elf_elfheader (input_bfd)->e_shstrndx,
+ elf_section_data (input_section)->rel_hdr.sh_name));
+ if (name == NULL)
+ return false;
+
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ && strcmp (bfd_get_section_name (input_bfd,
+ input_section),
+ name + 5) == 0);
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ BFD_ASSERT (sreloc != NULL);
+ }
+
+ indx = (h && h->dynindx != -1) ? h->dynindx : 0;
+ outrel.r_offset = (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+ outrel.r_info = ELF32_R_INFO (indx, R_SH_TLS_TPOFF32);
+ if (indx == 0)
+ outrel.r_addend = relocation - dtpoff_base (info);
+ else
+ outrel.r_addend = 0;
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+ (((Elf32_External_Rela *)
+ sreloc->contents)
+ + sreloc->reloc_count));
+ ++sreloc->reloc_count;
+
+ continue;
+ }
+ else
+ relocation -= dtpoff_base (info);
+
+ addend = rel->r_addend;
+ goto final_link_relocate;
+
+ case R_SH_TLS_LE_32:
+ {
+ int indx;
+ Elf_Internal_Rela outrel;
+
+ if (sreloc == NULL)
+ {
+ const char *name;
+
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd,
+ elf_elfheader (input_bfd)->e_shstrndx,
+ elf_section_data (input_section)->rel_hdr.sh_name));
+ if (name == NULL)
+ return false;
+
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ && strcmp (bfd_get_section_name (input_bfd,
+ input_section),
+ name + 5) == 0);
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ BFD_ASSERT (sreloc != NULL);
+ }
+
+ indx = (h && h->dynindx != -1) ? h->dynindx : 0;
+ outrel.r_offset = (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+ outrel.r_info = ELF32_R_INFO (indx, R_SH_TLS_TPOFF32);
+ if (indx == 0)
+ outrel.r_addend = relocation - dtpoff_base (info);
+ else
+ outrel.r_addend = 0;
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+ (((Elf32_External_Rela *)
+ sreloc->contents)
+ + sreloc->reloc_count));
+ ++sreloc->reloc_count;
+
+ continue;
+ }
}
relocation_done:
@@ -5157,6 +5830,20 @@ sh_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
return NULL;
}
+/* 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;
+}
+
static asection *
sh_elf_gc_mark_hook (sec, info, rel, h, sym)
asection *sec;
@@ -5224,119 +5911,170 @@ sh_elf_gc_sweep_hook (abfd, info, sec, relocs)
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; rel++)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_SH_GOT32:
- case R_SH_GOTOFF:
- case R_SH_GOTPC:
+ {
#ifdef INCLUDE_SHMEDIA
- case R_SH_GOT_LOW16:
- case R_SH_GOT_MEDLOW16:
- case R_SH_GOT_MEDHI16:
- case R_SH_GOT_HI16:
- case R_SH_GOT10BY4:
- case R_SH_GOT10BY8:
- case R_SH_GOTOFF_LOW16:
- case R_SH_GOTOFF_MEDLOW16:
- case R_SH_GOTOFF_MEDHI16:
- case R_SH_GOTOFF_HI16:
- case R_SH_GOTPC_LOW16:
- case R_SH_GOTPC_MEDLOW16:
- case R_SH_GOTPC_MEDHI16:
- case R_SH_GOTPC_HI16:
+ int seen_stt_datalabel = 0;
#endif
- r_symndx = ELF32_R_SYM (rel->r_info);
- if (r_symndx >= symtab_hdr->sh_info)
- {
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- if (h->got.refcount > 0)
- h->got.refcount -= 1;
- }
- else if (local_got_refcounts != NULL)
- {
- if (local_got_refcounts[r_symndx] > 0)
- local_got_refcounts[r_symndx] -= 1;
- }
- break;
-
- case R_SH_DIR32:
- case R_SH_REL32:
- r_symndx = ELF32_R_SYM (rel->r_info);
- if (r_symndx >= symtab_hdr->sh_info)
- {
- struct elf_sh_link_hash_entry *eh;
- struct elf_sh_dyn_relocs **pp;
- struct elf_sh_dyn_relocs *p;
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
- if (!info->shared && h->plt.refcount > 0)
- h->plt.refcount -= 1;
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx < symtab_hdr->sh_info)
+ h = NULL;
+ else
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+#ifdef INCLUDE_SHMEDIA
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ {
+ seen_stt_datalabel |= h->type == STT_DATALABEL;
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ }
+#endif
+ }
+ eh = (struct elf_sh_link_hash_entry *) h;
- eh = (struct elf_sh_link_hash_entry *) h;
+ switch (sh_elf_optimized_tls_reloc (info, ELF32_R_TYPE (rel->r_info),
+ ELF32_R_SYM (rel->r_info)
+ >= symtab_hdr->sh_info))
+ {
+ case R_SH_TLS_LD_32:
+ if (sh_elf_hash_table (info)->tls_ldm_got.refcount > 0)
+ sh_elf_hash_table (info)->tls_ldm_got.refcount -= 1;
+ break;
- for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
- if (p->sec == sec)
+ case R_SH_GOT32:
+ case R_SH_GOTOFF:
+ case R_SH_GOTPC:
+#ifdef INCLUDE_SHMEDIA
+ case R_SH_GOT_LOW16:
+ case R_SH_GOT_MEDLOW16:
+ case R_SH_GOT_MEDHI16:
+ case R_SH_GOT_HI16:
+ case R_SH_GOT10BY4:
+ case R_SH_GOT10BY8:
+ case R_SH_GOTOFF_LOW16:
+ case R_SH_GOTOFF_MEDLOW16:
+ case R_SH_GOTOFF_MEDHI16:
+ case R_SH_GOTOFF_HI16:
+ case R_SH_GOTPC_LOW16:
+ case R_SH_GOTPC_MEDLOW16:
+ case R_SH_GOTPC_MEDHI16:
+ case R_SH_GOTPC_HI16:
+#endif
+ case R_SH_TLS_GD_32:
+ case R_SH_TLS_IE_32:
+ if (h != NULL)
+ {
+#ifdef INCLUDE_SHMEDIA
+ if (seen_stt_datalabel)
{
- if (ELF32_R_TYPE (rel->r_info) == R_SH_REL32)
- p->pc_count -= 1;
- p->count -= 1;
- if (p->count == 0)
- *pp = p->next;
- break;
+ if (eh->datalabel_got.refcount > 0)
+ eh->datalabel_got.refcount -= 1;
}
- }
- break;
+ else
+#endif
+ if (h->got.refcount > 0)
+ h->got.refcount -= 1;
+ }
+ else if (local_got_refcounts != NULL)
+ {
+#ifdef INCLUDE_SHMEDIA
+ if (rel->r_addend & 1)
+ {
+ if (local_got_refcounts[symtab_hdr->sh_info + r_symndx] > 0)
+ local_got_refcounts[symtab_hdr->sh_info + r_symndx] -= 1;
+ }
+ else
+#endif
+ if (local_got_refcounts[r_symndx] > 0)
+ local_got_refcounts[r_symndx] -= 1;
+ }
+ break;
- case R_SH_PLT32:
+ case R_SH_DIR32:
+ case R_SH_REL32:
+ if (h != NULL)
+ {
+ struct elf_sh_dyn_relocs **pp;
+ struct elf_sh_dyn_relocs *p;
+
+
+ if (!info->shared && h->plt.refcount > 0)
+ h->plt.refcount -= 1;
+
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
+ if (p->sec == sec)
+ {
+ if (ELF32_R_TYPE (rel->r_info) == R_SH_REL32)
+ p->pc_count -= 1;
+ p->count -= 1;
+ if (p->count == 0)
+ *pp = p->next;
+ break;
+ }
+ }
+ break;
+
+ case R_SH_PLT32:
#ifdef INCLUDE_SHMEDIA
- case R_SH_PLT_LOW16:
- case R_SH_PLT_MEDLOW16:
- case R_SH_PLT_MEDHI16:
- case R_SH_PLT_HI16:
+ case R_SH_PLT_LOW16:
+ case R_SH_PLT_MEDLOW16:
+ case R_SH_PLT_MEDHI16:
+ case R_SH_PLT_HI16:
#endif
- r_symndx = ELF32_R_SYM (rel->r_info);
- if (r_symndx >= symtab_hdr->sh_info)
- {
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- if (h->plt.refcount > 0)
- h->plt.refcount -= 1;
- }
- break;
+ if (h != NULL)
+ {
+ if (h->plt.refcount > 0)
+ h->plt.refcount -= 1;
+ }
+ break;
- case R_SH_GOTPLT32:
+ case R_SH_GOTPLT32:
#ifdef INCLUDE_SHMEDIA
- case R_SH_GOTPLT_LOW16:
- case R_SH_GOTPLT_MEDLOW16:
- case R_SH_GOTPLT_MEDHI16:
- case R_SH_GOTPLT_HI16:
- case R_SH_GOTPLT10BY4:
- case R_SH_GOTPLT10BY8:
+ case R_SH_GOTPLT_LOW16:
+ case R_SH_GOTPLT_MEDLOW16:
+ case R_SH_GOTPLT_MEDHI16:
+ case R_SH_GOTPLT_HI16:
+ case R_SH_GOTPLT10BY4:
+ case R_SH_GOTPLT10BY8:
#endif
- r_symndx = ELF32_R_SYM (rel->r_info);
- if (r_symndx >= symtab_hdr->sh_info)
- {
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- eh = (struct elf_sh_link_hash_entry *) h;
- if (eh->gotplt_refcount > 0)
- {
- eh->gotplt_refcount -= 1;
- if (h->plt.refcount > 0)
- h->plt.refcount -= 1;
- }
- else if (h->got.refcount > 0)
- h->got.refcount -= 1;
- }
- else if (local_got_refcounts != NULL)
- {
- if (local_got_refcounts[r_symndx] > 0)
- local_got_refcounts[r_symndx] -= 1;
- }
- break;
+ if (h != NULL)
+ {
+ if (eh->gotplt_refcount > 0)
+ {
+ eh->gotplt_refcount -= 1;
+ if (h->plt.refcount > 0)
+ h->plt.refcount -= 1;
+ }
+#ifdef INCLUDE_SHMEDIA
+ else if (seen_stt_datalabel)
+ {
+ if (eh->datalabel_got.refcount > 0)
+ eh->datalabel_got.refcount -= 1;
+ }
+#endif
+ else if (h->got.refcount > 0)
+ h->got.refcount -= 1;
+ }
+ else if (local_got_refcounts != NULL)
+ {
+#ifdef INCLUDE_SHMEDIA
+ if (rel->r_addend & 1)
+ {
+ if (local_got_refcounts[symtab_hdr->sh_info + r_symndx] > 0)
+ local_got_refcounts[symtab_hdr->sh_info + r_symndx] -= 1;
+ }
+ else
+#endif
+ if (local_got_refcounts[r_symndx] > 0)
+ local_got_refcounts[r_symndx] -= 1;
+ }
+ break;
- default:
- break;
- }
+ default:
+ break;
+ }
+ }
return true;
}
@@ -5349,6 +6087,9 @@ sh_elf_copy_indirect_symbol (bed, dir, ind)
struct elf_link_hash_entry *dir, *ind;
{
struct elf_sh_link_hash_entry *edir, *eind;
+#ifdef INCLUDE_SHMEDIA
+ bfd_signed_vma tmp;
+#endif
edir = (struct elf_sh_link_hash_entry *) dir;
eind = (struct elf_sh_link_hash_entry *) ind;
@@ -5387,10 +6128,50 @@ sh_elf_copy_indirect_symbol (bed, dir, ind)
}
edir->gotplt_refcount = eind->gotplt_refcount;
eind->gotplt_refcount = 0;
+#ifdef INCLUDE_SHMEDIA
+ tmp = edir->datalabel_got.refcount;
+ if (tmp < 1)
+ {
+ edir->datalabel_got.refcount = eind->datalabel_got.refcount;
+ eind->datalabel_got.refcount = tmp;
+ }
+ else
+ BFD_ASSERT (eind->datalabel_got.refcount < 1);
+#endif
+
+ 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 int
+sh_elf_optimized_tls_reloc (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_SH_TLS_GD_32:
+ case R_SH_TLS_IE_32:
+ if (is_local)
+ return R_SH_TLS_LE_32;
+ return R_SH_TLS_IE_32;
+ case R_SH_TLS_LD_32:
+ return R_SH_TLS_LE_32;
+ }
+
+ return r_type;
+}
+
/* Look through the relocs for a section during the first phase.
Since we don't do .gots or .plts, we just need to consider the
virtual table relocs for gc. */
@@ -5412,6 +6193,8 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
asection *sgot;
asection *srelgot;
asection *sreloc;
+ unsigned int r_type;
+ int tls_type, old_tls_type;
sgot = NULL;
srelgot = NULL;
@@ -5435,17 +6218,42 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
{
struct elf_link_hash_entry *h;
unsigned long r_symndx;
+#ifdef INCLUDE_SHMEDIA
+ int seen_stt_datalabel = 0;
+#endif
r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
+
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+#ifdef INCLUDE_SHMEDIA
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ {
+ seen_stt_datalabel |= h->type == STT_DATALABEL;
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ }
+#endif
+ }
+
+ r_type = sh_elf_optimized_tls_reloc (info, r_type, h == NULL);
+ if (! info->shared
+ && r_type == R_SH_TLS_IE_32
+ && h != NULL
+ && h->root.type != bfd_link_hash_undefined
+ && h->root.type != bfd_link_hash_undefweak
+ && (h->dynindx == -1
+ || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
+ r_type = R_SH_TLS_LE_32;
/* Some relocs require a global offset table. */
if (htab->sgot == NULL)
{
- switch (ELF32_R_TYPE (rel->r_info))
+ switch (r_type)
{
case R_SH_GOTPLT32:
case R_SH_GOT32:
@@ -5473,6 +6281,9 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
case R_SH_GOTPC_MEDHI16:
case R_SH_GOTPC_HI16:
#endif
+ case R_SH_TLS_GD_32:
+ case R_SH_TLS_LD_32:
+ case R_SH_TLS_IE_32:
if (dynobj == NULL)
htab->root.dynobj = dynobj = abfd;
if (! create_got_section (dynobj, info))
@@ -5484,7 +6295,7 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
}
}
- switch (ELF32_R_TYPE (rel->r_info))
+ switch (r_type)
{
/* This relocation describes the C++ object vtable hierarchy.
Reconstruct it for later use during GC. */
@@ -5501,6 +6312,12 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
break;
force_got:
+ case R_SH_TLS_IE_32:
+ if (info->shared)
+ info->flags |= DF_STATIC_TLS;
+
+ /* FALLTHROUGH */
+ case R_SH_TLS_GD_32:
case R_SH_GOT32:
#ifdef INCLUDE_SHMEDIA
case R_SH_GOT_LOW16:
@@ -5510,8 +6327,34 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
case R_SH_GOT10BY4:
case R_SH_GOT10BY8:
#endif
+ switch (r_type)
+ {
+ default:
+ tls_type = GOT_NORMAL;
+ break;
+ case R_SH_TLS_GD_32:
+ tls_type = GOT_TLS_GD;
+ break;
+ case R_SH_TLS_IE_32:
+ tls_type = GOT_TLS_IE;
+ break;
+ }
+
if (h != NULL)
- h->got.refcount += 1;
+ {
+#ifdef INCLUDE_SHMEDIA
+ if (seen_stt_datalabel)
+ {
+ struct elf_sh_link_hash_entry *eh =
+ (struct elf_sh_link_hash_entry *)h;
+
+ eh->datalabel_got.refcount += 1;
+ }
+ else
+#endif
+ h->got.refcount += 1;
+ old_tls_type = sh_elf_hash_entry (h)->tls_type;
+ }
else
{
bfd_signed_vma *local_got_refcounts;
@@ -5530,14 +6373,59 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
codelabel local GOT offsets. */
size *= 2;
#endif
+ size += symtab_hdr->sh_info;
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;
+#ifdef INCLUDE_SHMEDIA
+ /* Take care of both the datalabel and codelabel local
+ GOT offsets. */
+ sh_elf_local_got_tls_type (abfd)
+ = (char *) (local_got_refcounts + 2 * symtab_hdr->sh_info);
+#else
+ sh_elf_local_got_tls_type (abfd)
+ = (char *) (local_got_refcounts + symtab_hdr->sh_info);
+#endif
}
- local_got_refcounts[r_symndx] += 1;
+#ifdef INCLUDE_SHMEDIA
+ if (rel->r_addend & 1)
+ local_got_refcounts[symtab_hdr->sh_info + r_symndx] += 1;
+ else
+#endif
+ local_got_refcounts[r_symndx] += 1;
+ old_tls_type = sh_elf_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 = GOT_TLS_IE;
+ else
+ {
+ (*_bfd_error_handler)
+ (_("%s: `%s' accessed both as normal and thread local symbol"),
+ bfd_archive_filename (abfd), h->root.root.string);
+ return false;
+ }
+ }
+
+ if (old_tls_type != tls_type)
+ {
+ if (h != NULL)
+ sh_elf_hash_entry (h)->tls_type = tls_type;
+ else
+ sh_elf_local_got_tls_type (abfd) [r_symndx] = tls_type;
+ }
+
+ break;
+
+ case R_SH_TLS_LD_32:
+ sh_elf_hash_table(info)->tls_ldm_got.refcount += 1;
break;
case R_SH_GOTPLT32:
@@ -5620,7 +6508,7 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
symbol. */
if ((info->shared
&& (sec->flags & SEC_ALLOC) != 0
- && (ELF32_R_TYPE (rel->r_info) != R_SH_REL32
+ && (r_type != R_SH_REL32
|| (h != NULL
&& (! info->symbolic
|| h->root.type == bfd_link_hash_defweak
@@ -5710,11 +6598,110 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
}
p->count += 1;
- if (ELF32_R_TYPE (rel->r_info) == R_SH_REL32)
+ if (r_type == R_SH_REL32)
p->pc_count += 1;
}
break;
+
+ case R_SH_TLS_LE_32:
+ if (info->shared)
+ {
+ (*_bfd_error_handler) (_("%s: TLS local exec code cannot be linked into shared objects"),
+ bfd_archive_filename (abfd));
+ return false;
+ }
+
+ if (ELF32_R_TYPE (rel->r_info) == R_SH_TLS_LD_32)
+ break;
+
+ /* FALLTHROUGH */
+ case R_SH_TLS_LDO_32:
+ /* We make a R_SH_TLS_TPOFF32 relocation. Count it as a
+ copy relocation. */
+ if (! info->shared)
+ {
+ struct elf_sh_dyn_relocs *p;
+ struct elf_sh_dyn_relocs **head;
+
+ if (dynobj == NULL)
+ htab->root.dynobj = dynobj = abfd;
+
+ if (sreloc == NULL)
+ {
+ const char *name;
+
+ name = (bfd_elf_string_from_elf_section
+ (abfd,
+ elf_elfheader (abfd)->e_shstrndx,
+ elf_section_data (sec)->rel_hdr.sh_name));
+ if (name == NULL)
+ return false;
+
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ && strcmp (bfd_get_section_name (abfd, sec),
+ name + 5) == 0);
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ if (sreloc == NULL)
+ {
+ flagword flags;
+
+ sreloc = bfd_make_section (dynobj, name);
+ flags = (SEC_HAS_CONTENTS | SEC_READONLY
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ if ((sec->flags & SEC_ALLOC) != 0)
+ flags |= SEC_ALLOC | SEC_LOAD;
+ if (sreloc == NULL
+ || ! bfd_set_section_flags (dynobj, sreloc, flags)
+ || ! bfd_set_section_alignment (dynobj, sreloc, 2))
+ return false;
+ }
+ elf_section_data (sec)->sreloc = sreloc;
+ if (sec->flags & SEC_READONLY)
+ info->flags |= DF_TEXTREL;
+ }
+
+ /* If this is a global symbol, we count the number of
+ relocations we need for this symbol. */
+ if (h != NULL)
+ head = &((struct elf_sh_link_hash_entry *) h)->dyn_relocs;
+ else
+ {
+ asection *s;
+
+ /* Track dynamic relocs needed for local syms too. */
+ s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
+ sec, r_symndx);
+ if (s == NULL)
+ return false;
+
+ head = ((struct elf_sh_dyn_relocs **)
+ &elf_section_data (s)->local_dynrel);
+ }
+
+ p = *head;
+ if (p == NULL || p->sec != sec)
+ {
+ bfd_size_type amt = sizeof (*p);
+ p = ((struct elf_sh_dyn_relocs *) bfd_alloc (dynobj, amt));
+ if (p == NULL)
+ return false;
+ p->next = *head;
+ *head = p;
+ p->sec = sec;
+ p->count = 0;
+ p->pc_count = 0;
+ }
+
+ p->count += 1;
+ if (h)
+ sh_elf_hash_entry (h)->tls_tpoff32 = true;
+ }
+ break;
+
+ default:
+ break;
}
}
@@ -5835,6 +6822,29 @@ sh_elf_merge_private_data (ibfd, obfd)
}
#endif /* not sh_elf_merge_private_data */
+/* Override the generic function because we need to store sh_elf_obj_tdata
+ as the specific tdata. We set also the machine architecture from flags
+ here. */
+
+static boolean
+sh_elf_object_p (abfd)
+ bfd *abfd;
+{
+ struct sh_elf_obj_tdata *new_tdata;
+ bfd_size_type amt = sizeof (struct sh_elf_obj_tdata);
+
+ if (sh_elf_set_mach_from_flags (abfd) == false)
+ return false;
+
+ /* Allocate our special target data. */
+ 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;
+ return true;
+}
+
/* Finish up dynamic symbol handling. We set the contents of various
dynamic sections here. */
@@ -5991,7 +7001,9 @@ sh_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
}
}
- if (h->got.offset != (bfd_vma) -1)
+ if (h->got.offset != (bfd_vma) -1
+ && sh_elf_hash_entry (h)->tls_type != GOT_TLS_GD
+ && sh_elf_hash_entry (h)->tls_type != GOT_TLS_IE)
{
asection *sgot;
asection *srel;
@@ -6037,6 +7049,60 @@ sh_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
++srel->reloc_count;
}
+#ifdef INCLUDE_SHMEDIA
+ {
+ struct elf_sh_link_hash_entry *eh;
+
+ eh = (struct elf_sh_link_hash_entry *) h;
+ if (eh->datalabel_got.offset != (bfd_vma) -1)
+ {
+ asection *sgot;
+ asection *srel;
+ Elf_Internal_Rela rel;
+
+ /* This symbol has a datalabel entry in the global offset table.
+ Set it up. */
+
+ sgot = htab->sgot;
+ srel = htab->srelgot;
+ BFD_ASSERT (sgot != NULL && srel != NULL);
+
+ rel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + (eh->datalabel_got.offset &~ (bfd_vma) 1));
+
+ /* If this is a static link, or it is a -Bsymbolic link and the
+ symbol is defined locally or was forced to be local because
+ of a version file, we just want to emit a RELATIVE reloc.
+ The entry in the global offset table will already have been
+ initialized in the relocate_section function. */
+ if (info->shared
+ && (info->symbolic
+ || h->dynindx == -1
+ || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+ {
+ rel.r_info = ELF32_R_INFO (0, R_SH_RELATIVE);
+ rel.r_addend = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ }
+ else
+ {
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents
+ + eh->datalabel_got.offset);
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_SH_GLOB_DAT);
+ rel.r_addend = 0;
+ }
+
+ bfd_elf32_swap_reloca_out (output_bfd, &rel,
+ ((Elf32_External_Rela *) srel->contents
+ + srel->reloc_count));
+ ++srel->reloc_count;
+ }
+ }
+#endif
+
if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
{
asection *s;
@@ -6262,7 +7328,71 @@ sh_elf_reloc_type_class (rela)
}
}
-#ifndef ELF_ARCH
+/* Support for Linux core dump NOTE sections */
+static boolean
+elf32_shlin_grok_prstatus (abfd, note)
+ bfd *abfd;
+ Elf_Internal_Note *note;
+{
+ int offset;
+ unsigned int raw_size;
+
+ switch (note->descsz)
+ {
+ default:
+ return false;
+
+ case 168: /* Linux/SH */
+ /* pr_cursig */
+ elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
+
+ /* pr_pid */
+ elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
+
+ /* pr_reg */
+ offset = 72;
+ raw_size = 92;
+
+ break;
+ }
+
+ /* Make a ".reg/999" section. */
+ return _bfd_elfcore_make_pseudosection (abfd, ".reg",
+ raw_size, note->descpos + offset);
+}
+
+static boolean
+elf32_shlin_grok_psinfo (abfd, note)
+ bfd *abfd;
+ Elf_Internal_Note *note;
+{
+ switch (note->descsz)
+ {
+ default:
+ return false;
+
+ case 124: /* Linux/SH elf_prpsinfo */
+ elf_tdata (abfd)->core_program
+ = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
+ elf_tdata (abfd)->core_command
+ = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
+ }
+
+ /* Note that for some reason, a spurious space is tacked
+ onto the end of the args in some (at least one anyway)
+ implementations, so strip it off if it exists. */
+
+ {
+ char *command = elf_tdata (abfd)->core_command;
+ int n = strlen (command);
+
+ if (0 < n && command[n - 1] == ' ')
+ command[n - 1] = '\0';
+ }
+
+ return true;
+}
+
#define TARGET_BIG_SYM bfd_elf32_sh_vec
#define TARGET_BIG_NAME "elf32-sh"
#define TARGET_LITTLE_SYM bfd_elf32_shl_vec
@@ -6272,7 +7402,6 @@ sh_elf_reloc_type_class (rela)
#define ELF_MAXPAGESIZE 128
#define elf_symbol_leading_char '_'
-#endif /* ELF_ARCH */
#define bfd_elf32_bfd_reloc_type_lookup sh_elf_reloc_type_lookup
#define elf_info_to_howto sh_elf_info_to_howto
@@ -6280,7 +7409,8 @@ sh_elf_reloc_type_class (rela)
#define elf_backend_relocate_section sh_elf_relocate_section
#define bfd_elf32_bfd_get_relocated_section_contents \
sh_elf_get_relocated_section_contents
-#define elf_backend_object_p sh_elf_set_mach_from_flags
+#define bfd_elf32_mkobject sh_elf_mkobject
+#define elf_backend_object_p sh_elf_object_p
#define bfd_elf32_bfd_set_private_bfd_flags \
sh_elf_set_private_flags
#define bfd_elf32_bfd_copy_private_bfd_data \
@@ -6315,7 +7445,74 @@ sh_elf_reloc_type_class (rela)
#define elf_backend_got_header_size 12
#define elf_backend_plt_header_size PLT_ENTRY_SIZE
-#ifndef ELF32_SH_C_INCLUDED
+#ifndef INCLUDE_SHMEDIA
+
#include "elf32-target.h"
-#endif
+/* QNX support. */
+#include "elf32-qnx.h"
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_shlqnx_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-shl-nto"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_shqnx_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-sh-nto"
+#undef ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 0x1000
+
+#define elf32_bed elf32_sh_qnx_bed
+
+#include "elf32-target.h"
+
+#undef elf_backend_set_nonloadable_filepos
+#undef elf_backend_is_contained_by_filepos
+#undef elf_backend_copy_private_bfd_data_p
+#undef elf32_bed
+
+/* NetBSD support. */
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_shnbsd_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-sh-nbsd"
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_shlnbsd_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-shl-nbsd"
+#undef ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 0x10000
+#undef elf_symbol_leading_char
+#define elf_symbol_leading_char 0
+
+#define elf32_bed elf32_sh_nbsd_bed
+
+#include "elf32-target.h"
+
+#undef elf32_bed
+
+/* Linux support. */
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_shblin_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-shbig-linux"
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_shlin_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-sh-linux"
+
+#undef elf_backend_grok_prstatus
+#define elf_backend_grok_prstatus elf32_shlin_grok_prstatus
+#undef elf_backend_grok_psinfo
+#define elf_backend_grok_psinfo elf32_shlin_grok_psinfo
+
+#define elf32_bed elf32_sh_lin_bed
+
+#include "elf32-target.h"
+
+#undef elf_backend_grok_prstatus
+#undef elf_backend_grok_psinfo
+#undef elf32_bed
+
+#endif /* INCLUDE_SHMEDIA */
diff --git a/bfd/elf32-sh64-nbsd.c b/bfd/elf32-sh64-nbsd.c
deleted file mode 100644
index 2d3e3d9..0000000
--- a/bfd/elf32-sh64-nbsd.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* SuperH SH64 specific support for 32-bit NetBSD
- Copyright 2002 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define TARGET_BIG_SYM bfd_elf32_sh64nbsd_vec
-#define TARGET_BIG_NAME "elf32-sh64-nbsd"
-#define TARGET_LITTLE_SYM bfd_elf32_sh64lnbsd_vec
-#define TARGET_LITTLE_NAME "elf32-sh64l-nbsd"
-#define ELF_ARCH bfd_arch_sh
-#define ELF_MACHINE_CODE EM_SH
-#define ELF_MAXPAGESIZE 0x10000
-#define elf_symbol_leading_char 0
-
-#include "elf32-sh64.c"
diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c
index 7a38fb22..c0df73d 100644
--- a/bfd/elf32-sh64.c
+++ b/bfd/elf32-sh64.c
@@ -89,18 +89,6 @@ static void sh64_find_section_for_address PARAMS ((bfd *, asection *, PTR));
define it true here. */
#define _bfd_sh_align_load_span(a,b,c,d,e,f,g,h,i,j) true
-#ifndef ELF_ARCH
-#define TARGET_BIG_SYM bfd_elf32_sh64_vec
-#define TARGET_BIG_NAME "elf32-sh64"
-#define TARGET_LITTLE_SYM bfd_elf32_sh64l_vec
-#define TARGET_LITTLE_NAME "elf32-sh64l"
-#define ELF_ARCH bfd_arch_sh
-#define ELF_MACHINE_CODE EM_SH
-#define ELF_MAXPAGESIZE 128
-
-#define elf_symbol_leading_char '_'
-#endif /* ELF_ARCH */
-
#define GOT_BIAS (-((long)-32768))
#define INCLUDE_SHMEDIA
#include "elf32-sh.c"
@@ -411,16 +399,19 @@ sh64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (h == NULL)
{
/* No previous datalabel symbol. Make one. */
+ struct bfd_link_hash_entry *bh = NULL;
+ struct elf_backend_data *bed = get_elf_backend_data (abfd);
+
if (! _bfd_generic_link_add_one_symbol (info, abfd, dl_name,
flags, *secp, *valp,
*namep, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h))
+ bed->collect, &bh))
{
free (dl_name);
return false;
}
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags &=~ ELF_LINK_NON_ELF;
h->type = STT_DATALABEL;
}
@@ -742,3 +733,50 @@ sh64_elf_final_write_processing (abfd, linker)
}
}
}
+
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_sh64_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-sh64"
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_sh64l_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-sh64l"
+
+#include "elf32-target.h"
+
+/* NetBSD support. */
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_sh64nbsd_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-sh64-nbsd"
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_sh64lnbsd_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-sh64l-nbsd"
+#undef ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 0x10000
+#undef elf_symbol_leading_char
+#define elf_symbol_leading_char 0
+
+#define elf32_bed elf32_sh64_nbsd_bed
+
+#include "elf32-target.h"
+
+#undef elf32_bed
+
+/* Linux support. */
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_sh64blin_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-sh64big-linux"
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_sh64lin_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-sh64-linux"
+
+#define elf32_bed elf32_sh64_lin_bed
+
+#include "elf32-target.h"
+
+#undef elf32_bed
diff --git a/bfd/elf32-shqnx.c b/bfd/elf32-shqnx.c
deleted file mode 100644
index a27c0f2..0000000
--- a/bfd/elf32-shqnx.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Hitachi SH QNX specific support for 32-bit ELF
- Copyright 2002 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define ELF32_SH_C_INCLUDED
-#include "elf32-sh.c"
-
-#include "elf32-qnx.h"
-
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM bfd_elf32_shlqnx_vec
-#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM bfd_elf32_shqnx_vec
-
-#include "elf32-target.h"
-
diff --git a/bfd/elf64-alpha-fbsd.c b/bfd/elf64-alpha-fbsd.c
deleted file mode 100644
index 061b0b8..0000000
--- a/bfd/elf64-alpha-fbsd.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Alpha specific support for 64-bit ELF on FreeBSD.
- Copyright 2002 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define TARGET_LITTLE_SYM bfd_elf64_alpha_freebsd_vec
-#define TARGET_LITTLE_NAME "elf64-alpha-freebsd"
-#define ELF_ARCH bfd_arch_alpha
-#define ELF_MACHINE_CODE EM_ALPHA
-#define ELF_MAXPAGESIZE 0x10000
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "elf-bfd.h"
-
-/* The kernel recognizes executables as valid only if they carry a
- "FreeBSD" label in the ELF header. So we put this label on all
- executables and (for simplicity) also all other object files. */
-
-static void elf_alpha_post_process_headers
- PARAMS ((bfd *, struct bfd_link_info *));
-
-static void
-elf_alpha_post_process_headers (abfd, link_info)
- bfd * abfd;
- struct bfd_link_info * link_info ATTRIBUTE_UNUSED;
-{
- Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */
-
- i_ehdrp = elf_elfheader (abfd);
-
- /* Put an ABI label supported by FreeBSD >= 4.1. */
- i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
-#ifdef OLD_FREEBSD_ABI_LABEL
- /* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard. */
- memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8);
-#endif
-}
-
-#define elf_backend_post_process_headers elf_alpha_post_process_headers
-
-#include "elf64-alpha.c"
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index e1d095d..ab053f9 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -2480,6 +2480,7 @@ elf64_alpha_create_dynamic_sections (abfd, info)
{
asection *s;
struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
/* We need to create .plt, .rela.plt, .got, and .rela.got sections. */
@@ -2495,13 +2496,13 @@ elf64_alpha_create_dynamic_sections (abfd, info)
/* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
.plt section. */
- h = NULL;
+ bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
(bfd_vma) 0, (const char *) NULL, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ get_elf_backend_data (abfd)->collect, &bh)))
return false;
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -2539,13 +2540,13 @@ elf64_alpha_create_dynamic_sections (abfd, info)
dynobj's .got section. We don't do this in the linker script
because we don't want to define the symbol if we are not creating
a global offset table. */
- h = NULL;
+ bh = NULL;
if (!(_bfd_generic_link_add_one_symbol
(info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL,
alpha_elf_tdata(abfd)->got, (bfd_vma) 0, (const char *) NULL,
- false, get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ false, get_elf_backend_data (abfd)->collect, &bh)))
return false;
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -3099,7 +3100,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
case R_ALPHA_REFLONG:
case R_ALPHA_REFQUAD:
- if (info->shared || maybe_dynamic)
+ if ((info->shared && (sec->flags & SEC_ALLOC)) || maybe_dynamic)
need = NEED_DYNREL;
break;
@@ -4576,7 +4577,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
case STO_ALPHA_NOPV:
break;
case STO_ALPHA_STD_GPLOAD:
- addend += 8;
+ value += 8;
break;
default:
if (h != NULL)
@@ -5509,13 +5510,11 @@ static const struct elf_size_info alpha_elf_size_info =
NULL
};
-#ifndef ELF_ARCH
#define TARGET_LITTLE_SYM bfd_elf64_alpha_vec
#define TARGET_LITTLE_NAME "elf64-alpha"
#define ELF_ARCH bfd_arch_alpha
#define ELF_MACHINE_CODE EM_ALPHA
#define ELF_MAXPAGESIZE 0x10000
-#endif /* ELF_ARCH */
#define bfd_elf64_bfd_link_hash_table_create \
elf64_alpha_bfd_link_hash_table_create
@@ -5581,3 +5580,42 @@ static const struct elf_size_info alpha_elf_size_info =
#define elf_backend_plt_header_size PLT_HEADER_SIZE
#include "elf64-target.h"
+
+/* FreeBSD support. */
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf64_alpha_freebsd_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf64-alpha-freebsd"
+
+/* The kernel recognizes executables as valid only if they carry a
+ "FreeBSD" label in the ELF header. So we put this label on all
+ executables and (for simplicity) also all other object files. */
+
+static void elf64_alpha_fbsd_post_process_headers
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+static void
+elf64_alpha_fbsd_post_process_headers (abfd, link_info)
+ bfd * abfd;
+ struct bfd_link_info * link_info ATTRIBUTE_UNUSED;
+{
+ Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */
+
+ i_ehdrp = elf_elfheader (abfd);
+
+ /* Put an ABI label supported by FreeBSD >= 4.1. */
+ i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
+#ifdef OLD_FREEBSD_ABI_LABEL
+ /* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard. */
+ memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8);
+#endif
+}
+
+#undef elf_backend_post_process_headers
+#define elf_backend_post_process_headers \
+ elf64_alpha_fbsd_post_process_headers
+
+#define elf64_bed elf64_alpha_fbsd_bed
+
+#include "elf64-target.h"
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index aef822a..3c8e00f 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -1855,6 +1855,11 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
return false;
}
+ /* Force DT_FLAGS to always be set.
+ Required by HPUX 11.00 patch PHSS_26559. */
+ if (!add_dynamic_entry (DT_FLAGS, (info)->flags))
+ return false;
+
if (plt)
{
if (!add_dynamic_entry (DT_PLTRELSZ, 0)
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 91610aa..da7c53f 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -3166,6 +3166,7 @@ func_desc_adjust (h, inf)
{
bfd *abfd;
asymbol *newsym;
+ struct bfd_link_hash_entry *bh;
abfd = h->root.u.undef.abfd;
newsym = bfd_make_empty_symbol (abfd);
@@ -3176,13 +3177,14 @@ func_desc_adjust (h, inf)
if (h->root.type == bfd_link_hash_undefweak)
newsym->flags |= BSF_WEAK;
+ bh = &fdh->root;
if ( !(_bfd_generic_link_add_one_symbol
(info, abfd, newsym->name, newsym->flags,
- newsym->section, newsym->value, NULL, false, false,
- (struct bfd_link_hash_entry **) &fdh)))
+ newsym->section, newsym->value, NULL, false, false, &bh)))
{
return false;
}
+ fdh = (struct elf_link_hash_entry *) bh;
fdh->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
}
@@ -3675,12 +3677,16 @@ edit_opd (obfd, info)
break;
}
- if (sym_sec->output_section == bfd_abs_section_ptr)
- {
- /* OK, we've found a function that's excluded from the
- link. */
- need_edit = true;
- }
+ /* opd entries are always for functions defined in the
+ current input bfd. If the symbol isn't defined in the
+ input bfd, then we won't be using the function in this
+ bfd; It must be defined in a linkonce section in another
+ bfd, or is weak. It's also possible that we are
+ discarding the function due to a linker script /DISCARD/,
+ which we test for via the output_section. */
+ if (sym_sec->owner != ibfd
+ || sym_sec->output_section == bfd_abs_section_ptr)
+ need_edit = true;
offset += 24;
}
@@ -3754,10 +3760,11 @@ edit_opd (obfd, info)
sym->st_shndx);
}
- skip = sym_sec->output_section == bfd_abs_section_ptr;
+ skip = (sym_sec->owner != ibfd
+ || sym_sec->output_section == bfd_abs_section_ptr);
if (skip)
{
- if (h != NULL)
+ if (h != NULL && sym_sec->owner == ibfd)
{
/* Arrange for the function descriptor sym
to be dropped. */
@@ -3797,8 +3804,7 @@ edit_opd (obfd, info)
for the function descriptor sym which we
don't have at the moment. So keep an
array of adjustments. */
- adjust[(rel->r_offset + wptr - rptr) / 24]
- = wptr - rptr;
+ adjust[rel->r_offset / 24] = wptr - rptr;
}
if (wptr != rptr)
@@ -5161,6 +5167,7 @@ ppc64_elf_build_stubs (info)
}
bfd_put_32 (htab->sglink->owner,
B_DOT | ((htab->sglink->contents - p) & 0x3fffffc), p);
+ indx++;
p += 4;
}
htab->sglink->_cooked_size = p - htab->sglink->contents;
diff --git a/bfd/elf64-sh64-nbsd.c b/bfd/elf64-sh64-nbsd.c
deleted file mode 100644
index 43e4eaf..0000000
--- a/bfd/elf64-sh64-nbsd.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* SuperH SH64 specific support for 64-bit NetBSD
- Copyright 2002 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define TARGET_BIG_SYM bfd_elf64_sh64nbsd_vec
-#define TARGET_BIG_NAME "elf64-sh64-nbsd"
-#define TARGET_LITTLE_SYM bfd_elf64_sh64lnbsd_vec
-#define TARGET_LITTLE_NAME "elf64-sh64l-nbsd"
-#define ELF_ARCH bfd_arch_sh
-#define ELF_MACHINE_CODE EM_SH
-#define ELF_MAXPAGESIZE 0x10000
-#define elf_symbol_leading_char 0
-
-#include "elf64-sh64.c"
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index 4fb695f..da02505 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -1588,6 +1588,35 @@ sh_elf64_relocate_section (output_bfd, info, input_bfd, input_section,
continue;
}
+ else if (! howto->partial_inplace)
+ {
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation |= ((sym->st_other & STO_SH5_ISA32) != 0);
+ }
+ else if ((sec->flags & SEC_MERGE)
+ && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ {
+ asection *msec;
+
+ if (howto->rightshift || howto->src_mask != 0xffffffff)
+ {
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): %s relocation against SEC_MERGE section"),
+ bfd_archive_filename (input_bfd),
+ bfd_get_section_name (input_bfd, input_section),
+ (long) rel->r_offset, howto->name);
+ return false;
+ }
+
+ addend = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ msec = sec;
+ addend =
+ _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend)
+ - relocation;
+ addend += msec->output_section->vma + msec->output_offset;
+ bfd_put_32 (input_bfd, addend, contents + rel->r_offset);
+ addend = 0;
+ }
}
else
{
@@ -2915,16 +2944,19 @@ sh64_elf64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (h == NULL)
{
/* No previous datalabel symbol. Make one. */
+ struct bfd_link_hash_entry *bh = NULL;
+ struct elf_backend_data *bed = get_elf_backend_data (abfd);
+
if (! _bfd_generic_link_add_one_symbol (info, abfd, dl_name,
flags, *secp, *valp,
*namep, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h))
+ bed->collect, &bh))
{
free (dl_name);
return false;
}
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags &=~ ELF_LINK_NON_ELF;
h->type = STT_DATALABEL;
}
@@ -3108,7 +3140,7 @@ static const bfd_byte elf_sh64_pic_plt_entry_be[PLT_ENTRY_SIZE] =
0x6f, 0xf0, 0xff, 0xf0, /* nop */
0x6f, 0xf0, 0xff, 0xf0, /* nop */
0xce, 0x00, 0x01, 0x10, /* movi -GOT_BIAS, r17 */
- 0x00, 0xcb, 0x45, 0x10, /* sub r12, r17, r17 */
+ 0x00, 0xc9, 0x45, 0x10, /* add r12, r17, r17 */
0x8d, 0x10, 0x09, 0x90, /* ld.q r17, 16, r25 */
0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
0x8d, 0x10, 0x05, 0x10, /* ld.q r17, 8, r17 */
@@ -3128,7 +3160,7 @@ static const bfd_byte elf_sh64_pic_plt_entry_le[PLT_ENTRY_SIZE] =
0xf0, 0xff, 0xf0, 0x6f, /* nop */
0xf0, 0xff, 0xf0, 0x6f, /* nop */
0x10, 0x01, 0x00, 0xce, /* movi -GOT_BIAS, r17 */
- 0x10, 0x45, 0xcb, 0x00, /* sub r12, r17, r17 */
+ 0x10, 0x45, 0xc9, 0x00, /* add r12, r17, r17 */
0x90, 0x09, 0x10, 0x8d, /* ld.q r17, 16, r25 */
0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
0x10, 0x05, 0x10, 0x8d, /* ld.q r17, 8, r17 */
@@ -3287,13 +3319,15 @@ sh64_elf64_create_dynamic_sections (abfd, info)
{
/* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
.plt section. */
- struct elf_link_hash_entry *h = NULL;
+ struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh = NULL;
+
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
- (bfd_vma) 0, (const char *) NULL, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ (bfd_vma) 0, (const char *) NULL, false, bed->collect, &bh)))
return false;
+
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -4124,8 +4158,6 @@ sh64_elf64_finish_dynamic_sections (output_bfd, info)
return true;
}
-
-#ifndef ELF_ARCH
#define TARGET_BIG_SYM bfd_elf64_sh64_vec
#define TARGET_BIG_NAME "elf64-sh64"
#define TARGET_LITTLE_SYM bfd_elf64_sh64l_vec
@@ -4135,7 +4167,6 @@ sh64_elf64_finish_dynamic_sections (output_bfd, info)
#define ELF_MAXPAGESIZE 128
#define elf_symbol_leading_char '_'
-#endif /* ELF_ARCH */
#define bfd_elf64_bfd_reloc_type_lookup sh_elf64_reloc_type_lookup
#define elf_info_to_howto sh_elf64_info_to_howto
@@ -4190,3 +4221,34 @@ sh64_elf64_finish_dynamic_sections (output_bfd, info)
#define elf_backend_plt_header_size PLT_ENTRY_SIZE
#include "elf64-target.h"
+
+/* NetBSD support. */
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf64_sh64nbsd_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf64-sh64-nbsd"
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf64_sh64lnbsd_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf64-sh64l-nbsd"
+#undef ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 0x10000
+#undef elf_symbol_leading_char
+#define elf_symbol_leading_char 0
+
+#define elf64_bed elf64_sh64_nbsd_bed
+
+#include "elf64-target.h"
+
+/* Linux support. */
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf64_sh64blin_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf64-sh64big-linux"
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf64_sh64lin_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf64-sh64-linux"
+
+#define INCLUDED_TARGET_FILE
+#include "elf64-target.h"
diff --git a/bfd/elfarm-nabi.c b/bfd/elfarm-nabi.c
index 1c07dc8..bd34a14 100644
--- a/bfd/elfarm-nabi.c
+++ b/bfd/elfarm-nabi.c
@@ -1,5 +1,5 @@
/* 32-bit ELF support for ARM new abi option.
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -27,7 +27,7 @@
#define NUM_ELEM(a) (sizeof (a) / (sizeof (a)[0]))
#endif
-#define USE_REL
+#define USE_REL 1
#define TARGET_LITTLE_SYM bfd_elf32_littlearm_vec
#define TARGET_LITTLE_NAME "elf32-littlearm"
@@ -749,6 +749,27 @@ elf32_arm_nabi_grok_psinfo (abfd, note)
#define elf_backend_grok_prstatus elf32_arm_nabi_grok_prstatus
#define elf_backend_grok_psinfo elf32_arm_nabi_grok_psinfo
-#ifndef ELFARM_NABI_C_INCLUDED
#include "elf32-arm.h"
-#endif
+
+/* QNX support. */
+#include "elf32-qnx.h"
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_littlearmqnx_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-littlearm-nto"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_bigarmqnx_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-bigarm-nto"
+#undef ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 0x1000
+
+#define elf32_bed elf32_arm_qnx_bed
+
+#include "elf32-target.h"
+
+#undef elf_backend_set_nonloadable_filepos
+#undef elf_backend_is_contained_by_filepos
+#undef elf_backend_copy_private_bfd_data_p
+#undef elf32_bed
diff --git a/bfd/elfarmqnx-nabi.c b/bfd/elfarmqnx-nabi.c
deleted file mode 100644
index 7647b3d..0000000
--- a/bfd/elfarmqnx-nabi.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* ARM new abi QNX specific support for 32-bit ELF
- Copyright 2002 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define ELFARM_NABI_C_INCLUDED
-#include "elfarm-nabi.c"
-
-#include "elf32-qnx.h"
-
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM bfd_elf32_littlearmqnx_vec
-#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM bfd_elf32_bigarmqnx_vec
-
-/* QNX Neutrino for ARM has a max pagesize of 0x1000. */
-#undef ELF_MAXPAGESIZE
-#define ELF_MAXPAGESIZE 0x1000
-
-#include "elf32-arm.h"
diff --git a/bfd/elflink.c b/bfd/elflink.c
index f8cc645..d6da588 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -33,6 +33,7 @@ _bfd_elf_create_got_section (abfd, info)
flagword flags;
register asection *s;
struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign;
@@ -79,12 +80,13 @@ _bfd_elf_create_got_section (abfd, info)
(or .got.plt) section. We don't do this in the linker script
because we don't want to define the symbol if we are not creating
a global offset table. */
- h = NULL;
+ bh = NULL;
if (!(_bfd_generic_link_add_one_symbol
(info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
bed->got_symbol_offset, (const char *) NULL, false,
- bed->collect, (struct bfd_link_hash_entry **) &h)))
+ bed->collect, &bh)))
return false;
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -151,13 +153,15 @@ _bfd_elf_create_dynamic_sections (abfd, info)
{
/* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
.plt section. */
- struct elf_link_hash_entry *h = NULL;
+ struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh = NULL;
+
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
(bfd_vma) 0, (const char *) NULL, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ get_elf_backend_data (abfd)->collect, &bh)))
return false;
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -546,29 +550,27 @@ _bfd_elf_create_linker_section (abfd, info, which, defaults)
if (lsect->sym_name)
{
- struct elf_link_hash_entry *h = NULL;
+ struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
+
#ifdef DEBUG
fprintf (stderr, "Adding %s to section %s\n",
lsect->sym_name,
lsect->name);
#endif
- h = (struct elf_link_hash_entry *)
- bfd_link_hash_lookup (info->hash, lsect->sym_name, false, false, false);
-
- if ((h == NULL || h->root.type == bfd_link_hash_undefined)
- && !(_bfd_generic_link_add_one_symbol (info,
- abfd,
- lsect->sym_name,
- BSF_GLOBAL,
- s,
- ((lsect->hole_size)
- ? s->_raw_size - lsect->hole_size + lsect->sym_offset
- : lsect->sym_offset),
- (const char *) NULL,
- false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
- return (elf_linker_section_t *)0;
+ bh = bfd_link_hash_lookup (info->hash, lsect->sym_name,
+ false, false, false);
+
+ if ((bh == NULL || bh->type == bfd_link_hash_undefined)
+ && !(_bfd_generic_link_add_one_symbol
+ (info, abfd, lsect->sym_name, BSF_GLOBAL, s,
+ (lsect->hole_size
+ ? s->_raw_size - lsect->hole_size + lsect->sym_offset
+ : lsect->sym_offset),
+ (const char *) NULL, false,
+ get_elf_backend_data (abfd)->collect, &bh)))
+ return (elf_linker_section_t *) 0;
+ h = (struct elf_link_hash_entry *) bh;
if ((defaults->which != LINKER_SECTION_SDATA)
&& (defaults->which != LINKER_SECTION_SDATA2))
@@ -579,7 +581,7 @@ _bfd_elf_create_linker_section (abfd, info, which, defaults)
if (info->shared
&& ! _bfd_elf_link_record_dynamic_symbol (info, h))
- return (elf_linker_section_t *)0;
+ return (elf_linker_section_t *) 0;
}
}
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 85160e9..03be87a 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -921,6 +921,7 @@ elf_add_default_symbol (abfd, info, h, name, sym, psec, value,
boolean size_change_ok;
char *shortname;
struct elf_link_hash_entry *hi;
+ struct bfd_link_hash_entry *bh;
struct elf_backend_data *bed;
boolean collect;
boolean dynamic;
@@ -979,11 +980,12 @@ elf_add_default_symbol (abfd, info, h, name, sym, psec, value,
if (! override)
{
+ bh = &hi->root;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, shortname, BSF_INDIRECT, bfd_ind_section_ptr,
- (bfd_vma) 0, name, false, collect,
- (struct bfd_link_hash_entry **) &hi)))
+ (bfd_vma) 0, name, false, collect, &bh)))
return false;
+ hi = (struct elf_link_hash_entry *) bh;
}
else
{
@@ -1098,11 +1100,12 @@ elf_add_default_symbol (abfd, info, h, name, sym, psec, value,
}
else
{
+ bh = &hi->root;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, shortname, BSF_INDIRECT,
- bfd_ind_section_ptr, (bfd_vma) 0, name, false,
- collect, (struct bfd_link_hash_entry **) &hi)))
+ bfd_ind_section_ptr, (bfd_vma) 0, name, false, collect, &bh)))
return false;
+ hi = (struct elf_link_hash_entry *) bh;
/* If there is a duplicate definition somewhere, then HI may not
point to an indirect symbol. We will have reported an error
@@ -1295,6 +1298,14 @@ elf_link_add_object_symbols (abfd, info)
const char *name;
bfd_size_type oldsize;
bfd_size_type strindex;
+ struct bfd_link_needed_list *rpath = NULL, *runpath = NULL;
+
+ /* ld --just-symbols and dynamic objects don't mix very well.
+ Test for --just-symbols by looking at info set up by
+ _bfd_elf_link_just_syms. */
+ if ((s = abfd->sections) != NULL
+ && elf_section_data (s)->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
+ goto error_return;
/* Find the name to use in a DT_NEEDED entry that refers to this
object. If the object has a DT_SONAME entry, we use it.
@@ -1324,8 +1335,6 @@ elf_link_add_object_symbols (abfd, info)
Elf_External_Dyn *extdynend;
int elfsec;
unsigned long shlink;
- int rpath;
- int runpath;
dynbuf = (Elf_External_Dyn *) bfd_malloc (s->_raw_size);
if (dynbuf == NULL)
@@ -1342,8 +1351,6 @@ elf_link_add_object_symbols (abfd, info)
extdyn = dynbuf;
extdynend = extdyn + s->_raw_size / sizeof (Elf_External_Dyn);
- rpath = 0;
- runpath = 0;
for (; extdyn < extdynend; extdyn++)
{
Elf_Internal_Dyn dyn;
@@ -1387,13 +1394,6 @@ elf_link_add_object_symbols (abfd, info)
char *fnm, *anm;
unsigned int tagv = dyn.d_un.d_val;
- /* When we see DT_RPATH before DT_RUNPATH, we have
- to clear runpath. Do _NOT_ bfd_release, as that
- frees all more recently bfd_alloc'd blocks as
- well. */
- if (rpath && hash_table->runpath)
- hash_table->runpath = NULL;
-
amt = sizeof (struct bfd_link_needed_list);
n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt);
fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
@@ -1407,13 +1407,11 @@ elf_link_add_object_symbols (abfd, info)
n->name = anm;
n->by = abfd;
n->next = NULL;
- for (pn = & hash_table->runpath;
+ for (pn = & runpath;
*pn != NULL;
pn = &(*pn)->next)
;
*pn = n;
- runpath = 1;
- rpath = 0;
}
/* Ignore DT_RPATH if we have seen DT_RUNPATH. */
if (!runpath && dyn.d_tag == DT_RPATH)
@@ -1439,18 +1437,32 @@ elf_link_add_object_symbols (abfd, info)
n->name = anm;
n->by = abfd;
n->next = NULL;
- for (pn = & hash_table->runpath;
+ for (pn = & rpath;
*pn != NULL;
pn = &(*pn)->next)
;
*pn = n;
- rpath = 1;
}
}
free (dynbuf);
}
+ /* DT_RUNPATH overrides DT_RPATH. Do _NOT_ bfd_release, as that
+ frees all more recently bfd_alloc'd blocks as well. */
+ if (runpath)
+ rpath = runpath;
+
+ if (rpath)
+ {
+ struct bfd_link_needed_list **pn;
+ for (pn = & hash_table->runpath;
+ *pn != NULL;
+ pn = &(*pn)->next)
+ ;
+ *pn = rpath;
+ }
+
/* We do not want to include any of the sections in a dynamic
object in the output file. We hack by simply clobbering the
list of sections in the BFD. This could be handled more
@@ -2292,6 +2304,7 @@ elf_link_create_dynamic_sections (abfd, info)
flagword flags;
register asection *s;
struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
struct elf_backend_data *bed;
if (! is_elf_hash_table (info))
@@ -2384,12 +2397,12 @@ elf_link_create_dynamic_sections (abfd, info)
creating a .dynamic section. We don't want to define it if there
is no .dynamic section, since on some ELF platforms the start up
code examines it to decide how to initialize the process. */
- h = NULL;
+ bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_DYNAMIC", BSF_GLOBAL, s, (bfd_vma) 0,
- (const char *) NULL, false, get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ (const char *) 0, false, get_elf_backend_data (abfd)->collect, &bh)))
return false;
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -3326,19 +3339,20 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
unsigned int cdeps;
struct bfd_elf_version_deps *n;
struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
cdeps = 0;
for (n = t->deps; n != NULL; n = n->next)
++cdeps;
/* Add a symbol representing this version. */
- h = NULL;
+ bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, dynobj, t->name, BSF_GLOBAL, bfd_abs_section_ptr,
(bfd_vma) 0, (const char *) NULL, false,
- get_elf_backend_data (dynobj)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ get_elf_backend_data (dynobj)->collect, &bh)))
return false;
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags &= ~ ELF_LINK_NON_ELF;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -4655,8 +4669,9 @@ struct elf_link_sort_rela
enum elf_reloc_type_class type;
union
{
- Elf_Internal_Rel rel;
- Elf_Internal_Rela rela;
+ /* We use these as arrays of size int_rels_per_ext_rel. */
+ Elf_Internal_Rel rel[1];
+ Elf_Internal_Rela rela[1];
} u;
};
@@ -4676,13 +4691,13 @@ elf_link_sort_cmp1 (A, B)
return 1;
if (relativea > relativeb)
return -1;
- if (ELF_R_SYM (a->u.rel.r_info) < ELF_R_SYM (b->u.rel.r_info))
+ if (ELF_R_SYM (a->u.rel->r_info) < ELF_R_SYM (b->u.rel->r_info))
return -1;
- if (ELF_R_SYM (a->u.rel.r_info) > ELF_R_SYM (b->u.rel.r_info))
+ if (ELF_R_SYM (a->u.rel->r_info) > ELF_R_SYM (b->u.rel->r_info))
return 1;
- if (a->u.rel.r_offset < b->u.rel.r_offset)
+ if (a->u.rel->r_offset < b->u.rel->r_offset)
return -1;
- if (a->u.rel.r_offset > b->u.rel.r_offset)
+ if (a->u.rel->r_offset > b->u.rel->r_offset)
return 1;
return 0;
}
@@ -4706,9 +4721,9 @@ elf_link_sort_cmp2 (A, B)
return -1;
if (copya > copyb)
return 1;
- if (a->u.rel.r_offset < b->u.rel.r_offset)
+ if (a->u.rel->r_offset < b->u.rel->r_offset)
return -1;
- if (a->u.rel.r_offset > b->u.rel.r_offset)
+ if (a->u.rel->r_offset > b->u.rel->r_offset)
return 1;
return 0;
}
@@ -4726,6 +4741,7 @@ elf_link_sort_relocs (abfd, info, psec)
size_t i, j, ret;
struct elf_link_sort_rela *rela;
struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ int i2e = bed->s->int_rels_per_ext_rel;
reldyn = bfd_get_section_by_name (abfd, ".rela.dyn");
if (reldyn == NULL || reldyn->_raw_size == 0)
@@ -4749,7 +4765,23 @@ elf_link_sort_relocs (abfd, info, psec)
if (size != reldyn->_raw_size)
return 0;
- rela = (struct elf_link_sort_rela *) bfd_zmalloc (sizeof (*rela) * count);
+ /* We waste some memory here when N = i2e is greater than 1, since
+ we allocate space for N * sizeof (*rela) where sizeof (*rela) +
+ (N - 1) * sizeof (Elf_Internal_Rel/Rela) would do. Also, we use
+ rela[k] only when k is a multiple of N, and then we index the
+ array within the union, such that rela[k].u.rel[i], i < N, is the
+ (i+1)th internal relocation corresponding to the (k/N)th external
+ relocation. This is done such that the relocation swap-in and
+ swap-out functions can gen pointers to arrays of internal
+ relocations that form a single external relocation.
+
+ If C permitted arrays of structures with dynamic sizes, we could
+ do better, but trying to avoid wasting space at the end of the
+ chunk from rela[k] to rela[k+N-1] would require us to allocate a
+ separate array of pointers and since most ports have N == 1, this
+ would be more wasteful. */
+ rela = (struct elf_link_sort_rela *) bfd_zmalloc
+ (sizeof (*rela) * count * i2e);
if (rela == NULL)
{
(*info->callbacks->warning)
@@ -4770,15 +4802,16 @@ elf_link_sort_relocs (abfd, info, psec)
erel = (Elf_External_Rel *) o->contents;
erelend = (Elf_External_Rel *) (o->contents + o->_raw_size);
- s = rela + o->output_offset / sizeof (Elf_External_Rel);
- for (; erel < erelend; erel++, s++)
+ s = rela + (o->output_offset / sizeof (Elf_External_Rel) * i2e);
+ for (; erel < erelend; erel++, s += i2e)
{
if (bed->s->swap_reloc_in)
- (*bed->s->swap_reloc_in) (abfd, (bfd_byte *) erel, &s->u.rel);
+ (*bed->s->swap_reloc_in) (abfd, (bfd_byte *) erel,
+ s->u.rel);
else
- elf_swap_reloc_in (abfd, erel, &s->u.rel);
+ elf_swap_reloc_in (abfd, erel, s->u.rel);
- s->type = (*bed->elf_backend_reloc_type_class) (&s->u.rela);
+ s->type = (*bed->elf_backend_reloc_type_class) (s->u.rela);
}
}
else
@@ -4788,30 +4821,34 @@ elf_link_sort_relocs (abfd, info, psec)
erela = (Elf_External_Rela *) o->contents;
erelaend = (Elf_External_Rela *) (o->contents + o->_raw_size);
- s = rela + o->output_offset / sizeof (Elf_External_Rela);
- for (; erela < erelaend; erela++, s++)
+ s = rela + (o->output_offset / sizeof (Elf_External_Rela) * i2e);
+ for (; erela < erelaend; erela++, s += i2e)
{
if (bed->s->swap_reloca_in)
(*bed->s->swap_reloca_in) (dynobj, (bfd_byte *) erela,
- &s->u.rela);
+ s->u.rela);
else
- elf_swap_reloca_in (dynobj, erela, &s->u.rela);
+ elf_swap_reloca_in (dynobj, erela, s->u.rela);
- s->type = (*bed->elf_backend_reloc_type_class) (&s->u.rela);
+ s->type = (*bed->elf_backend_reloc_type_class) (s->u.rela);
}
}
}
- qsort (rela, (size_t) count, sizeof (*rela), elf_link_sort_cmp1);
- for (ret = 0; ret < count && rela[ret].type == reloc_class_relative; ret++)
+ qsort (rela, (size_t) count, sizeof (*rela) * i2e, elf_link_sort_cmp1);
+ for (ret = 0; ret < count * i2e && rela[ret].type == reloc_class_relative;
+ ret += i2e)
;
- for (i = ret, j = ret; i < count; i++)
+ for (i = ret, j = ret; i < count * i2e; i += i2e)
{
- if (ELF_R_SYM (rela[i].u.rel.r_info) != ELF_R_SYM (rela[j].u.rel.r_info))
+ if (ELF_R_SYM (rela[i].u.rel->r_info)
+ != ELF_R_SYM (rela[j].u.rel->r_info))
j = i;
- rela[i].offset = rela[j].u.rel.r_offset;
+ rela[i].offset = rela[j].u.rel->r_offset;
}
- qsort (rela + ret, (size_t) count - ret, sizeof (*rela), elf_link_sort_cmp2);
+ ret /= i2e;
+ qsort (rela + ret, (size_t) count - ret,
+ sizeof (*rela) * i2e, elf_link_sort_cmp2);
for (o = dynobj->sections; o != NULL; o = o->next)
if ((o->flags & (SEC_HAS_CONTENTS|SEC_LINKER_CREATED))
@@ -4825,14 +4862,14 @@ elf_link_sort_relocs (abfd, info, psec)
erel = (Elf_External_Rel *) o->contents;
erelend = (Elf_External_Rel *) (o->contents + o->_raw_size);
- s = rela + o->output_offset / sizeof (Elf_External_Rel);
- for (; erel < erelend; erel++, s++)
+ s = rela + (o->output_offset / sizeof (Elf_External_Rel) * i2e);
+ for (; erel < erelend; erel++, s += i2e)
{
if (bed->s->swap_reloc_out)
- (*bed->s->swap_reloc_out) (abfd, &s->u.rel,
+ (*bed->s->swap_reloc_out) (abfd, s->u.rel,
(bfd_byte *) erel);
else
- elf_swap_reloc_out (abfd, &s->u.rel, erel);
+ elf_swap_reloc_out (abfd, s->u.rel, erel);
}
}
else
@@ -4842,14 +4879,14 @@ elf_link_sort_relocs (abfd, info, psec)
erela = (Elf_External_Rela *) o->contents;
erelaend = (Elf_External_Rela *) (o->contents + o->_raw_size);
- s = rela + o->output_offset / sizeof (Elf_External_Rela);
- for (; erela < erelaend; erela++, s++)
+ s = rela + (o->output_offset / sizeof (Elf_External_Rela) * i2e);
+ for (; erela < erelaend; erela++, s += i2e)
{
if (bed->s->swap_reloca_out)
- (*bed->s->swap_reloca_out) (dynobj, &s->u.rela,
+ (*bed->s->swap_reloca_out) (dynobj, s->u.rela,
(bfd_byte *) erela);
else
- elf_swap_reloca_out (dynobj, &s->u.rela, erela);
+ elf_swap_reloca_out (dynobj, s->u.rela, erela);
}
}
}
@@ -6815,20 +6852,12 @@ elf_link_input_bfd (finfo, input_bfd)
|| h->root.type == bfd_link_hash_defweak)
&& elf_discarded_section (h->root.u.def.section))
{
-#if BFD_VERSION_DATE < 20031005
if ((o->flags & SEC_DEBUGGING) != 0)
{
-#if BFD_VERSION_DATE > 20021005
- (*finfo->info->callbacks->warning)
- (finfo->info,
- _("warning: relocation against removed section; zeroing"),
- NULL, input_bfd, o, rel->r_offset);
-#endif
BFD_ASSERT (r_symndx != 0);
memset (rel, 0, sizeof (*rel));
}
else
-#endif
{
if (! ((*finfo->info->callbacks->undefined_symbol)
(finfo->info, h->root.root.string,
@@ -6844,23 +6873,15 @@ elf_link_input_bfd (finfo, input_bfd)
if (sec != NULL && elf_discarded_section (sec))
{
-#if BFD_VERSION_DATE < 20031005
if ((o->flags & SEC_DEBUGGING) != 0
|| (sec->flags & SEC_LINK_ONCE) != 0)
{
-#if BFD_VERSION_DATE > 20021005
- (*finfo->info->callbacks->warning)
- (finfo->info,
- _("warning: relocation against removed section"),
- NULL, input_bfd, o, rel->r_offset);
-#endif
BFD_ASSERT (r_symndx != 0);
rel->r_info
= ELF_R_INFO (0, ELF_R_TYPE (rel->r_info));
rel->r_addend = 0;
}
else
-#endif
{
boolean ok;
const char *msg
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 2a29347..5da8e43 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -647,13 +647,14 @@ static const bfd_byte plt_full_entry[PLT_FULL_ENTRY_SIZE] =
not support brl, and so it gets emulated by the kernel. */
#undef USE_BRL
+#ifdef USE_BRL
static const bfd_byte oor_brl[16] =
{
0x05, 0x00, 0x00, 0x00, 0x01, 0x00, /* [MLX] nop.m 0 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* brl.sptk.few tgt;; */
0x00, 0x00, 0x00, 0xc0
};
-
+#else
static const bfd_byte oor_ip[48] =
{
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, /* [MLX] nop.m 0 */
@@ -666,6 +667,7 @@ static const bfd_byte oor_ip[48] =
0x60, 0x80, 0x04, 0x80, 0x03, 0x00, /* mov b6=r16 */
0x60, 0x00, 0x80, 0x00 /* br b6;; */
};
+#endif
/* These functions do relaxation for IA-64 ELF.
@@ -1282,6 +1284,7 @@ elfNN_ia64_aix_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
{
struct elf_backend_data *bed;
struct elfNN_ia64_link_hash_table *ia64_info;
+ struct bfd_link_hash_entry *bh = NULL;
bed = get_elf_backend_data (abfd);
ia64_info = elfNN_ia64_hash_table (info);
@@ -1290,9 +1293,10 @@ elfNN_ia64_aix_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
(info, abfd, *namep, BSF_GLOBAL,
bfd_get_section_by_name (abfd, ".bss"),
bed->got_symbol_offset, (const char *) NULL, false,
- bed->collect, (struct bfd_link_hash_entry **) &h)))
+ bed->collect, &bh)))
return false;
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 3c8bb5d..bc81458 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -345,7 +345,7 @@ static bfd_reloc_status_type mips_elf_calculate_relocation
PARAMS ((bfd *, bfd *, asection *, struct bfd_link_info *,
const Elf_Internal_Rela *, bfd_vma, reloc_howto_type *,
Elf_Internal_Sym *, asection **, bfd_vma *, const char **,
- boolean *));
+ boolean *, boolean));
static bfd_vma mips_elf_obtain_contents
PARAMS ((reloc_howto_type *, const Elf_Internal_Rela *, bfd *, bfd_byte *));
static boolean mips_elf_perform_relocation
@@ -1901,6 +1901,7 @@ mips_elf_create_got_section (abfd, info)
flagword flags;
register asection *s;
struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
struct mips_got_info *g;
bfd_size_type amt;
@@ -1920,13 +1921,14 @@ mips_elf_create_got_section (abfd, info)
/* Define the symbol _GLOBAL_OFFSET_TABLE_. We don't do this in the
linker script because we don't want to define the symbol if we
are not creating a global offset table. */
- h = NULL;
+ bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
(bfd_vma) 0, (const char *) NULL, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ get_elf_backend_data (abfd)->collect, &bh)))
return false;
+
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -2004,7 +2006,7 @@ static bfd_reloc_status_type
mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
relocation, addend, howto, local_syms,
local_sections, valuep, namep,
- require_jalxp)
+ require_jalxp, save_addend)
bfd *abfd;
bfd *input_bfd;
asection *input_section;
@@ -2017,6 +2019,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
bfd_vma *valuep;
const char **namep;
boolean *require_jalxp;
+ boolean save_addend;
{
/* The eventual value we will return. */
bfd_vma value;
@@ -2041,7 +2044,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
struct mips_elf_link_hash_entry *h = NULL;
/* True if the symbol referred to by this relocation is a local
symbol. */
- boolean local_p;
+ boolean local_p, was_local_p;
/* True if the symbol referred to by this relocation is "_gp_disp". */
boolean gp_disp_p = false;
Elf_Internal_Shdr *symtab_hdr;
@@ -2069,6 +2072,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
local_p = mips_elf_local_relocation_p (input_bfd, relocation,
local_sections, false);
+ was_local_p = local_p;
if (! elf_bad_symtab (input_bfd))
extsymoff = symtab_hdr->sh_info;
else
@@ -2456,10 +2460,19 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
order. We don't need to do anything special here; the
differences are handled in mips_elf_perform_relocation. */
case R_MIPS_GPREL16:
- if (local_p)
- value = mips_elf_sign_extend (addend, 16) + symbol + gp0 - gp;
- else
- value = mips_elf_sign_extend (addend, 16) + symbol - gp;
+ /* Only sign-extend the addend if it was extracted from the
+ instruction. If the addend was separate, leave it alone,
+ otherwise we may lose significant bits. */
+ if (howto->partial_inplace)
+ addend = mips_elf_sign_extend (addend, 16);
+ value = symbol + addend - gp;
+ /* If the symbol was local, any earlier relocatable links will
+ have adjusted its addend with the gp offset, so compensate
+ for that now. Don't do it for symbols forced local in this
+ link, though, since they won't have had the gp offset applied
+ to them before. */
+ if (was_local_p)
+ value += gp0;
overflowed_p = mips_elf_overflow_p (value, 16);
break;
@@ -2492,7 +2505,9 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
break;
case R_MIPS_GPREL32:
- value = (addend + symbol + gp0 - gp) & howto->dst_mask;
+ value = (addend + symbol + gp0 - gp);
+ if (!save_addend)
+ value &= howto->dst_mask;
break;
case R_MIPS_PC16:
@@ -2938,6 +2953,12 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
know where the shared library will wind up at load-time. */
outrel[0].r_info = ELF_R_INFO (output_bfd, (unsigned long) indx,
R_MIPS_REL32);
+ outrel[1].r_info = ELF_R_INFO (output_bfd, (unsigned long) 0,
+ ABI_64_P (output_bfd)
+ ? R_MIPS_64
+ : R_MIPS_NONE);
+ outrel[2].r_info = ELF_R_INFO (output_bfd, (unsigned long) 0,
+ R_MIPS_NONE);
/* Adjust the output offset of the relocation to reference the
correct location in the output file. */
@@ -3825,15 +3846,17 @@ _bfd_mips_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
&& strcmp (*namep, "__rld_obj_head") == 0)
{
struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
/* Mark __rld_obj_head as dynamic. */
- h = NULL;
+ bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, *namep, BSF_GLOBAL, *secp,
(bfd_vma) *valp, (const char *) NULL, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ get_elf_backend_data (abfd)->collect, &bh)))
return false;
+
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -3889,6 +3912,7 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
struct bfd_link_info *info;
{
struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
flagword flags;
register asection *s;
const char * const *namep;
@@ -3947,13 +3971,14 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
{
for (namep = mips_elf_dynsym_rtproc_names; *namep != NULL; namep++)
{
- h = NULL;
+ bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, *namep, BSF_GLOBAL, bfd_und_section_ptr,
(bfd_vma) 0, (const char *) NULL, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ get_elf_backend_data (abfd)->collect, &bh)))
return false;
+
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_SECTION;
@@ -3989,26 +4014,17 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
if (!info->shared)
{
- h = NULL;
- if (SGI_COMPAT (abfd))
- {
- if (!(_bfd_generic_link_add_one_symbol
- (info, abfd, "_DYNAMIC_LINK", BSF_GLOBAL, bfd_abs_section_ptr,
- (bfd_vma) 0, (const char *) NULL, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
- return false;
- }
- else
- {
- /* For normal mips it is _DYNAMIC_LINKING. */
- if (!(_bfd_generic_link_add_one_symbol
- (info, abfd, "_DYNAMIC_LINKING", BSF_GLOBAL,
- bfd_abs_section_ptr, (bfd_vma) 0, (const char *) NULL, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
- return false;
- }
+ const char *name;
+
+ name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
+ bh = NULL;
+ if (!(_bfd_generic_link_add_one_symbol
+ (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr,
+ (bfd_vma) 0, (const char *) NULL, false,
+ get_elf_backend_data (abfd)->collect, &bh)))
+ return false;
+
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_SECTION;
@@ -4025,26 +4041,15 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
s = bfd_get_section_by_name (abfd, ".rld_map");
BFD_ASSERT (s != NULL);
- h = NULL;
- if (SGI_COMPAT (abfd))
- {
- if (!(_bfd_generic_link_add_one_symbol
- (info, abfd, "__rld_map", BSF_GLOBAL, s,
- (bfd_vma) 0, (const char *) NULL, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
- return false;
- }
- else
- {
- /* For normal mips the symbol is __RLD_MAP. */
- if (!(_bfd_generic_link_add_one_symbol
- (info, abfd, "__RLD_MAP", BSF_GLOBAL, s,
- (bfd_vma) 0, (const char *) NULL, false,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
- return false;
- }
+ name = SGI_COMPAT (abfd) ? "__rld_map" : "__RLD_MAP";
+ bh = NULL;
+ if (!(_bfd_generic_link_add_one_symbol
+ (info, abfd, name, BSF_GLOBAL, s,
+ (bfd_vma) 0, (const char *) NULL, false,
+ get_elf_backend_data (abfd)->collect, &bh)))
+ return false;
+
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -5261,7 +5266,8 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
input_section, info, rel,
addend, howto, local_syms,
local_sections, &value,
- &name, &require_jalx))
+ &name, &require_jalx,
+ use_saved_addend_p))
{
case bfd_reloc_continue:
/* There's nothing to do. */
@@ -6131,7 +6137,12 @@ _bfd_mips_elf_modify_segment_map (abfd)
.dynamic end up in PT_DYNAMIC. However, we do have to insert a
PT_OPTIONS segment immediately following the program header
table. */
- if (NEWABI_P (abfd))
+ if (NEWABI_P (abfd)
+ /* On non-IRIX6 new abi, we'll have already created a segment
+ for this section, so don't create another. I'm not sure this
+ is not also the case for IRIX 6, but I can't test it right
+ now. */
+ && IRIX_COMPAT (abfd) == ict_irix6)
{
for (s = abfd->sections; s; s = s->next)
if (elf_section_data (s)->this_hdr.sh_type == SHT_MIPS_OPTIONS)
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index 8da7256..4f5b81c 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -407,9 +407,6 @@
For backwards compatibility, we still support this usage. */
#ifndef USE_REL
#define USE_REL 0
-#else
-#undef USE_REL
-#define USE_REL 1
#endif
/* Use these in new code. */
diff --git a/bfd/format.c b/bfd/format.c
index 1efa9e2..ef6b46e 100644
--- a/bfd/format.c
+++ b/bfd/format.c
@@ -132,7 +132,7 @@ bfd_check_format_matches (abfd, format, matching)
}
if (abfd->format != bfd_unknown)
- return abfd->format == format;
+ return (boolean) (abfd->format == format);
/* Since the target type was defaulted, check them
all in the hope that one will be uniquely recognized. */
@@ -355,7 +355,7 @@ bfd_set_format (abfd, format)
}
if (abfd->format != bfd_unknown)
- return abfd->format == format;
+ return (boolean) (abfd->format == format);
/* Presume the answer is yes. */
abfd->format = format;
diff --git a/bfd/gen-aout.c b/bfd/gen-aout.c
index 1bba14a..b6720e8 100644
--- a/bfd/gen-aout.c
+++ b/bfd/gen-aout.c
@@ -21,6 +21,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "/usr/include/a.out.h"
#include <stdio.h>
+#ifndef _
+#define _(X) X
+#endif
+
int
main (argc, argv)
int argc; char** argv;
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index 29170a0..f21abbc 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -186,9 +186,9 @@ bfd_realloc (ptr, size)
}
if (ptr == NULL)
- ret = malloc ((size_t) size);
+ ret = (PTR) malloc ((size_t) size);
else
- ret = realloc (ptr, (size_t) size);
+ ret = (PTR) realloc (ptr, (size_t) size);
if (ret == NULL && (size_t) size != 0)
bfd_set_error (bfd_error_no_memory);
@@ -562,7 +562,7 @@ bfd_bwrite (ptr, size, abfd)
newsize = (bim->size + 127) & ~(bfd_size_type) 127;
if (newsize > oldsize)
{
- bim->buffer = bfd_realloc (bim->buffer, newsize);
+ bim->buffer = (bfd_byte *) bfd_realloc (bim->buffer, newsize);
if (bim->buffer == 0)
{
bim->size = 0;
@@ -608,7 +608,7 @@ bfd_write_bigendian_4byte_int (abfd, i)
{
bfd_byte buffer[4];
bfd_putb32 ((bfd_vma) i, buffer);
- return bfd_bwrite ((PTR) buffer, (bfd_size_type) 4, abfd) == 4;
+ return (boolean) (bfd_bwrite ((PTR) buffer, (bfd_size_type) 4, abfd) == 4);
}
bfd_vma
@@ -706,7 +706,7 @@ bfd_seek (abfd, position, direction)
newsize = (bim->size + 127) & ~(bfd_size_type) 127;
if (newsize > oldsize)
{
- bim->buffer = bfd_realloc (bim->buffer, newsize);
+ bim->buffer = (bfd_byte *) bfd_realloc (bim->buffer, newsize);
if (bim->buffer == 0)
{
bim->size = 0;
@@ -1414,7 +1414,7 @@ bfd_generic_is_local_label_name (abfd, name)
{
char locals_prefix = (bfd_get_symbol_leading_char (abfd) == '_') ? 'L' : '.';
- return (name[0] == locals_prefix);
+ return (boolean) (name[0] == locals_prefix);
}
/* Can be used from / for bfd_merge_private_bfd_data to check that
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 96e55d7..ef001f3 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -1005,6 +1005,14 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_SH_IMM_HI16",
"BFD_RELOC_SH_IMM_HI16_PCREL",
"BFD_RELOC_SH_PT_16",
+ "BFD_RELOC_SH_TLS_GD_32",
+ "BFD_RELOC_SH_TLS_LD_32",
+ "BFD_RELOC_SH_TLS_LDO_32",
+ "BFD_RELOC_SH_TLS_IE_32",
+ "BFD_RELOC_SH_TLS_LE_32",
+ "BFD_RELOC_SH_TLS_DTPMOD32",
+ "BFD_RELOC_SH_TLS_DTPOFF32",
+ "BFD_RELOC_SH_TLS_TPOFF32",
"BFD_RELOC_THUMB_PCREL_BRANCH9",
"BFD_RELOC_THUMB_PCREL_BRANCH12",
"BFD_RELOC_THUMB_PCREL_BRANCH23",
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
index 88b0909..ea9c570 100644
--- a/bfd/libcoff.h
+++ b/bfd/libcoff.h
@@ -784,7 +784,7 @@ typedef struct
struct coff_link_hash_entry *, struct internal_syment *,
bfd_vma *));
- boolean (*_bfd_coff_adjust_symndx)\
+ boolean (*_bfd_coff_adjust_symndx)
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
struct internal_reloc *, boolean *));
diff --git a/bfd/linker.c b/bfd/linker.c
index 242f8bd..a5ded1f 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -449,7 +449,8 @@ _bfd_link_hash_newfunc (entry, table, string)
subclass. */
if (entry == NULL)
{
- entry = bfd_hash_allocate (table, sizeof (struct bfd_link_hash_entry));
+ entry = (struct bfd_hash_entry *)
+ bfd_hash_allocate (table, sizeof (struct bfd_link_hash_entry));
if (entry == NULL)
return entry;
}
@@ -645,8 +646,8 @@ _bfd_generic_link_hash_newfunc (entry, table, string)
subclass. */
if (entry == NULL)
{
- entry = bfd_hash_allocate (table,
- sizeof (struct generic_link_hash_entry));
+ entry = (struct bfd_hash_entry *)
+ bfd_hash_allocate (table, sizeof (struct generic_link_hash_entry));
if (entry == NULL)
return entry;
}
@@ -1305,6 +1306,7 @@ generic_link_add_symbol_list (abfd, info, symbol_count, symbols, collect)
const char *name;
const char *string;
struct generic_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
name = bfd_asymbol_name (p);
if (((p->flags & BSF_INDIRECT) != 0
@@ -1326,12 +1328,12 @@ generic_link_add_symbol_list (abfd, info, symbol_count, symbols, collect)
else
string = NULL;
- h = NULL;
+ bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, name, p->flags, bfd_get_section (p),
- p->value, string, false, collect,
- (struct bfd_link_hash_entry **) &h)))
+ p->value, string, false, collect, &bh)))
return false;
+ h = (struct generic_link_hash_entry *) bh;
/* If this is a constructor symbol, and the linker didn't do
anything with it, then we want to just pass the symbol
@@ -2018,7 +2020,7 @@ _bfd_generic_final_link (abfd, info)
for (o = abfd->sections; o != NULL; o = o->next)
for (p = o->link_order_head; p != NULL; p = p->next)
if (p->type == bfd_indirect_link_order)
- p->u.indirect.section->linker_mark = true;
+ p->u.indirect.section->linker_mark = (unsigned int) true;
/* Build the output symbol table. */
for (sub = info->input_bfds; sub != (bfd *) NULL; sub = sub->link_next)
diff --git a/bfd/merge.c b/bfd/merge.c
index ce61207..9dc2e70 100644
--- a/bfd/merge.c
+++ b/bfd/merge.c
@@ -353,7 +353,7 @@ sec_merge_emit (abfd, entry)
if (alignment_power)
free (pad);
- return entry == NULL || entry->secinfo != secinfo;
+ return (boolean) (entry == NULL || entry->secinfo != secinfo);
}
/* This function is called for each input file from the add_symbols
@@ -667,7 +667,7 @@ merge_strings (sinfo)
break;
if (e->len > 4 * e->u.entsize)
{
- s = e->root.string + e->len - e->u.entsize;
+ s = (const unsigned char *) (e->root.string + e->len - e->u.entsize);
hash = 0;
for (i = 0; i < 4 * e->u.entsize; i++)
{
@@ -690,7 +690,7 @@ merge_strings (sinfo)
else
*p = (PTR) e;
}
- s = e->root.string + e->len - e->u.entsize;
+ s = (const unsigned char *) (e->root.string + e->len - e->u.entsize);
hash = 0;
for (i = 0; i < e->u.entsize; i++)
{
diff --git a/bfd/opncls.c b/bfd/opncls.c
index cdf08df..af8ff7e 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -63,7 +63,9 @@ _bfd_new_bfd ()
nbfd->direction = no_direction;
nbfd->iostream = NULL;
nbfd->where = 0;
- if (!bfd_hash_table_init (&nbfd->section_htab, bfd_section_hash_newfunc))
+ if (!bfd_hash_table_init_n (&nbfd->section_htab,
+ bfd_section_hash_newfunc,
+ 251))
{
free (nbfd);
return NULL;
@@ -124,7 +126,7 @@ FUNCTION
bfd_openr
SYNOPSIS
- bfd *bfd_openr(const char *filename, const char *target);
+ bfd *bfd_openr(const char *filename, const char *target);
DESCRIPTION
Open the file @var{filename} (using <<fopen>>) with the target
@@ -134,7 +136,8 @@ DESCRIPTION
that function.
If <<NULL>> is returned then an error has occured. Possible errors
- are <<bfd_error_no_memory>>, <<bfd_error_invalid_target>> or <<system_call>> error.
+ are <<bfd_error_no_memory>>, <<bfd_error_invalid_target>> or
+ <<system_call>> error.
*/
bfd *
@@ -179,28 +182,28 @@ bfd_openr (filename, target)
the file descriptor too, even though we didn't open it. */
/*
FUNCTION
- bfd_fdopenr
+ bfd_fdopenr
SYNOPSIS
- bfd *bfd_fdopenr(const char *filename, const char *target, int fd);
+ bfd *bfd_fdopenr(const char *filename, const char *target, int fd);
DESCRIPTION
- <<bfd_fdopenr>> is to <<bfd_fopenr>> much like <<fdopen>> is to <<fopen>>.
- It opens a BFD on a file already described by the @var{fd}
- supplied.
-
- When the file is later <<bfd_close>>d, the file descriptor will be closed.
-
- If the caller desires that this file descriptor be cached by BFD
- (opened as needed, closed as needed to free descriptors for
- other opens), with the supplied @var{fd} used as an initial
- file descriptor (but subject to closure at any time), call
- bfd_set_cacheable(bfd, 1) on the returned BFD. The default is to
- assume no cacheing; the file descriptor will remain open until
- <<bfd_close>>, and will not be affected by BFD operations on other
- files.
-
- Possible errors are <<bfd_error_no_memory>>, <<bfd_error_invalid_target>> and <<bfd_error_system_call>>.
+ <<bfd_fdopenr>> is to <<bfd_fopenr>> much like <<fdopen>> is to
+ <<fopen>>. It opens a BFD on a file already described by the
+ @var{fd} supplied.
+
+ When the file is later <<bfd_close>>d, the file descriptor will
+ be closed. If the caller desires that this file descriptor be
+ cached by BFD (opened as needed, closed as needed to free
+ descriptors for other opens), with the supplied @var{fd} used as
+ an initial file descriptor (but subject to closure at any time),
+ call bfd_set_cacheable(bfd, 1) on the returned BFD. The default
+ is to assume no cacheing; the file descriptor will remain open
+ until <<bfd_close>>, and will not be affected by BFD operations
+ on other files.
+
+ Possible errors are <<bfd_error_no_memory>>,
+ <<bfd_error_invalid_target>> and <<bfd_error_system_call>>.
*/
bfd *
@@ -389,10 +392,10 @@ SYNOPSIS
DESCRIPTION
- Close a BFD. If the BFD was open for writing,
- then pending operations are completed and the file written out
- and closed. If the created file is executable, then
- <<chmod>> is called to mark it as such.
+ Close a BFD. If the BFD was open for writing, then pending
+ operations are completed and the file written out and closed.
+ If the created file is executable, then <<chmod>> is called
+ to mark it as such.
All memory attached to the BFD is released.
@@ -431,7 +434,7 @@ bfd_close (abfd)
if (stat (abfd->filename, &buf) == 0)
{
- unsigned int mask = umask (0);
+ unsigned int mask = umask (0);
umask (mask);
chmod (abfd->filename,
@@ -453,10 +456,10 @@ SYNOPSIS
boolean bfd_close_all_done(bfd *);
DESCRIPTION
- Close a BFD. Differs from <<bfd_close>>
- since it does not complete any pending operations. This
- routine would be used if the application had just used BFD for
- swapping and didn't want to use any of the writing code.
+ Close a BFD. Differs from <<bfd_close>> since it does not
+ complete any pending operations. This routine would be used
+ if the application had just used BFD for swapping and didn't
+ want to use any of the writing code.
If the created file is executable, then <<chmod>> is called
to mark it as such.
@@ -507,10 +510,9 @@ SYNOPSIS
bfd *bfd_create(const char *filename, bfd *templ);
DESCRIPTION
- Create a new BFD in the manner of
- <<bfd_openw>>, but without opening a file. The new BFD
- takes the target from the target used by @var{template}. The
- format is always set to <<bfd_object>>.
+ Create a new BFD in the manner of <<bfd_openw>>, but without
+ opening a file. The new BFD takes the target from the target
+ used by @var{template}. The format is always set to <<bfd_object>>.
*/
bfd *
diff --git a/bfd/po/BLD-POTFILES.in b/bfd/po/BLD-POTFILES.in
index 28f599d..2dbe723 100644
--- a/bfd/po/BLD-POTFILES.in
+++ b/bfd/po/BLD-POTFILES.in
@@ -1,3 +1,4 @@
+bfdver.h
elf32-ia64.c
elf32-target.h
elf64-ia64.c
diff --git a/bfd/po/SRC-POTFILES.in b/bfd/po/SRC-POTFILES.in
index 27ce9a9..c95e01e 100644
--- a/bfd/po/SRC-POTFILES.in
+++ b/bfd/po/SRC-POTFILES.in
@@ -137,9 +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
elf32-i960.c
elf32-ip2k.c
@@ -154,21 +152,17 @@ elf32-openrisc.c
elf32-or32.c
elf32-pj.c
elf32-ppc.c
-elf32-ppcqnx.c
+elf32-qnx.c
+elf32-qnx.h
elf32-s390.c
-elf32-sh-lin.c
-elf32-sh-nbsd.c
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
@@ -177,14 +171,12 @@ elf64-mips.c
elf64-mmix.c
elf64-ppc.c
elf64-s390.c
-elf64-sh64-nbsd.c
elf64-sh64.c
elf64-sparc.c
elf64-x86-64.c
elf64.c
elfarm-nabi.c
elfarm-oabi.c
-elfarmqnx-nabi.c
elfcode.h
elfcore.h
elflink.c
@@ -274,6 +266,7 @@ reloc16.c
riscix.c
sco5-core.c
section.c
+simple.c
som.c
som.h
sparclinux.c
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 71f1740..b13f672 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -2575,6 +2575,22 @@ ENUMX
BFD_RELOC_SH_IMM_HI16_PCREL
ENUMX
BFD_RELOC_SH_PT_16
+ENUMX
+ BFD_RELOC_SH_TLS_GD_32
+ENUMX
+ BFD_RELOC_SH_TLS_LD_32
+ENUMX
+ BFD_RELOC_SH_TLS_LDO_32
+ENUMX
+ BFD_RELOC_SH_TLS_IE_32
+ENUMX
+ BFD_RELOC_SH_TLS_LE_32
+ENUMX
+ BFD_RELOC_SH_TLS_DTPMOD32
+ENUMX
+ BFD_RELOC_SH_TLS_DTPOFF32
+ENUMX
+ BFD_RELOC_SH_TLS_TPOFF32
ENUMDOC
Hitachi SH relocs. Not all of these appear in object files.
@@ -3685,7 +3701,7 @@ const char *
bfd_get_reloc_code_name (code)
bfd_reloc_code_real_type code;
{
- if (code > BFD_RELOC_UNUSED)
+ if ((int) code > (int) BFD_RELOC_UNUSED)
return 0;
return bfd_reloc_code_real_names[(int)code];
}
@@ -3813,7 +3829,7 @@ bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
/* We're not relaxing the section, so just copy the size info. */
input_section->_cooked_size = input_section->_raw_size;
- input_section->reloc_done = true;
+ input_section->reloc_done = (unsigned int) true;
reloc_count = bfd_canonicalize_reloc (input_bfd,
input_section,
diff --git a/bfd/section.c b/bfd/section.c
index 51b21c7..b5871e9b 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -643,7 +643,8 @@ bfd_section_hash_newfunc (entry, table, string)
subclass. */
if (entry == NULL)
{
- entry = bfd_hash_allocate (table, sizeof (struct section_hash_entry));
+ entry = (struct bfd_hash_entry *)
+ bfd_hash_allocate (table, sizeof (struct section_hash_entry));
if (entry == NULL)
return entry;
}
@@ -1186,7 +1187,7 @@ bfd_set_section_contents (abfd, section, location, offset, count)
/* Record a copy of the data in memory if desired. */
if (section->contents
- && location != section->contents + offset)
+ && location != (PTR) (section->contents + offset))
memcpy (section->contents + offset, location, (size_t) count);
if (BFD_SEND (abfd, _bfd_set_section_contents,
diff --git a/bfd/simple.c b/bfd/simple.c
new file mode 100644
index 0000000..10178a4
--- /dev/null
+++ b/bfd/simple.c
@@ -0,0 +1,197 @@
+/* simple.c -- BFD simple client routines
+ Copyright 2002
+ Free Software Foundation, Inc.
+ Contributed by MontaVista Software, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "bfdlink.h"
+
+static boolean simple_dummy_warning
+ PARAMS ((struct bfd_link_info *, const char *, const char *, bfd *,
+ asection *, bfd_vma));
+
+static boolean simple_dummy_undefined_symbol
+ PARAMS ((struct bfd_link_info *, const char *, bfd *, asection *,
+ bfd_vma, boolean));
+
+static boolean simple_dummy_reloc_overflow
+ PARAMS ((struct bfd_link_info *, const char *, const char *, bfd_vma,
+ bfd *, asection *, bfd_vma));
+
+static boolean simple_dummy_reloc_dangerous
+ PARAMS ((struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma));
+
+static boolean simple_dummy_unattached_reloc
+ PARAMS ((struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma));
+
+bfd_byte * bfd_simple_get_relocated_section_contents
+ PARAMS ((bfd *, asection *, bfd_byte *));
+
+static boolean
+simple_dummy_warning (link_info, warning, symbol, abfd, section, address)
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+ const char *warning ATTRIBUTE_UNUSED;
+ const char *symbol ATTRIBUTE_UNUSED;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ bfd_vma address ATTRIBUTE_UNUSED;
+{
+ return true;
+}
+
+static boolean
+simple_dummy_undefined_symbol (link_info, name, abfd, section, address, fatal)
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ bfd_vma address ATTRIBUTE_UNUSED;
+ boolean fatal ATTRIBUTE_UNUSED;
+{
+ return true;
+}
+
+static boolean
+simple_dummy_reloc_overflow (link_info, name, reloc_name, addend, abfd,
+ section, address)
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ const char *reloc_name ATTRIBUTE_UNUSED;
+ bfd_vma addend ATTRIBUTE_UNUSED;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ bfd_vma address ATTRIBUTE_UNUSED;
+{
+ return true;
+}
+
+static boolean
+simple_dummy_reloc_dangerous (link_info, message, abfd, section, address)
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+ const char *message ATTRIBUTE_UNUSED;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ bfd_vma address ATTRIBUTE_UNUSED;
+{
+ return true;
+}
+
+static boolean
+simple_dummy_unattached_reloc (link_info, name, abfd, section, address)
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ bfd_vma address ATTRIBUTE_UNUSED;
+{
+ return true;
+}
+
+/*
+FUNCTION
+ bfd_simple_relocate_secton
+
+SYNOPSIS
+ bfd_byte *bfd_simple_get_relocated_section_contents (bfd *abfd, asection *sec, bfd_byte *outbuf);
+
+DESCRIPTION
+ Returns the relocated contents of section @var{sec}. Only symbols
+ from @var{abfd} and the output offsets assigned to sections in
+ @var{abfd} are used. The result will be stored at @var{outbuf}
+ or allocated with @code{bfd_malloc} if @var{outbuf} is @code{NULL}.
+
+ Generally all sections in @var{abfd} should have their
+ @code{output_section} pointing back to the original section.
+
+ Returns @code{NULL} on a fatal error; ignores errors applying
+ particular relocations.
+*/
+
+bfd_byte *
+bfd_simple_get_relocated_section_contents (abfd, sec, outbuf)
+ bfd *abfd;
+ asection *sec;
+ bfd_byte *outbuf;
+{
+ struct bfd_link_info link_info;
+ struct bfd_link_order link_order;
+ struct bfd_link_callbacks callbacks;
+ bfd_byte *contents, *data;
+ int storage_needed, number_of_symbols;
+ asymbol **symbol_table;
+
+ /* In order to use bfd_get_relocated_section_contents, we need
+ to forge some data structures that it expects. */
+
+ /* Fill in the bare minimum number of fields for our purposes. */
+ memset (&link_info, 0, sizeof (link_info));
+ link_info.input_bfds = abfd;
+
+ link_info.hash = bfd_link_hash_table_create (abfd);
+ link_info.callbacks = &callbacks;
+ callbacks.warning = simple_dummy_warning;
+ callbacks.undefined_symbol = simple_dummy_undefined_symbol;
+ callbacks.reloc_overflow = simple_dummy_reloc_overflow;
+ callbacks.reloc_dangerous = simple_dummy_reloc_dangerous;
+ callbacks.unattached_reloc = simple_dummy_unattached_reloc;
+
+ memset (&link_order, 0, sizeof (link_order));
+ link_order.next = NULL;
+ link_order.type = bfd_indirect_link_order;
+ link_order.offset = 0;
+ link_order.size = bfd_section_size (abfd, sec);
+ link_order.u.indirect.section = sec;
+
+ data = NULL;
+ if (outbuf == NULL)
+ {
+ data = bfd_malloc (bfd_section_size (abfd, sec));
+ if (data == NULL)
+ return NULL;
+ outbuf = data;
+ }
+ bfd_link_add_symbols (abfd, &link_info);
+
+ storage_needed = bfd_get_symtab_upper_bound (abfd);
+ symbol_table = (asymbol **) bfd_malloc (storage_needed);
+ number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
+
+ contents = bfd_get_relocated_section_contents (abfd,
+ &link_info,
+ &link_order,
+ outbuf,
+ 0,
+ symbol_table);
+ if (contents == NULL && data != NULL)
+ free (data);
+
+ /* Foul hack to prevent bfd_section_size aborts. This flag only controls
+ that macro (and the related size macros), selecting between _raw_size
+ and _cooked_size. Debug sections won't change size while we're only
+ relocating. There may be trouble here someday if it tries to run
+ relaxation unexpectedly, so make sure. */
+ BFD_ASSERT (sec->_raw_size == sec->_cooked_size);
+ sec->reloc_done = 0;
+
+ bfd_link_hash_table_free (abfd, link_info.hash);
+
+ return contents;
+}
diff --git a/bfd/srec.c b/bfd/srec.c
index 129b2ba..6c29fa1 100644
--- a/bfd/srec.c
+++ b/bfd/srec.c
@@ -181,7 +181,7 @@ unsigned int Chunk = DEFAULT_CHUNK;
/* The type of srec output (free or forced to S3).
This variable can be modified by objcopy's --srec-forceS3
parameter. */
-boolean S3Forced = 0;
+boolean S3Forced = false;
/* When writing an S-record file, the S-records can not be output as
they are seen. This structure is used to hold them in memory. */
@@ -1203,7 +1203,7 @@ srec_get_symtab (abfd, alocation)
csymbols = (asymbol *) bfd_alloc (abfd, symcount * sizeof (asymbol));
if (csymbols == NULL && symcount != 0)
- return false;
+ return (long) false;
abfd->tdata.srec_data->csymbols = csymbols;
for (s = abfd->tdata.srec_data->symbols, c = csymbols;
diff --git a/bfd/stabs.c b/bfd/stabs.c
index e225d9c..0cb3741 100644
--- a/bfd/stabs.c
+++ b/bfd/stabs.c
@@ -331,7 +331,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
symbol, ignoring nesting, adding up all the characters in the
symbol names, not including the file numbers in types (the
first number after an open parenthesis). */
- if (type == N_BINCL)
+ if (type == (int) N_BINCL)
{
bfd_vma val;
int nest;
@@ -351,13 +351,13 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
incl_type = incl_sym[TYPEOFF];
if (incl_type == 0)
break;
- else if (incl_type == N_EINCL)
+ else if (incl_type == (int) N_EINCL)
{
if (nest == 0)
break;
--nest;
}
- else if (incl_type == N_BINCL)
+ else if (incl_type == (int) N_BINCL)
++nest;
else if (nest == 0)
{
@@ -400,7 +400,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
goto error_return;
ne->offset = sym - stabbuf;
ne->val = val;
- ne->type = N_BINCL;
+ ne->type = (int) N_BINCL;
ne->next = secinfo->excls;
secinfo->excls = ne;
@@ -422,7 +422,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
/* We have seen this header file before. Tell the final
pass to change the type to N_EXCL. */
- ne->type = N_EXCL;
+ ne->type = (int) N_EXCL;
/* Mark the skipped symbols. */
@@ -435,7 +435,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
incl_type = incl_sym[TYPEOFF];
- if (incl_type == N_EINCL)
+ if (incl_type == (int) N_EINCL)
{
if (nest == 0)
{
@@ -445,7 +445,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
}
--nest;
}
- else if (incl_type == N_BINCL)
+ else if (incl_type == (int) N_BINCL)
++nest;
else if (nest == 0)
{
@@ -597,7 +597,7 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
type = sym[TYPEOFF];
- if (type == N_FUN)
+ if (type == (int) N_FUN)
{
int strx = bfd_get_32 (abfd, sym + STRDXOFF);
@@ -624,7 +624,7 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
else if (deleting == -1)
{
/* Outside of a function. Check for deleted variables. */
- if (type == N_STSYM || type == N_LCSYM)
+ if (type == (int) N_STSYM || type == (int) N_LCSYM)
if ((*reloc_symbol_deleted_p) (sym + VALOFF - stabbuf, cookie))
{
*pstridx = -1;
@@ -674,7 +674,7 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
BFD_ASSERT (offset != 0);
}
- return (skip > 0);
+ return (boolean) (skip > 0);
error_return:
if (stabbuf != NULL)
diff --git a/bfd/syms.c b/bfd/syms.c
index 6eea2d8..b135726 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -713,7 +713,7 @@ boolean
bfd_is_undefined_symclass (symclass)
int symclass;
{
- return symclass == 'U' || symclass == 'w' || symclass == 'v';
+ return (boolean) (symclass == 'U' || symclass == 'w' || symclass == 'v');
}
/*
@@ -1070,7 +1070,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
saw_fun = 1;
for (stab = info->stabs; stab < info->stabs + stabsize; stab += STABSIZE)
{
- if (stab[TYPEOFF] == N_SO)
+ if (stab[TYPEOFF] == (bfd_byte) N_SO)
{
/* N_SO with null name indicates EOF */
if (bfd_get_32 (abfd, stab + STRDXOFF) == 0)
@@ -1084,12 +1084,12 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
/* two N_SO's in a row is a filename and directory. Skip */
if (stab + STABSIZE < info->stabs + stabsize
- && *(stab + STABSIZE + TYPEOFF) == N_SO)
+ && *(stab + STABSIZE + TYPEOFF) == (bfd_byte) N_SO)
{
stab += STABSIZE;
}
}
- else if (stab[TYPEOFF] == N_FUN)
+ else if (stab[TYPEOFF] == (bfd_byte) N_FUN)
{
saw_fun = 1;
++info->indextablesize;
@@ -1158,7 +1158,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
{
last_stab = stab;
if (stab + STABSIZE >= info->stabs + stabsize
- || *(stab + STABSIZE + TYPEOFF) != N_SO)
+ || *(stab + STABSIZE + TYPEOFF) != (bfd_byte) N_SO)
{
directory_name = NULL;
}
diff --git a/bfd/targets.c b/bfd/targets.c
index b9be8e7..e665898 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -559,6 +559,8 @@ extern const bfd_target bfd_elf32_powerpcqnx_vec;
extern const bfd_target bfd_elf32_s390_vec;
extern const bfd_target bfd_elf32_sh64_vec;
extern const bfd_target bfd_elf32_sh64l_vec;
+extern const bfd_target bfd_elf32_sh64lin_vec;
+extern const bfd_target bfd_elf32_sh64blin_vec;
extern const bfd_target bfd_elf32_sh64lnbsd_vec;
extern const bfd_target bfd_elf32_sh64nbsd_vec;
extern const bfd_target bfd_elf32_sh_vec;
@@ -595,6 +597,8 @@ extern const bfd_target bfd_elf64_powerpcle_vec;
extern const bfd_target bfd_elf64_s390_vec;
extern const bfd_target bfd_elf64_sh64_vec;
extern const bfd_target bfd_elf64_sh64l_vec;
+extern const bfd_target bfd_elf64_sh64lin_vec;
+extern const bfd_target bfd_elf64_sh64blin_vec;
extern const bfd_target bfd_elf64_sh64lnbsd_vec;
extern const bfd_target bfd_elf64_sh64nbsd_vec;
extern const bfd_target bfd_elf64_sparc_vec;
@@ -789,6 +793,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_bigarc_vec,
&bfd_elf32_bigarm_oabi_vec,
&bfd_elf32_bigarm_vec,
+ &bfd_elf32_bigarmqnx_vec,
&bfd_elf32_bigmips_vec,
&bfd_elf32_cris_vec,
&bfd_elf32_d10v_vec,
@@ -815,6 +820,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_littlearc_vec,
&bfd_elf32_littlearm_oabi_vec,
&bfd_elf32_littlearm_vec,
+ &bfd_elf32_littlearmqnx_vec,
&bfd_elf32_littlemips_vec,
&bfd_elf32_m32r_vec,
&bfd_elf32_m68hc11_vec,
@@ -845,7 +851,9 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_shl_vec,
&bfd_elf32_shlin_vec,
&bfd_elf32_shlnbsd_vec,
+ &bfd_elf32_shlqnx_vec,
&bfd_elf32_shnbsd_vec,
+ &bfd_elf32_shqnx_vec,
#ifdef BFD64
&bfd_elf32_sh64_vec,
&bfd_elf32_sh64l_vec,
@@ -1269,14 +1277,17 @@ bfd_target_list ()
vec_length++;
amt = (vec_length + 1) * sizeof (char **);
- name_ptr = name_list = (const char **) bfd_zmalloc (amt);
+ name_ptr = name_list = (const char **) bfd_malloc (amt);
if (name_list == NULL)
return NULL;
for (target = &bfd_target_vector[0]; *target != NULL; target++)
- *(name_ptr++) = (*target)->name;
+ if (target == &bfd_target_vector[0]
+ || *target != bfd_target_vector[0])
+ *name_ptr++ = (*target)->name;
+ *name_ptr = NULL;
return name_list;
}
diff --git a/bfd/version.h b/bfd/version.h
index 83fd085..cb9b9a4 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1 +1,3 @@
-#define BFD_VERSION_DATE 20021004
+#define BFD_VERSION_DATE 20021025
+#define BFD_VERSION @bfd_version@
+#define BFD_VERSION_STRING @bfd_version_string@
diff --git a/bfd/vms-hdr.c b/bfd/vms-hdr.c
index fa8af973..fbeb42e 100644
--- a/bfd/vms-hdr.c
+++ b/bfd/vms-hdr.c
@@ -25,6 +25,7 @@ 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 "bfdver.h"
#include "sysdep.h"
#include "bfdlink.h"
#include "safe-ctype.h"
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index a869d7d..e4e4755 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -1986,6 +1986,7 @@ xcoff_link_add_symbols (abfd, info)
&& h->descriptor == NULL)
{
struct xcoff_link_hash_entry *hds;
+ struct bfd_link_hash_entry *bh;
hds = xcoff_link_hash_lookup (xcoff_hash_table (info),
h->root.root.string + 1,
@@ -1994,13 +1995,14 @@ xcoff_link_add_symbols (abfd, info)
goto error_return;
if (hds->root.type == bfd_link_hash_new)
{
+ bh = &hds->root;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, hds->root.root.string,
(flagword) 0, bfd_und_section_ptr,
(bfd_vma) 0, (const char *) NULL, false,
- true,
- (struct bfd_link_hash_entry **) &hds)))
+ true, &bh)))
goto error_return;
+ hds = (struct xcoff_link_hash_entry *) bh;
}
hds->flags |= XCOFF_DESCRIPTOR;
BFD_ASSERT ((hds->flags & XCOFF_CALLED) == 0
diff --git a/configure.in b/configure.in
index 8988bef..6b71494 100644
--- a/configure.in
+++ b/configure.in
@@ -361,7 +361,7 @@ case "${target}" in
avr-*-*)
noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
;;
- c4x-*-*)
+ c4x-*-* | tic4x-*-*)
noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
;;
c54x*-*-* | tic54x-*-*)
@@ -422,6 +422,13 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
i[3456]86-*-linux*)
+ # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
+ # not build java stuff by default.
+ case "${target}" in
+ *-*-*libc1*)
+ noconfigdirs="$noconfigdirs ${libgcj}";;
+ esac
+
# This section makes it possible to build newlib natively on linux.
# If we are using a cross compiler then don't configure newlib.
if test x${is_cross_compiler} != xno ; then
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6a70cf4..eba2162 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,434 @@
+2002-10-25 Mark Kettenis <kettenis@gnu.org>
+
+ * i386v-nat.c: Include "i386-tdep.h".
+
+2002-10-25 Andrew Cagney <cagney@redhat.com>
+
+ * gdbtypes.c (address_space_name_to_int): Update.
+ (address_space_int_to_name): Update.
+ * gdbarch.sh (address_class_type_flags_to_name): Change to a pure
+ multi-arch predicate.
+ (address_class_name_to_type_flags): Ditto.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+ * MAINTAINERS: Check all warnings when h8300hms and alpha-elf.
+
+2002-10-24 Martin M. Hunt <hunt@redhat.com>
+
+ * utils.c (string_to_core_addr): Revert patch from 11 Oct.
+
+2002-10-24 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.h (INIT_SAL): Delete macro.
+ (init_sal): Export.
+ * symtab.c (init_sal): New function.
+
+ * ada-lang.c (ada_finish_decode_line_1): Change INIT_SAL macro
+ to init_sal function call.
+ (find_sal_from_funcs_and_line): Ditto.
+ (all_sals_for_line): Ditto.
+ * breakpoint.c (create_internal_breakpoint): Ditto.
+ (create_fork_vfork_event_catchpoint): Ditto.
+ (create_exec_event_catchpoint): Ditto.
+ (parse_breakpoint_sals): Ditto.
+ (watch_command_1): Ditto.
+ (handle_gnu_4_16_catch_command): Ditto.
+ (clear_command): Ditto.
+ * hppa-tdep.c (child_enable_exception_callback): Ditto.
+ * infcmd.c (run_stack_dummy): Ditto.
+ * infrun.c (process_event_stop_test): Ditto.
+ (check_sigtramp2): Ditto.
+ (step_over_function): Ditto.
+ * linespec.c (decode_line_2): Ditto.
+ (decode_line_1): Ditto.
+ * source.c (line_info): Ditto.
+ * symtab.c (find_pc_sect_line): Ditto.
+
+2002-10-24 Michal Ludvig <mludvig@suse.cz>
+
+ * dwarf2cfi.c (struct context)
+ (struct context_reg): Moved to dwarf2cfi.h
+ (context_alloc, frame_state_alloc, context_cpy):
+ Made extern instead of static, removed prototypes.
+ * dwarf2cfi.h (struct context)
+ (struct context_reg): New, moved from dwarf2cfi.c
+ (context_alloc, frame_state_alloc, context_cpy):
+ New prototypes.
+ * x86-64-linux-tdep.c (x86_64_linux_sigtramp_saved_pc):
+ Changed from static to extern.
+ (LINUX_SIGINFO_SIZE, LINUX_SIGCONTEXT_PC_OFFSET)
+ (LINUX_SIGCONTEXT_FP_OFFSET)
+ (LINUX_UCONTEXT_SIGCONTEXT_OFFSET): Adjusted.
+ (x86_64_linux_in_sigtramp, x86_64_linux_frame_chain)
+ (x86_64_init_frame_pc, x86_64_init_extra_frame_info): New.
+ * x86-64-tdep.c (x86_64_gdbarch_init): Several
+ set_gdbarch_*() calls now use x86-64 specific functions
+ instead of DWARF2 CFI ones.
+ * x86-64-tdep.h (x86_64_linux_in_sigtramp)
+ (x86_64_linux_frame_chain, x86_64_init_frame_pc)
+ (x86_64_init_extra_frame_info): New prototypes.
+
+2002-10-23 David Carlton <carlton@math.stanford.edu>
+
+ * linespec.c: #include "parser-defs.h".
+ Delete prototype for find_template_name_end.
+ * Makefile.in (linespec.o): Depend on $(parser_defs_h).
+
+2002-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: add recent mi fixes.
+ * varobj.c (struct varobj): Add new "updated" flag.
+ (new_variable): Default "updated" flag to 0.
+ (varobj_set_value): Set "updated" flag to 1 if value
+ changes.
+ (varobj_update): Check varobj "updated" flag before
+ comparing old and refreshed values. Fix for
+ PR gdb/702.
+
+2002-10-23 David Carlton <carlton@math.stanford.edu>
+
+ * parse.c (parse_exp_1): Use BLOCK_START.
+ * x86-64-tdep.c (x86_64_skip_prologue): Use BLOCK_END,
+ SYMBOL_BLOCK_VALUE.
+ * objc-lang.c (find_methods): Use BLOCK_START, BLOCK_END.
+
+2002-10-23 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c: Delete cplusplus_hint.
+ Delete prototype for find_template_name_end.
+
+2002-10-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.h: Update comment.
+
+2002-10-23 Michael Snyder <msnyder@redhat.com>
+
+ * printcmd.c (address_info): Restore quotes in output.
+ * valops.c (value_of_local): Restore quotes in error message.
+
+2002-10-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.c (symbol_demangled_name): New function.
+ * symtab.h (SYMBOL_DEMANGLED_NAME): Simplify macro, by
+ turning most of it into a function.
+ (symbol_demangled_name): Export.
+
+2002-10-23 Michael Snyder <msnyder@redhat.com>
+
+ * valops.c (value_of_local): Restore quotes in error message.
+
+2002-10-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.c (symbol_init_language_specific): New function.
+ * symtab.h (SYMBOL_INIT_LANGUAGE_SPECIFIC): Simplify macro, by
+ turning most of it into a function.
+ (symbol_init_language_specific): Export.
+
+2002-10-23 David Carlton <carlton@math.stanford.edu>
+
+ * dwarf2read.c (dwarf_tag_name): Add DWARF 3 names.
+ (dwarf_attr_name): Ditto.
+ (dwarf_type_encoding_name): Ditto.
+ (scan_partial_symbols): Descend into DW_TAG_namespace entries.
+ (process_die): Handle DW_TAG_namespace,
+ DW_TAG_imported_declaration, DW_TAG_imported_module.
+ (read_namespace): New function.
+
+2002-10-22 Joel Brobecker <brobecker@gnat.com>
+
+ * configure.in: Define NEW_PROC_API on Interix too.
+ * configure: Regenerate.
+
+2002-10-21 Joel Brobecker <brobecker@gnat.com>
+
+ * configure: Regenerate using the proper version of autoconf.
+
+2002-10-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * findvar.c (read_var_value): Temporarily disable TLS code, until
+ complete TLS support is added.
+
+2002-10-21 Jim Blandy <jimb@redhat.com>
+ Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.h (address_class): Re-add LOC_THREAD_LOCAL_STATIC
+ for thread local storage locations.
+ (struct symbol): Add objfile field.
+ (SYMBOL_OBJFILE): Define.
+ * dwarf2read.c (is_thread_local): New static variable.
+ (new_symbol): If variable is in thread local fill in address class
+ and objfile appropriately.
+ (decode_locdesc): Recognize and handle DW_OP_GNU_push_tls_address
+ stack operation.
+ * printcmd.c (address_info): Print the information for thread
+ local storage variable.
+ * findvar.c (read_var_value): In case of thread local variable,
+ defer to the target vector code to compute address.
+
+2002-10-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * solib-svr4.c (svr4_fetch_objfile_link_map): New function.
+ * solib-svr4.h (svr4_fetch_objfile_link_map): Export.
+
+2002-10-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.h (address_class): Rename
+ LOC_THREAD_LOCAL_STATIC to LOC_HP_THREAD_LOCAL_STATIC.
+ * hpread.c (hpread_process_one_debug_symbol): Ditto.
+ * printcmd.c (address_info): Ditto.
+ * findvar.c (symbol_read_needs_frame, read_var_value): Ditto.
+
+2002-10-20 Mark Kettenis <kettenis@gnu.org>
+
+ * i386bsd-nat.c (i386bsd_dr_set, i386bsd_dr_get_status): Use
+ DBREG_DRX macro to acces debug registers.
+
+ * Makefile.in (i386obsd-tdep.o): New target.
+
+ * solib-sunos.c: Include "bcache.h" and "regcache.h".
+ * Makefile.in (solib-sunos.o): Add $(bcache_h) and $(regcache_h).
+
+ * configure.tgt (i[3456]86-*-openbsd*): Set gdb_target to obds.
+ * config/i386/obsd.mt: New file.
+ * i386bsd-nat.c (_initialize_i386bsd_nat): Introduce
+ i386obsd_sc_pc_offset and i386obsd_sc_sp_offset;
+ * i386obsd-nat.c (_initialize_i386obsd_nat): Set
+ i386obsd_sigtramp_start and i386obsd_sigtramp_end instead of
+ i386nbsd_sigtramp_start and i386nbsd_sigtramp_end.
+ * i386obsd-tdep.c: New file.
+
+2002-10-19 Adam Fedor <fedor@gnu.org>
+
+ * objc-exp.y (name_not_typename): Fix invalid comment.
+
+2002-10-20 Mark Kettenis <kettenis@gnu.org>
+
+ * solib-sunos.c (allocate_rt_common_objfile): Use bcache_xmalloc
+ to allocate partial syms and macro byte caches.
+
+2002-10-18 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.h: Delete 'struct source' and 'struct sourcevector'.
+
+2002-10-18 Adam Fedor <fedor@gnu.org>
+
+ * stabsread.c (find_name_end): New function.
+ (define_symbol): Use it.
+
+2002-10-18 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/alpha/nm-fbsd.h (CANNOT_STEP_BREAKPOINT): Define to 1.
+ * config/alpha/nm-linux.h (CANNOT_STEP_BREAKPOINT): Define to 1.
+ * config/alpha/nm-nbsd.h (CANNOT_STEP_BREAKPOINT): Define to 1.
+ * config/alpha/nm-osf.h (CANNOT_STEP_BREAKPOINT): Define to 1.
+
+2002-10-17 David Carlton <carlton@math.stanford.edu>
+
+ * symfile.h: Add opaque declaration for struct obstack.
+ Declare obsavestring to take a const char *.
+ * symfile.c (obsavestring): Make first argument a const char *.
+
+2002-10-16 Adam Fedor <fedor@gnu.org>
+
+ * breakpoint.c (parse_breakpoint_sals): Ignore ObjC method
+ names when matching breakpoints in current file.
+
+2002-10-16 Kevin Buettner <kevinb@redhat.com>
+
+ * dwarf2read.c (dwarf2_invalid_pointer_size): New complaint.
+ (read_tag_pointer_type): Add address class support.
+ * gdbarch.sh (ADDRESS_CLASS_TYPE_FLAGS)
+ (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME, ADDRESS_CLASS_NAME_TO_TYPE_FLAGS):
+ New methods.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * gdbtypes.c (address_space_name_to_int, address_space_int_to_name)
+ (make_type_with_address_space, recursive_type_dump): Add address
+ class support.
+ * gdbtypes.h (TYPE_FLAG_ADDRESS_CLASS_1, TYPE_FLAG_ADDRESS_CLASS_2)
+ (TYPE_FLAG_ADDRESS_CLASS_ALL, TYPE_ADDRESS_CLASS_1)
+ (TYPE_ADDRESS_CLASS_2, TYPE_ADDRESS_CLASS_ALL): New defines
+
+2002-10-16 Klee Dienes <kdienes@apple.com>
+
+ * stabsread.c (read_tilde_fields): Use name[sizeof(vptr_name)-2]
+ to get the last character of a char[] buffer, not
+ name[sizeof(vptr_name)-1].
+
+2002-10-14 Adam Fedor <fedor@gnu.org>
+
+ * symtab.h: New objc_specific struct.
+ (SYMBOL_INIT_LANGUAGE_SPECIFIC): Handle ObjC.
+ (SYMBOL_DEMANGLED_NAME): Likewise.
+
+2002-10-14 Adam Fedor <fedor@gnu.org>
+
+ * symfile.c (init_filename_language_table): Add ObjC file extension.
+
+2002-10-14 Adam Fedor <fedor@gnu.org>
+
+ * utils.c (puts_filtered_tabular): New function.
+ (fprintf_symbol_filtered): Get ObjC demangled name.
+ * defs.h (puts_filtered_tabular): Declared.
+
+2002-10-14 Kevin Buettner <kevinb@redhat.com>
+
+ * c-lang.h (c_type_print_varspec_prefix): Delete.
+ * c-typeprint.c (c_type_print_varspec_prefix): Make static. Add
+ ``need_post_space'' parameter. Adjust all callers.
+
+2002-10-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/mips/nm-irix4.h (HAVE_NONSTEPPABLE_WATCHPOINT): Define to 1.
+ * config/mips/nm-irix5.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
+ * config/mips/tm-embed.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
+ * config/pa/nm-hppah.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
+
+2002-10-13 Adam Fedor <fedor@gnu.org>
+
+ * source.c (print_source_lines): Update comments.
+
+2002-10-13 Adam Fedor <fedor@gnu.org>
+
+ * valops.c (value_of_local): New function.
+ (value_of_this): Use it.
+ * value.h (value_of_local): Declared.
+
+2002-10-13 Adam Fedor <fedor@gnu.org>
+
+ * parse.c: (length_of_subexp, prefixify_subexp): Handle
+ OP_MSGCALL, OP_SELECTOR, OP_NSSTRING, and OP_SELF.
+
+2002-10-12 Adam Fedor <fedor@gnu.org>
+
+ * language.c (binop_result_type): Add language_objc to case.
+ (integral_type): Likewise.
+ (character_type): Likewise.
+ (string_type): Likewise.
+ (boolean_type): Likewise.
+ (structured_type): Likewise.
+ (binop_type_check): Likewise.
+
+2002-10-11 Adam Fedor <fedor@gnu.org>
+
+ * printcmd.c (address_info): Print 'self' for ObjC.
+
+2002-10-11 Adam Fedor <fedor@gnu.org>
+
+ * expression.h: New ops OP_NSSTRING, OP_SELECTOR, OP_MSGCALL, and
+ OP_SELF.
+
+2002-10-11 Adam Fedor <fedor@gnu.org>
+
+ * language.h (CAST_IS_CONVERSION): Add language_objc.
+
+2002-10-11 Adam Fedor <fedor@gnu.org>
+
+ * defs.h (enum language): Add language_objc.
+
+2002-10-11 Klee Dienes <kdienes@apple.com>
+
+ * findvar.c (read_memory_typed_address): New function.
+ * gdbcore.h (read_memory_typed_address): Add prototype.
+ * blockframe.c (sigtramp_saved_pc): Use read_memory_typed_address
+ to read a value destined for a CORE_ADDR, not read_memory_integer.
+ * f-valprint.c (f77_get_dynamic_upperbound): Ditto.
+ (f77_get_dynamic_lowerbound): Ditto.
+
+2002-10-11 Martin M. Hunt <hunt@redhat.com>
+
+ * utils.c (string_to_core_addr): After turning string into
+ a number, convert to a CORE_ADDR using INTEGER_TO_ADDRESS
+ which will do necessary sign-extension, etc.
+
+2002-10-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * c-exp.y (THIS): Delete token and grammar rule.
+ (yylex): Don't return THIS.
+ * cp-valprint.c (vtbl_ptr_name_old): Delete.
+ (cp_is_vtbl_ptr_type): Don't check vtbl_ptr_name_old.
+ * demangle.c (cplus_markers): Update comment. Put '$'
+ first. Remove CPLUS_MARKER.
+ (_initialize_demangler): Don't call set_cplus_marker_for_demangling.
+ * jv-exp.y (THIS): Delete token and grammar rule.
+ (yylex): Don't return THIS.
+ * mips-tdep.c (mips_dump_tdep): Don't dump CPLUS_MARKER.
+ * objc-exp.y (THIS): Delete token and grammar rule.
+ (yylex): Don't return THIS.
+ * p-exp.y (yylex): Remove reference to CPLUS_MARKER.
+ * stabsread.c (vptr_name, vb_name): Replace CPLUS_MARKER with '$'.
+ (read_member_functions): Likewise for opname.
+ (read_tilde_fields): Use is_cplus_marker.
+
+ * defs.h (CPLUS_MARKER): Don't define.
+ * config/tm-sysv4.h (CPLUS_MARKER): Likewise.
+ * config/i386/xm-i386sco.h (CPLUS_MARKER): Likewise.
+ * config/mips/tm-irix3.h (CPLUS_MARKER): Likewise.
+ * config/mips/tm-irix6.h (CPLUS_MARKER): Likewise.
+ * config/rs6000/tm-rs6000.h (CPLUS_MARKER): Likewise.
+
+ * config/i386/tm-i386v4.h: Delete file.
+ * config/djgpp/fnchange.lst: Delete tm-i386v4.h.
+ * config/i386/tm-i386sol2.h: Include "i386/tm-i386.h" instead.
+ * config/i386/tm-i386v42mp.h: Include "i386/tm-i386.h" instead.
+ * config/i386/tm-ptx.h: Include "i386/tm-i386.h" instead.
+ * config/i386/i386gnu.mt (TM_FILE): Use tm-i386.h.
+ * config/i386/i386sco5.mt (TM_FILE): Likewise.
+ * config/i386/i386v4.mt (TM_FILE): Likewise.
+ * config/i386/ncr3000.mt (TM_FILE): Likewise.
+
+2002-10-10 Marko Mlinar <markom@opencores.org>
+
+ * infrun.c (resume): Convert #ifdef HAVE_NONSTEPPABLE_WATCHPOINT into C,
+ accidentially not commited 2002-10-09
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-10-09 Marko Mlinar <markom@opencores.org>
+
+ * infrun.c (resume): Convert #ifdef HAVE_NONSTEPPABLE_WATCHPOINT into C.
+ * gdbarch.sh (HAVE_NONSTEPPABLE_WATCHPOINT): Add.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-10-08 Petr Sorfa <petrs@caldera.com>
+
+ Revised and re-submitted by John Wolfe <jlw@caldera.com>
+
+ Move the Dwarf 2 abbrev table to a per-compilation-unit structure,
+ so we can work on more than one compilation unit at a time. This
+ helps prepare GDB to handle inter-CU die references.
+ * dwarf2read.c (ABBREV_HASH_SIZE): moved definition forward in
+ the code to be defined before struct comp_unit_head.
+ (comp_unit_head): Added new members - offset, cu_head,
+ begin_die, next and dwarf2_abbrevs.
+ (dwarf2_abbrevs): Removed single static var; now member of
+ struct comp_unit_head.
+ dwarf2_build_psymtabs_hard): Complete new struct comp_unit_head
+ members.
+ (psymtab_to_symtab_1): Changed to work with the new
+ struct comp_unit_head.
+ (dwarf2_read_abbrevs): Now accepts a cu_header parameter and
+ constructs the dwarf2_abbrevs[] inside the cu_header.
+ (dwarf2_empty_abbrev_table): Now expects a ptr to a
+ dwarf2_abbrev table to clean up.
+ (dwarf2_lookup_abbrev): Now accepts a cu_header parameter and
+ handling of dwarf2_abbrevs inside the cu_header.
+ (read_partial_die): Now supports the call to the new
+ dwarf2_lookup_abbrev.
+ (read_full_die): Now supports the call to the new
+ dwarf2_lookup_abbrev.
+
+2002-10-06 Christopher Faylor <cgf@redhat.com>
+
+ * Makefile.in (install-gdbtk): Add missing continuation backslash to
+ insure that shell variables, such as "transformed_name" are propagated
+ to later shell statements in rule.
+
+2002-10-06 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/nm-i386sco.h: Add protection against
+ multiple-inclusion. Include "i386/nm-i386v.h".
+ (REGISTER_U_ADDR): Remove define.
+ (i386_register_u_addr): Remove prototype.
+
2002-10-04 Michael Snyder <msnyder@redhat.com>
* m32r-stub.c (handle_exception): Make sure exception is "trap"
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index a392f5a..07a6a02 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -56,7 +56,7 @@ maintainer works with the native maintainer when resolving API issues.
a29k Deleted.
- alpha --target=alpha-elf -Werror
+ alpha --target=alpha-elf ,-Werror
Maintenance only
arc (--target=arc-elf OBSOLETE)
@@ -80,7 +80,7 @@ maintainer works with the native maintainer when resolving API issues.
fr30 (--target=fr30-elf OBSOLETE)
- h8300 --target=h8300hms -Werror
+ h8300 --target=h8300hms ,-Werror
Maintenance only
h8500 --target=h8500hms -Werror
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 95330c0..5a3a5c6 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1760,6 +1760,8 @@ i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(gdbtypes_h) $(gdbcore_h) \
$(regcache_h) $(arch_utils_h) $(i386_tdep_h) $(i387_tdep_h) \
$(nbsd_tdep_h) $(solib_svr4_h)
i386obsd-nat.o: i386obsd-nat.c $(defs_h)
+i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
+ $(regcache_h) $(i386_tdep_h) $(i387_tdep_h)
i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
$(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h)
i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \
@@ -1822,7 +1824,7 @@ lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \
$(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h)
linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
$(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(completer_h) \
- $(cp_abi_h) $(source_h)
+ $(cp_abi_h) $(source_h) $(parser_defs_h)
linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(regcache_h) \
$(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \
$(cli_decode_h) $(gdb_string_h)
@@ -2129,7 +2131,8 @@ solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h)
solib-osf.o: solib-osf.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(target_h) $(inferior_h) $(solist_h)
solib-sunos.o: solib-sunos.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
- $(symfile_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) $(solist_h)
+ $(symfile_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) $(solist_h) \
+ $(bcache_h) $(regcache_h)
solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \
$(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
$(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) $(solib_svr4_h)
@@ -2341,7 +2344,7 @@ install-gdbtk:
else \
true ; \
fi ; \
- $(SHELL) $(srcdir)/../mkinstalldirs $(bindir)
+ $(SHELL) $(srcdir)/../mkinstalldirs $(bindir); \
$(INSTALL_PROGRAM) insight$(EXEEXT) $(bindir)/$$transformed_name$(EXEEXT) ; \
$(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY) ; \
$(SHELL) $(srcdir)/../mkinstalldirs $(libdir)/insight$(GDBTK_VERSION) ; \
diff --git a/gdb/NEWS b/gdb/NEWS
index 4ce063e..0ba805d 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -12,6 +12,11 @@ option "-i=mi", has been changed to "mi2". The previous MI syntax,
Support for the original "mi0" syntax (included in GDB 5.0) has been
removed.
+Fix for gdb/192: removed extraneous space when displaying frame level.
+Fix for gdb/672: update changelist is now output in mi list format.
+Fix for gdb/702: a -var-assign that updates the value now shows up
+ in a subsequent -var-update.
+
* REMOVED configurations and files
V850EA ISA
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 2838df7..2fb691c 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -4395,7 +4395,7 @@ ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
#endif
struct minimal_symbol *msymbol;
- INIT_SAL (&val);
+ init_sal (&val);
msymbol = NULL;
if (lower_name != NULL)
@@ -4537,7 +4537,7 @@ done:
sals.nelts = 1;
sals.sals = (struct symtab_and_line *) xmalloc (sizeof (sals.sals[0]));
- INIT_SAL (&sals.sals[0]);
+ init_sal (&sals.sals[0]);
sals.sals[0].line = best_linetable->item[best_index].line;
sals.sals[0].pc = best_linetable->item[best_index].pc;
@@ -4856,7 +4856,7 @@ all_sals_for_line (const char *filename, int line_num, char ***canonical)
break;
GROW_VECT (result.sals, len, result.nelts + 1);
- INIT_SAL (&result.sals[result.nelts]);
+ init_sal (&result.sals[result.nelts]);
result.sals[result.nelts].line = LINETABLE (s)->item[ind].line;
result.sals[result.nelts].pc = LINETABLE (s)->item[ind].pc;
result.sals[result.nelts].symtab = s;
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index eba45a3..4eb22ac 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -1035,19 +1035,17 @@ sigtramp_saved_pc (struct frame_info *frame)
buf = alloca (ptrbytes);
/* Get sigcontext address, it is the third parameter on the stack. */
if (frame->next)
- sigcontext_addr = read_memory_integer (FRAME_ARGS_ADDRESS (frame->next)
- + FRAME_ARGS_SKIP
- + sigcontext_offs,
- ptrbytes);
+ sigcontext_addr = read_memory_typed_address
+ (FRAME_ARGS_ADDRESS (frame->next) + FRAME_ARGS_SKIP + sigcontext_offs,
+ builtin_type_void_data_ptr);
else
- sigcontext_addr = read_memory_integer (read_register (SP_REGNUM)
- + sigcontext_offs,
- ptrbytes);
+ sigcontext_addr = read_memory_typed_address
+ (read_register (SP_REGNUM) + sigcontext_offs, builtin_type_void_data_ptr);
/* Don't cause a memory_error when accessing sigcontext in case the stack
layout has changed or the stack is corrupt. */
target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET, buf, ptrbytes);
- return extract_unsigned_integer (buf, ptrbytes);
+ return extract_typed_address (buf, builtin_type_void_data_ptr);
}
#endif /* SIGCONTEXT_PC_OFFSET */
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index a77bff4..7e2326a 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -3884,7 +3884,7 @@ create_internal_breakpoint (CORE_ADDR address, enum bptype type)
struct symtab_and_line sal;
struct breakpoint *b;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
sal.pc = address;
sal.section = find_pc_overlay (sal.pc);
@@ -4204,7 +4204,7 @@ create_fork_vfork_event_catchpoint (int tempflag, char *cond_string,
struct breakpoint *b;
int thread = -1; /* All threads. */
- INIT_SAL (&sal);
+ init_sal (&sal);
sal.pc = 0;
sal.symtab = NULL;
sal.line = 0;
@@ -4243,7 +4243,7 @@ create_exec_event_catchpoint (int tempflag, char *cond_string)
struct breakpoint *b;
int thread = -1; /* All threads. */
- INIT_SAL (&sal);
+ init_sal (&sal);
sal.pc = 0;
sal.symtab = NULL;
sal.line = 0;
@@ -4600,7 +4600,7 @@ parse_breakpoint_sals (char **address,
if (default_breakpoint_valid)
{
struct symtab_and_line sal;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
sals->sals = (struct symtab_and_line *)
xmalloc (sizeof (struct symtab_and_line));
sal.pc = default_breakpoint_address;
@@ -4618,13 +4618,16 @@ parse_breakpoint_sals (char **address,
/* Force almost all breakpoints to be in terms of the
current_source_symtab (which is decode_line_1's default). This
should produce the results we want almost all of the time while
- leaving default_breakpoint_* alone. */
+ leaving default_breakpoint_* alone.
+ ObjC: However, don't match an Objective-C method name which
+ may have a '+' or '-' succeeded by a '[' */
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (default_breakpoint_valid
&& (!cursal.symtab
- || (strchr ("+-", (*address)[0]) != NULL)))
+ || ((strchr ("+-", (*address)[0]) != NULL)
+ && ((*address)[1] != '['))))
*sals = decode_line_1 (address, 1, default_breakpoint_symtab,
default_breakpoint_line, addr_string);
else
@@ -5293,7 +5296,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty)
enum bptype bp_type;
int mem_cnt = 0;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
/* Parse arguments. */
innermost_block = NULL;
@@ -6259,7 +6262,7 @@ handle_gnu_4_16_catch_command (char *arg, int tempflag, int from_tty)
char *save_arg;
int i;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
/* If no arg given, or if first arg is 'if ', all active catch clauses
are breakpointed. */
@@ -6530,7 +6533,7 @@ clear_command (char *arg, int from_tty)
sals.sals = (struct symtab_and_line *)
xmalloc (sizeof (struct symtab_and_line));
make_cleanup (xfree, sals.sals);
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
sal.line = default_breakpoint_line;
sal.symtab = default_breakpoint_symtab;
sal.pc = default_breakpoint_address;
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 376f6d5..1f344c4 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -199,7 +199,6 @@ static int parse_number (char *, int, int, YYSTYPE *);
%token <opcode> ASSIGN_MODIFY
/* C++ */
-%token THIS
%token TRUEKEYWORD
%token FALSEKEYWORD
@@ -532,11 +531,6 @@ exp : STRING
;
/* C++. */
-exp : THIS
- { write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (OP_THIS); }
- ;
-
exp : TRUEKEYWORD
{ write_exp_elt_opcode (OP_LONG);
write_exp_elt_type (builtin_type_bool);
@@ -1615,17 +1609,6 @@ yylex ()
{
if (STREQN (tokstart, "true", 4))
return TRUEKEYWORD;
-
- if (STREQN (tokstart, "this", 4))
- {
- static const char this_name[] =
- { CPLUS_MARKER, 't', 'h', 'i', 's', '\0' };
-
- if (lookup_symbol (this_name, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL))
- return THIS;
- }
}
break;
case 3:
diff --git a/gdb/c-lang.h b/gdb/c-lang.h
index e64d4c6..7d7cd03 100644
--- a/gdb/c-lang.h
+++ b/gdb/c-lang.h
@@ -65,9 +65,6 @@ extern struct type **const (c_builtin_types[]);
extern void c_type_print_base (struct type *, struct ui_file *, int, int);
-extern void c_type_print_varspec_prefix (struct type *, struct ui_file *,
- int, int);
-
/* These are in cp-valprint.c */
extern int vtblprint; /* Controls printing of vtbl's */
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index bede194..6c5e815 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -49,8 +49,8 @@ static void c_type_print_args (struct type *, struct ui_file *);
static void cp_type_print_derivation_info (struct ui_file *, struct type *);
-void c_type_print_varspec_prefix (struct type *, struct ui_file *, int,
- int);
+static void c_type_print_varspec_prefix (struct type *, struct ui_file *, int,
+ int, int);
/* Print "const", "volatile", or address space modifiers. */
static void c_type_print_modifier (struct type *, struct ui_file *,
@@ -67,6 +67,7 @@ c_print_type (struct type *type, char *varstring, struct ui_file *stream,
{
register enum type_code code;
int demangled_args;
+ int need_post_space;
if (show > 0)
CHECK_TYPEDEF (type);
@@ -85,7 +86,8 @@ c_print_type (struct type *type, char *varstring, struct ui_file *stream,
|| code == TYPE_CODE_MEMBER
|| code == TYPE_CODE_REF)))
fputs_filtered (" ", stream);
- c_type_print_varspec_prefix (type, stream, show, 0);
+ need_post_space = (varstring != NULL && strcmp (varstring, "") != 0);
+ c_type_print_varspec_prefix (type, stream, show, 0, need_post_space);
if (varstring != NULL)
{
@@ -192,11 +194,15 @@ cp_type_print_method_args (struct type *mtype, char *prefix, char *varstring,
On outermost call, pass 0 for PASSED_A_PTR.
On outermost call, SHOW > 0 means should ignore
any typename for TYPE and show its details.
- SHOW is always zero on recursive calls. */
+ SHOW is always zero on recursive calls.
+
+ NEED_POST_SPACE is non-zero when a space will be be needed
+ between a trailing qualifier and a field, variable, or function
+ name. */
void
c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
- int show, int passed_a_ptr)
+ int show, int passed_a_ptr, int need_post_space)
{
char *name;
if (type == 0)
@@ -210,15 +216,15 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
switch (TYPE_CODE (type))
{
case TYPE_CODE_PTR:
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1, 1);
fprintf_filtered (stream, "*");
- c_type_print_modifier (type, stream, 1, 0);
+ c_type_print_modifier (type, stream, 1, need_post_space);
break;
case TYPE_CODE_MEMBER:
if (passed_a_ptr)
fprintf_filtered (stream, "(");
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
fprintf_filtered (stream, " ");
name = type_name_no_tag (TYPE_DOMAIN_TYPE (type));
if (name)
@@ -231,7 +237,7 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
case TYPE_CODE_METHOD:
if (passed_a_ptr)
fprintf_filtered (stream, "(");
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
if (passed_a_ptr)
{
fprintf_filtered (stream, " ");
@@ -241,19 +247,19 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
break;
case TYPE_CODE_REF:
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1, 0);
fprintf_filtered (stream, "&");
- c_type_print_modifier (type, stream, 1, 0);
+ c_type_print_modifier (type, stream, 1, need_post_space);
break;
case TYPE_CODE_FUNC:
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
if (passed_a_ptr)
fprintf_filtered (stream, "(");
break;
case TYPE_CODE_ARRAY:
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
if (passed_a_ptr)
fprintf_filtered (stream, "(");
break;
diff --git a/gdb/config/alpha/nm-fbsd.h b/gdb/config/alpha/nm-fbsd.h
index f3fb129..9e72709 100644
--- a/gdb/config/alpha/nm-fbsd.h
+++ b/gdb/config/alpha/nm-fbsd.h
@@ -32,7 +32,7 @@
#define ATTACH_DETACH
/* The Alpha does not step over a breakpoint. */
-#define CANNOT_STEP_BREAKPOINT
+#define CANNOT_STEP_BREAKPOINT 1
/* Shared library support. */
diff --git a/gdb/config/alpha/nm-linux.h b/gdb/config/alpha/nm-linux.h
index 990ccb4..fed32e7 100644
--- a/gdb/config/alpha/nm-linux.h
+++ b/gdb/config/alpha/nm-linux.h
@@ -39,7 +39,7 @@
/* The alpha does not step over a breakpoint, the manpage is lying again. */
-#define CANNOT_STEP_BREAKPOINT
+#define CANNOT_STEP_BREAKPOINT 1
/* Given a pointer to either a gregset_t or fpregset_t, return a
pointer to the first register. */
diff --git a/gdb/config/alpha/nm-nbsd.h b/gdb/config/alpha/nm-nbsd.h
index caf1c23..10fab6e 100644
--- a/gdb/config/alpha/nm-nbsd.h
+++ b/gdb/config/alpha/nm-nbsd.h
@@ -26,6 +26,6 @@
#include "config/nm-nbsd.h"
/* The Alpha does not step over a breakpoint. */
-#define CANNOT_STEP_BREAKPOINT
+#define CANNOT_STEP_BREAKPOINT 1
#endif /* NM_NBSD_H */
diff --git a/gdb/config/alpha/nm-osf.h b/gdb/config/alpha/nm-osf.h
index 20b5ae4..73006fe 100644
--- a/gdb/config/alpha/nm-osf.h
+++ b/gdb/config/alpha/nm-osf.h
@@ -32,7 +32,7 @@
/* The alpha does not step over a breakpoint, the manpage is lying again. */
-#define CANNOT_STEP_BREAKPOINT
+#define CANNOT_STEP_BREAKPOINT 1
/* Support for shared libraries. */
diff --git a/gdb/config/djgpp/fnchange.lst b/gdb/config/djgpp/fnchange.lst
index 0cb63a5..4d9fa83 100644
--- a/gdb/config/djgpp/fnchange.lst
+++ b/gdb/config/djgpp/fnchange.lst
@@ -88,7 +88,6 @@
@V@/gdb/config/i386/nm-i386v42mp.h @V@/gdb/config/i386/nm-v42mp.h
@V@/gdb/config/i386/tm-i386mk.h @V@/gdb/config/i386/tm-mk.h
@V@/gdb/config/i386/tm-i386sol2.h @V@/gdb/config/i386/tm-sol2.h
-@V@/gdb/config/i386/tm-i386v4.h @V@/gdb/config/i386/tm-v4.h
@V@/gdb/config/i386/tm-i386v42mp.h @V@/gdb/config/i386/tm-v42mp.h
@V@/gdb/config/i386/xm-i386mach.h @V@/gdb/config/i386/xm-mach.h
@V@/gdb/config/i386/xm-i386mk.h @V@/gdb/config/i386/xm-mk.h
diff --git a/gdb/config/i386/i386gnu.mt b/gdb/config/i386/i386gnu.mt
index dc3edd2..2029e99 100644
--- a/gdb/config/i386/i386gnu.mt
+++ b/gdb/config/i386/i386gnu.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running the GNU Hurd
TDEPFILES= i386-tdep.o i387-tdep.o i386gnu-tdep.o
-TM_FILE= tm-i386v4.h
+TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/i386sco5.mt b/gdb/config/i386/i386sco5.mt
index ace2258..11ab55f 100644
--- a/gdb/config/i386/i386sco5.mt
+++ b/gdb/config/i386/i386sco5.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running SCO Open Server 5
TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386v4.h
+TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/i386v4.mt b/gdb/config/i386/i386v4.mt
index c22b675..d1b8c26 100644
--- a/gdb/config/i386/i386v4.mt
+++ b/gdb/config/i386/i386v4.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running SVR4
TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386v4.h
+TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/ncr3000.mt b/gdb/config/i386/ncr3000.mt
index 11bc474..4773dae 100644
--- a/gdb/config/i386/ncr3000.mt
+++ b/gdb/config/i386/ncr3000.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running SVR4
TDEPFILES= i386-tdep.o i387-tdep.o solib.o solib-svr4.o solib-legacy.o
-TM_FILE= tm-i386v4.h
+TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/nm-i386sco.h b/gdb/config/i386/nm-i386sco.h
index e3bdc2d..ec7a3bd 100644
--- a/gdb/config/i386/nm-i386sco.h
+++ b/gdb/config/i386/nm-i386sco.h
@@ -20,12 +20,14 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- (addr) = i386_register_u_addr ((blockend),(regno));
+#ifndef NM_I386SCO_H
+#define NM_I386SCO_H
-extern int i386_register_u_addr (int, int);
+#include "i386/nm-i386v.h"
/* When calling functions on SCO, sometimes we get an error writing some
of the segment registers. This would appear to be a kernel
bug/non-feature. */
#define CANNOT_STORE_REGISTER(regno) ((regno) == 14 || (regno) == 15)
+
+#endif /* nm-i386sco.h */
diff --git a/gdb/config/i386/obsd.mt b/gdb/config/i386/obsd.mt
new file mode 100644
index 0000000..72ec513
--- /dev/null
+++ b/gdb/config/i386/obsd.mt
@@ -0,0 +1,3 @@
+# Target: Intel 386 running OpenBSD
+TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386obsd-tdep.o corelow.o
+TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/tm-i386sol2.h b/gdb/config/i386/tm-i386sol2.h
index 35d63d1..5a79f67 100644
--- a/gdb/config/i386/tm-i386sol2.h
+++ b/gdb/config/i386/tm-i386sol2.h
@@ -21,7 +21,7 @@
#ifndef TM_I386SOL2_H
#define TM_I386SOL2_H 1
-#include "i386/tm-i386v4.h"
+#include "i386/tm-i386.h"
/* The SunPRO compiler puts out 0 instead of the address in N_SO symbols,
and for SunPRO 3.0, N_FUN symbols too. */
diff --git a/gdb/config/i386/tm-i386v4.h b/gdb/config/i386/tm-i386v4.h
deleted file mode 100644
index 9363327..0000000
--- a/gdb/config/i386/tm-i386v4.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Macro definitions for GDB on an Intel i386 running SVR4.
- Copyright 1991, 1994, 1995, 1998, 1999, 2000, 2002
- Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support (fnf@cygnus.com)
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef TM_I386V4_H
-#define TM_I386V4_H 1
-
-/* Pick up most of what we need from the generic i386 target include file. */
-#include "i386/tm-i386.h"
-
-/* It is unknown which, if any, SVR4 assemblers do not accept dollar signs
- in identifiers. The default in G++ is to use dots instead, for all SVR4
- systems, so we make that our default also. FIXME: There should be some
- way to get G++ to tell us what CPLUS_MARKER it is using, perhaps by
- stashing it in the debugging information as part of the name of an
- invented symbol ("gcc_cplus_marker$" for example). */
-
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
-
-#endif /* ifndef TM_I386V4_H */
diff --git a/gdb/config/i386/tm-i386v42mp.h b/gdb/config/i386/tm-i386v42mp.h
index 5671e42..527fdbb 100644
--- a/gdb/config/i386/tm-i386v42mp.h
+++ b/gdb/config/i386/tm-i386v42mp.h
@@ -24,7 +24,7 @@
/* pick up more generic x86 sysv4 stuff */
-#include "i386/tm-i386v4.h"
+#include "i386/tm-i386.h"
/* define to select for other sysv4.2mp weirdness (see procfs.c) */
diff --git a/gdb/config/i386/tm-ptx.h b/gdb/config/i386/tm-ptx.h
index 8d773c8..2b7a86c 100644
--- a/gdb/config/i386/tm-ptx.h
+++ b/gdb/config/i386/tm-ptx.h
@@ -30,7 +30,7 @@
#include <sys/reg.h>
#ifdef SEQUENT_PTX4
-#include "i386/tm-i386v4.h"
+#include "i386/tm-i386.h"
#else /* !SEQUENT_PTX4 */
#include "i386/tm-i386.h"
#endif
diff --git a/gdb/config/i386/xm-i386sco.h b/gdb/config/i386/xm-i386sco.h
index 920ebbb..72552c9 100644
--- a/gdb/config/i386/xm-i386sco.h
+++ b/gdb/config/i386/xm-i386sco.h
@@ -33,8 +33,3 @@
GDB does not currently support the termio/job control combination. */
#undef HAVE_TERMIO
#define HAVE_TERMIOS
-
-/* SCO's assembler doesn't grok dollar signs in identifiers.
- So we use dots instead. This item must be coordinated with G++. */
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
diff --git a/gdb/config/mips/nm-irix4.h b/gdb/config/mips/nm-irix4.h
index 9c02eb3..bf4a02c 100644
--- a/gdb/config/mips/nm-irix4.h
+++ b/gdb/config/mips/nm-irix4.h
@@ -54,7 +54,7 @@
procfs_stopped_by_watchpoint(inferior_ptid)
extern int procfs_stopped_by_watchpoint (ptid_t);
-#define HAVE_NONSTEPPABLE_WATCHPOINT
+#define HAVE_NONSTEPPABLE_WATCHPOINT 1
/* Use these macros for watchpoint insertion/deletion. */
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
diff --git a/gdb/config/mips/nm-irix5.h b/gdb/config/mips/nm-irix5.h
index 59749f6..4507ad1 100644
--- a/gdb/config/mips/nm-irix5.h
+++ b/gdb/config/mips/nm-irix5.h
@@ -36,7 +36,7 @@
procfs_stopped_by_watchpoint(inferior_ptid)
extern int procfs_stopped_by_watchpoint (ptid_t);
-#define HAVE_NONSTEPPABLE_WATCHPOINT
+#define HAVE_NONSTEPPABLE_WATCHPOINT 1
/* Use these macros for watchpoint insertion/deletion. */
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
diff --git a/gdb/config/mips/tm-embed.h b/gdb/config/mips/tm-embed.h
index 7482a77..44072f4 100644
--- a/gdb/config/mips/tm-embed.h
+++ b/gdb/config/mips/tm-embed.h
@@ -36,7 +36,7 @@ int remote_mips_remove_watchpoint (CORE_ADDR addr, int len, int type);
/* We need to remove watchpoints when stepping, else we hit them again! */
-#define HAVE_NONSTEPPABLE_WATCHPOINT
+#define HAVE_NONSTEPPABLE_WATCHPOINT 1
int remote_mips_stopped_by_watchpoint (void);
#define STOPPED_BY_WATCHPOINT(w) remote_mips_stopped_by_watchpoint ()
diff --git a/gdb/config/mips/tm-irix3.h b/gdb/config/mips/tm-irix3.h
index 11859e5..c298a39 100644
--- a/gdb/config/mips/tm-irix3.h
+++ b/gdb/config/mips/tm-irix3.h
@@ -21,11 +21,6 @@
#include "mips/tm-bigmips.h"
-/* SGI's assembler doesn't grok dollar signs in identifiers.
- So we use dots instead. This item must be coordinated with G++. */
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
-
/* Redefine register numbers for SGI. */
#undef NUM_REGS
diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h
index 58b97e1..ce9c226 100644
--- a/gdb/config/mips/tm-irix6.h
+++ b/gdb/config/mips/tm-irix6.h
@@ -22,11 +22,6 @@
#include "mips/tm-bigmips64.h"
#include "solib.h"
-/* SGI's assembler doesn't grok dollar signs in identifiers.
- So we use dots instead. This item must be coordinated with G++. */
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
-
/* Redefine register numbers for SGI. */
#undef NUM_REGS
diff --git a/gdb/config/pa/nm-hppah.h b/gdb/config/pa/nm-hppah.h
index 4894a04..7609d67 100644
--- a/gdb/config/pa/nm-hppah.h
+++ b/gdb/config/pa/nm-hppah.h
@@ -196,7 +196,7 @@ extern int hppa_require_detach (int, int);
by removing all eventpoints; stepping past the instruction that caused
the trigger; reinserting eventpoints; and checking whether any watched
location changed. */
-#define HAVE_NONSTEPPABLE_WATCHPOINT
+#define HAVE_NONSTEPPABLE_WATCHPOINT 1
/* Our implementation of "hardware" watchpoints uses memory page-protection
faults. However, HP-UX has unfortunate interactions between these and
diff --git a/gdb/config/rs6000/tm-rs6000.h b/gdb/config/rs6000/tm-rs6000.h
index ea0c073..478e9bd 100644
--- a/gdb/config/rs6000/tm-rs6000.h
+++ b/gdb/config/rs6000/tm-rs6000.h
@@ -27,11 +27,6 @@
#define TEXT_SEGMENT_BASE 0x10000000
-/* AIX's assembler doesn't grok dollar signs in identifiers.
- So we use dots instead. This item must be coordinated with G++. */
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
-
/* Return whether PC in function NAME is in code that should be skipped when
single-stepping. */
diff --git a/gdb/config/tm-sysv4.h b/gdb/config/tm-sysv4.h
index 35b95eb..9a39af2 100644
--- a/gdb/config/tm-sysv4.h
+++ b/gdb/config/tm-sysv4.h
@@ -35,13 +35,3 @@ extern int in_plt_section (CORE_ADDR, char *);
where the function itself actually starts. If not, return 0. */
#define SKIP_TRAMPOLINE_CODE(pc) find_solib_trampoline_target (pc)
-
-/* It is unknown which, if any, SVR4 assemblers do not accept dollar signs
- in identifiers. The default in G++ is to use dots instead, for all SVR4
- systems, so we make that our default also. FIXME: There should be some
- way to get G++ to tell us what CPLUS_MARKER it is using, perhaps by
- stashing it in the debugging information as part of the name of an
- invented symbol ("gcc_cplus_marker$" for example). */
-
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
diff --git a/gdb/configure b/gdb/configure
index e8a83ab..64370a8 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -81,6 +81,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -195,6 +196,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -365,6 +367,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -530,12 +537,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -576,7 +587,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:580: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:591: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -602,7 +613,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:606: checking for $ac_word" >&5
+echo "configure:617: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -632,7 +643,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:636: checking for $ac_word" >&5
+echo "configure:647: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -683,7 +694,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:687: checking for $ac_word" >&5
+echo "configure:698: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -715,7 +726,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:719: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:730: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -726,12 +737,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 730 "configure"
+#line 741 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -757,12 +768,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:772: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:766: checking whether we are using GNU C" >&5
+echo "configure:777: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -771,7 +782,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -790,7 +801,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:794: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:805: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -822,7 +833,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:826: checking how to run the C preprocessor" >&5
+echo "configure:837: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -837,13 +848,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 841 "configure"
+#line 852 "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:847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:858: \"$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
:
@@ -854,13 +865,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 858 "configure"
+#line 869 "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:864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:875: \"$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
:
@@ -871,13 +882,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 875 "configure"
+#line 886 "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:881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:892: \"$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
:
@@ -902,9 +913,9 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:906: checking for AIX" >&5
+echo "configure:917: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 908 "configure"
+#line 919 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -926,7 +937,7 @@ rm -f conftest*
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:930: checking for POSIXized ISC" >&5
+echo "configure:941: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -950,7 +961,7 @@ fi
echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:954: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:965: checking for ${CC-cc} option to accept ANSI C" >&5
if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -967,7 +978,7 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO
do
CC="$ac_save_CC $ac_arg"
cat > conftest.$ac_ext <<EOF
-#line 971 "configure"
+#line 982 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
@@ -1004,7 +1015,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
; return 0; }
EOF
-if { (eval echo configure:1008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_prog_cc_stdc="$ac_arg"; break
else
@@ -1075,7 +1086,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:1079: checking host system type" >&5
+echo "configure:1090: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1096,7 +1107,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:1100: checking target system type" >&5
+echo "configure:1111: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1114,7 +1125,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:1118: checking build system type" >&5
+echo "configure:1129: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1139,7 +1150,7 @@ test "$host_alias" != "$target_alias" &&
ALL_LINGUAS=
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1143: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1154: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1168,7 +1179,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1172: checking for $ac_word" >&5
+echo "configure:1183: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1196,12 +1207,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1200: checking for ANSI C header files" >&5
+echo "configure:1211: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1205 "configure"
+#line 1216 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1209,7 +1220,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1224: \"$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*
@@ -1226,7 +1237,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1230 "configure"
+#line 1241 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1244,7 +1255,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1248 "configure"
+#line 1259 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1265,7 +1276,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1269 "configure"
+#line 1280 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1276,7 +1287,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1300,12 +1311,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1304: checking for working const" >&5
+echo "configure:1315: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1309 "configure"
+#line 1320 "configure"
#include "confdefs.h"
int main() {
@@ -1354,7 +1365,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1375,21 +1386,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1379: checking for inline" >&5
+echo "configure:1390: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1386 "configure"
+#line 1397 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1415,12 +1426,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1419: checking for off_t" >&5
+echo "configure:1430: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1424 "configure"
+#line 1435 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1448,12 +1459,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1452: checking for size_t" >&5
+echo "configure:1463: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1457 "configure"
+#line 1468 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1483,19 +1494,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1487: checking for working alloca.h" >&5
+echo "configure:1498: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1492 "configure"
+#line 1503 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -1516,12 +1527,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1520: checking for alloca" >&5
+echo "configure:1531: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1525 "configure"
+#line 1536 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1549,7 +1560,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -1581,12 +1592,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1585: checking whether alloca needs Cray hooks" >&5
+echo "configure:1596: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1590 "configure"
+#line 1601 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1611,12 +1622,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1615: checking for $ac_func" >&5
+echo "configure:1626: 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 1620 "configure"
+#line 1631 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1639,7 +1650,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1654: \"$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
@@ -1666,7 +1677,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1670: checking stack direction for C alloca" >&5
+echo "configure:1681: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1674,7 +1685,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1678 "configure"
+#line 1689 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1693,7 +1704,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -1714,21 +1725,21 @@ EOF
fi
-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
+for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1722: checking for $ac_hdr" >&5
+echo "configure:1733: 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 1727 "configure"
+#line 1738 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1743: \"$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*
@@ -1757,12 +1768,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1761: checking for $ac_func" >&5
+echo "configure:1772: 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 1766 "configure"
+#line 1777 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1785,7 +1796,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1800: \"$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
@@ -1810,7 +1821,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1814: checking for working mmap" >&5
+echo "configure:1825: 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
@@ -1818,7 +1829,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1822 "configure"
+#line 1833 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1846,24 +1857,11 @@ else
#include <fcntl.h>
#include <sys/mman.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -1971,7 +1969,7 @@ main()
}
EOF
-if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1973: \"$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
@@ -1999,17 +1997,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2003: checking for $ac_hdr" >&5
+echo "configure:2001: 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 2008 "configure"
+#line 2006 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2011: \"$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*
@@ -2039,12 +2037,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2043: checking for $ac_func" >&5
+echo "configure:2041: 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 2048 "configure"
+#line 2046 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2067,7 +2065,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2069: \"$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
@@ -2096,12 +2094,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2100: checking for $ac_func" >&5
+echo "configure:2098: 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 2105 "configure"
+#line 2103 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2124,7 +2122,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2126: \"$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
@@ -2158,19 +2156,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2162: checking for LC_MESSAGES" >&5
+echo "configure:2160: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2167 "configure"
+#line 2165 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -2191,7 +2189,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2195: checking whether NLS is requested" >&5
+echo "configure:2193: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -2211,7 +2209,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2215: checking whether included gettext is requested" >&5
+echo "configure:2213: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -2230,17 +2228,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2234: checking for libintl.h" >&5
+echo "configure:2232: checking for libintl.h" >&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 2239 "configure"
+#line 2237 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2242: \"$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*
@@ -2257,19 +2255,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2261: checking for gettext in libc" >&5
+echo "configure:2259: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2266 "configure"
+#line 2264 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -2285,7 +2283,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2289: checking for bindtextdomain in -lintl" >&5
+echo "configure:2287: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2293,7 +2291,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2297 "configure"
+#line 2295 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2304,7 +2302,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2320,19 +2318,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2324: checking for gettext in libintl" >&5
+echo "configure:2322: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2329 "configure"
+#line 2327 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -2360,7 +2358,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2364: checking for $ac_word" >&5
+echo "configure:2362: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2394,12 +2392,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2398: checking for $ac_func" >&5
+echo "configure:2396: 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 2403 "configure"
+#line 2401 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2422,7 +2420,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2424: \"$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
@@ -2449,7 +2447,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2453: checking for $ac_word" >&5
+echo "configure:2451: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2485,7 +2483,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2489: checking for $ac_word" >&5
+echo "configure:2487: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2517,7 +2515,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 2521 "configure"
+#line 2519 "configure"
#include "confdefs.h"
int main() {
@@ -2525,7 +2523,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -2557,7 +2555,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2561: checking for $ac_word" >&5
+echo "configure:2559: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2591,7 +2589,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2595: checking for $ac_word" >&5
+echo "configure:2593: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2627,7 +2625,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2631: checking for $ac_word" >&5
+echo "configure:2629: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2717,7 +2715,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2721: checking for catalogs to be installed" >&5
+echo "configure:2719: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -2745,17 +2743,17 @@ echo "configure:2721: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2749: checking for linux/version.h" >&5
+echo "configure:2747: checking for linux/version.h" >&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 2754 "configure"
+#line 2752 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2757: \"$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*
@@ -2879,12 +2877,12 @@ EOF
fi
-for ac_prog in gawk mawk nawk awk
+for ac_prog in mawk gawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2888: checking for $ac_word" >&5
+echo "configure:2886: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2925,7 +2923,7 @@ done
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2929: checking for a BSD compatible install" >&5
+echo "configure:2927: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2986,7 +2984,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2990: checking for $ac_word" >&5
+echo "configure:2988: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3018,7 +3016,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3022: checking for $ac_word" >&5
+echo "configure:3020: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3050,7 +3048,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3054: checking for $ac_word" >&5
+echo "configure:3052: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3085,7 +3083,7 @@ fi
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3089: checking for $ac_word" >&5
+echo "configure:3087: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3117,7 +3115,7 @@ fi
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
set dummy ${ac_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3121: checking for $ac_word" >&5
+echo "configure:3119: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3151,7 +3149,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3155: checking for $ac_word" >&5
+echo "configure:3153: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3185,7 +3183,7 @@ test -n "$YACC" || YACC="yacc"
# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
set dummy ${ac_tool_prefix}mig; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3189: checking for $ac_word" >&5
+echo "configure:3187: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3236,12 +3234,12 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3240: checking return type of signal handlers" >&5
+echo "configure:3238: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3245 "configure"
+#line 3243 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -3258,7 +3256,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:3262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -3278,12 +3276,12 @@ EOF
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3282: checking for ANSI C header files" >&5
+echo "configure:3280: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3287 "configure"
+#line 3285 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -3291,7 +3289,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3293: \"$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*
@@ -3308,7 +3306,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 3312 "configure"
+#line 3310 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -3326,7 +3324,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 3330 "configure"
+#line 3328 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -3347,7 +3345,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 3351 "configure"
+#line 3349 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3358,7 +3356,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:3362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -3402,17 +3400,17 @@ for ac_hdr in ctype.h nlist.h link.h thread_db.h proc_service.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3406: checking for $ac_hdr" >&5
+echo "configure:3404: 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 3411 "configure"
+#line 3409 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3414: \"$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*
@@ -3439,12 +3437,12 @@ fi
done
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:3443: checking whether stat file-mode macros are broken" >&5
+echo "configure:3441: checking whether stat file-mode macros are broken" >&5
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3448 "configure"
+#line 3446 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -3496,12 +3494,12 @@ fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3500: checking for working const" >&5
+echo "configure:3498: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3505 "configure"
+#line 3503 "configure"
#include "confdefs.h"
int main() {
@@ -3550,7 +3548,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:3554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -3571,21 +3569,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3575: checking for inline" >&5
+echo "configure:3573: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 3582 "configure"
+#line 3580 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:3589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -3615,12 +3613,12 @@ for ac_func in bcopy btowc bzero canonicalize_file_name isascii poll \
realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3619: checking for $ac_func" >&5
+echo "configure:3617: 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 3624 "configure"
+#line 3622 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3643,7 +3641,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3645: \"$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
@@ -3670,19 +3668,19 @@ done
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3674: checking for working alloca.h" >&5
+echo "configure:3672: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3679 "configure"
+#line 3677 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -3703,12 +3701,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3707: checking for alloca" >&5
+echo "configure:3705: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3712 "configure"
+#line 3710 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3736,7 +3734,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -3768,12 +3766,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3772: checking whether alloca needs Cray hooks" >&5
+echo "configure:3770: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3777 "configure"
+#line 3775 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3798,12 +3796,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3802: checking for $ac_func" >&5
+echo "configure:3800: 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 3807 "configure"
+#line 3805 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3826,7 +3824,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3828: \"$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
@@ -3853,7 +3851,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3857: checking stack direction for C alloca" >&5
+echo "configure:3855: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3861,7 +3859,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3865 "configure"
+#line 3863 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3880,7 +3878,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -3902,12 +3900,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3906: checking for pid_t" >&5
+echo "configure:3904: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3911 "configure"
+#line 3909 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3936,17 +3934,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:3940: checking for vfork.h" >&5
+echo "configure:3938: checking for vfork.h" >&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 3945 "configure"
+#line 3943 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3948: \"$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*
@@ -3971,18 +3969,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:3975: checking for working vfork" >&5
+echo "configure:3973: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:3981: checking for vfork" >&5
+echo "configure:3979: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3986 "configure"
+#line 3984 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -4005,7 +4003,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:4009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -4027,7 +4025,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 4031 "configure"
+#line 4029 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -4122,7 +4120,7 @@ main() {
}
}
EOF
-if { (eval echo configure:4126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -4146,7 +4144,7 @@ fi
if test "$cross_compiling" = no; then
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:4150: checking whether setpgrp takes no argument" >&5
+echo "configure:4148: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4154,7 +4152,7 @@ else
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 4158 "configure"
+#line 4156 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
@@ -4174,7 +4172,7 @@ main()
}
EOF
-if { (eval echo configure:4178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_setpgrp_void=no
else
@@ -4199,12 +4197,12 @@ fi
else
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:4203: checking whether setpgrp takes no argument" >&5
+echo "configure:4201: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4208 "configure"
+#line 4206 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -4218,7 +4216,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_setpgrp_void=no
else
@@ -4242,12 +4240,12 @@ fi
# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
# since sigsetjmp might only be defined as a macro.
echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:4246: checking for sigsetjmp" >&5
+echo "configure:4244: checking for sigsetjmp" >&5
if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4251 "configure"
+#line 4249 "configure"
#include "confdefs.h"
#include <setjmp.h>
@@ -4256,7 +4254,7 @@ int main() {
sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
; return 0; }
EOF
-if { (eval echo configure:4260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_func_sigsetjmp=yes
else
@@ -4279,19 +4277,19 @@ fi
# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
-echo "configure:4283: checking for r_fs in struct reg" >&5
+echo "configure:4281: checking for r_fs in struct reg" >&5
if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4288 "configure"
+#line 4286 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_fs;
; return 0; }
EOF
-if { (eval echo configure:4295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_fs=yes
else
@@ -4311,19 +4309,19 @@ EOF
fi
echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
-echo "configure:4315: checking for r_gs in struct reg" >&5
+echo "configure:4313: checking for r_gs in struct reg" >&5
if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4320 "configure"
+#line 4318 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_gs;
; return 0; }
EOF
-if { (eval echo configure:4327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_gs=yes
else
@@ -4345,19 +4343,19 @@ fi
# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:4349: checking for PTRACE_GETREGS" >&5
+echo "configure:4347: checking for PTRACE_GETREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4354 "configure"
+#line 4352 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETREGS;
; return 0; }
EOF
-if { (eval echo configure:4361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getregs=yes
else
@@ -4379,19 +4377,19 @@ fi
# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:4383: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:4381: checking for PTRACE_GETFPXREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4388 "configure"
+#line 4386 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETFPXREGS;
; return 0; }
EOF
-if { (eval echo configure:4395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getfpxregs=yes
else
@@ -4413,12 +4411,12 @@ fi
# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
-echo "configure:4417: checking for PT_GETDBREGS" >&5
+echo "configure:4415: checking for PT_GETDBREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4422 "configure"
+#line 4420 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -4426,7 +4424,7 @@ int main() {
PT_GETDBREGS;
; return 0; }
EOF
-if { (eval echo configure:4430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getdbregs=yes
else
@@ -4448,12 +4446,12 @@ fi
# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
-echo "configure:4452: checking for PT_GETXMMREGS" >&5
+echo "configure:4450: checking for PT_GETXMMREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4457 "configure"
+#line 4455 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -4461,7 +4459,7 @@ int main() {
PT_GETXMMREGS;
; return 0; }
EOF
-if { (eval echo configure:4465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getxmmregs=yes
else
@@ -4483,7 +4481,7 @@ fi
echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
-echo "configure:4487: checking for socketpair in -lsocket" >&5
+echo "configure:4485: checking for socketpair in -lsocket" >&5
ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4491,7 +4489,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4495 "configure"
+#line 4493 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4502,7 +4500,7 @@ int main() {
socketpair()
; return 0; }
EOF
-if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4532,12 +4530,12 @@ fi
for ac_func in socketpair
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4536: checking for $ac_func" >&5
+echo "configure:4534: 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 4541 "configure"
+#line 4539 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4560,7 +4558,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4562: \"$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
@@ -4587,12 +4585,12 @@ done
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:4591: checking whether malloc must be declared" >&5
+echo "configure:4589: checking whether malloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4596 "configure"
+#line 4594 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4613,7 +4611,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -4634,12 +4632,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:4638: checking whether realloc must be declared" >&5
+echo "configure:4636: checking whether realloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4643 "configure"
+#line 4641 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4660,7 +4658,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:4664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -4681,12 +4679,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4685: checking whether free must be declared" >&5
+echo "configure:4683: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
+#line 4688 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4707,7 +4705,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:4711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -4728,12 +4726,12 @@ EOF
fi
echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:4732: checking whether strerror must be declared" >&5
+echo "configure:4730: checking whether strerror must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4737 "configure"
+#line 4735 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4754,7 +4752,7 @@ int main() {
char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
-if { (eval echo configure:4758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strerror=no
else
@@ -4775,12 +4773,12 @@ EOF
fi
echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:4779: checking whether strdup must be declared" >&5
+echo "configure:4777: checking whether strdup must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4784 "configure"
+#line 4782 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4801,7 +4799,7 @@ int main() {
char *(*pfn) = (char *(*)) strdup
; return 0; }
EOF
-if { (eval echo configure:4805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strdup=no
else
@@ -4822,12 +4820,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4826: checking whether strstr must be declared" >&5
+echo "configure:4824: checking whether strstr must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4831 "configure"
+#line 4829 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4848,7 +4846,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4869,12 +4867,12 @@ EOF
fi
echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:4873: checking whether canonicalize_file_name must be declared" >&5
+echo "configure:4871: checking whether canonicalize_file_name must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4878 "configure"
+#line 4876 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4895,7 +4893,7 @@ int main() {
char *(*pfn) = (char *(*)) canonicalize_file_name
; return 0; }
EOF
-if { (eval echo configure:4899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_canonicalize_file_name=no
else
@@ -4921,9 +4919,9 @@ fi
# could be expunged. --jsm 1999-03-22
echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:4925: checking for HPUX save_state structure" >&5
+echo "configure:4923: checking for HPUX save_state structure" >&5
cat > conftest.$ac_ext <<EOF
-#line 4927 "configure"
+#line 4925 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -4938,7 +4936,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 4942 "configure"
+#line 4940 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -4991,7 +4989,7 @@ EOF
EOF
;;
- *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
+ *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
cat >> confdefs.h <<\EOF
#define NEW_PROC_API 1
EOF
@@ -5008,12 +5006,12 @@ fi
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5012: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5010: checking for pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5017 "configure"
+#line 5015 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5022,7 +5020,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -5044,12 +5042,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5048: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:5046: checking for prrun_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5053 "configure"
+#line 5051 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5058,7 +5056,7 @@ int main() {
prrun_t avar
; return 0; }
EOF
-if { (eval echo configure:5062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prrun_t=yes
else
@@ -5080,12 +5078,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5084: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:5082: checking for gregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5089 "configure"
+#line 5087 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5094,7 +5092,7 @@ int main() {
gregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_gregset_t=yes
else
@@ -5116,12 +5114,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5120: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:5118: checking for fpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5125 "configure"
+#line 5123 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5130,7 +5128,7 @@ int main() {
fpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
@@ -5152,12 +5150,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5156: checking for prgregset_t in sys/procfs.h" >&5
+echo "configure:5154: checking for prgregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5161 "configure"
+#line 5159 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5166,7 +5164,7 @@ int main() {
prgregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset_t=yes
else
@@ -5188,12 +5186,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5192: checking for prfpregset_t in sys/procfs.h" >&5
+echo "configure:5190: checking for prfpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5197 "configure"
+#line 5195 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5202,7 +5200,7 @@ int main() {
prfpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset_t=yes
else
@@ -5224,12 +5222,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5228: checking for prgregset32_t in sys/procfs.h" >&5
+echo "configure:5226: checking for prgregset32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5233 "configure"
+#line 5231 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5238,7 +5236,7 @@ int main() {
prgregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset32_t=yes
else
@@ -5260,12 +5258,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5264: checking for prfpregset32_t in sys/procfs.h" >&5
+echo "configure:5262: checking for prfpregset32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5269 "configure"
+#line 5267 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5274,7 +5272,7 @@ int main() {
prfpregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:5278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
else
@@ -5296,12 +5294,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5300: checking for lwpid_t in sys/procfs.h" >&5
+echo "configure:5298: checking for lwpid_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5305 "configure"
+#line 5303 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5310,7 +5308,7 @@ int main() {
lwpid_t avar
; return 0; }
EOF
-if { (eval echo configure:5314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpid_t=yes
else
@@ -5332,12 +5330,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5336: checking for psaddr_t in sys/procfs.h" >&5
+echo "configure:5334: checking for psaddr_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5341 "configure"
+#line 5339 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5346,7 +5344,7 @@ int main() {
psaddr_t avar
; return 0; }
EOF
-if { (eval echo configure:5350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psaddr_t=yes
else
@@ -5368,12 +5366,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5372: checking for prsysent_t in sys/procfs.h" >&5
+echo "configure:5370: checking for prsysent_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5377 "configure"
+#line 5375 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5382,7 +5380,7 @@ int main() {
prsysent_t avar
; return 0; }
EOF
-if { (eval echo configure:5386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prsysent_t=yes
else
@@ -5404,12 +5402,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5408: checking for pr_sigset_t in sys/procfs.h" >&5
+echo "configure:5406: checking for pr_sigset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5413 "configure"
+#line 5411 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5418,7 +5416,7 @@ int main() {
pr_sigset_t avar
; return 0; }
EOF
-if { (eval echo configure:5422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
else
@@ -5440,12 +5438,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5444: checking for pr_sigaction64_t in sys/procfs.h" >&5
+echo "configure:5442: checking for pr_sigaction64_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5449 "configure"
+#line 5447 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5454,7 +5452,7 @@ int main() {
pr_sigaction64_t avar
; return 0; }
EOF
-if { (eval echo configure:5458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
else
@@ -5476,12 +5474,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5480: checking for pr_siginfo64_t in sys/procfs.h" >&5
+echo "configure:5478: checking for pr_siginfo64_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5485 "configure"
+#line 5483 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5490,7 +5488,7 @@ int main() {
pr_siginfo64_t avar
; return 0; }
EOF
-if { (eval echo configure:5494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
else
@@ -5517,7 +5515,7 @@ EOF
if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
-echo "configure:5521: checking whether prfpregset_t type is broken" >&5
+echo "configure:5519: checking whether prfpregset_t type is broken" >&5
if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5525,7 +5523,7 @@ else
gdb_cv_prfpregset_t_broken=yes
else
cat > conftest.$ac_ext <<EOF
-#line 5529 "configure"
+#line 5527 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main ()
@@ -5535,7 +5533,7 @@ else
return 0;
}
EOF
-if { (eval echo configure:5539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_prfpregset_t_broken=no
else
@@ -5560,12 +5558,12 @@ EOF
echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5564: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:5562: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5569 "configure"
+#line 5567 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
@@ -5578,7 +5576,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_procfs_piocset=yes
else
@@ -5602,19 +5600,19 @@ fi
if test ${host} = ${target} ; then
echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:5606: checking for member l_addr in struct link_map" >&5
+echo "configure:5604: checking for member l_addr in struct link_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5611 "configure"
+#line 5609 "configure"
#include "confdefs.h"
#include <link.h>
int main() {
struct link_map lm; (void) lm.l_addr;
; return 0; }
EOF
-if { (eval echo configure:5618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_l_members=yes
else
@@ -5636,12 +5634,12 @@ EOF
echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:5640: checking for member lm_addr in struct link_map" >&5
+echo "configure:5638: checking for member lm_addr in struct link_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5645 "configure"
+#line 5643 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <link.h>
@@ -5649,7 +5647,7 @@ int main() {
struct link_map lm; (void) lm.lm_addr;
; return 0; }
EOF
-if { (eval echo configure:5653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_lm_members=yes
else
@@ -5671,12 +5669,12 @@ EOF
echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
-echo "configure:5675: checking for member som_addr in struct so_map" >&5
+echo "configure:5673: checking for member som_addr in struct so_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5680 "configure"
+#line 5678 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_NLIST_H
@@ -5687,7 +5685,7 @@ int main() {
struct so_map lm; (void) lm.som_addr;
; return 0; }
EOF
-if { (eval echo configure:5691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_so_map_with_som_members=yes
else
@@ -5709,12 +5707,12 @@ EOF
echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
-echo "configure:5713: checking for struct link_map32 in sys/link.h" >&5
+echo "configure:5711: checking for struct link_map32 in sys/link.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5718 "configure"
+#line 5716 "configure"
#include "confdefs.h"
#define _SYSCALL32
#include <sys/link.h>
@@ -5722,7 +5720,7 @@ int main() {
struct link_map32 l;
; return 0; }
EOF
-if { (eval echo configure:5726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map32=yes
else
@@ -5748,7 +5746,7 @@ EOF
fi
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:5752: checking for main in -lm" >&5
+echo "configure:5750: checking for main in -lm" >&5
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5756,14 +5754,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5760 "configure"
+#line 5758 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5792,7 +5790,7 @@ fi
echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
-echo "configure:5796: checking for wctype in -lc" >&5
+echo "configure:5794: checking for wctype in -lc" >&5
ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5800,7 +5798,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5804 "configure"
+#line 5802 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5811,7 +5809,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:5815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5830,7 +5828,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
-echo "configure:5834: checking for wctype in -lw" >&5
+echo "configure:5832: checking for wctype in -lw" >&5
ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5838,7 +5836,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lw $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5842 "configure"
+#line 5840 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5849,7 +5847,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:5853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5881,12 +5879,12 @@ fi
echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:5885: checking for long long support in compiler" >&5
+echo "configure:5883: checking for long long support in compiler" >&5
if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5890 "configure"
+#line 5888 "configure"
#include "confdefs.h"
int main() {
@@ -5896,7 +5894,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_c_long_long=yes
else
@@ -5918,7 +5916,7 @@ fi
echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:5922: checking for long long support in printf" >&5
+echo "configure:5920: checking for long long support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5926,7 +5924,7 @@ else
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 5930 "configure"
+#line 5928 "configure"
#include "confdefs.h"
int main () {
@@ -5940,7 +5938,7 @@ int main () {
return (strcmp ("0x0123456789abcdef", buf));
}
EOF
-if { (eval echo configure:5944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_long=yes
else
@@ -5964,19 +5962,19 @@ echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
-echo "configure:5968: checking for long double support in compiler" >&5
+echo "configure:5966: checking for long double support in compiler" >&5
if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5973 "configure"
+#line 5971 "configure"
#include "confdefs.h"
int main() {
long double foo;
; return 0; }
EOF
-if { (eval echo configure:5980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -5998,7 +5996,7 @@ fi
echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:6002: checking for long double support in printf" >&5
+echo "configure:6000: checking for long double support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6006,7 +6004,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 6010 "configure"
+#line 6008 "configure"
#include "confdefs.h"
int main () {
@@ -6016,7 +6014,7 @@ int main () {
return (strncmp ("3.14159", buf, 7));
}
EOF
-if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_double=yes
else
@@ -6040,7 +6038,7 @@ echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
-echo "configure:6044: checking for long double support in scanf" >&5
+echo "configure:6042: checking for long double support in scanf" >&5
if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6048,7 +6046,7 @@ else
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 6052 "configure"
+#line 6050 "configure"
#include "confdefs.h"
int main () {
@@ -6058,7 +6056,7 @@ int main () {
return !(f > 3.14159 && f < 3.14160);
}
EOF
-if { (eval echo configure:6062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_scanf_has_long_double=yes
else
@@ -6080,21 +6078,21 @@ EOF
fi
echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
+for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6088: checking for $ac_hdr" >&5
+echo "configure:6086: 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 6093 "configure"
+#line 6091 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6096: \"$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*
@@ -6123,12 +6121,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6127: checking for $ac_func" >&5
+echo "configure:6125: 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 6132 "configure"
+#line 6130 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6151,7 +6149,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6153: \"$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
@@ -6176,7 +6174,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6180: checking for working mmap" >&5
+echo "configure:6178: 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
@@ -6184,7 +6182,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6188 "configure"
+#line 6186 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6212,24 +6210,11 @@ else
#include <fcntl.h>
#include <sys/mman.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -6337,7 +6322,7 @@ main()
}
EOF
-if { (eval echo configure:6341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6326: \"$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
@@ -6363,7 +6348,7 @@ fi
case ${host_os} in
aix*)
echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
-echo "configure:6367: checking for -bbigtoc option" >&5
+echo "configure:6352: checking for -bbigtoc option" >&5
if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6377,14 +6362,14 @@ else
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
cat > conftest.$ac_ext <<EOF
-#line 6381 "configure"
+#line 6366 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:6388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
:
else
echo "configure: failed program was:" >&5
@@ -6407,7 +6392,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
case ${host_os} in
hpux*)
echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
-echo "configure:6411: checking for HPUX/OSF thread support" >&5
+echo "configure:6396: checking for HPUX/OSF thread support" >&5
if test -f /usr/include/dce/cma_config.h ; then
if test "$GCC" = "yes" ; then
echo "$ac_t""yes" 1>&6
@@ -6426,7 +6411,7 @@ EOF
;;
solaris*)
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:6430: checking for Solaris thread debugging library" >&5
+echo "configure:6415: checking for Solaris thread debugging library" >&5
if test -f /usr/lib/libthread_db.so.1 ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
@@ -6436,7 +6421,7 @@ EOF
CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:6440: checking for dlopen in -ldl" >&5
+echo "configure:6425: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6444,7 +6429,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6448 "configure"
+#line 6433 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6455,7 +6440,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:6459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6487,17 +6472,17 @@ fi
# all symbols visible in the dynamic symbol table.
hold_ldflags=$LDFLAGS
echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:6491: checking for the ld -export-dynamic flag" >&5
+echo "configure:6476: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 6494 "configure"
+#line 6479 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:6501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -6516,13 +6501,13 @@ rm -f conftest*
# Sun randomly tweaked the prototypes in <proc_service.h>
# at one point.
echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
-echo "configure:6520: checking if <proc_service.h> is old" >&5
+echo "configure:6505: checking if <proc_service.h> is old" >&5
if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6526 "configure"
+#line 6511 "configure"
#include "confdefs.h"
#include <proc_service.h>
@@ -6533,7 +6518,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
@@ -6752,7 +6737,7 @@ WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
-echo "configure:6756: checking compiler warning flags" >&5
+echo "configure:6741: checking compiler warning flags" >&5
# Separate out the -Werror flag as some files just cannot be
# compiled with it enabled.
for w in ${build_warnings}; do
@@ -6762,14 +6747,14 @@ echo "configure:6756: checking compiler warning flags" >&5
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $w"
cat > conftest.$ac_ext <<EOF
-#line 6766 "configure"
+#line 6751 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:6773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
WARN_CFLAGS="${WARN_CFLAGS} $w"
else
@@ -6829,12 +6814,12 @@ fi
if test $want_included_regex = false; then
echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
-echo "configure:6833: checking for GNU regex" >&5
+echo "configure:6818: checking for GNU regex" >&5
if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6838 "configure"
+#line 6823 "configure"
#include "confdefs.h"
#include <gnu-versions.h>
#include <sys/types.h>
@@ -6846,7 +6831,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_gnu_regex=yes
else
@@ -6875,12 +6860,12 @@ fi
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:6879: checking for cygwin" >&5
+echo "configure:6864: checking for cygwin" >&5
if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6884 "configure"
+#line 6869 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -6918,7 +6903,7 @@ if test x$gdb_cv_os_cygwin = xyes; then
else
TERM_LIB=
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:6922: checking for tgetent in -lncurses" >&5
+echo "configure:6907: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6926,7 +6911,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6930 "configure"
+#line 6915 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6937,7 +6922,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6956,7 +6941,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
-echo "configure:6960: checking for tgetent in -lHcurses" >&5
+echo "configure:6945: checking for tgetent in -lHcurses" >&5
ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6964,7 +6949,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lHcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6968 "configure"
+#line 6953 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6975,7 +6960,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:6979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6994,7 +6979,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
-echo "configure:6998: checking for tgetent in -ltermlib" >&5
+echo "configure:6983: checking for tgetent in -ltermlib" >&5
ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7002,7 +6987,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermlib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7006 "configure"
+#line 6991 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7013,7 +6998,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7032,7 +7017,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:7036: checking for tgetent in -ltermcap" >&5
+echo "configure:7021: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7040,7 +7025,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7044 "configure"
+#line 7029 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7051,7 +7036,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7070,7 +7055,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:7074: checking for tgetent in -lcurses" >&5
+echo "configure:7059: checking for tgetent in -lcurses" >&5
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7078,7 +7063,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7082 "configure"
+#line 7067 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7089,7 +7074,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7108,7 +7093,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
-echo "configure:7112: checking for tgetent in -lterminfo" >&5
+echo "configure:7097: checking for tgetent in -lterminfo" >&5
ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7116,7 +7101,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lterminfo $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7120 "configure"
+#line 7105 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7127,7 +7112,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7292,7 +7277,7 @@ if test "${with_tclconfig+set}" = set; then
fi
echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:7296: checking for Tcl configuration" >&5
+echo "configure:7281: checking for Tcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7400,7 +7385,7 @@ if test "${with_tkconfig+set}" = set; then
fi
echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:7404: checking for Tk configuration" >&5
+echo "configure:7389: checking for Tk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7509,7 +7494,7 @@ fi
no_tcl=true
echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:7513: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:7498: checking for Tcl private headers. dir=${configdir}" >&5
# Check whether --with-tclinclude or --without-tclinclude was given.
if test "${with_tclinclude+set}" = set; then
withval="$with_tclinclude"
@@ -7575,17 +7560,17 @@ fi
if test x"${ac_cv_c_tclh}" = x ; then
ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
-echo "configure:7579: checking for tclInt.h" >&5
+echo "configure:7564: checking for tclInt.h" >&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 7584 "configure"
+#line 7569 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7574: \"$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*
@@ -7645,7 +7630,7 @@ fi
#
no_tk=true
echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:7649: checking for Tk private headers" >&5
+echo "configure:7634: checking for Tk private headers" >&5
# Check whether --with-tkinclude or --without-tkinclude was given.
if test "${with_tkinclude+set}" = set; then
withval="$with_tkinclude"
@@ -7711,17 +7696,17 @@ fi
if test x"${ac_cv_c_tkh}" = x ; then
ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tk.h""... $ac_c" 1>&6
-echo "configure:7715: checking for tk.h" >&5
+echo "configure:7700: checking for tk.h" >&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 7720 "configure"
+#line 7705 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7710: \"$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*
@@ -7767,7 +7752,7 @@ fi
echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7771: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:7756: checking for Itcl private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itclh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
if test -f $i/generic/itcl.h ; then
@@ -7790,7 +7775,7 @@ fi
echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7794: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:7779: checking for Itk private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itkh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
if test -f $i/generic/itk.h ; then
@@ -7813,7 +7798,7 @@ fi
echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7817: checking for Tix private headers. srcdir=${srcdir}" >&5
+echo "configure:7802: checking for Tix private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_tixh}" = x ; then
for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
if test -f $i/generic/tix.h ; then
@@ -7865,7 +7850,7 @@ if test "${with_itclconfig+set}" = set; then
fi
echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:7869: checking for Itcl configuration" >&5
+echo "configure:7854: checking for Itcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7968,7 +7953,7 @@ if test "${with_itkconfig+set}" = set; then
fi
echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:7972: checking for Itk configuration" >&5
+echo "configure:7957: checking for Itk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8071,7 +8056,7 @@ if test "${with_tixconfig+set}" = set; then
fi
echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
-echo "configure:8075: checking for Tix configuration" >&5
+echo "configure:8060: checking for Tix configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8217,7 +8202,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:8221: checking for X" >&5
+echo "configure:8206: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -8279,12 +8264,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 8283 "configure"
+#line 8268 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8273: \"$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*
@@ -8353,14 +8338,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8357 "configure"
+#line 8342 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:8364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -8652,7 +8637,7 @@ fi
# ``gdbserver'' can only be built in a native configuration.
if test x"${target}" = x"${host}"; then
echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
-echo "configure:8656: checking whether gdbserver is supported on this host" >&5
+echo "configure:8641: checking whether gdbserver is supported on this host" >&5
if test x"${build_gdbserver}" = xyes ; then
configdirs="${configdirs} gdbserver"
SUBDIRS="${SUBDIRS} gdbserver"
@@ -8714,7 +8699,7 @@ fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:8718: checking whether ln -s works" >&5
+echo "configure:8703: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8738,12 +8723,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:8742: checking for Cygwin environment" >&5
+echo "configure:8727: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8747 "configure"
+#line 8732 "configure"
#include "confdefs.h"
int main() {
@@ -8754,7 +8739,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:8758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -8771,19 +8756,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:8775: checking for mingw32 environment" >&5
+echo "configure:8760: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8780 "configure"
+#line 8765 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:8787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -8802,7 +8787,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:8806: checking for executable suffix" >&5
+echo "configure:8791: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8812,10 +8797,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:8816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:8801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -8854,7 +8839,7 @@ fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:8858: checking for iconv" >&5
+echo "configure:8843: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8862,7 +8847,7 @@ else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 8866 "configure"
+#line 8851 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -8872,7 +8857,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:8876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
@@ -8884,7 +8869,7 @@ rm -f conftest*
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
cat > conftest.$ac_ext <<EOF
-#line 8888 "configure"
+#line 8873 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -8894,7 +8879,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:8898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
@@ -8915,13 +8900,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:8919: checking for iconv declaration" >&5
+echo "configure:8904: checking for iconv declaration" >&5
if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8925 "configure"
+#line 8910 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -8940,7 +8925,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
diff --git a/gdb/configure.in b/gdb/configure.in
index 7bb455e..8628e80 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -279,7 +279,7 @@ if test "${target}" = "${host}"; then
ia64-*-aix*)
AC_DEFINE(NEW_PROC_API)
;;
- *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
+ *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
AC_DEFINE(NEW_PROC_API)
;;
*-*-solaris2.[[678]])
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 896fbb1..d272950 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -38,9 +38,11 @@ esac
case "${target}" in
+*-*-freebsd*) gdb_target=fbsd
+ ;;
+
alpha*-*-osf*) gdb_target=alpha-osf1 ;;
alpha*-*-linux*) gdb_target=alpha-linux ;;
-alpha*-*-freebsd*) gdb_target=fbsd ;;
alpha*-*-netbsd*) gdb_target=nbsd ;;
alpha*-*-*) gdb_target=alpha ;;
@@ -91,9 +93,8 @@ i[3456]86-sequent-sysv*) gdb_target=ptx ;;
i[3456]86-ncr-*) gdb_target=ncr3000 ;;
# OBSOLETE i[3456]86-*-aix*) gdb_target=i386aix ;;
i[3456]86-*-bsd*) gdb_target=i386bsd ;;
-i[3456]86-*-freebsd*) gdb_target=fbsd ;;
i[3456]86-*-netbsd*) gdb_target=nbsd ;;
-i[3456]86-*-openbsd*) gdb_target=nbsd ;; # FIXME: needs its own target
+i[3456]86-*-openbsd*) gdb_target=obsd ;;
# OBSOLETE i[3456]86-*-os9k) gdb_target=i386os9k ;;
i[3456]86-*-go32*) gdb_target=i386aout ;;
i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
@@ -268,8 +269,6 @@ sparc86x-*-*) gdb_target=sparclite ;;
# regs (some of which are usable in v8plus) so sp64sol.mt hasn't been
# deleted though presumably it should be eventually.
#sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
-sparc64-*-freebsd*|ultrasparc-*-freebsd*|sparcv9-*-freebsd*)
- gdb_target=fbsd ;;
sparc64-*-linux*) gdb_target=sp64linux ;;
sparc64-*-netbsd*) gdb_target=nbsd64 ;;
sparcv9-*-* | sparc64-*-*) gdb_target=sp64 ;;
@@ -293,7 +292,6 @@ x86_64-*-linux*) gdb_target=x86-64linux
build_gdbserver=yes
;;
-
z8k-*-coff*) gdb_target=z8k ;;
esac
diff --git a/gdb/corefile.c b/gdb/corefile.c
index 4f6eef2..be0ecf0 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -356,6 +356,14 @@ read_memory_string (CORE_ADDR memaddr, char *buffer, int max_len)
}
}
+CORE_ADDR
+read_memory_typed_address (CORE_ADDR addr, struct type *type)
+{
+ char *buf = alloca (TYPE_LENGTH (type));
+ read_memory (addr, buf, TYPE_LENGTH (type));
+ return extract_typed_address (buf, type);
+}
+
/* Same as target_write_memory, but report an error if can't write. */
void
write_memory (CORE_ADDR memaddr, char *myaddr, int len)
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 28dc025..f362d84 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -161,21 +161,13 @@ cp_print_class_method (char *valaddr,
}
}
-/* This was what it was for gcc 2.4.5 and earlier. */
-static const char vtbl_ptr_name_old[] =
-{
- CPLUS_MARKER, 'v', 't', 'b', 'l', '_', 'p', 't', 'r', '_',
- 't', 'y', 'p', 'e', 0
-};
-
-/* It was changed to this after 2.4.5. */
+/* GCC versions after 2.4.5 use this. */
const char vtbl_ptr_name[] = "__vtbl_ptr_type";
-/* HP aCC uses different names */
+/* HP aCC uses different names. */
const char hpacc_vtbl_ptr_name[] = "__vfp";
const char hpacc_vtbl_ptr_type_name[] = "__vftyp";
-
/* Return truth value for assertion that TYPE is of the type
"pointer to virtual function". */
@@ -184,9 +176,7 @@ cp_is_vtbl_ptr_type (struct type *type)
{
char *typename = type_name_no_tag (type);
- return (typename != NULL
- && (STREQ (typename, vtbl_ptr_name)
- || STREQ (typename, vtbl_ptr_name_old)));
+ return (typename != NULL && !strcmp (typename, vtbl_ptr_name));
}
/* Return truth value for the assertion that TYPE is of the type
diff --git a/gdb/defs.h b/gdb/defs.h
index d13cd69..48eb509 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -157,10 +157,6 @@ typedef bfd_vma CORE_ADDR;
#define STREQ(a,b) (*(a) == *(b) ? !strcmp ((a), (b)) : 0)
#define STREQN(a,b,c) (*(a) == *(b) ? !strncmp ((a), (b), (c)) : 0)
-/* The character GNU C++ uses to build identifiers that must be unique from
- the program's identifiers (such as $this and $$vptr). */
-#define CPLUS_MARKER '$' /* May be overridden to '.' for SysV */
-
/* Check if a character is one of the commonly used C++ marker characters. */
extern int is_cplus_marker (int);
@@ -209,6 +205,7 @@ enum language
language_auto, /* Placeholder for automatic setting */
language_c, /* C */
language_cplus, /* C++ */
+ language_objc, /* Objective-C */
language_java, /* Java */
/* OBSOLETE language_chill, */ /* Chill */
language_fortran, /* Fortran */
@@ -446,6 +443,8 @@ extern void puts_filtered (const char *);
extern void puts_unfiltered (const char *);
+extern void puts_filtered_tabular (char *string, int width, int right);
+
extern void puts_debug (char *prefix, char *string, char *suffix);
extern void vprintf_filtered (const char *, va_list) ATTR_FORMAT (printf, 1, 0);
diff --git a/gdb/demangle.c b/gdb/demangle.c
index 1fd69be..2b9579b 100644
--- a/gdb/demangle.c
+++ b/gdb/demangle.c
@@ -150,24 +150,18 @@ set_demangling_style (char *style)
set_demangling_command ((char *) NULL, 0, (struct cmd_list_element *) NULL);
}
-/* In order to allow a single demangler executable to demangle strings
- using various common values of CPLUS_MARKER, as well as any specific
- one set at compile time, we maintain a string containing all the
- commonly used ones, and check to see if the marker we are looking for
- is in that string. CPLUS_MARKER is usually '$' on systems where the
- assembler can deal with that. Where the assembler can't, it's usually
- '.' (but on many systems '.' is used for other things). We put the
- current defined CPLUS_MARKER first (which defaults to '$'), followed
- by the next most common value, followed by an explicit '$' in case
- the value of CPLUS_MARKER is not '$'.
-
- We could avoid this if we could just get g++ to tell us what the actual
- cplus marker character is as part of the debug information, perhaps by
- ensuring that it is the character that terminates the gcc<n>_compiled
- marker symbol (FIXME). */
-
-static char cplus_markers[] =
-{CPLUS_MARKER, '.', '$', '\0'};
+/* G++ uses a special character to indicate certain internal names. Which
+ character it is depends on the platform:
+ - Usually '$' on systems where the assembler will accept that
+ - Usually '.' otherwise (this includes most sysv4-like systems and most
+ ELF targets)
+ - Occasionally '_' if neither of the above is usable
+
+ We check '$' first because it is the safest, and '.' often has another
+ meaning. We don't currently try to handle '_' because the precise forms
+ of the names are different on those targets. */
+
+static char cplus_markers[] = {'$', '.', '\0'};
int
is_cplus_marker (int c)
@@ -204,5 +198,4 @@ Use `set demangle-style' without arguments for a list of demangling styles.",
/* Set the default demangling style chosen at compilation time. */
set_demangling_style (DEFAULT_DEMANGLING_STYLE);
- set_cplus_marker_for_demangling (CPLUS_MARKER);
}
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 749f181..1923c8b 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,26 @@
+2002-10-18 Kevin Buettner <kevinb@redhat.com>
+
+ * gdbint.texinfo (Address Classes): Fix problems with insertion
+ of ``{'' and ``}'' in example.
+
+2002-10-17 Kevin Buettner <kevinb@redhat.com>
+
+ * gdbint.texinfo (Address Classes): New section.
+ (Target Conditionals): Document ADDRESS_CLASS_NAME_TO_TYPE_FLAGS,
+ ADDRESS_CLASS_NAME_TO_TYPE_FLAGS_P, ADDRESS_CLASS_TYPE_FLAGS,
+ ADDRESS_CLASS_TYPE_FLAGS_P, ADDRESS_CLASS_TYPE_FLAGS_TO_NAME, and
+ ADDRESS_CLASS_TYPE_FLAGS_TO_NAME_P.
+
+2002-10-11 Klee Dienes <kdienes@apple.com>
+
+ * gdb.texinfo (Registers): Mention vector registers as well as
+ floating registers in the documentation for 'info registers' and
+ 'info all-registers'.
+
+2002-10-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbint.texinfo (CPLUS_MARKER): Remove item.
+
2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
* gdbint.texinfo (Item Output Functions): Add new ui_out_field_fmt_int
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 9269c5d..56db6ca 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -5557,13 +5557,13 @@ your machine.
@kindex info registers
@item info registers
Print the names and values of all registers except floating-point
-registers (in the selected stack frame).
+and vector registers (in the selected stack frame).
@kindex info all-registers
@cindex floating point registers
@item info all-registers
Print the names and values of all registers, including floating-point
-registers.
+and vector registers (in the selected stack frame).
@item info registers @var{regname} @dots{}
Print the @dfn{relativized} value of each specified register @var{regname}.
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 01587ec..cdb06b2 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -2630,6 +2630,91 @@ This function may safely assume that @var{type} is either a pointer or a
C@t{++} reference type.
@end deftypefn
+@section Address Classes
+@cindex address classes
+@cindex DW_AT_byte_size
+@cindex DW_AT_address_class
+
+Sometimes information about different kinds of addresses is available
+via the debug information. For example, some programming environments
+define addresses of several different sizes. If the debug information
+distinguishes these kinds of address classes through either the size
+info (e.g, @code{DW_AT_byte_size} in @w{DWARF 2}) or through an explicit
+address class attribute (e.g, @code{DW_AT_address_class} in @w{DWARF 2}), the
+following macros should be defined in order to disambiguate these
+types within @value{GDBN} as well as provide the added information to
+a @value{GDBN} user when printing type expressions.
+
+@deftypefn {Target Macro} int ADDRESS_CLASS_TYPE_FLAGS (int @var{byte_size}, int @var{dwarf2_addr_class})
+Returns the type flags needed to construct a pointer type whose size
+is @var{byte_size} and whose address class is @var{dwarf2_addr_class}.
+This function is normally called from within a symbol reader. See
+@file{dwarf2read.c}.
+@end deftypefn
+
+@deftypefn {Target Macro} char *ADDRESS_CLASS_TYPE_FLAGS_TO_NAME (int @var{type_flags})
+Given the type flags representing an address class qualifier, return
+its name.
+@end deftypefn
+@deftypefn {Target Macro} int ADDRESS_CLASS_NAME_to_TYPE_FLAGS (int @var{name}, int *var{type_flags_ptr})
+Given an address qualifier name, set the @code{int} refererenced by @var{type_flags_ptr} to the type flags
+for that address class qualifier.
+@end deftypefn
+
+Since the need for address classes is rather rare, none of
+the address class macros defined by default. Predicate
+macros are provided to detect when they are defined.
+
+Consider a hypothetical architecture in which addresses are normally
+32-bits wide, but 16-bit addresses are also supported. Furthermore,
+suppose that the @w{DWARF 2} information for this architecture simply
+uses a @code{DW_AT_byte_size} value of 2 to indicate the use of one
+of these "short" pointers. The following functions could be defined
+to implement the address class macros:
+
+@smallexample
+somearch_address_class_type_flags (int byte_size,
+ int dwarf2_addr_class)
+@{
+ if (byte_size == 2)
+ return TYPE_FLAG_ADDRESS_CLASS_1;
+ else
+ return 0;
+@}
+
+static char *
+somearch_address_class_type_flags_to_name (int type_flags)
+@{
+ if (type_flags & TYPE_FLAG_ADDRESS_CLASS_1)
+ return "short";
+ else
+ return NULL;
+@}
+
+int
+somearch_address_class_name_to_type_flags (char *name,
+ int *type_flags_ptr)
+@{
+ if (strcmp (name, "short") == 0)
+ @{
+ *type_flags_ptr = TYPE_FLAG_ADDRESS_CLASS_1;
+ return 1;
+ @}
+ else
+ return 0;
+@}
+@end smallexample
+
+The qualifier @code{@@short} is used in @value{GDBN}'s type expressions
+to indicate the presence of one of these "short" pointers. E.g, if
+the debug information indicates that @code{short_ptr_var} is one of these
+short pointers, @value{GDBN} might show the following behavior:
+
+@smallexample
+(gdb) ptype short_ptr_var
+type = int * @@short
+@end smallexample
+
@section Raw and Virtual Register Representations
@cindex raw register representation
@@ -2857,6 +2942,49 @@ boundaries, the processor masks out these bits to generate the actual
address of the instruction. ADDR_BITS_REMOVE should filter out these
bits with an expression such as @code{((addr) & ~3)}.
+@item ADDRESS_CLASS_NAME_TO_TYPE_FLAGS (@var{name}, @var{type_flags_ptr})
+@findex ADDRESS_CLASS_NAME_TO_TYPE_FLAGS
+If @var{name} is a valid address class qualifier name, set the @code{int}
+referenced by @var{type_flags_ptr} to the mask representing the qualifier
+and return 1. If @var{name} is not a valid address class qualifier name,
+return 0.
+
+The value for @var{type_flags_ptr} should be one of
+@code{TYPE_FLAG_ADDRESS_CLASS_1}, @code{TYPE_FLAG_ADDRESS_CLASS_2}, or
+possibly some combination of these values or'd together.
+@xref{Target Architecture Definition, , Address Classes}.
+
+@item ADDRESS_CLASS_NAME_TO_TYPE_FLAGS_P ()
+@findex ADDRESS_CLASS_NAME_TO_TYPE_FLAGS_P
+Predicate which indicates whether @code{ADDRESS_CLASS_NAME_TO_TYPE_FLAGS}
+has been defined.
+
+@item ADDRESS_CLASS_TYPE_FLAGS (@var{byte_size}, @var{dwarf2_addr_class})
+@findex ADDRESS_CLASS_TYPE_FLAGS (@var{byte_size}, @var{dwarf2_addr_class})
+Given a pointers byte size (as described by the debug information) and
+the possible @code{DW_AT_address_class} value, return the type flags
+used by @value{GDBN} to represent this address class. The value
+returned should be one of @code{TYPE_FLAG_ADDRESS_CLASS_1},
+@code{TYPE_FLAG_ADDRESS_CLASS_2}, or possibly some combination of these
+values or'd together.
+@xref{Target Architecture Definition, , Address Classes}.
+
+@item ADDRESS_CLASS_TYPE_FLAGS_P ()
+@findex ADDRESS_CLASS_TYPE_FLAGS_P
+Predicate which indicates whether @code{ADDRESS_CLASS_TYPE_FLAGS} has
+been defined.
+
+@item ADDRESS_CLASS_TYPE_FLAGS_TO_NAME (@var{type_flags})
+@findex ADDRESS_CLASS_TYPE_FLAGS_TO_NAME
+Return the name of the address class qualifier associated with the type
+flags given by @var{type_flags}.
+
+@item ADDRESS_CLASS_TYPE_FLAGS_TO_NAME_P ()
+@findex ADDRESS_CLASS_TYPE_FLAGS_TO_NAME_P
+Predicate which indicates whether @code{ADDRESS_CLASS_TYPE_FLAGS_TO_NAME} has
+been defined.
+@xref{Target Architecture Definition, , Address Classes}.
+
@item ADDRESS_TO_POINTER (@var{type}, @var{buf}, @var{addr})
@findex ADDRESS_TO_POINTER
Store in @var{buf} a pointer of type @var{type} representing the address
@@ -3069,13 +3197,6 @@ Return non-zero if register @var{regnum} can represent data values in a
non-standard form.
@xref{Target Architecture Definition, , Using Different Register and Memory Data Representations}.
-@item CPLUS_MARKER
-@findex CPLUS_MARKERz
-Define this to expand into the character that G@t{++} uses to distinguish
-compiler-generated identifiers from programmer-specified identifiers.
-By default, this expands into @code{'$'}. Most System V targets should
-define this to @code{'.'}.
-
@item DBX_PARM_SYMBOL_CLASS
@findex DBX_PARM_SYMBOL_CLASS
Hook for the @code{SYMBOL_CLASS} of a parameter when decoding DBX symbol
diff --git a/gdb/dwarf2cfi.c b/gdb/dwarf2cfi.c
index 18782b1..ddb42ab 100644
--- a/gdb/dwarf2cfi.c
+++ b/gdb/dwarf2cfi.c
@@ -90,37 +90,6 @@ struct fde_array
int array_size;
};
-struct context_reg
-{
- union
- {
- unsigned int reg;
- long offset;
- CORE_ADDR addr;
- }
- loc;
- enum
- {
- REG_CTX_UNSAVED,
- REG_CTX_SAVED_OFFSET,
- REG_CTX_SAVED_REG,
- REG_CTX_SAVED_ADDR,
- REG_CTX_VALUE,
- }
- how;
-};
-
-/* This is the register and unwind state for a particular frame. */
-struct context
-{
- struct context_reg *reg;
-
- CORE_ADDR cfa;
- CORE_ADDR ra;
- void *lsda;
- int args_size;
-};
-
struct frame_state_reg
{
union
@@ -208,11 +177,8 @@ static struct fde_unit *fde_unit_alloc (void);
static struct cie_unit *cie_unit_alloc (void);
static void fde_chunks_need_space ();
-static struct context *context_alloc ();
-static struct frame_state *frame_state_alloc ();
static void unwind_tmp_obstack_init ();
static void unwind_tmp_obstack_free ();
-static void context_cpy (struct context *dst, struct context *src);
static unsigned int read_1u (bfd * abfd, char **p);
static int read_1s (bfd * abfd, char **p);
@@ -286,7 +252,7 @@ fde_chunks_need_space (void)
}
/* Alocate a new `struct context' on temporary obstack. */
-static struct context *
+struct context *
context_alloc (void)
{
struct context *context;
@@ -303,7 +269,7 @@ context_alloc (void)
}
/* Alocate a new `struct frame_state' on temporary obstack. */
-static struct frame_state *
+struct frame_state *
frame_state_alloc (void)
{
struct frame_state *fs;
@@ -332,7 +298,7 @@ unwind_tmp_obstack_free (void)
unwind_tmp_obstack_init ();
}
-static void
+void
context_cpy (struct context *dst, struct context *src)
{
int regs_size = sizeof (struct context_reg) * NUM_REGS;
@@ -848,13 +814,13 @@ frame_state_for (struct context *context, struct frame_state *fs)
gdb_assert (fde->cie_ptr != NULL);
cie = fde->cie_ptr;
-
+
fs->code_align = cie->code_align;
fs->data_align = cie->data_align;
fs->retaddr_column = cie->ra;
fs->addr_encoding = cie->addr_encoding;
fs->objfile = cie->objfile;
-
+
execute_cfa_program (cie->objfile, cie->data,
cie->data + cie->data_length, context, fs);
execute_cfa_program (cie->objfile, fde->data,
@@ -1128,7 +1094,7 @@ execute_stack_op (struct objfile *objfile,
case DW_OP_deref_size:
{
int len = *op_ptr++;
- if (len != 1 && len != 2 && len != 4 && len !=8)
+ if (len != 1 && len != 2 && len != 4 && len != 8)
internal_error (__FILE__, __LINE__,
"execute_stack_op error");
result = read_memory_unsigned_integer (result, len);
diff --git a/gdb/dwarf2cfi.h b/gdb/dwarf2cfi.h
index f4c675a..a1cc39c 100644
--- a/gdb/dwarf2cfi.h
+++ b/gdb/dwarf2cfi.h
@@ -22,6 +22,37 @@
#ifndef DWARF2CFI_H
#define DWARF2CFI_H
+struct context_reg
+{
+ union
+ {
+ unsigned int reg;
+ long offset;
+ CORE_ADDR addr;
+ }
+ loc;
+ enum
+ {
+ REG_CTX_UNSAVED,
+ REG_CTX_SAVED_OFFSET,
+ REG_CTX_SAVED_REG,
+ REG_CTX_SAVED_ADDR,
+ REG_CTX_VALUE,
+ }
+ how;
+};
+
+/* This is the register and unwind state for a particular frame. */
+struct context
+{
+ struct context_reg *reg;
+
+ CORE_ADDR cfa;
+ CORE_ADDR ra;
+ void *lsda;
+ int args_size;
+};
+
/* Return the frame address. */
CORE_ADDR cfi_read_fp ();
@@ -53,7 +84,7 @@ CORE_ADDR cfi_get_ra (struct frame_info *fi);
The argument RAW_BUFFER must point to aligned memory. */
void cfi_get_saved_register (char *raw_buffer,
int *optimized,
- CORE_ADDR * addrp,
+ CORE_ADDR *addrp,
struct frame_info *frame,
int regnum, enum lval_type *lval);
@@ -63,4 +94,7 @@ void cfi_get_saved_register (char *raw_buffer,
void cfi_virtual_frame_pointer (CORE_ADDR pc, int *frame_regnum,
LONGEST * frame_offset);
+struct context *context_alloc ();
+void context_cpy (struct context *dst, struct context *src);
+struct frame_state *frame_state_alloc ();
#endif
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index b62b028..29fc164 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -162,6 +162,11 @@ unsigned int dwarf_eh_frame_size;
/* local data types */
+/* We hold several abbreviation tables in memory at the same time. */
+#ifndef ABBREV_HASH_SIZE
+#define ABBREV_HASH_SIZE 121
+#endif
+
/* The data in a compilation unit header, after target2host
translation, looks like this. */
struct comp_unit_head
@@ -174,6 +179,29 @@ struct comp_unit_head
unsigned int offset_size; /* size of file offsets; either 4 or 8 */
unsigned int initial_length_size; /* size of the length field; either
4 or 12 */
+
+ /* Offset to the first byte of this compilation unit header in the
+ * .debug_info section, for resolving relative reference dies. */
+
+ unsigned int offset;
+
+ /* Pointer to this compilation unit header in the .debug_info
+ * section */
+
+ char *cu_head_ptr;
+
+ /* Pointer to the first die of this compilatio unit. This will
+ * be the first byte following the compilation unit header. */
+
+ char *first_die_ptr;
+
+ /* Pointer to the next compilation unit header in the program. */
+
+ struct comp_unit_head *next;
+
+ /* DWARF abbreviation table associated with this compilation unit */
+
+ struct abbrev_info *dwarf2_abbrevs[ABBREV_HASH_SIZE];
};
/* The line number information for a compilation unit (found in the
@@ -312,17 +340,10 @@ struct dwarf_block
char *data;
};
-/* We only hold one compilation unit's abbrevs in
- memory at any one time. */
-#ifndef ABBREV_HASH_SIZE
-#define ABBREV_HASH_SIZE 121
-#endif
#ifndef ATTR_ALLOC_CHUNK
#define ATTR_ALLOC_CHUNK 4
#endif
-static struct abbrev_info *dwarf2_abbrevs[ABBREV_HASH_SIZE];
-
/* A hash table of die offsets for following references. */
#ifndef REF_HASH_SIZE
#define REF_HASH_SIZE 1021
@@ -389,6 +410,12 @@ static int islocal; /* Variable is at the returned offset
this function, so we can't say
which register it's relative to;
use LOC_LOCAL. */
+static int is_thread_local; /* Variable is at a constant offset in the
+ thread-local storage block for the
+ current thread and the dynamic linker
+ module containing this expression.
+ decode_locdesc returns the offset from
+ that base. */
/* DW_AT_frame_base values for the current function.
frame_base_reg is -1 if DW_AT_frame_base is missing, otherwise it
@@ -662,6 +689,10 @@ static struct complaint dwarf2_invalid_attrib_class =
{
"invalid attribute class or form for '%s' in '%s'", 0, 0
};
+static struct complaint dwarf2_invalid_pointer_size =
+{
+ "invalid pointer size %d", 0, 0
+};
/* local function prototypes */
@@ -686,11 +717,12 @@ static void psymtab_to_symtab_1 (struct partial_symtab *);
char *dwarf2_read_section (struct objfile *, file_ptr, unsigned int);
-static void dwarf2_read_abbrevs (bfd *, unsigned int);
+static void dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header);
static void dwarf2_empty_abbrev_table (PTR);
-static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int);
+static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int,
+ const struct comp_unit_head *cu_header);
static char *read_partial_die (struct partial_die_info *,
bfd *, char *,
@@ -816,6 +848,9 @@ static void read_structure_scope (struct die_info *, struct objfile *,
static void read_common_block (struct die_info *, struct objfile *,
const struct comp_unit_head *);
+static void read_namespace (struct die_info *die, struct objfile *objfile,
+ const struct comp_unit_head *cu_header);
+
static void read_enumeration (struct die_info *, struct objfile *,
const struct comp_unit_head *);
@@ -1211,9 +1246,14 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
(long) (beg_of_comp_unit - dwarf_info_buffer));
return;
}
+ /* Complete the cu_header */
+ cu_header.offset = beg_of_comp_unit - dwarf_info_buffer;
+ cu_header.first_die_ptr = info_ptr;
+ cu_header.cu_head_ptr = beg_of_comp_unit;
+
/* Read the abbrevs for this compilation unit into a table */
- dwarf2_read_abbrevs (abfd, cu_header.abbrev_offset);
- make_cleanup (dwarf2_empty_abbrev_table, NULL);
+ dwarf2_read_abbrevs (abfd, &cu_header);
+ make_cleanup (dwarf2_empty_abbrev_table, cu_header.dwarf2_abbrevs);
/* Read the compilation unit die */
info_ptr = read_partial_die (&comp_unit_die, abfd, info_ptr,
@@ -1301,6 +1341,17 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile,
int nesting_level = 1;
+ /* We only want to read in symbols corresponding to variables or
+ other similar objects that are global or static. Normally, these
+ are all children of the DW_TAG_compile_unit die, so are all at
+ level 1. But C++ namespaces give ries to DW_TAG_namespace dies
+ whose children are global objects. So we keep track of what
+ level we currently think of as referring to file scope; this
+ should always equal 1 plus the number of namespaces that we are
+ currently nested within. */
+
+ int file_scope_level = 1;
+
*lowpc = ((CORE_ADDR) -1);
*highpc = ((CORE_ADDR) 0);
@@ -1323,7 +1374,7 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile,
{
*highpc = pdi.highpc;
}
- if ((pdi.is_external || nesting_level == 1)
+ if ((pdi.is_external || nesting_level == file_scope_level)
&& !pdi.is_declaration)
{
add_partial_symbol (&pdi, objfile, cu_header);
@@ -1336,46 +1387,65 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile,
case DW_TAG_structure_type:
case DW_TAG_union_type:
case DW_TAG_enumeration_type:
- if ((pdi.is_external || nesting_level == 1)
+ if ((pdi.is_external || nesting_level == file_scope_level)
&& !pdi.is_declaration)
{
add_partial_symbol (&pdi, objfile, cu_header);
}
break;
case DW_TAG_enumerator:
- /* File scope enumerators are added to the partial symbol
- table. */
- if (nesting_level == 2)
+ /* File scope enumerators are added to the partial
+ symbol table. They're children of the enumeration
+ type die, so they occur at a level one higher than we
+ normally look for. */
+ if (nesting_level == file_scope_level + 1)
add_partial_symbol (&pdi, objfile, cu_header);
break;
case DW_TAG_base_type:
/* File scope base type definitions are added to the partial
symbol table. */
- if (nesting_level == 1)
+ if (nesting_level == file_scope_level)
add_partial_symbol (&pdi, objfile, cu_header);
break;
+ case DW_TAG_namespace:
+ /* FIXME: carlton/2002-10-16: we're not yet doing
+ anything useful with this, but for now make sure that
+ these tags at least don't cause us to miss any
+ important symbols. */
+ if (pdi.has_children)
+ file_scope_level++;
default:
break;
}
}
- /* If the die has a sibling, skip to the sibling.
- Do not skip enumeration types, we want to record their
- enumerators. */
- if (pdi.sibling && pdi.tag != DW_TAG_enumeration_type)
+ /* If the die has a sibling, skip to the sibling. Do not skip
+ enumeration types, we want to record their enumerators. Do
+ not skip namespaces, we want to record symbols inside
+ them. */
+ if (pdi.sibling
+ && pdi.tag != DW_TAG_enumeration_type
+ && pdi.tag != DW_TAG_namespace)
{
info_ptr = pdi.sibling;
}
else if (pdi.has_children)
{
- /* Die has children, but the optional DW_AT_sibling attribute
- is missing. */
+ /* Die has children, but either the optional DW_AT_sibling
+ attribute is missing or we want to look at them. */
nesting_level++;
}
if (pdi.tag == 0)
{
nesting_level--;
+ /* If this is the end of a DW_TAG_namespace entry, then
+ decrease the file_scope_level, too. */
+ if (nesting_level < file_scope_level)
+ {
+ file_scope_level--;
+ gdb_assert (nesting_level == file_scope_level);
+ }
}
}
@@ -1560,8 +1630,8 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
info_ptr = read_comp_unit_head (&cu_header, info_ptr, abfd);
/* Read the abbrevs for this compilation unit */
- dwarf2_read_abbrevs (abfd, cu_header.abbrev_offset);
- make_cleanup (dwarf2_empty_abbrev_table, NULL);
+ dwarf2_read_abbrevs (abfd, &cu_header);
+ make_cleanup (dwarf2_empty_abbrev_table, cu_header.dwarf2_abbrevs);
dies = read_comp_unit (info_ptr, abfd, &cu_header);
@@ -1675,6 +1745,19 @@ process_die (struct die_info *die, struct objfile *objfile,
break;
case DW_TAG_common_inclusion:
break;
+ case DW_TAG_namespace:
+ read_namespace (die, objfile, cu_header);
+ break;
+ case DW_TAG_imported_declaration:
+ case DW_TAG_imported_module:
+ /* FIXME: carlton/2002-10-16: Eventually, we should use the
+ information contained in these. DW_TAG_imported_declaration
+ dies shouldn't have children; DW_TAG_imported_module dies
+ shouldn't in the C++ case, but conceivably could in the
+ Fortran case, so we'll have to replace this gdb_assert if
+ Fortran compilers start generating that info. */
+ gdb_assert (!die->has_children);
+ break;
default:
new_symbol (die, NULL, objfile, cu_header);
break;
@@ -2890,6 +2973,27 @@ read_common_block (struct die_info *die, struct objfile *objfile,
}
}
+/* Read a C++ namespace. */
+
+/* FIXME: carlton/2002-10-16: For now, we don't actually do anything
+ useful with the namespace data: we just process its children. */
+
+static void
+read_namespace (struct die_info *die, struct objfile *objfile,
+ const struct comp_unit_head *cu_header)
+{
+ if (die->has_children)
+ {
+ struct die_info *child_die = die->next;
+
+ while (child_die && child_die->tag)
+ {
+ process_die (child_die, objfile, cu_header);
+ child_die = sibling_die (child_die);
+ }
+ }
+}
+
/* Extract all information from a DW_TAG_pointer_type DIE and add to
the user defined type vector. */
@@ -2898,7 +3002,9 @@ read_tag_pointer_type (struct die_info *die, struct objfile *objfile,
const struct comp_unit_head *cu_header)
{
struct type *type;
- struct attribute *attr;
+ struct attribute *attr_byte_size;
+ struct attribute *attr_address_class;
+ int byte_size, addr_class;
if (die->type)
{
@@ -2906,15 +3012,42 @@ read_tag_pointer_type (struct die_info *die, struct objfile *objfile,
}
type = lookup_pointer_type (die_type (die, objfile, cu_header));
- attr = dwarf_attr (die, DW_AT_byte_size);
- if (attr)
- {
- TYPE_LENGTH (type) = DW_UNSND (attr);
- }
+
+ attr_byte_size = dwarf_attr (die, DW_AT_byte_size);
+ if (attr_byte_size)
+ byte_size = DW_UNSND (attr_byte_size);
+ else
+ byte_size = cu_header->addr_size;
+
+ attr_address_class = dwarf_attr (die, DW_AT_address_class);
+ if (attr_address_class)
+ addr_class = DW_UNSND (attr_address_class);
else
+ addr_class = DW_ADDR_none;
+
+ /* If the pointer size or address class is different than the
+ default, create a type variant marked as such and set the
+ length accordingly. */
+ if (TYPE_LENGTH (type) != byte_size || addr_class != DW_ADDR_none)
{
- TYPE_LENGTH (type) = cu_header->addr_size;
+ if (ADDRESS_CLASS_TYPE_FLAGS_P ())
+ {
+ int type_flags;
+
+ type_flags = ADDRESS_CLASS_TYPE_FLAGS (byte_size, addr_class);
+ gdb_assert ((type_flags & ~TYPE_FLAG_ADDRESS_CLASS_ALL) == 0);
+ type = make_type_with_address_space (type, type_flags);
+ }
+ else if (TYPE_LENGTH (type) != byte_size)
+ {
+ complain (&dwarf2_invalid_pointer_size, byte_size);
+ }
+ else {
+ /* Should we also complain about unhandled address classes? */
+ }
}
+
+ TYPE_LENGTH (type) = byte_size;
die->type = type;
}
@@ -3345,17 +3478,18 @@ dwarf2_read_section (struct objfile *objfile, file_ptr offset,
in a hash table. */
static void
-dwarf2_read_abbrevs (bfd *abfd, unsigned int offset)
+dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header)
{
char *abbrev_ptr;
struct abbrev_info *cur_abbrev;
unsigned int abbrev_number, bytes_read, abbrev_name;
unsigned int abbrev_form, hash_number;
- /* empty the table */
- dwarf2_empty_abbrev_table (NULL);
+ /* Initialize dwarf2 abbrevs */
+ memset (cu_header->dwarf2_abbrevs, 0,
+ ABBREV_HASH_SIZE*sizeof (struct abbrev_info *));
- abbrev_ptr = dwarf_abbrev_buffer + offset;
+ abbrev_ptr = dwarf_abbrev_buffer + cu_header->abbrev_offset;
abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
abbrev_ptr += bytes_read;
@@ -3394,8 +3528,8 @@ dwarf2_read_abbrevs (bfd *abfd, unsigned int offset)
}
hash_number = abbrev_number % ABBREV_HASH_SIZE;
- cur_abbrev->next = dwarf2_abbrevs[hash_number];
- dwarf2_abbrevs[hash_number] = cur_abbrev;
+ cur_abbrev->next = cu_header->dwarf2_abbrevs[hash_number];
+ cu_header->dwarf2_abbrevs[hash_number] = cur_abbrev;
/* Get next abbreviation.
Under Irix6 the abbreviations for a compilation unit are not
@@ -3409,7 +3543,7 @@ dwarf2_read_abbrevs (bfd *abfd, unsigned int offset)
break;
abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
abbrev_ptr += bytes_read;
- if (dwarf2_lookup_abbrev (abbrev_number) != NULL)
+ if (dwarf2_lookup_abbrev (abbrev_number, cu_header) != NULL)
break;
}
}
@@ -3418,15 +3552,18 @@ dwarf2_read_abbrevs (bfd *abfd, unsigned int offset)
/* ARGSUSED */
static void
-dwarf2_empty_abbrev_table (PTR ignore)
+dwarf2_empty_abbrev_table (PTR ptr_to_abbrevs_table)
{
int i;
struct abbrev_info *abbrev, *next;
+ struct abbrev_info **abbrevs;
+
+ abbrevs = (struct abbrev_info **)ptr_to_abbrevs_table;
for (i = 0; i < ABBREV_HASH_SIZE; ++i)
{
next = NULL;
- abbrev = dwarf2_abbrevs[i];
+ abbrev = abbrevs[i];
while (abbrev)
{
next = abbrev->next;
@@ -3434,20 +3571,20 @@ dwarf2_empty_abbrev_table (PTR ignore)
xfree (abbrev);
abbrev = next;
}
- dwarf2_abbrevs[i] = NULL;
+ abbrevs[i] = NULL;
}
}
/* Lookup an abbrev_info structure in the abbrev hash table. */
static struct abbrev_info *
-dwarf2_lookup_abbrev (unsigned int number)
+dwarf2_lookup_abbrev (unsigned int number, const struct comp_unit_head *cu_header)
{
unsigned int hash_number;
struct abbrev_info *abbrev;
hash_number = number % ABBREV_HASH_SIZE;
- abbrev = dwarf2_abbrevs[hash_number];
+ abbrev = cu_header->dwarf2_abbrevs[hash_number];
while (abbrev)
{
@@ -3479,7 +3616,7 @@ read_partial_die (struct partial_die_info *part_die, bfd *abfd,
if (!abbrev_number)
return info_ptr;
- abbrev = dwarf2_lookup_abbrev (abbrev_number);
+ abbrev = dwarf2_lookup_abbrev (abbrev_number, cu_header);
if (!abbrev)
{
error ("Dwarf Error: Could not find abbrev number %d.", abbrev_number);
@@ -3623,7 +3760,7 @@ read_full_die (struct die_info **diep, bfd *abfd, char *info_ptr,
return info_ptr;
}
- abbrev = dwarf2_lookup_abbrev (abbrev_number);
+ abbrev = dwarf2_lookup_abbrev (abbrev_number, cu_header);
if (!abbrev)
{
error ("Dwarf Error: could not find abbrev number %d.", abbrev_number);
@@ -4724,6 +4861,14 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
"external variable");
}
add_symbol_to_list (sym, &global_symbols);
+ if (is_thread_local)
+ {
+ /* SYMBOL_VALUE_ADDRESS contains at this point the
+ offset of the variable within the thread local
+ storage. */
+ SYMBOL_CLASS (sym) = LOC_THREAD_LOCAL_STATIC;
+ SYMBOL_OBJFILE (sym) = objfile;
+ }
/* In shared libraries the address of the variable
in the location descriptor might still be relocatable,
@@ -4732,7 +4877,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
value is zero, the address of the variable will then
be determined from the minimal symbol table whenever
the variable is referenced. */
- if (SYMBOL_VALUE_ADDRESS (sym))
+ else if (SYMBOL_VALUE_ADDRESS (sym))
{
fixup_symbol_section (sym, objfile);
SYMBOL_VALUE_ADDRESS (sym) +=
@@ -4782,6 +4927,11 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
{
SYMBOL_CLASS (sym) = LOC_LOCAL;
}
+ else if (is_thread_local)
+ {
+ SYMBOL_CLASS (sym) = LOC_THREAD_LOCAL_STATIC;
+ SYMBOL_OBJFILE (sym) = objfile;
+ }
else
{
fixup_symbol_section (sym, objfile);
@@ -5429,6 +5579,22 @@ dwarf_tag_name (register unsigned tag)
return "DW_TAG_variable";
case DW_TAG_volatile_type:
return "DW_TAG_volatile_type";
+ case DW_TAG_dwarf_procedure:
+ return "DW_TAG_dwarf_procedure";
+ case DW_TAG_restrict_type:
+ return "DW_TAG_restrict_type";
+ case DW_TAG_interface_type:
+ return "DW_TAG_interface_type";
+ case DW_TAG_namespace:
+ return "DW_TAG_namespace";
+ case DW_TAG_imported_module:
+ return "DW_TAG_imported_module";
+ case DW_TAG_unspecified_type:
+ return "DW_TAG_unspecified_type";
+ case DW_TAG_partial_unit:
+ return "DW_TAG_partial_unit";
+ case DW_TAG_imported_unit:
+ return "DW_TAG_imported_unit";
case DW_TAG_MIPS_loop:
return "DW_TAG_MIPS_loop";
case DW_TAG_format_label:
@@ -5573,7 +5739,30 @@ dwarf_attr_name (register unsigned attr)
return "DW_AT_virtuality";
case DW_AT_vtable_elem_location:
return "DW_AT_vtable_elem_location";
-
+ case DW_AT_allocated:
+ return "DW_AT_allocated";
+ case DW_AT_associated:
+ return "DW_AT_associated";
+ case DW_AT_data_location:
+ return "DW_AT_data_location";
+ case DW_AT_stride:
+ return "DW_AT_stride";
+ case DW_AT_entry_pc:
+ return "DW_AT_entry_pc";
+ case DW_AT_use_UTF8:
+ return "DW_AT_use_UTF8";
+ case DW_AT_extension:
+ return "DW_AT_extension";
+ case DW_AT_ranges:
+ return "DW_AT_ranges";
+ case DW_AT_trampoline:
+ return "DW_AT_trampoline";
+ case DW_AT_call_column:
+ return "DW_AT_call_column";
+ case DW_AT_call_file:
+ return "DW_AT_call_file";
+ case DW_AT_call_line:
+ return "DW_AT_call_line";
#ifdef MIPS
case DW_AT_MIPS_fde:
return "DW_AT_MIPS_fde";
@@ -6010,6 +6199,8 @@ dwarf_type_encoding_name (register unsigned enc)
return "DW_ATE_unsigned";
case DW_ATE_unsigned_char:
return "DW_ATE_unsigned_char";
+ case DW_ATE_imaginary_float:
+ return "DW_ATE_imaginary_float";
default:
return "DW_ATE_<unknown>";
}
@@ -6294,6 +6485,7 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
offreg = 0;
isderef = 0;
islocal = 0;
+ is_thread_local = 0;
optimized_out = 1;
while (i < size)
@@ -6517,6 +6709,16 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
complain (&dwarf2_complex_location_expr);
break;
+ case DW_OP_GNU_push_tls_address:
+ is_thread_local = 1;
+ /* The top of the stack has the offset from the beginning
+ of the thread control block at which the variable is located. */
+ /* Nothing should follow this operator, so the top of stack would
+ be returned. */
+ if (i < size)
+ complain (&dwarf2_complex_location_expr);
+ break;
+
default:
complain (&dwarf2_unsupported_stack_op, dwarf_stack_op_name (op));
return (stack[stacki]);
diff --git a/gdb/expression.h b/gdb/expression.h
index 34e002f..e7f9d48 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -181,6 +181,12 @@ enum exp_opcode
making three exp_elements. */
OP_FUNCALL,
+ /* OP_MSGCALL is followed by a string in the next exp_element and then an
+ integer. The string is the selector string. The integer is the number
+ of arguments to the message call. That many plus one values are used,
+ the first one being the object pointer. This is an Objective C message */
+ OP_MSGCALL,
+
/* This is EXACTLY like OP_FUNCALL but is semantically different.
In F77, array subscript expressions, substring expressions
and function calls are all exactly the same syntactically. They may
@@ -273,11 +279,17 @@ enum exp_opcode
STRUCTOP_STRUCT,
STRUCTOP_PTR,
- /* C++ */
- /* OP_THIS is just a placeholder for the class instance variable.
+ /* C++: OP_THIS is just a placeholder for the class instance variable.
It just comes in a tight (OP_THIS, OP_THIS) pair. */
OP_THIS,
+ /* Objective-C: OP_SELF is just a placeholder for the class instance
+ variable. It just comes in a tight (OP_SELF, OP_SELF) pair. */
+ OP_SELF,
+
+ /* Objective C: "@selector" pseudo-operator */
+ OP_SELECTOR,
+
/* OP_SCOPE surrounds a type name and a field name. The type
name is encoded as one element, but the field name stays as
a string, which, of course, is variable length. */
@@ -305,7 +317,10 @@ enum exp_opcode
OP_NAME,
/* An unparsed expression. Used for Scheme (for now at least) */
- OP_EXPRSTRING
+ OP_EXPRSTRING,
+
+ /* An Objective C Foundation Class NSString constant */
+ OP_NSSTRING,
};
union exp_element
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 48c5113..4bd01cc 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -102,9 +102,9 @@ f77_get_dynamic_lowerbound (struct type *type, int *lower_bound)
if (current_frame_addr > 0)
{
ptr_to_lower_bound =
- read_memory_integer (current_frame_addr +
- TYPE_ARRAY_LOWER_BOUND_VALUE (type),
- 4);
+ read_memory_typed_address (current_frame_addr +
+ TYPE_ARRAY_LOWER_BOUND_VALUE (type),
+ builtin_type_void_data_ptr);
*lower_bound = read_memory_integer (ptr_to_lower_bound, 4);
}
else
@@ -165,9 +165,9 @@ f77_get_dynamic_upperbound (struct type *type, int *upper_bound)
if (current_frame_addr > 0)
{
ptr_to_upper_bound =
- read_memory_integer (current_frame_addr +
- TYPE_ARRAY_UPPER_BOUND_VALUE (type),
- 4);
+ read_memory_typed_address (current_frame_addr +
+ TYPE_ARRAY_UPPER_BOUND_VALUE (type),
+ builtin_type_void_data_ptr);
*upper_bound = read_memory_integer (ptr_to_upper_bound, 4);
}
else
diff --git a/gdb/findvar.c b/gdb/findvar.c
index d259132..dd3061b 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -391,7 +391,7 @@ symbol_read_needs_frame (struct symbol *sym)
case LOC_LOCAL_ARG:
case LOC_BASEREG:
case LOC_BASEREG_ARG:
- case LOC_THREAD_LOCAL_STATIC:
+ case LOC_HP_THREAD_LOCAL_STATIC:
return 1;
case LOC_UNDEF:
@@ -529,7 +529,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i
case LOC_BASEREG:
case LOC_BASEREG_ARG:
- case LOC_THREAD_LOCAL_STATIC:
+ case LOC_HP_THREAD_LOCAL_STATIC:
{
struct value *regval;
@@ -542,6 +542,29 @@ addresses have not been bound by the dynamic loader. Try again when executable i
break;
}
+ case LOC_THREAD_LOCAL_STATIC:
+ {
+#if 0
+ /* FIXME: ezannoni 2002-10-21: Temporarly disable the code
+ below, until the rest of the TLS support code is checked
+ in. */
+
+ /* We want to let the target / ABI-specific code construct
+ this value for us, so we need to dispose of the value
+ allocated for us above. */
+ if (target_get_thread_local_address_p ())
+ addr = target_get_thread_local_address (inferior_ptid,
+ SYMBOL_OBJFILE (var),
+ SYMBOL_VALUE_ADDRESS (var));
+ /* It wouldn't be wrong here to try a gdbarch method, too;
+ finding TLS is an ABI-specific thing. But we don't do that
+ yet. */
+ else
+#endif
+ error ("Cannot find thread-local variables on this target");
+ break;
+ }
+
case LOC_TYPEDEF:
error ("Cannot look up value of a typedef");
break;
diff --git a/gdb/gdb_indent.sh b/gdb/gdb_indent.sh
index 0d0829a..c47ef95 100755
--- a/gdb/gdb_indent.sh
+++ b/gdb/gdb_indent.sh
@@ -37,7 +37,7 @@ fi
# Different indent versions give different indentation.
case `${indent} --version 2>/dev/null < /dev/null` in
- GNU*2.2.6 ) ;;
+ GNU*2.2* ) ;;
*GNU* ) echo "Incorrect version of GNU indent" 1>&2 ;;
* ) echo "Indent is not GNU" 1>&2 ;;
esac
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index c0c4f9f..901c47e 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -270,6 +270,10 @@ struct gdbarch
gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
const char * name_of_malloc;
int cannot_step_breakpoint;
+ int have_nonsteppable_watchpoint;
+ gdbarch_address_class_type_flags_ftype *address_class_type_flags;
+ gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
+ gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
};
@@ -429,6 +433,10 @@ struct gdbarch startup_gdbarch =
0,
"malloc",
0,
+ 0,
+ 0,
+ 0,
+ 0,
/* startup_gdbarch() */
};
@@ -807,6 +815,10 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
/* Skip verify of name_of_malloc, invalid_p == 0 */
/* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
+ /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
+ /* Skip verify of address_class_type_flags, has predicate */
+ /* Skip verify of address_class_type_flags_to_name, has predicate */
+ /* Skip verify of address_class_name_to_type_flags, has predicate */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
@@ -847,6 +859,25 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: pseudo_register_write = 0x%08lx\n",
(long) current_gdbarch->pseudo_register_write);
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
+ (long) current_gdbarch->address_class_name_to_type_flags);
+#ifdef ADDRESS_CLASS_TYPE_FLAGS
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
+ XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = 0x%08lx\n",
+ (long) current_gdbarch->address_class_type_flags
+ /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
+ (long) current_gdbarch->address_class_type_flags_to_name);
#ifdef ADDRESS_TO_POINTER
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -1383,6 +1414,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->get_saved_register
/*GET_SAVED_REGISTER ()*/);
#endif
+#ifdef HAVE_NONSTEPPABLE_WATCHPOINT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
+ XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
+ HAVE_NONSTEPPABLE_WATCHPOINT);
+#endif
#ifdef INIT_EXTRA_FRAME_INFO
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -5052,6 +5091,101 @@ set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
}
+int
+gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
+ return gdbarch->have_nonsteppable_watchpoint;
+}
+
+void
+set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
+ int have_nonsteppable_watchpoint)
+{
+ gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
+}
+
+int
+gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->address_class_type_flags != 0;
+}
+
+int
+gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->address_class_type_flags == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_address_class_type_flags invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
+ return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
+}
+
+void
+set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
+ gdbarch_address_class_type_flags_ftype address_class_type_flags)
+{
+ gdbarch->address_class_type_flags = address_class_type_flags;
+}
+
+int
+gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->address_class_type_flags_to_name != 0;
+}
+
+char *
+gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->address_class_type_flags_to_name == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
+ return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
+}
+
+void
+set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
+ gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
+{
+ gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
+}
+
+int
+gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->address_class_name_to_type_flags != 0;
+}
+
+int
+gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, char *name, int *type_flags_ptr)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->address_class_name_to_type_flags == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
+ return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
+}
+
+void
+set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
+ gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
+{
+ gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index b14d3c1..994ae82 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2595,6 +2595,71 @@ extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int can
#endif
#endif
+/* Default (value) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
+#define HAVE_NONSTEPPABLE_WATCHPOINT (0)
+#endif
+
+extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch);
+extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT)
+#error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
+#define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch))
+#endif
+#endif
+
+#if defined (ADDRESS_CLASS_TYPE_FLAGS)
+/* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */
+#if !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
+#define ADDRESS_CLASS_TYPE_FLAGS_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
+#define ADDRESS_CLASS_TYPE_FLAGS_P() (0)
+#endif
+
+extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_P)
+#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
+#define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS)
+#define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (internal_error (__FILE__, __LINE__, "ADDRESS_CLASS_TYPE_FLAGS"), 0)
+#endif
+
+typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class);
+extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class);
+extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS)
+#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS)
+#define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class))
+#endif
+#endif
+
+extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch);
+
+typedef char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gdbarch *gdbarch, int type_flags);
+extern char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags);
+extern void set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name);
+
+extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch);
+
+typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, char *name, int *type_flags_ptr);
+extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, char *name, int *type_flags_ptr);
+extern void set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags);
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 79c7fe5..6c9ac04 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -663,6 +663,10 @@ f:2:ELF_MAKE_MSYMBOL_SPECIAL:void:elf_make_msymbol_special:asymbol *sym, struct
f:2:COFF_MAKE_MSYMBOL_SPECIAL:void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym:::default_coff_make_msymbol_special::0
v::NAME_OF_MALLOC:const char *:name_of_malloc::::"malloc":"malloc"::0
v::CANNOT_STEP_BREAKPOINT:int:cannot_step_breakpoint::::0:0::0
+v::HAVE_NONSTEPPABLE_WATCHPOINT:int:have_nonsteppable_watchpoint::::0:0::0
+F:2:ADDRESS_CLASS_TYPE_FLAGS:int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class
+M:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:char *:address_class_type_flags_to_name:int type_flags:type_flags:
+M:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int:address_class_name_to_type_flags:char *name, int *type_flags_ptr:name, type_flags_ptr
EOF
}
diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h
index 8859455..5c10c58 100644
--- a/gdb/gdbcore.h
+++ b/gdb/gdbcore.h
@@ -64,8 +64,15 @@ extern ULONGEST read_memory_unsigned_integer (CORE_ADDR memaddr, int len);
/* Read a null-terminated string from the debuggee's memory, given address,
* a buffer into which to place the string, and the maximum available space */
+
extern void read_memory_string (CORE_ADDR, char *, int);
+/* Read the pointer of type TYPE at ADDR, and return the address it
+ represents. */
+
+CORE_ADDR
+read_memory_typed_address (CORE_ADDR addr, struct type *type);
+
/* This takes a char *, not void *. This is probably right, because
passing in an int * or whatever is wrong with respect to
byteswapping, alignment, different sizes for host vs. target types,
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 3ef1828..a43987d 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -397,11 +397,18 @@ lookup_function_type (struct type *type)
extern int
address_space_name_to_int (char *space_identifier)
{
+ struct gdbarch *gdbarch = current_gdbarch;
+ int type_flags;
/* Check for known address space delimiters. */
if (!strcmp (space_identifier, "code"))
return TYPE_FLAG_CODE_SPACE;
else if (!strcmp (space_identifier, "data"))
return TYPE_FLAG_DATA_SPACE;
+ else if (gdbarch_address_class_name_to_type_flags_p (gdbarch)
+ && gdbarch_address_class_name_to_type_flags (gdbarch,
+ space_identifier,
+ &type_flags))
+ return type_flags;
else
error ("Unknown address space specifier: \"%s\"", space_identifier);
}
@@ -412,10 +419,14 @@ address_space_name_to_int (char *space_identifier)
extern char *
address_space_int_to_name (int space_flag)
{
+ struct gdbarch *gdbarch = current_gdbarch;
if (space_flag & TYPE_FLAG_CODE_SPACE)
return "code";
else if (space_flag & TYPE_FLAG_DATA_SPACE)
return "data";
+ else if ((space_flag & TYPE_FLAG_ADDRESS_CLASS_ALL)
+ && gdbarch_address_class_type_flags_to_name_p (gdbarch))
+ return gdbarch_address_class_type_flags_to_name (gdbarch, space_flag);
else
return NULL;
}
@@ -465,14 +476,17 @@ make_qualified_type (struct type *type, int new_flags,
is identical to the one supplied except that it has an address
space attribute attached to it (such as "code" or "data").
- This is for Harvard architectures. */
+ The space attributes "code" and "data" are for Harvard architectures.
+ The address space attributes are for architectures which have
+ alternately sized pointers or pointers with alternate representations. */
struct type *
make_type_with_address_space (struct type *type, int space_flag)
{
struct type *ntype;
int new_flags = ((TYPE_INSTANCE_FLAGS (type)
- & ~(TYPE_FLAG_CODE_SPACE | TYPE_FLAG_DATA_SPACE))
+ & ~(TYPE_FLAG_CODE_SPACE | TYPE_FLAG_DATA_SPACE
+ | TYPE_FLAG_ADDRESS_CLASS_ALL))
| space_flag);
return make_qualified_type (type, new_flags, NULL);
@@ -3140,6 +3154,14 @@ recursive_dump_type (struct type *type, int spaces)
{
puts_filtered (" TYPE_FLAG_DATA_SPACE");
}
+ if (TYPE_ADDRESS_CLASS_1 (type))
+ {
+ puts_filtered (" TYPE_FLAG_ADDRESS_CLASS_1");
+ }
+ if (TYPE_ADDRESS_CLASS_2 (type))
+ {
+ puts_filtered (" TYPE_FLAG_ADDRESS_CLASS_2");
+ }
puts_filtered ("\n");
printfi_filtered (spaces, "flags 0x%x", TYPE_FLAGS (type));
if (TYPE_UNSIGNED (type))
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index a0b754a..d4d9afe 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -253,6 +253,22 @@ enum type_code
#define TYPE_FLAG_VECTOR (1 << 12)
#define TYPE_VECTOR(t) (TYPE_FLAGS (t) & TYPE_FLAG_VECTOR)
+/* Address class flags. Some environments provide for pointers whose
+ size is different from that of a normal pointer or address types
+ where the bits are interpreted differently than normal addresses. The
+ TYPE_FLAG_ADDRESS_CLASS_n flags may be used in target specific
+ ways to represent these different types of address classes. */
+#define TYPE_FLAG_ADDRESS_CLASS_1 (1 << 13)
+#define TYPE_ADDRESS_CLASS_1(t) (TYPE_INSTANCE_FLAGS(t) \
+ & TYPE_FLAG_ADDRESS_CLASS_1)
+#define TYPE_FLAG_ADDRESS_CLASS_2 (1 << 14)
+#define TYPE_ADDRESS_CLASS_2(t) (TYPE_INSTANCE_FLAGS(t) \
+ & TYPE_FLAG_ADDRESS_CLASS_2)
+#define TYPE_FLAG_ADDRESS_CLASS_ALL (TYPE_FLAG_ADDRESS_CLASS_1 \
+ | TYPE_FLAG_ADDRESS_CLASS_2)
+#define TYPE_ADDRESS_CLASS_ALL(t) (TYPE_INSTANCE_FLAGS(t) \
+ & TYPE_FLAG_ADDRESS_CLASS_ALL)
+
struct main_type
{
/* Code for kind of type */
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 3890fc2..19e4402 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -4426,7 +4426,7 @@ child_enable_exception_callback (enum exception_event_kind kind, int enable)
{
break_callback_sal = (struct symtab_and_line *) xmalloc (sizeof (struct symtab_and_line));
}
- INIT_SAL (break_callback_sal);
+ init_sal (break_callback_sal);
break_callback_sal->symtab = NULL;
break_callback_sal->pc = eh_break_addr;
break_callback_sal->line = 0;
diff --git a/gdb/hpread.c b/gdb/hpread.c
index 4cc5f18..72985fb 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -5742,7 +5742,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
{
/* Thread-local variable.
*/
- SYMBOL_CLASS (sym) = LOC_THREAD_LOCAL_STATIC;
+ SYMBOL_CLASS (sym) = LOC_HP_THREAD_LOCAL_STATIC;
SYMBOL_BASEREG (sym) = CR27_REGNUM;
if (objfile->flags & OBJF_SHARED)
diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c
index 8a3acd4..ec38e13 100644
--- a/gdb/i386bsd-nat.c
+++ b/gdb/i386bsd-nat.c
@@ -306,7 +306,7 @@ i386bsd_dr_set (int regnum, unsigned int value)
/* For some mysterious reason, some of the reserved bits in the
debug control register get set. Mask these off, otherwise the
ptrace call below will fail. */
- dbregs.dr7 &= ~(0x0000fc00);
+ DBREG_DRX ((&dbregs), 7) &= ~(0x0000fc00);
DBREG_DRX ((&dbregs), regnum) = value;
@@ -355,7 +355,7 @@ i386bsd_dr_get_status (void)
return 0;
#endif
- return dbregs.dr6;
+ return DBREG_DRX ((&dbregs), 6);
}
#endif /* PT_GETDBREGS */
@@ -400,11 +400,16 @@ _initialize_i386bsd_nat (void)
extern int i386fbsd4_sc_sp_offset;
#define SC_PC_OFFSET i386fbsd4_sc_pc_offset
#define SC_SP_OFFSET i386fbsd4_sc_sp_offset
-#elif defined (NetBSD) || defined (__NetBSD_Version__) || defined (OpenBSD)
+#elif defined (NetBSD) || defined (__NetBSD_Version__)
extern int i386nbsd_sc_pc_offset;
extern int i386nbsd_sc_sp_offset;
#define SC_PC_OFFSET i386nbsd_sc_pc_offset
#define SC_SP_OFFSET i386nbsd_sc_sp_offset
+#elif defined (OpenBSD)
+ extern int i386obsd_sc_pc_offset;
+ extern int i386obsd_sc_sp_offset;
+#define SC_PC_OFFSET i386obsd_sc_pc_offset
+#define SC_SP_OFFSET i386obsd_sc_sp_offset
#else
extern int i386bsd_sc_pc_offset;
extern int i386bsd_sc_sp_offset;
diff --git a/gdb/i386obsd-nat.c b/gdb/i386obsd-nat.c
index 17ef922..b2cdc2a 100644
--- a/gdb/i386obsd-nat.c
+++ b/gdb/i386obsd-nat.c
@@ -44,16 +44,16 @@ _initialize_i386obsd_nat (void)
int mib[2];
size_t len;
- extern CORE_ADDR i386nbsd_sigtramp_start;
- extern CORE_ADDR i386nbsd_sigtramp_end;
+ extern CORE_ADDR i386obsd_sigtramp_start;
+ extern CORE_ADDR i386obsd_sigtramp_end;
mib[0] = CTL_VM;
mib[1] = VM_PSSTRINGS;
len = sizeof (_ps);
if (sysctl (mib, 2, &_ps, &len, NULL, 0) == 0)
{
- i386nbsd_sigtramp_start = (CORE_ADDR)_ps.val - 128;
- i386nbsd_sigtramp_end = (CORE_ADDR)_ps.val;
+ i386obsd_sigtramp_start = (CORE_ADDR)_ps.val - 128;
+ i386obsd_sigtramp_end = (CORE_ADDR)_ps.val;
}
}
#endif
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
new file mode 100644
index 0000000..7f16237
--- /dev/null
+++ b/gdb/i386obsd-tdep.c
@@ -0,0 +1,122 @@
+/* Target-dependent code for OpenBSD/i386.
+ Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002
+ Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include "defs.h"
+#include "arch-utils.h"
+#include "gdbcore.h"
+#include "regcache.h"
+
+#include "i386-tdep.h"
+#include "i387-tdep.h"
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_i386obsd_tdep (void);
+
+#define SIZEOF_STRUCT_REG (16 * 4)
+
+static void
+i386obsd_supply_reg (char *regs, int regno)
+{
+ int i;
+
+ for (i = 0; i <= 15; i++)
+ if (regno == i || regno == -1)
+ supply_register (i, regs + i * 4);
+}
+
+static void
+fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
+ CORE_ADDR ignore)
+{
+ char *regs, *fsave;
+
+ /* We get everything from one section. */
+ if (which != 0)
+ return;
+
+ if (core_reg_size < (SIZEOF_STRUCT_REG + 108))
+ {
+ warning ("Wrong size register set in core file.");
+ return;
+ }
+
+ regs = core_reg_sect;
+ fsave = core_reg_sect + SIZEOF_STRUCT_REG;
+
+ /* Integer registers. */
+ i386obsd_supply_reg (regs, -1);
+
+ /* Floating point registers. */
+ i387_supply_fsave (fsave);
+}
+
+static struct core_fns i386obsd_core_fns =
+{
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
+};
+
+
+CORE_ADDR i386obsd_sigtramp_start = 0xbfbfdf20;
+CORE_ADDR i386obsd_sigtramp_end = 0xbfbfdff0;
+
+/* From <machine/signal.h>. */
+int i386obsd_sc_pc_offset = 44;
+int i386obsd_sc_sp_offset = 56;
+
+static void
+i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* Obviously OpenBSD is BSD-based. */
+ i386bsd_init_abi (info, gdbarch);
+
+ /* OpenBSD uses -freg-struct-return by default. */
+ tdep->struct_return = reg_struct_return;
+
+ /* OpenBSD uses a different memory layout. */
+ tdep->sigtramp_start = i386obsd_sigtramp_start;
+ tdep->sigtramp_end = i386obsd_sigtramp_end;
+
+ /* OpenBSD has a `struct sigcontext' that's different from the
+ origional 4.3 BSD. */
+ tdep->sc_pc_offset = i386obsd_sc_pc_offset;
+ tdep->sc_sp_offset = i386obsd_sc_sp_offset;
+}
+
+void
+_initialize_i386obsd_tdep (void)
+{
+ add_core_fns (&i386obsd_core_fns);
+
+ /* FIXME: kettenis/20021020: Since OpenBSD/i386 binaries are
+ indistingushable from NetBSD/i386 a.out binaries, building a GDB
+ that should support both these targets will probably not work as
+ expected. */
+#define GDB_OSABI_OPENBSD_AOUT GDB_OSABI_NETBSD_AOUT
+
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_OPENBSD_AOUT,
+ i386obsd_init_abi);
+}
diff --git a/gdb/i386v-nat.c b/gdb/i386v-nat.c
index 8180093..78152e4 100644
--- a/gdb/i386v-nat.c
+++ b/gdb/i386v-nat.c
@@ -60,6 +60,8 @@
#include "floatformat.h"
#include "target.h"
+
+#include "i386-tdep.h"
/* Mapping between the general-purpose registers in `struct user'
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index a362581..5359e29 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -983,7 +983,7 @@ run_stack_dummy (CORE_ADDR addr, struct regcache *buffer)
struct breakpoint *bpt;
struct symtab_and_line sal;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
{
sal.pc = CALL_DUMMY_ADDRESS ();
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 89a1d23..88c59c5 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -231,13 +231,6 @@ a command like `return' or `jump' to continue execution.");
#define HAVE_STEPPABLE_WATCHPOINT 1
#endif
-#ifndef HAVE_NONSTEPPABLE_WATCHPOINT
-#define HAVE_NONSTEPPABLE_WATCHPOINT 0
-#else
-#undef HAVE_NONSTEPPABLE_WATCHPOINT
-#define HAVE_NONSTEPPABLE_WATCHPOINT 1
-#endif
-
#ifndef HAVE_CONTINUABLE_WATCHPOINT
#define HAVE_CONTINUABLE_WATCHPOINT 0
#else
@@ -2610,7 +2603,7 @@ process_event_stop_test:
/* Set up a step-resume breakpoint at the address
indicated by SKIP_SOLIB_RESOLVER. */
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal);
+ init_sal (&sr_sal);
sr_sal.pc = pc_after_resolver;
check_for_old_step_resume_breakpoint ();
@@ -2663,7 +2656,7 @@ process_event_stop_test:
breakpoint even though the signal happened. */
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal);
+ init_sal (&sr_sal);
sr_sal.symtab = NULL;
sr_sal.line = 0;
sr_sal.pc = prev_pc;
@@ -2776,7 +2769,7 @@ process_event_stop_test:
struct symtab_and_line xxx;
/* Why isn't this s_a_l called "sr_sal", like all of the
other s_a_l's where this code is duplicated? */
- INIT_SAL (&xxx); /* initialize to zeroes */
+ init_sal (&xxx); /* initialize to zeroes */
xxx.pc = tmp;
xxx.section = find_pc_overlay (xxx.pc);
check_for_old_step_resume_breakpoint ();
@@ -2851,7 +2844,7 @@ process_event_stop_test:
/* And put the step-breakpoint there and go until there. */
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal); /* initialize to zeroes */
+ init_sal (&sr_sal); /* initialize to zeroes */
sr_sal.pc = tmp;
sr_sal.section = find_pc_overlay (sr_sal.pc);
/* Do not specify what the fp should be when we stop
@@ -2967,7 +2960,7 @@ check_sigtramp2 (struct execution_control_state *ecs)
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal); /* initialize to zeroes */
+ init_sal (&sr_sal); /* initialize to zeroes */
sr_sal.pc = prev_pc;
sr_sal.section = find_pc_overlay (sr_sal.pc);
/* We perhaps could set the frame if we kept track of what the
@@ -3023,7 +3016,7 @@ step_into_function (struct execution_control_state *ecs)
else
{
/* Put the step-breakpoint there and go until there. */
- INIT_SAL (&sr_sal); /* initialize to zeroes */
+ init_sal (&sr_sal); /* initialize to zeroes */
sr_sal.pc = ecs->stop_func_start;
sr_sal.section = find_pc_overlay (ecs->stop_func_start);
/* Do not specify what the fp should be when we stop since on
@@ -3058,7 +3051,7 @@ step_over_function (struct execution_control_state *ecs)
{
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal); /* initialize to zeros */
+ init_sal (&sr_sal); /* initialize to zeros */
sr_sal.pc = ADDR_BITS_REMOVE (SAVED_PC_AFTER_CALL (get_current_frame ()));
sr_sal.section = find_pc_overlay (sr_sal.pc);
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y
index 70c228b..b4ae340 100644
--- a/gdb/jv-exp.y
+++ b/gdb/jv-exp.y
@@ -179,7 +179,7 @@ static int parse_number (char *, int, int, YYSTYPE *);
%token <opcode> ASSIGN_MODIFY
-%token THIS SUPER NEW
+%token SUPER NEW
%left ','
%right '=' ASSIGN_MODIFY
@@ -365,9 +365,6 @@ Primary:
PrimaryNoNewArray:
Literal
-| THIS
- { write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (OP_THIS); }
| '(' Expression ')'
| ClassInstanceCreationExpression
| FieldAccess
@@ -1167,17 +1164,6 @@ yylex ()
yylval.lval = 1;
return BOOLEAN_LITERAL;
}
- if (current_language->la_language == language_cplus
- && STREQN (tokstart, "this", 4))
- {
- static const char this_name[] =
- { CPLUS_MARKER, 't', 'h', 'i', 's', '\0' };
-
- if (lookup_symbol (this_name, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL))
- return THIS;
- }
break;
case 3:
if (STREQN (tokstart, "int", 3))
diff --git a/gdb/language.c b/gdb/language.c
index dc94ebd..8eee8f6 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -549,6 +549,7 @@ binop_result_type (struct value *v1, struct value *v2)
{
case language_c:
case language_cplus:
+ case language_objc:
if (TYPE_CODE (t1) == TYPE_CODE_FLT)
return TYPE_CODE (t2) == TYPE_CODE_FLT && l2 > l1 ?
VALUE_TYPE (v2) : VALUE_TYPE (v1);
@@ -786,6 +787,7 @@ integral_type (struct type *type)
{
case language_c:
case language_cplus:
+ case language_objc:
return (TYPE_CODE (type) != TYPE_CODE_INT) &&
(TYPE_CODE (type) != TYPE_CODE_ENUM) ? 0 : 1;
case language_m2:
@@ -828,6 +830,7 @@ character_type (struct type *type)
case language_c:
case language_cplus:
+ case language_objc:
return (TYPE_CODE (type) == TYPE_CODE_INT) &&
TYPE_LENGTH (type) == sizeof (char)
? 1 : 0;
@@ -850,6 +853,7 @@ string_type (struct type *type)
case language_c:
case language_cplus:
+ case language_objc:
/* C does not have distinct string type. */
return (0);
default:
@@ -868,6 +872,7 @@ boolean_type (struct type *type)
{
case language_c:
case language_cplus:
+ case language_objc:
/* Might be more cleanly handled by having a
TYPE_CODE_INT_NOT_BOOL for (OBSOLETE) CHILL and such
languages, or a TYPE_CODE_INT_OR_BOOL for C. */
@@ -904,6 +909,7 @@ structured_type (struct type *type)
{
case language_c:
case language_cplus:
+ case language_objc:
return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
(TYPE_CODE (type) == TYPE_CODE_UNION) ||
(TYPE_CODE (type) == TYPE_CODE_ARRAY);
@@ -1124,6 +1130,7 @@ binop_type_check (struct value *arg1, struct value *arg2, int op)
#ifdef _LANG_c
case language_c:
case language_cplus:
+ case language_objc:
switch (op)
{
case BINOP_DIV:
diff --git a/gdb/language.h b/gdb/language.h
index 67a8ff2..b15544f 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -288,7 +288,8 @@ language_mode;
/* "cast" really means conversion */
/* FIXME -- should be a setting in language_defn */
#define CAST_IS_CONVERSION (current_language->la_language == language_c || \
- current_language->la_language == language_cplus)
+ current_language->la_language == language_cplus || \
+ current_language->la_language == language_objc)
extern void language_info (int);
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 5631fd3..94f3b73 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -31,11 +31,7 @@
#include "value.h"
#include "completer.h"
#include "cp-abi.h"
-
-/* Prototype for one function in parser-defs.h,
- instead of including that entire file. */
-
-extern char *find_template_name_end (char *);
+#include "parser-defs.h"
/* We share this one with symtab.c, but it is not exported widely. */
@@ -371,8 +367,8 @@ decode_line_2 (struct symbol *sym_arr[], int nelts, int funfirstline,
printf_unfiltered ("[0] cancel\n[1] all\n");
while (i < nelts)
{
- INIT_SAL (&return_values.sals[i]); /* initialize to zeroes */
- INIT_SAL (&values.sals[i]);
+ init_sal (&return_values.sals[i]); /* initialize to zeroes */
+ init_sal (&values.sals[i]);
if (sym_arr[i] && SYMBOL_CLASS (sym_arr[i]) == LOC_BLOCK)
{
values.sals[i] = find_function_start_sal (sym_arr[i], funfirstline);
@@ -540,7 +536,7 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
char *saved_arg = *argptr;
extern char *gdb_completer_quote_characters;
- INIT_SAL (&val); /* initialize to zeroes */
+ init_sal (&val); /* initialize to zeroes */
/* Defaults have defaults. */
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 0a0954f..3c7e527 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,3 +1,19 @@
+2002-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mi-cmd-var.c: Change all remaining occurrences of ui_out_tuple_begin
+ to make_cleanup_ui_out_tuple_begin_end. Change all remaining
+ occurrences of ui_out_list_begin to make_cleanup_ui_out_list_begin_end.
+ Use do_cleanups instead of ui_out_list_end or ui_out_tuple_end. This
+ is a fix for PR gdb/680.
+ * mi-cmd-stack.c: Ditto.
+ * mi-main.c: Ditto.
+
+2002-10-22 Keith Seitz <keiths@redhat.com>
+
+ * mi-main.c (mi_cmd_thread_select): Only return MI_CMD_CAUGHT_ERROR
+ when we really did catch an error(). If we got GDB_RC_FAIL, return
+ MI_CMD_ERROR instead.
+
2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
* gdbmi.texinfo: Fix examples that show frames to remove
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index b4bae47..74cb126 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -45,6 +45,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
int frame_low;
int frame_high;
int i;
+ struct cleanup *cleanup_stack;
struct frame_info *fi;
if (!target_has_stack)
@@ -76,7 +77,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
if (fi == NULL)
error ("mi_cmd_stack_list_frames: Not enough frames in stack.");
- ui_out_list_begin (uiout, "stack");
+ cleanup_stack = make_cleanup_ui_out_list_begin_end (uiout, "stack");
/* Now let;s print the frames up to frame_high, or until there are
frames in the stack. */
@@ -95,7 +96,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
0 /* args */ );
}
- ui_out_list_end (uiout);
+ do_cleanups (cleanup_stack);
if (i < frame_high)
error ("mi_cmd_stack_list_frames: Not enough frames in stack.");
@@ -155,6 +156,7 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
int frame_high;
int i;
struct frame_info *fi;
+ struct cleanup *cleanup_stack_args;
if (argc < 1 || argc > 3 || argc == 2)
error ("mi_cmd_stack_list_args: Usage: PRINT_VALUES [FRAME_LOW FRAME_HIGH]");
@@ -182,7 +184,7 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
if (fi == NULL)
error ("mi_cmd_stack_list_args: Not enough frames in stack.");
- ui_out_list_begin (uiout, "stack-args");
+ cleanup_stack_args = make_cleanup_ui_out_list_begin_end (uiout, "stack-args");
/* Now let's print the frames up to frame_high, or until there are
frames in the stack. */
@@ -190,14 +192,15 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
fi && (i <= frame_high || frame_high == -1);
i++, fi = get_prev_frame (fi))
{
+ struct cleanup *cleanup_frame;
QUIT;
- ui_out_tuple_begin (uiout, "frame");
+ cleanup_frame = make_cleanup_ui_out_tuple_begin_end (uiout, "frame");
ui_out_field_int (uiout, "level", i);
list_args_or_locals (0, atoi (argv[0]), fi);
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_frame);
}
- ui_out_list_end (uiout);
+ do_cleanups (cleanup_stack_args);
if (i < frame_high)
error ("mi_cmd_stack_list_args: Not enough frames in stack.");
@@ -214,13 +217,14 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
struct block *block;
struct symbol *sym;
int i, nsyms;
+ struct cleanup *cleanup_list;
static struct ui_stream *stb = NULL;
stb = ui_out_stream_new (uiout);
block = get_frame_block (fi, 0);
- ui_out_list_begin (uiout, locals ? "locals" : "args");
+ cleanup_list = make_cleanup_ui_out_list_begin_end (uiout, locals ? "locals" : "args");
while (block != 0)
{
@@ -262,8 +266,10 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
}
if (print_me)
{
+ struct cleanup *cleanup_tuple = NULL;
if (values)
- ui_out_tuple_begin (uiout, NULL);
+ cleanup_tuple =
+ make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_string (uiout, "name", SYMBOL_NAME (sym));
if (values)
@@ -278,7 +284,7 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
sym2 = sym;
print_variable_value (sym2, fi, stb->stream);
ui_out_field_stream (uiout, "value", stb);
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_tuple);
}
}
}
@@ -287,7 +293,7 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
else
block = BLOCK_SUPERBLOCK (block);
}
- ui_out_list_end (uiout);
+ do_cleanups (cleanup_list);
ui_out_stream_delete (stb);
}
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 1149066..ee65deb 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -254,6 +254,7 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
struct varobj *var;
struct varobj **childlist;
struct varobj **cc;
+ struct cleanup *cleanup_children;
int numchild;
char *type;
@@ -271,11 +272,12 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
if (numchild <= 0)
return MI_CMD_DONE;
- ui_out_tuple_begin (uiout, "children");
+ cleanup_children = make_cleanup_ui_out_tuple_begin_end (uiout, "children");
cc = childlist;
while (*cc != NULL)
{
- ui_out_tuple_begin (uiout, "child");
+ struct cleanup *cleanup_child;
+ cleanup_child = make_cleanup_ui_out_tuple_begin_end (uiout, "child");
ui_out_field_string (uiout, "name", varobj_get_objname (*cc));
ui_out_field_string (uiout, "exp", varobj_get_expression (*cc));
ui_out_field_int (uiout, "numchild", varobj_get_num_children (*cc));
@@ -283,10 +285,10 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
/* C++ pseudo-variables (public, private, protected) do not have a type */
if (type)
ui_out_field_string (uiout, "type", varobj_get_type (*cc));
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_child);
cc++;
}
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_children);
xfree (childlist);
return MI_CMD_DONE;
}
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 4177592..5e8b13b 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -240,8 +240,12 @@ mi_cmd_thread_select (char *command, char **argv, int argc)
else
rc = gdb_thread_select (uiout, argv[0]);
- if (rc == GDB_RC_FAIL)
+ /* RC is enum gdb_rc if it is successful (>=0)
+ enum return_reason if not (<0). */
+ if ((int) rc < 0 && (enum return_reason) rc == RETURN_ERROR)
return MI_CMD_CAUGHT_ERROR;
+ else if ((int) rc >= 0 && rc == GDB_RC_FAIL)
+ return MI_CMD_ERROR;
else
return MI_CMD_DONE;
}
@@ -911,19 +915,22 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
/* Build the result as a two dimentional table. */
{
struct ui_stream *stream = ui_out_stream_new (uiout);
+ struct cleanup *cleanup_list_memory;
int row;
int row_byte;
- ui_out_list_begin (uiout, "memory");
+ cleanup_list_memory = make_cleanup_ui_out_list_begin_end (uiout, "memory");
for (row = 0, row_byte = 0;
row < nr_rows;
row++, row_byte += nr_cols * word_size)
{
int col;
int col_byte;
- ui_out_tuple_begin (uiout, NULL);
+ struct cleanup *cleanup_tuple;
+ struct cleanup *cleanup_list_data;
+ cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_core_addr (uiout, "addr", addr + row_byte);
/* ui_out_field_core_addr_symbolic (uiout, "saddr", addr + row_byte); */
- ui_out_list_begin (uiout, "data");
+ cleanup_list_data = make_cleanup_ui_out_list_begin_end (uiout, "data");
for (col = 0, col_byte = row_byte;
col < nr_cols;
col++, col_byte += word_size)
@@ -940,7 +947,7 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
ui_out_field_stream (uiout, NULL, stream);
}
}
- ui_out_list_end (uiout);
+ do_cleanups (cleanup_list_data);
if (aschar)
{
int byte;
@@ -960,10 +967,10 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
}
ui_out_field_stream (uiout, "ascii", stream);
}
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_tuple);
}
ui_out_stream_delete (stream);
- ui_out_list_end (uiout);
+ do_cleanups (cleanup_list_memory);
}
do_cleanups (cleanups);
return MI_CMD_DONE;
@@ -1415,17 +1422,18 @@ mi_load_progress (const char *section_name,
strcmp (previous_sect_name, section_name) : 1);
if (new_section)
{
+ struct cleanup *cleanup_tuple;
xfree (previous_sect_name);
previous_sect_name = xstrdup (section_name);
if (last_async_command)
fputs_unfiltered (last_async_command, raw_stdout);
fputs_unfiltered ("+download", raw_stdout);
- ui_out_tuple_begin (uiout, NULL);
+ cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_string (uiout, "section", section_name);
ui_out_field_int (uiout, "section-size", total_section);
ui_out_field_int (uiout, "total-size", grand_total);
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_tuple);
mi_out_put (uiout, raw_stdout);
fputs_unfiltered ("\n", raw_stdout);
gdb_flush (raw_stdout);
@@ -1434,18 +1442,19 @@ mi_load_progress (const char *section_name,
if (delta.tv_sec >= update_threshold.tv_sec &&
delta.tv_usec >= update_threshold.tv_usec)
{
+ struct cleanup *cleanup_tuple;
last_update.tv_sec = time_now.tv_sec;
last_update.tv_usec = time_now.tv_usec;
if (last_async_command)
fputs_unfiltered (last_async_command, raw_stdout);
fputs_unfiltered ("+download", raw_stdout);
- ui_out_tuple_begin (uiout, NULL);
+ cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_string (uiout, "section", section_name);
ui_out_field_int (uiout, "section-sent", sent_so_far);
ui_out_field_int (uiout, "section-size", total_section);
ui_out_field_int (uiout, "total-sent", total_sent);
ui_out_field_int (uiout, "total-size", grand_total);
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_tuple);
mi_out_put (uiout, raw_stdout);
fputs_unfiltered ("\n", raw_stdout);
gdb_flush (raw_stdout);
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index fd61c5b..3908606 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -6194,9 +6194,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: CAUSE_REGNUM = %d\n",
CAUSE_REGNUM);
fprintf_unfiltered (file,
- "mips_dump_tdep: CPLUS_MARKER = %c\n",
- CPLUS_MARKER);
- fprintf_unfiltered (file,
"mips_dump_tdep: DO_REGISTERS_INFO # %s\n",
XSTRING (DO_REGISTERS_INFO));
fprintf_unfiltered (file,
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index 54b99b0..c1971f7 100644
--- a/gdb/objc-exp.y
+++ b/gdb/objc-exp.y
@@ -203,9 +203,6 @@ parse_number PARAMS ((char *, int, int, YYSTYPE *));
%token <opcode> ASSIGN_MODIFY
-/* C++ */
-%token THIS
-
%left ','
%left ABOVE_COMMA
%right '=' ASSIGN_MODIFY
@@ -613,14 +610,6 @@ exp : NSSTRING /* ObjC NextStep NSString constant
write_exp_elt_opcode (OP_NSSTRING); }
;
-/* C++. */
-exp : THIS
- { write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (OP_THIS); }
- ;
-
-/* end of C++. */
-
block : BLOCKNAME
{
if ($1.sym != 0)
@@ -986,7 +975,7 @@ name_not_typename : NAME
name_not_typename (=variable, =exp) or just an exp. If
name_not_typename was ever used in an lvalue context where only a
name could occur, this might be useful. */
- | NAME_OR_INT */
+/* | NAME_OR_INT */
;
%%
@@ -1631,18 +1620,6 @@ yylex ()
return ENUM;
if (STREQN (tokstart, "long", 4))
return LONG;
- if (current_language->la_language == language_cplus
- && STREQN (tokstart, "this", 4))
- {
- static const char this_name[] = {
- CPLUS_MARKER, 't', 'h', 'i', 's', '\0'
- };
-
- if (lookup_symbol (this_name, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL))
- return THIS;
- }
break;
case 3:
if (STREQN (tokstart, "int", 3))
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 0c749a2..2ed2c2e 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -1320,8 +1320,8 @@ find_methods (struct symtab *symtab, char type,
continue;
if (symtab)
- if ((SYMBOL_VALUE_ADDRESS (msymbol) < block->startaddr) ||
- (SYMBOL_VALUE_ADDRESS (msymbol) >= block->endaddr))
+ if ((SYMBOL_VALUE_ADDRESS (msymbol) < BLOCK_START (block)) ||
+ (SYMBOL_VALUE_ADDRESS (msymbol) >= BLOCK_END (block)))
/* Not in the specified symtab. */
continue;
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index f0939e7..4dc99be 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -1358,8 +1358,7 @@ yylex ()
{
/* here we search for 'this' like
inserted in FPC stabs debug info */
- static const char this_name[] =
- { /* CPLUS_MARKER,*/ 't', 'h', 'i', 's', '\0' };
+ static const char this_name[] = "this";
if (lookup_symbol (this_name, expression_context_block,
VAR_NAMESPACE, (int *) NULL,
diff --git a/gdb/parse.c b/gdb/parse.c
index 29b8e3c..5d81dfd 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -830,6 +830,11 @@ length_of_subexp (register struct expression *expr, register int endpos)
args = 1 + longest_to_int (expr->elts[endpos - 2].longconst);
break;
+ case OP_MSGCALL: /* Objective C message (method) call */
+ oplen = 4;
+ args = 1 + longest_to_int (expr->elts[endpos - 2].longconst);
+ break;
+
case UNOP_MAX:
case UNOP_MIN:
oplen = 3;
@@ -861,6 +866,8 @@ length_of_subexp (register struct expression *expr, register int endpos)
/* fall through */
case OP_M2_STRING:
case OP_STRING:
+ case OP_NSSTRING: /* Objective C Foundation Class NSString constant */
+ case OP_SELECTOR: /* Objective C "@selector" pseudo-op */
case OP_NAME:
case OP_EXPRSTRING:
oplen = longest_to_int (expr->elts[endpos - 2].longconst);
@@ -899,6 +906,7 @@ length_of_subexp (register struct expression *expr, register int endpos)
/* C++ */
case OP_THIS:
+ case OP_SELF:
oplen = 2;
break;
@@ -967,6 +975,11 @@ prefixify_subexp (register struct expression *inexpr,
args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
break;
+ case OP_MSGCALL: /* Objective C message (method) call */
+ oplen = 4;
+ args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
+ break;
+
case UNOP_MIN:
case UNOP_MAX:
oplen = 3;
@@ -997,6 +1010,8 @@ prefixify_subexp (register struct expression *inexpr,
/* fall through */
case OP_M2_STRING:
case OP_STRING:
+ case OP_NSSTRING: /* Objective C Foundation Class NSString constant */
+ case OP_SELECTOR: /* Objective C "@selector" pseudo-op */
case OP_NAME:
case OP_EXPRSTRING:
oplen = longest_to_int (inexpr->elts[inend - 2].longconst);
@@ -1035,6 +1050,7 @@ prefixify_subexp (register struct expression *inexpr,
/* C++ */
case OP_THIS:
+ case OP_SELF:
oplen = 2;
break;
@@ -1107,7 +1123,7 @@ parse_exp_1 (char **stringptr, struct block *block, int comma)
if (block)
{
expression_context_block = block;
- expression_context_pc = block->startaddr;
+ expression_context_pc = BLOCK_START (block);
}
else
expression_context_block = get_selected_block (&expression_context_pc);
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 8542b8a..28697f2 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1104,7 +1104,11 @@ address_info (char *exp, int from_tty)
printf_filtered ("Symbol \"");
fprintf_symbol_filtered (gdb_stdout, exp,
current_language->la_language, DMGL_ANSI);
- printf_filtered ("\" is a field of the local class variable `this'\n");
+ printf_filtered ("\" is a field of the local class variable ");
+ if (current_language->la_language == language_objc)
+ printf_filtered ("`self'\n"); /* ObjC equivalent of "this" */
+ else
+ printf_filtered ("`this'\n");
return;
}
@@ -1275,12 +1279,18 @@ address_info (char *exp, int from_tty)
}
break;
- case LOC_THREAD_LOCAL_STATIC:
+ case LOC_HP_THREAD_LOCAL_STATIC:
printf_filtered (
"a thread-local variable at offset %ld from the thread base register %s",
val, REGISTER_NAME (basereg));
break;
+ case LOC_THREAD_LOCAL_STATIC:
+ printf_filtered ("a thread-local variable at offset %ld in the "
+ "thread-local storage for `%s'",
+ val, SYMBOL_OBJFILE (sym)->name);
+ break;
+
case LOC_OPTIMIZED_OUT:
printf_filtered ("optimized out");
break;
diff --git a/gdb/solib-sunos.c b/gdb/solib-sunos.c
index 374ec25..ae11567 100644
--- a/gdb/solib-sunos.c
+++ b/gdb/solib-sunos.c
@@ -39,6 +39,8 @@
#include "gdbcore.h"
#include "inferior.h"
#include "solist.h"
+#include "bcache.h"
+#include "regcache.h"
/* Link map info to include in an allocated so_list entry */
@@ -135,10 +137,8 @@ allocate_rt_common_objfile (void)
objfile = (struct objfile *) xmalloc (sizeof (struct objfile));
memset (objfile, 0, sizeof (struct objfile));
objfile->md = NULL;
- obstack_specify_allocation (&objfile->psymbol_cache.cache, 0, 0,
- xmalloc, xfree);
- obstack_specify_allocation (&objfile->macro_cache.cache, 0, 0,
- xmalloc, xfree);
+ objfile->psymbol_cache = bcache_xmalloc ();
+ objfile->macro_cache = bcache_xmalloc ();
obstack_specify_allocation (&objfile->psymbol_obstack, 0, 0, xmalloc,
xfree);
obstack_specify_allocation (&objfile->symbol_obstack, 0, 0, xmalloc,
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 3f98a1e..78161e0 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -762,6 +762,77 @@ svr4_current_sos (void)
return head;
}
+/* Get the address of the link_map for a given OBJFILE. Loop through
+ the link maps, and return the address of the one corresponding to
+ the given objfile. Note that this function takes into account that
+ objfile can be the main executable, not just a shared library. The
+ main executable has always an empty name field in the linkmap. */
+
+CORE_ADDR
+svr4_fetch_objfile_link_map (struct objfile *objfile)
+{
+ CORE_ADDR lm;
+
+ if ((debug_base = locate_base ()) == 0)
+ return 0; /* failed somehow... */
+
+ /* Position ourselves on the first link map. */
+ lm = first_link_map_member ();
+ while (lm)
+ {
+ /* Get info on the layout of the r_debug and link_map structures. */
+ struct link_map_offsets *lmo = SVR4_FETCH_LINK_MAP_OFFSETS ();
+ int errcode;
+ char *buffer;
+ struct lm_info objfile_lm_info;
+ struct cleanup *old_chain;
+ CORE_ADDR name_address;
+ char *l_name_buf = xmalloc (lmo->l_name_size);
+ old_chain = make_cleanup (xfree, l_name_buf);
+
+ /* Set up the buffer to contain the portion of the link_map
+ structure that gdb cares about. Note that this is not the
+ whole link_map structure. */
+ objfile_lm_info.lm = xmalloc (lmo->link_map_size);
+ make_cleanup (xfree, objfile_lm_info.lm);
+ memset (objfile_lm_info.lm, 0, lmo->link_map_size);
+
+ /* Read the link map into our internal structure. */
+ read_memory (lm, objfile_lm_info.lm, lmo->link_map_size);
+
+ /* Read address of name from target memory to GDB. */
+ read_memory (lm + lmo->l_name_offset, l_name_buf, lmo->l_name_size);
+
+ /* Extract this object's name. */
+ name_address = extract_address (l_name_buf,
+ lmo->l_name_size);
+ target_read_string (name_address, &buffer,
+ SO_NAME_MAX_PATH_SIZE - 1, &errcode);
+ make_cleanup (xfree, buffer);
+ if (errcode != 0)
+ {
+ warning ("svr4_fetch_objfile_link_map: Can't read pathname for load map: %s\n",
+ safe_strerror (errcode));
+ }
+ else
+ {
+ /* Is this the linkmap for the file we want? */
+ /* If the file is not a shared library and has no name,
+ we are sure it is the main executable, so we return that. */
+ if ((buffer && strcmp (buffer, objfile->name) == 0)
+ || (!(objfile->flags & OBJF_SHARED) && (strcmp (buffer, "") == 0)))
+ {
+ do_cleanups (old_chain);
+ return lm;
+ }
+ }
+ /* Not the file we wanted, continue checking. */
+ lm = extract_address (objfile_lm_info.lm + lmo->l_next_offset,
+ lmo->l_next_size);
+ do_cleanups (old_chain);
+ }
+ return 0;
+}
/* On some systems, the only way to recognize the link map entry for
the main executable file is by looking at its name. Return
diff --git a/gdb/solib-svr4.h b/gdb/solib-svr4.h
index 8611dff..e41c240 100644
--- a/gdb/solib-svr4.h
+++ b/gdb/solib-svr4.h
@@ -72,6 +72,10 @@ struct link_map_offsets
extern void set_solib_svr4_fetch_link_map_offsets
(struct gdbarch *gdbarch, struct link_map_offsets *(*func) (void));
+/* This function is called by thread_db.c. Return the address of the
+ link map for the given objfile. */
+extern CORE_ADDR svr4_fetch_objfile_link_map (struct objfile *objfile);
+
/* legacy_svr4_fetch_link_map_offsets_hook is a pointer to a function
which is used to fetch link map offsets. It will only be set
by solib-legacy.c, if at all. */
diff --git a/gdb/source.c b/gdb/source.c
index 5c88a55..0107bfa 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1197,8 +1197,9 @@ print_source_lines (struct symtab *s, int line, int stopline, int noerror)
/* Print a list of files and line numbers which a user may choose from
in order to list a function which was specified ambiguously (as with
- `list classname::overloadedfuncname', for example). The vector in
- SALS provides the filenames and line numbers. */
+ `list classname::overloadedfuncname', or 'list objectiveCSelector:).
+ The vector in SALS provides the filenames and line numbers.
+ NOTE: some of the SALS may have no filename or line information! */
static void
ambiguous_line_spec (struct symtabs_and_lines *sals)
@@ -1220,7 +1221,7 @@ line_info (char *arg, int from_tty)
CORE_ADDR start_pc, end_pc;
int i;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
if (arg == 0)
{
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 4697b40..f96eef7 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -169,6 +169,8 @@ static int
read_cfront_member_functions (struct field_info *, char **,
struct type *, struct objfile *);
+static char *find_name_end (char *name);
+
/* end new functions added for cfront support */
static void
@@ -185,10 +187,8 @@ resolve_symbol_reference (struct objfile *, struct symbol *, char *);
void stabsread_clear_cache (void);
-static const char vptr_name[] =
-{'_', 'v', 'p', 't', 'r', CPLUS_MARKER, '\0'};
-static const char vb_name[] =
-{'_', 'v', 'b', CPLUS_MARKER, '\0'};
+static const char vptr_name[] = "_vptr$";
+static const char vb_name[] = "_vb$";
/* Define this as 1 if a pcc declaration of a char or short argument
gives the correct address. Otherwise assume pcc gives the
@@ -1273,7 +1273,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
struct objfile *objfile)
{
register struct symbol *sym;
- char *p = (char *) strchr (string, ':');
+ char *p = (char *) find_name_end (string);
int deftype;
int synonym = 0;
register int i;
@@ -2006,7 +2006,8 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
a typedef for "foo". Unfortunately, cfront never makes the typedef
when translating C++ into C. We make the typedef here so that
"ptype foo" works as expected for cfront translated code. */
- else if (current_subfile->language == language_cplus)
+ else if ((current_subfile->language == language_cplus)
+ || (current_subfile->language == language_objc))
synonym = 1;
SYMBOL_TYPE (sym) = read_type (&p, objfile);
@@ -3179,8 +3180,7 @@ read_member_functions (struct field_info *fip, char **pp, struct type *type,
/* This lets the user type "break operator+".
We could just put in "+" as the name, but that wouldn't
work for "*". */
- static char opname[32] =
- {'o', 'p', CPLUS_MARKER};
+ static char opname[32] = "op$";
char *o = opname + 3;
/* Skip past '::'. */
@@ -4138,8 +4138,9 @@ read_tilde_fields (struct field_info *fip, char **pp, struct type *type,
i >= TYPE_N_BASECLASSES (t);
--i)
{
- if (!strncmp (TYPE_FIELD_NAME (t, i), vptr_name,
- sizeof (vptr_name) - 1))
+ char *name = TYPE_FIELD_NAME (t, i);
+ if (!strncmp (name, vptr_name, sizeof (vptr_name) - 2)
+ && is_cplus_marker (name[sizeof (vptr_name) - 2]))
{
TYPE_VPTR_FIELDNO (type) = i;
goto gotit;
@@ -5618,6 +5619,32 @@ finish_global_stabs (struct objfile *objfile)
}
}
+/* Find the end of the name, delimited by a ':', but don't match
+ ObjC symbols which look like -[Foo bar::]:bla. */
+static char *
+find_name_end (char *name)
+{
+ char *s = name;
+ if (s[0] == '-' || *s == '+')
+ {
+ /* Must be an ObjC method symbol. */
+ if (s[1] != '[')
+ {
+ error ("invalid symbol name \"%s\"", name);
+ }
+ s = strchr (s, ']');
+ if (s == NULL)
+ {
+ error ("invalid symbol name \"%s\"", name);
+ }
+ return strchr (s, ':');
+ }
+ else
+ {
+ return strchr (s, ':');
+ }
+}
+
/* Initializer for this module */
void
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 66bbf71..28c84f9 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -299,16 +299,16 @@ sort_symtab_syms (register struct symtab *s)
may be part of a larger string and we are only saving a substring. */
char *
-obsavestring (char *ptr, int size, struct obstack *obstackp)
+obsavestring (const char *ptr, int size, struct obstack *obstackp)
{
register char *p = (char *) obstack_alloc (obstackp, size + 1);
/* Open-coded memcpy--saves function call time. These strings are usually
short. FIXME: Is this really still true with a compiler that can
inline memcpy? */
{
- register char *p1 = ptr;
+ register const char *p1 = ptr;
register char *p2 = p;
- char *end = ptr + size;
+ const char *end = ptr + size;
while (p1 != end)
*p2++ = *p1++;
}
@@ -1952,6 +1952,7 @@ init_filename_language_table (void)
/* OBSOLETE add_filename_language (".ch", language_chill); */
/* OBSOLETE add_filename_language (".c186", language_chill); */
/* OBSOLETE add_filename_language (".c286", language_chill); */
+ add_filename_language (".m", language_objc);
add_filename_language (".f", language_fortran);
add_filename_language (".F", language_fortran);
add_filename_language (".s", language_asm);
diff --git a/gdb/symfile.h b/gdb/symfile.h
index 39eb308..62dfcef 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -25,6 +25,10 @@
/* This file requires that you first include "bfd.h". */
+/* Opaque declarations. */
+
+struct obstack;
+
/* Partial symbols are stored in the psymbol_cache and pointers to them
are kept in a dynamically grown array that is obtained from malloc and
grown as necessary via realloc. Each objfile typically has two of these,
@@ -208,7 +212,7 @@ extern void sort_symtab_syms (struct symtab *);
(and add a null character at the end in the copy).
Returns the address of the copy. */
-extern char *obsavestring (char *, int, struct obstack *);
+extern char *obsavestring (const char *, int, struct obstack *);
/* Concatenate strings S1, S2 and S3; return the new string.
Space is found in the symbol_obstack. */
diff --git a/gdb/symtab.c b/gdb/symtab.c
index a432292..acbfa65 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -50,11 +50,6 @@
#include <ctype.h>
#include "cp-abi.h"
-/* Prototype for one function in parser-defs.h,
- instead of including that entire file. */
-
-extern char *find_template_name_end (char *);
-
/* Prototypes for local functions */
static void completion_list_add_name (char *, char *, int, char *, char *);
@@ -121,19 +116,6 @@ struct type *builtin_type_error;
const struct block *block_found;
-/* While the C++ support is still in flux, issue a possibly helpful hint on
- using the new command completion feature on single quoted demangled C++
- symbols. Remove when loose ends are cleaned up. FIXME -fnf */
-
-static void
-cplusplus_hint (char *name)
-{
- while (*name == '\'')
- name++;
- printf_filtered ("Hint: try '%s<TAB> or '%s<ESC-?>\n", name, name);
- printf_filtered ("(Note leading single quote.)\n");
-}
-
/* Check for a symtab of a specific name; first in symtabs, then in
psymtabs. *If* there is no '/' in the name, a match after a '/'
in the symtab filename will also work. */
@@ -385,6 +367,33 @@ gdb_mangle_name (struct type *type, int method_id, int signature_id)
}
+/* Initialize the language dependent portion of a symbol
+ depending upon the language for the symbol. */
+void
+symbol_init_language_specific (struct general_symbol_info *gsymbol,
+ enum language language)
+{
+ gsymbol->language = language;
+ if (gsymbol->language == language_cplus
+ || gsymbol->language == language_java)
+ {
+ gsymbol->language_specific.cplus_specific.demangled_name = NULL;
+ }
+ else if (gsymbol->language == language_objc)
+ {
+ gsymbol->language_specific.objc_specific.demangled_name = NULL;
+ }
+ /* OBSOLETE else if (SYMBOL_LANGUAGE (symbol) == language_chill) */
+ /* OBSOLETE { */
+ /* OBSOLETE SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; */
+ /* OBSOLETE } */
+ else
+ {
+ memset (&gsymbol->language_specific, 0,
+ sizeof (gsymbol->language_specific));
+ }
+}
+
/* Initialize a symbol's mangled name. */
/* Try to initialize the demangled name for a symbol, based on the
@@ -461,7 +470,35 @@ symbol_init_demangled_name (struct general_symbol_info *gsymbol,
#endif
}
+/* Return the demangled name for a symbol based on the language for
+ that symbol. If no demangled name exists, return NULL. */
+char *
+symbol_demangled_name (struct general_symbol_info *gsymbol)
+{
+ if (gsymbol->language == language_cplus
+ || gsymbol->language == language_java)
+ return gsymbol->language_specific.cplus_specific.demangled_name;
+
+ else if (gsymbol->language == language_objc)
+ return gsymbol->language_specific.objc_specific.demangled_name;
+
+ else
+ return NULL;
+
+ /* OBSOLETE (SYMBOL_LANGUAGE (symbol) == language_chill */
+ /* OBSOLETE ? SYMBOL_CHILL_DEMANGLED_NAME (symbol) */
+}
+/* Initialize the structure fields to zero values. */
+void
+init_sal (struct symtab_and_line *sal)
+{
+ sal->symtab = 0;
+ sal->section = 0;
+ sal->line = 0;
+ sal->pc = 0;
+ sal->end = 0;
+}
@@ -1797,7 +1834,7 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent)
But what we want is the statement containing the instruction.
Fudge the pc to make sure we get that. */
- INIT_SAL (&val); /* initialize to zeroes */
+ init_sal (&val); /* initialize to zeroes */
/* It's tempting to assume that, if we can't find debugging info for
any function enclosing PC, that we shouldn't search for line
diff --git a/gdb/symtab.h b/gdb/symtab.h
index a78607d..5058c1b 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -89,6 +89,11 @@ struct general_symbol_info
char *demangled_name;
}
cplus_specific;
+ struct objc_specific
+ {
+ char *demangled_name;
+ }
+ objc_specific;
#if 0
/* OBSOLETE struct chill_specific *//* For Chill */
/* OBSOLETE { */
@@ -121,6 +126,14 @@ struct general_symbol_info
extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *);
+/* Note that all the following SYMBOL_* macros are used with the
+ SYMBOL argument being either a partial symbol, a minimal symbol or
+ a full symbol. All three types have a ginfo field. In particular
+ the SYMBOL_INIT_LANGUAGE_SPECIFIC, SYMBOL_INIT_DEMANGLED_NAME,
+ SYMBOL_DEMANGLED_NAME macros cannot be entirely substituted by
+ functions, unless the callers are changed to pass in the ginfo
+ field only, instead of the SYMBOL parameter. */
+
#define SYMBOL_NAME(symbol) (symbol)->ginfo.name
#define SYMBOL_VALUE(symbol) (symbol)->ginfo.value.ivalue
#define SYMBOL_VALUE_ADDRESS(symbol) (symbol)->ginfo.value.address
@@ -134,49 +147,30 @@ extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *);
#define SYMBOL_CPLUS_DEMANGLED_NAME(symbol) \
(symbol)->ginfo.language_specific.cplus_specific.demangled_name
-/* Macro that initializes the language dependent portion of a symbol
+/* Initializes the language dependent portion of a symbol
depending upon the language for the symbol. */
-
-#define SYMBOL_INIT_LANGUAGE_SPECIFIC(symbol,language) \
- do { \
- SYMBOL_LANGUAGE (symbol) = language; \
- if (SYMBOL_LANGUAGE (symbol) == language_cplus \
- || SYMBOL_LANGUAGE (symbol) == language_java \
- ) \
- { \
- SYMBOL_CPLUS_DEMANGLED_NAME (symbol) = NULL; \
- } \
- /* OBSOLETE else if (SYMBOL_LANGUAGE (symbol) == language_chill) */ \
- /* OBSOLETE { */ \
- /* OBSOLETE SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; */ \
- /* OBSOLETE } */ \
- else \
- { \
- memset (&(symbol)->ginfo.language_specific, 0, \
- sizeof ((symbol)->ginfo.language_specific)); \
- } \
- } while (0)
+#define SYMBOL_INIT_LANGUAGE_SPECIFIC(symbol,language) \
+ (symbol_init_language_specific (&(symbol)->ginfo, (language)))
+extern void symbol_init_language_specific (struct general_symbol_info *symbol,
+ enum language language);
#define SYMBOL_INIT_DEMANGLED_NAME(symbol,obstack) \
(symbol_init_demangled_name (&symbol->ginfo, (obstack)))
extern void symbol_init_demangled_name (struct general_symbol_info *symbol,
struct obstack *obstack);
-
-/* Macro that returns the demangled name for a symbol based on the language
- for that symbol. If no demangled name exists, returns NULL. */
-
-#define SYMBOL_DEMANGLED_NAME(symbol) \
- (SYMBOL_LANGUAGE (symbol) == language_cplus \
- || SYMBOL_LANGUAGE (symbol) == language_java \
- ? SYMBOL_CPLUS_DEMANGLED_NAME (symbol) \
- : /* OBSOLETE (SYMBOL_LANGUAGE (symbol) == language_chill */ \
- /* OBSOLETE ? SYMBOL_CHILL_DEMANGLED_NAME (symbol) */ \
- NULL)
+/* Return the demangled name for a symbol based on the language for
+ that symbol. If no demangled name exists, return NULL. */
+#define SYMBOL_DEMANGLED_NAME(symbol) \
+ (symbol_demangled_name (&(symbol)->ginfo))
+extern char *symbol_demangled_name (struct general_symbol_info *symbol);
/* OBSOLETE #define SYMBOL_CHILL_DEMANGLED_NAME(symbol) */
/* OBSOLETE (symbol)->ginfo.language_specific.chill_specific.demangled_name */
+#define SYMBOL_OBJC_DEMANGLED_NAME(symbol) \
+ (symbol)->ginfo.language_specific.objc_specific.demangled_name
+
/* Macro that returns the "natural source name" of a symbol. In C++ this is
the "demangled" form of the name if demangle is on and the "mangled" form
of the name if demangle is off. In other languages this is just the
@@ -611,8 +605,16 @@ enum address_class
LOC_UNRESOLVED,
/* Value is at a thread-specific location calculated by a
- target-specific method. */
+ target-specific method. This is used only by hppa. */
+ LOC_HP_THREAD_LOCAL_STATIC,
+
+ /* Value is at a thread-specific location calculated by a
+ target-specific method. SYMBOL_OBJFILE gives the object file
+ in which the symbol is defined; the symbol's value is the
+ offset into that objfile's thread-local storage for the current
+ thread. */
+
LOC_THREAD_LOCAL_STATIC,
/* The variable does not actually exist in the program.
@@ -684,6 +686,12 @@ struct symbol
{
/* Used by LOC_BASEREG and LOC_BASEREG_ARG. */
short basereg;
+
+ /* Used by LOC_THREAD_LOCAL_STATIC. The objfile in which this
+ symbol is defined. To find a thread-local variable (e.g., a
+ variable declared with the `__thread' storage class), we may
+ need to know which object file it's in. */
+ struct objfile *objfile;
}
aux_value;
@@ -705,6 +713,7 @@ struct symbol
#define SYMBOL_TYPE(symbol) (symbol)->type
#define SYMBOL_LINE(symbol) (symbol)->line
#define SYMBOL_BASEREG(symbol) (symbol)->aux_value.basereg
+#define SYMBOL_OBJFILE(symbol) (symbol)->aux_value.objfile
#define SYMBOL_ALIASES(symbol) (symbol)->aliases
#define SYMBOL_RANGES(symbol) (symbol)->ranges
@@ -736,15 +745,6 @@ struct partial_symbol
#define PSYMBOL_CLASS(psymbol) (psymbol)->aclass
-/* Source-file information. This describes the relation between source files,
- line numbers and addresses in the program text. */
-
-struct sourcevector
-{
- int length; /* Number of source files described */
- struct source *source[1]; /* Descriptions of the files */
-};
-
/* Each item represents a line-->pc (or the reverse) mapping. This is
somewhat more wasteful of space than one might wish, but since only
the files which are actually debugged are read in to core, we don't
@@ -783,14 +783,6 @@ struct linetable
struct linetable_entry item[1];
};
-/* All the information on one source file. */
-
-struct source
-{
- char *name; /* Name of file */
- struct linetable contents;
-};
-
/* How to relocate the symbols from each section in a symbol file.
Each struct contains an array of offsets.
The ordering and meaning of the offsets is file-type-dependent;
@@ -1215,13 +1207,7 @@ struct symtab_and_line
CORE_ADDR end;
};
-#define INIT_SAL(sal) { \
- (sal)->symtab = 0; \
- (sal)->section = 0; \
- (sal)->line = 0; \
- (sal)->pc = 0; \
- (sal)->end = 0; \
-}
+extern void init_sal (struct symtab_and_line *sal);
struct symtabs_and_lines
{
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5ca0309..41018c7 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,27 @@
+2002-10-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.threads/schedlock.c (args): Make unsigned.
+
+2002-10-21 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.asm/asm-source.exp: Add "mips*-*" pattern. Update line
+ numbers. Allow "foo2|selected stack frame".
+ * gdb.asm/asmsrc1.s: Use gdbasm_declare and gdbasm_end.
+ * gdb.asm/asmsrc2.s: Likewise.
+ * gdb.asm/common.inc: Define gdbasm_declare and gdbasm_end. Update
+ comments.
+ * gdb.asm/mips.inc: New file.
+
+2002-10-18 Adam Fedor <fedor@gnu.org>
+
+ * gdb.base/default.exp: Update expected output to include 'ObjC'.
+ * gdb.base/help.exp: Likewise.
+
+2002-10-17 Kevin Buettner <kevinb@redhat.com>
+
+ * gdb.base/constvars.c (struct crass, struct crisp): New structs.
+ * gdb.base/constvars.exp (ptype crass, ptype crisp): New tests.
+
2002-10-02 Jim Blandy <jimb@redhat.com>
* gdb.c++/casts.cc, gdb.c++/casts.exp: New test.
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index f10f4ae..deb4b5f 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -57,6 +57,9 @@ if [istarget "i\[3456\]86-*-*"] then {
if [istarget "m32r*-*"] then {
set asm-arch m32r
}
+if [istarget "mips*-*"] then {
+ set asm-arch mips
+}
if [istarget "powerpc*-*"] then {
set asm-arch powerpc
}
@@ -194,7 +197,7 @@ gdb_test "list $entry_symbol" ".*gdbasm_startup.*" "list"
# Now try a source file search
gdb_test "search A routine for foo2 to call" \
- "39\[ \t\]+comment \"A routine for foo2 to call.\"" "search"
+ "40\[ \t\]+comment \"A routine for foo2 to call.\"" "search"
# See if `f' prints the right source file.
gdb_test "f" ".*asmsrc2\[.\]s:8.*" "f in foo2"
@@ -219,7 +222,7 @@ gdb_test "s" "" "s 2"
gdb_test "n" "" "n 2"
# Now see if a capped `bt' is correct.
-gdb_test "bt 3" "\#0.*foo3.*asmsrc1\[.\]s:44.*\#1.*foo2.*asmsrc2\[.\]s:12.*\#2.*main.*asmsrc1\[.\]s:33.*" "bt 3 in foo3"
+gdb_test "bt 3" "\#0.*foo3.*asmsrc1\[.\]s:45.*\#1.*foo2.*asmsrc2\[.\]s:12.*\#2.*main.*asmsrc1\[.\]s:33.*" "bt 3 in foo3"
# Try 'info source' from asmsrc1.s
gdb_test "info source" \
@@ -277,7 +280,7 @@ gdb_test "next" "17\[ \t\]+gdbasm_leave" "next over foo3"
# Try 'return' from foo2
gdb_test "return" "\#0 main .*37\[ \t\]+gdbasm_exit0" "return from foo2" \
- "Make selected stack frame return now\?.*" "y"
+ "Make (foo2|selected stack frame) return now\?.*" "y"
# See if we can look at a global variable
gdb_test "print globalvar" ".* = 11" "look at global variable"
diff --git a/gdb/testsuite/gdb.asm/asmsrc1.s b/gdb/testsuite/gdb.asm/asmsrc1.s
index f14cd91..cba0e90 100644
--- a/gdb/testsuite/gdb.asm/asmsrc1.s
+++ b/gdb/testsuite/gdb.asm/asmsrc1.s
@@ -10,18 +10,18 @@ comment "This file is not linked with crt0."
comment "Provide very simplistic equivalent."
.global _start
-_start:
+gdbasm_declare _start
gdbasm_startup
gdbasm_call main
gdbasm_exit0
-
+ gdbasm_end _start
comment "main routine for assembly source debugging test"
comment "This particular testcase uses macros in <arch>.inc to achieve"
comment "machine independence."
.global main
-main:
+gdbasm_declare main
gdbasm_enter
comment "Call a macro that consists of several lines of assembler code."
@@ -35,23 +35,27 @@ comment "Call a subroutine in another file."
comment "All done."
gdbasm_exit0
+ gdbasm_end main
comment "A routine for foo2 to call."
.global foo3
-foo3:
+gdbasm_declare foo3
gdbasm_enter
gdbasm_leave
+ gdbasm_end foo3
.global exit
-exit:
+gdbasm_declare exit
gdbasm_exit0
+ gdbasm_end exit
comment "A static function"
-foostatic:
+gdbasm_declare foostatic
gdbasm_enter
gdbasm_leave
+ gdbasm_end foostatic
comment "A global variable"
diff --git a/gdb/testsuite/gdb.asm/asmsrc2.s b/gdb/testsuite/gdb.asm/asmsrc2.s
index 9d7713f..4366536 100644
--- a/gdb/testsuite/gdb.asm/asmsrc2.s
+++ b/gdb/testsuite/gdb.asm/asmsrc2.s
@@ -4,7 +4,7 @@
comment "Second file in assembly source debugging testcase."
.global foo2
-foo2:
+gdbasm_declare foo2
gdbasm_enter
comment "Call someplace else (several times)."
@@ -15,3 +15,4 @@ comment "Call someplace else (several times)."
comment "All done, return."
gdbasm_leave
+ gdbasm_end foo2
diff --git a/gdb/testsuite/gdb.asm/common.inc b/gdb/testsuite/gdb.asm/common.inc
index 5149392..04f08ff 100644
--- a/gdb/testsuite/gdb.asm/common.inc
+++ b/gdb/testsuite/gdb.asm/common.inc
@@ -14,6 +14,15 @@
.word \value
.endm
+ comment "Declare a subroutine"
+ .macro gdbasm_declare name
+\name:
+ .endm
+
+ comment "End a subroutine"
+ .macro gdbasm_end name
+ .endm
+
comment "arch.inc is responsible for defining the following macros:"
comment "enter - subroutine prologue"
comment "leave - subroutine epilogue"
@@ -23,6 +32,5 @@ comment "exit0 - exit (0)"
comment "arch.inc may also override the default definitions of:"
comment "datavar - define a data variable"
-
-comment "macros to label a subroutine may also eventually be needed"
-comment "i.e. .global foo\nfoo:\n"
+comment "declare - declare the start of a subroutine"
+comment "end - end a subroutine"
diff --git a/gdb/testsuite/gdb.asm/mips.inc b/gdb/testsuite/gdb.asm/mips.inc
new file mode 100644
index 0000000..751f73f
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/mips.inc
@@ -0,0 +1,64 @@
+ comment "subroutine declare"
+ .macro gdbasm_declare name
+ .align 2
+ .ent \name
+ .type \name,@function
+\name:
+ .endm
+
+ comment "subroutine prologue"
+ .macro gdbasm_enter
+ .frame $fp, 32, $31
+ .mask 0xd0000000,-4
+ .set noreorder
+ .cpload $25
+ .set reorder
+ subu $sp, $sp, 32
+ .cprestore 16
+ sw $31, 28($sp)
+ sw $fp, 24($sp)
+ sw $28, 20($sp)
+ move $fp, $sp
+ .endm
+
+ comment "subroutine epilogue"
+ .macro gdbasm_leave
+ lw $31, 28($sp)
+ lw $fp, 24($sp)
+ .set noreorder
+ .set nomacro
+ j $31
+ addu $sp, $sp, 32
+ .set macro
+ .set reorder
+ .endm
+
+ comment "subroutine end"
+ .macro gdbasm_end name
+ .end \name
+ .endm
+
+ .macro gdbasm_call subr
+ la $25, \subr
+ jal $31, $25
+ .endm
+
+ .macro gdbasm_several_nops
+ nop
+ nop
+ nop
+ nop
+ .endm
+
+ comment "exit (0)"
+ .macro gdbasm_exit0
+ comment "Don't know how to exit, but this will certainly halt..."
+ lw $2, 0($0)
+ .endm
+
+ comment "crt0 startup"
+ .macro gdbasm_startup
+ .global __start
+__start:
+ move $fp, $sp
+ .endm
diff --git a/gdb/testsuite/gdb.base/constvars.c b/gdb/testsuite/gdb.base/constvars.c
index b0ce752..1602577 100644
--- a/gdb/testsuite/gdb.base/constvars.c
+++ b/gdb/testsuite/gdb.base/constvars.c
@@ -166,6 +166,11 @@ main (void)
const volatile char * const volatile vagary = &victor;
const volatile unsigned char * const volatile vendor = &vicar;
+
+ /* various structs with const members */
+
+ struct crass { char * const ptr; } crass;
+ struct crisp { char * const *ptr; } crisp;
/* misc. references */
/*
diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp
index bb062ef..897a025 100644
--- a/gdb/testsuite/gdb.base/constvars.exp
+++ b/gdb/testsuite/gdb.base/constvars.exp
@@ -278,6 +278,11 @@ proc do_constvar_tests {} {
gdb_test "print *locust" " = 70"
local_compiler_xfail_check
gdb_test "ptype locust" "type = double \\* const"
+
+ local_compiler_xfail_check
+ gdb_test "ptype crass" "type = struct crass \{\[\r\n\]+\[\ \t\]+char \\* const ptr;\[\r\n\]+\}"
+ local_compiler_xfail_check
+ gdb_test "ptype crisp" "type = struct crisp \{\[\r\n\]+\[\ \t\]+char \\* const \\*ptr;\[\r\n\]+\}"
}
do_constvar_tests
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index 078e416..3fc6f0d 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -636,9 +636,9 @@ gdb_test "show print address" "Printing of addresses is on." "show print address
#test show print array
gdb_test "show print array" "Prettyprinting of arrays is on." "show print array"
#test show print asm-demangle
-gdb_test "show print asm-demangle" "Demangling of C\[+\]+ names in disassembly listings is on." "show print asm-demangle"
+gdb_test "show print asm-demangle" "Demangling of C\[+\]+/ObjC names in disassembly listings is on." "show print asm-demangle"
#test show print demangle
-gdb_test "show print demangle" "Demangling of encoded C\[+\]+ names when displaying symbols is on." "show print demangle"
+gdb_test "show print demangle" "Demangling of encoded C\[+\]+/ObjC names when displaying symbols is on." "show print demangle"
#test show print elements
gdb_test "show print elements" "Limit on string chars or array elements to print is 200." "show print elements"
#test show print object
diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp
index 4b3d2ee..50da677 100644
--- a/gdb/testsuite/gdb.base/help.exp
+++ b/gdb/testsuite/gdb.base/help.exp
@@ -390,9 +390,9 @@ gdb_test "help set print address" "Set printing of addresses\." "help set print
# test help set print array
gdb_test "help set print array" "Set prettyprinting of arrays\." "help set print array"
# test help set print asm-demangle
-gdb_test "help set print asm-demangle" "Set demangling of C\[+\]+ names in disassembly listings\." "help set print asm-demangle"
+gdb_test "help set print asm-demangle" "Set demangling of C\[+\]+/ObjC names in disassembly listings\." "help set print asm-demangle"
# test help set print demangle
-gdb_test "help set print demangle" "Set demangling of encoded C\[+\]+ names when displaying symbols\." "help set print demangle"
+gdb_test "help set print demangle" "Set demangling of encoded C\[+\]+/ObjC names when displaying symbols\." "help set print demangle"
# test help set print elements
gdb_test "help set print elements" "Set limit on string chars or array elements to print\.\[\r\n\]+\"set print elements 0\" causes there to be no limit\." "help set print elements"
# test help set print object
@@ -482,9 +482,9 @@ gdb_test "help show print address" "Show printing of addresses\." "help show pri
# test help show print array
gdb_test "help show print array" "Show prettyprinting of arrays\." "help show print array"
# test help show print asm-demangle
-gdb_test "help show print asm-demangle" "Show demangling of C\[+\]+ names in disassembly listings\." "help show print asm-demangle"
+gdb_test "help show print asm-demangle" "Show demangling of C\[+\]+/ObjC names in disassembly listings\." "help show print asm-demangle"
# test help show print demangle
-gdb_test "help show print demangle" "Show demangling of encoded C\[+\]+ names when displaying symbols\." "help show print demangle"
+gdb_test "help show print demangle" "Show demangling of encoded C\[+\]+/ObjC names when displaying symbols\." "help show print demangle"
# test help show print elements
gdb_test "help show print elements" "Show limit on string chars or array elements to print\.\[\r\n\]+\"set print elements 0\" causes there to be no limit\." "help show print elements"
# test help show print object
diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog
index d383030..0a89d16 100644
--- a/gdb/testsuite/gdb.mi/ChangeLog
+++ b/gdb/testsuite/gdb.mi/ChangeLog
@@ -1,3 +1,10 @@
+2002-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mi-var-cmd.exp: Add tests to verify that a -var-assign that changes
+ a value shows up in the changelist of a -var-update. Part of fix
+ for gdb/702.
+ * mi1-var-cmd.exp: Ditto.
+
2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
* mi-return.exp: Change expected frame output to remove extraneous
diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
index 26a91cf..1902793 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
@@ -288,6 +288,18 @@ mi_gdb_test "-var-assign linteger 3333" \
"\\^done,value=\"3333\"" \
"assign to linteger"
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\\\[\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
+ "update all vars: linteger changed after assign"
+
+mi_gdb_test "-var-assign linteger 3333" \
+ "\\^done,value=\"3333\"" \
+ "assign to linteger again, same value"
+
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\\\[\\\]" \
+ "update all vars: linteger not changed after same assign"
+
mi_gdb_test "-var-evaluate-expression linteger" \
"\\^done,value=\"3333\"" \
"eval linteger"
@@ -296,6 +308,14 @@ mi_gdb_test "-var-assign lpinteger \"&linteger + 3\"" \
"\\^done,value=\"$hex\"" \
"assign to lpinteger"
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\\\[\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
+ "update all vars: lpinteger changed after assign"
+
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\\\[\\\]" \
+ "update all vars: no changes on second update"
+
mi_gdb_test "-var-evaluate-expression lpinteger" \
"\\^done,value=\"$hex\"" \
"eval lpinteger"
diff --git a/gdb/testsuite/gdb.mi/mi1-var-cmd.exp b/gdb/testsuite/gdb.mi/mi1-var-cmd.exp
index 4ca8d16..0f0d522 100644
--- a/gdb/testsuite/gdb.mi/mi1-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi1-var-cmd.exp
@@ -288,6 +288,18 @@ mi_gdb_test "-var-assign linteger 3333" \
"\\^done,value=\"3333\"" \
"assign to linteger"
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "update all vars: linteger changed after assign"
+
+mi_gdb_test "-var-assign linteger 3333" \
+ "\\^done,value=\"3333\"" \
+ "assign to linteger again, same value"
+
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\{\}" \
+ "update all vars: linteger not changed after same assign"
+
mi_gdb_test "-var-evaluate-expression linteger" \
"\\^done,value=\"3333\"" \
"eval linteger"
@@ -296,6 +308,14 @@ mi_gdb_test "-var-assign lpinteger \"&linteger + 3\"" \
"\\^done,value=\"$hex\"" \
"assign to lpinteger"
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "update all vars: lpinteger changed after assign"
+
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\{\}" \
+ "update all vars: no changes for second update"
+
mi_gdb_test "-var-evaluate-expression lpinteger" \
"\\^done,value=\"$hex\"" \
"eval lpinteger"
diff --git a/gdb/testsuite/gdb.threads/schedlock.c b/gdb/testsuite/gdb.threads/schedlock.c
index df361d0..033131c 100644
--- a/gdb/testsuite/gdb.threads/schedlock.c
+++ b/gdb/testsuite/gdb.threads/schedlock.c
@@ -7,7 +7,7 @@ void *thread_function(void *arg); /* Pointer to function executed by each thread
#define NUM 5
-int args[NUM+1];
+unsigned int args[NUM+1];
int main() {
int res;
diff --git a/gdb/utils.c b/gdb/utils.c
index 9aab625..24a2819 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -153,13 +153,13 @@ int quit_flag;
int immediate_quit;
-/* Nonzero means that encoded C++ names should be printed out in their
- C++ form rather than raw. */
+/* Nonzero means that encoded C++/ObjC names should be printed out in their
+ C++/ObjC form rather than raw. */
int demangle = 1;
-/* Nonzero means that encoded C++ names should be printed out in their
- C++ form even in assembler language displays. If this is set, but
+/* Nonzero means that encoded C++/ObjC names should be printed out in their
+ C++/ObjC form even in assembler language displays. If this is set, but
DEMANGLE is zero, names are printed raw, i.e. DEMANGLE controls. */
int asm_demangle = 0;
@@ -1817,6 +1817,51 @@ wrap_here (char *indent)
}
}
+/* Print input string to gdb_stdout, filtered, with wrap,
+ arranging strings in columns of n chars. String can be
+ right or left justified in the column. Never prints
+ trailing spaces. String should never be longer than
+ width. FIXME: this could be useful for the EXAMINE
+ command, which currently doesn't tabulate very well */
+
+void
+puts_filtered_tabular (char *string, int width, int right)
+{
+ int spaces = 0;
+ int stringlen;
+ char *spacebuf;
+
+ gdb_assert (chars_per_line > 0);
+ if (chars_per_line == UINT_MAX)
+ {
+ fputs_filtered (string, gdb_stdout);
+ fputs_filtered ("\n", gdb_stdout);
+ return;
+ }
+
+ if (((chars_printed - 1) / width + 2) * width >= chars_per_line)
+ fputs_filtered ("\n", gdb_stdout);
+
+ if (width >= chars_per_line)
+ width = chars_per_line - 1;
+
+ stringlen = strlen (string);
+
+ if (chars_printed > 0)
+ spaces = width - (chars_printed - 1) % width - 1;
+ if (right)
+ spaces += width - stringlen;
+
+ spacebuf = alloca (spaces + 1);
+ spacebuf[spaces] = '\0';
+ while (spaces--)
+ spacebuf[spaces] = ' ';
+
+ fputs_filtered (spacebuf, gdb_stdout);
+ fputs_filtered (string, gdb_stdout);
+}
+
+
/* Ensure that whatever gets printed next, using the filtered output
commands, starts at the beginning of the line. I.E. if there is
any pending output for the current line, flush it and start a new
@@ -2244,7 +2289,7 @@ print_spaces_filtered (int n, struct ui_file *stream)
fputs_filtered (n_spaces (n), stream);
}
-/* C++ demangler stuff. */
+/* C++/ObjC demangler stuff. */
/* fprintf_symbol_filtered attempts to demangle NAME, a symbol in language
LANG, using demangling args ARG_MODE, and print it filtered to STREAM.
@@ -2274,6 +2319,10 @@ fprintf_symbol_filtered (struct ui_file *stream, char *name, enum language lang,
case language_java:
demangled = cplus_demangle (name, arg_mode | DMGL_JAVA);
break;
+ case language_objc:
+ /* Commented out until ObjC handling is enabled. */
+ /*demangled = objc_demangle (name);*/
+ /*break;*/
#if 0
/* OBSOLETE case language_chill: */
/* OBSOLETE demangled = chill_demangle (name); */
@@ -2393,7 +2442,7 @@ initialize_utils (void)
add_show_from_set
(add_set_cmd ("demangle", class_support, var_boolean,
(char *) &demangle,
- "Set demangling of encoded C++ names when displaying symbols.",
+ "Set demangling of encoded C++/ObjC names when displaying symbols.",
&setprintlist),
&showprintlist);
@@ -2421,7 +2470,7 @@ initialize_utils (void)
add_show_from_set
(add_set_cmd ("asm-demangle", class_support, var_boolean,
(char *) &asm_demangle,
- "Set demangling of C++ names in disassembly listings.",
+ "Set demangling of C++/ObjC names in disassembly listings.",
&setprintlist),
&showprintlist);
}
diff --git a/gdb/valops.c b/gdb/valops.c
index eaf4295..6fcd824 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -3306,18 +3306,17 @@ value_full_object (struct value *argp, struct type *rtype, int xfull, int xtop,
-/* C++: return the value of the class instance variable, if one exists.
+/* Return the value of the local variable, if one exists.
Flag COMPLAIN signals an error if the request is made in an
inappropriate context. */
struct value *
-value_of_this (int complain)
+value_of_local (const char *name, int complain)
{
struct symbol *func, *sym;
struct block *b;
int i;
- static const char funny_this[] = "this";
- struct value *this;
+ struct value * ret;
if (selected_frame == 0)
{
@@ -3331,7 +3330,7 @@ value_of_this (int complain)
if (!func)
{
if (complain)
- error ("no `this' in nameless context");
+ error ("no `%s' in nameless context", name);
else
return 0;
}
@@ -3341,26 +3340,39 @@ value_of_this (int complain)
if (i <= 0)
{
if (complain)
- error ("no args, no `this'");
+ error ("no args, no `%s'", name);
else
return 0;
}
/* Calling lookup_block_symbol is necessary to get the LOC_REGISTER
symbol instead of the LOC_ARG one (if both exist). */
- sym = lookup_block_symbol (b, funny_this, NULL, VAR_NAMESPACE);
+ sym = lookup_block_symbol (b, name, NULL, VAR_NAMESPACE);
if (sym == NULL)
{
if (complain)
- error ("current stack frame not in method");
+ error ("current stack frame does not contain a variable named `%s'", name);
else
return NULL;
}
- this = read_var_value (sym, selected_frame);
- if (this == 0 && complain)
- error ("`this' argument at unknown address");
- return this;
+ ret = read_var_value (sym, selected_frame);
+ if (ret == 0 && complain)
+ error ("`%s' argument unreadable", name);
+ return ret;
+}
+
+/* C++/Objective-C: return the value of the class instance variable,
+ if one exists. Flag COMPLAIN signals an error if the request is
+ made in an inappropriate context. */
+
+struct value *
+value_of_this (int complain)
+{
+ if (current_language->la_language == language_objc)
+ return value_of_local ("self", complain);
+ else
+ return value_of_local ("this", complain);
}
/* Create a slice (sub-string, sub-array) of ARRAY, that is LENGTH elements
diff --git a/gdb/value.h b/gdb/value.h
index efabecb..a38b576 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -566,4 +566,6 @@ extern CORE_ADDR default_push_arguments (int nargs, struct value ** args,
CORE_ADDR sp, int struct_return,
CORE_ADDR struct_addr);
+extern struct value *value_of_local (const char *name, int complain);
+
#endif /* !defined (VALUE_H) */
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 16ba528..a0e1d53 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -111,6 +111,9 @@ struct varobj
/* The format of the output for this object */
enum varobj_display_formats format;
+
+ /* Was this variable updated via a varobj_set_value operation */
+ int updated;
};
/* Every variable keeps a linked list of its children, described
@@ -753,6 +756,7 @@ int
varobj_set_value (struct varobj *var, char *expression)
{
struct value *val;
+ int error;
int offset = 0;
/* The argument "expression" contains the variable's new value.
@@ -778,6 +782,8 @@ varobj_set_value (struct varobj *var, char *expression)
return 0;
}
+ if (!my_value_equal (var->value, value, &error))
+ var->updated = 1;
if (!gdb_value_assign (var->value, value, &val))
return 0;
value_free (var->value);
@@ -893,10 +899,11 @@ varobj_update (struct varobj **varp, struct varobj ***changelist)
/* If values are not equal, note that it's changed.
There a couple of exceptions here, though.
We don't want some types to be reported as "changed". */
- else if (type_changeable (*varp)
- && !my_value_equal ((*varp)->value, new, &error2))
+ else if (type_changeable (*varp) &&
+ ((*varp)->updated || !my_value_equal ((*varp)->value, new, &error2)))
{
vpush (&result, *varp);
+ (*varp)->updated = 0;
changed++;
/* error2 replaces var->error since this new value
WILL replace the old one. */
@@ -933,10 +940,12 @@ varobj_update (struct varobj **varp, struct varobj ***changelist)
/* Update this variable */
new = value_of_child (v->parent, v->index);
- if (type_changeable (v) && !my_value_equal (v->value, new, &error2))
+ if (type_changeable (v) &&
+ (v->updated || !my_value_equal (v->value, new, &error2)))
{
/* Note that it's changed */
vpush (&result, v);
+ v->updated = 0;
changed++;
}
/* error2 replaces v->error since this new value
@@ -1294,6 +1303,7 @@ new_variable (void)
var->children = NULL;
var->format = 0;
var->root = NULL;
+ var->updated = 0;
return var;
}
diff --git a/gdb/version.in b/gdb/version.in
index a00b4a3..4b2a497 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2002-10-04-cvs
+2002-10-25-cvs
diff --git a/gdb/x86-64-linux-tdep.c b/gdb/x86-64-linux-tdep.c
index ac41daa..146a7a0 100644
--- a/gdb/x86-64-linux-tdep.c
+++ b/gdb/x86-64-linux-tdep.c
@@ -35,8 +35,10 @@
#define LINUX_SIGTRAMP_OFFSET1 (7)
static const unsigned char linux_sigtramp_code[] = {
- LINUX_SIGTRAMP_INSN0, 0xc7, 0xc0, 0x89, 0x00, 0x00, 0x00, /* mov $0x89,%rax */
- LINUX_SIGTRAMP_INSN1, 0x05 /* syscall */
+ /* mov $__NR_rt_sigreturn,%rax */
+ LINUX_SIGTRAMP_INSN0, 0xc7, 0xc0, 0x0f, 0x00, 0x00, 0x00,
+ /* syscall */
+ LINUX_SIGTRAMP_INSN1, 0x05
};
#define LINUX_SIGTRAMP_LEN (sizeof linux_sigtramp_code)
@@ -68,17 +70,22 @@ x86_64_linux_sigtramp_start (CORE_ADDR pc)
return pc;
}
-#define LINUX_SIGINFO_SIZE 128
+#define LINUX_SIGINFO_SIZE 0
/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
-#define LINUX_UCONTEXT_SIGCONTEXT_OFFSET (36)
+#define LINUX_UCONTEXT_SIGCONTEXT_OFFSET 40
+
+/* Offset to saved PC in sigcontext, from <asm/sigcontext.h>. */
+#define LINUX_SIGCONTEXT_PC_OFFSET 128
+#define LINUX_SIGCONTEXT_FP_OFFSET 120
/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
address of the associated sigcontext structure. */
-CORE_ADDR
+static CORE_ADDR
x86_64_linux_sigcontext_addr (struct frame_info *frame)
{
CORE_ADDR pc;
+ ULONGEST rsp;
pc = x86_64_linux_sigtramp_start (frame->pc);
if (pc)
@@ -92,8 +99,8 @@ x86_64_linux_sigcontext_addr (struct frame_info *frame)
/* This is the top frame. */
- return read_register (SP_REGNUM) + LINUX_SIGINFO_SIZE +
- LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
+ rsp = read_register (SP_REGNUM);
+ return rsp + LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
}
@@ -101,13 +108,10 @@ x86_64_linux_sigcontext_addr (struct frame_info *frame)
return 0;
}
-/* Offset to saved PC in sigcontext, from <asm/sigcontext.h>. */
-#define LINUX_SIGCONTEXT_PC_OFFSET (136)
-
/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
saved program counter. */
-CORE_ADDR
+static CORE_ADDR
x86_64_linux_sigtramp_saved_pc (struct frame_info *frame)
{
CORE_ADDR addr;
@@ -135,3 +139,59 @@ x86_64_linux_frame_saved_pc (struct frame_info *frame)
return x86_64_linux_sigtramp_saved_pc (frame);
return cfi_get_ra (frame);
}
+
+/* Return whether PC is in a GNU/Linux sigtramp routine. */
+
+int
+x86_64_linux_in_sigtramp (CORE_ADDR pc, char *name)
+{
+ if (name)
+ return STREQ ("__restore_rt", name);
+
+ return (x86_64_linux_sigtramp_start (pc) != 0);
+}
+
+CORE_ADDR
+x86_64_linux_frame_chain (struct frame_info *fi)
+{
+ ULONGEST addr;
+ CORE_ADDR fp, pc;
+
+ if (!fi->signal_handler_caller)
+ {
+ fp = cfi_frame_chain (fi);
+ if (fp)
+ return fp;
+ else
+ addr = fi->frame;
+ }
+ else
+ addr = fi->next->frame;
+
+ addr += LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
+
+ fp = read_memory_integer (addr + LINUX_SIGCONTEXT_FP_OFFSET, 8) + 8;
+
+ return fp;
+}
+
+void
+x86_64_init_frame_pc (int fromleaf, struct frame_info *fi)
+{
+ CORE_ADDR addr;
+
+ if (fi->next && fi->next->signal_handler_caller)
+ {
+ addr = fi->next->next->frame
+ + LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
+ fi->pc = read_memory_integer (addr + LINUX_SIGCONTEXT_PC_OFFSET, 8);
+ }
+ else
+ cfi_init_frame_pc (fromleaf, fi);
+}
+
+void
+x86_64_init_extra_frame_info (int fromleaf, struct frame_info *fi)
+{
+ cfi_init_extra_frame_info (fromleaf, fi);
+}
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index dbc5611..5f6dd3f 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -889,7 +889,7 @@ x86_64_skip_prologue (CORE_ADDR pc)
if (!v_function || !v_function->ginfo.value.block || !v_sal.symtab)
return pc;
- endaddr = v_function->ginfo.value.block->endaddr;
+ endaddr = BLOCK_END (SYMBOL_BLOCK_VALUE (v_function));
for (i = 0; i < v_sal.symtab->linetable->nitems; i++)
if (v_sal.symtab->linetable->item[i].pc >= pc
@@ -904,7 +904,7 @@ x86_64_skip_prologue (CORE_ADDR pc)
/* Sequence of bytes for breakpoint instruction. */
static unsigned char *
-x86_64_breakpoint_from_pc (CORE_ADDR * pc, int *lenptr)
+x86_64_breakpoint_from_pc (CORE_ADDR *pc, int *lenptr)
{
static unsigned char breakpoint[] = { 0xcc };
*lenptr = 1;
@@ -1026,7 +1026,7 @@ x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* FRAME_CHAIN takes a frame's nominal address and produces the frame's
chain-pointer. */
- set_gdbarch_frame_chain (gdbarch, cfi_frame_chain);
+ set_gdbarch_frame_chain (gdbarch, x86_64_linux_frame_chain);
set_gdbarch_frameless_function_invocation (gdbarch,
x86_64_frameless_function_invocation);
@@ -1041,10 +1041,10 @@ x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_init_saved_regs (gdbarch, x86_64_frame_init_saved_regs);
/* Frame pc initialization is handled by unwind informations. */
- set_gdbarch_init_frame_pc (gdbarch, cfi_init_frame_pc);
+ set_gdbarch_init_frame_pc (gdbarch, x86_64_init_frame_pc);
/* Initialization of unwind informations. */
- set_gdbarch_init_extra_frame_info (gdbarch, cfi_init_extra_frame_info);
+ set_gdbarch_init_extra_frame_info (gdbarch, x86_64_init_extra_frame_info);
/* Getting saved registers is handled by unwind informations. */
set_gdbarch_get_saved_register (gdbarch, cfi_get_saved_register);
@@ -1054,8 +1054,7 @@ x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Cons up virtual frame pointer for trace */
set_gdbarch_virtual_frame_pointer (gdbarch, cfi_virtual_frame_pointer);
-
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
+ set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
@@ -1091,12 +1090,14 @@ x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
- set_gdbarch_deprecated_extract_return_value (gdbarch, x86_64_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch,
+ x86_64_extract_return_value);
/* Write into the appropriate registers a function return value stored
in VALBUF of type TYPE, given in virtual format. */
- set_gdbarch_deprecated_store_return_value (gdbarch, x86_64_store_return_value);
+ set_gdbarch_deprecated_store_return_value (gdbarch,
+ x86_64_store_return_value);
/* Offset from address of function to start of its code. */
@@ -1122,6 +1123,8 @@ x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum);
+ set_gdbarch_pc_in_sigtramp (gdbarch, x86_64_linux_in_sigtramp);
+
return gdbarch;
}
diff --git a/gdb/x86-64-tdep.h b/gdb/x86-64-tdep.h
index 7114860..9fb2fd0 100644
--- a/gdb/x86-64-tdep.h
+++ b/gdb/x86-64-tdep.h
@@ -30,9 +30,13 @@ extern int x86_64_num_gregs;
int x86_64_register_number (const char *name);
const char *x86_64_register_name (int reg_nr);
-
gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc;
gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call;
+gdbarch_pc_in_sigtramp_ftype x86_64_linux_in_sigtramp;
+CORE_ADDR x86_64_linux_frame_chain (struct frame_info *fi);
+void x86_64_init_frame_pc (int fromleaf, struct frame_info *fi);
+void x86_64_init_extra_frame_info (int fromleaf, struct frame_info *fi);
+
#endif
diff --git a/include/ChangeLog b/include/ChangeLog
index 257e381..dbbf4a4 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,13 @@
+2002-10-24 Nathan Tallent <eraxxon@alumni.rice.edu>
+
+ * ansidecl.h (__STDC__): Add (__alpha && __cplusplus) to the
+ list of platform compilers that may look, smell and act
+ like __STDC__ but that may not define it.
+
+2002-10-11 David O'Brien <obrien@FreeBSD.org>
+
+ * getopt.h: getopt is in unistd.h (based on SUSv2).
+
2002-09-26 Jakub Jelinek <jakub@redhat.com>
* elf/x86-64.h: Add TLS relocs.
diff --git a/include/ansidecl.h b/include/ansidecl.h
index 9a7c577..d169b4f 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -136,10 +136,13 @@ So instead we use the macro below and test it against specific values. */
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#endif /* GCC_VERSION */
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
+#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) || (defined(__alpha) && defined(__cplusplus))
/* All known AIX compilers implement these things (but don't always
define __STDC__). The RISC/OS MIPS compiler defines these things
in SVR4 mode, but does not define __STDC__. */
+/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other
+ C++ compilers, does not define __STDC__, though it acts as if this
+ was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */
#define ANSI_PROTOTYPES 1
#define PTR void *
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 254b2c4..65f3160 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,7 @@
+2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * sh.h: Add SH TLS relocs.
+
2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
Ken Raeburn <raeburn@cygnus.com>
Aldy Hernandez <aldyh@redhat.com>
diff --git a/include/elf/sh.h b/include/elf/sh.h
index af78c9b..ef964d6 100644
--- a/include/elf/sh.h
+++ b/include/elf/sh.h
@@ -167,7 +167,17 @@ START_RELOC_NUMBERS (elf_sh_reloc_type)
RELOC_NUMBER (R_SH_DIR10SL, 50)
RELOC_NUMBER (R_SH_DIR10SQ, 51)
FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_3, 52)
- FAKE_RELOC (R_SH_LAST_INVALID_RELOC_3, 159)
+ FAKE_RELOC (R_SH_LAST_INVALID_RELOC_3, 143)
+ RELOC_NUMBER (R_SH_TLS_GD_32, 144)
+ RELOC_NUMBER (R_SH_TLS_LD_32, 145)
+ RELOC_NUMBER (R_SH_TLS_LDO_32, 146)
+ RELOC_NUMBER (R_SH_TLS_IE_32, 147)
+ RELOC_NUMBER (R_SH_TLS_LE_32, 148)
+ RELOC_NUMBER (R_SH_TLS_DTPMOD32, 149)
+ RELOC_NUMBER (R_SH_TLS_DTPOFF32, 150)
+ RELOC_NUMBER (R_SH_TLS_TPOFF32, 151)
+ FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_4, 152)
+ FAKE_RELOC (R_SH_LAST_INVALID_RELOC_4, 159)
RELOC_NUMBER (R_SH_GOT32, 160)
RELOC_NUMBER (R_SH_PLT32, 161)
RELOC_NUMBER (R_SH_COPY, 162)
@@ -205,8 +215,8 @@ START_RELOC_NUMBERS (elf_sh_reloc_type)
RELOC_NUMBER (R_SH_GLOB_DAT64, 194)
RELOC_NUMBER (R_SH_JMP_SLOT64, 195)
RELOC_NUMBER (R_SH_RELATIVE64, 196)
- FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_4, 197)
- FAKE_RELOC (R_SH_LAST_INVALID_RELOC_4, 241)
+ FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_5, 197)
+ FAKE_RELOC (R_SH_LAST_INVALID_RELOC_5, 241)
RELOC_NUMBER (R_SH_SHMEDIA_CODE, 242)
RELOC_NUMBER (R_SH_PT_16, 243)
RELOC_NUMBER (R_SH_IMMS16, 244)
diff --git a/include/getopt.h b/include/getopt.h
index 0c6470b..da09cee 100644
--- a/include/getopt.h
+++ b/include/getopt.h
@@ -108,7 +108,7 @@ struct option
#if !HAVE_DECL_GETOPT
#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT)
/* Many other libraries have conflicting prototypes for getopt, with
- differences in the consts, in stdlib.h. To avoid compilation
+ differences in the consts, in unistd.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */
extern int getopt (int argc, char *const *argv, const char *shortopts);
#else
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index ab908ec..af5707e 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,7 @@
+2002-10-14 Alan Modra <amodra@bigpond.net.au>
+
+ * cgen.h: Test __BFD_H_SEEN__ rather than BFD_VERSION_DATE.
+
2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
Ken Raeburn <raeburn@cygnus.com>
Aldy Hernandez <aldyh@redhat.com>
diff --git a/include/opcode/cgen.h b/include/opcode/cgen.h
index 09c5cbf..8947798 100644
--- a/include/opcode/cgen.h
+++ b/include/opcode/cgen.h
@@ -26,7 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Perhaps the definition of bfd_vma can be moved outside of bfd.h.
Or perhaps one could duplicate its definition in another file.
Until such time, this file conditionally compiles definitions that require
- bfd_vma using BFD_VERSION_DATE. */
+ bfd_vma using __BFD_H_SEEN__. */
/* Enums must be defined before they can be used.
Allow them to be used in struct definitions, even though the enum must
@@ -276,7 +276,7 @@ typedef const char * (cgen_parse_fn)
PC is the pc value of the insn.
The result is an error message or NULL if success. */
-#ifdef BFD_VERSION_DATE
+#ifdef __BFD_H_SEEN__
typedef const char * (cgen_insert_fn)
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
CGEN_FIELDS *fields_, CGEN_INSN_BYTES_PTR insnp_,
@@ -297,7 +297,7 @@ typedef const char * (cgen_insert_fn) ();
PC is the pc value of the insn.
The result is the length of the insn in bits or zero if not recognized. */
-#ifdef BFD_VERSION_DATE
+#ifdef __BFD_H_SEEN__
typedef int (cgen_extract_fn)
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
CGEN_EXTRACT_INFO *ex_info_, CGEN_INSN_INT base_insn_,
@@ -316,7 +316,7 @@ typedef int (cgen_extract_fn) ();
PC is the pc value of the insn.
LEN is the length of the insn, in bits. */
-#ifdef BFD_VERSION_DATE
+#ifdef __BFD_H_SEEN__
typedef void (cgen_print_fn)
PARAMS ((CGEN_CPU_DESC, PTR info_, const CGEN_INSN *insn_,
CGEN_FIELDS *fields_, bfd_vma pc_, int len_));
@@ -381,7 +381,7 @@ enum cgen_parse_operand_result
CGEN_PARSE_OPERAND_RESULT_ERROR
};
-#ifdef BFD_VERSION_DATE /* Don't require bfd.h unnecessarily. */
+#ifdef __BFD_H_SEEN__ /* Don't require bfd.h unnecessarily. */
typedef const char * (cgen_parse_operand_fn)
PARAMS ((CGEN_CPU_DESC,
enum cgen_parse_operand_type, const char **, int, int,
@@ -565,7 +565,7 @@ const CGEN_KEYWORD_ENTRY *cgen_keyword_search_next
extern const char *cgen_parse_keyword
PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *));
-#ifdef BFD_VERSION_DATE /* Don't require bfd.h unnecessarily. */
+#ifdef __BFD_H_SEEN__ /* Don't require bfd.h unnecessarily. */
extern const char *cgen_parse_signed_integer
PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
extern const char *cgen_parse_unsigned_integer
@@ -1253,7 +1253,7 @@ typedef struct cgen_cpu_desc
const char * (*parse_operand)
PARAMS ((CGEN_CPU_DESC, int opindex_, const char **,
CGEN_FIELDS *fields_));
-#ifdef BFD_VERSION_DATE
+#ifdef __BFD_H_SEEN__
const char * (*insert_operand)
PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_,
CGEN_INSN_BYTES_PTR, bfd_vma pc_));
@@ -1286,7 +1286,7 @@ typedef struct cgen_cpu_desc
PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
void (*set_int_operand)
PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, int value_));
-#ifdef BFD_VERSION_DATE
+#ifdef __BFD_H_SEEN__
bfd_vma (*get_vma_operand)
PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
void (*set_vma_operand)
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index bde129c..4a32a3b 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,13 @@
+2002-10-16 Jakub Jelinek <jakub@redhat.com>
+
+ * config.table: Use mh-s390pic for s390x too.
+
+2002-10-06 Andreas Jaeger <aj@suse.de>
+
+ * libiberty/cplus-dem.c (ada_demangle): Get rid of unneeded
+ variable and of strict-aliasing warning.
+ (grow_vect): Use char as first parameter.
+
2002-09-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (all): Fix multilib parallel build.
diff --git a/libiberty/config.table b/libiberty/config.table
index b9a2479..df48ce9 100644
--- a/libiberty/config.table
+++ b/libiberty/config.table
@@ -39,6 +39,7 @@ if [ "${shared}" = "yes" ]; then
powerpc*-*-aix*) ;;
powerpc*-*-*) frag=mh-ppcpic ;;
sparc*-*-*) frag=mh-sparcpic ;;
+ s390*-*-*) frag=mh-s390pic ;;
*) frag=mh-${host_cpu}pic ;;
esac
if [ -n "${frag}" ]; then
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
index 4c47783..f42d618 100644
--- a/libiberty/cplus-dem.c
+++ b/libiberty/cplus-dem.c
@@ -514,7 +514,7 @@ recursively_demangle PARAMS ((struct work_stuff *, const char **, string *,
int));
static void
-grow_vect PARAMS ((void **, size_t *, size_t, int));
+grow_vect PARAMS ((char **, size_t *, size_t, int));
/* Translate count to integer, consuming tokens in the process.
Conversion terminates on the first non-digit character.
@@ -936,7 +936,7 @@ cplus_demangle (mangled, options)
static void
grow_vect (old_vect, size, min_size, element_size)
- void **old_vect;
+ char **old_vect;
size_t *size;
size_t min_size;
int element_size;
@@ -969,8 +969,7 @@ ada_demangle (mangled, option)
char *demangled = NULL;
int at_start_name;
int changed;
- char *demangling_buffer = NULL;
- size_t demangling_buffer_size = 0;
+ size_t demangled_size = 0;
changed = 0;
@@ -998,10 +997,9 @@ ada_demangle (mangled, option)
}
/* Make demangled big enough for possible expansion by operator name. */
- grow_vect ((void **) &(demangling_buffer),
- &demangling_buffer_size, 2 * len0 + 1,
+ grow_vect (&demangled,
+ &demangled_size, 2 * len0 + 1,
sizeof (char));
- demangled = demangling_buffer;
if (ISDIGIT ((unsigned char) mangled[len0 - 1])) {
for (i = len0 - 2; i >= 0 && ISDIGIT ((unsigned char) mangled[i]); i -= 1)
@@ -1051,10 +1049,10 @@ ada_demangle (mangled, option)
return demangled;
Suppress:
- grow_vect ((void **) &(demangling_buffer),
- &demangling_buffer_size, strlen (mangled) + 3,
+ grow_vect (&demangled,
+ &demangled_size, strlen (mangled) + 3,
sizeof (char));
- demangled = demangling_buffer;
+
if (mangled[0] == '<')
strcpy (demangled, mangled);
else
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 6128a7d..558b900 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,15 @@
+2002-10-07 Nathan Tallent <eraxxon@alumni.rice.edu>
+
+ * sparc-opc.c (sparc_opcodes) <fb, fba, fbe, fbz, fbg, fbge,
+ fbl, fble, fblg, fbn, fbne, fbnz, fbo, fbu, fbue, fbug, fbuge,
+ fbul, fbule>: Add conditional/unconditional branch
+ classification.
+
+2002-10-13 Stephane Carrez <stcarrez@nerim.fr>
+
+ * m68hc11-dis.c (print_insn): Treat bitmask and branch operands
+ at the end.
+
2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
Ken Raeburn <raeburn@cygnus.com>
Aldy Hernandez <aldyh@redhat.com>
diff --git a/opcodes/m68hc11-dis.c b/opcodes/m68hc11-dis.c
index c721d16..bcd3ee5 100644
--- a/opcodes/m68hc11-dis.c
+++ b/opcodes/m68hc11-dis.c
@@ -495,55 +495,6 @@ print_insn (memaddr, info, arch)
reg_dst_table[(buffer[0] & 7)]);
}
- /* M6811_OP_BITMASK and M6811_OP_JUMP_REL must be treated separately
- and in that order. The brset/brclr insn have a bitmask and then
- a relative branch offset. */
- if (format & M6811_OP_BITMASK)
- {
- status = read_memory (memaddr + pos, &buffer[0], 1, info);
- if (status != 0)
- {
- return status;
- }
- pos++;
- (*info->fprintf_func) (info->stream, " #$%02x%s",
- buffer[0] & 0x0FF,
- (format & M6811_OP_JUMP_REL ? " " : ""));
- format &= ~M6811_OP_BITMASK;
- }
- if (format & M6811_OP_JUMP_REL)
- {
- int val;
-
- status = read_memory (memaddr + pos, &buffer[0], 1, info);
- if (status != 0)
- {
- return status;
- }
-
- pos++;
- val = (buffer[0] & 0x80) ? buffer[0] | 0xFFFFFF00 : buffer[0];
- (*info->print_address_func) (memaddr + pos + val, info);
- format &= ~M6811_OP_JUMP_REL;
- }
- else if (format & M6812_OP_JUMP_REL16)
- {
- int val;
-
- status = read_memory (memaddr + pos, &buffer[0], 2, info);
- if (status != 0)
- {
- return status;
- }
-
- pos += 2;
- val = ((buffer[0] << 8) | (buffer[1] & 0x0FF));
- if (val & 0x8000)
- val |= 0xffff0000;
-
- (*info->print_address_func) (memaddr + pos + val, info);
- format &= ~M6812_OP_JUMP_REL16;
- }
if (format & (M6811_OP_IMM16 | M6811_OP_IND16))
{
int val;
@@ -641,6 +592,56 @@ print_insn (memaddr, info, arch)
(*info->print_address_func) (val, info);
}
+ /* M6811_OP_BITMASK and M6811_OP_JUMP_REL must be treated separately
+ and in that order. The brset/brclr insn have a bitmask and then
+ a relative branch offset. */
+ if (format & M6811_OP_BITMASK)
+ {
+ status = read_memory (memaddr + pos, &buffer[0], 1, info);
+ if (status != 0)
+ {
+ return status;
+ }
+ pos++;
+ (*info->fprintf_func) (info->stream, " #$%02x%s",
+ buffer[0] & 0x0FF,
+ (format & M6811_OP_JUMP_REL ? " " : ""));
+ format &= ~M6811_OP_BITMASK;
+ }
+ if (format & M6811_OP_JUMP_REL)
+ {
+ int val;
+
+ status = read_memory (memaddr + pos, &buffer[0], 1, info);
+ if (status != 0)
+ {
+ return status;
+ }
+
+ pos++;
+ val = (buffer[0] & 0x80) ? buffer[0] | 0xFFFFFF00 : buffer[0];
+ (*info->print_address_func) (memaddr + pos + val, info);
+ format &= ~M6811_OP_JUMP_REL;
+ }
+ else if (format & M6812_OP_JUMP_REL16)
+ {
+ int val;
+
+ status = read_memory (memaddr + pos, &buffer[0], 2, info);
+ if (status != 0)
+ {
+ return status;
+ }
+
+ pos += 2;
+ val = ((buffer[0] << 8) | (buffer[1] & 0x0FF));
+ if (val & 0x8000)
+ val |= 0xffff0000;
+
+ (*info->print_address_func) (memaddr + pos + val, info);
+ format &= ~M6812_OP_JUMP_REL16;
+ }
+
if (format & M6812_OP_PAGE)
{
int val;
diff --git a/opcodes/sparc-opc.c b/opcodes/sparc-opc.c
index 5c06d01..0010232 100644
--- a/opcodes/sparc-opc.c
+++ b/opcodes/sparc-opc.c
@@ -1440,25 +1440,25 @@ cond ("bz", "tz", CONDZ, F_CONDBR|F_ALIAS), /* for e */
FBRX(fop, F2(0, 5)|COND(mask), F2(~0, ~5)|COND(~(mask)), flags), /* v9 */ \
FBR(fop, F2(0, 6)|COND(mask), F2(~0, ~6)|COND(~(mask)), flags)
-CONDFC ("fb", "cb", 0x8, 0),
-CONDFCL ("fba", "cba", 0x8, F_ALIAS),
-CONDFC ("fbe", "cb0", 0x9, 0),
-CONDF ("fbz", 0x9, F_ALIAS),
-CONDFC ("fbg", "cb2", 0x6, 0),
-CONDFC ("fbge", "cb02", 0xb, 0),
-CONDFC ("fbl", "cb1", 0x4, 0),
-CONDFC ("fble", "cb01", 0xd, 0),
-CONDFC ("fblg", "cb12", 0x2, 0),
-CONDFCL ("fbn", "cbn", 0x0, 0),
-CONDFC ("fbne", "cb123", 0x1, 0),
-CONDF ("fbnz", 0x1, F_ALIAS),
-CONDFC ("fbo", "cb012", 0xf, 0),
-CONDFC ("fbu", "cb3", 0x7, 0),
-CONDFC ("fbue", "cb03", 0xa, 0),
-CONDFC ("fbug", "cb23", 0x5, 0),
-CONDFC ("fbuge", "cb023", 0xc, 0),
-CONDFC ("fbul", "cb13", 0x3, 0),
-CONDFC ("fbule", "cb013", 0xe, 0),
+CONDFC ("fb", "cb", 0x8, F_UNBR),
+CONDFCL ("fba", "cba", 0x8, F_UNBR|F_ALIAS),
+CONDFC ("fbe", "cb0", 0x9, F_CONDBR),
+CONDF ("fbz", 0x9, F_CONDBR|F_ALIAS),
+CONDFC ("fbg", "cb2", 0x6, F_CONDBR),
+CONDFC ("fbge", "cb02", 0xb, F_CONDBR),
+CONDFC ("fbl", "cb1", 0x4, F_CONDBR),
+CONDFC ("fble", "cb01", 0xd, F_CONDBR),
+CONDFC ("fblg", "cb12", 0x2, F_CONDBR),
+CONDFCL ("fbn", "cbn", 0x0, F_UNBR),
+CONDFC ("fbne", "cb123", 0x1, F_CONDBR),
+CONDF ("fbnz", 0x1, F_CONDBR|F_ALIAS),
+CONDFC ("fbo", "cb012", 0xf, F_CONDBR),
+CONDFC ("fbu", "cb3", 0x7, F_CONDBR),
+CONDFC ("fbue", "cb03", 0xa, F_CONDBR),
+CONDFC ("fbug", "cb23", 0x5, F_CONDBR),
+CONDFC ("fbuge", "cb023", 0xc, F_CONDBR),
+CONDFC ("fbul", "cb13", 0x3, F_CONDBR),
+CONDFC ("fbule", "cb013", 0xe, F_CONDBR),
#undef CONDFC
#undef CONDFCL
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index ae252fd..eb38a7b 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,7 @@
+2002-10-14 Alan Modra <amodra@bigpond.net.au>
+
+ * cgen-trace.h: Test __BFD_H_SEEN__ rather than BFD_VERSION.
+
2002-08-29 Dave Brolley <brolley@redhat.com>
* Make-common.in (CGEN_READ_SCM): Remove ../../cgen/stamp-cgen.
diff --git a/sim/common/cgen-trace.h b/sim/common/cgen-trace.h
index 5e796fb..be1dd1d 100644
--- a/sim/common/cgen-trace.h
+++ b/sim/common/cgen-trace.h
@@ -78,7 +78,7 @@ typedef struct {
extern int sim_disasm_sprintf (SFILE *, const char *, ...);
/* For opcodes based disassemblers. */
-#ifdef BFD_VERSION
+#ifdef __BFD_H_SEEN__
struct disassemble_info;
extern int
sim_disasm_read_memory (bfd_vma memaddr_, bfd_byte *myaddr_, int length_,
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index ec58759..60b41f7 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,11 @@
+Fri Oct 11 16:22:28 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * interp.c (trap): Return int. Take extra parameter for address
+ of the trap instruction. Changed all callers.
+ Add case 33 for profiling.
+ * gencode.c (trapa): Handle trap 33 using the trap function.
+ Add read of vector for generic traps.
+
Wed Jul 17 19:36:38 2002 J"orn Rennecke <joern.rennecke@superh.com>
* Makefile.in (interp.o): Depend on $(srcroot)/include/gdb/sim-sh.h.
diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index ba6ee4c..8e2445a 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -577,7 +577,7 @@ op tab[] =
},
{ "", "nm", "mac.l @<REG_M>+,@<REG_N>+", "0000nnnnmmmm1111",
- "trap (255,R0,memory,maskl,maskw, endianw);",
+ "trap (255, R0, PC, memory, maskl, maskw, endianw);",
"/* FIXME: mac.l support */",
},
@@ -951,8 +951,7 @@ op tab[] =
},
{ "", "", "sleep", "0000000000011011",
- "nip = PC;",
- "trap (0xc3, R0, memory, maskl, maskw, endianw);",
+ "nip += trap (0xc3, R0, PC, memory, maskl, maskw, endianw);",
},
{ "n", "", "stc <CREG_M>,<REG_N>", "0000nnnnmmmm0010",
@@ -1029,37 +1028,25 @@ op tab[] =
},
{ "0", "", "trapa #<imm>", "11000011i8*1....",
-#if 0
- /* SH-[12] */
"long imm = 0xff & i;",
- "if (i==0xc3)",
- " PC-=2;",
- "if (i<20||i==34||i==0xc3)",
- " trap(i,R,memory,maskl,maskw,endianw);",
+ "if (i < 20 || i == 33 || i == 34 || i == 0xc3)",
+ " nip += trap (i, R, PC, memory, maskl, maskw,endianw);",
+#if 0
"else {",
+ /* SH-[12] */
" R[15]-=4;",
- " WLAT(R[15],GET_SR());",
+ " WLAT (R[15], GET_SR());",
" R[15]-=4;",
- " WLAT(R[15],PC+2);",
- " PC=RLAT(VBR+(imm<<2))-2;",
- "}",
+ " WLAT (R[15], PH2T (PC + 2));",
#else
- "if (i == 0xc3)",
- " {",
- " nip = PC;",
- " trap (i, R, memory, maskl, maskw,endianw);",
- " }",
- "else if (i < 20 || i==34 || i==0xc3)",
- " trap (i, R, memory, maskl, maskw,endianw);",
"else if (!SR_BL) {",
- " /* FIXME: TRA = (imm << 2); */",
" SSR = GET_SR();",
" SPC = PH2T (PC + 2);",
" SET_SR (GET_SR() | SR_MASK_MD | SR_MASK_BL | SR_MASK_RB);",
" /* FIXME: EXPEVT = 0x00000160; */",
- " SET_NIP (PT2H (VBR + 0x00000100));",
- "}",
#endif
+ " SET_NIP (PT2H (RLAT (VBR + (imm<<2))));",
+ "}",
},
{ "", "mn", "tst <REG_M>,<REG_N>", "0010nnnnmmmm1000",
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index 2f5d1d3..8c2f359 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -954,12 +954,14 @@ strnswap (str, len)
while (start < end);
}
-/* Simulate a monitor trap, put the result into r0 and errno into r1 */
+/* Simulate a monitor trap, put the result into r0 and errno into r1
+ return offset by which to adjust pc. */
-static void
-trap (i, regs, memory, maskl, maskw, endianw)
+static int
+trap (i, regs, insn_ptr, memory, maskl, maskw, endianw)
int i;
int *regs;
+ unsigned char *insn_ptr;
unsigned char *memory;
{
switch (i)
@@ -971,6 +973,13 @@ trap (i, regs, memory, maskl, maskw, endianw)
raise_exception (SIGQUIT);
break;
case 3: /* FIXME: for backwards compat, should be removed */
+ case 33:
+ {
+ unsigned int countp = * (unsigned int *) (insn_ptr + 4);
+
+ WLAT (countp, RLAT (countp) + 1);
+ return 6;
+ }
case 34:
{
extern int errno;
@@ -1154,9 +1163,11 @@ trap (i, regs, memory, maskl, maskw, endianw)
case 0xc3:
case 255:
raise_exception (SIGTRAP);
+ if (i == 0xc3)
+ return -2;
break;
}
-
+ return 0;
}
void