Date: Mon, 18 Mar 1996 18:38:23 -0800 From: John Polstra <jdp@polstra.com> To: "Marty Leisner" <leisner@sdsp.mc.xerox.com> Cc: Michael Smith <msmith@atrad.adelaide.edu.au>, coredump@nervosa.com (invalid opcode), freebsd-current@freebsd.org Subject: Re: Elfkit release 1.1 is now available Message-ID: <199603190238.SAA04211@austin.polstra.com> In-Reply-To: Your message of "Mon, 18 Mar 1996 11:36:10 PST." <9603181936.AA25032@gnu.mc.xerox.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Marty asked: > With the ELF stuff: > 1) should I be able to do reasonable cross-development from a linux paltform? You mean, using the standard Linux compiler, right? (The tools in elfkit are configured to run under FreeBSD, not under Linux.) > 2) is there a difference between linux-elf and freebsd-elf? > Or is it just i386-elf? For the binutils stuff (assembler and linker): The configuration target, i386-*-freebsdelf, is virtually identical to i386-*-elf. There's really only one difference: The load address for executables is set to 0x08048000, instead of the 0x08000000 that binutils uses for the other ELF targets. Why? Because that's what the SVR4/i386 ABI specification says it should be. (And that's what it really is, under SVR4.) I don't know why 0x08000000 was used for Linux and friends. Aside from that, I added a couple of command-line options, to make the tools more compatible with the standard FreeBSD tools. For "as", the "-k" option is accepted but ignored. The FreeBSD assembler uses "-k" to specify that PIC code should be generated. For "ld", "-Bshareable" is accepted as an alias for "-shared". For gcc, the i386-*-freebsdelf differs from the Linux ELF target in additional ways. Among the differences are: * The predefines for cpp ("FreeBSD" instead of "linux") * The type of wchar_t (int instead of long int) * The LINK_SPEC I hope this answers your questions. If not, let me know. -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603190238.SAA04211>