<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.gnu.binutils">
    <title>gmane.comp.gnu.binutils</title>
    <link>http://blog.gmane.org/gmane.comp.gnu.binutils</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57731"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57728"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57727"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57724"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57720"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57718"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57712"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57702"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57701"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57698"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57697"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57693"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57687"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57685"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57684"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57679"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57677"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57676"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57670"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.binutils/57649"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57731">
    <title>Display some optimisations when --traditional-format</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57731</link>
    <description>&lt;pre&gt;How do you all feel about disabling string merging when ld is given
--traditional-format?  I think it's a reasonable addition to the
option's effect, currently it disables .stab and .eh_frame
optimisation.

The reason I'm proposing this is that I was investigating Fedora
powerpc64 binutils testsuite failures, most of which were LTO tests
that just need to be tweaked to accept "D" as well as "T" for
powerpc64 function symbols.  The other slightly more interesting
failures were the S-record tests.  They were failing because .opd
optimisation doesn't happen when ld produces srec output.  Easily
fixed by adding -no-opd-optimize to the test flags, and then the tests
pass.  However, I looked again at linker map output differences for
normal ELF output vs. srec output, and saw

&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -112,11 +108,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
                 0x00000000000010dc                PROVIDE (_etext, .)
                 0x00000000000010dc                PROVIDE (etext, .)
 
-.rodata         0x00000000000010e0       0x18
+.rodata         0x00000000000010e0       0x17
  *(.rodata .rodata.* .gnu.linkonce.r.*)
  .rodata.str1.8
-                0x00000000000010e0       0x18 tmpdir/sr1.o
-                                         0x17 (size before relaxing)
+                0x00000000000010e0       0x17 tmpdir/sr1.o
 
 .rodata1
  *(.rodata1)

Oddly, with string merge enabled .rodata size increased!  A
peculiarity of the way string merging works with aligned data like
.rodata.str1.8 in sr1.o.  We could fix the alignment padding, I
suppose, but it doesn't seem worth the effort.

So I'm committing the following, minus the ldlang.c patch to give
people time to object to that particular change.

ld/
* ldlang.c (lang_process): Disable string merging when
--traditional-format.
* ldlex.h (enum option_values): Move from..
* lexsup.c: ..here.
* emultempl/ppc32elf.em: Include ldlex.h.
(PARSE_AND_LIST_ARGS_CASES): Disable optimisations when
--traditional-format.
* emultempl/ppc64elf.em: Likewise.
ld/testsuite/
* ld-srec/srec.exp: Remove powerpc64 flag setting.

Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.390
diff -u -p -r1.390 ldlang.c
--- ld/ldlang.c14 May 2012 19:45:28 -00001.390
+++ ld/ldlang.c26 May 2012 05:58:07 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6641,7 +6641,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; lang_process (void)
  sections, so that GCed sections are not merged, but before
  assigning dynamic symbols, since removing whole input sections
  is hard then.  */
-      bfd_merge_sections (link_info.output_bfd, &amp;amp;link_info);
+      if (!link_info.traditional_format)
+bfd_merge_sections (link_info.output_bfd, &amp;amp;link_info);
 
       /* Look for a text section and set the readonly attribute in it.  */
       found = bfd_get_section_by_name (link_info.output_bfd, ".text");
Index: ld/ldlex.h
===================================================================
RCS file: /cvs/src/src/ld/ldlex.h,v
retrieving revision 1.10
diff -u -p -r1.10 ldlex.h
--- ld/ldlex.h8 Mar 2012 05:29:33 -00001.10
+++ ld/ldlex.h26 May 2012 05:58:08 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -24,6 +24,119 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include &amp;lt;stdio.h&amp;gt;
 
