* elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
authorMark Mitchell <mark@codesourcery.com>
Tue, 19 Oct 2004 06:02:46 +0000 (06:02 +0000)
committerMark Mitchell <mark@codesourcery.com>
Tue, 19 Oct 2004 06:02:46 +0000 (06:02 +0000)
* elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
set SEC_ALLOC and SEC_LOAD.

bfd/ChangeLog
bfd/elfarm-nabi.c
bfd/elflink.c

index de596386d90717f2080b069033ff3dd1c4ae1d46..6fb4b0537d59f63db9b4bb61cb13719b4eebabda 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-18  Mark Mitchell  <mark@codesourcery.com>
+
+       * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
+       * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
+       set SEC_ALLOC and SEC_LOAD.
+
 2004-10-18  Nick Clifton  <nickc@redhat.com>
 
        * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
index 3eb2cbdf59040c4ad4bb4f0dda394d8099809588..8b09cea6bc591d683854f10fe5e0f2511d3c9504 100644 (file)
@@ -1011,6 +1011,8 @@ elf32_arm_symbian_modify_segment_map (abfd, info)
 #undef elf32_bed
 #define elf32_bed elf32_arm_symbian_bed
 
+/* The dynamic sections are not allocated on SymbianOS; the postlinker
+   will process them and then discard them.  */
 #undef ELF_DYNAMIC_SEC_FLAGS
 #define ELF_DYNAMIC_SEC_FLAGS \
   (SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED)
index 68435bb23382acc268527dc201a3d48fae25ff27..6e3f91ff8a0f7c4c32ef6a72026033bbfc1e9579 100644 (file)
@@ -252,9 +252,13 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
   flags = bed->dynamic_sec_flags;
 
   pltflags = flags;
-  pltflags |= SEC_CODE;
   if (bed->plt_not_loaded)
+    /* We do not clear SEC_ALLOC here because we still want the OS to
+       allocate space for the section; it's just that there's nothing
+       to read in from the object file.  */
     pltflags &= ~ (SEC_CODE | SEC_LOAD | SEC_HAS_CONTENTS);
+  else
+    pltflags |= SEC_ALLOC | SEC_CODE | SEC_LOAD;
   if (bed->plt_readonly)
     pltflags |= SEC_READONLY;
 
This page took 0.036303 seconds and 4 git commands to generate.