From andrea.baldini at spesonline.com Wed Jun 1 09:56:36 2011 From: andrea.baldini at spesonline.com (Andrea Baldini) Date: Wed, 1 Jun 2011 11:56:36 +0200 Subject: [superh-gnu-discuss] unaligned userspace access In-Reply-To: <4DA86350.1090109@codesourcery.com> References: <201104151057.57641.andrea.baldini@spesonline.com> <201104151718.04388.andrea.baldini@spesonline.com> <4DA86350.1090109@codesourcery.com> Message-ID: <201106011156.36437.andrea.baldini@spesonline.com> On Friday 15 April 2011 17:25:04 Andrew Stubbs wrote: > On 15/04/11 16:18, Andrea Baldini wrote: > >> Did you build busybox with the same toolchain? You do need a busybox > >> built with FDPIC to work on this target, of course. > >> > >> Andrew > > > > Yes, i built everything with the same toolchain. > > Did you build it statically linked or dynamically linked? (If you don't > know 'file busybox' should tell you on most Linux distros.) > > If you built it to use dynamic libraries, how did you install the system > libraries? > > Andrew Here again :) Sorry for leaving you without an answer last time. I got a working busybox compiling it statically and it seemed running without problems..the kernel booted and the init user-space process started. It seems that the problem related to the "unaligned userspace access" error occurs when i compile the sources using dynamic libraries. Going back to your question about how did i install the libraries, i put the contents of the toolchain libc directory in the target standard paths (/lib and /usr). Am i supposed to specify the rpath and dynamic-linker options? Should i use other special compiler or linker flags? Best regards Andrea -- Andrea Baldini Elettronica di Processo SPES. S.c.p.a Via Lamberto Corsi, 43 60044 Fabriano (AN) tel. +39 0732 25291 fax +39 0732 2529441 andrea.baldini at spesonline.com www.spesonline.com From ams at codesourcery.com Wed Jun 1 12:53:29 2011 From: ams at codesourcery.com (Andrew Stubbs) Date: Wed, 01 Jun 2011 13:53:29 +0100 Subject: [superh-gnu-discuss] unaligned userspace access In-Reply-To: <201106011156.36437.andrea.baldini@spesonline.com> References: <201104151057.57641.andrea.baldini@spesonline.com> <201104151718.04388.andrea.baldini@spesonline.com> <4DA86350.1090109@codesourcery.com> <201106011156.36437.andrea.baldini@spesonline.com> Message-ID: <4DE63649.4030102@codesourcery.com> On 01/06/11 10:56, Andrea Baldini wrote: > It seems that the problem related to the "unaligned userspace access" error > occurs when i compile the sources using dynamic libraries. > Going back to your question about how did i install the libraries, i put the > contents of the toolchain libc directory in the target standard paths (/lib > and /usr). > Am i supposed to specify the rpath and dynamic-linker options? > Should i use other special compiler or linker flags? No, that all sounds right to me. Do other dynamically linked programs work? Say, simple ones like hello world? Andrew From andrea.baldini at spesonline.com Wed Jun 1 13:58:12 2011 From: andrea.baldini at spesonline.com (Andrea Baldini) Date: Wed, 1 Jun 2011 15:58:12 +0200 Subject: [superh-gnu-discuss] unaligned userspace access In-Reply-To: <4DE63649.4030102@codesourcery.com> References: <201104151057.57641.andrea.baldini@spesonline.com> <201106011156.36437.andrea.baldini@spesonline.com> <4DE63649.4030102@codesourcery.com> Message-ID: <201106011558.13058.andrea.baldini@spesonline.com> On Wednesday 01 June 2011 14:53:29 Andrew Stubbs wrote: > On 01/06/11 10:56, Andrea Baldini wrote: > > It seems that the problem related to the "unaligned userspace access" > > error occurs when i compile the sources using dynamic libraries. > > Going back to your question about how did i install the libraries, i put > > the contents of the toolchain libc directory in the target standard > > paths (/lib and /usr). > > Am i supposed to specify the rpath and dynamic-linker options? > > Should i use other special compiler or linker flags? > > No, that all sounds right to me. Do other dynamically linked programs > work? Say, simple ones like hello world? > > Andrew Nope.. this is what happens: / # ./helloworld-sh ./helloworld-sh: cache 'Fixing up unaligned userspace access in "helloworld- sh" pid=805 pc=0x0e925ab0 ins=0x4308 /etc/ld.so.cacheFixing up unaligned userspace access in "helloworld-sh" pid=805 pc=0x0e925ab0 ins=0x4308 ' is corrupt Sending SIGBUS to "helloworld-sh" due to unaligned access (PC e925ab0 PR e925a9a) -- Andrea Baldini Elettronica di Processo SPES. S.c.p.a Via Lamberto Corsi, 43 60044 Fabriano (AN) tel. +39 0732 25291 fax +39 0732 2529441 andrea.baldini at spesonline.com www.spesonline.com