]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Merge from mainline.
authorDaniel Jacobowitz <drow@false.org>
Mon, 28 Oct 2002 18:45:58 +0000 (18:45 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 28 Oct 2002 18:45:58 +0000 (18:45 +0000)
67 files changed:
bfd/ChangeLog
bfd/aoutx.h
bfd/archive.c
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/bfd.c
bfd/binary.c
bfd/coffgen.c
bfd/cofflink.c
bfd/config.bfd
bfd/dwarf2.c
bfd/elf32-i386.c
bfd/elf32-i386qnx.c
bfd/elf32-sh.c
bfd/elf32-sparc.c
bfd/elf32-vax.c
bfd/elf64-alpha.c
bfd/elf64-sparc.c
bfd/elflink.h
bfd/elfxx-mips.c
bfd/format.c
bfd/gen-aout.c
bfd/libbfd.c
bfd/libcoff.h
bfd/linker.c
bfd/merge.c
bfd/reloc.c
bfd/section.c
bfd/srec.c
bfd/stabs.c
bfd/syms.c
bfd/targets.c
binutils/ChangeLog
binutils/bucomm.c
binutils/readelf.c
gas/ChangeLog
gas/config/tc-m68k.c
gas/config/tc-mips.c
gas/config/tc-sh.c
gas/doc/gasp.texi
gas/testsuite/ChangeLog
gas/testsuite/gas/mips/mips.exp
include/ChangeLog
include/ansidecl.h
ld/ChangeLog
ld/configure.tgt
ld/emulparams/elf32ppc.sh
ld/emulparams/elf64_s390.sh
ld/emulparams/elf64_sparc.sh
ld/emulparams/elf_x86_64.sh
ld/emultempl/elf32.em
ld/ldfile.c
ld/ldlang.c
ld/ldlang.h
ld/pe-dll.c
ld/scripttempl/elfd30v.sc
ld/scripttempl/elfm68hc11.sc
ld/scripttempl/elfm68hc12.sc
ld/scripttempl/pe.sc
ld/testsuite/ChangeLog
ld/testsuite/ld-elfvers/vers21.c
ld/testsuite/ld-i386/i386.exp
libiberty/ChangeLog
libiberty/config.table
opcodes/ChangeLog
opcodes/po/de.po
opcodes/sparc-opc.c

index b1249502bf922c9acd9b489dc8e91dce1b560fee..03d647c319c580753e726a1156eb3c3d1cbcc413 100644 (file)
@@ -1,3 +1,144 @@
+2002-10-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       Merge from mainline:
+       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.
+       * 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-21  Alan Modra  <amodra@bigpond.net.au>
+       * targets.c (bfd_target_list): Don't return the default target twice.
+
+       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-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>
+       * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
+       loaded with --just-symbols.
+
+       * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
+
+       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-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-07  Mark Elbrecht  <snowball3@softhome.net>
+       * cofflink.c (mark_relocs): Don't mark relocations in excluded
+       sections.
+
+       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.
+       (sh_elf_link_hash_newfunc): Initialize it.
+       (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
+       to got.refcount for symbols that are forced local or when
+       we have direct got refs.
+       (sh_elf_gc_sweep_hook): Adjust gotplt_refcount.  Use it
+       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
+       movl foo@indntpoff, %eax IE->LE transition.
+
+       2002-09-28  Jason Thorpe  <thorpej@wasabisystems.com>
+       * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
+       .got sections.
+
+       2002-09-27  Matt Thomas  <matt@3am-software.com>
+       * elf32-vax.c (elf_vax_check_relocs): Remove unused
+       local_got_refcounts usage.  Remove allocation of got slot.
+       (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
+       Remove de-allocation of got slot.
+       (elf_vax_size_dynamic_section): Fix some indentation.  Add hash
+       traversal for elf_vax_instantiate_got_entries.  Allow empty .got
+       sections to be GC'ed.
+       (elf_vax_instantiate_got_entries): New function.
+       (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling.  Remove
+       tests that are now handled by elf_vax_instantiate_got_entries.
+       Assert GOT entry falls within .got section size.  Remove redundant
+       comparisions.  Fix comments.
+
+       2002-09-24  Jakub Jelinek  <jakub@redhat.com>
+       * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
+       addend into r_addend, not *r_offset.
+       (elf32_sparc_finish_dynamic_symbol): Likewise.
+       * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
+       R_SPARC_RELATIVE's r_offset.
+
+       2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+       * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
+       mismatch.
+
 2002-10-14  Richard Henderson  <rth@redhat.com>
 
        * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
index 83e9732a1543c4d6003e63454096c78b4d902c6c..70359d658ed972913f4a199f2f0236e6ce3ee739 100644 (file)
@@ -2259,8 +2259,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)
@@ -2268,8 +2268,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)
@@ -2281,9 +2281,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)
@@ -2318,8 +2318,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));
@@ -2331,8 +2331,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));
@@ -3863,7 +3863,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;
        }
     }
 
@@ -4412,7 +4412,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;
@@ -4426,13 +4426,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)
                    {
@@ -4457,7 +4457,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)
@@ -4485,7 +4485,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;
@@ -4495,7 +4495,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)
                            {
@@ -4504,7 +4504,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;
@@ -4859,8 +4859,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));
@@ -4872,8 +4872,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));
@@ -5195,8 +5195,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)
@@ -5204,8 +5204,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)
@@ -5221,16 +5221,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];
@@ -5398,9 +5398,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;
@@ -5482,9 +5482,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;
 
@@ -5498,7 +5498,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,
@@ -5527,9 +5527,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
@@ -5645,7 +5645,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;
index d7ac214c7246bf179916d3fce8811d0b065fc5e4..b051e2aaa339470df97aaf7b6cfe4f7ca05a7f12 100644 (file)
@@ -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)
index 807a4408b9fb9bdf5155ebac528b2c2e1e9ef515..f0f8cfd2a81afbd8a002b5c8ef51c7694d32409a 100644 (file)
@@ -346,7 +346,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)
 
index bad428138f96eda82695d1afb438dfe85e9138c3..5589f8551e8e25987c820d0616c242b89e12874c 100644 (file)
@@ -352,7 +352,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)
 
index cfd77726a3edcb806420e028c31c96b96f7eb779..8037b12491ee050f46f27fa40133ab1e2052516d 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1293,10 +1293,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 *));
index fc972b22d133ac80200379656f31fa29d9f3565b..7bddabf5fa818c6f5df8bb75fdc3aba88bc9b78c 100644 (file)
@@ -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;
index ee6c8fce5451efd58833787efa8eb9b017bdc761..21589c6945a9d8cc22e22399c87edb0930e2ae15 100644 (file)
@@ -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
index eb9388fc71ed5d4ad35adc687968317573715ce7..c1302ee878a28d0dc9dfbe6845ee04c47815a1c1 100644 (file)
@@ -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
index 184bbef9a2ec9ef17683790a619c5fe83012e85c..0e26ae3588b62ef9e3201f380e08c5681d6f2327 100644 (file)
@@ -888,10 +888,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
 
@@ -925,9 +927,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
index 5aadaddf2b138569643dbf03c482f6bb762b0844..063982662bc7582bf1379e37cab654c6e06741d8 100644 (file)
@@ -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;
 
@@ -1133,12 +1207,11 @@ decode_line_info (unit, stash)
                  end_sequence = 1;
                  add_line_info (table, address, filename, line, column,
                                 end_sequence);
-                 arange_add (unit, low_pc, high_pc);
                  if (low_pc == 0 || address < low_pc)
                    low_pc = address;
                  if (address > high_pc)
                    high_pc = address;
-                 arange_add (unit, low_pc, address);
+                 arange_add (unit, low_pc, high_pc);
                  break;
                case DW_LNE_set_address:
                  address = read_address (unit, line_ptr);
@@ -1250,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
@@ -1279,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;
@@ -1646,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
@@ -1702,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;
@@ -1715,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
@@ -1822,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.  */
@@ -1918,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;
 
index d52d5a7db4d920cd38b5735cbdcbbe7748d52d8e..9fd9f502c141ed9310d7e09a4094a08a419c1500 100644 (file)
@@ -2616,36 +2616,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 - 2);
-                   }
-                 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);
+                     bfd_put_8 (output_bfd, 0xb8, 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;
index 5f2e1113f4c295fae598b88dfa1bc09867621a0e..9894f3759ae4dc9e7b1bf8583a4aecca54ebb1b7 100644 (file)
@@ -102,7 +102,9 @@ elf_i386qnx_set_nonloadable_filepos (abfd, phdrs)
 }
 
 #undef  TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM                  bfd_elf32_i386qnx_vec
+#define TARGET_LITTLE_SYM              bfd_elf32_i386qnx_vec
+#undef  TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME             "elf32-i386-nto"
 
 #define elf_backend_set_nonloadable_filepos elf_i386qnx_set_nonloadable_filepos
 #define elf_backend_is_contained_by_filepos elf_i386qnx_is_contained_by_filepos
index ed426b9e1f64e8a7bb9466adb99a8a8dea97fc4d..841c42a687f49bce75646969f9a6eb5f4d66e07a 100644 (file)
@@ -3388,6 +3388,8 @@ struct elf_sh_link_hash_entry
 
   /* Track dynamic relocs copied for this symbol.  */
   struct elf_sh_dyn_relocs *dyn_relocs;
+
+  bfd_signed_vma gotplt_refcount;
 };
 
 /* sh ELF linker hash table.  */
@@ -3452,6 +3454,7 @@ sh_elf_link_hash_newfunc (entry, table, string)
 
       eh = (struct elf_sh_link_hash_entry *) ret;
       eh->dyn_relocs = NULL;
+      eh->gotplt_refcount = 0;
 #ifdef INCLUDE_SHMEDIA
       ret->datalabel_got_offset = (bfd_vma) -1;
 #endif
@@ -3870,6 +3873,18 @@ allocate_dynrelocs (h, inf)
   info = (struct bfd_link_info *) inf;
   htab = sh_elf_hash_table (info);
 
