[PATCH] ldso/ARC: fix DT_RELACOUNT handling

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] ldso/ARC: fix DT_RELACOUNT handling

Vineet Gupta-5
From: Cupertino Miranda <[hidden email]>

Wih new bintuils supporting DT_RELACOUNT, ldso was crashing as it was
parsing relocs incorrectly.

Apparently that code ran for first time and was never tested.

Signed-off-by: Vineet Gupta <[hidden email]>
---
 ldso/ldso/arc/dl-sysdep.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ldso/ldso/arc/dl-sysdep.h b/ldso/ldso/arc/dl-sysdep.h
index b6bda9d14691..caece997d254 100644
--- a/ldso/ldso/arc/dl-sysdep.h
+++ b/ldso/ldso/arc/dl-sysdep.h
@@ -166,7 +166,7 @@ static __always_inline void
 elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
       Elf32_Word relative_count)
 {
- Elf32_Rel * rpnt = (void *) rel_addr;
+ Elf32_Rela * rpnt = (void *) rel_addr;
  --rpnt;
  do {
  Elf32_Addr *const reloc_addr = (void *) (load_off + (++rpnt)->r_offset);
--
2.5.0

_______________________________________________
uClibc mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/uclibc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] ldso/ARC: fix DT_RELACOUNT handling

Khem Raj-3
On Thu, May 19, 2016 at 11:56 PM, Vineet Gupta
<[hidden email]> wrote:

> From: Cupertino Miranda <[hidden email]>
>
> Wih new bintuils supporting DT_RELACOUNT, ldso was crashing as it was
> parsing relocs incorrectly.
>
> Apparently that code ran for first time and was never tested.
>
> Signed-off-by: Vineet Gupta <[hidden email]>
> ---
>  ldso/ldso/arc/dl-sysdep.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ldso/ldso/arc/dl-sysdep.h b/ldso/ldso/arc/dl-sysdep.h
> index b6bda9d14691..caece997d254 100644
> --- a/ldso/ldso/arc/dl-sysdep.h
> +++ b/ldso/ldso/arc/dl-sysdep.h
> @@ -166,7 +166,7 @@ static __always_inline void
>  elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
>                       Elf32_Word relative_count)
>  {
> -        Elf32_Rel * rpnt = (void *) rel_addr;
> +        Elf32_Rela * rpnt = (void *) rel_addr;

This is ok

>         --rpnt;
>         do {
>                 Elf32_Addr *const reloc_addr = (void *) (load_off + (++rpnt)->r_offset);
> --
> 2.5.0
>
> _______________________________________________
> uClibc mailing list
> [hidden email]
> http://lists.busybox.net/mailman/listinfo/uclibc
_______________________________________________
uClibc mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/uclibc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] ldso/ARC: fix DT_RELACOUNT handling

Vineet Gupta-5
On Friday 20 May 2016 12:57 PM, Khem Raj wrote:

> On Thu, May 19, 2016 at 11:56 PM, Vineet Gupta
> <[hidden email]> wrote:
>> From: Cupertino Miranda <[hidden email]>
>>
>> Wih new bintuils supporting DT_RELACOUNT, ldso was crashing as it was
>> parsing relocs incorrectly.
>>
>> Apparently that code ran for first time and was never tested.
>>
>> Signed-off-by: Vineet Gupta <[hidden email]>
>> ---
>>  ldso/ldso/arc/dl-sysdep.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/ldso/ldso/arc/dl-sysdep.h b/ldso/ldso/arc/dl-sysdep.h
>> index b6bda9d14691..caece997d254 100644
>> --- a/ldso/ldso/arc/dl-sysdep.h
>> +++ b/ldso/ldso/arc/dl-sysdep.h
>> @@ -166,7 +166,7 @@ static __always_inline void
>>  elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
>>                       Elf32_Word relative_count)
>>  {
>> -        Elf32_Rel * rpnt = (void *) rel_addr;
>> +        Elf32_Rela * rpnt = (void *) rel_addr;
> This is ok

Is this is question - ARC is a rela ABI and this fell thru cracks as it was not
being exercised at all due to lack of DT_RELACOUNT support in binutils so far.

>
>>         --rpnt;
>>         do {
>>                 Elf32_Addr *const reloc_addr = (void *) (load_off + (++rpnt)->r_offset);
>> --
>> 2.5.0
>>
>> _______________________________________________
>> uClibc mailing list
>> [hidden email]
>> http://lists.busybox.net/mailman/listinfo/uclibc

_______________________________________________
uClibc mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/uclibc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] ldso/ARC: fix DT_RELACOUNT handling

Khem Raj-3
On Fri, May 20, 2016 at 1:26 AM, Vineet Gupta
<[hidden email]> wrote:
>> This is ok
>
> Is this is question

no, its a comment. I know its a rela ABI
_______________________________________________
uClibc mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/uclibc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [uclibc-ng-devel] [PATCH] ldso/ARC: fix DT_RELACOUNT handling

Waldemar Brodkorb
In reply to this post by Vineet Gupta-5
Hi,
Vineet Gupta wrote,

> From: Cupertino Miranda <[hidden email]>
>
> Wih new bintuils supporting DT_RELACOUNT, ldso was crashing as it was
> parsing relocs incorrectly.
>
> Apparently that code ran for first time and was never tested.
>
> Signed-off-by: Vineet Gupta <[hidden email]>

Applied and pushed,

But the testsuite results are still not pretty.
ARM and Xtensa are down to zero failures.
ARC has between 28-30 failures even with latest binutils/gcc
release. Anyone from you can take a look?

For example:
http://tests.embedded-test.org/uClibc-ng/1.0.14/REPORT.arcv2.nsim.libc.uClibc-ng-1.0.14

 Thanks
  Waldemar
_______________________________________________
uClibc mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/uclibc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [uclibc-ng-devel] [PATCH] ldso/ARC: fix DT_RELACOUNT handling

Vineet Gupta-5
On Sunday 29 May 2016 01:30 AM, Waldemar Brodkorb wrote:
> ARC has between 28-30 failures even with latest binutils/gcc

Latest here is pretty overloaded :-) We had 2016.03 release recently and then
there's bleeding edge binutils atleast which is tracking pretty close to upstream
binutils.

