public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* 2.25 many new ld-elf testsuite failures on ia64
@ 2015-01-08  9:28 Jan Beulich
  2015-01-08 14:47 ` H.J. Lu
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2015-01-08  9:28 UTC (permalink / raw)
  To: binutils

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)

Running /usr/local/src/binutils-2.25/ld/testsuite/ld-elf/elf.exp ...
FAIL: ld-elf/pr16322

Running /usr/local/src/binutils-2.25/ld/testsuite/ld-elf/shared.exp ...
FAIL: Build rdynamic-1
FAIL: Build rdynamic-1
FAIL: Build dynamic-1
FAIL: Build dynamic-1
FAIL: Run with pr14862-1.c libpr14862.so

I have a fix for the ld-elf/pr16322 (to be submitted soon), looked
at the ld-elf/binutils.exp without seeing a solution, and didn't
spend time understanding the ld-elf/shared.exp yet.

Thoughts?

Jan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.25 many new ld-elf testsuite failures on ia64
  2015-01-08  9:28 2.25 many new ld-elf testsuite failures on ia64 Jan Beulich
@ 2015-01-08 14:47 ` H.J. Lu
  2015-01-08 22:44   ` Alan Modra
  0 siblings, 1 reply; 9+ messages in thread
From: H.J. Lu @ 2015-01-08 14:47 UTC (permalink / raw)
  To: Jan Beulich, Alan Modra; +Cc: Binutils

[-- Attachment #1: Type: text/plain, Size: 802 bytes --]

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.

[-- Attachment #2: relro.patch --]
[-- Type: text/x-patch, Size: 1520 bytes --]

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.25 many new ld-elf testsuite failures on ia64
  2015-01-08 14:47 ` H.J. Lu
@ 2015-01-08 22:44   ` Alan Modra
  2015-01-08 22:57     ` H.J. Lu
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Modra @ 2015-01-08 22:44 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Jan Beulich, Binutils

On Thu, Jan 08, 2015 at 06:47:31AM -0800, H.J. Lu wrote:
> 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

I'm curious as to why you think ia64 should not support -z relro?

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.25 many new ld-elf testsuite failures on ia64
  2015-01-08 22:44   ` Alan Modra
@ 2015-01-08 22:57     ` H.J. Lu
  2015-01-08 23:36       ` Jakub Jelinek
  0 siblings, 1 reply; 9+ messages in thread
From: H.J. Lu @ 2015-01-08 22:57 UTC (permalink / raw)
  To: Jan Beulich, Binutils, Jakub Jelinek

On Thu, Jan 8, 2015 at 2:43 PM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, Jan 08, 2015 at 06:47:31AM -0800, H.J. Lu wrote:
>> 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
>
> I'm curious as to why you think ia64 should not support -z relro?
>

It was started from:

https://www.sourceware.org/ml/binutils/2004-01/msg00070.html

Jakub, do you remember why it wasn't implemented for ia64?

Thanks.


-- 
H.J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.25 many new ld-elf testsuite failures on ia64
  2015-01-08 22:57     ` H.J. Lu
@ 2015-01-08 23:36       ` Jakub Jelinek
  2015-01-13 12:26         ` Alan Modra
  0 siblings, 1 reply; 9+ messages in thread
From: Jakub Jelinek @ 2015-01-08 23:36 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Jan Beulich, Binutils

On Thu, Jan 08, 2015 at 02:57:16PM -0800, H.J. Lu wrote:
> It was started from:
> 
> https://www.sourceware.org/ml/binutils/2004-01/msg00070.html
> 
> Jakub, do you remember why it wasn't implemented for ia64?

I don't remember, sorry.

	Jakub

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.25 many new ld-elf testsuite failures on ia64
  2015-01-08 23:36       ` Jakub Jelinek
@ 2015-01-13 12:26         ` Alan Modra
  2015-01-13 12:48           ` H.J. Lu
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Modra @ 2015-01-13 12:26 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: H.J. Lu, Jan Beulich, Binutils

On Fri, Jan 09, 2015 at 12:36:41AM +0100, Jakub Jelinek wrote:
> On Thu, Jan 08, 2015 at 02:57:16PM -0800, H.J. Lu wrote:
> > It was started from:
> > 
> > https://www.sourceware.org/ml/binutils/2004-01/msg00070.html
> > 
> > Jakub, do you remember why it wasn't implemented for ia64?
> 
> I don't remember, sorry.

Huh.  I took a look and found this thread
https://sourceware.org/ml/binutils/2003-05/msg00432.html
where I suggested disabling DATA_SEGMENT_ALIGN by not defining
COMMONPAGESIZE for ia64.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.25 many new ld-elf testsuite failures on ia64
  2015-01-13 12:26         ` Alan Modra
@ 2015-01-13 12:48           ` H.J. Lu
  2015-01-14  0:53             ` Alan Modra
  0 siblings, 1 reply; 9+ messages in thread
