| @@ -3415,39 +3415,32 @@ final_link_relocate (asection *input_sec | | | @@ -3415,39 +3415,32 @@ final_link_relocate (asection *input_sec |
3415 | case R_PARISC_PCREL17C: | | 3415 | case R_PARISC_PCREL17C: |
3416 | case R_PARISC_PCREL17R: | | 3416 | case R_PARISC_PCREL17R: |
3417 | case R_PARISC_PCREL14R: | | 3417 | case R_PARISC_PCREL14R: |
3418 | case R_PARISC_PCREL14F: | | 3418 | case R_PARISC_PCREL14F: |
3419 | case R_PARISC_PCREL32: | | 3419 | case R_PARISC_PCREL32: |
3420 | /* Make it a pc relative offset. */ | | 3420 | /* Make it a pc relative offset. */ |
3421 | value -= location; | | 3421 | value -= location; |
3422 | addend -= 8; | | 3422 | addend -= 8; |
3423 | break; | | 3423 | break; |
3424 | | | 3424 | |
3425 | case R_PARISC_DPREL21L: | | 3425 | case R_PARISC_DPREL21L: |
3426 | case R_PARISC_DPREL14R: | | 3426 | case R_PARISC_DPREL14R: |
3427 | case R_PARISC_DPREL14F: | | 3427 | case R_PARISC_DPREL14F: |
3428 | case R_PARISC_TLS_GD21L: | | | |
3429 | case R_PARISC_TLS_LDM21L: | | | |
3430 | case R_PARISC_TLS_IE21L: | | | |
3431 | /* Convert instructions that use the linkage table pointer (r19) to | | 3428 | /* Convert instructions that use the linkage table pointer (r19) to |
3432 | instructions that use the global data pointer (dp). This is the | | 3429 | instructions that use the global data pointer (dp). This is the |
3433 | most efficient way of using PIC code in an incomplete executable, | | 3430 | most efficient way of using PIC code in an incomplete executable, |
3434 | but the user must follow the standard runtime conventions for | | 3431 | but the user must follow the standard runtime conventions for |
3435 | accessing data for this to work. */ | | 3432 | accessing data for this to work. */ |
3436 | if (orig_r_type == R_PARISC_DLTIND21L | | 3433 | if (orig_r_type == R_PARISC_DLTIND21L) |
3437 | || (!info->shared | | | |
3438 | && (r_type == R_PARISC_TLS_GD21L | | | |
3439 | || r_type == R_PARISC_TLS_LDM21L | | | |
3440 | || r_type == R_PARISC_TLS_IE21L))) | | | |
3441 | { | | 3434 | { |
3442 | /* Convert addil instructions if the original reloc was a | | 3435 | /* Convert addil instructions if the original reloc was a |
3443 | DLTIND21L. GCC sometimes uses a register other than r19 for | | 3436 | DLTIND21L. GCC sometimes uses a register other than r19 for |
3444 | the operation, so we must convert any addil instruction | | 3437 | the operation, so we must convert any addil instruction |
3445 | that uses this relocation. */ | | 3438 | that uses this relocation. */ |
3446 | if ((insn & 0xfc000000) == ((int) OP_ADDIL << 26)) | | 3439 | if ((insn & 0xfc000000) == ((int) OP_ADDIL << 26)) |
3447 | insn = ADDIL_DP; | | 3440 | insn = ADDIL_DP; |
3448 | else | | 3441 | else |
3449 | /* We must have a ldil instruction. It's too hard to find | | 3442 | /* We must have a ldil instruction. It's too hard to find |
3450 | and convert the associated add instruction, so issue an | | 3443 | and convert the associated add instruction, so issue an |
3451 | error. */ | | 3444 | error. */ |
3452 | (*_bfd_error_handler) | | 3445 | (*_bfd_error_handler) |
3453 | (_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"), | | 3446 | (_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"), |
| @@ -3478,28 +3471,31 @@ final_link_relocate (asection *input_sec | | | @@ -3478,28 +3471,31 @@ final_link_relocate (asection *input_sec |
3478 | == (((int) OP_ADDIL << 26) | (27 << 21))) | | 3471 | == (((int) OP_ADDIL << 26) | (27 << 21))) |
3479 | { | | 3472 | { |
3480 | insn &= ~ (0x1f << 21); | | 3473 | insn &= ~ (0x1f << 21); |
3481 | } | | 3474 | } |
3482 | /* Now try to make things easy for the dynamic linker. */ | | 3475 | /* Now try to make things easy for the dynamic linker. */ |
3483 | | | 3476 | |
3484 | break; | | 3477 | break; |
3485 | } | | 3478 | } |
3486 | /* Fall thru. */ | | 3479 | /* Fall thru. */ |
3487 | | | 3480 | |
3488 | case R_PARISC_DLTIND21L: | | 3481 | case R_PARISC_DLTIND21L: |
3489 | case R_PARISC_DLTIND14R: | | 3482 | case R_PARISC_DLTIND14R: |
3490 | case R_PARISC_DLTIND14F: | | 3483 | case R_PARISC_DLTIND14F: |
| | | 3484 | case R_PARISC_TLS_GD21L: |
3491 | case R_PARISC_TLS_GD14R: | | 3485 | case R_PARISC_TLS_GD14R: |
| | | 3486 | case R_PARISC_TLS_LDM21L: |
3492 | case R_PARISC_TLS_LDM14R: | | 3487 | case R_PARISC_TLS_LDM14R: |
| | | 3488 | case R_PARISC_TLS_IE21L: |
3493 | case R_PARISC_TLS_IE14R: | | 3489 | case R_PARISC_TLS_IE14R: |
3494 | value -= elf_gp (input_section->output_section->owner); | | 3490 | value -= elf_gp (input_section->output_section->owner); |
3495 | break; | | 3491 | break; |
3496 | | | 3492 | |
3497 | case R_PARISC_SEGREL32: | | 3493 | case R_PARISC_SEGREL32: |
3498 | if ((sym_sec->flags & SEC_CODE) != 0) | | 3494 | if ((sym_sec->flags & SEC_CODE) != 0) |
3499 | value -= htab->text_segment_base; | | 3495 | value -= htab->text_segment_base; |
3500 | else | | 3496 | else |
3501 | value -= htab->data_segment_base; | | 3497 | value -= htab->data_segment_base; |
3502 | break; | | 3498 | break; |
3503 | | | 3499 | |
3504 | default: | | 3500 | default: |
3505 | break; | | 3501 | break; |