Fix problem where script specified both address and region for a section.
authorCary Coutant <ccoutant@gmail.com>
Wed, 26 Aug 2015 07:03:04 +0000 (00:03 -0700)
committerCary Coutant <ccoutant@gmail.com>
Wed, 26 Aug 2015 07:03:04 +0000 (00:03 -0700)
commit7c61d651fd0e42b8f68840a3735ed7e46d4fd083
treed17fe965b2c4f27550fc720f54fb2b204d77f44f
parent4bfacfd359a1f8d026d1a350f56f2f5d70b6cb65
Fix problem where script specified both address and region for a section.

If a script specifies both address and region for an output section
declaration, gold ignores the region specification. This can lead to
bogus "moves backward" errors. This patch fixes gold so that if a
section specifies both address and region, it will place the section
at the specified address in the region, and update the location counter
within the region.

gold/
PR gold/18847
* script-sections.cc (Memory_region::set_address): New method.
(Script_sections::find_memory_region): Add explicit_only parameter.
(Output_section_definition::set_section_addresses): Handle case where
script specifies both address and vma region.
* script-sections.h (Script_sections::find_memory_region): Add
explicit_only parameter.
gold/ChangeLog
gold/script-sections.cc
gold/script-sections.h
This page took 0.028018 seconds and 4 git commands to generate.