bug-hurd
[Top][All Lists]
Advanced

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

Re: [RFC PATCH 7/9] hurd: Generalize init-first.c to support x86_64


From: Sergey Bugaev
Subject: Re: [RFC PATCH 7/9] hurd: Generalize init-first.c to support x86_64
Date: Mon, 20 Feb 2023 19:16:10 +0300

On Mon, Feb 20, 2023 at 3:01 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> That won't work on x86_64: there, arguments are passed mostly through
> registers, so &argc won't actually give you the address of arguments on
> the stack.

Right, good point.

I wish I had a better understanding of just what's going on in this
file. Maybe a lot of the hacks can be rewritten in a nicer way. For
instance, do we really need to hijack the return addresses and jump to
init1 in this weird way, only to enable it to access argc/arg0? Since
we know where they are on our stack (__builtin_frame_address (0) + 2
or something like that), can't we just pass it a pointer?

Let me actually try just that...

Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]