On 20/10/2022 03:48, Alan Cudmore wrote:
On Wed, Oct 19, 2022 at 12:24 AM Sebastian Huber
<sebastian.hu...@embedded-brains.de> wrote:
On 18/10/2022 21:02, Alan Cudmore wrote:
*From: *Sebastian Huber <mailto:sebastian.hu...@embedded-brains.de>
*Sent: *Tuesday, October 18, 2022 11:15 AM
*To: *Alan Cudmore <mailto:alan.cudm...@gmail.com>; j...@rtems.org
<mailto:j...@rtems.org>
*Cc: *rtems-de...@rtems.org <mailto:devel@rtems.org>
*Subject: *Re: Ping on ticket 4728 + patch
On 18/10/2022 16:36, Alan Cudmore wrote:
> On Tue, Oct 18, 2022 at 9:55 AM Joel Sherrill<j...@rtems.org> wrote:
>>
>>
>> On Tue, Oct 18, 2022 at 8:44 AM Alan
Cudmore<alan.cudm...@gmail.com> wrote:
>>> The log does have the error, and I get it when building by hand too:
>>> start.o: in function `.L0 ':
>>>
/home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5c):
>>> relocation truncated to fit: R_RISCV_GPREL_I against symbol
>>> `bsp_section_bss_size' defined in*ABS* section in
>>>
/home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
>>> collect2: error: ld returned 1 exit status
>>
>>
>> Hmmm.. that's weird. You should never get a truncation error linking
minimum.exe.
>> It should always fit within the BSP's memory and not have any issues
with branches
>> or calls needing fixup.
>>
>> Unless the wrong type of branch/jump/call instruction is used at
start.S:86, I have
>> no idea.If it's a form that assumes a short distance to the
destination but is going
>> to a symbol outside start.S and thus could be further.
> Also, 6 of the samples such as hello.exe link without error.
> The rv32imafdc BSP variant does not have CPU_CFLAGS.
> rv32imafd links fine and has specific CPU_CFLAGS, rv32imafdc does not
> have the flags.
> (I'll research the gcc defaults and architecture differences next..)
>
> I get a similar error on the frdme310arty BSP but only on a specific
> POSIX testsuite executable:
>
> start.o: in function `.L0 ':
>
>
/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x28):
> relocation truncated to fit: R_RISCV_GPREL_I against symbol
> `bsp_section_bss_size' defined in*ABS* section in
>
/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe
>
> collect2: error: ld returned 1 exit status
My off hand guess is that this is a tool chain issue on certain host
systems. For example, I never got this error on our OpenSUSE machines.
I can set up a OpenSUSE virtual machine and try it. I noticed the RSB
documentation does not have a set of packages for OpenSUSE – I could
send a docs patch after a successful build. What release do you use? Do
you have a list of packages to install?
We use openSUSE Leap 15.3 and 15.4. To get the packages maybe try this:
zypper in -t pattern devel_C_C++ devel_python3
I was able to set up an openSUSE Leap 15.4 (64 bit) VM and the above
packages worked for the RSB build.
Unfortunately, I still get the same link error for minimum.exe. Do you
think this is a linker error? Is it worth trying a Clang build?
I am not really sure what it its, since I never got this error on one of
our machines.
What happens if you compile the attached files with:
riscv-rtems6-gcc start.S abs.S -Wl,-gc-sections
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
.globl a
.globl b
.globl c
.globl d
.set a, 0x00000001
.set b, 0x40000001
.set c, 0x80000001
.set d, 0xf0000001
.globl _start
_start:
la t0, a
la t0, b
la t0, c
la t0, d
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel