This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 2.25 many new ld-elf testsuite failures on ia64


On Thu, Jan 8, 2015 at 1:28 AM, Jan Beulich <JBeulich@suse.com> wrote:
> While 2.24 tested fine, plain 2.25 gives
>
> Running /usr/local/src/binutils-2.25/ld/testsuite/ld-elf/binutils.exp ...
> FAIL: strip -z relro (relro1)
> FAIL: strip -z relro -shared (relro1)
> FAIL: objcopy -z relro (relro1)
> FAIL: objcopy -z relro -shared (relro1)
> FAIL: objcopy -z relro (tdata1)
> FAIL: objcopy -shared -z relro (tdata1)
> FAIL: objcopy -z relro (tdata2)
> FAIL: objcopy -shared -z relro (tdata2)
> FAIL: objcopy -z relro (tdata3)
> FAIL: objcopy -shared -z relro (tdata3)
> FAIL: objcopy -shared -z relro (tbss1)
> FAIL: objcopy -shared -z relro (tbss2)
> FAIL: objcopy -shared -z relro (tbss3)

They are caused by

https://sourceware.org/ml/binutils/2011-07/msg00150.html

This patch fixes it.


-- 
H.J.
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 34a729e..dee3f2a 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -2327,10 +2327,18 @@ fragment <<EOF
 	link_info.combreloc = FALSE;
       else if (strcmp (optarg, "nocopyreloc") == 0)
 	link_info.nocopyreloc = TRUE;
+EOF
+
+  if test -n "$COMMONPAGESIZE"; then
+fragment <<EOF
       else if (strcmp (optarg, "relro") == 0)
 	link_info.relro = TRUE;
       else if (strcmp (optarg, "norelro") == 0)
 	link_info.relro = FALSE;
+EOF
+  fi
+
+fragment <<EOF
       else if (strcmp (optarg, "text") == 0)
 	link_info.error_textrel = TRUE;
       else if (strcmp (optarg, "notext") == 0)
@@ -2452,16 +2460,29 @@ fragment <<EOF
   -z noexecstack              Mark executable as not requiring executable stack\n"));
 EOF
 if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+  if test -n "$COMMONPAGESIZE"; then
 fragment <<EOF
   fprintf (file, _("\
   -z norelro                  Don't create RELRO program header\n"));
+EOF
+  fi
+
+fragment <<EOF
   fprintf (file, _("\
   -z now                      Mark object non-lazy runtime binding\n"));
   fprintf (file, _("\
   -z origin                   Mark object requiring immediate \$ORIGIN\n\
 				processing at runtime\n"));
+EOF
+
+  if test -n "$COMMONPAGESIZE"; then
+fragment <<EOF
   fprintf (file, _("\
   -z relro                    Create RELRO program header\n"));
+EOF
+  fi
+
+fragment <<EOF
   fprintf (file, _("\
   -z stacksize=SIZE           Set size of stack segment\n"));
 EOF

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]