OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gdb/] [gdb-6.8/] [gdb-6.8.openrisc-2.1/] [include/] [aout/] [ranlib.h] - Diff between revs 24 and 33

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 33
/* ranlib.h -- archive library index member definition for GNU.
/* ranlib.h -- archive library index member definition for GNU.
   Copyright 1990, 1991 Free Software Foundation, Inc.
   Copyright 1990, 1991 Free Software Foundation, Inc.
 
 
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
 
 
This program is distributed in the hope that it will be useful,
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
GNU General Public License for more details.
 
 
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 
/* The Symdef member of an archive contains two things:
/* The Symdef member of an archive contains two things:
   a table that maps symbol-string offsets to file offsets,
   a table that maps symbol-string offsets to file offsets,
   and a symbol-string table.  All the symbol names are
   and a symbol-string table.  All the symbol names are
   run together (each with trailing null) in the symbol-string
   run together (each with trailing null) in the symbol-string
   table.  There is a single longword bytecount on the front
   table.  There is a single longword bytecount on the front
   of each of these tables.  Thus if we have two symbols,
   of each of these tables.  Thus if we have two symbols,
   "foo" and "_bar", that are in archive members at offsets
   "foo" and "_bar", that are in archive members at offsets
   200 and 900, it would look like this:
   200 and 900, it would look like this:
        16              ; byte count of index table
        16              ; byte count of index table
        0                ; offset of "foo" in string table
        0                ; offset of "foo" in string table
        200             ; offset of foo-module in file
        200             ; offset of foo-module in file
        4               ; offset of "bar" in string table
        4               ; offset of "bar" in string table
        900             ; offset of bar-module in file
        900             ; offset of bar-module in file
        9               ; byte count of string table
        9               ; byte count of string table
        "foo\0_bar\0"   ; string table  */
        "foo\0_bar\0"   ; string table  */
 
 
#define RANLIBMAG       "__.SYMDEF"     /* Archive file name containing index */
#define RANLIBMAG       "__.SYMDEF"     /* Archive file name containing index */
#define RANLIBSKEW      3               /* Creation time offset */
#define RANLIBSKEW      3               /* Creation time offset */
 
 
/* Format of __.SYMDEF:
/* Format of __.SYMDEF:
   First, a longword containing the size of the 'symdef' data that follows.
   First, a longword containing the size of the 'symdef' data that follows.
   Second, zero or more 'symdef' structures.
   Second, zero or more 'symdef' structures.
   Third, a longword containing the length of symbol name strings.
   Third, a longword containing the length of symbol name strings.
   Fourth, zero or more symbol name strings (each followed by a null).  */
   Fourth, zero or more symbol name strings (each followed by a null).  */
 
 
struct symdef
struct symdef
  {
  {
    union
    union
      {
      {
        unsigned long string_offset;    /* In the file */
        unsigned long string_offset;    /* In the file */
        char *name;                     /* In memory, sometimes */
        char *name;                     /* In memory, sometimes */
      } s;
      } s;
    /* this points to the front of the file header (AKA member header --
    /* this points to the front of the file header (AKA member header --
       a struct ar_hdr), not to the front of the file or into the file).
       a struct ar_hdr), not to the front of the file or into the file).
       in other words it only tells you which file to read */
       in other words it only tells you which file to read */
    unsigned long file_offset;
    unsigned long file_offset;
  };
  };
 
 
/* Compatability with BSD code */
/* Compatability with BSD code */
 
 
#define ranlib  symdef
#define ranlib  symdef
#define ran_un  s
#define ran_un  s
#define ran_strx string_offset
#define ran_strx string_offset
#define ran_name name
#define ran_name name
#define ran_off file_offset
#define ran_off file_offset
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.