https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ramana at gcc dot gnu.org
--- Comment #9 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
(In reply to tomas_paukrt from comment #0)
> Created attachment 41591 [details]
> C source file
>
> If the attached C source file is cross-compiled using GCC 4.9.4 for AM335x
> CPU (BeagleBone) then segmentation fault occurs.
>
> Command line to compile: gcc -O2 -fPIC -march=armv7-a -mtune=cortex-a8
> -mfloat-abi=softfp -mfpu=vfpv3 -mtls-dialect=gnu crash.c
>
I'm not sure that you can expect executables created with -fPIC to work
properly with TLS .
What happens if you use -fPIE since that is designed to create executables that
are position independent and would do the right thing as far as various
initializations go ?
Or is this a crash you've observed in a shared library and has been reduced to
a testcase in this form ?
regards
Ramana