Subversion Repositories Kolibri OS

Rev

Rev 5191 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5191 Rev 6324
1
/* COFF information for AMD 64.
1
/* COFF information for AMD 64.
2
   Copyright 2006, 2009, 2010 Free Software Foundation, Inc.
2
   Copyright (C) 2006-2015 Free Software Foundation, Inc.
3
 
3
 
4
   This file is part of BFD, the Binary File Descriptor library.
4
   This file is part of BFD, the Binary File Descriptor library.
5
 
5
 
6
   This program is free software; you can redistribute it and/or modify
6
   This program is free software; you can redistribute it and/or modify
7
   it under the terms of the GNU General Public License as published by
7
   it under the terms of the GNU General Public License as published by
8
   the Free Software Foundation; either version 3 of the License, or
8
   the Free Software Foundation; either version 3 of the License, or
9
   (at your option) any later version.
9
   (at your option) any later version.
10
 
10
 
11
   This program is distributed in the hope that it will be useful,
11
   This program is distributed in the hope that it will be useful,
12
   but WITHOUT ANY WARRANTY; without even the implied warranty of
12
   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
   GNU General Public License for more details.
14
   GNU General Public License for more details.
15
 
15
 
16
   You should have received a copy of the GNU General Public License
16
   You should have received a copy of the GNU General Public License
17
   along with this program; if not, write to the Free Software
17
   along with this program; if not, write to the Free Software
18
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
18
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19
   MA 02110-1301, USA.
19
   MA 02110-1301, USA.
20
   
20
   
21
   Written by Kai Tietz, OneVision Software GmbH&CoKg.  */
21
   Written by Kai Tietz, OneVision Software GmbH&CoKg.  */
22
 
22
 
23
#define L_LNNO_SIZE 2
23
#define L_LNNO_SIZE 2
24
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
24
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
25
 
25
 
26
#include "coff/external.h"
26
#include "coff/external.h"
27
 
27
 
28
#define COFF_PAGE_SIZE	0x1000
28
#define COFF_PAGE_SIZE	0x1000
29
 
29
 
30
#define AMD64MAGIC	0x8664
30
#define AMD64MAGIC	0x8664
31
 
31
 
32
#define AMD64BADMAG(x)	((x).f_magic != AMD64MAGIC)
32
#define AMD64BADMAG(x)	((x).f_magic != AMD64MAGIC)
33
#define IMAGE_NT_OPTIONAL_HDR64_MAGIC      0x20b
33
#define IMAGE_NT_OPTIONAL_HDR64_MAGIC      0x20b
34
 
34
 
35
#define OMAGIC          0404    /* Object files, eg as output.  */
35
#define OMAGIC          0404    /* Object files, eg as output.  */
36
#define ZMAGIC          IMAGE_NT_OPTIONAL_HDR64_MAGIC    /* Demand load format, eg normal ld output 0x10b.  */
36
#define ZMAGIC          IMAGE_NT_OPTIONAL_HDR64_MAGIC    /* Demand load format, eg normal ld output 0x10b.  */
37
#define STMAGIC		0401	/* Target shlib.  */
37
#define STMAGIC		0401	/* Target shlib.  */
38
#define SHMAGIC		0443	/* Host   shlib.  */
38
#define SHMAGIC		0443	/* Host   shlib.  */
39
 
39
 
40
/* Define some NT default values.  */
40
/* Define some NT default values.  */
41
/*  #define NT_IMAGE_BASE        0x400000 moved to internal.h.  */
41
/*  #define NT_IMAGE_BASE        0x400000 moved to internal.h.  */
42
#define NT_SECTION_ALIGNMENT 0x1000
42
#define NT_SECTION_ALIGNMENT 0x1000
43
#define NT_FILE_ALIGNMENT    0x200
43
#define NT_FILE_ALIGNMENT    0x200
44
#define NT_DEF_RESERVE       0x100000
44
#define NT_DEF_RESERVE       0x100000
45
#define NT_DEF_COMMIT        0x1000
45
#define NT_DEF_COMMIT        0x1000
46
 
46
 
47
/* Relocation directives.  */
47
/* Relocation directives.  */
48
 
48
 
49
struct external_reloc
49
struct external_reloc
50
{
50
{
51
  char r_vaddr[4];
51
  char r_vaddr[4];
52
  char r_symndx[4];
52
  char r_symndx[4];
53
  char r_type[2];
53
  char r_type[2];
54
};
54
};
55
 
55
 
56
#define RELOC struct external_reloc
56
#define RELOC struct external_reloc
57
#define RELSZ 10
57
#define RELSZ 10