mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-03 04:01:22 +08:00
PR ld/14265
* script-sections.cc (Sections_element::output_section_name): Add keep return parameter. (Output_section_element::match_name): Add keep return parameter. Return the value of the keep_ member. * script-sections.h (class Output_section): Update output_section_name prototype. * layout.cc (Layout::keep_input_section): New public member function. (Layout::choose_output_section): Pass keep parameter to output_section_name. * layout.h (class Layout): Add keep_input_section. * object.cc (Sized_relobj_file::do_layout): Check for kept input sections. * testsuite/Makefile.am: Add a test. * testsuite/Makefile.in: Regenerate. * testsuite/pr14265.c: Source file for the test. * testsuite/pr14265.t: Linker script for the test. * testsuite/pr14265.sh: Shell script for the test. * ld-gc/gc.exp: Add a new test. * ld-gc/pr14265.c: Source file for the new test. * ld-gc/pr14265.t: Linker script for the new test. * ld-gc/pr14265.d: Expected symbol dump.
This commit is contained in:
@ -163,10 +163,12 @@ class Script_sections
|
||||
// PSCRIPT_SECTION_TYPE points to a location for returning the section
|
||||
// type specified in script. This can be SCRIPT_SECTION_TYPE_NONE if
|
||||
// no type is specified.
|
||||
// *KEEP indicates whether the section should survive garbage collection.
|
||||
const char*
|
||||
output_section_name(const char* file_name, const char* section_name,
|
||||
Output_section*** output_section_slot,
|
||||
Section_type* pscript_section_type);
|
||||
Section_type* pscript_section_type,
|
||||
bool* keep);
|
||||
|
||||
// Place a marker for an orphan output section into the SECTIONS
|
||||
// clause.
|
||||
|
Reference in New Issue
Block a user