From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 16755 invoked from network); 9 May 1998 14:12:00 -0000 Received: from delta.ds2.pg.gda.pl (macro@153.19.170.1) by mail2.redhat.com with SMTP; 9 May 1998 14:12:00 -0000 Received: from localhost (macro@localhost) by delta.ds2.pg.gda.pl (8.8.8/8.8.8) with SMTP id QAA17330; Sat, 9 May 1998 16:11:21 +0200 (MET DST) Date: Sat, 9 May 1998 16:11:21 +0200 (MET DST) From: "Maciej W. Rozycki" Reply-To: axp-list@redhat.com To: axp-list@redhat.com cc: linux-kernel@vger.rutgers.edu Subject: ld from binutils 2.9.1 mislinks Alpha kernel? Message-ID: Organization: Technical University of Gdansk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi, It seems that on an Alpha for some reasons ld 2.9.1 links vmlinux differently from what ld 2.8.1.0.15 used to do. It sets the PT_LOAD segment such that it does not include ELF file and program headers: $ ld -V GNU ld version 2.9.1 (with BFD 2.9.1) Supported emulations: elf64alpha alpha $ objdump -p vmlinux vmlinux-2.9.1: file format elf64-alpha Program Header: LOAD off 0x0000000000010000 vaddr 0xfffffc0000310000 paddr 0xfffffc0000310000 align 2**16 filesz 0x000000000011ba28 memsz 0x0000000000145e24 flags rwx versus: $ ld -V GNU ld version cygnus-2.8.1 (with BFD linux-2.8.1.0.15) Supported emulations: elf64alpha alpha $ objdump -p vmlinux vmlinux-2.8.1.0.15: file format elf64-alpha Program Header: LOAD off 0x0000000000000000 vaddr 0xfffffc0000300000 paddr 0xfffffc0000300000 align 2**20 filesz 0x000000000012ba28 memsz 0x0000000000155e24 flags rwx Both ELF images seem to be equivalent wrt kernel text start address but the former one prevents aboot from loading the kernel (it insists on the segment start address being within the first fs block of uncompressed vmlinux). I am not sure whether the change of ld behaviour is intentional, but just in case a patch follows which allows vmlinux created with binutils 2.9.1 to be booted by aboot. Maciej -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + diff -u --recursive --new-file linux-2.1.100.macro/arch/alpha/vmlinux.lds linux-2.1.100/arch/alpha/vmlinux.lds --- linux-2.1.100.macro/arch/alpha/vmlinux.lds Wed May 14 07:41:00 1997 +++ linux-2.1.100/arch/alpha/vmlinux.lds Sat May 9 15:10:00 1998 @@ -1,10 +1,14 @@ OUTPUT_FORMAT("elf64-alpha") ENTRY(__start) +PHDRS +{ + load PT_LOAD FILEHDR PHDRS; +} SECTIONS { . = 0xfffffc0000310000; _text = .; - .text : { *(.text) } + .text : { *(.text) } :load .text2 : { *(.text2) } _etext = .;