[haiku] Re: [GSoC] x86_64 application rough draft

  • From: Nathan Mentley <nathanmentley@xxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Fri, 9 Apr 2010 17:49:56 -0400

Hey, If someone doesn't mind taking a few seconds... minutes... to help me
out.

 My plan is to submit a few patches to the gcc in buildtools that'll work
towards gcc outputting haiku elf64 binaries in the next few days, but I'm by
far not a gcc hacking expert.

 So far I've been looking around buildtools/gcc/gcc/config and
buildtools/gcc/gcc/config/i386

 In buildtools/gcc/gcc/config/i386 I've found beos-elf.h. <-- I'm assuming
that's only used for beos and not for haiku... So I'll be leaving that
alone, but in the same folder I found a haiku.h. After looking at a
linux64.h I've made a haiku64.h that I think should work for 64bit haiku elf
files.

 in the buildtools/gcc/gcc/config/i386/haiku.h file it references
elf_i386_haiku.

 #undef LINK_SPEC

#define LINK_SPEC "-m elf_i386_haiku -shared -Bsymbolic %{nostart:-e 0}
%{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"

 I'm under the impression that it's referring to the script
/buildtools/binutils/ld/emulparams/elf_i386_haiku.sh. I've created a
elf_x86_64_haiku.sh in that folder that's now being used by
/buildtools/gcc/gcc/config/i386/haiku64.h

 I'm not exactly sure where to go from here. I'm pretty sure I'll need to
include haiku64.h somewhere. I'm just at a loss of what file(s) include or
point to /buildtools/gcc/gcc/config/i386/haiku.h... which would helpful
information in using elf_x86_64_haiku and haiku64.h with gcc.

 Thanks, for any help. Sorry, I'm more inexperienced with modifying gcc than
I would like to be.

-Nathan Mentley

Other related posts: