compiling using -static solve the problem. How do I tell the executable to
pick libc.so if I want to use dynamic linking ?

2015-01-21 10:03 GMT-05:00 Ziqiang Patrick Huang <
[email protected]>:

> Hi Stefan,
>
> I copied libc.so from musl-cross/musl-master/lib to
> arch/openrisc/support/initramfs/
>
> ./hello still gives me ./hello not found, seems like it's still not
> recognizing the executable file.
>
> How should I run it ?
>
> Patrick
>
> 2015-01-21 1:09 GMT-05:00 Stefan Kristiansson <
> [email protected]>:
>
> On Wed, Jan 21, 2015 at 7:53 AM, Ziqiang Patrick Huang <
>> [email protected]> wrote:
>>
>>> Hi Olof,
>>>
>>> Thanks so much for your suggestion ! I followed the instructions you
>>> poitnted to me and were able to build musl toolchain and also boot linux in
>>> or1ksim. I noticed there were 2 versions of gccs: or1k-linux-musl-gcc &
>>> or1k-musl-linux-gcc. I'm not sure which one is for compiling linux
>>> application, so I tried using both of them to compile a simple hello c
>>> program and put them under initramfs. However when I tried to run them
>>> inside the booted linux, neither were able to run. I assume I can just do
>>> ./hello  But got "bin/sh: ./hello: not found".
>>>
>>>
>> You will need to copy the dynamic libraries from musl into your initramfs
>> (at the very minimum, you'll at least need libc.so).
>> Regarding or1k-musl-linux-gcc vs or1k-linux-musl-gcc, I had never noticed
>> the or1k-musl-linux-gcc, but you are right, it's there.
>> It's however just a symlink to or1k-linux-musl-gcc.
>>
>> Stefan
>>
>
>
>
> --
> *Ziqiang Huang*
> *Electrical and Computer Engineering*
> *Hudson 213c, Duke University*
> *Tel: 919-491-3677 <919-491-3677>*
> *Email: [email protected] <[email protected]>*
>



-- 
*Ziqiang Huang*
*Electrical and Computer Engineering*
*Hudson 213c, Duke University*
*Tel: 919-491-3677*
*Email: [email protected] <[email protected]>*
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc

Reply via email to