+  eh = (struct elf_sh_link_hash_entry *) h;
+  if ((h->got.refcount > 0
+      || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
+      && eh->gotplt_refcount > 0)
+    {
+      /* The symbol has been forced local, or we have some direct got refs,
+         so treat all the gotplt refs as got refs. */
+      h->got.refcount += eh->gotplt_refcount;
+      if (h->plt.refcount >= eh->gotplt_refcount)
+       h->plt.refcount -= eh->gotplt_refcount;
+    }
+
   if (htab->root.dynamic_sections_created
       && h->plt.refcount > 0)
     {
@@ -3964,7 +3979,6 @@ allocate_dynrelocs (h, inf)
   else
     h->got.offset = (bfd_vma) -1;
 
-  eh = (struct elf_sh_link_hash_entry *) h;
   if (eh->dyn_relocs == NULL)
     return true;
 
@@ -5198,6 +5212,7 @@ sh_elf_gc_sweep_hook (abfd, info, sec, relocs)
   const Elf_Internal_Rela *rel, *relend;
   unsigned long r_symndx;
   struct elf_link_hash_entry *h;
+  struct elf_sh_link_hash_entry *eh;
 
   elf_section_data (sec)->local_dynrel = NULL;
 
@@ -5300,10 +5315,15 @@ sh_elf_gc_sweep_hook (abfd, info, sec, relocs)
        if (r_symndx >= symtab_hdr->sh_info)
          {
            h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-           if (h->got.refcount > 0)
+           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;
-           if (h->plt.refcount > 0)
-             h->plt.refcount -= 1;
          }
        else if (local_got_refcounts != NULL)
          {
@@ -5363,6 +5383,8 @@ sh_elf_copy_indirect_symbol (bed, dir, ind)
       edir->dyn_relocs = eind->dyn_relocs;
       eind->dyn_relocs = NULL;
     }
+  edir->gotplt_refcount = eind->gotplt_refcount;
+  eind->gotplt_refcount = 0;
 
   _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
@@ -5537,6 +5559,7 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
 
          h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
          h->plt.refcount += 1;
+         ((struct elf_sh_link_hash_entry *) h)->gotplt_refcount += 1;
 
          break;
 
index 38200dc04bff6371e880a23fcb1c748e53ac7eac..b6cf7ebb579da6ce875a167ce46f0dfc3d2445e6 100644 (file)
@@ -1298,7 +1298,6 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
                off &= ~1;
              else
                {
-                 bfd_put_32 (output_bfd, relocation, sgot->contents + off);
 
                  if (info->shared)
                    {
@@ -1314,7 +1313,8 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
                                         + sgot->output_offset
                                         + off);
                      outrel.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
-                     outrel.r_addend = 0;
+                     outrel.r_addend = relocation;
+                     relocation = 0;
                      bfd_elf32_swap_reloca_out (output_bfd, &outrel,
                                                 (((Elf32_External_Rela *)
                                                   srelgot->contents)
@@ -1322,6 +1322,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
                      ++srelgot->reloc_count;
                    }
 
+                 bfd_put_32 (output_bfd, relocation, sgot->contents + off);
                  local_got_offsets[r_symndx] |= 1;
                }
            }
@@ -1827,14 +1828,21 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
       if (info->shared
          && (info->symbolic || h->dynindx == -1)
          && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
-       rela.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
+       {
+         asection *sec = h->root.u.def.section;
+         rela.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
+         rela.r_addend = (h->root.u.def.value
+                          + sec->output_section->vma
+                          + sec->output_offset);
+       }
       else
        {
-         bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
          rela.r_info = ELF32_R_INFO (h->dynindx, R_SPARC_GLOB_DAT);
+         rela.r_addend = 0;
        }
 
-      rela.r_addend = 0;
+      bfd_put_32 (output_bfd, (bfd_vma) 0,
+                 sgot->contents + (h->got.offset &~ (bfd_vma) 1));
       bfd_elf32_swap_reloca_out (output_bfd, &rela,
                                 ((Elf32_External_Rela *) srela->contents
                                  + srela->reloc_count));
index e7145f12221c51f1c5281cd22f2ed907461ad3ba..0ff087449df0aa8dcf42c6550218c6d1d2930f9e 100644 (file)
@@ -419,6 +419,11 @@ struct elf_vax_link_hash_table
 static boolean elf_vax_discard_copies
   PARAMS ((struct elf_vax_link_hash_entry *, PTR));
 
+/* Declare this now that the above structures are defined.  */
+
+static boolean elf_vax_instantiate_got_entries
+  PARAMS ((struct elf_link_hash_entry *, PTR));
+
 /* Traverse an VAX ELF linker hash table.  */
 
 #define elf_vax_link_hash_traverse(table, func, info)                  \
@@ -569,7 +574,6 @@ elf_vax_check_relocs (abfd, info, sec, relocs)
   bfd *dynobj;
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
-  bfd_signed_vma *local_got_refcounts;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
   asection *sgot;
@@ -582,7 +586,6 @@ elf_vax_check_relocs (abfd, info, sec, relocs)
   dynobj = elf_hash_table (info)->dynobj;
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  local_got_refcounts = elf_local_got_refcounts (abfd);
 
   sgot = NULL;
   srelgot = NULL;
@@ -653,18 +656,6 @@ elf_vax_check_relocs (abfd, info, sec, relocs)
                {
                  h->got.refcount = 1;
                  eh->got_addend = rel->r_addend;
-
-                 /* Make sure this symbol is output as a dynamic symbol.  */
-                 if (h->dynindx == -1)
-                   {
-                     if (!bfd_elf32_link_record_dynamic_symbol (info, h))
-                       return false;
-                   }
-
-                 /* Allocate space in the .got section.  */
-                 sgot->_raw_size += 4;
-                 /* Allocate relocation space.  */
-                 srelgot->_raw_size += sizeof (Elf32_External_Rela);
                }
              else
                {
@@ -902,25 +893,18 @@ elf_vax_gc_sweep_hook (abfd, info, sec, relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
-  bfd_signed_vma *local_got_refcounts;
   const Elf_Internal_Rela *rel, *relend;
   unsigned long r_symndx;
   struct elf_link_hash_entry *h;
   bfd *dynobj;
-  asection *sgot;
-  asection *srelgot;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (abfd);
-  local_got_refcounts = elf_local_got_refcounts (abfd);
 
   dynobj = elf_hash_table (info)->dynobj;
   if (dynobj == NULL)
     return true;
 
-  sgot = bfd_get_section_by_name (dynobj, ".got");
-  srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
-
   relend = relocs + sec->reloc_count;
   for (rel = relocs; rel < relend; rel++)
     {
@@ -932,29 +916,7 @@ elf_vax_gc_sweep_hook (abfd, info, sec, relocs)
            {
              h = sym_hashes[r_symndx - symtab_hdr->sh_info];
              if (h->got.refcount > 0)
-               {
-                 --h->got.refcount;
-                 if (h->got.refcount == 0)
-                   {
-                     /* We don't need the .got entry any more.  */
-                     sgot->_raw_size -= 4;
-                     srelgot->_raw_size -= sizeof (Elf32_External_Rela);
-                   }
-               }
-           }
-         else if (local_got_refcounts != NULL)
-           {
-             if (local_got_refcounts[r_symndx] > 0)
-               {
-                 --local_got_refcounts[r_symndx];
-                 if (local_got_refcounts[r_symndx] == 0)
-                   {
-                     /* We don't need the .got entry any more.  */
-                     sgot->_raw_size -= 4;
-                     if (info->shared)
-                       srelgot->_raw_size -= sizeof (Elf32_External_Rela);
-                   }
-               }
+               --h->got.refcount;
            }
          break;
 
@@ -1221,8 +1183,15 @@ elf_vax_size_dynamic_sections (output_bfd, info)
      fill them in in the relocate_section routine.  */
   if (info->shared && info->symbolic)
     elf_vax_link_hash_traverse (elf_vax_hash_table (info),
-                                elf_vax_discard_copies,
-                                (PTR) NULL);
+                               elf_vax_discard_copies,
+                               (PTR) NULL);
+
+  /* If this is a -Bsymbolic shared link or a static link, we need to 
+     discard all the got entries we've recorded.  Otherwise, we need to
+     instantiate (allocate space for them).  */
+  elf_link_hash_traverse (elf_hash_table (info),
+                         elf_vax_instantiate_got_entries,
+                         (PTR) info);
 
   /* The check_relocs and adjust_dynamic_symbol entry points have
      determined the sizes of the various dynamic sections.  Allocate
@@ -1392,6 +1361,60 @@ elf_vax_discard_copies (h, ignore)
   return true;
 }
 
+/* This function is called via elf_link_hash_traverse.  It looks for entries
+   that have GOT or PLT (.GOT) references.  If creating a static object or a
+   shared object with -Bsymbolic, it resets the reference count back to 0
+   and sets the offset to -1 so normal PC32 relocation will be done.  If
+   creating a shared object or executable, space in the .got and .rela.got
+   will be reserved for the symbol.  */
+
+/*ARGSUSED*/
+static boolean
+elf_vax_instantiate_got_entries (h, infoptr)
+     struct elf_link_hash_entry *h;
+     PTR infoptr;
+{
+  struct bfd_link_info *info = (struct bfd_link_info *) infoptr;
+  bfd *dynobj;
+  asection *sgot;
+  asection *srelgot;
+  
+  /* We don't care about non-GOT (and non-PLT) entries.  */
+  if (h->got.refcount <= 0 && h->plt.refcount <= 0)
+    return true;
+
+  dynobj = elf_hash_table (info)->dynobj;
+  if (dynobj == NULL)
+    return true;
+
+  sgot = bfd_get_section_by_name (dynobj, ".got");
+  srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+
+  if (!elf_hash_table (info)->dynamic_sections_created
+      || (info->shared && info->symbolic))
+    {
+      h->got.refcount = 0;
+      h->got.offset = (bfd_vma) -1;
+      h->plt.refcount = 0;
+      h->plt.offset = (bfd_vma) -1;
+    }
+  else if (h->got.refcount > 0)
+    {
+      /* Make sure this symbol is output as a dynamic symbol.  */
+      if (h->dynindx == -1)
+       {
+         if (!bfd_elf32_link_record_dynamic_symbol (info, h))
+           return false;
+       }
+
+      /* Allocate space in the .got and .rela.got sections.  */
+      sgot->_raw_size += 4;
+      srelgot->_raw_size += sizeof (Elf32_External_Rela);
+    }
+
+  return true;
+}
+
 /* Relocate an VAX ELF section.  */
 
 static boolean
@@ -1556,8 +1579,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
        case R_VAX_GOT32:
          /* Relocation is to the address of the entry for this symbol
             in the global offset table.  */
-         if (h != NULL
-             && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+         if (h == NULL || h->got.offset == (bfd_vma) -1)
            break;
 
          /* Relocation is the offset of the entry for this symbol in
@@ -1566,18 +1588,6 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
          {
            bfd_vma off;
 
-           if (!elf_hash_table (info)->dynamic_sections_created
-               || (h == NULL)
-               || (info->shared
-                && info->symbolic
-                && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
-             {
-               /* This is actually a static link, or it is a -Bsymbolic link
-                  and the symbol is defined locally or there is no symbol.
-                  Change the GOT32 entry to a PC32 entry.  */
-               break;
-             }
-
            if (sgot == NULL)
              {
                sgot = bfd_get_section_by_name (dynobj, ".got");
@@ -1587,6 +1597,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
            BFD_ASSERT (h != NULL);
            off = h->got.offset;
            BFD_ASSERT (off != (bfd_vma) -1);
+           BFD_ASSERT (off < sgot->_raw_size);
 
            if (info->shared
                && h->dynindx == -1
@@ -1615,15 +1626,12 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
              }
 
            relocation = sgot->output_offset + off;
-           /* Neither GOT relocation uses the addend.  */
+           /* The GOT relocation uses the addend.  */
            rel->r_addend = 0;
 
-           if (r_type == R_VAX_GOT32)
-             {
-               /* Change the reference to be indirect */
-               contents[rel->r_offset - 1] |= 0x10;
-               relocation += sgot->output_section->vma;
-             }
+           /* Change the reference to be indirect.  */
+           contents[rel->r_offset - 1] |= 0x10;
+           relocation += sgot->output_section->vma;
          }
          break;
 
@@ -1847,11 +1855,11 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
          break;
        }
 
-      /* VAX PCREL relocations are from the end of relocation, not the start */
+      /* VAX PCREL relocations are from the end of relocation, not the start.  
+         So subtract the difference from the relocation amount since we can't
+         add it to the offset.  */
       if (howto->pc_relative && howto->pcrel_offset)
-       {
-         relocation -= bfd_get_reloc_size(howto);
-       }
+       relocation -= bfd_get_reloc_size(howto);
 
       r = _bfd_final_link_relocate (howto, input_bfd, input_section,
                                    contents, rel->r_offset,
index 1058a1c269ec2085bab49ab2ed82b082faad23a9..7397ed1b814cb7a211d47a79689f6fc3f848ccf3 100644 (file)
@@ -3100,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;
 
index def93c41fe093f249c495a8f11ab84acd875c9f5..920b481bf8035b4e4d3f9d3f15f00acf8370b812 100644 (file)
@@ -2744,11 +2744,12 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
        }
       else
        {
-         bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
          rela.r_info = ELF64_R_INFO (h->dynindx, R_SPARC_GLOB_DAT);
          rela.r_addend = 0;
        }
 
+      bfd_put_64 (output_bfd, (bfd_vma) 0,
+                 sgot->contents + (h->got.offset &~ (bfd_vma) 1));
       bfd_elf64_swap_reloca_out (output_bfd, &rela,
                                 ((Elf64_External_Rela *) srela->contents
                                  + srela->reloc_count));
index cf5aff6e522b2b7c9e0860f1a31d26a9c55e42ce..fd1c563d0086b751c6131b38c5f852786807c207 100644 (file)
@@ -1298,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.
@@ -1327,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)
@@ -1345,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;
@@ -1390,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);
@@ -1410,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)
@@ -1442,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
index 88c59885abec590e3d0ecf4b01900f57b4769ab1..043c11bbb46115fc037648b7cd20cf31e99d0f99 100644 (file)
@@ -2937,7 +2937,12 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
 
       /* The relocation is always an REL32 relocation because we don't
         know where the shared library will wind up at load-time.  */
-      outrel[0].r_info = ELF_R_INFO (output_bfd, indx, R_MIPS_REL32);
+      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,
+                                    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.  */
index 1efa9e24547ef4a276f58ad3cf1ed69936c183df..ef6b46edfb81639321544fe7180eee3c9b8f17f8 100644 (file)
@@ -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;
index 1bba14adb5bc3578843892adaa164aaabaf00390..b6720e87dc97c1ad497bf51c5d7927cf712fbcc0 100644 (file)
@@ -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;
index 29170a0d561da230cc973c43db78522caf196ae9..f21abbcd6ce9e86eef7ee6aaa098a4ef7d5458c8 100644 (file)
@@ -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
index 88b0909829610e5f4db50973d8ec3736d8939c2b..ea9c5700b1fc8250da9d73239b4ae0ebbb4dffff 100644 (file)
@@ -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 *));
 
