This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gold] PR gold/18048 Patch to support non-toplevel and nesting INCLUDE

> Hi here is the patch for PR gold/18048 - gold does not support
> non-toplevel INCLUDE properly. With this bug, Gold fails to build one
> particular package (coreboot) of ChromeOs.

Thanks for working on this, but I think it can be much, much, simpler.

All we really need is three new productions at the top level:

        | PARSING_SECTIONS_BLOCK sections_block
        | PARSING_SECTION_COMMANDS section_cmds
        | PARSING_MEMORY_DEF memory_defs

Then we can just pass a first_token to script_include_directive(), like this:

        | INCLUDE string
            { script_include_directive(PARSING_SECTIONS_BLOCK,
closure, $2.value, $2.length); }

...and have it pass that on to read_script_file().

I did have to clone the productions for file_or_sections_cmd, because
the INCLUDE directive there could have meant either

I'll commit the attached patch after I update a few of the script
tests to exercise INCLUDE directives.


Attachment: gold-include.patch
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]