Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/binutils Resolve conflicts.



details:   https://anonhg.NetBSD.org/src/rev/2cc6e5808b0f
branches:  trunk
changeset: 587739:2cc6e5808b0f
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Feb 02 22:03:55 2006 +0000

description:
Resolve conflicts.

diffstat:

 gnu/dist/binutils/gas/config/tc-arm.h                          |    21 +-
 gnu/dist/binutils/gas/config/tc-hppa.c                         |   135 +-
 gnu/dist/binutils/gas/config/tc-hppa.h                         |    14 +-
 gnu/dist/binutils/gas/config/tc-i386.c                         |   890 +-
 gnu/dist/binutils/gas/config/tc-mips.c                         |  4246 ++--
 gnu/dist/binutils/gas/config/tc-ns32k.c                        |     5 +-
 gnu/dist/binutils/gas/config/tc-vax.c                          |    16 +-
 gnu/dist/binutils/gas/config/te-ppcnw.h                        |    32 -
 gnu/dist/binutils/gas/config/vax-inst.h                        |     2 +-
 gnu/dist/binutils/gas/doc/Makefile.am                          |    14 +-
 gnu/dist/binutils/gas/doc/Makefile.in                          |    69 +-
 gnu/dist/binutils/gas/doc/as.info                              |   490 +
 gnu/dist/binutils/gas/doc/as.info-1                            |  8426 ++++++++++
 gnu/dist/binutils/gas/doc/as.info-2                            |  7239 ++++++++
 gnu/dist/binutils/gas/doc/as.info-3                            |   Bin 
 gnu/dist/binutils/gas/po/.cvsignore                            |     1 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10allinsn.d        |   492 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10allinsn.s        |   641 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10hazard3.s        |    14 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10hazard4.s        |    11 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10hazard5.s        |    11 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10load-hazards.exp |    62 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10nohazard.s       |    20 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10noyield.s        |    14 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test0.d          |   361 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test0.s          |   354 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test1.d          |   317 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test1.s          |   310 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test10.d         |   301 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test10.s         |   294 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test11.d         |   225 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test11.s         |   218 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test12.d         |   221 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test12.s         |   214 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test2.d          |   319 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test2.s          |   312 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test3.d          |   313 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test3.s          |   306 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test4.d          |   315 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test4.s          |   308 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test5.d          |   315 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test5.s          |   308 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test6.d          |   315 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test6.s          |   308 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test7.d          |   301 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test7.s          |   294 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test8.d          |   327 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test8.s          |   286 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test9.d          |   291 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10test9.s          |   284 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/q10yield.exp        |    39 -
 gnu/dist/binutils/gas/testsuite/gas/iq2000/test.exp            |    17 -
 gnu/dist/binutils/gas/testsuite/gas/mips/elempic.d             |   154 -
 gnu/dist/binutils/gas/testsuite/gas/mips/empic.d               |   154 -
 gnu/dist/binutils/gas/testsuite/gas/mips/empic.l               |     3 -
 gnu/dist/binutils/gas/testsuite/gas/mips/empic.s               |   119 -
 gnu/dist/binutils/gas/testsuite/gas/mips/empic2.d              |   279 -
 gnu/dist/binutils/gas/testsuite/gas/mips/empic2.s              |   100 -
 gnu/dist/binutils/gas/testsuite/gas/mips/empic3_e.d            |    47 -
 gnu/dist/binutils/gas/testsuite/gas/mips/empic3_e.s            |    46 -
 gnu/dist/binutils/gas/testsuite/gas/mips/empic3_g1.d           |    47 -
 gnu/dist/binutils/gas/testsuite/gas/mips/empic3_g1.s           |    46 -
 gnu/dist/binutils/gas/testsuite/gas/mips/empic3_g2.d           |    47 -
 gnu/dist/binutils/gas/testsuite/gas/mips/empic3_g2.s           |    46 -
 gnu/dist/binutils/gas/testsuite/gas/mips/jal-empic-elf-2.d     |    48 -
 gnu/dist/binutils/gas/testsuite/gas/mips/jal-empic-elf-2.s     |    28 -
 gnu/dist/binutils/gas/testsuite/gas/mips/jal-empic-elf-3.d     |    24 -
 gnu/dist/binutils/gas/testsuite/gas/mips/jal-empic-elf-3.s     |    20 -
 gnu/dist/binutils/gas/testsuite/gas/mips/jal-empic-elf.d       |    26 -
 gnu/dist/binutils/gas/testsuite/gas/mips/jal-empic.d           |    26 -
 gnu/dist/binutils/gas/testsuite/gas/mips/la-empic.d            |   105 -
 gnu/dist/binutils/gas/testsuite/gas/mips/la-empic.s            |    57 -
 gnu/dist/binutils/gas/testsuite/gas/mips/lb-empic.d            |   102 -
 gnu/dist/binutils/gas/testsuite/gas/mips/ld-empic.d            |   186 -
 gnu/dist/binutils/gas/testsuite/gas/mips/ldstla-n32-shared.d   |   154 -
 gnu/dist/binutils/gas/testsuite/gas/mips/ldstla-n32.d          |   154 -
 gnu/dist/binutils/gas/testsuite/gas/mips/ldstla-n32.s          |    35 -
 gnu/dist/binutils/gas/testsuite/gas/mips/lif-empic.d           |    24 -
 gnu/dist/binutils/gas/testsuite/gas/mips/rol-hw.l              |     2 -
 gnu/dist/binutils/gas/testsuite/gas/mips/rol.l                 |    13 -
 gnu/dist/binutils/gas/testsuite/gas/mips/rol64-hw.l            |     2 -
 gnu/dist/binutils/gas/testsuite/gas/mips/rol64.l               |    27 -
 gnu/dist/binutils/gas/testsuite/gas/mips/telempic.d            |   155 -
 gnu/dist/binutils/gas/testsuite/gas/mips/tempic.d              |   155 -
 gnu/dist/binutils/gas/testsuite/gas/mips/uld2.l                |     3 -
 gnu/dist/binutils/gas/testsuite/gas/mips/ulh-empic.d           |    91 -
 gnu/dist/binutils/gas/testsuite/gas/mips/ulh2.l                |     9 -
 gnu/dist/binutils/gas/testsuite/gas/mips/ulw2.l                |     3 -
 gnu/dist/binutils/gas/testsuite/gas/mips/vr4122.d              |    68 -
 gnu/dist/binutils/gas/testsuite/gas/mips/vr4122.s              |    65 -
 gnu/dist/binutils/gas/testsuite/gas/vtable/entry0.d            |    10 -
 gnu/dist/binutils/gas/testsuite/gas/vtable/entry0.s            |     2 -
 gnu/dist/binutils/gas/testsuite/gas/vtable/entry1.d            |    10 -
 gnu/dist/binutils/gas/testsuite/gas/vtable/entry1.s            |     2 -
 gnu/dist/binutils/gas/testsuite/gas/vtable/inherit0.d          |    10 -
 gnu/dist/binutils/gas/testsuite/gas/vtable/inherit0.s          |    13 -
 gnu/dist/binutils/gas/testsuite/gas/vtable/inherit1.l          |     6 -
 gnu/dist/binutils/gas/testsuite/gas/vtable/inherit1.s          |     1 -
 gnu/dist/binutils/gas/testsuite/gas/vtable/vtable.exp          |    59 -
 gnu/dist/binutils/gprof/corefile.c                             |   113 +-
 gnu/dist/binutils/gprof/gprof.c                                |   159 +-
 gnu/dist/binutils/gprof/po/.cvsignore                          |     1 -
 gnu/dist/binutils/include/mpw/ChangeLog                        |    61 -
 gnu/dist/binutils/include/mpw/README                           |     1 -
 gnu/dist/binutils/include/mpw/dir.h                            |    23 -
 gnu/dist/binutils/include/mpw/dirent.h                         |    31 -
 gnu/dist/binutils/include/mpw/fcntl.h                          |   124 -
 gnu/dist/binutils/include/mpw/grp.h                            |    10 -
 gnu/dist/binutils/include/mpw/mpw.h                            |   130 -
 gnu/dist/binutils/include/mpw/pwd.h                            |    15 -
 gnu/dist/binutils/include/mpw/spin.h                           |    64 -
 gnu/dist/binutils/include/mpw/stat.h                           |    75 -
 gnu/dist/binutils/include/mpw/sys/file.h                       |     1 -
 gnu/dist/binutils/include/mpw/sys/param.h                      |     1 -
 gnu/dist/binutils/include/mpw/sys/resource.h                   |     9 -
 gnu/dist/binutils/include/mpw/sys/stat.h                       |    44 -
 gnu/dist/binutils/include/mpw/sys/time.h                       |    13 -
 gnu/dist/binutils/include/mpw/sys/types.h                      |    15 -
 gnu/dist/binutils/include/mpw/utime.h                          |     7 -
 gnu/dist/binutils/include/mpw/varargs.h                        |     9 -
 gnu/dist/binutils/ld/Makefile.am                               |   154 +-
 gnu/dist/binutils/ld/Makefile.in                               |   171 +-
 gnu/dist/binutils/ld/configdoc.texi                            |    20 +
 gnu/dist/binutils/ld/configure.host                            |    42 +-
 gnu/dist/binutils/ld/configure.tgt                             |    30 +-
 gnu/dist/binutils/ld/emulparams/armelf_nbsd.sh                 |     1 +
 gnu/dist/binutils/ld/emulparams/armelf_oabi.sh                 |    23 -
 gnu/dist/binutils/ld/emulparams/elf_i386.sh                    |     1 +
 gnu/dist/binutils/ld/emulparams/hppalinux.sh                   |     1 +
 gnu/dist/binutils/ld/emultempl/armelf_oabi.em                  |   176 -
 gnu/dist/binutils/ld/emultempl/elf32.em                        |   807 +-
 gnu/dist/binutils/ld/emultempl/hppaelf.em                      |    18 +-
 gnu/dist/binutils/ld/emultempl/mipself.em                      |   177 -
 gnu/dist/binutils/ld/ldemul.h                                  |     6 +-
 gnu/dist/binutils/ld/ldlex.c                                   |  2417 +-
 gnu/dist/binutils/ld/lexsup.c                                  |   491 +-
 gnu/dist/binutils/ld/mac-ld.r                                  |    42 -
 gnu/dist/binutils/ld/mpw-config.in                             |    52 -
 gnu/dist/binutils/ld/mpw-make.sed                              |    95 -
 gnu/dist/binutils/ld/po/.cvsignore                             |     1 -
 gnu/dist/binutils/ld/scripttempl/i386lynx.sc                   |    46 -
 gnu/dist/binutils/ld/testsuite/ld-empic/empic.exp              |   263 -
 gnu/dist/binutils/ld/testsuite/ld-empic/relax.t                |    49 -
 gnu/dist/binutils/ld/testsuite/ld-empic/relax1.c               |    22 -
 gnu/dist/binutils/ld/testsuite/ld-empic/relax2.c               |    19 -
 gnu/dist/binutils/ld/testsuite/ld-empic/relax3.c               |     3 -
 gnu/dist/binutils/ld/testsuite/ld-empic/relax4.c               |     3 -
 gnu/dist/binutils/ld/testsuite/ld-empic/run.c                  |   160 -
 gnu/dist/binutils/ld/testsuite/ld-empic/runtest1.c             |   117 -
 gnu/dist/binutils/ld/testsuite/ld-empic/runtest2.c             |    26 -
 gnu/dist/binutils/ld/testsuite/ld-empic/runtesti.s             |    94 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic1-ln.d         |    27 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic1-lp.d         |    26 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic1-mn.d         |    25 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic1-mp.d         |    25 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic1-ref.s        |     9 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic1-sn.d         |    23 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic1-sp.d         |    23 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic1-space.s      |     5 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic1-tgt.s        |     8 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic2-fwd-0.d      |    20 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic2-fwd-1.d      |    21 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic2-fwd-tgt.s    |     7 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic2-ref.s        |     7 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic2-rev-0.d      |    22 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic2-rev-1.d      |    24 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic2-rev-tgt.s    |     8 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/empic2-space.s      |     5 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/emrelocs-eb.d       |    25 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/emrelocs-el.d       |    25 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/emrelocs.ld         |    16 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/emrelocs1.s         |    23 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/emrelocs2.s         |    30 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/reloc-3-r.d         |    83 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/reloc-3-srec.d      |    54 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/reloc-3.ld          |     8 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/reloc-3a.s          |    38 -
 gnu/dist/binutils/ld/testsuite/ld-mips-elf/reloc-3b.s          |    58 -
 gnu/dist/binutils/libiberty/acconfig.h                         |     3 -
 gnu/dist/binutils/libiberty/mpw-config.in                      |     7 -
 gnu/dist/binutils/libiberty/mpw-make.sed                       |    51 -
 gnu/dist/binutils/libiberty/mpw.c                              |  1010 -
 gnu/dist/binutils/libiberty/pex-mpw.c                          |   161 -
 gnu/dist/binutils/opcodes/mpw-config.in                        |    27 -
 gnu/dist/binutils/opcodes/mpw-make.sed                         |    25 -
 gnu/dist/binutils/opcodes/po/.cvsignore                        |     1 -
 gnu/dist/binutils/opcodes/sh-opc.h                             |   733 +-
 187 files changed, 21837 insertions(+), 20680 deletions(-)

