mailing list of musl libc
 help / color / mirror / code / Atom feed
* musl s390x bug
@ 2017-02-04 23:32 Tuan M. Hoang
  2017-02-05  0:08 ` Shiz
  0 siblings, 1 reply; 5+ messages in thread
From: Tuan M. Hoang @ 2017-02-04 23:32 UTC (permalink / raw)
  To: musl

Hi,

There was a discussion on IRC few days ago about a musl s390x bug. This 
is the full log of the chat :
https://paste.debian.net/plain/912817

I applied fabled's patch :
http://sprunge.us/FVMA

and it worked.

Then I applied Shiz's patch to src/ldso/s390x/dlsym.s :
http://txt.shiz.me/M2Y5NGI3Ym

and I got a segfault when running gcc on Alpine s390x chroot (built 
using a cross-compiler).

I just want to report this bug so someone with more experience could 
take a good look in it and make a complete patch.

Thanks,
Tuan


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

* Re: musl s390x bug
  2017-02-04 23:32 musl s390x bug Tuan M. Hoang
@ 2017-02-05  0:08 ` Shiz
  2017-02-06  3:45   ` Bobby Bingham
  0 siblings, 1 reply; 5+ messages in thread
From: Shiz @ 2017-02-05  0:08 UTC (permalink / raw)
  To: musl


> Then I applied Shiz's patch to src/ldso/s390x/dlsym.s :
> http://txt.shiz.me/M2Y5NGI3Ym
> 
> and I got a segfault when running gcc on Alpine s390x chroot (built using a cross-compiler).

Note that I know absolutely nothing about S/390 assembly, and this was just an outline of
how such a file would look like from my very quick skimming of the S/390 ABI and assembly
manuals. :P Someone with more knowledge of S/390 stuff should take a proper look at it.

- Shiz

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

* Re: musl s390x bug
  2017-02-05  0:08 ` Shiz
@ 2017-02-06  3:45   ` Bobby Bingham
  2017-02-15 19:57     ` Rich Felker
  0 siblings, 1 reply; 5+ messages in thread
From: Bobby Bingham @ 2017-02-06  3:45 UTC (permalink / raw)
  To: musl

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

On Sun, Feb 05, 2017 at 01:08:36AM +0100, Shiz wrote:
>
> > Then I applied Shiz's patch to src/ldso/s390x/dlsym.s :
> > http://txt.shiz.me/M2Y5NGI3Ym
> >
> > and I got a segfault when running gcc on Alpine s390x chroot (built using a cross-compiler).
>
> Note that I know absolutely nothing about S/390 assembly, and this was just an outline of
> how such a file would look like from my very quick skimming of the S/390 ABI and assembly
> manuals. :P Someone with more knowledge of S/390 stuff should take a proper look at it.
>
> - Shiz

Can you try the attached patch?

[-- Attachment #2: dlsym.patch --]
[-- Type: text/plain, Size: 632 bytes --]

From c61422be9eb3b5a4867feca5b0caf0da9c1f1a98 Mon Sep 17 00:00:00 2001
From: Bobby Bingham <koorogi@koorogi.info>
Date: Sun, 5 Feb 2017 21:29:52 -0600
Subject: [PATCH] s390x: implement dlsym

This was missed when writing the port initially.
---
 src/ldso/s390x/dlsym.s | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 src/ldso/s390x/dlsym.s

diff --git a/src/ldso/s390x/dlsym.s b/src/ldso/s390x/dlsym.s
new file mode 100644
index 00000000..2e9fa8fb
--- /dev/null
+++ b/src/ldso/s390x/dlsym.s
@@ -0,0 +1,6 @@
+	.global dlsym
+	.hidden __dlsym
+	.type   dlsym,@function
+dlsym:
+	lgr %r4, %r14
+	jg __dlsym
-- 
2.11.0


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

* Re: musl s390x bug
  2017-02-06  3:45   ` Bobby Bingham
@ 2017-02-15 19:57     ` Rich Felker
  2017-02-15 21:14       ` Tuan M. Hoang
  0 siblings, 1 reply; 5+ messages in thread
From: Rich Felker @ 2017-02-15 19:57 UTC (permalink / raw)
  To: musl

On Sun, Feb 05, 2017 at 09:45:53PM -0600, Bobby Bingham wrote:
> On Sun, Feb 05, 2017 at 01:08:36AM +0100, Shiz wrote:
> >
> > > Then I applied Shiz's patch to src/ldso/s390x/dlsym.s :
> > > http://txt.shiz.me/M2Y5NGI3Ym
> > >
> > > and I got a segfault when running gcc on Alpine s390x chroot (built using a cross-compiler).
> >
> > Note that I know absolutely nothing about S/390 assembly, and this was just an outline of
> > how such a file would look like from my very quick skimming of the S/390 ABI and assembly
> > manuals. :P Someone with more knowledge of S/390 stuff should take a proper look at it.
> >
> > - Shiz
> 
> Can you try the attached patch?

> >From c61422be9eb3b5a4867feca5b0caf0da9c1f1a98 Mon Sep 17 00:00:00 2001
> From: Bobby Bingham <koorogi@koorogi.info>
> Date: Sun, 5 Feb 2017 21:29:52 -0600
> Subject: [PATCH] s390x: implement dlsym
> 
> This was missed when writing the port initially.
> ---
>  src/ldso/s390x/dlsym.s | 6 ++++++
>  1 file changed, 6 insertions(+)
>  create mode 100644 src/ldso/s390x/dlsym.s
> 
> diff --git a/src/ldso/s390x/dlsym.s b/src/ldso/s390x/dlsym.s
> new file mode 100644
> index 00000000..2e9fa8fb
> --- /dev/null
> +++ b/src/ldso/s390x/dlsym.s
> @@ -0,0 +1,6 @@
> +	.global dlsym
> +	.hidden __dlsym
> +	.type   dlsym,@function
> +dlsym:
> +	lgr %r4, %r14
> +	jg __dlsym
> -- 
> 2.11.0
> 

Can anyone confirm whether this works? If so I'll commit it.

Rich


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

* Re: musl s390x bug
  2017-02-15 19:57     ` Rich Felker
@ 2017-02-15 21:14       ` Tuan M. Hoang
  0 siblings, 0 replies; 5+ messages in thread
From: Tuan M. Hoang @ 2017-02-15 21:14 UTC (permalink / raw)
  To: musl

I applied both the patches from Bobby and fabled. Been testing for a 
while, no problem till now. And I was about to confirm it in a couple of 
days.

Thanks,

On 02/15/2017 02:57 PM, Rich Felker wrote:
> On Sun, Feb 05, 2017 at 09:45:53PM -0600, Bobby Bingham wrote:
>> On Sun, Feb 05, 2017 at 01:08:36AM +0100, Shiz wrote:
>>>
>>>> Then I applied Shiz's patch to src/ldso/s390x/dlsym.s :
>>>> http://txt.shiz.me/M2Y5NGI3Ym
>>>>
>>>> and I got a segfault when running gcc on Alpine s390x chroot (built using a cross-compiler).
>>>
>>> Note that I know absolutely nothing about S/390 assembly, and this was just an outline of
>>> how such a file would look like from my very quick skimming of the S/390 ABI and assembly
>>> manuals. :P Someone with more knowledge of S/390 stuff should take a proper look at it.
>>>
>>> - Shiz
>>
>> Can you try the attached patch?
>
>> >From c61422be9eb3b5a4867feca5b0caf0da9c1f1a98 Mon Sep 17 00:00:00 2001
>> From: Bobby Bingham <koorogi@koorogi.info>
>> Date: Sun, 5 Feb 2017 21:29:52 -0600
>> Subject: [PATCH] s390x: implement dlsym
>>
>> This was missed when writing the port initially.
>> ---
>>  src/ldso/s390x/dlsym.s | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>  create mode 100644 src/ldso/s390x/dlsym.s
>>
>> diff --git a/src/ldso/s390x/dlsym.s b/src/ldso/s390x/dlsym.s
>> new file mode 100644
>> index 00000000..2e9fa8fb
>> --- /dev/null
>> +++ b/src/ldso/s390x/dlsym.s
>> @@ -0,0 +1,6 @@
>> +	.global dlsym
>> +	.hidden __dlsym
>> +	.type   dlsym,@function
>> +dlsym:
>> +	lgr %r4, %r14
>> +	jg __dlsym
>> --
>> 2.11.0
>>
>
> Can anyone confirm whether this works? If so I'll commit it.
>
> Rich
>


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

end of thread, other threads:[~2017-02-15 21:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-04 23:32 musl s390x bug Tuan M. Hoang
2017-02-05  0:08 ` Shiz
2017-02-06  3:45   ` Bobby Bingham
2017-02-15 19:57     ` Rich Felker
2017-02-15 21:14       ` Tuan M. Hoang

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).