see below, please. regards,
Richard Erlacher ----- Original Message ----- From: "Dave McGuire" <[EMAIL PROTECTED]> To: <sdcc-user@lists.sourceforge.net> Sent: Saturday, September 06, 2008 5:56 PM Subject: Re: [Sdcc-user] documentation & open source generally > > The assembler generates relocatable object files. The linker > translates those relocatable addresses into absolute addresses, and > writes the resulting memory image to the output file. > I know what a linker does for a living. I just don't know why I'd have to use one when my object code is probably going to be no larger than 64 kB. That would probably only amount to about 25-30 k-lines of code, depending on tables sizes, etc, and that shouldn't require a linker be involved at all. > > If all of your addresses are explicitly defined, then the linker > has very little to do other than generate the memory image to the > output file. No modern assembler that I'm aware of generates binary > (or hex-ified binary) files directly; asx8051 is no exception. > Most of the assemblers I've used over the years do exactly that, as they're processor-specific and not intended for use together with other tools. So you're saying this one isn't able to generate .hex and .omf files directly, is that right? Do you know of any assemblers, not associated with one compiler or another, that behave in this way? I've not encounterd them, though I've used numerous compiler/assembler/linker/debugger suites. I'm sure I've got at least a half-dozen assemblers that simply take a source file and produce .hex or, in the case of MOT processors, .s19 output. Since I'd see no need for a linker in this context, I'd never have looked at the linker doc's to find out how to drive the assembler and generate the necessary output. This is useful information. > > -Dave > > On Sep 6, 2008, at 7:52 PM, Richard Erlacher wrote: >> Yes, I suspected that, but how/why does the linker come into play when >> there's only one ASM module, with all addresses expressly defined? >> Mine is >> a single monolithic ASM file of just under 4200 lines (quite small) >> with no >> includes, no external references at all. Shouldn't this simply >> produce the >> .hex and .omf files on its own? >> >> regards, >> >> Richard Erlacher >> >> ----- Original Message ----- >> From: "Philipp Klaus Krause" <[EMAIL PROTECTED]> >> To: <sdcc-user@lists.sourceforge.net> >> Sent: Saturday, September 06, 2008 4:52 PM >> Subject: Re: [Sdcc-user] documentation & open source generally >> >> >>> Richard Erlacher schrieb: >>> >>>>> $ sdcc --code-loc 0x2000 --data-loc 0x23 nixie-4.rel rtc.rel >>>>> entry.rel i2c_support.rel >>>>> >>>> ... and what is the significance of each of those apparent >>>> directives? >>>> Remember, I'm starting with an ASM file and not the output from the >>>> compiler. Where, if at all, are these directives documented, or, >>>> how did >>>> you find out what they are and when/why they're needed? >>> >>> Well, they're linker options documented in section 3.2.3 of the >>> manual. >>> >>> Philipp >>> >>> --------------------------------------------------------------------- > -- > Dave McGuire > Port Charlotte, FL > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user