diff options
author | Nick Clifton <nickc@redhat.com> | 2024-06-13 15:10:15 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2024-06-13 15:10:15 +0100 |
commit | e8e10743f7b207b21a1efb0cc9e42487080db013 (patch) | |
tree | daeed5b3fb3bdadce5bc0b6297cca0c96aee37a7 /bfd | |
parent | 888ff82e77d9ab8f04893a68cd6b4f518d6b50d9 (diff) | |
download | gdb-e8e10743f7b207b21a1efb0cc9e42487080db013.zip gdb-e8e10743f7b207b21a1efb0cc9e42487080db013.tar.gz gdb-e8e10743f7b207b21a1efb0cc9e42487080db013.tar.bz2 |
Add --rosegment option to BFD linker to stop the '-z separate-code' from generating two read-only segments.
PR 30907
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/elf.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -5335,7 +5335,9 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, thus not executable, and the first section is executable then put the file and program headers in their own PT_LOAD. */ - separate_phdr = true; + if (!info->one_rosegment) + separate_phdr = true; + if ((((phdr_lma + phdr_size - 1) & addr_mask & -maxpagesize) == (sections[0]->lma & addr_mask & -maxpagesize))) { |