diffs (truncated from 50093 to 300 lines):

diff -r 58c1f41e3b09 -r 2cc6e5808b0f gnu/dist/binutils/gas/config/tc-arm.h
--- a/gnu/dist/binutils/gas/config/tc-arm.h     Thu Feb 02 22:03:54 2006 +0000
+++ b/gnu/dist/binutils/gas/config/tc-arm.h     Thu Feb 02 22:03:55 2006 +0000
@@ -1,6 +1,6 @@
 /* This file is tc-arm.h
-   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004
-   Free Software Foundation, Inc.
+   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+   2004 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe%pegasus.esprit.ec.org@localhost)
        Modified by David Taylor (dtaylor%armltd.co.uk@localhost)
 
@@ -167,6 +167,7 @@
 # define DWARF2_LINE_MIN_INSN_LENGTH   2
 # define obj_frob_symbol(sym, punt)    armelf_frob_symbol ((sym), & (punt))
 # define md_elf_section_change_hook()  arm_elf_change_section ()
+# define md_elf_section_type(str, len) arm_elf_section_type (str, len)
 # define GLOBAL_OFFSET_TABLE_NAME      "_GLOBAL_OFFSET_TABLE_"
 # define LOCAL_LABEL_PREFIX            '.'
 # define TC_SEGMENT_INFO_TYPE          enum mstate
@@ -179,6 +180,19 @@
   MAP_THUMB
 };
 
+/* We want .cfi_* pseudo-ops for generating unwind info.  */
+#define TARGET_USE_CFIPOP              1
+
+/* The lr register is r14.  */
+#define DWARF2_DEFAULT_RETURN_COLUMN  14
+
+/* Registers are generally saved at negative offsets to the CFA.  */
+#define DWARF2_CIE_DATA_ALIGNMENT     -4
+
+/* CFI hooks.  */
+#define tc_regname_to_dw2regnum            tc_arm_regname_to_dw2regnum
+#define tc_cfi_frame_initial_instructions  tc_arm_frame_initial_instructions
+
 #else /* Not OBJ_ELF.  */
 #define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_"
 #endif
