From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: axp-list@redhat.com
Cc: linux-kernel@vger.rutgers.edu
Subject: ld from binutils 2.9.1 mislinks Alpha kernel?
Date: Sat, 9 May 1998 16:11:21 +0200 (MET DST) [thread overview]
Message-ID: <Pine.GSO.3.96.980509153704.9715A-100000@delta.ds2.pg.gda.pl> (raw)
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 = .;
next reply other threads:[~1998-05-09 14:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-09 14:11 Maciej W. Rozycki [this message]
[not found] <Pine.LNX.3.96.980509143212.5791D-100000@filesrv1.baby-dragons.com>
1998-05-11 18:12 ` ld from binutils 2.9.1 mislinks Alpha kernel? Maciej W. Rozycki
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox