[PATCH] xtensa: Put U-Boot version string at correct place by linker script
Francesco Dolcini
francesco.dolcini at toradex.com
Thu Sep 16 22:23:37 CEST 2021
On Thu, Sep 16, 2021 at 04:13:31PM -0400, Tom Rini wrote:
> On Thu, Sep 16, 2021 at 09:50:35PM +0200, Francesco Dolcini wrote:
> > On Thu, Sep 16, 2021 at 03:42:20PM -0400, Tom Rini wrote:
> > > On Thu, Sep 16, 2021 at 09:38:19PM +0200, Francesco Dolcini wrote:
> > > > On Thu, Sep 16, 2021 at 01:30:21PM -0400, Tom Rini wrote:
> > > > > *(.literal .text) \
> > > > > + *(.literal .text_version_string) \
> > > >
> > > > Isn't ".litteral" a duplication? Even if I'm pretty sure it will not cause any difference
> > > > in the generated binary I would remove it.
> > >
> > > Honestly, I don't know xtensa. We also don't have qemu support for it
> > > currently, and I'm a bit worried in general about the state of the
> > > platform (it's on my TODO list to poke some people now). So, I hesitate
> > > to make any change that's not basically copy/paste of the existing
> > > lines.
> >
> > I have no experience on xtensa either, but this is just the section
> > name, and you are just telling to put ".literal" there 2 times.
>
> I don't know. Looking at the resulting linker script (and with your
> suggestion):
> .text (((0x00002000 - 0x00002000) + ((128 << 20))) - 0x00040000) : AT(((LOADADDR(.DoubleExceptionVector.text) + SIZEOF(.DoubleExceptionVector.text) + 4 -1)) & ~(4 -1)) { _text_start = ABSOLUTE(.); *(.literal .text) *(.text_version_string) *(.literal.* .text.* .stub) *(.gnu.warning .gnu.linkonce.literal.*) *(.gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
> *(.fini.literal) *(.fini) *(.gnu.version) _text_end = ABSOLUTE(.); }
>
> So there's "literal" scattered everywhere. If it doesn't matter, it
> reads more consistently to me to toss literal in one more time.
Heheh, ".literal" is present only once here, ".literal.*" is matching something
else, likewise all the others that are scathered all around. This looks fine to
me.
> But I emailed around and we'll see if xtensa stays around, it's also our
> oldest toolchain and virtually untouched since submission :(
My small comment is just about the linker script format, I guess some other
folk should be able to confirm what I wrote. Unfortunately it will not solve
the general problem with xtensa ...
Francesco
More information about the U-Boot
mailing list