index e44ac6c6c9d79e3246749a30c390f307cb3a219e..a5ded1f58836befe5af09bee5796db6b369aafc8 100644 (file)
@@ -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;
     }
@@ -2019,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)
index ce61207251f36b6a961f8e68ba91c94f540c5758..9dc2e7083443eb7b5731c5a9447abf6bb627956c 100644 (file)
@@ -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++)
        {
index 59f7819d635cf9bcf812d610eafdb551b612158a..01ff516da59921051797728585100a73d8f24515 100644 (file)
@@ -3574,7 +3574,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];
 }
@@ -3702,7 +3702,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,
index 51b21c70fbbf2f65b4bfce57889621f50324b7b8..b5871e9bbfa78265b5461deb338f751441a6d3bc 100644 (file)
@@ -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,
index 129b2ba4bb53cbbcf987e81a4943414f1143c485..6c29fa16881893cf4d92049dea95b87b53f77959 100644 (file)
@@ -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;
index e225d9cd60d7ef70a82cfd701ca0992161cd6fe7..0cb37412983d3d53a8a759f6de545f1359bd9727 100644 (file)
@@ -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)
index 8a8abf45387bc4f90ee8fb44127a423c6b3f351d..da71d80b7b7d6b49fa0f3628e594f2f7888107a1 100644 (file)
@@ -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');
 }
 
 /*
@@ -1069,7 +1069,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)
@@ -1083,12 +1083,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;
@@ -1157,7 +1157,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;
                    }
index d41edf64668d16efb873f29d95eb4a9a4c58dd3c..3042b5a63499859b9c7d7a32757d64f401bfb316 100644 (file)
@@ -1249,7 +1249,9 @@ bfd_target_list ()
     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;
 
   return name_list;
 }
index 110f3ab3e2d0494acb8adc3e1240ebc18d53449a..8cedab7d0959c30dd2a869bf2c41d4149aa36d28 100644 (file)
@@ -1,3 +1,15 @@
+2002-10-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       Merge from mainline:
+       2002-10-21  Alan Modra  <amodra@bigpond.net.au>
+       * bucomm.c (list_supported_targets): Use bfd_target_list.
+
+       2002-10-09  Daniel Jacobowitz  <drow@mvista.com>
+       * readelf.c (display_debug_info): Ignore empty .rela.debug_info
+       sections.  Allow relocations against the absolute symbol.  Don't
+       use the value in compunit.cu_abbrev_offset if we found a RELA
+       relocation.
+
 2002-10-21  Svein E. Seldal  <Svein.Seldal@solidas.com>
 
        * objdump.c (dump_data): Correct addr_offset for opb != 1.
index 35112fc71661ae6973d6d75d22a7a629c238c53b..7ffcabaf9467e291396097f8b7b5b384b612d3ef 100644 (file)
@@ -128,16 +128,18 @@ list_supported_targets (name, f)
      const char *name;
      FILE *f;
 {
-  extern const bfd_target *const *bfd_target_vector;
   int t;
+  const char **targ_names = bfd_target_list ();
 
   if (name == NULL)
     fprintf (f, _("Supported targets:"));
   else
     fprintf (f, _("%s: supported targets:"), name);
-  for (t = 0; bfd_target_vector[t] != NULL; t++)
-    fprintf (f, " %s", bfd_target_vector[t]->name);
+
+  for (t = 0; targ_names[t] != NULL; t++)
+    fprintf (f, " %s", targ_names[t]);
   fprintf (f, "\n");
+  free (targ_names);
 }
 
 /* List the supported architectures.  */
