[rtems-tools commit] linkers: Print a proper 0x-hex number
Sebastian Huber
sebh at rtems.org
Wed Oct 18 09:00:32 UTC 2023
Module: rtems-tools
Branch: master
Commit: af2b1532e8f8c5af044872788d4911c818e4609c
Changeset: http://git.rtems.org/rtems-tools/commit/?id=af2b1532e8f8c5af044872788d4911c818e4609c
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Oct 16 13:46:13 2023 +0200
linkers: Print a proper 0x-hex number
It is so easy in standard C++.
---
linkers/rtems-syms.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/linkers/rtems-syms.cpp b/linkers/rtems-syms.cpp
index f6b207f..88ee970 100644
--- a/linkers/rtems-syms.cpp
+++ b/linkers/rtems-syms.cpp
@@ -305,7 +305,8 @@ output_sym::operator ()(const rld::symbols::symtab::value_type& value)
val = sym.name ();
} else {
std::stringstream oss;
- oss << std::hex << std::setfill ('0') << std::setw (8) << sym.value ();
+ oss << std::hex << std::showbase << std::internal <<
+ std::setfill ('0') << std::setw (10) << sym.value ();
val = oss.str ();
}
}
More information about the vc
mailing list