summaryrefslogtreecommitdiff
path: root/bfd/elf32-frv.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2005-02-17 17:11:01 +0000
committerAlexandre Oliva <aoliva@redhat.com>2005-02-17 17:11:01 +0000
commitb8db4681048665067bc5f1499a43c2497ae2ba3a (patch)
tree920557bc8c85cd638750f32b5df009fa779e21bf /bfd/elf32-frv.c
parent49194e6509ebecfe4b65b3dee9c337c9be6f3542 (diff)
downloadbinutils-redhat-b8db4681048665067bc5f1499a43c2497ae2ba3a.tar.gz
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.
Diffstat (limited to 'bfd/elf32-frv.c')
-rw-r--r--bfd/elf32-frv.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index 15f469e284..9a92c2954a 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -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;