Line 3347... |
Line 3347... |
if (!info->shared)
|
if (!info->shared)
|
{
|
{
|
switch (r_type)
|
switch (r_type)
|
{
|
{
|
case R_PARISC_DLTIND21L:
|
case R_PARISC_DLTIND21L:
|
|
case R_PARISC_TLS_GD21L:
|
|
case R_PARISC_TLS_LDM21L:
|
|
case R_PARISC_TLS_IE21L:
|
r_type = R_PARISC_DPREL21L;
|
r_type = R_PARISC_DPREL21L;
|
break;
|
break;
|
|
|
case R_PARISC_DLTIND14R:
|
case R_PARISC_DLTIND14R:
|
|
case R_PARISC_TLS_GD14R:
|
|
case R_PARISC_TLS_LDM14R:
|
|
case R_PARISC_TLS_IE14R:
|
r_type = R_PARISC_DPREL14R;
|
r_type = R_PARISC_DPREL14R;
|
break;
|
break;
|
|
|
case R_PARISC_DLTIND14F:
|
case R_PARISC_DLTIND14F:
|
r_type = R_PARISC_DPREL14F;
|
r_type = R_PARISC_DPREL14F;
|
Line 3416... |
Line 3422... |
break;
|
break;
|
|
|
case R_PARISC_DPREL21L:
|
case R_PARISC_DPREL21L:
|
case R_PARISC_DPREL14R:
|
case R_PARISC_DPREL14R:
|
case R_PARISC_DPREL14F:
|
case R_PARISC_DPREL14F:
|
case R_PARISC_TLS_GD21L:
|
|
case R_PARISC_TLS_LDM21L:
|
|
case R_PARISC_TLS_IE21L:
|
|
/* Convert instructions that use the linkage table pointer (r19) to
|
/* Convert instructions that use the linkage table pointer (r19) to
|
instructions that use the global data pointer (dp). This is the
|
instructions that use the global data pointer (dp). This is the
|
most efficient way of using PIC code in an incomplete executable,
|
most efficient way of using PIC code in an incomplete executable,
|
but the user must follow the standard runtime conventions for
|
but the user must follow the standard runtime conventions for
|
accessing data for this to work. */
|
accessing data for this to work. */
|
if (orig_r_type == R_PARISC_DLTIND21L
|
if (orig_r_type != r_type)
|
|| (!info->shared
|
{
|
&& (r_type == R_PARISC_TLS_GD21L
|
if (r_type == R_PARISC_DPREL21L)
|
|| r_type == R_PARISC_TLS_LDM21L
|
{
|
|| r_type == R_PARISC_TLS_IE21L)))
|
/* GCC sometimes uses a register other than r19 for the
|
{
|
operation, so we must convert any addil instruction
|
/* Convert addil instructions if the original reloc was a
|
|
DLTIND21L. GCC sometimes uses a register other than r19 for
|
|
the operation, so we must convert any addil instruction
|
|
that uses this relocation. */
|
that uses this relocation. */
|
if ((insn & 0xfc000000) == ((int) OP_ADDIL << 26))
|
if ((insn & 0xfc000000) == ((int) OP_ADDIL << 26))
|
insn = ADDIL_DP;
|
insn = ADDIL_DP;
|
else
|
else
|
/* We must have a ldil instruction. It's too hard to find
|
/* We must have a ldil instruction. It's too hard to find
|
Line 3448... |
Line 3448... |
input_section,
|
input_section,
|
(long) offset,
|
(long) offset,
|
howto->name,
|
howto->name,
|
insn);
|
insn);
|
}
|
}
|
else if (orig_r_type == R_PARISC_DLTIND14F)
|
else if (r_type == R_PARISC_DPREL14F)
|
{
|
{
|
/* This must be a format 1 load/store. Change the base
|
/* This must be a format 1 load/store. Change the base
|
register to dp. */
|
register to dp. */
|
insn = (insn & 0xfc1ffff) | (27 << 21);
|
insn = (insn & 0xfc1ffff) | (27 << 21);
|
}
|
}
|
|
}
|
|
|
/* For all the DP relative relocations, we need to examine the symbol's
|
/* For all the DP relative relocations, we need to examine the symbol's
|
section. If it has no section or if it's a code section, then
|
section. If it has no section or if it's a code section, then
|
"data pointer relative" makes no sense. In that case we don't
|
"data pointer relative" makes no sense. In that case we don't
|
adjust the "value", and for 21 bit addil instructions, we change the
|
adjust the "value", and for 21 bit addil instructions, we change the
|
Line 3479... |
Line 3480... |
/* Fall thru. */
|
/* Fall thru. */
|
|
|
case R_PARISC_DLTIND21L:
|
case R_PARISC_DLTIND21L:
|
case R_PARISC_DLTIND14R:
|
case R_PARISC_DLTIND14R:
|
case R_PARISC_DLTIND14F:
|
case R_PARISC_DLTIND14F:
|
|
case R_PARISC_TLS_GD21L:
|
|
case R_PARISC_TLS_LDM21L:
|
|
case R_PARISC_TLS_IE21L:
|
case R_PARISC_TLS_GD14R:
|
case R_PARISC_TLS_GD14R:
|
case R_PARISC_TLS_LDM14R:
|
case R_PARISC_TLS_LDM14R:
|
case R_PARISC_TLS_IE14R:
|
case R_PARISC_TLS_IE14R:
|
value -= elf_gp (input_section->output_section->owner);
|
value -= elf_gp (input_section->output_section->owner);
|
break;
|
break;
|