summaryrefslogtreecommitdiff
path: root/gold/script-sections.h
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@gmail.com>2015-08-26 00:03:04 -0700
committerCary Coutant <ccoutant@gmail.com>2015-08-26 00:03:04 -0700
commit7c61d651fd0e42b8f68840a3735ed7e46d4fd083 (patch)
treed17fe965b2c4f27550fc720f54fb2b204d77f44f /gold/script-sections.h
parent4bfacfd359a1f8d026d1a350f56f2f5d70b6cb65 (diff)
downloadbinutils-gdb-7c61d651fd0e42b8f68840a3735ed7e46d4fd083.tar.gz
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.
Diffstat (limited to 'gold/script-sections.h')
-rw-r--r--gold/script-sections.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gold/script-sections.h b/gold/script-sections.h
index e247ea54ed7..7b2655a0d8b 100644
--- a/gold/script-sections.h
+++ b/gold/script-sections.h
@@ -240,7 +240,7 @@ class Script_sections
// Find a memory region that should be used by a given output section.
Memory_region*
- find_memory_region(Output_section_definition*, bool,
+ find_memory_region(Output_section_definition*, bool, bool,
Output_section_definition**);
// Returns true if the provide block of memory is contained