-/* Object file output functions. */
-
-/* GAS tends to write sections in little chunks (bfd_set_section_contents)
- which we can't use directly. So we save the little chunks in linked
- lists (one per section) and write them later. */
-
-/* Add a new vms_section structure to vms_section_table
- - forward chaining -. */
-
-static vms_section *
-add_new_contents (bfd * abfd, sec_ptr section)
-{
- vms_section *sptr, *newptr;
-
- sptr = PRIV (vms_section_table)[section->index];
- if (sptr != NULL)
- return sptr;
-
- newptr = bfd_alloc (abfd, (bfd_size_type) sizeof (vms_section));
- if (newptr == NULL)
- return NULL;
- newptr->contents = bfd_alloc (abfd, section->size);
- if (newptr->contents == NULL)
- return NULL;
- newptr->offset = 0;
- newptr->size = section->size;
- newptr->next = 0;
- PRIV (vms_section_table)[section->index] = newptr;
- return newptr;
-}
-
-/* Save section data & offset to a vms_section structure
- vms_section_table[] holds the vms_section chain. */
-
-bfd_boolean
-_bfd_save_vms_section (bfd * abfd,
- sec_ptr section,
- const void * data,
- file_ptr offset,
- bfd_size_type count)
-{
- vms_section *sptr;
-
- if (section->index >= VMS_SECTION_COUNT)
- {
- bfd_set_error (bfd_error_nonrepresentable_section);
- return FALSE;
- }
- if (count == (bfd_size_type)0)
- return TRUE;
- sptr = add_new_contents (abfd, section);
- if (sptr == NULL)
- return FALSE;
- memcpy (sptr->contents + offset, data, (size_t) count);
-
- return TRUE;
-}
-
-/* Get vms_section pointer to saved contents for section # index */
-
-vms_section *
-_bfd_get_vms_section (bfd * abfd, int index)
-{
- if (index >= VMS_SECTION_COUNT)
- {
- bfd_set_error (bfd_error_nonrepresentable_section);
- return NULL;
- }
- return PRIV (vms_section_table)[index];
-}
-\f