This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Monday 12 June 2006 17:58, Martin Guy wrote: > 2006/6/12, Niklaus <niklaus@gmail.com>: > > int main() > > { > > return 3; > > } > > > > i compiled it using sparc-elf-gcc -c test.c. > > ./sparc-elf-ld --entry=main test.o -o a.out > > when i executed a.out on sparc machine it segfaulted and dumped core. > > I guess 'cos you set entrypoint=main instead of __start or whatever it > is called. More likely you should use the appropriate configuration for your target (eg. sparc-linux or sparc-solaris) rather than the generic elf config. You should generally also use gcc to link not use ld directly because the gcc driver knows what options to pass to ld. Paul -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |