linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: Mark Salter <msalter@redhat.com>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	Aurelien Jacquiot <a-jacquiot@ti.com>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Guenter Roeck <linux@roeck-us.net>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: c6x linker issue on linux-next-20160808 + some linker table work
Date: Thu, 11 Aug 2016 17:59:26 +0200	[thread overview]
Message-ID: <20160811155926.GX3296@wotan.suse.de> (raw)
In-Reply-To: <1470915162.3551.107.camel@redhat.com>

On Thu, Aug 11, 2016 at 07:32:42AM -0400, Mark Salter wrote:
> On Thu, 2016-08-11 at 07:56 +0200, Luis R. Rodriguez wrote:
> > On Wed, Aug 10, 2016 at 07:04:09PM -0400, Mark Salter wrote:
> > > 
> > > On Wed, 2016-08-10 at 23:30 +0200, Luis R. Rodriguez wrote:
> > > > OK thanks I've found a clean solution minimal solution to this as follows. This now
> > > > builds fine. Is this a fine work around for now ?
> > > Almost. You also need:
> > > 
> > > diff --git a/include/linux/tables.h b/include/linux/tables.h
> > > index a39ab03..3fa8d4d 100644
> > > --- a/include/linux/tables.h
> > > +++ b/include/linux/tables.h
> > > @@ -325,7 +325,7 @@
> > >               __attribute__((used,                                      \
> > >                              weak,                                      \
> > >                              __aligned__(LINUX_SECTION_ALIGNMENT(name)),\
> > > -                            section(SECTION_TBL(SECTION_RODATA,        \
> > > +                            section(SECTION_TBL(SECTION_TBL_RO,        \
> > >                                                  name, level))))
> > >  
> > >  /**
> > > 
> > > Otherwise, start and end RO table markers end up in different sections.
> > I thought that was not needed as weak attributes already force it to go to
> > .const ? Anyway I've added this as well. Thanks!
> 
> The section attribute forced both variables into .rodata but the weak
> attribute prevented accesses from using the SB-relative reloc. The
> non-weak variable is the one that led to the link error.

I ask as set_section_tbl_type() was not patched for instance, so firmware/Makefile
still uses SECTION_RODATA, and it compiles and links fine. Should that also be
using then SECTION_TBL_RO ? Or do we only need this for the C constructors ?

  Luis

  reply	other threads:[~2016-08-11 15:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09  8:11 c6x linker issue on linux-next-20160808 + some linker table work Luis R. Rodriguez
2016-08-09 13:37 ` Guenter Roeck
2016-08-09 17:04   ` Mark Salter
2016-08-09 18:40     ` Luis R. Rodriguez
2016-08-09 18:45       ` Mark Salter
2016-08-09 18:45         ` Mark Salter
2016-08-10  1:50       ` Mark Salter
     [not found]         ` <CAB=NE6XbxvpdsXecPLbh9krsKRvwKcwEzcve4XorpPetU3Xk6Q@mail.gmail.com>
2016-08-10  3:04           ` Mark Salter
2016-08-10 21:30             ` Luis R. Rodriguez
2016-08-10 21:30               ` Luis R. Rodriguez
2016-08-10 23:04               ` Mark Salter
2016-08-11  5:56                 ` Luis R. Rodriguez
2016-08-11 11:32                   ` Mark Salter
2016-08-11 15:59                     ` Luis R. Rodriguez [this message]
2016-08-11 17:14                       ` Mark Salter
2016-08-11 17:14                         ` Mark Salter
2016-08-11 17:56                         ` Luis R. Rodriguez
2016-08-11 17:56                           ` Luis R. Rodriguez

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=20160811155926.GX3296@wotan.suse.de \
    --to=mcgrof@kernel.org \
    --cc=a-jacquiot@ti.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=msalter@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 NNTP newsgroup(s).