Wed Jan 31 14:03:17 1996 Richard Henderson <rth@tamu.edu>
authorIan Lance Taylor <ian@airs.com>
Wed, 31 Jan 1996 19:06:17 +0000 (19:06 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 31 Jan 1996 19:06:17 +0000 (19:06 +0000)
* configure.in (m68*-apple-aux*): New target.
* config/te-aux.h: New file.
* config/obj-coff.c (compare_external_relocs): New static function
if TE_AUX.
(do_relocs_for): Sort relocs if TE_AUX.
(fixup_segment): If TE_AUX, store common symbol value in segment.
* config/tc-m68k.h (TARGET_FORMAT): Define if TE_AUX.

gas/ChangeLog
gas/config/.Sanitize
gas/config/obj-coff.c
gas/config/te-aux.h [new file with mode: 0644]
gas/configure
gas/configure.in

index 4029a67107d56a701e0f38257e5eb675a164970e..b51be41b8ed8eba4fa4de39dde64a80aa44109ab 100644 (file)
@@ -1,3 +1,13 @@
+Wed Jan 31 14:03:17 1996  Richard Henderson  <rth@tamu.edu>
+
+       * configure.in (m68*-apple-aux*): New target.
+       * config/te-aux.h: New file.
+       * config/obj-coff.c (compare_external_relocs): New static function
+       if TE_AUX.
+       (do_relocs_for): Sort relocs if TE_AUX.
+       (fixup_segment): If TE_AUX, store common symbol value in segment.
+       * config/tc-m68k.h (TARGET_FORMAT): Define if TE_AUX.
+
 Wed Jan 31 12:24:58 1996  Ian Lance Taylor  <ian@cygnus.com>
 
        * config/tc-mips.c (s_mips_globl): Set BSF_OBJECT if it is not
index f7038cbc8f315e17231bb51e55b25db8f7698b35..e25270ded6d94a46fd7a7dbfcd74ba0af85ee32f 100644 (file)
@@ -126,6 +126,7 @@ tc-w65.h
 tc-z8k.c
 tc-z8k.h
 te-386bsd.h
+te-aux.h
 te-delta.h
 te-delt88.h
 te-dpx2.h
index cb36264033c3d187de7acc675b79129a2a998058..04b8ad9043212d60edbf66da68f486d94c0d787f 100644 (file)
@@ -1,5 +1,5 @@
 /* coff object file format
-   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994
+   Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 1996
    Free Software Foundation, Inc.
 
    This file is part of GAS.
@@ -1594,6 +1594,25 @@ count_entries_in_chain (idx)
   return nrelocs;
 }
 
+#ifdef TE_AUX
+
+static int compare_external_relocs PARAMS ((const PTR, const PTR));
+
+/* AUX's ld expects relocations to be sorted */
+static int
+compare_external_relocs (x, y)
+     const PTR x;
+     const PTR y;
+{
+  struct external_reloc *a = (struct external_reloc *) x;
+  struct external_reloc *b = (struct external_reloc *) y;
+  bfd_vma aadr = bfd_getb32 (a->r_vaddr);
+  bfd_vma badr = bfd_getb32 (b->r_vaddr);
+  return (aadr < badr ? -1 : badr < aadr ? 1 : 0);
+}
+
+#endif
+
 /* output all the relocations for a section */
 void
 do_relocs_for (abfd, h, file_cursor)
@@ -1653,6 +1672,10 @@ do_relocs_for (abfd, h, file_cursor)
                      intr.r_offset = 0;
 #endif
 
+                     while (S_GET_SEGMENT (symbol_ptr) == undefined_section
+                            && symbol_ptr->sy_value.X_op == O_symbol)
+                       symbol_ptr = symbol_ptr->sy_value.X_add_symbol;
+
                      /* Turn the segment of the symbol into an offset.  */
                      if (symbol_ptr)
                        {
@@ -1697,6 +1720,12 @@ do_relocs_for (abfd, h, file_cursor)
                  fix_ptr = fix_ptr->fx_next;
                }
 
+#ifdef TE_AUX
+             /* Sort the reloc table */
+             qsort ((PTR) external_reloc_vec, nrelocs,
+                    sizeof (struct external_reloc), compare_external_relocs);
+#endif
+
              /* Write out the reloc table */
              bfd_write ((PTR) external_reloc_vec, 1, external_reloc_size,
                         abfd);
@@ -3053,7 +3082,7 @@ write_object_file ()
 
       /* I think the section alignment is only used on the i960; the
         i960 needs it, and it should do no harm on other targets.  */
-      segment_info[i].scnhdr.s_align = section_alignment[i];
+      segment_info[i].scnhdr.s_align = 1 << section_alignment[i];
 
       if (i == SEG_E0)
        H_SET_TEXT_SIZE (&headers, size);
@@ -3882,7 +3911,7 @@ fixup_segment (segP, this_segment_type)
                      continue;
                    }           /* COBR */
 #endif /* TC_I960 */
-#if (defined (TC_I386) || defined (TE_LYNX)) && !defined(TE_PE)
+#if (defined (TC_I386) || defined (TE_LYNX) || defined (TE_AUX)) && !defined(TE_PE)
                  /* 386 COFF uses a peculiar format in which the
                     value of a common symbol is stored in the .text
                     segment (I've checked this on SVR3.2 and SCO
diff --git a/gas/config/te-aux.h b/gas/config/te-aux.h
new file mode 100644 (file)
index 0000000..b2d7759
--- /dev/null
@@ -0,0 +1,17 @@
+#define TE_AUX
+
+/* From obj-coff.h:
+   This internal_lineno crap is to stop namespace pollution from the
+   bfd internal coff headerfile. */
+#define internal_lineno bfd_internal_lineno
+#include "coff/aux.h"  /* override bits in coff/internal.h */
+#undef internal_lineno
+
+#define COFF_NOLOAD_PROBLEM
+#define KEEP_RELOC_INFO
+
+#include "obj-format.h"
+
+#ifndef LOCAL_LABELS_FB
+#define LOCAL_LABELS_FB 1
+#endif
index 34cb0dae2ef6ae66a0762e778b4f3f2933580bfc..8737f60b97ac05609de23d8f4b5ecc758a885751 100755 (executable)
@@ -818,6 +818,7 @@ for this_target in $target $canon_targets ; do
                             em=lynx ;;
       i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
                            fmt=elf ;;
+      i386-*-sco*elf*)      fmt=elf targ=sco5 ;;
       i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
                            fmt=coff targ=i386coff ;;
       i386-*-vsta)          fmt=aout ;;
@@ -851,6 +852,7 @@ for this_target in $target $canon_targets ; do
       m68k-*-lynxos*)       fmt=coff targ=m68kcoff
                             em=lynx ;;
       m68k-*-netbsd*)       fmt=aout em=nbsd bfd_gas=yes ;;
+      m68*-apple-aux*)      fmt=coff targ=m68kcoff em=aux ;;
 
       m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
       m88k-*-coff*)         fmt=coff targ=m88kcoff ;;
@@ -1439,7 +1441,7 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1443 "configure"
+#line 1445 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
@@ -1453,7 +1455,7 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1457 "configure"
+#line 1459 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
@@ -1486,7 +1488,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1490 "configure"
+#line 1492 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
@@ -1538,7 +1540,7 @@ else
   ac_cv_c_cross=yes
 else
 cat > conftest.$ac_ext <<EOF
-#line 1542 "configure"
+#line 1544 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
@@ -1562,7 +1564,7 @@ if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1566 "configure"
+#line 1568 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() { return 0; }
@@ -1594,7 +1596,7 @@ if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1598 "configure"
+#line 1600 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1653,7 +1655,7 @@ if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1657 "configure"
+#line 1659 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1682,7 +1684,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1686 "configure"
+#line 1688 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1736,7 +1738,7 @@ else
   ac_cv_c_stack_direction=0
 else
 cat > conftest.$ac_ext <<EOF
-#line 1740 "configure"
+#line 1742 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1779,7 +1781,7 @@ else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 1783 "configure"
+#line 1785 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1819,7 +1821,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1823 "configure"
+#line 1825 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1872,7 +1874,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1876 "configure"
+#line 1878 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1925,7 +1927,7 @@ if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1929 "configure"
+#line 1931 "configure"
 #include "confdefs.h"
 #include <assert.h>
 #include <stdio.h>
@@ -1982,7 +1984,7 @@ if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1986 "configure"
+#line 1988 "configure"
 #include "confdefs.h"
 $gas_test_headers
 int main() { return 0; }
@@ -2018,7 +2020,7 @@ if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2022 "configure"
+#line 2024 "configure"
 #include "confdefs.h"
 $gas_test_headers
 int main() { return 0; }
@@ -2057,7 +2059,7 @@ if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2061 "configure"
+#line 2063 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_ERRNO_H
index 4eb2c5539881f61215728c70334fa5401ff79339..d09706620eb86e06b9ef7a62d310f3dbf6e6c498 100644 (file)
@@ -172,6 +172,7 @@ changequote([,])dnl
                             em=lynx ;;
       i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
                            fmt=elf ;;
+      i386-*-sco*elf*)      fmt=elf targ=sco5 ;;
       i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
                            fmt=coff targ=i386coff ;;
       i386-*-vsta)          fmt=aout ;;
@@ -205,6 +206,7 @@ changequote([,])dnl
       m68k-*-lynxos*)       fmt=coff targ=m68kcoff
                             em=lynx ;;
       m68k-*-netbsd*)       fmt=aout em=nbsd bfd_gas=yes ;;
+      m68*-apple-aux*)      fmt=coff targ=m68kcoff em=aux ;;
 
       m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
       m88k-*-coff*)         fmt=coff targ=m88kcoff ;;
This page took 0.049342 seconds and 4 git commands to generate.