@@ -209,3 +223,6 @@
 extern void arm_init_frag (struct frag *);
 extern void arm_handle_align (struct frag *);
 extern bfd_boolean arm_fix_adjustable (struct fix *);
+extern int arm_elf_section_type (const char *, size_t);
+extern int tc_arm_regname_to_dw2regnum (const char *regname);
+extern void tc_arm_frame_initial_instructions (void);
diff -r 58c1f41e3b09 -r 2cc6e5808b0f gnu/dist/binutils/gas/config/tc-hppa.c
--- a/gnu/dist/binutils/gas/config/tc-hppa.c    Thu Feb 02 22:03:54 2006 +0000
+++ b/gnu/dist/binutils/gas/config/tc-hppa.c    Thu Feb 02 22:03:55 2006 +0000
@@ -1,6 +1,6 @@
 /* tc-hppa.c -- Assemble for the PA
    Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003 Free Software Foundation, Inc.
+   2002, 2003, 2004 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -363,6 +363,9 @@
     /* Nonzero if this subspace contains only code.  */
     char code_only;
 
+    /* Nonzero if this is a comdat subspace.  */
+    char comdat;
+
     /* Nonzero if this is a common subspace.  */
     char common;
 
@@ -544,7 +547,7 @@
 static int pa_parse_number PARAMS ((char **, int));
 static label_symbol_struct *pa_get_label PARAMS ((void));
 #ifdef OBJ_SOM
