public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* One issue during kernel porting on coldfire m5441x: dl_main: Assertion `_rtld_local._dl_rtld_map.l_libname' failed!
@ 2010-02-21  9:02 Lanttor
       [not found] ` <4B8149BC.5020801@codesourcery.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Lanttor @ 2010-02-21  9:02 UTC (permalink / raw)
  To: Greg Ungerer, linux-m68k

Hi,

I met one interesting issue during I porting 2.6.29 kernel on ColdFire
paltform (v4 core, mcf5441x).

I could boot up the kernel with initramfs, but the kernel message below
displays some error information,
which line I colored red. initramfs image only includes busybox static
binary.

*starting pid 371, tty '': '/etc/rc.d/rcS'
Mounting /proc and /sys
Starting the hotplug events dispatcher udevd
Inconsistency detected by ld.so: rtld.c: 1215: dl_main: Assertion
`_rtld_local._dl_rtld_map.l_libname' failed!
Synthesizing initial hotplug events
Inconsistency detected by ld.so: rtld.c: 1215: dl_main: Assertion
`_rtld_local._dl_rtld_map.l_libname' failed!
Inconsistency detected by ld.so: rtld.c: 1215: dl_main: Assertion
`_rtld_local._dl_rtld_map.l_libname' failed!
Setting the hostname to freescale
Mounting filesystems
mount: mounting usbfs on /proc/bus/usb failed: No such file or directory
Starting syslogd and klogd
Running sysctl
Setting up networking on loopback device:
Setting up networking on eth0:
Adding static route for default gateway to 10.192.208.254:
route: SIOCADDRT: File exists
Setting nameserver to 10.192.208.1 in /etc/resolv.conf:
Starting inetd:
starting pid 434, tty '': '-/bin/sh'*

This error message shows that I can't load dynamical binary: if I build
initramfs with busybox dynamical binary,
it's can't boot up and just prints above error information.

Anybody met the issue like-same?  Some suggestion is appreciated.

-- 
Best Regards,
Lanttor

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: One issue during kernel porting on coldfire m5441x: dl_main: Assertion `_rtld_local._dl_rtld_map.l_libname' failed!
       [not found] ` <4B8149BC.5020801@codesourcery.com>
@ 2010-02-22  7:44   ` Lanttor
  2010-02-22 19:23     ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Lanttor @ 2010-02-22  7:44 UTC (permalink / raw)
  To: Maxim Kuvyrkov; +Cc: Greg Ungerer, linux-m68k

Hi, Max

Thanks for your information.


> It is quite strange that the run-time linker is invoked for a
> statically linked busybox -- maybe this is the problem?
This is not the problem, because I setup udevd daemon before busybox
when boot up. when I disable udevd and use static dev files, there will
no error information.
That means staitic binary is OK to run, but if I run dynamic binary,
it's failed and prints log: Inconsistency detected by ld.so: rtld.c:
1215: dl_main: Assertion `_rtld_local._dl_rtld_map.l_libname' failed!

> I suggest you take a look at <glibc_src>/elf/rtld.c and trace how the
> control gets there.
I use glibc-2.5 and check elf/rtld.c 1215 line, the code is as follows:

1206   if (! GL(dl_rtld_map).l_libname && GL(dl_rtld_map).l_name)
1207     {
1208       /* We were invoked directly, so the program might not have a
1209          PT_INTERP.  */
1210       _dl_rtld_libname.name = GL(dl_rtld_map).l_name;
1211       /* _dl_rtld_libname.next = NULL;  Already zero.  */
1212       GL(dl_rtld_map).l_libname =  &_dl_rtld_libname;
1213     }
1214   else
1215     assert (GL(dl_rtld_map).l_libname); /* How else did we get
here?  */


So I guess GL(dl_rtld_map).l_libname is not NUL and throws an
exception.  The reason is still tracing...

Best Regards,
Lanttor




------------------------------------------------------------------------
*From:* Maxim Kuvyrkov <maxim@codesourcery.com>
*Sent:* 02/21/2010 10:57:00 PM +0800
*To:* Lanttor <lanttor.guo@freescale.com>
*CC:* Greg Ungerer <gerg@snapgear.com>, linux-m68k@vger.kernel.org
*Subject:* One issue during kernel porting on coldfire m5441x: dl_main:
Assertion `_rtld_local._dl_rtld_map.l_libname' failed!

