On 04/05/2014 05:04 PM, Thomas Schwinge wrote:
Is it a linker bug that I need to add something like the following?
--- libgcc/ompstuff.c
+++ libgcc/ompstuff.c
@@ -40,6 +40,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If
not, see
#include "libgcc_tm.h"
#if defined(HAVE_GAS_HIDDEN) && defined(ENABLE_OFFLOADING)
+# if 1
+/* TODO: Without the following, will get missing symbols for __start_* and
+ __stop_*. Linker bug? */
+static void *_funcs[0] __attribute__ ((section ("__gnu_offload_funcs"))) = { };
+static void *_vars[0] __attribute__ ((section ("__gnu_offload_vars"))) = { };
+# endif
Things seemed to work over here, but now I'm not certain whether the
__start_/__stop_ functionality is GNU ld specific? Maybe we should just
go back to the previous version of this patch which didn't try to use this.
Bernd