From: Stefan BrĂ¼ns Date: Sat, 14 Sep 2019 20:13:13 +0000 (+0200) Subject: Fix link errors when compiling with LTO enabled X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=02a8c07d89ae2c4643f2bcb78e8c13dd7437e2db;p=libsigrok.git Fix link errors when compiling with LTO enabled When libsigrok is compiled with link-time-optimization, the linker stumbles over the section named the same as the function. Whether this is a compiler/linker bug or a coding error is unknown. Renaming the special section (to the same as already used on OS X) avoids the problem. This fixes bug #1416. --- diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index a0f00b24..c57f2058 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -279,7 +279,7 @@ struct zip_stat; #ifdef __APPLE__ #define SR_DRIVER_LIST_SECTION "__DATA,__sr_driver_list" #else -#define SR_DRIVER_LIST_SECTION "sr_driver_list" +#define SR_DRIVER_LIST_SECTION "__sr_driver_list" #endif /**