Index: sys/arm64/include/asm.h =================================================================== --- sys/arm64/include/asm.h +++ sys/arm64/include/asm.h @@ -39,10 +39,11 @@ #define _C_LABEL(x) x #define ENTRY(sym) \ - .text; .globl sym; .align 2; .type sym,#function; sym: + .text; .globl sym; .align 2; .type sym,#function; sym: \ + .cfi_startproc #define EENTRY(sym) \ .globl sym; sym: -#define END(sym) .size sym, . - sym +#define END(sym) .cfi_endproc; .size sym, . - sym #define EEND(sym) #define WEAK_REFERENCE(sym, alias) \ Index: sys/i386/include/asm.h =================================================================== --- sys/i386/include/asm.h +++ sys/i386/include/asm.h @@ -73,19 +73,30 @@ #define _START_ENTRY .text; .p2align 2,0x90 #define _ENTRY(x) _START_ENTRY; \ - .globl CNAME(x); .type CNAME(x),@function; CNAME(x): -#define END(x) .size x, . - x + .globl CNAME(x); .type CNAME(x),@function; CNAME(x): \ + .cfi_startproc +#define END(x) .cfi_endproc; .size x, . - x #ifdef PROF #define ALTENTRY(x) _ENTRY(x); \ - pushl %ebp; movl %esp,%ebp; \ + pushl %ebp; \ + .cfi_def_cfa_offset 8; \ + .cfi_offset %ebp, -8; \ + movl %esp,%ebp; \ call PIC_PLT(HIDENAME(mcount)); \ popl %ebp; \ + .cfi_restore %ebp; \ + .cfi_def_cfa_offset 4; \ jmp 9f #define ENTRY(x) _ENTRY(x); \ - pushl %ebp; movl %esp,%ebp; \ + pushl %ebp; \ + .cfi_def_cfa_offset 8; \ + .cfi_offset %ebp, -8; \ + movl %esp,%ebp; \ call PIC_PLT(HIDENAME(mcount)); \ popl %ebp; \ + .cfi_restore %ebp; \ + .cfi_def_cfa_offset 4; \ 9: #else #define ALTENTRY(x) _ENTRY(x) Index: sys/powerpc/include/asm.h =================================================================== --- sys/powerpc/include/asm.h +++ sys/powerpc/include/asm.h @@ -108,7 +108,8 @@ .globl name; \ .section ".opd","aw"; \ .p2align 3; \ - name: \ +name: \ + .cfi_startproc; \ .quad DOT_LABEL(name),.TOC.@tocbase,0; \ .previous; \ .p2align 4; \ @@ -122,6 +123,7 @@ .globl name; \ .type name,@function; \ name: \ + .cfi_startproc; \ addis %r2, %r12, (.TOC.-name)@ha; \ addi %r2, %r2, (.TOC.-name)@l; \ .localentry name, .-name; @@ -133,10 +135,12 @@ .globl name; \ .type name,@function; \ name: \ + .cfi_startproc; \ .localentry name, .-name; #endif #define _END(name) \ + .cfi_endproc; \ .long 0; \ .byte 0,0,0,0,0,0,0,0; \ END_SIZE(name) @@ -153,8 +157,10 @@ .p2align 4; \ .globl name; \ .type name,@function; \ - name: -#define _END(name) +name: \ + .cfi_startproc +#define _END(name) \ + .cfi_endproc #define _NAKED_ENTRY(name) _ENTRY(name)