- core_regsec (abfd)->name = ".reg";
- core_reg2sec (abfd)->name = ".reg2";
-
- core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
- core_reg2sec (abfd)->flags = SEC_HAS_CONTENTS;
-
- core_regsec (abfd)->_raw_size = sizeof (core->cd_regs);
- core_reg2sec (abfd)->_raw_size = sizeof (core->cd_fpregs);
-
- core_regsec (abfd)->vma = -1;
- core_reg2sec (abfd)->vma = -1;
-
- /* We'll access the regs afresh in the core file, like any section. */
- core_regsec (abfd)->filepos =
- (file_ptr) offsetof (struct corehdr, cd_regs[0]);
- core_reg2sec (abfd)->filepos =
- (file_ptr) offsetof (struct corehdr, cd_fpregs);
-
- /* Add the 2 reg fake sections to abfd. */
- abfd->section_count += 2;
- abfd->sections = core_regsec (abfd);
- core_regsec (abfd)->next = core_reg2sec (abfd);
- core_reg2sec (abfd)->next = core_section (abfd, 0);
-
- return abfd->xvec;