aboutsummaryrefslogtreecommitdiff
path: root/bfd/ctor.c
diff options
context:
space:
mode:
authorDavid MacKenzie <djm@cygnus>1993-11-05 19:51:52 +0000
committerDavid MacKenzie <djm@cygnus>1993-11-05 19:51:52 +0000
commitc188b0bec3b6f147efe7474a606799ed7185d806 (patch)
tree880b6ef2d75443502b96d143f5e4d4244d1a5e15 /bfd/ctor.c
parent5090e82cca377dd12046a4bb7dc1922f363348b4 (diff)
downloadgdb-c188b0bec3b6f147efe7474a606799ed7185d806.zip
gdb-c188b0bec3b6f147efe7474a606799ed7185d806.tar.gz
gdb-c188b0bec3b6f147efe7474a606799ed7185d806.tar.bz2
doc cleanup
Diffstat (limited to 'bfd/ctor.c')
-rw-r--r--bfd/ctor.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/bfd/ctor.c b/bfd/ctor.c
index adc6919..702ddc0 100644
--- a/bfd/ctor.c
+++ b/bfd/ctor.c
@@ -25,27 +25,27 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
SECTION
Constructors
- Classes in C++ have `constructors' and `destructors'. These
+ Classes in C++ have @dfn{constructors} and @dfn{destructors}. These
are functions which are called automatically by the language
whenever data of a class is created or destroyed. Class data
- which is static data may also be have a type which requires
- `construction', the contructor must be called before the data
+ which is static may also be have a type which requires
+ `construction'; the contructor must be called before the data
can be referenced, so the contructor must be called before the
program begins.
The common solution to this problem is for the compiler to
- call a magic function as the first statement <<main>>.
- This magic function, (often called <<__main>>) runs around
+ call a magic function as the first statement before <<main>>.
+ This magic function (often called <<__main>>) runs around
calling the constructors for all the things needing it.
- With COFF the compile has a bargain with the linker et al.
- All constructors are given strange names, for example
+ With COFF, the compiler has a bargain with the linker et al.
+ All constructors are given strange names; for example,
<<__GLOBAL__$I$foo>> might be the label of a contructor for
the class @var{foo}. The solution on unfortunate systems
- (most system V machines) is to perform a partial link on all
+ (most System V machines) is to perform a partial link on all
the <<.o>> files, do an <<nm>> on the result, run <<awk>> or some
such over the result looking for strange <<__GLOBAL__$>>
- symbols, generate a C program from this, compile it and link
+ symbols, generate a C program from this, compile it, and link
with the partially linked input. This process is usually
called <<collect>>.
@@ -54,10 +54,10 @@ SECTION
from the compiler with a special stab code saying that they
are constructors, and the linker can deal with them directly.
- BFD allows applications (ie the linker) to deal with
+ BFD allows applications (i.e., the linker) to deal with
constructor information independently of their external
- implimentation by providing a set of entry points for the
- indiviual object back ends to call which maintains a database
+ implementation by providing a set of entry points for the
+ indiviual object back ends to call to maintain a database
of the contructor information. The application can
interrogate the database to find out what it wants. The
construction data essential for the linker to be able to
@@ -71,15 +71,15 @@ SECTION
The type of symbol, i.e., is it a constructor, a destructor or
something else someone dreamed up to make our lives difficult.
- This module takes this information and then builds extra
- sections attached to the bfds which own the entry points. It
+ The constructor module takes this information and builds extra
+ sections attached to the BFDs which own the entry points. It
creates these sections as if they were tables of pointers to
the entry points, and builds relocation entries to go with
them so that the tables can be relocated along with the data
they reference.
These sections are marked with a special bit
- (<<SEC_CONSTRUCTOR>>) which the linker notices and do with
+ (<<SEC_CONSTRUCTOR>>), which the linker notices and does with
what it wants.
*/
@@ -101,11 +101,11 @@ SYNOPSIS
DESCRIPTION
- This function is called with an a symbol describing the
- function to be called, an string which descibes the xtor type,
- e.g., something like "CTOR" or "DTOR" would be fine. And the bfd
- which owns the function. Its duty is to create a section
- called "CTOR" or "DTOR" or whatever if the bfd doesn't already
+ @var{symbol_ptr_ptr} describes the
+ function to be called; @var{type} descibes the xtor type,
+ e.g., something like "CTOR" or "DTOR" would be fine. @var{abfd}
+ is the BFD which owns the function. Create a section
+ called "CTOR" or "DTOR" or whatever if the BFD doesn't already
have one, and grow a relocation table for the entry points as
they accumulate.
@@ -116,7 +116,6 @@ void DEFUN(bfd_constructor_entry,(abfd, symbol_ptr_ptr, type),
bfd *abfd AND
asymbol **symbol_ptr_ptr AND
CONST char *type)
-
{
/* Look up the section we're using to store the table in */
asection *rel_section = bfd_get_section_by_name (abfd, type);