aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-06-13 18:35:29 +0000
committerMark Mitchell <mark@codesourcery.com>1999-06-13 18:35:29 +0000
commit78de0b4335ed57a9d7a818a4dcbdb3d4bc3fd633 (patch)
tree81ee4c51179cb0b222cf568aa062540347f0d161 /bfd
parentaa1b0fd6fe222661d7c7df1a4cb4e4c62b28a725 (diff)
downloadgdb-78de0b4335ed57a9d7a818a4dcbdb3d4bc3fd633.zip
gdb-78de0b4335ed57a9d7a818a4dcbdb3d4bc3fd633.tar.gz
gdb-78de0b4335ed57a9d7a818a4dcbdb3d4bc3fd633.tar.bz2
* elflink.h (elf_link_remove_section_and_adjust_dynindices):
Remove abfd parameter. Use _bfd_strip_section_from_output. (bfd_elf_size_dynamic_sections): Adjust callers accordingly.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elflink.h24
2 files changed, 10 insertions, 18 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e75acf0..107a08c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,9 @@
1999-06-13 Mark Mitchell <mark@codesourcery.com>
+ * elflink.h (elf_link_remove_section_and_adjust_dynindices):
+ Remove abfd parameter. Use _bfd_strip_section_from_output.
+ (bfd_elf_size_dynamic_sections): Adjust callers accordingly.
+
* 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
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 88fd05c..369a0a2 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -55,7 +55,7 @@ static boolean elf_collect_hash_codes
static boolean elf_link_read_relocs_from_section
PARAMS ((bfd *, Elf_Internal_Shdr *, PTR, Elf_Internal_Rela *));
static void elf_link_remove_section_and_adjust_dynindices
- PARAMS ((bfd *, struct bfd_link_info *, asection *));
+ PARAMS ((struct bfd_link_info *, asection *));
/* Given an ELF BFD, add symbols to the global hash table as
appropriate. */
@@ -2408,20 +2408,14 @@ compute_bucket_count (info)
subsequent entries. */
static void
-elf_link_remove_section_and_adjust_dynindices (abfd, info, section)
- bfd *abfd;
+elf_link_remove_section_and_adjust_dynindices (info, section)
struct bfd_link_info *info;
asection *section;
{
asection **spp;
/* Remove the section from the output list. */
- for (spp = &abfd->sections;
- *spp != section->output_section;
- spp = &(*spp)->next)
- ;
- *spp = section->output_section->next;
- --abfd->section_count;
+ _bfd_strip_section_from_output (section);
if (elf_section_data (section->output_section)->dynindx)
{
@@ -2648,9 +2642,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
verdefs = asvinfo.verdefs;
if (verdefs == NULL)
- elf_link_remove_section_and_adjust_dynindices (output_bfd,
- info,
- s);
+ elf_link_remove_section_and_adjust_dynindices (info, s);
else
{
unsigned int cdefs;
@@ -2843,9 +2835,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
(PTR) &sinfo);
if (elf_tdata (output_bfd)->verref == NULL)
- elf_link_remove_section_and_adjust_dynindices (output_bfd,
- info,
- s);
+ elf_link_remove_section_and_adjust_dynindices (info, s);
else
{
Elf_Internal_Verneed *t;
@@ -2945,9 +2935,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
if (dynsymcount == 0
|| (verdefs == NULL && elf_tdata (output_bfd)->verref == NULL))
{
- elf_link_remove_section_and_adjust_dynindices (output_bfd,
- info,
- s);
+ elf_link_remove_section_and_adjust_dynindices (info, s);
/* The DYNSYMCOUNT might have changed if we were going to
output a dynamic symbol table entry for S. */
dynsymcount = elf_hash_table (info)->dynsymcount;