ld script lower-case absolute and sizeof_headers
authorAlan Modra <amodra@gmail.com>
Fri, 13 Aug 2021 13:08:31 +0000 (22:38 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 13 Aug 2021 13:14:36 +0000 (22:44 +0930)
I think these happened by accident, so let's see what breaks if they
are removed.

* ldlex.l: Remove lower case "absolute" and "sizeof_headers"
in non-mri mode.
* ld.texi: Remove sizeof_headers index.
* testsuite/ld-mmix/mmohdr1.ld: Use SIZEOF_HEADERS.

ld/ld.texi
ld/ldlex.l
ld/testsuite/ld-mmix/mmohdr1.ld

index 71cfaa3d1b1d348f26b57a729471af30d261025c..72b5c373ba10d92512c6d8aafd9d938c16b9ee01 100644 (file)
@@ -7044,7 +7044,6 @@ SECTIONS@{ @dots{}
 @end smallexample
 
 @item SIZEOF_HEADERS
-@itemx sizeof_headers
 @kindex SIZEOF_HEADERS
 @cindex header size
 Return the size in bytes of the output file's headers.  This is
index dfe8382d0bbfbed74082ee70350b94d5dcd4ea27..b0861d78e49f89d20a5ed7e0334d9e729d75fc37 100644 (file)
@@ -245,6 +245,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
 <SCRIPT,EXPRESSION>"ADDR"              { RTOKEN(ADDR);}
 <SCRIPT,EXPRESSION>"LOADADDR"          { RTOKEN(LOADADDR);}
 <SCRIPT,EXPRESSION>"ALIGNOF"           { RTOKEN(ALIGNOF); }
+<SCRIPT,EXPRESSION>"ABSOLUTE"          { RTOKEN(ABSOLUTE); }
 <EXPRESSION>"MAX"                      { RTOKEN(MAX_K); }
 <EXPRESSION>"MIN"                      { RTOKEN(MIN_K); }
 <EXPRESSION>"LOG2CEIL"                 { RTOKEN(LOG2CEIL); }
@@ -252,7 +253,6 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
 <SCRIPT,WILD>"ENTRY"                   { RTOKEN(ENTRY);}
 <SCRIPT,MRI>"EXTERN"                   { RTOKEN(EXTERN);}
 <SCRIPT,EXPRESSION>"NEXT"              { RTOKEN(NEXT);}
-<SCRIPT,EXPRESSION>"sizeof_headers"    { RTOKEN(SIZEOF_HEADERS);}
 <SCRIPT,EXPRESSION>"SIZEOF_HEADERS"    { RTOKEN(SIZEOF_HEADERS);}
 <SCRIPT,EXPRESSION>"SEGMENT_START"     { RTOKEN(SEGMENT_START);}
 <SCRIPT>"MAP"                          { RTOKEN(MAP);}
@@ -325,6 +325,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
 <MRI>"*".*                     { /* Mri comment line */ }
 <MRI>";".*                     { /* Mri comment line */ }
 <MRI>"END"                     { RTOKEN(ENDWORD); }
+<MRI>"ABSOLUTE"                        { RTOKEN(ABSOLUTE); }
 <MRI>"ALIGNMOD"                        { RTOKEN(ALIGNMOD);}
 <MRI>"ALIGN"                   { RTOKEN(ALIGN_K);}
 <MRI>"CHIP"                    { RTOKEN(CHIP); }
@@ -340,8 +341,8 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
 <MRI>"START"                   { RTOKEN(START); }
 <MRI>"LIST".*                  { RTOKEN(LIST); /* LIST and ignore to end of line */ }
 <MRI>"SECT"                    { RTOKEN(SECT); }
-<SCRIPT,EXPRESSION,MRI>"ABSOLUTE"                      { RTOKEN(ABSOLUTE); }
 <MRI>"end"                     { RTOKEN(ENDWORD); }
+<MRI>"absolute"                        { RTOKEN(ABSOLUTE); }
 <MRI>"alignmod"                        { RTOKEN(ALIGNMOD);}
 <MRI>"align"                   { RTOKEN(ALIGN_K);}
 <MRI>"chip"                    { RTOKEN(CHIP); }
@@ -358,7 +359,6 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
 <MRI>"start"                   { RTOKEN(START); }
 <MRI>"list".*                  { RTOKEN(LIST); /* LIST and ignore to end of line */ }
 <MRI>"sect"                    { RTOKEN(SECT); }
-<SCRIPT,EXPRESSION,MRI>"absolute"                      { RTOKEN(ABSOLUTE); }
 
 <MRI>{FILENAMECHAR1}{NOCFILENAMECHAR}* {
 /* Filename without commas, needed to parse mri stuff */
index 716c3f42c5d87d37aa4cfaa41630f47f874368ce..d4f2f13c51b67545ab8973ba3c6adab155096b55 100644 (file)
@@ -3,7 +3,7 @@ OUTPUT_FORMAT("mmo")
 ENTRY(Main)
 SECTIONS
 {
-  .text 0x100 + sizeof_headers :
+  .text 0x100 + SIZEOF_HEADERS :
   { *(.text); Main = _start; }
 
   .MMIX.reg_contents :