OSDN Git Service
(root)
/
pf3gnuchains
/
pf3gnuchains3x.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Regenerate cgen files, update copyright year.
[pf3gnuchains/pf3gnuchains3x.git]
/
bfd
/
coff-i386.c
diff --git
a/bfd/coff-i386.c
b/bfd/coff-i386.c
index
47c041d
..
e7c4e8a
100644
(file)
--- a/
bfd/coff-i386.c
+++ b/
bfd/coff-i386.c
@@
-1,6
+1,6
@@
/* BFD back-end for Intel 386 COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
/* BFD back-end for Intel 386 COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 200
7
+ 2000, 2001, 2002, 2003, 2004, 200
5, 2007, 2008, 2009
Free Software Foundation, Inc.
Written by Cygnus Support.
Free Software Foundation, Inc.
Written by Cygnus Support.
@@
-37,16
+37,20
@@
#include "coff/go32exe.h"
#endif
#include "coff/go32exe.h"
#endif
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata NULL
+#endif
+
#include "libcoff.h"
static bfd_reloc_status_type coff_i386_reloc
#include "libcoff.h"
static bfd_reloc_status_type coff_i386_reloc
-
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)
);
+
(bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **
);
static reloc_howto_type *coff_i386_rtype_to_howto
static reloc_howto_type *coff_i386_rtype_to_howto
-
PARAMS (
(bfd *, asection *, struct internal_reloc *,
-
struct coff_link_hash_entry *, struct internal_syment *,
-
bfd_vma *)
);
+ (bfd *, asection *, struct internal_reloc *,
+ struct coff_link_hash_entry *, struct internal_syment *,
+
bfd_vma *
);
static reloc_howto_type *coff_i386_reloc_type_lookup
static reloc_howto_type *coff_i386_reloc_type_lookup
-
PARAMS ((bfd *, bfd_reloc_code_real_type)
);
+
(bfd *, bfd_reloc_code_real_type
);
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
/* The page size is a guess based on ELF. */
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
/* The page size is a guess based on ELF. */
@@
-450,7
+454,7
@@
coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
{
reloc_howto_type *howto;
{
reloc_howto_type *howto;
- if (rel->r_type > sizeof (howto_table) / sizeof (howto_table[0]))
+ if (rel->r_type >
=
sizeof (howto_table) / sizeof (howto_table[0]))
{
bfd_set_error (bfd_error_bad_value);
return NULL;
{
bfd_set_error (bfd_error_bad_value);
return NULL;
@@
-518,7
+522,8
@@
coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
*addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase;
}
*addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase;
}
- if (rel->r_type == R_SECREL32)
+ BFD_ASSERT (sym != NULL);
+ if (rel->r_type == R_SECREL32 && sym != NULL)
{
bfd_vma osect_vma;
{
bfd_vma osect_vma;
@@
-527,16
+532,16
@@
coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
osect_vma = h->root.u.def.section->output_section->vma;
else
{
osect_vma = h->root.u.def.section->output_section->vma;
else
{
- asection *s
ec
;
+ asection *s;
int i;
/* Sigh, the only way to get the section to offset against
is to find it the hard way. */
int i;
/* Sigh, the only way to get the section to offset against
is to find it the hard way. */
- for (s
ec
= abfd->sections, i = 1; i < sym->n_scnum; i++)
- s
ec = sec
->next;
+ for (s = abfd->sections, i = 1; i < sym->n_scnum; i++)
+ s
= s
->next;
- osect_vma = s
ec
->output_section->vma;
+ osect_vma = s->output_section->vma;
}
*addendp -= osect_vma;
}
*addendp -= osect_vma;