Messages in this thread | | | Date | Tue, 27 Jul 1999 10:59:03 +0200 | From | Jakub Jelinek <> | Subject | Re: Problems with trampoline.S with 64 bit binutils |
| |
On Tue, Jul 27, 1999 at 06:31:18PM +1000, Keith Owens wrote: > I run a version of binutils that is compiled for every valid target, > including 64 bit machines, it is the one I use for testing cross system > ksymoops. The presence of 64 bit support causes problems when > compiling trampoline.S. Admittedly this is an unusual combination but > I was hoping it was worth making trampoline 64 bit compatible, just in > case any other users want to use binutils for cross system work. > > # gcc -v -D__KERNEL__ -I/usr/src/2.2.10/include -D__ASSEMBLY__ -D__SMP__ -traditional -c trampoline.S -o trampoline.o -save-temps > Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs > gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) > /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/cpp -lang-asm -v -I/usr/src/2.2.10/include -undef -$ -D__ELF__ -Dunix -Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__ASSEMBLER__ -traditional -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__KERNEL__ -D__ASSEMBLY__ -D__SMP__ trampoline.S trampoline.s > GNU CPP version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) (i386 Linux/ELF) > #include "..." search starts here: > #include <...> search starts here: > /usr/src/2.2.10/include > /usr/i386-redhat-linux/include > /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include > /usr/include > End of search list. > as -V -Qy -o trampoline.o trampoline.s > GNU assembler version 2.9.1 (i386-redhat-linux), using BFD version 2.9.1.0.23 (compiled with 64 bit targets) > trampoline.s: Assembler messages: > trampoline.s:183: Error: Value of ffffffff40000000 too large for field of 4 bytes at 0000000000000033 > > Extract from trampoline.s. > > gdt_48: > .word 0x0800 # gdt limit = 2048, 256 GDT entries > .long gdt_table-(0xC0000000) # gdt base = gdt (first SMP CPU) > > The problem is gdt_table-(0xC0000000), gdt_table-__PAGE_OFFSET in > trampoline.S. With a 64 bit binutils, the result cannot be stored into > a word. > > The obvious (get_table-__PAGE_OFFSET)&0xffffffff does not work, > probably because gdt_table is a relocatable symbol. It works for > absolute expressions, (0-__PAGE_OFFSET)&0xffffffff is fine. MEC has > pointed out that calculating gdt_table-__PAGE_OFFSET at run time would > have problems because of SMP. > > Are there any solutions that allow trampoline.S to be compiled with a > 64 bit binutils?
Yes, fixing binutils. I'm not familiar with elf32-i386.c and tc-i386.[ch] (I suspect the latter two) to tell you without digging into it where the bug is, so I'd propose you submit a bugreport to binutils@sourceware.cygnus.com. It is definitely fixable, example can be the sparc 32bit which has been fixed in this regard some time ago and now a assembler compiled for elf32_sparc and elf64_sparc targets assembles well such things.
Cheers, Jakub ___________________________________________________________________ Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz Administrator of SunSITE Czech Republic, MFF, Charles University ___________________________________________________________________ UltraLinux | http://ultra.linux.cz/ | http://ultra.penguin.cz/ Linux version 2.2.10 on a sparc64 machine (1343.49 BogoMips) ___________________________________________________________________
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |