projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Automatic date update in version.in
[deliverable/binutils-gdb.git]
/
bfd
/
elf32-wasm32.c
diff --git
a/bfd/elf32-wasm32.c
b/bfd/elf32-wasm32.c
index 5205bef608a5ed67f3543dc6e521fa5d942f69ac..400d754c6ac4711ec00e8b0c30a4af0b5dc14bbb 100644
(file)
--- a/
bfd/elf32-wasm32.c
+++ b/
bfd/elf32-wasm32.c
@@
-1,5
+1,5
@@
/* 32-bit ELF for the WebAssembly target
/* 32-bit ELF for the WebAssembly target
- Copyright (C) 2017-20
18
Free Software Foundation, Inc.
+ Copyright (C) 2017-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.
@@
-22,7
+22,6
@@
#include "bfd.h"
#include "libbfd.h"
#include "elf-bfd.h"
#include "bfd.h"
#include "libbfd.h"
#include "elf-bfd.h"
-#include "bfd_stdint.h"
#include "libiberty.h"
#include "elf/wasm32.h"
#include "libiberty.h"
#include "elf/wasm32.h"
@@
-103,26
+102,29
@@
elf32_wasm32_rtype_to_howto (bfd *abfd, unsigned r_type)
if (i >= ARRAY_SIZE (elf32_wasm32_howto_table))
{
/* xgettext:c-format */
if (i >= ARRAY_SIZE (elf32_wasm32_howto_table))
{
/* xgettext:c-format */
- _bfd_error_handler (_("%B: invalid relocation type %d"),
- abfd, (int) r_type);
- i = R_WASM32_NONE;
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, r_type);
+ bfd_set_error (bfd_error_bad_value);
+ return NULL;
}
if (elf32_wasm32_howto_table[i].type != r_type)
return NULL;
}
if (elf32_wasm32_howto_table[i].type != r_type)
return NULL;
- return
&elf32_wasm32_howto_table[i]
;
+ return
elf32_wasm32_howto_table + i
;
}
/* Translate the ELF-internal relocation RELA into CACHE_PTR. */
}
/* Translate the ELF-internal relocation RELA into CACHE_PTR. */
-static
void
-elf32_wasm32_info_to_howto_rela (bfd *abfd
ATTRIBUTE_UNUSED
,
+static
bfd_boolean
+elf32_wasm32_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
unsigned int r_type = ELF32_R_TYPE (dst->r_info);
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
unsigned int r_type = ELF32_R_TYPE (dst->r_info);
+
cache_ptr->howto = elf32_wasm32_rtype_to_howto (abfd, r_type);
cache_ptr->howto = elf32_wasm32_rtype_to_howto (abfd, r_type);
+ return cache_ptr->howto != NULL;
}
#define ELF_ARCH bfd_arch_wasm32
}
#define ELF_ARCH bfd_arch_wasm32
This page took
0.025896 seconds
and
4
git commands to generate.