diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 2000-05-13 19:21:46 +0000 | 
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 2000-05-13 19:21:46 +0000 | 
| commit | b859770a9042cd3b80e48455257b170a33acc0e6 (patch) | |
| tree | 03821f271b530ebf1c52e16febd23d51c82abd08 /contrib/binutils/include/elf/reloc-macros.h | |
| parent | 30565a54fcfe17393cf34d115abbdfb53c056c22 (diff) | |
Diffstat (limited to 'contrib/binutils/include/elf/reloc-macros.h')
| -rw-r--r-- | contrib/binutils/include/elf/reloc-macros.h | 116 | 
1 files changed, 0 insertions, 116 deletions
| diff --git a/contrib/binutils/include/elf/reloc-macros.h b/contrib/binutils/include/elf/reloc-macros.h deleted file mode 100644 index 42174caeeaeca..0000000000000 --- a/contrib/binutils/include/elf/reloc-macros.h +++ /dev/null @@ -1,116 +0,0 @@ -/* Generic relocation support for BFD. -   Copyright (C) 1998 Free Software Foundation, Inc. - -   This file is part of BFD, the Binary File Descriptor library. - -   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 -   the Free Software Foundation; either version 2 of the License, or -   (at your option) any later version. - -   This program is distributed in the hope that it will be useful, -   but WITHOUT ANY WARRANTY; without even the implied warranty of -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -   GNU General Public License for more details. - -   You should have received a copy of the GNU General Public License -   along with this program; if not, write to the Free Software Foundation, -   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */ - -/* These macros are used by the various *.h target specific header -   files to either generate an enum containing all the known relocations -   for that target, or if RELOC_MACROS_GEN_FUNC is defined, a recognition -   function is generated instead.  (This is used by binutils/readelf.c) - -   Given a header file like this: - -   	START_RELOC_NUMBERS (foo) -   	    RELOC_NUMBER (R_foo_NONE,    0) -   	    RELOC_NUMBER (R_foo_32,      1) -   	    FAKE_RELOC   (R_foo_illegal, 2) -   	    EMPTY_RELOC  (R_foo_max) -   	END_RELOC_NUMBERS - -   Then the following will be produced by default (ie if -   RELOC_MACROS_GEN_FUNC is *not* defined). - -   	enum foo -	{ -	  foo = -1, -   	  R_foo_NONE = 0, -   	  R_foo_32 = 1, -   	  R_foo_illegal = 2, -   	  R_foo_max -   	}; - -   If RELOC_MACROS_GEN_FUNC *is* defined, then instead the -   following function will be generated: - -   	static const char * foo PARAMS ((unsigned long rtype)); -   	static const char * -   	foo (rtype) -   	    unsigned long rtype; -   	{ -   	   switch (rtype) -   	   { -   	   case 0: return "R_foo_NONE"; -   	   case 1: return "R_foo_32"; -   	   default: return NULL; -   	   } -   	} -   */ -    -#ifndef _RELOC_MACROS_H -#define _RELOC_MACROS_H - -#ifdef RELOC_MACROS_GEN_FUNC - -/* This function takes the relocation number and returns the -   string version name of the name of that relocation.  If -   the relocation is not recognised, NULL is returned.  */ - -#define START_RELOC_NUMBERS(name)   				\ -static const char * name    PARAMS ((unsigned long rtype)); 	\ -static const char *						\ -name (rtype)							\ -	unsigned long rtype;					\ -{								\ -  switch (rtype)						\ -  { - -#ifdef __STDC__					   -#define RELOC_NUMBER(name, number)  case number : return #name ; -#else -#define RELOC_NUMBER(name, number)  case number : return "name" ; -#endif - -#define FAKE_RELOC(name, number)     -#define EMPTY_RELOC(name) -					   -#define END_RELOC_NUMBERS	\ -    default: return NULL;	\ -  }				\ -} - - -#else /* Default to generating enum.  */ - -/* Some compilers cannot cope with an enum that ends with a trailing -   comma, so START_RELOC_NUMBERS creates a fake reloc entry, (initialised -   to -1 so that the first real entry will still default to 0).  Further -   entries then prepend a comma to their definitions, creating a list -   of enumerator entries that will satisfy these compilers.  */ -#ifdef __STDC__ -#define START_RELOC_NUMBERS(name)   enum name { _##name = -1 -#else -#define START_RELOC_NUMBERS(name)   enum name { name = -1 -#endif -						 -#define RELOC_NUMBER(name, number)  , name = number -#define FAKE_RELOC(name, number)    , name = number  -#define EMPTY_RELOC(name)           , name  -#define END_RELOC_NUMBERS           }; - -#endif - -#endif /* RELOC_MACROS_H */ | 
