All pastes #768805 Raw Edit

Untitled

public diff v1 · immutable
·published 2007-11-10 21:57 UTC
rendered paste body
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.cindex 38a1f5e..b38bf42 100644--- a/tools/winegcc/winegcc.c+++ b/tools/winegcc/winegcc.c@@ -630,13 +630,16 @@ static void build(struct options* opts)     for ( j = 0 ; j < opts->linker_args->size ; j++ )          strarray_add(link_args, opts->linker_args->base[j]); -#ifdef __APPLE__     if (opts->image_base)     {+#ifdef __APPLE__         strarray_add(link_args, "-image_base");         strarray_add(link_args, opts->image_base);-    }+#else+        strarray_add(link_args, "-Wl,--section-start");+        strarray_add(link_args, strmake("-Wl,.hash=%s", opts->image_base)); #endif+    }      for ( j = 0; j < lib_dirs->size; j++ ) 	strarray_add(link_args, strmake("-L%s", lib_dirs->base[j]));@@ -667,22 +670,6 @@ static void build(struct options* opts)      spawn(opts->prefix, link_args, 0); -    /* set the base address */-    if (opts->image_base)-    {-        const char *prelink = PRELINK;-        if (prelink[0] && strcmp(prelink,"false"))-        {-            strarray *prelink_args = strarray_alloc();-            strarray_add(prelink_args, prelink);-            strarray_add(prelink_args, "--reloc-only");-            strarray_add(prelink_args, opts->image_base);-            strarray_add(prelink_args, strmake("%s.so", output_file));-            spawn(opts->prefix, prelink_args, 1);-            strarray_free(prelink_args);-        }-    }-     /* create the loader script */     if (generate_app_loader)     {