aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-08-13 22:38:31 +0930
committerAlan Modra <amodra@gmail.com>2021-08-13 22:44:36 +0930
commitb325429b2fcc53f5823d5b4a1974597c11b8dcf9 (patch)
treef3637956f9c08c3e1644d2e3a99f2c958b4f38a5 /ld
parent34a7af0facec33bc4fc327578b829c7e340fc2a8 (diff)
downloadgdb-b325429b2fcc53f5823d5b4a1974597c11b8dcf9.zip
gdb-b325429b2fcc53f5823d5b4a1974597c11b8dcf9.tar.gz
gdb-b325429b2fcc53f5823d5b4a1974597c11b8dcf9.tar.bz2
ld script lower-case absolute and sizeof_headers
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.
Diffstat (limited to 'ld')
-rw-r--r--ld/ld.texi1
-rw-r--r--ld/ldlex.l6
-rw-r--r--ld/testsuite/ld-mmix/mmohdr1.ld2
3 files changed, 4 insertions, 5 deletions
diff --git a/ld/ld.texi b/ld/ld.texi
index 71cfaa3..72b5c37 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -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
diff --git a/ld/ldlex.l b/ld/ldlex.l
index dfe8382..b0861d7 100644
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -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 */
diff --git a/ld/testsuite/ld-mmix/mmohdr1.ld b/ld/testsuite/ld-mmix/mmohdr1.ld
index 716c3f4..d4f2f13 100644
--- a/ld/testsuite/ld-mmix/mmohdr1.ld
+++ b/ld/testsuite/ld-mmix/mmohdr1.ld
@@ -3,7 +3,7 @@ OUTPUT_FORMAT("mmo")
ENTRY(Main)
SECTIONS
{
- .text 0x100 + sizeof_headers :
+ .text 0x100 + SIZEOF_HEADERS :
{ *(.text); Main = _start; }
.MMIX.reg_contents :