public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: <libc-alpha@sourceware.org>
Subject: Re: Making a syscall before ld.so self-relocation on MIPS
Date: Wed, 17 May 2023 19:01:26 +0000	[thread overview]
Message-ID: <e2de7e84-9a3a-bc9c-2a19-7d1554870f0@codesourcery.com> (raw)
In-Reply-To: <87wn17jogh.fsf@oldenburg3.str.redhat.com>

On Wed, 17 May 2023, Florian Weimer via Libc-alpha wrote:

> I'm reviewing HIDDEN_VAR_NEEDS_DYNAMIC_RELOC if they support inline
> system calls (without function calls), so that I can make a system call
> (mmap actually) before initial self-relocation of the dynamic loader.
> 
> So far, it looks good in theory, except on MIPS.  First there is MIPS16:
> 
> /* There's no MIPS16 syscall instruction, so we go through out-of-line
>    standard MIPS wrappers.  These do use inline snippets below though,
>    through INTERNAL_SYSCALL_MIPS16.  Spilling the syscall number to
>    memory gives the best code in that case, avoiding the need to save
>    and restore a static register.  */
> 
> Is MIPS16 the default in GCC?  We don't build for explicitly in
> scripts/build-many-glibcs.py.

No, it's not the default; you need to use the -mips16 option.

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2023-05-17 19:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17  9:29 Florian Weimer
2023-05-17 19:01 ` Joseph Myers [this message]
2023-05-17 19:30   ` Florian Weimer
2023-05-17 19:41     ` Joseph Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2de7e84-9a3a-bc9c-2a19-7d1554870f0@codesourcery.com \
    --to=joseph@codesourcery.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).