Message ID | a4423d670903180455u20ead146k919426a1fb7276c6@mail.gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On Wed, Mar 18, 2009 at 02:55:13PM +0300, Alexander Beregalov wrote: > ld: arch/parisc/kernel/built-in.o(.text+0xc84): cannot handle > R_PARISC_PCREL12F for .text Alexander, can you post the .config file used for this build? It would be the easiest way for someone else to reproduce the problem. thanks, grant -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2009/3/21 Grant Grundler <grundler@parisc-linux.org>: > On Wed, Mar 18, 2009 at 02:55:13PM +0300, Alexander Beregalov wrote: >> ld: arch/parisc/kernel/built-in.o(.text+0xc84): cannot handle >> R_PARISC_PCREL12F for .text > > Alexander, > can you post the .config file used for this build? > It would be the easiest way for someone else to reproduce the problem. Hi It is in the first mail. -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Mar 18, 2009 at 02:55:13PM +0300, Alexander Beregalov wrote: > > I have recompiled kernel with -ffunction-sections, but still the same problem. > This is wrong... the kernel is always built with -ffunction-sections, see arch/parisc/Makefile: # Without this, "ld -r" results in .text sections that are too big # (> 0x40000) for branches to reach stubs. cflags-y += -ffunction-sections cheers, Kyle -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Mar 18, 2009 at 10:00:26AM -0400, John David Anglin wrote: > > ld: arch/parisc/kernel/built-in.o(.text+0xc84): cannot reach > > 000000b2_b2:46+4068, recompile with -ffunction-sections > > ld: arch/parisc/kernel/built-in.o(.text+0xc84): cannot handle > > R_PARISC_PCREL12F for .text > > > > -ffunction-sections won't work because GCC doesn't generate calls > with instructions that would use a R_PARISC_PCREL12F relocation. > This is some kind of conditional branch. Probably, it's in some > kernel assembly code. > > You need to use nm, objdump and/or readelf to determine which file > contributing to built-in.o contains the branch. I looked in one of > my builds and didn't see this relocation. > This is... somewhat special. I've never seen this either. Possibly I should install a Gentoo machine so I can reproduce with their toolchain? objdump -dr arch/parisc/kernel/built-in.o | grep PCREL12F should tell you where the problem is. I agree with JDA, judging by the fact that it's the kernel/built-in.o, I would guess it's assembler as well. (Sorry for taking so long to get to this thread, I must have missed it while I was in Boston.) regards, Kyle -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2009/4/2 Kyle McMartin <kyle@mcmartin.ca>: > On Wed, Mar 18, 2009 at 10:00:26AM -0400, John David Anglin wrote: >> > ld: arch/parisc/kernel/built-in.o(.text+0xc84): cannot reach >> > 000000b2_b2:46+4068, recompile with -ffunction-sections >> > ld: arch/parisc/kernel/built-in.o(.text+0xc84): cannot handle >> > R_PARISC_PCREL12F for .text >> > >> >> -ffunction-sections won't work because GCC doesn't generate calls >> with instructions that would use a R_PARISC_PCREL12F relocation. >> This is some kind of conditional branch. Â Probably, it's in some >> kernel assembly code. >> >> You need to use nm, objdump and/or readelf to determine which file >> contributing to built-in.o contains the branch. Â I looked in one of >> my builds and didn't see this relocation. >> > > This is... somewhat special. I've never seen this either. Possibly I > should install a Gentoo machine so I can reproduce with their toolchain? > > objdump -dr arch/parisc/kernel/built-in.o | grep PCREL12F should tell > you where the problem is. I agree with JDA, judging by the fact that > it's the kernel/built-in.o, I would guess it's assembler as well. Thanks. now I have ld: drivers/built-in.o(.devinit.text+0x3f520): cannot reach 00002ea1_memcpy+0, recompile with -ffunction-sections ld: drivers/built-in.o(.devinit.text+0x3f520): cannot handle R_PARISC_PCREL17F for memcpy 0003f044 <niu_get_invariants>: <..> 0003f0ac <.L1724>: <..> 3f510: 40 bc 01 b0 ldb d8(r5),ret0 3f514: 37 9c 00 02 ldo 1(ret0),ret0 3f518: 60 bc 01 b0 stb ret0,d8(r5) 3f51c: 40 b8 01 e8 ldb f4(r5),r24 3f520: e8 40 00 00 b,l 3f528 <.L1724+0x47c>,rp 3f520: R_PARISC_PCREL17F memcpy 3f524: 34 ba 02 88 ldo 144(r5),r26 3f528: e8 5f 04 25 b,l 3e740 <niu_get_and_validate_port>,rp 3f52c: 08 12 02 5a copy r18,r26 3f530: c8 7c ae c4 movb,<> ret0,r3,40c98 <.L1884+0x5c> -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Makefile b/Makefile index 2e2f4a4..61b09b2 100644 --- a/Makefile +++ b/Makefile @@ -346,7 +346,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common \ - -Werror-implicit-function-declaration + -Werror-implicit-function-declaration -ffunction-sections KBUILD_AFLAGS := -D__ASSEMBLY__ # Read KERNELRELEASE from include/config/kernel.release (if it exists)