All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anders Blomdell <anders.blomdell@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Problems with gcc 4.6.0 (rt_task_shadow fails with	ENOSYS)
Date: Fri, 08 Jul 2011 16:58:32 +0200	[thread overview]
Message-ID: <4E171B18.6040707@domain.hid> (raw)
In-Reply-To: <4E1717D7.9030505@domain.hid>

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

On 07/08/2011 04:44 PM, Gilles Chanteperdrix wrote:
> On 07/08/2011 04:06 PM, Anders Blomdell wrote:
>> On 07/08/2011 02:41 PM, Gilles Chanteperdrix wrote:
>>> On 07/07/2011 11:47 PM, Anders Blomdell wrote:
>>>> When compiling kernel 2.6.37.3 and xenomai 2.5.6 with "gcc version 4.6.0
>>>> 20110530 (Red Hat 4.6.0-9) (GCC)", programs fail with -ENOSYS in
>>>> rt_task_shadow. If compiled with "gcc version 4.5.1 20100924 (Red Hat
>>>> 4.5.1-4) (GCC)" everything works as expected.
>>>
>>> Could you send us the disassembly of the two functions?
>> Which functions? Print[fk] debugging got me to suspect the
>> syscall/skin_mux interface, but I'm a bit at loss of exactly where the
>> code ends up.
>
> The two rt_task_shadow, the one which works, and the one which does not.
Ok, attached the two routines taken from respective libnative.so.3

Will try to recompile with gcc-4.6.1 as well.

/Anders

-- 
Anders Blomdell                  Email: anders.blomdell@domain.hid
Department of Automatic Control
Lund University                  Phone:    +46 46 222 4625
P.O. Box 118                     Fax:      +46 46 138118
SE-221 00 Lund, Sweden