> On 2/21/10 12:02 PM, Lanttor wrote:
>> Hi,
>>
>> I met one interesting issue during I porting 2.6.29 kernel on ColdFire
>> paltform (v4 core, mcf5441x).
>>
>> I could boot up the kernel with initramfs, but the kernel message below
>> displays some error information,
>> which line I colored red. initramfs image only includes busybox static
>> binary.
> ...
>> Inconsistency detected by ld.so: rtld.c: 1215: dl_main: Assertion
>> `_rtld_local._dl_rtld_map.l_libname' failed!
>> Inconsistency detected by ld.so: rtld.c: 1215: dl_main: Assertion
>> `_rtld_local._dl_rtld_map.l_libname' failed!
>
> The error is an assertion failure in GLIBC's runtime linker, it is not
> a kernel issue.  It is quite strange that the run-time linker is
> invoked for a statically linked busybox -- maybe this is the problem? 
> I suggest you take a look at <glibc_src>/elf/rtld.c and trace how the
> control gets there.
>
> Regards,
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: One issue during kernel porting on coldfire m5441x: dl_main: Assertion `_rtld_local._dl_rtld_map.l_libname' failed!
  2010-02-22  7:44   ` Lanttor
@ 2010-02-22 19:23     ` Andreas Schwab
  2010-02-23  7:51       ` Lanttor
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2010-02-22 19:23 UTC (permalink / raw)
  To: Lanttor; +Cc: Maxim Kuvyrkov, Greg Ungerer, linux-m68k

Lanttor <lanttor.guo@freescale.com> writes:

> 1206   if (! GL(dl_rtld_map).l_libname && GL(dl_rtld_map).l_name)
> 1207     {
> 1208       /* We were invoked directly, so the program might not have a
> 1209          PT_INTERP.  */
> 1210       _dl_rtld_libname.name = GL(dl_rtld_map).l_name;
> 1211       /* _dl_rtld_libname.next = NULL;  Already zero.  */
> 1212       GL(dl_rtld_map).l_libname =  &_dl_rtld_libname;
> 1213     }
> 1214   else
> 1215     assert (GL(dl_rtld_map).l_libname); /* How else did we get
> here?  */
>
>
> So I guess GL(dl_rtld_map).l_libname is not NUL and throws an
> exception.  The reason is still tracing...

The assertion fails only if both l_libname and l_name are NULL.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: One issue during kernel porting on coldfire m5441x: dl_main: Assertion `_rtld_local._dl_rtld_map.l_libname' failed!
  2010-02-22 19:23     ` Andreas Schwab
@ 2010-02-23  7:51       ` Lanttor
  0 siblings, 0 replies; 4+ messages in thread
From: Lanttor @ 2010-02-23  7:51 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Maxim Kuvyrkov, Greg Ungerer, linux-m68k

>
> The assertion fails only if both l_libname and l_name are NULL.
Thanks Andreas, you're right.

Now I have resolved this issue: I need set the value to %rambar1
register in the head.S file.
This register is the configure register for SRAM. Although I not use
SRAM memory, but it
seems I need configure this register, otherwise I will meet the issue
before.

I'm not sure why this fix will affect run time loader. I guess the
toolchain may do some registers' check.

Best Regards,
Lanttor




------------------------------------------------------------------------
*From:* Andreas Schwab <schwab@linux-m68k.org>
*Sent:* 02/23/2010 3:23:28 AM +0800
*To:* Lanttor <lanttor.guo@freescale.com>
*CC:* Maxim Kuvyrkov <maxim@codesourcery.com>, Greg Ungerer
<gerg@snapgear.com>, linux-m68k@vger.kernel.org
*Subject:* One issue during kernel porting on coldfire m5441x: dl_main:
Assertion `_rtld_local._dl_rtld_map.l_libname' failed!

> Lanttor <lanttor.guo@freescale.com> writes:
>
>   
>> 1206   if (! GL(dl_rtld_map).l_libname && GL(dl_rtld_map).l_name)
>> 1207     {
>> 1208       /* We were invoked directly, so the program might not have a
>> 1209          PT_INTERP.  */
>> 1210       _dl_rtld_libname.name = GL(dl_rtld_map).l_name;
>> 1211       /* _dl_rtld_libname.next = NULL;  Already zero.  */
>> 1212       GL(dl_rtld_map).l_libname =  &_dl_rtld_libname;
>> 1213     }
>> 1214   else
>> 1215     assert (GL(dl_rtld_map).l_libname); /* How else did we get
>> here?  */
>>
>>
>> So I guess GL(dl_rtld_map).l_libname is not NUL and throws an
>> exception.  The reason is still tracing...
>>     
>
> The assertion fails only if both l_libname and l_name are NULL.
>
> Andreas.
>
>   

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-02-23  7:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-21  9:02 One issue during kernel porting on coldfire m5441x: dl_main: Assertion `_rtld_local._dl_rtld_map.l_libname' failed! Lanttor
     [not found] ` <4B8149BC.5020801@codesourcery.com>
2010-02-22  7:44   ` Lanttor
2010-02-22 19:23     ` Andreas Schwab
2010-02-23  7:51       ` Lanttor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox