rtems-syms.cpp: Change check to pointer size

Changed from a RISC-V specific value being in the conditional to a check for
the size of the architecture's pointer.

Closes #4673
This commit is contained in:
Ryan Long
2022-06-30 16:08:48 -05:00
committed by Joel Sherrill
parent ef4b8c53f9
commit ace7db96d4

View File

@@ -244,7 +244,7 @@ output_sym::operator ()(const rld::symbols::symtab::value_type& value)
if (embed)
{
c.write_line ("#if __riscv_xlen == 64");
c.write_line ("#if __SIZEOF_POINTER__ == 8");
c.write_line ("asm(\" .quad " + sym.name () + "\");");
c.write_line ("#else");
c.write_line ("asm(\" .long " + sym.name () + "\");");
@@ -254,7 +254,7 @@ output_sym::operator ()(const rld::symbols::symtab::value_type& value)
{
std::stringstream oss;
oss << std::hex << std::setfill ('0') << std::setw (8) << sym.value ();
c.write_line ("#if __riscv_xlen == 64");
c.write_line ("#if __SIZEOF_POINTER__ == 8");
c.write_line ("asm(\" .quad 0x" + oss.str () + "\");");
c.write_line ("#else");
c.write_line ("asm(\" .long 0x" + oss.str () + "\");");