index e053cbaecb1328557d3bfddf9b9441d1aaf565fa..d39703291eb4fe10d4c134f63455bca9f38d8d5b 100644 (file)
@@ -7949,7 +7949,8 @@ display_debug_info (section, start, file)
          Elf_Internal_Sym *sym;
 
          if (relsec->sh_type != SHT_RELA
-             || SECTION_HEADER (relsec->sh_info) != section)
+             || SECTION_HEADER (relsec->sh_info) != section
+             || relsec->sh_size == 0)
            continue;
 
          if (!slurp_rela_relocs (file, relsec->sh_offset, relsec->sh_size,
@@ -7970,7 +7971,8 @@ display_debug_info (section, start, file)
                {
                  sym = symtab + ELF32_R_SYM (rp->r_info);
 
-                 if (ELF32_ST_TYPE (sym->st_info) != STT_SECTION)
+                 if (ELF32_R_SYM (rp->r_info) != 0
+                     && ELF32_ST_TYPE (sym->st_info) != STT_SECTION)
                    {
                      warn (_("Skipping unexpected symbol type %u\n"),
                            ELF32_ST_TYPE (sym->st_info));
@@ -7981,7 +7983,8 @@ display_debug_info (section, start, file)
                {
                  sym = symtab + ELF64_R_SYM (rp->r_info);
 
-                 if (ELF64_ST_TYPE (sym->st_info) != STT_SECTION)
+                 if (ELF64_R_SYM (rp->r_info) != 0
+                     && ELF64_ST_TYPE (sym->st_info) != STT_SECTION)
                    {
                      warn (_("Skipping unexpected symbol type %u\n"),
                            ELF64_ST_TYPE (sym->st_info));
@@ -7989,7 +7992,7 @@ display_debug_info (section, start, file)
                    }
                }
 
-             compunit.cu_abbrev_offset += rp->r_addend;
+             compunit.cu_abbrev_offset = rp->r_addend;
              break;
            }
 
index 7a662d8a5f5526ad5e3acae62621f62a84a9ebcf..e15df7a9150728a8c0a6c631b7b112ffda74f753 100644 (file)
@@ -1,3 +1,23 @@
+2002-08-24  Andreas Schwab  <schwab@suse.de>
+
+       * config/tc-m68k.c (tc_m68k_fix_adjustable): Don't adjust symbols
+       in merge sections.
+
+2002-10-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       * doc/gasp.texi: Fix typo in last typo fix.
+
+2002-10-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       Merge from mainline:
+       2002-10-21  Richard Sandiford  <rsandifo@redhat.com>
+       * config/tc-mips.c (mips_need_elf_addend_fixup): Return true
+       for relocs against symbols in a merged section.
+
+       Thu Oct 10 14:31:30 2002  J"orn Rennecke <joern.rennecke@superh.com>
+       * config/tc-sh.c (assemble_ppi): Initialize reg_x / reg_y / reg_n
+       inside loop.
+
 2002-10-17  Johannes Stezenbach  <js@convergence.de>
 
        * itbl-parse.y (entry): Provide empty action.
index 111fab732feb482ed25af22c50aab4895de558c6..a98f52645380813cda62420184aa0828ca146f29 100644 (file)
@@ -848,6 +848,10 @@ tc_m68k_fix_adjustable (fixP)
   if (! relaxable_symbol (fixP->fx_addsy))
     return 0;
 
+  /* Don't adjust symbols in merge sections.  */
+  if ((S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0)
+    return 0;
+
   /* adjust_reloc_syms doesn't know about the GOT */
   switch (fixP->fx_r_type)
     {
index 4b5858456a79a1134a31c632bbc45c5bfbbce0a6..34a44b8933e6850c7bf86cec59219289e1a902ad 100644 (file)
@@ -10954,7 +10954,7 @@ mips_need_elf_addend_fixup (fixP)
   if (symbol_used_in_reloc_p (fixP->fx_addsy)
       && (((bfd_get_section_flags (stdoutput,
                                   S_GET_SEGMENT (fixP->fx_addsy))
-           & SEC_LINK_ONCE) != 0)
+           & (SEC_LINK_ONCE | SEC_MERGE)) != 0)
          || !strncmp (segment_name (S_GET_SEGMENT (fixP->fx_addsy)),
                       ".gnu.linkonce",
                       sizeof (".gnu.linkonce") - 1)))
index 3faa94cdfeef5f77b0bd884b906eb45c6bad3716..1361cb8d5155d7501a91490a43b38fcc296e808f 100644 (file)
@@ -2122,16 +2122,16 @@ assemble_ppi (op_end, opcode)
   int move_code;
   unsigned int size;
 
-  /* Some insn ignore one or more register fields, e.g. psts machl,a0.
-     Make sure we encode a defined insn pattern.  */
-  reg_x = 0;
-  reg_y = 0;
-  reg_n = 0;
-
   for (;;)
     {
       sh_operand_info operand[3];
 
+      /* Some insn ignore one or more register fields, e.g. psts machl,a0.
+        Make sure we encode a defined insn pattern.  */
+      reg_x = 0;
+      reg_y = 0;
+      reg_n = 0;
+
       if (opcode->arg[0] != A_END)
        op_end = get_operands (opcode, op_end, operand);
       opcode = get_specific (opcode, operand);
index fe48742be61de86abb77c7534ed973ff786069f6..889e997105ce9e6cbaa5f5b37c187786624a2118 100644 (file)
@@ -110,7 +110,7 @@ output.
 
 @emph{Note} The use of @sc{gasp} has now been deprecated.  Anything
 that it could do can now be done by the macro facilities built into
-@sc{gas} itself.  At some point in the future the sc@{gasp} sources will
+@sc{gas} itself.  At some point in the future the @sc{gasp} sources will
 be removed entirely from the binutils distribution.
 
 Here is a small example to give the flavor of @sc{gasp}.  This input to
index a510cfe968f13dc255306f36afcc1a59c8eb31c9..8cf3abeb8535a002d1d0b5707f9d42125650e426 100644 (file)
@@ -1,3 +1,10 @@
+2002-10-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       Merge from mainline:
+       2002-10-21  Richard Sandiford  <rsandifo@redhat.com>
+       * gas/mips/elf-rel7.[sd]: New test.
+       * gas/mips/mips.exp: Run it.
+
 2002-09-23  Daniel Jacobowitz  <drow@mvista.com>
 
        Merge from mainline:
index 8e415ef6ed52ef75b87f5c02b229d9956a3462d2..26c4f40315d3f4ec0efd814e704d8daee009fef7 100644 (file)
@@ -207,6 +207,7 @@ if { [istarget mips*-*-*] } then {
        }
        run_dump_test "elf-rel5"
        run_dump_test "elf-rel6"
+       run_dump_test "elf-rel7"
        run_dump_test "${tmips}${el}empic"
        run_dump_test "empic2"
        run_dump_test "empic3_e"
index 786e08bcd07729198695cc59de72b8ee2ca57341..2353d992112d085a680de53d5ec6fb7d718e174d 100644 (file)
@@ -1,3 +1,11 @@
+2002-10-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       Merge from mainline:
+       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-09-23  Daniel Jacobowitz  <drow@mvista.com>
 
        Merge from mainline:
index 9a7c5777ff2ece9641045ce4a6b6b90e93b3b3c7..d169b4f50ed6c8d7b0e17e2b94888c67461e9750 100644 (file)
@@ -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 *
index 0689c01e006bedc8b3d6035c2e983de592e223dc..81e45aec6c5de38cd9a1cfa0cb2fcbd5d6a183a9 100644 (file)
@@ -1,3 +1,57 @@
+2002-10-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       Merge from mainline:
+       2002-10-23  Jakub Jelinek  <jakub@redhat.com>
+       * emultempl/elf32.em (place_orphan): Don't put non-allocated .rel*
+       sections into .rel{,a}.dyn.
+
+       2002-10-21  Danny Smith  <dannysmith@users.sourceforeg.net>
+       * scripttempl/pe.sc (__RUNTIME_PSEUDO_RELOC_LIST__,
+       __RUNTIME_PSEUDO_RELOC_LIST_END__): Add only when relocating.
+
+       2002-10-16  Jakub Jelinek  <jakub@redhat.com>
+       * configure.tgt (s390x-*-linux*): Add elf_s390 emulation.
+       (s390-*-linux*): Add elf64_s390 emulation if want64.
+       * emulparams/elf64_sparc.sh (LIB_PATH): Update to match 2002-05-22
+       genscript.sh changes.
+       * emulparams/elf_x86_64.sh (LIB_PATH): Likewise.
+       * emulparams/elf64_s390.sh (LIB_PATH): Set up native 64 bit dirs.
+
+       2002-10-10  Jakub Jelinek  <jakub@redhat.com>
+       * ldfile.c (ldfile_try_open_bfd): When searching skip linker scripts if
+       they have OUTPUT_FORMAT not matching actual output format.
+       * ldlang.c (lang_get_output_target): New function.
+       (open_output): Use it.
+       * ldlang.h (lang_get_output_target): New prototype.
+
+       2002-10-07  Ralf Habacker  <Ralf.Habacker@freenet.de>
+       * pe-dll.cc (autofilter_symbolprefixlist): Don't re-export
+       auto-import symbols.
+       (make_one): Create _nm_<symbol> for data only.
+
+       2002-10-10  Alan Modra  <amodra@bigpond.net.au>
+       * emultempl/elf32.em (output_rel_find): Prefer .rel script sections
+       when orphan is .rel, .rela when orphan is .rela.
+       (gld${EMULATION_NAME}_place_orphan): Handle combreloc .rel* case
+       first.  Remove outsecname var.
+
+       2002-09-30  Alan Modra  <amodra@bigpond.net.au>
+       * scripttempl/elfd30v.sc: Order reloc sections placing .plt last.
+       * scripttempl/elfm68hc11.sc: Likewise.
+       * scripttempl/elfm68hc12.sc: Likewise.
+
+       * emultempl/elf32.em (output_rel_find): Always place orphan loadable
+       reloc sections just before .rel.plt/.rela.plt.
+       (gld${EMULATION_NAME}_place_orphan <.rel>): Remove combreloc code.
+       Only put loadable reloc sections in hold_rel.
+
+       2002-09-29  H.J. Lu <hjl@gnu.org>
+       * emulparams/elf32ppc.sh (OTHER_GOT_RELOC_SECTIONS): New.
+
+       2002-08-27  Egor Duda  <deo@logos-m.ru>
+       * scripttempl/pe.sc: Handle .rdata_runtime_pseudo_reloc sections.
+       Add symbols for application to access them.
+
 2002-10-15  Alan Modra  <amodra@bigpond.net.au>
 
        * ldlang.c (load_symbols): Revert last change.
index c1d7620c8d9aec3489d52df52881f6ff8eff64d2..bcdbb04833fb7f878eec875864ce4ab2dfbba05d 100644 (file)
@@ -491,8 +491,16 @@ fr30-*-*)          targ_emul=elf32fr30 ;;
 mcore-*-pe)            targ_emul=mcorepe ;
                        targ_extra_ofiles="deffilep.o pe-dll.o" ;;
 mcore-*-elf)           targ_emul=elf32mcore ;;
-s390x-*-linux*)         targ_emul=elf64_s390 ;;
-s390-*-linux*)          targ_emul=elf_s390 ;;
+s390x-*-linux*)         targ_emul=elf64_s390
+                       targ_extra_emuls=elf_s390
+                       targ_extra_libpath=$targ_extra_emuls
+                       tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
+s390-*-linux*)          targ_emul=elf_s390
+                       if test "${want64}" = "true"; then
+                         targ_extra_emuls=elf64_s390
+                         targ_extra_libpath=$targ_extra_emuls
+                         tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
+                       fi ;;
 *-*-ieee*)             targ_emul=vanilla ;;
 
 *)
index f88198f631ff54c00b75ecd53012056baf6f0117..778260b55c945643b568bc7d4dc7819922ff33dd 100644 (file)
@@ -17,6 +17,10 @@ OTHER_READWRITE_SECTIONS="
   .got1         ${RELOCATING-0} : { *(.got1) }
   .got2         ${RELOCATING-0} : { *(.got2) }
 "
+OTHER_GOT_RELOC_SECTIONS="
+  .rela.got1         ${RELOCATING-0} : { *(.rela.got1) }
+  .rela.got2         ${RELOCATING-0} : { *(.rela.got2) }
+"
 
 # Treat a host that matches the target with the possible exception of "64"
 # in the name as if it were native.
index 8416c89e11f17f64aa4751579e3b647e1682e08f..236fd1767e757ca4625bc20474972e009177ae51 100644 (file)
@@ -9,3 +9,33 @@ MACHINE=
 NOP=0x07070707
 TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes 
