From: "H. J. Lu" <hjl@lucon.org>
To: binutils@sources.redhat.com
Subject: Re: [hjl@lucon.org: Re: your patch to remove unused sections]
Date: Mon, 11 Apr 2005 14:55:00 -0000 [thread overview]
Message-ID: <20050411145516.GA15327@lucon.org> (raw)
In-Reply-To: <20050411144356.GC861@bubble.modra.org>
On Tue, Apr 12, 2005 at 12:13:56AM +0930, Alan Modra wrote:
> On Mon, Apr 11, 2005 at 07:09:30AM -0700, H. J. Lu wrote:
> > Hi Alan,
> >
> > Have you looked at this patch?
>
> Yes, I was going to ask for a revision, but wanted to check whether my
> idea was feasible before asking you to make a change, which would remove
> the following loop:
>
> > + /* .bss and similar sections won't have the linker_mark
> > + field set. We have to check if its output section is
> > + included in output_bfd. */
> > + for (sec = output_bfd->sections; sec != NULL; sec = sec->next)
> > + if (sec == sym->section->output_section)
> > + break;
>
> I haven't had time to check, but here's the idea anyway: After removing
> an unused output section s with bfd_section_list_remove (output_bfd, s),
> clear s->next. Then
>
> if (sym->section->output_section->next == NULL
> && *output_bfd->section_tail != sym->section->output_section)
> {
> /* The section has been removed. */
> }
>
I will give it a try.
H.J.
next prev parent reply other threads:[~2005-04-11 14:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20050411140930.GA14672@lucon.org>
2005-04-11 14:44 ` Alan Modra
2005-04-11 14:55 ` H. J. Lu [this message]
2005-04-11 17:37 ` H. J. Lu
2005-04-11 22:16 ` Alan Modra
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=20050411145516.GA15327@lucon.org \
--to=hjl@lucon.org \
--cc=binutils@sources.redhat.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).