+/* Codes used for the long options with no short synonyms.  150 isn't
+   special; it's just an arbitrary non-ASCII char value.  */
+enum option_values
+{
+  OPTION_ASSERT = 150,
+  OPTION_CALL_SHARED,
+  OPTION_CREF,
+  OPTION_DEFSYM,
+  OPTION_DEMANGLE,
+  OPTION_DYNAMIC_LINKER,
+  OPTION_SYSROOT,
+  OPTION_EB,
+  OPTION_EL,
+  OPTION_EMBEDDED_RELOCS,
+  OPTION_EXPORT_DYNAMIC,
+  OPTION_NO_EXPORT_DYNAMIC,
+  OPTION_HELP,
+  OPTION_IGNORE,
+  OPTION_MAP,
+  OPTION_NO_DEMANGLE,
+  OPTION_NO_KEEP_MEMORY,
+  OPTION_NO_WARN_MISMATCH,
+  OPTION_NO_WARN_SEARCH_MISMATCH,
+  OPTION_NOINHIBIT_EXEC,
+  OPTION_NON_SHARED,
+  OPTION_NO_WHOLE_ARCHIVE,
+  OPTION_OFORMAT,
+  OPTION_RELAX,
+  OPTION_NO_RELAX,
+  OPTION_RETAIN_SYMBOLS_FILE,
+  OPTION_RPATH,
+  OPTION_RPATH_LINK,
+  OPTION_SHARED,
+  OPTION_SONAME,
+  OPTION_SORT_COMMON,
+  OPTION_SORT_SECTION,
+  OPTION_STATS,
+  OPTION_SYMBOLIC,
+  OPTION_SYMBOLIC_FUNCTIONS,
+  OPTION_TASK_LINK,
+  OPTION_TBSS,
+  OPTION_TDATA,
+  OPTION_TTEXT,
+  OPTION_TTEXT_SEGMENT,
+  OPTION_TRADITIONAL_FORMAT,
+  OPTION_UR,
+  OPTION_VERBOSE,
+  OPTION_VERSION,
+  OPTION_VERSION_SCRIPT,
+  OPTION_VERSION_EXPORTS_SECTION,
+  OPTION_DYNAMIC_LIST,
+  OPTION_DYNAMIC_LIST_CPP_NEW,
+  OPTION_DYNAMIC_LIST_CPP_TYPEINFO,
+  OPTION_DYNAMIC_LIST_DATA,
+  OPTION_WARN_COMMON,
+  OPTION_WARN_CONSTRUCTORS,
+  OPTION_WARN_FATAL,
+  OPTION_NO_WARN_FATAL,
+  OPTION_WARN_MULTIPLE_GP,
+  OPTION_WARN_ONCE,
+  OPTION_WARN_SECTION_ALIGN,
+  OPTION_SPLIT_BY_RELOC,
+  OPTION_SPLIT_BY_FILE ,
+  OPTION_WHOLE_ARCHIVE,
+  OPTION_ADD_DT_NEEDED_FOR_DYNAMIC,
+  OPTION_NO_ADD_DT_NEEDED_FOR_DYNAMIC,
+  OPTION_ADD_DT_NEEDED_FOR_REGULAR,
+  OPTION_NO_ADD_DT_NEEDED_FOR_REGULAR,
+  OPTION_WRAP,
+  OPTION_FORCE_EXE_SUFFIX,
+  OPTION_GC_SECTIONS,
+  OPTION_NO_GC_SECTIONS,
+  OPTION_PRINT_GC_SECTIONS,
+  OPTION_NO_PRINT_GC_SECTIONS,
+  OPTION_HASH_SIZE,
+  OPTION_CHECK_SECTIONS,
+  OPTION_NO_CHECK_SECTIONS,
+  OPTION_NO_UNDEFINED,
+  OPTION_INIT,
+  OPTION_FINI,
+  OPTION_SECTION_START,
+  OPTION_UNIQUE,
+  OPTION_TARGET_HELP,
+  OPTION_ALLOW_SHLIB_UNDEFINED,
+  OPTION_NO_ALLOW_SHLIB_UNDEFINED,
+  OPTION_ALLOW_MULTIPLE_DEFINITION,
+  OPTION_NO_UNDEFINED_VERSION,
+  OPTION_DEFAULT_SYMVER,
+  OPTION_DEFAULT_IMPORTED_SYMVER,
+  OPTION_DISCARD_NONE,
+  OPTION_SPARE_DYNAMIC_TAGS,
+  OPTION_NO_DEFINE_COMMON,
+  OPTION_NOSTDLIB,
+  OPTION_NO_OMAGIC,
+  OPTION_STRIP_DISCARDED,
+  OPTION_NO_STRIP_DISCARDED,
+  OPTION_ACCEPT_UNKNOWN_INPUT_ARCH,
+  OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH,
+  OPTION_PIE,
+  OPTION_UNRESOLVED_SYMBOLS,
+  OPTION_WARN_UNRESOLVED_SYMBOLS,
+  OPTION_ERROR_UNRESOLVED_SYMBOLS,
+  OPTION_WARN_SHARED_TEXTREL,
+  OPTION_WARN_ALTERNATE_EM,
+  OPTION_REDUCE_MEMORY_OVERHEADS,
+#ifdef ENABLE_PLUGINS
+  OPTION_PLUGIN,
+  OPTION_PLUGIN_OPT,
+#endif /* ENABLE_PLUGINS */
+  OPTION_DEFAULT_SCRIPT,
+  OPTION_PRINT_OUTPUT_FORMAT,
+};
+
 /* The initial parser states.  */
 typedef enum input_enum {
   input_selected,/* We've set the initial state.  */
Index: ld/lexsup.c
===================================================================
RCS file: /cvs/src/src/ld/lexsup.c,v
retrieving revision 1.131
diff -u -p -r1.131 lexsup.c
--- ld/lexsup.c26 Mar 2012 13:05:16 -00001.131
+++ ld/lexsup.c26 May 2012 05:58:08 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -62,119 +62,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void set_section_start (char *, c
 static void set_segment_start (const char *, char *);
 static void help (void);
 
-/* Codes used for the long options with no short synonyms.  150 isn't
-   special; it's just an arbitrary non-ASCII char value.  */
-enum option_values
-{
-  OPTION_ASSERT = 150,
-  OPTION_CALL_SHARED,
-  OPTION_CREF,
-  OPTION_DEFSYM,
-  OPTION_DEMANGLE,
-  OPTION_DYNAMIC_LINKER,
-  OPTION_SYSROOT,
-  OPTION_EB,
-  OPTION_EL,
-  OPTION_EMBEDDED_RELOCS,
-  OPTION_EXPORT_DYNAMIC,
-  OPTION_NO_EXPORT_DYNAMIC,
-  OPTION_HELP,
-  OPTION_IGNORE,
-  OPTION_MAP,
-  OPTION_NO_DEMANGLE,
-  OPTION_NO_KEEP_MEMORY,
-  OPTION_NO_WARN_MISMATCH,
-  OPTION_NO_WARN_SEARCH_MISMATCH,
-  OPTION_NOINHIBIT_EXEC,
-  OPTION_NON_SHARED,
-  OPTION_NO_WHOLE_ARCHIVE,
-  OPTION_OFORMAT,
-  OPTION_RELAX,
-  OPTION_NO_RELAX,
-  OPTION_RETAIN_SYMBOLS_FILE,
-  OPTION_RPATH,
-  OPTION_RPATH_LINK,
-  OPTION_SHARED,
-  OPTION_SONAME,
-  OPTION_SORT_COMMON,
-  OPTION_SORT_SECTION,
-  OPTION_STATS,
-  OPTION_SYMBOLIC,
-  OPTION_SYMBOLIC_FUNCTIONS,
-  OPTION_TASK_LINK,
-  OPTION_TBSS,
-  OPTION_TDATA,
-  OPTION_TTEXT,
-  OPTION_TTEXT_SEGMENT,
-  OPTION_TRADITIONAL_FORMAT,
-  OPTION_UR,
-  OPTION_VERBOSE,
-  OPTION_VERSION,
-  OPTION_VERSION_SCRIPT,
-  OPTION_VERSION_EXPORTS_SECTION,
-  OPTION_DYNAMIC_LIST,
-  OPTION_DYNAMIC_LIST_CPP_NEW,
-  OPTION_DYNAMIC_LIST_CPP_TYPEINFO,
-  OPTION_DYNAMIC_LIST_DATA,
-  OPTION_WARN_COMMON,
-  OPTION_WARN_CONSTRUCTORS,
-  OPTION_WARN_FATAL,
-  OPTION_NO_WARN_FATAL,
-  OPTION_WARN_MULTIPLE_GP,
-  OPTION_WARN_ONCE,
-  OPTION_WARN_SECTION_ALIGN,
-  OPTION_SPLIT_BY_RELOC,
-  OPTION_SPLIT_BY_FILE ,
-  OPTION_WHOLE_ARCHIVE,
-  OPTION_ADD_DT_NEEDED_FOR_DYNAMIC,
-  OPTION_NO_ADD_DT_NEEDED_FOR_DYNAMIC,
-  OPTION_ADD_DT_NEEDED_FOR_REGULAR,
-  OPTION_NO_ADD_DT_NEEDED_FOR_REGULAR,
-  OPTION_WRAP,
-  OPTION_FORCE_EXE_SUFFIX,
-  OPTION_GC_SECTIONS,
-  OPTION_NO_GC_SECTIONS,
-  OPTION_PRINT_GC_SECTIONS,
-  OPTION_NO_PRINT_GC_SECTIONS,
-  OPTION_HASH_SIZE,
-  OPTION_CHECK_SECTIONS,
-  OPTION_NO_CHECK_SECTIONS,
-  OPTION_NO_UNDEFINED,
-  OPTION_INIT,
-  OPTION_FINI,
-  OPTION_SECTION_START,
-  OPTION_UNIQUE,
-  OPTION_TARGET_HELP,
-  OPTION_ALLOW_SHLIB_UNDEFINED,
-  OPTION_NO_ALLOW_SHLIB_UNDEFINED,
-  OPTION_ALLOW_MULTIPLE_DEFINITION,
-  OPTION_NO_UNDEFINED_VERSION,
-  OPTION_DEFAULT_SYMVER,
-  OPTION_DEFAULT_IMPORTED_SYMVER,
-  OPTION_DISCARD_NONE,
-  OPTION_SPARE_DYNAMIC_TAGS,
-  OPTION_NO_DEFINE_COMMON,
-  OPTION_NOSTDLIB,
-  OPTION_NO_OMAGIC,
-  OPTION_STRIP_DISCARDED,
-  OPTION_NO_STRIP_DISCARDED,
-  OPTION_ACCEPT_UNKNOWN_INPUT_ARCH,
-  OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH,
-  OPTION_PIE,
-  OPTION_UNRESOLVED_SYMBOLS,
-  OPTION_WARN_UNRESOLVED_SYMBOLS,
-  OPTION_ERROR_UNRESOLVED_SYMBOLS,
-  OPTION_WARN_SHARED_TEXTREL,
-  OPTION_WARN_ALTERNATE_EM,
-  OPTION_REDUCE_MEMORY_OVERHEADS,
-#ifdef ENABLE_PLUGINS
-  OPTION_PLUGIN,
-  OPTION_PLUGIN_OPT,
-#endif /* ENABLE_PLUGINS */
-  OPTION_DEFAULT_SCRIPT,
-  OPTION_PRINT_OUTPUT_FORMAT,
-};
-
 /* The long options.  This structure is used for both the option
    parsing and the help text.  */
 
Index: ld/emultempl/ppc32elf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/ppc32elf.em,v
retrieving revision 1.26
diff -u -p -r1.26 ppc32elf.em
--- ld/emultempl/ppc32elf.em26 Jul 2011 01:57:18 -00001.26
+++ ld/emultempl/ppc32elf.em26 May 2012 05:58:08 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -27,6 +27,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fragment &amp;lt;&amp;lt;EOF
 
 #include "libbfd.h"
 #include "elf32-ppc.h"
+#include "ldlex.h"
 
 #define is_ppc_elf(bfd) \
   (bfd_get_flavour (bfd) == bfd_target_elf_flavour \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -237,6 +238,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LI
     case OPTION_OLD_GOT:
       old_got = 1;
       break;
+
+    case OPTION_TRADITIONAL_FORMAT:
+      notlsopt = 1;
+      no_tls_get_addr_opt = 1;
+      return FALSE;
 '
 
 # Put these extra ppc32elf routines in ld_${EMULATION_NAME}_emulation
Index: ld/emultempl/ppc64elf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/ppc64elf.em,v
retrieving revision 1.83
diff -u -p -r1.83 ppc64elf.em
--- ld/emultempl/ppc64elf.em14 May 2012 19:45:28 -00001.83
+++ ld/emultempl/ppc64elf.em26 May 2012 05:58:08 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -29,6 +29,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fragment &amp;lt;&amp;lt;EOF
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "elf64-ppc.h"
+#include "ldlex.h"
 
 /* Fake input file for stubs.  */
 static lang_input_statement_type *stub_file;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -850,6 +851,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LI
     case OPTION_NON_OVERLAPPING_OPD:
       non_overlapping_opd = 1;
       break;
+
+    case OPTION_TRADITIONAL_FORMAT:
+      no_tls_opt = 1;
+      no_tls_get_addr_opt = 1;
+      no_opd_opt = 1;
+      no_toc_opt = 1;
+      no_multi_toc = 1;
+      no_toc_sort = 1;
+      plt_static_chain = 1;
+      return FALSE;
 '
 
 # Put these extra ppc64elf routines in ld_${EMULATION_NAME}_emulation
Index: ld/testsuite/ld-srec/srec.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-srec/srec.exp,v
retrieving revision 1.38
diff -u -p -r1.38 srec.exp
--- ld/testsuite/ld-srec/srec.exp15 May 2012 12:55:48 -00001.38
+++ ld/testsuite/ld-srec/srec.exp26 May 2012 05:58:10 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -266,10 +266,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; proc run_srec_test { test objs } {
 set flags "$flags -no-relax"
     }
 
-    if [istarget powerpc64*-*-*] {
-set flags "$flags --no-toc-optimize"
-    }
-
     # Epiphany needs some help too
     if [istarget epiphany*-*-*] {
 set flags "$flags --defsym _start=00000060"

&lt;/pre&gt;</description>
    <dc:creator>Alan Modra</dc:creator>
    <dc:date>2012-05-26T11:16:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57728">
    <title>Simple bug fix in gold linker.</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57728</link>
    <description>&lt;pre&gt;Hi,

   Patch ok? This was causing an uninitialized variable error while building.

* symtab.cc (Symbol_table::add_undefined_symbol_from_command_line):
Initialize oldsym to prevent uninitialized variable errors.

  Index: symtab.cc
===================================================================
RCS file: /cvs/src/src/gold/symtab.cc,v
retrieving revision 1.165
diff -u -u -p -r1.165 symtab.cc
--- symtab.cc22 May 2012 23:50:52 -00001.165
+++ symtab.cc25 May 2012 21:40:38 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2345,7 +2345,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; Symbol_table::add_undefined_symbol_from_
   const char* version = NULL;

   Sized_symbol&amp;lt;size&amp;gt;* sym;
-  Sized_symbol&amp;lt;size&amp;gt;* oldsym;
+  Sized_symbol&amp;lt;size&amp;gt;* oldsym = NULL;
   bool resolve_oldsym;
   if (parameters-&amp;gt;target().is_big_endian())
     {


Thanks,
-Sri.

&lt;/pre&gt;</description>
    <dc:creator>Sriraman Tallam</dc:creator>
    <dc:date>2012-05-25T21:42:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57727">
    <title>PATCH: Don't use dynamic_sec_flags on PLT .eh_frame section</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57727</link>
    <description>&lt;pre&gt;Hi,

I checked in this patch not to use ynamic_sec_flags to create PLT
.eh_frame section.

H.J.
---
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 2165cd8..9834aab 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,3 +1,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+2012-05-25  H.J. Lu  &amp;lt;hongjiu.lu&amp;lt; at &amp;gt;intel.com&amp;gt;
+
+* elf32-i386.c (elf_i386_create_dynamic_sections): Don't use
+dynamic_sec_flags to create PLT .eh_frame section.
+* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
+
 2012-05-25  Alan Modra  &amp;lt;amodra&amp;lt; at &amp;gt;gmail.com&amp;gt;
 
 PR ld/13909
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 7b33d77..6aa386d 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1018,12 +1018,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_i386_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
       &amp;amp;&amp;amp; htab-&amp;gt;plt_eh_frame == NULL
       &amp;amp;&amp;amp; htab-&amp;gt;elf.splt != NULL)
     {
-      flagword flags = get_elf_backend_data (dynobj)-&amp;gt;dynamic_sec_flags;
+      flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
+| SEC_HAS_CONTENTS | SEC_IN_MEMORY
+| SEC_LINKER_CREATED);
       htab-&amp;gt;plt_eh_frame
-= bfd_make_section_anyway_with_flags (dynobj, ".eh_frame",
-      (flags
-       | SEC_LINKER_CREATED
-       | SEC_READONLY));
+= bfd_make_section_anyway_with_flags (dynobj, ".eh_frame", flags);
       if (htab-&amp;gt;plt_eh_frame == NULL
   || !bfd_set_section_alignment (dynobj, htab-&amp;gt;plt_eh_frame, 2))
 return FALSE;
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index abd8d60..5614aa2 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -982,12 +982,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_x86_64_create_dynamic_sections (bfd *dynobj,
       &amp;amp;&amp;amp; htab-&amp;gt;plt_eh_frame == NULL
       &amp;amp;&amp;amp; htab-&amp;gt;elf.splt != NULL)
     {
-      flagword flags = get_elf_backend_data (dynobj)-&amp;gt;dynamic_sec_flags;
+      flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
+| SEC_HAS_CONTENTS | SEC_IN_MEMORY
+| SEC_LINKER_CREATED);
       htab-&amp;gt;plt_eh_frame
-= bfd_make_section_anyway_with_flags (dynobj, ".eh_frame",
-      (flags
-       | SEC_LINKER_CREATED
-       | SEC_READONLY));
+= bfd_make_section_anyway_with_flags (dynobj, ".eh_frame", flags);
       if (htab-&amp;gt;plt_eh_frame == NULL
   || !bfd_set_section_alignment (dynobj, htab-&amp;gt;plt_eh_frame, 3))
 return FALSE;

&lt;/pre&gt;</description>
    <dc:creator>H.J. Lu</dc:creator>
    <dc:date>2012-05-25T16:20:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57724">
    <title>RFA: always close fd if bfd_fopen fails</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57724</link>
    <description>&lt;pre&gt;Currently, bfd_fopen has confused error handling.

If the caller passes in a file descriptor, then on any error exit before
fdopen is called, the fd will be left open; but on any error exit after
fdopen is called, the fd will be closed.

This patch changes bfd_fopen to always close the fd on error.

I audited all callers of bfd_fopen and bfd_fdopen in gdb, binutils, and
ld and fixed them not to close the fd on error.  There was only one call
outside of gdb, in ar.c, and it immediately calls bfd_fatal, and so does
not need a change.

Ok?

Tom

b/bfd/ChangeLog:
2012-05-25  Tom Tromey  &amp;lt;tromey&amp;lt; at &amp;gt;redhat.com&amp;gt;

* opncls.c (bfd_fopen): Always close fd on failure.
(bfd_fdopenr): Likewise.

b/gdb/ChangeLog:
2012-05-25  Tom Tromey  &amp;lt;tromey&amp;lt; at &amp;gt;redhat.com&amp;gt;

* symfile.c (symfile_bfd_open): Don't close desc if bfd_fopen
fails.
* solib.c (solib_bfd_fopen): Don't close fd if bfd_fopen fails.
* exec.c (exec_file_attach): Don't close scratch_chan if bfd_fopen
fails.
* dwarf2read.c (try_open_dwo_file): Don't close fd if bfd_fopen
fails.

diff --git a/bfd/opncls.c b/bfd/opncls.c
index 9d33f39..7c1d2f9 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,6 +1,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /* opncls.c -- open and close a BFD.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
-   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012
    Free Software Foundation, Inc.
 
    Written by Cygnus Support.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -190,6 +190,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; DESCRIPTION
 If &amp;lt;&amp;lt;NULL&amp;gt;&amp;gt; is returned then an error has occured.   Possible errors
 are &amp;lt;&amp;lt;bfd_error_no_memory&amp;gt;&amp;gt;, &amp;lt;&amp;lt;bfd_error_invalid_target&amp;gt;&amp;gt; or
 &amp;lt;&amp;lt;system_call&amp;gt;&amp;gt; error.
+
+On error, &amp;lt; at &amp;gt;var{fd} is always closed.
 */
 
 bfd *
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -200,11 +202,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; bfd_fopen (const char *filename, const char *target, const char *mode, int fd)
 
   nbfd = _bfd_new_bfd ();
   if (nbfd == NULL)
-    return NULL;
+    {
+      if (fd != -1)
+close (fd);
+      return NULL;
+    }
 
   target_vec = bfd_find_target (target, nbfd);
   if (target_vec == NULL)
     {
+      if (fd != -1)
+close (fd);
       _bfd_delete_bfd (nbfd);
       return NULL;
     }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -307,6 +315,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; DESCRIPTION
 
 Possible errors are &amp;lt;&amp;lt;bfd_error_no_memory&amp;gt;&amp;gt;,
 &amp;lt;&amp;lt;bfd_error_invalid_target&amp;gt;&amp;gt; and &amp;lt;&amp;lt;bfd_error_system_call&amp;gt;&amp;gt;.
+
+On error, &amp;lt; at &amp;gt;var{fd} is closed.
 */
 
 bfd *
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -323,6 +333,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; bfd_fdopenr (const char *filename, const char *target, int fd)
   fdflags = fcntl (fd, F_GETFL, NULL);
   if (fdflags == -1)
     {
+      int save = errno;
+
+      close (fd);
+      errno = save;
       bfd_set_error (bfd_error_system_call);
       return NULL;
     }
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 53100c5..8dbc53e 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6957,7 +6957,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; try_open_dwo_file (const char *file_name)
   sym_bfd = bfd_fopen (absolute_name, gnutarget, FOPEN_RB, desc);
   if (!sym_bfd)
     {
-      close (desc);
       xfree (absolute_name);
       return NULL;
     }
diff --git a/gdb/exec.c b/gdb/exec.c
index 58fb55e..6ba1986 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -238,7 +238,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; exec_file_attach (char *filename, int from_tty)
 
       if (!exec_bfd)
 {
-  close (scratch_chan);
   error (_("\"%s\": could not open as an executable file: %s"),
  scratch_pathname, bfd_errmsg (bfd_get_error ()));
 }
diff --git a/gdb/solib.c b/gdb/solib.c
index 656e8df..90439ba 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -380,8 +380,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; solib_bfd_fopen (char *pathname, int fd)
 
       if (abfd)
 bfd_set_cacheable (abfd, 1);
-      else if (fd != -1)
-close (fd);
     }
 
   if (!abfd)
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 416d35d..31da4e4 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1764,7 +1764,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; symfile_bfd_open (char *name)
   sym_bfd = bfd_fopen (name, gnutarget, FOPEN_RB, desc);
   if (!sym_bfd)
     {
-      close (desc);
       make_cleanup (xfree, name);
       error (_("`%s': can't open to read symbols: %s."), name,
      bfd_errmsg (bfd_get_error ()));

&lt;/pre&gt;</description>
    <dc:creator>Tom Tromey</dc:creator>
    <dc:date>2012-05-25T13:52:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57720">
    <title>Binutils bug with -Wl,--relax</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57720</link>
    <description>&lt;pre&gt;Hi Richard,

I began testing gcc-4.7.0 today on alpha and remembered that &amp;gt;=gcc-4.6
cannot build itself on alpha without passing -Wl,--no-relax.

See http://sources.redhat.com/bugzilla/show_bug.cgi?id=5276

We (Gentoo) have work-arounds in place for a number of large projects.

Can you offer any insight or assistance?

Thanks,
Matt

&lt;/pre&gt;</description>
    <dc:creator>Matt Turner</dc:creator>
    <dc:date>2012-05-25T02:07:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57718">
    <title>lns-big-delta gas test</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57718</link>
    <description>&lt;pre&gt;gas/lns/lns-big-delta has been failing on xtensa (the only target to
run this test) since Richard's 2011-09-05 change to gas/dwarf2dbg.c.
I reckon the test itself is somewhat suspect, since .loc specifies
line number info for instructions, and the test has no instructions
(unless you count .space as an instruction).  So, let's fix the test.

I'm not hugely concerned, but the old test does illustrate some
problems with queuing line info:  We don't emit queued line info if
.loc is not followed by an insn or label (no line info at all for the
old test), and perhaps the queue should be flushed on pseudos like
.space that bump pc?  gcc asm can do all sorts of weird tricks.  eg.

int foo (void)
{
  __asm__ (".p2align 8");
  return 0;
}

results in

        .loc 1 3 0
#APP
# 3 "/src/tmp/asmloc.c" 1
        .p2align 8
# 0 "" 2
        .loc 1 4 0
#NO_APP
        movl    $0, %eax

so with queuing, the ".p2align" loses its line number info to the
"movl".  Thoughts?

* gas/lns/lns-big-delta.s: Add nops.
* gas/lns/lns-big-delta.d: Update.

Index: gas/testsuite/gas/lns/lns-big-delta.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/lns/lns-big-delta.s,v
retrieving revision 1.1
diff -u -p -r1.1 lns-big-delta.s
--- gas/testsuite/gas/lns/lns-big-delta.s9 Jan 2008 17:30:59 -00001.1
+++ gas/testsuite/gas/lns/lns-big-delta.s24 May 2012 14:39:47 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,5 +1,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 .file 1 "foo.c"
 .loc 1 1 0
 .loc 1 2 0
+nop
+nop
 .space75000
 .loc 1 3 0
+nop
+nop
Index: gas/testsuite/gas/lns/lns-big-delta.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/lns/lns-big-delta.d,v
retrieving revision 1.2
diff -u -p -r1.2 lns-big-delta.d
--- gas/testsuite/gas/lns/lns-big-delta.d11 Apr 2008 17:51:15 -00001.2
+++ gas/testsuite/gas/lns/lns-big-delta.d24 May 2012 14:39:47 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4,11 +4,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 Raw dump of debug contents of section \.debug_line:
 #...
  Line Number Statements:
-  Extended opcode 2: set Address to .*
+  Extended opcode 2: set Address to 0x0
   Copy
   Advance Line by 1 to 2
-  Extended opcode 2: set Address to .*
+  Advance PC by fixed size amount 0 to 0x0
   Copy
-  Advance PC by fixed size amount 0 to .*
+  Advance Line by 1 to 3
+  Extended opcode 2: set Address to 0x124fc
+  Copy
+  Advance PC by fixed size amount 4 to 0x12500
   Extended opcode 1: End of Sequence
 #pass

&lt;/pre&gt;</description>
    <dc:creator>Alan Modra</dc:creator>
    <dc:date>2012-05-24T15:35:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57712">
    <title>pr14158, hole in powerpc64 .eh_frame</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57712</link>
    <description>&lt;pre&gt;PowerPC64 linker generated .eh_frame for PLT call stubs uses
DW_EH_PE_pcrel | DW_EH_PE_sdata4 encoding for addresses, and thus
aligns .eh_frame to 4 bytes.  Current gcc uses the same encoding, but
probably because gcc hasn't changed its .eh_frame alignment from the
days it generated 8-byte addresses, aligns to 8 bytes.  This means ld
will insert padding between the linker generated .eh_frame and user
.eh_frame sections.  The padding is seen as a terminator, which breaks
exception handling for anyone not reading the FDEs via .eh_frame_hdr.
The common case of course is to call ld with --eh-frame-hdr, which is
why I hadn't seen this problem until now.

PR ld/14158
* elf64-ppc.c (ppc64_elf_size_stubs): Round up glink_eh_frame
size to output section alignment.
(ppc64_elf_build_stubs): Likewise, and extend last FDE to cover.

Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.383
diff -u -p -r1.383 elf64-ppc.c
--- bfd/elf64-ppc.c17 May 2012 02:43:34 -00001.383
+++ bfd/elf64-ppc.c24 May 2012 04:49:55 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -11664,7 +11664,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; ppc64_elf_size_stubs (struct bfd_link_in
   &amp;amp;&amp;amp; !bfd_is_abs_section (htab-&amp;gt;glink_eh_frame-&amp;gt;output_section)
   &amp;amp;&amp;amp; (htab-&amp;gt;glink_eh_frame-&amp;gt;flags &amp;amp; SEC_EXCLUDE) == 0)
 {
-  bfd_size_type size = 0;
+  size_t size = 0, align;
 
   for (stub_sec = htab-&amp;gt;stub_bfd-&amp;gt;sections;
        stub_sec != NULL;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -11675,6 +11675,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; ppc64_elf_size_stubs (struct bfd_link_in
     size += 24;
   if (size != 0)
     size += sizeof (glink_eh_frame_cie);
+  align = 1;
+  align &amp;lt;&amp;lt;= htab-&amp;gt;glink_eh_frame-&amp;gt;output_section-&amp;gt;alignment_power;
+  align -= 1;
+  size = (size + align) &amp;amp; ~align;
   htab-&amp;gt;glink_eh_frame-&amp;gt;rawsize = htab-&amp;gt;glink_eh_frame-&amp;gt;size;
   htab-&amp;gt;glink_eh_frame-&amp;gt;size = size;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -11916,17 +11920,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; ppc64_elf_build_stubs (bfd_boolean emit_
       &amp;amp;&amp;amp; htab-&amp;gt;glink_eh_frame-&amp;gt;size != 0)
     {
       bfd_vma val;
+      bfd_byte *last_fde;
+      size_t last_fde_len, size, align, pad;
 
       p = bfd_zalloc (htab-&amp;gt;glink_eh_frame-&amp;gt;owner, htab-&amp;gt;glink_eh_frame-&amp;gt;size);
       if (p == NULL)
 return FALSE;
       htab-&amp;gt;glink_eh_frame-&amp;gt;contents = p;
+      last_fde = p;
 
       htab-&amp;gt;glink_eh_frame-&amp;gt;rawsize = htab-&amp;gt;glink_eh_frame-&amp;gt;size;
 
       memcpy (p, glink_eh_frame_cie, sizeof (glink_eh_frame_cie));
       /* CIE length (rewrite in case little-endian).  */
-      bfd_put_32 (htab-&amp;gt;elf.dynobj, sizeof (glink_eh_frame_cie) - 4, p);
+      last_fde_len = sizeof (glink_eh_frame_cie) - 4;
+      bfd_put_32 (htab-&amp;gt;elf.dynobj, last_fde_len, p);
       p += sizeof (glink_eh_frame_cie);
 
       for (stub_sec = htab-&amp;gt;stub_bfd-&amp;gt;sections;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -11934,6 +11942,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; ppc64_elf_build_stubs (bfd_boolean emit_
    stub_sec = stub_sec-&amp;gt;next)
 if ((stub_sec-&amp;gt;flags &amp;amp; SEC_LINKER_CREATED) == 0)
   {
+    last_fde = p;
+    last_fde_len = 16;
     /* FDE length.  */
     bfd_put_32 (htab-&amp;gt;elf.dynobj, 16, p);
     p += 4;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -11966,6 +11976,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; ppc64_elf_build_stubs (bfd_boolean emit_
   }
       if (htab-&amp;gt;glink != NULL &amp;amp;&amp;amp; htab-&amp;gt;glink-&amp;gt;size != 0)
 {
+  last_fde = p;
+  last_fde_len = 20;
   /* FDE length.  */
   bfd_put_32 (htab-&amp;gt;elf.dynobj, 20, p);
   p += 4;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -12003,7 +12015,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; ppc64_elf_build_stubs (bfd_boolean emit_
   *p++ = DW_CFA_restore_extended;
   *p++ = 65;
 }
-      htab-&amp;gt;glink_eh_frame-&amp;gt;size = p - htab-&amp;gt;glink_eh_frame-&amp;gt;contents;
+      /* Subsume any padding into the last FDE if user .eh_frame
+ sections are aligned more than glink_eh_frame.  Otherwise any
+ zero padding will be seen as a terminator.  */
+      size = p - htab-&amp;gt;glink_eh_frame-&amp;gt;contents;
+      align = 1;
+      align &amp;lt;&amp;lt;= htab-&amp;gt;glink_eh_frame-&amp;gt;output_section-&amp;gt;alignment_power;
+      align -= 1;
+      pad = ((size + align) &amp;amp; ~align) - size;
+      htab-&amp;gt;glink_eh_frame-&amp;gt;size = size + pad;
+      bfd_put_32 (htab-&amp;gt;elf.dynobj, last_fde_len + pad, last_fde);
     }
 
   /* Build the stubs as directed by the stub hash table.  */

&lt;/pre&gt;</description>
    <dc:creator>Alan Modra</dc:creator>
    <dc:date>2012-05-24T06:20:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57702">
    <title>[gold patch] Fix gold to match .data.rel.ro sections more carefully</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57702</link>
    <description>&lt;pre&gt;This patch fixes gold, which has the same problem placing
.data.rel.rome (for example) in the .data.rel.ro section.

Tested on x86_64.

OK to commit?

-cary


2012-05-23  Cary Coutant  &amp;lt;ccoutant&amp;lt; at &amp;gt;google.com&amp;gt;

gold/
* layout.cc (Layout::section_name_mapping): Match .data.rel.ro.*
more carefully.


commit 4055988862278017c0564c81e8cee7fd001e6507
Author: Cary Coutant &amp;lt;ccoutant&amp;lt; at &amp;gt;google.com&amp;gt;
Date:   Wed May 23 11:44:38 2012 -0700

    Fix handling of .data.rel.ro* vs. .data.rel.ro.* sections.

diff --git a/gold/layout.cc b/gold/layout.cc
index 0ac0fbf..e9aeef5 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4573,8 +4573,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; const Layout::Section_name_mapping
Layout::section_name_mapping[] =
 {
   MAPPING_INIT(".text.", ".text"),
   MAPPING_INIT(".rodata.", ".rodata"),
-  MAPPING_INIT(".data.rel.ro.local", ".data.rel.ro.local"),
-  MAPPING_INIT(".data.rel.ro", ".data.rel.ro"),
+  MAPPING_INIT(".data.rel.ro.local.", ".data.rel.ro.local"),
+  MAPPING_INIT(".data.rel.ro.", ".data.rel.ro"),
   MAPPING_INIT(".data.", ".data"),
   MAPPING_INIT(".bss.", ".bss"),
   MAPPING_INIT(".tdata.", ".tdata"),

&lt;/pre&gt;</description>
    <dc:creator>Cary Coutant</dc:creator>
    <dc:date>2012-05-23T19:05:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57701">
    <title>[patch] Fix ld to match .data.rel.ro sections more carefully</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57701</link>
    <description>&lt;pre&gt;Both GNU ld and gold share a problem where a variable whose name
begins with "ro" might accidentally end up in a RELRO segment. Compile
the following test program with -fpic -fdata-sections:

#include &amp;lt;stdio.h&amp;gt;

char p[] = "Paris";
char r[] = "Rome";
char l[] = "London";

const char * const paris = p;
const char * rome = r;
const char * london = l;

int main()
{
  printf("%s\n", paris);
  printf("%s\n", london);
  london = "England";
  printf("%s\n", london);
  printf("%s\n", rome);
  rome = "Italy";
  printf("%s\n", rome);
  return 0;
}

The variable "rome" is placed in a data section named
".data.rel.rome", and that matches the pattern that ld uses to place
input sections into .data.rel.ro, which then gets placed in the RELRO
segment, and the program segfaults when trying to assign to "rome".

The attached patch fixes this by matching ".data.rel.ro" and
".data.rel.ro.*" separately (a pattern used for most other similar
cases, but not for the relro sections), and likewise for the
corresponding relocation sections.

Along the way, I found a typo in armbpabi.sc and mep.sc where the
pattern for .rela.data.rel.ro had ".rel.data.rel.ro" ("rel" instead of
"rela").

Tested on x86_64. OK to install?

-cary


2012-05-23  Cary Coutant  &amp;lt;ccoutant&amp;lt; at &amp;gt;google.com&amp;gt;

ld/
* scripttempl/armbpabi.sc: Match .data.rel.ro.* sections more
carefully.  Fix typo where .rela.data.rel.ro matches
.rel.data.rel.ro.
* scripttempl/mep.sc: Likewise.
* scripttempl/elf.sc: Match .data.rel.ro.* sections more carefully.
* scripttempl/elf64hppa.sc: Likewise.
* scripttempl/elfxtensa.sc: Likewise.
2012-05-23  Cary Coutant  &amp;lt;ccoutant&amp;lt; at &amp;gt;google.com&amp;gt;

ld/
* scripttempl/armbpabi.sc: Match .data.rel.ro.* sections more
carefully.  Fix typo where .rela.data.rel.ro matches
.rel.data.rel.ro.
* scripttempl/mep.sc: Likewise.
* scripttempl/elf.sc: Match .data.rel.ro.* sections more carefully.
* scripttempl/elf64hppa.sc: Likewise.
* scripttempl/elfxtensa.sc: Likewise.


commit 8645b4433b06db38940160c5357fc82221fa49b3
Author: Cary Coutant &amp;lt;ccoutant&amp;lt; at &amp;gt;google.com&amp;gt;
Date:   Wed May 23 11:44:17 2012 -0700

    Fix handling of .data.rel.ro* vs. .data.rel.ro.* sections.

diff --git a/ld/scripttempl/armbpabi.sc b/ld/scripttempl/armbpabi.sc
index 8b3ea0a..ea01ce2 100644
--- a/ld/scripttempl/armbpabi.sc
+++ b/ld/scripttempl/armbpabi.sc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -29,7 +29,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fi
 INTERP=".interp       0 : { *(.interp) }"
 PLT=".plt          ${RELOCATING-0} : { *(.plt) }"
 RODATA=".rodata       ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
-DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }"
+DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro .data.rel.ro.*) }"
 DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink)  *(.gnu.lto_*) }"
 if test -z "${NO_SMALL_DATA}"; then
   SBSS=".sbss         ${RELOCATING-0} :
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -380,8 +380,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; eval $COMBRELOCCAT &amp;lt;&amp;lt;EOF
   .rel.rodata   0 : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
   .rela.rodata  0 : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
   ${OTHER_READONLY_RELOC_SECTIONS}
-  .rel.data.rel.ro 0 : { *(.rel.data.rel.ro${RELOCATING+*}) }
-  .rela.data.rel.ro 0 : { *(.rel.data.rel.ro${RELOCATING+*}) }
+  .rel.data.rel.ro 0 : { *(.rel.data.rel.ro${RELOCATING+ .rel.data.rel.ro.*}) }
+  .rela.data.rel.ro 0 : { *(.rela.data.rel.ro${RELOCATING+ .rela.data.rel.ro.*}) }
   .rel.data     0 : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
   .rela.data    0 : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
   .rel.tdata0 : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index 5796b0a..37a3124 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -157,7 +157,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; RELA_IPLT=".rela.iplt    ${RELOCATING-0} :
     }"
 DYNAMIC=".dynamic      ${RELOCATING-0} : { *(.dynamic) }"
 RODATA=".${RODATA_NAME}       ${RELOCATING-0} : { *(.${RODATA_NAME}${RELOCATING+ .${RODATA_NAME}.* .gnu.linkonce.r.*}) }"
-DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }"
+DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }"
 DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }"
 if test -z "${NO_SMALL_DATA}"; then
   SBSS=".${SBSS_NAME}         ${RELOCATING-0} :
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -377,8 +377,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; eval $COMBRELOCCAT &amp;lt;&amp;lt;EOF
   .rel.${RODATA_NAME}   ${RELOCATING-0} : { *(.rel.${RODATA_NAME}${RELOCATING+ .rel.${RODATA_NAME}.* .rel.gnu.linkonce.r.*}) }
   .rela.${RODATA_NAME}  ${RELOCATING-0} : { *(.rela.${RODATA_NAME}${RELOCATING+ .rela.${RODATA_NAME}.* .rela.gnu.linkonce.r.*}) }
   ${OTHER_READONLY_RELOC_SECTIONS}
-  .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+* .rel.gnu.linkonce.d.rel.ro.*}) }
-  .rela.data.rel.ro ${RELOCATING-0} : { *(.rela.data.rel.ro${RELOCATING+* .rela.gnu.linkonce.d.rel.ro.*}) }
+  .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+ .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*}) }
+  .rela.data.rel.ro ${RELOCATING-0} : { *(.rela.data.rel.ro${RELOCATING+ .rela.data.rel.ro.* .rela.gnu.linkonce.d.rel.ro.*}) }
   .rel.data     ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
   .rela.data    ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
   ${OTHER_READWRITE_RELOC_SECTIONS}
