aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2004-11-08 22:08:07 +0000
committerMark Mitchell <mark@codesourcery.com>2004-11-08 22:08:07 +0000
commita16385dc254dea2eaf53172e9c0c8e0bc837666d (patch)
tree85859f74acbb52026f2c88b29352b75f9840c1f6 /bfd/elf32-arm.c
parentbcfca652788772654e59e10ff8d9bf8f10a88cf8 (diff)
downloadgdb-a16385dc254dea2eaf53172e9c0c8e0bc837666d.zip
gdb-a16385dc254dea2eaf53172e9c0c8e0bc837666d.tar.gz
gdb-a16385dc254dea2eaf53172e9c0c8e0bc837666d.tar.bz2
* elf32-arm.c (elf32_arm_final_link_relocate): When generating an
R_ARM_RELATIVE relocation for Symbian OS, mention the section symbol in the relocation.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 11dc6fb..8085109 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -2376,9 +2376,26 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
else
{
+ int symbol;
+
/* This symbol is local, or marked to become local. */
relocate = TRUE;
- outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
+ 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;
+ else
+ /* On SVR4-ish systems, the dynamic loader cannot
+ relocate the text and data segments independently,
+ so the symbol does not matter. */
+ symbol = 0;
+ outrel.r_info = ELF32_R_INFO (symbol, R_ARM_RELATIVE);
}
loc = sreloc->contents;