X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=bfd%2Faout-adobe.c;h=b06465059c4dc86c9f54c902cb781f066fc55f3b;hb=b34976b65aea8f33690229600bbf4527ec3118e1;hp=11f1ca33241a0953564006bd0f5b6b76fbe49f10;hpb=583d52d728c60410c0d39bae68ee536a7b9e7a6c;p=external%2Fbinutils.git diff --git a/bfd/aout-adobe.c b/bfd/aout-adobe.c index 11f1ca3..b064650 100644 --- a/bfd/aout-adobe.c +++ b/bfd/aout-adobe.c @@ -32,19 +32,26 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Forward decl. */ extern const bfd_target a_out_adobe_vec; -static const bfd_target *aout_adobe_callback PARAMS ((bfd *)); - -extern boolean aout_32_slurp_symbol_table PARAMS ((bfd *abfd)); -extern boolean aout_32_write_syms PARAMS ((bfd *)); -static void aout_adobe_write_section PARAMS ((bfd *abfd, sec_ptr sect)); -static const bfd_target * aout_adobe_object_p PARAMS ((bfd *)); -static boolean aout_adobe_mkobject PARAMS ((bfd *)); -static boolean aout_adobe_write_object_contents PARAMS ((bfd *)); -static boolean aout_adobe_set_section_contents +static const bfd_target *aout_adobe_callback + PARAMS ((bfd *)); +extern bfd_boolean aout_32_slurp_symbol_table + PARAMS ((bfd *abfd)); +extern bfd_boolean aout_32_write_syms + PARAMS ((bfd *)); +static void aout_adobe_write_section + PARAMS ((bfd *abfd, sec_ptr sect)); +static const bfd_target * aout_adobe_object_p + PARAMS ((bfd *)); +static bfd_boolean aout_adobe_mkobject + PARAMS ((bfd *)); +static bfd_boolean aout_adobe_write_object_contents + PARAMS ((bfd *)); +static bfd_boolean aout_adobe_set_section_contents PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type)); -static boolean aout_adobe_set_arch_mach +static bfd_boolean aout_adobe_set_arch_mach PARAMS ((bfd *, enum bfd_architecture, unsigned long)); -static int aout_adobe_sizeof_headers PARAMS ((bfd *, boolean)); +static int aout_adobe_sizeof_headers + PARAMS ((bfd *, bfd_boolean)); /* Swaps the information in an executable header taken from a raw byte stream memory image, into the internal exec_header structure. */ @@ -271,7 +278,7 @@ struct bout_data_struct struct internal_exec e; }; -static boolean +static bfd_boolean aout_adobe_mkobject (abfd) bfd *abfd; { @@ -280,7 +287,7 @@ aout_adobe_mkobject (abfd) rawptr = (struct bout_data_struct *) bfd_zalloc (abfd, amt); if (rawptr == NULL) - return false; + return FALSE; abfd->tdata.bout_data = rawptr; exec_hdr (abfd) = &rawptr->e; @@ -291,10 +298,10 @@ aout_adobe_mkobject (abfd) adata (abfd).segment_size = 1; /* Not applicable. */ adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE; - return true; + return TRUE; } -static boolean +static bfd_boolean aout_adobe_write_object_contents (abfd) bfd *abfd; { @@ -342,7 +349,7 @@ aout_adobe_write_object_contents (abfd) amt = EXEC_BYTES_SIZE; if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 || bfd_bwrite ((PTR) &swapped_hdr, amt, abfd) != amt) - return false; + return FALSE; /* Now write out the section information. Text first, data next, rest afterward. */ @@ -362,38 +369,38 @@ aout_adobe_write_object_contents (abfd) /* Write final `sentinel` section header (with type of 0). */ amt = sizeof (*sentinel); if (bfd_bwrite ((PTR) sentinel, amt, abfd) != amt) - return false; + return FALSE; /* Now write out reloc info, followed by syms and strings. */ if (bfd_get_symcount (abfd) != 0) { if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (*exec_hdr (abfd))), SEEK_SET) != 0) - return false; + return FALSE; if (! aout_32_write_syms (abfd)) - return false; + return FALSE; if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*exec_hdr (abfd))), SEEK_SET) != 0) - return false; + return FALSE; for (sect = abfd->sections; sect; sect = sect->next) if (sect->flags & SEC_CODE) if (!aout_32_squirt_out_relocs (abfd, sect)) - return false; + return FALSE; if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*exec_hdr (abfd))), SEEK_SET) != 0) - return false; + return FALSE; for (sect = abfd->sections; sect; sect = sect->next) if (sect->flags & SEC_DATA) if (!aout_32_squirt_out_relocs (abfd, sect)) - return false; + return FALSE; } - return true; + return TRUE; } static void @@ -404,7 +411,7 @@ aout_adobe_write_section (abfd, sect) /* FIXME XXX */ } -static boolean +static bfd_boolean aout_adobe_set_section_contents (abfd, section, location, offset, count) bfd *abfd; asection *section; @@ -457,34 +464,34 @@ aout_adobe_set_section_contents (abfd, section, location, offset, count) /* Regardless, once we know what we're doing, we might as well get going. */ if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0) - return false; + return FALSE; if (count == 0) - return true; + return TRUE; return bfd_bwrite ((PTR) location, count, abfd) == count; } -static boolean +static bfd_boolean aout_adobe_set_arch_mach (abfd, arch, machine) bfd *abfd; enum bfd_architecture arch; unsigned long machine; { if (! bfd_default_set_arch_mach (abfd, arch, machine)) - return false; + return FALSE; if (arch == bfd_arch_unknown || arch == bfd_arch_m68k) - return true; + return TRUE; - return false; + return FALSE; } static int aout_adobe_sizeof_headers (ignore_abfd, ignore) bfd *ignore_abfd ATTRIBUTE_UNUSED; - boolean ignore ATTRIBUTE_UNUSED; + bfd_boolean ignore ATTRIBUTE_UNUSED; { return sizeof (struct internal_exec); }