diff options
author | Steve Chamberlain <sac@cygnus> | 1992-04-17 15:59:37 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1992-04-17 15:59:37 +0000 |
commit | 0d3e45eab084b2bca8b6e3dc94952264868b033b (patch) | |
tree | 9081e1bf004a738bffdebfbd8759e5095419db04 /ld | |
parent | b0c8c726888d90783a178afe4df237083ac70c8f (diff) | |
download | gdb-0d3e45eab084b2bca8b6e3dc94952264868b033b.zip gdb-0d3e45eab084b2bca8b6e3dc94952264868b033b.tar.gz gdb-0d3e45eab084b2bca8b6e3dc94952264868b033b.tar.bz2 |
* relax.c: added handling for new "padding" seclet type, used to
fill out gaps between section.
* ldgram.y, ldlex.l: now -defsym on the command line is done
properly.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/.Sanitize | 12 | ||||
-rw-r--r-- | ld/ldlex.l | 23 | ||||
-rw-r--r-- | ld/relax.c | 21 |
3 files changed, 50 insertions, 6 deletions
diff --git a/ld/.Sanitize b/ld/.Sanitize index c719031..409e2e2 100644 --- a/ld/.Sanitize +++ b/ld/.Sanitize @@ -46,10 +46,14 @@ genscripts.sh gld.1 gld960.em gld960.sh +go32.sh hp300bsd.sh h8300hms.em h8300hms.sc-sh h8300hms.sh +h8300xray.em +h8300xray.sc-sh +h8300xray.sh i386aout.sh i960.sc-sh ld.h @@ -107,7 +111,13 @@ echo Done in `pwd`. # # # $Log$ -# Revision 1.34 1992/04/15 23:11:53 sac +# Revision 1.35 1992/04/17 15:59:22 sac +# * relax.c: added handling for new "padding" seclet type, used to +# fill out gaps between section. +# * ldgram.y, ldlex.l: now -defsym on the command line is done +# properly. +# +# Revision 1.34 1992/04/15 23:11:53 sac # added mri.c # # Revision 1.33 1992/04/05 01:46:05 sac @@ -1,4 +1,5 @@ %{ + /* Copyright (C) 1991 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -65,7 +66,8 @@ unsigned int include_stack_ptr = 0; %a 4000 %o 5000 FILENAMECHAR1 [_a-zA-Z\/\.\\] -FILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\] +SYMBOLCHARN [_a-zA-Z\/\.\\0-9] +FILENAMECHAR [_a-zA-Z0-9\/\.\-\_\+\=\$\:\[\]\\] FILENAME {FILENAMECHAR}+ WHITE [ \t\n]+ @@ -74,10 +76,16 @@ WHITE [ \t\n]+ %x EXPRESSION %x COMMENT %x BOTH +%x DEFSYMEXP %x MRI %% -<COMMAND>"-defsym" { return OPTION_defsym; } +<DEFSYMEXP>"-" { RTOKEN('-');} +<DEFSYMEXP>"+" { RTOKEN('+');} +<DEFSYMEXP>{FILENAMECHAR1}{SYMBOLCHARN}* { yylval.name = buystring(yytext); return NAME; } +<DEFSYMEXP>[ \t] { RTOKEN(DEFSYMEND); } +<DEFSYMEXP>"=" { RTOKEN('='); } +<COMMAND>"-defsym"{WHITE}* { return OPTION_defsym; } <COMMAND>"-noinhibit_exec" { return OPTION_noinhibit_exec; } <COMMAND>"-noinhibit-exec" { return OPTION_noinhibit_exec; } <COMMAND>"-sort_common" { return OPTION_sort_common;} @@ -441,8 +449,15 @@ BEGIN(SCRIPT); void DEFUN_VOID(ldlex_mri_script) { - *(state_stack_p)++ = yy_start; - BEGIN(MRI); +*(state_stack_p)++ = yy_start; +BEGIN(MRI); +} + +void +DEFUN_VOID(ldlex_defsym) +{ +*(state_stack_p)++ = yy_start; +BEGIN(DEFSYMEXP); } void @@ -27,7 +27,6 @@ DEFUN(build_it,(statement), lang_statement_union_type *statement) { switch (statement->header.type) { - case lang_fill_statement_enum: { #if 0 bfd_byte play_area[SHORT_SIZE]; @@ -113,7 +112,27 @@ DEFUN(build_it,(statement), } break; + case lang_padding_statement_enum: + /* Make a new seclet with the right filler */ + { + /* Create a new seclet in the output section with this + attached */ + bfd_seclet_type *seclet = + bfd_new_seclet(statement->padding_statement.output_section->owner, + statement->padding_statement.output_section); + + seclet->type = bfd_fill_seclet; + seclet->size = statement->padding_statement.size; + seclet->offset = statement->padding_statement.output_offset; + seclet->u.fill.value = statement->padding_statement.fill; + seclet->next = 0; + } + break; + + + + break; default: /* All the other ones fall through */ ; |