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]

[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.

With this patch, gold now supports non-toplevel as well as nested INCLUDEs.

Test - manually tested non-tpolevel and nested INCLUDE; build on
x86_64 and arm hosts;  gold build both arm and x86_64 ChromeOs;

Ok for trunk?


    2015-02-28  Han Shen  <>
        PR 18048

        * script-c.h (script_record_include_start): New method declaration.
        * (Include_info): New struct holding data for 'INCLUDE'.
        (Parser_closure::enqueue_include_info): New method.
        (Parser_closure::dequeue_include_info): New method.
        (Parser_closure::last_include_info): New method.
        (Parser_closure::has_includes_to_resolve): New method.
        (Parser_closure::include_info_queue_): New data memeber.
        (script_resolve_includes): Resolve and expand 'INCLDUE's.
        (read_script_file): Add logic to iteratively expand INCLUDE and parse.
        (script_include_directive): Record 'INCLUDE' position and read content.
        * yyscript.y (section_cmd): Add action saving INCLUDE position.
        (file_or_sections_cmd): Likewise.
        (memory_defs): Likewise.

Han Shen

Attachment: 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]