mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jens Gustedt <jens.gustedt@inria.fr>
To: musl@lists.openwall.com
Subject: Re: [PATCH 0/5] reorganize the use of weak symbols
Date: Sat, 16 Feb 2013 09:16:57 +0100	[thread overview]
Message-ID: <1361002617.2220.67.camel@eris.loria.fr> (raw)
In-Reply-To: <20130216055937.GC20323@brightrain.aerifal.cx>

[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]

Hello Rich,
yes, please see these patches mainly as an attempt for documentation
and readability.  They shouldn't change much on the reality of musl,
but perhaps by adding some bytes to some objects. I arbitrarily chose
32 bytes for the dummies. So this will perhaps add some hundred bytes
in total, unless musl is compiled with separate sections for each
symbol.

For the weak symbols versus weak alias, the patches mostly use weak
aliases as before, they only add a level of "weakness" for the dummy
objects and functions. The way I organized it, you could easily change
that to "static" again. So if weak symbols wouldn't be provided by all
tool chains it wouldn't be difficult at all to use that. (Currently I
see that the code is very gcc centric, so I don't think that this a
real issue.)

Where I really like to insist is the only case where a rw array is
aliased to a ro object, patch 2. Here the "dangerous" thing is done by
the aliasing and it should be documented there. The "wrong" type in
the local declaration of the array and the fact to later cast the
const away distracted from that fact.

So in summary, don't hesitate to modify what I wrote, give me feedback
so I'd do that, or not to take them at all, whatever you think is
appropriate for the project.

Jens

-- 
:: INRIA Nancy Grand Est :: http://www.loria.fr/~gustedt/   ::
:: AlGorille ::::::::::::::: office Nancy : +33 383593090   ::
:: ICube :::::::::::::: office Strasbourg : +33 368854536   ::
:: ::::::::::::::::::::::::::: gsm France : +33 651400183   ::
:: :::::::::::::::::::: gsm international : +49 15737185122 ::



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

      reply	other threads:[~2013-02-16  8:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15 23:22 Jens Gustedt
2013-02-15 23:23 ` [PATCH 1/5] Clearly identify the readonly replacement symbols that serve as 'dummies' that could (or could not) be provided by other compilation units Jens Gustedt
2013-02-15 23:23 ` [PATCH 2/5] Clarify the implementation of the dummy alias used for pthread_self Jens Gustedt
2013-02-15 23:24 ` [PATCH 3/5] identify the weak function symbols that provide a real default action Jens Gustedt
2013-02-15 23:24 ` [PATCH 4/5] add three macros for empty dummy functions that do nothing Jens Gustedt
2013-02-15 23:25 ` [PATCH 5/5] Use the weak functions that do nothing as aliases for the default actions Jens Gustedt
2013-02-16  5:59 ` [PATCH 0/5] reorganize the use of weak symbols Rich Felker
2013-02-16  8:16   ` Jens Gustedt [this message]

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=1361002617.2220.67.camel@eris.loria.fr \
    --to=jens.gustedt@inria.fr \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).