mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
* 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.
This commit is contained in:
@ -1,5 +1,9 @@
|
|||||||
1999-06-13 Mark Mitchell <mark@codesourcery.com>
|
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.
|
* elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function.
|
||||||
* elflink.c (_bfd_elf_link_adjust_dynindx): Define it.
|
* elflink.c (_bfd_elf_link_adjust_dynindx): Define it.
|
||||||
* elflink.h (elf_link_remove_section_and_adjust_dynindices): New
|
* elflink.h (elf_link_remove_section_and_adjust_dynindices): New
|
||||||
|
@ -55,7 +55,7 @@ static boolean elf_collect_hash_codes
|
|||||||
static boolean elf_link_read_relocs_from_section
|
static boolean elf_link_read_relocs_from_section
|
||||||
PARAMS ((bfd *, Elf_Internal_Shdr *, PTR, Elf_Internal_Rela *));
|
PARAMS ((bfd *, Elf_Internal_Shdr *, PTR, Elf_Internal_Rela *));
|
||||||
static void elf_link_remove_section_and_adjust_dynindices
|
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
|
/* Given an ELF BFD, add symbols to the global hash table as
|
||||||
appropriate. */
|
appropriate. */
|
||||||
@ -2408,20 +2408,14 @@ compute_bucket_count (info)
|
|||||||
subsequent entries. */
|
subsequent entries. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
elf_link_remove_section_and_adjust_dynindices (abfd, info, section)
|
elf_link_remove_section_and_adjust_dynindices (info, section)
|
||||||
bfd *abfd;
|
|
||||||
struct bfd_link_info *info;
|
struct bfd_link_info *info;
|
||||||
asection *section;
|
asection *section;
|
||||||
{
|
{
|
||||||
asection **spp;
|
asection **spp;
|
||||||
|
|
||||||
/* Remove the section from the output list. */
|
/* Remove the section from the output list. */
|
||||||
for (spp = &abfd->sections;
|
_bfd_strip_section_from_output (section);
|
||||||
*spp != section->output_section;
|
|
||||||
spp = &(*spp)->next)
|
|
||||||
;
|
|
||||||
*spp = section->output_section->next;
|
|
||||||
--abfd->section_count;
|
|
||||||
|
|
||||||
if (elf_section_data (section->output_section)->dynindx)
|
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;
|
verdefs = asvinfo.verdefs;
|
||||||
|
|
||||||
if (verdefs == NULL)
|
if (verdefs == NULL)
|
||||||
elf_link_remove_section_and_adjust_dynindices (output_bfd,
|
elf_link_remove_section_and_adjust_dynindices (info, s);
|
||||||
info,
|
|
||||||
s);
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned int cdefs;
|
unsigned int cdefs;
|
||||||
@ -2843,9 +2835,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
|
|||||||
(PTR) &sinfo);
|
(PTR) &sinfo);
|
||||||
|
|
||||||
if (elf_tdata (output_bfd)->verref == NULL)
|
if (elf_tdata (output_bfd)->verref == NULL)
|
||||||
elf_link_remove_section_and_adjust_dynindices (output_bfd,
|
elf_link_remove_section_and_adjust_dynindices (info, s);
|
||||||
info,
|
|
||||||
s);
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Elf_Internal_Verneed *t;
|
Elf_Internal_Verneed *t;
|
||||||
@ -2945,9 +2935,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
|
|||||||
if (dynsymcount == 0
|
if (dynsymcount == 0
|
||||||
|| (verdefs == NULL && elf_tdata (output_bfd)->verref == NULL))
|
|| (verdefs == NULL && elf_tdata (output_bfd)->verref == NULL))
|
||||||
{
|
{
|
||||||
elf_link_remove_section_and_adjust_dynindices (output_bfd,
|
elf_link_remove_section_and_adjust_dynindices (info, s);
|
||||||
info,
|
|
||||||
s);
|
|
||||||
/* The DYNSYMCOUNT might have changed if we were going to
|
/* The DYNSYMCOUNT might have changed if we were going to
|
||||||
output a dynamic symbol table entry for S. */
|
output a dynamic symbol table entry for S. */
|
||||||
dynsymcount = elf_hash_table (info)->dynsymcount;
|
dynsymcount = elf_hash_table (info)->dynsymcount;
|
||||||
|
Reference in New Issue
Block a user