aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-12-16 19:31:34 +1030
committerAlan Modra <amodra@gmail.com>2024-12-16 19:37:40 +1030
commit64a91215cd9572fb8f049eb59ec2e2359b9dd7dc (patch)
treebdf5fa4e9988098b872a2168f0a03e3edbe6f6d8
parentc32881686b0750ef441816cc8b211fbe8790f513 (diff)
downloadgdb-64a91215cd9572fb8f049eb59ec2e2359b9dd7dc.zip
gdb-64a91215cd9572fb8f049eb59ec2e2359b9dd7dc.tar.gz
gdb-64a91215cd9572fb8f049eb59ec2e2359b9dd7dc.tar.bz2
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.
-rw-r--r--bfd/elf-bfd.h2
-rw-r--r--bfd/elf32-score.c1
-rw-r--r--bfd/elf64-mmix.c1
3 files changed, 4 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index b756e73..2f11bc2 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 30d6dc8..03ea71d 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 43a46e5..4e7fbda 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