All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: "Krzysztof Błaszkowski" <kb@domain.hid>
Cc: Xenomai core <Xenomai-core@domain.hid>
Subject: Re: [Xenomai-core] xenomai 2.5.3/native, kernel 2.6.31.8 and fork()
Date: Tue, 17 Aug 2010 15:27:37 +0200	[thread overview]
Message-ID: <4C6A8E49.10204@domain.hid> (raw)
In-Reply-To: <1282051157.5255.108.camel@domain.hid>

Krzysztof Błaszkowski wrote:
> On Tue, 2010-08-17 at 15:06 +0200, Gilles Chanteperdrix wrote:
>> Krzysztof Błaszkowski wrote:
>>> On Tue, 2010-08-17 at 14:40 +0200, Gilles Chanteperdrix wrote:
>>>> No. As witnessed by the message:
>>>> ./xeno-shmem-fork: relocation error: ./xeno-shmem-fork: symbol getpid,
>>>> version GLIBC_2.0 not defined in file libc.so.6 with link time reference
>>>
>>> have you seen that main process started  ? and linker didn't complain
>>> about wrong symbol version. This happened only in child process after
>>> line 88, have you seen output from line 89 ?
>>>
>>> furthermore you can find commented out line in makefile which compiles
>>> userland without linking with xenomai libraries. 
>>>
>>> this executable works as expected.
>> As I said since we went from libc5 to libc6, all libcs have been
>> backward ABI compatible. So, it makes perfect sense that the binary works.
>>
>> Since you are calling getpid() after fork, it is normal that the error
>> is not signalled before, symbols are only resolved at run-time, when
>> they are use.
> 
> indeed so i think you should ask yourself how it was possible that main
> process could resolve it but child couldn't.

That is easy to answer: only the child calls getpid().

> 
>>> these libcs are same and i wonder whats wrong with you. 
>>> How many times do i need to make you sure that these libcs are binary
>>> same ?
>> As long as you are comparing the wrong binaries. What I ask you to
>> compare is libc.so.6 with the result of gcc -print-file-name=libc.so
>> gcc being the exact compiler use for compilation of the test program.
>>
>> If these libraries are the same, then I will look at your test program,
>> otherwise I will not waste more time on this issue.
> 
> so at the box i compile code gcc gives:
> CHroot linux-e9um:/lib # gcc -print-file-name=libc.so
> /usr/lib/gcc/i586-suse-linux/4.3/../../../libc.so
> 
> 
> and i do not have gcc installed at target box (atest). i also double
> checked if there could be "libc.so" file in whole rootfs which is abt
> 258M long and i did not found it.
> 
> also /usr/lib/gcc/i586-suse-linux/4.3/../../../libc.so
> ie /usr/lib/libc.so is just a linker script of 238 bytes.
> 
> ld-linux.so.2 are binary same on these two boxes too.

What are the contents of this linker script? I did not ask to compare
gcc -print-file-name=libc.so with the same file on the target. I asked
to compare:
gcc -print-file-name=libc.so (or if it is a linker script, the libc.so.6
it references)
with  /lib/libc.so.6

In other words: the libc used by the compiler with the libc used at
run-time, as my very first answer was asking.

-- 
					    Gilles.



  reply	other threads:[~2010-08-17 13:27 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17 12:25 [Xenomai-core] xenomai 2.5.3/native, kernel 2.6.31.8 and fork() Krzysztof Błaszkowski
2010-08-17 12:33 ` Gilles Chanteperdrix
2010-08-17 12:34   ` Krzysztof Błaszkowski
2010-08-17 12:40     ` Gilles Chanteperdrix
2010-08-17 12:54       ` Krzysztof Błaszkowski
2010-08-17 13:06         ` Gilles Chanteperdrix
2010-08-17 13:19           ` Krzysztof Błaszkowski
2010-08-17 13:27             ` Gilles Chanteperdrix [this message]
2010-08-17 13:57               ` Krzysztof Błaszkowski
2010-08-17 14:08                 ` Gilles Chanteperdrix
2010-08-17 14:12                   ` Krzysztof Błaszkowski
2010-08-17 14:17                     ` Gilles Chanteperdrix
2010-08-17 16:07                       ` Krzysztof Błaszkowski
2010-08-17 12:35   ` Krzysztof Błaszkowski
2010-08-17 12:40     ` Gilles Chanteperdrix
2010-08-17 14:41 ` Philippe Gerum
2010-08-17 16:09   ` Krzysztof Błaszkowski
2010-08-17 22:59 ` Gilles Chanteperdrix
2010-08-18 10:22   ` Krzysztof Błaszkowski
2010-08-18 11:00     ` Gilles Chanteperdrix
2010-08-18 11:40       ` Krzysztof Błaszkowski
2010-08-18 12:00         ` Gilles Chanteperdrix
2010-08-18 12:17           ` Krzysztof Błaszkowski
2010-08-18 12:37             ` Gilles Chanteperdrix
2010-08-18 12:55               ` Krzysztof Błaszkowski
2010-08-18 13:39                 ` Gilles Chanteperdrix
2010-08-18 14:04                   ` Krzysztof Błaszkowski
2010-08-18 14:10                     ` Gilles Chanteperdrix
2010-08-18 14:25                       ` Krzysztof Błaszkowski
2010-08-18 14:30                         ` Gilles Chanteperdrix
2010-08-18 15:09                           ` Krzysztof Błaszkowski
2010-08-18 15:13                             ` Gilles Chanteperdrix
2010-08-18 15:16                               ` Krzysztof Błaszkowski
2010-08-18 15:43                                 ` Gilles Chanteperdrix
2010-08-18 16:30                                   ` Krzysztof Błaszkowski
2010-08-18 16:51                                   ` Krzysztof Błaszkowski
2010-08-18 17:17                                   ` Krzysztof Błaszkowski
2010-08-20  9:47                               ` Krzysztof Błaszkowski
2010-08-20  9:54                                 ` Gilles Chanteperdrix
2010-08-20 15:50                                   ` Krzysztof Błaszkowski
2010-08-21 17:06                                     ` Gilles Chanteperdrix
2010-08-21 17:36                                       ` Gilles Chanteperdrix
2010-08-22 15:13                                         ` Philippe Gerum
2010-08-22 23:34                                           ` Gilles Chanteperdrix
2010-08-18 15:13                           ` Krzysztof Błaszkowski
2010-08-18 11:05     ` Gilles Chanteperdrix

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=4C6A8E49.10204@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=Xenomai-core@domain.hid \
    --cc=kb@domain.hid \
    /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.