projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Makefile.am (libbfd.h): Add "Extracted from.." comment.
[deliverable/binutils-gdb.git]
/
bfd
/
reloc16.c
diff --git
a/bfd/reloc16.c
b/bfd/reloc16.c
index cb9636f8f1064684d818d04b7c10655ca9a5fe8d..1d69a7f25d35063ba9711fce8957f1e9efcc3e5c 100644
(file)
--- a/
bfd/reloc16.c
+++ b/
bfd/reloc16.c
@@
-1,5
+1,5
@@
/* 8 and 16 bit COFF relocation functions, for BFD.
/* 8 and 16 bit COFF relocation functions, for BFD.
- Copyright 1990,
91, 92, 93, 94, 95, 96, 97, 98, 2000
+ Copyright 1990,
1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
Free Software Foundation, Inc.
Written by Cygnus Support.
@@
-137,17
+137,16
@@
bfd_perform_slip (abfd, slip, input_section, value)
}
boolean
}
boolean
-bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
+bfd_coff_reloc16_relax_section (abfd, i
nput_section
, link_info, again)
bfd *abfd;
bfd *abfd;
- asection *i;
+ asection *i
nput_section
;
struct bfd_link_info *link_info;
boolean *again;
{
/* Get enough memory to hold the stuff. */
struct bfd_link_info *link_info;
boolean *again;
{
/* Get enough memory to hold the stuff. */
- bfd *input_bfd = i->owner;
- asection *input_section = i;
- int *shrinks;
- int shrink = 0;
+ bfd *input_bfd = input_section->owner;
+ unsigned *shrinks;
+ unsigned shrink = 0;
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
arelent **reloc_vector = NULL;
long reloc_count;
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
arelent **reloc_vector = NULL;
long reloc_count;
@@
-159,7
+158,7
@@
bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
if (reloc_size < 0)
return false;
if (reloc_size < 0)
return false;
- reloc_vector = (arelent **) bfd_malloc (reloc_size);
+ reloc_vector = (arelent **) bfd_malloc (
(bfd_size_type)
reloc_size);
if (!reloc_vector && reloc_size > 0)
return false;
if (!reloc_vector && reloc_size > 0)
return false;
@@
-191,11
+190,14
@@
bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
if (reloc_count > 0)
{
int another_pass = 0;
if (reloc_count > 0)
{
int another_pass = 0;
+ bfd_size_type amt;
/* Allocate and initialize the shrinks array for this section.
The last element is used as an accumlator of shrinks. */
/* Allocate and initialize the shrinks array for this section.
The last element is used as an accumlator of shrinks. */
- shrinks = (int *) bfd_malloc ((reloc_count + 1) * sizeof (int));
- memset (shrinks, 0, (reloc_count + 1) * sizeof (int));
+ amt = reloc_count + 1;
+ amt *= sizeof (unsigned);
+ shrinks = (unsigned *) bfd_malloc (amt);
+ memset (shrinks, 0, (size_t) amt);
/* Loop until nothing changes in this section. */
do {
/* Loop until nothing changes in this section. */
do {
@@
-268,11
+270,11
@@
bfd_coff_reloc16_get_relocated_section_contents(in_abfd,
if (!bfd_get_section_contents(input_bfd,
input_section,
data,
if (!bfd_get_section_contents(input_bfd,
input_section,
data,
- 0,
+
(bfd_vma)
0,
input_section->_raw_size))
return NULL;
input_section->_raw_size))
return NULL;
- reloc_vector = (arelent **) bfd_malloc ((
size_t
) reloc_size);
+ reloc_vector = (arelent **) bfd_malloc ((
bfd_size_type
) reloc_size);
if (!reloc_vector && reloc_size != 0)
return NULL;
if (!reloc_vector && reloc_size != 0)
return NULL;
This page took
0.027435 seconds
and
4
git commands to generate.