* ld from binutils 2.9.1 mislinks Alpha kernel?
@ 1998-05-09 14:11 Maciej W. Rozycki
0 siblings, 0 replies; 2+ messages in thread
From: Maciej W. Rozycki @ 1998-05-09 14:11 UTC (permalink / raw)
To: axp-list; +Cc: linux-kernel
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 = .;
^ permalink raw reply [flat|nested] 2+ messages in thread[parent not found: <Pine.LNX.3.96.980509143212.5791D-100000@filesrv1.baby-dragons.com>]
end of thread, other threads:[~1998-05-11 18:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-05-09 14:11 ld from binutils 2.9.1 mislinks Alpha kernel? Maciej W. Rozycki
[not found] <Pine.LNX.3.96.980509143212.5791D-100000@filesrv1.baby-dragons.com>
1998-05-11 18:12 ` Maciej W. Rozycki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox