This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH][BZ 18960] setlocale.c: Mark *_used symbols as unaligned.
- From: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- To: libc-alpha at sourceware dot org
- Cc: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- Date: Sun, 27 Sep 2015 15:26:25 +0200
- Subject: [PATCH][BZ 18960] setlocale.c: Mark *_used symbols as unaligned.
- Authentication-results: sourceware.org; auth=none
This ensures that compiler doesn't get the values of these symbols
using instructions that have alignment requirements (eg. larl on s390).
---
locale/setlocale.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/locale/setlocale.c b/locale/setlocale.c
index ead030d..028496d 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -35,7 +35,7 @@
Also use a weak reference for the _nl_current_CATEGORY thread variable. */
# define DEFINE_CATEGORY(category, category_name, items, a) \
- extern char _nl_current_##category##_used; \
+ extern char _nl_current_##category##_used __attribute__((__aligned__(1))); \
weak_extern (_nl_current_##category##_used) \
weak_extern (_nl_current_##category)
# include "categories.def"
--
2.5.3