Reply
Thread Tools
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#1
Running Ubuntu 12.04 with gcc-4.6-arm-linux-gnueabi, version 4.6.3-1ubuntu5cross1.62.

I made a hello-world program and compiled it like this:

$ arm-linux-gnueabi-gcc -v -marm -o hello hello.c

I then copied hello to two N900s running Maemo5 PR1.3. One is running Nokia-OMAP kernel, the other KP50 (this is at least the most obvious difference).

Code:
OMAP$ ./hello
./hello: line 1: syntax error: unexpected word (expecting ")")
and
Code:
OMAP$ ldd ./hello
	libm.so.6 => /lib/libm.so.6 (0x4002f000)
	libc.so.6 => /lib/libc.so.6 (0x400a5000)
	/lib/ld-linux.so.3 (0x40000000)
On KP50 the executable runs fine and prints the message. Weird is also that ldd gives a different result:

Code:
KP50$ ldd ./hello
	libc.so.6 => /lib/libc.so.6 (0x40031000)
	/lib/ld-linux.so.3 (0x40000000)
How can this be?
I guess I'm missing something obvious. But libc6 is the same on both N900s.

I'd appreciate any pointers!
Thanks in advance.
 
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#2
could you post source code and binary which you tested?
 
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#3
binary attached. had to gzip it for the forum.
src is your usual #include <stdio.h>, int main(void) .. printf(..)

thanks
Attached Files
File Type: gz hello.gz (2.2 KB, 117 views)
 

The Following User Says Thank You to reinob For This Useful Post:
Posts: 1,225 | Thanked: 1,905 times | Joined on Feb 2011 @ Quezon City, Philippines
#4
Which libgcc are you using? IIRC GCC 4.6 needed new libs.
__________________
N9 PR 1.3 Open Mode + kernel-plus for Harmattan
@kenweknot, working on Glacier for Nemo.
 
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#5
it would be superb if you could test on both devices using stock omap1 kernel and power kernel (e.g. post results on 1st device omap, 1st device pk, 2nd device omap and 2nd device pk), because it may be related to some other stuff as Hurrian suggested. Usual can differ x[
Code:
#include <stdio.h>
int main(void) {
   printf("hello world!\n");
   return 0;
}
right? or without return at the end or something less or more? Sorry for being picky
 
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#6
@misiak,

Will try (but from now on my time will be very limited..)

Note that I also tried making static executables. The outcome was the same.

Note also that I haven't played with binfmt_misc or anything. I'm also using -marm to avoid any thumb/thumb2 issues.
 

The Following User Says Thank You to reinob For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#7
well, I don't see any reason libm.so to be linked.

do you have some busybox-power or such installed?
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#8
On the N900 where it runs OK:
KP50, busybox-power 1.20.1power2

On the N900 where it doesn't run OK:
Nokia kernel, busybox-power 1.20.1power2

Just in case, /etc/ld.so.conf is identical in both. /lib/ld.linux.so.3 is (in both) a symlink to /lib/ld-2.5.so (both identical).

I also suspected busybox. But I can't understand why.

According to /proc/cpuinfo Nokia Kernel does not have thumbee and neon support (which KP has). But I compiled with -marm.

Still it could be that the kernel doesn't think it's an executable it can handle and gives it to busybox?
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:57.