From: Richard Earnshaw <rearnsha@arm.com>
To: Joey Ye <joey.ye@arm.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [patch] [arm] New option for PIC offset unfixed
Date: Tue, 12 Nov 2013 13:37:00 -0000 [thread overview]
Message-ID: <528207A5.9070702@arm.com> (raw)
In-Reply-To: <000001cedf74$bd1bf710$3753e530$@arm.com>
On 12/11/13 06:59, Joey Ye wrote:
> For RTOS who need to relocate executable, PC relative and GOTOFF cannot be
> used as the offset between any sections won't be fixed. Only GOT can be
> used, just as VxWorks RTP does.
>
> This patch introduces a new option enable user to choose between fixed
> offset or not. Enabled for VxWorks RTP to keep its behavior unchanged.
>
> Tested with arm-none-eabi make and VxWorks RTP small case
>
> OK to trunk?
>
> ChangeLog:
> 2013-11-12 Joey Ye <joey.ye@arm.com>
>
> * config/arm/arm.c (arm_option_override): Error if
> -mpic-offset-unfixed without -fpic, and set for
> VxWorks RTP.
> (legitimize_pic_address): Use arm_pic_offset_unfixed.
> (arm_assemble_integer): Likewise.
> * config/arm/arm.h
> (TARGET_DEFAULT_PIC_OFFSET_UNFIXED): New macro.
> * config/arm/arm.opt (mpic-offset-unfixed): New option.
> * doc/invoke.texi (-mpic-offset-unfixed): Doc for new option.
>
>
The name of the option and the documentation highlights that the
option's concept is confusing.
I think what you really need to do is to reverse the sense of the option
name and have
-mpic-data-is-text-relative
with the inverse (-mno-pic-data-is-text-relative) being the active value
that triggers for vxworks. That is, PIC data being text-relative is the
default for all targets except vxworks.
R.
Oh, and at run time, we should be talking about segments, not sections!
next prev parent reply other threads:[~2013-11-12 10:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-12 10:12 Joey Ye
2013-11-12 13:37 ` Richard Earnshaw [this message]
2013-11-13 9:06 ` Joey Ye
2013-11-13 10:52 ` Richard Earnshaw
2013-11-13 11:16 ` Joey Ye
2013-11-13 11:46 ` Richard Earnshaw
2013-11-13 17:23 ` Joey Ye
2013-11-13 12:21 ` Richard Earnshaw
[not found] ` <45520D6299C11E4588128526465332BB3BDBAD147A@SAROVARA.Asiapac.Arm.com>
2013-11-13 18:00 ` Richard Earnshaw
2013-11-14 10:09 Joey Ye
2013-11-14 10:48 ` Richard Earnshaw
2013-11-14 12:53 ` Joey Ye
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=528207A5.9070702@arm.com \
--to=rearnsha@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=joey.ye@arm.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).