:: Re: [maemo-leste] [PATCH] Nokia RX-…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Pali Rohár
Fecha:  
A: Tom Rini
Cc: u-boot, maemo-leste
Asunto: Re: [maemo-leste] [PATCH] Nokia RX-51: Fix compilation with non-zero CONFIG_SYS_TEXT_BASE
On Monday 10 October 2022 12:21:56 Tom Rini wrote:
> On Mon, Oct 10, 2022 at 06:18:08PM +0200, Pali Rohár wrote:
> > On Monday 10 October 2022 09:54:02 Tom Rini wrote:
> > > On Sun, Oct 09, 2022 at 09:37:13PM +0200, Pali Rohár wrote:
> > >
> > > > For some unknown reason GNU assembler version 2.31.1 (arm-linux-gnueabi-as
> > > > from Debian Buster) cannot compile following code from located in file
> > > > board/nokia/rx51/lowlevel_init.S:
> > > >
> > > >   kernoffs:
> > > >     .word  KERNEL_OFFSET - (. - CONFIG_SYS_TEXT_BASE)

> > > >
> > > > when CONFIG_SYS_TEXT_BASE is set to 0x80008000. It throws strange compile
> > > > error which is even without line number:
> > > >
> > > >     AS      board/nokia/rx51/lowlevel_init.o
> > > >   {standard input}: Assembler messages:
> > > >   {standard input}: Error: attempt to get value of unresolved symbol `L0'
> > > >   make[2]: *** [scripts/Makefile.build:293: board/nokia/rx51/lowlevel_init.o] Error 1

> > > >
> > > > I have no idea about this error and my experiments showed that ARM GNU
> > > > assembler is happy with negation of that number. So changing code to:
> > > >
> > > >   kernoffs:
> > > >     .word  . - CONFIG_SYS_TEXT_BASE - KERNEL_OFFSET

> > > >
> > > > and then replacing mathematical addition by substraction of "kernoffs"
> > > > value (so calculation of address does not change) compiles assembler file
> > > > without any error now.
> > > >
> > > > There should be not any functional change.
> > > >
> > > > Signed-off-by: Pali Rohár <pali@???>
> > > > ---
> > > > Btw, is somebody understanding that compile error message? Is there (or
> > > > was there) some real issue in the code, so assembler refuse to compile
> > > > it? Or have I triggered bug in GNU assembler?
> > >
> > > I would suggest filing a bug with upstream GNU assembler and seeing what
> > > they say.
> >
> > And it is really a bug? Is not that issue in current code?
>
> I think filing an issue is the best way to find out if we were relying
> on something undocumented that worked or if it's a regression in the
> tooling.
>
> --
> Tom


Ok, I sent email to binutils and gcc mailing list about this issue:
https://sourceware.org/pipermail/binutils/2022-October/123472.html
https://gcc.gnu.org/pipermail/gcc/2022-October/239588.html