From: H.J. Lu @ 2015-01-13 12:48 UTC (permalink / raw)
  To: Jakub Jelinek, Jan Beulich, Binutils

On Tue, Jan 13, 2015 at 4:26 AM, Alan Modra <amodra@gmail.com> wrote:
> On Fri, Jan 09, 2015 at 12:36:41AM +0100, Jakub Jelinek wrote:
>> On Thu, Jan 08, 2015 at 02:57:16PM -0800, H.J. Lu wrote:
>> > It was started from:
>> >
>> > https://www.sourceware.org/ml/binutils/2004-01/msg00070.html
>> >
>> > Jakub, do you remember why it wasn't implemented for ia64?
>>
>> I don't remember, sorry.
>
> Huh.  I took a look and found this thread
> https://sourceware.org/ml/binutils/2003-05/msg00432.html
> where I suggested disabling DATA_SEGMENT_ALIGN by not defining
> COMMONPAGESIZE for ia64.
>

Thanks for digging it up.  Should we put it somewhere in elfxx-ia64.c?


-- 
H.J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.25 many new ld-elf testsuite failures on ia64
  2015-01-13 12:48           ` H.J. Lu
@ 2015-01-14  0:53             ` Alan Modra
  2015-01-14  1:04               ` H.J. Lu
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Modra @ 2015-01-14  0:53 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Jakub Jelinek, Jan Beulich, Binutils

On Tue, Jan 13, 2015 at 04:48:06AM -0800, H.J. Lu wrote:
> On Tue, Jan 13, 2015 at 4:26 AM, Alan Modra <amodra@gmail.com> wrote:
> > On Fri, Jan 09, 2015 at 12:36:41AM +0100, Jakub Jelinek wrote:
> >> On Thu, Jan 08, 2015 at 02:57:16PM -0800, H.J. Lu wrote:
> >> > It was started from:
> >> >
> >> > https://www.sourceware.org/ml/binutils/2004-01/msg00070.html
> >> >
> >> > Jakub, do you remember why it wasn't implemented for ia64?
> >>
> >> I don't remember, sorry.
> >
> > Huh.  I took a look and found this thread
> > https://sourceware.org/ml/binutils/2003-05/msg00432.html
> > where I suggested disabling DATA_SEGMENT_ALIGN by not defining
> > COMMONPAGESIZE for ia64.
> >
> 
> Thanks for digging it up.  Should we put it somewhere in elfxx-ia64.c?

The comment you put in ld/emulparams/elf64_ia64.sh should be enough.
More importantly, is the bug you found in the above thread still
present?  Commit e57278ef or some other patch might have cured it.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 2.25 many new ld-elf testsuite failures on ia64
  2015-01-14  0:53             ` Alan Modra
@ 2015-01-14  1:04               ` H.J. Lu
  0 siblings, 0 replies; 9+ messages in thread
From: H.J. Lu @ 2015-01-14  1:04 UTC (permalink / raw)
  To: Jakub Jelinek, Jan Beulich, Binutils

On Tue, Jan 13, 2015 at 4:53 PM, Alan Modra <amodra@gmail.com> wrote:
> On Tue, Jan 13, 2015 at 04:48:06AM -0800, H.J. Lu wrote:
>> On Tue, Jan 13, 2015 at 4:26 AM, Alan Modra <amodra@gmail.com> wrote:
>> > On Fri, Jan 09, 2015 at 12:36:41AM +0100, Jakub Jelinek wrote:
>> >> On Thu, Jan 08, 2015 at 02:57:16PM -0800, H.J. Lu wrote:
>> >> > It was started from:
>> >> >
>> >> > https://www.sourceware.org/ml/binutils/2004-01/msg00070.html
>> >> >
>> >> > Jakub, do you remember why it wasn't implemented for ia64?
>> >>
>> >> I don't remember, sorry.
>> >
>> > Huh.  I took a look and found this thread
>> > https://sourceware.org/ml/binutils/2003-05/msg00432.html
>> > where I suggested disabling DATA_SEGMENT_ALIGN by not defining
>> > COMMONPAGESIZE for ia64.
>> >
>>
>> Thanks for digging it up.  Should we put it somewhere in elfxx-ia64.c?
>
> The comment you put in ld/emulparams/elf64_ia64.sh should be enough.
> More importantly, is the bug you found in the above thread still
> present?  Commit e57278ef or some other patch might have cured it.
>

I don't know.  Someone can give it a try.

-- 
H.J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-01-14  1:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-08  9:28 2.25 many new ld-elf testsuite failures on ia64 Jan Beulich
2015-01-08 14:47 ` H.J. Lu
2015-01-08 22:44   ` Alan Modra
2015-01-08 22:57     ` H.J. Lu
2015-01-08 23:36       ` Jakub Jelinek
2015-01-13 12:26         ` Alan Modra
2015-01-13 12:48           ` H.J. Lu
2015-01-14  0:53             ` Alan Modra
2015-01-14  1:04               ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).