aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-11-28 14:12:59 -0500
committerAndi Kleen <andi@basil.nowhere.org>2006-11-28 14:12:59 -0500
commitff0a538d8b08700df2b46f9aafc9fb2765071f0a (patch)
tree7dc675a48c55763f80413182f8e6a364b03d6ab0 /kernel
parenta3550a9c543556cf7764be81aeb17c6dab440753 (diff)
[PATCH] x86-64: work around gcc4 issue with -Os in Dwarf2 stack unwind
This fixes a problem with gcc4 mis-compiling the stack unwind code under -Os, which resulted in 'stuck' messages whenever an assembly routine was encountered. (The second hunk is trivial cleanup.) Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/unwind.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/unwind.c b/kernel/unwind.c
index f7e50d16dbf6..ed0a21d4a902 100644
--- a/kernel/unwind.c
+++ b/kernel/unwind.c
@@ -938,8 +938,11 @@ int unwind(struct unwind_frame_info *frame)
938 else { 938 else {
939 retAddrReg = state.version <= 1 ? *ptr++ : get_uleb128(&ptr, end); 939 retAddrReg = state.version <= 1 ? *ptr++ : get_uleb128(&ptr, end);
940 /* skip augmentation */ 940 /* skip augmentation */
941 if (((const char *)(cie + 2))[1] == 'z') 941 if (((const char *)(cie + 2))[1] == 'z') {
942 ptr += get_uleb128(&ptr, end); 942 uleb128_t augSize = get_uleb128(&ptr, end);
943
944 ptr += augSize;
945 }
943 if (ptr > end 946 if (ptr > end
944 || retAddrReg >= ARRAY_SIZE(reg_info) 947 || retAddrReg >= ARRAY_SIZE(reg_info)
945 || REG_INVALID(retAddrReg) 948 || REG_INVALID(retAddrReg)
@@ -963,9 +966,7 @@ int unwind(struct unwind_frame_info *frame)
963 if (cie == NULL || fde == NULL) { 966 if (cie == NULL || fde == NULL) {
964#ifdef CONFIG_FRAME_POINTER 967#ifdef CONFIG_FRAME_POINTER
965 unsigned long top, bottom; 968 unsigned long top, bottom;
966#endif
967 969
968#ifdef CONFIG_FRAME_POINTER
969 top = STACK_TOP(frame->task); 970 top = STACK_TOP(frame->task);
970 bottom = STACK_BOTTOM(frame->task); 971 bottom = STACK_BOTTOM(frame->task);
971# if FRAME_RETADDR_OFFSET < 0 972# if FRAME_RETADDR_OFFSET < 0