mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
PR gold/12880
* layout.cc (Layout::attach_allocated_section_to_segment): Add a .interp section to a PT_INTERP segment even if we have seen a --dynamic-linker option. Don't do it if we have seen a PHDRS clause in a linker script. (Layout::finalize): Don't create a .interp section if we've already create a PT_INTERP segment. (Layout::create_interp): Always call choose_output_section (revert patch of 2011-06-17). Don't create PT_INTERP segment. * script-sections.cc (Script_sections::create_note_and_tls_segments): Add a .interp section to a PT_INTERP segment even if we have seen a --dynamic-linker option.
This commit is contained in:
@ -3938,12 +3938,9 @@ Script_sections::create_note_and_tls_segments(
|
||||
}
|
||||
|
||||
// If we are making a shared library, and we see a section named
|
||||
// .interp, and the -dynamic-linker option was not used, then
|
||||
// put the .interp section in a PT_INTERP segment. This is for
|
||||
// GNU ld compatibility.
|
||||
if (strcmp((*p)->name(), ".interp") == 0
|
||||
&& parameters->options().shared()
|
||||
&& parameters->options().dynamic_linker() == NULL)
|
||||
// .interp then put the .interp section in a PT_INTERP segment.
|
||||
// This is for GNU ld compatibility.
|
||||
if (strcmp((*p)->name(), ".interp") == 0)
|
||||
{
|
||||
elfcpp::Elf_Word seg_flags =
|
||||
Layout::section_flags_to_segment((*p)->flags());
|
||||
|
Reference in New Issue
Block a user