From: mark@codesourcery.com
To: rth@cygnus.com
Cc: ian@zembu.com, binutils@sourceware.cygnus.com
Subject: Re: PATCH for uninitialized junk in .dynsym
Date: Thu, 01 Jul 1999 00:00:00 -0000 [thread overview]
Message-ID: <19990613184144S.mitchell@codesourcery.com> (raw)
In-Reply-To: <19990613173725.B9797@cygnus.com>
>>>>> "Richard" == Richard Henderson <rth@cygnus.com> writes:
Richard> On Sun, Jun 13, 1999 at 08:29:45PM -0400, Ian Lance
Richard> Taylor wrote:
>> > + /* 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;
>>
>> ... In this case, there is no input section to pass it.
Richard> Certainly there is: `section'. That's where
Richard> `section->output_section' comes from.
I just moved the code in question from one place to another; I didn't
really investigate its properties.
I've committed the following patch.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.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.
Index: elflink.h
===================================================================
RCS file: /cvs/binutils/binutils/bfd/elflink.h,v
retrieving revision 1.3
diff -u -p -r1.3 elflink.h
--- elflink.h 1999/06/13 14:49:48 1.3
+++ elflink.h 1999/06/14 01:33:12
@@ -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) (out
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) (out
(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) (out
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;
next prev parent reply other threads:[~1999-07-01 0:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-01 0:00 mark
1999-07-01 0:00 ` Franz Sirl
1999-07-01 0:00 ` mark
1999-07-01 0:00 ` Franz Sirl
1999-07-01 0:00 ` Ian Lance Taylor
1999-07-01 0:00 ` Franz Sirl
1999-07-01 0:00 ` mark
1999-07-01 0:00 ` Franz Sirl
1999-07-01 0:00 ` Ian Lance Taylor
1999-07-01 0:00 ` Ian Lance Taylor
1999-07-01 0:00 ` mark
1999-07-01 0:00 ` Franz Sirl
1999-07-01 0:00 ` Richard Henderson
1999-07-01 0:00 ` Ian Lance Taylor
1999-07-01 0:00 ` Richard Henderson
1999-07-01 0:00 ` mark [this message]
1999-07-01 0:00 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19990613184144S.mitchell@codesourcery.com \
--to=mark@codesourcery.com \
--cc=binutils@sourceware.cygnus.com \
--cc=ian@zembu.com \
--cc=rth@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).