projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ubsan: xgate: left shift of negative value
[deliverable/binutils-gdb.git]
/
bfd
/
elf32-tilepro.c
diff --git
a/bfd/elf32-tilepro.c
b/bfd/elf32-tilepro.c
index 24fc64e0f113bb7a42f8308fdb327d1456527cfb..f821389e923b821be6620ae445d0fb932320acae 100644
(file)
--- a/
bfd/elf32-tilepro.c
+++ b/
bfd/elf32-tilepro.c
@@
-1,5
+1,5
@@
/* TILEPro-specific support for 32-bit ELF.
/* TILEPro-specific support for 32-bit ELF.
- Copyright (C) 2011-20
18
Free Software Foundation, Inc.
+ Copyright (C) 2011-20
20
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
This file is part of BFD, the Binary File Descriptor library.
@@
-783,7
+783,7
@@
tilepro_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an TILEPro ELF reloc. */
/* Set the howto pointer for an TILEPro ELF reloc. */
-static
void
+static
bfd_boolean
tilepro_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
arelent * cache_ptr,
Elf_Internal_Rela * dst)
tilepro_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
arelent * cache_ptr,
Elf_Internal_Rela * dst)
@@
-793,11
+793,19
@@
tilepro_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
if (r_type <= (unsigned int) R_TILEPRO_IMM16_X1_TLS_LE_HA)
cache_ptr->howto = &tilepro_elf_howto_table [r_type];
else if (r_type - R_TILEPRO_GNU_VTINHERIT
if (r_type <= (unsigned int) R_TILEPRO_IMM16_X1_TLS_LE_HA)
cache_ptr->howto = &tilepro_elf_howto_table [r_type];
else if (r_type - R_TILEPRO_GNU_VTINHERIT
- <= (unsigned int) R_TILEPRO_GNU_VTENTRY)
+ <= ((unsigned int) R_TILEPRO_GNU_VTENTRY
+ - (unsigned int) R_TILEPRO_GNU_VTINHERIT))
cache_ptr->howto
= &tilepro_elf_howto_table2 [r_type - R_TILEPRO_GNU_VTINHERIT];
else
cache_ptr->howto
= &tilepro_elf_howto_table2 [r_type - R_TILEPRO_GNU_VTINHERIT];
else
- abort ();
+ {
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, r_type);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ return TRUE;
}
typedef tilepro_bundle_bits (*tilepro_create_func)(int);
}
typedef tilepro_bundle_bits (*tilepro_create_func)(int);
@@
-1221,13
+1229,13
@@
tilepro_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
(bed->dynamic_sec_flags
| SEC_READONLY));
if (s == NULL
(bed->dynamic_sec_flags
| SEC_READONLY));
if (s == NULL
- || !
bfd_set_section_alignment (abfd,
s, bed->s->log_file_align))
+ || !
bfd_set_section_alignment (
s, bed->s->log_file_align))
return FALSE;
htab->srelgot = s;
s = s_got = bfd_make_section_with_flags (abfd, ".got", flags);
if (s == NULL
return FALSE;
htab->srelgot = s;
s = s_got = bfd_make_section_with_flags (abfd, ".got", flags);
if (s == NULL
- || !bfd_set_section_alignment (
abfd,
s, bed->s->log_file_align))
+ || !bfd_set_section_alignment (s, bed->s->log_file_align))
return FALSE;
htab->sgot = s;
return FALSE;
htab->sgot = s;
@@
-1238,8
+1246,7
@@
tilepro_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
{
s = bfd_make_section_with_flags (abfd, ".got.plt", flags);
if (s == NULL
{
s = bfd_make_section_with_flags (abfd, ".got.plt", flags);
if (s == NULL
- || !bfd_set_section_alignment (abfd, s,
- bed->s->log_file_align))
+ || !bfd_set_section_alignment (s, bed->s->log_file_align))
return FALSE;
htab->sgotplt = s;
return FALSE;
htab->sgotplt = s;
@@
-2746,7
+2753,7
@@
tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
name = (bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name));
if (name == NULL || *name == '\0')
name = (bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name));
if (name == NULL || *name == '\0')
- name = bfd_section_name (
input_bfd,
sec);
+ name = bfd_section_name (sec);
}
switch (r_type)
}
switch (r_type)
This page took
0.029023 seconds
and
4
git commands to generate.