1 /* Mach-O support for BFD.
2 Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2009
3 Free Software Foundation, Inc.
5 This file is part of BFD, the Binary File Descriptor library.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20 MA 02110-1301, USA. */
22 #ifndef _BFD_MACH_O_H_
23 #define _BFD_MACH_O_H_
26 #include "mach-o/loader.h"
28 typedef struct bfd_mach_o_header
31 unsigned long cputype
;
32 unsigned long cpusubtype
;
33 unsigned long filetype
;
35 unsigned long sizeofcmds
;
37 unsigned int reserved
;
38 /* Version 1: 32 bits, version 2: 64 bits. */
40 enum bfd_endian byteorder
;
44 #define BFD_MACH_O_HEADER_SIZE 28
45 #define BFD_MACH_O_HEADER_64_SIZE 32
47 typedef struct bfd_mach_o_section
49 /* Fields present in the file. */
50 char sectname
[16 + 1];
59 unsigned long reserved1
;
60 unsigned long reserved2
;
61 unsigned long reserved3
;
63 /* Corresponding bfd section. */
67 #define BFD_MACH_O_SECTION_SIZE 68
68 #define BFD_MACH_O_SECTION_64_SIZE 80
70 typedef struct bfd_mach_o_segment_command
76 unsigned long filesize
;
77 unsigned long maxprot
; /* Maximum permitted protection. */
78 unsigned long initprot
; /* Initial protection. */
81 bfd_mach_o_section
*sections
;
83 bfd_mach_o_segment_command
;
84 #define BFD_MACH_O_LC_SEGMENT_SIZE 56
85 #define BFD_MACH_O_LC_SEGMENT_64_SIZE 72
87 /* Protection flags. */
88 #define BFD_MACH_O_PROT_READ 0x01
89 #define BFD_MACH_O_PROT_WRITE 0x02
90 #define BFD_MACH_O_PROT_EXECUTE 0x04
92 /* Generic relocation types (used by i386). */
93 #define BFD_MACH_O_GENERIC_RELOC_VANILLA 0
94 #define BFD_MACH_O_GENERIC_RELOC_PAIR 1
95 #define BFD_MACH_O_GENERIC_RELOC_SECTDIFF 2
96 #define BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR 3
97 #define BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF 4
99 /* X86-64 relocations. */
100 #define BFD_MACH_O_X86_64_RELOC_UNSIGNED 0 /* Absolute addresses. */
101 #define BFD_MACH_O_X86_64_RELOC_SIGNED 1 /* 32-bit disp. */
102 #define BFD_MACH_O_X86_64_RELOC_BRANCH 2 /* 32-bit pcrel disp. */
103 #define BFD_MACH_O_X86_64_RELOC_GOT_LOAD 3 /* Movq load of a GOT entry. */
104 #define BFD_MACH_O_X86_64_RELOC_GOT 4 /* GOT reference. */
105 #define BFD_MACH_O_X86_64_RELOC_SUBTRACTOR 5 /* Symbol difference. */
106 #define BFD_MACH_O_X86_64_RELOC_SIGNED_1 6 /* 32-bit signed disp -1. */
107 #define BFD_MACH_O_X86_64_RELOC_SIGNED_2 7 /* 32-bit signed disp -2. */
108 #define BFD_MACH_O_X86_64_RELOC_SIGNED_4 8 /* 32-bit signed disp -4. */
110 /* Size of a relocation entry. */
111 #define BFD_MACH_O_RELENT_SIZE 8
113 /* Fields for a normal (non-scattered) entry. */
114 #define BFD_MACH_O_R_PCREL 0x01000000
115 #define BFD_MACH_O_GET_R_LENGTH(s) (((s) >> 25) & 0x3)
116 #define BFD_MACH_O_R_EXTERN 0x08000000
117 #define BFD_MACH_O_GET_R_TYPE(s) (((s) >> 28) & 0x0f)
118 #define BFD_MACH_O_GET_R_SYMBOLNUM(s) ((s) & 0x00ffffff)
119 #define BFD_MACH_O_SET_R_LENGTH(l) (((l) & 0x3) << 25)
120 #define BFD_MACH_O_SET_R_TYPE(t) (((t) & 0xf) << 28)
121 #define BFD_MACH_O_SET_R_SYMBOLNUM(s) ((s) & 0x00ffffff)
123 /* Fields for a scattered entry. */
124 #define BFD_MACH_O_SR_SCATTERED 0x80000000
125 #define BFD_MACH_O_SR_PCREL 0x40000000
126 #define BFD_MACH_O_GET_SR_LENGTH(s) (((s) >> 28) & 0x3)
127 #define BFD_MACH_O_GET_SR_TYPE(s) (((s) >> 24) & 0x0f)
128 #define BFD_MACH_O_GET_SR_ADDRESS(s) ((s) & 0x00ffffff)
129 #define BFD_MACH_O_SET_SR_LENGTH(l) (((l) & 0x3) << 28)
130 #define BFD_MACH_O_SET_SR_TYPE(t) (((t) & 0xf) << 24)
131 #define BFD_MACH_O_SET_SR_ADDRESS(s) ((s) & 0x00ffffff)
133 /* Expanded internal representation of a relocation entry. */
134 typedef struct bfd_mach_o_reloc_info
138 unsigned int r_scattered
: 1;
139 unsigned int r_type
: 4;
140 unsigned int r_pcrel
: 1;
141 unsigned int r_length
: 2;
142 unsigned int r_extern
: 1;
144 bfd_mach_o_reloc_info
;
146 typedef struct bfd_mach_o_asymbol
148 /* The actual symbol which the rest of BFD works with. */
151 /* Fields from Mach-O symbol. */
152 unsigned char n_type
;
153 unsigned char n_sect
;
154 unsigned short n_desc
;
157 #define BFD_MACH_O_NLIST_SIZE 12
158 #define BFD_MACH_O_NLIST_64_SIZE 16
160 typedef struct bfd_mach_o_symtab_command
165 unsigned int strsize
;
166 bfd_mach_o_asymbol
*symbols
;
169 bfd_mach_o_symtab_command
;
171 /* This is the second set of the symbolic information which is used to support
172 the data structures for the dynamically link editor.
174 The original set of symbolic information in the symtab_command which contains
175 the symbol and string tables must also be present when this load command is
176 present. When this load command is present the symbol table is organized
177 into three groups of symbols:
178 local symbols (static and debugging symbols) - grouped by module
179 defined external symbols - grouped by module (sorted by name if not lib)
180 undefined external symbols (sorted by name)
181 In this load command there are offsets and counts to each of the three groups
184 This load command contains a the offsets and sizes of the following new
185 symbolic information tables:
188 reference symbol table
189 indirect symbol table
190 The first three tables above (the table of contents, module table and
191 reference symbol table) are only present if the file is a dynamically linked
192 shared library. For executable and object modules, which are files
193 containing only one module, the information that would be in these three
194 tables is determined as follows:
195 table of contents - the defined external symbols are sorted by name
196 module table - the file contains only one module so everything in the
197 file is part of the module.
198 reference symbol table - is the defined and undefined external symbols
200 For dynamically linked shared library files this load command also contains
201 offsets and sizes to the pool of relocation entries for all sections
202 separated into two groups:
203 external relocation entries
204 local relocation entries
205 For executable and object modules the relocation entries continue to hang
206 off the section structures. */
208 typedef struct bfd_mach_o_dylib_module
210 /* Index into the string table indicating the name of the module. */
211 unsigned long module_name_idx
;
214 /* Index into the symbol table of the first defined external symbol provided
216 unsigned long iextdefsym
;
218 /* Number of external symbols provided by this module. */
219 unsigned long nextdefsym
;
221 /* Index into the external reference table of the first entry
222 provided by this module. */
223 unsigned long irefsym
;
225 /* Number of external reference entries provided by this module. */
226 unsigned long nrefsym
;
228 /* Index into the symbol table of the first local symbol provided by this
230 unsigned long ilocalsym
;
232 /* Number of local symbols provided by this module. */
233 unsigned long nlocalsym
;
235 /* Index into the external relocation table of the first entry provided
237 unsigned long iextrel
;
239 /* Number of external relocation entries provided by this module. */
240 unsigned long nextrel
;
242 /* Index in the module initialization section to the pointers for this
244 unsigned short iinit
;
246 /* Index in the module termination section to the pointers for this
248 unsigned short iterm
;
250 /* Number of pointers in the module initialization for this module. */
251 unsigned short ninit
;
253 /* Number of pointers in the module termination for this module. */
254 unsigned short nterm
;
256 /* Number of data byte for this module that are used in the __module_info
257 section of the __OBJC segment. */
258 unsigned long objc_module_info_size
;
260 /* Statically linked address of the start of the data for this module
261 in the __module_info section of the __OBJC_segment. */
262 bfd_vma objc_module_info_addr
;
264 bfd_mach_o_dylib_module
;
265 #define BFD_MACH_O_DYLIB_MODULE_SIZE 52
266 #define BFD_MACH_O_DYLIB_MODULE_64_SIZE 56
268 typedef struct bfd_mach_o_dylib_table_of_content
270 /* Index into the symbol table to the defined external symbol. */
271 unsigned long symbol_index
;
273 /* Index into the module table to the module for this entry. */
274 unsigned long module_index
;
276 bfd_mach_o_dylib_table_of_content
;
277 #define BFD_MACH_O_TABLE_OF_CONTENT_SIZE 8
279 typedef struct bfd_mach_o_dylib_reference
281 /* Index into the symbol table for the symbol being referenced. */
284 /* Type of the reference being made (use REFERENCE_FLAGS constants). */
287 bfd_mach_o_dylib_reference
;
288 #define BFD_MACH_O_REFERENCE_SIZE 4
290 typedef struct bfd_mach_o_dysymtab_command
292 /* The symbols indicated by symoff and nsyms of the LC_SYMTAB load command
293 are grouped into the following three groups:
294 local symbols (further grouped by the module they are from)
295 defined external symbols (further grouped by the module they are from)
298 The local symbols are used only for debugging. The dynamic binding
299 process may have to use them to indicate to the debugger the local
300 symbols for a module that is being bound.
302 The last two groups are used by the dynamic binding process to do the
303 binding (indirectly through the module table and the reference symbol
304 table when this is a dynamically linked shared library file). */
306 unsigned long ilocalsym
; /* Index to local symbols. */
307 unsigned long nlocalsym
; /* Number of local symbols. */
308 unsigned long iextdefsym
; /* Index to externally defined symbols. */
309 unsigned long nextdefsym
; /* Number of externally defined symbols. */
310 unsigned long iundefsym
; /* Index to undefined symbols. */
311 unsigned long nundefsym
; /* Number of undefined symbols. */
313 /* For the for the dynamic binding process to find which module a symbol
314 is defined in the table of contents is used (analogous to the ranlib
315 structure in an archive) which maps defined external symbols to modules
316 they are defined in. This exists only in a dynamically linked shared
317 library file. For executable and object modules the defined external
318 symbols are sorted by name and is use as the table of contents. */
320 unsigned long tocoff
; /* File offset to table of contents. */
321 unsigned long ntoc
; /* Number of entries in table of contents. */
323 /* To support dynamic binding of "modules" (whole object files) the symbol
324 table must reflect the modules that the file was created from. This is
325 done by having a module table that has indexes and counts into the merged
326 tables for each module. The module structure that these two entries
327 refer to is described below. This exists only in a dynamically linked
328 shared library file. For executable and object modules the file only
329 contains one module so everything in the file belongs to the module. */
331 unsigned long modtaboff
; /* File offset to module table. */
332 unsigned long nmodtab
; /* Number of module table entries. */
334 /* To support dynamic module binding the module structure for each module
335 indicates the external references (defined and undefined) each module
336 makes. For each module there is an offset and a count into the
337 reference symbol table for the symbols that the module references.
338 This exists only in a dynamically linked shared library file. For
339 executable and object modules the defined external symbols and the
340 undefined external symbols indicates the external references. */
342 unsigned long extrefsymoff
; /* Offset to referenced symbol table. */
343 unsigned long nextrefsyms
; /* Number of referenced symbol table entries. */
345 /* The sections that contain "symbol pointers" and "routine stubs" have
346 indexes and (implied counts based on the size of the section and fixed
347 size of the entry) into the "indirect symbol" table for each pointer
348 and stub. For every section of these two types the index into the
349 indirect symbol table is stored in the section header in the field
350 reserved1. An indirect symbol table entry is simply a 32bit index into
351 the symbol table to the symbol that the pointer or stub is referring to.
352 The indirect symbol table is ordered to match the entries in the section. */
354 unsigned long indirectsymoff
; /* File offset to the indirect symbol table. */
355 unsigned long nindirectsyms
; /* Number of indirect symbol table entries. */
357 /* To support relocating an individual module in a library file quickly the
358 external relocation entries for each module in the library need to be
359 accessed efficiently. Since the relocation entries can't be accessed
360 through the section headers for a library file they are separated into
361 groups of local and external entries further grouped by module. In this
362 case the presents of this load command who's extreloff, nextrel,
363 locreloff and nlocrel fields are non-zero indicates that the relocation
364 entries of non-merged sections are not referenced through the section
365 structures (and the reloff and nreloc fields in the section headers are
368 Since the relocation entries are not accessed through the section headers
369 this requires the r_address field to be something other than a section
370 offset to identify the item to be relocated. In this case r_address is
371 set to the offset from the vmaddr of the first LC_SEGMENT command.
373 The relocation entries are grouped by module and the module table
374 entries have indexes and counts into them for the group of external
375 relocation entries for that the module.
377 For sections that are merged across modules there must not be any
378 remaining external relocation entries for them (for merged sections
379 remaining relocation entries must be local). */
381 unsigned long extreloff
; /* Offset to external relocation entries. */
382 unsigned long nextrel
; /* Number of external relocation entries. */
384 /* All the local relocation entries are grouped together (they are not
385 grouped by their module since they are only used if the object is moved
386 from it statically link edited address). */
388 unsigned long locreloff
; /* Offset to local relocation entries. */
389 unsigned long nlocrel
; /* Number of local relocation entries. */
391 bfd_mach_o_dylib_module
*dylib_module
;
392 bfd_mach_o_dylib_table_of_content
*dylib_toc
;
393 unsigned int *indirect_syms
;
394 bfd_mach_o_dylib_reference
*ext_refs
;
396 bfd_mach_o_dysymtab_command
;
398 /* An indirect symbol table entry is simply a 32bit index into the symbol table
399 to the symbol that the pointer or stub is refering to. Unless it is for a
400 non-lazy symbol pointer section for a defined symbol which strip(1) has
401 removed. In which case it has the value INDIRECT_SYMBOL_LOCAL. If the
402 symbol was also absolute INDIRECT_SYMBOL_ABS is or'ed with that. */
404 #define BFD_MACH_O_INDIRECT_SYMBOL_LOCAL 0x80000000
405 #define BFD_MACH_O_INDIRECT_SYMBOL_ABS 0x40000000
406 #define BFD_MACH_O_INDIRECT_SYMBOL_SIZE 4
408 /* For LC_THREAD or LC_UNIXTHREAD. */
410 typedef struct bfd_mach_o_thread_flavour
412 unsigned long flavour
;
413 unsigned long offset
;
416 bfd_mach_o_thread_flavour
;
418 typedef struct bfd_mach_o_thread_command
420 unsigned long nflavours
;
421 bfd_mach_o_thread_flavour
*flavours
;
424 bfd_mach_o_thread_command
;
426 /* For LC_LOAD_DYLINKER and LC_ID_DYLINKER. */
428 typedef struct bfd_mach_o_dylinker_command
430 unsigned long name_offset
; /* Offset to library's path name. */
431 unsigned long name_len
; /* Offset to library's path name. */
434 bfd_mach_o_dylinker_command
;
436 /* For LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, LC_ID_DYLIB
437 or LC_REEXPORT_DYLIB. */
439 typedef struct bfd_mach_o_dylib_command
441 unsigned long name_offset
; /* Offset to library's path name. */
442 unsigned long name_len
; /* Offset to library's path name. */
443 unsigned long timestamp
; /* Library's build time stamp. */
444 unsigned long current_version
; /* Library's current version number. */
445 unsigned long compatibility_version
; /* Library's compatibility vers number. */
448 bfd_mach_o_dylib_command
;
450 /* For LC_PREBOUND_DYLIB. */
452 typedef struct bfd_mach_o_prebound_dylib_command
454 unsigned long name
; /* Library's path name. */
455 unsigned long nmodules
; /* Number of modules in library. */
456 unsigned long linked_modules
; /* Bit vector of linked modules. */
458 bfd_mach_o_prebound_dylib_command
;
462 typedef struct bfd_mach_o_uuid_command
464 unsigned char uuid
[16];
466 bfd_mach_o_uuid_command
;
468 /* For LC_CODE_SIGNATURE or LC_SEGMENT_SPLIT_INFO. */
470 typedef struct bfd_mach_o_linkedit_command
472 unsigned long dataoff
;
473 unsigned long datasize
;
475 bfd_mach_o_linkedit_command
;
477 typedef struct bfd_mach_o_str_command
479 unsigned long stroff
;
480 unsigned long str_len
;
483 bfd_mach_o_str_command
;
485 typedef struct bfd_mach_o_dyld_info_command
487 /* File offset and size to rebase info. */
488 unsigned int rebase_off
;
489 unsigned int rebase_size
;
491 /* File offset and size of binding info. */
492 unsigned int bind_off
;
493 unsigned int bind_size
;
495 /* File offset and size of weak binding info. */
496 unsigned int weak_bind_off
;
497 unsigned int weak_bind_size
;
499 /* File offset and size of lazy binding info. */
500 unsigned int lazy_bind_off
;
501 unsigned int lazy_bind_size
;
503 /* File offset and size of export info. */
504 unsigned int export_off
;
505 unsigned int export_size
;
507 bfd_mach_o_dyld_info_command
;
509 typedef struct bfd_mach_o_load_command
511 bfd_mach_o_load_command_type type
;
512 bfd_boolean type_required
;
517 bfd_mach_o_segment_command segment
;
518 bfd_mach_o_symtab_command symtab
;
519 bfd_mach_o_dysymtab_command dysymtab
;
520 bfd_mach_o_thread_command thread
;
521 bfd_mach_o_dylib_command dylib
;
522 bfd_mach_o_dylinker_command dylinker
;
523 bfd_mach_o_prebound_dylib_command prebound_dylib
;
524 bfd_mach_o_uuid_command uuid
;
525 bfd_mach_o_linkedit_command linkedit
;
526 bfd_mach_o_str_command str
;
527 bfd_mach_o_dyld_info_command dyld_info
;
531 bfd_mach_o_load_command
;
533 typedef struct mach_o_data_struct
536 bfd_mach_o_header header
;
537 /* Array of load commands (length is given by header.ncmds). */
538 bfd_mach_o_load_command
*commands
;
540 /* Flatten array of sections. The array is 0-based. */
541 unsigned long nsects
;
542 bfd_mach_o_section
**sections
;
544 /* Used while writting: current length of the output file. This is used
545 to allocate space in the file. */
548 /* As symtab is referenced by other load command, it is handy to have
549 a direct access to it. Also it is not clearly stated, only one symtab
551 bfd_mach_o_symtab_command
*symtab
;
552 bfd_mach_o_dysymtab_command
*dysymtab
;
554 bfd_mach_o_data_struct
;
556 /* Target specific routines. */
557 typedef struct bfd_mach_o_backend_data
559 enum bfd_architecture arch
;
560 bfd_boolean (*_bfd_mach_o_swap_reloc_in
)(arelent
*, bfd_mach_o_reloc_info
*);
561 bfd_boolean (*_bfd_mach_o_swap_reloc_out
)(arelent
*, bfd_mach_o_reloc_info
*);
562 bfd_boolean (*_bfd_mach_o_print_thread
)(bfd
*, bfd_mach_o_thread_flavour
*,
565 bfd_mach_o_backend_data
;
567 #define bfd_mach_o_get_data(abfd) ((abfd)->tdata.mach_o_data)
568 #define bfd_mach_o_get_backend_data(abfd) \
569 ((bfd_mach_o_backend_data*)(abfd)->xvec->backend_data)
571 bfd_boolean
bfd_mach_o_valid (bfd
*);
572 int bfd_mach_o_read_dysymtab_symbol (bfd
*, bfd_mach_o_dysymtab_command
*, bfd_mach_o_symtab_command
*, bfd_mach_o_asymbol
*, unsigned long);
573 int bfd_mach_o_scan_start_address (bfd
*);
574 int bfd_mach_o_scan (bfd
*, bfd_mach_o_header
*, bfd_mach_o_data_struct
*);
575 bfd_boolean
bfd_mach_o_mkobject_init (bfd
*);
576 const bfd_target
*bfd_mach_o_object_p (bfd
*);
577 const bfd_target
*bfd_mach_o_core_p (bfd
*);
578 const bfd_target
*bfd_mach_o_archive_p (bfd
*);
579 bfd
*bfd_mach_o_openr_next_archived_file (bfd
*, bfd
*);
580 bfd_boolean
bfd_mach_o_set_arch_mach (bfd
*, enum bfd_architecture
,
582 int bfd_mach_o_lookup_section (bfd
*, asection
*, bfd_mach_o_load_command
**, bfd_mach_o_section
**);
583 int bfd_mach_o_lookup_command (bfd
*, bfd_mach_o_load_command_type
, bfd_mach_o_load_command
**);
584 bfd_boolean
bfd_mach_o_write_contents (bfd
*);
585 bfd_boolean
bfd_mach_o_bfd_copy_private_symbol_data (bfd
*, asymbol
*,
587 bfd_boolean
bfd_mach_o_bfd_copy_private_section_data (bfd
*, asection
*,
589 bfd_boolean
bfd_mach_o_bfd_copy_private_bfd_data (bfd
*, bfd
*);
590 long bfd_mach_o_get_symtab_upper_bound (bfd
*);
591 long bfd_mach_o_canonicalize_symtab (bfd
*, asymbol
**);
592 long bfd_mach_o_get_synthetic_symtab (bfd
*, long, asymbol
**, long,
593 asymbol
**, asymbol
**ret
);
594 long bfd_mach_o_get_reloc_upper_bound (bfd
*, asection
*);
595 long bfd_mach_o_canonicalize_reloc (bfd
*, asection
*, arelent
**, asymbol
**);
596 long bfd_mach_o_get_dynamic_reloc_upper_bound (bfd
*);
597 long bfd_mach_o_canonicalize_dynamic_reloc (bfd
*, arelent
**, asymbol
**);
598 asymbol
*bfd_mach_o_make_empty_symbol (bfd
*);
599 void bfd_mach_o_get_symbol_info (bfd
*, asymbol
*, symbol_info
*);
600 void bfd_mach_o_print_symbol (bfd
*, PTR
, asymbol
*, bfd_print_symbol_type
);
601 bfd_boolean
bfd_mach_o_bfd_print_private_bfd_data (bfd
*, PTR
);
602 int bfd_mach_o_sizeof_headers (bfd
*, struct bfd_link_info
*);
603 unsigned long bfd_mach_o_stack_addr (enum bfd_mach_o_cpu_type
);
604 int bfd_mach_o_core_fetch_environment (bfd
*, unsigned char **, unsigned int *);
605 char *bfd_mach_o_core_file_failing_command (bfd
*);
606 int bfd_mach_o_core_file_failing_signal (bfd
*);
607 bfd_boolean
bfd_mach_o_core_file_matches_executable_p (bfd
*, bfd
*);
608 bfd
*bfd_mach_o_fat_extract (bfd
*, bfd_format
, const bfd_arch_info_type
*);
609 const bfd_target
*bfd_mach_o_header_p (bfd
*, bfd_mach_o_filetype
,
610 bfd_mach_o_cpu_type
);
611 bfd_boolean
bfd_mach_o_build_commands (bfd
*);
612 bfd_boolean
bfd_mach_o_set_section_contents (bfd
*, asection
*, const void *,
613 file_ptr
, bfd_size_type
);
614 unsigned int bfd_mach_o_version (bfd
*);
616 unsigned int bfd_mach_o_get_section_type_from_name (const char *);
617 unsigned int bfd_mach_o_get_section_attribute_from_name (const char *);
618 void bfd_mach_o_normalize_section_name (const char *, const char *,
619 const char **, flagword
*);
621 extern const bfd_target mach_o_fat_vec
;
623 #endif /* _BFD_MACH_O_H_ */