diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-09-06 20:55:23 +0000 |
---|---|---|
committer | Mark Mitchell <mark@codesourcery.com> | 2004-09-06 20:55:23 +0000 |
commit | 229fcec57051103b79422353f53b6053fc5fc4b4 (patch) | |
tree | e9620d5259158d88238cd849061f454202b01dca /bfd/elfarm-nabi.c | |
parent | d597aff735ca792afe4d7508fe83e7891e50e5e9 (diff) | |
download | gdb-229fcec57051103b79422353f53b6053fc5fc4b4.zip gdb-229fcec57051103b79422353f53b6053fc5fc4b4.tar.gz gdb-229fcec57051103b79422353f53b6053fc5fc4b4.tar.bz2 |
* elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
* elf.c (_bfd_elf_make_dynamic_segment): New function, split out
from ...
(map_sections_to_segments): ... here. Use it. Assign a file
position to the .dynamic section if it is not loadable, but part
of the PT_DYNAMIC segment.
* elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
offsets, not VMAs, for the BPABI. Do not fill in the header in
the .got.plt section for the BPABI.
* elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
PT_DYNAMIC segment.
(elf_backend_want_got_plt): Define to zero for Symbian OS.
* emulparams/armsymbian.sh: Use armbpabi script.
* scripttempl/armbpabi.sc: New script.
Diffstat (limited to 'bfd/elfarm-nabi.c')
-rw-r--r-- | bfd/elfarm-nabi.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bfd/elfarm-nabi.c b/bfd/elfarm-nabi.c index 7c6e7c2..6644578 100644 --- a/bfd/elfarm-nabi.c +++ b/bfd/elfarm-nabi.c @@ -936,6 +936,7 @@ elf32_arm_symbian_modify_segment_map (abfd, info) struct bfd_link_info *info ATTRIBUTE_UNUSED; { struct elf_segment_map *m; + asection *dynsec; /* The first PT_LOAD segment will have the program headers and file headers in it by default -- but BPABI object files should not @@ -946,6 +947,19 @@ elf32_arm_symbian_modify_segment_map (abfd, info) m->includes_filehdr = 0; m->includes_phdrs = 0; } + + /* BPABI shared libraries and executables should have a PT_DYNAMIC + segment. However, because the .dynamic section is not marked + with SEC_LOAD, the generic ELF code will not create such a + segment. */ + dynsec = bfd_get_section_by_name (abfd, ".dynamic"); + if (dynsec) + { + m = _bfd_elf_make_dynamic_segment (abfd, dynsec); + m->next = elf_tdata (abfd)->segment_map; + elf_tdata (abfd)->segment_map = m; + } + return TRUE; } @@ -970,5 +984,9 @@ elf32_arm_symbian_modify_segment_map (abfd, info) #undef elf_backend_got_header_size #define elf_backend_got_header_size 0 +/* Similarly, there is no .got.plt section. */ +#undef elf_backend_want_got_plt +#define elf_backend_want_got_plt 0 + #include "elf32-target.h" |