dangerous relocation: l32r: literal target out of range (try using text-section-literals)

permal
Posts: 369
Joined: Sun May 14, 2017 5:36 pm

dangerous relocation: l32r: literal target out of range (try using text-section-literals)

Postby permal » Sun Aug 11, 2019 10:35 am

Hi,

Could someone with better knowledge of the Xtensa architecture/compiler please explain to me what this linker error means, and what to do about it?

So far I've tried adding combinations of "-mauto-litpools" and "-mtext-section-literals" to my library and app, but without effect like so;

Code: Select all

target_link_options(${PROJECT_NAME} PRIVATE "-mauto-litpools" "-mtext-section-literals")
. Below is the full error message.
[ 96%] Linking CXX executable ../g3
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/g3.dir/App.cpp.obj: in function `smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)':
/home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:137:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x6a): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x18)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:137:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x73): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x4)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:137:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x85): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x8)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:137:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x9f): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x1c)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:137:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0xc2): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x20)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:138:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0xd6): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0xc)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:148:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x143): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x24)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:148:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x14c): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x10)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:148:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x166): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x28)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:149:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x16c): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x2c)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:149:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x178): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x30)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:150:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x1a6): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x34)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:172:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x256): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x38)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:172:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x25f): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x4)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:172:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x271): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x14)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:172:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x28b): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x3c)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:172:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x2ae): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x40)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:177:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x303): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x44)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:137:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x32e): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x48)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:137:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x33e): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x4c)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:172:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x37a): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x50)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:154:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0x39e): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0x54)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/g3.dir/App.cpp.obj: in function `smooth::core::network::Socket<smooth::application::network::http::HTTPProtocol, smooth::application::network::http::HTTPPacket>::internal_start()':
/home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/Socket.h:416:(.text._ZN6smooth4core7network6SocketINS_11application7network4http12HTTPProtocolENS5_10HTTPPacketEE14internal_startEv[smooth::core::network::Socket<smooth::application::network::http::HTTPProtocol, smooth::application::network::http::HTTPPacket>::internal_start()]+0x55): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network6SocketINS_11application7network4http12HTTPProtocolENS5_10HTTPPacketEE14internal_startEv+0x4)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/Socket.h:418:(.text._ZN6smooth4core7network6SocketINS_11application7network4http12HTTPProtocolENS5_10HTTPPacketEE14internal_startEv[smooth::core::network::Socket<smooth::application::network::http::HTTPProtocol, smooth::application::network::http::HTTPPacket>::internal_start()]+0xb4): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network6SocketINS_11application7network4http12HTTPProtocolENS5_10HTTPPacketEE14internal_startEv+0x10)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/Socket.h:420:(.text._ZN6smooth4core7network6SocketINS_11application7network4http12HTTPProtocolENS5_10HTTPPacketEE14internal_startEv[smooth::core::network::Socket<smooth::application::network::http::HTTPProtocol, smooth::application::network::http::HTTPPacket>::internal_start()]+0xdd): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network6SocketINS_11application7network4http12HTTPProtocolENS5_10HTTPPacketEE14internal_startEv+0x8)
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/Socket.h:428:(.text._ZN6smooth4core7network6SocketINS_11application7network4http12HTTPProtocolENS5_10HTTPPacketEE14internal_startEv[smooth::core::network::Socket<smooth::application::network::http::HTTPProtocol, smooth::application::network::http::HTTPPacket>::internal_start()]+0x102): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network6SocketINS_11application7network4http12HTTPProtocolENS5_10HTTPPacketEE14internal_startEv+0xc)
collect2: error: ld returned 1 exit status
make[3]: *** [main/CMakeFiles/g3.dir/build.make:509: g3] Error 1
make[2]: *** [CMakeFiles/Makefile2:5195: main/CMakeFiles/g3.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:5207: main/CMakeFiles/g3.dir/rule] Error 2
make: *** [Makefile:1750: g3] Error 2

User avatar
rudi ;-)
Posts: 1367
Joined: Fri Nov 13, 2015 3:25 pm

Re: dangerous relocation: l32r: literal target out of range (try using text-section-literals)

Postby rudi ;-) » Sun Aug 11, 2019 11:28 am

permal wrote:
Sun Aug 11, 2019 10:35 am

.. to me what this linker error means, and what to do about it?
Hi


dangerous relocation: l32r: literal target out of range (try using text-section-literals)

helpfull S.406

..
L32R is a PC-relative 32-bit load from memory. It is typically used to load constant values into a register when the constant cannot be encoded in a MOVI instruction.

L32R forms a virtual address by adding the 16-bit one-extended constant value encoded in the instruction word shifted left by two to the address of the L32R plus three with the two least significant bits cleared. Therefore, the offset can always specify 32-bit aligned addresses from -262141 to -4 bytes from the address of the L32R instruction. 32 bits (four bytes) are read from the physical address. This data is then written to address register at.
..



-
- optimize code
- load code parts in IRAM
- ISR
- GPIO
..


also perhabs this helps you further better for understand

pps

