24 Commits

Author SHA1 Message Date
Mikael Pettersson
47502d2bb7 as: add support for .ident directives
- token.def: enable T_DOT_IDENT
- tunit.h: add S_DOT_IDENT and make it share attributes with S_DOT_FILE,
  describe available section types, add tunit_strtab_section_enter(),
  rearrange declarations
- tunit.c: implement tunit_strtab_section_enter()
- parse.c: generalize .file parser, use it also for .ident
- input.c: handle S_DOT_IDENT, lookup or create .comment strtab section,
  append given string literal to that section
2015-05-01 14:14:38 +02:00
Mikael Pettersson
a5a68a70b7 as/tunit.c: check for NULL before applying container_of() 2015-05-01 14:08:12 +02:00
Mikael Pettersson
772d5e4061 as: define and use container_of() 2015-04-27 22:36:58 +02:00
Mikael Pettersson
a7c47b4013 as: move strtab from output to tunit 2015-04-27 22:02:53 +02:00
Mikael Pettersson
70768a829c as: allow output_section() to work on strtabs
- add optional ->output() method to struct section
- make output_section() use ->output() if present
- make strtab_init() set up ->output
- change strtab_write() into a trivial wrapper for output_section()
2015-04-26 22:08:37 +02:00
Mikael Pettersson
966059fbb6 as/output.c: use section_init() to initialize the fake section0 2015-04-26 20:36:30 +02:00
Mikael Pettersson
8f2faeea93 as/output.c: simplify handling of strtab sections
- embed a strtab's associated section in the strtab itself
- change append_section() to enter name before reading dot
- synthesize .shstrtab with append_section(), remove old kludge
2015-04-25 20:10:48 +02:00
Mikael Pettersson
9260af712f as: support C-style /*...*/ comments 2015-04-21 21:35:36 +02:00
Mikael Pettersson
bedc35abc5 as: support line-comments starting with '#' 2015-04-20 23:07:27 +02:00
Mikael Pettersson
b0aaba8f9a pdp10-opcodes: complete rewrite 2015-04-19 18:28:27 +02:00
Mikael Pettersson
af1fd536c2 pdp10-tools: Add GPL License and a README, remove old 'as' prototype 2015-04-19 18:27:43 +02:00
Mikael Pettersson
68a213eb76 as: add some test cases under test/ 2015-04-06 16:34:22 +02:00
Mikael Pettersson
099eb14679 as/output.c: don't store dummy values in section->image
remove ->image == NULL test in append_section, output_shdr
don't store dummy value in section_strtab.image or section_shstrtab.image
hoist symtab declaration to output() top-level, don't store it in
section_symtab.image
drop fixmes at assignments to .dot as they are Ok
2015-04-05 16:14:59 +02:00
Mikael Pettersson
ade65971fa as: change section image from a pdp_uint36_t arrary to a pdp10_uint9_t array 2015-03-03 21:20:29 +00:00
Mikael Pettersson
a3eda3f0ac as: output: clean up output of section_symtab 2015-03-03 20:38:09 +00:00
Mikael Pettersson
a037f1b991 as: support ".size <sym>,.-<sym>" 2015-01-29 19:48:42 +00:00
Mikael Pettersson
5c14e1a861 as: use SHN_ABS for section-less symbols in output stage, unbreaks .file 2015-01-29 19:44:31 +00:00
Mikael Pettersson
9854ccfbf3 as: add tunit.{h,c} files :-( 2014-04-10 20:36:58 +00:00
Mikael Pettersson
18fa204fad as: add ".type <symbol>,@function" support 2014-04-10 18:41:25 +00:00
Mikael Pettersson
aedc489357 replace ehdr.e_wident[4] junk with standard e_ident[EI_NIDENT], add top-level Makefile, add TODO 2014-04-08 20:46:27 +00:00
Mikael Pettersson
35ee3e25aa as: generalize section handling, support .file 2014-04-08 18:56:28 +00:00
Mikael Pettersson
ab2037008a as: add initial, primitive, but working assembler 2013-07-23 20:46:16 +00:00
Mikael Pettersson
fadd664dc7 as: move old overly complex incomplete prototype to new 0LD subdir; start afresh with a minimalistic design and improve it incrementally 2013-07-20 10:54:06 +00:00
Mikael Pettersson
7c189dd488 Initial import 2013-07-03 16:29:42 +00:00