mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
* coff-code.h: Remove coff_get_section_contents, and use the
generic one instead.
This commit is contained in:
@ -1190,14 +1190,12 @@ coff_write_object_contents(abfd)
|
|||||||
return false;
|
return false;
|
||||||
reloc_base = obj_relocbase(abfd);
|
reloc_base = obj_relocbase(abfd);
|
||||||
|
|
||||||
|
/* Make a pass through the symbol table to count line number entries and
|
||||||
|
put them into the correct asections */
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Make a pass through the symbol table to count line number entries and
|
|
||||||
put them into the correct asections
|
|
||||||
*/
|
|
||||||
coff_count_linenumbers(abfd);
|
coff_count_linenumbers(abfd);
|
||||||
data_base = scn_base;
|
data_base = scn_base;
|
||||||
|
|
||||||
/* Work out the size of the reloc and linno areas */
|
/* Work out the size of the reloc and linno areas */
|
||||||
|
|
||||||
for (current = abfd->sections; current != NULL; current = current->next) {
|
for (current = abfd->sections; current != NULL; current = current->next) {
|
||||||
@ -1206,7 +1204,6 @@ coff_write_object_contents(abfd)
|
|||||||
data_base += sizeof(struct scnhdr);
|
data_base += sizeof(struct scnhdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
lineno_base = reloc_base + reloc_size;
|
lineno_base = reloc_base + reloc_size;
|
||||||
sym_base = lineno_base + lnno_size;
|
sym_base = lineno_base + lnno_size;
|
||||||
|
|
||||||
@ -1423,24 +1420,6 @@ coff_set_section_contents(abfd, section, location, offset, count)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
|
||||||
coff_get_section_contents(abfd, section, location, offset, count)
|
|
||||||
bfd *abfd;
|
|
||||||
sec_ptr section;
|
|
||||||
PTR location;
|
|
||||||
file_ptr offset;
|
|
||||||
int count;
|
|
||||||
{
|
|
||||||
if (count == 0
|
|
||||||
|| offset >= section->size
|
|
||||||
|| bfd_seek(abfd, section->filepos + offset, SEEK_SET) == -1
|
|
||||||
|| bfd_read(location, 1, count, abfd) != count) {
|
|
||||||
return (false);
|
|
||||||
} /* on error */
|
|
||||||
return (true);
|
|
||||||
} /* coff_get_section_contents() */
|
|
||||||
|
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
coff_close_and_cleanup(abfd)
|
coff_close_and_cleanup(abfd)
|
||||||
bfd *abfd;
|
bfd *abfd;
|
||||||
@ -2414,3 +2393,4 @@ DEFUN(coff_sizeof_headers,(abfd, reloc),
|
|||||||
#define coff_truncate_arname bfd_dont_truncate_arname
|
#define coff_truncate_arname bfd_dont_truncate_arname
|
||||||
#define coff_openr_next_archived_file bfd_generic_openr_next_archived_file
|
#define coff_openr_next_archived_file bfd_generic_openr_next_archived_file
|
||||||
#define coff_generic_stat_arch_elt bfd_generic_stat_arch_elt
|
#define coff_generic_stat_arch_elt bfd_generic_stat_arch_elt
|
||||||
|
#define coff_get_section_contents bfd_generic_get_section_contents
|
||||||
|
Reference in New Issue
Block a user