aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2004-11-11 18:24:24 +0000
committerMark Mitchell <mark@codesourcery.com>2004-11-11 18:24:24 +0000
commit6366ff1ead04d6d0f312b90ab270e95a9d078a10 (patch)
tree71fc682def0920229cdc37825ec8f6caa6deb7e9 /bfd/elf32-arm.c
parent85c9d3b84bde5fd92d8db5c0f561e166a64d18be (diff)
downloadgdb-6366ff1ead04d6d0f312b90ab270e95a9d078a10.zip
gdb-6366ff1ead04d6d0f312b90ab270e95a9d078a10.tar.gz
gdb-6366ff1ead04d6d0f312b90ab270e95a9d078a10.tar.bz2
* elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
R_ARM_RELATIVE on Symbian OS.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index e55c7c5..a7c3246 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -2381,15 +2381,18 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
/* This symbol is local, or marked to become local. */
relocate = TRUE;
if (globals->symbian_p)
- /* On Symbian OS, the data segment and text segement
- can be relocated independently. Therefore, we must
- indicate the segment to which this relocation is
- relative. The BPABI allows us to use any symbol in
- the right segment; we just use the section symbol
- as it is convenient. (We cannot use the symbol
- given by "h" directly as it will not appear in the
- dynamic symbol table.) */
- symbol = input_section->output_section->target_index;
+ {
+ /* On Symbian OS, the data segment and text segement
+ can be relocated independently. Therefore, we
+ must indicate the segment to which this
+ relocation is relative. The BPABI allows us to
+ use any symbol in the right segment; we just use
+ the section symbol as it is convenient. (We
+ cannot use the symbol given by "h" directly as it
+ will not appear in the dynamic symbol table.) */
+ symbol = elf_section_data (sym_sec->output_section)->dynindx;
+ BFD_ASSERT (symbol != 0);
+ }
else
/* On SVR4-ish systems, the dynamic loader cannot
relocate the text and data segments independently,