bfd/
[deliverable/binutils-gdb.git] / gas / doc / internals.texi
index 23f2fce731f669598ac3eae176140853d262c36b..6719bbf945d35cca5dbc240c292852871d754886 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo
 @c  Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-@c  2001, 2002
+@c  2001, 2002, 2003
 @c  Free Software Foundation, Inc.
 @setfilename internals.info
 @node Top
@@ -704,9 +704,10 @@ processing.  After this point, it is safe to operate on one chain per section.
 
 The assembler always has a current frag, named @code{frag_now}.  More space is
 allocated for the current frag using the @code{frag_more} function; this
-returns a pointer to the amount of requested space.  Relaxing is done using
-variant frags allocated by @code{frag_var} or @code{frag_variant}
-(@pxref{Relaxation}).
+returns a pointer to the amount of requested space.  The function
+@code{frag_room} says by how much the current frag can be extended.
+Relaxing is done using variant frags allocated by @code{frag_var}
+or @code{frag_variant} (@pxref{Relaxation}).
 
 @node GAS processing
 @section What GAS does when it runs
@@ -1032,6 +1033,11 @@ arguments, the character before the @kbd{=} character, and the value of
 If you define this macro, it should return nonzero if the current input line
 pointer should be treated as the end of a line.
 
+@item TC_CASE_SENSITIVE
+@cindex TC_CASE_SENSITIVE
+Define this macro if instruction mnemonics and pseudos are case sensitive.
+The default is to have it undefined giving case insensitive names.
+
 @item md_parse_name
 @cindex md_parse_name
 If this macro is defined, GAS will call it for any symbol found in an
@@ -1294,12 +1300,13 @@ symbol in the current section.  If undefined, fixups that are not
 returns non-zero, will emit relocs.
 
 @item TC_FORCE_RELOCATION_SUB_SAME (@var{fix}, @var{seg})
-@cindex TC_FORCE_RELOCATION_SUB
+@cindex TC_FORCE_RELOCATION_SUB_SAME
 This macro controls resolution of fixup expressions involving the
 difference of two symbols in the same section.  If this macro returns zero,
 the subtrahend will be resolved and @code{fx_subsy} set to @code{NULL} for
 @code{md_apply_fix3}.  If undefined, the default of
-@w{@code{! SEG_NORMAL (@var{seg})}} will be used.
+@w{@code{! SEG_NORMAL (@var{seg}) || TC_FORCE_RELOCATION (@var{fix})}} will
+be used.
 
 @item TC_FORCE_RELOCATION_SUB_ABS (@var{fix})
 @cindex TC_FORCE_RELOCATION_SUB_ABS
@@ -1324,13 +1331,13 @@ to @code{md_apply_fix3}.  If the macro is undefined, or returns non-zero, the
 symbol value will be included.  For ELF, a suitable definition might simply be
 @code{0}, because ELF relocations don't include the symbol value in the addend.
 
-@item S_FORCE_RELOC (@var{sym})
+@item S_FORCE_RELOC (@var{sym}, @var{strict})
 @cindex S_FORCE_RELOC
 This macro (or function, for @code{BFD_ASSEMBLER} gas) returns true for symbols
 that should not be reduced to section symbols or eliminated from expressions,
 because they may be overridden by the linker.  ie. for symbols that are
-undefined, common or weak, or for ELF assemblers that support ELF shared
-library linking semantics, global.
+undefined or common, and when @var{strict} is set, weak, or global (for ELF
+assemblers that support ELF shared library linking semantics).
 
 @item EXTERN_FORCE_RELOC
 @cindex EXTERN_FORCE_RELOC
@@ -1421,7 +1428,7 @@ colon, the adjoining tokens can be distinguished.  This option affects the
 preprocessor so that whitespace around colons is preserved.  This is useful
 when colons might be removed from the input after preprocessing but before
 assembling, so that adjoining tokens can still be distinguished if there is
-whitespace, or concatentated if there is not.
+whitespace, or concatenated if there is not.
 
 @item tc_frob_section
 @cindex tc_frob_section