pppps

last_but_not_least_pps

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Info:
on vacation ( 9 sep )
not daily online in the meantime

permal
Posts: 369
Joined: Sun May 14, 2017 5:36 pm

Re: dangerous relocation: l32r: literal target out of range (try using text-section-literals)

Postby permal » Sun Aug 11, 2019 1:52 pm

Thanks Rudi. I've read what you've linked and while it confirms my understanding of the problem, I'm still stumped as to do about it.

User avatar
rudi ;-)
Posts: 1367
Joined: Fri Nov 13, 2015 3:25 pm

Re: dangerous relocation: l32r: literal target out of range (try using text-section-literals)

Postby rudi ;-) » Sun Aug 11, 2019 2:36 pm

permal wrote:
Sun Aug 11, 2019 1:52 pm
Thanks Rudi. I've read what you've linked and while it confirms my understanding of the problem, I'm still stumped as to do about it.
hi

not sure this helps in yours exactly :
what happens if youd add -mlongcalls too?
have a try.
best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Info:
on vacation ( 9 sep )
not daily online in the meantime

permal
Posts: 369
Joined: Sun May 14, 2017 5:36 pm

Re: dangerous relocation: l32r: literal target out of range (try using text-section-literals)

Postby permal » Sun Aug 11, 2019 2:37 pm

rudi ;-) wrote:
Sun Aug 11, 2019 2:36 pm
what happens if youd add -mlongcalls too?
Yeah, I read about that one too and did try it, but nothing changed. I'm wondering if I'm not setting the linker options properly?

User avatar
rudi ;-)
Posts: 1367
Joined: Fri Nov 13, 2015 3:25 pm

Re: dangerous relocation: l32r: literal target out of range (try using text-section-literals)

Postby rudi ;-) » Sun Aug 11, 2019 2:44 pm

permal wrote:
Sun Aug 11, 2019 2:37 pm
rudi ;-) wrote:
Sun Aug 11, 2019 2:36 pm
what happens if youd add -mlongcalls too?
Yeah, I read about that one too and did try it, but nothing changed. I'm wondering if I'm not setting the linker options properly?
for a x reference was this still fixed ? / use you a fixed version?
do you run in single core or dual?
edit: append for further info
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Info:
on vacation ( 9 sep )
not daily online in the meantime

permal
Posts: 369
Joined: Sun May 14, 2017 5:36 pm

Re: dangerous relocation: l32r: literal target out of range (try using text-section-literals)

Postby permal » Sun Aug 11, 2019 2:51 pm

I don't see what it has to do with this issue, but there's a libc.a linked in this GH issue that seems to help with memory corruption.

User avatar
rudi ;-)
Posts: 1367
Joined: Fri Nov 13, 2015 3:25 pm

Re: dangerous relocation: l32r: literal target out of range (try using text-section-literals)

Postby rudi ;-) » Sun Aug 11, 2019 3:07 pm

permal wrote:
Sun Aug 11, 2019 2:51 pm
I don't see what it has to do with this issue, but there's a libc.a linked in this GH issue that seems to help with memory corruption.
which smooth repo you are using for server / socket ?
( * )
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Info:
on vacation ( 9 sep )
not daily online in the meantime

permal
Posts: 369
Joined: Sun May 14, 2017 5:36 pm

Re: dangerous relocation: l32r: literal target out of range (try using text-section-literals)

Postby permal » Sun Aug 11, 2019 3:11 pm

which smooth repo you are using for server / socket ?
Sorry, I don't understand the question.

User avatar
rudi ;-)
Posts: 1367
Joined: Fri Nov 13, 2015 3:25 pm

Re: dangerous relocation: l32r: literal target out of range (try using text-section-literals)

Postby rudi ;-) » Sun Aug 11, 2019 3:16 pm

permal wrote:
Sun Aug 11, 2019 3:11 pm
which smooth repo you are using for server / socket ?
Sorry, I don't understand the question.

Code: Select all

/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:138:(.text._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE[smooth::core::network::ServerSocket<smooth::application::network::http::HTTPServerClient, smooth::application::network::http::HTTPProtocol, smooth::application::network::http::regular::IRequestHandler>::accept_request(smooth::core::network::ISocketBackOff&)]+0xd6): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal._ZN6smooth4core7network12ServerSocketINS_11application7network4http16HTTPServerClientENS5_12HTTPProtocolENS5_7regular15IRequestHandlerEE14accept_requestERNS1_14ISocketBackOffE+0xc)

..
/home/permal/electronics/IO-Card-G3/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h:138:
..

IO-Card-G3

/software/externals/smooth/lib/smooth/include/smooth/core/network/ServerSocket.h

you are build for the IO-Card-G3 right? or use the Lib?

edit:
so my Q was which repo you use from this?
the origin, a fork, a custom ..

edit: :) you are the builder of this repo and use it in the compile right?
edit: sry did not see you are the owner :)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Info:
on vacation ( 9 sep )
not daily online in the meantime

Who is online

Users browsing this forum: No registered users and 27 guests