diff options
author | Tristan Gingold <gingold@adacore.com> | 2011-08-08 14:53:30 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2011-08-08 14:53:30 +0000 |
commit | 5a5cbf7230bb75d9ed5c7badb2a7fc69162b98ec (patch) | |
tree | f0b45305e929528aab45168a4b419edf5410e83a /bfd/mach-o.c | |
parent | 74a6005feadb4594bfa27978ced89ad61220fb6a (diff) | |
download | binutils-5a5cbf7230bb75d9ed5c7badb2a7fc69162b98ec.zip binutils-5a5cbf7230bb75d9ed5c7badb2a7fc69162b98ec.tar.gz binutils-5a5cbf7230bb75d9ed5c7badb2a7fc69162b98ec.tar.bz2 |
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.
Diffstat (limited to 'bfd/mach-o.c')
-rw-r--r-- | bfd/mach-o.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bfd/mach-o.c b/bfd/mach-o.c index d8020df..832bc98 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -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; |