??? 05/08/06 22:47 Read: times |
#115831 - Compiler & Linker Responding to: ???'s previous message |
Conceptually, the Compiler & Linker are separate tools. In some products, they are separate executables; eg Keil has a separate C51.exe (compiler) and BL51.exe or LK51.exe (linkers) On UNIX systems, it is common for a single command to invoke the Compiler, the Linker, or both! This seems to be the model followed by SDCC. However, SDCC can only Compiler a single source file at a time - see: http://sdcc.sourceforge.net/doc/sdccm...ode42.html So, to compile multiple source files, either: sdcc -c file-1.c -- just compile file-1.c to file-1.rel sdcc -c file-2.c -- just compile file-2.c to file-2.rel : sdcc -c file-n.c -- just compile file-n.c to file-n.rel sdcc file-1.rel file-2.rel ... file-n.rel -- link all the objects togetherOr: sdcc -c file-1.c -- just compile file-1.c to file-1.rel sdcc -c file-2.c -- just compile file-2.c to file-2.rel : sdcc file-n.c file-1.rel file-2.rel ... -- compile file-1.c and link with all the other objects Michael Ruoppoli said:
All of the assembly code for each is in the asm files but why is it not combined together in the TempTest file that runs in the simulator? Because the Listing files are the result of the Compilation process - hence they only reflect the individual source files in isolation. Also, because they reflect the un-linked, relocatable object files, external references are not completed |
Topic | Author | Date |
Linker problem using SDCC | 01/01/70 00:00 | |
Linker??? | 01/01/70 00:00 | |
Linker! | 01/01/70 00:00 | |
I doubt SDCC would do that | 01/01/70 00:00 | |
Ok not the linker? | 01/01/70 00:00 | |
Sorry forgot to mention that I am using | 01/01/70 00:00 | |
Compiler & Linker | 01/01/70 00:00 | |
Nothing linked | 01/01/70 00:00 | |
SDCC File types | 01/01/70 00:00 | |
Linker problem | 01/01/70 00:00 | |
Then what is the problem? | 01/01/70 00:00 | |
Simulator only sees the "main" program | 01/01/70 00:00 | |
simulator and/or IDE problem? | 01/01/70 00:00 | |
Maybe this will illustrate ... | 01/01/70 00:00 | |
BiPOM says | 01/01/70 00:00 | |
SDCC new release? | 01/01/70 00:00 | |
Q2 | 01/01/70 00:00 | |
SDCC new Release Q2 - | 01/01/70 00:00 | |
where is this code? | 01/01/70 00:00 | |
I used --no-peep SDCC | 01/01/70 00:00 | |
linking multiple files | 01/01/70 00:00 |