mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
* aoutx.h, archive.c, archures.c, bfd.c, cache.c, coff-m88k.c,
coffcode.h, core.c, ctor.c, elf.c, format.c, ieee.c, init.c, libbfd.c, libbfd.h, libcoff.h, opncls.c, reloc.c, section.c, srec.c, syms.c, targets.c : all new documentation and lint removal.
This commit is contained in:
120
bfd/coffcode.h
120
bfd/coffcode.h
@@ -23,7 +23,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
SECTION
|
||||
coff backends
|
||||
|
||||
DESCRIPTION
|
||||
BFD supports a number of different flavours of coff format.
|
||||
The major difference between formats are the sizes and
|
||||
alignments of fields in structures on disk, and the occasional
|
||||
@@ -51,7 +50,6 @@ DESCRIPTION
|
||||
SUBSECTION
|
||||
Porting To A New Version of Coff
|
||||
|
||||
DESCRIPTION
|
||||
The recommended method is to select from the existing
|
||||
implimentations the version of coff which is most like the one
|
||||
you want to use, for our purposes, we'll say that i386 coff is
|
||||
@@ -80,7 +78,6 @@ SUBSECTION
|
||||
SUBSUBSECTION
|
||||
Bit Twiddling
|
||||
|
||||
DESCRIPTION
|
||||
Each flavour of coff supported in BFD has its own header file
|
||||
descibing the external layout of the structures. There is also
|
||||
an internal description of the coff layout (in
|
||||
@@ -116,7 +113,6 @@ DESCRIPTION
|
||||
SUBSUBSECTION
|
||||
Symbol Reading
|
||||
|
||||
DESCRIPTION
|
||||
The simple canonical form for symbols used by BFD is not rich
|
||||
enough to keep all the information available in a coff symbol
|
||||
table. The back end gets around this by keeping the original
|
||||
@@ -134,7 +130,7 @@ DESCRIPTION
|
||||
pointer to another structure in the symbol table at one moment
|
||||
may be the size in bytes of a structure in the next. Another
|
||||
pass is made over the table. All symbols which mark file names
|
||||
(@code{C_FILE} symbols) are modified so that the internal
|
||||
(<<C_FILE>> symbols) are modified so that the internal
|
||||
string points to the value in the auxent (the real filename)
|
||||
rather than the normal text associated with the symbol
|
||||
(@code{".file"}).
|
||||
@@ -159,8 +155,6 @@ DESCRIPTION
|
||||
SUBSUBSECTION
|
||||
Symbol Writing
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
Writing a symbol to a coff file which didn't come from a coff
|
||||
file will lose any debugging information. The @code{asymbol}
|
||||
structure remembers the BFD from which was born, and on output
|
||||
@@ -175,8 +169,6 @@ DESCRIPTION
|
||||
the linker to accumulate and output large symbol tables
|
||||
without having to do too much byte copying.
|
||||
|
||||
|
||||
|
||||
This function runs through the provided symbol table and
|
||||
patches each symbol marked as a file place holder
|
||||
(@code{C_FILE}) to point to the next file place holder in the
|
||||
@@ -195,6 +187,7 @@ DESCRIPTION
|
||||
@code{asection} @xref{Sections}.
|
||||
|
||||
o coff_mangle_symbols
|
||||
|
||||
This routine runs though the provided symbol table and uses
|
||||
the offsets generated by the previous pass and the pointers
|
||||
generated when the symbol table was read in to create the
|
||||
@@ -203,6 +196,7 @@ DESCRIPTION
|
||||
being referenced.
|
||||
|
||||
o coff_write_symbols
|
||||
|
||||
This routine runs through the symbol table and patches up the
|
||||
symbols from their internal form into the coff way, calls the
|
||||
bit twiddlers and writes out the tabel to the file.
|
||||
@@ -210,56 +204,53 @@ DESCRIPTION
|
||||
*/
|
||||
|
||||
/*
|
||||
INTERNAL
|
||||
|
||||
INTERNAL_DEFINITION
|
||||
coff_symbol_type
|
||||
|
||||
DESCRIPTION
|
||||
The hidden information for an asymbol is described in a
|
||||
coff_ptr_struct, which is typedefed to a combined_entry_type
|
||||
|
||||
.typedef struct coff_ptr_struct
|
||||
.{
|
||||
|
||||
Remembers the offset from the first symbol in the file for
|
||||
this symbol. Generated by @code{coff_renumber_symbols}.
|
||||
|
||||
.unsigned int offset;
|
||||
|
||||
Should the tag field of this symbol be renumbered.
|
||||
Created by @code{coff_pointerize_aux}.
|
||||
|
||||
.char fix_tag;
|
||||
|
||||
Should the endidx field of this symbol be renumbered.
|
||||
Created by @code{coff_pointerize_aux}.
|
||||
|
||||
.char fix_end;
|
||||
|
||||
The container for the symbol structure as read and translated
|
||||
from the file.
|
||||
|
||||
.union {
|
||||
. union internal_auxent auxent;
|
||||
. struct internal_syment syment;
|
||||
. } u;
|
||||
.} combined_entry_type;
|
||||
|
||||
Each canonical asymbol really looks like this:
|
||||
|
||||
.typedef struct coff_symbol_struct
|
||||
.{
|
||||
|
||||
The actual symbol which the rest of BFD works with
|
||||
|
||||
.asymbol symbol;
|
||||
|
||||
A pointer to the hidden information for this symbol
|
||||
|
||||
.combined_entry_type *native;
|
||||
|
||||
A pointer to the linenumber information for this symbol
|
||||
|
||||
.struct lineno_cache_entry *lineno;
|
||||
.} coff_symbol_type;
|
||||
CODE_FRAGMENT
|
||||
.typedef struct coff_ptr_struct
|
||||
.{
|
||||
.
|
||||
. {* Remembers the offset from the first symbol in the file for
|
||||
. this symbol. Generated by coff_renumber_symbols. *}
|
||||
.unsigned int offset;
|
||||
.
|
||||
. {* Should the tag field of this symbol be renumbered.
|
||||
. Created by coff_pointerize_aux. *}
|
||||
.char fix_tag;
|
||||
.
|
||||
. {* Should the endidx field of this symbol be renumbered.
|
||||
. Created by coff_pointerize_aux. *}
|
||||
.char fix_end;
|
||||
.
|
||||
. {* The container for the symbol structure as read and translated
|
||||
. from the file. *}
|
||||
.
|
||||
.union {
|
||||
. union internal_auxent auxent;
|
||||
. struct internal_syment syment;
|
||||
. } u;
|
||||
.} combined_entry_type;
|
||||
.
|
||||
.
|
||||
.{* Each canonical asymbol really looks like this: *}
|
||||
.
|
||||
.typedef struct coff_symbol_struct
|
||||
.{
|
||||
. {* The actual symbol which the rest of BFD works with *}
|
||||
.asymbol symbol;
|
||||
.
|
||||
. {* A pointer to the hidden information for this symbol *}
|
||||
.combined_entry_type *native;
|
||||
.
|
||||
. {* A pointer to the linenumber information for this symbol *}
|
||||
.struct lineno_cache_entry *lineno;
|
||||
.
|
||||
.} coff_symbol_type;
|
||||
|
||||
|
||||
*/
|
||||
@@ -1658,7 +1649,6 @@ DEFUN(coff_write_symbols,(abfd),
|
||||
SUBSUBSECTION
|
||||
Writing Relocations
|
||||
|
||||
DESCRIPTION
|
||||
To write relocations, all the back end does is step though the
|
||||
canonical relocation table, and create an
|
||||
@code{internal_reloc}. The symbol index to use is removed from
|
||||
@@ -1836,7 +1826,7 @@ fprintf(file,"[%3d]",
|
||||
fprintf(file, "File ");
|
||||
break;
|
||||
default:
|
||||
fprintf(file, "AUX tv %x lnno %x size %x",
|
||||
fprintf(file, "AUX lnno %x size %x",
|
||||
combined[aux+1].u.auxent.x_sym.x_misc.x_lnsz.x_lnno,
|
||||
combined[aux+1].u.auxent.x_sym.x_misc.x_lnsz.x_size);
|
||||
break;
|
||||
@@ -2720,7 +2710,6 @@ DEFUN(section_from_bfd_index,(abfd, index),
|
||||
SUBSUBSECTION
|
||||
Reading Linenumbers
|
||||
|
||||
DESCRIPTION
|
||||
Creating the linenumber table is done by reading in the entire
|
||||
coff linenumber table, and creating another table for internal use.
|
||||
|
||||
@@ -3081,7 +3070,6 @@ sec_ptr asect;
|
||||
SUBSUBSECTION
|
||||
Reading Relocations
|
||||
|
||||
DESCRIPTION
|
||||
Coff relocations are easily transformed into the internal BFD form
|
||||
(@code{arelent}).
|
||||
|
||||
@@ -3159,6 +3147,16 @@ DEFUN(coff_slurp_reloc_table,(abfd, asect, symbols),
|
||||
|
||||
for (idx = 0; idx < asect->reloc_count; idx ++)
|
||||
{
|
||||
#ifdef RELOC_PROCESSING
|
||||
struct internal_reloc dst;
|
||||
struct external_reloc *src;
|
||||
|
||||
cache_ptr = reloc_cache + idx;
|
||||
src = native_relocs + idx;
|
||||
bfd_swap_reloc_in(abfd, src, &dst);
|
||||
|
||||
RELOC_PROCESSING(cache_ptr, &dst, symbols, abfd, asect);
|
||||
#else
|
||||
struct internal_reloc dst;
|
||||
asymbol *ptr;
|
||||
struct external_reloc *src;
|
||||
@@ -3169,10 +3167,6 @@ DEFUN(coff_slurp_reloc_table,(abfd, asect, symbols),
|
||||
bfd_swap_reloc_in(abfd, src, &dst);
|
||||
|
||||
|
||||
#ifdef RELOC_PROCESSING
|
||||
RELOC_PROCESSING(cache_ptr, &dst, symbols, abfd, asect);
|
||||
#else
|
||||
|
||||
cache_ptr->address = dst.r_vaddr;
|
||||
|
||||
if (dst.r_symndx != -1)
|
||||
|
||||
Reference in New Issue
Block a user