aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorSteve Chamberlain <steve@cygnus>1991-04-23 16:02:09 +0000
committerSteve Chamberlain <steve@cygnus>1991-04-23 16:02:09 +0000
commit9872a49c27a0cced505d4d94d543c7d0b647186e (patch)
treef656c6bd7a6bc9bd72abeabc8a1124ba72d4675f /bfd/bfd.c
parenta37cc0c05c5ee0e72a14a09c547555621371ef1d (diff)
downloadgdb-9872a49c27a0cced505d4d94d543c7d0b647186e.zip
gdb-9872a49c27a0cced505d4d94d543c7d0b647186e.tar.gz
gdb-9872a49c27a0cced505d4d94d543c7d0b647186e.tar.bz2
*** empty log message ***
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 78bac79..291850b 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -310,7 +310,7 @@ bfd_set_format (abfd, format)
bfd *abfd;
bfd_format format;
{
- file_ptr filepos;
+
if (bfd_read_p (abfd) ||
((int)abfd->format < (int)bfd_unknown) ||
@@ -324,11 +324,11 @@ bfd_set_format (abfd, format)
/* presume the answer is yes */
abfd->format = format;
- filepos = bfd_tell (abfd);
+/* filepos = bfd_tell (abfd);*/
if (!BFD_SEND_FMT (abfd, _bfd_set_format, (abfd))) {
abfd->format = bfd_unknown;
- bfd_seek (abfd, filepos, SEEK_SET);
+/* bfd_seek (abfd, filepos, SEEK_SET);*/
return false;
}
@@ -371,7 +371,7 @@ DEFUN(bfd_make_section,(abfd, name),
sect = sect->next;
}
- newsect = (asection *) zalloc (sizeof (asection));
+ newsect = (asection *) bfd_zalloc(abfd, sizeof (asection));
if (newsect == NULL) {
bfd_error = no_memory;
return NULL;
@@ -381,13 +381,13 @@ DEFUN(bfd_make_section,(abfd, name),
newsect->index = abfd->section_count++;
newsect->flags = SEC_NO_FLAGS;
-#if ignore /* the compiler doesn't know that zalloc clears the storage */
+
newsect->userdata = 0;
newsect->next = (asection *)NULL;
newsect->relocation = (arelent *)NULL;
newsect->reloc_count = 0;
newsect->line_filepos =0;
-#endif
+
if (BFD_SEND (abfd, _new_section_hook, (abfd, newsect)) != true) {
free (newsect);
return NULL;