{
/* PR 17512: file: f057ec89. */
/* xgettext:c-format */
- _bfd_error_handler (_("%B: attempt to load strings from"
+ _bfd_error_handler (_("%pB: attempt to load strings from"
" a non-string section (number %d)"),
abfd, shindex);
return NULL;
unsigned int shstrndx = elf_elfheader(abfd)->e_shstrndx;
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: invalid string offset %u >= %Lu for section `%s'"),
- abfd, strindex, hdr->sh_size,
+ (_("%pB: invalid string offset %u >= %" PRIu64 " for section `%s'"),
+ abfd, strindex, (uint64_t) hdr->sh_size,
(shindex == shstrndx && strindex == hdr->sh_name
? ".shstrtab"
: bfd_elf_string_from_elf_section (abfd, shstrndx, hdr->sh_name)));
{
symoffset += (esym - (bfd_byte *) extsym_buf) / extsym_size;
/* xgettext:c-format */
- _bfd_error_handler (_("%B symbol number %lu references"
+ _bfd_error_handler (_("%pB symbol number %lu references"
" nonexistent SHT_SYMTAB_SHNDX section"),
ibfd, (unsigned long) symoffset);
if (alloc_intsym != NULL)
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: corrupt size field in group section"
- " header: %#Lx"), abfd, shdr->sh_size);
+ (_("%pB: corrupt size field in group section"
+ " header: %#" PRIx64),
+ abfd, (uint64_t) shdr->sh_size);
bfd_set_error (bfd_error_bad_value);
-- num_group;
continue;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: invalid size field in group section"
- " header: %#Lx"), abfd, shdr->sh_size);
+ (_("%pB: invalid size field in group section"
+ " header: %#" PRIx64 ""),
+ abfd, (uint64_t) shdr->sh_size);
bfd_set_error (bfd_error_bad_value);
-- num_group;
/* PR 17510: If the group contents are even
if (idx >= shnum)
{
_bfd_error_handler
- (_("%B: invalid SHT_GROUP entry"), abfd);
+ (_("%pB: invalid SHT_GROUP entry"), abfd);
idx = 0;
}
dest->shdr = elf_elfsections (abfd)[idx];
elf_tdata (abfd)->group_sect_ptr = NULL;
elf_tdata (abfd)->num_group = num_group = -1;
_bfd_error_handler
- (_("%B: no valid group sections found"), abfd);
+ (_("%pB: no valid group sections found"), abfd);
bfd_set_error (bfd_error_bad_value);
}
}
{
/* See PR 21957 for a reproducer. */
/* xgettext:c-format */
- _bfd_error_handler (_("%B: group section '%A' has no contents"),
+ _bfd_error_handler (_("%pB: group section '%pA' has no contents"),
abfd, shdr->bfd_section);
elf_tdata (abfd)->group_sect_ptr[i] = NULL;
bfd_set_error (bfd_error_bad_value);
if (elf_group_name (newsect) == NULL)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%B: no group info for section '%A'"),
+ _bfd_error_handler (_("%pB: no group info for section '%pA'"),
abfd, newsect);
return FALSE;
}
if (bed->link_order_error_handler)
bed->link_order_error_handler
/* xgettext:c-format */
- (_("%B: warning: sh_link not set for section `%A'"),
+ (_("%pB: warning: sh_link not set for section `%pA'"),
abfd, s);
}
else
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: sh_link [%d] in section `%A' is incorrect"),
+ (_("%pB: sh_link [%d] in section `%pA' is incorrect"),
s->owner, elfsec, s);
result = FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: SHT_GROUP section [index %d] has no SHF_GROUP sections"),
+ (_("%pB: SHT_GROUP section [index %d] has no SHF_GROUP sections"),
abfd, elf_section_data (s)->this_idx);
result = FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: section group entry number %u is corrupt"),
+ (_("%pB: section group entry number %u is corrupt"),
abfd, i);
result = FALSE;
continue;
/* There are some unknown sections in the group. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: unknown type [%#x] section `%s' in group [%A]"),
+ (_("%pB: unknown type [%#x] section `%s' in group [%pA]"),
abfd,
idx->shdr->sh_type,
bfd_elf_string_from_elf_section (abfd,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: unable to initialize compress status for section %s"),
+ (_("%pB: unable to initialize compress status for section %s"),
abfd, name);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: unable to initialize decompress status for section %s"),
+ (_("%pB: unable to initialize decompress status for section %s"),
abfd, name);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: Invalid sh_link field (%d) in section number %d"),
+ (_("%pB: invalid sh_link field (%d) in section number %d"),
ibfd, iheader->sh_link, secnum);
return FALSE;
}
if we could not find a match ? */
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: Failed to find link section for section %d"), obfd, secnum);
+ (_("%pB: failed to find link section for section %d"), obfd, secnum);
}
if (iheader->sh_info)
else
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: Failed to find info section for section %d"), obfd, secnum);
+ (_("%pB: failed to find info section for section %d"), obfd, secnum);
}
return changed;
if (sections_being_created [shindex])
{
_bfd_error_handler
- (_("%B: warning: loop in section dependencies detected"), abfd);
+ (_("%pB: warning: loop in section dependencies detected"), abfd);
return FALSE;
}
sections_being_created [shindex] = TRUE;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: warning: multiple symbol tables detected"
+ (_("%pB: warning: multiple symbol tables detected"
" - ignoring the table in section %u"),
abfd, shindex);
goto success;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: warning: multiple dynamic symbol tables detected"
+ (_("%pB: warning: multiple dynamic symbol tables detected"
" - ignoring the table in section %u"),
abfd, shindex);
goto success;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: invalid link %u for reloc section %s (index %u)"),
+ (_("%pB: invalid link %u for reloc section %s (index %u)"),
abfd, hdr->sh_link, name, shindex);
ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name,
shindex);
for applications? */
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: unknown type [%#x] section `%s'"),
+ (_("%pB: unknown type [%#x] section `%s'"),
abfd, hdr->sh_type, name);
else
{
/* FIXME: We should handle this section. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: unknown type [%#x] section `%s'"),
+ (_("%pB: unknown type [%#x] section `%s'"),
abfd, hdr->sh_type, name);
else if (hdr->sh_type >= SHT_LOOS && hdr->sh_type <= SHT_HIOS)
{
be rejected with an error message. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: unknown type [%#x] section `%s'"),
+ (_("%pB: unknown type [%#x] section `%s'"),
abfd, hdr->sh_type, name);
else
{
/* FIXME: We should handle this section. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: unknown type [%#x] section `%s'"),
+ (_("%pB: unknown type [%#x] section `%s'"),
abfd, hdr->sh_type, name);
goto fail;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: error: Alignment power %d of section `%A' is too big"),
+ (_("%pB: error: alignment power %d of section `%pA' is too big"),
abfd, asect->alignment_power, asect);
arg->failed = TRUE;
return;
non-bss input sections to bss output sections, or emit data
to a bss output section via a linker script. */
_bfd_error_handler
- (_("warning: section `%A' type changed to PROGBITS"), asect);
+ (_("warning: section `%pA' type changed to PROGBITS"), asect);
this_hdr->sh_type = sh_type;
}
if (section_number >= SHN_LORESERVE)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%B: too many sections: %u"),
+ _bfd_error_handler (_("%pB: too many sections: %u"),
abfd, section_number);
return FALSE;
}
asection *kept;
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: sh_link of section `%A' points to"
- " discarded section `%A' of `%B'"),
+ (_("%pB: sh_link of section `%pA' points to"
+ " discarded section `%pA' of `%pB'"),
abfd, d->this_hdr.bfd_section,
s, s->owner);
/* Point to the kept section if it has the same
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: sh_link of section `%A' points to"
- " removed section `%A' of `%B'"),
+ (_("%pB: sh_link of section `%pA' points to"
+ " removed section `%pA' of `%pB'"),
abfd, d->this_hdr.bfd_section, s, s->owner);
bfd_set_error (bfd_error_bad_value);
return FALSE;
if (bed->link_order_error_handler)
bed->link_order_error_handler
/* xgettext:c-format */
- (_("%B: warning: sh_link not set for section `%A'"),
+ (_("%pB: warning: sh_link not set for section `%pA'"),
abfd, sec);
}
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: GNU_MBIN section `%A' has invalid sh_info field: %d"),
+ (_("%pB: GNU_MBIN section `%pA' has invalid sh_info field: %d"),
abfd, s, elf_section_data (s)->this_hdr.sh_info);
continue;
}
return TRUE;
}
+#define IS_TBSS(s) \
+ ((s->flags & (SEC_THREAD_LOCAL | SEC_LOAD)) == SEC_THREAD_LOCAL)
+
/* Set up a mapping from BFD sections to program segments. */
bfd_boolean
executable = TRUE;
last_hdr = hdr;
/* .tbss sections effectively have zero size. */
- if ((hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD))
- != SEC_THREAD_LOCAL)
- last_size = hdr->size;
- else
- last_size = 0;
+ last_size = !IS_TBSS (hdr) ? hdr->size : 0;
continue;
}
last_hdr = hdr;
/* .tbss sections effectively have zero size. */
- if ((hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD)) != SEC_THREAD_LOCAL)
- last_size = hdr->size;
- else
- last_size = 0;
+ last_size = !IS_TBSS (hdr) ? hdr->size : 0;
phdr_index = i;
phdr_in_segment = FALSE;
}
for .tbss. */
if (last_hdr != NULL
&& (i - phdr_index != 1
- || ((last_hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD))
- != SEC_THREAD_LOCAL)))
+ || !IS_TBSS (last_hdr)))
{
m = make_mapping (abfd, sections, phdr_index, i, phdr_in_segment);
if (m == NULL)
if ((s->flags & SEC_THREAD_LOCAL) == 0)
{
_bfd_error_handler
- (_("%B: TLS sections are not adjacent:"), abfd);
+ (_("%pB: TLS sections are not adjacent:"), abfd);
s = first_tls;
i = 0;
while (i < (unsigned int) tls_count)
{
if ((s->flags & SEC_THREAD_LOCAL) != 0)
{
- _bfd_error_handler (_(" TLS: %A"), s);
+ _bfd_error_handler (_(" TLS: %pA"), s);
i++;
}
else
- _bfd_error_handler (_(" non-TLS: %A"), s);
+ _bfd_error_handler (_(" non-TLS: %pA"), s);
s = s->next;
}
bfd_set_error (bfd_error_bad_value);
&& strcmp (m->sections[0]->name, ".dynamic") != 0)
{
_bfd_error_handler
- (_("%B: The first section in the PT_DYNAMIC segment"
+ (_("%pB: The first section in the PT_DYNAMIC segment"
" is not the .dynamic section"),
abfd);
bfd_set_error (bfd_error_bad_value);
&& p->p_paddr < (bfd_vma) off))
{
_bfd_error_handler
- (_("%B: Not enough room for program headers,"
+ (_("%pB: not enough room for program headers,"
" try linking with -N"),
abfd);
bfd_set_error (bfd_error_bad_value);
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: section %A lma %#Lx adjusted to %#Lx"),
- abfd, sec, s_start, p_end);
+ (_("%pB: section %pA lma %#" PRIx64 " adjusted to %#" PRIx64),
+ abfd, sec, (uint64_t) s_start, (uint64_t) p_end);
adjust = 0;
sec->lma = p_end;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: section `%A' can't be allocated in segment %d"),
+ (_("%pB: section `%pA' can't be allocated in segment %d"),
abfd, sec, j);
print_segment_map (m);
}
if (hdr->sh_size != 0)
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: warning: allocated section `%s' not in segment"),
+ (_("%pB: warning: allocated section `%s' not in segment"),
abfd,
(hdr->bfd_section == NULL
? "*unknown*"
{
if (p->p_type == PT_GNU_RELRO)
{
- const Elf_Internal_Phdr *lp;
- struct elf_segment_map *lm;
+ bfd_vma start, end;
+ bfd_boolean ok;
if (link_info != NULL)
{
/* During linking the range of the RELRO segment is passed
- in link_info. */
+ in link_info. Note that there may be padding between
+ relro_start and the first RELRO section. */
+ start = link_info->relro_start;
+ end = link_info->relro_end;
+ }
+ else if (m->count != 0)
+ {
+ if (!m->p_size_valid)
+ abort ();
+ start = m->sections[0]->vma;
+ end = start + m->p_size;
+ }
+ else
+ {
+ start = 0;
+ end = 0;
+ }
+
+ ok = FALSE;
+ if (start < end)
+ {
+ struct elf_segment_map *lm;
+ const Elf_Internal_Phdr *lp;
+ unsigned int i;
+
+ /* Find a LOAD segment containing a section in the RELRO
+ segment. */
for (lm = elf_seg_map (abfd), lp = phdrs;
lm != NULL;
lm = lm->next, lp++)
{
if (lp->p_type == PT_LOAD
- && lp->p_vaddr < link_info->relro_end
&& lm->count != 0
- && lm->sections[0]->vma >= link_info->relro_start)
+ && (lm->sections[lm->count - 1]->vma
+ + (!IS_TBSS (lm->sections[lm->count - 1])
+ ? lm->sections[lm->count - 1]->size
+ : 0)) > start
+ && lm->sections[0]->vma < end)
break;
}
- BFD_ASSERT (lm != NULL);
- }
- else
- {
- /* Otherwise we are copying an executable or shared
- library, but we need to use the same linker logic. */
- for (lp = phdrs; lp < phdrs + count; ++lp)
+ if (lm != NULL)
{
- if (lp->p_type == PT_LOAD
- && lp->p_paddr == p->p_paddr)
- break;
- }
- }
+ /* Find the section starting the RELRO segment. */
+ for (i = 0; i < lm->count; i++)
+ {
+ asection *s = lm->sections[i];
+ if (s->vma >= start
+ && s->vma < end
+ && s->size != 0)
+ break;
+ }
- if (lp < phdrs + count)
- {
- p->p_vaddr = lp->p_vaddr;
- p->p_paddr = lp->p_paddr;
- p->p_offset = lp->p_offset;
- if (link_info != NULL)
- p->p_filesz = link_info->relro_end - lp->p_vaddr;
- else if (m->p_size_valid)
- p->p_filesz = m->p_size;
- else
- abort ();
- p->p_memsz = p->p_filesz;
- /* Preserve the alignment and flags if they are valid. The
- gold linker generates RW/4 for the PT_GNU_RELRO section.
- It is better for objcopy/strip to honor these attributes
- otherwise gdb will choke when using separate debug files.
- */
- if (!m->p_align_valid)
- p->p_align = 1;
- if (!m->p_flags_valid)
- p->p_flags = PF_R;
- }
- else
- {
- memset (p, 0, sizeof *p);
- p->p_type = PT_NULL;
+ if (i < lm->count)
+ {
+ p->p_vaddr = lm->sections[i]->vma;
+ p->p_paddr = lm->sections[i]->lma;
+ p->p_offset = lm->sections[i]->filepos;
+ p->p_memsz = end - p->p_vaddr;
+ p->p_filesz = p->p_memsz;
+
+ /* The RELRO segment typically ends a few bytes
+ into .got.plt but other layouts are possible.
+ In cases where the end does not match any
+ loaded section (for instance is in file
+ padding), trim p_filesz back to correspond to
+ the end of loaded section contents. */
+ if (p->p_filesz > lp->p_vaddr + lp->p_filesz - p->p_vaddr)
+ p->p_filesz = lp->p_vaddr + lp->p_filesz - p->p_vaddr;
+
+ /* Preserve the alignment and flags if they are
+ valid. The gold linker generates RW/4 for
+ the PT_GNU_RELRO section. It is better for
+ objcopy/strip to honor these attributes
+ otherwise gdb will choke when using separate
+ debug files. */
+ if (!m->p_align_valid)
+ p->p_align = 1;
+ if (!m->p_flags_valid)
+ p->p_flags = PF_R;
+ ok = TRUE;
+ }
+ }
}
+ if (link_info != NULL)
+ BFD_ASSERT (ok);
+ if (!ok)
+ memset (p, 0, sizeof *p);
}
else if (p->p_type == PT_GNU_STACK)
{
{
/* PR 17512: file: 2195325e. */
_bfd_error_handler
- (_("%B: error: non-load segment %d includes file header "
+ (_("%pB: error: non-load segment %d includes file header "
"and/or program header"),
abfd, (int) (p - phdrs));
return FALSE;
}
/* Write out the program headers. */
- alloc = elf_program_header_size (abfd) / bed->s->sizeof_phdr;
-
- /* Sort the program headers into the ordering required by the ELF standard. */
+ alloc = elf_elfheader (abfd)->e_phnum;
if (alloc == 0)
return TRUE;
changed or the programs updated. */
if (alloc > 1
&& tdata->phdr[0].p_type == PT_PHDR
- && ! bed->elf_backend_allow_non_load_phdr (abfd, tdata->phdr, alloc)
+ && (bed->elf_backend_allow_non_load_phdr == NULL
+ || !bed->elf_backend_allow_non_load_phdr (abfd, tdata->phdr,
+ alloc))
&& tdata->phdr[1].p_type == PT_LOAD
&& (tdata->phdr[1].p_vaddr > tdata->phdr[0].p_vaddr
- || (tdata->phdr[1].p_vaddr + tdata->phdr[1].p_memsz)
- < (tdata->phdr[0].p_vaddr + tdata->phdr[0].p_memsz)))
+ || (tdata->phdr[1].p_vaddr + tdata->phdr[1].p_memsz
+ < tdata->phdr[0].p_vaddr + tdata->phdr[0].p_memsz)))
{
/* The fix for this error is usually to edit the linker script being
used and set up the program headers manually. Either that or
leave room for the headers at the start of the SECTIONS. */
- _bfd_error_handler (_("\
-%B: error: PHDR segment not covered by LOAD segment"),
+ _bfd_error_handler (_("%pB: error: PHDR segment not covered"
+ " by LOAD segment"),
abfd);
return FALSE;
}
= _bfd_elf_strtab_offset (elf_shstrtab (abfd),
i_shdrp[count]->sh_name);
if (bed->elf_backend_section_processing)
- (*bed->elf_backend_section_processing) (abfd, i_shdrp[count]);
+ if (!(*bed->elf_backend_section_processing) (abfd, i_shdrp[count]))
+ return FALSE;
if (i_shdrp[count]->contents)
{
bfd_size_type amt = i_shdrp[count]->sh_size;
which is used in a relocation entry. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: symbol `%s' required but not present"),
+ (_("%pB: symbol `%s' required but not present"),
abfd, bfd_asymbol_name (asym_ptr));
bfd_set_error (bfd_error_no_symbols);
return -1;
if (segment->p_type == PT_LOAD
&& (segment->p_filesz > 0 || segment->p_memsz == 0))
/* xgettext:c-format */
- _bfd_error_handler (_("%B: warning: Empty loadable segment detected"
- " at vaddr=%#Lx, is this intentional?"),
- ibfd, segment->p_vaddr);
+ _bfd_error_handler
+ (_("%pB: warning: empty loadable segment detected"
+ " at vaddr=%#" PRIx64 ", is this intentional?"),
+ ibfd, (uint64_t) segment->p_vaddr);
map->count = 0;
*pointer_to_map = map;
/* PR 17512: file: f17299af. */
if (segment->p_align > (bfd_vma) 1 << ((sizeof (bfd_vma) * 8) - 2))
/* xgettext:c-format */
- _bfd_error_handler (_("%B: warning: segment alignment of %#Lx"
- " is too large"),
- ibfd, segment->p_align);
+ _bfd_error_handler (_("%pB: warning: segment alignment of %#"
+ PRIx64 " is too large"),
+ ibfd, (uint64_t) segment->p_align);
else
maxpagesize = segment->p_align;
}
but the SHT_GROUP section is, then adjust its size. */
else if (s->output_section == discarded
&& isec->output_section != discarded)
- removed += 4;
+ {
+ struct bfd_elf_section_data *elf_sec = elf_section_data (s);
+ removed += 4;
+ if (elf_sec->rel.hdr != NULL
+ && (elf_sec->rel.hdr->sh_flags & SHF_GROUP) != 0)
+ removed += 4;
+ if (elf_sec->rela.hdr != NULL
+ && (elf_sec->rela.hdr->sh_flags & SHF_GROUP) != 0)
+ removed += 4;
+ }
s = elf_next_in_group (s);
if (s == first)
break;
if (discarded != NULL)
{
/* If we've been called for ld -r, then we need to
- adjust the input section size. This function may
- be called multiple times, so save the original
- size. */
+ adjust the input section size. */
if (isec->rawsize == 0)
isec->rawsize = isec->size;
isec->size = isec->rawsize - removed;
+ if (isec->size <= 4)
+ {
+ isec->size = 0;
+ isec->flags |= SEC_EXCLUDE;
+ }
}
else
{
/* Adjust the output section size when called from
objcopy. */
isec->output_section->size -= removed;
+ if (isec->output_section->size <= 4)
+ {
+ isec->output_section->size = 0;
+ isec->output_section->flags |= SEC_EXCLUDE;
+ }
}
}
}
if (shndx == SHN_BAD)
{
/* xgettext:c-format */
- _bfd_error_handler (_("\
-Unable to find equivalent output section for symbol '%s' from section '%s'"),
- syms[idx]->name ? syms[idx]->name : "<Local sym>",
- sec->name);
+ _bfd_error_handler
+ (_("unable to find equivalent output section"
+ " for symbol '%s' from section '%s'"),
+ syms[idx]->name ? syms[idx]->name : "<Local sym>",
+ sec->name);
bfd_set_error (bfd_error_invalid_operation);
goto error_return;
}
{
error_return_bad_verref:
_bfd_error_handler
- (_("%B: .gnu.version_r invalid entry"), abfd);
+ (_("%pB: .gnu.version_r invalid entry"), abfd);
bfd_set_error (bfd_error_bad_value);
error_return_verref:
elf_tdata (abfd)->verref = NULL;
{
error_return_bad_verdef:
_bfd_error_handler
- (_("%B: .gnu.version_d invalid entry"), abfd);
+ (_("%pB: .gnu.version_d invalid entry"), abfd);
bfd_set_error (bfd_error_bad_value);
error_return_verdef:
elf_tdata (abfd)->verdef = NULL;
return TRUE;
}
-void
+bfd_boolean
_bfd_elf_no_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
arelent *cache_ptr ATTRIBUTE_UNUSED,
Elf_Internal_Rela *dst ATTRIBUTE_UNUSED)
{
abort ();
+ return FALSE;
}
/* Try to convert a non-ELF reloc into an ELF one. */
return TRUE;
fail:
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%B: unsupported relocation type %s"),
- abfd, areloc->howto->name);
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: %s unsupported"),
+ abfd, areloc->howto->name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
align is less than 4, we use 4 byte alignment. */
if (align < 4)
align = 4;
+ if (align != 4 && align != 8)
+ return FALSE;
p = buf;
while (p < buf + size)