diff --git a/ld/scripttempl/elf64hppa.sc b/ld/scripttempl/elf64hppa.sc
index 584192a..136156d 100644
--- a/ld/scripttempl/elf64hppa.sc
+++ b/ld/scripttempl/elf64hppa.sc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -126,7 +126,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; if test -z "$GOT"; then
 fi
 DYNAMIC=".dynamic      ${RELOCATING-0} : { *(.dynamic) }"
 RODATA=".rodata       ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
-DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }"
+DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }"
 DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink)  *(.gnu.lto_*) }"
 if test -z "${NO_SMALL_DATA}"; then
   SBSS=".sbss         ${RELOCATING-0} :
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -318,8 +318,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; eval $COMBRELOCCAT &amp;lt;&amp;lt;EOF
   .rel.rodata   ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
   .rela.rodata  ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
   ${OTHER_READONLY_RELOC_SECTIONS}
-  .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+* .rel.gnu.linkonce.d.rel.ro.*}) }
-  .rela.data.rel.ro ${RELOCATING-0} : { *(.rela.data.rel.ro${RELOCATING+* .rela.gnu.linkonce.d.rel.ro.*}) }
+  .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+ .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*}) }
+  .rela.data.rel.ro ${RELOCATING-0} : { *(.rela.data.rel.ro${RELOCATING+ .rela.data.rel.ro.* .rela.gnu.linkonce.d.rel.ro.*}) }
   .rel.data     ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
   .rela.data    ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
   .rel.tdata${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
diff --git a/ld/scripttempl/elfxtensa.sc b/ld/scripttempl/elfxtensa.sc
index 53cec71..f9e5745 100644
--- a/ld/scripttempl/elfxtensa.sc
+++ b/ld/scripttempl/elfxtensa.sc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -139,7 +139,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; if test -z "$GOT"; then
 fi
 DYNAMIC=".dynamic      ${RELOCATING-0} : { *(.dynamic) }"
 RODATA=".rodata       ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
-DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }"
+DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }"
 DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink)  *(.gnu.lto_*) }"
 INIT_LIT=".init.literal 0 : { *(.init.literal)}"
 INIT=".init         0 : { *(.init)}"
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -329,8 +329,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; eval $COMBRELOCCAT &amp;lt;&amp;lt;EOF
   .rel.rodata   ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
   .rela.rodata  ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
   ${OTHER_READONLY_RELOC_SECTIONS}
