PTR data AND
boolean relocateable)
{
-
- if (output_section->flags & SEC_HAS_CONTENTS
- && !(output_section->flags & SEC_NEVER_LOAD)
- && (output_section->flags & SEC_LOAD)
+ if ((output_section->flags & SEC_HAS_CONTENTS) != 0
&& seclet->size)
{
data = (PTR) bfd_get_relocated_section_contents(abfd, seclet, data,
for (i = 1; i < seclet->size; i+=2) {
d[i] = seclet->u.fill.value ;
}
+ /* Don't bother to fill in empty sections */
+ if (!(bfd_get_section_flags(abfd, section) & SEC_HAS_CONTENTS))
+ {
+ return true;
+ }
return bfd_set_section_contents(abfd, section, d, seclet->offset,
seclet->size);
}