projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* elfxx-mips.c (_bfd_mips_elf_common_definition): New function.
[deliverable/binutils-gdb.git]
/
bfd
/
coff-h8300.c
diff --git
a/bfd/coff-h8300.c
b/bfd/coff-h8300.c
index d216f97c12b564e8000592c8aebe19818b3e62fa..1a9c4a70ad8302e09962d2266672bcbbe42c84f7 100644
(file)
--- a/
bfd/coff-h8300.c
+++ b/
bfd/coff-h8300.c
@@
-1,6
+1,6
@@
/* BFD back-end for Renesas H8/300 COFF binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
/* BFD back-end for Renesas H8/300 COFF binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005
, 2006
Free Software Foundation, Inc.
Written by Steve Chamberlain, <sac@cygnus.com>.
Free Software Foundation, Inc.
Written by Steve Chamberlain, <sac@cygnus.com>.
@@
-18,7
+18,7
@@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
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., 5
9 Temple Place - Suite 330, Boston, MA 02111-1307
, USA. */
+ Foundation, Inc., 5
1 Franklin Street - Fifth Floor, Boston, MA 02110-1301
, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "bfd.h"
#include "sysdep.h"
@@
-63,13
+63,6
@@
static struct bfd_hash_entry *
funcvec_hash_newfunc
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
funcvec_hash_newfunc
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
-static bfd_boolean
-funcvec_hash_table_init
- (struct funcvec_hash_table *, bfd *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *));
-
static bfd_reloc_status_type special
(bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **);
static int select_reloc
static bfd_reloc_status_type special
(bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **);
static int select_reloc
@@
-181,13
+174,14
@@
funcvec_hash_table_init (struct funcvec_hash_table *table,
struct bfd_hash_entry *(*newfunc)
(struct bfd_hash_entry *,
struct bfd_hash_table *,
struct bfd_hash_entry *(*newfunc)
(struct bfd_hash_entry *,
struct bfd_hash_table *,
- const char *))
+ const char *),
+ unsigned int entsize)
{
/* Initialize our local fields, then call the generic initialization
routine. */
table->offset = 0;
table->abfd = abfd;
{
/* Initialize our local fields, then call the generic initialization
routine. */
table->offset = 0;
table->abfd = abfd;
- return (bfd_hash_table_init (&table->root, newfunc));
+ return (bfd_hash_table_init (&table->root, newfunc
, entsize
));
}
/* Create the derived linker hash table. We use a derived hash table
}
/* Create the derived linker hash table. We use a derived hash table
@@
-204,7
+198,8
@@
h8300_coff_link_hash_table_create (bfd *abfd)
if (ret == NULL)
return NULL;
if (!_bfd_link_hash_table_init (&ret->root.root, abfd,
if (ret == NULL)
return NULL;
if (!_bfd_link_hash_table_init (&ret->root.root, abfd,
- _bfd_generic_link_hash_newfunc))
+ _bfd_generic_link_hash_newfunc,
+ sizeof (struct generic_link_hash_entry)))
{
free (ret);
return NULL;
{
free (ret);
return NULL;
@@
-671,7
+666,7
@@
h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
/* Get the address of the target of this branch. */
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the target of this branch. */
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
- dot = (
link_order->
offset
+ dot = (
input_section->output_
offset
+ dst_address
+ link_order->u.indirect.section->output_section->vma);
+ dst_address
+ link_order->u.indirect.section->output_section->vma);
@@
-703,7
+698,7
@@
h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the instruction (not the reloc). */
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the instruction (not the reloc). */
- dot = (
link_order->
offset
+ dot = (
input_section->output_
offset
+ dst_address
+ link_order->u.indirect.section->output_section->vma + 1);
+ dst_address
+ link_order->u.indirect.section->output_section->vma + 1);
@@
-817,7
+812,7
@@
h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the next instruction. */
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the next instruction. */
- dot = (
link_order->
offset
+ dot = (
input_section->output_
offset
+ dst_address
+ link_order->u.indirect.section->output_section->vma + 1);
+ dst_address
+ link_order->u.indirect.section->output_section->vma + 1);
@@
-864,7
+859,7
@@
h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the instruction (not the reloc). */
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the instruction (not the reloc). */
- dot = (
link_order->
offset
+ dot = (
input_section->output_
offset
+ dst_address
+ link_order->u.indirect.section->output_section->vma - 1);
+ dst_address
+ link_order->u.indirect.section->output_section->vma - 1);
@@
-925,7
+920,7
@@
h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the instruction (not the reloc). */
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the instruction (not the reloc). */
- dot = (
link_order->
offset
+ dot = (
input_section->output_
offset
+ dst_address
+ link_order->u.indirect.section->output_section->vma + 2);
+ dst_address
+ link_order->u.indirect.section->output_section->vma + 2);
@@
-1064,7
+1059,7
@@
h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
/* Get the address of the target of this branch. */
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the target of this branch. */
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
- dot = (
link_order->
offset
+ dot = (
input_section->output_
offset
+ dst_address
+ link_order->u.indirect.section->output_section->vma) + 1;
+ dst_address
+ link_order->u.indirect.section->output_section->vma) + 1;
@@
-1281,12
+1276,12
@@
h8300_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
/* Make sure the appropriate flags are set, including SEC_IN_MEMORY. */
flags = (SEC_ALLOC | SEC_LOAD
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_READONLY);
/* Make sure the appropriate flags are set, including SEC_IN_MEMORY. */
flags = (SEC_ALLOC | SEC_LOAD
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_READONLY);
- htab->vectors_sec = bfd_make_section (abfd, ".vectors");
+ htab->vectors_sec = bfd_make_section_with_flags (abfd, ".vectors",
+ flags);
/* If the section wasn't created, or we couldn't set the flags,
quit quickly now, rather than dying a painful death later. */
/* If the section wasn't created, or we couldn't set the flags,
quit quickly now, rather than dying a painful death later. */
- if (!htab->vectors_sec
- || !bfd_set_section_flags (abfd, htab->vectors_sec, flags))
+ if (!htab->vectors_sec)
return FALSE;
/* Also create the vector hash table. */
return FALSE;
/* Also create the vector hash table. */
@@
-1298,7
+1293,8
@@
h8300_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
/* And initialize the funcvec hash table. */
if (!funcvec_hash_table_init (funcvec_hash_table, abfd,
/* And initialize the funcvec hash table. */
if (!funcvec_hash_table_init (funcvec_hash_table, abfd,
- funcvec_hash_newfunc))
+ funcvec_hash_newfunc,
+ sizeof (struct funcvec_hash_entry)))
{
bfd_release (abfd, funcvec_hash_table);
return FALSE;
{
bfd_release (abfd, funcvec_hash_table);
return FALSE;
This page took
0.025142 seconds
and
4
git commands to generate.