-
Notifications
You must be signed in to change notification settings - Fork 48
Known issues: GNU Toolchain for DWC ARC processors v4.8 R3
If the toolchain is install deep into a directory structure causing the length of the path to the as binary to exceed 160 characters, the executable segfaults
Make sure the toolchain installation path is less than 160 characters long.
GCC's link time optimization feature in 4.8 has not yet been ported to ARC.
Do not compile with -flto options.
When debugging user space programs on Linux via GDB, users may notice GDB warning messages indicating "Could not load shared symbols for ." This warning happens when gdbserver is invoked with non-full path for the target binary, for example "gdbserver :10000 hello". Gdbserver works fine with this invocation and resolves the binary location using PATH however the GDB client emits the warning.
There are no negative effects from these messages and debugging works fine.
Start gdbserver with full path to target program, for example "gdbserver :10000 /usr/bin/hello".
The –fPIE
option is not yet supported in the uclibc port for ARC GNU and use of the option may result in seg faults.
Don’t use –fPIE
.
According to gcc.gnu.org/onlinedocs/gcc/Link-Options.html, -nostdlib
should not link libgcc but previous releases of ARC GNU toolchain linked libgcc regardless under this option. The ARC GNU toolchain supported option –reallynostdlib
for –nostdlib
behavior.
In ARC GNU 4.8 the –reallynostdlib
has been deprecated and the toolchain implements standard –nostdlib
behavior, meaning libgcc is not linked under –nostdlib
.
The GCC documentation explicitly mentions that users usually still need libgcc when wanting to avoid other standard libraries. The recommendation is for users to specify –lgcc
as well when specifying –nostdlib
to avoid any problems.
Under certain debugging conditions, the gdb client program can be halted due to signals (SIG32, SIG33) received from libpthreads that can’t be handled by gdb since libraries are stripped of symbols.
These signals are not harmful and may be ignored. Add the following commands to .gdbinit
file to ignore these signals:
handle SIG32 noprint nostop pass
handle SIG33 noprint nostop pass
“target sim” command fails with the following error message:
(gdb) target sim
Target byte order unspecified
unable to create simulator instance
Manual entry as shown below does not exhibit the problem:
(gdb) target sim
Connected to the simulator.
When the target sim
command is added in .gdbinit
file the error is seen when the .gdbinit
file is located in the user’s home folder (“~”).
If .gdbinit
is placed in the current folder as a workaround, the target sim
command works as expected.
Turning on the use of the frame pointer via the –fno-omit-frame-pointer
option can result in crashes.
The work-around is to enable -fomit-frame-pointer
.
Dynamically linked ARC Linux user applications may fail for kernels configured for a page size of 16K (default is 8K) Enabling 16k page size support in the ARC GNU toolchain requires the elf loadable segments (program segments) to be mapped at 16k boundary (the current alignment is 4k) which causes the kernel to fail when loading the main executable (in both static and dynamically linked scenarios).
The work-around is to use linker option -Wl,-z,max-page-size=16384