ppc32: Building tiny executable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

I am toying with a tiny executable:

$ cat tiny.c
#include <unistd.h>
void _start() {
  _exit(42);
}

on x86-64, here is what I get:

$ gcc -static -ffreestanding -nostartfiles  -s -o tiny tiny.c
$ ./tiny || echo $?

Now from a ppc32 system:

$ gcc -static -ffreestanding -nostartfiles  -s -o tiny tiny.c
$ ./tiny
Segmentation fault

What do I need to pay attention to on ppc to build tiny executable
using the _start function ?

Thanks,
-- 
Mathieu



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux