#3936 closed defect (fixed)

C++ thread-local storage broken on sparc64

Reported by: Sebastian Huber Owned by: Gedare Bloom
Priority: normal Milestone: 5.1
Component: arch/sparc64 Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

gmake[5]: Entering directory '/build/git-build/b-niagara/sparc64-rtems5/c/niagara/testsuites/sptests'
sparc64-rtems5-g++  -mcpu=niagara -g -O2 -ffunction-sections -fdata-sections -Wall     -B./../../lib/libbsp/sparc64/niagara -B/home/EB/sebastian_h/git-rtems-5/bsps/sparc64/niagara/start -specs bsp_specs -qrtems -L./../../cpukit -L/home/EB/sebastian_h/git-rtems-5/bsps/sparc64/shared/start -Wl,--wrap=printf -Wl,--wrap=puts -Wl,--wrap=putchar -Wl,--gc-sections -o sptls02.exe sptls02/sptls02-init.o sptls02/sptls02-var.o ./../../lib/libbsp/sparc64/niagara/librtemsbsp.a ./../../cpukit/librtemscpu.a ./../../cpukit/librtemstest.a
/build/rtems/5/lib/gcc/sparc64-rtems5/7.5.0/../../../../sparc64-rtems5/bin/ld: warning: dot moved backwards before `.got'
/build/rtems/5/lib/gcc/sparc64-rtems5/7.5.0/../../../../sparc64-rtems5/bin/ld: warning: dot moved backwards before `.got'
/build/rtems/5/lib/gcc/sparc64-rtems5/7.5.0/../../../../sparc64-rtems5/bin/ld: section .got LMA [00000000000317c0,00000000000317c7] overlaps section .data LMA [0000000000031018,00000000000319d7]

One option is to disable this test on sparc64.

Change History (3)

comment:1 Changed on Apr 6, 2020 at 4:15:43 PM by Gedare Bloom

I'm going to take a brief look today. I haven't been using the sparc64 since 2012 so there is not much motive for me other than keeping it maintained. If it is too much trouble I will let it decay down the tiers toward deprecation.

comment:2 Changed on Apr 6, 2020 at 4:27:03 PM by Joel Sherrill

I was disappointed in general when I looked for ABI definitions for TLS for various architectures. I think there is an Ulrich Drepper document describing a few (https://akkadia.org/drepper/tls.pdf) but I think it is undefined for a lot of architectures.

Does GCC have a default mechanism? I couldn't find any hint of architecture specific TLS in the few secondary architectures I looked at. If there is a default way of calling a method for TLS info, it would be great. But at this point, I don't think TLS works from a GCC perspective on maybe half the architectures we support.

sparc64 isn't a secondary gcc architecture so I am sure it works in GCC. Whether we want it around long term is another question entirely.

comment:3 Changed on Apr 6, 2020 at 5:18:05 PM by Gedare Bloom <gedare@…>

Resolution: fixed
Status: assignedclosed

In 2db1fd85/rtems:

sparc64: update linkcmds with missing sections for TLS

Closes #3936.

Note: See TracTickets for help on using tickets.