X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Fsrec.c;h=5ca4f36ae5944ae34cb7c9d7146f03e626efc453;hb=966dc1a27c55ccb298cb8c7c41c9cc2985cc321a;hp=66cc72fea8c7b49f824772e4de2259479a3e7c7e;hpb=34a87bb07a4a3b2202fc25167a6b0f12575edc87;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/srec.c b/bfd/srec.c index 66cc72fea8..5ca4f36ae5 100644 --- a/bfd/srec.c +++ b/bfd/srec.c @@ -1,5 +1,5 @@ /* BFD back-end for s-record objects. - Copyright (C) 1990-2018 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support . This file is part of BFD, the Binary File Descriptor library. @@ -550,7 +550,7 @@ srec_scan (bfd *abfd) { char secbuf[20]; char *secname; - bfd_size_type amt; + size_t amt; flagword flags; sprintf (secbuf, ".sec%d", bfd_count_sections (abfd) + 1); @@ -646,7 +646,7 @@ srec_scan (bfd *abfd) /* Check whether an existing file is an S-record file. */ -static const bfd_target * +static bfd_cleanup srec_object_p (bfd *abfd) { void * tdata_save; @@ -676,12 +676,12 @@ srec_object_p (bfd *abfd) if (abfd->symcount > 0) abfd->flags |= HAS_SYMS; - return abfd->xvec; + return _bfd_no_cleanup; } /* Check whether an existing file is an S-record file with symbols. */ -static const bfd_target * +static bfd_cleanup symbolsrec_object_p (bfd *abfd) { void * tdata_save; @@ -711,7 +711,7 @@ symbolsrec_object_p (bfd *abfd) if (abfd->symcount > 0) abfd->flags |= HAS_SYMS; - return abfd->xvec; + return _bfd_no_cleanup; } /* Read in the contents of a section in an S-record file. */ @@ -885,7 +885,7 @@ srec_set_section_contents (bfd *abfd, file_ptr offset, bfd_size_type bytes_to_do) { - int opb = bfd_octets_per_byte (abfd); + int opb = bfd_octets_per_byte (abfd, NULL); tdata_type *tdata = abfd->tdata.srec_data; srec_data_list_type *entry; @@ -1053,7 +1053,8 @@ srec_write_section (bfd *abfd, if (octets_this_chunk > _bfd_srec_len) octets_this_chunk = _bfd_srec_len; - address = list->where + octets_written / bfd_octets_per_byte (abfd); + address = list->where + (octets_written + / bfd_octets_per_byte (abfd, NULL)); if (! srec_write_record (abfd, tdata->type, @@ -1275,6 +1276,7 @@ srec_print_symbol (bfd *abfd, #define srec_bfd_lookup_section_flags bfd_generic_lookup_section_flags #define srec_bfd_merge_sections bfd_generic_merge_sections #define srec_bfd_is_group_section bfd_generic_is_group_section +#define srec_bfd_group_name bfd_generic_group_name #define srec_bfd_discard_group bfd_generic_discard_group #define srec_section_already_linked _bfd_generic_section_already_linked #define srec_bfd_define_common_symbol bfd_generic_define_common_symbol