diff options
author | Steve Chamberlain <sac@cygnus> | 1993-03-30 22:45:39 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1993-03-30 22:45:39 +0000 |
commit | 9fce28edd50c09017ccfc29f30508362081ed66f (patch) | |
tree | 1092783362865e3ac6bbfa90b7cab0fc0bf54ea8 /ld/ldlex.l | |
parent | 01b4d31847394cba8639b28b75c9680dd75ed7cf (diff) | |
download | gdb-9fce28edd50c09017ccfc29f30508362081ed66f.zip gdb-9fce28edd50c09017ccfc29f30508362081ed66f.tar.gz gdb-9fce28edd50c09017ccfc29f30508362081ed66f.tar.bz2 |
Support for linking and loading at different places:
* ldlex.l: Add "AT" keyword.
* ldgram.y: Cleanup, and parse AT.
* ldlang.c (print_output_section_statement): Print output address
of section in map. (lang_size_sections): Fill sections' lma with
load address.
* ldlang.h (lang_output_section_statement_type): Add load_base
information.
Diffstat (limited to 'ld/ldlex.l')
-rw-r--r-- | ld/ldlex.l | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -184,6 +184,12 @@ NOCFILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\\~] <COMMAND>"-retain-symbols-file" { return OPTION_RETAIN_SYMBOLS_FILE; } +<COMMAND>"-EB" { + return OPTION_EB; + } +<COMMAND>"-EL" { + return OPTION_EL; + } <MRI,EXPRESSION>"$"([0-9A-Fa-f])+ { yylval.integer = strtoul(yytext+1, 0,16); return INT; @@ -208,7 +214,7 @@ NOCFILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\\~] yylval.integer = strtoul(yytext+1, 0, base); return INT; } -<DEFSYMEXP,MRI,BOTH,EXPRESSION>"$"?"0x"?([0-9A-Fa-f])+(M|K|m|k)? { +<SCRIPT,DEFSYMEXP,MRI,BOTH,EXPRESSION>"$"?"0x"?([0-9A-Fa-f])+(M|K|m|k)? { yylval.integer = strtoul(yytext,0,hex_mode); if (yytext[yyleng-1]=='M' || yytext[yyleng-1] == 'm') { @@ -305,6 +311,7 @@ NOCFILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\\~] <BOTH,SCRIPT>"l" { RTOKEN( LENGTH);} <BOTH,SCRIPT>"len" { RTOKEN( LENGTH);} <BOTH,SCRIPT>"INCLUDE" { RTOKEN(INCLUDE);} +<EXPRESSION,BOTH,SCRIPT>"AT" { RTOKEN(AT);} <MRI>"\n" { ++ lineno; RTOKEN(NEWLINE); } <MRI>"*".* { /* Mri comment line */ } <MRI>"END" { RTOKEN(ENDWORD); } @@ -383,6 +390,7 @@ NOCFILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\\~] } else { + BEGIN(SCRIPT); ldfile_input_filename = file_name_stack[include_stack_ptr-1]; } |