+
+# Treat a host that matches the target with the possible exception of "x"
+# in the name as if it were native.
+if test `echo "$host" | sed -e s/390x/390/` \
+   = `echo "$target" | sed -e s/390x/390/`; then
+  case " $EMULATION_LIBPATH " in
+    *" ${EMULATION_NAME} "*)
+      LIB_PATH=${libdir}
+      for lib in ${NATIVE_LIB_DIRS}; do
+       case :${LIB_PATH}: in
+         *:${lib}:*) ;;
+         *) LIB_PATH=${LIB_PATH}:${lib} ;;
+       esac
+      done
+
+      case "$target" in
+       s390*-linux*)
+         suffix=64 ;;
+      esac
+
+      # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first
+      # on Linux.
+      if [ -n "$suffix" ]; then
+       case "$EMULATION_NAME" in
+         *64*)
+           LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,$suffix:,g`$LIB_PATH ;;
+       esac
+      fi ;;
+  esac
+fi
index a4706b5fe8adea01866c0c28d0038b97a22fdf0d..7a4d2dc9c5d09e7207f7afa99e4003c72af2289a 100644 (file)
@@ -22,36 +22,37 @@ case "$target" in
     ;;
 esac
 
-if [ "x${host}" = "x${target}" ]; then
+# Treat a host that matches the target with the possible exception of "64"
+# and "v7", "v8", "v9" in the name as if it were native.
+if test `echo "$host" | sed -e 's/64//;s/v[789]//'` \
+ = `echo "$target" | sed -e 's/64//;s/v[789]//'`; then
   case " $EMULATION_LIBPATH " in
     *" ${EMULATION_NAME} "*)
-      # Native, and default or emulation requesting LIB_PATH.
+      LIB_PATH=${libdir}
+      for lib in ${NATIVE_LIB_DIRS}; do
+       case :${LIB_PATH}: in
+         *:${lib}:*) ;;
+         *) LIB_PATH=${LIB_PATH}:${lib} ;;
+       esac
+      done
 
       # Linux and Solaris modify the default library search path
       # to first include a 64-bit specific directory.  It's put
       # in slightly different places on the two systems.
       case "$target" in
-        sparc*-linux*)
-          suffix=64 ;;
-        sparc*-solaris*)
-          suffix=/sparcv9 ;;
+       sparc*-linux*)
+         suffix=64 ;;
+       sparc*-solaris*)
+         suffix=/sparcv9 ;;
       esac
 
-      if [ -n "${suffix}" ]; then
-
-       LIB_PATH=/lib${suffix}:/lib
-       LIB_PATH=${LIB_PATH}:/usr/lib${suffix}:/usr/lib
-       if [ -n "${NATIVE_LIB_DIRS}" ]; then
-         LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed s_:_${suffix}:_g`${suffix}:${NATIVE_LIB_DIRS}
-       fi
-       if [ "${libdir}" != /usr/lib ]; then
-         LIB_PATH=${LIB_PATH}:${libdir}${suffix}:${libdir}
-       fi
-       if [ "${libdir}" != /usr/local/lib ]; then
-         LIB_PATH=${LIB_PATH}:/usr/local/lib${suffix}:/usr/local/lib
-       fi
-
-      fi
-    ;;
+      # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first
+      # on Linux and /lib/sparcv9, /usr/lib/sparcv9 etc. on Solaris.
+      if [ -n "$suffix" ]; then
+       case "$EMULATION_NAME" in
+         *64*)
+           LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,$suffix:,g`$LIB_PATH ;;
+       esac
+      fi ;;
   esac
 fi
index 1786e339467a5e5fd8d358e6e8a9aba801d5649c..a428bfc123ca6193a6a693163d00768ca20ef357 100644 (file)
@@ -15,30 +15,27 @@ NO_SMALL_DATA=yes
 if [ "x${host}" = "x${target}" ]; then
   case " $EMULATION_LIBPATH " in
     *" ${EMULATION_NAME} "*)
-      # Native, and default or emulation requesting LIB_PATH.
+      LIB_PATH=${libdir}
+      for lib in ${NATIVE_LIB_DIRS}; do
+       case :${LIB_PATH}: in
+         *:${lib}:*) ;;
+         *) LIB_PATH=${LIB_PATH}:${lib} ;;
+       esac
+      done
 
       # Linux modify the default library search path to first include
       # a 64-bit specific directory.
       case "$target" in
-        x86_64*-linux*)
-          suffix=64 ;;
+       x86_64*-linux*)
+         suffix=64 ;;
       esac
 
-      if [ -n "${suffix}" ]; then
-
-       LIB_PATH=/lib${suffix}:/lib
-       LIB_PATH=${LIB_PATH}:/usr/lib${suffix}:/usr/lib
-       if [ -n "${NATIVE_LIB_DIRS}" ]; then
-         LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed s_:_${suffix}:_g`${suffix}:${NATIVE_LIB_DIRS}
-       fi
-       if [ "${libdir}" != /usr/lib ]; then
-         LIB_PATH=${LIB_PATH}:${libdir}${suffix}:${libdir}
-       fi
-       if [ "${libdir}" != /usr/local/lib ]; then
-         LIB_PATH=${LIB_PATH}:/usr/local/lib${suffix}:/usr/local/lib
-       fi
-
-      fi
-    ;;
+      # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
+      if [ -n "$suffix" ]; then
+       case "$EMULATION_NAME" in
+         *64*)
+           LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,$suffix:,g`$LIB_PATH ;;
+       esac
+      fi ;;
   esac
 fi
index 26e4c46297f89742c5a358e2852ad8bc236f2f72..4fee5fb85569a5f6484b98d97bcb4074e46e6aa6 100644 (file)
@@ -75,7 +75,7 @@ static void gld${EMULATION_NAME}_before_allocation
 static boolean gld${EMULATION_NAME}_open_dynamic_archive
   PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *));
 static lang_output_section_statement_type *output_rel_find
-  PARAMS ((void));
+  PARAMS ((asection *));
 static asection *output_prev_sec_find
   PARAMS ((lang_output_section_statement_type *));
 static boolean gld${EMULATION_NAME}_place_orphan
@@ -996,24 +996,46 @@ cat >>e${EMULATION_NAME}.c <<EOF
 /* A variant of lang_output_section_find.  Used by place_orphan.  */
 
 static lang_output_section_statement_type *
-output_rel_find ()
+output_rel_find (sec)
+     asection *sec;
 {
   lang_statement_union_type *u;
   lang_output_section_statement_type *lookup;
+  lang_output_section_statement_type *last = NULL;
+  lang_output_section_statement_type *last_rel = NULL;
+  lang_output_section_statement_type *last_rel_alloc = NULL;
+  int rela = sec->name[4] == 'a';
 
-  for (u = lang_output_section_statement.head;
-       u != (lang_statement_union_type *) NULL;
-       u = lookup->next)
+  for (u = lang_output_section_statement.head; u; u = lookup->next)
     {
       lookup = &u->output_section_statement;
-      if (strncmp (".rel", lookup->name, 4) == 0
-         && lookup->bfd_section != NULL
-         && (lookup->bfd_section->flags & SEC_ALLOC) != 0)
+      if (strncmp (".rel", lookup->name, 4) == 0)
        {
-         return lookup;
+         /* Don't place after .rel.plt as doing so results in wrong
+            dynamic tags.  Also, place allocated reloc sections before
+            non-allocated.  */
+         int lookrela = lookup->name[4] == 'a';
+
+         if (strcmp (".plt", lookup->name + 4 + lookrela) == 0
+             || (lookup->bfd_section != NULL
+                 && (lookup->bfd_section->flags & SEC_ALLOC) == 0))
+           break;
+         last = lookup;
+         if (rela == lookrela)
+           last_rel = lookup;
+         if (lookup->bfd_section != NULL
+             && (lookup->bfd_section->flags & SEC_ALLOC) != 0)
+           last_rel_alloc = lookup;
        }
     }
-  return (lang_output_section_statement_type *) NULL;
+
+  if (last_rel_alloc)
+    return last_rel_alloc;
+
+  if (last_rel)
+    return last_rel;
+
+  return last;
 }
 
 /* Find the last output section before given output statement.
@@ -1069,13 +1091,24 @@ gld${EMULATION_NAME}_place_orphan (file, s)
   lang_statement_list_type add;
   etree_type *address;
   const char *secname;
-  const char *outsecname;
   const char *ps = NULL;
   lang_output_section_statement_type *os;
+  int isdyn = 0;
 
   secname = bfd_get_section_name (s->owner, s);
+  if (! link_info.relocateable
+      && link_info.combreloc
+      && (s->flags & SEC_ALLOC)
+      && strncmp (secname, ".rel", 4) == 0)
+    {
+      if (secname[4] == 'a')
+       secname = ".rela.dyn";
+      else
+       secname = ".rel.dyn";
+      isdyn = 1;
+    }
 
-  if (! config.unique_orphan_sections && ! unique_section_p (secname))
+  if (isdyn || (!config.unique_orphan_sections && !unique_section_p (secname)))
     {
       /* Look through the script to see where to place this section.  */
       os = lang_output_section_find (secname);
@@ -1138,27 +1171,10 @@ gld${EMULATION_NAME}_place_orphan (file, s)
           && HAVE_SECTION (hold_data, ".data"))
     place = &hold_data;
   else if (strncmp (secname, ".rel", 4) == 0
+          && (s->flags & SEC_LOAD) != 0
           && (hold_rel.os != NULL
-              || (hold_rel.os = output_rel_find ()) != NULL))
-    {
-      if (! link_info.relocateable && link_info.combreloc)
-       {
-         if (strncmp (secname, ".rela", 5) == 0)
-           os = lang_output_section_find (".rela.dyn");
-         else
-           os = lang_output_section_find (".rel.dyn");
-
-         if (os != NULL
-             && os->bfd_section != NULL
-             && ((s->flags ^ os->bfd_section->flags)
-                 & (SEC_LOAD | SEC_ALLOC)) == 0)
-           {
-             lang_add_section (&os->children, s, os, file);
-             return true;
-           }
-       }
-      place = &hold_rel;
-    }
+              || (hold_rel.os = output_rel_find (s)) != NULL))
+    place = &hold_rel;
   else if ((s->flags & (SEC_CODE | SEC_READONLY)) == SEC_READONLY
           && HAVE_SECTION (hold_rodata, ".rodata"))
     place = &hold_rodata;
@@ -1171,13 +1187,10 @@ gld${EMULATION_NAME}_place_orphan (file, s)
   /* Choose a unique name for the section.  This will be needed if the
      same section name appears in the input file with different
      loadable or allocatable characteristics.  */
-  outsecname = secname;
-  if (bfd_get_section_by_name (output_bfd, outsecname) != NULL)
+  if (bfd_get_section_by_name (output_bfd, secname) != NULL)
     {
-      outsecname = bfd_get_unique_section_name (output_bfd,
-                                               outsecname,
-                                               &count);
-      if (outsecname == NULL)
+      secname = bfd_get_unique_section_name (output_bfd, secname, &count);
+      if (secname == NULL)
        einfo ("%F%P: place_orphan failed: %E\n");
     }
 
@@ -1198,7 +1211,7 @@ gld${EMULATION_NAME}_place_orphan (file, s)
     {
       /* If the name of the section is representable in C, then create
         symbols to mark the start and the end of the section.  */
-      for (ps = outsecname; *ps != '\0'; ps++)
+      for (ps = secname; *ps != '\0'; ps++)
        if (! ISALNUM (*ps) && *ps != '_')
          break;
       if (*ps == '\0')
@@ -1206,8 +1219,8 @@ gld${EMULATION_NAME}_place_orphan (file, s)
          char *symname;
          etree_type *e_align;
 
-         symname = (char *) xmalloc (ps - outsecname + sizeof "__start_");
-         sprintf (symname, "__start_%s", outsecname);
+         symname = (char *) xmalloc (ps - secname + sizeof "__start_");
+         sprintf (symname, "__start_%s", secname);
          e_align = exp_unop (ALIGN_K,
                              exp_intop ((bfd_vma) 1 << s->alignment_power));
          lang_add_assignment (exp_assop ('=', symname, e_align));
@@ -1219,7 +1232,7 @@ gld${EMULATION_NAME}_place_orphan (file, s)
   else
     address = NULL;
 
-  os = lang_enter_output_section_statement (outsecname, address, 0,
+  os = lang_enter_output_section_statement (secname, address, 0,
                                            (bfd_vma) 0,
                                            (etree_type *) NULL,
                                            (etree_type *) NULL,
@@ -1240,8 +1253,8 @@ gld${EMULATION_NAME}_place_orphan (file, s)
       if (place != NULL)
        stat_ptr = &add;
 
-      symname = (char *) xmalloc (ps - outsecname + sizeof "__stop_");
-      sprintf (symname, "__stop_%s", outsecname);
+      symname = (char *) xmalloc (ps - secname + sizeof "__stop_");
+      sprintf (symname, "__stop_%s", secname);
       lang_add_assignment (exp_assop ('=', symname,
                                      exp_nameop (NAME, ".")));
     }
index 9fb2b2dab9e4ef24a29637693d362e776eedab9b..813d55edafd1dd703cd83fef0907b71a45af0919 100644 (file)
@@ -131,7 +131,99 @@ ldfile_try_open_bfd (attempt, entry)
       if (check != NULL)
        {
          if (! bfd_check_format (check, bfd_object))
-           return true;
+           {
+             if (check == entry->the_bfd
+                 && bfd_get_error () == bfd_error_file_not_recognized
+                 && ! ldemul_unrecognized_file (entry))
+               {
+                 int token, skip = 0;
+                 char *arg, *arg1, *arg2, *arg3;
+                 extern FILE *yyin;
+
+                 /* Try to interpret the file as a linker script.  */
+                 ldfile_open_command_file (attempt);
+                             
+                 ldfile_assumed_script = true;
+                 parser_input = input_selected;
+                 ldlex_both ();
+                 token = INPUT_SCRIPT;
+                 while (token != 0)
+                   {
+                     switch (token)
+                       {
+                       case OUTPUT_FORMAT:
+                         if ((token = yylex ()) != '(')
+                           continue;
+                         if ((token = yylex ()) != NAME)
+                           continue;
+                         arg1 = yylval.name;
+                         arg2 = NULL;
+                         arg3 = NULL;
+                         token = yylex ();
+                         if (token == ',')
+                           {
+                             if ((token = yylex ()) != NAME)
+                               {
+                                 free (arg1);
+                                 continue;
+                               }
+                             arg2 = yylval.name;
+                             if ((token = yylex ()) != ','
+                                 || (token = yylex ()) != NAME)
+                               {
+                                 free (arg1);
+                                 free (arg2);
+                                 continue;
+                               }
+                             arg3 = yylval.name;
+                             token = yylex ();
+                           }
+                         if (token == ')')
+                           {
+                             switch (command_line.endian)
+                               {
+                               default:
+                               case ENDIAN_UNSET:
+                                 arg = arg1; break;
+                               case ENDIAN_BIG:
+                                 arg = arg2 ? arg2 : arg1; break;
+                               case ENDIAN_LITTLE:
+                                 arg = arg3 ? arg3 : arg1; break;
+                               }
+                             if (strcmp (arg, lang_get_output_target ()) != 0)
+                               skip = 1;
+                           }
+                         free (arg1);
+                         if (arg2) free (arg2);
+                         if (arg3) free (arg3);
+                         break;
+                       case NAME:
+                       case LNAME:
+                       case VERS_IDENTIFIER:
+                       case VERS_TAG:
+                         free (yylval.name);
+                         break;
+                       case INT:
+                         if (yylval.bigint.str)
+                           free (yylval.bigint.str);
+                         break;
+                       }
+                     token = yylex ();
+                   }
+                 ldfile_assumed_script = false;
+                 fclose (yyin);
+                 yyin = NULL;
+                 if (skip)
+                   {
+                     einfo (_("%P: skipping incompatible %s when searching for %s\n"),
+                            attempt, entry->local_sym_name);
+                     bfd_close (entry->the_bfd);
+                     entry->the_bfd = NULL;
+                     return false;
+                   }
+               }
+             return true;
+           }
 
          if ((bfd_arch_get_compatible (check, output_bfd) == NULL)
              /* XCOFF archives can have 32 and 64 bit objects */
index 990ff0a84f6b758536e0a32d87670c1502683149..c8b93beba187dafb2eee2b9913175d95721067e0 100644 (file)
@@ -1783,6 +1783,29 @@ get_first_input_target ()
   return target;
 }
 
+const char *
+lang_get_output_target ()
+{
+  const char *target;
+
+  /* Has the user told us which output format to use?  */
+  if (output_target != (char *) NULL)
+    return output_target;
+
+  /* No - has the current target been set to something other than
+     the default?  */
+  if (current_target != default_target)
+    return current_target;
+
+  /* No - can we determine the format of the first input file?  */
+  target = get_first_input_target ();
+  if (target != NULL)
+    return target;
+
+  /* Failed - use the default output target.  */
+  return default_target;
+}
+
 /* Open the output file.  */
 
 static bfd *
@@ -1791,24 +1814,7 @@ open_output (name)
 {
   bfd *output;
 
-  /* Has the user told us which output format to use?  */
-  if (output_target == (char *) NULL)
-    {
-      /* No - has the current target been set to something other than
-         the default?  */
-      if (current_target != default_target)
-       output_target = current_target;
-
-      /* No - can we determine the format of the first input file?  */
-      else
-       {
-         output_target = get_first_input_target ();
-
-         /* Failed - use the default output target.  */
-         if (output_target == NULL)
-           output_target = default_target;
-       }
-    }
+  output_target = lang_get_output_target ();
 
   /* Has the user requested a particular endianness on the command
      line?  */
index cb4b6d332dc1faf208ecea664440107e8c22cb92..57c8c51e5f7fe32ed91352c225358ff1efd1a3f4 100644 (file)
@@ -483,5 +483,6 @@ extern void lang_register_vers_node
           struct bfd_elf_version_deps *));
 boolean unique_section_p PARAMS ((const char *));
 extern void lang_add_unique PARAMS ((const char *));
+extern const char *lang_get_output_target PARAMS ((void));
 
 #endif
index 648556789ca1ef8638e880e38477365c110fb14b..61dc16cbb63bdd9a9585db39ce575349ad6e7cc6 100644 (file)
@@ -257,6 +257,8 @@ static autofilter_entry_type autofilter_symbolprefixlist[] =
   /*  { "__imp_", 6 }, */
   /* Do __imp_ explicitly to save time.  */
   { "__rtti_", 7 },
+  /* Don't re-export auto-imported symbols.  */
+  { "_nm_", 4 },
   { "__builtin_", 10 },
   /* Don't export symbols specifying internal DLL layout.  */
   { "_head_", 6 },
@@ -1814,8 +1816,10 @@ make_one (exp, parent)
   quick_symbol (abfd, U ("_head_"), dll_symname, "", UNDSEC, BSF_GLOBAL, 0);
   quick_symbol (abfd, U ("_imp__"), exp->internal_name, "", id5, BSF_GLOBAL, 0);
   /* Symbol to reference ord/name of imported
-     symbol, used to implement auto-import.  */
-  quick_symbol (abfd, U("_nm__"), exp->internal_name, "", id6, BSF_GLOBAL, 0);
+     data symbol, used to implement auto-import.  */
+  if (exp->flag_data)
+    quick_symbol (abfd, U("_nm__"), exp->internal_name, "", id6,
+                 BSF_GLOBAL,0);
   if (pe_dll_compat_implib)
     quick_symbol (abfd, U ("__imp_"), exp->internal_name, "",
                  id5, BSF_GLOBAL, 0);
index 4c42585b6d617b2e760a53fa2bf20e53ef4e147c..b1d7b94705f9ba0b9e79b4084bb771a186c8e8f5 100644 (file)
@@ -58,44 +58,44 @@ SECTIONS
   .gnu.version_d       ${RELOCATING-0} : { *(.gnu.version_d) }
   .gnu.version_r       ${RELOCATING-0} : { *(.gnu.version_r) }
 
+  .rel.text            ${RELOCATING-0} : { *(.rel.text) *(.rel.gnu.linkonce.t*) }
   .rela.text           ${RELOCATING-0} : { *(.rela.text) *(.rela.gnu.linkonce.t*) }
+  .rel.data            ${RELOCATING-0} : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
   .rela.data           ${RELOCATING-0} : { *(.rela.data) *(.rela.gnu.linkonce.d*) }
+  .rel.rodata          ${RELOCATING-0} : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
   .rela.rodata         ${RELOCATING-0} : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
+  .rel.stext           ${RELOCATING-0} : { *(.rel.stest) }
   .rela.stext          ${RELOCATING-0} : { *(.rela.stest) }
+  .rel.etext           ${RELOCATING-0} : { *(.rel.etest) }
   .rela.etext          ${RELOCATING-0} : { *(.rela.etest) }
+  .rel.sdata           ${RELOCATING-0} : { *(.rel.sdata) }
   .rela.sdata          ${RELOCATING-0} : { *(.rela.sdata) }
+  .rel.edata           ${RELOCATING-0} : { *(.rel.edata) }
   .rela.edata          ${RELOCATING-0} : { *(.rela.edata) }
+  .rel.eit_v           ${RELOCATING-0} : { *(.rel.eit_v) }
   .rela.eit_v          ${RELOCATING-0} : { *(.rela.eit_v) }
-  .rela.sbss           ${RELOCATING-0} : { *(.rela.sbss) }
-  .rela.ebss           ${RELOCATING-0} : { *(.rela.ebss) }
-  .rela.srodata                ${RELOCATING-0} : { *(.rela.srodata) }
-  .rela.erodata                ${RELOCATING-0} : { *(.rela.erodata) }
-  .rela.got            ${RELOCATING-0} : { *(.rela.got) }
-  .rela.ctors          ${RELOCATING-0} : { *(.rela.ctors) }
-  .rela.dtors          ${RELOCATING-0} : { *(.rela.dtors) }
-  .rela.init           ${RELOCATING-0} : { *(.rela.init) }
-  .rela.fini           ${RELOCATING-0} : { *(.rela.fini) }
-  .rela.bss            ${RELOCATING-0} : { *(.rela.bss) }
-  .rela.plt            ${RELOCATING-0} : { *(.rela.plt) }
-
-  .rel.data            ${RELOCATING-0} : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
-  .rel.rodata          ${RELOCATING-0} : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
-  .rel.stext           ${RELOCATING-0} : { *(.rel.stest) }
-  .rel.etext           ${RELOCATING-0} : { *(.rel.etest) }
-  .rel.sdata           ${RELOCATING-0} : { *(.rel.sdata) }
-  .rel.edata           ${RELOCATING-0} : { *(.rel.edata) }
   .rel.sbss            ${RELOCATING-0} : { *(.rel.sbss) }
+  .rela.sbss           ${RELOCATING-0} : { *(.rela.sbss) }
   .rel.ebss            ${RELOCATING-0} : { *(.rel.ebss) }
-  .rel.eit_v           ${RELOCATING-0} : { *(.rel.eit_v) }
+  .rela.ebss           ${RELOCATING-0} : { *(.rela.ebss) }
   .rel.srodata         ${RELOCATING-0} : { *(.rel.srodata) }
+  .rela.srodata                ${RELOCATING-0} : { *(.rela.srodata) }
   .rel.erodata         ${RELOCATING-0} : { *(.rel.erodata) }
+  .rela.erodata                ${RELOCATING-0} : { *(.rela.erodata) }
   .rel.got             ${RELOCATING-0} : { *(.rel.got) }
+  .rela.got            ${RELOCATING-0} : { *(.rela.got) }
   .rel.ctors           ${RELOCATING-0} : { *(.rel.ctors) }
+  .rela.ctors          ${RELOCATING-0} : { *(.rela.ctors) }
   .rel.dtors           ${RELOCATING-0} : { *(.rel.dtors) }
+  .rela.dtors          ${RELOCATING-0} : { *(.rela.dtors) }
   .rel.init            ${RELOCATING-0} : { *(.rel.init) }
+  .rela.init           ${RELOCATING-0} : { *(.rela.init) }
   .rel.fini            ${RELOCATING-0} : { *(.rel.fini) }
+  .rela.fini           ${RELOCATING-0} : { *(.rela.fini) }
   .rel.bss             ${RELOCATING-0} : { *(.rel.bss) }
+  .rela.bss            ${RELOCATING-0} : { *(.rela.bss) }
   .rel.plt             ${RELOCATING-0} : { *(.rel.plt) }
+  .rela.plt            ${RELOCATING-0} : { *(.rela.plt) }
 
   .init                        ${RELOCATING-0} : { *(.init) } =${NOP-0}
   ${DATA_PLT-${PLT}}
index eaee371c9a5c0483b9c0461c182b5b20e140870e..95043acde6351d94c9707df52b9aefbb74c4b9ac 100644 (file)
@@ -264,35 +264,34 @@ SECTIONS
       ${RELOCATING+*(.rela.bss.*)}
       ${RELOCATING+*(.rela.gnu.linkonce.b.*)}
     }
+  .rel.stext           ${RELOCATING-0} : { *(.rel.stest) }
   .rela.stext          ${RELOCATING-0} : { *(.rela.stest) }
+  .rel.etext           ${RELOCATING-0} : { *(.rel.etest) }
   .rela.etext          ${RELOCATING-0} : { *(.rela.etest) }
+  .rel.sdata           ${RELOCATING-0} : { *(.rel.sdata) }
   .rela.sdata          ${RELOCATING-0} : { *(.rela.sdata) }
+  .rel.edata           ${RELOCATING-0} : { *(.rel.edata) }
   .rela.edata          ${RELOCATING-0} : { *(.rela.edata) }
+  .rel.eit_v           ${RELOCATING-0} : { *(.rel.eit_v) }
   .rela.eit_v          ${RELOCATING-0} : { *(.rela.eit_v) }
-  .rela.ebss           ${RELOCATING-0} : { *(.rela.ebss) }
-  .rela.srodata                ${RELOCATING-0} : { *(.rela.srodata) }
-  .rela.erodata                ${RELOCATING-0} : { *(.rela.erodata) }
-  .rela.got            ${RELOCATING-0} : { *(.rela.got) }
-  .rela.ctors          ${RELOCATING-0} : { *(.rela.ctors) }
-  .rela.dtors          ${RELOCATING-0} : { *(.rela.dtors) }
-  .rela.init           ${RELOCATING-0} : { *(.rela.init) }
-  .rela.fini           ${RELOCATING-0} : { *(.rela.fini) }
-  .rela.plt            ${RELOCATING-0} : { *(.rela.plt) }
-
-  .rel.stext           ${RELOCATING-0} : { *(.rel.stest) }
-  .rel.etext           ${RELOCATING-0} : { *(.rel.etest) }
-  .rel.sdata           ${RELOCATING-0} : { *(.rel.sdata) }
-  .rel.edata           ${RELOCATING-0} : { *(.rel.edata) }
   .rel.ebss            ${RELOCATING-0} : { *(.rel.ebss) }
-  .rel.eit_v           ${RELOCATING-0} : { *(.rel.eit_v) }
+  .rela.ebss           ${RELOCATING-0} : { *(.rela.ebss) }
   .rel.srodata         ${RELOCATING-0} : { *(.rel.srodata) }
+  .rela.srodata                ${RELOCATING-0} : { *(.rela.srodata) }
   .rel.erodata         ${RELOCATING-0} : { *(.rel.erodata) }
+  .rela.erodata                ${RELOCATING-0} : { *(.rela.erodata) }
   .rel.got             ${RELOCATING-0} : { *(.rel.got) }
+  .rela.got            ${RELOCATING-0} : { *(.rela.got) }
   .rel.ctors           ${RELOCATING-0} : { *(.rel.ctors) }
+  .rela.ctors          ${RELOCATING-0} : { *(.rela.ctors) }
   .rel.dtors           ${RELOCATING-0} : { *(.rel.dtors) }
+  .rela.dtors          ${RELOCATING-0} : { *(.rela.dtors) }
   .rel.init            ${RELOCATING-0} : { *(.rel.init) }
+  .rela.init           ${RELOCATING-0} : { *(.rela.init) }
   .rel.fini            ${RELOCATING-0} : { *(.rel.fini) }
+  .rela.fini           ${RELOCATING-0} : { *(.rela.fini) }
   .rel.plt             ${RELOCATING-0} : { *(.rel.plt) }
+  .rela.plt            ${RELOCATING-0} : { *(.rela.plt) }
 
   /* Concatenate .page0 sections.  Put them in the page0 memory bank
      unless we are creating a relocatable file.  */
index 2b25e775bb10900dfdb47111bbac35fc3fffe504..dbbfbd783a2b8a06096ec0e5c83087de5f7f08ed 100644 (file)
@@ -263,35 +263,34 @@ SECTIONS
       ${RELOCATING+*(.rela.bss.*)}
       ${RELOCATING+*(.rela.gnu.linkonce.b.*)}
     }
+  .rel.stext           ${RELOCATING-0} : { *(.rel.stest) }
   .rela.stext          ${RELOCATING-0} : { *(.rela.stest) }
+  .rel.etext           ${RELOCATING-0} : { *(.rel.etest) }
   .rela.etext          ${RELOCATING-0} : { *(.rela.etest) }
+  .rel.sdata           ${RELOCATING-0} : { *(.rel.sdata) }
   .rela.sdata          ${RELOCATING-0} : { *(.rela.sdata) }
+  .rel.edata           ${RELOCATING-0} : { *(.rel.edata) }
   .rela.edata          ${RELOCATING-0} : { *(.rela.edata) }
+  .rel.eit_v           ${RELOCATING-0} : { *(.rel.eit_v) }
   .rela.eit_v          ${RELOCATING-0} : { *(.rela.eit_v) }
-  .rela.ebss           ${RELOCATING-0} : { *(.rela.ebss) }
-  .rela.srodata                ${RELOCATING-0} : { *(.rela.srodata) }
-  .rela.erodata                ${RELOCATING-0} : { *(.rela.erodata) }
-  .rela.got            ${RELOCATING-0} : { *(.rela.got) }
-  .rela.ctors          ${RELOCATING-0} : { *(.rela.ctors) }
-  .rela.dtors          ${RELOCATING-0} : { *(.rela.dtors) }
-  .rela.init           ${RELOCATING-0} : { *(.rela.init) }
-  .rela.fini           ${RELOCATING-0} : { *(.rela.fini) }
-  .rela.plt            ${RELOCATING-0} : { *(.rela.plt) }
-
-  .rel.stext           ${RELOCATING-0} : { *(.rel.stest) }
-  .rel.etext           ${RELOCATING-0} : { *(.rel.etest) }
-  .rel.sdata           ${RELOCATING-0} : { *(.rel.sdata) }
-  .rel.edata           ${RELOCATING-0} : { *(.rel.edata) }
   .rel.ebss            ${RELOCATING-0} : { *(.rel.ebss) }
-  .rel.eit_v           ${RELOCATING-0} : { *(.rel.eit_v) }
+  .rela.ebss           ${RELOCATING-0} : { *(.rela.ebss) }
   .rel.srodata         ${RELOCATING-0} : { *(.rel.srodata) }
+  .rela.srodata                ${RELOCATING-0} : { *(.rela.srodata) }
   .rel.erodata         ${RELOCATING-0} : { *(.rel.erodata) }
+  .rela.erodata                ${RELOCATING-0} : { *(.rela.erodata) }
   .rel.got             ${RELOCATING-0} : { *(.rel.got) }
+  .rela.got            ${RELOCATING-0} : { *(.rela.got) }
   .rel.ctors           ${RELOCATING-0} : { *(.rel.ctors) }
+  .rela.ctors          ${RELOCATING-0} : { *(.rela.ctors) }
   .rel.dtors           ${RELOCATING-0} : { *(.rel.dtors) }
+  .rela.dtors          ${RELOCATING-0} : { *(.rela.dtors) }
   .rel.init            ${RELOCATING-0} : { *(.rel.init) }
+  .rela.init           ${RELOCATING-0} : { *(.rela.init) }
   .rel.fini            ${RELOCATING-0} : { *(.rel.fini) }
+  .rela.fini           ${RELOCATING-0} : { *(.rela.fini) }
   .rel.plt             ${RELOCATING-0} : { *(.rel.plt) }
+  .rela.plt            ${RELOCATING-0} : { *(.rela.plt) }
 
   /* Concatenate .page0 sections.  Put them in the page0 memory bank
      unless we are creating a relocatable file.  */
index 2f24757e422ed1057a619ab690a86819a0ef8d60..a22611c105aca28d047932ce24fc0cf5d5a9d6aa 100644 (file)
@@ -85,6 +85,11 @@ SECTIONS
     *(.rdata)
     ${R_RDATA}
     *(.eh_frame)
+    ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST__ = .;}
+    ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST__ = .;}
+    *(.rdata_runtime_pseudo_reloc)
+    ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
+    ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
   }
 
   .pdata ${RELOCATING+BLOCK(__section_alignment__)} :
index 9075adc7c430f60ecced10e9ea046370e41bf817..e38e044eeaa4f6b8d72ffb5295265624e5492c7e 100644 (file)
@@ -1,3 +1,40 @@
+2002-10-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       Merge from mainline:
+       2002-10-10  Jakub Jelinek  <jakub@redhat.com>
+       * ld-i386/combreloc.s: New test.
+       * ld-i386/combreloc.d: New test.
+       * ld-i386/i386.exp (i386tests): Add it.
+
+       2002-10-10  Alan Modra  <amodra@bigpond.net.au>
+       * ld-i386/i386.exp (reloc): Turn off combreloc.
+       * ld-i386/reloc.d: Likewise.
+       * ld-powerpc/powerpc.exp: Likewise.
+       * ld-powerpc/reloc.d: Likewise.
+
+       2002-10-03  H.J. Lu <hjl@gnu.org>
+       * ld-elfvers/vers21.c (_old_foobar): Initialized to -1 for gcc
+       3.x.
+
+       2002-10-02  Stephen Clarke <stephen.clarke@superh.com>
+       * ld-sh/sh64/gotplt.d, ld-sh/sh64/gotplt.map,
+       ld-sh/sh64/gotplt.s: New test.
+       
+       2002-10-01  Jakub Jelinek  <jakub@redhat.com>
+       * ld-i386/i386.exp: Add tlsindntpoff test.
+       * ld-i386/tlsindntpoff.s: New test.
+       * ld-i386/tlsindntpoff.dd: New test.
+
+       2002-09-30  Alan Modra  <amodra@bigpond.net.au>
+       * ld-powerpc/powerpc.exp: Restrict to 32 bit ELF.
+
+       2002-09-30  Alan Modra  <amodra@bigpond.net.au>
+       * ld-powerpc/reloc.s, ld-powerpc/reloc.d: New.
+       * ld-powerpc/powerpc.exp: New.
+
+       * ld-i386/reloc.s, ld-i386/reloc.d: New.
+       * ld-i386/i386.exp: Run new test.
+
 2002-09-23  Daniel Jacobowitz  <drow@mvista.com>
 
        Merge from mainline:
index 23382af150911a7a60ca2f2776841abb4ddae50a..2879c7f0e3d94c7c06688908c59ededfb4338fb0 100644 (file)
@@ -27,6 +27,6 @@ _old_foo ()
   return foo ();
 }
 
-int _old_foobar = 0;
+int _old_foobar = -1;
 
 int foobar = 1;
index 09526f8d2ad7fdcbcd9a2b1057016ce65aac6b72..0b9257e26101ee7b49c3716cadd073255b373f04 100644 (file)
@@ -57,6 +57,12 @@ set i386tests {
      "--32" {tlsnopic1.s tlsnopic2.s}
      {{readelf -Ssrl tlsnopic.rd} {objdump -drj.text tlsnopic.dd}
       {objdump -sj.got tlsnopic.sd}} "libtlsnopic.so"}
+    {"Reloc section order" "-shared -melf_i386 -z nocombreloc" "--32"
+     {reloc.s} {{objdump -hw reloc.d}} "reloc.so"}
+    {"-z combreloc relocation sections" "-shared -melf_i386 -z combreloc"
+     "--32" {combreloc.s} {{readelf -r combreloc.d}} "combreloc.so"}
+    {"TLS @indntpoff with %eax" "-melf_i386" "--32" {tlsindntpoff.s}
+     {{objdump -drj.text tlsindntpoff.dd}} "tlsindntpoff"}
 }
 
 # FIXME: Generalize and move this to ld-lib.exp
index 47eca16e6e1dc660ed26afddd23ed472703274ca..a82516eb1f82b14ee6e919a1a2772a7a2e83e58d 100644 (file)
@@ -1,3 +1,9 @@
+2002-10-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       Merge from mainline:
+       2002-10-16  Jakub Jelinek  <jakub@redhat.com>
+       * config.table: Use mh-s390pic for s390x too.
+
 2002-07-10  Jason Merrill  <jason@redhat.com>
 
        * cp-demangle.c (demangle_identifier): Support extended Unicode
index b9a2479aac780ee4e84a01354074b091107f1212..df48ce995253afefe2757c0a4e63142b5554faf8 100644 (file)
@@ -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
index 94638977e180401713a5c8aab601a9783f231ba3..492e682fa9a2b9e405f11507673dc20b8b91753e 100644 (file)
@@ -1,3 +1,15 @@
+2002-10-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       Merge from mainline:
+       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-09-24  Nick Clifton  <nickc@redhat.com>
+       * po/de.po: Updated Danish translation file.
+
 2002-09-04  Nick Clifton  <nickc@redhat.com>
            Daniel Jacobowitz  <drow@mvista.com>
 
index 6039e3e0629b6eec44a0e63bfd978611b27ab119..2914776e6ab0b3f2232f0936914ddc6cdf4a1257 100644 (file)
@@ -4,9 +4,9 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: opcodes 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-17 13:58+0000\n"
-"PO-Revision-Date: 2002-02-24 13:59+0100\n"
+"Project-Id-Version: opcodes 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-09-24 07:13+0200\n"
 "Last-Translator: Martin v. Löwis <martin@v.loewis.de>\n"
 "Language-Team: German <de@li.org>\n"
 "MIME-Version: 1.0\n"
@@ -25,21 +25,21 @@ msgstr "Sprunghinweis ist nicht ausgerichtet (unaligned)."
 msgid "Illegal limm reference in last instruction!\n"
 msgstr "Ungültige limm-Referenz in der letzten Anweisung!\n"
 
-#: arm-dis.c:509
+#: arm-dis.c:507
 msgid "<illegal precision>"
 msgstr "<ungültige Präzision>"
 
-#: arm-dis.c:1019
+#: arm-dis.c:1010
 #, c-format
 msgid "Unrecognised register name set: %s\n"
 msgstr "Unbekannte Registernamensmenge: %s\n"
 
-#: arm-dis.c:1026
+#: arm-dis.c:1017
 #, c-format
 msgid "Unrecognised disassembler option: %s\n"
 msgstr "Unbekannte Disassembler-Option: %s\n"
 
-#: arm-dis.c:1198
+#: arm-dis.c:1191
 msgid ""
 "\n"
 "The following ARM specific disassembler options are supported for use with\n"
@@ -59,7 +59,8 @@ msgstr "Interner Disassemblerfehler."
 msgid "unknown constraint `%c'"
 msgstr ""
 
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
+#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
+#: openrisc-ibld.c:195 xstormy16-ibld.c:195
 #, c-format
 msgid "operand out of range (%ld not between %ld and %ld)"
 msgstr ""
