diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-10-19 06:02:46 +0000 |
---|---|---|
committer | Mark Mitchell <mark@codesourcery.com> | 2004-10-19 06:02:46 +0000 |
commit | a3ed6701958a5bbe16590b42c38db843b6ab7e05 (patch) | |
tree | 9ea3da603a831e38bfb9a90ead6d15c43b34d3a2 | |
parent | 1474e9fa85229373caebf287b1537e978d5f6e4d (diff) | |
download | gdb-a3ed6701958a5bbe16590b42c38db843b6ab7e05.tar.gz |
* 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.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elfarm-nabi.c | 2 | ||||
-rw-r--r-- | bfd/elflink.c | 6 |
3 files changed, 13 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index de596386d90..6fb4b0537d5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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 diff --git a/bfd/elfarm-nabi.c b/bfd/elfarm-nabi.c index 3eb2cbdf590..8b09cea6bc5 100644 --- a/bfd/elfarm-nabi.c +++ b/bfd/elfarm-nabi.c @@ -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) diff --git a/bfd/elflink.c b/bfd/elflink.c index 68435bb2338..6e3f91ff8a0 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -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; |