[binutils-gdb] score and mmix target_id
Alan Modra
amodra@sourceware.org
Mon Dec 16 10:59:24 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=64a91215cd9572fb8f049eb59ec2e2359b9dd7dc
commit 64a91215cd9572fb8f049eb59ec2e2359b9dd7dc
Author: Alan Modra <amodra@gmail.com>
Date: Mon Dec 16 19:31:34 2024 +1030
score and mmix target_id
These targets currently use GENERIC_ELF_DATA as their target_id, but
that isn't exactly correct. While their bfd tdata is generic elf,
their elf_section_data is extended with extra target data. Add
MMIX_ELF_DATA and SCORE_ELF_DATA.
Diff:
---
bfd/elf-bfd.h | 2 ++
bfd/elf32-score.c | 1 +
bfd/elf64-mmix.c | 1 +
3 files changed, 4 insertions(+)
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index b756e73736e..2f11bc2d2e6 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -556,6 +556,7 @@ enum elf_target_id
METAG_ELF_DATA,
MICROBLAZE_ELF_DATA,
MIPS_ELF_DATA,
+ MMIX_ELF_DATA,
MN10300_ELF_DATA,
NDS32_ELF_DATA,
OR1K_ELF_DATA,
@@ -563,6 +564,7 @@ enum elf_target_id
PPC64_ELF_DATA,
PRU_ELF_DATA,
S390_ELF_DATA,
+ SCORE_ELF_DATA,
SH_ELF_DATA,
SPARC_ELF_DATA,
SPU_ELF_DATA,
diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c
index 30d6dc85e22..03ea71d150e 100644
--- a/bfd/elf32-score.c
+++ b/bfd/elf32-score.c
@@ -4447,6 +4447,7 @@ _bfd_score_elf_common_definition (Elf_Internal_Sym *sym)
#define ELF_ARCH bfd_arch_score
#define ELF_MACHINE_CODE EM_SCORE
#define ELF_MACHINE_ALT1 EM_SCORE_OLD
+#define ELF_TARGET_ID SCORE_ELF_DATA
#define ELF_MAXPAGESIZE 0x8000
#define elf_info_to_howto NULL
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index 43a46e52c5b..4e7fbda38b4 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -2861,6 +2861,7 @@ mmix_elf_relax_section (bfd *abfd,
#define ELF_ARCH bfd_arch_mmix
#define ELF_MACHINE_CODE EM_MMIX
+#define ELF_TARGET_ID MMIX_ELF_DATA
/* According to mmix-doc page 36 (paragraph 45), this should be (1LL << 48LL).
However, that's too much for something somewhere in the linker part of
More information about the Binutils-cvs
mailing list