2003/09/07 04:46:18
[org.ibex.core.git] / upstream / darwin-linker / patches / ld.patch
index 8657fd0..a01dacb 100644 (file)
@@ -1,7 +1,7 @@
-Only in ld: CVS
-diff -ubr ld/Makefile ld/Makefile
+Only in ld/: CVS
+diff -rub ld/Makefile ld/Makefile
 --- ld/Makefile        Fri Sep  6 18:27:43 2002
-+++ ld/Makefile        Mon Aug 25 23:04:37 2003
++++ ld/Makefile        Sat Sep  6 20:17:46 2003
 @@ -9,10 +9,10 @@
         -DKERNEL -DKERNEL_PRIVATE -DAPPLE -DNeXT -DLIBSA_PRIVATE
  
@@ -21,7 +21,7 @@ diff -ubr ld/Makefile ld/Makefile
  ifneq "mwccppc" "$(notdir $(CC))"
 -  GCC_FLAGS = -Wall -Wno-precomp $(X_CFLAGS)
 +  ifeq "Linux" "$(shell uname)"
-+    GCC_FLAGS = -Wall $(X_CFLAGS) -D__ppc__ -I/usr/include -I../../../macosx-include
++    GCC_FLAGS = -Wall $(X_CFLAGS) -D__LITTLE_ENDIAN__ -U__BIG_ENDIAN__  -D__ppc__ -I/usr/include -I../../../macosx-include
 +  else
 +    GCC_FLAGS = -Wall $(X_CFLAGS)
 +  endif
@@ -209,7 +209,7 @@ diff -ubr ld/Makefile ld/Makefile
  
  ld_vers.o: ld_vers.c
  ifeq "mwccppc" "$(notdir $(CC))"
-diff -ubr ld/coalesced_sections.c ld/coalesced_sections.c
+diff -rub ld/coalesced_sections.c ld/coalesced_sections.c
 --- ld/coalesced_sections.c    Tue Jan 14 23:35:24 2003
 +++ ld/coalesced_sections.c    Mon Aug 25 22:11:47 2003
 @@ -579,15 +579,15 @@
@@ -233,7 +233,8 @@ diff -ubr ld/coalesced_sections.c ld/coalesced_sections.c
                     * relocation entries only non-position-independent local
                     * relocation entries are kept.  Modules of dylibs are not
                     * linked together and can only be slid keeping all sections
-diff -ubr ld/dylibs.c ld/dylibs.c
+Only in ld/: dtmp_obj
+diff -rub ld/dylibs.c ld/dylibs.c
 --- ld/dylibs.c        Fri Sep  6 18:27:43 2002
 +++ ld/dylibs.c        Mon Aug 25 22:11:47 2003
 @@ -116,7 +116,8 @@
@@ -265,7 +266,7 @@ diff -ubr ld/dylibs.c ld/dylibs.c
                    mdl->dynamic_library = p;
                }
            }
-diff -ubr ld/dylibs.h ld/dylibs.h
+diff -rub ld/dylibs.h ld/dylibs.h
 --- ld/dylibs.h        Fri Sep  6 18:27:43 2002
 +++ ld/dylibs.h        Mon Aug 25 12:12:28 2003
 @@ -55,7 +55,7 @@
