From: Jan-Benedict G. <jb...@us...> - 2004-06-30 16:40:02
|
Update of /cvsroot/linux-vax/toolchain/experimental_toolchain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31149 Modified Files: experimental_toolchain.sh Added Files: vax-linux-binutils.patch Log Message: - Also patch binutils. - Binutils patch for now only contains K&R -> C90 style prototype conversion. I'm starting to read more toolchain sources. To get more involved, doing cosmetic hacking does help a lot to keep the eyes on the code. No, I'm not yet a toolchain expert, but maybe in a year or two... Oh, right, I'm waiting for a positive SF.net email, or I'll offer lug-owl.de for hosting a toolchain project, or the *BSD guys could stand up. By the way, ___Dave___, would you attempt to push the binutils patch to FSF? You've already pushed the last Linux bits IIRC and those changes I made aren't invasive in any way, it still compiles and shows at least some interest in the VAX target... Index: experimental_toolchain.sh =================================================================== RCS file: /cvsroot/linux-vax/toolchain/experimental_toolchain/experimental_toolchain.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- experimental_toolchain.sh 27 May 2004 15:52:55 -0000 1.2 +++ experimental_toolchain.sh 30 Jun 2004 16:39:50 -0000 1.3 @@ -35,9 +35,26 @@ # $Id$ # # $Log$ +# Revision 1.3 2004/06/30 16:39:50 jbglaw +# - Also patch binutils. +# - Binutils patch for now only contains K&R -> C90 style prototype +# conversion. +# +# I'm starting to read more toolchain sources. To get more involved, doing +# cosmetic hacking does help a lot to keep the eyes on the code. No, I'm +# not yet a toolchain expert, but maybe in a year or two... Oh, right, I'm +# waiting for a positive SF.net email, or I'll offer lug-owl.de for +# hosting a toolchain project, or the *BSD guys could stand up. +# +# By the way, ___Dave___, would you attempt to push the binutils patch to +# FSF? You've already pushed the last Linux bits IIRC and those changes I +# made aren't invasive in any way, it still compiles and shows at least +# some interest in the VAX target... +# # Revision 1.2 2004/05/27 15:52:55 jbglaw # - Add (and document) new option "--jbglaw" to fetch the two needed -# patch sets from http://lug-owl.de/~jbglaw/vax-linux-{gcc,libc}.patch +# patch sets from +# http://lug-owl.de/~jbglaw/vax-linux-{binutils,gcc,libc}.patch # instead of using SF.net's ViewCVS to fetch the current version. # Both ways should provide you with exactly the same patch set, but # SF.net's front-end web servers tend to provide material some hours @@ -74,8 +91,8 @@ # # -# MAKE_FLAGS="-j2" -MAKE_FLAGS="" +MAKE_FLAGS="-j2" +# MAKE_FLAGS="" GLOBAL_BASE_DIR= INSTALL_DIR= DO_PREPARE=0 @@ -223,17 +240,21 @@ # - # Now patch gcc and libc with current patches. binutils already work - # out of the box:) + # Now patch binutils, gcc and libc with current patches. # cd "${PREP_DIR}" if [ "${USE_JBGLAW}" -eq 1 ]; then + wget http://lug-owl.de/~jbglaw/vax-linux-binutils wget http://lug-owl.de/~jbglaw/vax-linux-gcc.patch wget http://lug-owl.de/~jbglaw/vax-linux-libc.patch else - wget -O vax-linux-gcc.patch 'http://cvs.sourceforge.net/viewcvs.py/linux-vax/toolchain/experimental_toolchain/vax-linux-gcc.patch?rev=HEAD&view=auto' - wget -O vax-linux-libc.patch 'http://cvs.sourceforge.net/viewcvs.py/linux-vax/toolchain/experimental_toolchain/vax-linux-libc.patch?rev=HEAD&view=auto' + wget -O vax-linux-binutils.patch 'http://cvs.sourceforge.net/viewcvs.py/*checkout*/linux-vax/toolchain/experimental_toolchain/vax-linux-binutils.patch' + wget -O vax-linux-gcc.patch 'http://cvs.sourceforge.net/viewcvs.py/*checkout*/linux-vax/toolchain/experimental_toolchain/vax-linux-gcc.patch' + wget -O vax-linux-libc.patch 'http://cvs.sourceforge.net/viewcvs.py/*checkout*/linux-vax/toolchain/experimental_toolchain/vax-linux-libc.patch' fi + cd "${LOCAL_SRC_DIR}/binutils-HEAD" + patch -p1 < "${PREP_DIR}/vax-linux-binutils.patch" + cd "${LOCAL_SRC_DIR}/gcc-HEAD" patch -p1 < "${PREP_DIR}/vax-linux-gcc.patch" @@ -265,4 +286,6 @@ USE_SYSROOT=yes \ PARALLELMFLAGS="${MAKE_FLAGS}" ./crosstool.sh fi # if [ "${DO_BUILD}" -eq 1 ]; then + +GLIBC_EXTRA_CC_ARGS="-save-temps" --- NEW FILE: vax-linux-binutils.patch --- --- binutils-HEAD/bfd/elf32-vax.c~ 2004-06-30 18:07:29.000000000 +0200 +++ binutils-HEAD/bfd/elf32-vax.c 2004-06-30 18:26:37.000000000 +0200 @@ -26,42 +26,34 @@ #include "elf-bfd.h" #include "elf/vax.h" -static reloc_howto_type *reloc_type_lookup - PARAMS ((bfd *, bfd_reloc_code_real_type)); -static void rtype_to_howto - PARAMS ((bfd *, arelent *, Elf_Internal_Rela *)); +static reloc_howto_type *reloc_type_lookup (bfd *, bfd_reloc_code_real_type); +static void rtype_to_howto (bfd *, arelent *, Elf_Internal_Rela *); static struct bfd_hash_entry *elf_vax_link_hash_newfunc - PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); -static struct bfd_link_hash_table *elf_vax_link_hash_table_create - PARAMS ((bfd *)); + (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); +static struct bfd_link_hash_table *elf_vax_link_hash_table_create (bfd *); static bfd_boolean elf_vax_check_relocs - PARAMS ((bfd *, struct bfd_link_info *, asection *, - const Elf_Internal_Rela *)); + (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *); static asection *elf_vax_gc_mark_hook - PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *, - struct elf_link_hash_entry *, Elf_Internal_Sym *)); + (asection *, struct bfd_link_info *, Elf_Internal_Rela *, + struct elf_link_hash_entry *, Elf_Internal_Sym *); static bfd_boolean elf_vax_gc_sweep_hook - PARAMS ((bfd *, struct bfd_link_info *, asection *, - const Elf_Internal_Rela *)); + (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *); static bfd_boolean elf_vax_adjust_dynamic_symbol - PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); + (struct bfd_link_info *, struct elf_link_hash_entry *); static bfd_boolean elf_vax_size_dynamic_sections - PARAMS ((bfd *, struct bfd_link_info *)); + (bfd *, struct bfd_link_info *); static bfd_boolean elf_vax_relocate_section - PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, - Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); + (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, + Elf_Internal_Rela *, Elf_Internal_Sym *, asection **); static bfd_boolean elf_vax_finish_dynamic_symbol - PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, - Elf_Internal_Sym *)); + (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, + Elf_Internal_Sym *); static bfd_boolean elf_vax_finish_dynamic_sections - PARAMS ((bfd *, struct bfd_link_info *)); + (bfd *, struct bfd_link_info *); -static bfd_boolean elf32_vax_set_private_flags - PARAMS ((bfd *, flagword)); -static bfd_boolean elf32_vax_merge_private_bfd_data - PARAMS ((bfd *, bfd *)); -static bfd_boolean elf32_vax_print_private_bfd_data - PARAMS ((bfd *, PTR)); +static bfd_boolean elf32_vax_set_private_flags (bfd *, flagword); +static bfd_boolean elf32_vax_merge_private_bfd_data (bfd *, bfd *); +static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, PTR); static reloc_howto_type howto_table[] = { HOWTO (R_VAX_NONE, /* type */ @@ -415,12 +407,12 @@ /* Declare this now that the above structures are defined. */ static bfd_boolean elf_vax_discard_copies - PARAMS ((struct elf_vax_link_hash_entry *, PTR)); + (struct elf_vax_link_hash_entry *, PTR); /* Declare this now that the above structures are defined. */ static bfd_boolean elf_vax_instantiate_got_entries - PARAMS ((struct elf_link_hash_entry *, PTR)); + (struct elf_link_hash_entry *, PTR); /* Traverse an VAX ELF linker hash table. */ @@ -438,10 +430,9 @@ /* Create an entry in an VAX ELF linker hash table. */ static struct bfd_hash_entry * -elf_vax_link_hash_newfunc (entry, table, string) - struct bfd_hash_entry *entry; - struct bfd_hash_table *table; - const char *string; +elf_vax_link_hash_newfunc (struct bfd_hash_entry *entry, + struct bfd_hash_table *table, + const char *string) { struct elf_vax_link_hash_entry *ret = (struct elf_vax_link_hash_entry *) entry; @@ -470,8 +461,7 @@ /* Create an VAX ELF linker hash table. */ static struct bfd_link_hash_table * -elf_vax_link_hash_table_create (abfd) - bfd *abfd; +elf_vax_link_hash_table_create (bfd *abfd) { struct elf_vax_link_hash_table *ret; bfd_size_type amt = sizeof (struct elf_vax_link_hash_table); @@ -491,10 +481,9 @@ } /* Keep vax-specific flags in the ELF header */ + static bfd_boolean -elf32_vax_set_private_flags (abfd, flags) - bfd *abfd; - flagword flags; +elf32_vax_set_private_flags (bfd *abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; elf_flags_init (abfd) = TRUE; @@ -503,10 +492,9 @@ /* Merge backend specific data from an object file to the output object file when linking. */ + static bfd_boolean -elf32_vax_merge_private_bfd_data (ibfd, obfd) - bfd *ibfd; - bfd *obfd; +elf32_vax_merge_private_bfd_data (bfd *ibfd, bfd *obfd) { flagword out_flags; flagword in_flags; @@ -528,10 +516,9 @@ } /* Display the flags field */ + static bfd_boolean -elf32_vax_print_private_bfd_data (abfd, ptr) - bfd *abfd; - PTR ptr; +elf32_vax_print_private_bfd_data (bfd *abfd, PTR ptr) { FILE *file = (FILE *) ptr; @@ -558,16 +545,14 @@ return TRUE; } + /* Look through the relocs for a section during the first phase, and allocate space in the global offset table or procedure linkage table. */ static bfd_boolean -elf_vax_check_relocs (abfd, info, sec, relocs) - bfd *abfd; - struct bfd_link_info *info; - asection *sec; - const Elf_Internal_Rela *relocs; +elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, + const Elf_Internal_Rela *relocs) { bfd *dynobj; Elf_Internal_Shdr *symtab_hdr; @@ -844,12 +829,11 @@ relocation. */ static asection * -elf_vax_gc_mark_hook (sec, info, rel, h, sym) - asection *sec; - struct bfd_link_info *info ATTRIBUTE_UNUSED; - Elf_Internal_Rela *rel; - struct elf_link_hash_entry *h; - Elf_Internal_Sym *sym; +elf_vax_gc_mark_hook (asection *sec, + struct bfd_link_info *info ATTRIBUTE_UNUSED, + Elf_Internal_Rela *rel, + struct elf_link_hash_entry *h, + Elf_Internal_Sym *sym) { if (h != NULL) { @@ -883,11 +867,8 @@ /* Update the got entry reference counts for the section being removed. */ static bfd_boolean -elf_vax_gc_sweep_hook (abfd, info, sec, relocs) - bfd *abfd; - struct bfd_link_info *info; - asection *sec; - const Elf_Internal_Rela *relocs; +elf_vax_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info, asection *sec, + const Elf_Internal_Rela *relocs) { Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; @@ -950,9 +931,8 @@ understand. */ static bfd_boolean -elf_vax_adjust_dynamic_symbol (info, h) - struct bfd_link_info *info; - struct elf_link_hash_entry *h; +elf_vax_adjust_dynamic_symbol (struct bfd_link_info *info, + struct elf_link_hash_entry *h) { bfd *dynobj; asection *s; @@ -1133,9 +1113,7 @@ /* Set the sizes of the dynamic sections. */ static bfd_boolean -elf_vax_size_dynamic_sections (output_bfd, info) - bfd *output_bfd; - struct bfd_link_info *info; +elf_vax_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { bfd *dynobj; asection *s; @@ -1339,9 +1317,8 @@ routine, but we won't fill them in in the relocate_section routine. */ static bfd_boolean -elf_vax_discard_copies (h, ignore) - struct elf_vax_link_hash_entry *h; - PTR ignore ATTRIBUTE_UNUSED; +elf_vax_discard_copies (struct elf_vax_link_hash_entry *h, + PTR ignore ATTRIBUTE_UNUSED) { struct elf_vax_pcrel_relocs_copied *s; @@ -1366,9 +1343,8 @@ will be reserved for the symbol. */ static bfd_boolean -elf_vax_instantiate_got_entries (h, infoptr) - struct elf_link_hash_entry *h; - PTR infoptr; +elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, + PTR infoptr) { struct bfd_link_info *info = (struct bfd_link_info *) infoptr; bfd *dynobj; @@ -1414,16 +1390,11 @@ /* Relocate an VAX ELF section. */ static bfd_boolean -elf_vax_relocate_section (output_bfd, info, input_bfd, input_section, - contents, relocs, local_syms, local_sections) - bfd *output_bfd; - struct bfd_link_info *info; - bfd *input_bfd; - asection *input_section; - bfd_byte *contents; - Elf_Internal_Rela *relocs; - Elf_Internal_Sym *local_syms; - asection **local_sections; +elf_vax_relocate_section (bfd *output_bfd, struct bfd_link_info *info, + bfd *input_bfd, asection *input_section, + bfd_byte *contents, Elf_Internal_Rela *relocs, + Elf_Internal_Sym *local_syms, + asection **local_sections) { bfd *dynobj; Elf_Internal_Shdr *symtab_hdr; @@ -1851,11 +1822,9 @@ dynamic sections here. */ static bfd_boolean -elf_vax_finish_dynamic_symbol (output_bfd, info, h, sym) - bfd *output_bfd; - struct bfd_link_info *info; - struct elf_link_hash_entry *h; - Elf_Internal_Sym *sym; +elf_vax_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, + struct elf_link_hash_entry *h, + Elf_Internal_Sym *sym) { bfd *dynobj; @@ -2006,9 +1975,7 @@ /* Finish up the dynamic sections. */ static bfd_boolean -elf_vax_finish_dynamic_sections (output_bfd, info) - bfd *output_bfd; - struct bfd_link_info *info; +elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { bfd *dynobj; asection *sgot; |