Re: patch to install unstripped vDSO on disk breaks powerpc kernel build

Subsystems: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

2 messages, 2 authors, 2008-05-21 · open the first message on its own page

Re: patch to install unstripped vDSO on disk breaks powerpc kernel build

From: Roland McGrath <hidden>
Date: 2008-05-11 00:40:53

Ok.  That looks like a bug in the older binutils (objcopy) you are using.
It is confused by the empty .rela.dyn section right next to the .dynamic
section.  Current binutils don't seem to have a problem with this.

I haven't tried to get an old binutils running to reproduce this.
I suspect the following change will work around the problem.
It should not cause any problem with newer or older binutils.


Thanks,
Roland

---
[PATCH] powerpc vdso64 linker script tweak

This should work around bugs in older binutils' objcopy.
The placement of these sections does not really matter,
but it confused the buggy old BFD libraries.

Signed-off-by: Roland McGrath <redacted>
---
 arch/powerpc/kernel/vdso64/vdso64.lds.S |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/vdso64/vdso64.lds.S b/arch/powerpc/kernel/vdso64/vdso64.lds.S
index 932b3fd..7d6585f 100644
--- a/arch/powerpc/kernel/vdso64/vdso64.lds.S
+++ b/arch/powerpc/kernel/vdso64/vdso64.lds.S
@@ -43,15 +43,15 @@ SECTIONS
 	.rodata		: { *(.rodata .rodata.* .gnu.linkonce.r.*) }
 	.rodata1	: { *(.rodata1) }
 
+	.dynamic	: { *(.dynamic) }		:text	:dynamic
+
 	.eh_frame_hdr	: { *(.eh_frame_hdr) }		:text	:eh_frame_hdr
 	.eh_frame	: { KEEP (*(.eh_frame)) }	:text
 	.gcc_except_table : { *(.gcc_except_table) }
+	.rela.dyn ALIGN(8) : { *(.rela.dyn) }
 
 	.opd ALIGN(8)	: { KEEP (*(.opd)) }
 	.got ALIGN(8)	: { *(.got .toc) }
-	.rela.dyn ALIGN(8) : { *(.rela.dyn) }
-
-	.dynamic	: { *(.dynamic) }		:text	:dynamic
 
 	_end = .;
 	PROVIDE(end = .);

Re: patch to install unstripped vDSO on disk breaks powerpc kernel build

From: Chris Friesen <hidden>
Date: 2008-05-21 22:12:45

Roland McGrath wrote:
Ok.  That looks like a bug in the older binutils (objcopy) you are using.
It is confused by the empty .rela.dyn section right next to the .dynamic
section.  Current binutils don't seem to have a problem with this.

I haven't tried to get an old binutils running to reproduce this.
I suspect the following change will work around the problem.
It should not cause any problem with newer or older binutils.
Thanks, this seems to have fixed the problem.

Chris
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help