I suspect that you're not building correctly for the Target Processor. I suspect that 'test' might run under Ubuntu.
This is what I did to get an application working on the MX28 EVK.
I used the gcc that I downloaded for the MX28 EVK. Namely I downloaded L2.6.35_10.12.01_SDK_source_bundle.tar.gz.
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc to build your progam. I setup Eclipse (see Application Note AN3870 - "Developing an Application for the i.MX Devices on the Linux Platform") to do the build for me. I got the results below for uart_appnote.c:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
**** Clean-only build of configuration MX28-Debug for project uart_appnote ****
make clean
rm -rf ./src/uart_appnote.o ./src/uart_appnote.d uart_appnote
**** Build of configuration MX28-Debug for project uart_appnote ****
make all
Building file: ../src/uart_appnote.c
Invoking: GCC C Compiler
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc -I/home/jays1/imx28/ltib/rpm/BUILD/linux/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/uart_appnote.d" -MT"src/uart_appnote.d" -o"src/uart_appnote.o" "../src/uart_appnote.c"
Finished building: ../src/uart_appnote.c
Building target: uart_appnote
Invoking: GCC C Linker
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc -L/home/jays1/imx28/ltib/rootfs/lib -L/home/jays1/imx28/ltib/rootfs/usr/lib -o"uart_appnote" ./src/uart_appnote.o
Finished building target: uart_appnote
make --no-print-directory post-build
Copy binaries to TFTP directory
cp ~/workspace/uart_appnote/MX28-Debug/uart_appnote /tftpboot
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The above listing is from my console in Eclipse. I had some struggles setting up Eclipse (still running into some problems),
but the fact that I can build with it and it generates the makefiles that it uses makes it useful. I also can do source level debugging on the Target (with GDBServer over Ethernet). I had to use 3.5 (Galileo) instead of 3.4 (couldn't get to come up under Ubuntu 10.04.3). I downloaded and installed the Galileo version of Eclipse from http://www.eclipse.org/downloads/packages/release/galileo/sr2. Choose “Eclipse IDE for C/C++ Developers” for Linux, 32-bit (eclipse-cpp-galileo-SR2-linux-gtk.tar.gz). I had to install "OpenJDK Java 6 Runtime" from the Ubuntu Software Center before installing Eclipse as Java is required for Eclipse to run.
Hope this helps.