- asect->name = ".reg";
- asect->flags = SEC_HAS_CONTENTS;
- asect->vma = 0;
- asect->filepos = bfd_get_32 (abfd, crashinfo.registers) - rambase;
- /* Since we don't know the exact size of the saved register info,
- choose a register section size that is either the remaining part
- of the file, or 1024, whichever is smaller. */
- nread = statbuf.st_size - asect->filepos;
- asect->_raw_size = (nread < 1024) ? nread : 1024;
- asect->next = abfd->sections;
- abfd->sections = asect;
- ++abfd->section_count;
+ asect->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
+ /* The size of memory is the size of the core file itself. */
+ asect->size = statbuf.st_size;
+ asect->vma = rambase;
+ asect->filepos = 0;