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 we32k
1
/* coff information for we32k
2
   
2
   
3
   Copyright 2001, 2010 Free Software Foundation, Inc.
3
   Copyright (C) 2001-2015 Free Software Foundation, Inc.
4
 
4
 
5
   This program is free software; you can redistribute it and/or modify
5
   This program is free software; you can redistribute it and/or modify
6
   it under the terms of the GNU General Public License as published by
6
   it under the terms of the GNU General Public License as published by
7
   the Free Software Foundation; either version 3 of the License, or
7
   the Free Software Foundation; either version 3 of the License, or
8
   (at your option) any later version.
8
   (at your option) any later version.
9
   
9
   
10
   This program is distributed in the hope that it will be useful,
10
   This program is distributed in the hope that it will be useful,
11
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   but WITHOUT ANY WARRANTY; without even the implied warranty of
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
   GNU General Public License for more details.
13
   GNU General Public License for more details.
14
   
14
   
15
   You should have received a copy of the GNU General Public License
15
   You should have received a copy of the GNU General Public License
16
   along with this program; if not, write to the Free Software
16
   along with this program; if not, write to the Free Software
17
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
17
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
18
   MA 02110-1301, USA.  */
18
   MA 02110-1301, USA.  */
19
 
19
 
20
#define L_LNNO_SIZE 2
20
#define L_LNNO_SIZE 2
21
#include "coff/external.h"
21
#include "coff/external.h"
22
 
22
 
23
/* Bits for f_flags:
23
/* Bits for f_flags:
24
 	F_RELFLG	relocation info stripped from file
24
 	F_RELFLG	relocation info stripped from file
25
 	F_EXEC		file is executable (no unresolved external references)
25
 	F_EXEC		file is executable (no unresolved external references)
26
 	F_LNNO		line numbers stripped from file
26
 	F_LNNO		line numbers stripped from file
27
 	F_LSYMS		local symbols stripped from file
27
 	F_LSYMS		local symbols stripped from file
28
 	F_AR32WR	file has byte ordering of an AR32WR machine (e.g. vax).  */
28
 	F_AR32WR	file has byte ordering of an AR32WR machine (e.g. vax).  */
29
 
29
 
30
#define F_RELFLG	(0x0001)
30
#define F_RELFLG	(0x0001)
31
#define F_EXEC		(0x0002)
31
#define F_EXEC		(0x0002)
32
#define F_LNNO		(0x0004)
32
#define F_LNNO		(0x0004)
33
#define F_LSYMS		(0x0008)
33
#define F_LSYMS		(0x0008)
34
#define	F_BM32B		(0020000)
34
#define	F_BM32B		(0020000)
35
#define	F_BM32MAU	(0040000)
35
#define	F_BM32MAU	(0040000)
36
 
36
 
37
#define	WE32KMAGIC	0x170	/* we32k sans transfer vector */
37
#define	WE32KMAGIC	0x170	/* we32k sans transfer vector */
38
#define FBOMAGIC	0x170	/* we32k sans transfer vector */
38
#define FBOMAGIC	0x170	/* we32k sans transfer vector */
39
#define MTVMAGIC	0x171	/* we32k with transfer vector */
39
#define MTVMAGIC	0x171	/* we32k with transfer vector */
40
#define RBOMAGIC	0x172	/* reserved */
40
#define RBOMAGIC	0x172	/* reserved */
41
#define WE32KBADMAG(x) (   ((x).f_magic != WE32KMAGIC) \
41
#define WE32KBADMAG(x) (   ((x).f_magic != WE32KMAGIC) \
42
			&& ((x).f_magic != FBOMAGIC) \
42
			&& ((x).f_magic != FBOMAGIC) \
43
			&& ((x).f_magic != RBOMAGIC) \
43
			&& ((x).f_magic != RBOMAGIC) \
44
			&& ((x).f_magic != MTVMAGIC))
44
			&& ((x).f_magic != MTVMAGIC))
45
 
45
 
46
/* More names of "special" sections.  */
46
/* More names of "special" sections.  */
47
#define _TV	".tv"
47
#define _TV	".tv"
48
#define _INIT	".init"
48
#define _INIT	".init"
49
#define _FINI	".fini"
49
#define _FINI	".fini"
50
 
50
 
51
/********************** RELOCATION DIRECTIVES **********************/
51
/********************** RELOCATION DIRECTIVES **********************/
52
 
52
 
53
struct external_reloc
53
struct external_reloc
54
{
54
{
55
  char r_vaddr[4];
55
  char r_vaddr[4];
56
  char r_symndx[4];
56
  char r_symndx[4];
57
  char r_type[2];
57
  char r_type[2];
58
};
58
};
59
 
59
 
60
#define RELOC struct external_reloc
60
#define RELOC struct external_reloc
61
#define RELSZ 10
61
#define RELSZ 10