@@ -85,104 +86,126 @@ msgstr "Unbekannter Fehler %d\n"
 msgid "Address 0x%x is out of bounds.\n"
 msgstr ""
 
-#: fr30-asm.c:324 m32r-asm.c:326 openrisc-asm.c:245
+#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
+#: xstormy16-asm.c:231
 #, c-format
 msgid "Unrecognized field %d while parsing.\n"
 msgstr ""
 
-#: fr30-asm.c:374 m32r-asm.c:376 openrisc-asm.c:295
+#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
+#: xstormy16-asm.c:281
 msgid "missing mnemonic in syntax string"
 msgstr ""
 
 #. We couldn't parse it.
-#: fr30-asm.c:510 fr30-asm.c:514 fr30-asm.c:601 fr30-asm.c:703 m32r-asm.c:512 m32r-asm.c:516 m32r-asm.c:603 m32r-asm.c:705 openrisc-asm.c:431 openrisc-asm.c:435 openrisc-asm.c:522 openrisc-asm.c:624
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
+#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
+#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
+#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
 msgid "unrecognized instruction"
 msgstr ""
 
-#: fr30-asm.c:557 m32r-asm.c:559 openrisc-asm.c:478
+#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
+#: xstormy16-asm.c:464
 #, c-format
 msgid "syntax error (expected char `%c', found `%c')"
 msgstr "Syntaxfehler (erwartetes Zeichen »%c«, gefunden »%c«)"
 
