fix mistakes in last change

This commit is contained in:
David MacKenzie 1993-11-05 20:39:26 +00:00
parent 1a9f0c717f
commit 3234eba0b2
3 changed files with 96 additions and 99 deletions

View File

@ -5,8 +5,6 @@ Fri Nov 5 10:41:07 1993 David J. Mackenzie (djm@thepub.cygnus.com)
section.c, syms.c, targets.c: section.c, syms.c, targets.c:
Doc cleanup (spelling, punctuation, grammar, formatting). Doc cleanup (spelling, punctuation, grammar, formatting).
* bfd-in2.h, libbfd.h: Rebuild. * bfd-in2.h, libbfd.h: Rebuild.
* reloc.c (bfd_get_reloc_upper_bound, bfd_canonicalize_reloc,
bfd_set_reloc): Moved from bfd.c.
Thu Nov 4 14:46:14 1993 John Gilmore (gnu@rtl.cygnus.com) Thu Nov 4 14:46:14 1993 John Gilmore (gnu@rtl.cygnus.com)

View File

@ -317,6 +317,102 @@ DEFUN(bfd_perror,(message),
} }
} }
/** Symbols */
/*
FUNCTION
bfd_get_reloc_upper_bound
SYNOPSIS
unsigned int bfd_get_reloc_upper_bound(bfd *abfd, asection *sect);
DESCRIPTION
Return the number of bytes required to store the
relocation information associated with section @var{sect}
attached to bfd @var{abfd}.
*/
unsigned int
DEFUN(bfd_get_reloc_upper_bound,(abfd, asect),
bfd *abfd AND
sec_ptr asect)
{
if (abfd->format != bfd_object) {
bfd_error = invalid_operation;
return 0;
}
return BFD_SEND (abfd, _get_reloc_upper_bound, (abfd, asect));
}
/*
FUNCTION
bfd_canonicalize_reloc
SYNOPSIS
unsigned int bfd_canonicalize_reloc
(bfd *abfd,
asection *sec,
arelent **loc,
asymbol **syms);
DESCRIPTION
Call the back end associated with the open BFD
@var{abfd} and translate the external form of the relocation
information attached to @var{sec} into the internal canonical
form. Place the table into memory at @var{loc}, which has
been preallocated, usually by a call to
<<bfd_get_reloc_upper_bound>>.
The @var{syms} table is also needed for horrible internal magic
reasons.
*/
unsigned int
DEFUN(bfd_canonicalize_reloc,(abfd, asect, location, symbols),
bfd *abfd AND
sec_ptr asect AND
arelent **location AND
asymbol **symbols)
{
if (abfd->format != bfd_object) {
bfd_error = invalid_operation;
return 0;
}
return BFD_SEND (abfd, _bfd_canonicalize_reloc,
(abfd, asect, location, symbols));
}
/*
FUNCTION
bfd_set_reloc
SYNOPSIS
void bfd_set_reloc
(bfd *abfd, asection *sec, arelent **rel, unsigned int count)
DESCRIPTION
Set the relocation pointer and count within
section @var{sec} to the values @var{rel} and @var{count}.
The argument @var{abfd} is ignored.
*/
/*ARGSUSED*/
void
bfd_set_reloc (ignore_abfd, asect, location, count)
bfd *ignore_abfd;
sec_ptr asect;
arelent **location;
unsigned int count;
{
asect->orelocation = location;
asect->reloc_count = count;
}
/* /*
FUNCTION FUNCTION

View File

@ -1341,101 +1341,4 @@ DEFUN(bfd_generic_get_relocated_section_contents,(abfd,
return data; return data;
}
/** Symbols */
/*
FUNCTION
bfd_get_reloc_upper_bound
SYNOPSIS
unsigned int bfd_get_reloc_upper_bound(bfd *abfd, asection *sect);
DESCRIPTION
Return the number of bytes required to store the
relocation information associated with section @var{sect}
attached to bfd @var{abfd}.
*/
unsigned int
DEFUN(bfd_get_reloc_upper_bound,(abfd, asect),
bfd *abfd AND
sec_ptr asect)
{
if (abfd->format != bfd_object) {
bfd_error = invalid_operation;
return 0;
}
return BFD_SEND (abfd, _get_reloc_upper_bound, (abfd, asect));
}
/*
FUNCTION
bfd_canonicalize_reloc
SYNOPSIS
unsigned int bfd_canonicalize_reloc
(bfd *abfd,
asection *sec,
arelent **loc,
asymbol **syms);
DESCRIPTION
Call the back end associated with the open BFD
@var{abfd} and translate the external form of the relocation
information attached to @var{sec} into the internal canonical
form. Place the table into memory at @var{loc}, which has
been preallocated, usually by a call to
<<bfd_get_reloc_upper_bound>>.
The @var{syms} table is also needed for horrible internal magic
reasons.
*/
unsigned int
DEFUN(bfd_canonicalize_reloc,(abfd, asect, location, symbols),
bfd *abfd AND
sec_ptr asect AND
arelent **location AND
asymbol **symbols)
{
if (abfd->format != bfd_object) {
bfd_error = invalid_operation;
return 0;
}
return BFD_SEND (abfd, _bfd_canonicalize_reloc,
(abfd, asect, location, symbols));
}
/*
FUNCTION
bfd_set_reloc
SYNOPSIS
void bfd_set_reloc
(bfd *abfd, sec_ptr *sec, arelent **rel, unsigned int count)
DESCRIPTION
Set the relocation pointer and count within
section @var{sec} to the values @var{rel} and @var{count}.
The argument @var{abfd} is ignored.
*/
/*ARGSUSED*/
void
bfd_set_reloc (ignore_abfd, asect, location, count)
bfd *ignore_abfd;
sec_ptr asect;
arelent **location;
unsigned int count;
{
asect->orelocation = location;
asect->reloc_count = count;
} }