Changeset 729


Ignore:
Timestamp:
Sep 25, 2003, 9:27:01 PM (22 years ago)
Author:
zap
Message:

.

Location:
trunk/src/binutils
Files:
2 added
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/binutils/bfd/aoutx.h

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r728 r729  
    49954995              /* Don't touch imported symbols */
    49964996                  && (!bfd_is_abs_section (h->root.u.def.section)
    4997                       || (h->root.u.def.value != -1))
     4997                      || (h->root.u.def.value != (unsigned)-1))
    49984998#endif
    49994999                  && (h->root.type == bfd_link_hash_defined
  • trunk/src/binutils/bfd/config.bfd

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r728 r729  
    543543    targ_selfvecs=i386chaos_vec
    544544    ;;
     545  i[3456]86-*-os2*)
     546    targ_defvec=bfd_elf32_i386_vec
     547    targ_selvecs="bfd_elf32_i386_vec i386aout_emx_vec"
     548    targ_underscore=yes
     549    ;;
    545550
    546551  i860-*-mach3* | i860-*-osf1* | i860-*-coff*)
     
    12491254    ;;
    12501255
    1251   i[3456]86-*-os2*)
    1252     targ_defvec=i386aout_emx_vec
    1253     targ_selvecs=i386aout_emx_vec
    1254     targ_underscore=yes
    1255     ;;
    1256 
    12571256# END OF targmatch.h
    12581257  *)
  • trunk/src/binutils/bfd/configure

    • Property cvs2svn:cvs-rev changed from 1.6 to 1.7
    r728 r729  
    63456345    i386netbsd_vec)             tb="$tb i386netbsd.lo aout32.lo" ;;
    63466346    i386os9k_vec)               tb="$tb i386os9k.lo aout32.lo" ;;
    6347     i386aout_emx_vec)   tb="$tb i386aoutemx.lo aout32.lo" ;;
     6347    i386aout_emx_vec)           tb="$tb i386aoutemx.lo aout32.lo" ;;
    63486348    i386pe_vec)                 tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
    63496349    i386pei_vec)                tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
  • trunk/src/binutils/bfd/configure.in

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r728 r729  
    245245changequote([,])dnl
    246246        COREFILE=trad-core.lo
    247         AC_DEFINE(TRAD_HEADER,"hosts/i386emx.h")
     247        TRAD_HEADER='"hosts/i386emx.h"'
    248248        ;;
    249249  i860-*-mach3* | i860-*-osf1*)
     
    709709    i386netbsd_vec)             tb="$tb i386netbsd.lo aout32.lo" ;;
    710710    i386os9k_vec)               tb="$tb i386os9k.lo aout32.lo" ;;
    711     i386aout_emx_vec)   tb="$tb i386aoutemx.lo aout32.lo" ;;
     711    i386aout_emx_vec)           tb="$tb i386aoutemx.lo" ;;
    712712    i386pe_vec)                 tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
    713713    i386pei_vec)                tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
  • trunk/src/binutils/bfd/host-aout.c

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r728 r729  
    3838   in the ./hosts/h-systemname.h file.  */
    3939
    40 #ifndef __EMX__ /* r=bird: Code was initially removed. Is this __EMX__ or EMX
    41                  * and why don't we include it? anything to do with sysdep.h? */
    4240#ifdef TRAD_HEADER
    4341#include TRAD_HEADER
    4442#endif
    45 #endif /* !__EMX__ */
    4643
    4744#ifdef                  HOST_PAGE_SIZE
  • trunk/src/binutils/bfd/hosts/i386emx.h

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r728 r729  
    11/* Intel ix86 running OS/2 or DOS */
    22
    3 #ifndef __I386EMX__H__
    4 #define __I386EMX__H__
    5 
    6 #define EMX
    7 
    8 #define DEFAULT_ARCH            bfd_arch_i386
    9 
    10 #define TARGET_PAGE_SIZE        0x1000
    11 #define TARGET_SEGMENT_SIZE     0x10000
    12 #define TEXT_START_ADDR         0x10000
    13 #define TARGET_STACK_END_ADDR   0x80000000
    14 
    15 #define ZMAGIC_DISK_BLOCK_SIZE  1024
    16 #define BYTES_IN_WORD           4
    17 #define NO_CORE_COMMAND
    18 
    19 #define MY(OP)                  CONCAT2(i386aout_emx_,OP)
    20 #define TARGETNAME              "a.out-emx"
    21 #define NO_WRITE_HEADER_KLUDGE  1
    22 
    23 /* a.out executables emx-specific header */
    24 struct exec
    25 {
    26   unsigned long a_info;         /* Use macros N_MAGIC, etc for access */
    27   unsigned a_text;              /* length of text, in bytes */
    28   unsigned a_data;              /* length of data, in bytes */
    29   unsigned a_bss;               /* length of uninitialized data area for file, in bytes */
    30   unsigned a_syms;              /* length of symbol table data in file, in bytes */
    31   unsigned a_entry;             /* start address */
    32   unsigned a_trsize;            /* length of relocation info for text, in bytes */
    33   unsigned a_drsize;            /* length of relocation info for data, in bytes */
    34 };
    35 
    36 #define N_HEADER_IN_TEXT(x) 0
    37 
    38 #define N_TXTOFF(x)     \
    39     (N_MAGIC(x) != ZMAGIC ? EXEC_BYTES_SIZE : /* object file or NMAGIC */\
    40      N_SHARED_LIB(x) ? 0 : \
    41      N_HEADER_IN_TEXT(x) ?      \
    42             EXEC_BYTES_SIZE :                   /* no padding */\
    43             0x400 + (x).emx_add \
    44     )
    45 
    46 #define N_DATOFF(x) (N_TXTOFF(x) + N_TXTSIZE(x))
    47 
    48 #define IS_STAB(flags) (((flags) & N_STAB) \
    49         && (flags) != (N_IMP1|N_EXT) && (flags) != (N_IMP2|N_EXT))
    50 
    51 /* EXACT TYPES */
    52 typedef char int8e_type;
    53 typedef unsigned char uint8e_type;
    54 typedef short int16e_type;
    55 typedef unsigned short uint16e_type;
    56 typedef int int32e_type;
    57 typedef unsigned int uint32e_type;
    58 
    59 /* CORRECT SIZE OR GREATER */
    60 typedef char int8_type;
    61 typedef unsigned char uint8_type;
    62 typedef short int16_type;
    63 typedef unsigned short uint16_type;
    64 typedef int int32_type;
    65 typedef unsigned int uint32_type;
    66 
    67 #endif /* __I386EMX__H__ */
     3#define HOST_PAGE_SIZE          0x1000
     4#define HOST_SEGMENT_SIZE       0x10000
     5#define HOST_TEXT_START_ADDR    0x10000
     6#define HOST_STACK_END_ADDR     0x80000000
  • trunk/src/binutils/bfd/i386aoutemx.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r728 r729  
    1818Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1919
    20 #include "sysdep.h"
    21 #include "bfd.h"
    22 #include "libbfd.h"
    23 #include "libaout.h"
     20#define EMX
    2421
    25 static bfd_boolean MY(set_sizes) ();
     22#define ARCH_SIZE               32
     23#define DEFAULT_ARCH            bfd_arch_i386
     24
     25#define TEXT_START_ADDR         0x10000
     26#define TARGET_PAGE_SIZE        0x1000
     27#define TARGET_SEGMENT_SIZE     0x10000
     28#define TARGET_STACK_END_ADDR   0x80000000
     29
     30#define ZMAGIC_DISK_BLOCK_SIZE  1024
     31#define BYTES_IN_WORD           4
     32#define NO_CORE_COMMAND
     33
     34#define MY(OP)                  CONCAT2(i386aout_emx_,OP)
     35#define TARGETNAME              "a.out-emx"
     36
     37#define IS_STAB(flags) (((flags) & N_STAB) \
     38        && (flags) != (N_IMP1|N_EXT) && (flags) != (N_IMP2|N_EXT))
     39
     40#include "aout/aoutemx.h"
     41#include "aoutx.h"
     42
     43#define MY_object_p             MY(object_p)
    2644#define MY_backend_data &MY(backend_data)
    2745
    28 static const bfd_target *MY(object_p) ();
    29 #define MY_object_p             MY(object_p)
     46static bfd_boolean MY(set_sizes) PARAMS ((bfd *));
     47static const bfd_target *MY(object_p) PARAMS ((bfd *));
    3048
    3149static CONST struct aout_backend_data MY(backend_data) = {
     
    4765#include "aout-target.h"
    4866
     67#ifndef __EMX__
     68
     69/* Cross-compilation support, borrowed from EMX C runtime library */
     70int _fseek_hdr PARAMS ((FILE *));
     71
     72int _fseek_hdr (FILE *stream)
     73{
     74  struct
     75    {
     76      char magic[2];
     77      char fill1[6];
     78      unsigned short hdr_size;
     79    } exe_hdr;
     80  struct
     81    {
     82      char sig[16];
     83      char bound;
     84      char fill1;
     85      unsigned short hdr_loc_lo;      /* cannot use long, alignment! */
     86      unsigned short hdr_loc_hi;
     87    } patch;
     88  long original_pos;
     89  int saved_errno;
     90
     91  original_pos = ftell (stream);
     92  if (fread (&exe_hdr, sizeof (exe_hdr), 1, stream) != 1)
     93    goto failure;
     94  if (memcmp (exe_hdr.magic, "MZ", 2) != 0)
     95    return (fseek (stream, original_pos, SEEK_SET) == -1 ? -1 : 0);
     96  if (fseek (stream, original_pos + 16 * exe_hdr.hdr_size, SEEK_SET) == -1)
     97    goto failure;
     98  if (fread (&patch, sizeof (patch), 1, stream) != 1)
     99    goto failure;
     100  if (memcmp (patch.sig, "emx", 3) != 0)
     101    goto failure;
     102  if (fseek (stream, original_pos + patch.hdr_loc_lo
     103             + 65536L * patch.hdr_loc_hi, SEEK_SET) == -1)
     104    goto failure;
     105  return 0;
     106
     107failure:
     108  saved_errno = errno;
     109  fseek (stream, original_pos, SEEK_SET);
     110  errno = saved_errno;
     111  return -1;
     112}
     113#endif
     114
    49115/*
    50116 * Finish up the reading of an a.out file header
     
    62128  (void)_fseek_hdr(bfd_cache_lookup(abfd));
    63129  add = bfd_tell (abfd) - org_pos;
    64   if (bfd_read ((PTR) &exec_bytes, 1, EXEC_BYTES_SIZE, abfd)
     130
     131  if (bfd_bread ((PTR) &exec_bytes, EXEC_BYTES_SIZE, abfd)
    65132      != EXEC_BYTES_SIZE)
    66133  {
     
    76143
    77144  NAME(aout,swap_exec_header_in)(abfd, &exec_bytes, &exec);
    78   exec.emx_add = add;
     145  exec.a_hdrofs = add;
    79146  target = NAME(aout,some_aout_object_p) (abfd, &exec, MY(callback));
    80147  return target;
  • trunk/src/binutils/bfd/libaout.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r728 r729  
    253253{
    254254    long a_info;                /* Magic number and flags, packed */
    255 #if defined (__EMX__)
    256     long emx_add;
     255#if defined (EMX)
     256    long a_hdrofs;              /* Offset from file start to a.out header */
    257257#endif
    258258    bfd_vma a_text;             /* length of text, in bytes  */
  • trunk/src/binutils/bfd/sysdep.h

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r728 r729  
    2626
    2727#include "config.h"
    28 
    29 #ifdef __EMX__ /* r=bird: hmm seen this before. */
    30 #ifdef TRAD_HEADER
    31 #include TRAD_HEADER
    32 #endif
    33 #endif /* __EMX__ */
    3428
    3529#ifdef HAVE_STDDEF_H
  • trunk/src/binutils/bfd/targets.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r728 r729  
    935935#endif
    936936        &hp300hpux_vec,
     937        &i386aout_emx_vec,
    937938        &i386aout_vec,
    938939        &i386bsd_vec,
  • trunk/src/binutils/bfd/trad-core.c

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r728 r729  
    4444#include <sys/user.h>           /* After a.out.h  */
    4545
    46 #ifndef __EMX__ /* r=bird: Code was initially removed. Why don't we include it? anything to do with sysdep.h? */
    4746#ifdef TRAD_HEADER
    4847#include TRAD_HEADER
    4948#endif
    50 #endif /* !__EMX__ */
    5149
    5250struct trad_core_struct
     
    106104
    107105  /* Sanity check perhaps??? */
    108 #ifdef __EMX__                          /* r=bird: EMX not __EMX__ thing?? */
     106#ifdef EMX
    109107  if (u.u_magic != UMAGIC)
    110108    return 0;
    111 #else /* !__EMX__ */
     109#else /* !EMX */
    112110  if (u.u_dsize > 0x1000000)    /* Remember, it's in pages...  */
    113111    {
     
    158156#endif
    159157  }
    160 #endif /* !__EMX__ */
     158#endif /* !EMX */
    161159
    162160  /* OK, we believe you.  You're a core file (sure, sure).  */
  • trunk/src/binutils/binutils/addr2line.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r728 r729  
    297297  textdomain (PACKAGE);
    298298
    299 #if defined (__EMX__)
    300   program_name = _getname(*argv);
    301 #else
    302299  program_name = *argv;
    303 #endif /* __EMX__ */
    304300  xmalloc_set_program_name (program_name);
    305301
  • trunk/src/binutils/binutils/ar.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r728 r729  
    403403  _wildcard (&argc, &argv);
    404404  _response (&argc, &argv);
    405   program_name = _getname(argv[0]);
    406 #else
     405#endif /* __EMX__ */
    407406  program_name = argv[0];
    408 #endif /* __EMX__ */
    409407  xmalloc_set_program_name (program_name);
    410408
     
    592590          full_pathname = TRUE;
    593591          break;
    594 #ifdef __EMX__
    595         case 'J':
    596           /* Silently ignore `J' for backward compatibility. */
    597           break;
    598 #endif /* __EMX__ */
    599592        default:
    600593          /* xgettext:c-format */
  • trunk/src/binutils/binutils/doc/addr2line.1

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r728 r729  
    1 .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
    2 .\"
    3 .\" Standard preamble:
    4 .\" ========================================================================
    5 .de Sh \" Subsection heading
    6 .br
    7 .if t .Sp
    8 .ne 5
    9 .PP
    10 \fB\\$1\fR
    11 .PP
    12 ..
    13 .de Sp \" Vertical space (when we can't use .PP)
    14 .if t .sp .5v
    15 .if n .sp
    16 ..
    17 .de Vb \" Begin verbatim text
    18 .ft CW
    19 .nf
    20 .ne \\$1
    21 ..
    22 .de Ve \" End verbatim text
    23 .ft R
    24 .fi
    25 ..
    26 .\" Set up some character translations and predefined strings.  \*(-- will
    27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
    28 .\" double quote, and \*(R" will give a right double quote.  | will give a
    29 .\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
    30 .\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
    31 .\" expand to `' in nroff, nothing in troff, for use with C<>.
    32 .tr \(*W-|\(bv\*(Tr
    33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
    34 .ie n \{\
    35 .    ds -- \(*W-
    36 .    ds PI pi
    37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
    38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
    39 .    ds L" ""
    40 .    ds R" ""
    41 .    ds C` ""
    42 .    ds C' ""
    43 'br\}
    44 .el\{\
    45 .    ds -- \|\(em\|
    46 .    ds PI \(*p
    47 .    ds L" ``
    48 .    ds R" ''
    49 'br\}
    50 .\"
    51 .\" If the F register is turned on, we'll generate index entries on stderr for
    52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
    53 .\" entries marked with X<> in POD.  Of course, you'll have to process the
    54 .\" output yourself in some meaningful fashion.
    55 .if \nF \{\
    56 .    de IX
    57 .    tm Index:\\$1\t\\n%\t"\\$2"
    58 ..
    59 .    nr % 0
    60 .    rr F
    61 .\}
    62 .\"
    63 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
    64 .\" way too many mistakes in technical documents.
    65 .hy 0
    66 .\"
    67 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
    68 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
    69 .    \" fudge factors for nroff and troff
    70 .if n \{\
    71 .    ds #H 0
    72 .    ds #V .8m
    73 .    ds #F .3m
    74 .    ds #[ \f1
    75 .    ds #] \fP
    76 .\}
    77 .if t \{\
    78 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
    79 .    ds #V .6m
    80 .    ds #F 0
    81 .    ds #[ \&
    82 .    ds #] \&
    83 .\}
    84 .    \" simple accents for nroff and troff
    85 .if n \{\
    86 .    ds ' \&
    87 .    ds ` \&
    88 .    ds ^ \&
    89 .    ds , \&
    90 .    ds ~ ~
    91 .    ds /
    92 .\}
    93 .if t \{\
    94 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
    95 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
    96 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
    97 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
    98 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
    99 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
    100 .\}
    101 .    \" troff and (daisy-wheel) nroff accents
    102 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
    103 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
    104 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
    105 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
    106 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
    107 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
    108 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
    109 .ds ae a\h'-(\w'a'u*4/10)'e
    110 .ds Ae A\h'-(\w'A'u*4/10)'E
    111 .    \" corrections for vroff
    112 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
    113 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
    114 .    \" for low resolution devices (crt and lpr)
    115 .if \n(.H>23 .if \n(.V>19 \
    116 \{\
    117 .    ds : e
    118 .    ds 8 ss
    119 .    ds o a
    120 .    ds d- d\h'-1'\(ga
    121 .    ds D- D\h'-1'\(hy
    122 .    ds th \o'bp'
    123 .    ds Th \o'LP'
    124 .    ds ae ae
    125 .    ds Ae AE
    126 .\}
    127 .rm #[ #] #H #V #F C
    128 .\" ========================================================================
    129 .\"
    130 .IX Title "ADDR2LINE 1"
    131 .TH ADDR2LINE 1 "2003-04-27" "binutils-2.13.90" "GNU Development Tools"
    132 .SH "NAME"
    133 addr2line \- convert addresses into file names and line numbers.
    134 .SH "SYNOPSIS"
    135 .IX Header "SYNOPSIS"
    136 addr2line [\fB\-b\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
    137           [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR]]
    138           [\fB\-e\fR \fIfilename\fR|\fB\-\-exe=\fR\fIfilename\fR]
    139           [\fB\-f\fR|\fB\-\-functions\fR] [\fB\-s\fR|\fB\-\-basename\fR]
    140           [\fB\-H\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR]
    141           [addr addr ...]
    142 .SH "DESCRIPTION"
    143 .IX Header "DESCRIPTION"
    144 \&\fBaddr2line\fR translates program addresses into file names and line
    145 numbers.  Given an address and an executable, it uses the debugging
    146 information in the executable to figure out which file name and line
    147 number are associated with a given address.
    148 .PP
    149 The executable to use is specified with the \fB\-e\fR option.  The
    150 default is the file \fIa.out\fR.
    151 .PP
    152 \&\fBaddr2line\fR has two modes of operation.
    153 .PP
    154 In the first, hexadecimal addresses are specified on the command line,
    155 and \fBaddr2line\fR displays the file name and line number for each
    156 address.
    157 .PP
    158 In the second, \fBaddr2line\fR reads hexadecimal addresses from
    159 standard input, and prints the file name and line number for each
    160 address on standard output.  In this mode, \fBaddr2line\fR may be used
    161 in a pipe to convert dynamically chosen addresses.
    162 .PP
    163 The format of the output is \fB\s-1FILENAME:LINENO\s0\fR.  The file name and
    164 line number for each address is printed on a separate line.  If the
    165 \&\fB\-f\fR option is used, then each \fB\s-1FILENAME:LINENO\s0\fR line is
    166 preceded by a \fB\s-1FUNCTIONNAME\s0\fR line which is the name of the function
    167 containing the address.
    168 .PP
    169 If the file name or function name can not be determined,
    170 \&\fBaddr2line\fR will print two question marks in their place.  If the
    171 line number can not be determined, \fBaddr2line\fR will print 0.
    172 .SH "OPTIONS"
    173 .IX Header "OPTIONS"
    174 The long and short forms of options, shown here as alternatives, are
    175 equivalent.
    176 .IP "\fB\-b\fR \fIbfdname\fR" 4
    177 .IX Item "-b bfdname"
    178 .PD 0
    179 .IP "\fB\-\-target=\fR\fIbfdname\fR" 4
    180 .IX Item "--target=bfdname"
    181 .PD
    182 Specify that the object-code format for the object files is
    183 \&\fIbfdname\fR.
    184 .IP "\fB\-C\fR" 4
    185 .IX Item "-C"
    186 .PD 0
    187 .IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4
    188 .IX Item "--demangle[=style]"
    189 .PD
    190 Decode (\fIdemangle\fR) low-level symbol names into user-level names.
    191 Besides removing any initial underscore prepended by the system, this
    192 makes \*(C+ function names readable.  Different compilers have different
    193 mangling styles. The optional demangling style argument can be used to
    194 choose an appropriate demangling style for your compiler.
    195 .IP "\fB\-e\fR \fIfilename\fR" 4
    196 .IX Item "-e filename"
    197 .PD 0
    198 .IP "\fB\-\-exe=\fR\fIfilename\fR" 4
    199 .IX Item "--exe=filename"
    200 .PD
    201 Specify the name of the executable for which addresses should be
    202 translated.  The default file is \fIa.out\fR.
    203 .IP "\fB\-f\fR" 4
    204 .IX Item "-f"
    205 .PD 0
    206 .IP "\fB\-\-functions\fR" 4
    207 .IX Item "--functions"
    208 .PD
    209 Display function names as well as file and line number information.
    210 .IP "\fB\-s\fR" 4
    211 .IX Item "-s"
    212 .PD 0
    213 .IP "\fB\-\-basenames\fR" 4
    214 .IX Item "--basenames"
    215 .PD
    216 Display only the base of each file name.
    217 .SH "SEE ALSO"
    218 .IX Header "SEE ALSO"
    219 Info entries for \fIbinutils\fR.
    220 .SH "COPYRIGHT"
    221 .IX Header "COPYRIGHT"
    222 Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
    223 2001, 2002, 2003 Free Software Foundation, Inc.
    224 .PP
    225 Permission is granted to copy, distribute and/or modify this document
    226 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
    227 or any later version published by the Free Software Foundation;
    228 with no Invariant Sections, with no Front-Cover Texts, and with no
    229 Back-Cover Texts.  A copy of the license is included in the
    230 section entitled ``\s-1GNU\s0 Free Documentation License''.
  • trunk/src/binutils/binutils/doc/ar.1

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r728 r729  
    1 .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
    2 .\"
    3 .\" Standard preamble:
    4 .\" ========================================================================
    5 .de Sh \" Subsection heading
    6 .br
    7 .if t .Sp
    8 .ne 5
    9 .PP
    10 \fB\\$1\fR
    11 .PP
    12 ..
    13 .de Sp \" Vertical space (when we can't use .PP)
    14 .if t .sp .5v
    15 .if n .sp
    16 ..
    17 .de Vb \" Begin verbatim text
    18 .ft CW
    19 .nf
    20 .ne \\$1
    21 ..
    22 .de Ve \" End verbatim text
    23 .ft R
    24 .fi
    25 ..
    26 .\" Set up some character translations and predefined strings.  \*(-- will
    27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
    28 .\" double quote, and \*(R" will give a right double quote.  | will give a
    29 .\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
    30 .\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
    31 .\" expand to `' in nroff, nothing in troff, for use with C<>.
    32 .tr \(*W-|\(bv\*(Tr
    33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
    34 .ie n \{\
    35 .    ds -- \(*W-
    36 .    ds PI pi
    37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
    38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
    39 .    ds L" ""
    40 .    ds R" ""
    41 .    ds C` ""
    42 .    ds C' ""
    43 'br\}
    44 .el\{\
    45 .    ds -- \|\(em\|
    46 .    ds PI \(*p
    47 .    ds L" ``
    48 .    ds R" ''
    49 'br\}
    50 .\"
    51 .\" If the F register is turned on, we'll generate index entries on stderr for
    52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
    53 .\" entries marked with X<> in POD.  Of course, you'll have to process the
    54 .\" output yourself in some meaningful fashion.
    55 .if \nF \{\
    56 .    de IX
    57 .    tm Index:\\$1\t\\n%\t"\\$2"
    58 ..
    59 .    nr % 0
    60 .    rr F
    61 .\}
    62 .\"
    63 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
    64 .\" way too many mistakes in technical documents.
    65 .hy 0
    66 .\"
    67 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
    68 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
    69 .    \" fudge factors for nroff and troff
    70 .if n \{\
    71 .    ds #H 0
    72 .    ds #V .8m
    73 .    ds #F .3m
    74 .    ds #[ \f1
    75 .    ds #] \fP
    76 .\}
    77 .if t \{\
    78 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
    79 .    ds #V .6m
    80 .    ds #F 0
    81 .    ds #[ \&
    82 .    ds #] \&
    83 .\}
    84 .    \" simple accents for nroff and troff
    85 .if n \{\
    86 .    ds ' \&
    87 .    ds ` \&
    88 .    ds ^ \&
    89 .    ds , \&
    90 .    ds ~ ~
    91 .    ds /
    92 .\}
    93 .if t \{\
    94 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
    95 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
    96 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
    97 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
    98 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
    99 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
    100 .\}
    101 .    \" troff and (daisy-wheel) nroff accents
    102 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
    103 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
    104 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
    105 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
    106 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
    107 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
    108 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
    109 .ds ae a\h'-(\w'a'u*4/10)'e
    110 .ds Ae A\h'-(\w'A'u*4/10)'E
    111 .    \" corrections for vroff
    112 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
    113 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
    114 .    \" for low resolution devices (crt and lpr)
    115 .if \n(.H>23 .if \n(.V>19 \
    116 \{\
    117 .    ds : e
    118 .    ds 8 ss
    119 .    ds o a
    120 .    ds d- d\h'-1'\(ga
    121 .    ds D- D\h'-1'\(hy
    122 .    ds th \o'bp'
    123 .    ds Th \o'LP'
    124 .    ds ae ae
    125 .    ds Ae AE
    126 .\}
    127 .rm #[ #] #H #V #F C
    128 .\" ========================================================================
    129 .\"
    130 .IX Title "AR 1"
    131 .TH AR 1 "2003-04-27" "binutils-2.13.90" "GNU Development Tools"
    132 .SH "NAME"
    133 ar \- create, modify, and extract from archives
    134 .SH "SYNOPSIS"
    135 .IX Header "SYNOPSIS"
    136 ar [\fB\-X32_64\fR] [\fB\-\fR]\fIp\fR[\fImod\fR [\fIrelpos\fR] [\fIcount\fR]] \fIarchive\fR [\fImember\fR...]
    137 .SH "DESCRIPTION"
    138 .IX Header "DESCRIPTION"
    139 The \s-1GNU\s0 \fBar\fR program creates, modifies, and extracts from
    140 archives.  An \fIarchive\fR is a single file holding a collection of
    141 other files in a structure that makes it possible to retrieve
    142 the original individual files (called \fImembers\fR of the archive).
    143 .PP
    144 The original files' contents, mode (permissions), timestamp, owner, and
    145 group are preserved in the archive, and can be restored on
    146 extraction. 
    147 .PP
    148 \&\s-1GNU\s0 \fBar\fR can maintain archives whose members have names of any
    149 length; however, depending on how \fBar\fR is configured on your
    150 system, a limit on member-name length may be imposed for compatibility
    151 with archive formats maintained with other tools.  If it exists, the
    152 limit is often 15 characters (typical of formats related to a.out) or 16
    153 characters (typical of formats related to coff).
    154 .PP
    155 \&\fBar\fR is considered a binary utility because archives of this sort
    156 are most often used as \fIlibraries\fR holding commonly needed
    157 subroutines.
    158 .PP
    159 \&\fBar\fR creates an index to the symbols defined in relocatable
    160 object modules in the archive when you specify the modifier \fBs\fR.
    161 Once created, this index is updated in the archive whenever \fBar\fR
    162 makes a change to its contents (save for the \fBq\fR update operation).
    163 An archive with such an index speeds up linking to the library, and
    164 allows routines in the library to call each other without regard to
    165 their placement in the archive.
    166 .PP
    167 You may use \fBnm \-s\fR or \fBnm \-\-print\-armap\fR to list this index
    168 table.  If an archive lacks the table, another form of \fBar\fR called
    169 \&\fBranlib\fR can be used to add just the table.
    170 .PP
    171 \&\s-1GNU\s0 \fBar\fR is designed to be compatible with two different
    172 facilities.  You can control its activity using command-line options,
    173 like the different varieties of \fBar\fR on Unix systems; or, if you
    174 specify the single command-line option \fB\-M\fR, you can control it
    175 with a script supplied via standard input, like the \s-1MRI\s0 ``librarian''
    176 program.
    177 .SH "OPTIONS"
    178 .IX Header "OPTIONS"
    179 \&\s-1GNU\s0 \fBar\fR allows you to mix the operation code \fIp\fR and modifier
    180 flags \fImod\fR in any order, within the first command-line argument.
    181 .PP
    182 If you wish, you may begin the first command-line argument with a
    183 dash.
    184 .PP
    185 The \fIp\fR keyletter specifies what operation to execute; it may be
    186 any of the following, but you must specify only one of them:
    187 .IP "\fBd\fR" 4
    188 .IX Item "d"
    189 \&\fIDelete\fR modules from the archive.  Specify the names of modules to
    190 be deleted as \fImember\fR...; the archive is untouched if you
    191 specify no files to delete.
    192 .Sp
    193 If you specify the \fBv\fR modifier, \fBar\fR lists each module
    194 as it is deleted.
    195 .IP "\fBm\fR" 4
    196 .IX Item "m"
    197 Use this operation to \fImove\fR members in an archive.
    198 .Sp
    199 The ordering of members in an archive can make a difference in how
    200 programs are linked using the library, if a symbol is defined in more
    201 than one member. 
    202 .Sp
    203 If no modifiers are used with \f(CW\*(C`m\*(C'\fR, any members you name in the
    204 \&\fImember\fR arguments are moved to the \fIend\fR of the archive;
    205 you can use the \fBa\fR, \fBb\fR, or \fBi\fR modifiers to move them to a
    206 specified place instead.
    207 .IP "\fBp\fR" 4
    208 .IX Item "p"
    209 \&\fIPrint\fR the specified members of the archive, to the standard
    210 output file.  If the \fBv\fR modifier is specified, show the member
    211 name before copying its contents to standard output.
    212 .Sp
    213 If you specify no \fImember\fR arguments, all the files in the archive are
    214 printed.
    215 .IP "\fBq\fR" 4
    216 .IX Item "q"
    217 \&\fIQuick append\fR; Historically, add the files \fImember\fR... to the end of
    218 \&\fIarchive\fR, without checking for replacement.
    219 .Sp
    220 The modifiers \fBa\fR, \fBb\fR, and \fBi\fR do \fInot\fR affect this
    221 operation; new members are always placed at the end of the archive.
    222 .Sp
    223 The modifier \fBv\fR makes \fBar\fR list each file as it is appended.
    224 .Sp
    225 Since the point of this operation is speed, the archive's symbol table
    226 index is not updated, even if it already existed; you can use \fBar s\fR or
    227 \&\fBranlib\fR explicitly to update the symbol table index.
    228 .Sp
    229 However, too many different systems assume quick append rebuilds the
    230 index, so \s-1GNU\s0 \fBar\fR implements \fBq\fR as a synonym for \fBr\fR.
    231 .IP "\fBr\fR" 4
    232 .IX Item "r"
    233 Insert the files \fImember\fR... into \fIarchive\fR (with
    234 \&\fIreplacement\fR). This operation differs from \fBq\fR in that any
    235 previously existing members are deleted if their names match those being
    236 added.
    237 .Sp
    238 If one of the files named in \fImember\fR... does not exist, \fBar\fR
    239 displays an error message, and leaves undisturbed any existing members
    240 of the archive matching that name.
    241 .Sp
    242 By default, new members are added at the end of the file; but you may
    243 use one of the modifiers \fBa\fR, \fBb\fR, or \fBi\fR to request
    244 placement relative to some existing member.
    245 .Sp
    246 The modifier \fBv\fR used with this operation elicits a line of
    247 output for each file inserted, along with one of the letters \fBa\fR or
    248 \&\fBr\fR to indicate whether the file was appended (no old member
    249 deleted) or replaced.
    250 .IP "\fBt\fR" 4
    251 .IX Item "t"
    252 Display a \fItable\fR listing the contents of \fIarchive\fR, or those
    253 of the files listed in \fImember\fR... that are present in the
    254 archive.  Normally only the member name is shown; if you also want to
    255 see the modes (permissions), timestamp, owner, group, and size, you can
    256 request that by also specifying the \fBv\fR modifier.
    257 .Sp
    258 If you do not specify a \fImember\fR, all files in the archive
    259 are listed.
    260 .Sp
    261 If there is more than one file with the same name (say, \fBfie\fR) in
    262 an archive (say \fBb.a\fR), \fBar t b.a fie\fR lists only the
    263 first instance; to see them all, you must ask for a complete
    264 listing\-\-\-in our example, \fBar t b.a\fR.
    265 .IP "\fBx\fR" 4
    266 .IX Item "x"
    267 \&\fIExtract\fR members (named \fImember\fR) from the archive.  You can
    268 use the \fBv\fR modifier with this operation, to request that
    269 \&\fBar\fR list each name as it extracts it.
    270 .Sp
    271 If you do not specify a \fImember\fR, all files in the archive
    272 are extracted.
    273 .PP
    274 A number of modifiers (\fImod\fR) may immediately follow the \fIp\fR
    275 keyletter, to specify variations on an operation's behavior:
    276 .IP "\fBa\fR" 4
    277 .IX Item "a"
    278 Add new files \fIafter\fR an existing member of the
    279 archive.  If you use the modifier \fBa\fR, the name of an existing archive
    280 member must be present as the \fIrelpos\fR argument, before the
    281 \&\fIarchive\fR specification.
    282 .IP "\fBb\fR" 4
    283 .IX Item "b"
    284 Add new files \fIbefore\fR an existing member of the
    285 archive.  If you use the modifier \fBb\fR, the name of an existing archive
    286 member must be present as the \fIrelpos\fR argument, before the
    287 \&\fIarchive\fR specification.  (same as \fBi\fR).
    288 .IP "\fBc\fR" 4
    289 .IX Item "c"
    290 \&\fICreate\fR the archive.  The specified \fIarchive\fR is always
    291 created if it did not exist, when you request an update.  But a warning is
    292 issued unless you specify in advance that you expect to create it, by
    293 using this modifier.
    294 .IP "\fBf\fR" 4
    295 .IX Item "f"
    296 Truncate names in the archive.  \s-1GNU\s0 \fBar\fR will normally permit file
    297 names of any length.  This will cause it to create archives which are
    298 not compatible with the native \fBar\fR program on some systems.  If
    299 this is a concern, the \fBf\fR modifier may be used to truncate file
    300 names when putting them in the archive.
    301 .IP "\fBi\fR" 4
    302 .IX Item "i"
    303 Insert new files \fIbefore\fR an existing member of the
    304 archive.  If you use the modifier \fBi\fR, the name of an existing archive
    305 member must be present as the \fIrelpos\fR argument, before the
    306 \&\fIarchive\fR specification.  (same as \fBb\fR).
    307 .IP "\fBl\fR" 4
    308 .IX Item "l"
    309 This modifier is accepted but not used.
    310 .IP "\fBN\fR" 4
    311 .IX Item "N"
    312 Uses the \fIcount\fR parameter.  This is used if there are multiple
    313 entries in the archive with the same name.  Extract or delete instance
    314 \&\fIcount\fR of the given name from the archive.
    315 .IP "\fBo\fR" 4
    316 .IX Item "o"
    317 Preserve the \fIoriginal\fR dates of members when extracting them.  If
    318 you do not specify this modifier, files extracted from the archive
    319 are stamped with the time of extraction.
    320 .IP "\fBP\fR" 4
    321 .IX Item "P"
    322 Use the full path name when matching names in the archive.  \s-1GNU\s0
    323 \&\fBar\fR can not create an archive with a full path name (such archives
    324 are not \s-1POSIX\s0 complaint), but other archive creators can.  This option
    325 will cause \s-1GNU\s0 \fBar\fR to match file names using a complete path
    326 name, which can be convenient when extracting a single file from an
    327 archive created by another tool.
    328 .IP "\fBs\fR" 4
    329 .IX Item "s"
    330 Write an object-file index into the archive, or update an existing one,
    331 even if no other change is made to the archive.  You may use this modifier
    332 flag either with any operation, or alone.  Running \fBar s\fR on an
    333 archive is equivalent to running \fBranlib\fR on it.
    334 .IP "\fBS\fR" 4
    335 .IX Item "S"
    336 Do not generate an archive symbol table.  This can speed up building a
    337 large library in several steps.  The resulting archive can not be used
    338 with the linker.  In order to build a symbol table, you must omit the
    339 \&\fBS\fR modifier on the last execution of \fBar\fR, or you must run
    340 \&\fBranlib\fR on the archive.
    341 .IP "\fBu\fR" 4
    342 .IX Item "u"
    343 Normally, \fBar r\fR... inserts all files
    344 listed into the archive.  If you would like to insert \fIonly\fR those
    345 of the files you list that are newer than existing members of the same
    346 names, use this modifier.  The \fBu\fR modifier is allowed only for the
    347 operation \fBr\fR (replace).  In particular, the combination \fBqu\fR is
    348 not allowed, since checking the timestamps would lose any speed
    349 advantage from the operation \fBq\fR.
    350 .IP "\fBv\fR" 4
    351 .IX Item "v"
    352 This modifier requests the \fIverbose\fR version of an operation.  Many
    353 operations display additional information, such as filenames processed,
    354 when the modifier \fBv\fR is appended.
    355 .IP "\fBV\fR" 4
    356 .IX Item "V"
    357 This modifier shows the version number of \fBar\fR.
    358 .PP
    359 \&\fBar\fR ignores an initial option spelt \fB\-X32_64\fR, for
    360 compatibility with \s-1AIX\s0.  The behaviour produced by this option is the
    361 default for \s-1GNU\s0 \fBar\fR.  \fBar\fR does not support any of the other
    362 \&\fB\-X\fR options; in particular, it does not support \fB\-X32\fR
    363 which is the default for \s-1AIX\s0 \fBar\fR.
    364 .SH "SEE ALSO"
    365 .IX Header "SEE ALSO"
    366 \&\fInm\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR.
    367 .SH "COPYRIGHT"
    368 .IX Header "COPYRIGHT"
    369 Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
    370 2001, 2002, 2003 Free Software Foundation, Inc.
    371 .PP
    372 Permission is granted to copy, distribute and/or modify this document
    373 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
    374 or any later version published by the Free Software Foundation;
    375 with no Invariant Sections, with no Front-Cover Texts, and with no
    376 Back-Cover Texts.  A copy of the license is included in the
    377 section entitled ``\s-1GNU\s0 Free Documentation License''.
  • trunk/src/binutils/binutils/nm.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r728 r729  
    405405  _wildcard (&argc, &argv);
    406406  _response (&argc, &argv);
    407   program_name = _getname(*argv);
    408 #else
     407#endif /* __EMX__ */
    409408  program_name = *argv;
    410 #endif /* __EMX__ */
    411409  xmalloc_set_program_name (program_name);
    412410
  • trunk/src/binutils/binutils/objdump.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r728 r729  
    26312631  _wildcard (&argc, &argv);
    26322632  _response (&argc, &argv);
    2633   program_name = _getname(*argv);
    2634 #else
     2633#endif /* __EMX__ */
    26352634  program_name = *argv;
    2636 #endif /* __EMX__ */
    26372635  xmalloc_set_program_name (program_name);
    26382636
  • trunk/src/binutils/binutils/size.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r728 r729  
    141141  _wildcard (&argc, &argv);
    142142  _response (&argc, &argv);
    143   program_name = _getname(*argv);
    144 #else
     143#endif /* __EMX__ */
    145144  program_name = *argv;
    146 #endif /* __EMX__ */
    147145  xmalloc_set_program_name (program_name);
    148146
  • trunk/src/binutils/binutils/strings.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r728 r729  
    179179  textdomain (PACKAGE);
    180180
    181 #if defined (__EMX__)
    182   program_name = _getname(argv[0]);
    183 #else
    184181  program_name = argv[0];
    185 #endif /* __EMX__ */
    186182  xmalloc_set_program_name (program_name);
    187183  string_min = -1;
  • trunk/src/binutils/configure

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r728 r729  
    20682068  for dir in $PATH; do
    20692069    test -z "$dir" && dir=.
    2070     if test -f $dir/gcc; then
     2070    if test -f $dir/gcc${ac_cv_exeext}; then
    20712071      found=yes
    20722072      break
     
    20872087# locate bison or byacc in objdir.
    20882088
    2089 for prog in 'bison -y' byacc yacc
     2089for prog in "bison${ac_cv_exeext} -y" byacc${ac_cv_exeext} yacc${ac_cv_exeext}
    20902090do
    20912091  set dummy $prog; tmp=$2
     
    21062106# locate m4 in objdir.
    21072107
    2108 for prog in gm4 gnum4 m4
     2108for prog in gm4${ac_cv_exeext} gnum4${ac_cv_exeext} m4${ac_cv_exeext}
    21092109do
    21102110  set dummy $prog; tmp=$2
     
    21252125# locate flex in objdir.
    21262126
    2127 for prog in flex lex
     2127for prog in flex${ac_cv_exeext} lex${ac_cv_exeext}
    21282128do
    21292129  set dummy $prog; tmp=$2
     
    21632163    for dir in $PATH; do
    21642164      test -z "$dir" && dir=.
    2165       if test -f $dir/bison; then
    2166         YACC="bison -y"
     2165      if test -f $dir/bison${ac_cv_exeext}; then
     2166        YACC="bison${ac_cv_exeext} -y"
    21672167        break
    21682168      fi
    2169       if test -f $dir/byacc; then
    2170         YACC=byacc
     2169      if test -f $dir/byacc${ac_cv_exeext}; then
     2170        YACC=byacc${ac_cv_exeext}
    21712171        break
    21722172      fi
    2173       if test -f $dir/yacc; then
    2174         YACC=yacc
     2173      if test -f $dir/yacc${ac_cv_exeext}; then
     2174        YACC=yacc${ac_cv_exeext}
    21752175        break
    21762176      fi
     
    21862186    for dir in $PATH; do
    21872187      test -z "$dir" && dir=.
    2188       if test -f $dir/flex; then
    2189         LEX=flex
     2188      if test -f $dir/flex${ac_cv_exeext}; then
     2189        LEX=flex${ac_cv_exeext}
    21902190        break
    21912191      fi
    2192       if test -f $dir/lex; then
    2193         LEX=lex
     2192      if test -f $dir/lex${ac_cv_exeext}; then
     2193        LEX=lex${ac_cv_exeext}
    21942194        break
    21952195      fi
     
    22232223    for dir in $PATH; do
    22242224      test -z "$dir" && dir=.
    2225       if test -f $dir/gcc; then
     2225      if test -f $dir/gcc${ac_cv_exeext}; then
    22262226        CC="gcc"
    22272227        cc_prog_is_gcc=yes
  • trunk/src/binutils/configure.in

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r728 r729  
    12571257  for dir in $PATH; do
    12581258    test -z "$dir" && dir=.
    1259     if test -f $dir/gcc; then
     1259    if test -f $dir/gcc${ac_cv_exeext}; then
    12601260      found=yes
    12611261      break
     
    12761276# locate bison or byacc in objdir.
    12771277
    1278 for prog in 'bison -y' byacc yacc
     1278for prog in "bison${ac_cv_exeext} -y" byacc${ac_cv_exeext} yacc${ac_cv_exeext}
    12791279do
    12801280  set dummy $prog; tmp=$2
     
    12951295# locate m4 in objdir.
    12961296
    1297 for prog in gm4 gnum4 m4
     1297for prog in gm4${ac_cv_exeext} gnum4${ac_cv_exeext} m4${ac_cv_exeext}
    12981298do
    12991299  set dummy $prog; tmp=$2
     
    13141314# locate flex in objdir.
    13151315
    1316 for prog in flex lex
     1316for prog in flex${ac_cv_exeext} lex${ac_cv_exeext}
    13171317do
    13181318  set dummy $prog; tmp=$2
     
    13521352    for dir in $PATH; do
    13531353      test -z "$dir" && dir=.
    1354       if test -f $dir/bison; then
    1355         YACC="bison -y"
     1354      if test -f $dir/bison${ac_cv_exeext}; then
     1355        YACC="bison${ac_cv_exeext} -y"
    13561356        break
    13571357      fi
    1358       if test -f $dir/byacc; then
    1359         YACC=byacc
     1358      if test -f $dir/byacc${ac_cv_exeext}; then
     1359        YACC=byacc${ac_cv_exeext}
    13601360        break
    13611361      fi
    13621362      if test -f $dir/yacc; then
    1363         YACC=yacc
     1363        YACC=yacc${ac_cv_exeext}
    13641364        break
    13651365      fi
     
    13671367    IFS="$save_ifs"
    13681368    if test -z "${YACC}" ; then
    1369       YACC="bison -y"
     1369      YACC="bison${ac_cv_exeext} -y"
    13701370    fi
    13711371  fi
     
    13751375    for dir in $PATH; do
    13761376      test -z "$dir" && dir=.
    1377       if test -f $dir/flex; then
    1378         LEX=flex
     1377      if test -f $dir/flex${ac_cv_exeext}; then
     1378        LEX=flex${ac_cv_exeext}
    13791379        break
    13801380      fi
    1381       if test -f $dir/lex; then
    1382         LEX=lex
     1381      if test -f $dir/lex${ac_cv_exeext}; then
     1382        LEX=lex${ac_cv_exeext}
    13831383        break
    13841384      fi
     
    14121412    for dir in $PATH; do
    14131413      test -z "$dir" && dir=.
    1414       if test -f $dir/gcc; then
     1414      if test -f $dir/gcc${ac_cv_exeext}; then
    14151415        CC="gcc"
    14161416        cc_prog_is_gcc=yes
  • trunk/src/binutils/gas/as.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r728 r729  
    831831#endif
    832832
    833 #ifdef __EMX__
    834   myname = _getname(argv[0]);
    835 #else
    836833  myname = argv[0];
    837 #endif
    838834  xmalloc_set_program_name (myname);
    839835
  • trunk/src/binutils/gas/doc/as.1

    • Property cvs2svn:cvs-rev changed from 1.1.1.2 to 1.2
    r728 r729  
    1 .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
    2 .\"
    3 .\" Standard preamble:
    4 .\" ========================================================================
    5 .de Sh \" Subsection heading
    6 .br
    7 .if t .Sp
    8 .ne 5
    9 .PP
    10 \fB\\$1\fR
    11 .PP
    12 ..
    13 .de Sp \" Vertical space (when we can't use .PP)
    14 .if t .sp .5v
    15 .if n .sp
    16 ..
    17 .de Vb \" Begin verbatim text
    18 .ft CW
    19 .nf
    20 .ne \\$1
    21 ..
    22 .de Ve \" End verbatim text
    23 .ft R
    24 .fi
    25 ..
    26 .\" Set up some character translations and predefined strings.  \*(-- will
    27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
    28 .\" double quote, and \*(R" will give a right double quote.  | will give a
    29 .\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
    30 .\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
    31 .\" expand to `' in nroff, nothing in troff, for use with C<>.
    32 .tr \(*W-|\(bv\*(Tr
    33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
    34 .ie n \{\
    35 .    ds -- \(*W-
    36 .    ds PI pi
    37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
    38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
    39 .    ds L" ""
    40 .    ds R" ""
    41 .    ds C` ""
    42 .    ds C' ""
    43 'br\}
    44 .el\{\
    45 .    ds -- \|\(em\|
    46 .    ds PI \(*p
    47 .    ds L" ``
    48 .    ds R" ''
    49 'br\}
    50 .\"
    51 .\" If the F register is turned on, we'll generate index entries on stderr for
    52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
    53 .\" entries marked with X<> in POD.  Of course, you'll have to process the
    54 .\" output yourself in some meaningful fashion.
    55 .if \nF \{\
    56 .    de IX
    57 .    tm Index:\\$1\t\\n%\t"\\$2"
    58 ..
    59 .    nr % 0
    60 .    rr F
    61 .\}
    62 .\"
    63 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
    64 .\" way too many mistakes in technical documents.
    65 .hy 0
    66 .\"
    67 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
    68 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
    69 .    \" fudge factors for nroff and troff
    70 .if n \{\
    71 .    ds #H 0
    72 .    ds #V .8m
    73 .    ds #F .3m
    74 .    ds #[ \f1
    75 .    ds #] \fP
    76 .\}
    77 .if t \{\
    78 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
    79 .    ds #V .6m
    80 .    ds #F 0
    81 .    ds #[ \&
    82 .    ds #] \&
    83 .\}
    84 .    \" simple accents for nroff and troff
    85 .if n \{\
    86 .    ds ' \&
    87 .    ds ` \&
    88 .    ds ^ \&
    89 .    ds , \&
    90 .    ds ~ ~
    91 .    ds /
    92 .\}
    93 .if t \{\
    94 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
    95 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
    96 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
    97 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
    98 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
    99 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
    100 .\}
    101 .    \" troff and (daisy-wheel) nroff accents
    102 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
    103 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
    104 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
    105 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
    106 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
    107 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
    108 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
    109 .ds ae a\h'-(\w'a'u*4/10)'e
    110 .ds Ae A\h'-(\w'A'u*4/10)'E
    111 .    \" corrections for vroff
    112 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
    113 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
    114 .    \" for low resolution devices (crt and lpr)
    115 .if \n(.H>23 .if \n(.V>19 \
    116 \{\
    117 .    ds : e
    118 .    ds 8 ss
    119 .    ds o a
    120 .    ds d- d\h'-1'\(ga
    121 .    ds D- D\h'-1'\(hy
    122 .    ds th \o'bp'
    123 .    ds Th \o'LP'
    124 .    ds ae ae
    125 .    ds Ae AE
    126 .\}
    127 .rm #[ #] #H #V #F C
    128 .\" ========================================================================
    129 .\"
    130 .IX Title "AS 1"
    131 .TH AS 1 "2003-06-12" "binutils-2.14" "GNU Development Tools"
    132 .SH "NAME"
    133 AS \- the portable GNU assembler.
    134 .SH "SYNOPSIS"
    135 .IX Header "SYNOPSIS"
    136 as [\fB\-a\fR[\fBcdhlns\fR][=\fIfile\fR]] [\fB\-D\fR] [\fB\-\-defsym\fR \fIsym\fR=\fIval\fR]
    137  [\fB\-f\fR] [\fB\-\-gstabs\fR] [\fB\-\-gdwarf2\fR] [\fB\-\-help\fR] [\fB\-I\fR \fIdir\fR]
    138  [\fB\-J\fR] [\fB\-K\fR] [\fB\-L\fR]
    139  [\fB\-\-listing\-lhs\-width\fR=\fI\s-1NUM\s0\fR] [\fB\-\-listing\-lhs\-width2\fR=\fI\s-1NUM\s0\fR]
    140  [\fB\-\-listing\-rhs\-width\fR=\fI\s-1NUM\s0\fR] [\fB\-\-listing\-cont\-lines\fR=\fI\s-1NUM\s0\fR]
    141  [\fB\-\-keep\-locals\fR] [\fB\-o\fR \fIobjfile\fR] [\fB\-R\fR] [\fB\-\-statistics\fR] [\fB\-v\fR]
    142  [\fB\-version\fR] [\fB\-\-version\fR] [\fB\-W\fR] [\fB\-\-warn\fR] [\fB\-\-fatal\-warnings\fR]
    143  [\fB\-w\fR] [\fB\-x\fR] [\fB\-Z\fR] [\fB\-\-target\-help\fR] [\fItarget-options\fR]
    144  [\fB\-\-\fR|\fIfiles\fR ...]
    145 .PP
    146 \&\fITarget Alpha options:\fR
    147    [\fB\-m\fR\fIcpu\fR]
    148    [\fB\-mdebug\fR | \fB\-no\-mdebug\fR]
    149    [\fB\-relax\fR] [\fB\-g\fR] [\fB\-G\fR\fIsize\fR]
    150    [\fB\-F\fR] [\fB\-32addr\fR]
    151 .PP
    152 \&\fITarget \s-1ARC\s0 options:\fR
    153    [\fB\-marc[5|6|7|8]\fR]
    154    [\fB\-EB\fR|\fB\-EL\fR]
    155 .PP
    156 \&\fITarget \s-1ARM\s0 options:\fR
    157    [\fB\-mcpu\fR=\fIprocessor\fR[+\fIextension\fR...]]
    158    [\fB\-march\fR=\fIarchitecture\fR[+\fIextension\fR...]]
    159    [\fB\-mfpu\fR=\fIfloating-point-fromat\fR]
    160    [\fB\-mthumb\fR]
    161    [\fB\-EB\fR|\fB\-EL\fR]
    162    [\fB\-mapcs\-32\fR|\fB\-mapcs\-26\fR|\fB\-mapcs\-float\fR|
    163     \fB\-mapcs\-reentrant\fR]
    164    [\fB\-mthumb\-interwork\fR] [\fB\-moabi\fR] [\fB\-k\fR]
    165 .PP
    166 \&\fITarget \s-1CRIS\s0 options:\fR
    167    [\fB\-\-underscore\fR | \fB\-\-no\-underscore\fR]
    168    [\fB\-\-pic\fR] [\fB\-N\fR]
    169    [\fB\-\-emulation=criself\fR | \fB\-\-emulation=crisaout\fR]
    170 .PP
    171 \&\fITarget D10V options:\fR
    172    [\fB\-O\fR]
    173 .PP
    174 \&\fITarget D30V options:\fR
    175    [\fB\-O\fR|\fB\-n\fR|\fB\-N\fR]
    176 .PP
    177 \&\fITarget i386 options:\fR
    178    [\fB\-\-32\fR|\fB\-\-64\fR]
    179 .PP
    180 \&\fITarget i960 options:\fR
    181    [\fB\-ACA\fR|\fB\-ACA_A\fR|\fB\-ACB\fR|\fB\-ACC\fR|\fB\-AKA\fR|\fB\-AKB\fR|
    182     \fB\-AKC\fR|\fB\-AMC\fR]
    183    [\fB\-b\fR] [\fB\-no\-relax\fR]
    184 .PP
    185 \&\fITarget \s-1IP2K\s0 options:\fR
    186    [\fB\-mip2022\fR|\fB\-mip2022ext\fR]
    187 .PP
    188 \&\fITarget M32R options:\fR
    189    [\fB\-\-m32rx\fR|\fB\-\-[no\-]warn\-explicit\-parallel\-conflicts\fR|
    190    \fB\-\-W[n]p\fR]
    191 .PP
    192 \&\fITarget M680X0 options:\fR
    193    [\fB\-l\fR] [\fB\-m68000\fR|\fB\-m68010\fR|\fB\-m68020\fR|...]
    194 .PP
    195 \&\fITarget M68HC11 options:\fR
    196    [\fB\-m68hc11\fR|\fB\-m68hc12\fR|\fB\-m68hcs12\fR]
    197    [\fB\-mshort\fR|\fB\-mlong\fR]
    198    [\fB\-mshort\-double\fR|\fB\-mlong\-double\fR]
    199    [\fB\-\-force\-long\-branchs\fR] [\fB\-\-short\-branchs\fR]
    200    [\fB\-\-strict\-direct\-mode\fR] [\fB\-\-print\-insn\-syntax\fR]
    201    [\fB\-\-print\-opcodes\fR] [\fB\-\-generate\-example\fR]
    202 .PP
    203 \&\fITarget \s-1MCORE\s0 options:\fR
    204    [\fB\-jsri2bsr\fR] [\fB\-sifilter\fR] [\fB\-relax\fR]
    205    [\fB\-mcpu=[210|340]\fR]
    206 .PP
    207 \&\fITarget \s-1MIPS\s0 options:\fR
    208    [\fB\-nocpp\fR] [\fB\-EL\fR] [\fB\-EB\fR] [\fB\-n\fR] [\fB\-O\fR[\fIoptimization level\fR]]
    209    [\fB\-g\fR[\fIdebug level\fR]] [\fB\-G\fR \fInum\fR] [\fB\-KPIC\fR] [\fB\-call_shared\fR]
    210    [\fB\-non_shared\fR] [\fB\-xgot\fR] [\fB\-\-membedded\-pic\fR]
    211    [\fB\-mabi\fR=\fI\s-1ABI\s0\fR] [\fB\-32\fR] [\fB\-n32\fR] [\fB\-64\fR] [\fB\-mfp32\fR] [\fB\-mgp32\fR]
    212    [\fB\-march\fR=\fI\s-1CPU\s0\fR] [\fB\-mtune\fR=\fI\s-1CPU\s0\fR] [\fB\-mips1\fR] [\fB\-mips2\fR]
    213    [\fB\-mips3\fR] [\fB\-mips4\fR] [\fB\-mips5\fR] [\fB\-mips32\fR] [\fB\-mips32r2\fR]
    214    [\fB\-mips64\fR]
    215    [\fB\-construct\-floats\fR] [\fB\-no\-construct\-floats\fR]
    216    [\fB\-trap\fR] [\fB\-no\-break\fR] [\fB\-break\fR] [\fB\-no\-trap\fR]
    217    [\fB\-mfix7000\fR] [\fB\-mno\-fix7000\fR]
    218    [\fB\-mips16\fR] [\fB\-no\-mips16\fR]
    219    [\fB\-mips3d\fR] [\fB\-no\-mips3d\fR]
    220    [\fB\-mdmx\fR] [\fB\-no\-mdmx\fR]
    221    [\fB\-mdebug\fR] [\fB\-no\-mdebug\fR]
    222 .PP
    223 \&\fITarget \s-1MMIX\s0 options:\fR
    224    [\fB\-\-fixed\-special\-register\-names\fR] [\fB\-\-globalize\-symbols\fR]
    225    [\fB\-\-gnu\-syntax\fR] [\fB\-\-relax\fR] [\fB\-\-no\-predefined\-symbols\fR]
    226    [\fB\-\-no\-expand\fR] [\fB\-\-no\-merge\-gregs\fR] [\fB\-x\fR]
    227    [\fB\-\-linker\-allocated\-gregs\fR]
    228 .PP
    229 \&\fITarget \s-1PDP11\s0 options:\fR
    230    [\fB\-mpic\fR|\fB\-mno\-pic\fR] [\fB\-mall\fR] [\fB\-mno\-extensions\fR]
    231    [\fB\-m\fR\fIextension\fR|\fB\-mno\-\fR\fIextension\fR]
    232    [\fB\-m\fR\fIcpu\fR] [\fB\-m\fR\fImachine\fR] 
    233 .PP
    234 \&\fITarget picoJava options:\fR
    235    [\fB\-mb\fR|\fB\-me\fR]
    236 .PP
    237 \&\fITarget PowerPC options:\fR
    238    [\fB\-mpwrx\fR|\fB\-mpwr2\fR|\fB\-mpwr\fR|\fB\-m601\fR|\fB\-mppc\fR|\fB\-mppc32\fR|\fB\-m603\fR|\fB\-m604\fR|
    239     \fB\-m403\fR|\fB\-m405\fR|\fB\-mppc64\fR|\fB\-m620\fR|\fB\-mppc64bridge\fR|\fB\-mbooke\fR|
    240     \fB\-mbooke32\fR|\fB\-mbooke64\fR]
    241    [\fB\-mcom\fR|\fB\-many\fR|\fB\-maltivec\fR] [\fB\-memb\fR]
    242    [\fB\-mregnames\fR|\fB\-mno\-regnames\fR]
    243    [\fB\-mrelocatable\fR|\fB\-mrelocatable\-lib\fR]
    244    [\fB\-mlittle\fR|\fB\-mlittle\-endian\fR|\fB\-mbig\fR|\fB\-mbig\-endian\fR]
    245    [\fB\-msolaris\fR|\fB\-mno\-solaris\fR]
    246 .PP
    247 \&\fITarget \s-1SPARC\s0 options:\fR
    248    [\fB\-Av6\fR|\fB\-Av7\fR|\fB\-Av8\fR|\fB\-Asparclet\fR|\fB\-Asparclite\fR
    249     \fB\-Av8plus\fR|\fB\-Av8plusa\fR|\fB\-Av9\fR|\fB\-Av9a\fR]
    250    [\fB\-xarch=v8plus\fR|\fB\-xarch=v8plusa\fR] [\fB\-bump\fR]
    251    [\fB\-32\fR|\fB\-64\fR]
    252 .PP
    253 \&\fITarget \s-1TIC54X\s0 options:\fR
    254  [\fB\-mcpu=54[123589]\fR|\fB\-mcpu=54[56]lp\fR] [\fB\-mfar\-mode\fR|\fB\-mf\fR]
    255  [\fB\-merrors\-to\-file\fR \fI<filename>\fR|\fB\-me\fR \fI<filename>\fR]
    256 .PP
    257 \&\fITarget Xtensa options:\fR
    258  [\fB\-\-[no\-]density\fR] [\fB\-\-[no\-]relax\fR] [\fB\-\-[no\-]generics\fR]
    259  [\fB\-\-[no\-]text\-section\-literals\fR]
    260  [\fB\-\-[no\-]target\-align\fR] [\fB\-\-[no\-]longcalls\fR]
    261 .SH "DESCRIPTION"
    262 .IX Header "DESCRIPTION"
    263 \&\s-1GNU\s0 \fBas\fR is really a family of assemblers.
    264 If you use (or have used) the \s-1GNU\s0 assembler on one architecture, you
    265 should find a fairly similar environment when you use it on another
    266 architecture.  Each version has much in common with the others,
    267 including object file formats, most assembler directives (often called
    268 \&\fIpseudo-ops\fR) and assembler syntax.
    269 .PP
    270 \&\fBas\fR is primarily intended to assemble the output of the
    271 \&\s-1GNU\s0 C compiler  for use by the linker
    272 \&.  Nevertheless, we've tried to make \fBas\fR
    273 assemble correctly everything that other assemblers for the same
    274 machine would assemble.
    275 Any exceptions are documented explicitly.
    276 This doesn't mean \fBas\fR always uses the same syntax as another
    277 assembler for the same architecture; for example, we know of several
    278 incompatible versions of 680x0 assembly language syntax.
    279 .PP
    280 Each time you run \fBas\fR it assembles exactly one source
    281 program.  The source program is made up of one or more files.
    282 (The standard input is also a file.)
    283 .PP
    284 You give \fBas\fR a command line that has zero or more input file
    285 names.  The input files are read (from left file name to right).  A
    286 command line argument (in any position) that has no special meaning
    287 is taken to be an input file name.
    288 .PP
    289 If you give \fBas\fR no file names it attempts to read one input file
    290 from the \fBas\fR standard input, which is normally your terminal.  You
    291 may have to type \fBctl-D\fR to tell \fBas\fR there is no more program
    292 to assemble.
    293 .PP
    294 Use \fB\-\-\fR if you need to explicitly name the standard input file
    295 in your command line.
    296 .PP
    297 If the source is empty, \fBas\fR produces a small, empty object
    298 file.
    299 .PP
    300 \&\fBas\fR may write warnings and error messages to the standard error
    301 file (usually your terminal).  This should not happen when  a compiler
    302 runs \fBas\fR automatically.  Warnings report an assumption made so
    303 that \fBas\fR could keep assembling a flawed program; errors report a
    304 grave problem that stops the assembly.
    305 .PP
    306 If you are invoking \fBas\fR via the \s-1GNU\s0 C compiler,
    307 you can use the \fB\-Wa\fR option to pass arguments through to the assembler.
    308 The assembler arguments must be separated from each other (and the \fB\-Wa\fR)
    309 by commas.  For example:
    310 .PP
    311 .Vb 1
    312 \&        gcc -c -g -O -Wa,-alh,-L file.c
    313 .Ve
    314 .PP
    315 This passes two options to the assembler: \fB\-alh\fR (emit a listing to
    316 standard output with high-level and assembly source) and \fB\-L\fR (retain
    317 local symbols in the symbol table).
    318 .PP
    319 Usually you do not need to use this \fB\-Wa\fR mechanism, since many compiler
    320 command-line options are automatically passed to the assembler by the compiler.
    321 (You can call the \s-1GNU\s0 compiler driver with the \fB\-v\fR option to see
    322 precisely what options it passes to each compilation pass, including the
    323 assembler.)
    324 .SH "OPTIONS"
    325 .IX Header "OPTIONS"
    326 .IP "\fB\-a[cdhlmns]\fR" 4
    327 .IX Item "-a[cdhlmns]"
    328 Turn on listings, in any of a variety of ways:
    329 .RS 4
    330 .IP "\fB\-ac\fR" 4
    331 .IX Item "-ac"
    332 omit false conditionals
    333 .IP "\fB\-ad\fR" 4
    334 .IX Item "-ad"
    335 omit debugging directives
    336 .IP "\fB\-ah\fR" 4
    337 .IX Item "-ah"
    338 include high-level source
    339 .IP "\fB\-al\fR" 4
    340 .IX Item "-al"
    341 include assembly
    342 .IP "\fB\-am\fR" 4
    343 .IX Item "-am"
    344 include macro expansions
    345 .IP "\fB\-an\fR" 4
    346 .IX Item "-an"
    347 omit forms processing
    348 .IP "\fB\-as\fR" 4
    349 .IX Item "-as"
    350 include symbols
    351 .IP "\fB=file\fR" 4
    352 .IX Item "=file"
    353 set the name of the listing file
    354 .RE
    355 .RS 4
    356 .Sp
    357 You may combine these options; for example, use \fB\-aln\fR for assembly
    358 listing without forms processing.  The \fB=file\fR option, if used, must be
    359 the last one.  By itself, \fB\-a\fR defaults to \fB\-ahls\fR.
    360 .RE
    361 .IP "\fB\-D\fR" 4
    362 .IX Item "-D"
    363 Ignored.  This option is accepted for script compatibility with calls to
    364 other assemblers.
    365 .IP "\fB\-\-defsym\fR \fIsym\fR\fB=\fR\fIvalue\fR" 4
    366 .IX Item "--defsym sym=value"
    367 Define the symbol \fIsym\fR to be \fIvalue\fR before assembling the input file.
    368 \&\fIvalue\fR must be an integer constant.  As in C, a leading \fB0x\fR
    369 indicates a hexadecimal value, and a leading \fB0\fR indicates an octal value.
    370 .IP "\fB\-f\fR" 4
    371 .IX Item "-f"
    372 ``fast''\-\-\-skip whitespace and comment preprocessing (assume source is
    373 compiler output).
    374 .IP "\fB\-\-gstabs\fR" 4
    375 .IX Item "--gstabs"
    376 Generate stabs debugging information for each assembler line.  This
    377 may help debugging assembler code, if the debugger can handle it.
    378 .IP "\fB\-\-gdwarf2\fR" 4
    379 .IX Item "--gdwarf2"
    380 Generate \s-1DWARF2\s0 debugging information for each assembler line.  This
    381 may help debugging assembler code, if the debugger can handle it.  Note\-\-\-this
    382 option is only supported by some targets, not all of them.
    383 .IP "\fB\-\-help\fR" 4
    384 .IX Item "--help"
    385 Print a summary of the command line options and exit.
    386 .IP "\fB\-\-target\-help\fR" 4
    387 .IX Item "--target-help"
    388 Print a summary of all target specific options and exit.
    389 .IP "\fB\-I\fR \fIdir\fR" 4
    390 .IX Item "-I dir"
    391 Add directory \fIdir\fR to the search list for \f(CW\*(C`.include\*(C'\fR directives.
    392 .IP "\fB\-J\fR" 4
    393 .IX Item "-J"
    394 Don't warn about signed overflow.
    395 .IP "\fB\-K\fR" 4
    396 .IX Item "-K"
    397 This option is accepted but has no effect on the \s-1TARGET\s0 family.
    398 .IP "\fB\-L\fR" 4
    399 .IX Item "-L"
    400 .PD 0
    401 .IP "\fB\-\-keep\-locals\fR" 4
    402 .IX Item "--keep-locals"
    403 .PD
    404 Keep (in the symbol table) local symbols.  On traditional a.out systems
    405 these start with \fBL\fR, but different systems have different local
    406 label prefixes.
    407 .IP "\fB\-\-listing\-lhs\-width=\fR\fInumber\fR" 4
    408 .IX Item "--listing-lhs-width=number"
    409 Set the maximum width, in words, of the output data column for an assembler
    410 listing to \fInumber\fR.
    411 .IP "\fB\-\-listing\-lhs\-width2=\fR\fInumber\fR" 4
    412 .IX Item "--listing-lhs-width2=number"
    413 Set the maximum width, in words, of the output data column for continuation
    414 lines in an assembler listing to \fInumber\fR.
    415 .IP "\fB\-\-listing\-rhs\-width=\fR\fInumber\fR" 4
    416 .IX Item "--listing-rhs-width=number"
    417 Set the maximum width of an input source line, as displayed in a listing, to
    418 \&\fInumber\fR bytes.
    419 .IP "\fB\-\-listing\-cont\-lines=\fR\fInumber\fR" 4
    420 .IX Item "--listing-cont-lines=number"
    421 Set the maximum number of lines printed in a listing for a single line of input
    422 to \fInumber\fR + 1.
    423 .IP "\fB\-o\fR \fIobjfile\fR" 4
    424 .IX Item "-o objfile"
    425 Name the object-file output from \fBas\fR \fIobjfile\fR.
    426 .IP "\fB\-R\fR" 4
    427 .IX Item "-R"
    428 Fold the data section into the text section.
    429 .IP "\fB\-\-statistics\fR" 4
    430 .IX Item "--statistics"
    431 Print the maximum space (in bytes) and total time (in seconds) used by
    432 assembly.
    433 .IP "\fB\-\-strip\-local\-absolute\fR" 4
    434 .IX Item "--strip-local-absolute"
    435 Remove local absolute symbols from the outgoing symbol table.
    436 .IP "\fB\-v\fR" 4
    437 .IX Item "-v"
    438 .PD 0
    439 .IP "\fB\-version\fR" 4
    440 .IX Item "-version"
    441 .PD
    442 Print the \fBas\fR version.
    443 .IP "\fB\-\-version\fR" 4
    444 .IX Item "--version"
    445 Print the \fBas\fR version and exit.
    446 .IP "\fB\-W\fR" 4
    447 .IX Item "-W"
    448 .PD 0
    449 .IP "\fB\-\-no\-warn\fR" 4
    450 .IX Item "--no-warn"
    451 .PD
    452 Suppress warning messages.
    453 .IP "\fB\-\-fatal\-warnings\fR" 4
    454 .IX Item "--fatal-warnings"
    455 Treat warnings as errors.
    456 .IP "\fB\-\-warn\fR" 4
    457 .IX Item "--warn"
    458 Don't suppress warning messages or treat them as errors.
    459 .IP "\fB\-w\fR" 4
    460 .IX Item "-w"
    461 Ignored.
    462 .IP "\fB\-x\fR" 4
    463 .IX Item "-x"
    464 Ignored.
    465 .IP "\fB\-Z\fR" 4
    466 .IX Item "-Z"
    467 Generate an object file even after errors.
    468 .IP "\fB\-\- |\fR \fIfiles\fR \fB...\fR" 4
    469 .IX Item "-- | files ..."
    470 Standard input, or source files to assemble.
    471 .PP
    472 The following options are available when as is configured for
    473 an \s-1ARC\s0 processor.
    474 .IP "\fB\-marc[5|6|7|8]\fR" 4
    475 .IX Item "-marc[5|6|7|8]"
    476 This option selects the core processor variant.
    477 .IP "\fB\-EB | \-EL\fR" 4
    478 .IX Item "-EB | -EL"
    479 Select either big-endian (\-EB) or little-endian (\-EL) output.
    480 .PP
    481 The following options are available when as is configured for the \s-1ARM\s0
    482 processor family.
    483 .IP "\fB\-mcpu=\fR\fIprocessor\fR\fB[+\fR\fIextension\fR\fB...]\fR" 4
    484 .IX Item "-mcpu=processor[+extension...]"
    485 Specify which \s-1ARM\s0 processor variant is the target.
    486 .IP "\fB\-march=\fR\fIarchitecture\fR\fB[+\fR\fIextension\fR\fB...]\fR" 4
    487 .IX Item "-march=architecture[+extension...]"
    488 Specify which \s-1ARM\s0 architecture variant is used by the target.
    489 .IP "\fB\-mfpu=\fR\fIfloating-point-format\fR" 4
    490 .IX Item "-mfpu=floating-point-format"
    491 Select which Floating Point architecture is the target.
    492 .IP "\fB\-mthumb\fR" 4
    493 .IX Item "-mthumb"
    494 Enable Thumb only instruction decoding.
    495 .IP "\fB\-mapcs\-32 | \-mapcs\-26 | \-mapcs\-float | \-mapcs\-reentrant | \-moabi\fR" 4
    496 .IX Item "-mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant | -moabi"
    497 Select which procedure calling convention is in use.
    498 .IP "\fB\-EB | \-EL\fR" 4
    499 .IX Item "-EB | -EL"
    500 Select either big-endian (\-EB) or little-endian (\-EL) output.
    501 .IP "\fB\-mthumb\-interwork\fR" 4
    502 .IX Item "-mthumb-interwork"
    503 Specify that the code has been generated with interworking between Thumb and
    504 \&\s-1ARM\s0 code in mind.
    505 .IP "\fB\-k\fR" 4
    506 .IX Item "-k"
    507 Specify that \s-1PIC\s0 code has been generated.
    508 .PP
    509 See the info pages for documentation of the CRIS-specific options.
    510 .PP
    511 The following options are available when as is configured for
    512 a D10V processor.
    513 .IP "\fB\-O\fR" 4
    514 .IX Item "-O"
    515 Optimize output by parallelizing instructions.
    516 .PP
    517 The following options are available when as is configured for a D30V
    518 processor.
    519 .IP "\fB\-O\fR" 4
    520 .IX Item "-O"
    521 Optimize output by parallelizing instructions.
    522 .IP "\fB\-n\fR" 4
    523 .IX Item "-n"
    524 Warn when nops are generated.
    525 .IP "\fB\-N\fR" 4
    526 .IX Item "-N"
    527 Warn when a nop after a 32\-bit multiply instruction is generated.
    528 .PP
    529 The following options are available when as is configured for the
    530 Intel 80960 processor.
    531 .IP "\fB\-ACA | \-ACA_A | \-ACB | \-ACC | \-AKA | \-AKB | \-AKC | \-AMC\fR" 4
    532 .IX Item "-ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC"
    533 Specify which variant of the 960 architecture is the target.
    534 .IP "\fB\-b\fR" 4
    535 .IX Item "-b"
    536 Add code to collect statistics about branches taken.
    537 .IP "\fB\-no\-relax\fR" 4
    538 .IX Item "-no-relax"
    539 Do not alter compare-and-branch instructions for long displacements;
    540 error if necessary.
    541 .PP
    542 The following options are available when as is configured for the
    543 Ubicom \s-1IP2K\s0 series.
    544 .IP "\fB\-mip2022ext\fR" 4
    545 .IX Item "-mip2022ext"
    546 Specifies that the extended \s-1IP2022\s0 instructions are allowed.
    547 .IP "\fB\-mip2022\fR" 4
    548 .IX Item "-mip2022"
    549 Restores the default behaviour, which restricts the permitted instructions to
    550 just the basic \s-1IP2022\s0 ones.
    551 .PP
    552 The following options are available when as is configured for the
    553 Renesas M32R (formerly Mitsubishi M32R) series.
    554 .IP "\fB\-\-m32rx\fR" 4
    555 .IX Item "--m32rx"
    556 Specify which processor in the M32R family is the target.  The default
    557 is normally the M32R, but this option changes it to the M32RX.
    558 .IP "\fB\-\-warn\-explicit\-parallel\-conflicts or \-\-Wp\fR" 4
    559 .IX Item "--warn-explicit-parallel-conflicts or --Wp"
    560 Produce warning messages when questionable parallel constructs are
    561 encountered.
    562 .IP "\fB\-\-no\-warn\-explicit\-parallel\-conflicts or \-\-Wnp\fR" 4
    563 .IX Item "--no-warn-explicit-parallel-conflicts or --Wnp"
    564 Do not produce warning messages when questionable parallel constructs are
    565 encountered.
    566 .PP
    567 The following options are available when as is configured for the
    568 Motorola 68000 series.
    569 .IP "\fB\-l\fR" 4
    570 .IX Item "-l"
    571 Shorten references to undefined symbols, to one word instead of two.
    572 .IP "\fB\-m68000 | \-m68008 | \-m68010 | \-m68020 | \-m68030\fR" 4
    573 .IX Item "-m68000 | -m68008 | -m68010 | -m68020 | -m68030"
    574 .PD 0
    575 .IP "\fB| \-m68040 | \-m68060 | \-m68302 | \-m68331 | \-m68332\fR" 4
    576 .IX Item "| -m68040 | -m68060 | -m68302 | -m68331 | -m68332"
    577 .IP "\fB| \-m68333 | \-m68340 | \-mcpu32 | \-m5200\fR" 4
    578 .IX Item "| -m68333 | -m68340 | -mcpu32 | -m5200"
    579 .PD
    580 Specify what processor in the 68000 family is the target.  The default
    581 is normally the 68020, but this can be changed at configuration time.
    582 .IP "\fB\-m68881 | \-m68882 | \-mno\-68881 | \-mno\-68882\fR" 4
    583 .IX Item "-m68881 | -m68882 | -mno-68881 | -mno-68882"
    584 The target machine does (or does not) have a floating-point coprocessor.
    585 The default is to assume a coprocessor for 68020, 68030, and cpu32.  Although
    586 the basic 68000 is not compatible with the 68881, a combination of the
    587 two can be specified, since it's possible to do emulation of the
    588 coprocessor instructions with the main processor.
    589 .IP "\fB\-m68851 | \-mno\-68851\fR" 4
    590 .IX Item "-m68851 | -mno-68851"
    591 The target machine does (or does not) have a memory-management
    592 unit coprocessor.  The default is to assume an \s-1MMU\s0 for 68020 and up.
    593 .PP
    594 For details about the \s-1PDP\-11\s0 machine dependent features options,
    595 see \f(CW@ref\fR{PDP\-11\-Options}.
    596 .IP "\fB\-mpic | \-mno\-pic\fR" 4
    597 .IX Item "-mpic | -mno-pic"
    598 Generate position-independent (or position\-dependent) code.  The
    599 default is \fB\-mpic\fR.
    600 .IP "\fB\-mall\fR" 4
    601 .IX Item "-mall"
    602 .PD 0
    603 .IP "\fB\-mall\-extensions\fR" 4
    604 .IX Item "-mall-extensions"
    605 .PD
    606 Enable all instruction set extensions.  This is the default.
    607 .IP "\fB\-mno\-extensions\fR" 4
    608 .IX Item "-mno-extensions"
    609 Disable all instruction set extensions.
    610 .IP "\fB\-m\fR\fIextension\fR \fB| \-mno\-\fR\fIextension\fR" 4
    611 .IX Item "-mextension | -mno-extension"
    612 Enable (or disable) a particular instruction set extension.
    613 .IP "\fB\-m\fR\fIcpu\fR" 4
    614 .IX Item "-mcpu"
    615 Enable the instruction set extensions supported by a particular \s-1CPU\s0, and
    616 disable all other extensions.
    617 .IP "\fB\-m\fR\fImachine\fR" 4
    618 .IX Item "-mmachine"
    619 Enable the instruction set extensions supported by a particular machine
    620 model, and disable all other extensions.
    621 .PP
    622 The following options are available when as is configured for
    623 a picoJava processor.
    624 .IP "\fB\-mb\fR" 4
    625 .IX Item "-mb"
    626 Generate ``big endian'' format output.
    627 .IP "\fB\-ml\fR" 4
    628 .IX Item "-ml"
    629 Generate ``little endian'' format output.
    630 .PP
    631 The following options are available when as is configured for the
    632 Motorola 68HC11 or 68HC12 series.
    633 .IP "\fB\-m68hc11 | \-m68hc12 | \-m68hcs12\fR" 4
    634 .IX Item "-m68hc11 | -m68hc12 | -m68hcs12"
    635 Specify what processor is the target.  The default is
    636 defined by the configuration option when building the assembler.
    637 .IP "\fB\-mshort\fR" 4
    638 .IX Item "-mshort"
    639 Specify to use the 16\-bit integer \s-1ABI\s0.
    640 .IP "\fB\-mlong\fR" 4
    641 .IX Item "-mlong"
    642 Specify to use the 32\-bit integer \s-1ABI\s0. 
    643 .IP "\fB\-mshort\-double\fR" 4
    644 .IX Item "-mshort-double"
    645 Specify to use the 32\-bit double \s-1ABI\s0. 
    646 .IP "\fB\-mlong\-double\fR" 4
    647 .IX Item "-mlong-double"
    648 Specify to use the 64\-bit double \s-1ABI\s0. 
    649 .IP "\fB\-\-force\-long\-branchs\fR" 4
    650 .IX Item "--force-long-branchs"
    651 Relative branches are turned into absolute ones. This concerns
    652 conditional branches, unconditional branches and branches to a
    653 sub routine.
    654 .IP "\fB\-S | \-\-short\-branchs\fR" 4
    655 .IX Item "-S | --short-branchs"
    656 Do not turn relative branchs into absolute ones
    657 when the offset is out of range.
    658 .IP "\fB\-\-strict\-direct\-mode\fR" 4
    659 .IX Item "--strict-direct-mode"
    660 Do not turn the direct addressing mode into extended addressing mode
    661 when the instruction does not support direct addressing mode.
    662 .IP "\fB\-\-print\-insn\-syntax\fR" 4
    663 .IX Item "--print-insn-syntax"
    664 Print the syntax of instruction in case of error.
    665 .IP "\fB\-\-print\-opcodes\fR" 4
    666 .IX Item "--print-opcodes"
    667 print the list of instructions with syntax and then exit.
    668 .IP "\fB\-\-generate\-example\fR" 4
    669 .IX Item "--generate-example"
    670 print an example of instruction for each possible instruction and then exit.
    671 This option is only useful for testing \fBas\fR.
    672 .PP
    673 The following options are available when \fBas\fR is configured
    674 for the \s-1SPARC\s0 architecture:
    675 .IP "\fB\-Av6 | \-Av7 | \-Av8 | \-Asparclet | \-Asparclite\fR" 4
    676 .IX Item "-Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite"
    677 .PD 0
    678 .IP "\fB\-Av8plus | \-Av8plusa | \-Av9 | \-Av9a\fR" 4
    679 .IX Item "-Av8plus | -Av8plusa | -Av9 | -Av9a"
    680 .PD
    681 Explicitly select a variant of the \s-1SPARC\s0 architecture.
    682 .Sp
    683 \&\fB\-Av8plus\fR and \fB\-Av8plusa\fR select a 32 bit environment.
    684 \&\fB\-Av9\fR and \fB\-Av9a\fR select a 64 bit environment.
    685 .Sp
    686 \&\fB\-Av8plusa\fR and \fB\-Av9a\fR enable the \s-1SPARC\s0 V9 instruction set with
    687 UltraSPARC extensions.
    688 .IP "\fB\-xarch=v8plus | \-xarch=v8plusa\fR" 4
    689 .IX Item "-xarch=v8plus | -xarch=v8plusa"
    690 For compatibility with the Solaris v9 assembler.  These options are
    691 equivalent to \-Av8plus and \-Av8plusa, respectively.
    692 .IP "\fB\-bump\fR" 4
    693 .IX Item "-bump"
    694 Warn when the assembler switches to another architecture.
    695 .PP
    696 The following options are available when as is configured for the 'c54x
    697 architecture.
    698 .IP "\fB\-mfar\-mode\fR" 4
    699 .IX Item "-mfar-mode"
    700 Enable extended addressing mode.  All addresses and relocations will assume
    701 extended addressing (usually 23 bits).
    702 .IP "\fB\-mcpu=\fR\fI\s-1CPU_VERSION\s0\fR" 4
    703 .IX Item "-mcpu=CPU_VERSION"
    704 Sets the \s-1CPU\s0 version being compiled for.
    705 .IP "\fB\-merrors\-to\-file\fR \fI\s-1FILENAME\s0\fR" 4
    706 .IX Item "-merrors-to-file FILENAME"
    707 Redirect error output to a file, for broken systems which don't support such
    708 behaviour in the shell.
    709 .PP
    710 The following options are available when as is configured for
    711 a \s-1MIPS\s0 processor.
    712 .IP "\fB\-G\fR \fInum\fR" 4
    713 .IX Item "-G num"
    714 This option sets the largest size of an object that can be referenced
    715 implicitly with the \f(CW\*(C`gp\*(C'\fR register.  It is only accepted for targets that
    716 use \s-1ECOFF\s0 format, such as a DECstation running Ultrix.  The default value is 8.
    717 .IP "\fB\-EB\fR" 4
    718 .IX Item "-EB"
    719 Generate ``big endian'' format output.
    720 .IP "\fB\-EL\fR" 4
    721 .IX Item "-EL"
    722 Generate ``little endian'' format output.
    723 .IP "\fB\-mips1\fR" 4
    724 .IX Item "-mips1"
    725 .PD 0
    726 .IP "\fB\-mips2\fR" 4
    727 .IX Item "-mips2"
    728 .IP "\fB\-mips3\fR" 4
    729 .IX Item "-mips3"
    730 .IP "\fB\-mips4\fR" 4
    731 .IX Item "-mips4"
    732 .IP "\fB\-mips5\fR" 4
    733 .IX Item "-mips5"
    734 .IP "\fB\-mips32\fR" 4
    735 .IX Item "-mips32"
    736 .IP "\fB\-mips32r2\fR" 4
    737 .IX Item "-mips32r2"
    738 .IP "\fB\-mips64\fR" 4
    739 .IX Item "-mips64"
    740 .PD
    741 Generate code for a particular \s-1MIPS\s0 Instruction Set Architecture level.
    742 \&\fB\-mips1\fR is an alias for \fB\-march=r3000\fR, \fB\-mips2\fR is an
    743 alias for \fB\-march=r6000\fR, \fB\-mips3\fR is an alias for
    744 \&\fB\-march=r4000\fR and \fB\-mips4\fR is an alias for \fB\-march=r8000\fR.
    745 \&\fB\-mips5\fR, \fB\-mips32\fR, \fB\-mips32r2\fR, and \fB\-mips64\fR
    746 correspond to generic
    747 \&\fB\s-1MIPS\s0 V\fR, \fB\s-1MIPS32\s0\fR, \fB\s-1MIPS32\s0 Release 2\fR, and
    748 \&\fB\s-1MIPS64\s0\fR \s-1ISA\s0 processors,
    749 respectively.
    750 .IP "\fB\-march=\fR\fI\s-1CPU\s0\fR" 4
    751 .IX Item "-march=CPU"
    752 Generate code for a particular \s-1MIPS\s0 cpu.
    753 .IP "\fB\-mtune=\fR\fIcpu\fR" 4
    754 .IX Item "-mtune=cpu"
    755 Schedule and tune for a particular \s-1MIPS\s0 cpu.
    756 .IP "\fB\-mfix7000\fR" 4
    757 .IX Item "-mfix7000"
    758 .PD 0
    759 .IP "\fB\-mno\-fix7000\fR" 4
    760 .IX Item "-mno-fix7000"
    761 .PD
    762 Cause nops to be inserted if the read of the destination register
    763 of an mfhi or mflo instruction occurs in the following two instructions.
    764 .IP "\fB\-mdebug\fR" 4
    765 .IX Item "-mdebug"
    766 .PD 0
    767 .IP "\fB\-no\-mdebug\fR" 4
    768 .IX Item "-no-mdebug"
    769 .PD
    770 Cause stabs-style debugging output to go into an ECOFF-style .mdebug
    771 section instead of the standard \s-1ELF\s0 .stabs sections.
    772 .IP "\fB\-mgp32\fR" 4
    773 .IX Item "-mgp32"
    774 .PD 0
    775 .IP "\fB\-mfp32\fR" 4
    776 .IX Item "-mfp32"
    777 .PD
    778 The register sizes are normally inferred from the \s-1ISA\s0 and \s-1ABI\s0, but these
    779 flags force a certain group of registers to be treated as 32 bits wide at
    780 all times.  \fB\-mgp32\fR controls the size of general-purpose registers
    781 and \fB\-mfp32\fR controls the size of floating-point registers.
    782 .IP "\fB\-mips16\fR" 4
    783 .IX Item "-mips16"
    784 .PD 0
    785 .IP "\fB\-no\-mips16\fR" 4
    786 .IX Item "-no-mips16"
    787 .PD
    788 Generate code for the \s-1MIPS\s0 16 processor.  This is equivalent to putting
    789 \&\f(CW\*(C`.set mips16\*(C'\fR at the start of the assembly file.  \fB\-no\-mips16\fR
    790 turns off this option.
    791 .IP "\fB\-mips3d\fR" 4
    792 .IX Item "-mips3d"
    793 .PD 0
    794 .IP "\fB\-no\-mips3d\fR" 4
    795 .IX Item "-no-mips3d"
    796 .PD
    797 Generate code for the \s-1MIPS\-3D\s0 Application Specific Extension.
    798 This tells the assembler to accept \s-1MIPS\-3D\s0 instructions.
    799 \&\fB\-no\-mips3d\fR turns off this option.
    800 .IP "\fB\-mdmx\fR" 4
    801 .IX Item "-mdmx"
    802 .PD 0
    803 .IP "\fB\-no\-mdmx\fR" 4
    804 .IX Item "-no-mdmx"
    805 .PD
    806 Generate code for the \s-1MDMX\s0 Application Specific Extension.
    807 This tells the assembler to accept \s-1MDMX\s0 instructions.
    808 \&\fB\-no\-mdmx\fR turns off this option.
    809 .IP "\fB\-\-construct\-floats\fR" 4
    810 .IX Item "--construct-floats"
    811 .PD 0
    812 .IP "\fB\-\-no\-construct\-floats\fR" 4
    813 .IX Item "--no-construct-floats"
    814 .PD
    815 The \fB\-\-no\-construct\-floats\fR option disables the construction of
    816 double width floating point constants by loading the two halves of the
    817 value into the two single width floating point registers that make up
    818 the double width register.  By default \fB\-\-construct\-floats\fR is
    819 selected, allowing construction of these floating point constants.
    820 .IP "\fB\-\-emulation=\fR\fIname\fR" 4
    821 .IX Item "--emulation=name"
    822 This option causes \fBas\fR to emulate \fBas\fR configured
    823 for some other target, in all respects, including output format (choosing
    824 between \s-1ELF\s0 and \s-1ECOFF\s0 only), handling of pseudo-opcodes which may generate
    825 debugging information or store symbol table information, and default
    826 endianness.  The available configuration names are: \fBmipsecoff\fR,
    827 \&\fBmipself\fR, \fBmipslecoff\fR, \fBmipsbecoff\fR, \fBmipslelf\fR,
    828 \&\fBmipsbelf\fR.  The first two do not alter the default endianness from that
    829 of the primary target for which the assembler was configured; the others change
    830 the default to little\- or big-endian as indicated by the \fBb\fR or \fBl\fR
    831 in the name.  Using \fB\-EB\fR or \fB\-EL\fR will override the endianness
    832 selection in any case.
    833 .Sp
    834 This option is currently supported only when the primary target
    835 \&\fBas\fR is configured for is a \s-1MIPS\s0 \s-1ELF\s0 or \s-1ECOFF\s0 target.
    836 Furthermore, the primary target or others specified with
    837 \&\fB\-\-enable\-targets=...\fR at configuration time must include support for
    838 the other format, if both are to be available.  For example, the Irix 5
    839 configuration includes support for both.
    840 .Sp
    841 Eventually, this option will support more configurations, with more
    842 fine-grained control over the assembler's behavior, and will be supported for
    843 more processors.
    844 .IP "\fB\-nocpp\fR" 4
    845 .IX Item "-nocpp"
    846 \&\fBas\fR ignores this option.  It is accepted for compatibility with
    847 the native tools.
    848 .IP "\fB\-\-trap\fR" 4
    849 .IX Item "--trap"
    850 .PD 0
    851 .IP "\fB\-\-no\-trap\fR" 4
    852 .IX Item "--no-trap"
    853 .IP "\fB\-\-break\fR" 4
    854 .IX Item "--break"
    855 .IP "\fB\-\-no\-break\fR" 4
    856 .IX Item "--no-break"
    857 .PD
    858 Control how to deal with multiplication overflow and division by zero.
    859 \&\fB\-\-trap\fR or \fB\-\-no\-break\fR (which are synonyms) take a trap exception
    860 (and only work for Instruction Set Architecture level 2 and higher);
    861 \&\fB\-\-break\fR or \fB\-\-no\-trap\fR (also synonyms, and the default) take a
    862 break exception.
    863 .IP "\fB\-n\fR" 4
    864 .IX Item "-n"
    865 When this option is used, \fBas\fR will issue a warning every
    866 time it generates a nop instruction from a macro.
    867 .PP
    868 The following options are available when as is configured for
    869 an MCore processor.
    870 .IP "\fB\-jsri2bsr\fR" 4
    871 .IX Item "-jsri2bsr"
    872 .PD 0
    873 .IP "\fB\-nojsri2bsr\fR" 4
    874 .IX Item "-nojsri2bsr"
    875 .PD
    876 Enable or disable the \s-1JSRI\s0 to \s-1BSR\s0 transformation.  By default this is enabled.
    877 The command line option \fB\-nojsri2bsr\fR can be used to disable it.
    878 .IP "\fB\-sifilter\fR" 4
    879 .IX Item "-sifilter"
    880 .PD 0
    881 .IP "\fB\-nosifilter\fR" 4
    882 .IX Item "-nosifilter"
    883 .PD
    884 Enable or disable the silicon filter behaviour.  By default this is disabled.
    885 The default can be overridden by the \fB\-sifilter\fR command line option.
    886 .IP "\fB\-relax\fR" 4
    887 .IX Item "-relax"
    888 Alter jump instructions for long displacements.
    889 .IP "\fB\-mcpu=[210|340]\fR" 4
    890 .IX Item "-mcpu=[210|340]"
    891 Select the cpu type on the target hardware.  This controls which instructions
    892 can be assembled.
    893 .IP "\fB\-EB\fR" 4
    894 .IX Item "-EB"
    895 Assemble for a big endian target.
    896 .IP "\fB\-EL\fR" 4
    897 .IX Item "-EL"
    898 Assemble for a little endian target.
    899 .PP
    900 See the info pages for documentation of the MMIX-specific options.
    901 .PP
    902 The following options are available when as is configured for
    903 an Xtensa processor.
    904 .IP "\fB\-\-density | \-\-no\-density\fR" 4
    905 .IX Item "--density | --no-density"
    906 Enable or disable use of instructions from the Xtensa code density
    907 option.  This is enabled by default when the Xtensa processor supports
    908 the code density option.
    909 .IP "\fB\-\-relax | \-\-no\-relax\fR" 4
    910 .IX Item "--relax | --no-relax"
    911 Enable or disable instruction relaxation.  This is enabled by default.
    912 Note: In the current implementation, these options also control whether
    913 assembler optimizations are performed, making these options equivalent
    914 to \fB\-\-generics\fR and \fB\-\-no\-generics\fR.
    915 .IP "\fB\-\-generics | \-\-no\-generics\fR" 4
    916 .IX Item "--generics | --no-generics"
    917 Enable or disable all assembler transformations of Xtensa instructions.
    918 The default is \fB\-\-generics\fR;
    919 \&\fB\-\-no\-generics\fR should be used only in the rare cases when the
    920 instructions must be exactly as specified in the assembly source.
    921 .IP "\fB\-\-text\-section\-literals | \-\-no\-text\-section\-literals\fR" 4
    922 .IX Item "--text-section-literals | --no-text-section-literals"
    923 With \fB\-\-text\-section\-literals\fR, literal pools are interspersed
    924 in the text section.  The default is
    925 \&\fB\-\-no\-text\-section\-literals\fR, which places literals in a
    926 separate section in the output file.
    927 .IP "\fB\-\-target\-align | \-\-no\-target\-align\fR" 4
    928 .IX Item "--target-align | --no-target-align"
    929 Enable or disable automatic alignment to reduce branch penalties at the
    930 expense of some code density.  The default is \fB\-\-target\-align\fR.
    931 .IP "\fB\-\-longcalls | \-\-no\-longcalls\fR" 4
    932 .IX Item "--longcalls | --no-longcalls"
    933 Enable or disable transformation of call instructions to allow calls
    934 across a greater range of addresses.  The default is
    935 \&\fB\-\-no\-longcalls\fR.
    936 .SH "SEE ALSO"
    937 .IX Header "SEE ALSO"
    938 \&\fIgcc\fR\|(1), \fIld\fR\|(1), and the Info entries for \fIbinutils\fR and \fIld\fR.
    939 .SH "COPYRIGHT"
    940 .IX Header "COPYRIGHT"
    941 Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
    942 .PP
    943 Permission is granted to copy, distribute and/or modify this document
    944 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
    945 or any later version published by the Free Software Foundation;
    946 with no Invariant Sections, with no Front-Cover Texts, and with no
    947 Back-Cover Texts.  A copy of the license is included in the
    948 section entitled ``\s-1GNU\s0 Free Documentation License''.
  • trunk/src/binutils/include/aout/aout64.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r728 r729  
    333333#define N_WEAKD 0x10            /* Weak data symbol.  */
    334334#define N_WEAKB 0x11            /* Weak bss symbol.  */
    335 
    336 /* emx-specific symbols.  */
    337 #define N_IMP1 0x68             /* Import reference (emx specific) */
    338 #define N_IMP2 0x6a             /* Import definition (emx specific) */
    339335
    340336/* Relocations
  • trunk/src/binutils/ld/ld.1

    • Property cvs2svn:cvs-rev changed from 1.1.1.2 to 1.2
    r728 r729  
    1 .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
    2 .\"
    3 .\" Standard preamble:
    4 .\" ========================================================================
    5 .de Sh \" Subsection heading
    6 .br
    7 .if t .Sp
    8 .ne 5
    9 .PP
    10 \fB\\$1\fR
    11 .PP
    12 ..
    13 .de Sp \" Vertical space (when we can't use .PP)
    14 .if t .sp .5v
    15 .if n .sp
    16 ..
    17 .de Vb \" Begin verbatim text
    18 .ft CW
    19 .nf
    20 .ne \\$1
    21 ..
    22 .de Ve \" End verbatim text
    23 .ft R
    24 .fi
    25 ..
    26 .\" Set up some character translations and predefined strings.  \*(-- will
    27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
    28 .\" double quote, and \*(R" will give a right double quote.  | will give a
    29 .\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
    30 .\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
    31 .\" expand to `' in nroff, nothing in troff, for use with C<>.
    32 .tr \(*W-|\(bv\*(Tr
    33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
    34 .ie n \{\
    35 .    ds -- \(*W-
    36 .    ds PI pi
    37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
    38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
    39 .    ds L" ""
    40 .    ds R" ""
    41 .    ds C` ""
    42 .    ds C' ""
    43 'br\}
    44 .el\{\
    45 .    ds -- \|\(em\|
    46 .    ds PI \(*p
    47 .    ds L" ``
    48 .    ds R" ''
    49 'br\}
    50 .\"
    51 .\" If the F register is turned on, we'll generate index entries on stderr for
    52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
    53 .\" entries marked with X<> in POD.  Of course, you'll have to process the
    54 .\" output yourself in some meaningful fashion.
    55 .if \nF \{\
    56 .    de IX
    57 .    tm Index:\\$1\t\\n%\t"\\$2"
    58 ..
    59 .    nr % 0
    60 .    rr F
    61 .\}
    62 .\"
    63 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
    64 .\" way too many mistakes in technical documents.
    65 .hy 0
    66 .\"
    67 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
    68 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
    69 .    \" fudge factors for nroff and troff
    70 .if n \{\
    71 .    ds #H 0
    72 .    ds #V .8m
    73 .    ds #F .3m
    74 .    ds #[ \f1
    75 .    ds #] \fP
    76 .\}
    77 .if t \{\
    78 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
    79 .    ds #V .6m
    80 .    ds #F 0
    81 .    ds #[ \&
    82 .    ds #] \&
    83 .\}
    84 .    \" simple accents for nroff and troff
    85 .if n \{\
    86 .    ds ' \&
    87 .    ds ` \&
    88 .    ds ^ \&
    89 .    ds , \&
    90 .    ds ~ ~
    91 .    ds /
    92 .\}
    93 .if t \{\
    94 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
    95 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
    96 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
    97 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
    98 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
    99 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
    100 .\}
    101 .    \" troff and (daisy-wheel) nroff accents
    102 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
    103 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
    104 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
    105 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
    106 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
    107 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
    108 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
    109 .ds ae a\h'-(\w'a'u*4/10)'e
    110 .ds Ae A\h'-(\w'A'u*4/10)'E
    111 .    \" corrections for vroff
    112 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
    113 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
    114 .    \" for low resolution devices (crt and lpr)
    115 .if \n(.H>23 .if \n(.V>19 \
    116 \{\
    117 .    ds : e
    118 .    ds 8 ss
    119 .    ds o a
    120 .    ds d- d\h'-1'\(ga
    121 .    ds D- D\h'-1'\(hy
    122 .    ds th \o'bp'
    123 .    ds Th \o'LP'
    124 .    ds ae ae
    125 .    ds Ae AE
    126 .\}
    127 .rm #[ #] #H #V #F C
    128 .\" ========================================================================
    129 .\"
    130 .IX Title "LD 1"
    131 .TH LD 1 "2003-06-12" "binutils-2.14" "GNU Development Tools"
    132 .SH "NAME"
    133 ld \- Using LD, the GNU linker
    134 .SH "SYNOPSIS"
    135 .IX Header "SYNOPSIS"
    136 ld [\fBoptions\fR] \fIobjfile\fR ...
    137 .SH "DESCRIPTION"
    138 .IX Header "DESCRIPTION"
    139 \&\fBld\fR combines a number of object and archive files, relocates
    140 their data and ties up symbol references. Usually the last step in
    141 compiling a program is to run \fBld\fR.
    142 .PP
    143 \&\fBld\fR accepts Linker Command Language files written in
    144 a superset of \s-1AT&T\s0's Link Editor Command Language syntax,
    145 to provide explicit and total control over the linking process.
    146 .PP
    147 This man page does not describe the command language; see the
    148 \&\fBld\fR entry in \f(CW\*(C`info\*(C'\fR, or the manual
    149 ld: the \s-1GNU\s0 linker, for full details on the command language and
    150 on other aspects of the \s-1GNU\s0 linker.
    151 .PP
    152 This version of \fBld\fR uses the general purpose \s-1BFD\s0 libraries
    153 to operate on object files. This allows \fBld\fR to read, combine, and
    154 write object files in many different formats\-\-\-for example, \s-1COFF\s0 or
    155 \&\f(CW\*(C`a.out\*(C'\fR.  Different formats may be linked together to produce any
    156 available kind of object file. 
    157 .PP
    158 Aside from its flexibility, the \s-1GNU\s0 linker is more helpful than other
    159 linkers in providing diagnostic information.  Many linkers abandon
    160 execution immediately upon encountering an error; whenever possible,
    161 \&\fBld\fR continues executing, allowing you to identify other errors
    162 (or, in some cases, to get an output file in spite of the error).
    163 .PP
    164 The \s-1GNU\s0 linker \fBld\fR is meant to cover a broad range of situations,
    165 and to be as compatible as possible with other linkers.  As a result,
    166 you have many choices to control its behavior.
    167 .SH "OPTIONS"
    168 .IX Header "OPTIONS"
    169 The linker supports a plethora of command-line options, but in actual
    170 practice few of them are used in any particular context.
    171 For instance, a frequent use of \fBld\fR is to link standard Unix
    172 object files on a standard, supported Unix system.  On such a system, to
    173 link a file \f(CW\*(C`hello.o\*(C'\fR:
    174 .PP
    175 .Vb 1
    176 \&        ld -o <output> /lib/crt0.o hello.o -lc
    177 .Ve
    178 .PP
    179 This tells \fBld\fR to produce a file called \fIoutput\fR as the
    180 result of linking the file \f(CW\*(C`/lib/crt0.o\*(C'\fR with \f(CW\*(C`hello.o\*(C'\fR and
    181 the library \f(CW\*(C`libc.a\*(C'\fR, which will come from the standard search
    182 directories.  (See the discussion of the \fB\-l\fR option below.)
    183 .PP
    184 Some of the command-line options to \fBld\fR may be specified at any
    185 point in the command line.  However, options which refer to files, such
    186 as \fB\-l\fR or \fB\-T\fR, cause the file to be read at the point at
    187 which the option appears in the command line, relative to the object
    188 files and other file options.  Repeating non-file options with a
    189 different argument will either have no further effect, or override prior
    190 occurrences (those further to the left on the command line) of that
    191 option.  Options which may be meaningfully specified more than once are
    192 noted in the descriptions below.
    193 .PP
    194 Non-option arguments are object files or archives which are to be linked
    195 together.  They may follow, precede, or be mixed in with command-line
    196 options, except that an object file argument may not be placed between
    197 an option and its argument.
    198 .PP
    199 Usually the linker is invoked with at least one object file, but you can
    200 specify other forms of binary input files using \fB\-l\fR, \fB\-R\fR,
    201 and the script command language.  If \fIno\fR binary input files at all
    202 are specified, the linker does not produce any output, and issues the
    203 message \fBNo input files\fR.
    204 .PP
    205 If the linker cannot recognize the format of an object file, it will
    206 assume that it is a linker script.  A script specified in this way
    207 augments the main linker script used for the link (either the default
    208 linker script or the one specified by using \fB\-T\fR).  This feature
    209 permits the linker to link against a file which appears to be an object
    210 or an archive, but actually merely defines some symbol values, or uses
    211 \&\f(CW\*(C`INPUT\*(C'\fR or \f(CW\*(C`GROUP\*(C'\fR to load other objects.  Note that
    212 specifying a script in this way merely augments the main linker script;
    213 use the \fB\-T\fR option to replace the default linker script entirely.
    214 .PP
    215 For options whose names are a single letter,
    216 option arguments must either follow the option letter without intervening
    217 whitespace, or be given as separate arguments immediately following the
    218 option that requires them.
    219 .PP
    220 For options whose names are multiple letters, either one dash or two can
    221 precede the option name; for example, \fB\-trace\-symbol\fR and
    222 \&\fB\-\-trace\-symbol\fR are equivalent.  Note\-\-\-there is one exception to
    223 this rule.  Multiple letter options that start with a lower case 'o' can
    224 only be preceeded by two dashes.  This is to reduce confusion with the
    225 \&\fB\-o\fR option.  So for example \fB\-omagic\fR sets the output file
    226 name to \fBmagic\fR whereas \fB\-\-omagic\fR sets the \s-1NMAGIC\s0 flag on the
    227 output.
    228 .PP
    229 Arguments to multiple-letter options must either be separated from the
    230 option name by an equals sign, or be given as separate arguments
    231 immediately following the option that requires them.  For example,
    232 \&\fB\-\-trace\-symbol foo\fR and \fB\-\-trace\-symbol=foo\fR are equivalent.
    233 Unique abbreviations of the names of multiple-letter options are
    234 accepted.
    235 .PP
    236 Note\-\-\-if the linker is being invoked indirectly, via a compiler driver
    237 (e.g. \fBgcc\fR) then all the linker command line options should be
    238 prefixed by \fB\-Wl,\fR (or whatever is appropriate for the particular
    239 compiler driver) like this:
    240 .PP
    241 .Vb 1
    242 \&          gcc -Wl,--startgroup foo.o bar.o -Wl,--endgroup
    243 .Ve
    244 .PP
    245 This is important, because otherwise the compiler driver program may
    246 silently drop the linker options, resulting in a bad link.
    247 .PP
    248 Here is a table of the generic command line switches accepted by the \s-1GNU\s0
    249 linker:
    250 .IP "\fB\-a\fR\fIkeyword\fR" 4
    251 .IX Item "-akeyword"
    252 This option is supported for \s-1HP/UX\s0 compatibility.  The \fIkeyword\fR
    253 argument must be one of the strings \fBarchive\fR, \fBshared\fR, or
    254 \&\fBdefault\fR.  \fB\-aarchive\fR is functionally equivalent to
    255 \&\fB\-Bstatic\fR, and the other two keywords are functionally equivalent
    256 to \fB\-Bdynamic\fR.  This option may be used any number of times.
    257 .IP "\fB\-A\fR\fIarchitecture\fR" 4
    258 .IX Item "-Aarchitecture"
    259 .PD 0
    260 .IP "\fB\-\-architecture=\fR\fIarchitecture\fR" 4
    261 .IX Item "--architecture=architecture"
    262 .PD
    263 In the current release of \fBld\fR, this option is useful only for the
    264 Intel 960 family of architectures.  In that \fBld\fR configuration, the
    265 \&\fIarchitecture\fR argument identifies the particular architecture in
    266 the 960 family, enabling some safeguards and modifying the
    267 archive-library search path. 
    268 .Sp
    269 Future releases of \fBld\fR may support similar functionality for
    270 other architecture families.
    271 .IP "\fB\-b\fR \fIinput-format\fR" 4
    272 .IX Item "-b input-format"
    273 .PD 0
    274 .IP "\fB\-\-format=\fR\fIinput-format\fR" 4
    275 .IX Item "--format=input-format"
    276 .PD
    277 \&\fBld\fR may be configured to support more than one kind of object
    278 file.  If your \fBld\fR is configured this way, you can use the
    279 \&\fB\-b\fR option to specify the binary format for input object files
    280 that follow this option on the command line.  Even when \fBld\fR is
    281 configured to support alternative object formats, you don't usually need
    282 to specify this, as \fBld\fR should be configured to expect as a
    283 default input format the most usual format on each machine.
    284 \&\fIinput-format\fR is a text string, the name of a particular format
    285 supported by the \s-1BFD\s0 libraries.  (You can list the available binary
    286 formats with \fBobjdump \-i\fR.)
    287 .Sp
    288 You may want to use this option if you are linking files with an unusual
    289 binary format.  You can also use \fB\-b\fR to switch formats explicitly (when
    290 linking object files of different formats), by including
    291 \&\fB\-b\fR \fIinput-format\fR before each group of object files in a
    292 particular format.
    293 .Sp
    294 The default format is taken from the environment variable
    295 \&\f(CW\*(C`GNUTARGET\*(C'\fR.
    296 .Sp
    297 You can also define the input format from a script, using the command
    298 \&\f(CW\*(C`TARGET\*(C'\fR;
    299 .IP "\fB\-c\fR \fIMRI-commandfile\fR" 4
    300 .IX Item "-c MRI-commandfile"
    301 .PD 0
    302 .IP "\fB\-\-mri\-script=\fR\fIMRI-commandfile\fR" 4
    303 .IX Item "--mri-script=MRI-commandfile"
    304 .PD
    305 For compatibility with linkers produced by \s-1MRI\s0, \fBld\fR accepts script
    306 files written in an alternate, restricted command language, described in
    307 the \s-1MRI\s0 Compatible Script Files section of \s-1GNU\s0 ld documentation.
    308 Introduce \s-1MRI\s0 script files with
    309 the option \fB\-c\fR; use the \fB\-T\fR option to run linker
    310 scripts written in the general-purpose \fBld\fR scripting language.
    311 If \fIMRI-cmdfile\fR does not exist, \fBld\fR looks for it in the directories
    312 specified by any \fB\-L\fR options.
    313 .IP "\fB\-d\fR" 4
    314 .IX Item "-d"
    315 .PD 0
    316 .IP "\fB\-dc\fR" 4
    317 .IX Item "-dc"
    318 .IP "\fB\-dp\fR" 4
    319 .IX Item "-dp"
    320 .PD
    321 These three options are equivalent; multiple forms are supported for
    322 compatibility with other linkers.  They assign space to common symbols
    323 even if a relocatable output file is specified (with \fB\-r\fR).  The
    324 script command \f(CW\*(C`FORCE_COMMON_ALLOCATION\*(C'\fR has the same effect.
    325 .IP "\fB\-e\fR \fIentry\fR" 4
    326 .IX Item "-e entry"
    327 .PD 0
    328 .IP "\fB\-\-entry=\fR\fIentry\fR" 4
    329 .IX Item "--entry=entry"
    330 .PD
    331 Use \fIentry\fR as the explicit symbol for beginning execution of your
    332 program, rather than the default entry point.  If there is no symbol
    333 named \fIentry\fR, the linker will try to parse \fIentry\fR as a number,
    334 and use that as the entry address (the number will be interpreted in
    335 base 10; you may use a leading \fB0x\fR for base 16, or a leading
    336 \&\fB0\fR for base 8). 
    337 .IP "\fB\-E\fR" 4
    338 .IX Item "-E"
    339 .PD 0
    340 .IP "\fB\-\-export\-dynamic\fR" 4
    341 .IX Item "--export-dynamic"
    342 .PD
    343 When creating a dynamically linked executable, add all symbols to the
    344 dynamic symbol table.  The dynamic symbol table is the set of symbols
    345 which are visible from dynamic objects at run time.
    346 .Sp
    347 If you do not use this option, the dynamic symbol table will normally
    348 contain only those symbols which are referenced by some dynamic object
    349 mentioned in the link.
    350 .Sp
    351 If you use \f(CW\*(C`dlopen\*(C'\fR to load a dynamic object which needs to refer
    352 back to the symbols defined by the program, rather than some other
    353 dynamic object, then you will probably need to use this option when
    354 linking the program itself.
    355 .Sp
    356 You can also use the version script to control what symbols should
    357 be added to the dynamic symbol table if the output format supports it.
    358 See the description of \fB\-\-version\-script\fR in \f(CW@ref\fR{\s-1VERSION\s0}.
    359 .IP "\fB\-EB\fR" 4
    360 .IX Item "-EB"
    361 Link big-endian objects.  This affects the default output format.
    362 .IP "\fB\-EL\fR" 4
    363 .IX Item "-EL"
    364 Link little-endian objects.  This affects the default output format.
    365 .IP "\fB\-f\fR" 4
    366 .IX Item "-f"
    367 .PD 0
    368 .IP "\fB\-\-auxiliary\fR \fIname\fR" 4
    369 .IX Item "--auxiliary name"
    370 .PD
    371 When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_AUXILIARY\s0 field
    372 to the specified name.  This tells the dynamic linker that the symbol
    373 table of the shared object should be used as an auxiliary filter on the
    374 symbol table of the shared object \fIname\fR.
    375 .Sp
    376 If you later link a program against this filter object, then, when you
    377 run the program, the dynamic linker will see the \s-1DT_AUXILIARY\s0 field.  If
    378 the dynamic linker resolves any symbols from the filter object, it will
    379 first check whether there is a definition in the shared object
    380 \&\fIname\fR.  If there is one, it will be used instead of the definition
    381 in the filter object.  The shared object \fIname\fR need not exist.
    382 Thus the shared object \fIname\fR may be used to provide an alternative
    383 implementation of certain functions, perhaps for debugging or for
    384 machine specific performance.
    385 .Sp
    386 This option may be specified more than once.  The \s-1DT_AUXILIARY\s0 entries
    387 will be created in the order in which they appear on the command line.
    388 .IP "\fB\-F\fR \fIname\fR" 4
    389 .IX Item "-F name"
    390 .PD 0
    391 .IP "\fB\-\-filter\fR \fIname\fR" 4
    392 .IX Item "--filter name"
    393 .PD
    394 When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_FILTER\s0 field to
    395 the specified name.  This tells the dynamic linker that the symbol table
    396 of the shared object which is being created should be used as a filter
    397 on the symbol table of the shared object \fIname\fR.
    398 .Sp
    399 If you later link a program against this filter object, then, when you
    400 run the program, the dynamic linker will see the \s-1DT_FILTER\s0 field.  The
    401 dynamic linker will resolve symbols according to the symbol table of the
    402 filter object as usual, but it will actually link to the definitions
    403 found in the shared object \fIname\fR.  Thus the filter object can be
    404 used to select a subset of the symbols provided by the object
    405 \&\fIname\fR.
    406 .Sp
    407 Some older linkers used the \fB\-F\fR option throughout a compilation
    408 toolchain for specifying object-file format for both input and output
    409 object files.
    410 The \s-1GNU\s0 linker uses other mechanisms for this purpose: the
    411 \&\fB\-b\fR, \fB\-\-format\fR, \fB\-\-oformat\fR options, the
    412 \&\f(CW\*(C`TARGET\*(C'\fR command in linker scripts, and the \f(CW\*(C`GNUTARGET\*(C'\fR
    413 environment variable.
    414 The \s-1GNU\s0 linker will ignore the \fB\-F\fR option when not
    415 creating an \s-1ELF\s0 shared object.
    416 .IP "\fB\-fini\fR \fIname\fR" 4
    417 .IX Item "-fini name"
    418 When creating an \s-1ELF\s0 executable or shared object, call \s-1NAME\s0 when the
    419 executable or shared object is unloaded, by setting \s-1DT_FINI\s0 to the
    420 address of the function.  By default, the linker uses \f(CW\*(C`_fini\*(C'\fR as
    421 the function to call.
    422 .IP "\fB\-g\fR" 4
    423 .IX Item "-g"
    424 Ignored.  Provided for compatibility with other tools.
    425 .IP "\fB\-G\fR\fIvalue\fR" 4
    426 .IX Item "-Gvalue"
    427 .PD 0
    428 .IP "\fB\-\-gpsize=\fR\fIvalue\fR" 4
    429 .IX Item "--gpsize=value"
    430 .PD
    431 Set the maximum size of objects to be optimized using the \s-1GP\s0 register to
    432 \&\fIsize\fR.  This is only meaningful for object file formats such as
    433 \&\s-1MIPS\s0 \s-1ECOFF\s0 which supports putting large and small objects into different
    434 sections.  This is ignored for other object file formats.
    435 .IP "\fB\-h\fR\fIname\fR" 4
    436 .IX Item "-hname"
    437 .PD 0
    438 .IP "\fB\-soname=\fR\fIname\fR" 4
    439 .IX Item "-soname=name"
    440 .PD
    441 When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_SONAME\s0 field to
    442 the specified name.  When an executable is linked with a shared object
    443 which has a \s-1DT_SONAME\s0 field, then when the executable is run the dynamic
    444 linker will attempt to load the shared object specified by the \s-1DT_SONAME\s0
    445 field rather than the using the file name given to the linker.
    446 .IP "\fB\-i\fR" 4
    447 .IX Item "-i"
    448 Perform an incremental link (same as option \fB\-r\fR).
    449 .IP "\fB\-init\fR \fIname\fR" 4
    450 .IX Item "-init name"
    451 When creating an \s-1ELF\s0 executable or shared object, call \s-1NAME\s0 when the
    452 executable or shared object is loaded, by setting \s-1DT_INIT\s0 to the address
    453 of the function.  By default, the linker uses \f(CW\*(C`_init\*(C'\fR as the
    454 function to call.
    455 .IP "\fB\-l\fR\fIarchive\fR" 4
    456 .IX Item "-larchive"
    457 .PD 0
    458 .IP "\fB\-\-library=\fR\fIarchive\fR" 4
    459 .IX Item "--library=archive"
    460 .PD
    461 Add archive file \fIarchive\fR to the list of files to link.  This
    462 option may be used any number of times.  \fBld\fR will search its
    463 path-list for occurrences of \f(CW\*(C`lib\f(CIarchive\f(CW.a\*(C'\fR for every
    464 \&\fIarchive\fR specified.
    465 .Sp
    466 On systems which support shared libraries, \fBld\fR may also search for
    467 libraries with extensions other than \f(CW\*(C`.a\*(C'\fR.  Specifically, on \s-1ELF\s0
    468 and SunOS systems, \fBld\fR will search a directory for a library with
    469 an extension of \f(CW\*(C`.so\*(C'\fR before searching for one with an extension of
    470 \&\f(CW\*(C`.a\*(C'\fR.  By convention, a \f(CW\*(C`.so\*(C'\fR extension indicates a shared
    471 library.
    472 .Sp
    473 The linker will search an archive only once, at the location where it is
    474 specified on the command line.  If the archive defines a symbol which
    475 was undefined in some object which appeared before the archive on the
    476 command line, the linker will include the appropriate file(s) from the
    477 archive.  However, an undefined symbol in an object appearing later on
    478 the command line will not cause the linker to search the archive again.
    479 .Sp
    480 See the \fB\-(\fR option for a way to force the linker to search
    481 archives multiple times.
    482 .Sp
    483 You may list the same archive multiple times on the command line.
    484 .Sp
    485 This type of archive searching is standard for Unix linkers.  However,
    486 if you are using \fBld\fR on \s-1AIX\s0, note that it is different from the
    487 behaviour of the \s-1AIX\s0 linker.
    488 .IP "\fB\-L\fR\fIsearchdir\fR" 4
    489 .IX Item "-Lsearchdir"
    490 .PD 0
    491 .IP "\fB\-\-library\-path=\fR\fIsearchdir\fR" 4
    492 .IX Item "--library-path=searchdir"
    493 .PD
    494 Add path \fIsearchdir\fR to the list of paths that \fBld\fR will search
    495 for archive libraries and \fBld\fR control scripts.  You may use this
    496 option any number of times.  The directories are searched in the order
    497 in which they are specified on the command line.  Directories specified
    498 on the command line are searched before the default directories.  All
    499 \&\fB\-L\fR options apply to all \fB\-l\fR options, regardless of the
    500 order in which the options appear.
    501 .Sp
    502 If \fIsearchdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
    503 by the \fIsysroot prefix\fR, a path specified when the linker is configured.
    504 .Sp
    505 The default set of paths searched (without being specified with
    506 \&\fB\-L\fR) depends on which emulation mode \fBld\fR is using, and in
    507 some cases also on how it was configured. 
    508 .Sp
    509 The paths can also be specified in a link script with the
    510 \&\f(CW\*(C`SEARCH_DIR\*(C'\fR command.  Directories specified this way are searched
    511 at the point in which the linker script appears in the command line.
    512 .IP "\fB\-m\fR\fIemulation\fR" 4
    513 .IX Item "-memulation"
    514 Emulate the \fIemulation\fR linker.  You can list the available
    515 emulations with the \fB\-\-verbose\fR or \fB\-V\fR options.
    516 .Sp
    517 If the \fB\-m\fR option is not used, the emulation is taken from the
    518 \&\f(CW\*(C`LDEMULATION\*(C'\fR environment variable, if that is defined.
    519 .Sp
    520 Otherwise, the default emulation depends upon how the linker was
    521 configured.
    522 .IP "\fB\-M\fR" 4
    523 .IX Item "-M"
    524 .PD 0
    525 .IP "\fB\-\-print\-map\fR" 4
    526 .IX Item "--print-map"
    527 .PD
    528 Print a link map to the standard output.  A link map provides
    529 information about the link, including the following:
    530 .RS 4
    531 .IP "\(bu" 4
    532 Where object files and symbols are mapped into memory.
    533 .IP "\(bu" 4
    534 How common symbols are allocated.
    535 .IP "\(bu" 4
    536 All archive members included in the link, with a mention of the symbol
    537 which caused the archive member to be brought in.
    538 .RE
    539 .RS 4
    540 .RE
    541 .IP "\fB\-n\fR" 4
    542 .IX Item "-n"
    543 .PD 0
    544 .IP "\fB\-\-nmagic\fR" 4
    545 .IX Item "--nmagic"
    546 .PD
    547 Turn off page alignment of sections, and mark the output as
    548 \&\f(CW\*(C`NMAGIC\*(C'\fR if possible.
    549 .IP "\fB\-N\fR" 4
    550 .IX Item "-N"
    551 .PD 0
    552 .IP "\fB\-\-omagic\fR" 4
    553 .IX Item "--omagic"
    554 .PD
    555 Set the text and data sections to be readable and writable.  Also, do
    556 not page-align the data segment, and disable linking against shared
    557 libraries.  If the output format supports Unix style magic numbers,
    558 mark the output as \f(CW\*(C`OMAGIC\*(C'\fR.
    559 .IP "\fB\-\-no\-omagic\fR" 4
    560 .IX Item "--no-omagic"
    561 This option negates most of the effects of the \fB\-N\fR option.  It
    562 sets the text section to be read\-only, and forces the data segment to
    563 be page\-aligned.  Note \- this option does not enable linking against
    564 shared libraries.  Use \fB\-Bdynamic\fR for this.
    565 .IP "\fB\-o\fR \fIoutput\fR" 4
    566 .IX Item "-o output"
    567 .PD 0
    568 .IP "\fB\-\-output=\fR\fIoutput\fR" 4
    569 .IX Item "--output=output"
    570 .PD
    571 Use \fIoutput\fR as the name for the program produced by \fBld\fR; if this
    572 option is not specified, the name \fIa.out\fR is used by default.  The
    573 script command \f(CW\*(C`OUTPUT\*(C'\fR can also specify the output file name.
    574 .IP "\fB\-O\fR \fIlevel\fR" 4
    575 .IX Item "-O level"
    576 If \fIlevel\fR is a numeric values greater than zero \fBld\fR optimizes
    577 the output.  This might take significantly longer and therefore probably
    578 should only be enabled for the final binary.
    579 .IP "\fB\-q\fR" 4
    580 .IX Item "-q"
    581 .PD 0
    582 .IP "\fB\-\-emit\-relocs\fR" 4
    583 .IX Item "--emit-relocs"
    584 .PD
    585 Leave relocation sections and contents in fully linked exececutables.
    586 Post link analysis and optimization tools may need this information in
    587 order to perform correct modifications of executables.  This results
    588 in larger executables.
    589 .Sp
    590 This option is currently only supported on \s-1ELF\s0 platforms.
    591 .IP "\fB\-r\fR" 4
    592 .IX Item "-r"
    593 .PD 0
    594 .IP "\fB\-\-relocateable\fR" 4
    595 .IX Item "--relocateable"
    596 .PD
    597 Generate relocatable output\-\-\-i.e., generate an output file that can in
    598 turn serve as input to \fBld\fR.  This is often called \fIpartial
    599 linking\fR.  As a side effect, in environments that support standard Unix
    600 magic numbers, this option also sets the output file's magic number to
    601 \&\f(CW\*(C`OMAGIC\*(C'\fR.
    602 If this option is not specified, an absolute file is produced.  When
    603 linking \*(C+ programs, this option \fIwill not\fR resolve references to
    604 constructors; to do that, use \fB\-Ur\fR.
    605 .Sp
    606 When an input file does not have the same format as the output file,
    607 partial linking is only supported if that input file does not contain any
    608 relocations.  Different output formats can have further restrictions; for
    609 example some \f(CW\*(C`a.out\*(C'\fR\-based formats do not support partial linking
    610 with input files in other formats at all.
    611 .Sp
    612 This option does the same thing as \fB\-i\fR.
    613 .IP "\fB\-R\fR \fIfilename\fR" 4
    614 .IX Item "-R filename"
    615 .PD 0
    616 .IP "\fB\-\-just\-symbols=\fR\fIfilename\fR" 4
    617 .IX Item "--just-symbols=filename"
    618 .PD
    619 Read symbol names and their addresses from \fIfilename\fR, but do not
    620 relocate it or include it in the output.  This allows your output file
    621 to refer symbolically to absolute locations of memory defined in other
    622 programs.  You may use this option more than once.
    623 .Sp
    624 For compatibility with other \s-1ELF\s0 linkers, if the \fB\-R\fR option is
    625 followed by a directory name, rather than a file name, it is treated as
    626 the \fB\-rpath\fR option.
    627 .IP "\fB\-s\fR" 4
    628 .IX Item "-s"
    629 .PD 0
    630 .IP "\fB\-\-strip\-all\fR" 4
    631 .IX Item "--strip-all"
    632 .PD
    633 Omit all symbol information from the output file.
    634 .IP "\fB\-S\fR" 4
    635 .IX Item "-S"
    636 .PD 0
    637 .IP "\fB\-\-strip\-debug\fR" 4
    638 .IX Item "--strip-debug"
    639 .PD
    640 Omit debugger symbol information (but not all symbols) from the output file.
    641 .IP "\fB\-t\fR" 4
    642 .IX Item "-t"
    643 .PD 0
    644 .IP "\fB\-\-trace\fR" 4
    645 .IX Item "--trace"
    646 .PD
    647 Print the names of the input files as \fBld\fR processes them.
    648 .IP "\fB\-T\fR \fIscriptfile\fR" 4
    649 .IX Item "-T scriptfile"
    650 .PD 0
    651 .IP "\fB\-\-script=\fR\fIscriptfile\fR" 4
    652 .IX Item "--script=scriptfile"
    653 .PD
    654 Use \fIscriptfile\fR as the linker script.  This script replaces
    655 \&\fBld\fR's default linker script (rather than adding to it), so
    656 \&\fIcommandfile\fR must specify everything necessary to describe the
    657 output file.    If \fIscriptfile\fR does not exist in
    658 the current directory, \f(CW\*(C`ld\*(C'\fR looks for it in the directories
    659 specified by any preceding \fB\-L\fR options.  Multiple \fB\-T\fR
    660 options accumulate.
    661 .IP "\fB\-u\fR \fIsymbol\fR" 4
    662 .IX Item "-u symbol"
    663 .PD 0
    664 .IP "\fB\-\-undefined=\fR\fIsymbol\fR" 4
    665 .IX Item "--undefined=symbol"
    666 .PD
    667 Force \fIsymbol\fR to be entered in the output file as an undefined
    668 symbol.  Doing this may, for example, trigger linking of additional
    669 modules from standard libraries.  \fB\-u\fR may be repeated with
    670 different option arguments to enter additional undefined symbols.  This
    671 option is equivalent to the \f(CW\*(C`EXTERN\*(C'\fR linker script command.
    672 .IP "\fB\-Ur\fR" 4
    673 .IX Item "-Ur"
    674 For anything other than \*(C+ programs, this option is equivalent to
    675 \&\fB\-r\fR: it generates relocatable output\-\-\-i.e., an output file that can in
    676 turn serve as input to \fBld\fR.  When linking \*(C+ programs, \fB\-Ur\fR
    677 \&\fIdoes\fR resolve references to constructors, unlike \fB\-r\fR.
    678 It does not work to use \fB\-Ur\fR on files that were themselves linked
    679 with \fB\-Ur\fR; once the constructor table has been built, it cannot
    680 be added to.  Use \fB\-Ur\fR only for the last partial link, and
    681 \&\fB\-r\fR for the others.
    682 .IP "\fB\-\-unique[=\fR\fI\s-1SECTION\s0\fR\fB]\fR" 4
    683 .IX Item "--unique[=SECTION]"
    684 Creates a separate output section for every input section matching
    685 \&\fI\s-1SECTION\s0\fR, or if the optional wildcard \fI\s-1SECTION\s0\fR argument is
    686 missing, for every orphan input section.  An orphan section is one not
    687 specifically mentioned in a linker script.  You may use this option
    688 multiple times on the command line;  It prevents the normal merging of
    689 input sections with the same name, overriding output section assignments
    690 in a linker script.
    691 .IP "\fB\-v\fR" 4
    692 .IX Item "-v"
    693 .PD 0
    694 .IP "\fB\-\-version\fR" 4
    695 .IX Item "--version"
    696 .IP "\fB\-V\fR" 4
    697 .IX Item "-V"
    698 .PD
    699 Display the version number for \fBld\fR.  The \fB\-V\fR option also
    700 lists the supported emulations.
    701 .IP "\fB\-x\fR" 4
    702 .IX Item "-x"
    703 .PD 0
    704 .IP "\fB\-\-discard\-all\fR" 4
    705 .IX Item "--discard-all"
    706 .PD
    707 Delete all local symbols.
    708 .IP "\fB\-X\fR" 4
    709 .IX Item "-X"
    710 .PD 0
    711 .IP "\fB\-\-discard\-locals\fR" 4
    712 .IX Item "--discard-locals"
    713 .PD
    714 Delete all temporary local symbols.  For most targets, this is all local
    715 symbols whose names begin with \fBL\fR.
    716 .IP "\fB\-y\fR \fIsymbol\fR" 4
    717 .IX Item "-y symbol"
    718 .PD 0
    719 .IP "\fB\-\-trace\-symbol=\fR\fIsymbol\fR" 4
    720 .IX Item "--trace-symbol=symbol"
    721 .PD
    722 Print the name of each linked file in which \fIsymbol\fR appears.  This
    723 option may be given any number of times.  On many systems it is necessary
    724 to prepend an underscore.
    725 .Sp
    726 This option is useful when you have an undefined symbol in your link but
    727 don't know where the reference is coming from.
    728 .IP "\fB\-Y\fR \fIpath\fR" 4
    729 .IX Item "-Y path"
    730 Add \fIpath\fR to the default library search path.  This option exists
    731 for Solaris compatibility.
    732 .IP "\fB\-z\fR \fIkeyword\fR" 4
    733 .IX Item "-z keyword"
    734 The recognized keywords are \f(CW\*(C`initfirst\*(C'\fR, \f(CW\*(C`interpose\*(C'\fR,
    735 \&\f(CW\*(C`loadfltr\*(C'\fR, \f(CW\*(C`nodefaultlib\*(C'\fR, \f(CW\*(C`nodelete\*(C'\fR, \f(CW\*(C`nodlopen\*(C'\fR,
    736 \&\f(CW\*(C`nodump\*(C'\fR, \f(CW\*(C`now\*(C'\fR, \f(CW\*(C`origin\*(C'\fR, \f(CW\*(C`combreloc\*(C'\fR, \f(CW\*(C`nocombreloc\*(C'\fR
    737 and \f(CW\*(C`nocopyreloc\*(C'\fR.
    738 The other keywords are
    739 ignored for Solaris compatibility. \f(CW\*(C`initfirst\*(C'\fR marks the object
    740 to be initialized first at runtime before any other objects.
    741 \&\f(CW\*(C`interpose\*(C'\fR marks the object that its symbol table interposes
    742 before all symbols but the primary executable. \f(CW\*(C`loadfltr\*(C'\fR marks
    743 the object that its filtees be processed immediately at runtime.
    744 \&\f(CW\*(C`nodefaultlib\*(C'\fR marks the object that the search for dependencies
    745 of this object will ignore any default library search paths.
    746 \&\f(CW\*(C`nodelete\*(C'\fR marks the object shouldn't be unloaded at runtime.
    747 \&\f(CW\*(C`nodlopen\*(C'\fR marks the object not available to \f(CW\*(C`dlopen\*(C'\fR.
    748 \&\f(CW\*(C`nodump\*(C'\fR marks the object can not be dumped by \f(CW\*(C`dldump\*(C'\fR.
    749 \&\f(CW\*(C`now\*(C'\fR marks the object with the non-lazy runtime binding.
    750 \&\f(CW\*(C`origin\*(C'\fR marks the object may contain \f(CW$ORIGIN\fR.
    751 \&\f(CW\*(C`defs\*(C'\fR disallows undefined symbols.
    752 \&\f(CW\*(C`muldefs\*(C'\fR allows multiple definitions.
    753 \&\f(CW\*(C`combreloc\*(C'\fR combines multiple reloc sections and sorts them
    754 to make dynamic symbol lookup caching possible.
    755 \&\f(CW\*(C`nocombreloc\*(C'\fR disables multiple reloc sections combining.
    756 \&\f(CW\*(C`nocopyreloc\*(C'\fR disables production of copy relocs.
    757 .IP "\fB\-(\fR \fIarchives\fR \fB\-)\fR" 4
    758 .IX Item "-( archives -)"
    759 .PD 0
    760 .IP "\fB\-\-start\-group\fR \fIarchives\fR \fB\-\-end\-group\fR" 4
    761 .IX Item "--start-group archives --end-group"
    762 .PD
    763 The \fIarchives\fR should be a list of archive files.  They may be
    764 either explicit file names, or \fB\-l\fR options.
    765 .Sp
    766 The specified archives are searched repeatedly until no new undefined
    767 references are created.  Normally, an archive is searched only once in
    768 the order that it is specified on the command line.  If a symbol in that
    769 archive is needed to resolve an undefined symbol referred to by an
    770 object in an archive that appears later on the command line, the linker
    771 would not be able to resolve that reference.  By grouping the archives,
    772 they all be searched repeatedly until all possible references are
    773 resolved.
    774 .Sp
    775 Using this option has a significant performance cost.  It is best to use
    776 it only when there are unavoidable circular references between two or
    777 more archives.
    778 .IP "\fB\-\-accept\-unknown\-input\-arch\fR" 4
    779 .IX Item "--accept-unknown-input-arch"
    780 .PD 0
    781 .IP "\fB\-\-no\-accept\-unknown\-input\-arch\fR" 4
    782 .IX Item "--no-accept-unknown-input-arch"
    783 .PD
    784 Tells the linker to accept input files whose architecture cannot be
    785 recognised.  The assumption is that the user knows what they are doing
    786 and deliberately wants to link in these unknown input files.  This was
    787 the default behaviour of the linker, before release 2.14.  The default
    788 behaviour from release 2.14 onwards is to reject such input files, and
    789 so the \fB\-\-accept\-unknown\-input\-arch\fR option has been added to
    790 restore the old behaviour.
    791 .IP "\fB\-assert\fR \fIkeyword\fR" 4
    792 .IX Item "-assert keyword"
    793 This option is ignored for SunOS compatibility.
    794 .IP "\fB\-Bdynamic\fR" 4
    795 .IX Item "-Bdynamic"
    796 .PD 0
    797 .IP "\fB\-dy\fR" 4
    798 .IX Item "-dy"
    799 .IP "\fB\-call_shared\fR" 4
    800 .IX Item "-call_shared"
    801 .PD
    802 Link against dynamic libraries.  This is only meaningful on platforms
    803 for which shared libraries are supported.  This option is normally the
    804 default on such platforms.  The different variants of this option are
    805 for compatibility with various systems.  You may use this option
    806 multiple times on the command line: it affects library searching for
    807 \&\fB\-l\fR options which follow it.
    808 .IP "\fB\-Bgroup\fR" 4
    809 .IX Item "-Bgroup"
    810 Set the \f(CW\*(C`DF_1_GROUP\*(C'\fR flag in the \f(CW\*(C`DT_FLAGS_1\*(C'\fR entry in the dynamic
    811 section.  This causes the runtime linker to handle lookups in this
    812 object and its dependencies to be performed only inside the group.
    813 \&\fB\-\-no\-undefined\fR is implied.  This option is only meaningful on \s-1ELF\s0
    814 platforms which support shared libraries.
    815 .IP "\fB\-Bstatic\fR" 4
    816 .IX Item "-Bstatic"
    817 .PD 0
    818 .IP "\fB\-dn\fR" 4
    819 .IX Item "-dn"
    820 .IP "\fB\-non_shared\fR" 4
    821 .IX Item "-non_shared"
    822 .IP "\fB\-static\fR" 4
    823 .IX Item "-static"
    824 .PD
    825 Do not link against shared libraries.  This is only meaningful on
    826 platforms for which shared libraries are supported.  The different
    827 variants of this option are for compatibility with various systems.  You
    828 may use this option multiple times on the command line: it affects
    829 library searching for \fB\-l\fR options which follow it.
    830 .IP "\fB\-Bsymbolic\fR" 4
    831 .IX Item "-Bsymbolic"
    832 When creating a shared library, bind references to global symbols to the
    833 definition within the shared library, if any.  Normally, it is possible
    834 for a program linked against a shared library to override the definition
    835 within the shared library.  This option is only meaningful on \s-1ELF\s0
    836 platforms which support shared libraries.
    837 .IP "\fB\-\-check\-sections\fR" 4
    838 .IX Item "--check-sections"
    839 .PD 0
    840 .IP "\fB\-\-no\-check\-sections\fR" 4
    841 .IX Item "--no-check-sections"
    842 .PD
    843 Asks the linker \fInot\fR to check section addresses after they have
    844 been assigned to see if there any overlaps.  Normally the linker will
    845 perform this check, and if it finds any overlaps it will produce
    846 suitable error messages.  The linker does know about, and does make
    847 allowances for sections in overlays.  The default behaviour can be
    848 restored by using the command line switch \fB\-\-check\-sections\fR.
    849 .IP "\fB\-\-cref\fR" 4
    850 .IX Item "--cref"
    851 Output a cross reference table.  If a linker map file is being
    852 generated, the cross reference table is printed to the map file.
    853 Otherwise, it is printed on the standard output.
    854 .Sp
    855 The format of the table is intentionally simple, so that it may be
    856 easily processed by a script if necessary.  The symbols are printed out,
    857 sorted by name.  For each symbol, a list of file names is given.  If the
    858 symbol is defined, the first file listed is the location of the
    859 definition.  The remaining files contain references to the symbol.
    860 .IP "\fB\-\-no\-define\-common\fR" 4
    861 .IX Item "--no-define-common"
    862 This option inhibits the assignment of addresses to common symbols.
    863 The script command \f(CW\*(C`INHIBIT_COMMON_ALLOCATION\*(C'\fR has the same effect.
    864 .Sp
    865 The \fB\-\-no\-define\-common\fR option allows decoupling
    866 the decision to assign addresses to Common symbols from the choice
    867 of the output file type; otherwise a non-Relocatable output type
    868 forces assigning addresses to Common symbols.
    869 Using \fB\-\-no\-define\-common\fR allows Common symbols that are referenced
    870 from a shared library to be assigned addresses only in the main program.
    871 This eliminates the unused duplicate space in the shared library,
    872 and also prevents any possible confusion over resolving to the wrong
    873 duplicate when there are many dynamic modules with specialized search
    874 paths for runtime symbol resolution.
    875 .IP "\fB\-\-defsym\fR \fIsymbol\fR\fB=\fR\fIexpression\fR" 4
    876 .IX Item "--defsym symbol=expression"
    877 Create a global symbol in the output file, containing the absolute
    878 address given by \fIexpression\fR.  You may use this option as many
    879 times as necessary to define multiple symbols in the command line.  A
    880 limited form of arithmetic is supported for the \fIexpression\fR in this
    881 context: you may give a hexadecimal constant or the name of an existing
    882 symbol, or use \f(CW\*(C`+\*(C'\fR and \f(CW\*(C`\-\*(C'\fR to add or subtract hexadecimal
    883 constants or symbols.  If you need more elaborate expressions, consider
    884 using the linker command language from a script.  \fINote:\fR there should be no white
    885 space between \fIsymbol\fR, the equals sign (``\fB=\fR''), and
    886 \&\fIexpression\fR.
    887 .IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4
    888 .IX Item "--demangle[=style]"
    889 .PD 0
    890 .IP "\fB\-\-no\-demangle\fR" 4
    891 .IX Item "--no-demangle"
    892 .PD
    893 These options control whether to demangle symbol names in error messages
    894 and other output.  When the linker is told to demangle, it tries to
    895 present symbol names in a readable fashion: it strips leading
    896 underscores if they are used by the object file format, and converts \*(C+
    897 mangled symbol names into user readable names.  Different compilers have
    898 different mangling styles.  The optional demangling style argument can be used
    899 to choose an appropriate demangling style for your compiler.  The linker will
    900 demangle by default unless the environment variable \fB\s-1COLLECT_NO_DEMANGLE\s0\fR
    901 is set.  These options may be used to override the default.
    902 .IP "\fB\-\-dynamic\-linker\fR \fIfile\fR" 4
    903 .IX Item "--dynamic-linker file"
    904 Set the name of the dynamic linker.  This is only meaningful when
    905 generating dynamically linked \s-1ELF\s0 executables.  The default dynamic
    906 linker is normally correct; don't use this unless you know what you are
    907 doing.
    908 .IP "\fB\-\-embedded\-relocs\fR" 4
    909 .IX Item "--embedded-relocs"
    910 This option is only meaningful when linking \s-1MIPS\s0 embedded \s-1PIC\s0 code,
    911 generated by the \-membedded\-pic option to the \s-1GNU\s0 compiler and
    912 assembler.  It causes the linker to create a table which may be used at
    913 runtime to relocate any data which was statically initialized to pointer
    914 values.  See the code in testsuite/ld\-empic for details.
    915 .IP "\fB\-\-fatal\-warnings\fR" 4
    916 .IX Item "--fatal-warnings"
    917 Treat all warnings as errors.
    918 .IP "\fB\-\-force\-exe\-suffix\fR" 4
    919 .IX Item "--force-exe-suffix"
    920 Make sure that an output file has a .exe suffix.
    921 .Sp
    922 If a successfully built fully linked output file does not have a
    923 \&\f(CW\*(C`.exe\*(C'\fR or \f(CW\*(C`.dll\*(C'\fR suffix, this option forces the linker to copy
    924 the output file to one of the same name with a \f(CW\*(C`.exe\*(C'\fR suffix. This
    925 option is useful when using unmodified Unix makefiles on a Microsoft
    926 Windows host, since some versions of Windows won't run an image unless
    927 it ends in a \f(CW\*(C`.exe\*(C'\fR suffix.
    928 .IP "\fB\-\-no\-gc\-sections\fR" 4
    929 .IX Item "--no-gc-sections"
    930 .PD 0
    931 .IP "\fB\-\-gc\-sections\fR" 4
    932 .IX Item "--gc-sections"
    933 .PD
    934 Enable garbage collection of unused input sections.  It is ignored on
    935 targets that do not support this option.  This option is not compatible
    936 with \fB\-r\fR, nor should it be used with dynamic linking.  The default
    937 behaviour (of not performing this garbage collection) can be restored by
    938 specifying \fB\-\-no\-gc\-sections\fR on the command line.
    939 .IP "\fB\-\-help\fR" 4
    940 .IX Item "--help"
    941 Print a summary of the command-line options on the standard output and exit.
    942 .IP "\fB\-\-target\-help\fR" 4
    943 .IX Item "--target-help"
    944 Print a summary of all target specific options on the standard output and exit.
    945 .IP "\fB\-Map\fR \fImapfile\fR" 4
    946 .IX Item "-Map mapfile"
    947 Print a link map to the file \fImapfile\fR.  See the description of the
    948 \&\fB\-M\fR option, above.
    949 .IP "\fB\-\-no\-keep\-memory\fR" 4
    950 .IX Item "--no-keep-memory"
    951 \&\fBld\fR normally optimizes for speed over memory usage by caching the
    952 symbol tables of input files in memory.  This option tells \fBld\fR to
    953 instead optimize for memory usage, by rereading the symbol tables as
    954 necessary.  This may be required if \fBld\fR runs out of memory space
    955 while linking a large executable.
    956 .IP "\fB\-\-no\-undefined\fR" 4
    957 .IX Item "--no-undefined"
    958 .PD 0
    959 .IP "\fB\-z defs\fR" 4
    960 .IX Item "-z defs"
    961 .PD
    962 Normally when creating a non-symbolic shared library, undefined symbols
    963 are allowed and left to be resolved by the runtime loader.  This option
    964 disallows such undefined symbols if they come from regular object
    965 files.  The switch \fB\-\-no\-allow\-shlib\-undefined\fR controls the
    966 behaviour for shared objects being linked into the shared library.
    967 .IP "\fB\-\-allow\-multiple\-definition\fR" 4
    968 .IX Item "--allow-multiple-definition"
    969 .PD 0
    970 .IP "\fB\-z muldefs\fR" 4
    971 .IX Item "-z muldefs"
    972 .PD
    973 Normally when a symbol is defined multiple times, the linker will
    974 report a fatal error. These options allow multiple definitions and the
    975 first definition will be used.
    976 .IP "\fB\-\-allow\-shlib\-undefined\fR" 4
    977 .IX Item "--allow-shlib-undefined"
    978 .PD 0
    979 .IP "\fB\-\-no\-allow\-shlib\-undefined\fR" 4
    980 .IX Item "--no-allow-shlib-undefined"
    981 .PD
    982 Allow (the default) or disallow undefined symbols in shared objects.
    983 The setting of this switch overrides \fB\-\-no\-undefined\fR where
    984 shared objects are concerned.  Thus if \fB\-\-no\-undefined\fR is set
    985 but \fB\-\-no\-allow\-shlib\-undefined\fR is not, the net result will be
    986 that undefined symbols in regular object files will trigger an error,
    987 but undefined symbols in shared objects will be ignored.
    988 .Sp
    989 The reason that \fB\-\-allow\-shlib\-undefined\fR is the default is that
    990 the shared object being specified at link time may not be the same one
    991 that is available at load time, so the symbols might actually be
    992 resolvable at load time.  Plus there are some systems, (eg BeOS) where
    993 undefined symbols in shared libraries is normal since the kernel
    994 patches them at load time to select which function is most appropriate
    995 for the current architecture. eg. to dynamically select an appropriate
    996 memset function.  Apparently it is also normal for \s-1HPPA\s0 shared
    997 libraries to have undefined symbols.
    998 .IP "\fB\-\-no\-undefined\-version\fR" 4
    999 .IX Item "--no-undefined-version"
    1000 Normally when a symbol has an undefined version, the linker will ignore
    1001 it. This option disallows symbols with undefined version and a fatal error
    1002 will be issued instead.
    1003 .IP "\fB\-\-no\-warn\-mismatch\fR" 4
    1004 .IX Item "--no-warn-mismatch"
    1005 Normally \fBld\fR will give an error if you try to link together input
    1006 files that are mismatched for some reason, perhaps because they have
    1007 been compiled for different processors or for different endiannesses.
    1008 This option tells \fBld\fR that it should silently permit such possible
    1009 errors.  This option should only be used with care, in cases when you
    1010 have taken some special action that ensures that the linker errors are
    1011 inappropriate.
    1012 .IP "\fB\-\-no\-whole\-archive\fR" 4
    1013 .IX Item "--no-whole-archive"
    1014 Turn off the effect of the \fB\-\-whole\-archive\fR option for subsequent
    1015 archive files.
    1016 .IP "\fB\-\-noinhibit\-exec\fR" 4
    1017 .IX Item "--noinhibit-exec"
    1018 Retain the executable output file whenever it is still usable.
    1019 Normally, the linker will not produce an output file if it encounters
    1020 errors during the link process; it exits without writing an output file
    1021 when it issues any error whatsoever.
    1022 .IP "\fB\-nostdlib\fR" 4
    1023 .IX Item "-nostdlib"
    1024 Only search library directories explicitly specified on the
    1025 command line.  Library directories specified in linker scripts
    1026 (including linker scripts specified on the command line) are ignored.
    1027 .IP "\fB\-\-oformat\fR \fIoutput-format\fR" 4
    1028 .IX Item "--oformat output-format"
    1029 \&\fBld\fR may be configured to support more than one kind of object
    1030 file.  If your \fBld\fR is configured this way, you can use the
    1031 \&\fB\-\-oformat\fR option to specify the binary format for the output
    1032 object file.  Even when \fBld\fR is configured to support alternative
    1033 object formats, you don't usually need to specify this, as \fBld\fR
    1034 should be configured to produce as a default output format the most
    1035 usual format on each machine.  \fIoutput-format\fR is a text string, the
    1036 name of a particular format supported by the \s-1BFD\s0 libraries.  (You can
    1037 list the available binary formats with \fBobjdump \-i\fR.)  The script
    1038 command \f(CW\*(C`OUTPUT_FORMAT\*(C'\fR can also specify the output format, but
    1039 this option overrides it. 
    1040 .IP "\fB\-qmagic\fR" 4
    1041 .IX Item "-qmagic"
    1042 This option is ignored for Linux compatibility.
    1043 .IP "\fB\-Qy\fR" 4
    1044 .IX Item "-Qy"
    1045 This option is ignored for \s-1SVR4\s0 compatibility.
    1046 .IP "\fB\-\-relax\fR" 4
    1047 .IX Item "--relax"
    1048 An option with machine dependent effects.
    1049 This option is only supported on a few targets.
    1050 .Sp
    1051 On some platforms, the \fB\-\-relax\fR option performs global
    1052 optimizations that become possible when the linker resolves addressing
    1053 in the program, such as relaxing address modes and synthesizing new
    1054 instructions in the output object file.
    1055 .Sp
    1056 On some platforms these link time global optimizations may make symbolic
    1057 debugging of the resulting executable impossible.
    1058 This is known to be
    1059 the case for the Matsushita \s-1MN10200\s0 and \s-1MN10300\s0 family of processors.
    1060 .Sp
    1061 On platforms where this is not supported, \fB\-\-relax\fR is accepted,
    1062 but ignored.
    1063 .IP "\fB\-\-retain\-symbols\-file\fR \fIfilename\fR" 4
    1064 .IX Item "--retain-symbols-file filename"
    1065 Retain \fIonly\fR the symbols listed in the file \fIfilename\fR,
    1066 discarding all others.  \fIfilename\fR is simply a flat file, with one
    1067 symbol name per line.  This option is especially useful in environments
    1068 (such as VxWorks)
    1069 where a large global symbol table is accumulated gradually, to conserve
    1070 run-time memory.
    1071 .Sp
    1072 \&\fB\-\-retain\-symbols\-file\fR does \fInot\fR discard undefined symbols,
    1073 or symbols needed for relocations.
    1074 .Sp
    1075 You may only specify \fB\-\-retain\-symbols\-file\fR once in the command
    1076 line.  It overrides \fB\-s\fR and \fB\-S\fR.
    1077 .IP "\fB\-rpath\fR \fIdir\fR" 4
    1078 .IX Item "-rpath dir"
    1079 Add a directory to the runtime library search path.  This is used when
    1080 linking an \s-1ELF\s0 executable with shared objects.  All \fB\-rpath\fR
    1081 arguments are concatenated and passed to the runtime linker, which uses
    1082 them to locate shared objects at runtime.  The \fB\-rpath\fR option is
    1083 also used when locating shared objects which are needed by shared
    1084 objects explicitly included in the link; see the description of the
    1085 \&\fB\-rpath\-link\fR option.  If \fB\-rpath\fR is not used when linking an
    1086 \&\s-1ELF\s0 executable, the contents of the environment variable
    1087 \&\f(CW\*(C`LD_RUN_PATH\*(C'\fR will be used if it is defined.
    1088 .Sp
    1089 The \fB\-rpath\fR option may also be used on SunOS.  By default, on
    1090 SunOS, the linker will form a runtime search patch out of all the
    1091 \&\fB\-L\fR options it is given.  If a \fB\-rpath\fR option is used, the
    1092 runtime search path will be formed exclusively using the \fB\-rpath\fR
    1093 options, ignoring the \fB\-L\fR options.  This can be useful when using
    1094 gcc, which adds many \fB\-L\fR options which may be on \s-1NFS\s0 mounted
    1095 filesystems.
    1096 .Sp
    1097 For compatibility with other \s-1ELF\s0 linkers, if the \fB\-R\fR option is
    1098 followed by a directory name, rather than a file name, it is treated as
    1099 the \fB\-rpath\fR option.
    1100 .IP "\fB\-rpath\-link\fR \fI\s-1DIR\s0\fR" 4
    1101 .IX Item "-rpath-link DIR"
    1102 When using \s-1ELF\s0 or SunOS, one shared library may require another.  This
    1103 happens when an \f(CW\*(C`ld \-shared\*(C'\fR link includes a shared library as one
    1104 of the input files.
    1105 .Sp
    1106 When the linker encounters such a dependency when doing a non\-shared,
    1107 non-relocatable link, it will automatically try to locate the required
    1108 shared library and include it in the link, if it is not included
    1109 explicitly.  In such a case, the \fB\-rpath\-link\fR option
    1110 specifies the first set of directories to search.  The
    1111 \&\fB\-rpath\-link\fR option may specify a sequence of directory names
    1112 either by specifying a list of names separated by colons, or by
    1113 appearing multiple times.
    1114 .Sp
    1115 This option should be used with caution as it overrides the search path
    1116 that may have been hard compiled into a shared library. In such a case it
    1117 is possible to use unintentionally a different search path than the
    1118 runtime linker would do.
    1119 .Sp
    1120 The linker uses the following search paths to locate required shared
    1121 libraries.
    1122 .RS 4
    1123 .IP "1." 4
    1124 Any directories specified by \fB\-rpath\-link\fR options.
    1125 .IP "2." 4
    1126 Any directories specified by \fB\-rpath\fR options.  The difference
    1127 between \fB\-rpath\fR and \fB\-rpath\-link\fR is that directories
    1128 specified by \fB\-rpath\fR options are included in the executable and
    1129 used at runtime, whereas the \fB\-rpath\-link\fR option is only effective
    1130 at link time. It is for the native linker only.
    1131 .IP "3." 4
    1132 On an \s-1ELF\s0 system, if the \fB\-rpath\fR and \f(CW\*(C`rpath\-link\*(C'\fR options
    1133 were not used, search the contents of the environment variable
    1134 \&\f(CW\*(C`LD_RUN_PATH\*(C'\fR. It is for the native linker only.
    1135 .IP "4." 4
    1136 On SunOS, if the \fB\-rpath\fR option was not used, search any
    1137 directories specified using \fB\-L\fR options.
    1138 .IP "5." 4
    1139 For a native linker, the contents of the environment variable
    1140 \&\f(CW\*(C`LD_LIBRARY_PATH\*(C'\fR.
    1141 .IP "6." 4
    1142 For a native \s-1ELF\s0 linker, the directories in \f(CW\*(C`DT_RUNPATH\*(C'\fR or
    1143 \&\f(CW\*(C`DT_RPATH\*(C'\fR of a shared library are searched for shared
    1144 libraries needed by it. The \f(CW\*(C`DT_RPATH\*(C'\fR entries are ignored if
    1145 \&\f(CW\*(C`DT_RUNPATH\*(C'\fR entries exist.
    1146 .IP "7." 4
    1147 The default directories, normally \fI/lib\fR and \fI/usr/lib\fR.
    1148 .IP "8." 4
    1149 For a native linker on an \s-1ELF\s0 system, if the file \fI/etc/ld.so.conf\fR
    1150 exists, the list of directories found in that file.
    1151 .RE
    1152 .RS 4
    1153 .Sp
    1154 If the required shared library is not found, the linker will issue a
    1155 warning and continue with the link.
    1156 .RE
    1157 .IP "\fB\-shared\fR" 4
    1158 .IX Item "-shared"
    1159 .PD 0
    1160 .IP "\fB\-Bshareable\fR" 4
    1161 .IX Item "-Bshareable"
    1162 .PD
    1163 Create a shared library.  This is currently only supported on \s-1ELF\s0, \s-1XCOFF\s0
    1164 and SunOS platforms.  On SunOS, the linker will automatically create a
    1165 shared library if the \fB\-e\fR option is not used and there are
    1166 undefined symbols in the link.
    1167 .IP "\fB\-\-sort\-common\fR" 4
    1168 .IX Item "--sort-common"
    1169 This option tells \fBld\fR to sort the common symbols by size when it
    1170 places them in the appropriate output sections.  First come all the one
    1171 byte symbols, then all the two byte, then all the four byte, and then
    1172 everything else.  This is to prevent gaps between symbols due to
    1173 alignment constraints.
    1174 .IP "\fB\-\-split\-by\-file [\fR\fIsize\fR\fB]\fR" 4
    1175 .IX Item "--split-by-file [size]"
    1176 Similar to \fB\-\-split\-by\-reloc\fR but creates a new output section for
    1177 each input file when \fIsize\fR is reached.  \fIsize\fR defaults to a
    1178 size of 1 if not given.
    1179 .IP "\fB\-\-split\-by\-reloc [\fR\fIcount\fR\fB]\fR" 4
    1180 .IX Item "--split-by-reloc [count]"
    1181 Tries to creates extra sections in the output file so that no single
    1182 output section in the file contains more than \fIcount\fR relocations.
    1183 This is useful when generating huge relocatable files for downloading into
    1184 certain real time kernels with the \s-1COFF\s0 object file format; since \s-1COFF\s0
    1185 cannot represent more than 65535 relocations in a single section.  Note
    1186 that this will fail to work with object file formats which do not
    1187 support arbitrary sections.  The linker will not split up individual
    1188 input sections for redistribution, so if a single input section contains
    1189 more than \fIcount\fR relocations one output section will contain that
    1190 many relocations.  \fIcount\fR defaults to a value of 32768.
    1191 .IP "\fB\-\-stats\fR" 4
    1192 .IX Item "--stats"
    1193 Compute and display statistics about the operation of the linker, such
    1194 as execution time and memory usage.
    1195 .IP "\fB\-\-traditional\-format\fR" 4
    1196 .IX Item "--traditional-format"
    1197 For some targets, the output of \fBld\fR is different in some ways from
    1198 the output of some existing linker.  This switch requests \fBld\fR to
    1199 use the traditional format instead.
    1200 .Sp
    1201 For example, on SunOS, \fBld\fR combines duplicate entries in the
    1202 symbol string table.  This can reduce the size of an output file with
    1203 full debugging information by over 30 percent.  Unfortunately, the SunOS
    1204 \&\f(CW\*(C`dbx\*(C'\fR program can not read the resulting program (\f(CW\*(C`gdb\*(C'\fR has no
    1205 trouble).  The \fB\-\-traditional\-format\fR switch tells \fBld\fR to not
    1206 combine duplicate entries.
    1207 .IP "\fB\-\-section\-start\fR \fIsectionname\fR\fB=\fR\fIorg\fR" 4
    1208 .IX Item "--section-start sectionname=org"
    1209 Locate a section in the output file at the absolute
    1210 address given by \fIorg\fR.  You may use this option as many
    1211 times as necessary to locate multiple sections in the command
    1212 line.
    1213 \&\fIorg\fR must be a single hexadecimal integer;
    1214 for compatibility with other linkers, you may omit the leading
    1215 \&\fB0x\fR usually associated with hexadecimal values.  \fINote:\fR there
    1216 should be no white space between \fIsectionname\fR, the equals
    1217 sign (``\fB=\fR''), and \fIorg\fR.
    1218 .IP "\fB\-Tbss\fR \fIorg\fR" 4
    1219 .IX Item "-Tbss org"
    1220 .PD 0
    1221 .IP "\fB\-Tdata\fR \fIorg\fR" 4
    1222 .IX Item "-Tdata org"
    1223 .IP "\fB\-Ttext\fR \fIorg\fR" 4
    1224 .IX Item "-Ttext org"
    1225 .PD
    1226 Same as \-\-section\-start, with \f(CW\*(C`.bss\*(C'\fR, \f(CW\*(C`.data\*(C'\fR or
    1227 \&\f(CW\*(C`.text\*(C'\fR as the \fIsectionname\fR.
    1228 .IP "\fB\-\-dll\-verbose\fR" 4
    1229 .IX Item "--dll-verbose"
    1230 .PD 0
    1231 .IP "\fB\-\-verbose\fR" 4
    1232 .IX Item "--verbose"
    1233 .PD
    1234 Display the version number for \fBld\fR and list the linker emulations
    1235 supported.  Display which input files can and cannot be opened.  Display
    1236 the linker script being used by the linker.
    1237 .IP "\fB\-\-version\-script=\fR\fIversion-scriptfile\fR" 4
    1238 .IX Item "--version-script=version-scriptfile"
    1239 Specify the name of a version script to the linker.  This is typically
    1240 used when creating shared libraries to specify additional information
    1241 about the version hierarchy for the library being created.  This option
    1242 is only meaningful on \s-1ELF\s0 platforms which support shared libraries.
    1243 .IP "\fB\-\-warn\-common\fR" 4
    1244 .IX Item "--warn-common"
    1245 Warn when a common symbol is combined with another common symbol or with
    1246 a symbol definition.  Unix linkers allow this somewhat sloppy practice,
    1247 but linkers on some other operating systems do not.  This option allows
    1248 you to find potential problems from combining global symbols.
    1249 Unfortunately, some C libraries use this practice, so you may get some
    1250 warnings about symbols in the libraries as well as in your programs.
    1251 .Sp
    1252 There are three kinds of global symbols, illustrated here by C examples:
    1253 .RS 4
    1254 .IP "\fBint i = 1;\fR" 4
    1255 .IX Item "int i = 1;"
    1256 A definition, which goes in the initialized data section of the output
    1257 file.
    1258 .IP "\fBextern int i;\fR" 4
    1259 .IX Item "extern int i;"
    1260 An undefined reference, which does not allocate space.
    1261 There must be either a definition or a common symbol for the
    1262 variable somewhere.
    1263 .IP "\fBint i;\fR" 4
    1264 .IX Item "int i;"
    1265 A common symbol.  If there are only (one or more) common symbols for a
    1266 variable, it goes in the uninitialized data area of the output file.
    1267 The linker merges multiple common symbols for the same variable into a
    1268 single symbol.  If they are of different sizes, it picks the largest
    1269 size.  The linker turns a common symbol into a declaration, if there is
    1270 a definition of the same variable.
    1271 .RE
    1272 .RS 4
    1273 .Sp
    1274 The \fB\-\-warn\-common\fR option can produce five kinds of warnings.
    1275 Each warning consists of a pair of lines: the first describes the symbol
    1276 just encountered, and the second describes the previous symbol
    1277 encountered with the same name.  One or both of the two symbols will be
    1278 a common symbol.
    1279 .IP "1." 4
    1280 Turning a common symbol into a reference, because there is already a
    1281 definition for the symbol.
    1282 .Sp
    1283 .Vb 3
    1284 \&        <file>(<section>): warning: common of `<symbol>'
    1285 \&           overridden by definition
    1286 \&        <file>(<section>): warning: defined here
    1287 .Ve
    1288 .IP "2." 4
    1289 Turning a common symbol into a reference, because a later definition for
    1290 the symbol is encountered.  This is the same as the previous case,
    1291 except that the symbols are encountered in a different order.
    1292 .Sp
    1293 .Vb 3
    1294 \&        <file>(<section>): warning: definition of `<symbol>'
    1295 \&           overriding common
    1296 \&        <file>(<section>): warning: common is here
    1297 .Ve
    1298 .IP "3." 4
    1299 Merging a common symbol with a previous same-sized common symbol.
    1300 .Sp
    1301 .Vb 3
    1302 \&        <file>(<section>): warning: multiple common
    1303 \&           of `<symbol>'
    1304 \&        <file>(<section>): warning: previous common is here
    1305 .Ve
    1306 .IP "4." 4
    1307 Merging a common symbol with a previous larger common symbol.
    1308 .Sp
    1309 .Vb 3
    1310 \&        <file>(<section>): warning: common of `<symbol>'
    1311 \&           overridden by larger common
    1312 \&        <file>(<section>): warning: larger common is here
    1313 .Ve
    1314 .IP "5." 4
    1315 Merging a common symbol with a previous smaller common symbol.  This is
    1316 the same as the previous case, except that the symbols are
    1317 encountered in a different order.
    1318 .Sp
    1319 .Vb 3
    1320 \&        <file>(<section>): warning: common of `<symbol>'
    1321 \&           overriding smaller common
    1322 \&        <file>(<section>): warning: smaller common is here
    1323 .Ve
    1324 .RE
    1325 .RS 4
    1326 .RE
    1327 .IP "\fB\-\-warn\-constructors\fR" 4
    1328 .IX Item "--warn-constructors"
    1329 Warn if any global constructors are used.  This is only useful for a few
    1330 object file formats.  For formats like \s-1COFF\s0 or \s-1ELF\s0, the linker can not
    1331 detect the use of global constructors.
    1332 .IP "\fB\-\-warn\-multiple\-gp\fR" 4
    1333 .IX Item "--warn-multiple-gp"
    1334 Warn if multiple global pointer values are required in the output file.
    1335 This is only meaningful for certain processors, such as the Alpha.
    1336 Specifically, some processors put large-valued constants in a special
    1337 section.  A special register (the global pointer) points into the middle
    1338 of this section, so that constants can be loaded efficiently via a
    1339 base-register relative addressing mode.  Since the offset in
    1340 base-register relative mode is fixed and relatively small (e.g., 16
    1341 bits), this limits the maximum size of the constant pool.  Thus, in
    1342 large programs, it is often necessary to use multiple global pointer
    1343 values in order to be able to address all possible constants.  This
    1344 option causes a warning to be issued whenever this case occurs.
    1345 .IP "\fB\-\-warn\-once\fR" 4
    1346 .IX Item "--warn-once"
    1347 Only warn once for each undefined symbol, rather than once per module
    1348 which refers to it.
    1349 .IP "\fB\-\-warn\-section\-align\fR" 4
    1350 .IX Item "--warn-section-align"
    1351 Warn if the address of an output section is changed because of
    1352 alignment.  Typically, the alignment will be set by an input section.
    1353 The address will only be changed if it not explicitly specified; that
    1354 is, if the \f(CW\*(C`SECTIONS\*(C'\fR command does not specify a start address for
    1355 the section.
    1356 .IP "\fB\-\-whole\-archive\fR" 4
    1357 .IX Item "--whole-archive"
    1358 For each archive mentioned on the command line after the
    1359 \&\fB\-\-whole\-archive\fR option, include every object file in the archive
    1360 in the link, rather than searching the archive for the required object
    1361 files.  This is normally used to turn an archive file into a shared
    1362 library, forcing every object to be included in the resulting shared
    1363 library.  This option may be used more than once.
    1364 .Sp
    1365 Two notes when using this option from gcc: First, gcc doesn't know
    1366 about this option, so you have to use \fB\-Wl,\-whole\-archive\fR.
    1367 Second, don't forget to use \fB\-Wl,\-no\-whole\-archive\fR after your
    1368 list of archives, because gcc will add its own list of archives to
    1369 your link and you may not want this flag to affect those as well.
    1370 .IP "\fB\-\-wrap\fR \fIsymbol\fR" 4
    1371 .IX Item "--wrap symbol"
    1372 Use a wrapper function for \fIsymbol\fR.  Any undefined reference to
    1373 \&\fIsymbol\fR will be resolved to \f(CW\*(C`_\|_wrap_\f(CIsymbol\f(CW\*(C'\fR.  Any
    1374 undefined reference to \f(CW\*(C`_\|_real_\f(CIsymbol\f(CW\*(C'\fR will be resolved to
    1375 \&\fIsymbol\fR.
    1376 .Sp
    1377 This can be used to provide a wrapper for a system function.  The
    1378 wrapper function should be called \f(CW\*(C`_\|_wrap_\f(CIsymbol\f(CW\*(C'\fR.  If it
    1379 wishes to call the system function, it should call
    1380 \&\f(CW\*(C`_\|_real_\f(CIsymbol\f(CW\*(C'\fR.
    1381 .Sp
    1382 Here is a trivial example:
    1383 .Sp
    1384 .Vb 6
    1385 \&        void *
    1386 \&        __wrap_malloc (int c)
    1387 \&        {
    1388 \&          printf ("malloc called with %ld\en", c);
    1389 \&          return __real_malloc (c);
    1390 \&        }
    1391 .Ve
    1392 .Sp
    1393 If you link other code with this file using \fB\-\-wrap malloc\fR, then
    1394 all calls to \f(CW\*(C`malloc\*(C'\fR will call the function \f(CW\*(C`_\|_wrap_malloc\*(C'\fR
    1395 instead.  The call to \f(CW\*(C`_\|_real_malloc\*(C'\fR in \f(CW\*(C`_\|_wrap_malloc\*(C'\fR will
    1396 call the real \f(CW\*(C`malloc\*(C'\fR function.
    1397 .Sp
    1398 You may wish to provide a \f(CW\*(C`_\|_real_malloc\*(C'\fR function as well, so that
    1399 links without the \fB\-\-wrap\fR option will succeed.  If you do this,
    1400 you should not put the definition of \f(CW\*(C`_\|_real_malloc\*(C'\fR in the same
    1401 file as \f(CW\*(C`_\|_wrap_malloc\*(C'\fR; if you do, the assembler may resolve the
    1402 call before the linker has a chance to wrap it to \f(CW\*(C`malloc\*(C'\fR.
    1403 .IP "\fB\-\-enable\-new\-dtags\fR" 4
    1404 .IX Item "--enable-new-dtags"
    1405 .PD 0
    1406 .IP "\fB\-\-disable\-new\-dtags\fR" 4
    1407 .IX Item "--disable-new-dtags"
    1408 .PD
    1409 This linker can create the new dynamic tags in \s-1ELF\s0. But the older \s-1ELF\s0
    1410 systems may not understand them. If you specify
    1411 \&\fB\-\-enable\-new\-dtags\fR, the dynamic tags will be created as needed.
    1412 If you specify \fB\-\-disable\-new\-dtags\fR, no new dynamic tags will be
    1413 created. By default, the new dynamic tags are not created. Note that
    1414 those options are only available for \s-1ELF\s0 systems.
    1415 .PP
    1416 The i386 \s-1PE\s0 linker supports the \fB\-shared\fR option, which causes
    1417 the output to be a dynamically linked library (\s-1DLL\s0) instead of a
    1418 normal executable.  You should name the output \f(CW\*(C`*.dll\*(C'\fR when you
    1419 use this option.  In addition, the linker fully supports the standard
    1420 \&\f(CW\*(C`*.def\*(C'\fR files, which may be specified on the linker command line
    1421 like an object file (in fact, it should precede archives it exports
    1422 symbols from, to ensure that they get linked in, just like a normal
    1423 object file).
    1424 .PP
    1425 In addition to the options common to all targets, the i386 \s-1PE\s0 linker
    1426 support additional command line options that are specific to the i386
    1427 \&\s-1PE\s0 target.  Options that take values may be separated from their
    1428 values by either a space or an equals sign.
    1429 .IP "\fB\-\-add\-stdcall\-alias\fR" 4
    1430 .IX Item "--add-stdcall-alias"
    1431 If given, symbols with a stdcall suffix (@\fInn\fR) will be exported
    1432 as-is and also with the suffix stripped.
    1433 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1434 .IP "\fB\-\-base\-file\fR \fIfile\fR" 4
    1435 .IX Item "--base-file file"
    1436 Use \fIfile\fR as the name of a file in which to save the base
    1437 addresses of all the relocations needed for generating DLLs with
    1438 \&\fIdlltool\fR.
    1439 [This is an i386 \s-1PE\s0 specific option]
    1440 .IP "\fB\-\-dll\fR" 4
    1441 .IX Item "--dll"
    1442 Create a \s-1DLL\s0 instead of a regular executable.  You may also use
    1443 \&\fB\-shared\fR or specify a \f(CW\*(C`LIBRARY\*(C'\fR in a given \f(CW\*(C`.def\*(C'\fR
    1444 file.
    1445 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1446 .IP "\fB\-\-enable\-stdcall\-fixup\fR" 4
    1447 .IX Item "--enable-stdcall-fixup"
    1448 .PD 0
    1449 .IP "\fB\-\-disable\-stdcall\-fixup\fR" 4
    1450 .IX Item "--disable-stdcall-fixup"
    1451 .PD
    1452 If the link finds a symbol that it cannot resolve, it will attempt to
    1453 do ``fuzzy linking'' by looking for another defined symbol that differs
    1454 only in the format of the symbol name (cdecl vs stdcall) and will
    1455 resolve that symbol by linking to the match.  For example, the
    1456 undefined symbol \f(CW\*(C`_foo\*(C'\fR might be linked to the function
    1457 \&\f(CW\*(C`_foo@12\*(C'\fR, or the undefined symbol \f(CW\*(C`_bar@16\*(C'\fR might be linked
    1458 to the function \f(CW\*(C`_bar\*(C'\fR.  When the linker does this, it prints a
    1459 warning, since it normally should have failed to link, but sometimes
    1460 import libraries generated from third-party dlls may need this feature
    1461 to be usable.  If you specify \fB\-\-enable\-stdcall\-fixup\fR, this
    1462 feature is fully enabled and warnings are not printed.  If you specify
    1463 \&\fB\-\-disable\-stdcall\-fixup\fR, this feature is disabled and such
    1464 mismatches are considered to be errors.
    1465 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1466 .IP "\fB\-\-export\-all\-symbols\fR" 4
    1467 .IX Item "--export-all-symbols"
    1468 If given, all global symbols in the objects used to build a \s-1DLL\s0 will
    1469 be exported by the \s-1DLL\s0.  Note that this is the default if there
    1470 otherwise wouldn't be any exported symbols.  When symbols are
    1471 explicitly exported via \s-1DEF\s0 files or implicitly exported via function
    1472 attributes, the default is to not export anything else unless this
    1473 option is given.  Note that the symbols \f(CW\*(C`DllMain@12\*(C'\fR,
    1474 \&\f(CW\*(C`DllEntryPoint@0\*(C'\fR, \f(CW\*(C`DllMainCRTStartup@12\*(C'\fR, and
    1475 \&\f(CW\*(C`impure_ptr\*(C'\fR will not be automatically
    1476 exported.  Also, symbols imported from other DLLs will not be
    1477 re\-exported, nor will symbols specifying the \s-1DLL\s0's internal layout
    1478 such as those beginning with \f(CW\*(C`_head_\*(C'\fR or ending with
    1479 \&\f(CW\*(C`_iname\*(C'\fR.  In addition, no symbols from \f(CW\*(C`libgcc\*(C'\fR,
    1480 \&\f(CW\*(C`libstd++\*(C'\fR, \f(CW\*(C`libmingw32\*(C'\fR, or \f(CW\*(C`crtX.o\*(C'\fR will be exported.
    1481 Symbols whose names begin with \f(CW\*(C`_\|_rtti_\*(C'\fR or \f(CW\*(C`_\|_builtin_\*(C'\fR will
    1482 not be exported, to help with \*(C+ DLLs.  Finally, there is an
    1483 extensive list of cygwin-private symbols that are not exported
    1484 (obviously, this applies on when building DLLs for cygwin targets).
    1485 These cygwin-excludes are: \f(CW\*(C`_cygwin_dll_entry@12\*(C'\fR,
    1486 \&\f(CW\*(C`_cygwin_crt0_common@8\*(C'\fR, \f(CW\*(C`_cygwin_noncygwin_dll_entry@12\*(C'\fR,
    1487 \&\f(CW\*(C`_fmode\*(C'\fR, \f(CW\*(C`_impure_ptr\*(C'\fR, \f(CW\*(C`cygwin_attach_dll\*(C'\fR,
    1488 \&\f(CW\*(C`cygwin_premain0\*(C'\fR, \f(CW\*(C`cygwin_premain1\*(C'\fR, \f(CW\*(C`cygwin_premain2\*(C'\fR,
    1489 \&\f(CW\*(C`cygwin_premain3\*(C'\fR, and \f(CW\*(C`environ\*(C'\fR.
    1490 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1491 .IP "\fB\-\-exclude\-symbols\fR \fIsymbol\fR\fB,\fR\fIsymbol\fR\fB,...\fR" 4
    1492 .IX Item "--exclude-symbols symbol,symbol,..."
    1493 Specifies a list of symbols which should not be automatically
    1494 exported.  The symbol names may be delimited by commas or colons.
    1495 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1496 .IP "\fB\-\-exclude\-libs\fR \fIlib\fR\fB,\fR\fIlib\fR\fB,...\fR" 4
    1497 .IX Item "--exclude-libs lib,lib,..."
    1498 Specifies a list of archive libraries from which symbols should not be automatically
    1499 exported. The library names may be delimited by commas or colons.  Specifying
    1500 \&\f(CW\*(C`\-\-exclude\-libs ALL\*(C'\fR excludes symbols in all archive libraries from
    1501 automatic export. Symbols explicitly listed in a .def file are still exported,
    1502 regardless of this option.
    1503 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1504 .IP "\fB\-\-file\-alignment\fR" 4
    1505 .IX Item "--file-alignment"
    1506 Specify the file alignment.  Sections in the file will always begin at
    1507 file offsets which are multiples of this number.  This defaults to
    1508 512.
    1509 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1510 .IP "\fB\-\-heap\fR \fIreserve\fR" 4
    1511 .IX Item "--heap reserve"
    1512 .PD 0
    1513 .IP "\fB\-\-heap\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
    1514 .IX Item "--heap reserve,commit"
    1515 .PD
    1516 Specify the amount of memory to reserve (and optionally commit) to be
    1517 used as heap for this program.  The default is 1Mb reserved, 4K
    1518 committed.
    1519 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1520 .IP "\fB\-\-image\-base\fR \fIvalue\fR" 4
    1521 .IX Item "--image-base value"
    1522 Use \fIvalue\fR as the base address of your program or dll.  This is
    1523 the lowest memory location that will be used when your program or dll
    1524 is loaded.  To reduce the need to relocate and improve performance of
    1525 your dlls, each should have a unique base address and not overlap any
    1526 other dlls.  The default is 0x400000 for executables, and 0x10000000
    1527 for dlls.
    1528 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1529 .IP "\fB\-\-kill\-at\fR" 4
    1530 .IX Item "--kill-at"
    1531 If given, the stdcall suffixes (@\fInn\fR) will be stripped from
    1532 symbols before they are exported.
    1533 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1534 .IP "\fB\-\-major\-image\-version\fR \fIvalue\fR" 4
    1535 .IX Item "--major-image-version value"
    1536 Sets the major number of the ``image version''.  Defaults to 1.
    1537 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1538 .IP "\fB\-\-major\-os\-version\fR \fIvalue\fR" 4
    1539 .IX Item "--major-os-version value"
    1540 Sets the major number of the ``os version''.  Defaults to 4.
    1541 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1542 .IP "\fB\-\-major\-subsystem\-version\fR \fIvalue\fR" 4
    1543 .IX Item "--major-subsystem-version value"
    1544 Sets the major number of the ``subsystem version''.  Defaults to 4.
    1545 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1546 .IP "\fB\-\-minor\-image\-version\fR \fIvalue\fR" 4
    1547 .IX Item "--minor-image-version value"
    1548 Sets the minor number of the ``image version''.  Defaults to 0.
    1549 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1550 .IP "\fB\-\-minor\-os\-version\fR \fIvalue\fR" 4
    1551 .IX Item "--minor-os-version value"
    1552 Sets the minor number of the ``os version''.  Defaults to 0.
    1553 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1554 .IP "\fB\-\-minor\-subsystem\-version\fR \fIvalue\fR" 4
    1555 .IX Item "--minor-subsystem-version value"
    1556 Sets the minor number of the ``subsystem version''.  Defaults to 0.
    1557 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1558 .IP "\fB\-\-output\-def\fR \fIfile\fR" 4
    1559 .IX Item "--output-def file"
    1560 The linker will create the file \fIfile\fR which will contain a \s-1DEF\s0
    1561 file corresponding to the \s-1DLL\s0 the linker is generating.  This \s-1DEF\s0 file
    1562 (which should be called \f(CW\*(C`*.def\*(C'\fR) may be used to create an import
    1563 library with \f(CW\*(C`dlltool\*(C'\fR or may be used as a reference to
    1564 automatically or implicitly exported symbols.
    1565 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1566 .IP "\fB\-\-out\-implib\fR \fIfile\fR" 4
    1567 .IX Item "--out-implib file"
    1568 The linker will create the file \fIfile\fR which will contain an
    1569 import lib corresponding to the \s-1DLL\s0 the linker is generating. This
    1570 import lib (which should be called \f(CW\*(C`*.dll.a\*(C'\fR or \f(CW\*(C`*.a\*(C'\fR
    1571 may be used to link clients against the generated \s-1DLL\s0; this behavior
    1572 makes it possible to skip a separate \f(CW\*(C`dlltool\*(C'\fR import library
    1573 creation step.
    1574 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1575 .IP "\fB\-\-enable\-auto\-image\-base\fR" 4
    1576 .IX Item "--enable-auto-image-base"
    1577 Automatically choose the image base for DLLs, unless one is specified
    1578 using the \f(CW\*(C`\-\-image\-base\*(C'\fR argument.  By using a hash generated
    1579 from the dllname to create unique image bases for each \s-1DLL\s0, in-memory
    1580 collisions and relocations which can delay program execution are
    1581 avoided.
    1582 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1583 .IP "\fB\-\-disable\-auto\-image\-base\fR" 4
    1584 .IX Item "--disable-auto-image-base"
    1585 Do not automatically generate a unique image base.  If there is no
    1586 user-specified image base (\f(CW\*(C`\-\-image\-base\*(C'\fR) then use the platform
    1587 default.
    1588 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1589 .IP "\fB\-\-dll\-search\-prefix\fR \fIstring\fR" 4
    1590 .IX Item "--dll-search-prefix string"
    1591 When linking dynamically to a dll without an import library,
    1592 search for \f(CW\*(C`<string><basename>.dll\*(C'\fR in preference to
    1593 \&\f(CW\*(C`lib<basename>.dll\*(C'\fR. This behavior allows easy distinction
    1594 between DLLs built for the various \*(L"subplatforms\*(R": native, cygwin,
    1595 uwin, pw, etc.  For instance, cygwin DLLs typically use
    1596 \&\f(CW\*(C`\-\-dll\-search\-prefix=cyg\*(C'\fR.
    1597 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1598 .IP "\fB\-\-enable\-auto\-import\fR" 4
    1599 .IX Item "--enable-auto-import"
    1600 Do sophisticated linking of \f(CW\*(C`_symbol\*(C'\fR to \f(CW\*(C`_\|_imp_\|_symbol\*(C'\fR for
    1601 \&\s-1DATA\s0 imports from DLLs, and create the necessary thunking symbols when
    1602 building the import libraries with those \s-1DATA\s0 exports.  This generally
    1603 will 'just work' \*(-- but sometimes you may see this message:
    1604 .Sp
    1605 "variable '<var>' can't be auto\-imported. Please read the
    1606 documentation for ld's \f(CW\*(C`\-\-enable\-auto\-import\*(C'\fR for details."
    1607 .Sp
    1608 This message occurs when some (sub)expression accesses an address
    1609 ultimately given by the sum of two constants (Win32 import tables only
    1610 allow one).  Instances where this may occur include accesses to member
    1611 fields of struct variables imported from a \s-1DLL\s0, as well as using a
    1612 constant index into an array variable imported from a \s-1DLL\s0.  Any
    1613 multiword variable (arrays, structs, long long, etc) may trigger
    1614 this error condition.  However, regardless of the exact data type
    1615 of the offending exported variable, ld will always detect it, issue
    1616 the warning, and exit.
    1617 .Sp
    1618 There are several ways to address this difficulty, regardless of the
    1619 data type of the exported variable:
    1620 .Sp
    1621 One way is to use \-\-enable\-runtime\-pseudo\-reloc switch. This leaves the task
    1622 of adjusting references in your client code for runtime environment, so
    1623 this method works only when runtime environtment supports this feature.
    1624 .Sp
    1625 A second solution is to force one of the 'constants' to be a variable \*(--
    1626 that is, unknown and un-optimizable at compile time.  For arrays,
    1627 there are two possibilities: a) make the indexee (the array's address)
    1628 a variable, or b) make the 'constant' index a variable.  Thus:
    1629 .Sp
    1630 .Vb 3
    1631 \&        extern type extern_array[];
    1632 \&        extern_array[1] -->
    1633 \&           { volatile type *t=extern_array; t[1] }
    1634 .Ve
    1635 .Sp
    1636 or
    1637 .Sp
    1638 .Vb 3
    1639 \&        extern type extern_array[];
    1640 \&        extern_array[1] -->
    1641 \&           { volatile int t=1; extern_array[t] }
    1642 .Ve
    1643 .Sp
    1644 For structs (and most other multiword data types) the only option
    1645 is to make the struct itself (or the long long, or the ...) variable:
    1646 .Sp
    1647 .Vb 3
    1648 \&        extern struct s extern_struct;
    1649 \&        extern_struct.field -->
    1650 \&           { volatile struct s *t=&extern_struct; t->field }
    1651 .Ve
    1652 .Sp
    1653 or
    1654 .Sp
    1655 .Vb 3
    1656 \&        extern long long extern_ll;
    1657 \&        extern_ll -->
    1658 \&          { volatile long long * local_ll=&extern_ll; *local_ll }
    1659 .Ve
    1660 .Sp
    1661 A third method of dealing with this difficulty is to abandon
    1662 \&'auto\-import' for the offending symbol and mark it with
    1663 \&\f(CW\*(C`_\|_declspec(dllimport)\*(C'\fR.  However, in practice that
    1664 requires using compile-time #defines to indicate whether you are
    1665 building a \s-1DLL\s0, building client code that will link to the \s-1DLL\s0, or
    1666 merely building/linking to a static library.   In making the choice
    1667 between the various methods of resolving the 'direct address with
    1668 constant offset' problem, you should consider typical real-world usage:
    1669 .Sp
    1670 Original:
    1671 .Sp
    1672 .Vb 7
    1673 \&        --foo.h
    1674 \&        extern int arr[];
    1675 \&        --foo.c
    1676 \&        #include "foo.h"
    1677 \&        void main(int argc, char **argv){
    1678 \&          printf("%d\en",arr[1]);
    1679 \&        }
    1680 .Ve
    1681 .Sp
    1682 Solution 1:
    1683 .Sp
    1684 .Vb 9
    1685 \&        --foo.h
    1686 \&        extern int arr[];
    1687 \&        --foo.c
    1688 \&        #include "foo.h"
    1689 \&        void main(int argc, char **argv){
    1690 \&          /* This workaround is for win32 and cygwin; do not "optimize" */
    1691 \&          volatile int *parr = arr;
    1692 \&          printf("%d\en",parr[1]);
    1693 \&        }
    1694 .Ve
    1695 .Sp
    1696 Solution 2:
    1697 .Sp
    1698 .Vb 14
    1699 \&        --foo.h
    1700 \&        /* Note: auto-export is assumed (no __declspec(dllexport)) */
    1701 \&        #if (defined(_WIN32) || defined(__CYGWIN__)) && \e
    1702 \&          !(defined(FOO_BUILD_DLL) || defined(FOO_STATIC))
    1703 \&        #define FOO_IMPORT __declspec(dllimport)
    1704 \&        #else
    1705 \&        #define FOO_IMPORT
    1706 \&        #endif
    1707 \&        extern FOO_IMPORT int arr[];
    1708 \&        --foo.c
    1709 \&        #include "foo.h"
    1710 \&        void main(int argc, char **argv){
    1711 \&          printf("%d\en",arr[1]);
    1712 \&        }
    1713 .Ve
    1714 .Sp
    1715 A fourth way to avoid this problem is to re-code your
    1716 library to use a functional interface rather than a data interface
    1717 for the offending variables (e.g. \fIset_foo()\fR and \fIget_foo()\fR accessor
    1718 functions).
    1719 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1720 .IP "\fB\-\-disable\-auto\-import\fR" 4
    1721 .IX Item "--disable-auto-import"
    1722 Do not attempt to do sophisticalted linking of \f(CW\*(C`_symbol\*(C'\fR to
    1723 \&\f(CW\*(C`_\|_imp_\|_symbol\*(C'\fR for \s-1DATA\s0 imports from DLLs.
    1724 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1725 .IP "\fB\-\-enable\-runtime\-pseudo\-reloc\fR" 4
    1726 .IX Item "--enable-runtime-pseudo-reloc"
    1727 If your code contains expressions described in \-\-enable\-auto\-import section,
    1728 that is, \s-1DATA\s0 imports from \s-1DLL\s0 with non-zero offset, this switch will create
    1729 a vector of 'runtime pseudo relocations' which can be used by runtime
    1730 environment to adjust references to such data in your client code.
    1731 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1732 .IP "\fB\-\-disable\-runtime\-pseudo\-reloc\fR" 4
    1733 .IX Item "--disable-runtime-pseudo-reloc"
    1734 Do not create pseudo relocations for non-zero offset \s-1DATA\s0 imports from
    1735 DLLs.  This is the default.
    1736 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1737 .IP "\fB\-\-enable\-extra\-pe\-debug\fR" 4
    1738 .IX Item "--enable-extra-pe-debug"
    1739 Show additional debug info related to auto-import symbol thunking.
    1740 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1741 .IP "\fB\-\-section\-alignment\fR" 4
    1742 .IX Item "--section-alignment"
    1743 Sets the section alignment.  Sections in memory will always begin at
    1744 addresses which are a multiple of this number.  Defaults to 0x1000.
    1745 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1746 .IP "\fB\-\-stack\fR \fIreserve\fR" 4
    1747 .IX Item "--stack reserve"
    1748 .PD 0
    1749 .IP "\fB\-\-stack\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
    1750 .IX Item "--stack reserve,commit"
    1751 .PD
    1752 Specify the amount of memory to reserve (and optionally commit) to be
    1753 used as stack for this program.  The default is 2Mb reserved, 4K
    1754 committed.
    1755 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1756 .IP "\fB\-\-subsystem\fR \fIwhich\fR" 4
    1757 .IX Item "--subsystem which"
    1758 .PD 0
    1759 .IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR" 4
    1760 .IX Item "--subsystem which:major"
    1761 .IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR\fB.\fR\fIminor\fR" 4
    1762 .IX Item "--subsystem which:major.minor"
    1763 .PD
    1764 Specifies the subsystem under which your program will execute.  The
    1765 legal values for \fIwhich\fR are \f(CW\*(C`native\*(C'\fR, \f(CW\*(C`windows\*(C'\fR,
    1766 \&\f(CW\*(C`console\*(C'\fR, and \f(CW\*(C`posix\*(C'\fR.  You may optionally set the
    1767 subsystem version also.
    1768 [This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
    1769 .SH "ENVIRONMENT"
    1770 .IX Header "ENVIRONMENT"
    1771 You can change the behavior of \fBld\fR with the environment variables
    1772 \&\f(CW\*(C`GNUTARGET\*(C'\fR,
    1773 \&\f(CW\*(C`LDEMULATION\*(C'\fR and \f(CW\*(C`COLLECT_NO_DEMANGLE\*(C'\fR.
    1774 .PP
    1775 \&\f(CW\*(C`GNUTARGET\*(C'\fR determines the input-file object format if you don't
    1776 use \fB\-b\fR (or its synonym \fB\-\-format\fR).  Its value should be one
    1777 of the \s-1BFD\s0 names for an input format.  If there is no
    1778 \&\f(CW\*(C`GNUTARGET\*(C'\fR in the environment, \fBld\fR uses the natural format
    1779 of the target. If \f(CW\*(C`GNUTARGET\*(C'\fR is set to \f(CW\*(C`default\*(C'\fR then \s-1BFD\s0
    1780 attempts to discover the input format by examining binary input files;
    1781 this method often succeeds, but there are potential ambiguities, since
    1782 there is no method of ensuring that the magic number used to specify
    1783 object-file formats is unique.  However, the configuration procedure for
    1784 \&\s-1BFD\s0 on each system places the conventional format for that system first
    1785 in the search\-list, so ambiguities are resolved in favor of convention.
    1786 .PP
    1787 \&\f(CW\*(C`LDEMULATION\*(C'\fR determines the default emulation if you don't use the
    1788 \&\fB\-m\fR option.  The emulation can affect various aspects of linker
    1789 behaviour, particularly the default linker script.  You can list the
    1790 available emulations with the \fB\-\-verbose\fR or \fB\-V\fR options.  If
    1791 the \fB\-m\fR option is not used, and the \f(CW\*(C`LDEMULATION\*(C'\fR environment
    1792 variable is not defined, the default emulation depends upon how the
    1793 linker was configured.
    1794 .PP
    1795 Normally, the linker will default to demangling symbols.  However, if
    1796 \&\f(CW\*(C`COLLECT_NO_DEMANGLE\*(C'\fR is set in the environment, then it will
    1797 default to not demangling symbols.  This environment variable is used in
    1798 a similar fashion by the \f(CW\*(C`gcc\*(C'\fR linker wrapper program.  The default
    1799 may be overridden by the \fB\-\-demangle\fR and \fB\-\-no\-demangle\fR
    1800 options.
    1801 .SH "SEE ALSO"
    1802 .IX Header "SEE ALSO"
    1803 \&\fIar\fR\|(1), \fInm\fR\|(1), \fIobjcopy\fR\|(1), \fIobjdump\fR\|(1), \fIreadelf\fR\|(1) and
    1804 the Info entries for \fIbinutils\fR and
    1805 \&\fIld\fR.
    1806 .SH "COPYRIGHT"
    1807 .IX Header "COPYRIGHT"
    1808 Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001,
    1809 2002, 2003 Free Software Foundation, Inc.
    1810 .PP
    1811 Permission is granted to copy, distribute and/or modify this document
    1812 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
    1813 or any later version published by the Free Software Foundation;
    1814 with no Invariant Sections, with no Front-Cover Texts, and with no
    1815 Back-Cover Texts.  A copy of the license is included in the
    1816 section entitled ``\s-1GNU\s0 Free Documentation License''.
  • trunk/src/binutils/ld/ldctor.c

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r728 r729  
    362362              if (e->name != NULL)
    363363                minfo ("%T\n", e->name);
    364 #ifdef __EMX__ /* r=bird: Is this workaround for a crash something? */
    365364              else if (e->section->owner != NULL)
    366365                minfo ("%G\n", e->section->owner, e->section, e->value);
    367366              else
    368367                minfo ("*unknown*\n");
    369 #else
    370               else
    371                 minfo ("%G\n", e->section->owner, e->section, e->value);
    372 #endif
    373368            }
    374369
Note: See TracChangeset for help on using the changeset viewer.