aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorJie Zhang <jie.zhang@analog.com>2008-07-12 08:54:13 +0000
committerJie Zhang <jie.zhang@analog.com>2008-07-12 08:54:13 +0000
commit1bac266e85020515f8a1a1152345278f249117e4 (patch)
tree91373f3f426d6cf54fcb56b499623731b7d462e8 /bfd/elf.c
parent26bc3f44e80b269e4470da7b8618ac4da399e0d5 (diff)
downloadgdb-1bac266e85020515f8a1a1152345278f249117e4.zip
gdb-1bac266e85020515f8a1a1152345278f249117e4.tar.gz
gdb-1bac266e85020515f8a1a1152345278f249117e4.tar.bz2
Revert my last change since it has not been approved.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index f066c7c..d65c78d 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3605,7 +3605,6 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
asection **hdrpp;
bfd_boolean phdr_in_segment = TRUE;
bfd_boolean writable;
- bfd_boolean executable;
int tls_count = 0;
asection *first_tls = NULL;
asection *dynsec, *eh_frame_hdr;
@@ -3677,7 +3676,6 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
phdr_index = 0;
maxpagesize = bed->maxpagesize;
writable = FALSE;
- executable = FALSE;
dynsec = bfd_get_section_by_name (abfd, ".dynamic");
if (dynsec != NULL
&& (dynsec->flags & SEC_LOAD) == 0)
@@ -3759,14 +3757,6 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
ends precisely on a page boundary. */
new_segment = TRUE;
}
- else if (info->sep_code
- && ((! executable && (hdr->flags & SEC_CODE) != 0)
- || (executable && (hdr->flags & SEC_CODE) == 0)))
- {
- /* We don't want to put a executable section in a non-executable
- segment. */
- new_segment = TRUE;
- }
else
{
/* Otherwise, we can use the same segment. */
@@ -3781,8 +3771,6 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
{
if ((hdr->flags & SEC_READONLY) == 0)
writable = TRUE;
- if ((hdr->flags & SEC_CODE) != 0)
- executable = TRUE;
last_hdr = hdr;
/* .tbss sections effectively have zero size. */
if ((hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD))
@@ -3808,11 +3796,6 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
else
writable = FALSE;
- if ((hdr->flags & SEC_CODE) != 0)
- executable = TRUE;
- else
- executable = FALSE;
-
last_hdr = hdr;
/* .tbss sections effectively have zero size. */
if ((hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD)) != SEC_THREAD_LOCAL)