Re: patch to install unstripped vDSO on disk breaks powerpc kernel build
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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
patch to install unstripped vDSO on disk breaks powerpc kernel build
I'm using gcc 3.4.3 and binutils 2.15.92.0.2. I originally saw the following problem in 2.6.25 but it's present in git head as well: CALL /home/cfriesen/kernels/2.6.25/linux-2.6.25/scripts/checksyscalls.sh CHK include/linux/compile.h CALL /home/cfriesen/kernels/2.6.25/linux-2.6.25/arch/powerpc/kernel/systbl_chk.sh AS arch/powerpc/kernel/systbl.o OBJCOPY arch/powerpc/kernel/vdso64/vdso64.so BFD: arch/powerpc/kernel/vdso64/vdso64.so: The first section in the PT_DYNAMIC segment is not the .dynamic section /home/cfriesen/bin/ppc64-R9a/bin/ppc64-R9a-objcopy: arch/powerpc/kernel/vdso64/vdso64.so: Bad value BFD: arch/powerpc/kernel/vdso64/vdso64.so: The first section in the PT_DYNAMIC segment is not the .dynamic section /home/cfriesen/bin/ppc64-R9a/bin/ppc64-R9a-objcopy: arch/powerpc/kernel/vdso64/vdso64.so: Bad value make[3]: *** [arch/powerpc/kernel/vdso64/vdso64.so] Error 1 make[2]: *** [arch/powerpc/kernel/vdso64] Error 2 make[1]: *** [arch/powerpc/kernel] Error 2 make: *** [sub-make] Error 2 I installed git and bisected the problem. It turns out that it's due to the following commit: commit 8150caad02266623b5b9f58088d589f130fccd97 Author: Roland McGrath [EMAIL PROTECTED] Date: Tue Oct 2 13:30:04 2007 -0700 [POWERPC] powerpc vDSO: install unstripped copies on disk This keeps an unstripped copy of the vDSO images built before they are stripped and embedded in the kernel. The unstripped copies get installed in $(MODLIB)/vdso/ by make install. These files can be useful when they contain source-level debugging information. Signed-off-by: Roland McGrath [EMAIL PROTECTED] Cc: Sam Ravnborg [EMAIL PROTECTED] Cc: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Paul Mackerras [EMAIL PROTECTED] Anyone have any idea what's going on? Thanks, Chris ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: patch to install unstripped vDSO on disk breaks powerpc kernel build
I haven't seen that error before. Can you show the output of {eu-,}readelf -lS on vdso64.so.dbg, and also on the vdso64.so successfully built when you revert the patch? Thanks, Roland ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: patch to install unstripped vDSO on disk breaks powerpc kernel build
Roland McGrath wrote: I haven't seen that error before. Can you show the output of {eu-,}readelf -lS on vdso64.so.dbg, and also on the vdso64.so successfully built when you revert the patch? I've attached the raw output from the two commands. The delta between the two is as follows: -There are 14 section headers, starting at offset 0xd58: +There are 16 section headers, starting at offset 0xd68: Section Headers: [Nr] Name Type Address Offset @@ -33,7 +33,11 @@ [12] .rela.dyn RELA 00100be8 0be8 0018 A 2 0 8 [13] .shstrtab STRTAB 0cd8 - 0079 0 0 1 + 0089 0 0 1 + [14] .symtab SYMTAB 1168 + 0d80 0018 15 134 8 + [15] .strtab STRTAB 1ee8 + 04a3 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), x (unknown) Also, I'm going to be away on holidays next week, so I won't be able to test this further until the 19th or so. Chris good: [EMAIL PROTECTED] linux-2.6]$ /home/cfriesen/bin/ppc64-R9a/bin/ppc64-R9a-readelf -lS ../g5/arch/powerpc/kernel/vdso64/vdso64.so There are 14 section headers, starting at offset 0xd58: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0 0 0 [ 1] .hash HASH 00100120 0120 004c 0004 A 2 0 8 [ 2] .dynsym DYNSYM 00100170 0170 0150 0018 A 3 4 8 [ 3] .dynstr STRTAB 001002c0 02c0 00ef A 0 0 1 [ 4] .gnu.version VERSYM 001003b0 03b0 001c 0002 A 2 0 2 [ 5] .gnu.version_dVERDEF 001003d0 03d0 0038 A 3 2 8 [ 6] .note NOTE 00100408 0408 0018 A 0 0 4 [ 7] .text PROGBITS 00100420 0420 02ec AX 0 0 8 [ 8] .eh_frame_hdr PROGBITS 00100710 0710 0008 A 0 0 4 [ 9] .eh_frame PROGBITS 00100718 0718 04c4 A 0 0 8 [10] .got PROGBITS 00100be0 0be0 0008 0008 WA 0 0 8 [11] .dynamic DYNAMIC 00100be8 0be8 00f0 0010 WA 3 0 8 [12] .rela.dyn RELA 00100be8 0be8 0018 A 2 0 8 [13] .shstrtab STRTAB 0cd8 0079 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific) Elf file type is DYN (Shared object file) Entry point 0x0 There are 4 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSizMemSiz Flags Align LOAD 0x 0x0010 0x0010 0x0cd8 0x0cd8 R E1 NOTE 0x0408 0x00100408 0x00100408 0x0018 0x0018 R 4 DYNAMIC0x0be8 0x00100be8 0x00100be8 0x00f0 0x00f0 R 8 GNU_EH_FRAME 0x0710 0x00100710 0x00100710 0x0008 0x0008 R 4 Section to Segment mapping: Segment Sections... 00 .hash .dynsym .dynstr .gnu.version .gnu.version_d .note .text .eh_frame_hdr .eh_frame .got .dynamic 01 .note 02 .dynamic 03 .eh_frame_hdr bad: [EMAIL PROTECTED] linux-2.6]$ /home/cfriesen/bin/ppc64-R9a/bin/ppc64-R9a-readelf -lS ../g5/arch/powerpc/kernel/vdso64/vdso64.so.dbg