/* BFD back-end for binary objects.
- Copyright (C) 1994-2016 Free Software Foundation, Inc.
+ Copyright (C) 1994-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
if (! abfd->output_has_begun)
{
+ unsigned int opb;
bfd_boolean found_low;
bfd_vma low;
asection *s;
found_low = TRUE;
}
+ opb = bfd_octets_per_byte (abfd);
for (s = abfd->sections; s != NULL; s = s->next)
{
- s->filepos = s->lma - low;
+ s->filepos = (s->lma - low) * opb;
/* Skip following warning check for sections that will not
occupy file space. */
if (s->filepos < 0)
_bfd_error_handler
- (_("Warning: Writing section `%s' at huge (ie negative) "
- "file offset 0x%lx."),
- bfd_get_section_name (abfd, s),
- (unsigned long) s->filepos);
+ /* xgettext:c-format */
+ (_("warning: writing section `%A' at huge (ie negative) "
+ "file offset"),
+ s);
}
abfd->output_has_begun = TRUE;
#define binary_bfd_discard_group bfd_generic_discard_group
#define binary_section_already_linked _bfd_generic_section_already_linked
#define binary_bfd_define_common_symbol bfd_generic_define_common_symbol
+#define binary_bfd_define_start_stop bfd_generic_define_start_stop
#define binary_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define binary_bfd_link_just_syms _bfd_generic_link_just_syms
#define binary_bfd_copy_link_hash_symbol_type _bfd_generic_copy_link_hash_symbol_type