1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-11 05:29:33 +00:00
Commit Graph

516 Commits

Author SHA1 Message Date
ol.sc
610bb14988 Avoid mixing of memory areas and segments in address computations (and made move of segment INIT somewhat more readable).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5726 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 22:13:58 +00:00
ol.sc
7691da610b I just don't like 'file = "" '.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5725 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 21:12:56 +00:00
ol.sc
b7b7de55d0 Replaced "throwing away" of memeory area HEADER with the much more elegant "not referring" of symbol __EXEHDR__. This was recently made possible for the asm program config.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5724 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 21:06:13 +00:00
ol.sc
094ffa1984 Renamed segment 'HIGHCODE' to 'LC because:
1. Its use isn't limited to code. It may as well be used for rodata.
2. This fits better to the new __LCADDR__ / __LCSIZE__ parameters.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5723 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 20:57:49 +00:00
ol.sc
c9555b328a The Apple2 linker configs basically cover two dimension of settings:
1. BIN vs. SYS vs. Loader
2. With Quit code vs. w/o Quit code vs. full LC

Up two now these two dimensions were sort of folded into a number of useful combinations. However with the new asm config and the upcominger overlay config we end up with just to many configs.

Therefore now the second dimension isn't expressed anymore as distinct config. Rather the user has to override __LCADDR__ and __LCSIZE__ in order use the Quite code area or the full LC.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5722 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-16 20:36:34 +00:00
ol.sc
b014bd8196 Added basic Apple linker config for assembler programs (similiar to C64).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5717 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-14 20:59:08 +00:00
ol.sc
95686b169e Moved actual computation of DOS 3.3 header to linker configurations:
- This will allow for different "formulas".
- This brings things together in one place.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5716 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-14 20:44:35 +00:00
ol.sc
9cc99876b2 Moved Apple EXEHDR to separate module (similiar to CBMs).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5708 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-10 21:05:51 +00:00
ol.sc
45bf954fbe Better define 'EXTBSS' to allow developer to memset() set it to zero on startup.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5698 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-10 12:37:32 +00:00
ol.sc
ffc06fcea3 Apple GEOS reserves beside the main app area at $4000-$C000 a secondary app area at $0C00-$2000. While it was an elegant idea to use that secondary area for overlays at the end of the day those 5 kB are just too small. So now overlays go at the end of the main area (as with GEOS 64/128).
However the stack (usually 1 kB) can be securely placed in the secondary area without effort from the side of the developer. The rest of the secondary area (usually 4 kB) is made available to the developer as (uninitialized) 'EXTBSS'.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5696 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-08 21:46:51 +00:00
ol.sc
3cb0cce00d Added secondary linker config for C64 overlays (incl. demo program).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5679 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-03 16:16:11 +00:00
uz
35e1184901 Removed unneeded include files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5630 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-01 15:48:11 +00:00
uz
772d51aa5e Added handling of new expression opcodes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5411 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-19 11:55:36 +00:00
uz
1fccae4cff Finish support for .BANK.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5384 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-04 22:45:26 +00:00
uz
02cbc7da25 Moved the segdefs module to ca65, since it was used only there and renamed it
to segdef, since there might be a new segdefs module in common soon.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5381 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-04 22:02:02 +00:00
uz
ad88e77f43 Fixed an error in file offset calculation.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5380 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-04 21:45:11 +00:00
uz
cb4ba24089 Fixed copy & paste errors in comments.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5379 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-04 21:44:46 +00:00
uz
9e68be3842 Started to add a new .BANK instruction that allows access to a memory area
attribute named "bank". Some error checks and a lot of testing is required.
Don't use for now.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5375 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-03 21:41:34 +00:00
ol.sc
74be82e77e Minimal beautification.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5374 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-03 21:14:33 +00:00
uz
b16a12d260 Adjusted/added names of geos include files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5371 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-03 08:25:04 +00:00
ol.sc
5863777995 Introduced __BACKBUFSIZE__ which can be set to zero in order to disable the GEOS background buffering.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5370 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-03 00:32:46 +00:00
uz
a9f48e663b Symbols imported from the linker config must have the config file position
added to the symbol references, not the definitions.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5367 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-02 12:39:55 +00:00
ol.sc
f24ff82ea2 Renamed apple-geos.cfg to geos-apple.cfg and added it as built-in configuration.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5366 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-02 12:28:44 +00:00
ol.sc
4c82d5e0c2 Renamed geos.cfg to geos-cbm.cfg.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5365 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-02 12:18:18 +00:00
uz
e935c8fead Fixed a problem: For symbols of type weak or external defined in the linker
config, a value is mandatory, but the check inside the code checked for the
TYPE attribute instead of the VALUE attribute.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5357 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-01 20:29:42 +00:00
uz
081308942c Let the linker generate a new symbol __NAME_FILEOFFS__ that contains the
offset of a memory area in the output file. Partially based on a contribution
by David M. Lloyd, david.lloyd@redhat.com.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5351 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-31 15:21:33 +00:00
uz
6ead4abf24 Added support for arbitrary alignments.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5341 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-28 16:28:19 +00:00
ol.sc
920a3eb794 First steps towards supporting Apple GEOS.
- The generated file is a "Apple GEOS Convert" format.
- VLIR support is yet to come.
- The "Apple GEOS UnConvert" tool is yet to come.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5336 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-27 23:36:05 +00:00
ol.sc
d810ed97d2 Redesigned GEOS VLIR linking:
- No more post-linking with resource compiler, rather ld65 directly creates the VLIR CVT file.
- No more dynamic linker config creation, rather the built-in 'geos' config is usable both for SEQ CVT and VLIR CVT files.

