Re: [PATCH] i386 vsyscall DSO implementation, take 2

Richard Henderson (rth@twiddle.net)
Sat, 3 May 2003 13:51:59 -0700


On Thu, May 01, 2003 at 05:33:30PM -0700, Roland McGrath wrote:
> + /* What follows are the instructions for the table generation.
> + We have to record all changes of the stack pointer. */
> + .byte 0x04 /* DW_CFA_advance_loc4 */
> + .long .Lpush_ecx-.LSTART_vsyscall
> + .byte 0x0e /* DW_CFA_def_cfa_offset */
> + .byte 0x08 /* RA at offset 8 now */
> + .byte 0x04 /* DW_CFA_advance_loc4 */
> + .long .Lpush_edx-.Lpush_ecx
> + .byte 0x0e /* DW_CFA_def_cfa_offset */
> + .byte 0x0c /* RA at offset 12 now */
> + .byte 0x04 /* DW_CFA_advance_loc4 */
> + .long .Lenter_kernel-.Lpush_edx
> + .byte 0x0e /* DW_CFA_def_cfa_offset */
> + .byte 0x10 /* RA at offset 16 now */
> + /* Finally the epilogue. */
> + .byte 0x04 /* DW_CFA_advance_loc4 */
> + .long .Lpop_ebp-.Lenter_kernel
> + .byte 0x0e /* DW_CFA_def_cfa_offset */
> + .byte 0x12 /* RA at offset 12 now */
> + .byte 0x04 /* DW_CFA_advance_loc4 */

You lost the save/restore notes for ebp.

> + .type __kernel_sigreturn,@function
> +__kernel_sigreturn:
> +.LSTART_kernel_sigreturn:
> + popl %eax /* XXX does this mean it needs unwind info? */

Well, yes, but not because of this per-se. The unwind info
for sigreturn will be quite complex because it should expose
the state of the machine after the return. I.e. it would
replace the rather complex code in both gdb and libgcc that
fakes some knowledge of the signal stack frame.

I can try to write it for you if you like.

r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/