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: nds32: left shift cannot be represented in type 'int'
[deliverable/binutils-gdb.git]
/
bfd
/
elf32-xstormy16.c
diff --git
a/bfd/elf32-xstormy16.c
b/bfd/elf32-xstormy16.c
index 476f9e01ada455e90d30bf5bfbc95e3e248e61db..ef106b3f928a441c2d8640d300cbd2899bba2a48 100644
(file)
--- a/
bfd/elf32-xstormy16.c
+++ b/
bfd/elf32-xstormy16.c
@@
-1,5
+1,5
@@
/* Xstormy16-specific support for 32-bit ELF.
/* Xstormy16-specific support for 32-bit ELF.
- Copyright (C) 2000-201
8
Free Software Foundation, Inc.
+ Copyright (C) 2000-201
9
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.
@@
-375,8
+375,8
@@
xstormy16_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an XSTORMY16 ELF reloc. */
/* Set the howto pointer for an XSTORMY16 ELF reloc. */
-static
void
-xstormy16_info_to_howto_rela (bfd * abfd
ATTRIBUTE_UNUSED
,
+static
bfd_boolean
+xstormy16_info_to_howto_rela (bfd * abfd,
arelent * cache_ptr,
Elf_Internal_Rela * dst)
{
arelent * cache_ptr,
Elf_Internal_Rela * dst)
{
@@
-385,11
+385,19
@@
xstormy16_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
if (r_type <= (unsigned int) R_XSTORMY16_12)
cache_ptr->howto = &xstormy16_elf_howto_table [r_type];
else if (r_type - R_XSTORMY16_GNU_VTINHERIT
if (r_type <= (unsigned int) R_XSTORMY16_12)
cache_ptr->howto = &xstormy16_elf_howto_table [r_type];
else if (r_type - R_XSTORMY16_GNU_VTINHERIT
- <= (unsigned int) R_XSTORMY16_GNU_VTENTRY)
+ <= ((unsigned int) R_XSTORMY16_GNU_VTENTRY
+ - (unsigned int) R_XSTORMY16_GNU_VTINHERIT))
cache_ptr->howto
= &xstormy16_elf_howto_table2 [r_type - R_XSTORMY16_GNU_VTINHERIT];
else
cache_ptr->howto
= &xstormy16_elf_howto_table2 [r_type - R_XSTORMY16_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;
}
\f
/* We support 16-bit pointers to code above 64k by generating a thunk
}
\f
/* We support 16-bit pointers to code above 64k by generating a thunk
@@
-463,7
+471,7
@@
xstormy16_elf_check_relocs (bfd *abfd,
flags);
elf_hash_table (info)->splt = splt;
if (splt == NULL
flags);
elf_hash_table (info)->splt = splt;
if (splt == NULL
- || !
bfd_set_section_alignment (dynobj,
splt, 1))
+ || !
bfd_set_section_alignment (
splt, 1))
return FALSE;
}
return FALSE;
}
@@
-505,9
+513,7
@@
xstormy16_elf_check_relocs (bfd *abfd,
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_XSTORMY16_GNU_VTENTRY:
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_XSTORMY16_GNU_VTENTRY:
- BFD_ASSERT (h != NULL);
- if (h != NULL
- && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
return FALSE;
break;
}
return FALSE;
break;
}
@@
-828,7
+834,7
@@
xstormy16_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
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 (ELF32_R_TYPE (rel->r_info))
}
switch (ELF32_R_TYPE (rel->r_info))
@@
-1009,7
+1015,7
@@
xstormy16_elf_gc_mark_hook (asection *sec,
#define elf_backend_always_size_sections \
xstormy16_elf_always_size_sections
#define elf_backend_omit_section_dynsym \
#define elf_backend_always_size_sections \
xstormy16_elf_always_size_sections
#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
+ _bfd_elf_omit_section_dynsym_all
#define elf_backend_finish_dynamic_sections \
xstormy16_elf_finish_dynamic_sections
#define elf_backend_finish_dynamic_sections \
xstormy16_elf_finish_dynamic_sections
This page took
0.026574 seconds
and
4
git commands to generate.