public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH] ELF: Discard a section if any of its linked-to section has been discarded
Date: Fri, 07 Feb 2020 03:30:00 -0000	[thread overview]
Message-ID: <20200207032953.GH5669@bubble.grove.modra.org> (raw)
In-Reply-To: <20200207021431.387289-1-hjl.tools@gmail.com>

On Thu, Feb 06, 2020 at 06:14:31PM -0800, H.J. Lu wrote:
> Add ldelf_before_place_orphans to call before lang_place_orphans to
> discard a section if any of its linked-to sections has been discarded.
> 
> 	PR ld/25022
> 	* emultempl/aix.em (ld_${EMULATION_NAME}_emulation): Add
> 	before_place_orphans_default.
> 	* emultempl/armcoff.em (ld_${EMULATION_NAME}_emulation): Likewise.
> 	* emultempl/beos.em (ld_${EMULATION_NAME}_emulation): Likewise.
> 	* emultempl/generic.em (ld_${EMULATION_NAME}_emulation): Likewise.
> 	* emultempl/linux.em (ld_${EMULATION_NAME}_emulation): Likewise.
> 	* emultempl/msp430.em (ld_${EMULATION_NAME}_emulation): Likewise.
> 	* emultempl/pe.em (ld_${EMULATION_NAME}_emulation): Likewise.
> 	* emultempl/pep.em (ld_${EMULATION_NAME}_emulation): Likewise.
> 	* emultempl/ticoff.em (ld_${EMULATION_NAME}_emulation): Likewise.
> 	* emultempl/vanilla.em (ld_${EMULATION_NAME}_emulation): Likewise.
> 	* emultempl/elf.em (ld_${EMULATION_NAME}_emulation): Use
> 	ldelf_before_place_orphans.
> 	* ldelf.c (ldelf_before_place_orphans): New.
> 	* ldelf.h (ldelf_before_place_orphans): Likewise.
> 	* ldemul.c (ldemul_before_place_orphans): Likewise.
> 	(before_place_orphans_default): Likewise.
> 	* ldemul.h (ldemul_before_place_orphans): Likewise.
> 	(before_place_orphans_default): Likewise.
> 	(ld_emulation_xfer_struct): Add before_place_orphans.
> 	* ldlang.c (lang_process): Call ldemul_before_place_orphans
> 	before lang_place_orphans.
> 	* testsuite/ld-elf/pr25022.d: New file.
> 	* testsuite/ld-elf/pr25022.s: Likewise.
> 	* testsuite/ld-elf/pr25022.t: Likewise.

OK.

-- 
Alan Modra
Australia Development Lab, IBM

  reply	other threads:[~2020-02-07  3:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07  2:14 H.J. Lu
2020-02-07  3:30 ` Alan Modra [this message]
2020-02-08 18:14 ` Fangrui Song
2020-02-08 20:23   ` H.J. Lu
  -- strict thread matches above, loose matches on Subject: below --
2020-02-03 14:39 H.J. Lu

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=20200207032953.GH5669@bubble.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.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).