* [Qemu-devel] [PATCH] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
@ 2012-01-07 20:16 Aurelien Jarno
2012-01-07 20:36 ` Blue Swirl
0 siblings, 1 reply; 10+ messages in thread
From: Aurelien Jarno @ 2012-01-07 20:16 UTC (permalink / raw)
To: qemu-devel; +Cc: Aurelien Jarno
Fix .rel.plt sections in the output to not only include .rel.plt
sections from the input but also the .rel.iplt sections and to define
the hidden symbols __rel_iplt_start and __rel_iplt_end around
.rel.iplt as otherwise we get undefined references to these when
linking statically to a multiarch enabled libc (using STT_GNU_IFUNC).
Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
sparc.ld | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/sparc.ld b/sparc.ld
index 56efe34..e52c3d2 100644
--- a/sparc.ld
+++ b/sparc.ld
@@ -37,8 +37,20 @@ SECTIONS
.rela.fini : { *(.rela.fini) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
- .rel.plt : { *(.rel.plt) }
- .rela.plt : { *(.rela.plt) }
+ .rel.plt :
+ {
+ *(.rel.plt)
+ PROVIDE_HIDDEN (__rel_iplt_start = .);
+ *(.rel.iplt)
+ PROVIDE_HIDDEN (__rel_iplt_end = .);
+ }
+ .rela.plt :
+ {
+ *(.rela.plt)
+ PROVIDE_HIDDEN (__rela_iplt_start = .);
+ *(.rela.iplt)
+ PROVIDE_HIDDEN (__rela_iplt_end = .);
+ }
.init : { *(.init) } =0x47ff041f
.text :
{
--
1.7.7.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
2012-01-07 20:16 [Qemu-devel] [PATCH] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections Aurelien Jarno
@ 2012-01-07 20:36 ` Blue Swirl
2012-01-07 21:01 ` Aurelien Jarno
0 siblings, 1 reply; 10+ messages in thread
From: Blue Swirl @ 2012-01-07 20:36 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel
On Sat, Jan 7, 2012 at 20:16, Aurelien Jarno <aurelien@aurel32.net> wrote:
> Fix .rel.plt sections in the output to not only include .rel.plt
> sections from the input but also the .rel.iplt sections and to define
> the hidden symbols __rel_iplt_start and __rel_iplt_end around
> .rel.iplt as otherwise we get undefined references to these when
> linking statically to a multiarch enabled libc (using STT_GNU_IFUNC).
>
> Blue Swirl <blauwirbel@gmail.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> sparc.ld | 16 ++++++++++++++--
> 1 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/sparc.ld b/sparc.ld
> index 56efe34..e52c3d2 100644
> --- a/sparc.ld
> +++ b/sparc.ld
> @@ -37,8 +37,20 @@ SECTIONS
> .rela.fini : { *(.rela.fini) }
> .rel.bss : { *(.rel.bss) }
> .rela.bss : { *(.rela.bss) }
> - .rel.plt : { *(.rel.plt) }
> - .rela.plt : { *(.rela.plt) }
> + .rel.plt :
> + {
> + *(.rel.plt)
> + PROVIDE_HIDDEN (__rel_iplt_start = .);
> + *(.rel.iplt)
> + PROVIDE_HIDDEN (__rel_iplt_end = .);
> + }
> + .rela.plt :
> + {
> + *(.rela.plt)
> + PROVIDE_HIDDEN (__rela_iplt_start = .);
> + *(.rela.iplt)
> + PROVIDE_HIDDEN (__rela_iplt_end = .);
> + }
PROVIDE_HIDDEN etc. were removed by
8733f6093c2b77502e7228503fc22024e51599b8 in order to support BSDs with
older binutils (2.15). Maybe the ld scripts should be generated from a
source file for example with CPP, so these lines could be tweaked.
Doesn't guest base make the whole ld script thing useless? It's not
implemented for Sparc though.
> .init : { *(.init) } =0x47ff041f
> .text :
> {
> --
> 1.7.7.3
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
2012-01-07 20:36 ` Blue Swirl
@ 2012-01-07 21:01 ` Aurelien Jarno
2012-01-10 17:38 ` Aurelien Jarno
0 siblings, 1 reply; 10+ messages in thread
From: Aurelien Jarno @ 2012-01-07 21:01 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
On Sat, Jan 07, 2012 at 08:36:12PM +0000, Blue Swirl wrote:
> On Sat, Jan 7, 2012 at 20:16, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > Fix .rel.plt sections in the output to not only include .rel.plt
> > sections from the input but also the .rel.iplt sections and to define
> > the hidden symbols __rel_iplt_start and __rel_iplt_end around
> > .rel.iplt as otherwise we get undefined references to these when
> > linking statically to a multiarch enabled libc (using STT_GNU_IFUNC).
> >
> > Blue Swirl <blauwirbel@gmail.com>
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > ---
> > sparc.ld | 16 ++++++++++++++--
> > 1 files changed, 14 insertions(+), 2 deletions(-)
> >
> > diff --git a/sparc.ld b/sparc.ld
> > index 56efe34..e52c3d2 100644
> > --- a/sparc.ld
> > +++ b/sparc.ld
> > @@ -37,8 +37,20 @@ SECTIONS
> > .rela.fini : { *(.rela.fini) }
> > .rel.bss : { *(.rel.bss) }
> > .rela.bss : { *(.rela.bss) }
> > - .rel.plt : { *(.rel.plt) }
> > - .rela.plt : { *(.rela.plt) }
> > + .rel.plt :
> > + {
> > + *(.rel.plt)
> > + PROVIDE_HIDDEN (__rel_iplt_start = .);
> > + *(.rel.iplt)
> > + PROVIDE_HIDDEN (__rel_iplt_end = .);
> > + }
> > + .rela.plt :
> > + {
> > + *(.rela.plt)
> > + PROVIDE_HIDDEN (__rela_iplt_start = .);
> > + *(.rela.iplt)
> > + PROVIDE_HIDDEN (__rela_iplt_end = .);
> > + }
>
> PROVIDE_HIDDEN etc. were removed by
> 8733f6093c2b77502e7228503fc22024e51599b8 in order to support BSDs with
> older binutils (2.15). Maybe the ld scripts should be generated from a
> source file for example with CPP, so these lines could be tweaked.
>
It seems this patch was in my local tree for too long, and it seems I
should have updated it before sending it...
Other architectures are now using PROVIDE instead of PROVIDE_HIDDEN for
__rel{a,}_iplt_{start,end}, so I guess the same can be done for sparc and
ppc. I am going to do a test build to check that, and I'll come with a
new patch if it works.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
2012-01-07 21:01 ` Aurelien Jarno
@ 2012-01-10 17:38 ` Aurelien Jarno
2012-01-21 18:42 ` Blue Swirl
2013-04-06 6:08 ` [Qemu-devel] " Michael Tokarev
0 siblings, 2 replies; 10+ messages in thread
From: Aurelien Jarno @ 2012-01-10 17:38 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
On Sat, Jan 07, 2012 at 10:01:09PM +0100, Aurelien Jarno wrote:
> On Sat, Jan 07, 2012 at 08:36:12PM +0000, Blue Swirl wrote:
> > On Sat, Jan 7, 2012 at 20:16, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > > Fix .rel.plt sections in the output to not only include .rel.plt
> > > sections from the input but also the .rel.iplt sections and to define
> > > the hidden symbols __rel_iplt_start and __rel_iplt_end around
> > > .rel.iplt as otherwise we get undefined references to these when
> > > linking statically to a multiarch enabled libc (using STT_GNU_IFUNC).
> > >
> > > Blue Swirl <blauwirbel@gmail.com>
> > > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > > ---
> > > sparc.ld | 16 ++++++++++++++--
> > > 1 files changed, 14 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/sparc.ld b/sparc.ld
> > > index 56efe34..e52c3d2 100644
> > > --- a/sparc.ld
> > > +++ b/sparc.ld
> > > @@ -37,8 +37,20 @@ SECTIONS
> > > .rela.fini : { *(.rela.fini) }
> > > .rel.bss : { *(.rel.bss) }
> > > .rela.bss : { *(.rela.bss) }
> > > - .rel.plt : { *(.rel.plt) }
> > > - .rela.plt : { *(.rela.plt) }
> > > + .rel.plt :
> > > + {
> > > + *(.rel.plt)
> > > + PROVIDE_HIDDEN (__rel_iplt_start = .);
> > > + *(.rel.iplt)
> > > + PROVIDE_HIDDEN (__rel_iplt_end = .);
> > > + }
> > > + .rela.plt :
> > > + {
> > > + *(.rela.plt)
> > > + PROVIDE_HIDDEN (__rela_iplt_start = .);
> > > + *(.rela.iplt)
> > > + PROVIDE_HIDDEN (__rela_iplt_end = .);
> > > + }
> >
> > PROVIDE_HIDDEN etc. were removed by
> > 8733f6093c2b77502e7228503fc22024e51599b8 in order to support BSDs with
> > older binutils (2.15). Maybe the ld scripts should be generated from a
> > source file for example with CPP, so these lines could be tweaked.
> >
>
> It seems this patch was in my local tree for too long, and it seems I
> should have updated it before sending it...
>
> Other architectures are now using PROVIDE instead of PROVIDE_HIDDEN for
> __rel{a,}_iplt_{start,end}, so I guess the same can be done for sparc and
> ppc. I am going to do a test build to check that, and I'll come with a
> new patch if it works.
The new patch below also fixes the issue, and uses PROVIDE instead of
PROVIDE_HIDDEN.
sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
Fix .rel.plt sections in the output to not only include .rel.plt
sections from the input but also the .rel.iplt sections and to define
the hidden symbols __rel_iplt_start and __rel_iplt_end around
.rel.iplt as otherwise we get undefined references to these when
linking statically to a multiarch enabled libc (using STT_GNU_IFUNC).
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
sparc.ld | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/sparc.ld b/sparc.ld
index 56efe34..cec17c9 100644
--- a/sparc.ld
+++ b/sparc.ld
@@ -37,8 +37,20 @@ SECTIONS
.rela.fini : { *(.rela.fini) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
- .rel.plt : { *(.rel.plt) }
- .rela.plt : { *(.rela.plt) }
+ .rel.plt :
+ {
+ *(.rel.plt)
+ PROVIDE (__rel_iplt_start = .);
+ *(.rel.iplt)
+ PROVIDE (__rel_iplt_end = .);
+ }
+ .rela.plt :
+ {
+ *(.rela.plt)
+ PROVIDE (__rela_iplt_start = .);
+ *(.rela.iplt)
+ PROVIDE (__rela_iplt_end = .);
+ }
.init : { *(.init) } =0x47ff041f
.text :
{
--
1.7.7.3
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
2012-01-10 17:38 ` Aurelien Jarno
@ 2012-01-21 18:42 ` Blue Swirl
2013-04-06 6:08 ` [Qemu-devel] " Michael Tokarev
1 sibling, 0 replies; 10+ messages in thread
From: Blue Swirl @ 2012-01-21 18:42 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel
On Tue, Jan 10, 2012 at 17:38, Aurelien Jarno <aurelien@aurel32.net> wrote:
> On Sat, Jan 07, 2012 at 10:01:09PM +0100, Aurelien Jarno wrote:
>> On Sat, Jan 07, 2012 at 08:36:12PM +0000, Blue Swirl wrote:
>> > On Sat, Jan 7, 2012 at 20:16, Aurelien Jarno <aurelien@aurel32.net> wrote:
>> > > Fix .rel.plt sections in the output to not only include .rel.plt
>> > > sections from the input but also the .rel.iplt sections and to define
>> > > the hidden symbols __rel_iplt_start and __rel_iplt_end around
>> > > .rel.iplt as otherwise we get undefined references to these when
>> > > linking statically to a multiarch enabled libc (using STT_GNU_IFUNC).
>> > >
>> > > Blue Swirl <blauwirbel@gmail.com>
>> > > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>> > > ---
>> > > sparc.ld | 16 ++++++++++++++--
>> > > 1 files changed, 14 insertions(+), 2 deletions(-)
>> > >
>> > > diff --git a/sparc.ld b/sparc.ld
>> > > index 56efe34..e52c3d2 100644
>> > > --- a/sparc.ld
>> > > +++ b/sparc.ld
>> > > @@ -37,8 +37,20 @@ SECTIONS
>> > > .rela.fini : { *(.rela.fini) }
>> > > .rel.bss : { *(.rel.bss) }
>> > > .rela.bss : { *(.rela.bss) }
>> > > - .rel.plt : { *(.rel.plt) }
>> > > - .rela.plt : { *(.rela.plt) }
>> > > + .rel.plt :
>> > > + {
>> > > + *(.rel.plt)
>> > > + PROVIDE_HIDDEN (__rel_iplt_start = .);
>> > > + *(.rel.iplt)
>> > > + PROVIDE_HIDDEN (__rel_iplt_end = .);
>> > > + }
>> > > + .rela.plt :
>> > > + {
>> > > + *(.rela.plt)
>> > > + PROVIDE_HIDDEN (__rela_iplt_start = .);
>> > > + *(.rela.iplt)
>> > > + PROVIDE_HIDDEN (__rela_iplt_end = .);
>> > > + }
>> >
>> > PROVIDE_HIDDEN etc. were removed by
>> > 8733f6093c2b77502e7228503fc22024e51599b8 in order to support BSDs with
>> > older binutils (2.15). Maybe the ld scripts should be generated from a
>> > source file for example with CPP, so these lines could be tweaked.
>> >
>>
>> It seems this patch was in my local tree for too long, and it seems I
>> should have updated it before sending it...
>>
>> Other architectures are now using PROVIDE instead of PROVIDE_HIDDEN for
>> __rel{a,}_iplt_{start,end}, so I guess the same can be done for sparc and
>> ppc. I am going to do a test build to check that, and I'll come with a
>> new patch if it works.
>
> The new patch below also fixes the issue, and uses PROVIDE instead of
> PROVIDE_HIDDEN.
This should work, the info page for OpenBSD ld talks about PROVIDE
(but not PROVIDE_HIDDEN).
> sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
>
> Fix .rel.plt sections in the output to not only include .rel.plt
> sections from the input but also the .rel.iplt sections and to define
> the hidden symbols __rel_iplt_start and __rel_iplt_end around
> .rel.iplt as otherwise we get undefined references to these when
> linking statically to a multiarch enabled libc (using STT_GNU_IFUNC).
>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> sparc.ld | 16 ++++++++++++++--
> 1 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/sparc.ld b/sparc.ld
> index 56efe34..cec17c9 100644
> --- a/sparc.ld
> +++ b/sparc.ld
> @@ -37,8 +37,20 @@ SECTIONS
> .rela.fini : { *(.rela.fini) }
> .rel.bss : { *(.rel.bss) }
> .rela.bss : { *(.rela.bss) }
> - .rel.plt : { *(.rel.plt) }
> - .rela.plt : { *(.rela.plt) }
> + .rel.plt :
> + {
> + *(.rel.plt)
> + PROVIDE (__rel_iplt_start = .);
> + *(.rel.iplt)
> + PROVIDE (__rel_iplt_end = .);
> + }
> + .rela.plt :
> + {
> + *(.rela.plt)
> + PROVIDE (__rela_iplt_start = .);
> + *(.rela.iplt)
> + PROVIDE (__rela_iplt_end = .);
> + }
> .init : { *(.init) } =0x47ff041f
> .text :
> {
> --
> 1.7.7.3
>
>
> --
> Aurelien Jarno GPG: 1024D/F1BCDB73
> aurelien@aurel32.net http://www.aurel32.net
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
2012-01-10 17:38 ` Aurelien Jarno
2012-01-21 18:42 ` Blue Swirl
@ 2013-04-06 6:08 ` Michael Tokarev
2013-05-08 7:18 ` Michael Tokarev
1 sibling, 1 reply; 10+ messages in thread
From: Michael Tokarev @ 2013-04-06 6:08 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: Blue Swirl, qemu-devel
This patch was submitted more than a year ago (at Jan-2012).
Is it still needed? If yes, why it hasn't been applied?
It still applies cleanly to the current git, with the exception
of s|^|ldscripts/| - sparc.ld moved from the top directory to
ldscripts/.
(Ref: http://patchwork.ozlabs.org/patch/135267 )
Thanks,
/mjt
10.01.2012 11:38, Aurelien Jarno wrote:
> sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
>
> Fix .rel.plt sections in the output to not only include .rel.plt
> sections from the input but also the .rel.iplt sections and to define
> the hidden symbols __rel_iplt_start and __rel_iplt_end around
> .rel.iplt as otherwise we get undefined references to these when
> linking statically to a multiarch enabled libc (using STT_GNU_IFUNC).
>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>
> ---
> sparc.ld | 16 ++++++++++++++--
> 1 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/sparc.ld b/sparc.ld
> index 56efe34..cec17c9 100644
> --- a/sparc.ld
> +++ b/sparc.ld
> @@ -37,8 +37,20 @@ SECTIONS
> .rela.fini : { *(.rela.fini) }
> .rel.bss : { *(.rel.bss) }
> .rela.bss : { *(.rela.bss) }
> - .rel.plt : { *(.rel.plt) }
> - .rela.plt : { *(.rela.plt) }
> + .rel.plt :
> + {
> + *(.rel.plt)
> + PROVIDE (__rel_iplt_start = .);
> + *(.rel.iplt)
> + PROVIDE (__rel_iplt_end = .);
> + }
> + .rela.plt :
> + {
> + *(.rela.plt)
> + PROVIDE (__rela_iplt_start = .);
> + *(.rela.iplt)
> + PROVIDE (__rela_iplt_end = .);
> + }
> .init : { *(.init) } =0x47ff041f
> .text :
> {
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
2013-04-06 6:08 ` [Qemu-devel] " Michael Tokarev
@ 2013-05-08 7:18 ` Michael Tokarev
2013-05-09 17:56 ` Blue Swirl
0 siblings, 1 reply; 10+ messages in thread
From: Michael Tokarev @ 2013-05-08 7:18 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: Blue Swirl, qemu-devel
Ping #2?
06.04.2013 10:08, Michael Tokarev wrote:
> This patch was submitted more than a year ago (at Jan-2012).
> Is it still needed? If yes, why it hasn't been applied?
>
> It still applies cleanly to the current git, with the exception
> of s|^|ldscripts/| - sparc.ld moved from the top directory to
> ldscripts/.
>
> (Ref: http://patchwork.ozlabs.org/patch/135267 )
>
> Thanks,
>
> /mjt
>
>
> 10.01.2012 11:38, Aurelien Jarno wrote:
>> sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
>>
>> Fix .rel.plt sections in the output to not only include .rel.plt
>> sections from the input but also the .rel.iplt sections and to define
>> the hidden symbols __rel_iplt_start and __rel_iplt_end around
>> .rel.iplt as otherwise we get undefined references to these when
>> linking statically to a multiarch enabled libc (using STT_GNU_IFUNC).
>>
>> Cc: Blue Swirl <blauwirbel@gmail.com>
>> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>>
>> ---
>> sparc.ld | 16 ++++++++++++++--
>> 1 files changed, 14 insertions(+), 2 deletions(-)
>>
>> diff --git a/sparc.ld b/sparc.ld
>> index 56efe34..cec17c9 100644
>> --- a/sparc.ld
>> +++ b/sparc.ld
>> @@ -37,8 +37,20 @@ SECTIONS
>> .rela.fini : { *(.rela.fini) }
>> .rel.bss : { *(.rel.bss) }
>> .rela.bss : { *(.rela.bss) }
>> - .rel.plt : { *(.rel.plt) }
>> - .rela.plt : { *(.rela.plt) }
>> + .rel.plt :
>> + {
>> + *(.rel.plt)
>> + PROVIDE (__rel_iplt_start = .);
>> + *(.rel.iplt)
>> + PROVIDE (__rel_iplt_end = .);
>> + }
>> + .rela.plt :
>> + {
>> + *(.rela.plt)
>> + PROVIDE (__rela_iplt_start = .);
>> + *(.rela.iplt)
>> + PROVIDE (__rela_iplt_end = .);
>> + }
>> .init : { *(.init) } =0x47ff041f
>> .text :
>> {
>>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
2013-05-08 7:18 ` Michael Tokarev
@ 2013-05-09 17:56 ` Blue Swirl
2013-05-19 12:58 ` Aurelien Jarno
0 siblings, 1 reply; 10+ messages in thread
From: Blue Swirl @ 2013-05-09 17:56 UTC (permalink / raw)
To: Michael Tokarev; +Cc: qemu-devel, Aurelien Jarno
On Wed, May 8, 2013 at 7:18 AM, Michael Tokarev <mjt@tls.msk.ru> wrote:
> Ping #2?
>
> 06.04.2013 10:08, Michael Tokarev wrote:
>> This patch was submitted more than a year ago (at Jan-2012).
>> Is it still needed? If yes, why it hasn't been applied?
Well, is it still needed?
>>
>> It still applies cleanly to the current git, with the exception
>> of s|^|ldscripts/| - sparc.ld moved from the top directory to
>> ldscripts/.
>>
>> (Ref: http://patchwork.ozlabs.org/patch/135267 )
>>
>> Thanks,
>>
>> /mjt
>>
>>
>> 10.01.2012 11:38, Aurelien Jarno wrote:
>>> sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
>>>
>>> Fix .rel.plt sections in the output to not only include .rel.plt
>>> sections from the input but also the .rel.iplt sections and to define
>>> the hidden symbols __rel_iplt_start and __rel_iplt_end around
>>> .rel.iplt as otherwise we get undefined references to these when
>>> linking statically to a multiarch enabled libc (using STT_GNU_IFUNC).
>>>
>>> Cc: Blue Swirl <blauwirbel@gmail.com>
>>> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>>>
>>> ---
>>> sparc.ld | 16 ++++++++++++++--
>>> 1 files changed, 14 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/sparc.ld b/sparc.ld
>>> index 56efe34..cec17c9 100644
>>> --- a/sparc.ld
>>> +++ b/sparc.ld
>>> @@ -37,8 +37,20 @@ SECTIONS
>>> .rela.fini : { *(.rela.fini) }
>>> .rel.bss : { *(.rel.bss) }
>>> .rela.bss : { *(.rela.bss) }
>>> - .rel.plt : { *(.rel.plt) }
>>> - .rela.plt : { *(.rela.plt) }
>>> + .rel.plt :
>>> + {
>>> + *(.rel.plt)
>>> + PROVIDE (__rel_iplt_start = .);
>>> + *(.rel.iplt)
>>> + PROVIDE (__rel_iplt_end = .);
>>> + }
>>> + .rela.plt :
>>> + {
>>> + *(.rela.plt)
>>> + PROVIDE (__rela_iplt_start = .);
>>> + *(.rela.iplt)
>>> + PROVIDE (__rela_iplt_end = .);
>>> + }
>>> .init : { *(.init) } =0x47ff041f
>>> .text :
>>> {
>>>
>>
>>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
2013-05-09 17:56 ` Blue Swirl
@ 2013-05-19 12:58 ` Aurelien Jarno
2013-05-19 14:51 ` Michael Tokarev
0 siblings, 1 reply; 10+ messages in thread
From: Aurelien Jarno @ 2013-05-19 12:58 UTC (permalink / raw)
To: Blue Swirl; +Cc: Michael Tokarev, qemu-devel
On Thu, May 09, 2013 at 05:56:03PM +0000, Blue Swirl wrote:
> On Wed, May 8, 2013 at 7:18 AM, Michael Tokarev <mjt@tls.msk.ru> wrote:
> > Ping #2?
> >
> > 06.04.2013 10:08, Michael Tokarev wrote:
> >> This patch was submitted more than a year ago (at Jan-2012).
> >> Is it still needed? If yes, why it hasn't been applied?
>
> Well, is it still needed?
Without it, trying to build static qemu-user on sparc leads to the
following error:
| LINK mips-linux-user/qemu-mips
| /usr/lib/gcc/sparc-linux-gnu/4.6/../../../sparc-linux-gnu/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
| (.text+0x440): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
| /usr/lib/gcc/sparc-linux-gnu/4.6/../../../sparc-linux-gnu/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
| (.text+0x430): warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
| /usr/lib/gcc/sparc-linux-gnu/4.6/../../../sparc-linux-gnu/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
| (.text+0x448): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
| /usr/lib/gcc/sparc-linux-gnu/4.6/../../../sparc-linux-gnu/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
| (.text+0x188): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
| /usr/lib/gcc/sparc-linux-gnu/4.6/../../../sparc-linux-gnu/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
| (.text+0x1c8): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
| /usr/lib/gcc/sparc-linux-gnu/4.6/../../../sparc-linux-gnu/libc.a(elf-init.o): In function `__libc_csu_irel':
| (.text+0x144): undefined reference to `__rela_iplt_start'
| /usr/lib/gcc/sparc-linux-gnu/4.6/../../../sparc-linux-gnu/libc.a(elf-init.o): In function `__libc_csu_irel':
| (.text+0x148): undefined reference to `__rela_iplt_end'
| /usr/lib/gcc/sparc-linux-gnu/4.6/../../../sparc-linux-gnu/libc.a(elf-init.o): In function `__libc_csu_irel':
| (.text+0x14c): undefined reference to `__rela_iplt_start'
| /usr/lib/gcc/sparc-linux-gnu/4.6/../../../sparc-linux-gnu/libc.a(elf-init.o): In function `__libc_csu_irel':
| (.text+0x150): undefined reference to `__rela_iplt_end'
| collect2: ld returned 1 exit status
| make[1]: *** [qemu-mips] Error 1
| make: *** [subdir-mips-linux-user] Error 2
So I think it is still needed, unless you have another fix in mind.
> >>
> >> It still applies cleanly to the current git, with the exception
> >> of s|^|ldscripts/| - sparc.ld moved from the top directory to
> >> ldscripts/.
> >>
> >> (Ref: http://patchwork.ozlabs.org/patch/135267 )
> >>
> >> Thanks,
> >>
> >> /mjt
> >>
> >>
> >> 10.01.2012 11:38, Aurelien Jarno wrote:
> >>> sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
> >>>
> >>> Fix .rel.plt sections in the output to not only include .rel.plt
> >>> sections from the input but also the .rel.iplt sections and to define
> >>> the hidden symbols __rel_iplt_start and __rel_iplt_end around
> >>> .rel.iplt as otherwise we get undefined references to these when
> >>> linking statically to a multiarch enabled libc (using STT_GNU_IFUNC).
> >>>
> >>> Cc: Blue Swirl <blauwirbel@gmail.com>
> >>> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> >>>
> >>> ---
> >>> sparc.ld | 16 ++++++++++++++--
> >>> 1 files changed, 14 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/sparc.ld b/sparc.ld
> >>> index 56efe34..cec17c9 100644
> >>> --- a/sparc.ld
> >>> +++ b/sparc.ld
> >>> @@ -37,8 +37,20 @@ SECTIONS
> >>> .rela.fini : { *(.rela.fini) }
> >>> .rel.bss : { *(.rel.bss) }
> >>> .rela.bss : { *(.rela.bss) }
> >>> - .rel.plt : { *(.rel.plt) }
> >>> - .rela.plt : { *(.rela.plt) }
> >>> + .rel.plt :
> >>> + {
> >>> + *(.rel.plt)
> >>> + PROVIDE (__rel_iplt_start = .);
> >>> + *(.rel.iplt)
> >>> + PROVIDE (__rel_iplt_end = .);
> >>> + }
> >>> + .rela.plt :
> >>> + {
> >>> + *(.rela.plt)
> >>> + PROVIDE (__rela_iplt_start = .);
> >>> + *(.rela.iplt)
> >>> + PROVIDE (__rela_iplt_end = .);
> >>> + }
> >>> .init : { *(.init) } =0x47ff041f
> >>> .text :
> >>> {
> >>>
> >>
> >>
> >
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
2013-05-19 12:58 ` Aurelien Jarno
@ 2013-05-19 14:51 ` Michael Tokarev
0 siblings, 0 replies; 10+ messages in thread
From: Michael Tokarev @ 2013-05-19 14:51 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: Blue Swirl, qemu-devel
19.05.2013 16:58, Aurelien Jarno wrote:
> On Thu, May 09, 2013 at 05:56:03PM +0000, Blue Swirl wrote:
>> On Wed, May 8, 2013 at 7:18 AM, Michael Tokarev <mjt@tls.msk.ru> wrote:
>>> Ping #2?
>>>
>>> 06.04.2013 10:08, Michael Tokarev wrote:
>>>> This patch was submitted more than a year ago (at Jan-2012).
>>>> Is it still needed? If yes, why it hasn't been applied?
>>
>> Well, is it still needed?
>
> Without it, trying to build static qemu-user on sparc leads to the
> following error:
...
> | /usr/lib/gcc/sparc-linux-gnu/4.6/../../../sparc-linux-gnu/libc.a(elf-init.o): In function `__libc_csu_irel':
> | (.text+0x148): undefined reference to `__rela_iplt_end'
> | /usr/lib/gcc/sparc-linux-gnu/4.6/../../../sparc-linux-gnu/libc.a(elf-init.o): In function `__libc_csu_irel':
> | (.text+0x14c): undefined reference to `__rela_iplt_start'
> | /usr/lib/gcc/sparc-linux-gnu/4.6/../../../sparc-linux-gnu/libc.a(elf-init.o): In function `__libc_csu_irel':
> | (.text+0x150): undefined reference to `__rela_iplt_end'
> | collect2: ld returned 1 exit status
> | make[1]: *** [qemu-mips] Error 1
> | make: *** [subdir-mips-linux-user] Error 2
>
> So I think it is still needed, unless you have another fix in mind.
If we apply this for 1.5, it will be the first release of debian
package without extra fixes. Hopefully anyway :)
(Ofcourse we may add more fixes later but... ;)
/mjt
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-05-19 14:51 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-07 20:16 [Qemu-devel] [PATCH] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections Aurelien Jarno
2012-01-07 20:36 ` Blue Swirl
2012-01-07 21:01 ` Aurelien Jarno
2012-01-10 17:38 ` Aurelien Jarno
2012-01-21 18:42 ` Blue Swirl
2013-04-06 6:08 ` [Qemu-devel] " Michael Tokarev
2013-05-08 7:18 ` Michael Tokarev
2013-05-09 17:56 ` Blue Swirl
2013-05-19 12:58 ` Aurelien Jarno
2013-05-19 14:51 ` Michael Tokarev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.