diff options
author | Ian Lance Taylor <ian@airs.com> | 2011-06-19 22:09:17 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2011-06-19 22:09:17 +0000 |
commit | e1f74f98236a6ac03824d0f38dd47d34f615c551 (patch) | |
tree | 324a9f57330c5d0c6eb8ecc7a7c4c917ab47c657 /gold/script-sections.cc | |
parent | 8b7789423cab57f0adc2a1cb374908d73a2f64b8 (diff) | |
download | gdb-e1f74f98236a6ac03824d0f38dd47d34f615c551.zip gdb-e1f74f98236a6ac03824d0f38dd47d34f615c551.tar.gz gdb-e1f74f98236a6ac03824d0f38dd47d34f615c551.tar.bz2 |
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.
Diffstat (limited to 'gold/script-sections.cc')
-rw-r--r-- | gold/script-sections.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gold/script-sections.cc b/gold/script-sections.cc index 67e3d65..005f667 100644 --- a/gold/script-sections.cc +++ b/gold/script-sections.cc @@ -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()); |