public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <i@maskray.me>
To: "H.J. Lu via Binutils" <binutils@sourceware.org>
Subject: Re: [PATCH] x86: Only allow S - A relocations against absolute symbol
Date: Mon, 30 Mar 2020 23:17:51 -0700	[thread overview]
Message-ID: <20200331061751.qjcv7z5z4rbyu45l@gmail.com> (raw)
In-Reply-To: <20200331044350.808132-1-hjl.tools@gmail.com>

On 2020-03-30, H.J. Lu via Binutils wrote:
>Since value of non-preemptible absolute symbol (SHN_ABS) won't change,
>only S - A relocations against non-preemptible absolute symbol are
>allowed in PIE and shared library.

Thanks for the patch. At some point we should define some generic
relocation categories (https://reviews.llvm.org/rL266158). For example,

- R_ABS: R_X86_64_8, R_X86_64_16, R_X86_64_32, R_X86_64_64
          R_AARCH64_ABS16, R_AARCH64_ABS32, R_AARCH64_ABS64
          R_PPC64_ADDR16, R_PPC64_ADDR16_DS, R_PPC64_ADDR16_HA, ...
- R_PCREL: R_X86_64_PC8, R_X86_64_PC16, R_X86_64_PC32, R_X86_64_PC64
          R_AARCH64_PREL16, R_AARCH64_PREL32, R_AARCH64_PREL64
- R_PLT_PCREL: R_X86_64_PLT32, R_AARCH64_CALL26
- R_GOT_PCREL: R_X86_64_GOTPCREL, R_X86_64_GOTPCRELX

Define a property is_preemptible as a more appropriate level of
abstraction for GENERATE_DYNAMIC_RELOCATION_P and some use cases of bfd_link_pic and bfd_link_executable...

  reply	other threads:[~2020-03-31  6:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31  4:43 H.J. Lu
2020-03-31  6:17 ` Fangrui Song [this message]
2020-03-31 14:31   ` H.J. Lu
2020-03-31 23:25     ` V3 " H.J. Lu
2020-04-01  3:30       ` V4 " H.J. Lu
2020-04-01 14:06         ` V5 " H.J. Lu
2020-04-01 21:28           ` V6 " H.J. Lu
2020-04-02  3:24             ` Alan Modra
2020-04-02 11:54               ` H.J. Lu
2020-04-02 14:10                 ` 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=20200331061751.qjcv7z5z4rbyu45l@gmail.com \
    --to=i@maskray.me \
    --cc=binutils@sourceware.org \
    /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).