-#: fr30-asm.c:567 m32r-asm.c:569 openrisc-asm.c:488
+#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
+#: xstormy16-asm.c:474
 #, c-format
 msgid "syntax error (expected char `%c', found end of instruction)"
 msgstr ""
 
-#: fr30-asm.c:595 m32r-asm.c:597 openrisc-asm.c:516
+#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
+#: xstormy16-asm.c:502
 msgid "junk at end of line"
 msgstr ""
 
-#: fr30-asm.c:702 m32r-asm.c:704 openrisc-asm.c:623
+#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
+#: xstormy16-asm.c:609
 msgid "unrecognized form of instruction"
 msgstr ""
 
-#: fr30-asm.c:714 m32r-asm.c:716 openrisc-asm.c:635
+#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
+#: xstormy16-asm.c:621
 #, c-format
 msgid "bad instruction `%.50s...'"
 msgstr ""
 
-#: fr30-asm.c:717 m32r-asm.c:719 openrisc-asm.c:638
+#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
+#: xstormy16-asm.c:624
 #, c-format
 msgid "bad instruction `%.50s'"
 msgstr ""
 
 #. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: xstormy16-dis.c:39
 msgid "*unknown*"
 msgstr ""
 
-#: fr30-dis.c:319 m32r-dis.c:250 openrisc-dis.c:137
+#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
+#: xstormy16-dis.c:169
 #, c-format
 msgid "Unrecognized field %d while printing insn.\n"
 msgstr ""
 
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: xstormy16-ibld.c:166
 #, c-format
 msgid "operand out of range (%ld not between %ld and %lu)"
 msgstr ""
 
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: xstormy16-ibld.c:179
 #, c-format
 msgid "operand out of range (%lu not between 0 and %lu)"
 msgstr ""
 
