/* coff information for M68K
|
/* coff information for M68K
|
|
|
Copyright 2001 Free Software Foundation, Inc.
|
Copyright 2001 Free Software Foundation, Inc.
|
|
|
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
(at your option) any later version.
|
(at your option) any later version.
|
|
|
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
GNU General Public License for more details.
|
GNU General Public License for more details.
|
|
|
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
|
#ifndef GNU_COFF_M68K_H
|
#ifndef GNU_COFF_M68K_H
|
#define GNU_COFF_M68K_H 1
|
#define GNU_COFF_M68K_H 1
|
|
|
#define L_LNNO_SIZE 2
|
#define L_LNNO_SIZE 2
|
#include "coff/external.h"
|
#include "coff/external.h"
|
|
|
/* Motorola 68000/68008/68010/68020 */
|
/* Motorola 68000/68008/68010/68020 */
|
#define MC68MAGIC 0520
|
#define MC68MAGIC 0520
|
#define MC68KWRMAGIC 0520 /* writeable text segments */
|
#define MC68KWRMAGIC 0520 /* writeable text segments */
|
#define MC68TVMAGIC 0521
|
#define MC68TVMAGIC 0521
|
#define MC68KROMAGIC 0521 /* readonly shareable text segments */
|
#define MC68KROMAGIC 0521 /* readonly shareable text segments */
|
#define MC68KPGMAGIC 0522 /* demand paged text segments */
|
#define MC68KPGMAGIC 0522 /* demand paged text segments */
|
#define M68MAGIC 0210
|
#define M68MAGIC 0210
|
#define M68TVMAGIC 0211
|
#define M68TVMAGIC 0211
|
|
|
/* This is the magic of the Bull dpx/2 */
|
/* This is the magic of the Bull dpx/2 */
|
#define MC68KBCSMAGIC 0526
|
#define MC68KBCSMAGIC 0526
|
|
|
/* This is Lynx's all-platform magic number for executables. */
|
/* This is Lynx's all-platform magic number for executables. */
|
|
|
#define LYNXCOFFMAGIC 0415
|
#define LYNXCOFFMAGIC 0415
|
|
|
#define OMAGIC M68MAGIC
|
#define OMAGIC M68MAGIC
|
|
|
/* This intentionally does not include MC68KBCSMAGIC; it only includes
|
/* This intentionally does not include MC68KBCSMAGIC; it only includes
|
magic numbers which imply that names do not have underscores. */
|
magic numbers which imply that names do not have underscores. */
|
#define M68KBADMAG(x) (((x).f_magic != MC68MAGIC) \
|
#define M68KBADMAG(x) (((x).f_magic != MC68MAGIC) \
|
&& ((x).f_magic != MC68KWRMAGIC) \
|
&& ((x).f_magic != MC68KWRMAGIC) \
|
&& ((x).f_magic != MC68TVMAGIC) \
|
&& ((x).f_magic != MC68TVMAGIC) \
|
&& ((x).f_magic != MC68KROMAGIC) \
|
&& ((x).f_magic != MC68KROMAGIC) \
|
&& ((x).f_magic != MC68KPGMAGIC) \
|
&& ((x).f_magic != MC68KPGMAGIC) \
|
&& ((x).f_magic != M68MAGIC) \
|
&& ((x).f_magic != M68MAGIC) \
|
&& ((x).f_magic != M68TVMAGIC) \
|
&& ((x).f_magic != M68TVMAGIC) \
|
&& ((x).f_magic != LYNXCOFFMAGIC))
|
&& ((x).f_magic != LYNXCOFFMAGIC))
|
|
|
/* Magic numbers for the a.out header. */
|
/* Magic numbers for the a.out header. */
|
|
|
#define PAGEMAGICEXECSWAPPED 0407 /* executable (swapped) */
|
#define PAGEMAGICEXECSWAPPED 0407 /* executable (swapped) */
|
#define PAGEMAGICPEXECSWAPPED 0410 /* pure executable (swapped) */
|
#define PAGEMAGICPEXECSWAPPED 0410 /* pure executable (swapped) */
|
#define PAGEMAGICPEXECTSHLIB 0443 /* pure executable (target shared library) */
|
#define PAGEMAGICPEXECTSHLIB 0443 /* pure executable (target shared library) */
|
#define PAGEMAGICPEXECPAGED 0413 /* pure executable (paged) */
|
#define PAGEMAGICPEXECPAGED 0413 /* pure executable (paged) */
|
|
|
/********************** RELOCATION DIRECTIVES **********************/
|
/********************** RELOCATION DIRECTIVES **********************/
|
|
|
struct external_reloc
|
struct external_reloc
|
{
|
{
|
char r_vaddr[4];
|
char r_vaddr[4];
|
char r_symndx[4];
|
char r_symndx[4];
|
char r_type[2];
|
char r_type[2];
|
#ifdef M68K_COFF_OFFSET
|
#ifdef M68K_COFF_OFFSET
|
char r_offset[4];
|
char r_offset[4];
|
#endif
|
#endif
|
};
|
};
|
|
|
#define RELOC struct external_reloc
|
#define RELOC struct external_reloc
|
|
|
#ifdef M68K_COFF_OFFSET
|
#ifdef M68K_COFF_OFFSET
|
#define RELSZ 14
|
#define RELSZ 14
|
#else
|
#else
|
#define RELSZ 10
|
#define RELSZ 10
|
#endif
|
#endif
|
|
|
#endif /* GNU_COFF_M68K_H */
|
#endif /* GNU_COFF_M68K_H */
|
|
|