Need #if in the code for the halconfig tables
terrillmoore opened this issue · comments
Terry Moore commented
Some versions of GCC emit vtables for objects even if they're not used, even if the platform enables link-time garbage collection.
For example, when configured for an MCCI Catena 4610:
0800e9b8 V vtable for Arduino_LMIC::HalConfiguration_Catena4420_t
0800e9d4 V vtable for Arduino_LMIC::HalConfiguration_Catena4610_t
0800ea28 V vtable for Arduino_LMIC::HalConfiguration_heltec_lora32
0800ea44 V vtable for Arduino_LMIC::HalConfiguration_ttgo_lora32_v1
0800ea0c V vtable for Arduino_LMIC::HalConfiguration_FeatherM0LoRa_t
0800e9f0 V vtable for Arduino_LMIC::HalConfiguration_Feather32U4LoRa_t
The offending entries are never used. Luckily, it's easy to get rid of them, just add #ifdef
on the config variables in the .cpp file that provide the begin()
methods. A little ugly, but it works.