Change insertion marker for new bfd.h generation scheme.
[deliverable/binutils-gdb.git] / bfd / ctor.c
index 5aa75b74dbcc2e8fae4f48867a75a54eeb2c4cf0..3d939ef16b593cfbdc143fb79acbe2d3c16f6be0 100644 (file)
@@ -25,7 +25,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 SECTION
        Constructors
 
-DESCRIPTION
        Classes in C++ have 'constructors' and 'destructors'.  These
        are functions which are called automatically by the language
        whenever data of a class is created or destroyed.  Class data
@@ -64,11 +63,11 @@ DESCRIPTION
        construction data essential for the linker to be able to
        perform its job are: 
 
-       o asymbol
+       o asymbol -
        The asymbol of the contructor entry point contains all the
        information necessary to call the function. 
 
-       o table id
+       o table id -
        The type of symbol, ie is it a contructor, a destructor or
        something else someone dreamed up to make our lives difficult.
 
@@ -92,23 +91,24 @@ DESCRIPTION
 
 
 /*
-INTERNAL FUNCTION
+INTERNAL_FUNCTION
        bfd_constructor_entry 
 
+SYNOPSIS
+       void bfd_constructor_entry(bfd *abfd, 
+               asymbol **symbol_ptr_ptr,
+               CONST char*type);
+
+
 DESCRIPTION
        This function is called with an a symbol describing the
        function to be called, an string which descibes the xtor type,
-       eg something like "CTOR" or "DTOR" would be fine. And the bfd
+       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
        have one, and grow a relocation table for the entry points as
        they accumulate.
 
-SYNOPSIS
-       void bfd_constructor_entry(bfd *abfd, 
-               asymbol **symbol_ptr_ptr,
-               CONST char*type);
-
 */
 
  
@@ -132,18 +132,16 @@ void DEFUN(bfd_constructor_entry,(abfd, symbol_ptr_ptr, type),
        arelent_chain *reloc = (arelent_chain *)bfd_alloc(abfd,
                                                         sizeof(arelent_chain));
 
-       reloc->relent.section = (asection *)NULL;
+/*       reloc->relent.section = (asection *)NULL;*/
        reloc->relent.addend = 0;
 
        reloc->relent.sym_ptr_ptr = symbol_ptr_ptr;
        reloc->next = rel_section->constructor_chain;
        rel_section->constructor_chain = reloc;
-       reloc->relent.address = rel_section->size;
+       reloc->relent.address = rel_section->_cooked_size;
        /* ask the cpu which howto to use */
-       reloc->relent.howto =
-       bfd_reloc_type_lookup(abfd->arch_info,
-                             BFD_RELOC_CTOR);
-       rel_section->size += sizeof(int *);
+       reloc->relent.howto = bfd_reloc_type_lookup(abfd, BFD_RELOC_CTOR);
+       rel_section->_cooked_size += sizeof(int *);
        rel_section->reloc_count++;
    }
 
This page took 0.02441 seconds and 4 git commands to generate.