{
if (buf != NULL)
free (buf);
- buf = (bfd_byte *) malloc (bytes * 2);
+ buf = (bfd_byte *) bfd_malloc (bytes * 2);
if (buf == NULL)
- {
- bfd_set_error (bfd_error_no_memory);
- goto error_return;
- }
+ goto error_return;
bufsize = bytes * 2;
}
goto error_return;
sec->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC;
sec->vma = address;
+ sec->lma = address;
sec->_raw_size = bytes;
sec->filepos = pos;
}
{
if (buf != NULL)
free (buf);
- buf = (bfd_byte *) malloc (bytes * 2);
+ buf = (bfd_byte *) bfd_malloc (bytes * 2);
if (buf == NULL)
- {
- bfd_set_error (bfd_error_no_memory);
- goto error_return;
- }
+ goto error_return;
bufsize = bytes * 2;
}