/**************************************************************************************
Copyright (c) 2002 The UbixOS Project
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are prohibited.
$Id$
**************************************************************************************/
#ifndef _ELF_H
#define _ELF_H
#include <ubixos/types.h>
typedef struct {
uChar eIdent[16]; /* File identification. */
uShort eType; /* File type. */
uShort eMachine; /* Machine architecture. */
uLong eVersion; /* ELF format version. */
uLong eEntry; /* Entry point. */
uLong ePhoff; /* Program header file offset. */
uLong eShoff; /* Section header file offset. */
uLong eFlags; /* Architecture-specific flags. */
uShort eEhsize; /* Size of ELF header in bytes. */
uShort ePhentsize; /* Size of program header entry. */
uShort ePhnum; /* Number of program header entries. */
uShort eShentsize; /* Size of section header entry. */
uShort eShnum; /* Number of section header entries. */
uShort eShstrndx; /* Section name strings section. */
} elfHeader;
typedef struct {
uLong phType; /* Entry type. */
uLong phOffset; /* File offset of contents. */
uLong phVaddr; /* Virtual address in memory image. */
uLong phPaddr; /* Physical address (not used). */
uLong phFilesz; /* Size of contents in file. */
uLong phMemsz; /* Size of contents in memory. */
uLong phFlags; /* Access permission flags. */
uLong phAlign; /* Alignment in memory and file. */
} elfProgramheader;
typedef struct {
uLong shName; /* Section name (index into the section header string table). */
uLong shType; /* Section type. */
uLong shFlags; /* Section flags. */
uLong shAddr; /* Address in memory image. */
uLong shOffset; /* Offset in file. */
uLong shSize; /* Size in bytes. */
uLong shLink; /* Index of a related section. */
uLong shInfo; /* Depends on section type. */
uLong shAddralign; /* Alignment in bytes. */
uLong shEntsize; /* Size of each entry in section. */
} elfSectionheader;
#endif