You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wine/wine-relocate-base.patch

44 lines
1.3 KiB

10 years ago
--- a/configure.ac.orig 2015-08-13 14:05:20.603210791 -0500
+++ b/configure.ac 2015-08-14 09:20:46.380372331 -0500
@@ -1021,6 +1021,9 @@
*) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400" ;;
esac
])
+ WINE_TRY_CFLAGS([-Wl,-Ttext-segment=0x7bc00000],
+ [AC_DEFINE([HAVE_TTEXT_SEGMENT],[1],[Define if
+linker supports -Ttext-segment.])])
AC_PATH_PROG(PRELINK, prelink, false, [/sbin /usr/sbin $PATH])
if test "x$PRELINK" = xfalse
then
--- a/tools/winegcc/winegcc.c.orig 2015-08-14 09:26:57.802873676 -0500
+++ b/tools/winegcc/winegcc.c 2015-08-14 09:25:17.290194637 -0500
@@ -1134,6 +1134,12 @@
}
break;
default:
+#ifdef HAVE_TTEXT_SEGMENT
+ if (opts->image_base)
+ {
+ strarray_add(link_args, strmake("-Wl,-Ttext-segment=%s", opts->image_base));
+ }
+#endif
break;
}
@@ -1167,6 +1173,7 @@
spawn(opts->prefix, link_args, 0);
strarray_free (link_args);
+#ifndef HAVE_TTEXT_SEGMENT
/* set the base address */
if (opts->image_base && !opts->target)
{
@@ -1182,6 +1189,7 @@
strarray_free(prelink_args);
}
}
+#endif
/* create the loader script */
if (generate_app_loader)