diff options
author | Alan Modra <amodra@gmail.com> | 2007-02-19 12:44:18 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-02-19 12:44:18 +0000 |
commit | 6bfdb61b0cfa7f8e483cacc6802188a8b211fbbd (patch) | |
tree | 68dc2ba9d4ad6f8b60c437fdde307c7c62d880f5 /bfd/elflink.c | |
parent | c88471452a9c275da39f0cdcd2c05c3c7a4e7e4a (diff) | |
download | gdb-6bfdb61b0cfa7f8e483cacc6802188a8b211fbbd.zip gdb-6bfdb61b0cfa7f8e483cacc6802188a8b211fbbd.tar.gz gdb-6bfdb61b0cfa7f8e483cacc6802188a8b211fbbd.tar.bz2 |
* elf-bfd.h (struct elf_backend_data): Add default_execstack.
* elflink.c (bfd_elf_size_dynamic_sections): Heed default_execstack.
* elfxx-target.h (elf_backend_default_execstack): Define to 1.
(elfNN_bed): Init new field.
* elf64-ppc.c (elf_backend_default_execstack): Define to 0.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 00baf5d..00dd2aa 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -5237,6 +5237,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, if (!is_elf_hash_table (info->hash)) return TRUE; + bed = get_elf_backend_data (output_bfd); elf_tdata (output_bfd)->relro = info->relro; if (info->execstack) elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X; @@ -5263,7 +5264,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, exec = PF_X; notesec = s; } - else + else if (bed->default_execstack) exec = PF_X; } if (notesec) @@ -5284,7 +5285,6 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, /* The backend may have to create some sections regardless of whether we're dynamic or not. */ - bed = get_elf_backend_data (output_bfd); if (bed->elf_backend_always_size_sections && ! (*bed->elf_backend_always_size_sections) (output_bfd, info)) return FALSE; |