Skip to content

Commit fff0928

Browse files
andyrossstephanosio
authored andcommitted
overlays/mtk: Fix linker API
The name of the rmap array changed in upstream bintuils commit 2b16913cdca2 ("gdb: make gdbarch_alloc take ownership of the tdep"). At the same time it seems like the xtensa_tdep definition (which contra the filename is actually a C++ object definition and not a function prototype!) moved into this file from elsewhere in binutils. The xtensa_rmap symbol is only used by newer binutils versions than the Zephyr SDK builds, but add an alias so it builds with upstream crosstools-ng, and commit it here as a reference if we want to port the other Xtensa overlays. Signed-off-by: Andy Ross <[email protected]>
1 parent 7144272 commit fff0928

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

overlays/xtensa_mtk_mt818x_adsp/gdb/gdb/xtensa-config.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,9 @@ xtensa_register_t rmap[] =
555555
XTREG_END
556556
};
557557

558+
extern xtensa_register_t xtensa_rmap[] __attribute__((alias("rmap")));
558559

560+
xtensa_gdbarch_tdep xtensa_tdep (rmap);
559561

560562
#ifdef XTENSA_CONFIG_INSTANTIATE
561563
XTENSA_CONFIG_INSTANTIATE(rmap,16)

overlays/xtensa_mtk_mt8195_adsp/gdb/gdb/xtensa-config.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const xtensa_mask_t xtensa_mask39 = { 1, xtensa_submask39 };
113113

114114

115115
/* Register map. */
116-
static xtensa_register_t rmap[] =
116+
xtensa_register_t rmap[] =
117117
{
118118
/* idx ofs bi sz al targno flags cp typ group name */
119119
XTREG( 0, 0,32, 4, 4,0x0020,0x0006,-2, 9,0x2100,pc, 0,0,0,0,0,0)
@@ -496,4 +496,6 @@ static xtensa_register_t rmap[] =
496496
XTREG_END
497497
};
498498

499+
extern xtensa_register_t xtensa_rmap[] __attribute__((alias("rmap")));
500+
499501
xtensa_gdbarch_tdep xtensa_tdep (rmap);

overlays/xtensa_mtk_mt8196_adsp/gdb/gdb/xtensa-config.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,9 @@ xtensa_register_t rmap[] =
555555
XTREG_END
556556
};
557557

558+
extern xtensa_register_t xtensa_rmap[] __attribute__((alias("rmap")));
558559

560+
xtensa_gdbarch_tdep xtensa_tdep (rmap);
559561

560562
#ifdef XTENSA_CONFIG_INSTANTIATE
561563
XTENSA_CONFIG_INSTANTIATE(rmap,16)

0 commit comments

Comments
 (0)