All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Xenomai core <Xenomai-core@domain.hid>
Subject: Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : Make xnarch_init_timeconv an uninlined weak function
Date: Wed, 10 Feb 2010 22:34:49 +0100	[thread overview]
Message-ID: <4B732679.4030306@domain.hid> (raw)
In-Reply-To: <4B732487.50103@domain.hid>

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

Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>> Gilles Chanteperdrix wrote:
>>> Jan Kiszka wrote:
>>>> Gilles Chanteperdrix wrote:
>>>>> Jan Kiszka wrote:
>>>>>> Gilles Chanteperdrix wrote:
>>>>>>> Jan Kiszka wrote:
>>>>>>>> Gilles Chanteperdrix wrote:
>>>>>>>>> GIT version control wrote:
>>>>>>>>>> Module: xenomai-jki
>>>>>>>>>> Branch: for-upstream
>>>>>>>>>> Commit: 6b40653e9c3c4a2433bb4e91344fc378eb860f75
>>>>>>>>>> URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=6b40653e9c3c4a2433bb4e91344fc378eb860f75
>>>>>>>>>>
>>>>>>>>>> Author: Jan Kiszka <jan.kiszka@domain.hid>
>>>>>>>>>> Date:   Wed Feb 10 13:24:29 2010 +0100
>>>>>>>>>>
>>>>>>>>>> Make xnarch_init_timeconv an uninlined weak function
>>>>>>>>>>
>>>>>>>>>> Otherwise the wrong set of time conversion variables might get
>>>>>>>>>> initialized when using > 1 skin libraries.
>>>>>>>>> If that would be possible, then it is the conversion variables which
>>>>>>>>> should made be weak, not the function.
>>>>>>>>>
>>>>>>>>> The way I see it, the posix and native skins currently get a different
>>>>>>>>> set of variables and functions, which works, but with your change, since
>>>>>>>>> there is only one function, only one set of variable gets initialized by
>>>>>>>>> the two function calls. And one skin just broke.
>>>>>>>>>
>>>>>>>>> Or am I missing something? Does the patch fix a problem you really had?
>>>>>>>> Frankly, I wasn't able to test in the field yet as replacing the libs
>>>>>>>> there is non-trivial. But I was able to observe that only one set of
>>>>>>>> functions is used - which is logical considering the weak marks. And
>>>>>>>> this breaks due to the static inline initialization.
>>>>>>>>
>>>>>>>> However, let's mark both functions and variables weak to fix the issue
>>>>>>>> and avoid leaving unused variables around. Will update my patch in a minute.
>>>>>>> Ok. I am reverting this patch until you provide me with another
>>>>>>> solution. It causes latency to segfault purely and simply at startup on
>>>>>>> my dual PIII.
>>>>>>>
>>>>>> Cannot reproduce yet. Do you have a backtrace?
>>>>> No. But the problem is probably the same as the one signaled by Henri,
>>>>> a misplaced weak directive ending up in a symbol with no address at all.
>>>>> Since the current situation works, I am going to wait for the "clean"
>>>>> fix which puts some code/data in the src/skins/common directory.
>>>>>
>>>> Find it in my tree. But it's not yet well tested.
>>> I do not like it either. Functions which are in src/skins/common should
>>> still be weak, since this lib is included in all the skins libraries.
>> Those functions are now in libxeno_common only, so I see no point in
>> allowing them to be overloaded.
> 
> Yes, but libxeno_common is included in libpthread_rt.so and
> libnative.so. So, if you link with both libraries, you get
> libxeno_common twice.
> 

Do we link libxeno_common statically? Otherwise, this conflict is not
logical to me. Also, there are other symbols in bind.c that are non-weak.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  reply	other threads:[~2010-02-10 21:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1NfBdX-0001ga-4b@domain.hid>
2010-02-10 12:34 ` [Xenomai-core] [Xenomai-git] Jan Kiszka : Make xnarch_init_timeconv an uninlined weak function Gilles Chanteperdrix
2010-02-10 12:43   ` Jan Kiszka
2010-02-10 14:01     ` Gilles Chanteperdrix
2010-02-10 14:48       ` Philippe Gerum
2010-02-10 19:33     ` Gilles Chanteperdrix
2010-02-10 20:24       ` Jan Kiszka
2010-02-10 20:33         ` Gilles Chanteperdrix
2010-02-10 21:09           ` Jan Kiszka
2010-02-10 21:13             ` Gilles Chanteperdrix
2010-02-10 21:23               ` Jan Kiszka
2010-02-10 21:26                 ` Gilles Chanteperdrix
2010-02-10 21:34                   ` Jan Kiszka [this message]
2010-02-10 21:39                     ` Gilles Chanteperdrix
2010-02-11  8:38                       ` Jan Kiszka
2010-02-11  8:47                         ` Gilles Chanteperdrix
2010-02-11  9:37                           ` Jan Kiszka
2010-02-11  9:46                             ` Gilles Chanteperdrix
2010-02-11 10:36                               ` Jan Kiszka
2010-02-11 11:04                                 ` Gilles Chanteperdrix
2010-02-11 14:14                                   ` Jan Kiszka
2010-02-11 15:59                                     ` Gilles Chanteperdrix
2010-02-11 16:13                                       ` Jan Kiszka
2010-02-11 16:16                                         ` Gilles Chanteperdrix
2010-02-11 16:42                                           ` Jan Kiszka
2010-02-11 17:04                                             ` Gilles Chanteperdrix
2010-02-11 17:10                                               ` Jan Kiszka
2010-02-10 21:28                 ` Gilles Chanteperdrix
2010-02-10 21:35                   ` Jan Kiszka

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=4B732679.4030306@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=Xenomai-core@domain.hid \
    --cc=gilles.chanteperdrix@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.