(*info->callbacks->reloc_overflow)
(info, NULL,
(link_order->type == bfd_section_reloc_link_order
- ? bfd_section_name (abfd, link_order->u.reloc.p->u.section)
+ ? bfd_section_name (link_order->u.reloc.p->u.section)
: link_order->u.reloc.p->u.name),
r->howto->name, link_order->u.reloc.p->addend,
NULL, NULL, 0);
break;
}
- loc = link_order->offset * bfd_octets_per_byte (abfd);
+ loc = link_order->offset * bfd_octets_per_byte (abfd, sec);
ok = bfd_set_section_contents (abfd, sec, buf, loc, size);
free (buf);
if (! ok)
static bfd_boolean
default_data_link_order (bfd *abfd,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
asection *sec,
struct bfd_link_order *link_order)
{
fill_size = link_order->u.data.size;
if (fill_size == 0)
{
- fill = abfd->arch_info->fill (size, bfd_big_endian (abfd),
+ fill = abfd->arch_info->fill (size, info->big_endian,
(sec->flags & SEC_CODE) != 0);
if (fill == NULL)
return FALSE;
}
}
- loc = link_order->offset * bfd_octets_per_byte (abfd);
+ loc = link_order->offset * bfd_octets_per_byte (abfd, sec);
result = bfd_set_section_contents (abfd, sec, fill, loc, size);
if (fill != link_order->u.data.contents)
}
/* Output the section contents. */
- loc = input_section->output_offset * bfd_octets_per_byte (output_bfd);
+ loc = (input_section->output_offset
+ * bfd_octets_per_byte (output_bfd, output_section));
if (! bfd_set_section_contents (output_bfd, output_section,
new_contents, loc, input_section->size))
goto error_return;
into a single large link once section, which defeats the purpose
of having link once sections in the first place. */
- name = bfd_get_section_name (abfd, sec);
+ name = bfd_section_name (sec);
already_linked_list = bfd_section_already_linked_table_lookup (name);
/* Increase the size of the section to align the common symbol.
The alignment must be a power of two. */
- alignment = bfd_octets_per_byte (output_bfd) << power_of_two;
+ alignment = bfd_octets_per_byte (output_bfd, section) << power_of_two;
BFD_ASSERT (alignment != 0 && (alignment & -alignment) == alignment);
section->size += alignment - 1;
section->size &= -alignment;