Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: x86 assembly question



On Mon, 8 Sept 2025 at 22:38, Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:
Hello,
I suspect that some assembly code is not doing what I think it should.
But as it's in the early stage of boot it's hard to debug.

Here's the (32bits) code:
        push %ebx /* save start_info to stack */
        /* do stuff */
        movl $RELOC(__kernel_end), %ebp
        addl $3, %ebp
        andl $~3, %ebp
        movl 0(%ebp), %eax /* read size */
        addl %ebp, %eax /* compute esym */
        /* check if start_info is within symbol table */
        movl -4(%esp), %ebx

it's been many years, but shouldn't it be
    movl 0(%esp), %ebx

to get the saved value? Or some positive offset if other values were pushed in the meantime?

Cheers,

Joachim
 


Home | Main Index | Thread Index | Old Index