-static int log2 PARAMS ((int));
+static int exact_log2 PARAMS ((int));
 static void pa_compiler PARAMS ((int));
 static void pa_align PARAMS ((int));
 static void pa_space PARAMS ((int));
@@ -555,13 +558,13 @@
                                                  asection *, int));
 static ssd_chain_struct *create_new_subspace PARAMS ((sd_chain_struct *,
                                                      char *, int, int,
-                                                     int, int, int,
+                                                     int, int, int, int,
                                                      int, int, int, int,
                                                      int, asection *));
 static ssd_chain_struct *update_subspace PARAMS ((sd_chain_struct *,
                                                  char *, int, int, int,
                                                  int, int, int, int,
-                                                 int, int, int,
+                                                 int, int, int, int,
                                                  asection *));
 static sd_chain_struct *is_defined_space PARAMS ((char *));
 static ssd_chain_struct *is_defined_subspace PARAMS ((char *));
@@ -571,7 +574,6 @@
 static sd_chain_struct *pa_find_space_by_number PARAMS ((int));
 static unsigned int pa_subspace_start PARAMS ((sd_chain_struct *, int));
 static sd_chain_struct *pa_parse_space_stmt PARAMS ((char *, int));
-static int pa_next_subseg PARAMS ((sd_chain_struct *));
 static void pa_spaces_begin PARAMS ((void));
 #endif
 static void pa_ip PARAMS ((char *));
