aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-09-08 16:10:33 +0000
committerNick Clifton <nickc@redhat.com>2010-09-08 16:10:33 +0000
commit7f8cd8440375de26ebca766ab281c34522262b53 (patch)
treeada43984d6bc35a3487c093cb6b1c5b1a988527b /gold/layout.cc
parentab3e2b4a1c329818752fe855215d81fe21f88a8b (diff)
downloadgdb-7f8cd8440375de26ebca766ab281c34522262b53.zip
gdb-7f8cd8440375de26ebca766ab281c34522262b53.tar.gz
gdb-7f8cd8440375de26ebca766ab281c34522262b53.tar.bz2
* README: Remove claim that MEMORY is not supported.
* expression.cc (script_exp_function_origin) (script_exp_function_length): Move from here to ... * script.cc: ... here. (script_set_section_region, script_add_memory) (script_parse_memory_attr, script_include_directive): New functions. * script-sections.cc (class Memory_region): New class. (class Output_section_definition): Add set_memory_region, set_section_vma, set_section_lma and get_section_name methods. (class Script_Sections): Add add_memory_region, find_memory_region, find_memory_region_origin, find_memory_region_length and set_memory_region methods. Have set_section_addresses method walk the list of set memory regions. Extend the print methos to display memory regions. * script-sections.h: Add prototypes for new methods. Add enum for MEMORY region attributes. * yyscript.y: Add support for parsing MEMORY regions. * script-c.h: Add prototypes for new functions. * testsuite/Makefile.am: Add test of MEMORY region functionality. * testsuite/Makefile.in: Regenerate. * testsuite/memory_test.sh: New script. * testsuite/memory_test.s: New assembler source file. * testsuite/memory_test.t: New linker script.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index 5edba48..bfe6a5e 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -503,10 +503,15 @@ Layout::choose_output_section(const Relobj* relobj, const char* name,
const char* file_name = relobj == NULL ? NULL : relobj->name().c_str();
Output_section** output_section_slot;
Script_sections::Section_type script_section_type;
+ const char* orig_name = name;
name = ss->output_section_name(file_name, name, &output_section_slot,
&script_section_type);
if (name == NULL)
{
+ gold_debug(DEBUG_SCRIPT, _("Unable to create output section '%s' "
+ "because it is not allowed by the "
+ "SECTIONS clause of the linker script"),
+ orig_name);
// The SECTIONS clause says to discard this input section.
return NULL;
}