What exact versions of these tools are you using.

Thx,
-Vineet
_______________________________________________
uClibc mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/uclibc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [uclibc-ng-devel] [PATCH] ldso/ARC: fix DT_RELACOUNT handling

Waldemar Brodkorb
Hi Vineet,
Vineet Gupta wrote,

> On Sunday 29 May 2016 01:30 AM, Waldemar Brodkorb wrote:
> > ARC has between 28-30 failures even with latest binutils/gcc
>
> Latest here is pretty overloaded :-) We had 2016.03 release recently and then
> there's bleeding edge binutils atleast which is tracking pretty close to upstream
> binutils.
>
> What exact versions of these tools are you using.

I am using 2016.03. I wanted to say latest release :=)

The 1.0.15 testrun is not yet finished, but I think it is
simply reproducable by running nsim and uclibcng-testrunner.sh.

best regards
 Waldemar
_______________________________________________
uClibc mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/uclibc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [uclibc-ng-devel] [PATCH] ldso/ARC: fix DT_RELACOUNT handling

Waldemar Brodkorb
Hi,
Waldemar Brodkorb wrote,

> Hi Vineet,
> Vineet Gupta wrote,
>
> > On Sunday 29 May 2016 01:30 AM, Waldemar Brodkorb wrote:
> > > ARC has between 28-30 failures even with latest binutils/gcc
> >
> > Latest here is pretty overloaded :-) We had 2016.03 release recently and then
> > there's bleeding edge binutils atleast which is tracking pretty close to upstream
> > binutils.
> >
> > What exact versions of these tools are you using.
>
> I am using 2016.03. I wanted to say latest release :=)
>
> The 1.0.15 testrun is not yet finished, but I think it is
> simply reproducable by running nsim and uclibcng-testrunner.sh.

Nsim is nice to script, but the performance
is pretty bad. Running the testsuite takes for the four combinations
(arc700,archs,little and big mode) mostly the same time as
running all the other tests in Qemu :)
1 CORE 100 % CPU...

Would be NSIM Pro faster?

best regards
 Waldemar
_______________________________________________
uClibc mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/uclibc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [uclibc-ng-devel] [PATCH] ldso/ARC: fix DT_RELACOUNT handling

Waldemar Brodkorb
Hi,
Waldemar Brodkorb wrote,

> Hi,
> Waldemar Brodkorb wrote,
>
> > Hi Vineet,
> > Vineet Gupta wrote,
> >
> > > On Sunday 29 May 2016 01:30 AM, Waldemar Brodkorb wrote:
> > > > ARC has between 28-30 failures even with latest binutils/gcc
> > >
> > > Latest here is pretty overloaded :-) We had 2016.03 release recently and then
> > > there's bleeding edge binutils atleast which is tracking pretty close to upstream
> > > binutils.
> > >
> > > What exact versions of these tools are you using.
> >
> > I am using 2016.03. I wanted to say latest release :=)
> >
> > The 1.0.15 testrun is not yet finished, but I think it is
> > simply reproducable by running nsim and uclibcng-testrunner.sh.
>
> Nsim is nice to script, but the performance
> is pretty bad. Running the testsuite takes for the four combinations
> (arc700,archs,little and big mode) mostly the same time as
> running all the other tests in Qemu :)
> 1 CORE 100 % CPU...
>
> Would be NSIM Pro faster?

Here are the 1.0.15 results:
http://tests.embedded-test.org/uClibc-ng/1.0.15/

best regards
 Waldemar
_______________________________________________
uClibc mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/uclibc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [uclibc-ng-devel] [PATCH] ldso/ARC: fix DT_RELACOUNT handling

Alexey Brodkin
Hi Waldemar,

On Tue, 2016-05-31 at 06:15 +-0200, Waldemar Brodkorb wrote:

> Hi,
> Waldemar Brodkorb wrote,
>
> >
> > Hi,
> > Waldemar Brodkorb wrote,
> >
> > >
> > > Hi Vineet,
> > > Vineet Gupta wrote,
> > >
> > > >
> > > > On Sunday 29 May 2016 01:30 AM, Waldemar Brodkorb wrote:
> > > > >
> > > > > ARC has between 28-30 failures even with latest binutils/gcc
> > > > Latest here is pretty overloaded :-) We had 2016.03 release recently and then
> > > > there's bleeding edge binutils atleast which is tracking pretty close to upstream
> > > > binutils.
> > > >
> > > > What exact versions of these tools are you using.
> > > I am using 2016.03. I wanted to say latest release :=)
> > >
> > > The 1.0.15 testrun is not yet finished, but I think it is
> > > simply reproducable by running nsim and uclibcng-testrunner.sh.
> > Nsim is nice to script, but the performance
> > is pretty bad. Running the testsuite takes for the four combinations
> > (arc700,archs,little and big mode) mostly the same time as+AKA
> > running all the other tests in Qemu :)
> > 1 CORE 100 % CPU...
> >
> > Would be NSIM Pro faster?
> Here are the 1.0.15 results:
> http://tests.embedded-test.org/uClibc-ng/1.0.15/

Thank you so much for doing that, appreciate it a lot!

I'm wondering if there's a reason why did you use Linux 4.4
instead of latest (4.6)? Since we push all out stuff upstream
chances are some failures won't happen with more recent kernel.

Also from the logs it's not clear what tools were used?
Was it latest stable arc-2016.03, previous arc-2015.12?
I'd like to have this information to narrow down investigation of
failure reasons.

-Alexey
_______________________________________________
uClibc mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/uclibc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [uclibc-ng-devel] [PATCH] ldso/ARC: fix DT_RELACOUNT handling

Waldemar Brodkorb
Hi Alexey,
Alexey Brodkin wrote,

> Hi Waldemar,
>
> On Tue, 2016-05-31 at 06:15 +0200, Waldemar Brodkorb wrote:
> > Hi,
> > Waldemar Brodkorb wrote,
> >
> > >
> > > Hi,
> > > Waldemar Brodkorb wrote,
> > >
> > > >
> > > > Hi Vineet,
> > > > Vineet Gupta wrote,
> > > >
> > > > >
> > > > > On Sunday 29 May 2016 01:30 AM, Waldemar Brodkorb wrote:
> > > > > >
> > > > > > ARC has between 28-30 failures even with latest binutils/gcc
> > > > > Latest here is pretty overloaded :-) We had 2016.03 release recently and then
> > > > > there's bleeding edge binutils atleast which is tracking pretty close to upstream
> > > > > binutils.
> > > > >
> > > > > What exact versions of these tools are you using.
> > > > I am using 2016.03. I wanted to say latest release :=)
> > > >
> > > > The 1.0.15 testrun is not yet finished, but I think it is
> > > > simply reproducable by running nsim and uclibcng-testrunner.sh.
> > > Nsim is nice to script, but the performance
> > > is pretty bad. Running the testsuite takes for the four combinations
> > > (arc700,archs,little and big mode) mostly the same time asĀ 
> > > running all the other tests in Qemu :)
> > > 1 CORE 100 % CPU...
> > >
> > > Would be NSIM Pro faster?
> > Here are the 1.0.15 results:
> > http://tests.embedded-test.org/uClibc-ng/1.0.15/
>
> Thank you so much for doing that, appreciate it a lot!
>
> I'm wondering if there's a reason why did you use Linux 4.4
> instead of latest (4.6)? Since we push all out stuff upstream
> chances are some failures won't happen with more recent kernel.

Normally I try to run with latest LTS kernel for the testing.
I updated ARC tests to use 4.6. (one failure disappeared)
 
> Also from the logs it's not clear what tools were used?
> Was it latest stable arc-2016.03, previous arc-2015.12?
> I'd like to have this information to narrow down investigation of
> failure reasons.

arc-2016.03 is used here. I will add some information about
OpenADK git version used and GCC/Binutils used for running the stuff
in the future.

best regards
 Waldemar
_______________________________________________
uClibc mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/uclibc
Loading...