This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: objcopy error in redboot makefile




> Henri wrote:
> > Hi all
> >
> > I get the following error with ecos v 2  and not with an earlier version
> > from feb 2002. A successful version of Redboot was produced with the
older
> > version of ecos and config tool . The recent version of ecos 2.0 (this
> > month) and configtool 2.11 produce the objcopy error.
> >
> > Any hints of what to look for ???
>
> Weird. It isn't even changing format - it's just ELF to ELF. Can you do a
> "mipsisa32-elf-objdump -h redboot.elf" ?
>
this is a copy of a working build of ecos using the older version of ecos
using the command
redboot.elf:     file format elf32-bigmips

Sections:
Idx Name          Size      VMA               LMA               File off
Algn
  0 .rom_vectors  00000498  ffffffff9fc00000  ffffffff9fc00000  00001000
2**0
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .init         00000000  ffffffff9fc004c0  ffffffff9fc004c0  000274b0
2**0
                  CONTENTS
  2 .text         0001e538  ffffffff9fc004c0  ffffffff9fc004c0  000014c0
2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  3 .fini         00000000  ffffffff9fc1ea00  ffffffff9fc1ea00  000274b0
2**0
                  CONTENTS
  4 .rodata       00005950  ffffffff9fc1ea00  ffffffff9fc1ea00  0001fa00
2**3
                  CONTENTS, ALLOC, LOAD, DATA
  5 .rodata1      00000000  ffffffff9fc24380  ffffffff9fc24380  000274b0
2**0
                  CONTENTS
  6 .data         00001d68  ffffffff80000400  ffffffff9fc24380  00025400
2**3
                  CONTENTS, ALLOC, LOAD, CODE
  7 .data1        00000000  ffffffff80002180  ffffffff80002180  000274b0
2**0
                  CONTENTS
  8 .eh_frame     00000000  ffffffff80002180  ffffffff80002180  000274b0
2**0
                  CONTENTS
  9 .gcc_except_table 00000000  ffffffff80002180  ffffffff80002180  000274b0
2**0
                  CONTENTS
 10 .ctors        00000008  ffffffff80002180  ffffffff9fc26100  00027180
2**2
                  CONTENTS, ALLOC, LOAD, DATA
 11 .dtors        00000000  ffffffff800021c0  ffffffff800021c0  000274b0
2**0
                  CONTENTS
 12 .devtab       000002f0  ffffffff800021c0  ffffffff9fc26140  000271c0
2**3
                  CONTENTS, ALLOC, LOAD, DATA
 13 .got          00000000  ffffffff800024c0  ffffffff800024c0  000274b0
2**0
                  CONTENTS
 14 .dynamic      00000000  ffffffff800024c0  ffffffff800024c0  000274b0
2**0
                  CONTENTS
 15 .sdata        00000000  ffffffff800024c0  ffffffff800024c0  000274b0
2**0
                  CONTENTS, ALLOC, LOAD, DATA
 16 .lit8         00000000  ffffffff800024c0  ffffffff800024c0  000274b0
2**0
                  CONTENTS, ALLOC, LOAD, DATA
 17 .lit4         00000000  ffffffff800024c0  ffffffff800024c0  000274b0
2**0
                  CONTENTS, ALLOC, LOAD, DATA
 18 .vsr_table    00000000  ffffffff800024c0  ffffffff800024c0  000274b0
2**0
                  CONTENTS
 19 .sbss         000000c4  ffffffff800024c0  ffffffff800024c0  000004c0
2**3
                  ALLOC
 20 .bss          00009778  ffffffff800025c0  ffffffff800025c0  000004fc
2**4
                  ALLOC
 21 .debug_aranges 00001bf8  0000000000000000  0000000000000000  000274b0
2**0
                  CONTENTS, READONLY, DEBUGGING
 22 .debug_pubnames 00003380  0000000000000000  0000000000000000  000290a8
2**0
                  CONTENTS, READONLY, DEBUGGING
 23 .debug_info   0005c73b  0000000000000000  0000000000000000  0002c428
2**0
                  CONTENTS, READONLY, DEBUGGING
 24 .debug_abbrev 000078b7  0000000000000000  0000000000000000  00088b63
2**0
                  CONTENTS, READONLY, DEBUGGING
 25 .debug_line   00023eef  0000000000000000  0000000000000000  0009041a
2**0
                  CONTENTS, READONLY, DEBUGGING
 26 .debug_frame  00006464  0000000000000000  0000000000000000  000b430c
2**2
                  CONTENTS, READONLY, DEBUGGING