@@ -1117,12 +1119,12 @@
 
 static struct default_subspace_dict pa_def_subspaces[] =
 {
-  {"$CODE$", 1, 1, 1, 0, 0, 0, 24, 0x2c, 0, 8, 0, 0, SUBSEG_CODE},
-  {"$DATA$", 1, 1, 0, 0, 0, 0, 24, 0x1f, 1, 8, 1, 1, SUBSEG_DATA},
-  {"$LIT$", 1, 1, 0, 0, 0, 0, 16, 0x2c, 0, 8, 0, 0, SUBSEG_LIT},
-  {"$MILLICODE$", 1, 1, 0, 0, 0, 0, 8, 0x2c, 0, 8, 0, 0, SUBSEG_MILLI},
-  {"$BSS$", 1, 1, 0, 0, 0, 1, 80, 0x1f, 1, 8, 1, 1, SUBSEG_BSS},
-  {NULL, 0, 1, 0, 0, 0, 0, 255, 0x1f, 0, 4, 0, 0, 0}
+  {"$CODE$", 1, 1, 1, 0, 0, 0, 0, 24, 0x2c, 0, 8, 0, 0, SUBSEG_CODE},
+  {"$DATA$", 1, 1, 0, 0, 0, 0, 0, 24, 0x1f, 1, 8, 1, 1, SUBSEG_DATA},
+  {"$LIT$", 1, 1, 0, 0, 0, 0, 0, 16, 0x2c, 0, 8, 0, 0, SUBSEG_LIT},
+  {"$MILLICODE$", 1, 1, 0, 0, 0, 0, 0, 8, 0x2c, 0, 8, 0, 0, SUBSEG_MILLI},
+  {"$BSS$", 1, 1, 0, 0, 0, 0, 1, 80, 0x1f, 1, 8, 1, 1, SUBSEG_BSS},
+  {NULL, 0, 1, 0, 0, 0, 0, 0, 255, 0x1f, 0, 4, 0, 0, 0}
 };
 
 static struct default_space_dict pa_def_spaces[] =
