aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-06-13 14:49:51 +0000
committerMark Mitchell <mark@codesourcery.com>1999-06-13 14:49:51 +0000
commit42751cf354f999d77243bdf2171602bfc08fce5f (patch)
tree277f587d1e8b40bde923a2d63872d23a93ee4adb /bfd/elflink.c
parent5076851fbc4405863b3552011b67d04f364d7eb4 (diff)
downloadfsf-binutils-gdb-42751cf354f999d77243bdf2171602bfc08fce5f.zip
fsf-binutils-gdb-42751cf354f999d77243bdf2171602bfc08fce5f.tar.gz
fsf-binutils-gdb-42751cf354f999d77243bdf2171602bfc08fce5f.tar.bz2
* elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function.
* elflink.c (_bfd_elf_link_adjust_dynindx): Define it. * elflink.h (elf_link_remove_section_and_adjust_dynindices): New function. (bfd_elf_size_dynamic_sections): Use it.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 829d977..d644e1b 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -259,6 +259,21 @@ _bfd_elf_link_record_dynamic_symbol (info, h)
return true;
}
+
+/* Increase the index at which H will appear in the dynamic symbol
+ table by INCREMENT (which is really an `int *'). Called via
+ elf_link_hash_traverse. */
+
+boolean
+_bfd_elf_link_adjust_dynindx (h, increment)
+ struct elf_link_hash_entry *h;
+ PTR increment;
+{
+ if (h->dynindx != -1)
+ h->dynindx += *((int *) increment);
+
+ return true;
+}
/* Create a special linker section, or return a pointer to a linker section already created */