@@ -1437,7 +1444,7 @@ symbols.
 @item tc_frob_symbol
 @cindex tc_frob_symbol
 If you define this macro, GAS will call it for each symbol.  You can indicate
-that the symbol should not be included in the object file by definining this
+that the symbol should not be included in the object file by defining this
 macro to set its second argument to a non-zero value.
 
 @item tc_frob_file
@@ -1449,6 +1456,10 @@ completed, but before the relocations have been generated.
 If you define this macro, GAS will call it after the relocs have been
 generated.
 
+@item md_post_relax_hook
+If you define this macro, GAS will call it after relaxing and sizing the
+segments.
+
 @item LISTING_HEADER
 A string to use on the header line of a listing.  The default value is simply
 @code{"GAS LISTING"}.
@@ -1503,6 +1514,12 @@ This define only affects @code{.debug_info} and @code{.debug_line}
 sections generated by the assembler.  DWARF 2 sections generated by
 other tools will be unaffected by this setting.
 
+@item DWARF2_ADDR_SIZE (@var{bfd})
+@cindex DWARF2_ADDR_SIZE
+It should return the size of an address, as it should be represented in
+debugging info.  If you don't define this macro, the default definition uses
+the number of bits per address, as defined in @var{bfd}, divided by 8.
+
 @end table
 
 @node Object format backend
@@ -1548,7 +1565,7 @@ another.
 @item obj_sec_sym_ok_for_reloc
 @cindex obj_sec_sym_ok_for_reloc
 You may define this macro to indicate that it is OK to use a section symbol in
-a relocateion entry.  If it is not, GAS will define a new symbol at the start
+a relocation entry.  If it is not, GAS will define a new symbol at the start
 of a section.
 
 @item EMIT_SECTION_SYMBOLS
@@ -1590,7 +1607,7 @@ symbols.
 @item obj_frob_symbol
 @cindex obj_frob_symbol
 If you define this macro, GAS will call it for each symbol.  You can indicate
-that the symbol should not be included in the object file by definining this
+that the symbol should not be included in the object file by defining this
 macro to set its second argument to a non-zero value.
 
 @item obj_frob_file
@@ -1652,7 +1669,7 @@ case, don't describe the smaller-range, inferior mode.
 The @code{fr_subtype} field of a frag is an index into a CPU-specific
 relaxation table.  That table entry indicates the range of values that can be
 stored, the number of bytes that will have to be added to the frag to
-accomodate the addressing mode, and the index of the next entry to examine if
+accommodate the addressing mode, and the index of the next entry to examine if
 the value to be stored is outside the range accessible by the current
 addressing mode.  The @code{fr_symbol} field of the frag indicates what symbol
 is to be accessed; the @code{fr_offset} field is added in.
@@ -1729,7 +1746,7 @@ Usually, if the symbol is in the same section as the frag (given by the
 @var{sec} argument), the narrowest likely relaxation mode is stored in
 @code{fr_subtype}, and that's that.
 
-If the symbol is undefined, or in a different section (and therefore moveable
+If the symbol is undefined, or in a different section (and therefore movable
 to an arbitrarily large distance), the largest available relaxation mode is
 specified, @code{fix_new} is called to produce the relocation record,
 @code{fr_fix} is increased to include the relocated field (remember, this
@@ -1740,7 +1757,7 @@ It can be accessed via @code{fr_opcode} or @code{fr_fix}.
 
 If you generate frags separately for the basic insn opcode and any relaxable
 operands, do not call @code{fix_new} thinking you can emit fixups for the
-opcode field from the relaxable frag.  It is not garanteed to be the same frag.
+opcode field from the relaxable frag.  It is not guaranteed to be the same frag.
 If you need to emit fixups for the opcode field from inspection of the
 relaxable frag, then you need to generate a common frag for both the basic
 opcode and relaxable fields, or you need to provide the frag for the opcode to
This page took 0.024913 seconds and 4 git commands to generate.