-#: fr30-ibld.c:731 m32r-ibld.c:660 openrisc-ibld.c:634
+#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
+#: xstormy16-ibld.c:678
 #, c-format
 msgid "Unrecognized field %d while building insn.\n"
 msgstr ""
 
-#: fr30-ibld.c:939 m32r-ibld.c:794 openrisc-ibld.c:737
+#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
+#: xstormy16-ibld.c:826
 #, c-format
 msgid "Unrecognized field %d while decoding insn.\n"
 msgstr ""
 
-#: fr30-ibld.c:1088 m32r-ibld.c:904 openrisc-ibld.c:817
+#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
+#: xstormy16-ibld.c:939
 #, c-format
 msgid "Unrecognized field %d while getting int operand.\n"
 msgstr ""
 
-#: fr30-ibld.c:1217 m32r-ibld.c:994 openrisc-ibld.c:877
+#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
+#: xstormy16-ibld.c:1032
 #, c-format
 msgid "Unrecognized field %d while getting vma operand.\n"
 msgstr ""
 
-#: fr30-ibld.c:1351 m32r-ibld.c:1092 openrisc-ibld.c:946
+#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
+#: xstormy16-ibld.c:1134
 #, c-format
 msgid "Unrecognized field %d while setting int operand.\n"
 msgstr ""
 
-#: fr30-ibld.c:1473 m32r-ibld.c:1178 openrisc-ibld.c:1003
+#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
+#: xstormy16-ibld.c:1224
 #, c-format
 msgid "Unrecognized field %d while setting vma operand.\n"
 msgstr ""
 
-#: h8300-dis.c:384
+#: h8300-dis.c:385
 #, c-format
 msgid "Hmmmm %x"
 msgstr ""
 
-#: h8300-dis.c:395
+#: h8300-dis.c:396
 #, c-format
 msgid "Don't understand %x \n"
 msgstr ""
@@ -232,12 +255,12 @@ msgstr ""
 msgid "# <dis error: %08x>"
 msgstr ""
 
-#: mips-dis.c:290
+#: mips-dis.c:337
 #, c-format
 msgid "# internal error, undefined modifier(%c)"
 msgstr ""
 
-#: mips-dis.c:1154
+#: mips-dis.c:1209
 #, c-format
 msgid "# internal disassembler error, unrecognised modifier (%c)"
 msgstr ""
@@ -271,62 +294,62 @@ msgstr ""
 msgid "$<undefined>"
 msgstr ""
 
-#: ppc-opc.c:765 ppc-opc.c:798
+#: ppc-opc.c:777 ppc-opc.c:810
 msgid "invalid conditional option"
 msgstr ""
 
-#: ppc-opc.c:800
+#: ppc-opc.c:812
 msgid "attempt to set y bit when using + or - modifier"
 msgstr ""
 
-#: ppc-opc.c:832 ppc-opc.c:884
+#: ppc-opc.c:844 ppc-opc.c:896
 msgid "offset not a multiple of 4"
 msgstr ""
 
-#: ppc-opc.c:857
+#: ppc-opc.c:869
 msgid "offset not between -2048 and 2047"
 msgstr ""
 
-#: ppc-opc.c:882
+#: ppc-opc.c:894
 msgid "offset not between -8192 and 8191"
 msgstr ""
 
-#: ppc-opc.c:910
+#: ppc-opc.c:922
 msgid "ignoring least significant bits in branch offset"
 msgstr ""
 
-#: ppc-opc.c:944 ppc-opc.c:981
+#: ppc-opc.c:956 ppc-opc.c:993
 msgid "illegal bitmask"
 msgstr ""
 
-#: ppc-opc.c:1054
+#: ppc-opc.c:1066
 msgid "value out of range"
 msgstr ""
 
-#: ppc-opc.c:1130
+#: ppc-opc.c:1142
 msgid "index register in load range"
 msgstr ""
 
-#: ppc-opc.c:1146
+#: ppc-opc.c:1158
 msgid "invalid register operand when updating"
 msgstr ""
 
 #. Mark as non-valid instruction
-#: sparc-dis.c:749
+#: sparc-dis.c:750
 msgid "unknown"
 msgstr ""
 
-#: sparc-dis.c:824
+#: sparc-dis.c:825
 #, c-format
 msgid "Internal error:  bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr ""
 
-#: sparc-dis.c:835
+#: sparc-dis.c:836
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr ""
 
-#: sparc-dis.c:884
+#: sparc-dis.c:885
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
 msgstr ""
@@ -389,3 +412,31 @@ msgstr ""
 #: v850-opc.c:375
 msgid "immediate value must be even"
 msgstr "Der Direktoperand muss gerade sein."
+
+#: xstormy16-asm.c:74
+msgid "Bad register in preincrement"
+msgstr ""
+
+#: xstormy16-asm.c:79
+msgid "Bad register in postincrement"
+msgstr ""
+
+#: xstormy16-asm.c:81
+msgid "Bad register name"
+msgstr "Falscher Registername."
+
+#: xstormy16-asm.c:85
+msgid "Label conflicts with register name"
+msgstr ""
+
+#: xstormy16-asm.c:89
+msgid "Label conflicts with `Rx'"
+msgstr ""
+
+#: xstormy16-asm.c:91
+msgid "Bad immediate expression"
+msgstr ""
+
+#: xstormy16-asm.c:120
+msgid "Small operand was not an immediate number"
+msgstr ""
index 5c06d01df1457f43f3a58205f99b607a2ba11b20..00102323f2b4b1f4e552965957b6f9481c643684 100644 (file)
@@ -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