From 3234eba0b28841b255ee3fd04934e73ff024c09a Mon Sep 17 00:00:00 2001 From: David MacKenzie Date: Fri, 5 Nov 1993 20:39:26 +0000 Subject: [PATCH] fix mistakes in last change --- bfd/ChangeLog | 2 -- bfd/bfd.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++ bfd/reloc.c | 97 --------------------------------------------------- 3 files changed, 96 insertions(+), 99 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7025466856..a8c6ba6626 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -5,8 +5,6 @@ Fri Nov 5 10:41:07 1993 David J. Mackenzie (djm@thepub.cygnus.com) section.c, syms.c, targets.c: Doc cleanup (spelling, punctuation, grammar, formatting). * 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) diff --git a/bfd/bfd.c b/bfd/bfd.c index c28b1409e7..21588408cf 100644 --- a/bfd/bfd.c +++ b/bfd/bfd.c @@ -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 + <>. + + 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 diff --git a/bfd/reloc.c b/bfd/reloc.c index 9105bebe72..0f05cbe148 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -1341,101 +1341,4 @@ DEFUN(bfd_generic_get_relocated_section_contents,(abfd, 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 - <>. - - 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; }