mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-18 13:23:10 +08:00
Implement R_PPC_EMB_{SDA21,RELSDA} relocations
This commit is contained in:
@ -3,6 +3,8 @@ Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
|||||||
* elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
|
* elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
|
||||||
the embedded bit is set on some objects and not on others. Just
|
the embedded bit is set on some objects and not on others. Just
|
||||||
or it together.
|
or it together.
|
||||||
|
(ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
|
||||||
|
relocations.
|
||||||
|
|
||||||
Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
|
Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
@ -145,7 +145,9 @@ static boolean ppc_elf_finish_dynamic_symbol PARAMS ((bfd *,
|
|||||||
|
|
||||||
static boolean ppc_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *));
|
static boolean ppc_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *));
|
||||||
|
|
||||||
#define BRANCH_PREDICT_BIT 0x200000
|
#define BRANCH_PREDICT_BIT 0x200000 /* branch prediction bit for branch taken relocs */
|
||||||
|
#define RA_REGISTER_MASK 0x001f0000 /* mask to set RA in memory instructions */
|
||||||
|
#define RA_REGISTER_SHIFT 16 /* value to shift register by to insert RA */
|
||||||
|
|
||||||
/* The name of the dynamic interpreter. This is put in the .interp
|
/* The name of the dynamic interpreter. This is put in the .interp
|
||||||
section. */
|
section. */
|
||||||
@ -2288,8 +2290,15 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
ret = false;
|
ret = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
goto unsupported;
|
|
||||||
|
if (r_type == R_PPC_EMB_SDA21)
|
||||||
|
{ /* fill in register field */
|
||||||
|
insn = bfd_get_32 (output_bfd, contents + offset - 2);
|
||||||
|
insn = (insn & ~RA_REGISTER_MASK) | (reg << RA_REGISTER_SHIFT);
|
||||||
|
bfd_put_32 (output_bfd, insn, contents + offset - 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case (int)R_PPC_PLTREL24:
|
case (int)R_PPC_PLTREL24:
|
||||||
case (int)R_PPC_COPY:
|
case (int)R_PPC_COPY:
|
||||||
|
Reference in New Issue
Block a user