source: branches/libc-0.6/src/binutils/bfd/coff-sparc.c@ 2992

Last change on this file since 2992 was 610, checked in by bird, 22 years ago

This commit was generated by cvs2svn to compensate for changes in r609,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 8.8 KB
Line 
1/* BFD back-end for Sparc COFF files.
2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001, 2002
3 Free Software Foundation, Inc.
4 Written by Cygnus Support.
5
6This file is part of BFD, the Binary File Descriptor library.
7
8This program is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2 of the License, or
11(at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program; if not, write to the Free Software
20Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21
22#include "bfd.h"
23#include "sysdep.h"
24#include "libbfd.h"
25#include "coff/sparc.h"
26#include "coff/internal.h"
27#include "libcoff.h"
28
29#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
30
31#define BADMAG(x) ((x).f_magic != SPARCMAGIC && (x).f_magic != LYNXCOFFMAGIC)
32
33/* The page size is a guess based on ELF. */
34#define COFF_PAGE_SIZE 0x10000
35
36
37static reloc_howto_type *coff_sparc_reloc_type_lookup
38 PARAMS ((bfd *, bfd_reloc_code_real_type));
39static void rtype2howto PARAMS ((arelent *, struct internal_reloc *));
40
41enum reloc_type
42 {
43 R_SPARC_NONE = 0,
44 R_SPARC_8, R_SPARC_16, R_SPARC_32,
45 R_SPARC_DISP8, R_SPARC_DISP16, R_SPARC_DISP32,
46 R_SPARC_WDISP30, R_SPARC_WDISP22,
47 R_SPARC_HI22, R_SPARC_22,
48 R_SPARC_13, R_SPARC_LO10,
49 R_SPARC_GOT10, R_SPARC_GOT13, R_SPARC_GOT22,
50 R_SPARC_PC10, R_SPARC_PC22,
51 R_SPARC_WPLT30,
52 R_SPARC_COPY,
53 R_SPARC_GLOB_DAT, R_SPARC_JMP_SLOT,
54 R_SPARC_RELATIVE,
55 R_SPARC_UA32,
56 R_SPARC_max
57 };
58
59#if 0
60static const char *const reloc_type_names[] =