Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Link problems with 2.4.3 kernel
@ 2001-04-16 20:09 Scott A McConnell
  2001-04-17 16:32 ` Ralf Baechle
  2001-04-17 17:48 ` Scott A McConnell
  0 siblings, 2 replies; 3+ messages in thread
From: Scott A McConnell @ 2001-04-16 20:09 UTC (permalink / raw)
  To: linux-mips

Using Hardhat linux targeting a NEC VR5432 and a 2.4.0-test 5 kernel I
get an image that looks like the following:

vmlinux:     file format elf32-littlemips

Disassembly of section .text:

0000000080001000 <_ftext>:
 ...
    80002000: 6e 01 00 10 00 00 00 00 00 00 00 00 00 00 00 00
n...............
 ...

0000000080002288 <except_vec0_r4000>:
....
00000000800025bc <kernel_entry>:

--------------------------------------
using the cvs 2.4.3 kernel (about a week old) and the same tool chain I
get an image that looks like:
Using a loadaddr of 8000000

vmlinux:     file format elf32-littlemips

Disassembly of section .text:

0000000080000000 <_ftext>:
    80000000: 6b 01 00 10 00 00 00 00 00 00 00 00 00 00 00 00
k...............
 ...

0000000080000288 <except_vec0_r4000>:
....
00000000800005b0 <kernel_entry>:
 ...

--------------------------------------
If I change the loadaddr to 80001000 I get:

vmlinux:     file format elf32-littlemips

Disassembly of section .text:

0000000080002000 <_ftext>:
    80002000: 6b 01 00 10 00 00 00 00 00 00 00 00 00 00 00 00
k...............
 ...

0000000080002288 <except_vec0_r4000>:
....

00000000800025b0 <kernel_entry>:


-------------------------------------

No matter what I do I can not get _ftext to appear at 80001000. I use
identical ld.scripts for bother kernels.
At first I thought it was my binutils so I switched to the same tools
that I used with my 2.4.0-test5 kernel.

Addresses appear to be off by 0x1000.  Which is why my 2.4.3 kernel dies
on the jump to init_arch out of kernel_entry.

Any thoughts about what I might be doing wrong?


Thanks,
Scott

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Link problems with 2.4.3 kernel
  2001-04-16 20:09 Link problems with 2.4.3 kernel Scott A McConnell
@ 2001-04-17 16:32 ` Ralf Baechle
  2001-04-17 17:48 ` Scott A McConnell
  1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2001-04-17 16:32 UTC (permalink / raw)
  To: Scott A McConnell; +Cc: linux-mips

On Mon, Apr 16, 2001 at 01:09:37PM -0700, Scott A McConnell wrote:

> No matter what I do I can not get _ftext to appear at 80001000. I use
> identical ld.scripts for bother kernels.
> At first I thought it was my binutils so I switched to the same tools
> that I used with my 2.4.0-test5 kernel.
> 
> Addresses appear to be off by 0x1000.  Which is why my 2.4.3 kernel dies
> on the jump to init_arch out of kernel_entry.
> 
> Any thoughts about what I might be doing wrong?

Thinking you can change the address to 0x80001000.  .text needs 8kb
aligment for 32-bit kernels, 16kb for 64-bit.

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Link problems with 2.4.3 kernel
  2001-04-16 20:09 Link problems with 2.4.3 kernel Scott A McConnell
  2001-04-17 16:32 ` Ralf Baechle
@ 2001-04-17 17:48 ` Scott A McConnell
  1 sibling, 0 replies; 3+ messages in thread
From: Scott A McConnell @ 2001-04-17 17:48 UTC (permalink / raw)
  To: linux-mips

Scott A McConnell wrote:

> No matter what I do I can not get _ftext to appear at 80001000. I use
> identical ld.scripts for bother kernels.
> At first I thought it was my binutils so I switched to the same tools
> that I used with my 2.4.0-test5 kernel.
>
> Addresses appear to be off by 0x1000.  Which is why my 2.4.3 kernel dies
> on the jump to init_arch out of kernel_entry.
>
> Any thoughts about what I might be doing wrong?
>
> Thanks,
> Scott

I tracked it down to a missing:

ifdef LOADADDR
LINKFLAGS     += -Ttext $(word 1,$(LOADADDR))
endif

in arch/mips/Makefile

I have no idea who added it or removed it.

I also am forced to edit the ld.script file to replace the LOADADDR
inserted with sed with 80000000.

Am I suppose to be accomplishing what I did above some other way?

Scott

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-04-17 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-16 20:09 Link problems with 2.4.3 kernel Scott A McConnell
2001-04-17 16:32 ` Ralf Baechle
2001-04-17 17:48 ` Scott A McConnell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox