bfd/ChangeLog:

* elf32-frv.c (elf32_frv_relocate_section): Remove warning from
uninitialized check_segment[1] in TLSMOFF case.
Reported by Alan Modra.
(elf32_frv_relocate_section): Improve errors and warnings.
ld/testsuite/ChangeLog:
* ld-frv/fdpic-static-6.d: Update.
* ld-frv/fdpic*.d: Remove explicit -mfdpic from #as.  Update
spelling of errors and warnings.
This commit is contained in:
Alexandre Oliva
2005-02-17 17:11:01 +00:00
parent 26c41df326
commit 68320ddb7e
30 changed files with 62 additions and 93 deletions

View File

@ -3905,6 +3905,8 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
check_segment[1] =
_frvfdpic_osec_to_segment (output_bfd, sec->output_section);
}
else
check_segment[1] = -1;
break;
case R_FRV_GOTTLSOFF12:
@ -3962,12 +3964,18 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
symbols. */
&& !(picrel && picrel->symndx == -1
&& picrel->d.h->root.type == bfd_link_hash_undefined))
info->callbacks->warning
(info,
(info->shared || info->pie)
? _("relocations between different segments are not supported")
: _("warning: relocation references a different segment"),
name, input_bfd, input_section, rel->r_offset);
{
if (info->shared || info->pie)
(*_bfd_error_handler)
(_("%B(%A+0x%lx): reloc against `%s': %s"),
input_bfd, input_section, (long)rel->r_offset, name,
_("relocation references a different segment"));
else
info->callbacks->warning
(info,
_("relocation references a different segment"),
name, input_bfd, input_section, rel->r_offset);
}
if (!silence_segment_error && (info->shared || info->pie))
return FALSE;
elf_elfheader (output_bfd)->e_flags |= EF_FRV_PIC;
@ -4113,8 +4121,12 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
}
if (msg)
r = info->callbacks->warning
(info, msg, name, input_bfd, input_section, rel->r_offset);
{
(*_bfd_error_handler)
(_("%B(%A+0x%lx): reloc against `%s': %s"),
input_bfd, input_section, (long)rel->r_offset, name, msg);
return FALSE;
}
if (! r)
return FALSE;