From: Alan Modra Date: Mon, 19 Feb 2007 12:44:18 +0000 (+0000) Subject: * elf-bfd.h (struct elf_backend_data): Add default_execstack. X-Git-Tag: drow-reverse-20070409-branchpoint~440 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6bfdb61b0cfa7f8e483cacc6802188a8b211fbbd;p=external%2Fbinutils.git * 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ad42918..2d1fe8e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2007-02-19 Alan Modra + + * 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. + 2007-02-17 Mark Mitchell Nathan Sidwell Vladimir Prus 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; diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h index a09376b..c7be577 100644 --- a/bfd/elfxx-target.h +++ b/bfd/elfxx-target.h @@ -103,6 +103,9 @@ #ifndef elf_backend_want_p_paddr_set_to_zero #define elf_backend_want_p_paddr_set_to_zero 0 #endif +#ifndef elf_backend_default_execstack +#define elf_backend_default_execstack 1 +#endif #define bfd_elfNN_bfd_debug_info_start bfd_void #define bfd_elfNN_bfd_debug_info_end bfd_void @@ -683,7 +686,8 @@ static struct elf_backend_data elfNN_bed = elf_backend_can_refcount, elf_backend_want_got_sym, elf_backend_want_dynbss, - elf_backend_want_p_paddr_set_to_zero + elf_backend_want_p_paddr_set_to_zero, + elf_backend_default_execstack }; /* Forward declaration for use when initialising alternative_target field. */