/* NLM (NetWare Loadable Module) executable support for BFD.
- Copyright 1993, 1994, 1995, 1998, 2000, 2001, 2002
+ Copyright 1993, 1994, 1995, 1998, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, using ELF support as the
return FALSE;
newsect->vma = 0; /* NLM's are relocatable. */
- newsect->_raw_size = size;
+ newsect->size = size;
newsect->filepos = offset;
newsect->flags = flags;
newsect->alignment_power = bfd_log2 ((bfd_vma) 0); /* FIXME */
newsec = bfd_make_section_anyway (abfd, name);
if (newsec == (asection *) NULL)
return FALSE;
- newsec->_raw_size = size;
+ newsec->size = size;
if (filepos != 0)
{
newsec->filepos = filepos;
{
flagword f;
- sec->_raw_size = BFD_ALIGN (sec->_raw_size, 1 << sec->alignment_power);
+ sec->size = BFD_ALIGN (sec->size, 1 << sec->alignment_power);
f = bfd_get_section_flags (abfd, sec);
if (f & SEC_CODE)
{
- text += sec->_raw_size;
+ text += sec->size;
if (bfd_get_section_vma (abfd, sec) < text_low)
text_low = bfd_get_section_vma (abfd, sec);
if (sec->alignment_power > text_align)
}
else if (f & SEC_DATA)
{
- data += sec->_raw_size;
+ data += sec->size;
if (bfd_get_section_vma (abfd, sec) < data_low)
data_low = bfd_get_section_vma (abfd, sec);
if (sec->alignment_power > data_align)
other_align = sec->alignment_power;
}
else if (f & SEC_ALLOC)
- bss += sec->_raw_size;
+ bss += sec->size;
}
nlm_set_text_low (abfd, text_low);
if (f & SEC_CODE)
{
sec->filepos = text_ptr;
- text_ptr += sec->_raw_size;
+ text_ptr += sec->size;
}
else if (f & SEC_DATA)
{
sec->filepos = data_ptr;
- data_ptr += sec->_raw_size;
+ data_ptr += sec->size;
}
else if (f & SEC_HAS_CONTENTS)
{
sec->filepos = other_ptr;
- other_ptr += sec->_raw_size;
+ other_ptr += sec->size;
}
}
symbol (which is the old value of the symbol). */
sym->section = bss_sec;
size = sym->value;
- sym->value = bss_sec->_raw_size + add;
+ sym->value = bss_sec->size + add;
add += size;
add = BFD_ALIGN (add, 1 << bss_sec->alignment_power);
}
abort ();
}
nlm_fixed_header (abfd)->uninitializedDataSize += add;
- bss_sec->_raw_size += add;
+ bss_sec->size += add;
}
}
nlm_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
if (section->reloc_count != 0)
{
bfd_boolean (*mangle_relocs_func)
- PARAMS ((bfd *, asection *, PTR, bfd_vma, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, bfd_vma, bfd_size_type));
mangle_relocs_func = nlm_mangle_relocs_func (abfd);
if (mangle_relocs_func != NULL)