aboutsummaryrefslogtreecommitdiff
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
commit68320ddb7e5b01262e93cf9d57ffe9ea71d289d6 (patch)
tree05f2fbff8e2801edd3e9c9979d640e9715865250 /bfd/elf32-frv.c
parent26c41df326291cfe8211f195291a26b370de9523 (diff)
downloadgdb-68320ddb7e5b01262e93cf9d57ffe9ea71d289d6.zip
gdb-68320ddb7e5b01262e93cf9d57ffe9ea71d289d6.tar.gz
gdb-68320ddb7e5b01262e93cf9d57ffe9ea71d289d6.tar.bz2
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 15f469e..9a92c29 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;