ToDos:
- Have ld65 accept alignment to $FD.
- Adjust docs / samples.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5314 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-26 22:54:04 +00:00
uz
e63dcb46f1 Fixed an error: Symbol references for csyms were output as local, not global
ids.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5292 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-09-01 10:00:31 +00:00
uz
8fc851b338 Write out global symbols to the debug file. Added some fixes for unusual
situations (extern symbols without attached import, because the import wasn't
referenced and therefore removed by the assembler).


git-svn-id: svn://svn.cc65.org/cc65/trunk@5290 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-31 20:48:40 +00:00
uz
2438497e9f Shorten "extern" -> "ext".
git-svn-id: svn://svn.cc65.org/cc65/trunk@5286 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 13:04:08 +00:00
uz
aaa21c6417 More work on high level language debug symbols. They are now passed correctly
via the object files to the linker and written to the debug info file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5285 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-30 11:42:26 +00:00
uz
c2bf1b9ba4 Some code cleanup.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5282 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-29 20:30:57 +00:00
uz
1e0ab407cd Added the LineInfo count to the info line of the debug info file. This allows
the debug info module to reduce memory usage.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5265 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 21:52:40 +00:00
uz
374b106b06 Maintain the types as separate indexed items in the debug info file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5263 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 18:22:45 +00:00
uz
b064002266 Added a tpool module that implements a global pool for generic types, so we
can merge duplicate ones and assign them global ids.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5262 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 17:53:00 +00:00
uz
fda7934e68 Do not resolve the lists of spans for LineInfos and Scopes, but keep them as
ids. This way, we can delay loading spans until we know that we definitely
need an object file. 
Did some restructuring for writing of span lists to the debug info file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5261 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-22 17:36:19 +00:00
uz
660df16d08 Write out type information for spans to the debug info file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5258 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 20:18:09 +00:00
uz
913db79017 Add an optional type to a span.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5253 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 19:44:02 +00:00
uz
358ccf236e Write spans out in a separate object file section. This allows to merge
duplicate spans in an object file and more extensions to come.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5250 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 19:08:23 +00:00
uz
bf889a1928 Implementation of StringPool has changed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5240 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:16:14 +00:00
uz
6a01a3407a Read the segment size as var, not as 32 bit value.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5234 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 20:56:44 +00:00
uz
307b8d88c3 Reenable optimizations.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5223 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:46:49 +00:00
uz
68db31c53b Changed data type used to store line numbers from unsigned long to unsigned.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5222 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:44:45 +00:00
uz
5f0e6dd7e9 Output all positions in a file for unresolved externals.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5221 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:40:11 +00:00
uz
2a038ffef9 Output line info for symbol definition and references.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5216 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:55:53 +00:00
uz
1797235794 Read and manage additional line information for symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5215 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:27:18 +00:00
uz
d3017665d2 Replace single linked list of sections in a segment by a collection.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5208 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 11:58:16 +00:00
uz
2abd77ffe5 Use correct syntax. The old did work but wasn't really right.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5207 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 11:57:57 +00:00
uz
11d46e93b2 Export NewSpan() - this will be needed later.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5206 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 11:57:17 +00:00
uz
0077e37182 If a symbol is an import, the corresponding export does only have a debug
symbol id if the module contains debug information.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5203 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:13:11 +00:00
uz
50adbf61f1 Mark imports using "type=imp".
git-svn-id: svn://svn.cc65.org/cc65/trunk@5200 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 09:56:53 +00:00
uz
3996725f44 Write imports out to the debug info file. Add the id of the corresponding
export.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5186 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 13:58:59 +00:00
uz
11be5d6261 Handle the new symbol flags correctly. Changed - among other things - the
data types of members in the management structures.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5180 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 11:50:27 +00:00
uz
34d393a76f Fixed problems with the range check on 64 bit machines.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5173 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 17:25:49 +00:00
uz
aaa19a569d The line number is now of type unsigned.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5172 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 17:25:23 +00:00
uz
e7fe36399b Grow the line info collection as needed before actually adding items. This
reduces memory consumption.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5164 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-14 20:05:20 +00:00
uz
17e2276f38 Adapted to new line infos and spans as written to the object file by the
assembler.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5163 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-14 19:24:03 +00:00
uz
b8d43cee42 Tracked rename of hashstr -> hashfunc.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5156 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-12 15:36:53 +00:00
uz
434c818d20 Fixed an error in the INFO line.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5154 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-11 21:58:12 +00:00
uz
b4967d359f Output spans to the debug info file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5152 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-11 17:11:45 +00:00
uz
36c99befcc Output ids for line infos to the debug info file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5140 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-09 18:48:02 +00:00
uz
a3ae02b5b7 Use symbolic names when writing the scope type to the debug info file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5139 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-08 21:07:45 +00:00
uz
e9be9e3d63 Use "lib" instead of "library".
git-svn-id: svn://svn.cc65.org/cc65/trunk@5137 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-08 17:18:52 +00:00
uz
07cd427110 Output information about the item counts in the debug info file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5136 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-08 17:15:18 +00:00
uz
bf8f23d5f4 Handle scopes with a label correctly. Add the label to the debug info file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5133 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-07 18:48:08 +00:00
uz
c19491035b Bump the version number of the generated debug file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5129 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-07 17:59:33 +00:00
uz
17e9b81045 Debug info: Make file info ids continous. Output modules that use a file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5128 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-07 13:15:24 +00:00
uz
af3a5e6e15 Output library information to the debug file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5127 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-07 11:33:28 +00:00
uz
b418fdf985 Removed the Next pointer which is no longer necessary.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5126 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-06 12:32:10 +00:00
uz
6172979c1c Manage the segments in a collection.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5125 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-05 13:59:26 +00:00
uz
a17d11cba8 Central management of the debug info base ids.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5123 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-05 13:09:13 +00:00
uz
317676d868 Output module info.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5120 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-05 12:09:11 +00:00
uz
3593eb2869 More work on scope suport.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5119 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-04 18:47:01 +00:00
uz
2f75733e43 Rearrange debug info output. Add scopes to the debug info.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5117 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-04 15:58:54 +00:00
uz
871873b1ac Read Sections before Scopes, because the later will reference the former.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5116 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-04 13:20:45 +00:00
uz
04a0dafe25 Use the Span structure also for scopes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5115 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-04 13:14:26 +00:00
uz
f04d65a662 Generalized the CodeRange structure used for line infos and renamed it to Span.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5112 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-04 12:31:37 +00:00
uz
7d69135896 Fixed another memory leak.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5107 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-02 15:00:33 +00:00
uz
c25694f54d Fixed another memory leak.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5106 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-02 14:49:33 +00:00
uz
1f95085ffe Read scopes from the object files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5103 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-01 20:54:42 +00:00
uz
67692e51f1 Fixed a rather large memory leak.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5102 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-01 20:49:59 +00:00
uz
dd3a841b1a Add the parent scope/symbol to the debug symbol attributes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5094 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-07-31 13:28:54 +00:00
uz
c768fc7373 For segment based symbols, add information about the segment to the debug info.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5062 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-14 19:25:50 +00:00
uz
82bab7fb89 Merge duplicate file entries (same name, size and timestamp).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5061 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-14 18:26:22 +00:00
uz
795d9e1a1c Mark the symbol that is the name of a scope with the size of that scope
(previously only the scope itself had that size).
Pass the size of symbols through the object file to the linker. Bump the
object file version and adjust object file reading tools (od65, ar65) to this
change.
Read the size in the linker and output it in the debug info.
Bump the minor version number of the debug info. Read the size and allow to
access it via the API. Do better version checking for the debug info and try
to be smarter when encountering unknown keywords to improve support for newer
minor versions.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5057 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-13 18:43:50 +00:00
uz
c65292b78d Fixed an error: The amount of fill bytes for a section was declared as an
unsigned char, so larger values got truncated making alignments larger than
$100 unreliable.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5042 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-08 18:33:34 +00:00
uz
c17816fafd Added more debug output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5041 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-08 18:28:21 +00:00
uz
671a4a653f Reverted the change by Stefan Haubenthal - order of segments is important for
the heap to work correctly.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4995 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-04-25 18:45:57 +00:00
uz
ccd1f5fcd7 Fix tape header output. Add version info in the header. By Stefan Haubenthal.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4984 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-04-16 12:09:28 +00:00
uz
d78e52fd40 New uploader that can be hiding in top of memory waiting for a BLL-kind of
loadable application over the ComLynx serial port. By Karri Kaksonen.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4982 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-04-06 19:54:55 +00:00
uz
00a11e642c Lynx boot stuff split up into several files. Changes by Karri Kaksonen.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4979 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-03-21 17:49:03 +00:00
uz
9528aae744 Improved and much smaller bootloader by Karri Kaksonen.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4978 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-03-17 22:36:09 +00:00
uz
93f8985e47 Fixed an error: The collection for the line infos hasn't been initialized.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4974 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-02-10 22:18:24 +00:00
uz
a6e099e9ac Bump version number of generated debug info files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4958 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-29 22:19:37 +00:00
uz
299a0ed4cd Pass type of line info through the object files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4957 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-29 22:16:03 +00:00
uz
d5109f6319 Fixed an error in the macro versions of the inline functions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4948 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-28 16:33:04 +00:00
uz
81c90667bf Small fix for debug info output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4947 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-28 16:20:39 +00:00
uz
8af53cf22a Adapted to new library format.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4946 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-28 16:03:55 +00:00
uz
fa1b5f5f3c Fixed a bug: Wrong variable size trucates data.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4945 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-28 16:03:41 +00:00
uz
a214ccff92 Use a collection for the modules in a library.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4938 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 22:43:33 +00:00
uz
713c019a24 Save a few bytes when writing file list entries to the object file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4929 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 16:40:48 +00:00
uz
d7d1ad7fd0 Must read line infos earlier when reading in an object files, because later
data references it.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4927 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 16:20:14 +00:00
uz
b903e818d1 More detailed error message.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4926 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-27 16:12:10 +00:00
uz
e654ad49eb Allow different output formats using additional linker configs. Contributed by
Karri Kaksonen.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4925 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-26 22:14:42 +00:00
uz
733e832b5d Use LineInfo instead of raw FilePos objects. Most information in the object
files does now have lists of LineInfos attached. Compiles but UNTESTED!


