public inbox for gnu-gabi@sourceware.org
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: Florian Weimer <fweimer@redhat.com>
Cc: Jozef Lawrynowicz <jozef.l@mittosystems.com>, gnu-gabi@sourceware.org
Subject: Re: [RFC] SHF_GNU_RETAIN ELF Section Flag
Date: Wed, 16 Sep 2020 13:46:38 +0000 (UTC)	[thread overview]
Message-ID: <alpine.LSU.2.20.2009161343290.7080@wotan.suse.de> (raw)
In-Reply-To: <875z8dn9xj.fsf@oldenburg2.str.redhat.com>

Hello,

On Wed, 16 Sep 2020, Florian Weimer via Gnu-gabi wrote:

> * Jozef Lawrynowicz:
> 
> > I suppose the most compelling use cases for SHF_GNU_RETAIN are when the
> > dependency cannot be expressed with references to ELF sections. You
> > can't use SHF_GROUP because there is nothing to group the section with.
> 
> But if there is nothing to group the section with, why would the link
> editor load the object?
> 
> That's the part I don't understand.

Hmm?  By putting it on the command line:

% ld --gc-sections needed.o

should retain the RETAIN sections from needed.o, even if otherwise not 
seemingly referenced.

(I'm not sure if doing this via a group flag, or via a section flag would 
be better here.  In a way I find the section flag more appealing, it's the 
less complicated way to state "don't GC this section").


Ciao,
Michael.

  reply	other threads:[~2020-09-16 13:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 12:06 Jozef Lawrynowicz
2020-09-15 12:09 ` Florian Weimer
2020-09-15 12:31   ` Jozef Lawrynowicz
2020-09-15 12:37     ` Florian Weimer
2020-09-15 12:50       ` Carlos O'Donell
2020-09-15 12:55         ` Florian Weimer
2020-09-15 13:29           ` Jozef Lawrynowicz
2020-09-15 14:11             ` Carlos O'Donell
2020-09-15 16:52               ` Jozef Lawrynowicz
2020-09-16 12:58                 ` Carlos O'Donell
2020-09-16 13:11                 ` Florian Weimer
2020-09-16 13:46                   ` Michael Matz [this message]
2020-09-18 12:07                     ` Florian Weimer
2020-09-18 12:22                       ` Jozef Lawrynowicz
2020-09-18 18:09                         ` Florian Weimer
2020-09-16 14:13                   ` Jozef Lawrynowicz
2020-09-18 10:00                     ` Jozef Lawrynowicz
2020-09-18 18:11                       ` Florian Weimer
2020-09-21 12:42                         ` Michael Matz
2020-09-21 18:53                           ` Jozef Lawrynowicz

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=alpine.LSU.2.20.2009161343290.7080@wotan.suse.de \
    --to=matz@suse.de \
    --cc=fweimer@redhat.com \
    --cc=gnu-gabi@sourceware.org \
    --cc=jozef.l@mittosystems.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).