@@ -277,9 +278,11 @@ diff -ubr ld/dylibs.h ld/dylibs.h
  __private_extern__ void add_dylib_segment(
      struct segment_command *sg,
      char *dylib_name,
-Only in ld: dynamic_profile_obj
-Only in ld: fake-mach.c
-diff -ubr ld/generic_reloc.c ld/generic_reloc.c
+Only in ld/: dynamic_kld
+Only in ld/: dynamic_obj
+Only in ld/: dynamic_profile_obj
+Only in ld/: fake-mach.c
+diff -rub ld/generic_reloc.c ld/generic_reloc.c
 --- ld/generic_reloc.c Tue Jan 14 23:35:24 2003
 +++ ld/generic_reloc.c Mon Aug 25 22:11:47 2003
 @@ -351,13 +351,13 @@
@@ -327,7 +330,7 @@ diff -ubr ld/generic_reloc.c ld/generic_reloc.c
                             (merged_symbol->nlist.n_type & N_PEXT) == N_PEXT)){
                        reloc->r_extern = 0;
                        /*
-diff -ubr ld/hppa_reloc.c ld/hppa_reloc.c
+diff -rub ld/hppa_reloc.c ld/hppa_reloc.c
 --- ld/hppa_reloc.c    Tue Jan 14 23:35:24 2003
 +++ ld/hppa_reloc.c    Mon Aug 25 22:11:47 2003
 @@ -384,13 +384,13 @@
@@ -396,7 +399,7 @@ diff -ubr ld/hppa_reloc.c ld/hppa_reloc.c
                             (merged_symbol->nlist.n_type & N_PEXT) == N_PEXT)){
                        reloc->r_extern = 0;
                        /*
-diff -ubr ld/i860_reloc.c ld/i860_reloc.c
+diff -rub ld/i860_reloc.c ld/i860_reloc.c
 --- ld/i860_reloc.c    Tue Jan 14 23:35:24 2003
 +++ ld/i860_reloc.c    Mon Aug 25 22:11:47 2003
 @@ -370,13 +370,13 @@
@@ -446,7 +449,7 @@ diff -ubr ld/i860_reloc.c ld/i860_reloc.c
                        reloc->r_extern = 0;
                        /*
                         * If this symbol was in the base file then no futher
-diff -ubr ld/indirect_sections.c ld/indirect_sections.c
+diff -rub ld/indirect_sections.c ld/indirect_sections.c
 --- ld/indirect_sections.c     Tue Jan 14 23:35:24 2003
 +++ ld/indirect_sections.c     Mon Aug 25 22:11:47 2003
 @@ -370,11 +370,13 @@
@@ -573,7 +576,7 @@ diff -ubr ld/indirect_sections.c ld/indirect_sections.c
                  "(output file must contain at least global symbols, for "
                  "maximum stripping use -x)");
        indirect_symbols = (unsigned long *)(output_addr +
-diff -ubr ld/layout.c ld/layout.c
+diff -rub ld/layout.c ld/layout.c
 --- ld/layout.c        Tue Jan 14 23:35:24 2003
 +++ ld/layout.c        Mon Aug 25 23:22:05 2003
 @@ -42,18 +42,22 @@
@@ -714,7 +717,7 @@ diff -ubr ld/layout.c ld/layout.c
                                print_obj_name(object_file);
                                print("\n");
                            }
-diff -ubr ld/ld.c ld/ld.c
+diff -rub ld/ld.c ld/ld.c
 --- ld/ld.c    Tue Jan 14 23:35:24 2003
 +++ ld/ld.c    Mon Aug 25 22:11:47 2003
 @@ -50,6 +50,9 @@
@@ -1196,7 +1199,7 @@ diff -ubr ld/ld.c ld/ld.c
  }
  
  /*
-diff -ubr ld/ld.h ld/ld.h
+diff -rub ld/ld.h ld/ld.h
 --- ld/ld.h    Tue Jan 14 23:35:24 2003
 +++ ld/ld.h    Mon Aug 25 12:12:29 2003
 @@ -41,6 +41,7 @@
@@ -1246,7 +1249,8 @@ diff -ubr ld/ld.h ld/ld.h
  
  /* The list of symbols to be traced */
  __private_extern__ char **trace_syms;
-diff -ubr ld/literal_pointers.c ld/literal_pointers.c
+Only in ld/: ld_dir
+diff -rub ld/literal_pointers.c ld/literal_pointers.c
 --- ld/literal_pointers.c      Tue Jan 14 23:35:25 2003
 +++ ld/literal_pointers.c      Mon Aug 25 22:11:47 2003
 @@ -149,8 +149,8 @@
@@ -1349,7 +1353,7 @@ diff -ubr ld/literal_pointers.c ld/literal_pointers.c
                 * together and can only be slid keeping all sections
                 * relative to each other the same.
                 */
-diff -ubr ld/m88k_reloc.c ld/m88k_reloc.c
+diff -rub ld/m88k_reloc.c ld/m88k_reloc.c
 --- ld/m88k_reloc.c    Tue Jan 14 23:35:25 2003
 +++ ld/m88k_reloc.c    Mon Aug 25 22:11:47 2003
 @@ -373,13 +373,13 @@
@@ -1397,9 +1401,9 @@ diff -ubr ld/m88k_reloc.c ld/m88k_reloc.c
                             (merged_symbol->nlist.n_type & N_PEXT) == N_PEXT)){
                        reloc->r_extern = 0;
                        /*
-Only in ld: make.h
-Only in ld: makeUser.c
-diff -ubr ld/mod_sections.c ld/mod_sections.c
+Only in ld/: make.h
+Only in ld/: makeUser.c
+diff -rub ld/mod_sections.c ld/mod_sections.c
 --- ld/mod_sections.c  Tue Jan 14 23:35:25 2003
 +++ ld/mod_sections.c  Mon Aug 25 22:11:47 2003
 @@ -56,8 +56,8 @@
@@ -1413,7 +1417,7 @@ diff -ubr ld/mod_sections.c ld/mod_sections.c
  #endif /* !defined(RLD) */
  
  /*
-diff -ubr ld/mod_sections.h ld/mod_sections.h
+diff -rub ld/mod_sections.h ld/mod_sections.h
 --- ld/mod_sections.h  Tue Apr 30 00:37:20 2002
 +++ ld/mod_sections.h  Mon Aug 25 12:12:29 2003
 @@ -28,6 +28,8 @@
@@ -1425,7 +1429,7 @@ diff -ubr ld/mod_sections.h ld/mod_sections.h
  
  __private_extern__ void mod_section_merge(
      void *data, 
-diff -ubr ld/notes ld/notes
+diff -rub ld/notes ld/notes
 --- ld/notes   Tue Jan 14 23:35:25 2003
 +++ ld/notes   Mon Aug 25 12:12:29 2003
 @@ -23,6 +23,420 @@
@@ -1849,7 +1853,7 @@ diff -ubr ld/notes ld/notes
  Changes for the 5.11 release (the cctools-440 release):
  - Fixed the warnings about extra tokens at end of #endif directive in
    4byte_literals.c, 8byte_literals.c, coalesced_sections.c, cstring_literals.c,
-diff -ubr ld/objects.c ld/objects.c
+diff -rub ld/objects.c ld/objects.c
 --- ld/objects.c       Tue Jan 14 23:35:25 2003
 +++ ld/objects.c       Mon Aug 25 22:11:47 2003
 @@ -110,7 +110,7 @@
@@ -1887,7 +1891,9 @@ diff -ubr ld/objects.c ld/objects.c
            merged_symbol = (struct merged_symbol *)fine_reloc->output_offset;
            if((merged_symbol->nlist.n_type & N_TYPE) == N_INDR)
                merged_symbol = (struct merged_symbol *)
-diff -ubr ld/pass1.c ld/pass1.c
+Only in ld/: optimized_obj
+Only in ld/: otmp_obj
+diff -rub ld/pass1.c ld/pass1.c
 --- ld/pass1.c Tue Jan 14 23:35:25 2003
 +++ ld/pass1.c Mon Aug 25 22:11:47 2003
 @@ -71,6 +71,9 @@
@@ -2409,7 +2415,7 @@ diff -ubr ld/pass1.c ld/pass1.c
            return;
        }
        /*
-diff -ubr ld/pass1.h ld/pass1.h
+diff -rub ld/pass1.h ld/pass1.h
 --- ld/pass1.h Tue Jan 14 23:35:25 2003
 +++ ld/pass1.h Mon Aug 25 12:12:29 2003
 @@ -33,6 +33,9 @@
@@ -2445,7 +2451,7 @@ diff -ubr ld/pass1.h ld/pass1.h
  __private_extern__ void check_fat(
      char *file_name,
      unsigned long file_size,
-diff -ubr ld/pass2.c ld/pass2.c
+diff -rub ld/pass2.c ld/pass2.c
 --- ld/pass2.c Tue Jan 14 23:35:25 2003
 +++ ld/pass2.c Mon Aug 25 22:11:47 2003
 @@ -336,7 +336,7 @@
@@ -2477,7 +2483,7 @@ diff -ubr ld/pass2.c ld/pass2.c
                system_fatal("can't write to output file");
            if((r = vm_deallocate(mach_task_self(), (vm_address_t)(output_addr +
                                  write_offset), write_size)) != KERN_SUCCESS)
-diff -ubr ld/ppc_reloc.c ld/ppc_reloc.c
+diff -rub ld/ppc_reloc.c ld/ppc_reloc.c
 --- ld/ppc_reloc.c     Tue Jan 14 23:35:25 2003
 +++ ld/ppc_reloc.c     Mon Aug 25 22:11:47 2003
 @@ -242,6 +242,7 @@
@@ -2695,7 +2701,9 @@ diff -ubr ld/ppc_reloc.c ld/ppc_reloc.c
                               r_type == PPC_RELOC_HA16_SECTDIFF)
                                spair_reloc->r_address = other_half;
                        }
-diff -ubr ld/rld.c ld/rld.c
+Only in ld/: profile_obj
+Only in ld/: ptmp_obj
+diff -rub ld/rld.c ld/rld.c
 --- ld/rld.c   Tue Jan 14 23:35:25 2003
 +++ ld/rld.c   Mon Aug 25 22:11:47 2003
 @@ -56,11 +56,13 @@
@@ -2948,7 +2956,8 @@ diff -ubr ld/rld.c ld/rld.c
  }
  #endif /* !defined(SA_RLD) && !defined(KLD) */
  
-diff -ubr ld/sections.c ld/sections.c
+Only in ld/: sarld_dir
+diff -rub ld/sections.c ld/sections.c
 --- ld/sections.c      Tue Jan 14 23:35:25 2003
 +++ ld/sections.c      Mon Aug 25 22:11:47 2003
 @@ -324,6 +324,13 @@
@@ -3045,7 +3054,7 @@ diff -ubr ld/sections.c ld/sections.c
                 */
                if(r_extern){
                    reloc->r_address += addr_adjust;
-diff -ubr ld/sets.c ld/sets.c
+diff -rub ld/sets.c ld/sets.c
 --- ld/sets.c  Tue Jan 14 23:35:25 2003
 +++ ld/sets.c  Mon Aug 25 22:11:47 2003
 @@ -134,7 +134,7 @@
@@ -3057,7 +3066,8 @@ diff -ubr ld/sets.c ld/sets.c
      kern_return_t r;
      char *file_addr, *file_name;
      long file_size;
-diff -ubr ld/sparc_reloc.c ld/sparc_reloc.c
+Only in ld/: shlib_obj
+diff -rub ld/sparc_reloc.c ld/sparc_reloc.c
 --- ld/sparc_reloc.c   Tue Jan 14 23:35:25 2003
 +++ ld/sparc_reloc.c   Mon Aug 25 22:11:47 2003
 @@ -385,13 +385,13 @@
@@ -3105,7 +3115,8 @@ diff -ubr ld/sparc_reloc.c ld/sparc_reloc.c
                             (merged_symbol->nlist.n_type & N_PEXT) == N_PEXT)){
                        reloc->r_extern = 0;
                        /*
-diff -ubr ld/symbols.c ld/symbols.c
+Only in ld/: static_kld
+diff -rub ld/symbols.c ld/symbols.c
 --- ld/symbols.c       Tue Jan 14 23:35:25 2003
 +++ ld/symbols.c       Mon Aug 25 22:11:47 2003
 @@ -47,6 +47,9 @@
@@ -4261,7 +4272,7 @@ diff -ubr ld/symbols.c ld/symbols.c
            }
        }
        if(host_byte_sex != target_byte_sex){
-diff -ubr ld/symbols.h ld/symbols.h
+diff -rub ld/symbols.h ld/symbols.h
 --- ld/symbols.h       Tue Jan 14 23:35:25 2003
 +++ ld/symbols.h       Mon Aug 25 12:12:29 2003
 @@ -78,7 +78,8 @@