[-- Attachment #2: bad --]
[-- Type: text/plain, Size: 5326 bytes --]

000083a0 <rt_task_shadow>:
    83a0:	55                   	push   %ebp
    83a1:	57                   	push   %edi
    83a2:	56                   	push   %esi
    83a3:	53                   	push   %ebx
    83a4:	e8 c0 a1 ff ff       	call   2569 <__i686.get_pc_thunk.bx>
    83a9:	81 c3 93 56 00 00    	add    $0x5693,%ebx
    83af:	81 ec ac 08 00 00    	sub    $0x8ac,%esp
    83b5:	8b b4 24 c0 08 00 00 	mov    0x8c0(%esp),%esi
    83bc:	e8 3b 9d ff ff       	call   20fc <xeno_fault_stack@plt>
    83c1:	85 f6                	test   %esi,%esi
    83c3:	8d 84 24 90 08 00 00 	lea    0x890(%esp),%eax
    83ca:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)
    83d1:	00 
    83d2:	0f 44 f0             	cmove  %eax,%esi
    83d5:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
    83dc:	e8 fb 9e ff ff       	call   22dc <pthread_setcanceltype@plt>
    83e1:	e8 c6 9e ff ff       	call   22ac <xeno_sigshadow_install_once@plt>
    83e6:	8b 84 24 c4 08 00 00 	mov    0x8c4(%esp),%eax
    83ed:	89 b4 24 78 08 00 00 	mov    %esi,0x878(%esp)
    83f4:	89 84 24 7c 08 00 00 	mov    %eax,0x87c(%esp)
    83fb:	8b 84 24 c8 08 00 00 	mov    0x8c8(%esp),%eax
    8402:	89 84 24 80 08 00 00 	mov    %eax,0x880(%esp)
    8409:	8b 84 24 cc 08 00 00 	mov    0x8cc(%esp),%eax
    8410:	89 84 24 84 08 00 00 	mov    %eax,0x884(%esp)
    8417:	e8 a0 9e ff ff       	call   22bc <pthread_self@plt>
    841c:	89 84 24 88 08 00 00 	mov    %eax,0x888(%esp)
    8423:	e8 34 9d ff ff       	call   215c <xeno_init_current_mode@plt>
    8428:	b9 f4 ff ff ff       	mov    $0xfffffff4,%ecx
    842d:	85 c0                	test   %eax,%eax
    842f:	89 84 24 8c 08 00 00 	mov    %eax,0x88c(%esp)
    8436:	0f 84 bd 00 00 00    	je     84f9 <rt_task_shadow+0x159>
    843c:	8d 83 00 aa ff ff    	lea    -0x5600(%ebx),%eax
    8442:	89 84 24 74 08 00 00 	mov    %eax,0x874(%esp)
    8449:	89 ac 24 70 08 00 00 	mov    %ebp,0x870(%esp)
    8450:	8b bb e8 ff ff ff    	mov    -0x18(%ebx),%edi
    8456:	8d 84 24 70 08 00 00 	lea    0x870(%esp),%eax
    845d:	89 84 24 98 08 00 00 	mov    %eax,0x898(%esp)
    8464:	8d ac 24 78 08 00 00 	lea    0x878(%esp),%ebp
    846b:	90                   	nop
    846c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
    8470:	8b 07                	mov    (%edi),%eax
    8472:	31 c9                	xor    %ecx,%ecx
    8474:	c7 44 24 28 00 00 00 	movl   $0x0,0x28(%esp)
    847b:	00 
    847c:	0d 2b 02 00 00       	or     $0x22b,%eax
    8481:	89 84 24 9c 08 00 00 	mov    %eax,0x89c(%esp)
    8488:	89 e8                	mov    %ebp,%eax
    848a:	53                   	push   %ebx
    848b:	89 c3                	mov    %eax,%ebx
    848d:	8b 84 24 9c 08 00 00 	mov    0x89c(%esp),%eax
    8494:	55                   	push   %ebp
    8495:	8b ac 24 98 08 00 00 	mov    0x898(%esp),%ebp
    849c:	cd 80                	int    $0x80
    849e:	5d                   	pop    %ebp
    849f:	5b                   	pop    %ebx
    84a0:	89 c1                	mov    %eax,%ecx
    84a2:	8b 44 24 28          	mov    0x28(%esp),%eax
    84a6:	85 c0                	test   %eax,%eax
    84a8:	74 1a                	je     84c4 <rt_task_shadow+0x124>
    84aa:	8d 44 24 28          	lea    0x28(%esp),%eax
    84ae:	89 4c 24 08          	mov    %ecx,0x8(%esp)
    84b2:	c7 44 24 04 ab ff ff 	movl   $0xffffffab,0x4(%esp)
    84b9:	ff 
    84ba:	89 04 24             	mov    %eax,(%esp)
    84bd:	e8 aa 9d ff ff       	call   226c <__xnsig_dispatch@plt>
    84c2:	89 c1                	mov    %eax,%ecx
    84c4:	83 f9 ab             	cmp    $0xffffffab,%ecx
    84c7:	74 a7                	je     8470 <rt_task_shadow+0xd0>
    84c9:	8d 83 b9 ca ff ff    	lea    -0x3547(%ebx),%eax
    84cf:	89 44 24 04          	mov    %eax,0x4(%esp)
    84d3:	8d 83 5c c5 ff ff    	lea    -0x3aa4(%ebx),%eax
    84d9:	89 4c 24 0c          	mov    %ecx,0xc(%esp)
    84dd:	c7 44 24 08 df 00 00 	movl   $0xdf,0x8(%esp)
    84e4:	00 
    84e5:	89 04 24             	mov    %eax,(%esp)
    84e8:	89 4c 24 1c          	mov    %ecx,0x1c(%esp)
    84ec:	e8 ab 9c ff ff       	call   219c <printf@plt>
    84f1:	8b 4c 24 1c          	mov    0x1c(%esp),%ecx
    84f5:	85 c9                	test   %ecx,%ecx
    84f7:	74 0f                	je     8508 <rt_task_shadow+0x168>
    84f9:	81 c4 ac 08 00 00    	add    $0x8ac,%esp
    84ff:	89 c8                	mov    %ecx,%eax
    8501:	5b                   	pop    %ebx
    8502:	5e                   	pop    %esi
    8503:	5f                   	pop    %edi
    8504:	5d                   	pop    %ebp
    8505:	c3                   	ret    
    8506:	66 90                	xchg   %ax,%ax
    8508:	8b 7e 04             	mov    0x4(%esi),%edi
    850b:	8b 83 f4 ff ff ff    	mov    -0xc(%ebx),%eax
    8511:	8b 36                	mov    (%esi),%esi
    8513:	65 89 78 04          	mov    %edi,%gs:0x4(%eax)
    8517:	65 89 30             	mov    %esi,%gs:(%eax)
    851a:	e8 bd 9c ff ff       	call   21dc <xeno_set_current@plt>
    851f:	8b 4c 24 1c          	mov    0x1c(%esp),%ecx
    8523:	81 c4 ac 08 00 00    	add    $0x8ac,%esp
    8529:	5b                   	pop    %ebx
    852a:	5e                   	pop    %esi
    852b:	5f                   	pop    %edi
    852c:	89 c8                	mov    %ecx,%eax
    852e:	5d                   	pop    %ebp
    852f:	c3                   	ret    


