On Mon, 16 Nov 2020 09:43:42 +0100
Fons Adriaensen <fons@email-addr-hidden> wrote:
> Hello all,
>
> I'm having a strange problem with G++...
>
> In one source file 'fb3data.cc', I define arrays like this:
>
> const float svcoeff44 [216] =
> {
> 1.631996e-03, 6.335480e-02, ...
> ...
> };
>
> (...)
> /usr/bin/ld: filtbank3.o: warning: relocation against `svcoeff88'
in
> read-only section `.text'
Hi,
I've already seen this strange behavior with gcc 9.x : symbols with
a const definition are by default not publicly visible. It works
if you explicitly add an "extern" in the definition:
extern const float svcoeff44 [216] = (...)
I am not sure whether it is a bug in gcc or a strict application of the
standard.
-a.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-dev
This archive was generated by hypermail 2.1.8 : Tue Nov 17 2020 - 04:15:02 EET