@@ -5925,8 +5927,8 @@
 
   /* If bytes is a power of 2, then update the current subspace's
      alignment if necessary.  */
-  if (log2 (bytes) != -1)
-    record_alignment (current_subspace->ssd_seg, log2 (bytes));
+  if (exact_log2 (bytes) != -1)
+    record_alignment (current_subspace->ssd_seg, exact_log2 (bytes));
 }
 #endif
 
@@ -7147,7 +7149,7 @@
    return log2 (VALUE).  Else return -1.  */
 
 static int
-log2 (value)
+exact_log2 (value)
      int value;
 {
   int shift = 0;
@@ -7454,7 +7456,7 @@
      int create_new;
 {
   char *name, *ss_name, c;
-  char loadable, code_only, common, dup_common, zero, sort;
+  char loadable, code_only, comdat, common, dup_common, zero, sort;
   int i, access, space_index, alignment, quadrant, applicable, flags;
   sd_chain_struct *space;
   ssd_chain_struct *ssd;
@@ -7480,6 +7482,7 @@
       sort = 0;
       access = 0x7f;
       loadable = 1;
+      comdat = 0;
       common = 0;
       dup_common = 0;
       code_only = 0;
@@ -7514,6 +7517,7 @@
              if (strcasecmp (pa_def_subspaces[i].name, ss_name) == 0)
                {
                  loadable = pa_def_subspaces[i].loadable;
+                 comdat = pa_def_subspaces[i].comdat;
                  common = pa_def_subspaces[i].common;
                  dup_common = pa_def_subspaces[i].dup_common;
                  code_only = pa_def_subspaces[i].code_only;
@@ -7549,7 +7553,7 @@
                  *input_line_pointer = c;
                  input_line_pointer++;
                  alignment = get_absolute_expression ();
-                 if (log2 (alignment) == -1)
+                 if (exact_log2 (alignment) == -1)
                    {
                      as_bad (_("Alignment must be a power of 2"));
                      alignment = 1;
@@ -7577,6 +7581,11 @@
                  *input_line_pointer = c;
                  loadable = 0;
                }
+             else if ((strncasecmp (name, "comdat", 6) == 0))
+               {
+                 *input_line_pointer = c;
+                 comdat = 1;
+               }
              else if ((strncasecmp (name, "common", 6) == 0))
                {
                  *input_line_pointer = c;
@@ -7609,8 +7618,17 @@
        flags |= (SEC_ALLOC | SEC_LOAD);
       if (code_only)
        flags |= SEC_CODE;
-      if (common || dup_common)
-       flags |= SEC_IS_COMMON;
+
+      /* These flags are used to implement various flavors of initialized
+        common.  The SOM linker discards duplicate subspaces when they
+        have the same "key" symbol name.  This support is more like
+        GNU linkonce than BFD common.  Further, pc-relative relocations
+        are converted to section relative relocations in BFD common
+        sections.  This complicates the handling of relocations in
+        common sections containing text and isn't currently supported
+        correctly in the SOM BFD backend.  */
+      if (comdat || common || dup_common)
+       flags |= SEC_LINK_ONCE;
 
       flags |= SEC_RELOC | SEC_HAS_CONTENTS;
 
@@ -7641,7 +7659,7 @@
       bfd_set_section_flags (stdoutput, section, applicable);
 
       /* Record any alignment request for this section.  */
-      record_alignment (section, log2 (alignment));
+      record_alignment (section, exact_log2 (alignment));
 
       /* Set the starting offset for this section.  */
       bfd_set_section_vma (stdoutput, section,
@@ -7652,16 +7670,16 @@
       if (ssd)
 
        current_subspace = update_subspace (space, ss_name, loadable,
-                                           code_only, common, dup_common,
-                                           sort, zero, access, space_index,
-                                           alignment, quadrant,
+                                           code_only, comdat, common,
+                                           dup_common, sort, zero, access,
+                                           space_index, alignment, quadrant,
                                            section);
       else
        current_subspace = create_new_subspace (space, ss_name, loadable,
-                                               code_only, common,
+                                               code_only, comdat, common,
                                                dup_common, zero, sort,
                                                access, space_index,
-                                             alignment, quadrant, section);
+                                               alignment, quadrant, section);
 
       demand_empty_rest_of_line ();
       current_subspace->ssd_seg = section;
@@ -7782,6 +7800,7 @@
       create_new_subspace (space, name,
                           pa_def_subspaces[i].loadable,
                           pa_def_subspaces[i].code_only,
+                          pa_def_subspaces[i].comdat,
                           pa_def_subspaces[i].common,
                           pa_def_subspaces[i].dup_common,
                           pa_def_subspaces[i].zero,
@@ -7803,7 +7822,7 @@
                  sort, seg, user_defined)
      char *name;
      int spnum;
-     int loadable;
+     int loadable ATTRIBUTE_UNUSED;
      int defined;
      int private;
      int sort;
@@ -7883,16 +7902,19 @@
    order as defined by the SORT entries.  */
 
 static ssd_chain_struct *
-create_new_subspace (space, name, loadable, code_only, common,
+create_new_subspace (space, name, loadable, code_only, comdat, common,
                     dup_common, is_zero, sort, access, space_index,
                     alignment, quadrant, seg)
      sd_chain_struct *space;
      char *name;
-     int loadable, code_only, common, dup_common, is_zero;
+     int loadable ATTRIBUTE_UNUSED;
+     int code_only ATTRIBUTE_UNUSED;
+     int comdat, common, dup_common;
+     int is_zero ATTRIBUTE_UNUSED;
      int sort;
      int access;
-     int space_index;
-     int alignment;
+     int space_index ATTRIBUTE_UNUSED;
+     int alignment ATTRIBUTE_UNUSED;
      int quadrant;
      asection *seg;
 {
@@ -7945,8 +7967,8 @@
     }
 
 #ifdef obj_set_subsection_attributes
-  obj_set_subsection_attributes (seg, space->sd_seg, access,
-                                sort, quadrant);
+  obj_set_subsection_attributes (seg, space->sd_seg, access, sort,
+                                quadrant, comdat, common, dup_common);
 #endif
 
   return chain_entry;
@@ -7956,19 +7978,20 @@
    various arguments.   Return the modified subspace chain entry.  */
 
 static ssd_chain_struct *
-update_subspace (space, name, loadable, code_only, common, dup_common, sort,
-                zero, access, space_index, alignment, quadrant, section)
+update_subspace (space, name, loadable, code_only, comdat, common, dup_common,
+                sort, zero, access, space_index, alignment, quadrant, section)
      sd_chain_struct *space;
      char *name;
-     int loadable;



Home | Main Index | Thread Index | Old Index