bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/24730] New: INCLUDE and --default-script / --script have differe


From: pexu at sourceware dot mail.kapsi.fi
Subject: [Bug ld/24730] New: INCLUDE and --default-script / --script have different whitespace behavior when using REGION_ALIAS
Date: Tue, 25 Jun 2019 08:19:56 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=24730

            Bug ID: 24730
           Summary: INCLUDE and --default-script / --script have different
                    whitespace behavior when using REGION_ALIAS
           Product: binutils
           Version: 2.33 (HEAD)
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: pexu at sourceware dot mail.kapsi.fi
  Target Milestone: ---

Created attachment 11864
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11864&action=edit
test input 0

Hi.

For some reason ld behaves differently when parsing input script files that
originate from a INCLUDE command than those which are given as command line
arguments, at least when using REGION_ALIAS.

See the attached input files. `region<n>.ld' only defines `region<n>' and four
aliases to it.  Aliases, or names, itself are not important.  What matters is
the whitespace (or lack of it) between comma and argument.  `region0.ld'
INCLUDEs `region1.ld'.

(I'm not sure if `REGION_ALIAS("alias",name)' (i.e. no whitespace) should be
accepted, I guess it should, but the behaviour is different nonetheless.)

$ ld --script region0.ld (or --default-script)
region1.ld:7: syntax error

(neither `REGION_ALIAS("alias" ,name)' nor `REGION_ALIAS("alias",name)' work,
if the file is included.)

but:
$ ld --script region1.ld (or --default-script)

works as expected.  What I don't really understand is that why REGION_ALIAS is
affected, but e.g. OUTPUT_FORMAT is not.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]