-  .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+* .rel.gnu.linkonce.d.rel.ro.*}) }
-  .rela.data.rel.ro ${RELOCATING-0} : { *(.rela.data.rel.ro${RELOCATING+* .rela.gnu.linkonce.d.rel.ro.*}) }
+  .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+ .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*}) }
+  .rela.data.rel.ro ${RELOCATING-0} : { *(.rela.data.rel.ro${RELOCATING+ .rela.data.rel.ro.* .rela.gnu.linkonce.d.rel.ro.*}) }
   .rel.data     ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
   .rela.data    ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
   .rel.tdata${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
diff --git a/ld/scripttempl/mep.sc b/ld/scripttempl/mep.sc
index e61342d..23b6c54 100644
--- a/ld/scripttempl/mep.sc
+++ b/ld/scripttempl/mep.sc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -113,7 +113,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; if test -z "$GOT"; then
 fi
 DYNAMIC=".dynamic      ${RELOCATING-0} : { *(.dynamic) }"
 RODATA=".rodata       ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
-DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }"
+DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro .data.rel.ro.*) }"
 DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink)  *(.gnu.lto_*) }"
 if test -z "${NO_SMALL_DATA}"; then
   SBSS=".sbss         ${RELOCATING-0} :
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -245,8 +245,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; eval $COMBRELOCCAT &amp;lt;&amp;lt;EOF
   .rel.rodata   ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
   .rela.rodata  ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
   ${OTHER_READONLY_RELOC_SECTIONS}
