* include/sys/elf64.h: Fix types to reflect linux usage.

This commit is contained in:
Christopher Faylor 2005-11-14 20:34:33 +00:00
parent 548d0080af
commit 409d1d50fd
3 changed files with 47 additions and 38 deletions

View File

@ -1,3 +1,7 @@
2005-11-14 Christopher Faylor <cgf@timesys.com>
* include/sys/elf64.h: Fix types to reflect linux usage.
2005-11-14 Corinna Vinschen <corinna@vinschen.de>
Christopher Faylor <cgf@timesys.com>

View File

@ -1095,12 +1095,14 @@ sigpacket::process ()
if (si.si_signo == SIGTSTP || si.si_signo == SIGTTIN || si.si_signo == SIGTTOU)
sig_clear (SIGCONT);
#ifdef CGF
if (being_debugged ())
{
char sigmsg[sizeof (_CYGWIN_SIGNAL_STRING " 0xffffffff")];
__small_sprintf (sigmsg, _CYGWIN_SIGNAL_STRING " %p", si.si_signo);
OutputDebugString (sigmsg);
}
#endif
if (handler == (void *) SIG_DFL)
{

View File

@ -35,13 +35,16 @@
* ELF definitions common to all 64-bit architectures.
*/
typedef u_int64_t Elf64_Addr;
typedef u_int32_t Elf64_Half;
typedef u_int64_t Elf64_Off;
typedef int64_t Elf64_Sword;
typedef u_int64_t Elf64_Word;
typedef u_int64_t Elf64_Size;
typedef u_int16_t Elf64_Quarter;
typedef uint64_t Elf64_Addr;
typedef uint16_t Elf64_Half;
typedef uint32_t Elf64_Word;
typedef int32_t Elf64_Sword;
typedef uint64_t Elf64_Xword;
typedef int64_t Elf64_Sxword;
typedef uint64_t Elf64_Off;
typedef uint16_t Elf64_Section;
typedef Elf64_Half Elf64_Versym;
typedef uint16_t Elf64_Quarter;
/*
* Types of dynamic symbol hash table bucket and chain elements.
@ -62,19 +65,19 @@ typedef Elf64_Half Elf64_Hashelt;
typedef struct {
unsigned char e_ident[EI_NIDENT]; /* File identification. */
Elf64_Quarter e_type; /* File type. */
Elf64_Quarter e_machine; /* Machine architecture. */
Elf64_Half e_version; /* ELF format version. */
Elf64_Half e_type; /* File type. */
Elf64_Half e_machine; /* Machine architecture. */
Elf64_Word e_version; /* ELF format version. */
Elf64_Addr e_entry; /* Entry point. */
Elf64_Off e_phoff; /* Program header file offset. */
Elf64_Off e_shoff; /* Section header file offset. */
Elf64_Half e_flags; /* Architecture-specific flags. */
Elf64_Quarter e_ehsize; /* Size of ELF header in bytes. */
Elf64_Quarter e_phentsize; /* Size of program header entry. */
Elf64_Quarter e_phnum; /* Number of program header entries. */
Elf64_Quarter e_shentsize; /* Size of section header entry. */
Elf64_Quarter e_shnum; /* Number of section header entries. */
Elf64_Quarter e_shstrndx; /* Section name strings section. */
Elf64_Word e_flags; /* Architecture-specific flags. */
Elf64_Half e_ehsize; /* Size of ELF header in bytes. */
Elf64_Half e_phentsize; /* Size of program header entry. */
Elf64_Half e_phnum; /* Number of program header entries. */
Elf64_Half e_shentsize; /* Size of section header entry. */
Elf64_Half e_shnum; /* Number of section header entries. */
Elf64_Half e_shstrndx; /* Section name strings section. */
} Elf64_Ehdr;
/*
@ -82,17 +85,17 @@ typedef struct {
*/
typedef struct {
Elf64_Half sh_name; /* Section name (index into the
Elf64_Word sh_name; /* Section name (index into the
section header string table). */
Elf64_Half sh_type; /* Section type. */
Elf64_Size sh_flags; /* Section flags. */
Elf64_Word sh_type; /* Section type. */
Elf64_Xword sh_flags; /* Section flags. */
Elf64_Addr sh_addr; /* Address in memory image. */
Elf64_Off sh_offset; /* Offset in file. */
Elf64_Size sh_size; /* Size in bytes. */
Elf64_Half sh_link; /* Index of a related section. */
Elf64_Half sh_info; /* Depends on section type. */
Elf64_Size sh_addralign; /* Alignment in bytes. */
Elf64_Size sh_entsize; /* Size of each entry in section. */
Elf64_Xword sh_size; /* Size in bytes. */
Elf64_Word sh_link; /* Index of a related section. */
Elf64_Word sh_info; /* Depends on section type. */
Elf64_Xword sh_addralign; /* Alignment in bytes. */
Elf64_Xword sh_entsize; /* Size of each entry in section. */
} Elf64_Shdr;
/*
@ -100,14 +103,14 @@ typedef struct {
*/
typedef struct {
Elf64_Half p_type; /* Entry type. */
Elf64_Half p_flags; /* Access permission flags. */
Elf64_Word p_type; /* Entry type. */
Elf64_Word p_flags; /* Access permission flags. */
Elf64_Off p_offset; /* File offset of contents. */
Elf64_Addr p_vaddr; /* Virtual address in memory image. */
Elf64_Addr p_paddr; /* Physical address (not used). */
Elf64_Size p_filesz; /* Size of contents in file. */
Elf64_Size p_memsz; /* Size of contents in memory. */
Elf64_Size p_align; /* Alignment in memory and file. */
Elf64_Xword p_filesz; /* Size of contents in file. */
Elf64_Xword p_memsz; /* Size of contents in memory. */
Elf64_Xword p_align; /* Alignment in memory and file. */
} Elf64_Phdr;
/*
@ -115,9 +118,9 @@ typedef struct {
*/
typedef struct {
Elf64_Size d_tag; /* Entry type. */
Elf64_Sxword d_tag; /* Entry type. */
union {
Elf64_Size d_val; /* Integer value. */
Elf64_Xword d_val; /* Integer value. */
Elf64_Addr d_ptr; /* Address value. */
} d_un;
} Elf64_Dyn;
@ -129,14 +132,14 @@ typedef struct {
/* Relocations that don't need an addend field. */
typedef struct {
Elf64_Addr r_offset; /* Location to be relocated. */
Elf64_Size r_info; /* Relocation type and symbol index. */
Elf64_Xword r_info; /* Relocation type and symbol index. */
} Elf64_Rel;
/* Relocations that need an addend field. */
typedef struct {
Elf64_Addr r_offset; /* Location to be relocated. */
Elf64_Size r_info; /* Relocation type and symbol index. */
Elf64_Off r_addend; /* Addend. */
Elf64_Xword r_info; /* Relocation type and symbol index. */
Elf64_Sxword r_addend; /* Addend. */
} Elf64_Rela;
/* Macros for accessing the fields of r_info. */
@ -151,12 +154,12 @@ typedef struct {
*/
typedef struct {
Elf64_Half st_name; /* String table index of name. */
Elf64_Word st_name; /* String table index of name. */
unsigned char st_info; /* Type and binding information. */
unsigned char st_other; /* Reserved (not used). */
Elf64_Quarter st_shndx; /* Section index of symbol. */
Elf64_Section st_shndx; /* Section index of symbol. */
Elf64_Addr st_value; /* Symbol value. */
Elf64_Size st_size; /* Size of associated object. */
Elf64_Xword st_size; /* Size of associated object. */
} Elf64_Sym;
/* Macros for accessing the fields of st_info. */