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
/* Motorola MCore support for BFD.
1
/* Motorola MCore support for BFD.
2
   Copyright 1999, 2000, 2010 Free Software Foundation, Inc.
2
   Copyright (C) 1999-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
/* This file holds definitions specific to the MCore COFF/PE ABI. */
21
/* This file holds definitions specific to the MCore COFF/PE ABI. */
22
 
22
 
23
#ifndef _COFF_MORE_H
23
#ifndef _COFF_MORE_H
24
#define _COFF_MORE_H
24
#define _COFF_MORE_H
25
 
25
 
26
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
26
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
27
#define L_LNNO_SIZE 2
27
#define L_LNNO_SIZE 2
28
#include "coff/external.h"
28
#include "coff/external.h"
29
 
29
 
30
#define	MCOREMAGIC	0xb00  /* I just made this up */ 
30
#define	MCOREMAGIC	0xb00  /* I just made this up */ 
31
 
31
 
32
#define MCOREBADMAG(x) (((x).f_magic != MCOREMAGIC))
32
#define MCOREBADMAG(x) (((x).f_magic != MCOREMAGIC))
33
 
33
 
34
#define E_DIMNUM	4	/* # array dimensions in auxiliary entry */
34
#define E_DIMNUM	4	/* # array dimensions in auxiliary entry */
35
 
35
 
36
#define IMAGE_REL_MCORE_ABSOLUTE          	0x0000
36
#define IMAGE_REL_MCORE_ABSOLUTE          	0x0000
37
#define IMAGE_REL_MCORE_ADDR32            	0x0001
37
#define IMAGE_REL_MCORE_ADDR32            	0x0001
38
#define IMAGE_REL_MCORE_PCREL_IMM8BY4		0x0002
38
#define IMAGE_REL_MCORE_PCREL_IMM8BY4		0x0002
39
#define IMAGE_REL_MCORE_PCREL_IMM11BY2		0x0003
39
#define IMAGE_REL_MCORE_PCREL_IMM11BY2		0x0003
40
#define IMAGE_REL_MCORE_PCREL_IMM4BY2		0x0004
40
#define IMAGE_REL_MCORE_PCREL_IMM4BY2		0x0004
41
#define IMAGE_REL_MCORE_PCREL_32		0x0005
41
#define IMAGE_REL_MCORE_PCREL_32		0x0005
42
#define IMAGE_REL_MCORE_PCREL_JSR_IMM11BY2	0x0006
42
#define IMAGE_REL_MCORE_PCREL_JSR_IMM11BY2	0x0006
43
#define IMAGE_REL_MCORE_RVA			0x0007
43
#define IMAGE_REL_MCORE_RVA			0x0007
44
 
44
 
45
#define PEMCORE
45
#define PEMCORE
46
 
46
 
47
#define OMAGIC          0404    /* object files, eg as output */
47
#define OMAGIC          0404    /* object files, eg as output */
48
#define ZMAGIC          0413    /* demand load format, eg normal ld output */
48
#define ZMAGIC          0413    /* demand load format, eg normal ld output */
49
#define STMAGIC		0401	/* target shlib */
49
#define STMAGIC		0401	/* target shlib */
50
#define SHMAGIC		0443	/* host   shlib */
50
#define SHMAGIC		0443	/* host   shlib */
51
 
51
 
52
/* From winnt.h */
52
/* From winnt.h */
53
#define IMAGE_NT_OPTIONAL_HDR_MAGIC        0x10b
53
#define IMAGE_NT_OPTIONAL_HDR_MAGIC        0x10b
54
 
54
 
55
/* Define some NT default values. */
55
/* Define some NT default values. */
56
#define NT_SECTION_ALIGNMENT 0x1000
56
#define NT_SECTION_ALIGNMENT 0x1000
57
#define NT_FILE_ALIGNMENT    0x200  
57
#define NT_FILE_ALIGNMENT    0x200  
58
#define NT_DEF_RESERVE       0x100000
58
#define NT_DEF_RESERVE       0x100000
59
#define NT_DEF_COMMIT        0x1000
59
#define NT_DEF_COMMIT        0x1000
60
 
60
 
61
struct external_reloc
61
struct external_reloc
62
{
62
{
63
  char r_vaddr  [4];
63
  char r_vaddr  [4];
64
  char r_symndx [4];
64
  char r_symndx [4];
65
  char r_type   [2];
65
  char r_type   [2];
66
  char r_offset [4];
66
  char r_offset [4];
67
};
67
};
68
 
68
 
69
#define RELOC struct external_reloc
69
#define RELOC struct external_reloc
70
#define RELSZ 14
70
#define RELSZ 14
71
 
71
 
72
#endif /* __COFF_MCORE_H */
72
#endif /* __COFF_MCORE_H */