From: "H.J. Lu" <hjl.tools@gmail.com>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: Fangrui Song <i@maskray.me>, GCC Development <gcc@gcc.gnu.org>
Subject: Re: Add -fdirect-access-external-data
Date: Sat, 26 Dec 2020 07:39:05 -0800 [thread overview]
Message-ID: <CAMe9rOoRdC5QGffuLCbwCBhGmCT8-uHKdsqyc8HgAhxqEhbgzw@mail.gmail.com> (raw)
In-Reply-To: <87h7o81t3v.fsf@mid.deneb.enyo.de>
On Sat, Dec 26, 2020 at 7:32 AM Florian Weimer <fw@deneb.enyo.de> wrote:
>
> * Fangrui Song:
>
> > Hi, I filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98112 which
> > proposes -fdirect-access-external-data to address some x86-64
> > GCC/binutils pain[1] and also benefit non-x86 architectures (also see [1]
> > it can prevent copy relocations).
> >
> > [1] Mentioned in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98112#c2
> >
> > Since I am going to add this option to Clang and I hope (once GCC decides to
> > implement this option the two compilers can use the same option name), I bring
> > it to your attention.
>
> One worry I have is that people start building shared objects with
> direct data access, expecting the main program to be built with
> indirect access. We already see this today with Qt. It's not really
> supported well by the toolchain and causes frequent issues.
It can be solved by ABI extension implemented in linker, ld.so and
compiler.
> Depending on the ELF ABI in question, the new pair of -f options might
> not actually be meaningful. It really depends on whether you have
> reasonably-sized displacements available. I think there are some ABIs
> where the optimization is theoretically possible, but impractical
> because the ilimit it imposes on data segment (think AArch64 without
> adrp).
--
H.J.
next prev parent reply other threads:[~2020-12-26 15:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 7:10 Fangrui Song
2020-12-26 15:31 ` Florian Weimer
2020-12-26 15:39 ` H.J. Lu [this message]
2021-01-07 6:26 ` Fangrui Song
[not found] ` <MWHPR1201MB011025EE98F5F40BA9AE62E0CBAF0@MWHPR1201MB0110.namprd12.prod.outlook.com>
2021-01-08 2:07 ` H.J. Lu
2021-01-08 3:38 ` Fangrui Song
[not found] ` <MWHPR1201MB01103E59742F469B75B35BDBCBAE0@MWHPR1201MB0110.namprd12.prod.outlook.com>
2021-01-08 4:11 ` 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=CAMe9rOoRdC5QGffuLCbwCBhGmCT8-uHKdsqyc8HgAhxqEhbgzw@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=fw@deneb.enyo.de \
--cc=gcc@gcc.gnu.org \
--cc=i@maskray.me \
/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).