[PATCH 21/31] test: Avoid strange symbols in the assembler file

Simon Glass sjg at chromium.org
Tue Apr 25 01:08:26 CEST 2023


This works correctly on Linux with ELF but not on Windows with PE, since
it creates assembly symbols with invalid names.

Use the lowest/highest valid characters instead. This should still work
correctly, since we have no tests starting with $ and none starting with
'z' at present.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 include/test/test.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/test/test.h b/include/test/test.h
index 838e3ce8a8f3..3e3d14878a7b 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -127,8 +127,8 @@ struct unit_test {
 	ll_entry_count(struct unit_test, ut_ ## _suite)
 
 /* Use ! and ~ so that all tests will be sorted between these two values */
-#define UNIT_TEST_ALL_START()	ll_entry_start(struct unit_test, ut_!)
-#define UNIT_TEST_ALL_END()	ll_entry_start(struct unit_test, ut_~)
+#define UNIT_TEST_ALL_START()	ll_entry_start(struct unit_test, ut_$)
+#define UNIT_TEST_ALL_END()	ll_entry_start(struct unit_test, ut_z)
 #define UNIT_TEST_ALL_COUNT()	(UNIT_TEST_ALL_END() - UNIT_TEST_ALL_START())
 
 /* Sizes for devres tests */
-- 
2.40.0.634.g4ca3ef3211-goog



More information about the U-Boot mailing list