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.
This commit is contained in:
Stefan Brüns 2019-09-14 22:13:13 +02:00 committed by Uwe Hermann
parent 2da97803e6
commit 02a8c07d89
1 changed files with 1 additions and 1 deletions

View File

@ -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
/**