This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug debug/43293] Invalid unwind info for i?86 -fpic



------- Comment #2 from jakub at gcc dot gnu dot org  2010-03-08 21:07 -------
On the:
int i;
static int j;
extern int bar (void);
int foo (void)
{
  return i + j + bar ();
}
testcase with -fexceptions -O2 -mtune=generic -dA -m32 -fpic the difference is:
@@ -14,9 +14,9 @@ foo:
        .cfi_def_cfa_register 5
        subl    $8, %esp
        movl    %ebx, (%esp)
+       .cfi_offset 3, -16
        call    __i686.get_pc_thunk.bx
        addl    $_GLOBAL_OFFSET_TABLE_, %ebx
-       .cfi_offset 3, -16
        movl    %esi, 4(%esp)
        movl    i@GOT(%ebx), %eax
        movl    (%eax), %esi
@@ -43,6 +43,8 @@ foo:
        .hidden __i686.get_pc_thunk.bx
        .type   __i686.get_pc_thunk.bx, @function
 __i686.get_pc_thunk.bx:
+       .cfi_startproc
        movl    (%esp), %ebx
        ret
+       .cfi_endproc
        .section        .note.GNU-stack,"",@progbits
and with -fexceptions -O2 -mtune=i586 -dA -m32 -fpic -fomit-frame-pointer the
difference is:@@ -14,11 +14,13 @@ foo:
        subl    $4, %esp
        .cfi_def_cfa_offset 16
        call    .L2
+       .cfi_def_cfa_offset 20
 .L2:
        popl    %ebx
-       addl    $_GLOBAL_OFFSET_TABLE_+[.-.L2], %ebx
        .cfi_offset 3, -12
        .cfi_offset 6, -8
+       .cfi_def_cfa_offset 16
+       addl    $_GLOBAL_OFFSET_TABLE_+[.-.L2], %ebx
        movl    i@GOT(%ebx), %eax
        movl    (%eax), %esi
        call    bar@PLT


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43293


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