U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* M68K Vectors
@ 2024-07-25 21:35 Peter LaDow
  2024-07-26 19:46 ` Peter LaDow
  0 siblings, 1 reply; 15+ messages in thread
From: Peter LaDow @ 2024-07-25 21:35 UTC (permalink / raw)
  To: u-boot

I'm trying to add support for a custom Colfire based board.  I have
things building, but the final linked vectors in start.S do not point
to _start.  In start.S I have:

_vectors:
.long   0x00000000              /* Flash offset is 0 until we setup CS0 */
.long   _START

.long   _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
.long   _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
.long   _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT

Dumping the symbols in the final u-boot yields:

$ m68k-linux-gnu-nm -n u-boot
00000000 A __fixup_entries
00000000 A __got2_entries
00000000 t _vectors
00000400 T _start
0000047e T relocate_code
000004ae t fixloop

But then dumping the raw binary:

u-boot:     file format elf32-m68k

Contents of section .text:
00000 00000000 00000000 00000516 00000516  ................
00010 00000516 00000516 00000516 00000516  ................
00020 00000516 00000516 00000516 00000516  ................
00030 00000516 00000516 00000516 00000516  ................

Note at offset 4 it is 0x00000000, not 0x00000400 as I'd expect.

The final linker script has:

OUTPUT_ARCH(m68k)
ENTRY(_start)
SECTIONS
{
.text :
{
 arch/m68k/cpu/mcf548x/start.o (.text*)
 . = DEFINED(env_offset) ? env_offset : .; env/embedded.o(.text*);
 *(.text*)
}


It is difficult to search the archives, and so far I haven't found
anything.  Any help would be appreciated.

-- 
To love for the sake of being loved is human, but to love for the sake
of loving is angelic. -- Alphonse de Lamartine.

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

end of thread, other threads:[~2024-08-13 16:02 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-25 21:35 M68K Vectors Peter LaDow
2024-07-26 19:46 ` Peter LaDow
2024-07-26 19:59   ` Fabio Estevam
2024-07-26 20:16     ` Peter LaDow
2024-07-26 20:22       ` Peter LaDow
2024-07-28 21:03         ` Angelo Dureghello
2024-07-29 14:27           ` Peter LaDow
2024-07-30 13:49             ` Angelo Dureghello
2024-07-30 15:43               ` Peter LaDow
2024-07-30 19:09                 ` Peter LaDow
2024-07-31 10:10                   ` Angelo Dureghello
2024-07-31 14:47                     ` Peter LaDow
2024-08-13 16:02                       ` Peter LaDow
2024-07-29 14:58           ` Peter LaDow
2024-07-29 22:27             ` Peter LaDow

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