forked from Imagelibrary/binutils-gdb
RISC-V: Set EF_RISCV_TSO also on .option arch
This is a minor fix to commit 96462b0129
("RISC-V: Implement Ztso extension"). Currently, it sets EF_RISCV_TSO ELF
flag when initial ISA string contains the 'Ztso' extension. However, GAS
has a way to update the ISA string: ".option arch".
When the architecture is updated by ".option arch", EF_RISCV_RVC ELF flag
is set when the 'C' extension is detected. Analogously, this commit sets
the EF_RISCV_TSO when the 'Ztso' extension is detected.
gas/ChangeLog:
* config/tc-riscv.c (s_riscv_option): Set TSO ELF flag if the
'Ztso' extension is specified via ".option arch" directive.
This commit is contained in:
@@ -3888,6 +3888,9 @@ s_riscv_option (int x ATTRIBUTE_UNUSED)
|
||||
riscv_set_rvc (false);
|
||||
if (riscv_subset_supports (&riscv_rps_as, "c"))
|
||||
riscv_set_rvc (true);
|
||||
|
||||
if (riscv_subset_supports (&riscv_rps_as, "ztso"))
|
||||
riscv_set_tso ();
|
||||
}
|
||||
else if (strcmp (name, "push") == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user