git-svn-id: svn://svn.cc65.org/cc65/trunk@4921 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-26 19:42:17 +00:00
uz
6ddf79fc30 Fragments and assertions reference LineInfo items instead of having separate
embedded FilePos items.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4915 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-24 22:39:07 +00:00
uz
a2ec97ac13 More changes by Karri Kaksonen.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4899 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-04 19:39:07 +00:00
uz
d993b332a4 Lynx update including file routines that access a file system on a cartridge
by Karri Kaksonen.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4892 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-12-29 10:37:57 +00:00
uz
f11067e260 Latest versions of startup code and config by Karri Kaksonen. Citing: The new
header contains an encrypted loader, a small directory structure and a single
pixel black title screen. This is directly bootable on a real Lynx.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4890 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-12-22 15:37:20 +00:00
uz
81cfbe06c6 Changed the startup module and the linker config for the Commodore VIC to use
the common loadaddr and exehdr modules.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4874 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-17 13:35:43 +00:00
uz
9a9cea5a61 Changed the startup module and the linker config for the Commodore PET to use
the common loadaddr and exehdr modules.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4873 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-17 13:27:43 +00:00
uz
7252f071a2 Changed the startup module and the linker config for the C128 to use the
common loadaddr and exehdr modules.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4872 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-17 13:00:34 +00:00
uz
da59130820 Changed the startup module and the linker config for the C16 to use the common
loadaddr and exehdr modules.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4871 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-17 12:46:55 +00:00
uz
8aff2a9159 Fixed a problem with the last change in crt0.s: The symbols for the RAM memory
area had been used but not defined in the linker config. Changed the startup
module and the linker config to use the common loadaddr and exehdr modules.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4870 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-16 17:33:25 +00:00
uz
461bf5e81e Fixed wrong size of HEADER area. The invalid size had no bad effects, but it
was wrong anyway.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4869 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-16 17:30:42 +00:00
uz
dfd4c0ab63 Limit RAM area to $CFFF instead of $FFFF.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4865 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-14 17:00:21 +00:00
uz
b6d872e5b7 Added the first implementation of a linker config suited for c64 assembly
programs.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4864 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-14 13:11:09 +00:00
uz
413491d1b2 Modified the builtin c64 config to force inclusion of the new exehdr module.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4863 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-14 11:51:43 +00:00
uz
09a62690f3 Fixed typo in warning message.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4858 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-13 22:48:39 +00:00
uz
36dc806193 Force inclusion of the load address.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4857 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-13 16:57:42 +00:00
uz
4786caf496 For modules, the ZP memory area must be written to the output file. This is
required by the logic in the linker.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4854 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-13 10:20:28 +00:00
uz
c797be4767 Add an additional file = "" to memory areas that contain only bss or zp type
segments and aren't written to the output file. Before that, the "not going to
output file" was implicit because of the bss type of the segments contained.
The new attribute makes this explicit.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4853 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-12 19:59:02 +00:00
uz
de14990fbb Define the __XX_START__ symbol for a memory area earlier, so it may be used in
the expression for the size of the same area.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4852 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-12 18:01:31 +00:00
uz
5e8252fa36 Reworked and improved the SYMBOLS section. The old syntax (using symbol =
value) is now gone, attributes are used instead. The SYMBOLS section does now
support imports, so the linker config can be used to force symbols (and
therefore module) imports. Evaluation of start address and size for memory
areas has been delayed even further, so it is now possible to use the values
from one memory area in the definition of the next one.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4851 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-12 14:17:35 +00:00
uz
7c1094c086 Keep the config file position in a FilePos structure.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4847 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-10 19:52:40 +00:00
uz
7bd19b737a One more place where OutputNameUsed must be flagged.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4844 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-09 22:07:45 +00:00
uz
a2b7ef2b08 Merge CfgProcess and CfgAssignSegments because both do some sort of
postprocessing. Print a warning if %O was used in the config file and the
output file name is changed later using -o.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4842 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-09 21:01:27 +00:00
uz
c9b9069208 Better handling of imports in the ExprNode structure.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4841 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-09 20:34:08 +00:00
uz
da792b3fd0 Separate processing the linker config file into two phases: The config file is
read when the -t or -C switch is encountered and parts of it are processed.
The remaining parts are processed when all object files and libraries have
been read. To make this work, the expression evaluation in cfgexpr has been
rewritten to generate true expression trees. This means that expressions in
the linker config may use exports from the object files. 

