Skip to content

Known Issues: GNU Toolchain for DWC ARC Processors v4.8 R1

Francois Bedard edited this page Sep 17, 2013 · 1 revision

9000639612: GCC with option -gdwarf-2 still generates some info in DWARF-4

Description:

GCC 4.8 now generates debug information in DWARF-4 format by default. Use of option -gdwarf-2 will force gcc to generate debug information in DWARF-2 format. This is required for example in order to debug gcc compiled code with the MetaWare debugger. In some case, ARC users may find some section are still in DW4 format and can not be interpreted by downstream tools like objdump.

Example:

$ arc-elf32-gcc -gdwarf-2 -mARC700 hello.c
$ arc-elf32-gcc --version
arc-elf32-gcc (ARCompact elf32 toolchain (built 20130620)) 4.8.0
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ arc-elf32-objdump -g -G a.out >/dev/null
arc-elf32-objdump: Warning: CU at offset 93 contains corrupt or unsupported version number: 4.
arc-elf32-objdump: Warning: CU at offset 985 contains corrupt or unsupported version number: 4.
....... Skipping similiar lines .......
arc-elf32-objdump: Warning: CU at offset ba12 contains corrupt or unsupported version number: 4.
arc-elf32-objdump: Warning: CU at offset c3ba contains corrupt or unsupported version number: 4.
arc-elf32-objdump: Warning: There are 16642 unused bytes at the end of section .debug_loc
arc-elf32-objdump: Error: No range lists in .debug_info section!

Workaround:

This problem only occurs after linking, and is seen when the library being linked in is built with 4.8 debug information(i.e. DWARF-4).

Users needing to work in a purely DWARF-2 environment need to build the library with DWARF-2 debug information as well. The build-all.sh argument --target-cflags can be used to achieve this.


ARS0102823: linker coalescing elf segments with -z max-page-size=16384

Description:

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).

Workaround:

The work-around is to use linker option -Wl,-z,max-page-size=16384


9000496174: Option -fno-omit-frame-pointer broken

Description:

Turning on the use of the frame pointer via the –fno-omit-frame-pointer option can result in crashes.

Workaround:

The work-around is to enable -fomit-frame-pointer.


9000579470: "target sim" command not working in some cases

Description:

“target sim” command fails with the following error message:

(gdb) target sim
Target byte order unspecified
unable to create simulator instance  

Workaround:

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.


9000599571: Getting SIG32 while remotely debugging apps with pthreads

Description:

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.

Workaround:

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    

9000628297: libgcc is linked even when -nostdlib is specified

Description:

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.

Workaround:

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.


9000629566: Unresolvable relocation in uClibc toolchain with option –fPIE

Description:

The –fPIE option is not yet supported in the uclibc port for ARC GNU and use of the option may result in seg faults.

Workaround:

Don’t use –fPIE.


Clone this wiki locally