<?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://permalink.gmane.org/gmane.comp.gnu.binutils/57716"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57715"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57714"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57713"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57712"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57711"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57710"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57709"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57708"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57707"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57706"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57705"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57704"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57703"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57702"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57701"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57700"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57699"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57698"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.gnu.binutils/57697"/>
      </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://permalink.gmane.org/gmane.comp.gnu.binutils/57716">
    <title>Re: [Patch,AVR] Support instrucions XCH, LAT, LAC, LAS</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57716</link>
    <description>&lt;pre&gt;
Would someone commit, please? I have to write access to binutils.






&lt;/pre&gt;</description>
    <dc:creator>Georg-Johann Lay</dc:creator>
    <dc:date>2012-05-24T10:57:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57715">
    <title>Re: New port: Renesas RL78</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57715</link>
    <description>&lt;pre&gt;

Hello,

I have seen that you have run coremark on RL78 G13,
Should it be possible to know the coremark score you get on this platform?
Thank you a lot,
Best regards 

Antoine



&lt;/pre&gt;</description>
    <dc:creator>antoine odonne</dc:creator>
    <dc:date>2012-05-24T10:36:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57714">
    <title>Re: PATCH: PR ld/13909: PR ld/12570 causes eh_frame_hdr section to be sometimes too large</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57714</link>
    <description>&lt;pre&gt;
HJ, how does this look to you?  Moving _bfd_elf_maybe_strip_eh_frame_hdr
later in bfd_elf_size_dynamic_sections allows us to treat the linker
created PLT .eh_frame section like most other linker created sections.
We don't need to set it up as early, nor do we rely on elf-eh-frame.c
stripping the section by cunningly leaving an FDE range as zero.

bfd/
* elf-eh-frame.c (_bfd_elf_eh_frame_present): New function.
(_bfd_elf_maybe_strip_eh_frame_hdr): Use it here.
* elf-bfd.h (_bfd_elf_eh_frame_present): Declare.
* elflink.c (bfd_elf_size_dynamic_sections): Let the backend
size dynamic sections before stripping eh_frame_hdr.
(bfd_elf_gc_sections): Handle multiple .eh_frame sections.
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Drop glink_eh_frame
if no other .eh_frame sections exist.
* elf64-ppc.c (ppc64_elf_size_stubs): Likewise.
* elf32-i386.c (elf_i386_create_dynamic_sections): Don't size
or alloc plt_eh_frame here..
(elf_i386_size_dynamic_sections): ..do it here instead.  Don't
specially keep sgotplt, iplt, tgotplt, sdynbss for symbols.
(elf_i386_finish_dynamic_sections): Check plt_eh_frame-&amp;gt;contents
before writing plt offset.
* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't size
or alloc plt_eh_frame here..
(elf_x86_64_size_dynamic_sections): ..do it here instead.
(elf_x86_64_finish_dynamic_sections): Check plt_eh_frame-&amp;gt;contents
before writing plt offset.
ld/
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Handle
multiple .eh_frame sections attached to bfd.

Index: bfd/elf-bfd.h
===================================================================
RCS file: /cvs/src/src/bfd/elf-bfd.h,v
retrieving revision 1.338
diff -u -p -r1.338 elf-bfd.h
--- bfd/elf-bfd.h14 May 2012 19:45:17 -00001.338
+++ bfd/elf-bfd.h24 May 2012 04:49:46 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1950,6 +1950,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern bfd_boolean _bfd_elf_write_sectio
   (bfd *, struct bfd_link_info *, asection *, bfd_byte *);
 extern bfd_boolean _bfd_elf_write_section_eh_frame_hdr
   (bfd *, struct bfd_link_info *);
+extern bfd_boolean _bfd_elf_eh_frame_present
+  (struct bfd_link_info *);
 extern bfd_boolean _bfd_elf_maybe_strip_eh_frame_hdr
   (struct bfd_link_info *);
 
Index: bfd/elf-eh-frame.c
===================================================================
RCS file: /cvs/src/src/bfd/elf-eh-frame.c,v
retrieving revision 1.89
diff -u -p -r1.89 elf-eh-frame.c
--- bfd/elf-eh-frame.c23 May 2012 04:38:08 -00001.89
+++ bfd/elf-eh-frame.c24 May 2012 07:44:31 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1247,6 +1247,26 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _bfd_elf_discard_section_eh_frame_hdr (b
   return TRUE;
 }
 
+/* Return true if there is at least one non-empty .eh_frame section in
+   input files.  Can only be called after ld has mapped input to
+   output sections, and before sections are stripped.  */
+bfd_boolean
+_bfd_elf_eh_frame_present (struct bfd_link_info *info)
+{
+  asection *eh = bfd_get_section_by_name (info-&amp;gt;output_bfd, ".eh_frame");
+
+  if (eh == NULL)
+    return FALSE;
+
+  /* Count only sections which have at least a single CIE or FDE.
+     There cannot be any CIE or FDE &amp;lt;= 8 bytes.  */
+  for (eh = eh-&amp;gt;map_head.s; eh != NULL; eh = eh-&amp;gt;map_head.s)
+    if (eh-&amp;gt;size &amp;gt; 8)
+      return TRUE;
+
+  return FALSE;
+}
+
 /* This function is called from size_dynamic_sections.
    It needs to decide whether .eh_frame_hdr should be output or not,
    because when the dynamic symbol table has been sized it is too late
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1255,8 +1275,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _bfd_elf_discard_section_eh_frame_hdr (b
 bfd_boolean
 _bfd_elf_maybe_strip_eh_frame_hdr (struct bfd_link_info *info)
 {
-  asection *o;
-  bfd *abfd;
   struct elf_link_hash_table *htab;
   struct eh_frame_hdr_info *hdr_info;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1265,28 +1283,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _bfd_elf_maybe_strip_eh_frame_hdr (struc
   if (hdr_info-&amp;gt;hdr_sec == NULL)
     return TRUE;
 
-  if (bfd_is_abs_section (hdr_info-&amp;gt;hdr_sec-&amp;gt;output_section))
-    {
-      hdr_info-&amp;gt;hdr_sec = NULL;
-      return TRUE;
-    }
-
-  abfd = NULL;
-  if (info-&amp;gt;eh_frame_hdr)
-    for (abfd = info-&amp;gt;input_bfds; abfd != NULL; abfd = abfd-&amp;gt;link_next)
-      {
-/* Count only sections which have at least a single CIE or FDE.
-   There cannot be any CIE or FDE &amp;lt;= 8 bytes.  */
-o = bfd_get_section_by_name (abfd, ".eh_frame");
-while (o != NULL
-       &amp;amp;&amp;amp; (o-&amp;gt;size &amp;lt;= 8
-   || bfd_is_abs_section (o-&amp;gt;output_section)))
-  o = bfd_get_next_section_by_name (o);
-if (o != NULL)
-  break;
-      }
-
-  if (abfd == NULL)
+  if (bfd_is_abs_section (hdr_info-&amp;gt;hdr_sec-&amp;gt;output_section)
+      || !info-&amp;gt;eh_frame_hdr
+      || !_bfd_elf_eh_frame_present (info))
     {
       hdr_info-&amp;gt;hdr_sec-&amp;gt;flags |= SEC_EXCLUDE;
       hdr_info-&amp;gt;hdr_sec = NULL;
Index: bfd/elf32-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i386.c,v
retrieving revision 1.276
diff -u -p -r1.276 elf32-i386.c
--- bfd/elf32-i386.c22 May 2012 15:54:58 -00001.276
+++ bfd/elf32-i386.c24 May 2012 04:49:51 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1027,12 +1027,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_i386_create_dynamic_sections (bfd *d
       if (htab-&amp;gt;plt_eh_frame == NULL
   || !bfd_set_section_alignment (dynobj, htab-&amp;gt;plt_eh_frame, 2))
 return FALSE;
-
-      htab-&amp;gt;plt_eh_frame-&amp;gt;size = sizeof (elf_i386_eh_frame_plt);
-      htab-&amp;gt;plt_eh_frame-&amp;gt;contents
-= bfd_alloc (dynobj, htab-&amp;gt;plt_eh_frame-&amp;gt;size);
-      memcpy (htab-&amp;gt;plt_eh_frame-&amp;gt;contents, elf_i386_eh_frame_plt,
-      sizeof (elf_i386_eh_frame_plt));
     }
 
   return TRUE;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2726,7 +2720,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_i386_size_dynamic_sections (bfd *out
   FALSE, FALSE, FALSE);
 
       /* Don't allocate .got.plt section if there are no GOT nor PLT
-         entries and there is no refeence to _GLOBAL_OFFSET_TABLE_.  */
+         entries and there is no reference to _GLOBAL_OFFSET_TABLE_.  */
       if ((got == NULL
    || !got-&amp;gt;ref_regular_nonweak)
   &amp;amp;&amp;amp; (htab-&amp;gt;elf.sgotplt-&amp;gt;size
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2742,6 +2736,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_i386_size_dynamic_sections (bfd *out
 htab-&amp;gt;elf.sgotplt-&amp;gt;size = 0;
     }
 
+
+  if (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-&amp;gt;size != 0
+      &amp;amp;&amp;amp; !bfd_is_abs_section (htab-&amp;gt;elf.splt-&amp;gt;output_section)
+      &amp;amp;&amp;amp; _bfd_elf_eh_frame_present (info))
+    htab-&amp;gt;plt_eh_frame-&amp;gt;size = sizeof (elf_i386_eh_frame_plt);
+
   /* We now have determined the sizes of the various dynamic sections.
      Allocate memory for them.  */
   relocs = FALSE;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2753,11 +2755,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_i386_size_dynamic_sections (bfd *out
 continue;
 
       if (s == htab-&amp;gt;elf.splt
-  || s == htab-&amp;gt;elf.sgot
-  || s == htab-&amp;gt;elf.sgotplt
-  || s == htab-&amp;gt;elf.iplt
-  || s == htab-&amp;gt;elf.igotplt
-  || s == htab-&amp;gt;sdynbss)
+  || s == htab-&amp;gt;elf.sgot)
 {
   /* Strip this section if we don't need it; see the
      comment below.  */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2768,6 +2766,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_i386_size_dynamic_sections (bfd *out
   if (htab-&amp;gt;elf.hplt != NULL)
     strip_section = FALSE;
 }
+      else if (s == htab-&amp;gt;elf.sgotplt
+       || s == htab-&amp;gt;elf.iplt
+       || s == htab-&amp;gt;elf.igotplt
+       || s == htab-&amp;gt;plt_eh_frame
+       || s == htab-&amp;gt;sdynbss)
+{
+  /* Strip these too.  */
+}
       else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rel"))
 {
   if (s-&amp;gt;size != 0
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2815,11 +2821,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_i386_size_dynamic_sections (bfd *out
     }
 
   if (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-&amp;gt;size != 0
-      &amp;amp;&amp;amp; (htab-&amp;gt;elf.splt-&amp;gt;flags &amp;amp; SEC_EXCLUDE) == 0)
-    bfd_put_32 (dynobj, htab-&amp;gt;elf.splt-&amp;gt;size,
-htab-&amp;gt;plt_eh_frame-&amp;gt;contents + PLT_FDE_LEN_OFFSET);
+      &amp;amp;&amp;amp; htab-&amp;gt;plt_eh_frame-&amp;gt;contents != NULL)
+    {
+      memcpy (htab-&amp;gt;plt_eh_frame-&amp;gt;contents, elf_i386_eh_frame_plt,
+      sizeof (elf_i386_eh_frame_plt));
+      bfd_put_32 (dynobj, htab-&amp;gt;elf.splt-&amp;gt;size,
+  htab-&amp;gt;plt_eh_frame-&amp;gt;contents + PLT_FDE_LEN_OFFSET);
+    }
 
   if (htab-&amp;gt;elf.dynamic_sections_created)
     {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4840,7 +4848,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_i386_finish_dynamic_sections (bfd *o
     }
 
   /* Adjust .eh_frame for .plt section.  */
-  if (htab-&amp;gt;plt_eh_frame != NULL)
+  if (htab-&amp;gt;plt_eh_frame != NULL
+      &amp;amp;&amp;amp; htab-&amp;gt;plt_eh_frame-&amp;gt;contents != NULL)
     {
       if (htab-&amp;gt;elf.splt != NULL
   &amp;amp;&amp;amp; htab-&amp;gt;elf.splt-&amp;gt;size != 0
Index: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.316
diff -u -p -r1.316 elf32-ppc.c
--- bfd/elf32-ppc.c22 May 2012 14:58:15 -00001.316
+++ bfd/elf32-ppc.c24 May 2012 04:49:52 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6244,7 +6244,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; ppc_elf_size_dynamic_sections (bfd *outp
   if (htab-&amp;gt;glink != NULL
       &amp;amp;&amp;amp; htab-&amp;gt;glink-&amp;gt;size != 0
       &amp;amp;&amp;amp; htab-&amp;gt;glink_eh_frame != NULL
-      &amp;amp;&amp;amp; !bfd_is_abs_section (htab-&amp;gt;glink_eh_frame-&amp;gt;output_section))
+      &amp;amp;&amp;amp; !bfd_is_abs_section (htab-&amp;gt;glink_eh_frame-&amp;gt;output_section)
+      &amp;amp;&amp;amp; _bfd_elf_eh_frame_present (info))
     {
       s = htab-&amp;gt;glink_eh_frame;
       s-&amp;gt;size = sizeof (glink_eh_frame_cie) + 20;
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.384
diff -u -p -r1.384 elf64-ppc.c
--- bfd/elf64-ppc.c24 May 2012 06:20:52 -00001.384
+++ bfd/elf64-ppc.c24 May 2012 07:10:52 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -11662,7 +11662,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; ppc64_elf_size_stubs (struct bfd_link_in
 
       if (htab-&amp;gt;glink_eh_frame != NULL
   &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)
+  &amp;amp;&amp;amp; htab-&amp;gt;glink_eh_frame-&amp;gt;output_section-&amp;gt;size != 0)
 {
   size_t size = 0, align;
 
Index: bfd/elf64-x86-64.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-x86-64.c,v
retrieving revision 1.266
diff -u -p -r1.266 elf64-x86-64.c
--- bfd/elf64-x86-64.c22 May 2012 15:54:58 -00001.266
+++ bfd/elf64-x86-64.c24 May 2012 04:49:56 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -982,8 +982,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_x86_64_create_dynamic_sections (bfd 
       &amp;amp;&amp;amp; htab-&amp;gt;plt_eh_frame == NULL
       &amp;amp;&amp;amp; htab-&amp;gt;elf.splt != NULL)
     {
-      const struct elf_x86_64_backend_data *const abed
-= get_elf_x86_64_backend_data (dynobj);
       flagword flags = get_elf_backend_data (dynobj)-&amp;gt;dynamic_sec_flags;
       htab-&amp;gt;plt_eh_frame
 = bfd_make_section_anyway_with_flags (dynobj, ".eh_frame",
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -993,12 +991,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_x86_64_create_dynamic_sections (bfd 
       if (htab-&amp;gt;plt_eh_frame == NULL
   || !bfd_set_section_alignment (dynobj, htab-&amp;gt;plt_eh_frame, 3))
 return FALSE;
-
-      htab-&amp;gt;plt_eh_frame-&amp;gt;size = abed-&amp;gt;eh_frame_plt_size;
-      htab-&amp;gt;plt_eh_frame-&amp;gt;contents
-= bfd_alloc (dynobj, htab-&amp;gt;plt_eh_frame-&amp;gt;size);
-      memcpy (htab-&amp;gt;plt_eh_frame-&amp;gt;contents,
-      abed-&amp;gt;eh_frame_plt, abed-&amp;gt;eh_frame_plt_size);
     }
   return TRUE;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2797,6 +2789,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_x86_64_size_dynamic_sections (bfd *o
 htab-&amp;gt;elf.sgotplt-&amp;gt;size = 0;
     }
 
+  if (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-&amp;gt;size != 0
+      &amp;amp;&amp;amp; !bfd_is_abs_section (htab-&amp;gt;elf.splt-&amp;gt;output_section)
+      &amp;amp;&amp;amp; _bfd_elf_eh_frame_present (info))
+    {
+      const struct elf_x86_64_backend_data *arch_data
+= (const struct elf_x86_64_backend_data *) bed-&amp;gt;arch_data;
+      htab-&amp;gt;plt_eh_frame-&amp;gt;size = arch_data-&amp;gt;eh_frame_plt_size;
+    }
+
   /* We now have determined the sizes of the various dynamic sections.
      Allocate memory for them.  */
   relocs = FALSE;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2810,6 +2813,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_x86_64_size_dynamic_sections (bfd *o
   || s == htab-&amp;gt;elf.sgotplt
   || s == htab-&amp;gt;elf.iplt
   || s == htab-&amp;gt;elf.igotplt
+  || s == htab-&amp;gt;plt_eh_frame
   || s == htab-&amp;gt;sdynbss)
 {
   /* Strip this section if we don't need it; see the
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2861,11 +2865,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_x86_64_size_dynamic_sections (bfd *o
     }
 
   if (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-&amp;gt;size != 0
-      &amp;amp;&amp;amp; (htab-&amp;gt;elf.splt-&amp;gt;flags &amp;amp; SEC_EXCLUDE) == 0)
-    bfd_put_32 (dynobj, htab-&amp;gt;elf.splt-&amp;gt;size,
-htab-&amp;gt;plt_eh_frame-&amp;gt;contents + PLT_FDE_LEN_OFFSET);
+      &amp;amp;&amp;amp; htab-&amp;gt;plt_eh_frame-&amp;gt;contents != NULL)
+    {
+      const struct elf_x86_64_backend_data *arch_data
+= (const struct elf_x86_64_backend_data *) bed-&amp;gt;arch_data;
+
+      memcpy (htab-&amp;gt;plt_eh_frame-&amp;gt;contents,
+      arch_data-&amp;gt;eh_frame_plt, htab-&amp;gt;plt_eh_frame-&amp;gt;size);
+      bfd_put_32 (dynobj, htab-&amp;gt;elf.splt-&amp;gt;size,
+  htab-&amp;gt;plt_eh_frame-&amp;gt;contents + PLT_FDE_LEN_OFFSET);
+    }
 
   if (htab-&amp;gt;elf.dynamic_sections_created)
     {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4725,7 +4734,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elf_x86_64_finish_dynamic_sections (bfd 
     }
 
   /* Adjust .eh_frame for .plt section.  */
-  if (htab-&amp;gt;plt_eh_frame != NULL)
+  if (htab-&amp;gt;plt_eh_frame != NULL
+      &amp;amp;&amp;amp; htab-&amp;gt;plt_eh_frame-&amp;gt;contents != NULL)
     {
       if (htab-&amp;gt;elf.splt != NULL
   &amp;amp;&amp;amp; htab-&amp;gt;elf.splt-&amp;gt;size != 0
Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.444
diff -u -p -r1.444 elflink.c
--- bfd/elflink.c23 May 2012 04:35:31 -00001.444
+++ bfd/elflink.c24 May 2012 04:49:58 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5584,17 +5584,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; bfd_elf_size_dynamic_sections (bfd *outp
       &amp;amp;&amp;amp; ! (*bed-&amp;gt;elf_backend_always_size_sections) (output_bfd, info))
     return FALSE;
 
-  if (! _bfd_elf_maybe_strip_eh_frame_hdr (info))
-    return FALSE;
-
   dynobj = elf_hash_table (info)-&amp;gt;dynobj;
 
-  /* If there were no dynamic objects in the link, there is nothing to
-     do here.  */
-  if (dynobj == NULL)
-    return TRUE;
-
-  if (elf_hash_table (info)-&amp;gt;dynamic_sections_created)
+  if (dynobj != NULL &amp;amp;&amp;amp; elf_hash_table (info)-&amp;gt;dynamic_sections_created)
     {
       struct elf_info_failed eif;
       struct elf_link_hash_entry *h;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5897,11 +5889,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; bfd_elf_size_dynamic_sections (bfd *outp
 
   /* The backend must work out the sizes of all the other dynamic
      sections.  */
-  if (bed-&amp;gt;elf_backend_size_dynamic_sections
+  if (dynobj != NULL
+      &amp;amp;&amp;amp; bed-&amp;gt;elf_backend_size_dynamic_sections != NULL
       &amp;amp;&amp;amp; ! (*bed-&amp;gt;elf_backend_size_dynamic_sections) (output_bfd, info))
     return FALSE;
 
-  if (elf_hash_table (info)-&amp;gt;dynamic_sections_created)
+  if (! _bfd_elf_maybe_strip_eh_frame_hdr (info))
+    return FALSE;
+
+  if (dynobj != NULL &amp;amp;&amp;amp; elf_hash_table (info)-&amp;gt;dynamic_sections_created)
     {
       unsigned long section_sym_count;
       struct bfd_elf_version_tree *verdefs;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -12002,12 +11998,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; bfd_elf_gc_sections (bfd *abfd, struct b
       struct elf_reloc_cookie cookie;
 
       sec = bfd_get_section_by_name (sub, ".eh_frame");
-      if (sec &amp;amp;&amp;amp; init_reloc_cookie_for_section (&amp;amp;cookie, info, sec))
+      while (sec &amp;amp;&amp;amp; init_reloc_cookie_for_section (&amp;amp;cookie, info, sec))
 {
   _bfd_elf_parse_eh_frame (sub, info, sec, &amp;amp;cookie);
-  if (elf_section_data (sec)-&amp;gt;sec_info)
+  if (elf_section_data (sec)-&amp;gt;sec_info
+      &amp;amp;&amp;amp; (sec-&amp;gt;flags &amp;amp; SEC_LINKER_CREATED) == 0)
     elf_eh_frame_section (sub) = sec;
   fini_reloc_cookie_for_section (&amp;amp;cookie, sec);
+  sec = bfd_get_next_section_by_name (sec);
 }
     }
   _bfd_elf_end_eh_frame_parsing (info);
Index: ld/emultempl/elf32.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/elf32.em,v
retrieving revision 1.227
diff -u -p -r1.227 elf32.em
--- ld/emultempl/elf32.em16 May 2012 10:43:41 -00001.227
+++ ld/emultempl/elf32.em24 May 2012 04:50:21 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1142,10 +1142,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gld${EMULATION_NAME}_after_open (void)
   if (!warn_eh_frame)
     {
       s = bfd_get_section_by_name (abfd, ".eh_frame");
-      warn_eh_frame
-= (s
-   &amp;amp;&amp;amp; s-&amp;gt;size &amp;gt; 8
-   &amp;amp;&amp;amp; !bfd_is_abs_section (s-&amp;gt;output_section));
+      while (s != NULL
+     &amp;amp;&amp;amp; (s-&amp;gt;size &amp;lt;= 8
+ || bfd_is_abs_section (s-&amp;gt;output_section)))
+s = bfd_get_next_section_by_name (s);
+      warn_eh_frame = s != NULL;
     }
   if (elfbfd &amp;amp;&amp;amp; warn_eh_frame)
     break;

&lt;/pre&gt;</description>
    <dc:creator>Alan Modra</dc:creator>
    <dc:date>2012-05-24T08:22:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57713">
    <title>Re: [Patch,AVR] Support instrucions XCH, LAT, LAC, LAS</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57713</link>
    <description>&lt;pre&gt;2012/5/23 Georg-Johann Lay &amp;lt;avr&amp;lt; at &amp;gt;gjlay.de&amp;gt;:

Approved.

Denis.

&lt;/pre&gt;</description>
    <dc:creator>Denis Chertykov</dc:creator>
    <dc:date>2012-05-24T07:23:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57712">
    <title>pr14158, hole in powerpc64 .eh_frame</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.gnu.binutils/57711">
    <title>Re: [patch] Fix ld to match .data.rel.ro sections more carefully</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57711</link>
    <description>&lt;pre&gt;
Fine with me!

-cary

&lt;/pre&gt;</description>
    <dc:creator>Cary Coutant</dc:creator>
    <dc:date>2012-05-24T01:05:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57710">
    <title>Re: [binutils-owner] Re: RFC: Displaying multibyte symbol names in readelf</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57710</link>
    <description>&lt;pre&gt;Excuse me, please let me ask a stupid question.

I guess some people want to receive raw constant data (e.g. hardwired
string data) instead of hexadecimalized constant data, so I believe
there is a requirement of such feature.

But, I'm not sure if the case that the character encoding in ELF binary
and that in current (terminal emulator's) locale are matched is common.
I'm afraid that the mismatched case, like, encoding in binary is UCS2,
UTF-16 or UTF-32 but the locale is UTF-8 would be popular (I'm not saying
it's the most popular case).

According to GCC manual:
       -fwide-exec-charset=charset
           Set the wide execution character set, used for wide string and
           character constants.  The default is UTF-32 or UTF-16, whichever
           corresponds to the width of "wchar_t".  As with -fexec-charset,
           charset can be any encoding supported by the system's "iconv"
           library routine; however, you will have problems with encodings
           that do not fit exactly in "wchar_t".
I'm afraid that the constant wide character string in the binary executable
might be coded by UTF-32 or UTF-16 (I'm not saying it's the most popular case).

If you have already evaluated the proportions of such mismatched cases,
please let me know.

Regards,
mpsuzuki

Hans-Peter Nilsson wrote:


&lt;/pre&gt;</description>
    <dc:creator>suzuki toshiya</dc:creator>
    <dc:date>2012-05-24T01:02:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57709">
    <title>Re: [patch] Fix ld to match .data.rel.ro sections more carefully</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57709</link>
    <description>&lt;pre&gt;
Call it a gcc bug?

&lt;/pre&gt;</description>
    <dc:creator>Alan Modra</dc:creator>
    <dc:date>2012-05-24T00:29:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57708">
    <title>Re: [patch] Fix ld to match .data.rel.ro sections more carefully</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57708</link>
    <description>&lt;pre&gt;
OK, thanks!

&lt;/pre&gt;</description>
    <dc:creator>Alan Modra</dc:creator>
    <dc:date>2012-05-24T00:28:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57707">
    <title>Re: [gold patch] Fix gold to match .data.rel.ro sections more carefully</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57707</link>
    <description>&lt;pre&gt;

This is OK.

Thanks.

Ian

&lt;/pre&gt;</description>
    <dc:creator>Ian Lance Taylor</dc:creator>
    <dc:date>2012-05-24T00:27:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57706">
    <title>Re: [gold patch] Fix gold to match .data.rel.ro sections more carefully</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57706</link>
    <description>&lt;pre&gt;
This patch adds a couple of entries to the table that require an exact
match (setting fromlen to 0 as a flag).

There's probably a better way to do this -- maybe just drop the
trailing dot in all cases, and check for either "." or "\0" after the
matched part. It wasn't clear to me that that strategy would apply
universally, though.

Tested (and looked at the results this time) on x86_64.

OK as is? Or does a different approach look better?

-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): Add rules to handle
exact match on .data.rel.ro.local or .data.rel.ro.
(Layout::output_section_name): Check for exact matches.


commit 699a0be246948f5696dfb6c2f1d41f18a5e12d4b
Author: Cary Coutant &amp;lt;ccoutant&amp;lt; at &amp;gt;google.com&amp;gt;
Date:   Wed May 23 15:53:19 2012 -0700

    Fix to handle .data.rel.ro correctly.

diff --git a/gold/layout.cc b/gold/layout.cc
index e9aeef5..c7ca322 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4569,12 +4569,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; Layout::set_dynamic_symbol_size(const
Symbol_table* symtab)
 // based on the GNU linker default ELF linker script.

 #define MAPPING_INIT(f, t) { f, sizeof(f) - 1, t, sizeof(t) - 1 }
+#define MAPPING_INIT_EXACT(f, t) { f, 0, t, sizeof(t) - 1 }
 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_EXACT(".data.rel.ro.local", ".data.rel.ro.local"),
   MAPPING_INIT(".data.rel.ro.", ".data.rel.ro"),
+  MAPPING_INIT_EXACT(".data.rel.ro", ".data.rel.ro"),
   MAPPING_INIT(".data.", ".data"),
   MAPPING_INIT(".bss.", ".bss"),
   MAPPING_INIT(".tdata.", ".tdata"),
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4613,6 +4616,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; const Layout::Section_name_mapping
Layout::section_name_mapping[] =
   MAPPING_INIT(".gnu.linkonce.armexidx.", ".ARM.exidx"),
 };
 #undef MAPPING_INIT
+#undef MAPPING_INIT_EXACT

 const int Layout::section_name_mapping_count =
   (sizeof(Layout::section_name_mapping)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4664,10 +4668,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; Layout::output_section_name(const Relobj*
relobj, const char* name,
   const Section_name_mapping* psnm = section_name_mapping;
   for (int i = 0; i &amp;lt; section_name_mapping_count; ++i, ++psnm)
     {
-      if (strncmp(name, psnm-&amp;gt;from, psnm-&amp;gt;fromlen) == 0)
+      if (psnm-&amp;gt;fromlen &amp;gt; 0)
 {
-  *plen = psnm-&amp;gt;tolen;
-  return psnm-&amp;gt;to;
+  if (strncmp(name, psnm-&amp;gt;from, psnm-&amp;gt;fromlen) == 0)
+    {
+      *plen = psnm-&amp;gt;tolen;
+      return psnm-&amp;gt;to;
+    }
+}
+      else
+{
+  if (strcmp(name, psnm-&amp;gt;from) == 0)
+    {
+      *plen = psnm-&amp;gt;tolen;
+      return psnm-&amp;gt;to;
+    }
 }
     }

&lt;/pre&gt;</description>
    <dc:creator>Cary Coutant</dc:creator>
    <dc:date>2012-05-23T23:03:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57705">
    <title>Re: [patch] Fix ld to match .data.rel.ro sections more carefully</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57705</link>
    <description>&lt;pre&gt;
Unfortunately, this still doesn't handle the case where we have a
variable named simply "ro" that happens to have a relocation. That
will get placed into a ".data.rel.ro" section that is
indistinguishable from a real ".data.rel.ro" section generated without
-fdata-sections. Does anyone have any suggestions for how to handle
this?

-cary

&lt;/pre&gt;</description>
    <dc:creator>Cary Coutant</dc:creator>
    <dc:date>2012-05-23T22:44:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57704">
    <title>Re: [gold patch] Fix gold to match .data.rel.ro sections more carefully</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57704</link>
    <description>&lt;pre&gt;
Sorry, I committed this without noticing a couple of testsuite
failures. Adding the "." here caused sections named ".data.rel.ro" to
match the next entry in the table, which maps ".data.*" to ".data". I
need to make the mapping a bit smarter...

-cary

&lt;/pre&gt;</description>
    <dc:creator>Cary Coutant</dc:creator>
    <dc:date>2012-05-23T22:36:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57703">
    <title>Re: [gold patch] Fix gold to match .data.rel.ro sections more carefully</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57703</link>
    <description>&lt;pre&gt;

This is OK.

Thanks.

Ian

&lt;/pre&gt;</description>
    <dc:creator>Ian Lance Taylor</dc:creator>
    <dc:date>2012-05-23T20:28:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57702">
    <title>[gold patch] Fix gold to match .data.rel.ro sections more carefully</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.gnu.binutils/57701">
    <title>[patch] Fix ld to match .data.rel.ro sections more carefully</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.gnu.binutils/57700">
    <title>Re: [RFA] leb128.h: Umm, how about int64_t?</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57700</link>
    <description>&lt;pre&gt;

This is OK.

Thanks.

Ian

&lt;/pre&gt;</description>
    <dc:creator>Ian Lance Taylor</dc:creator>
    <dc:date>2012-05-23T18:30:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57699">
    <title>Re: RFC: Displaying multibyte symbol names in readelf</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57699</link>
    <description>&lt;pre&gt;
Test-cases, that it works for some common locale (possibly need
the testing framework to check that it exists, else flag as
UNTESTED) and as before for the "C" locale?

brgds, H-P

&lt;/pre&gt;</description>
    <dc:creator>Hans-Peter Nilsson</dc:creator>
    <dc:date>2012-05-23T18:01:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.gnu.binutils/57698">
    <title>[RFA] leb128.h: Umm, how about int64_t?</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.gnu.binutils/57697">
    <title>[Patch,AVR] Support instrucions XCH, LAT, LAC, LAS</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.gnu.binutils/57696">
    <title>Re: PATCH: PR ld/13909: PR ld/12570 causes eh_frame_hdr section to be sometimes too large</title>
    <link>http://permalink.gmane.org/gmane.comp.gnu.binutils/57696</link>
    <description>&lt;pre&gt;
Why?  It's eh data like any other .eh_frame.



Your PLT eh_frame is discarded because it is not being set up early
enough.  elf-eh-frame.c:1166 "keep = value != 0;" gets a value of 0.

PowerPC has a problem with ordering too, in that .eh_frame_hdr is
stripped when only PLT/glink has eh_frame info.  I want to allow
sizing of the PLT/glink .eh_frame in elf_backend_size_dynamic_sections,
rather than sizing and filling in some data early like x86 does.
The following fixes the PowerPC problem, and should also fix the above
x86 problem.  You'll also be able to size plt_eh_frame to zero when
no plt section is needed.  I'm not going to commit this tonight
though.  It needs testing and I need sleep.

bfd/
* elflink.c (bfd_elf_size_dynamic_sections): Let the backend
size dynamic sections before stripping eh_frame_hdr.
(bfd_elf_gc_sections): Handle multiple .eh_frame sections.
ld/
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Handle
multiple .eh_frame sections attached to bfd.

Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.444
diff -u -p -r1.444 elflink.c
--- bfd/elflink.c23 May 2012 04:35:31 -00001.444
+++ bfd/elflink.c23 May 2012 13:31:03 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5584,17 +5584,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; bfd_elf_size_dynamic_sections (bfd *outp
       &amp;amp;&amp;amp; ! (*bed-&amp;gt;elf_backend_always_size_sections) (output_bfd, info))
     return FALSE;
 
-  if (! _bfd_elf_maybe_strip_eh_frame_hdr (info))
-    return FALSE;
-
   dynobj = elf_hash_table (info)-&amp;gt;dynobj;
 
-  /* If there were no dynamic objects in the link, there is nothing to
-     do here.  */
-  if (dynobj == NULL)
-    return TRUE;
-
-  if (elf_hash_table (info)-&amp;gt;dynamic_sections_created)
+  if (dynobj != NULL &amp;amp;&amp;amp; elf_hash_table (info)-&amp;gt;dynamic_sections_created)
     {
       struct elf_info_failed eif;
       struct elf_link_hash_entry *h;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5897,11 +5889,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; bfd_elf_size_dynamic_sections (bfd *outp
 
   /* The backend must work out the sizes of all the other dynamic
      sections.  */
-  if (bed-&amp;gt;elf_backend_size_dynamic_sections
+  if (dynobj != NULL
+      &amp;amp;&amp;amp; bed-&amp;gt;elf_backend_size_dynamic_sections != NULL
       &amp;amp;&amp;amp; ! (*bed-&amp;gt;elf_backend_size_dynamic_sections) (output_bfd, info))
     return FALSE;
 
-  if (elf_hash_table (info)-&amp;gt;dynamic_sections_created)
+  if (! _bfd_elf_maybe_strip_eh_frame_hdr (info))
+    return FALSE;
+
+  if (dynobj != NULL &amp;amp;&amp;amp; elf_hash_table (info)-&amp;gt;dynamic_sections_created)
     {
       unsigned long section_sym_count;
       struct bfd_elf_version_tree *verdefs;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -12002,12 +11998,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; bfd_elf_gc_sections (bfd *abfd, struct b
       struct elf_reloc_cookie cookie;
 
       sec = bfd_get_section_by_name (sub, ".eh_frame");
-      if (sec &amp;amp;&amp;amp; init_reloc_cookie_for_section (&amp;amp;cookie, info, sec))
+      while (sec &amp;amp;&amp;amp; init_reloc_cookie_for_section (&amp;amp;cookie, info, sec))
 {
   _bfd_elf_parse_eh_frame (sub, info, sec, &amp;amp;cookie);
-  if (elf_section_data (sec)-&amp;gt;sec_info)
+  if (elf_section_data (sec)-&amp;gt;sec_info
+      &amp;amp;&amp;amp; (sec-&amp;gt;flags &amp;amp; SEC_LINKER_CREATED) == 0)
     elf_eh_frame_section (sub) = sec;
   fini_reloc_cookie_for_section (&amp;amp;cookie, sec);
+  sec = bfd_get_next_section_by_name (sec);
 }
     }
   _bfd_elf_end_eh_frame_parsing (info);
Index: ld/emultempl/elf32.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/elf32.em,v
retrieving revision 1.227
diff -u -p -r1.227 elf32.em
--- ld/emultempl/elf32.em16 May 2012 10:43:41 -00001.227
+++ ld/emultempl/elf32.em23 May 2012 13:31:26 -0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1142,10 +1142,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gld${EMULATION_NAME}_after_open (void)
   if (!warn_eh_frame)
     {
       s = bfd_get_section_by_name (abfd, ".eh_frame");
-      warn_eh_frame
-= (s
-   &amp;amp;&amp;amp; s-&amp;gt;size &amp;gt; 8
-   &amp;amp;&amp;amp; !bfd_is_abs_section (s-&amp;gt;output_section));
+      while (s != NULL
+     &amp;amp;&amp;amp; (s-&amp;gt;size &amp;lt;= 8
+ || bfd_is_abs_section (s-&amp;gt;output_section)))
+s = bfd_get_next_section_by_name (s);
+      warn_eh_frame = s != NULL;
     }
   if (elfbfd &amp;amp;&amp;amp; warn_eh_frame)
     break;

&lt;/pre&gt;</description>
    <dc:creator>Alan Modra</dc:creator>
    <dc:date>2012-05-23T14:31:27</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>