Separation of config file processing is the base for several enhancements, for
example forced imports by linker config.

This code needs more work and is only very, very, very roughly tested.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4840 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-08 21:52:24 +00:00
uz
6c0a9c0438 Patch to correct the linkorder in the make files to make the --as-needed
ldflag work. By Mario Fetka.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4838 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-07 11:34:51 +00:00
ol.sc
aaf90c1252 Exclude (small) stack from RAM memory area (like on most other targets) to make explicit that the linker may not use all RAM. If the cc65 parameter stack isn't used at all the __STACKSIZE__ symbol may be overridden on the linker command line with -D __STACKSIZE__=0.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4820 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-10-02 10:20:00 +00:00
uz
112ae0e3db Renamed the defines in symdefs.h to something more meaningful. They were named
EXP_xxx for historic reasons, but SYM_ does make much more sense now.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4812 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-17 20:47:27 +00:00
uz
7e72e7d46b Change output for symbols in the debug info file to match that of the other
lines. The name is now preceeded by "name=".


git-svn-id: svn://svn.cc65.org/cc65/trunk@4803 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-09 21:28:47 +00:00
uz
b936617eb4 Fixed a C99ism.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4799 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-09 05:47:22 +00:00
uz
14e567aed2 Another format change: Record the output file and offset for each segment
written to the output. Make this information available in the debug info file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4797 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-08 20:32:13 +00:00
uz
34c938e7ac More collection usage. This has also removed the need for the MemListNode
structure.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4795 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-08 15:35:56 +00:00
uz
fedb265a22 More collection usage.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4794 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-08 15:23:22 +00:00
uz
ad140bede4 Replace more linked lists by collections.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4793 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-08 15:13:53 +00:00
uz
026724482f Use collections instead of linked lists to simplify things.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4792 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-08 15:03:58 +00:00
uz
8c39874daa Some changes in debug info generation.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4788 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-07 12:46:12 +00:00
uz
12e7cc010d Output version information into the debug file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4783 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-05 20:41:27 +00:00
uz
0807da74bd Corrected indentation - no code change.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4782 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-05 19:34:25 +00:00
uz
b8e7feb788 Fix relocation of line infos.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4781 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-05 19:34:03 +00:00
uz
abda26a309 Don't output multiple code ranges per line, since this is harder to parse.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4780 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-03 19:00:14 +00:00
uz
e046ecbcf2 Be sure to generate line info for all segments.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4778 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-01 13:52:06 +00:00
uz
83e5252785 Changed a comment
git-svn-id: svn://svn.cc65.org/cc65/trunk@4777 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-08-01 13:48:32 +00:00
uz
031ae666e3 Fixed an error in the macro version of HasObjData().
git-svn-id: svn://svn.cc65.org/cc65/trunk@4776 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-07-31 12:37:14 +00:00
uz
b2321ebdf7 Fixed an error: Some of the collections weren't initialized.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4775 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-07-31 09:44:25 +00:00