1213274Srpaulo/* COFF information for AMD 64.
2213274Srpaulo   Copyright 2006, 2009 Free Software Foundation, Inc.
3213274Srpaulo
4213274Srpaulo   This file is part of BFD, the Binary File Descriptor library.
5213274Srpaulo
6213274Srpaulo   This program is free software; you can redistribute it and/or modify
7213274Srpaulo   it under the terms of the GNU General Public License as published by
8213274Srpaulo   the Free Software Foundation; either version 2 of the License, or
9213274Srpaulo   (at your option) any later version.
10213274Srpaulo
11213274Srpaulo   This program is distributed in the hope that it will be useful,
12213274Srpaulo   but WITHOUT ANY WARRANTY; without even the implied warranty of
13213274Srpaulo   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14213274Srpaulo   GNU General Public License for more details.
15213274Srpaulo
16213274Srpaulo   You should have received a copy of the GNU General Public License
17213274Srpaulo   along with this program; if not, write to the Free Software
18213274Srpaulo   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19213274Srpaulo
20213274Srpaulo   Written by Kai Tietz, OneVision Software GmbH&CoKg.  */
21213274Srpaulo
22213274Srpaulo#define L_LNNO_SIZE 2
23213274Srpaulo#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
24213274Srpaulo
25213274Srpaulo#include "coff/external.h"
26213274Srpaulo
27213274Srpaulo#define COFF_PAGE_SIZE	0x1000
28213274Srpaulo
29213274Srpaulo#define AMD64MAGIC	0x8664
30213274Srpaulo
31213274Srpaulo#define AMD64BADMAG(x)	((x).f_magic != AMD64MAGIC)
32213274Srpaulo#define IMAGE_NT_OPTIONAL_HDR64_MAGIC      0x20b
33213274Srpaulo
34213274Srpaulo#define OMAGIC          0404    /* Object files, eg as output.  */
35213274Srpaulo#define ZMAGIC          IMAGE_NT_OPTIONAL_HDR64_MAGIC    /* Demand load format, eg normal ld output 0x10b.  */
36213274Srpaulo#define STMAGIC		0401	/* Target shlib.  */
37213274Srpaulo#define SHMAGIC		0443	/* Host   shlib.  */
38213274Srpaulo
39213274Srpaulo/* Define some NT default values.  */
40213274Srpaulo/*  #define NT_IMAGE_BASE        0x400000 moved to internal.h.  */
41213274Srpaulo#define NT_SECTION_ALIGNMENT 0x1000
42213274Srpaulo#define NT_FILE_ALIGNMENT    0x200
43213274Srpaulo#define NT_DEF_RESERVE       0x100000
44213274Srpaulo#define NT_DEF_COMMIT        0x1000
45213274Srpaulo
46213274Srpaulo/* Relocation directives.  */
47213274Srpaulo
48213274Srpaulostruct external_reloc
49213274Srpaulo{
50213274Srpaulo  char r_vaddr[4];
51213274Srpaulo  char r_symndx[4];
52213274Srpaulo  char r_type[2];
53213274Srpaulo};
54213274Srpaulo
55213274Srpaulo#define RELOC struct external_reloc
56213274Srpaulo#define RELSZ 10
57