[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
- [RFC PATCH 3/9] hurd: Fix xattr function return type, (continued)
- [RFC PATCH 3/9] hurd: Fix xattr function return type, Sergey Bugaev, 2023/02/18
- [RFC PATCH 5/9] hurd: Simplify init-first.c a bit, Sergey Bugaev, 2023/02/18
- [RFC PATCH 4/9] hurd: Make timer_t pointer-sized, Sergey Bugaev, 2023/02/18
- [RFC PATCH 6/9] mach: Use PAGE_SIZE, Sergey Bugaev, 2023/02/18
- [RFC PATCH 7/9] hurd: Generalize init-first.c to support x86_64, Sergey Bugaev, 2023/02/18
- Re: [RFC PATCH 7/9] hurd: Generalize init-first.c to support x86_64, Noah Goldstein, 2023/02/20
[RFC PATCH 8/9 gnumach] Add i386_fsgs_base_state, Sergey Bugaev, 2023/02/18
[RFC PATCH 9/9] hurd, htl: Add some more x86_64-specific code, Sergey Bugaev, 2023/02/18