summaryrefslogtreecommitdiff
path: root/gdb/mips-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-19 10:24:27 -0600
committerTom Tromey <tom@tromey.com>2023-03-28 15:12:44 -0600
commit9675da25357c7a3f472731ddc6eb3becc65b469a (patch)
tree54d600ccb876d7db6056c0aa97b7579878027f18 /gdb/mips-tdep.c
parent1ee8702db9cb2a329c9df0938667e2415b0c9e46 (diff)
downloadbinutils-gdb-9675da25357c7a3f472731ddc6eb3becc65b469a.tar.gz
Use unrelocated_addr in minimal symbols
This changes minimal symbols to use unrelocated_addr. I believe this detected a latent bug in add_pe_forwarded_sym.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 52799b926d3..b86bf61f4d1 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -436,12 +436,14 @@ mips_elf_make_msymbol_special (asymbol * sym, struct minimal_symbol *msym)
if (ELF_ST_IS_MICROMIPS (st_other))
{
SET_MSYMBOL_TARGET_FLAG_MICROMIPS (msym);
- msym->set_value_address (msym->value_raw_address () | 1);
+ CORE_ADDR fixed = CORE_ADDR (msym->value_raw_address ()) | 1;
+ msym->set_unrelocated_address (unrelocated_addr (fixed));
}
else if (ELF_ST_IS_MIPS16 (st_other))
{
SET_MSYMBOL_TARGET_FLAG_MIPS16 (msym);
- msym->set_value_address (msym->value_raw_address () | 1);
+ CORE_ADDR fixed = CORE_ADDR (msym->value_raw_address ()) | 1;
+ msym->set_unrelocated_address (unrelocated_addr (fixed));
}
}