public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Sandra Loosemore <sandra@codesourcery.com>
To: Matthew Fortune <Matthew.Fortune@imgtec.com>,
	Joseph Myers <joseph@codesourcery.com>
Cc: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>,
	Petar Jovanovic <Petar.Jovanovic@imgtec.com>
Subject: Re: [PATCH] Initialise the machine specific part of rtld bootstrap map
Date: Wed, 26 Oct 2016 21:07:00 -0000	[thread overview]
Message-ID: <58111B09.1070906@codesourcery.com> (raw)
In-Reply-To: <6D39441BF12EF246A7ABCE6654B0235380AAC147@HHMAIL01.hh.imgtec.org>

On 10/26/2016 03:01 PM, Matthew Fortune wrote:
> Joseph Myers <joseph@codesourcery.com> writes:
>> On Wed, 26 Oct 2016, Matthew Fortune wrote:
>>
>>> +# ifdef ELF_MACHINE_INIT_MAP
>>> +  ELF_MACHINE_INIT_MAP (bootstrap_map); # endif
>>
>> We don't encourage use of #ifdef like that.  It's better to have an
>> inline function defined everywhere and used unconditionally, for which
>> most systems have a dummy definition (see dl-machine-reject-phdr.h and
>> elf_machine_reject_phdr_p for an example - if you have a header for a
>> single function, you don't need to update lots of dl-machine.h headers,
>> just add a generic version - which has the comments detailing the
>> semantics of the function and when it's needed - and a MIPS version).
>
> Thanks Joseph. It's been a while since I did a glibc patch and couldn't
> remember the recommended approach.
>
> Do you think I should add a whole new header for this? Or, since this
> is directly related to the reject_phdr feature for MIPS and only MIPS
> is affected then I could just add it to dl-machine-reject-phdr.h?

Wouldn't it be easier and more maintainable just to unconditionally 
zero-initialize the structure, as I did in the original patch?

-Sandra

  reply	other threads:[~2016-10-26 21:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 19:54 Matthew Fortune
2016-10-26 20:12 ` Joseph Myers
2016-10-26 21:01   ` Matthew Fortune
2016-10-26 21:07     ` Sandra Loosemore [this message]
2016-10-26 21:22       ` Matthew Fortune
2016-10-28 12:46       ` Matthew Fortune
2016-10-26 21:37     ` 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=58111B09.1070906@codesourcery.com \
    --to=sandra@codesourcery.com \
    --cc=Matthew.Fortune@imgtec.com \
    --cc=Petar.Jovanovic@imgtec.com \
    --cc=joseph@codesourcery.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).