Fichier de link pour powerpc

Fichier de link pour powerpc - C - Programmation

Marsh Posté le 12-03-2009 à 15:00:39    

Bonjour,
 
Je travaille sur un petit programme qui se charge sur une cible powerpc. Il n'y a aucun OS.  
Je compile mon programme avec la commande suivante:
powerpc-eabi-gcc -O2 -g -Wall -mcpu=603 -N -static -T linkcmds -e _start config.o init8260.o 8260_int.o uart.o Myprintf.o Sdram.o vect_tbl.o main.o -o init8260.exe
 
Dans ce cas, lorsque je charge l'éxecutable sous ddd j'obtient l'erreur suivante:
(no debugging symbols found)
 
Je n'accède donc pas à mes fichiers source.  
 
Hors si je compile en supprimant l'option -T linkcmds, le problème ne survient plus...  
 
Qu'est ce qui se passe? Pourquoi les symbols ne sont plus générés?  
 
Mon script de link est le suivant:
 
OUTPUT_ARCH(powerpc)
__DYNAMIC  =  0;
 
MEMORY
{
  rom     : ORIGIN = 0xFF000000, LENGTH = 256
  stack   : ORIGIN = 0x00002000, LENGTH = 0x1000
  ram1    : ORIGIN = 0x00003000, LENGTH = 0x3800
  ram2    : ORIGIN = 0x00006800, LENGTH = 0x4000
  flash_boot : ORIGIN = 0x00010000,  LENGTH = 0x2000
  flash   : ORIGIN = 0x00020000,  LENGTH = 0x1000000
  vect    : ORIGIN = 0x01300100,  LENGTH = 0x10000  
  ram3    : ORIGIN = 0x01400000, LENGTH = 0x10000
}
 
SECTIONS
{
   .data  : {} > ram1
   .bss  : {} > ram2
   .flash_boot : {config.o(.text)} > flash_boot
   .text : { *(.text)} > flash
   .vect : {vect_tbl.o(.text)} > vect
   .rest : { *(.*) } > ram3
}
 
__SP_INIT     = 0x3000;      
__SP_END        = 0x2000;
 
Merci.
 
Olivier

Reply

Marsh Posté le 12-03-2009 à 15:00:39   

Reply

Marsh Posté le 12-03-2009 à 16:51:19    

muadiib a écrit :


powerpc-eabi-gcc -O2 -g -Wall -mcpu=603 -N -static -T linkcmds -e _start config.o init8260.o 8260_int.o uart.o Myprintf.o Sdram.o vect_tbl.o main.o -o init8260.exe


-g doit être utilisé pour compiler, pas [que pour ]pour linker... Montre comment tu compiles.
 


---------------
Des infos sur la programmation et le langage C: http://www.bien-programmer.fr Pas de Wi-Fi à la maison : http://www.cpl-france.org/
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed