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


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

RE: Function call problem


I would agree with you except that I am looking at a listing generated
directly from the executable.  i.e.:

make ads-test
	compiles test.c to test.o
	Links test.o with crt0.o, libads.a, etc. into ads-test.x (elf file)
	Converts ads-test.x to ads-test.srec
	objdump -d ads-test.x > ads-test.dis

The file ads-test.dis shows that the test() and test2() functions are not
being called.
The same thing shows up when I load it into the dev board.  Wherever test is
called there is a 'bl 100b0' which is the beginning of '.Etext0'.

It seems that the linker does not resolve all function calls.

Anything else you can think of?  I'm going to play around, see if I can
build a plain vanilla program (no library calls, minimal makefile, etc.)

Thanks again for your help,

Richard E. Duszczak
Design/Software Engineer
Enikia, Inc.
E-mail: richd@enikia.com
(732) 980-1200 x2777 (Voice)
(732) 980-0700 (Fax)
http://www.enikia.com/
	


-----Original Message-----
From: Robert J. Brown [mailto:rj@eli.elilabs.com]
Sent: Friday, June 18, 1999 12:55 PM
To: crossgcc@cygnus.com
Subject: RE: Function call problem


>>>>> "Duszczak," == Duszczak, Richard <richd@enikia.com> writes:

    Duszczak,> This only happens to functions that I add.  Also, if I
    Duszczak,> move test() and test2() into the libads.a library main
    Duszczak,> can now call test() fine, but test() does not call
    Duszczak,> test2() properly.

    Duszczak,> This problem is driving me crazy.  Is there something
    Duszczak,> wrong with the way I'm doing this?  I used the exact
    Duszczak,> same makefile used to build the original ads-test
    Duszczak,> program.  Could this be a bug in the compiler/linker?

    Duszczak,> ANY advice or info would be greatly appreciated.

It looks to me like perhaps you are compiling the new source file, but 
somehow still linking with the old object file that was compiled
before your changes.  This causes the debugger to incorrectly display
stuff, because it is looking at the load map and the new object file,
but memory is from the old object file.  YMMV

-- 
--------  "And there came a writing to him from Elijah"  [2Ch 21:12]
--------
R. J. Brown III  rj@elilabs.com http://www.elilabs.com/~rj  voice 847
543-4060
Elijah Laboratories Inc. 457 Signal Lane, Grayslake IL 60030  fax 847
543-4061
-----  M o d e l i n g   t h e   M e t h o d s   o f   t h e   M i n d
------
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.

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