diff options
-rw-r--r-- | bfd/ChangeLog | 2 | ||||
-rw-r--r-- | bfd/bfd.c | 96 | ||||
-rw-r--r-- | bfd/reloc.c | 97 |
3 files changed, 96 insertions, 99 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7025466..a8c6ba6 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) @@ -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 diff --git a/bfd/reloc.c b/bfd/reloc.c index 9105beb..0f05cbe 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -1342,100 +1342,3 @@ DEFUN(bfd_generic_get_relocated_section_contents,(abfd, } - - -/** 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; -} |