[-- Attachment #3: good --]
[-- Type: text/plain, Size: 4988 bytes --]

00006ec0 <rt_task_shadow>:
    6ec0:	55                   	push   %ebp
    6ec1:	89 e5                	mov    %esp,%ebp
    6ec3:	57                   	push   %edi
    6ec4:	56                   	push   %esi
    6ec5:	53                   	push   %ebx
    6ec6:	e8 9e b4 ff ff       	call   2369 <__i686.get_pc_thunk.bx>
    6ecb:	81 c3 75 28 00 00    	add    $0x2875,%ebx
    6ed1:	81 ec ac 08 00 00    	sub    $0x8ac,%esp
    6ed7:	8b 75 08             	mov    0x8(%ebp),%esi
    6eda:	e8 e1 b1 ff ff       	call   20c0 <xeno_fault_stack@plt>
    6edf:	85 f6                	test   %esi,%esi
    6ee1:	8d 45 d8             	lea    -0x28(%ebp),%eax
    6ee4:	0f 44 f0             	cmove  %eax,%esi
    6ee7:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)
    6eee:	00 
    6eef:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
    6ef6:	e8 95 b3 ff ff       	call   2290 <pthread_setcanceltype@plt>
    6efb:	e8 60 b3 ff ff       	call   2260 <xeno_sigshadow_install_once@plt>
    6f00:	8b 45 0c             	mov    0xc(%ebp),%eax
    6f03:	89 75 c0             	mov    %esi,-0x40(%ebp)
    6f06:	89 45 c4             	mov    %eax,-0x3c(%ebp)
    6f09:	8b 45 10             	mov    0x10(%ebp),%eax
    6f0c:	89 45 c8             	mov    %eax,-0x38(%ebp)
    6f0f:	8b 45 14             	mov    0x14(%ebp),%eax
    6f12:	89 45 cc             	mov    %eax,-0x34(%ebp)
    6f15:	e8 56 b3 ff ff       	call   2270 <pthread_self@plt>
    6f1a:	89 45 d0             	mov    %eax,-0x30(%ebp)
    6f1d:	e8 fe b1 ff ff       	call   2120 <xeno_init_current_mode@plt>
    6f22:	89 c2                	mov    %eax,%edx
    6f24:	85 d2                	test   %edx,%edx
    6f26:	89 45 d4             	mov    %eax,-0x2c(%ebp)
    6f29:	b8 f4 ff ff ff       	mov    $0xfffffff4,%eax
    6f2e:	0f 84 89 00 00 00    	je     6fbd <rt_task_shadow+0xfd>
    6f34:	8d 83 f4 d7 ff ff    	lea    -0x280c(%ebx),%eax
    6f3a:	89 45 bc             	mov    %eax,-0x44(%ebp)
    6f3d:	89 6d b8             	mov    %ebp,-0x48(%ebp)
    6f40:	8b bb e8 ff ff ff    	mov    -0x18(%ebx),%edi
    6f46:	8d 45 b8             	lea    -0x48(%ebp),%eax
    6f49:	89 45 e4             	mov    %eax,-0x1c(%ebp)
    6f4c:	8d 85 70 f7 ff ff    	lea    -0x890(%ebp),%eax
    6f52:	8d 55 c0             	lea    -0x40(%ebp),%edx
    6f55:	89 85 64 f7 ff ff    	mov    %eax,-0x89c(%ebp)
    6f5b:	90                   	nop
    6f5c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
    6f60:	8b 07                	mov    (%edi),%eax
    6f62:	31 c9                	xor    %ecx,%ecx
    6f64:	c7 85 70 f7 ff ff 00 	movl   $0x0,-0x890(%ebp)
    6f6b:	00 00 00 
    6f6e:	0d 2b 02 00 00       	or     $0x22b,%eax
    6f73:	89 45 e0             	mov    %eax,-0x20(%ebp)
    6f76:	87 d3                	xchg   %edx,%ebx
    6f78:	8b 45 e0             	mov    -0x20(%ebp),%eax
    6f7b:	55                   	push   %ebp
    6f7c:	8b 6d e4             	mov    -0x1c(%ebp),%ebp
    6f7f:	cd 80                	int    $0x80
    6f81:	5d                   	pop    %ebp
    6f82:	87 d3                	xchg   %edx,%ebx
    6f84:	8b 8d 70 f7 ff ff    	mov    -0x890(%ebp),%ecx
    6f8a:	85 c9                	test   %ecx,%ecx
    6f8c:	74 26                	je     6fb4 <rt_task_shadow+0xf4>
    6f8e:	89 44 24 08          	mov    %eax,0x8(%esp)
    6f92:	8b 85 64 f7 ff ff    	mov    -0x89c(%ebp),%eax
    6f98:	89 95 60 f7 ff ff    	mov    %edx,-0x8a0(%ebp)
    6f9e:	c7 44 24 04 ab ff ff 	movl   $0xffffffab,0x4(%esp)
    6fa5:	ff 
    6fa6:	89 04 24             	mov    %eax,(%esp)
    6fa9:	e8 72 b2 ff ff       	call   2220 <__xnsig_dispatch@plt>
    6fae:	8b 95 60 f7 ff ff    	mov    -0x8a0(%ebp),%edx
    6fb4:	83 f8 ab             	cmp    $0xffffffab,%eax
    6fb7:	74 a7                	je     6f60 <rt_task_shadow+0xa0>
    6fb9:	85 c0                	test   %eax,%eax
    6fbb:	74 0b                	je     6fc8 <rt_task_shadow+0x108>
    6fbd:	81 c4 ac 08 00 00    	add    $0x8ac,%esp
    6fc3:	5b                   	pop    %ebx
    6fc4:	5e                   	pop    %esi
    6fc5:	5f                   	pop    %edi
    6fc6:	5d                   	pop    %ebp
    6fc7:	c3                   	ret    
    6fc8:	8b 7e 04             	mov    0x4(%esi),%edi
    6fcb:	8b 93 f4 ff ff ff    	mov    -0xc(%ebx),%edx
    6fd1:	8b 36                	mov    (%esi),%esi
    6fd3:	65 89 7a 04          	mov    %edi,%gs:0x4(%edx)
    6fd7:	65 89 32             	mov    %esi,%gs:(%edx)
    6fda:	89 85 60 f7 ff ff    	mov    %eax,-0x8a0(%ebp)
    6fe0:	e8 ab b1 ff ff       	call   2190 <xeno_set_current@plt>
    6fe5:	8b 85 60 f7 ff ff    	mov    -0x8a0(%ebp),%eax
    6feb:	81 c4 ac 08 00 00    	add    $0x8ac,%esp
    6ff1:	5b                   	pop    %ebx
    6ff2:	5e                   	pop    %esi
    6ff3:	5f                   	pop    %edi
    6ff4:	5d                   	pop    %ebp
    6ff5:	c3                   	ret    
    6ff6:	8d 76 00             	lea    0x0(%esi),%esi
    6ff9:	8d bc 27 00 00 00 00 	lea    0x0(%edi,%eiz,1),%edi


  reply	other threads:[~2011-07-08 14:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07 21:47 [Xenomai-core] Problems with gcc 4.6.0 (rt_task_shadow fails with ENOSYS) Anders Blomdell
2011-07-08 12:41 ` Gilles Chanteperdrix
2011-07-08 14:06   ` Anders Blomdell
2011-07-08 14:44     ` Gilles Chanteperdrix
2011-07-08 14:58       ` Anders Blomdell [this message]
2011-07-11 15:25 ` Daniele Nicolodi
2011-07-11 18:43 ` Gilles Chanteperdrix
2011-07-26 12:09   ` Daniele Nicolodi
2011-07-27 18:55     ` Gilles Chanteperdrix
2011-07-28  7:37       ` Daniele Nicolodi

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=4E171B18.6040707@domain.hid \
    --to=anders.blomdell@domain.hid \
    --cc=gilles.chanteperdrix@xenomai.org \
    --cc=xenomai@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.