I think I solved the problem by getting gcc-4.8.4 and compiling the plugin with it. I also used the plugin includes from the gcc-6.3.0 version since it is the version of the cross-compiler I am using. Kind regards, Pedro 2017-03-19 14:34 GMT+00:00 Pedro Lopes <pedro.fraiao@xxxxxxxxx>: > Hello, > > I have the option of using the built gcc from Linaro to my target platform. > I want to use this because it is proven to be working and the > configuration is already performed with plugin support (Link to the > binaries: https://releases.linaro.org/components/toolchain/binaries/latest/arm-eabi/ > ) > > The problem I get is when I try to add my plugin using the -fplugin option. > Using gcc 6.3.0, compiled from source to compile my plugin, I get the > following undefined symbols when trying to load my plugin .so into the > gcc 6.3.1 binary: > > [plopes@lopes bin]$./arm-eabi-gcc -v > ... > GNU C++14 (Linaro GCC 6.3-2017.02) version 6.3.1 20170109 (arm-eabi) > compiled by GNU C version 4.8.4, GMP version 6.1.0, MPFR version > 3.1.4, MPC version 1.0.3, isl version none > GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 > [plopes@lopes bin]$ ./arm-eabi-gcc -S -fplugin=./structsizes.so > -fplugin-arg-structsizes-log=./log.txt test.cxx > cc1plus: error: cannot load plugin ./structsizes.so > ./structsizes.so: undefined symbol: _ZdlPvm > [plopes@lopes bin]$ c++filt _ZdlPvm > operator delete(void*, unsigned long) > > Do I need to use the same compiler version as the one used to compile > the cross-compiler (gcc-4.8.4) to compile my plugin? Does anyone have > any idea how I can solve this? > > Kind regards, > Pedro