implib.h

来自「开放源码的编译器open watcom 1.6.0版的源代码」· C头文件 代码 · 共 110 行

H
110
字号
/****************************************************************************
*
*                            Open Watcom Project
*
*    Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
*  ========================================================================
*
*    This file contains Original Code and/or Modifications of Original
*    Code as defined in and that are subject to the Sybase Open Watcom
*    Public License version 1.0 (the 'License'). You may not use this file
*    except in compliance with the License. BY USING THIS FILE YOU AGREE TO
*    ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
*    provided with the Original Code and Modifications, and is also
*    available at www.sybase.com/developer/opensource.
*
*    The Original Code and all software distributed under the License are
*    distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
*    EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
*    ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
*    NON-INFRINGEMENT. Please see the License for the specific language
*    governing rights and limitations under the License.
*
*  ========================================================================
*
* Description:  WHEN YOU FIGURE OUT WHAT THIS FILE DOES, PLEASE
*               DESCRIBE IT HERE!
*
****************************************************************************/


extern bool AddImport( arch_header *arch, libfile io );
extern void CoffAddImportSymbols( arch_header *, short, long, short *, long, long *, long, char * );
extern void CoffMKImport( arch_header *, importType, long, char * , char *, char *, long);
extern void OmfMKImport( arch_header *arch, long ordinal, char *dll_name, char *sym_name, char * exp, importType type );
extern void ElfMKImport( arch_header *, importType, long, char *, char *, Elf32_Export *, Elf32_Sym *, long );
extern int CoffImportSize( importType, char *, char *, char *, long);
extern int ElfImportSize( import_sym * );
extern void CoffWriteImport( libfile, sym_file * );
extern void ElfWriteImport( libfile, sym_file * );
extern void ProcessImport( char * );

#define MAX_IMPORT_STRING      (_MAX_PATH + 512 + 80)

#define COFFBASEDESCRIPTORSIZE 573
#define COFFBASENULLDESCRIPTORSIZE 127
#define COFFBASENULLTHUNKSIZE 148
#define COFFBASEAXPIMPORTSIZE 385
#define COFFBASEPPCIMPORTSIZE 656
#define COFFBASEAXPNAMEDSIZE 484
#define COFFBASEPPCNAMEDSIZE 755

#define ELFBASEIMPORTSIZE 0x14A
#define ELFBASESTRTABSIZE 0x22

extern char CoffDescrip1[];
extern char CoffDescrip2[];
extern char CoffNullDescriptor[];
extern char CoffNullThunk[];
extern char CoffAXPOrdinal[];
extern char CoffPPCOrdinal[];
extern char CoffAXPNamed1[];
extern char CoffAXPNamed2[];
extern char CoffPPCNamed1[];
extern char CoffPPCNamed2[];

extern char ElfBase[];
extern char ElfOSInfo[];

#define CoffDescrip1_SIZE       0x174
#define CoffDescrip2_SIZE       0x7e
#define CoffNullDescriptor_SIZE 0x7d
#define CoffNullThunk_SIZE      0x7c
#define CoffAXPOrdinal_SIZE     0x15e
#define CoffPPCOrdinal_SIZE     0x26a
#define CoffAXPNamed1_SIZE      0xfa
#define CoffAXPNamed2_SIZE      0xc6
#define CoffPPCNamed1_SIZE      0x19a
#define CoffPPCNamed2_SIZE      0x132

#define ElfBase_SIZE            0x122
#define ElfOSInfo_SIZE          0x28

#pragma pack (push, 1)

typedef struct {
    unsigned_32         flags;
    unsigned_32         date;
    struct {
        unsigned_16     major;
        unsigned_16     minor;
    } version;
    unsigned_32         nameRVA;
    unsigned_32         ordBase;
    unsigned_32         numAddr;
    unsigned_32         numNamePointer;
    unsigned_32         AddrTableRVA;
    unsigned_32         NamePointerTableRVA;
    unsigned_32         OrdTableRVA;
} Coff32_Export;

typedef unsigned_32 Coff32_EName;
typedef unsigned_16 Coff32_EOrd;

#define ELF_IMPORT_SYM_INFO             0x10
#define ELF_IMPORT_NAMED_SYM_INFO       0x15

#pragma pack (pop)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?