aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNelson Chu <nelson@rivosinc.com>2023-06-09 08:47:17 +0800
committerNelson Chu <nelson@rivosinc.com>2024-04-30 13:45:04 +0800
commit7bd696ef499176253bfca0c1d16c4b8164ae836d (patch)
tree34951ed7f94298894059f1df2928eb3258f416a1 /bfd
parent6b4b601b35a0aaf2b8b5db8e5793302736504171 (diff)
downloadgdb-7bd696ef499176253bfca0c1d16c4b8164ae836d.zip
gdb-7bd696ef499176253bfca0c1d16c4b8164ae836d.tar.gz
gdb-7bd696ef499176253bfca0c1d16c4b8164ae836d.tar.bz2
RISC-V: PR29823, defined the missing elf_backend_obj_attrs_handle_unknown.
bfd/ PR 29823 * elfnn-riscv.c (riscv_elf_obj_attrs_handle_unknown): New function. (elf_backend_obj_attrs_handle_unknown): Defined to riscv_elf_obj_attrs_handle_unknown.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/elfnn-riscv.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 95abf2d..604f6de 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -4206,6 +4206,18 @@ _bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
return false;
}
+/* Ignore and report warning for the unknwon elf attribute. */
+
+static bool
+riscv_elf_obj_attrs_handle_unknown (bfd *abfd, int tag)
+{
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("warning: %pB: unknown RISCV ABI object attribute %d"),
+ abfd, tag);
+ return true;
+}
+
/* A second format for recording PC-relative hi relocations. This stores the
information required to relax them to GP-relative addresses. */
@@ -5708,5 +5720,6 @@ riscv_elf_merge_symbol_attribute (struct elf_link_hash_entry *h,
#define elf_backend_obj_attrs_section_type SHT_RISCV_ATTRIBUTES
#undef elf_backend_obj_attrs_section
#define elf_backend_obj_attrs_section RISCV_ATTRIBUTES_SECTION_NAME
+#define elf_backend_obj_attrs_handle_unknown riscv_elf_obj_attrs_handle_unknown
#include "elfNN-target.h"