From: Gunther Nikl <gnikl@users.sourceforge.net>
To: Alan Modra <amodra@gmail.com>
Cc: binutils@sourceware.org, Nick Clifton <nickc@redhat.com>
Subject: Re: [PATCH] [BFD] Fix override of COMMON symbols for a.out
Date: Fri, 19 Jan 2018 21:08:00 -0000 [thread overview]
Message-ID: <20180119220740.00004633@baltic.net> (raw)
In-Reply-To: <20180112105043.GO20622@bubble.grove.modra.org>
Hello,
Am Fri, 12 Jan 2018 21:20:43 +1030 schrieb Alan Modra
<amodra@gmail.com>:
> On Thu, Jan 11, 2018 at 07:54:54PM +0100, gnikl@users.sourceforge.net
> wrote:
> > 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
> >
> > * bfd/aoutx.h (aout_link_check_ar_symbols): Add
> > bfd_link_common_skip_none and make it the switch default.
>
> Applied with a slight variation.
>
> * aoutx.h (aout_link_check_ar_symbols): Remove default and
> handle bfd_link_common_skip_none in switch.
Thank you for the quick response.
I looked at the code since I need similar code in the generic linker.
Does the code below for bfd/linker.c/generic_link_check_archive_element
look ok? It has one additional case for absolute symbols.
Regards,
Gunther Nikl
+ if (h->type == bfd_link_hash_common)
+ {
+ int skip = 0;
+
+ switch (info->common_skip_ar_symbols)
+ {
+ case bfd_link_common_skip_none:
+ break;
+ case bfd_link_common_skip_text:
+ skip = p->section->flags & SEC_CODE ? 1 : 0;
+ break;
+ case bfd_link_common_skip_data:
+ skip = p->section->flags & SEC_DATA ? 1 : 0;
+ break;
+ case bfd_link_common_skip_abs:
+ skip = bfd_is_abs_section (p->section) ? 1 : 0;
+ break;
+ case bfd_link_common_skip_all:
+ skip = 1;
+ break;
+ }
+
+ if (skip)
+ continue;
+ }
prev parent reply other threads:[~2018-01-19 21:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 18:55 gnikl
2018-01-12 10:50 ` Alan Modra
2018-01-19 21:08 ` Gunther Nikl [this message]
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=20180119220740.00004633@baltic.net \
--to=gnikl@users.sourceforge.net \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=nickc@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).