-  .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
-  .rela.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
+  .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+ .rel.data.rel.ro.*}) }
+  .rela.data.rel.ro ${RELOCATING-0} : { *(.rela.data.rel.ro${RELOCATING+ .rela.data.rel.ro.*}) }
   .rel.data     ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
   .rela.data    ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
   .rel.tdata${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
&lt;/pre&gt;</description>
    <dc:creator>Cary Coutant</dc:creator>
    <dc:date>2012-05-23T18:58:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57698">
    <title>[RFA] leb128.h: Umm, how about int64_t?</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57698</link>
    <description>&lt;pre&gt;It turns out gdb can't use long long but it can use {,u}int64_t.

[Insert lament that we're debating whether to switch to C++ and yet
we can't even use C99. :-(]

I opted for renaming the functions instead of adding new ones
since there'd be no current users.  I left adding the long long
versions back for when there's an actual need for them.

Ok to check in?

2012-05-23  Doug Evans  &amp;lt;dje&amp;lt; at &amp;gt;google.com&amp;gt;

* leb128.h: #include stdint.h, inttypes.h.
(read_uleb128_to_uint64): Renamed from read_uleb128_to_ull.
Change to take a uint64_t * argument instead of unsigned long long.
(read_sleb128_to_uint64): Renamed from read_sleb128_to_ll.
Change to take an int64_t * argument instead of long long.

Index: leb128.h
===================================================================
RCS file: /cvs/src/src/include/leb128.h,v
retrieving revision 1.1
diff -u -p -r1.1 leb128.h
--- leb128.h22 May 2012 18:05:30 -00001.1
+++ leb128.h23 May 2012 16:27:53 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -19,7 +19,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; Boston, MA 02110-1301, USA.  */
 
 /* The functions defined here can be speed critical.
    Since they are all pretty small we keep things simple and just define
-   them all as "static inline".  */
+   them all as "static inline".
+
+   WARNING: This file is used by GDB which is stuck at C90. :-(
+   Though it can use stdint.h, inttypes.h.
+   Therefore if you want to add support for "long long" you need
+   to wrap it in #ifdef CC_HAS_LONG_LONG.  */
 
 #ifndef LEB128_H
 #define LEB128_H
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -30,6 +35,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; Boston, MA 02110-1301, USA.  */
 /* Get a definition for NULL, size_t.  */
 #include &amp;lt;stddef.h&amp;gt;
 
+#ifdef HAVE_STDINT_H
+#include &amp;lt;stdint.h&amp;gt;
+#endif
+#ifdef HAVE_INTTYPES_H
+#include &amp;lt;inttypes.h&amp;gt;
+#endif
+
 /* Decode the unsigned LEB128 constant at BUF into the variable pointed to
    by R, and return the number of bytes read.
    If we read off the end of the buffer, zero is returned,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -39,12 +51,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; Boston, MA 02110-1301, USA.  */
    read to avoid const-vs-non-const problems.  */
 
 static inline size_t
-read_uleb128_to_ull (const unsigned char *buf, const unsigned char *buf_end,
-     unsigned long long *r)
+read_uleb128_to_uint64 (const unsigned char *buf, const unsigned char *buf_end,
+uint64_t *r)
 {
   const unsigned char *p = buf;
   unsigned int shift = 0;
-  unsigned long long result = 0;
+  uint64_t result = 0;
   unsigned char byte;
 
   while (1)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -53,7 +65,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; read_uleb128_to_ull (const unsigned char
 return 0;
 
       byte = *p++;
-      result |= ((unsigned long long) (byte &amp;amp; 0x7f)) &amp;lt;&amp;lt; shift;
+      result |= ((uint64_t) (byte &amp;amp; 0x7f)) &amp;lt;&amp;lt; shift;
       if ((byte &amp;amp; 0x80) == 0)
 break;
       shift += 7;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -72,12 +84,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; read_uleb128_to_ull (const unsigned char
    read to avoid const-vs-non-const problems.  */
 
 static inline size_t
-read_sleb128_to_ll (const unsigned char *buf, const unsigned char *buf_end,
-    long long *r)
+read_sleb128_to_int64 (const unsigned char *buf, const unsigned char *buf_end,
+       int64_t *r)
 {
   const unsigned char *p = buf;
   unsigned int shift = 0;
-  long long result = 0;
+  int64_t result = 0;
   unsigned char byte;
 
   while (1)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -86,13 +98,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; read_sleb128_to_ll (const unsigned char 
 return 0;
 
       byte = *p++;
-      result |= ((unsigned long long) (byte &amp;amp; 0x7f)) &amp;lt;&amp;lt; shift;
+      result |= ((uint64_t) (byte &amp;amp; 0x7f)) &amp;lt;&amp;lt; shift;
       shift += 7;
       if ((byte &amp;amp; 0x80) == 0)
 break;
     }
   if (shift &amp;lt; (sizeof (*r) * 8) &amp;amp;&amp;amp; (byte &amp;amp; 0x40) != 0)
-    result |= -(((unsigned long long) 1) &amp;lt;&amp;lt; shift);
+    result |= -(((uint64_t) 1) &amp;lt;&amp;lt; shift);
 
   *r = result;
   return p - buf;

&lt;/pre&gt;</description>
    <dc:creator>Doug Evans</dc:creator>
    <dc:date>2012-05-23T16:41:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57697">
    <title>[Patch,AVR] Support instrucions XCH, LAT, LAC, LAS</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57697</link>
    <description>&lt;pre&gt;This patch adds support for the XMEGA atomic memory instructions

o exchange
o load-and-set
o load-and-clear
o load-and-toggle


Johann


include/
* opcode/avr.h (AVR_ISA_XCH): New define.
(AVR_ISA_XMEGA): Use it.
(XCH, LAS, LAT, LAC): New XMEGA opcodes.
&lt;/pre&gt;</description>
    <dc:creator>Georg-Johann Lay</dc:creator>
    <dc:date>2012-05-23T16:15:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57693">
    <title>RFC: Displaying multibyte symbol names in readelf</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57693</link>
    <description>&lt;pre&gt;Hi Guys,

  I am planning to apply the patch below to enhance readelf so that it
  can display symbol names that contain multibyte characters.  Currently
  such characters are displayed as a sequence of hex-bytes.  With the
  patch applied the actual multibyte characters will be displayed
  provided that the user's terminal and environment settings support
  them.

  Does anyone have any objections or questions concerning adding such a
  feature ?

Cheers
  Nick
    
binutils/ChangeLog
2012-05-23  Nick Clifton  &amp;lt;nickc&amp;lt; at &amp;gt;redhat.com&amp;gt;

* readelf.c (print_symbol): Display multibyte characters.
  
Index: binutils/readelf.c
===================================================================
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.573
diff -u -3 -p -r1.573 readelf.c
--- binutils/readelf.c15 May 2012 12:55:49 -00001.573
+++ binutils/readelf.c23 May 2012 07:33:30 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -48,6 +48,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #ifdef HAVE_ZLIB_H
 #include &amp;lt;zlib.h&amp;gt;
 #endif
+#include &amp;lt;wchar.h&amp;gt;
 
 #if __GNUC__ &amp;gt;= 2
 /* Define BFD64 here, even if our default architecture is 32 bit ELF
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -383,25 +384,27 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; print_vma (bfd_vma vma, print_mode mode)
   return 0;
 }
 
-/* Display a symbol on stdout.  Handles the display of non-printing characters.
+/* Display a symbol on stdout.  Handles the display of control characters and
+   multibye characters.
 
    If DO_WIDE is not true then format the symbol to be at most WIDTH characters,
    truncating as necessary.  If WIDTH is negative then format the string to be
-   exactly - WIDTH characters, truncating or padding as necessary.
+   exactly (- WIDTH) characters, truncating or padding as necessary.
 
    Returns the number of emitted characters.  */
 
 static unsigned int
 print_symbol (int width, const char *symbol)
 {
-  const char *c;
   bfd_boolean extra_padding = FALSE;
   unsigned int num_printed = 0;
+  bfd_boolean multibyte_ok;
+  mbstate_t state;
 
   if (do_wide)
     {
-      /* Set the width to a very large value.  This simplifies the
- code below.  */
+      /* Set the width to a very large value.
+ This simplifies the code below.  */
       width = INT_MAX;
     }
   else if (width &amp;lt; 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -411,65 +414,68 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; print_symbol (int width, const char *sym
       extra_padding = TRUE;
     }
 
+  /* Check to see that we can display the characters in the symbol.
+     This test can fail if the name is encoded in a character set
+     that does not match the current LC_LANG setting.  */
+  multibyte_ok = (mbstowcs (NULL, symbol, width) != (size_t) -1);
+  /* Initialise the multibyte conversion state.  */
+  memset (&amp;amp; state, 0, sizeof (state));
+
   while (width)
     {
-      int len;
-
-      c = symbol;
-
-      /* Look for non-printing symbols inside the symbol's name.
- This test is triggered in particular by the names generated
- by the assembler for local labels.  */
-      while (ISPRINT (*c))
-c++;
-
-      len = c - symbol;
-
-      if (len)
-{
-  if (len &amp;gt; width)
-    len = width;
-
-  printf ("%.*s", len, symbol);
+      const char c = *symbol++;
 
-  width -= len;
-  num_printed += len;
-}
-
-      if (*c == 0 || width == 0)
+      if (c == 0)
 break;
 
-      /* Now display the non-printing character, if
- there is room left in which to dipslay it.  */
-      if ((unsigned char) *c &amp;lt; 32)
+      /* mbrtowcs might accept control characters, but we do not
+ want to print them as that can affect terminal settings.
+ Control characters usually appear in the names generated
+ by the assembler for local labels.  */
+      if (ISCNTRL (c))
 {
   if (width &amp;lt; 2)
     break;
 
-  printf ("^%c", *c + 0x40);
-
+  printf ("^%c", c + 0x40);
   width -= 2;
   num_printed += 2;
 }
-      else
+      else if (multibyte_ok)
+{
+  size_t  n;
+  wchar_t w;
+   
+  n = mbrtowc (&amp;amp; w, symbol - 1, MB_CUR_MAX, &amp;amp; state);
+  assert (n &amp;gt; 0);
+  printf ("%lc", (wint_t) w);
+  width -= 1;
+  num_printed += 1;
+  /* Move symbol past the number of bytes consumed.  */
+  symbol += n - 1;
+}
+      else if (ISPRINT (c))
+{
+  putchar (c);
+  width --;
+  num_printed ++;
+}
+      else /* If all else fail, print in hex.  */
 {
   if (width &amp;lt; 6)
     break;
 
-  printf ("&amp;lt;0x%.2x&amp;gt;", (unsigned char) *c);
-
+  printf ("&amp;lt;0x%.2x&amp;gt;", (unsigned char) c);
   width -= 6;
   num_printed += 6;
 }
-
-      symbol = c + 1;
     }
 
   if (extra_padding &amp;amp;&amp;amp; width &amp;gt; 0)
     {
       /* Fill in the remaining spaces.  */
       printf ("%-*s", width, " ");
-      num_printed += 2;
+      num_printed += width;
     }
 
   return num_printed;

&lt;/pre&gt;</description>
    <dc:creator>Nick Clifton</dc:creator>
    <dc:date>2012-05-23T11:14:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57687">
    <title>PATCH: Don't skip ld-elf/eh[1-4].d for x32</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57687</link>
    <description>&lt;pre&gt;Hi,

I checked in this patch not to skip ld-elf/eh[1-4].d for x32.


H.J.
---
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ChangeLog,v
retrieving revision 1.1549
diff -u -p -r1.1549 ChangeLog
--- ChangeLog22 May 2012 21:42:50 -00001.1549
+++ ChangeLog22 May 2012 21:51:22 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,5 +1,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 2012-05-22  H.J. Lu  &amp;lt;hongjiu.lu&amp;lt; at &amp;gt;intel.com&amp;gt;
 
+* ld-elf/eh1.d: Don't skip x86_64-*-linux-gnux32.
+* ld-elf/eh2.d: Likewise.
+* ld-elf/eh3.d: Likewise.
+* ld-elf/eh4.d: Likewise.
+
+2012-05-22  H.J. Lu  &amp;lt;hongjiu.lu&amp;lt; at &amp;gt;intel.com&amp;gt;
+
 * ld-x86-64/ilp32-11.s Add ".space 0x1000" before func.
 (func): Make it global and hidden.
 * ld-x86-64/ilp32-11.d: Updated.
Index: ld-elf/eh1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/eh1.d,v
retrieving revision 1.8
diff -u -p -r1.8 eh1.d
--- ld-elf/eh1.d4 May 2012 20:01:02 -00001.8
+++ ld-elf/eh1.d22 May 2012 21:51:22 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #as: --64
 #ld: -melf_x86_64 -Ttext 0x400078
 #readelf: -wf
-#notarget: x86_64-*-linux-gnux32
 #target: x86_64-*-*
 
 Contents of the .eh_frame section:
Index: ld-elf/eh2.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/eh2.d,v
retrieving revision 1.8
diff -u -p -r1.8 eh2.d
--- ld-elf/eh2.d4 May 2012 20:01:02 -00001.8
+++ ld-elf/eh2.d22 May 2012 21:51:22 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #as: --64
 #ld: -melf_x86_64 -Ttext 0x400078
 #readelf: -wf
-#notarget: x86_64-*-linux-gnux32
 #target: x86_64-*-*
 
 Contents of the .eh_frame section:
Index: ld-elf/eh3.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/eh3.d,v
retrieving revision 1.8
diff -u -p -r1.8 eh3.d
--- ld-elf/eh3.d4 May 2012 20:01:02 -00001.8
+++ ld-elf/eh3.d22 May 2012 21:51:22 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #as: --64
 #ld: -melf_x86_64 -Ttext 0x400078
 #readelf: -wf
-#notarget: x86_64-*-linux-gnux32
 #target: x86_64-*-*
 
 Contents of the .eh_frame section:
Index: ld-elf/eh4.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/eh4.d,v
retrieving revision 1.10
diff -u -p -r1.10 eh4.d
--- ld-elf/eh4.d22 May 2012 18:42:37 -00001.10
+++ ld-elf/eh4.d22 May 2012 21:51:22 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #as: --64
 #ld: -melf_x86_64 -shared -Ttext 0x400
 #readelf: -wf
-#notarget: x86_64-*-linux-gnux32
 #target: x86_64-*-*
 
 Contents of the .eh_frame section:

&lt;/pre&gt;</description>
    <dc:creator>H.J. Lu</dc:creator>
    <dc:date>2012-05-22T21:53:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57685">
    <title>[gold patch] Fix problem with --export-dynamic-symbol and versioned symbols</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57685</link>
    <description>&lt;pre&gt;The --dynamic-list and --export-dynamic-symbol options can trigger an
internal error in Symbol_table::sized_finalize_symbol() if a named
symbol is referenced with a version from a dynamic object. In that
case, we try to force a dynamic symbol table entry for the versioned
symbol in the dynamic object. This patch fixes the problem by forcing
the dynamic symbol table entry only after checking that the symbol is
defined in a non-shared object.

Tested on x86_64. OK to commit?

-cary


2012-05-22  Cary Coutant  &amp;lt;ccoutant&amp;lt; at &amp;gt;google.com&amp;gt;

* symtab.cc (Symbol::should_add_dynsym_entry): Check for relocatable
object before exporting symbol.


commit 932930f6aaa2e75093e97d57eb90128d1da635ab
Author: Cary Coutant &amp;lt;ccoutant&amp;lt; at &amp;gt;google.com&amp;gt;
Date:   Tue May 22 13:58:32 2012 -0700

    Don't export symbols from shared objects.

diff --git a/gold/symtab.cc b/gold/symtab.cc
index a820b0a..1bb9867 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -365,8 +365,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; Symbol::should_add_dynsym_entry(Symbol_table* symtab) const

   // If the symbol was forced dynamic in a --dynamic-list file
   // or an --export-dynamic-symbol option, add it.
-  if (parameters-&amp;gt;options().in_dynamic_list(this-&amp;gt;name())
-      || parameters-&amp;gt;options().is_export_dynamic_symbol(this-&amp;gt;name()))
+  if (this-&amp;gt;source() == Symbol::FROM_OBJECT
+      &amp;amp;&amp;amp; !this-&amp;gt;object()-&amp;gt;is_dynamic()
+      &amp;amp;&amp;amp; (parameters-&amp;gt;options().in_dynamic_list(this-&amp;gt;name())
+  || parameters-&amp;gt;options().is_export_dynamic_symbol(this-&amp;gt;name())))
     {
       if (!this-&amp;gt;is_forced_local())
         return true;

&lt;/pre&gt;</description>
    <dc:creator>Cary Coutant</dc:creator>
    <dc:date>2012-05-22T21:12:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57684">
    <title>[PATCH] fix some ld testsuite regressions for arm-nacl targets</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57684</link>
    <description>&lt;pre&gt;I noticed two failures in the ld testsuite in a --target=arm-nacl build
that I had not gotten before.  I think in both cases I just failed to
notice because I had not always removed ld/tmpdir between test runs,
and these are tests that rely on files left there by other tests run
earlier in the sequence.

Ok for trunk?


Thanks,
Roland


ld/testsuite/
2012-05-22  Roland McGrath  &amp;lt;mcgrathr&amp;lt; at &amp;gt;google.com&amp;gt;

* ld-arm/arm-elf.exp (armelftests_common): Add a test that gets
arm-lib.so built so armeabitests_common can use it.
(unresolved-1-dyn): Exclude this test for [istarget "arm*-*-nacl*"].

diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index b6eb3d3..3f6f1a0 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -268,6 +268,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; set armelftests_common {
     {"abs call" "-T arm.ld" "" {abs-call-1.s}
      {{objdump -d abs-call-1.d}}
      "abs-call-1"}
+    {"Simple non-PIC shared library (no PLT check)" "-shared" "" {arm-lib.s}
+     {{objdump -Rw arm-lib.r}}
+     "arm-lib.so"}
 }
 
 set armelftests_nonacl {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -758,5 +761,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; run_dump_test "attr-merge-vfp-6"
 run_dump_test "attr-merge-vfp-6r"
 run_dump_test "attr-merge-incompatible"
 run_dump_test "unresolved-1"
-run_dump_test "unresolved-1-dyn"
+if { ![istarget "arm*-*-nacl*"] } {
+    run_dump_test "unresolved-1-dyn"
+}
 run_dump_test "gc-hidden-1"

&lt;/pre&gt;</description>
    <dc:creator>Roland McGrath</dc:creator>
    <dc:date>2012-05-22T20:04:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57679">
    <title>[PATCH] loosen eh4.d test regexps so x86_64-*-nacl* passes too</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57679</link>
    <description>&lt;pre&gt;This is the very same issue as the last change I posted, solved similarly.

In future, please contact me before adding any XFAILs or exclusions for
any *-*-nacl* targets.  We don't want to have any less testing for these
targets, and usually simple tweaks like these are all it takes.

Ok for trunk?


Thanks,
Roland


ld/testsuite/
* ld-elf/eh4.d: Revert last change.
Loosen CFI-matching regexps so they match x86_64-*-nacl* variant too.

diff --git a/ld/testsuite/ld-elf/eh4.d b/ld/testsuite/ld-elf/eh4.d
index a708efd..29f418f 100644
--- a/ld/testsuite/ld-elf/eh4.d
+++ b/ld/testsuite/ld-elf/eh4.d
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #as: --64
 #ld: -melf_x86_64 -shared -Ttext 0x400
 #readelf: -wf
-#notarget: x86_64-*-linux-gnux32 x86_64-*-nacl*
+#notarget: x86_64-*-linux-gnux32
 #target: x86_64-*-*
 
 Contents of the .eh_frame section:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -29,17 +29,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; Contents of the .eh_frame section:
   DW_CFA_set_loc: 00000417
   DW_CFA_def_cfa_offset: 80
 
-00000048 00000024 0000004c FDE cie=00000000 pc=00000240..00000260
+00000048 00000024 0000004c FDE cie=00000000 pc=[0-9a-f]+\.\.[0-9a-f]+
   DW_CFA_def_cfa_offset: 16
-  DW_CFA_advance_loc: 6 to 00000246
+  DW_CFA_advance_loc: [0-9a-f]+ to [0-9a-f]+
   DW_CFA_def_cfa_offset: 24
-  DW_CFA_advance_loc: 10 to 00000250
-  DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit11; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\)
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
+  DW_CFA_advance_loc: [0-9a-f]+ to [0-9a-f]+
+  DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0;.*
   DW_CFA_nop
+#...
 
-00000070 ZERO terminator
+[0-9a-f]+ ZERO terminator
 #pass
-

&lt;/pre&gt;</description>
    <dc:creator>Roland McGrath</dc:creator>
    <dc:date>2012-05-22T18:25:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57677">
    <title>[PATCH] loosen PR ld/12570 test regexps so x86_64-*-nacl* passes too</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57677</link>
    <description>&lt;pre&gt;The issue being tested for applies to x86_64-*-nacl* targets just as well
but the precise contents of their PLT CFI differs.  This loosens the
regexps matching the CFI so that both variants are accepted.

Ok for trunk?


Thanks,
Roland


ld/testsuite/
2012-05-22  Roland McGrath  &amp;lt;mcgrathr&amp;lt; at &amp;gt;google.com&amp;gt;

* ld-x86-64/pr12570a.d (name): Distinguish it from pr12570b.d case.
Loosen CFI-matching regexp so it matches x86_64-*-nacl* variant too.
* ld-x86-64/pr12570b.d: Likewise.

diff --git a/ld/testsuite/ld-x86-64/pr12570a.d b/ld/testsuite/ld-x86-64/pr12570a.d
index 6105a74..1d79411 100644
--- a/ld/testsuite/ld-x86-64/pr12570a.d
+++ b/ld/testsuite/ld-x86-64/pr12570a.d
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,8 +1,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-#name: PR ld/12570
+#name: PR ld/12570 (PLT)
 #as: --64
 #ld: -melf_x86_64 -shared
 #readelf: -wf --wide
 
 #...
-  DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit11; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\)
+  DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0;.*
 #...
diff --git a/ld/testsuite/ld-x86-64/pr12570b.d b/ld/testsuite/ld-x86-64/pr12570b.d
index d65f8da..159aab4 100644
--- a/ld/testsuite/ld-x86-64/pr12570b.d
+++ b/ld/testsuite/ld-x86-64/pr12570b.d
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,9 +1,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-#name: PR ld/12570
+#name: PR ld/12570 (no PLT)
 #as: --64
 #ld: -melf_x86_64 -shared
 #readelf: -wf --wide
 
 #failif
 #...
-  DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit11; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\)
+  DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0;.*
 #...

&lt;/pre&gt;</description>
    <dc:creator>Roland McGrath</dc:creator>
    <dc:date>2012-05-22T18:07:08</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57676">
    <title>PATCH: Skip/xfail x86_64-*-nacl* for eh4 and pr12570a tests</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57676</link>
    <description>&lt;pre&gt;Hi,

X86-64 NACL has different PLT entries.  I checked in this patch to
skip/xfail x86_64-*-nacl* for eh4 and pr12570a tests.

H.J.
---
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index c3ad1ab..d159063 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,5 +1,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 2012-05-22  H.J. Lu  &amp;lt;hongjiu.lu&amp;lt; at &amp;gt;intel.com&amp;gt;
 
+* ld-elf/eh4.d: Skip x86_64-*-nacl*.
+
+* ld-x86-64/x86-64.exp: Xfail pr12570a for x86_64-*-nacl*.
+
+2012-05-22  H.J. Lu  &amp;lt;hongjiu.lu&amp;lt; at &amp;gt;intel.com&amp;gt;
+
 PR ld/13909
 * ld-i386/i386.exp: Revert the last change.
 * ld-x86-64/x86-64.exp: Likewise.
diff --git a/ld/testsuite/ld-elf/eh4.d b/ld/testsuite/ld-elf/eh4.d
index 34ce70e..a708efd 100644
--- a/ld/testsuite/ld-elf/eh4.d
+++ b/ld/testsuite/ld-elf/eh4.d
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #as: --64
 #ld: -melf_x86_64 -shared -Ttext 0x400
 #readelf: -wf
-#notarget: x86_64-*-linux-gnux32
+#notarget: x86_64-*-linux-gnux32 x86_64-*-nacl*
 #target: x86_64-*-*
 
 Contents of the .eh_frame section:
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 7d2934f..409f52d 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -206,6 +206,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; run_dump_test "discarded1"
 run_dump_test "pr12718"
 run_dump_test "pr12921"
 run_dump_test "pr13947"
+setup_xfail "x86_64-*-nacl*"
 run_dump_test "pr12570a"
 run_dump_test "pr12570b"
 

&lt;/pre&gt;</description>
    <dc:creator>H.J. Lu</dc:creator>
    <dc:date>2012-05-22T16:58:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57670">
    <title>PATCH: PR ld/13909: PR ld/12570 causes eh_frame_hdr section to be sometimes too large</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57670</link>
    <description>&lt;pre&gt;Hi,

Now we support mulltiple .eh_frame sections, we can create PLT eh_frame
section if there is an input .eh_frame section.  I am checking in this
patch for i386 and x86-64.  I will leave other targets to their
maintainers.

Thanks.

H.J.
---
diff --git a/bfd/ChangeLog.pr13909 b/bfd/ChangeLog.pr13909
new file mode 100644
index 0000000..dce7c71
--- /dev/null
+++ b/bfd/ChangeLog.pr13909
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+2012-05-14  H.J. Lu  &amp;lt;hongjiu.lu&amp;lt; at &amp;gt;intel.com&amp;gt;
+
+PR ld/13909
+* elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT
+eh_frame section if there is an input .eh_frame section.
+* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 31b3c57..49387e7 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1016,7 +1016,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_i386_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
 
   if (!info-&amp;gt;no_ld_generated_unwind_info
       &amp;amp;&amp;amp; htab-&amp;gt;plt_eh_frame == NULL
-      &amp;amp;&amp;amp; htab-&amp;gt;elf.splt != NULL)
+      &amp;amp;&amp;amp; htab-&amp;gt;elf.splt != NULL
+      &amp;amp;&amp;amp; bfd_get_section_by_name (dynobj, ".eh_frame") != NULL)
     {
       flagword flags = get_elf_backend_data (dynobj)-&amp;gt;dynamic_sec_flags;
       htab-&amp;gt;plt_eh_frame
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index aafe60d..399cf8c 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -980,7 +980,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_x86_64_create_dynamic_sections (bfd *dynobj,
 
   if (!info-&amp;gt;no_ld_generated_unwind_info
       &amp;amp;&amp;amp; htab-&amp;gt;plt_eh_frame == NULL
-      &amp;amp;&amp;amp; htab-&amp;gt;elf.splt != NULL)
+      &amp;amp;&amp;amp; htab-&amp;gt;elf.splt != NULL
+      &amp;amp;&amp;amp; bfd_get_section_by_name (dynobj, ".eh_frame") != NULL)
     {
       const struct elf_x86_64_backend_data *const abed
 = get_elf_x86_64_backend_data (dynobj);
diff --git a/ld/testsuite/ChangeLog.pr13909 b/ld/testsuite/ChangeLog.pr13909
new file mode 100644
index 0000000..89ddba0
--- /dev/null
+++ b/ld/testsuite/ChangeLog.pr13909
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+2012-05-14  H.J. Lu  &amp;lt;hongjiu.lu&amp;lt; at &amp;gt;intel.com&amp;gt;
+
+PR ld/13909
+* ld-i386/i386.exp: Run pr13909.
+* ld-x86-64/x86-64.exp: Likewise.
+
+* ld-i386/dummy.s: New file.
+* ld-i386/pr13909.d: Likewise.
+* ld-x86-64/pr13909.d: Likewise.
diff --git a/ld/testsuite/ld-i386/dummy.s b/ld/testsuite/ld-i386/dummy.s
new file mode 100644
index 0000000..403f980
--- /dev/null
+++ b/ld/testsuite/ld-i386/dummy.s
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+# Dummy
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index 47f918f..982e09f 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -233,6 +233,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; run_dump_test "pr12718"
 run_dump_test "pr12921"
 run_dump_test "pr12570a"
 run_dump_test "pr12570b"
+run_dump_test "pr13909"
 
 if { !([istarget "i?86-*-linux*"]
        || [istarget "i?86-*-gnu*"]
diff --git a/ld/testsuite/ld-i386/pr13909.d b/ld/testsuite/ld-i386/pr13909.d
new file mode 100644
index 0000000..388fd56
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr13909.d
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#name: PR ld/13909
+#source: dummy.s
+#as: --32
+#ld: -melf_i386 -shared
+#readelf: -S --wide
+
+#failif
+#...
+ +\[ [0-9]\] .eh_frame +PROGBITS +[0-9a-f]+ +[0-9a-f]+ 0+ +.*
+#...
diff --git a/ld/testsuite/ld-x86-64/pr13909.d b/ld/testsuite/ld-x86-64/pr13909.d
new file mode 100644
index 0000000..137c61f
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr13909.d
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#name: PR ld/13909
+#source: dummy.s
+#as: --64
+#ld: -melf_x86_64 -shared
+#readelf: -S --wide
+
+#failif
+#...
+ +\[ [0-9]\] .eh_frame +PROGBITS +[0-9a-f]+ +[0-9a-f]+ 0+ +.*
+#...
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 7d2934f..42203bb 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -208,6 +208,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; run_dump_test "pr12921"
 run_dump_test "pr13947"
 run_dump_test "pr12570a"
 run_dump_test "pr12570b"
+run_dump_test "pr13909"
 
 if { ![istarget "x86_64-*-linux*"] &amp;amp;&amp;amp; ![istarget "x86_64-*-nacl*"]} {
     return

&lt;/pre&gt;</description>
    <dc:creator>H.J. Lu</dc:creator>
    <dc:date>2012-05-22T14:11:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57649">
    <title>[PATCH] Add support for m68k-linux core file notes</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57649</link>
    <description>&lt;pre&gt;Tested on m68k-linux and powerpc-linux.

Andreas.

* elf32-m68k.c (elf_m68k_grok_prstatus): New function.
(elf_m68k_grok_psinfo): New function.
(elf_backend_grok_prstatus): Define.
(elf_backend_grok_psinfo): Define.
---
 bfd/elf32-m68k.c |   65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index b66f95a..6c12fa7 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4821,6 +4821,69 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_m68k_plt_sym_val (bfd_vma i, const asection *plt,
   return plt-&amp;gt;vma + (i + 1) * elf_m68k_get_plt_info (plt-&amp;gt;owner)-&amp;gt;size;
 }
 
+/* Support for core dump NOTE sections.  */
+
+static bfd_boolean
+elf_m68k_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
+{
+  int offset;
+  size_t size;
+
+  switch (note-&amp;gt;descsz)
+    {
+    default:
+      return FALSE;
+
+    case 154:/* Linux/m68k */
+      /* pr_cursig */
+      elf_tdata (abfd)-&amp;gt;core_signal = bfd_get_16 (abfd, note-&amp;gt;descdata + 12);
+
+      /* pr_pid */
+      elf_tdata (abfd)-&amp;gt;core_lwpid = bfd_get_32 (abfd, note-&amp;gt;descdata + 22);
+
+      /* pr_reg */
+      offset = 70;
+      size = 80;
+
+      break;
+    }
+
+  /* Make a ".reg/999" section.  */
+  return _bfd_elfcore_make_pseudosection (abfd, ".reg",
+  size, note-&amp;gt;descpos + offset);
+}
+
+static bfd_boolean
+elf_m68k_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
+{
+  switch (note-&amp;gt;descsz)
+    {
+    default:
+      return FALSE;
+
+    case 124:/* Linux/m68k elf_prpsinfo.  */
+      elf_tdata (abfd)-&amp;gt;core_pid
+= bfd_get_32 (abfd, note-&amp;gt;descdata + 12);
+      elf_tdata (abfd)-&amp;gt;core_program
+= _bfd_elfcore_strndup (abfd, note-&amp;gt;descdata + 28, 16);
+      elf_tdata (abfd)-&amp;gt;core_command
+= _bfd_elfcore_strndup (abfd, note-&amp;gt;descdata + 44, 80);
+    }
+
+  /* Note that for some reason, a spurious space is tacked
+     onto the end of the args in some (at least one anyway)
+     implementations, so strip it off if it exists.  */
+  {
+    char *command = elf_tdata (abfd)-&amp;gt;core_command;
+    int n = strlen (command);
+
+    if (n &amp;gt; 0 &amp;amp;&amp;amp; command[n - 1] == ' ')
+      command[n - 1] = '\0';
+  }
+
+  return TRUE;
+}
+
 #define TARGET_BIG_SYMbfd_elf32_m68k_vec
 #define TARGET_BIG_NAME"elf32-m68k"
 #define ELF_MACHINE_CODEEM_68K
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4862,6 +4925,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_m68k_plt_sym_val (bfd_vma i, const asection *plt,
 #define elf_backend_reloc_type_clasself32_m68k_reloc_type_class
 #define elf_backend_plt_sym_valelf_m68k_plt_sym_val
 #define elf_backend_object_pelf32_m68k_object_p
+#define elf_backend_grok_prstatuself_m68k_grok_prstatus
+#define elf_backend_grok_psinfoelf_m68k_grok_psinfo
 
 #define elf_backend_can_gc_sections 1
 #define elf_backend_can_refcount 1
&lt;/pre&gt;</description>
    <dc:creator>Andreas Schwab</dc:creator>
    <dc:date>2012-05-20T18:02:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.binutils/57641">
    <title>tic6x testsuite now clean</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.binutils/57641</link>
    <description>&lt;pre&gt;Today's lucky target to be brought back to zero testsuite fails is
tic6x-elf.  Committed.

gas/
* config/obj-elf.c (obj_elf_section): Cater for TC_KEEP_OPERAND_SPACES
targets when checking for "comdat".
gas/testsuite/
* gas/tic6x/unwind-1.d: Update for readelf changes.
* gas/tic6x/unwind-2.d: Likewise.
* gas/tic6x/unwind-3.d: Likewise.
ld/testsuite/
* ld-elf/elf.exp (note-3.so): xfail tic6x due to non-pic warnings.

Index: gas/config/obj-elf.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-elf.c,v
retrieving revision 1.145
diff -u -p -r1.145 obj-elf.c
--- gas/config/obj-elf.c2 Feb 2012 09:26:04 -00001.145
+++ gas/config/obj-elf.c19 May 2012 06:16:37 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1049,10 +1049,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; obj_elf_section (int push)
       group_name = obj_elf_section_name ();
       if (group_name == NULL)
 attr &amp;amp;= ~SHF_GROUP;
-      else if (strncmp (input_line_pointer, ",comdat", 7) == 0)
+      else if (*input_line_pointer == ',')
 {
-  input_line_pointer += 7;
-  linkonce = 1;
+  ++input_line_pointer;
+  SKIP_WHITESPACE ();
+  if (strncmp (input_line_pointer, "comdat", 6) == 0)
+    {
+      input_line_pointer += 6;
+      linkonce = 1;
+    }
 }
       else if (strncmp (name, ".gnu.linkonce", 13) == 0)
 linkonce = 1;
Index: gas/testsuite/gas/tic6x/unwind-1.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/tic6x/unwind-1.d,v
retrieving revision 1.1
diff -u -p -r1.1 unwind-1.d
--- gas/testsuite/gas/tic6x/unwind-1.d9 May 2011 13:17:57 -00001.1
+++ gas/testsuite/gas/tic6x/unwind-1.d19 May 2012 06:16:46 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6,94 +6,94 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 Unwind table index '.c6xabi.exidx' .*
 
 0x0: 0x83020227
-  Compact model 3
+  Compact model index: 3
   Stack increment 8
   Registers restored: A11, B3
   Return register: B3
 
 0x100: 0x808003e7
-  Compact model 0
+  Compact model index: 0
   0x80 0x03 pop {A10, A11}
   0xe7      RETURN
 
 0x200: 0x81008863
-  Compact model 1
+  Compact model index: 1
   0x88 0x63 pop {A10, A11, B3, B10, B15}
 
 0x300: 0x83020227
-  Compact model 3
+  Compact model index: 3
   Stack increment 8
   Registers restored: A11, B3
   Return register: B3
 
 0x400: 0x84000227
-  Compact model 4
+  Compact model index: 4
   Stack increment 0
   Registers restored:  \(compact\) A11, B3
   Return register: B3
 
 0x500: 0x80a022e7
-  Compact model 0
+  Compact model index: 0
   0xa0 0x22 pop compact {A11, B3}
   0xe7      RETURN
 
 0x600: 0x84000227
-  Compact model 4
+  Compact model index: 4
   Stack increment 0
   Registers restored:  \(compact\) A11, B3
   Return register: B3
 
 0x700: 0x84000637
-  Compact model 4
+  Compact model index: 4
   Stack increment 0
   Registers restored:  \(compact\) A10, A11, B3, B10
   Return register: B3
 
 0x800: 0x840002d7
-  Compact model 4
+  Compact model index: 4
   Stack increment 0
   Registers restored:  \(compact\) A10, A12, A13, B3
   Return register: B3
 
 0x900: 0x84000c07
-  Compact model 4
+  Compact model index: 4
   Stack increment 0
   Registers restored:  \(compact\) B10, B11
   Return register: B3
 
 0xa00: 0x83ff0027
-  Compact model 3
+  Compact model index: 3
   Restore stack from frame pointer
   Registers restored: A11, A15
   Return register: B3
 
 0xb00: 0x84ff0027
-  Compact model 4
+  Compact model index: 4
   Restore stack from frame pointer
   Registers restored:  \(compact\) A11, A15
   Return register: B3
 
 0xc00: 0x8001c1f7
-  Compact model 0
+  Compact model index: 0
   0x01      sp = sp \+ 16
   0xc1 0xf7 pop frame {B3, \[pad\]}
 
 0xd00: &amp;lt; at &amp;gt;0x.*
-  Compact model 1
+  Compact model index: 1
   0x01      sp = sp \+ 16
   0xc2 0xf7 0xbf pop frame {\[pad\], A11, B3, \[pad\]}
   0xe7      RETURN
   0xe7      RETURN
 
 0xe00: &amp;lt; at &amp;gt;0x.*
-  Compact model 1
+  Compact model index: 1
   0x01      sp = sp \+ 16
   0xc2 0xf7 0xfb pop frame {A11, \[pad\], B3, \[pad\]}
   0xe7      RETURN
   0xe7      RETURN
 
 0xf00: &amp;lt; at &amp;gt;0x.*
-  Compact model 1
+  Compact model index: 1
   0x02      sp = sp \+ 24
   0xc2 0x7f 0xff 0xfb pop frame {A11, \[pad\], \[pad\], \[pad\], \[pad\], B3}
   0xe7      RETURN
Index: gas/testsuite/gas/tic6x/unwind-2.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/tic6x/unwind-2.d,v
retrieving revision 1.1
diff -u -p -r1.1 unwind-2.d
--- gas/testsuite/gas/tic6x/unwind-2.d9 May 2011 13:17:57 -00001.1
+++ gas/testsuite/gas/tic6x/unwind-2.d19 May 2012 06:16:46 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6,94 +6,94 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 Unwind table index '.c6xabi.exidx' .*
 
 0x0: 0x83020227
-  Compact model 3
+  Compact model index: 3
   Stack increment 8
   Registers restored: A11, B3
   Return register: B3
 
 0x100: 0x808003e7
-  Compact model 0
+  Compact model index: 0
   0x80 0x03 pop {A10, A11}
   0xe7      RETURN
 
 0x200: 0x81008863
-  Compact model 1
+  Compact model index: 1
   0x88 0x63 pop {A10, A11, B3, B10, B15}
 
 0x300: 0x83020227
-  Compact model 3
+  Compact model index: 3
   Stack increment 8
   Registers restored: A11, B3
   Return register: B3
 
 0x400: 0x84000227
-  Compact model 4
+  Compact model index: 4
   Stack increment 0
   Registers restored:  \(compact\) A11, B3
   Return register: B3
 
 0x500: 0x80a022e7
-  Compact model 0
+  Compact model index: 0
   0xa0 0x22 pop compact {A11, B3}
   0xe7      RETURN
 
 0x600: 0x84000227
-  Compact model 4
+  Compact model index: 4
   Stack increment 0
   Registers restored:  \(compact\) A11, B3
   Return register: B3
 
 0x700: 0x84000637
-  Compact model 4
+  Compact model index: 4
   Stack increment 0
   Registers restored:  \(compact\) A10, A11, B3, B10
   Return register: B3
 
 0x800: 0x840002d7
-  Compact model 4
+  Compact model index: 4
   Stack increment 0
   Registers restored:  \(compact\) A10, A12, A13, B3
   Return register: B3
 
 0x900: 0x84000c07
-  Compact model 4
+  Compact model index: 4
   Stack increment 0
   Registers restored:  \(compact\) B10, B11
   Return register: B3
 
 0xa00: 0x83ff0027
-  Compact model 3
+  Compact model index: 3
   Restore stack from frame pointer
   Registers restored: A11, A15
   Return register: B3
 
 0xb00: 0x84ff0027
-  Compact model 4
+  Compact model index: 4
   Restore stack from frame pointer
   Registers restored:  \(compact\) A11, A15
   Return register: B3
 
 0xc00: 0x8001c1f7
-  Compact model 0
+  Compact model index: 0
   0x01      sp = sp \+ 16
   0xc1 0xf7 pop frame {B3, \[pad\]}
 
 0xd00: &amp;lt; at &amp;gt;0x.*
-  Compact model 1
+  Compact model index: 1
   0x01      sp = sp \+ 16
   0xc2 0xf7 0xbf pop frame {\[pad\], A11, B3, \[pad\]}
   0xe7      RETURN
   0xe7      RETURN
 
 0xe00: &amp;lt; at &amp;gt;0x.*
-  Compact model 1
+  Compact model index: 1
   0x01      sp = sp \+ 16
   0xc2 0xf7 0xfb pop frame {A11, \[pad\], B3, \[pad\]}
   0xe7      RETURN
   0xe7      RETURN
 
 0xf00: &amp;lt; at &amp;gt;0x.*
-  Compact model 1
+  Compact model index: 1
   0x02      sp = sp \+ 24
   0xc2 0x7f 0xff 0xfb pop frame {A11, \[pad\], \[pad\], \[pad\], \[pad\], B3}
   0xe7      RETURN
Index: gas/testsuite/gas/tic6x/unwind-3.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/tic6x/unwind-3.d,v
retrieving revision 1.1
diff -u -p -r1.1 unwind-3.d
--- gas/testsuite/gas/tic6x/unwind-3.d9 May 2011 13:17:57 -00001.1
+++ gas/testsuite/gas/tic6x/unwind-3.d19 May 2012 06:16:46 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5,7 +5,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 Unwind table index '.c6xabi.exidx.text.bar' .*
 
 0x0: 0x830e2807
-  Compact model 3
+  Compact model index: 3
   Stack increment 56
   Registers restored: B11, B13
   Return register: B3
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -13,6 +13,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; Unwind table index '.c6xabi.exidx.text.b
 Unwind table index '.c6xabi.exidx' .*
 
 0x0: 0x80008021
-  Compact model 0
+  Compact model index: 0
   0x00      sp = sp \+ 8
   0x80 0x21 pop {A10, B3}
Index: ld/testsuite/ld-elf/elf.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/elf.exp,v
retrieving revision 1.33
diff -u -p -r1.33 elf.exp
--- ld/testsuite/ld-elf/elf.exp9 Apr 2012 16:28:34 -00001.33
+++ ld/testsuite/ld-elf/elf.exp19 May 2012 06:16:56 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -66,6 +66,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; if { ![istarget hppa64*-hpux*] } {
 #
 # Only run the test on targets thats support creating shared libraries.
 if { [check_shared_lib_support] } then {
+  setup_xfail "tic6x-*-*"
   run_ld_link_tests {
       {"Build shared library for next test"
        "-shared" "" "note-3.s" {} "note-3.so" }

&lt;/pre&gt;</description>
    <dc:creator>Alan Modra</dc:creator>
    <dc:date>2012-05-19T10:40:17</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.gnu.binutils">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.gnu.binutils</link>
  </textinput>
</rdf:RDF>

