aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorDavid MacKenzie <djm@cygnus>1993-11-05 20:39:26 +0000
committerDavid MacKenzie <djm@cygnus>1993-11-05 20:39:26 +0000
commit3234eba0b28841b255ee3fd04934e73ff024c09a (patch)
treef1eaab2812a0e05e13248d4173914cc0f22bfdb8 /bfd/bfd.c
parent1a9f0c717fc302993f77bf56f61365b0c0f6f097 (diff)
downloadgdb-3234eba0b28841b255ee3fd04934e73ff024c09a.zip
gdb-3234eba0b28841b255ee3fd04934e73ff024c09a.tar.gz
gdb-3234eba0b28841b255ee3fd04934e73ff024c09a.tar.bz2
fix mistakes in last change
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c96
1 files changed, 96 insertions, 0 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index c28b140..2158840 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
+ <<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