diff options
author | Daniel Jacobowitz <drow@false.org> | 2008-05-03 15:36:34 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2008-05-03 15:36:34 +0000 |
commit | 95720a862503224bc3a3091fb4c7271284d6ad1f (patch) | |
tree | 9680593e38dcd3816c590cdd5755af94ef85808a | |
parent | fa0f268daf0bea16c9e8f5cc17c3a076b0863aa2 (diff) | |
download | gdb-95720a862503224bc3a3091fb4c7271284d6ad1f.zip gdb-95720a862503224bc3a3091fb4c7271284d6ad1f.tar.gz gdb-95720a862503224bc3a3091fb4c7271284d6ad1f.tar.bz2 |
* elf32-arm.c (elf32_arm_symbian_link_hash_table_create): Use
ARRAY_SIZE.
(elf32_arm_symbian_plt_sym_val): New.
(elf_backend_plt_sym_val): Define.
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 18 |
2 files changed, 23 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f4a679f..bc5e139 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2008-05-03 Daniel Jacobowitz <dan@codesourcery.com> + + * elf32-arm.c (elf32_arm_symbian_link_hash_table_create): Use + ARRAY_SIZE. + (elf32_arm_symbian_plt_sym_val): New. + (elf_backend_plt_sym_val): Define. + 2008-05-03 Alan Modra <amodra@bigpond.net.au> PR 2995, PR 6473 diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index d372975..b8abd58 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -10573,8 +10573,8 @@ elf32_arm_symbian_link_hash_table_create (bfd *abfd) = (struct elf32_arm_link_hash_table *)ret; /* There is no PLT header for Symbian OS. */ htab->plt_header_size = 0; - /* The PLT entries are each three instructions. */ - htab->plt_entry_size = 4 * NUM_ELEM (elf32_arm_symbian_plt_entry); + /* The PLT entries are each one instruction and one word. */ + htab->plt_entry_size = 4 * ARRAY_SIZE (elf32_arm_symbian_plt_entry); htab->symbian_p = 1; /* Symbian uses armv5t or above, so use_blx is always true. */ htab->use_blx = 1; @@ -10650,6 +10650,17 @@ elf32_arm_symbian_modify_segment_map (bfd *abfd, return elf32_arm_modify_segment_map (abfd, info); } +/* Return address for Ith PLT stub in section PLT, for relocation REL + or (bfd_vma) -1 if it should not be included. */ + +static bfd_vma +elf32_arm_symbian_plt_sym_val (bfd_vma i, const asection *plt, + const arelent *rel ATTRIBUTE_UNUSED) +{ + return plt->vma + 4 * ARRAY_SIZE (elf32_arm_symbian_plt_entry) * i; +} + + #undef elf32_bed #define elf32_bed elf32_arm_symbian_bed @@ -10686,6 +10697,9 @@ elf32_arm_symbian_modify_segment_map (bfd *abfd, #undef elf_backend_want_got_plt #define elf_backend_want_got_plt 0 +#undef elf_backend_plt_sym_val +#define elf_backend_plt_sym_val elf32_arm_symbian_plt_sym_val + #undef elf_backend_may_use_rel_p #define elf_backend_may_use_rel_p 1 #undef elf_backend_may_use_rela_p |