This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: Preventing cross-gdb/insight download of specific sections?


The easiest way is to use objcopy to strip off the sections you don't
want.  Then download the stripped file, but load symbols from the
original.

--
Richard Sewards 


-----Original Message-----
From: Toralf Lund [mailto:toralf@procaptura.com] 
Sent: Tuesday, September 21, 2004 4:15 AM
To: crossgcc
Subject: Preventing cross-gdb/insight download of specific sections?

Somewhat off-topic, but...

Does anyone know how I can skip specific sections from the insight/gdb 
download to my board, or alternatively, leave them out from the binary 
file (without getting unresolved symbols)?

The ld manual says

    The special output section name `/DISCARD/' may be used to discard
    input sections.  Any input sections which are assigned to an output
    section named `/DISCARD/' are not included in the output file.

So I tried
  .fpga :
  {
    . += 1;
    . = ALIGN(64K);    /* We may assume vector section <64K */
    xc2*.o*(.data*)
    . = ALIGN(64K);    /* Let (load addr of) next section be nicely 
aligned */
  }  > flash AT > /DISCARD/

and also just
   } > /DISCARD/
at the last line

(.fpga is the section I wan to leave out) but got

/usr/arm-coff/bin/ld: section .fpga [00000000 -> 0002ffff] overlaps 
section .dbgvect [00000000 -> 00000023]

(where .dbgvect is a section starting at address 0 which I do wand.)

Also, I tried assigning an address to /DISCARD/ (even though this didn't

seem right), but then the linker would happily include it, and the 
debugger download it.

Help, anyone?

- Toralf

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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