[gold] PR gold/18048 Patch to support non-toplevel and nesting INCLUDE
Hán Shěn (沈涵)
shenhan@google.com
Tue Mar 3 19:37:00 GMT 2015
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?
gold/ChangeLog
2015-02-28 Han Shen <shenhan@google.com>
PR 18048
* script-c.h (script_record_include_start): New method declaration.
* script.cc (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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: include.patch
Type: application/octet-stream
Size: 14393 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150303/f494c58d/attachment.obj>
More information about the Binutils
mailing list