/* Support for the generic parts of most COFF variants, for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
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
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
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. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
/* Most of this hacked by Steve Chamberlain,
sac@cygnus.com. */
styp_flags = STYP_LIT;
#endif /* _LIT */
}
- else if (!strncmp (sec_name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1))
+ else if (CONST_STRNEQ (sec_name, DOT_DEBUG))
{
/* Handle the XCOFF debug section and DWARF2 debug sections. */
if (!sec_name[6])
else
styp_flags = STYP_DEBUG_INFO;
}
- else if (!strncmp (sec_name, ".stab", 5))
+ else if (CONST_STRNEQ (sec_name, ".stab"))
{
styp_flags = STYP_DEBUG_INFO;
}
#ifdef COFF_LONG_SECTION_NAMES
- else if (!strncmp (sec_name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1))
+ else if (CONST_STRNEQ (sec_name, GNU_LINKONCE_WI))
{
styp_flags = STYP_DEBUG_INFO;
}
but there are more IMAGE_SCN_* flags. */
/* FIXME: There is no gas syntax to specify the debug section flag. */
- if (strncmp (sec_name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1) == 0
- || strncmp (sec_name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1) == 0)
- sec_flags = SEC_READONLY | SEC_DEBUGGING;
+ if (CONST_STRNEQ (sec_name, DOT_DEBUG)
+ || CONST_STRNEQ (sec_name, GNU_LINKONCE_WI))
+ sec_flags = SEC_DEBUGGING;
/* skip LOAD */
/* READONLY later */
/* skip ROM */
/* skip constRUCTOR */
/* skip CONTENTS */
-#ifdef STYP_NOLOAD
- if ((sec_flags & (SEC_NEVER_LOAD | SEC_COFF_SHARED_LIBRARY)) != 0)
- styp_flags |= STYP_NOLOAD;
-#endif
if ((sec_flags & SEC_IS_COMMON) != 0)
styp_flags |= IMAGE_SCN_LNK_COMDAT;
if ((sec_flags & SEC_DEBUGGING) != 0)
/* skip LINK_DUPLICATES */
/* skip LINKER_CREATED */
- /* For now, the read/write bits are mapped onto SEC_READONLY, even
- though the semantics don't quite match. The bits from the input
- are retained in pei_section_data(abfd, section)->pe_flags. */
-
- styp_flags |= IMAGE_SCN_MEM_READ; /* Always readable. */
- if ((sec_flags & SEC_READONLY) == 0)
- styp_flags |= IMAGE_SCN_MEM_WRITE; /* Invert READONLY for write. */
- if (sec_flags & SEC_CODE)
- styp_flags |= IMAGE_SCN_MEM_EXECUTE; /* CODE->EXECUTE. */
- if (sec_flags & SEC_COFF_SHARED)
- styp_flags |= IMAGE_SCN_MEM_SHARED; /* Shared remains meaningful. */
+ if (sec_flags & (SEC_ALLOC | SEC_LOAD))
+ {
+ /* For now, the read/write bits are mapped onto SEC_READONLY, even
+ though the semantics don't quite match. The bits from the input
+ are retained in pei_section_data(abfd, section)->pe_flags. */
+ styp_flags |= IMAGE_SCN_MEM_READ; /* Always readable. */
+ if ((sec_flags & SEC_READONLY) == 0)
+ styp_flags |= IMAGE_SCN_MEM_WRITE; /* Invert READONLY for write. */
+ if (sec_flags & SEC_CODE)
+ styp_flags |= IMAGE_SCN_MEM_EXECUTE; /* CODE->EXECUTE. */
+ if (sec_flags & SEC_COFF_SHARED)
+ styp_flags |= IMAGE_SCN_MEM_SHARED; /* Shared remains meaningful. */
+ }
return styp_flags;
}
#endif
sec_flags |= SEC_ALLOC;
}
- else if (strncmp (name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1) == 0
+ else if (CONST_STRNEQ (name, DOT_DEBUG)
#ifdef _COMMENT
|| strcmp (name, _COMMENT) == 0
#endif
#ifdef COFF_LONG_SECTION_NAMES
- || strncmp (name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1) == 0
+ || CONST_STRNEQ (name, GNU_LINKONCE_WI)
#endif
- || strncmp (name, ".stab", 5) == 0)
+ || CONST_STRNEQ (name, ".stab"))
{
#ifdef COFF_PAGE_SIZE
sec_flags |= SEC_DEBUGGING;
The symbols will be defined as weak, so that multiple definitions
are permitted. The GNU linker extension is to actually discard
all but one of the sections. */
- if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
+ if (CONST_STRNEQ (name, ".gnu.linkonce"))
sec_flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
#endif
/* The MS PE spec sets the DISCARDABLE flag on .reloc sections
but we do not want them to be labelled as debug section, since
then strip would remove them. */
- if (strncmp (name, ".reloc", sizeof ".reloc" - 1) != 0)
+ if (! CONST_STRNEQ (name, ".reloc"))
sec_flags |= SEC_DEBUGGING;
break;
case IMAGE_SCN_MEM_SHARED:
The symbols will be defined as weak, so that multiple definitions
are permitted. The GNU linker extension is to actually discard
all but one of the sections. */
- if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
+ if (CONST_STRNEQ (name, ".gnu.linkonce"))
sec_flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
#endif
section->alignment_power = bfd_xcoff_data_align_power (abfd);
#endif
+ /* Set up the section symbol. */
+ if (!_bfd_generic_new_section_hook (abfd, section))
+ return FALSE;
+
/* Allocate aux records for section symbols, to store size and
related info.
#else /* ! COFF_ALIGN_IN_SECTION_HEADER */
#ifdef COFF_WITH_PE
-/* A couple of macros to help setting the alignment power field. */
-#define ALIGN_SET(field, x, y) \
- if (((field) & IMAGE_SCN_ALIGN_64BYTES) == x)\
- {\
- section->alignment_power = y;\
- }
-
-#define ELIFALIGN_SET(field, x, y) \
- else if (((field) & IMAGE_SCN_ALIGN_64BYTES) == x) \
- {\
- section->alignment_power = y;\
- }
-
static void
coff_set_alignment_hook (bfd * abfd ATTRIBUTE_UNUSED,
asection * section,
{
struct internal_scnhdr *hdr = (struct internal_scnhdr *) scnhdr;
bfd_size_type amt;
+ unsigned int alignment_power_const
+ = hdr->s_flags & IMAGE_SCN_ALIGN_POWER_BIT_MASK;
- ALIGN_SET (hdr->s_flags, IMAGE_SCN_ALIGN_64BYTES, 6)
- ELIFALIGN_SET (hdr->s_flags, IMAGE_SCN_ALIGN_32BYTES, 5)
- ELIFALIGN_SET (hdr->s_flags, IMAGE_SCN_ALIGN_16BYTES, 4)
- ELIFALIGN_SET (hdr->s_flags, IMAGE_SCN_ALIGN_8BYTES, 3)
- ELIFALIGN_SET (hdr->s_flags, IMAGE_SCN_ALIGN_4BYTES, 2)
- ELIFALIGN_SET (hdr->s_flags, IMAGE_SCN_ALIGN_2BYTES, 1)
- ELIFALIGN_SET (hdr->s_flags, IMAGE_SCN_ALIGN_1BYTES, 0)
+ switch (alignment_power_const)
+ {
+ case IMAGE_SCN_ALIGN_8192BYTES:
+ case IMAGE_SCN_ALIGN_4096BYTES:
+ case IMAGE_SCN_ALIGN_2048BYTES:
+ case IMAGE_SCN_ALIGN_1024BYTES:
+ case IMAGE_SCN_ALIGN_512BYTES:
+ case IMAGE_SCN_ALIGN_256BYTES:
+ case IMAGE_SCN_ALIGN_128BYTES:
+ case IMAGE_SCN_ALIGN_64BYTES:
+ case IMAGE_SCN_ALIGN_32BYTES:
+ case IMAGE_SCN_ALIGN_16BYTES:
+ case IMAGE_SCN_ALIGN_8BYTES:
+ case IMAGE_SCN_ALIGN_4BYTES:
+ case IMAGE_SCN_ALIGN_2BYTES:
+ case IMAGE_SCN_ALIGN_1BYTES:
+ section->alignment_power
+ = IMAGE_SCN_ALIGN_POWER_NUM (alignment_power_const);
+ break;
+ default:
+ break;
+ }
/* In a PE image file, the s_paddr field holds the virtual size of a
section, while the s_size field holds the raw size. We also keep
{
struct internal_scnhdr *hdr = (struct internal_scnhdr *) scnhdr;
asection *real_sec;
- asection **ps;
if ((hdr->s_flags & STYP_OVRFLO) == 0)
return;
real_sec->reloc_count = hdr->s_paddr;
real_sec->lineno_count = hdr->s_vaddr;
- for (ps = &abfd->sections; *ps != NULL; ps = &(*ps)->next)
+ if (!bfd_section_removed_from_list (abfd, section))
{
- if (*ps == section)
- {
- bfd_section_list_remove (abfd, ps);
- --abfd->section_count;
- break;
- }
+ bfd_section_list_remove (abfd, section);
+ --abfd->section_count;
}
}
#ifdef I386MAGIC
case I386MAGIC:
case I386PTXMAGIC:
- case I386AIXMAGIC: /* Danbury PS/2 AIX C Compiler */
- case LYNXCOFFMAGIC: /* shadows the m68k Lynx number below, sigh */
+ case I386AIXMAGIC: /* Danbury PS/2 AIX C Compiler. */
+ case LYNXCOFFMAGIC: /* Shadows the m68k Lynx number below, sigh. */
+ arch = bfd_arch_i386;
+ break;
+#endif
+#ifdef AMD64MAGIC
+ case AMD64MAGIC:
arch = bfd_arch_i386;
+ machine = bfd_mach_x86_64;
break;
#endif
#ifdef IA64MAGIC
arch = bfd_arch_ia64;
break;
#endif
-#ifdef A29K_MAGIC_BIG
- case A29K_MAGIC_BIG:
- case A29K_MAGIC_LITTLE:
- arch = bfd_arch_a29k;
- break;
-#endif
#ifdef ARMMAGIC
case ARMMAGIC:
case ARMPEMAGIC:
machine = 88100;
break;
#endif
+#ifdef Z80MAGIC
+ case Z80MAGIC:
+ arch = bfd_arch_z80;
+ switch (internal_f->f_flags & F_MACHMASK)
+ {
+ case 0:
+ case bfd_mach_z80strict << 12:
+ case bfd_mach_z80 << 12:
+ case bfd_mach_z80full << 12:
+ case bfd_mach_r800 << 12:
+ machine = ((unsigned)internal_f->f_flags & F_MACHMASK) >> 12;
+ break;
+ default:
+ return FALSE;
+ }
+ break;
+#endif
#ifdef Z8KMAGIC
case Z8KMAGIC:
arch = bfd_arch_z8k;
else
{
n.r_symndx = get_index ((*(q->sym_ptr_ptr)));
- /* Take notice if the symbol reloc points to a symbol
- we don't have in our symbol table. What should we
- do for this?? */
+ /* Check to see if the symbol reloc points to a symbol
+ we don't have in our symbol table. */
if (n.r_symndx > obj_conv_table_size (abfd))
- abort ();
+ {
+ bfd_set_error (bfd_error_bad_value);
+ _bfd_error_handler (_("%B: reloc against a non-existant symbol index: %ld"),
+ abfd, n.r_symndx);
+ return FALSE;
+ }
}
}
{
switch (bfd_get_arch (abfd))
{
+#ifdef Z80MAGIC
+ case bfd_arch_z80:
+ *magicp = Z80MAGIC;
+ switch (bfd_get_mach (abfd))
+ {
+ case 0:
+ case bfd_mach_z80strict:
+ case bfd_mach_z80:
+ case bfd_mach_z80full:
+ case bfd_mach_r800:
+ *flagsp = bfd_get_mach (abfd) << 12;
+ break;
+ default:
+ return FALSE;
+ }
+ return TRUE;
+#endif
+
#ifdef Z8KMAGIC
case bfd_arch_z8k:
*magicp = Z8KMAGIC;
return TRUE;
#endif
-#ifdef I386MAGIC
+#if defined(I386MAGIC) || defined(AMD64MAGIC)
case bfd_arch_i386:
+#if defined(I386MAGIC)
*magicp = I386MAGIC;
-#ifdef LYNXOS
+#endif
+#if defined LYNXOS
/* Just overwrite the usual value if we're doing Lynx. */
*magicp = LYNXCOFFMAGIC;
+#endif
+#if defined AMD64MAGIC
+ *magicp = AMD64MAGIC;
#endif
return TRUE;
#endif
break;
#endif
-#ifdef A29K_MAGIC_BIG
- case bfd_arch_a29k:
- if (bfd_big_endian (abfd))
- *magicp = A29K_MAGIC_BIG;
- else
- *magicp = A29K_MAGIC_LITTLE;
- return TRUE;
-#endif
-
#ifdef WE32KMAGIC
case bfd_arch_we32k:
*magicp = WE32KMAGIC;
/* Rethread the linked list into sorted order; at the same time,
assign target_index values. */
target_index = 1;
- abfd->sections = section_list[0];
+ abfd->sections = NULL;
+ abfd->section_last = NULL;
for (i = 0; i < count; i++)
{
current = section_list[i];
- current->next = section_list[i + 1];
+ bfd_section_list_append (abfd, current);
/* Later, if the section has zero size, we'll be throwing it
away, so we don't want to number it now. Note that having
else
current->target_index = target_index++;
}
- abfd->section_tail = ¤t->next;
free (section_list);
}
internal_f.f_flags |= IMAGE_FILE_LARGE_ADDRESS_AWARE;
#endif
+#ifndef COFF_WITH_pex64
#ifdef COFF_WITH_PE
internal_f.f_flags |= IMAGE_FILE_32BIT_MACHINE;
#else
else
internal_f.f_flags |= F_AR32W;
#endif
+#endif
#ifdef TI_TARGET_ID
/* Target id is used in TI COFF v1 and later; COFF0 won't use this field,
internal_f.f_flags |= flags;
/* ...and the "opt"hdr... */
-#ifdef A29K
-#ifdef ULTRA3 /* NYU's machine */
- /* FIXME: This is a bogus check. I really want to see if there
- is a .shbss or a .shdata section, if so then set the magic
- number to indicate a shared data executable. */
- if (internal_f.f_nscns >= 7)
- internal_a.magic = SHMAGIC; /* Shared magic. */
- else
-#endif /* ULTRA3 */
- internal_a.magic = NMAGIC; /* Assume separate i/d. */
-#define __A_MAGIC_SET__
-#endif /* A29K */
#ifdef TICOFF_AOUT_MAGIC
internal_a.magic = TICOFF_AOUT_MAGIC;
#define __A_MAGIC_SET__
#if defined(I386)
#define __A_MAGIC_SET__
-#if defined(LYNXOS)
+#if defined LYNXOS
internal_a.magic = LYNXCOFFMAGIC;
-#else /* LYNXOS */
+#elif defined AMD64
+ internal_a.magic = IMAGE_NT_OPTIONAL_HDR64_MAGIC;
+#else
internal_a.magic = ZMAGIC;
-#endif /* LYNXOS */
+#endif
#endif /* I386 */
#if defined(IA64)
#define __A_MAGIC_SET__
- internal_a.magic = ZMAGIC;
+ internal_a.magic = PE32PMAGIC;
#endif /* IA64 */
#if defined(SPARC)
How does this work ?
*/
+static int
+coff_sort_func_alent (const void * arg1, const void * arg2)
+{
+ const alent *al1 = *(const alent **) arg1;
+ const alent *al2 = *(const alent **) arg2;
+ const coff_symbol_type *s1 = (const coff_symbol_type *) (al1->u.sym);
+ const coff_symbol_type *s2 = (const coff_symbol_type *) (al2->u.sym);
+
+ if (s1->symbol.value < s2->symbol.value)
+ return -1;
+ else if (s1->symbol.value > s2->symbol.value)
+ return 1;
+
+ return 0;
+}
+
static bfd_boolean
coff_slurp_line_table (bfd *abfd, asection *asect)
{
LINENO *native_lineno;
alent *lineno_cache;
bfd_size_type amt;
+ unsigned int counter;
+ alent *cache_ptr;
+ bfd_vma prev_offset = 0;
+ int ordered = 1;
+ unsigned int nbr_func;
+ LINENO *src;
BFD_ASSERT (asect->lineno == NULL);
(_("%B: warning: line number table read failed"), abfd);
return FALSE;
}
+
amt = ((bfd_size_type) asect->lineno_count + 1) * sizeof (alent);
lineno_cache = bfd_alloc (abfd, amt);
if (lineno_cache == NULL)
return FALSE;
- else
+
+ cache_ptr = lineno_cache;
+ src = native_lineno;
+ nbr_func = 0;
+
+ for (counter = 0; counter < asect->lineno_count; counter++)
{
- unsigned int counter = 0;
- alent *cache_ptr = lineno_cache;
- LINENO *src = native_lineno;
+ struct internal_lineno dst;
- while (counter < asect->lineno_count)
+ bfd_coff_swap_lineno_in (abfd, src, &dst);
+ cache_ptr->line_number = dst.l_lnno;
+
+ if (cache_ptr->line_number == 0)
+ {
+ bfd_boolean warned;
+ bfd_signed_vma symndx;
+ coff_symbol_type *sym;
+
+ nbr_func++;
+ warned = FALSE;
+ symndx = dst.l_addr.l_symndx;
+ if (symndx < 0
+ || (bfd_vma) symndx >= obj_raw_syment_count (abfd))
+ {
+ (*_bfd_error_handler)
+ (_("%B: warning: illegal symbol index %ld in line numbers"),
+ abfd, dst.l_addr.l_symndx);
+ symndx = 0;
+ warned = TRUE;
+ }
+
+ /* FIXME: We should not be casting between ints and
+ pointers like this. */
+ sym = ((coff_symbol_type *)
+ ((symndx + obj_raw_syments (abfd))
+ ->u.syment._n._n_n._n_zeroes));
+ cache_ptr->u.sym = (asymbol *) sym;
+ if (sym->lineno != NULL && ! warned)
+ (*_bfd_error_handler)
+ (_("%B: warning: duplicate line number information for `%s'"),
+ abfd, bfd_asymbol_name (&sym->symbol));
+
+ sym->lineno = cache_ptr;
+ if (sym->symbol.value < prev_offset)
+ ordered = 0;
+ prev_offset = sym->symbol.value;
+ }
+ else
+ cache_ptr->u.offset = dst.l_addr.l_paddr
+ - bfd_section_vma (abfd, asect);
+
+ cache_ptr++;
+ src++;
+ }
+ cache_ptr->line_number = 0;
+
+ /* On some systems (eg AIX5.3) the lineno table may not be sorted. */
+ if (!ordered)
+ {
+ /* Sort the table. */
+ alent **func_table;
+ alent *n_lineno_cache;
+
+ /* Create a table of functions. */
+ func_table = bfd_malloc (nbr_func * sizeof (alent *));
+ if (func_table != NULL)
{
- struct internal_lineno dst;
+ alent **p = func_table;
+ unsigned int i;
+
+ for (i = 0; i < counter; i++)
+ if (lineno_cache[i].line_number == 0)
+ *p++ = &lineno_cache[i];
- bfd_coff_swap_lineno_in (abfd, src, &dst);
- cache_ptr->line_number = dst.l_lnno;
+ /* Sort by functions. */
+ qsort (func_table, nbr_func, sizeof (alent *), coff_sort_func_alent);
- if (cache_ptr->line_number == 0)
+ /* Create the new sorted table. */
+ n_lineno_cache = bfd_alloc (abfd, amt);
+ if (n_lineno_cache != NULL)
{
- bfd_boolean warned;
- bfd_signed_vma symndx;
- coff_symbol_type *sym;
-
- warned = FALSE;
- symndx = dst.l_addr.l_symndx;
- if (symndx < 0
- || (bfd_vma) symndx >= obj_raw_syment_count (abfd))
- {
- (*_bfd_error_handler)
- (_("%B: warning: illegal symbol index %ld in line numbers"),
- abfd, dst.l_addr.l_symndx);
- symndx = 0;
- warned = TRUE;
- }
- /* FIXME: We should not be casting between ints and
- pointers like this. */
- sym = ((coff_symbol_type *)
- ((symndx + obj_raw_syments (abfd))
- ->u.syment._n._n_n._n_zeroes));
- cache_ptr->u.sym = (asymbol *) sym;
- if (sym->lineno != NULL && ! warned)
+ alent *n_cache_ptr = n_lineno_cache;
+
+ for (i = 0; i < nbr_func; i++)
{
- (*_bfd_error_handler)
- (_("%B: warning: duplicate line number information for `%s'"),
- abfd, bfd_asymbol_name (&sym->symbol));
+ coff_symbol_type *sym;
+ alent *old_ptr = func_table[i];
+
+ /* Copy the function entry and update it. */
+ *n_cache_ptr = *old_ptr;
+ sym = (coff_symbol_type *)n_cache_ptr->u.sym;
+ sym->lineno = n_cache_ptr;
+ n_cache_ptr++;
+ old_ptr++;
+
+ /* Copy the line number entries. */
+ while (old_ptr->line_number != 0)
+ *n_cache_ptr++ = *old_ptr++;
}
- sym->lineno = cache_ptr;
+ n_cache_ptr->line_number = 0;
+ bfd_release (abfd, lineno_cache);
+ lineno_cache = n_lineno_cache;
}
- else
- cache_ptr->u.offset = dst.l_addr.l_paddr
- - bfd_section_vma (abfd, asect);
-
- cache_ptr++;
- src++;
- counter++;
+ free (func_table);
}
- cache_ptr->line_number = 0;
-
}
+
asect->lineno = lineno_cache;
- /* FIXME, free native_lineno here, or use alloca or something. */
+ bfd_release (abfd, native_lineno);
return TRUE;
}
dst->symbol.name = (char *) (src->u.syment._n._n_n._n_offset);
/* We use the native name field to point to the cached field. */
- src->u.syment._n._n_n._n_zeroes = (long) dst;
+ src->u.syment._n._n_n._n_zeroes = (bfd_hostptr_t) dst;
dst->symbol.section = coff_section_from_bfd_index (abfd,
src->u.syment.n_scnum);
dst->symbol.flags = 0;
case C_MOS: /* Member of structure. */
case C_EOS: /* End of structure. */
-#ifdef NOTDEF /* C_AUTOARG has the same value. */
-#ifdef C_GLBLREG
- case C_GLBLREG: /* A29k-specific storage class. */
-#endif
-#endif
case C_REGPARM: /* Register parameter. */
case C_REG: /* register variable. */
/* C_AUTOARG conflicts with TI COFF C_UEXT. */
amt = (bfd_size_type) asect->reloc_count * sizeof (arelent);
reloc_cache = bfd_alloc (abfd, amt);
- if (reloc_cache == NULL)
+ if (reloc_cache == NULL || native_relocs == NULL)
return FALSE;
for (idx = 0; idx < asect->reloc_count; idx++)
cache_ptr = reloc_cache + idx;
src = native_relocs + idx;
+ dst.r_offset = 0;
coff_swap_reloc_in (abfd, src, &dst);
#ifdef RELOC_PROCESSING
{
arelent genrel;
+ genrel.howto = NULL;
RTYPE2HOWTO (&genrel, rel);
return genrel.howto;
}
#ifndef coff_bfd_reloc_type_lookup
#define coff_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
#endif
+#ifndef coff_bfd_reloc_name_lookup
+#define coff_bfd_reloc_name_lookup _bfd_norelocs_bfd_reloc_name_lookup
+#endif
#ifndef coff_bfd_get_relocated_section_contents
#define coff_bfd_get_relocated_section_contents \