diff options
author | Paul Brook <paul@codesourcery.com> | 2004-10-27 20:48:22 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2004-10-27 20:48:22 +0000 |
commit | 5b5bb7410135d8d42b2fcd545abbd37f8b0f6d6f (patch) | |
tree | 4233da9e88bfbee534f6627a80c25ac8359818cc /bfd/elfarm-nabi.c | |
parent | fcad0fa40f42e82567ab1e98a65887a54ea5a6d4 (diff) | |
download | gdb-5b5bb7410135d8d42b2fcd545abbd37f8b0f6d6f.zip gdb-5b5bb7410135d8d42b2fcd545abbd37f8b0f6d6f.tar.gz gdb-5b5bb7410135d8d42b2fcd545abbd37f8b0f6d6f.tar.bz2 |
2004-10-27 Richard Earnshaw <rearnsha@arm.com>
bfd/
* elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
(elf32_arm_final_link_relocate): Ditto.
(arm_add_to_rel, elf32_arm_relocate_section): Ditto.
(elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
(elf32_arm_adjust_dynamic_symbol): Ditto.
* elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
(elf32_arm_r_howto): ... To here.
(elf32_arm_howto_from_type): Use elf32_arm_r_howto.
include/
* elf/arm.h: Add R_ARM_CALL and R_ARM_JUMP32.
Diffstat (limited to 'bfd/elfarm-nabi.c')
-rw-r--r-- | bfd/elfarm-nabi.c | 116 |
1 files changed, 90 insertions, 26 deletions
diff --git a/bfd/elfarm-nabi.c b/bfd/elfarm-nabi.c index 8b09cea..4c22f42 100644 --- a/bfd/elfarm-nabi.c +++ b/bfd/elfarm-nabi.c @@ -453,37 +453,35 @@ static reloc_howto_type elf32_arm_howto_table[] = 0x00ffffff, /* dst_mask */ TRUE), /* pcrel_offset */ - /* End of relocs used in ARM Linux */ - - HOWTO (R_ARM_RREL32, /* type */ - 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ - 0, /* bitsize */ - FALSE, /* pc_relative */ + HOWTO (R_ARM_CALL, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 24, /* bitsize */ + TRUE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_dont,/* complain_on_overflow */ + complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ - "R_ARM_RREL32", /* name */ + "R_ARM_CALL", /* name */ FALSE, /* partial_inplace */ - 0, /* src_mask */ - 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + 0x00ffffff, /* src_mask */ + 0x00ffffff, /* dst_mask */ + TRUE), /* pcrel_offset */ - HOWTO (R_ARM_RABS32, /* type */ - 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ - 0, /* bitsize */ - FALSE, /* pc_relative */ + HOWTO (R_ARM_JUMP24, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 24, /* bitsize */ + TRUE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_dont,/* complain_on_overflow */ + complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ - "R_ARM_RABS32", /* name */ + "R_ARM_JUMP24", /* name */ FALSE, /* partial_inplace */ - 0, /* src_mask */ - 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + 0x00ffffff, /* src_mask */ + 0x00ffffff, /* dst_mask */ + TRUE), /* pcrel_offset */ - HOWTO (R_ARM_RPC24, /* type */ + HOWTO (R_ARM_NONE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ @@ -491,13 +489,13 @@ static reloc_howto_type elf32_arm_howto_table[] = 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ - "R_ARM_RPC24", /* name */ + "R_ARM_unknown_30", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE), /* pcrel_offset */ - HOWTO (R_ARM_RBASE, /* type */ + HOWTO (R_ARM_NONE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ @@ -505,7 +503,7 @@ static reloc_howto_type elf32_arm_howto_table[] = 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ - "R_ARM_RBASE", /* name */ + "R_ARM_unknown_31", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ @@ -746,6 +744,66 @@ static reloc_howto_type elf32_arm_got_prel = 0xffffffff, /* dst_mask */ TRUE); /* pcrel_offset */ +/* Currently unused relocations. */ +static reloc_howto_type elf32_arm_r_howto[4] = +{ + HOWTO (R_ARM_RREL32, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont,/* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_ARM_RREL32", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + FALSE), /* pcrel_offset */ + + HOWTO (R_ARM_RABS32, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont,/* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_ARM_RABS32", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + FALSE), /* pcrel_offset */ + + HOWTO (R_ARM_RPC24, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont,/* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_ARM_RPC24", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + FALSE), /* pcrel_offset */ + + HOWTO (R_ARM_RBASE, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont,/* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_ARM_RBASE", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + FALSE) /* pcrel_offset */ +}; + static reloc_howto_type * elf32_arm_howto_from_type (unsigned int r_type) { @@ -769,6 +827,12 @@ elf32_arm_howto_from_type (unsigned int r_type) case R_ARM_THM_PC9: return &elf32_arm_thm_pc9_howto; + case R_ARM_RREL32: + case R_ARM_RABS32: + case R_ARM_RPC24: + case R_ARM_RBASE: + return &elf32_arm_r_howto[r_type - R_ARM_RREL32]; + default: return NULL; } |