This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][BZ 18960] setlocale.c: Mark *_used symbols as unaligned.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]