This is the mail archive of the crossgcc@sources.redhat.com 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] |
Hello all, I am currently in the process of making a linux-x-freebsd cross compiler based on Newlib. For that, I have ported Newlib to FreeBSD and have been able to run C programs without any problems. The C++ part is a bit more tricky, though: apparently whatever gcc puts in the .init section (using ELF for linking, BTW) doesn't actually get run. To make sure that this is true, I've written the following program and cross- compiled it to FreeBSD - it *should* print "Hello, world!" twice but only does so once on FreeBSD4.7 Can anyone here confirm or deny that a. this is a bug in my assembly: like this, "Hello World!" should only be printed once (in which case there's a bug in my Linux box, because it gets printed twice there) b. this is a bug in gcc: FreeBSD4.7 is known not to run .init and has every right not to do so. _start should take care of everything c. this is a bug in FreeBSD: whatever is in .init should be run The assembly is in the attached file. Thx rlc -- Never buy what you do not want because it is cheap; it will be dear to you. -- Thomas Jefferson
Attachment:
init.S
Description: test to see if whatever is in .init really gets called
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |