* [Qemu-devel] [PATCH] ppc-linux-user: Fix missing symbols in .rel/.rela.plt sections
@ 2012-01-07 20:16 Aurelien Jarno
2012-01-09 13:31 ` Alexander Graf
0 siblings, 1 reply; 5+ messages in thread
From: Aurelien Jarno @ 2012-01-07 20:16 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexander Graf, 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).
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
ppc.ld | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/ppc.ld b/ppc.ld
index 69aa3f2..1c0bcf1 100644
--- a/ppc.ld
+++ b/ppc.ld
@@ -49,8 +49,20 @@ SECTIONS
.rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
.rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
.rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
- .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 :
{
KEEP (*(.init))
--
1.7.7.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] ppc-linux-user: Fix missing symbols in .rel/.rela.plt sections
2012-01-07 20:16 [Qemu-devel] [PATCH] ppc-linux-user: Fix missing symbols in .rel/.rela.plt sections Aurelien Jarno
@ 2012-01-09 13:31 ` Alexander Graf
2012-01-09 23:06 ` Aurelien Jarno
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Graf @ 2012-01-09 13:31 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel
On 07.01.2012, at 21:16, Aurelien Jarno 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).
Please see:
http://patchwork.ozlabs.org/patch/130932/
I'd still say that we should fix the linker scripts regardless. Also for 1.0.
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] ppc-linux-user: Fix missing symbols in .rel/.rela.plt sections
2012-01-09 13:31 ` Alexander Graf
@ 2012-01-09 23:06 ` Aurelien Jarno
2012-01-09 23:11 ` Alexander Graf
0 siblings, 1 reply; 5+ messages in thread
From: Aurelien Jarno @ 2012-01-09 23:06 UTC (permalink / raw)
To: Alexander Graf; +Cc: qemu-devel
On Mon, Jan 09, 2012 at 02:31:15PM +0100, Alexander Graf wrote:
>
> On 07.01.2012, at 21:16, Aurelien Jarno 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).
>
> Please see:
>
> http://patchwork.ozlabs.org/patch/130932/
>
> I'd still say that we should fix the linker scripts regardless. Also for 1.0.
I agree that we should either remove them or fix them. Not fixing them
because they should not be there, but at the same time not removing
them is a bad idea.
On my side I have also tested that it can work with PROVIDE instead of
PROVIDE_HIDDEN, so we end-up with the same patches. Now how should we
proceed to merge that to master, which is the first step before getting
that into stable?
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] ppc-linux-user: Fix missing symbols in .rel/.rela.plt sections
2012-01-09 23:06 ` Aurelien Jarno
@ 2012-01-09 23:11 ` Alexander Graf
2012-01-10 17:29 ` Aurelien Jarno
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Graf @ 2012-01-09 23:11 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel
On 10.01.2012, at 00:06, Aurelien Jarno wrote:
> On Mon, Jan 09, 2012 at 02:31:15PM +0100, Alexander Graf wrote:
>>
>> On 07.01.2012, at 21:16, Aurelien Jarno 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).
>>
>> Please see:
>>
>> http://patchwork.ozlabs.org/patch/130932/
>>
>> I'd still say that we should fix the linker scripts regardless. Also for 1.0.
>
> I agree that we should either remove them or fix them. Not fixing them
> because they should not be there, but at the same time not removing
> them is a bad idea.
>
> On my side I have also tested that it can work with PROVIDE instead of
> PROVIDE_HIDDEN, so we end-up with the same patches. Now how should we
> proceed to merge that to master, which is the first step before getting
> that into stable?
Either apply yours and rebase mine on top, so ppc64 is fixed too, or apply mine :). I'm rather indifferent on that one.
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] ppc-linux-user: Fix missing symbols in .rel/.rela.plt sections
2012-01-09 23:11 ` Alexander Graf
@ 2012-01-10 17:29 ` Aurelien Jarno
0 siblings, 0 replies; 5+ messages in thread
From: Aurelien Jarno @ 2012-01-10 17:29 UTC (permalink / raw)
To: Alexander Graf; +Cc: qemu-devel
On Tue, Jan 10, 2012 at 12:11:33AM +0100, Alexander Graf wrote:
>
> On 10.01.2012, at 00:06, Aurelien Jarno wrote:
>
> > On Mon, Jan 09, 2012 at 02:31:15PM +0100, Alexander Graf wrote:
> >>
> >> On 07.01.2012, at 21:16, Aurelien Jarno 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).
> >>
> >> Please see:
> >>
> >> http://patchwork.ozlabs.org/patch/130932/
> >>
> >> I'd still say that we should fix the linker scripts regardless. Also for 1.0.
> >
> > I agree that we should either remove them or fix them. Not fixing them
> > because they should not be there, but at the same time not removing
> > them is a bad idea.
> >
> > On my side I have also tested that it can work with PROVIDE instead of
> > PROVIDE_HIDDEN, so we end-up with the same patches. Now how should we
> > proceed to merge that to master, which is the first step before getting
> > that into stable?
>
> Either apply yours and rebase mine on top, so ppc64 is fixed too, or apply mine :). I'm rather indifferent on that one.
>
I have just applied yours.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-10 17:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-07 20:16 [Qemu-devel] [PATCH] ppc-linux-user: Fix missing symbols in .rel/.rela.plt sections Aurelien Jarno
2012-01-09 13:31 ` Alexander Graf
2012-01-09 23:06 ` Aurelien Jarno
2012-01-09 23:11 ` Alexander Graf
2012-01-10 17:29 ` Aurelien Jarno
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).