this is a copy of the build that causes the problem (more recent ecos) with
the same command

redboot.elf:     file format elf32-bigmips

Sections:
Idx Name          Size      VMA               LMA               File off
Algn
  0 .rom_vectors  00000498  ffffffff9fc00000  ffffffff9fc00000  00001000
2**0
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .init         00000000  ffffffff9fc004c0  ffffffff9fc004c0  00028390
2**0
                  CONTENTS
  2 .text         0001edc0  ffffffff9fc004c0  ffffffff9fc004c0  000014c0
2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  3 .fini         00000000  ffffffff9fc1f280  ffffffff9fc1f280  00028390
2**0
                  CONTENTS
  4 .rodata       00005c68  ffffffff9fc1f280  ffffffff9fc1f280  00020280
2**3
                  CONTENTS, ALLOC, LOAD, DATA
  5 .rodata1      00000000  ffffffff9fc24f00  ffffffff9fc24f00  00028390
2**0
                  CONTENTS
  6 .data         00001b68  ffffffff80000400  ffffffff9fc24f00  00026400
2**2
                  CONTENTS, ALLOC, LOAD, CODE
  7 .data1        00000000  ffffffff80001f80  ffffffff80001f80  00028390
2**0
                  CONTENTS
  8 .eh_frame     00000000  ffffffff80001f80  ffffffff80001f80  00028390
2**0
                  CONTENTS
  9 .gcc_except_table 00000000  ffffffff80001f80  ffffffff80001f80  00028390
2**0
                  CONTENTS
 10 .ctors        00000008  ffffffff80001f80  ffffffff9fc26a80  00027f80
2**2
                  CONTENTS, ALLOC, LOAD, DATA
 11 .dtors        00000000  ffffffff80001fc0  ffffffff80001fc0  00028390
2**0
                  CONTENTS
 12 .devtab       000003d0  ffffffff80001fc0  ffffffff9fc26ac0  00027fc0
2**3
                  CONTENTS, ALLOC, LOAD, DATA
 13 .got          00000000  ffffffff800023c0  ffffffff800023c0  00028390
2**0
                  CONTENTS
 14 .dynamic      00000000  ffffffff800023c0  ffffffff800023c0  00028390
2**0
                  CONTENTS
 15 .sdata        00000000  ffffffff800023c0  ffffffff800023c0  00028390
2**0
                  CONTENTS, ALLOC, LOAD, DATA
 16 .lit8         00000000  ffffffff800023c0  ffffffff800023c0  00028390
2**0
                  CONTENTS, ALLOC, LOAD, DATA
 17 .lit4         00000000  ffffffff800023c0  ffffffff800023c0  00028390
2**0
                  CONTENTS, ALLOC, LOAD, DATA
 18 .vsr_table    00000000  ffffffff800023c0  ffffffff800023c0  00028390
2**0
                  CONTENTS
 19 .sbss         000000c4  ffffffff800023c0  ffffffff800023c0  000003c0
2**3
                  ALLOC
 20 .bss          000092c8  ffffffff800024c0  ffffffff800024c0  000003fc
2**4
                  ALLOC
 21 .debug_aranges 00001d18  0000000000000000  0000000000000000  00028390
2**0
                  CONTENTS, READONLY, DEBUGGING
 22 .debug_pubnames 00003524  0000000000000000  0000000000000000  0002a0a8
2**0
                  CONTENTS, READONLY, DEBUGGING
 23 .debug_info   00067580  0000000000000000  0000000000000000  0002d5cc
2**0
                  CONTENTS, READONLY, DEBUGGING
 24 .debug_abbrev 00008031  0000000000000000  0000000000000000  00094b4c
2**0
                  CONTENTS, READONLY, DEBUGGING
 25 .debug_line   000274e2  0000000000000000  0000000000000000  0009cb7d
2**0
                  CONTENTS, READONLY, DEBUGGING
 26 .debug_frame  00006824  0000000000000000  0000000000000000  000c4060
2**2
                  CONTENTS, READONLY, DEBUGGING







> And can you show the relevant bit of the map file?


.got            0x00000000800023c0        0x0 load address
0x000000009fc26ec0
                0x00000000800023c0                .=.
 *(.got.plt)
 *(.got)

.dynamic        0x00000000800023c0        0x0 load address
0x000000009fc26ec0
                0x00000000800023c0                .=.
 *(.dynamic)

.sdata          0x00000000800023c0        0x0 load address
0x000000009fc26ec0
                0x00000000800023c0                .=.
 *(.sdata)
 *(.sdata.*)
 *(.gnulinkonce.s*)

