2011-08-08 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Mon, 8 Aug 2011 14:53:30 +0000 (14:53 +0000)
committerTristan Gingold <gingold@adacore.com>
Mon, 8 Aug 2011 14:53:30 +0000 (14:53 +0000)
* mach-o.c (struct mach_o_segment_name_xlat): Add comments.
(segsec_names_xlat): Reorder elements.
(bfd_mach_o_read_section_32): Fix typo.
(bfd_mach_o_read_section_64): Fix typo.

bfd/ChangeLog
bfd/mach-o.c

index 03b15e32d96490b466ac2a8cc838d111b61ecce4..aaba0edf442784f71c65e8bc82d7985c1c4ff8af 100644 (file)
@@ -1,3 +1,10 @@
+2011-08-08  Tristan Gingold  <gingold@adacore.com>
+
+       * mach-o.c (struct mach_o_segment_name_xlat): Add comments.
+       (segsec_names_xlat): Reorder elements.
+       (bfd_mach_o_read_section_32): Fix typo.
+       (bfd_mach_o_read_section_64): Fix typo.
+
 2011-08-08  Tristan Gingold  <gingold@adacore.com>
 
        * mach-o.h (BFD_MACH_O_SEGNAME_SIZE): New macro.
index d8020dfa101cd501e501eca6a8c10dd282b03c9c..832bc98a142437ecb38266bb7cbb804e8e14f53b 100644 (file)
@@ -134,15 +134,20 @@ static const struct mach_o_section_name_xlat data_section_names_xlat[] =
 
 struct mach_o_segment_name_xlat
 {
+  /* Segment name.  */
   const char *segname;
+
+  /* List of known sections for the segment.  */
   const struct mach_o_section_name_xlat *sections;
 };
 
+/* List of known segment names.  */
+
 static const struct mach_o_segment_name_xlat segsec_names_xlat[] =
   {
-    { "__DWARF", dwarf_section_names_xlat },
     { "__TEXT", text_section_names_xlat },
     { "__DATA", data_section_names_xlat },
+    { "__DWARF", dwarf_section_names_xlat },
     { NULL, NULL }
   };
 
@@ -1675,7 +1680,7 @@ bfd_mach_o_read_section_32 (bfd *abfd,
           != BFD_MACH_O_SECTION_SIZE))
     return NULL;
 
-  sec = bfd_mach_o_make_bfd_section (abfd, raw.sectname, raw.segname);
+  sec = bfd_mach_o_make_bfd_section (abfd, raw.segname, raw.sectname);
   if (sec == NULL)
     return NULL;
 
@@ -1714,7 +1719,7 @@ bfd_mach_o_read_section_64 (bfd *abfd,
           != BFD_MACH_O_SECTION_64_SIZE))
     return NULL;
 
-  sec = bfd_mach_o_make_bfd_section (abfd, raw.sectname, raw.segname);
+  sec = bfd_mach_o_make_bfd_section (abfd, raw.segname, raw.sectname);
   if (sec == NULL)
     return NULL;