Line 2860... |
Line 2860... |
contents + rel->r_offset);
|
contents + rel->r_offset);
|
}
|
}
|
continue;
|
continue;
|
|
|
case R_390_TLS_LDO32:
|
case R_390_TLS_LDO32:
|
if (info->shared)
|
if (info->shared || (input_section->flags & SEC_DEBUGGING))
|
relocation -= dtpoff_base (info);
|
relocation -= dtpoff_base (info);
|
else
|
else
|
/* When converting LDO to LE, we must negate. */
|
/* When converting LDO to LE, we must negate. */
|
relocation = -tpoff (info, relocation);
|
relocation = -tpoff (info, relocation);
|
break;
|
break;
|
Line 2917... |
Line 2917... |
{
|
{
|
unsigned int insn;
|
unsigned int insn;
|
|
|
insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
|
insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
|
if ((insn & 0xff000fff) != 0x4d000000 &&
|
if ((insn & 0xff000fff) != 0x4d000000 &&
|
(insn & 0xffff0000) != 0xc0e50000)
|
(insn & 0xffff0000) != 0xc0e50000 &&
|
|
(insn & 0xff000000) != 0x0d000000)
|
invalid_tls_insn (input_bfd, input_section, rel);
|
invalid_tls_insn (input_bfd, input_section, rel);
|
if (!info->shared && (h == NULL || h->dynindx == -1))
|
if (!info->shared && (h == NULL || h->dynindx == -1))
|
{
|
{
|
if ((insn & 0xff000000) == 0x4d000000)
|
if ((insn & 0xff000000) == 0x0d000000)
|
|
{
|
|
/* GD->LE transition.
|
|
basr rx, ry -> nopr r7 */
|
|
insn = 0x07070000 | (insn & 0xffff);
|
|
}
|
|
else if ((insn & 0xff000000) == 0x4d000000)
|
{
|
{
|
/* GD->LE transition.
|
/* GD->LE transition.
|
bas %r14,0(%rx,%r13) -> bc 0,0 */
|
bas %r14,0(%rx,%r13) -> bc 0,0 */
|
insn = 0x47000000;
|
insn = 0x47000000;
|
}
|
}
|
else
|
else
|
{
|
{
|
/* GD->LE transition.
|
/* GD->LE transition.
|
brasl %r14,_tls_get_addr@plt -> brcl 0,. */
|
brasl %r14,_tls_get_offset@plt -> brcl 0,. */
|
insn = 0xc0040000;
|
insn = 0xc0040000;
|
bfd_put_16 (output_bfd, 0x0000,
|
bfd_put_16 (output_bfd, 0x0000,
|
contents + rel->r_offset + 4);
|
contents + rel->r_offset + 4);
|
}
|
}
|
}
|
}
|
else
|
else
|
{
|
{
|
|
/* If basr is used in the pic case to invoke
|
|
_tls_get_offset, something went wrong before. */
|
|
if ((insn & 0xff000000) == 0x0d000000)
|
|
invalid_tls_insn (input_bfd, input_section, rel);
|
|
|
if ((insn & 0xff000000) == 0x4d000000)
|
if ((insn & 0xff000000) == 0x4d000000)
|
{
|
{
|
/* GD->IE transition.
|
/* GD->IE transition.
|
bas %r14,0(%rx,%r13) -> l %r2,0(%r2,%r12) */
|
bas %r14,0(%rx,%r13) -> l %r2,0(%r2,%r12) */
|
insn = 0x5822c000;
|
insn = 0x5822c000;
|
Line 2964... |
Line 2976... |
{
|
{
|
unsigned int insn;
|
unsigned int insn;
|
|
|
insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
|
insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
|
if ((insn & 0xff000fff) != 0x4d000000 &&
|
if ((insn & 0xff000fff) != 0x4d000000 &&
|
(insn & 0xffff0000) != 0xc0e50000)
|
(insn & 0xffff0000) != 0xc0e50000 &&
|
|
(insn & 0xff000000) != 0x0d000000)
|
invalid_tls_insn (input_bfd, input_section, rel);
|
invalid_tls_insn (input_bfd, input_section, rel);
|
if ((insn & 0xff000000) == 0x4d000000)
|
|
|
if ((insn & 0xff000000) == 0x0d000000)
|
|
{
|
|
/* LD->LE transition.
|
|
basr rx, ry -> nopr r7 */
|
|
insn = 0x07070000 | (insn & 0xffff);
|
|
}
|
|
else if ((insn & 0xff000000) == 0x4d000000)
|
{
|
{
|
/* LD->LE transition.
|
/* LD->LE transition.
|
bas %r14,0(%rx,%r13) -> bc 0,0 */
|
bas %r14,0(%rx,%r13) -> bc 0,0 */
|
insn = 0x47000000;
|
insn = 0x47000000;
|
}
|
}
|
else
|
else
|
{
|
{
|
/* LD->LE transition.
|
/* LD->LE transition.
|
brasl %r14,__tls_get_addr@plt -> brcl 0,. */
|
brasl %r14,__tls_get_offset@plt -> brcl 0,. */
|
insn = 0xc0040000;
|
insn = 0xc0040000;
|
bfd_put_16 (output_bfd, 0x0000,
|
bfd_put_16 (output_bfd, 0x0000,
|
contents + rel->r_offset + 4);
|
contents + rel->r_offset + 4);
|
}
|
}
|
bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
|
bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
|