.lit8           0x00000000800023c0        0x0 load address
0x000000009fc26ec0
                0x00000000800023c0                .=.
 *(.lit8)

.lit4           0x00000000800023c0        0x0 load address
0x000000009fc26ec0
                0x00000000800023c0                .=.
 *(.lit4)
                0x00000000800023c0                __ram_data_end=.
                0x00000000800023c0                _edata=.
                0x00000000800023c0                PROVIDE (edata, .)

.vsr_table      0x00000000800023c0        0x0 load address
0x000000009fc26ec0
                0x00000000800023c0                .=.
 *(.vsr_table)
                0x00000000800023c0                __bss_start=.
                0x00000000800023c0                _fbss=.

.sbss           0x00000000800023c0       0xc4



And which target is it
> so we can look at the MLT files?

its almost identical to the atlas mlt file but a pci_window  section had to
be added
(as in the ocelot platform) and vsr_table was added as it was not in the
atlas
version 0
region ram 80000400 ffc00 0 !
region rom 9fc00000 80000 1 !
section data 0 40 1 1 1 1 0 1 80000400 data1 data1 !
section data1 0 40 1 1 0 1 0 1 eh_frame eh_frame !
section eh_frame 0 40 1 1 0 1 0 1 gcc_except_table gcc_except_table !
section gcc_except_table 0 40 1 1 0 1 0 1 ctors ctors !
section ctors 0 40 1 1 0 1 0 1 dtors dtors !
section dtors 0 40 1 1 0 1 0 1 devtab devtab !
section devtab 0 40 1 1 0 1 0 1 got got !
section got 0 40 1 1 0 1 0 1 dynamic dynamic !
section dynamic 0 40 1 1 0 1 0 1 sdata sdata !
section sdata 0 40 1 1 0 1 0 1 lit8 lit8 !
section lit8 0 40 1 1 0 1 0 1 lit4 lit4 !
section lit4 0 40 1 1 0 1 0 1 vsr_table vsr_table !
section vsr_table 0 40 1 1 0 1 0 0 sbss !
section sbss 0 40 0 1 0 1 0 1 bss bss !
section bss 0 40 0 1 0 1 0 1 heap1 heap1 !
section heap1 0 8 0 0 0 0 0 0 !
section pci_window 5000 1 0 0 1 0 1 0 800fb000 800fb000 !
section rom_vectors 0 1 0 1 1 1 1 1 9fc00000 9fc00000 ROMISC ROMISC !
section ROMISC 0 40 0 1 0 1 0 1 RELOCS RELOCS !
section RELOCS 0 40 0 1 0 1 0 1 init init !
section init 0 40 0 1 0 1 0 1 text text !
section text 0 40 0 1 0 1 0 1 fini fini !
section fini 0 40 0 1 0 1 0 1 rodata rodata !
section rodata 0 40 0 1 0 1 0 1 rodata1 rodata1 !
section rodata1 0 40 0 1 0 0 0 1 data !




> Jifl
>


> > the mlt file is the same as was working before with the older version of
> > ecos and was generated with the 1.3.1.2 config tool.
> >
> > the rom.map file shows that shure enough the section that causes trouble
is
> > at the address shown in the message.
> >
> > mipsisa32-elf-objcopy --strip-all
> > /ecos-d/cygwin/redbootdir/output/install/bin/redboot.elf
> > /ecos-d/cygwin/redbootdir/output/install/bin/redboot.img
> > BFD: Error: First section in segment (.sdata) starts at 0x800023c0
> > BFD:        whereas segment starts at 0x80002000
> > mipsisa32-elf-objcopy:
> > /ecos-d/cygwin/redbootdir/output/install/bin/redboot.img: error 0
> > BFD: Error: First section in segment (.sdata) starts at 0x800023c0
> > BFD:        whereas segment starts at 0x80002000
> > mipsisa32-elf-objcopy:
> > /ecos-d/cygwin/redbootdir/output/install/bin/redboot.img: error 0
> > make.exe[1]: ***
[/ecos-d/cygwin/redbootdir/output/install/bin/redboot.srec]
> > Error 1
> > make.exe[1]: Leaving directory
`/redbootdir/output/hal/mips/c2r2/current'
> > make.exe: *** [build] Error 2
> >
> >
> >
>
>
> --
> eCosCentric       http://www.eCosCentric.com/       <info@eCosCentric.com>
> --[ "You can complain because roses have thorns, or you ]--
> --[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine
>



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]