public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* [PATCH][testsuite] Fix pr25109.sh on riscv64
@ 2021-02-26 10:14 Tom de Vries
  2021-02-26 10:28 ` Mark Wielaard
  0 siblings, 1 reply; 5+ messages in thread
From: Tom de Vries @ 2021-02-26 10:14 UTC (permalink / raw)
  To: dwz, jakub, mark

Hi,

On riscv64, I run into:
...
cc main.c no-multifile-prop-dw.S -o no-multifile-prop
no-multifile-prop-dw.S: Assembler messages:
no-multifile-prop-dw.S:25: Error: non-constant .uleb128 is not supported
make: *** [Makefile:99: no-multifile-prop] Error 1
...

Fix this by allowing to fail to build the test-case, and marking it as
unsupported.

Any comments?

Thanks,
- Tom

[testsuite] Fix pr25109.sh on riscv64

2021-02-26  Tom de Vries  <tdevries@suse.de>

	* Makefile (no-multifile-prop): Add target rule.
	* testsuite/dwz.tests/dwz-tests.exp: Require no-multifile-prop for
	pr25109.sh.

---
 Makefile                          | 6 +++++-
 testsuite/dwz.tests/dwz-tests.exp | 3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index d320266..7969490 100644
--- a/Makefile
+++ b/Makefile
@@ -95,9 +95,13 @@ $(TEMP_ASM_FILES): %-dw.S: $(TEST_SRC)/../lib/%.exp
 	  export DEJAGNU=$(DEJAGNU); \
 	  runtest --tool=dwz -srcdir $(srcdir)/testsuite/ lib/$*.exp
 
-$(TEST_EXECS_DWARF_ASM): %: %-dw.S
+$(filter-out no-multifile-prop, $(TEST_EXECS_DWARF_ASM)): %: %-dw.S
 	$(CC) $(TEST_SRC)/main.c $< -o $@
 
+# Fails to compile on riscv64: Error: non-constant .uleb128 is not supported.
+no-multifile-prop: %: %-dw.S
+	$(CC) $(TEST_SRC)/main.c $< -o $@ || true
+
 odr-struct:
 	$(CXX) $(TEST_SRC)/odr.cc $(TEST_SRC)/odr-2.cc -I$(TEST_SRC) -o $@ -g \
 	  -DKIND=struct
diff --git a/testsuite/dwz.tests/dwz-tests.exp b/testsuite/dwz.tests/dwz-tests.exp
index 48c0015..0ad77ea 100644
--- a/testsuite/dwz.tests/dwz-tests.exp
+++ b/testsuite/dwz.tests/dwz-tests.exp
@@ -86,6 +86,9 @@ foreach test $tests {
 	    continue
 	}
     }
+    if { $basename == "pr25109.sh" } {
+	lappend required_execs no-multifile-prop
+    }
 
     set unsupported 0
     foreach required_exec $required_execs {

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

* Re: [PATCH][testsuite] Fix pr25109.sh on riscv64
  2021-02-26 10:14 [PATCH][testsuite] Fix pr25109.sh on riscv64 Tom de Vries
@ 2021-02-26 10:28 ` Mark Wielaard
  2021-02-26 10:35   ` Jakub Jelinek
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Wielaard @ 2021-02-26 10:28 UTC (permalink / raw)
  To: Tom de Vries; +Cc: dwz, jakub

Hi Tom,

On Fri, Feb 26, 2021 at 11:14:23AM +0100, Tom de Vries wrote:
> On riscv64, I run into:
> ...
> cc main.c no-multifile-prop-dw.S -o no-multifile-prop
> no-multifile-prop-dw.S: Assembler messages:
> no-multifile-prop-dw.S:25: Error: non-constant .uleb128 is not supported
> make: *** [Makefile:99: no-multifile-prop] Error 1
> ...
> 
> Fix this by allowing to fail to build the test-case, and marking it as
> unsupported.
> 
> Any comments?

If it doesn't even build then there is not much else we can do than
skip it.  So I would push this.

But this is a little surprising.
The construct seems like it is represented by a known constant at compile time:

        .uleb128        .Lexpr_end4 - .Lexpr_start3/* expression */ 
.Lexpr_start3: 
        .byte        0xf2               /* DW_OP_GNU_implicit_pointer */ 
        .4byte        .Llabel2 
        .sleb128        0 
.Lexpr_end4: 

There isn't anything between the two labels that can have a variable
size.  So it might be a good idea to file a bug report against
binutils as for not allowing this on riscv64.

Cheers,

Mark

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

* Re: [PATCH][testsuite] Fix pr25109.sh on riscv64
  2021-02-26 10:28 ` Mark Wielaard
@ 2021-02-26 10:35   ` Jakub Jelinek
  2021-02-26 11:59     ` Tom de Vries
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Jelinek @ 2021-02-26 10:35 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: Tom de Vries, dwz

On Fri, Feb 26, 2021 at 11:28:31AM +0100, Mark Wielaard wrote:
> On Fri, Feb 26, 2021 at 11:14:23AM +0100, Tom de Vries wrote:
> > On riscv64, I run into:
> > ...
> > cc main.c no-multifile-prop-dw.S -o no-multifile-prop
> > no-multifile-prop-dw.S: Assembler messages:
> > no-multifile-prop-dw.S:25: Error: non-constant .uleb128 is not supported
> > make: *** [Makefile:99: no-multifile-prop] Error 1
> > ...
> > 
> > Fix this by allowing to fail to build the test-case, and marking it as
> > unsupported.
> > 
> > Any comments?
> 
> If it doesn't even build then there is not much else we can do than
> skip it.  So I would push this.
> 
> But this is a little surprising.
> The construct seems like it is represented by a known constant at compile time:
> 
>         .uleb128        .Lexpr_end4 - .Lexpr_start3/* expression */ 
> .Lexpr_start3: 
>         .byte        0xf2               /* DW_OP_GNU_implicit_pointer */ 
>         .4byte        .Llabel2 
>         .sleb128        0 
> .Lexpr_end4: 
> 
> There isn't anything between the two labels that can have a variable
> size.  So it might be a good idea to file a bug report against
> binutils as for not allowing this on riscv64.

I believe the riscv people explain it by aggressive linker optimizations
that make those not to work, but perhaps that applies to normal sections,
but don't see how can that apply to .debug* sections...
They shouldn't be doing any kind of aggressive linker relaxations on
.debug*.

	Jakub


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

* Re: [PATCH][testsuite] Fix pr25109.sh on riscv64
  2021-02-26 10:35   ` Jakub Jelinek
@ 2021-02-26 11:59     ` Tom de Vries
  2021-02-26 12:00       ` Jakub Jelinek
  0 siblings, 1 reply; 5+ messages in thread
From: Tom de Vries @ 2021-02-26 11:59 UTC (permalink / raw)
  To: Jakub Jelinek, Mark Wielaard; +Cc: dwz

On 2/26/21 11:35 AM, Jakub Jelinek wrote:
> On Fri, Feb 26, 2021 at 11:28:31AM +0100, Mark Wielaard wrote:
>> On Fri, Feb 26, 2021 at 11:14:23AM +0100, Tom de Vries wrote:
>>> On riscv64, I run into:
>>> ...
>>> cc main.c no-multifile-prop-dw.S -o no-multifile-prop
>>> no-multifile-prop-dw.S: Assembler messages:
>>> no-multifile-prop-dw.S:25: Error: non-constant .uleb128 is not supported
>>> make: *** [Makefile:99: no-multifile-prop] Error 1
>>> ...
>>>
>>> Fix this by allowing to fail to build the test-case, and marking it as
>>> unsupported.
>>>
>>> Any comments?
>>
>> If it doesn't even build then there is not much else we can do than
>> skip it.  So I would push this.
>>
>> But this is a little surprising.
>> The construct seems like it is represented by a known constant at compile time:
>>
>>         .uleb128        .Lexpr_end4 - .Lexpr_start3/* expression */ 
>> .Lexpr_start3: 
>>         .byte        0xf2               /* DW_OP_GNU_implicit_pointer */ 
>>         .4byte        .Llabel2 
>>         .sleb128        0 
>> .Lexpr_end4: 
>>
>> There isn't anything between the two labels that can have a variable
>> size.  So it might be a good idea to file a bug report against
>> binutils as for not allowing this on riscv64.
> 
> I believe the riscv people explain it by aggressive linker optimizations
> that make those not to work, but perhaps that applies to normal sections,
> but don't see how can that apply to .debug* sections...
> They shouldn't be doing any kind of aggressive linker relaxations on
> .debug*.
> 

I found an existing PR:
https://sourceware.org/bugzilla/show_bug.cgi?id=27215 .

Thanks,
- Tom

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

* Re: [PATCH][testsuite] Fix pr25109.sh on riscv64
  2021-02-26 11:59     ` Tom de Vries
@ 2021-02-26 12:00       ` Jakub Jelinek
  0 siblings, 0 replies; 5+ messages in thread
From: Jakub Jelinek @ 2021-02-26 12:00 UTC (permalink / raw)
  To: Tom de Vries; +Cc: Mark Wielaard, dwz

On Fri, Feb 26, 2021 at 12:59:11PM +0100, Tom de Vries wrote:
> I found an existing PR:
> https://sourceware.org/bugzilla/show_bug.cgi?id=27215 .

And https://gcc.gnu.org/PR99090

	Jakub


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

end of thread, other threads:[~2021-02-26 12:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 10:14 [PATCH][testsuite] Fix pr25109.sh on riscv64 Tom de Vries
2021-02-26 10:28 ` Mark Wielaard
2021-02-26 10:35   ` Jakub Jelinek
2021-02-26 11:59     ` Tom de Vries
2021-02-26 12:00       ` Jakub Jelinek

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).