This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

Generating assembly listing from newlib sourcecode


Hi, is it possible to generate in some way maybe using -S of gcc
assembly listings of newlib for the MIPS architecture?

The problem is as follows: we need to make, for illustration purposes,
some step by step execution inside the SPIM simulator (a MIPS
processor simulator). This simulator unfortunately works directly with
text files, usually handwritten. We need to do the same but from
assembly language listings generated by gcc from simple C programs,
maybe just a printf("Hello") message. As far as I got I managed to get
my C program in assembly (with -S) but with jumps to newlib functions
like printf().  The SPIM simulator can't resolve this jumps unless we
feed it with some assembly listing that includes (if possible) the
entry point and code for printf() with the syscalls that it possibly
generates.

I don't know if all this is possible its just for teaching so it
doesn't need to be a very elegant solution if it exists. Maybe I can
copy & paste the printf code in a new file and compile it separately I
don't know. Any comments will be very helpful for sure. Thanks in
advance. Manuel.


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