Back to index

cell-binutils  2.17cvs20070401
m68k.h
Go to the documentation of this file.
00001 /* coff information for M68K
00002    
00003    Copyright 2001 Free Software Foundation, Inc.
00004 
00005    This program is free software; you can redistribute it and/or modify
00006    it under the terms of the GNU General Public License as published by
00007    the Free Software Foundation; either version 2 of the License, or
00008    (at your option) any later version.
00009    
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014    
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the Free Software
00017    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00018 
00019 #ifndef GNU_COFF_M68K_H
00020 #define GNU_COFF_M68K_H 1
00021 
00022 #define L_LNNO_SIZE 2
00023 #include "coff/external.h"
00024 
00025 /* Motorola 68000/68008/68010/68020 */
00026 #define       MC68MAGIC     0520
00027 #define MC68KWRMAGIC 0520   /* writeable text segments */
00028 #define       MC68TVMAGIC   0521
00029 #define MC68KROMAGIC 0521   /* readonly shareable text segments */
00030 #define MC68KPGMAGIC 0522   /* demand paged text segments */
00031 #define       M68MAGIC      0210
00032 #define       M68TVMAGIC    0211
00033 
00034 /* This is the magic of the Bull dpx/2 */
00035 #define MC68KBCSMAGIC       0526
00036 
00037 /* This is Lynx's all-platform magic number for executables. */
00038 
00039 #define LYNXCOFFMAGIC       0415
00040 
00041 #define OMAGIC M68MAGIC
00042 
00043 /* This intentionally does not include MC68KBCSMAGIC; it only includes
00044    magic numbers which imply that names do not have underscores.  */
00045 #define M68KBADMAG(x) (((x).f_magic != MC68MAGIC) \
00046                     && ((x).f_magic != MC68KWRMAGIC) \
00047                     && ((x).f_magic != MC68TVMAGIC) \
00048                     && ((x).f_magic != MC68KROMAGIC) \
00049                     && ((x).f_magic != MC68KPGMAGIC) \
00050                     && ((x).f_magic != M68MAGIC) \
00051                     && ((x).f_magic != M68TVMAGIC) \
00052                     && ((x).f_magic != LYNXCOFFMAGIC))
00053 
00054 /* Magic numbers for the a.out header.  */
00055 
00056 #define PAGEMAGICEXECSWAPPED  0407 /* executable (swapped) */
00057 #define PAGEMAGICPEXECSWAPPED 0410 /* pure executable (swapped) */
00058 #define PAGEMAGICPEXECTSHLIB  0443 /* pure executable (target shared library) */
00059 #define PAGEMAGICPEXECPAGED   0413 /* pure executable (paged) */
00060 
00061 /********************** RELOCATION DIRECTIVES **********************/
00062 
00063 struct external_reloc
00064 {
00065   char r_vaddr[4];
00066   char r_symndx[4];
00067   char r_type[2];
00068 #ifdef M68K_COFF_OFFSET
00069   char r_offset[4];
00070 #endif
00071 };
00072 
00073 #define RELOC struct external_reloc
00074 
00075 #ifdef M68K_COFF_OFFSET
00076 #define RELSZ 14
00077 #else
00078 #define RELSZ 10
00079 #endif
00080 
00081 #endif /* GNU_COFF_M68K_H */